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
MovieNetwork/Wubble
app/src/main/java/com/proxima/Wubble/adapters/ProfileRecyclerAdapter.java
[ "public class FollowActivity extends ToolbarActivity {\n\n private Context context;\n private RecyclerView mRecyclerView;\n private RecyclerView.Adapter mAdapter;\n private RecyclerView.LayoutManager mLayoutManager;\n private List<ParseUser> mFollowUserList;\n private ArrayList<String> followList ...
import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.w...
if (position != 0) { wubbleObject = myWubbles.get(position - 1); final ParseUser currentUser = ParseUser.getCurrentUser(); final String currentUserName = currentUser.getUsername(); final String objectId = wubbleObject.getObjectId(); // set usernam...
Intent toWubble = new Intent(mContext, WubbleActivity.class);
3
nutritionfactsorg/daily-dozen-android
app/src/main/java/org/nutritionfacts/dailydozen/activity/ServingsHistoryActivity.java
[ "public class Common {\n public static final String FILE_PROVIDER_AUTHORITY = \"org.nutritionfacts.dailydozen.fileprovider\";\n public static final String PREFERENCES_FILE = \"org.nutritionfacts.dailydozen.preferences\";\n\n public static final int MAX_SERVINGS = 24;\n public static final int MAX_TWEAKS...
import android.app.ProgressDialog; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import androidx.appcompat.app.AppCompatActivity; import com.github.mikephil.charting.charts.CombinedChart; import com.github.mikephil.charting.data.CombinedData; import com.github.mikephil.charting....
package org.nutritionfacts.dailydozen.activity; public class ServingsHistoryActivity extends AppCompatActivity implements AdapterView.OnItemSelectedListener, OnChartValueSelectedListener, ProgressListener { private ActivityServingsHistoryBinding binding; private ProgressDialog progressDialog; ...
LoadHistoryTaskParams loadHistoryTaskParams = new LoadHistoryTaskParams(
8
gamblore/AndroidPunk
sample/AndroidPunkTest/src/com/gamblore/androidpunk/entities/Volcano.java
[ "public class Entity extends Tweener {\n\n\tprivate static final String TAG = \"Entity\";\n\t\n /**\n * If the Entity should render.\n */\n public boolean visible = true;\n\n /**\n * If the Entity should respond to collision checks.\n */\n public boolean collidable = true;\n\n /**\n ...
import net.androidpunk.Entity; import net.androidpunk.FP; import net.androidpunk.graphics.atlas.SpriteMap; import net.androidpunk.graphics.opengl.SubTexture; import com.gamblore.androidpunk.Main;
package com.gamblore.androidpunk.entities; public class Volcano extends Entity { private static final String ANIM_BUBBLE = "Bubble"; private static final float SPEW_INTERVAL = 2.5f; private float mTimer; private SpriteMap mMap; public Volcano(int x, int y, int angle) { super(x, y);
SubTexture volcano = Main.mAtlas.getSubTexture("volcano");
3
broamski/cantilever
src/main/java/com/dogeops/cantilever/truss/TrussClient.java
[ "public class MessageQueueFactory {\n\tprivate static final Logger logger = Logger.getLogger(MessageQueueFactory.class\n\t\t\t.getName());\n\n\tpublic enum QueueTypes {\n\t\tAMQ, SQS, NAN;\n\t\tpublic static QueueTypes toQueue(String str) {\n\t\t\ttry {\n\t\t\t\treturn valueOf(str);\n\t\t\t} catch (Exception ex) {\...
import org.apache.log4j.Logger; import com.dogeops.cantilever.messagequeue.MessageQueueFactory; import com.dogeops.cantilever.messagequeue.MessageQueueInterface; import com.dogeops.cantilever.truss.client.ning.HTTPAsyncLogMessageListener; import com.dogeops.cantilever.utils.Configuration; import com.dogeops.cantilever....
package com.dogeops.cantilever.truss; public class TrussClient { private static final Logger logger = Logger.getLogger(TrussClient.class .getName()); public TrussClient() { } public static void main(String[] args) { logger.debug("Truss client starting..."); Configuration config = new Configuration(); ...
MessageQueueFactory mqf = new MessageQueueFactory();
0
codeforkjeff/conciliator
src/main/java/com/codefork/refine/orcid/Orcid.java
[ "@Component\npublic class Config {\n\n public static final String PROP_CACHE_ENABLED = \"cache.enabled\";\n public static final String PROP_CACHE_TTL = \"cache.ttl\";\n public static final String PROP_CACHE_SIZE = \"cache.size\";\n\n private static final String CONFIG_FILENAME = \"conciliator.properties...
import com.codefork.refine.Config; import com.codefork.refine.SearchQuery; import com.codefork.refine.ThreadPoolFactory; import com.codefork.refine.datasource.ConnectionFactory; import com.codefork.refine.resources.Result; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.C...
package com.codefork.refine.orcid; @Component("orcid") public class Orcid extends OrcidBase { @Autowired public Orcid(Config config, CacheManager cacheManager, ThreadPoolFactory threadPoolFactory, ConnectionFactory connectionFactory) { super(config, cacheManager, threadPoolFactory, connectionFactory...
public List<Result> search(SearchQuery query) throws Exception {
1
cloudera/director-aws-plugin
provider/src/main/java/com/cloudera/director/aws/ec2/allocation/asg/AutoScalingGroupAllocator.java
[ "public static boolean isAmazonServiceException(Throwable throwable, String errorCode) {\n return (throwable instanceof AmazonServiceException)\n && errorCode.equals(((AmazonServiceException) throwable).getErrorCode());\n}", "public static boolean isUnrecoverable(Throwable t) {\n return !(t instanceof Amaz...
import static com.cloudera.director.aws.AWSExceptions.isAmazonServiceException; import static com.cloudera.director.aws.AWSExceptions.isUnrecoverable; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.autoscaling.AmazonAutoScalingAsyncClient; import com.amazonaws.services.autoscaling.model.Alre...
/** * Allocates an Auto Scaling group. * * @throws InterruptedException if the operation is interrupted */ @Override public Collection<EC2Instance> allocate() throws InterruptedException { LOG.info(">> Requesting Auto Scaling group of {} - {} instances for {}", minCount, desiredCount, tem...
Callables2.callAll(
3
guigarage/ObserverPattern
impl/src/main/java/com/guigarage/binding/SwingBinding.java
[ "public interface Observable<V> {\n\n /**\n * Returns the current value.\n * @return the value\n */\n V getValue();\n\n /**\n * Returns an {@link Optional} that contains the current value or {@code null}. This is a\n * convenience method that can be used to acces the value by using a fl...
import javax.observer.Observable; import javax.observer.Property; import javax.observer.Subscription; import javax.observer.binding.ConvertableBidirectionalBindable; import javax.observer.binding.ConvertableBindable; import javax.swing.SwingUtilities; import java.awt.Component; import java.beans.PropertyChangeListener;...
package com.guigarage.binding; /** * Provides Bindings for Swing. Swing attributes will automatically be handled in the EDT and properties will * automatically be handled in a background thread. */ public class SwingBinding { private static Executor backgroundExecutor = Executors.newSingleThreadExecutor(); ...
public <U> Subscription to(Observable<U> observable, Function<U, T> converter) {
0
citerus/bookstore-cqrs-example
shopping-context/src/test/java/se/citerus/cqrs/bookstore/shopping/resource/CartResourceTest.java
[ "public class AddItemRequest extends TransportObject {\n\n @NotEmpty\n @Pattern(regexp = ID_PATTERN)\n public String productId;\n\n}", "public class CartDto extends TransportObject {\n\n public String cartId;\n\n public long totalPrice;\n\n public int totalQuantity;\n\n public List<LineItemDto> lineItems;\...
import io.dropwizard.testing.junit.ResourceTestRule; import org.junit.After; import org.junit.ClassRule; import org.junit.Test; import se.citerus.cqrs.bookstore.shopping.api.AddItemRequest; import se.citerus.cqrs.bookstore.shopping.api.CartDto; import se.citerus.cqrs.bookstore.shopping.api.CreateCartRequest; import se....
package se.citerus.cqrs.bookstore.shopping.resource; public class CartResourceTest { private static ProductCatalogClient productCatalogClient = mock(ProductCatalogClient.class); private static final String CART_RESOURCE = "/carts"; @ClassRule public static final ResourceTestRule resources = ResourceTestR...
ProductDto productDto = new ProductDto();
6
KodeMunkie/imagetozxspec
src/main/java/uk/co/silentsoftware/core/converters/image/processors/ErrorDiffusionConverterImpl.java
[ "public class OptionsObject {\n\n\tprivate static final Logger log = LoggerFactory.getLogger(OptionsObject.class);\n\t\n\t/**\n\t * The version of preferences\n\t */\n\t@PreferencesField\n\tprivate int prefsVersion = 1;\n\t\n\t/**\n\t * The number of starts this app has had\n\t */\n\t@PreferencesField\n\tprivate in...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import uk.co.silentsoftware.config.OptionsObject; import uk.co.silentsoftware.config.SpectrumDefaults; import uk.co.silentsoftware.core.colourstrategy.ColourChoiceStrategy; import uk.co.silentsoftware.core.converters.image.ResultImage; import uk.co.silentsoftware...
/* Image to ZX Spec * Copyright (C) 2020 Silent Software (Benjamin Brown) * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License * as published by the Free Software Foundation, either version 3 * of the License, or (at your option) an...
private OptionsObject oo = OptionsObject.getInstance();
0
cytomine/Cytomine-java-client
src/main/java/be/cytomine/client/sample/UploadExample.java
[ "public class Cytomine {\n\n private static final Logger log = LogManager.getLogger(Cytomine.class);\n static Cytomine CYTOMINE;\n\n CytomineConnection defaultCytomineConnection;\n private String host;\n private String login;\n private String pass;\n private String publicKey;\n private Strin...
import be.cytomine.client.Cytomine; import be.cytomine.client.CytomineException; import be.cytomine.client.collections.Collection; import be.cytomine.client.collections.StorageCollection; import be.cytomine.client.models.UploadedFile; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger;
package be.cytomine.client.sample; /* * Copyright (c) 2009-2020. Authors: see NOTICE file. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICEN...
} catch (CytomineException e) {
1
edannenberg/maven-magento-plugin
src/main/java/de/bbe_consulting/mavento/MagentoInfoMojo.java
[ "public final class MagentoSqlUtil {\n\n protected static final String[] entityTableSuffixes = {\"attribute\", \"datetime\",\n \"decimal\", \"gallery\", \"int\", \"media_gallery\", \"media_gallery_value\", \"text\", \"tier_price\", \"type\", \"varchar\"};\n\n /**\n * Private constructor, only stati...
import java.io.File; import java.io.IOException; import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import org.apache.commons.lang.mutable.MutableL...
/** * Copyright 2011-2013 BBe Consulting GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
final List<MysqlTable> logTableDetails = MagentoSqlUtil.getLogTablesSize(dbSettings.get("dbname"), dbSettings.get("user"),
6
Gogolook-Inc/GogoMonkeyRun
UICompareRunner/com/james/uicomparerunner/ui/RecorderEditFrame.java
[ "public class R {\n\tpublic static class string {\n\t\tpublic static final String app_name = \"Gogo Monkey Run\";\n\n\t\tpublic static final String menu_file = Locale.getDefault().equals(Locale.TAIWAN) ? \"檔案\" : \"File\";\n\t\tpublic static final String menu_device = Locale.getDefault().equals(Locale.TAIWAN) ? \"裝...
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Event; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.WindowEvent; import jav...
package com.james.uicomparerunner.ui; public class RecorderEditFrame extends JFrame implements ActionListener { private int monitorWidth; private int monitorHeight; private JMenu[] jMenu = { new JMenu(R.string.menu_file) }; private JMenuItem[] fileMenu = { new JMenuItem(R.string.menu_file_save, KeyEvent....
SystemUtils.isMac() ? Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() : Event.CTRL_MASK));
5
urbanairship/datacube
src/test/java/com/urbanairship/datacube/HBaseHarnessTest.java
[ "public class HourDayMonthBucketer implements Bucketer<DateTime> {\n public static final BucketType hours = new BucketType(\"hour\", new byte[]{1});\n public static final BucketType days = new BucketType(\"day\", new byte[]{2});\n public static final BucketType months = new BucketType(\"month\", new byte[]...
import com.google.common.collect.ImmutableList; import com.urbanairship.datacube.bucketers.HourDayMonthBucketer; import com.urbanairship.datacube.bucketers.StringToBytesBucketer; import com.urbanairship.datacube.dbharnesses.HBaseDbHarness; import com.urbanairship.datacube.dbharnesses.SingleColumnParser; import com.urba...
package com.urbanairship.datacube; @RunWith(Parameterized.class) public class HBaseHarnessTest extends EmbeddedClusterTestAbstract { public static final byte[] DATA_CUBE_TABLE = "data_cube" .getBytes(); public static final byte[] CF = "c" .getBytes(); private final int batchSize; @BeforeClass ...
IdService idService = new MapIdService();
4
msteiger/jxmapviewer2
examples/src/sample6_mapkit/Sample6.java
[ "public class JXMapKit extends JPanel\r\n{\r\n private static final long serialVersionUID = -8366577998349912380L;\r\n private boolean miniMapVisible = true;\r\n private boolean zoomSliderVisible = true;\r\n private boolean zoomButtonsVisible = true;\r\n private final boolean sliderReversed = false;\...
import java.awt.Point; import java.awt.Rectangle; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; import java.awt.geom.Point2D; import javax.swing.JFrame; import javax.swing.JToolTip; import org.jxmapviewer.JXMapKit; import org.jxmapviewer.JXMapViewer; import org.jxmapviewer.OSMTileFactoryI...
package sample6_mapkit; /** * A simple sample application that uses JXMapKit * @author Martin Steiger */ public class Sample6 { /** * @param args the program args (ignored) */ public static void main(String[] args) {
final JXMapKit jXMapKit = new JXMapKit();
0
mrico/creole-parser
src/test/java/eu/mrico/creole/xhtml/XHtmlWriterTest.java
[ "public class Creole {\r\n\r\n public static Document parse(String s) {\r\n try {\r\n CreoleParser parser = CreoleParserFactory.newInstance().newParser();\r\n return parser.parse(new StringReader(s));\r\n\r\n } catch (CreoleException e) {\r\n throw new RuntimeExcept...
import eu.mrico.creole.Creole; import eu.mrico.creole.CreoleException; import eu.mrico.creole.ast.Link; import java.io.FileOutputStream; import java.io.InputStream; import java.io.FileNotFoundException; import eu.mrico.creole.ast.Heading; import eu.mrico.creole.ast.Document; import eu.mrico.creole.ast.Image; import eu....
package eu.mrico.creole.xhtml; public class XHtmlWriterTest { public XHtmlWriterTest() { } @Test public void htmlWrtier() throws CreoleException, FileNotFoundException { InputStream in = getClass().getResourceAsStream("/creole1.0test.txt"); assertNotNull(in); Document doc = ...
writer.setDecorator(Image.class, new DivElementDecorator("image"));
5
jglrxavpok/CustomAI
org/jglrxavpok/mods/customai/client/GuiCustomAI.java
[ "@Mod(modid=ModCustomAI.MODID, name = \"Custom AI\", version = \"@@MOD.VERSION@@\")\npublic class ModCustomAI\n{\n\n public static final PacketPipeline packetPipeline = new PacketPipeline(\"org.jglrxavpok.mods.customai.netty\", AbstractPacket.class);\n public static final String MODID = \"customai\";\n pri...
import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; import cpw.mods.fml.common.network.internal.FMLNetworkHandler; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiTextFie...
if(this.isWindowAddPresent) { for (int l = 0; l < this.windowAddButtons.size(); ++l) { GuiButton guibutton = (GuiButton)this.windowAddButtons.get(l); if (guibutton.mousePressed(this.mc, (int) (mouseX), mouseY)) ...
ModCustomAI.packetPipeline.sendToServer(new PacketUpdateAI(entity.getEntityId(), tasks, targetTasks));
4
krujos/data-lifecycle-service-broker
src/test/java/org/cloudfoundry/community/servicebroker/datalifecycle/service/LCServiceInstanceBindingServiceProdTest.java
[ "public static String PRODUCTION = \"prod\";", "public interface CopyProvider {\n\n\t/**\n\t * Create a copy of the source instance. The implementer should inject that\n\t * through an environment variable or other means. Upon the copy will be\n\t * launched and accessible to clients.\n\t * \n\t * @param instance...
import static org.cloudfoundry.community.servicebroker.datalifecycle.config.LCCatalogConfig.PRODUCTION; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import static org.mockito.Matchers.any; import static org.mockito.Mockito.never; import ...
package org.cloudfoundry.community.servicebroker.datalifecycle.service; public class LCServiceInstanceBindingServiceProdTest { @Mock AmazonEC2Client ec2Client;
private LCServiceInstanceBindingService bindingService;
4
3pillarlabs/socialauth
socialauth-filter/src/main/java/de/deltatree/social/web/filter/api/SASFHelper.java
[ "public class Contact implements Serializable {\n\tprivate static final long serialVersionUID = 7983770896851139223L;\n\n\t/**\n\t * Email\n\t */\n\tString email;\n\n\t/**\n\t * First Name\n\t */\n\tString firstName;\n\n\t/**\n\t * Last Name\n\t */\n\tString lastName;\n\n\t/**\n\t * Display Name\n\t */\n\tString di...
import java.util.List; import org.brickred.socialauth.AuthProvider; import org.brickred.socialauth.Contact; import org.brickred.socialauth.Profile; import org.brickred.socialauth.SocialAuthManager; import de.deltatree.social.web.filter.api.security.SASFSocialAuthManager; import de.deltatree.social.web.filter.impl.props...
package de.deltatree.social.web.filter.api; public interface SASFHelper { public static final String SESSION_KEY = "S_SASFHelper"; public SASFSocialAuthManager getMgr(); public void setError(String message, Throwable cause); public String getError(); public String getErrorPage(); public Throwable getErro...
public List<Contact> getContactList();
0
porunov/acme_client
src/main/java/com/jblur/acme_client/command/certificate/GenerateCertificateCommand.java
[ "public class CSRParser {\n private final static String COMMON_NAME = \"2.5.4.3\";\n\n private final static String EXTENSION_REQUEST = \"1.2.840.113549.1.9.14\";\n private final static ASN1ObjectIdentifier EXTENSION_REQUEST_IDENTIFIER\n = new ASN1ObjectIdentifier(EXTENSION_REQUEST);\n\n priva...
import com.jblur.acme_client.CSRParser; import com.jblur.acme_client.IOManager; import com.jblur.acme_client.Parameters; import com.jblur.acme_client.command.AccountKeyNotFoundException; import com.jblur.acme_client.manager.CertificateManager; import com.jblur.acme_client.manager.OrderManager; import org.shredzone.acme...
package com.jblur.acme_client.command.certificate; public class GenerateCertificateCommand extends CertificateCommand { private static final Logger LOG = LoggerFactory.getLogger(GenerateCertificateCommand.class);
public GenerateCertificateCommand(Parameters parameters)
2
salk31/RedQueryBuilder
redquerybuilder-core/src/main/java/com/redspr/redquerybuilder/core/client/expression/ExpressionColumn.java
[ "public class Session {\n\n private static IdentifierEscaper identifierEscaper = new IdentifierEscaper() {\n @Override\n public String quote(String id) {\n return \"\\\"\" + id + \"\\\"\";\n }\n };\n\n public void setIdentifierEscaper(IdentifierEscaper p) {\n identifierEs...
import java.util.ArrayList; import java.util.List; import com.google.gwt.event.shared.HandlerRegistration; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.ui.HorizontalPanel; import com.redspr.redquerybuilder.core.client.engine.Session; import com.redspr.redquerybuilder.core.client.engine.T...
package com.redspr.redquerybuilder.core.client.expression; /** * A expression that represents a column of a table or view. */ public class ExpressionColumn extends Expression implements TableEventHandler { private Database database; private final String schemaName; private String tableAlias; privat...
if (StringUtils.equals(tableAlias, tf2.getAlias())) {
5
alternativeTime/GlycanBuilderVaadin7Version
glycanbuilderv/src/ac/uk/icl/dell/vaadin/glycanbuilder/GlycanBuilder.java
[ "public interface LocalResourceWatcher {\n\tpublic void addLocalResource(File file);\n\tpublic void removeLocalResource(File file);\n}", "public class SimpleFileMenu extends DynamicMenuImpl implements ApplicationMenu{\n\tprivate static final long serialVersionUID=4968428219495753712L;\n\t\n\tprivate MenuItem file...
import java.util.ArrayList; import java.util.List; import java.util.Vector; import org.eurocarbdb.application.glycanbuilder.BuilderWorkspace; import org.eurocarbdb.application.glycanbuilder.Residue; import ac.uk.icl.dell.vaadin.LocalResourceWatcher; import ac.uk.icl.dell.vaadin.SimpleFileMenu; import ac.uk.icl.dell.vaa...
/* * Copyright (c) 2014. Matthew Campbell <matthew.campbell@mq.edu.au>, David R. Damerell <david@nixbioinf.org>. * * This file is part of GlycanBuilder Vaadin Release and its affliated projects EUROCarbDB, UniCarb-DB and UniCarbKB. * * This program is free software free software: you can redistribute it and/or mod...
protected static SimpleFileMenu menu;
1
qqq3/good-weather
app/src/main/java/org/asdtm/goodweather/WeatherForecastActivity.java
[ "public class WeatherForecastAdapter extends RecyclerView.Adapter<WeatherForecastViewHolder> {\n\n private Context mContext;\n private List<WeatherForecast> mWeatherList;\n private FragmentManager mFragmentManager;\n\n public WeatherForecastAdapter(Context context, List<WeatherForecast> weather, Fragmen...
import android.app.ProgressDialog; import android.content.SharedPreferences; import android.os.Bundle; import android.os.Handler; import android.support.v4.app.NavUtils; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.Menu...
package org.asdtm.goodweather; public class WeatherForecastActivity extends BaseActivity { private final String TAG = "WeatherForecastActivity"; private List<WeatherForecast> mWeatherForecastList; private ConnectionDetector mConnectionDetector; private RecyclerView mRecyclerView; private stat...
URL url = getWeatherForecastUrl(Constants.WEATHER_FORECAST_ENDPOINT, latitude, longitude, units, locale);
6
karthicks/gremlin-ogm
gremlin-objects/src/main/java/org/apache/tinkerpop/gremlin/object/reflect/Keys.java
[ "@Slf4j\n@ToString\n@NoArgsConstructor\n@SuppressWarnings({\"rawtypes\", \"PMD.TooManyStaticImports\"})\npublic class Element implements Comparable<Element> {\n\n public static final long serialVersionUID = 1L;\n public final ElementTo.Element withLabel = traversal -> traversal.hasLabel(label());\n @Setter\n pr...
import lombok.SneakyThrows; import static org.apache.tinkerpop.gremlin.object.reflect.Classes.isVertex; import static org.apache.tinkerpop.gremlin.object.reflect.Fields.fields; import static org.apache.tinkerpop.gremlin.object.reflect.Fields.has; import static org.apache.tinkerpop.gremlin.object.reflect.Fields.property...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ma...
Object propertyValue = propertyValue(field, element);
5
Apereo-Learning-Analytics-Initiative/Larissa
src/test/java/nl/uva/larissa/repository/couchdb/ITMapQuery.java
[ "public class CouchDbConnectorFactory {\n\n\tprivate static void applyMapperConfiguration(ObjectMapper mapper) {\n\t\t// working around broken NON_NULL stuff in Ektorp/Jackson\n\t\t// TODO report and/or check for update\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\n\n\t\tmapper.setDateFormat(new ISO8601...
import static org.junit.Assert.*; import java.net.MalformedURLException; import java.util.Arrays; import java.util.List; import nl.uva.larissa.CouchDbConnectorFactory; import nl.uva.larissa.json.model.StatementResult; import nl.uva.larissa.repository.DuplicateIdException; import nl.uva.larissa.repository.StatementFilte...
package nl.uva.larissa.repository.couchdb; public class ITMapQuery { static CouchDbStatementRepository repository; static HttpClient httpClient; private static String SERVER_URL = "http://localhost:5984"; private static String DB_ID = "mapquerytest"; @BeforeClass public static void beforeClass() throws Mal...
VoidingTargetException, UnknownStatementException {
5
rholder/esthree
src/main/java/com/github/rholder/esthree/cli/GetCommand.java
[ "public class Get implements Callable<Integer> {\n\n public static final int DEFAULT_BUF_SIZE = 4096 * 4;\n\n public AmazonS3Client amazonS3Client;\n public String bucket;\n public String key;\n public File outputFile;\n public boolean verbose;\n public RandomAccessFile output;\n\n private M...
import com.github.rholder.esthree.command.Get; import com.github.rholder.esthree.progress.MutableProgressListener; import com.github.rholder.esthree.progress.PrintingProgressListener; import com.github.rholder.esthree.progress.TimeProvider; import com.github.rholder.esthree.util.S3PathUtils; import io.airlift.command.A...
/* * Copyright 2014 Ray Holder * * 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...
new Get(amazonS3Client, bucket, key, outputFile, verbose)
0
leelit/STUer-client
app/src/main/java/com/leelit/stuer/MyBusinessActivity.java
[ "public class MyBusinessConstant {\n\n public static final String TAG = \"MyBusiness\";\n\n public static final int CARPOOL = 1;\n public static final int DATE = 2;\n public static final int SELL = 3;\n}", "public class MyCarpoolFragment extends MyBaseInfoFragment {\n\n @Override\n protected Bas...
import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.View; import com.leelit.stuer.constant.MyBusinessConstant; import com.leelit.stuer.module_baseinfo.carpool.MyCarpoolFragment; import com.leelit...
package com.leelit.stuer; public class MyBusinessActivity extends AppCompatActivity { @InjectView(R.id.toolbar) Toolbar mToolbar; private int mOrderActivityConstant; private Fragment mFragment; public static boolean needPush = false; public static String uniquecode = ""; public static...
mOrderActivityConstant = getIntent().getIntExtra(MyBusinessConstant.TAG, 1);
0
peterfuture/dttv-android
dttv/dttv-samples/src/main/java/dttv/app/frament/LocalVideoFragment.java
[ "public abstract class SimpleFragment extends SupportFragment {\n\n public String TAG = getClass().getSimpleName();\n\n protected View mView;\n protected Activity mActivity;\n protected Context mContext;\n private Unbinder mUnBinder;\n private boolean isInited = false;\n\n @Override\n public...
import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.provider.MediaStore; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget...
package dttv.app.frament; /** * A simple {@link Fragment} subclass. */ public class LocalVideoFragment extends SimpleFragment { @BindView(R.id.local_video_list) ListView localVideoListView; private Cursor videocursor; private int video_column_index; int count; @Override protected ...
PlayerUtil.getInstance().beginToPlayer(getActivity(),filePathName,fileName,1);
4
trekawek/coffee-gb
src/main/java/eu/rekawek/coffeegb/gui/Emulator.java
[ "public class Gameboy implements Runnable {\n\n public static final int TICKS_PER_SEC = 4_194_304;\n\n private final InterruptManager interruptManager;\n\n private final Gpu gpu;\n\n private final Mmu mmu;\n\n private final Cpu cpu;\n\n private final Timer timer;\n\n private final Dma dma;\n\n ...
import eu.rekawek.coffeegb.Gameboy; import eu.rekawek.coffeegb.GameboyOptions; import eu.rekawek.coffeegb.controller.Controller; import eu.rekawek.coffeegb.cpu.SpeedMode; import eu.rekawek.coffeegb.debug.Console; import eu.rekawek.coffeegb.gpu.Display; import eu.rekawek.coffeegb.memory.cart.Cartridge; import eu.rekawek...
package eu.rekawek.coffeegb.gui; public class Emulator { private static final int SCALE = 2;
private final GameboyOptions options;
1
GoodGrind/ghostwriter
ghostwriter-test-java-v7/src/test/java/io/ghostwriter/SourceLineMappingTest.java
[ "public class EnteringMessage extends Message<EnteringMessage.BasePayload> {\n\n public EnteringMessage(Object source, String method) {\n this(source, method, NoParameters.INSTANCE);\n }\n\n public EnteringMessage(Object source, String method, BasePayload payload) {\n super(source, method, p...
import io.ghostwriter.message.EnteringMessage; import io.ghostwriter.message.ExitingMessage; import io.ghostwriter.message.Message; import io.ghostwriter.message.OnErrorMessage; import io.ghostwriter.test.MessageSequenceAsserter; import io.ghostwriter.test.Parameter; import io.ghostwriter.test.TestBase; import org.juni...
package io.ghostwriter; public class SourceLineMappingTest extends TestBase { private void methodWithAnException() { throw new IllegalStateException("Some exception"); } @Test public void testSourceLineMapping() { InMemoryTracer inMemoryTracer = fetchedPreparedInMemoryTracer(); ...
MessageSequenceAsserter.messageSequence()
4
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/service/AwsService.java
[ "public class DeployConfig {\n\n private static final Logger LOG = LoggerFactory.getLogger(AwsDeployApplication.class);\n\n private static final String MAVEN_CENTRAL = \"https://repo1.maven.org/maven/\";\n private static final String DEFAULT_SERVICE_CONFIG_LOCATION = \"/etc/default/\";\n\n private stati...
import io.vertx.core.Vertx; import nl.jpoint.vertx.deploy.agent.DeployConfig; import nl.jpoint.vertx.deploy.agent.aws.state.AwsAsDeRegisterInstance; import nl.jpoint.vertx.deploy.agent.aws.state.AwsAsRegisterInstance; import nl.jpoint.vertx.deploy.agent.aws.state.AwsElbDeRegisterInstance; import nl.jpoint.vertx.deploy....
package nl.jpoint.vertx.deploy.agent.service; public class AwsService { private static final Logger LOG = LoggerFactory.getLogger(AwsService.class); private final Vertx vertx;
private final DeployConfig config;
0
abicelis/Remindy
app/src/main/java/ve/com/abicelis/remindy/model/reminder/RepeatingReminder.java
[ "public enum DateFormat {\n PRETTY_DATE {\n @Override\n public String formatCalendar(Calendar calendar) {\n SimpleDateFormat formatter = new SimpleDateFormat(\"MMM d, yyyy\", Locale.getDefault());\n String str = formatter.format(calendar.getTime());\n\n ...
import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.io.Serializable; import java.util.Calendar; import ve.com.abicelis.remindy.R; import ve.com.abicelis.remindy.enums.DateFormat; import ve.com.abicelis.remindy.enums.ReminderRepeatEndType; im...
package ve.com.abicelis.remindy.model.reminder; /** * Created by abice on 3/3/2017. */ public class RepeatingReminder extends Reminder implements Serializable { private Calendar date; private Time time; private ReminderRepeatType repeatType; private int repeatInterval; private ReminderRepeat...
DateFormat df = SharedPreferenceUtil.getDateFormat(context);
5
MKLab-ITI/easIE
src/main/java/certh/iti/mklab/easie/extractors/dynamicpages/DynamicHTMLExtractor.java
[ "public static class ScrapableField {\r\n\r\n public Object label;\r\n\r\n public Object value;\r\n\r\n public Object citeyear;\r\n\r\n public void setLabel(ExtractionProperties ep) {\r\n label = ep;\r\n }\r\n\r\n public void setValue(ExtractionProperties ep) {\r\n value = ep;\r\n ...
import certh.iti.mklab.easie.configuration.Configuration.ScrapableField; import certh.iti.mklab.easie.extractors.AbstractHTMLExtractor; import certh.iti.mklab.easie.FIELD_TYPE; import certh.iti.mklab.easie.exception.HTMLElementNotFoundException; import certh.iti.mklab.easie.extractors.FieldExtractor; import certh....
/* * Copyright 2016 vasgat. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
public List extractFields(List<ScrapableField> fields) {
0
seatgeek/android-PlacesAutocompleteTextView
placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/adapter/PlacesApiFilter.java
[ "public class Constants {\n public static final String LOG_TAG = \"MapsPlacesAutoComplete\";\n public static final String MAGIC_HISTORY_VALUE_PRE = \"____history____=\";\n}", "public class PlacesApi {\n public static final AutocompleteResultType DEFAULT_RESULT_TYPE = AutocompleteResultType.ADDRESS;\n\n ...
import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.TextUtils; import android.util.Log; import android.widget.Filter; import com.seatgeek.placesautocomplete.Constants; import com.seatgeek.placesautocomplete.PlacesApi; import com.seatgeek.placesautocomplete.PlacesAu...
package com.seatgeek.placesautocomplete.adapter; public class PlacesApiFilter extends Filter { @NonNull
private PlacesApi api;
1
manuelsc/Raven-Messenger
Raven App/src/main/java/at/flack/activity/QRCreator.java
[ "public class KeyEntity implements Serializable{\n\n\tprivate static final long serialVersionUID = 1L;\n\t\n\tprivate byte [] key;\n\tprivate byte [] key2;\n\tprivate byte version;\n\tprivate long timestamp;\n\t\n\t// Format: HASH_ENCRYPTION_ENCRYPTION_VERSION\n\tpublic static final byte BLAKE_AES_NONE_1 \t\t= \t0x...
import safe.KeyEntity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.telephony.TelephonyMa...
/* Copyright 2015 Philipp Adam, Manuel Caspari, Nicolas Lukaschek contact@ravenapp.org This file is part of Raven. Raven 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 ...
KeyEntity.DEFAULT, ExchangeInformation.FACEBOOK);
0
rodolfodpk/myeslib
inventory-aggregate-root/src/test/java/org/myeslib/example/SampleDomainGsonFactoryTest.java
[ "public interface Command extends Serializable {\n\t\n UUID getCommandId();\n\tLong getTargetVersion();\n\t\n}", "public interface Event extends Serializable {\n\t\n}", "@SuppressWarnings(\"serial\")\n@Data\npublic class AggregateRootHistory implements Serializable {\n\n\tprivate final List<UnitOfWork> units...
import static org.junit.Assert.assertEquals; import java.lang.reflect.Type; import java.util.Arrays; import java.util.UUID; import org.junit.Test; import org.myeslib.core.Command; import org.myeslib.core.Event; import org.myeslib.core.data.AggregateRootHistory; import org.myeslib.core.data.Snapshot; import org.myeslib....
package org.myeslib.example; public class SampleDomainGsonFactoryTest { final Gson gson = new SampleDomainGsonFactory().create(); @Test public void aggregateRootHistory() { UUID id = UUID.randomUUID(); UUID uowId1 = UUID.randomUUID(); UUID uowId2 = UUID.randomUUID();
Command command1 = new IncreaseInventory(UUID.randomUUID(), id, 2, 0L);
0
ceridwen-com/ceridwen-standard-interchange-protocol-library
src/main/java/com/ceridwen/circulation/SIP/messages/ItemInformationResponse.java
[ "public enum FieldPolicy {\n REQUIRED,\n NOT_REQUIRED,\n DEFAULT;\n}", "public enum CirculationStatus implements AbstractEnumeration {\n OTHER(\"01\"),\n ON_ORDER(\"02\"),\n AVAILABLE(\"03\"),\n CHARGED(\"04\"),\n CHARGED_UNTIL_RECALL_DATE(\"05\"),\n IN_PROCESS(\"06\"),\n ...
import java.util.Date; import com.ceridwen.circulation.SIP.annotations.Command; import com.ceridwen.circulation.SIP.annotations.PositionedField; import com.ceridwen.circulation.SIP.annotations.TaggedField; import com.ceridwen.circulation.SIP.annotations.TestCaseDefault; import com.ceridwen.circulation.SIP.annotations.T...
/* * Copyright (C) 2020 Ceridwen Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is ...
private CirculationStatus circulationStatus;
1
mengdd/TodoRealm
app/src/main/java/com/ddmeng/todorealm/home/HomeListFragment.java
[ "public class MainActivity extends AppCompatActivity {\n\n private TodoRepository todoRepository;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n showHomeList();\n\n todoReposi...
import android.content.DialogInterface; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.support.v7.vie...
package com.ddmeng.todorealm.home; public class HomeListFragment extends Fragment implements HomeListContract.View, HomeListAdapter.HomeListCallback { public static final String TAG = "HomeListFragment"; @BindView(R.id.toolbar) Toolbar toolbar; @BindView(R.id.home_list) RecyclerView homeList;...
((MainActivity) getActivity()).showAddTaskFragment();
0
davidmoten/rtree-3d
src/test/java/com/github/davidmoten/rtree3d/BackpressureTest.java
[ "static Entry<Object, Box> e(int n) {\n return Entry.<Object, Box> entry(n, r(n));\n}", "final class Backpressure {\n\n private Backpressure() {\n // prevent instantiation\n }\n\n static <T, S extends Geometry> ImmutableStack<NodePosition<T, S>> search(\n final Func1<? super Geometry...
import static com.github.davidmoten.rtree3d.RTreeTest.e; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import org.junit.Test...
package com.github.davidmoten.rtree3d; public class BackpressureTest { @Test public void testConstructorIsPrivate() { Asserts.assertIsUtilityClass(Backpressure.class); } @SuppressWarnings("unchecked") @Test public void testBackpressureSearch() { Subscriber<Object> sub = M...
ImmutableStack<NodePosition<Object, Geometry>> stack = ImmutableStack.empty();
7
encircled/Joiner
joiner-core/src/test/java/cz/encircled/joiner/core/resolver/AliasResolverUnitTest.java
[ "@ExtendWith(SpringExtension.class)\n@SpringJUnitConfig(classes = {TestConfig.class})\n@ContextConfiguration(classes = {TestConfig.class})\n@Transactional\n@EnableTransactionManagement\n@TestExecutionListeners(listeners = {TestDataListener.class, DependencyInjectionTestExecutionListener.class, TransactionalTestExec...
import cz.encircled.joiner.core.AbstractTest; import cz.encircled.joiner.core.AliasResolver; import cz.encircled.joiner.core.DefaultAliasResolver; import cz.encircled.joiner.exception.JoinerException; import cz.encircled.joiner.model.QAddress; import cz.encircled.joiner.model.QContact; import cz.encircled.joiner.model....
package cz.encircled.joiner.core.resolver; /** * @author Vlad on 06-Sep-16. */ public class AliasResolverUnitTest extends AbstractTest { @Test public void testCollectionAssociationFoundOnParent() { AliasResolver resolver = new DefaultAliasResolver(entityManager);
JoinDescription left = J.left(QPassword.password);
5
Ericliu001/Weather2016
app/src/main/java/com/example/ericliu/weather2016/ui/presenter/MainActivityPresenter.java
[ "public interface DisplayView {\r\n\r\n\r\n void setPresenter(Presenter presenter);\r\n\r\n\r\n}\r", "public interface RequestResult {\n}", "public enum RequestStatus {\n NOT_STARTED, LOADING, SUCESS, FAILED;\n}", "public interface ViewModel {\r\n\r\n\r\n /**\r\n * * Updates this ViewModel accord...
import android.os.Bundle; import android.text.TextUtils; import com.example.ericliu.weather2016.framework.mvp.DisplayView; import com.example.ericliu.weather2016.framework.mvp.RequestResult; import com.example.ericliu.weather2016.framework.mvp.RequestStatus; import com.example.ericliu.weather2016.framework.mvp.ViewMode...
package com.example.ericliu.weather2016.ui.presenter; /** * Created by ericliu on 12/04/2016. */ public class MainActivityPresenter extends BasePresenter { protected HomepageCallbacks mDisplayView; public interface HomepageCallbacks extends DisplayView { void showProgressBar(); void hid...
onUpdateComplete(mModel.getRequestResult(MainActivityViewModel.QueryEnumMainActivity.UPDATE_WEATHER), MainActivityViewModel.QueryEnumMainActivity.UPDATE_WEATHER);
6
glenrobson/SimpleAnnotationServer
src/main/java/uk/org/llgc/annotation/store/StoreConfig.java
[ "public interface StoreAdapter {\n\n\tpublic void init(final AnnotationUtils pAnnoUtils);\n\n // CRUD annotations\n\tpublic Annotation addAnnotation(final Annotation pJson) throws IOException, IDConflictException, MalformedAnnotation;\n\tpublic Annotation updateAnnotation(final Annotation pJson) throws IOExcepti...
import javax.servlet.http.HttpServlet; import javax.servlet.ServletConfig; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import java.util.Map; import java.util.HashMap; import java.util.Enumeration; import java.util.Properties; import uk.org.llgc.annotation.store.adapters.StoreAda...
package uk.org.llgc.annotation.store; public class StoreConfig extends HttpServlet { protected static Logger _logger = LogManager.getLogger(StoreConfig.class.getName()); protected Map<String,String> _props = null; public final String[] ALLOWED_PROPS = {"baseURI","encoder","store","data_dir","store","repo_...
public StoreAdapter getStore() {
0
magnusmickelsson/pokeraidbot
src/test/java/pokeraidbot/infrastructure/jpa/RaidEntityRepositoryTest.java
[ "@Entity\n@Table(indexes = {@Index(name = \"id\", columnList = \"id\"), @Index(name = \"region\", columnList = \"region\"),\n @Index(name = \"pokemon\", columnList = \"pokemon,region\")}\n) // todo: uniqueconstraint that creator can only have one signup per id\npublic class RaidEntity implements Serializable...
import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.co...
package pokeraidbot.infrastructure.jpa; @RunWith(SpringRunner.class) @SpringBootTest public class RaidEntityRepositoryTest { private static final transient Logger LOGGER = LoggerFactory.getLogger(RaidEntityRepositoryTest.class); @Autowired
RaidEntityRepository entityRepository;
1
AEminium/AeminiumRuntime
src/aeminium/runtime/helpers/loops/ForTask.java
[ "public interface Body {\n\t/**\n\t * This method contains the code of the body, that is executed by the task. \n\t * \n\t * @param current Reference to the associated task object.\n\t */\n public void execute(final Runtime rt, final Task current) throws Exception;\n}", "public final class Hints {\n\tprivate H...
import java.util.ArrayList; import java.util.List; import aeminium.runtime.Body; import aeminium.runtime.Hints; import aeminium.runtime.Runtime; import aeminium.runtime.Task; import aeminium.runtime.implementations.Configuration;
package aeminium.runtime.helpers.loops; public class ForTask { public static int PPS = Configuration.getProperty(ForTask.class, "LazyBinarySplittingPPS", 1); public static <T> Task createFor(Runtime rt, final Iterable<T> collection, final ForBody<T> forBody, final short hints) { // Initial Copy final Ar...
Task otherHalf = rt.createNonBlockingTask(createLazyBinarySplitting(half, top, collection, forBody, hints), (short) (hints | Hints.LOOPS));
1
Lambda-3/DiscourseSimplification
src/main/java/org/lambda3/text/simplification/discourse/runner/discourse_tree/extraction/rules/RestrictiveRelativeClauseWhomExtractor.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 : SubordinationPostExtractor * * Copyright © 2017 Lambda³ * * GNU General Public License 3 * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public Lic...
public Optional<Extraction> extract(Leaf leaf) throws ParseTreeException {
3
DNSBelgium/rdap-server-sample-gtld
src/main/java/be/dnsbelgium/rdap/sample/service/GtldWhoisService.java
[ "public class InternalServerError extends RDAPError {\n\n public InternalServerError(String message) {\n super(HttpStatus.INTERNAL_SERVER_ERROR, \"Internal Server Error\");\n }\n\n}", "public class QuotaReachedError extends RDAPError {\n public QuotaReachedError() {\n super(429, \"Quota reached\");\n }\...
import be.dnsbelgium.core.DomainName; import be.dnsbelgium.core.TelephoneNumber; import be.dnsbelgium.rdap.core.Domain; import be.dnsbelgium.rdap.core.*; import be.dnsbelgium.rdap.sample.dto.*; import be.dnsbelgium.rdap.sample.error.InternalServerError; import be.dnsbelgium.rdap.sample.error.QuotaReachedError; import b...
package be.dnsbelgium.rdap.sample.service; public class GtldWhoisService extends DefaultDomainService { public static final String NO_MATCH = "% No match"; public static final String QUOTA_EXCEEDED = "% Quota exceeded"; public static final String DOMAIN_NOT_FOUND = "Domain not found"; private Entity whoisC...
throw new QuotaReachedError();
1
marmelo/chili
chili/src/test/java/me/defying/chili/ToStringTest.java
[ "@ToString\npublic class BasicModifiersClass {\n final int _default = 1;\n public final int _public = 2;\n private final int _private = 3;\n protected final int _protected = 4;\n transient final int _transient = 5;\n volatile int _volatile = 6;\n static final int _static = 7;\n}", "@ToString\...
import me.defying.chili.util.ChiliTest; import static org.junit.Assert.assertEquals; import org.junit.Test; import com.google.inject.Inject; import me.defying.chili.tostring.BasicModifiersClass; import me.defying.chili.tostring.BasicTypesClass; import me.defying.chili.tostring.EmptyClass; import me.defying.chili.tostri...
/* * The MIT License (MIT) * Copyright (c) 2018 Rafael Marmelo * * 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, ...
private EmptyClass emptyClass;
2
Zalth-One-Three/Zombie-Infection
src/main/java/com/zalthonethree/zombieinfection/event/InfectionEvent.java
[ "public interface IZombieInfectionMob {\n\tpublic int getPlayerInfectionChance();\n}", "public class ZombieInfectionAPI {\n\tprivate static ArrayList<ICustomInfectionEffect> customInfectionEffects = new ArrayList<ICustomInfectionEffect>();\n\tprivate static ArrayList<ICustomCureEffect> customCureEffects = new Arr...
import com.zalthonethree.zombieinfection.api.IZombieInfectionMob; import com.zalthonethree.zombieinfection.api.ZombieInfectionAPI; import com.zalthonethree.zombieinfection.entity.EntityZombieChicken; import com.zalthonethree.zombieinfection.entity.EntityZombieCow; import com.zalthonethree.zombieinfection.entity.EntityZ...
package com.zalthonethree.zombieinfection.event; public class InfectionEvent { @SubscribeEvent public void onAttack(LivingHurtEvent event) { if (event.getSource() instanceof EntityDamageSource) { EntityDamageSource source = (EntityDamageSource) event.getSource(); Entity attacker = source.getTrueSource(); ...
infectionChance = ConfigurationHandler.getPlayerInfectionChance();
6
urandom/gearshift
gearshift/src/test/java/org/sugr/gearshift/unit/datasource/DataSourceTest.java
[ "public final class G {\n public static final String PREF_DEBUG = \"debug\";\n\n public static final String PREF_SHOW_STATUS = \"show_status\";\n public static final String PREF_SHOW_ADD_DIALOG = \"show_add_dialog\";\n public static final String PREF_DELETE_DATA = \"delete_data\";\n public static fin...
import android.app.Activity; import android.content.SharedPreferences; import android.database.Cursor; import android.database.sqlite.SQLiteOpenHelper; import com.fasterxml.jackson.core.JsonFactory; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.d...
assertNotNull(url); InputStream is = null; try { is = url.openStream(); ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); JsonFactory factory = mapper.getFactory(); J...
assertEquals(expectedNames[++index], Torrent.getName(cursor));
1
vangj/jbayes
src/main/java/com/github/vangj/jbayes/inf/exact/graph/pptc/blocks/InferenceControl.java
[ "public static JoinTree initialization(JoinTree joinTree) {\n joinTree.allCliques().forEach(clique -> {\n Potential potential = getPotential(clique.nodes());\n joinTree.addPotential(clique, potential);\n });\n\n joinTree.nodes().forEach(node -> {\n Clique clique = (null == node.getMetadata(\"parent.cliq...
import static com.github.vangj.jbayes.inf.exact.graph.pptc.blocks.Initialization.initialization; import static com.github.vangj.jbayes.inf.exact.graph.pptc.blocks.Moralize.moralize; import static com.github.vangj.jbayes.inf.exact.graph.pptc.blocks.Propagation.propagate; import static com.github.vangj.jbayes.inf.exact.g...
package com.github.vangj.jbayes.inf.exact.graph.pptc.blocks; /** * Controls inference based on evidence. */ public class InferenceControl implements JoinTree.Listener { /** * Creates a join tree from a DAG with inference enabled. * * @param dag DAG. * @return Join tree. */ public static JoinTre...
JoinTree joinTree = propagate(initialization(transform(triangulate(moralize(dag)))))
4
Falseclock/HtcOneTweaker
src/kz/virtex/htc/tweaker/Main.java
[ "public class IconsColorPreference extends HtcDialogPreference implements ColorPreferenceView.OnColorChangeListener\n{\n\tprivate String mKey;\n\tprivate ColorPreferenceView colorView;\n\tpublic IconsRowView iconRowView;\n\tpublic SharedPreferences prefs;\n\tprivate int color = Color.parseColor(\"#000000\");\n\n\tp...
import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import kz.virtex.htc.tweaker.preference.IconsColorPreference; import kz.virtex.htc.tweaker.preference.MultiCheckPreference; import kz.virtex.htc.tweaker.preference.MultiCheckPreference.Row; import kz.virtex.htc.tweaker.preference.Numb...
preferenceCat = (HtcPreferenceCategory) findPreference(Const.SETTINGS_KEY_CAT); preferenceCat.removePreference(findPreference(Const.DUAL_SETTINGS_SCREEN_KEY)); } } private void storeWeatherApkPath() { PackageManager pm = getPackageManager(); ApplicationInfo ai; try { ai = pm.getApplicationInfo(Con...
final NumberPickerPreference saveLast = (NumberPickerPreference) findPreference(Const.TWEAK_CALL_REC_AUTO_DELETE_COUNT);
3
wangchongjie/multi-task
src/test/java/com/baidu/unbiz/multitask/demo/test/WithThreadLocalTest.java
[ "public class TaskPair extends Pair<String, Object> {\n\n public TaskPair() {\n }\n\n public TaskPair(String taskName, Object param) {\n this.field1 = taskName;\n this.field2 = param;\n }\n\n public TaskPair wrap(String taskName, Object param) {\n return new TaskPair(taskName, pa...
import java.util.List; import javax.annotation.Resource; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.util.Assert; import com.baidu.unbiz.multitask....
package com.baidu.unbiz.multitask.demo.test; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/applicationContext-test.xml") public class WithThreadLocalTest { @Resource(name = "simpleParallelExePool") private ParallelExePool parallelExePool; /** * 测试ThreadLoal可正常传递至执行t...
List<DeviceViewItem> stat = ctx.getResult("deviceStatFetcher");
6
HackGSU/mobile-android
app/src/main/java/com/hackgsu/fall2016/android/activities/PostNewAnnouncementActivity.java
[ "public class HackGSUApplication extends Application {\n\tpublic static final String IS_IN_DEV_MODE = \"is_in_dev_mode\";\n\tpublic static final String NOTIFICATIONS_ENABLED = \"notifications_enabled\";\n\tprivate FirebaseAuth firebaseAuth;\n\tprivate FirebaseAuth.AuthStateListener firebase...
import android.content.DialogInterface; import android.content.res.ColorStateList; import android.graphics.Point; import android.graphics.Typeface; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackba...
package com.hackgsu.fall2016.android.activities; public class PostNewAnnouncementActivity extends AppCompatActivity { Announcement.Topic[] topics = new Announcement.Topic[] { Announcement.Topic.GENERAL, Announcement.Topic.FOOD, Announcement.Topic.TECH }; private boolean isPosting; private NestedScrollVie...
AnnouncementController.sendOrUpdateAnnouncement(this, announcement, new CallbackWithType<Void>() {
3
Qualtagh/JBroTable
test/io/github/qualtagh/swing/table/showcase/Sample.java
[ "public interface IModelFieldGroup extends Cloneable {\n String getCaption();\n void setCaption( String caption );\n \n String getIdentifier();\n void setIdentifier( String identifier );\n \n ModelFieldGroup getParent();\n \n int getColspan();\n \n int getRowspan();\n void setRowspan( int rowspan );\n ...
import java.awt.FlowLayout; import javax.swing.JFrame; import javax.swing.UIManager; import io.github.qualtagh.swing.table.model.IModelFieldGroup; import io.github.qualtagh.swing.table.model.ModelData; import io.github.qualtagh.swing.table.model.ModelField; import io.github.qualtagh.swing.table.model.ModelFieldGroup; i...
package io.github.qualtagh.swing.table.showcase; public class Sample { public static void main( String args[] ) throws Exception { Utils.initSimpleConsoleLogger(); UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() ); // Hierarchically create columns and column groups. IModelFi...
new ModelFieldGroup( "A", "A" )
3
Rai220/Telephoto
app/src/main/java/com/rai220/securityalarmbot/photo/Observer.java
[ "public class BotService extends Service implements MotionDetectorController.MotionDetectorListener, IStartService {\n public static final String TELEPHOTO_SERVICE_STOPPED = \"TELEPHOTO_SERVICE_STOPPED\";\n\n private TelegramService telegramService;\n private BatteryReceiver batteryReceiver;\n private S...
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import com.rai220.securityalarmbot.BotService; import com.rai220.securityalarmbot.prefs.Prefs; import com.rai220.securityalarmbot.prefs.PrefsController; import com.rai220.securityalarmbot.telegram.ISenderService; import com.rai220.securityalarmbot.u...
package com.rai220.securityalarmbot.photo; /** * */ public class Observer { private ScheduledExecutorService es = Executors.newScheduledThreadPool(1); private ScheduledFuture future; private HiddenCamera2 hiddenCamera2; private ISenderService senderService; private final LinkedList<ImageShot...
Prefs prefs = PrefsController.instance.getPrefs();
2
Hoiio/hoiio-java
src/com/hoiio/sdk/services/FaxService.java
[ "public class HoiioException extends Exception {\n\n\tprivate static final long serialVersionUID = 1L;\n\t\n\tprivate HoiioStatus status;\n\tprivate String response;\n\t\n\t/**\n\t * Constructs the HoiioException object\n\t */\n\tpublic HoiioException() {\n\t\tsuper();\n\t}\n\t\n\t/**\n\t * Constructs the HoiioExce...
import javax.xml.bind.DatatypeConverter; import com.hoiio.sdk.exception.HoiioException; import com.hoiio.sdk.exception.InternalServerErrorException; import com.hoiio.sdk.objects.HoiioRequest; import com.hoiio.sdk.objects.enums.FaxType; import com.hoiio.sdk.objects.fax.Fax; import com.hoiio.sdk.objects.fax.FaxHistory; i...
package com.hoiio.sdk.services; /* Copyright (C) 2012 Hoiio Pte Ltd (http://www.hoiio.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ri...
throw new InternalServerErrorException(e);
1
OpenBEL/cytoscape-plugins
org.openbel.cytoscape.navigator/src/org/openbel/cytoscape/navigator/task/ExpandNodesTask.java
[ "public interface KamService {\n\n /**\n * Reloads the {@link ClientConnector} in this {@link KamService}\n */\n void reloadClientConnector();\n\n /**\n * Finds {@link KamNode KamNodes} by a {@link List} of\n * {@link NamespaceValue NamespaceValues} and optional {@link NodeFilter\n * no...
import org.openbel.framework.ws.model.EdgeDirectionType; import org.openbel.framework.ws.model.KamEdge; import org.openbel.framework.ws.model.KamNode; import cytoscape.CyNetwork; import cytoscape.CyNode; import cytoscape.task.Task; import java.util.ArrayList; import java.util.Collection; import java.util.List; import j...
/* * KAM Navigator Plugin * * URLs: http://openbel.org/ * Copyright (C) 2012, Selventa * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at...
ExpandNodesTask(CyNetwork cyNetwork, KamIdentifier kamId, Set<CyNode> cynodes,
3
seven332/Nimingban
app/src/main/java/com/hippo/nimingban/ui/SortForumsActivity.java
[ "public class GuideHelper {\n\n private static ViewGroup getParent(Activity activity) {\n ViewGroup parent = (ViewGroup) activity.getWindow().getDecorView();\n View view = ViewUtils.getChild(parent, android.R.id.content);\n if (view instanceof ViewGroup) {\n parent = (ViewGroup) v...
import android.annotation.SuppressLint; import android.content.Intent; import android.graphics.drawable.NinePatchDrawable; import android.graphics.drawable.StateListDrawable; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v7.widget.LinearLayoutManager; import android.support...
/* * Copyright 2015 Hippo Seven * * 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 ...
private Site mSite;
1
sromku/bugsnag-eclipse-plugin
Bugsnag Plugin/src/com/sromku/bugsnag/api/Api.java
[ "public class Account implements Serializable {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\t@Expose\n\t@SerializedName(\"id\")\n\tpublic String id;\n\t\n\tpublic String authToken;\n\n\t@Expose\n\t@SerializedName(\"name\")\n\tpublic String name;\n\n\t@Expose\n\t@SerializedName(\"created_at\")\n\tpubli...
import java.lang.reflect.Type; import java.util.List; import com.google.gson.reflect.TypeToken; import com.sromku.bugsnag.model.Account; import com.sromku.bugsnag.model.Comment; import com.sromku.bugsnag.model.Event; import com.sromku.bugsnag.model.Error; import com.sromku.bugsnag.model.Project; import com.sromku.bugsn...
package com.sromku.bugsnag.api; public class Api { private static final String BASE_URL = "https://api.bugsnag.com/"; private static Api instance = null; private Api() { } public static Api getInstance() { if (instance == null) { instance = new Api(); } return instance; } public Account getAccou...
public List<Event> getEvents(String authToken, String errorId) {
2
jwoolston/Android-Webcam
library/src/main/java/com/jwoolston/android/uvc/StreamManager.java
[ "public class VideoControlInterface extends VideoClassInterface {\n\n private static final int VIDEO_CLASS_HEADER_LENGTH = 12;\n private static final int INTERRUPT_ENDPOINT = 0x3;\n\n private static final int bDescriptorSubType = 2;\n private static final int bcdUVC = 3;\n private static ...
import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.jwoolston.android.libusb.LibusbError; import com.jwoolston.android.libusb.UsbDeviceConnection; import com.jwoolston.android.libusb.async.IsochronousAsyncTransfer; import com.jwoolston.android.libusb.async.IsochronousTransf...
package com.jwoolston.android.uvc; /** * Probe and Commit Operational Model * <p> * Unsupported fields shall be set to zero by the device. Fields left for streaming parameters negotiation shall be set * to zero by the host. For example, after a SET_CUR request initializing the FormatIndex and FrameIndex, the devi...
public void establishStreaming(@Nullable VideoFormat format, @Nullable VideoFrame frame) throws
3
santanusinha/dropwizard-db-sharding-bundle
src/test/java/io/appform/dropwizard/sharding/dao/LookupDaoTest.java
[ "@Entity\n@Table(name=\"audits\")\n@Data\n@NoArgsConstructor\n@AllArgsConstructor\n@ToString\n@Builder\npublic class Audit {\n @Id\n @GeneratedValue(strategy = GenerationType.IDENTITY)\n @Column(name = \"id\")\n private long id;\n\n @Column(name = \"text\")\n private String text;\n\n @ManyToOne...
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import io.appform.dropwizard.sharding.dao.testdata.entities.Audit; import io.appform.dropwizard.sharding.dao.testdata.entities.Phone; import io.appform.dropwizard.sharding.dao.testdata....
/* * Copyright 2016 Santanu Sinha <santanu.sinha@gmail.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 appl...
private RelationalDao<Transaction> transactionDao;
3
EpicEricEE/ShopChest
src/main/java/de/epiceric/shopchest/utils/Utils.java
[ "public class ShopChest extends JavaPlugin {\n\n private static ShopChest instance;\n\n private Config config;\n private HologramFormat hologramFormat;\n private ShopCommand shopCommand;\n private Economy econ = null;\n private Database database;\n private boolean isUpdateNeeded = false;\n p...
import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Arrays; import java.util.Base64; import java.util.HashMap; import java.util.Ha...
return null; else return p.getInventory().getItemInOffHand(); } /** * @param p Player whose item in his hand should be returned * @return Item in his main hand, or the item in his off if he doesn't have one in this main hand, or {@code null} * if he doesn'...
hoverEvent.put("value", new JsonBuilder.Part(LanguageUtils.getMessage(Message.UPDATE_CLICK_TO_DOWNLOAD)));
3
xdrop/jRand
jrand-core/src/main/java/me/xdrop/jrand/generators/location/CityGenerator.java
[ "public abstract class Generator<T> {\n\n private Rand randGen;\n\n public Generator() {\n this.randGen = new Rand();\n }\n\n public Rand random() {\n return this.randGen;\n }\n\n public abstract T gen();\n\n public String repeat(int times) {\n StringBuilder sb = new String...
import me.xdrop.jrand.Generator; import me.xdrop.jrand.annotation.Facade; import me.xdrop.jrand.data.AssetLoader; import me.xdrop.jrand.data.Assets; import me.xdrop.jrand.model.location.City; import me.xdrop.jrand.model.location.CityMapper; import me.xdrop.jrand.utils.Choose; import java.util.List; import java.util.Map...
package me.xdrop.jrand.generators.location; @Facade(accessor = "city") public class CityGenerator extends Generator<String> { protected final List<City> cities; protected final Map<String, List<City>> citiesMap; protected String country; public CityGenerator() { this.cities = Assets.CITIES....
return Choose.one(list).getName();
5
htrc/HTRC-Portal
app/controllers/WorksetManagement.java
[ "@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"Property\", namespace = \"http://registry.htrc.i3.illinois.edu/entities/workset\")\npublic class Property {\n\n @XmlAttribute\n protected String name;\n @XmlAttribute\n protected String value;\n\n /**\n * Gets the value of the name propert...
import au.com.bytecode.opencsv.CSVWriter; import com.fasterxml.jackson.databind.node.ObjectNode; import edu.illinois.i3.htrc.registry.entities.workset.Property; import edu.illinois.i3.htrc.registry.entities.workset.Volume; import edu.illinois.i3.htrc.registry.entities.workset.Workset; import edu.indiana.d2i.htrc.portal...
package controllers; public class WorksetManagement extends JavaController { private static Logger.ALogger log = play.Logger.of("application"); private static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); @RequiresAuthentication(clientName = "Saml2Client") pu...
} else if (!isAccountActivated(userId)){
7
sashavasko/WiFiAfterConnect
src/com/wifiafterconnect/handlers/TheClubHandler.java
[ "public interface Constants {\n\n\tpublic static final String TAG = \"WifiAfterConnect\";\n\t\n\tpublic static final String URL_KERNEL_ORG_HTTPS = \"https://mirrors.kernel.org/debian/pool/\";\n\tpublic static final String URL_KERNEL_ORG_HTTP = \"http://mirrors.kernel.org/debian/pool/\";\n\tpublic static final Strin...
import java.net.MalformedURLException; import java.net.URL; import org.json.JSONException; import org.json.JSONObject; import android.util.Log; import com.wifiafterconnect.Constants; import com.wifiafterconnect.ParsedHttpInput; import com.wifiafterconnect.WifiAuthParams; import com.wifiafterconnect.html.HtmlForm; impor...
/** * */ package com.wifiafterconnect.handlers; /** * @author sasha * The Club - free wifi in many malls in US owned by GGP (ggp.com). * * Welcome page implemented by Nearbuy Systems. * Supposedly Nearbuy wifi will autoconnect users on repeat visits. Hopefully it works and will catch up with other vendor...
public boolean checkParamsMissing(WifiAuthParams params) {
2
Valkryst/Schillsaver
src/main/java/Schillsaver/mvc/controller/JobController.java
[ "public class SceneManager extends Application {\n /** The singleton instance. */\n public static SceneManager INSTANCE;\n\n /** The stage. */\n @Getter private Stage stage;\n\n /** The previous scene's controller. */\n @Getter private Controller previousController;\n /** The current scene's co...
import Schillsaver.SceneManager; import Schillsaver.job.Job; import Schillsaver.job.JobBuilder; import Schillsaver.mvc.model.JobModel; import Schillsaver.mvc.view.JobView; import javafx.collections.FXCollections; import javafx.event.Event; import javafx.event.EventHandler; import javafx.scene.control.Alert; import java...
package Schillsaver.mvc.controller; public class JobController extends Controller implements EventHandler { /** * Constructs a new JobController. * * @param model * The model. * * @throws NullPointerException * If the sceneManager or settings is null. */ ...
super(model, new JobView(model));
4
pakoito/SongkickInterview
app/src/main/java/com/pacoworks/dereference/screens/songkicklist/SongkickListPresenter.java
[ "public abstract class ZimplBasePresenter<T extends IUi, U extends ZimpleBaseState> {\n private final Class<U> stateClass;\n\n private final List<Subscription> pauseSubscriptions = new ArrayList<>();\n\n private final List<Subscription> destroySubscriptions = new ArrayList<>();\n\n @Inject\n @Getter(...
import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; import javax.inject.Inject; import rx.Observable; import rx.Subscription; import rx.android.schedulers.AndroidSchedulers; import rx.functions.Action1; import rx.functions.Func1; import rx.schedulers.Schedulers; import timber.log.Ti...
/* * Copyright (c) pakoito 2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distribute...
RxActions.doMultiple(RxLog.logError(),
5
xylo/JErgometer
src/org/jergometer/model/BikeProgramTree.java
[ "public class StreamUtils{\r\n /** Size of the temporary buffer. */\r\n private static int TEMPORARY_BUFFER_SIZE = 10000;\r\n\r\n /**\r\n * Reads from the input stream and returns the content as byte array.\r\n *\r\n * @param stream input stream\r\n * @return content of the stream\r\n * @exception IOEx...
import de.endrullis.utils.StreamUtils; import de.endrullis.xml.XMLDocument; import de.endrullis.xml.XMLParser; import org.jergometer.JergometerSettings; import org.jergometer.translation.I18n; import org.jergometer.control.BikeProgram; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.Defau...
package org.jergometer.model; /** * Bike program tree as on file system. * User objects in this tree can be of type {@link BikeProgramDir} or {@link BikeProgram}. */ public class BikeProgramTree extends DefaultTreeModel { /** Root element of the tree. */ private DefaultMutableTreeNode root; private ...
BikeProgram program = new BikeProgram(file, relativePath, new BikeProgramData(doc.getRootElement()));
5
OfficeDev/O365-Android-Snippets
app/src/main/java/com/microsoft/office365/snippetapp/OperationListActivity.java
[ "public interface O365Operations {\n public void connectToO365();\n\n public void disconnectFromO365();\n\n public void clearResults();\n\n public OutlookClient getO365MailClient();\n\n public String getMailServiceResourceId();\n\n public SharePointClient getO365MyFilesClient();\n\n public Stri...
import android.app.Activity; import android.app.FragmentTransaction; import android.content.Intent; import android.os.Bundle; import android.os.PersistableBundle; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.w...
/* * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file. */ package com.microsoft.office365.snippetapp; public class OperationListActivity extends Activity implements O365Operations { public static final String DISCONNECTED_FROM...
AuthenticationController.getInstance().setContextActivity(this);
2
cluelessjoe/jooq-flyway-typesafe-migration
app/src/main/generated-sources/org/jooq/example/app/model/Keys.java
[ "@Generated(\n value = {\n \"http://www.jooq.org\",\n \"jOOQ version:3.9.2\",\n \"schema version:FLYWAY_TEST_3\"\n },\n date = \"2017-05-16T21:33:40.793Z\",\n comments = \"This class is generated by jOOQ\"\n)\n@SuppressWarnings({ \"all\", \"unchecked\", \"rawtypes\" })\npublic class...
import javax.annotation.Generated; import org.jooq.ForeignKey; import org.jooq.UniqueKey; import org.jooq.example.app.model.tables.Author; import org.jooq.example.app.model.tables.Book; import org.jooq.example.app.model.tables.SchemaVersion; import org.jooq.example.app.model.tables.records.AuthorRecord; import org.jooq...
/* * This file is generated by jOOQ. */ package org.jooq.example.app.model; /** * A class modelling foreign key relationships between tables of the <code>FLYWAY_TEST</code> * schema */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.9.2", "schema version:FLYWAY_TEST_3"...
public static final UniqueKey<AuthorRecord> PK_T_AUTHOR = createUniqueKey(Author.AUTHOR, "PK_T_AUTHOR", Author.AUTHOR.ID);
0
dirk/hummingbird2
src/main/java/org/hummingbirdlang/nodes/HBCallNode.java
[ "public final class Layout {\n public static int TARGET_INDEX = 0;\n public static int RECEIVER_INDEX = 1;\n public static int ARGUMENTS_OFFSET = 2;\n\n private Object target;\n // Accessible via `this` in method calls.\n private Object receiver;\n private List<Object> arguments = new ArrayList<>();\n\n pub...
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import com.oracle.truffle.api.CallTarget; import com.oracle.truffle.api.frame.VirtualFrame; import org.hummingbirdlang.nodes.arguments.Layout; import org.hummingbirdlang.nodes.frames.GetBindingsNodeGen; impor...
package org.hummingbirdlang.nodes; public class HBCallNode extends HBExpressionNode { @Child private HBExpressionNode targetNode; @Children private final HBExpressionNode[] argumentNodes; public HBCallNode(HBExpressionNode targetNode, HBExpressionNode[] argumentNodes) { this.targetNode = targetNode; t...
public void accept(InferenceVisitor visitor) throws TypeException {
4
nextgis/android_maplib
src/main/java/com/nextgis/maplib/display/SimplePolygonStyle.java
[ "public interface ITextStyle {\n void setField(String field);\n\n String getField();\n\n void setText(String field);\n\n String getText();\n}", "public abstract class GeoGeometry\n implements Serializable\n{\n protected static final long serialVersionUID = -1241179697270831761L;\n protect...
import com.nextgis.maplib.api.ITextStyle; import com.nextgis.maplib.datasource.GeoGeometry; import com.nextgis.maplib.datasource.GeoMultiPolygon; import com.nextgis.maplib.datasource.GeoPoint; import com.nextgis.maplib.datasource.GeoPolygon; import org.json.JSONException; import org.json.JSONObject; import java.util.Li...
/* * Project: NextGIS Mobile * Purpose: Mobile GIS for Android. * Author: Dmitry Baryshnikov (aka Bishop), bishop.dev@gmail.com * Author: NikitaFeodonit, nfeodonit@yandex.com * Author: Stanislav Petriakov, becomeglory@gmail.com * ****************************************************************************...
GeoMultiPolygon multiPolygon = (GeoMultiPolygon) geoGeometry;
2
bmatthews68/inmemdb-maven-plugin
src/main/java/com/btmatthews/maven/plugins/inmemdb/db/hsqldb/HSQLDBDatabase.java
[ "public interface Loader {\r\n\r\n /**\r\n * The message key for the error reported when a source file cannot be read.\r\n */\r\n String CANNOT_READ_SOURCE_FILE = \"cannot_read_source_file\";\r\n\r\n /**\r\n * The message key for the error reported when a source file cannot be processed.\r\n ...
import com.btmatthews.maven.plugins.inmemdb.ldr.dbunit.DBUnitXMLLoader; import com.btmatthews.maven.plugins.inmemdb.ldr.sqltool.SQLLoader; import com.btmatthews.utils.monitor.Logger; import java.text.MessageFormat; import javax.sql.DataSource; import org.hsqldb.DatabaseURL; import org.hsqldb.jdbc.JDBCDataSource; ...
/* * Copyright 2011-2012 Brian Matthews * * 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 ...
new DBUnitXMLLoader(), new DBUnitFlatXMLLoader(),
3
cash1981/civilization-boardgame-rest
src/main/java/no/asgari/civilization/server/action/UndoAction.java
[ "public enum SheetName {\n CIV(\"Civ\"), CULTURE_1(\"Culture I\"), CULTURE_2(\"Culture II\"),\n CULTURE_3(\"Culture III\"), GREAT_PERSON(\"Great Person\"), INFANTRY(\"Infantry\"), ARTILLERY(\"Artillery\"), MOUNTED(\"Mounted\"),\n AIRCRAFT(\"Aircraft\"), VILLAGES(\"Villages\"), HUTS(\"Huts\"), WONDERS(\"Won...
import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.mongodb.BasicDBObject; import com.mongodb.DB; import lombok.extern.log4j.Log4j; import no.asgari.civilization.server.SheetName; import no.asgari.civilization.server.dto.ItemDTO; import no.asgari.civilization.server.model.Draw...
/* * Copyright (c) 2015 Shervin Asgari * 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 ...
Playerhand playerhand = getPlayerhandByPlayerId(playerId, pbf);
6
kercer/kerkee_android
kerkee/src/com/kercer/kerkee/bridge/KCApiBridge.java
[ "public enum KCScheme\n{\n HTTP(\"http\"), HTTPS(\"https\"), FILE(\"file\"), CONTENT(\"content\"), ASSETS(\"assets\"), DRAWABLE(\"drawable\"), UNKNOWN(\"\");\n\n private String scheme;\n private String uriPrefix;\n\n KCScheme(String scheme)\n {\n this.scheme = scheme;\n uriPrefix = sche...
import android.view.ViewConfiguration; import com.kercer.kercore.debug.KCLog; import com.kercer.kercore.task.KCTaskExecutor; import com.kercer.kerkee.downloader.KCDownloader.KCScheme; import com.kercer.kerkee.net.KCHttpServer; import com.kercer.kerkee.util.KCUtil; import com.kercer.kerkee.webview.KCWebPath; import com....
package com.kercer.kerkee.bridge; /** * * @author zihong * */ public class KCApiBridge { private final static KCRegister mRegister = new KCRegister(); private static String mJS; private static boolean mIsOpenJSLog = true;
public static void initJSBridgeEnvironment(KCWebView aWebview, KCScheme aScheme)
4
koendeschacht/count-db
src/main/java/be/bagofwords/db/remote/ValueSocketIterator.java
[ "public class DataStream {\n\n private static final String NULL_VALUE = \"xxx_NULL\";\n\n public byte[] buffer;\n public int position;\n\n public DataStream() {\n this(new byte[1024]);\n }\n\n public DataStream(byte[] buffer) {\n this(buffer, 0);\n }\n\n public DataStream(byte[...
import be.bagofwords.db.methods.DataStream; import be.bagofwords.db.methods.DataStreamUtils; import be.bagofwords.db.methods.ObjectSerializer; import be.bagofwords.iterator.CloseableIterator; import org.xerial.snappy.Snappy; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import static be....
package be.bagofwords.db.remote; /** * Created by koen on 21/05/17. */ public class ValueSocketIterator<T> extends CloseableIterator<T> { private RemoteDataInterface<T> remoteDataInterface; private final Connection connection; private Iterator<T> nextValues; private boolean readAllValuesFromConne...
DataStream valueIS = new DataStream(uncompressedValues);
0
cojen/Cojen
src/main/java/org/cojen/util/BelatedCreator.java
[ "public class CodeBuilder extends AbstractCodeAssembler implements CodeBuffer, CodeAssembler {\n private final CodeAttr mCodeAttr;\n private final ClassFile mClassFile;\n private final ConstantPool mCp;\n\n private final InstructionList mInstructions;\n\n private final LocalVariable mThisReference;\n...
import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicReference; import java.util.Map; import java.lang.reflect.Method; import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import java.s...
*/ protected abstract T createBogus(); /** * Notification that createReal is taking too long. This can be used to log * a message. * * @param timedOutMillis milliseconds waited before giving up */ protected abstract void timedOutNotification(long timedOutMillis); /** ...
(cf.addMethod(Modifiers.PUBLIC, m.getName(), MethodDesc.forMethod(m)));
3
DmitryMalkovich/gito-github-client
app/src/main/java/com/dmitrymalkovich/android/githubanalytics/data/source/GithubDataSource.java
[ "public class GithubLocalDataSource implements GithubDataSource {\n\n private static final String PREFERENCES_TOKEN = \"PREFERENCES_TOKEN\";\n private static final String PREFERENCES_TOKEN_TYPE = \"PREFERENCES_TOKEN_TYPE\";\n private static final String PREFERENCES_TRENDING_PERIOD = \"PREFERENCES_TRENDING_...
import com.dmitrymalkovich.android.githubanalytics.data.source.local.GithubLocalDataSource; import com.dmitrymalkovich.android.githubapi.core.data.Clones; import com.dmitrymalkovich.android.githubapi.core.data.ReferringSite; import com.dmitrymalkovich.android.githubapi.core.data.Star; import com.dmitrymalkovich.android...
/* * Copyright 2017. Dmitry Malkovich * * 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 agr...
void onTrendingRepositoriesLoaded(List<TrendingRepository> trendingRepositoryList,
4
muzili90/SpringBBS
src/cn/tiger/service/account/AccountManager.java
[ "@Component\npublic class RoleDao extends HibernateDao<AcctRole, Long> {\n\n}", "@Component\npublic class UserDao extends HibernateDao<AcctUser, Long> {\n\t\n\tpublic AcctUser findUserByUserNameAndEmail(String loginName,String email){\n\t\t\n\t\tString hql=\"from AcctUser u where u.loginName=:loginName and u.emai...
import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import org.springside.modules.orm.Page; import org.springside.m...
package cn.tiger.service.account; @Component //ĬÈϽ«ÀàÖеÄËùÓк¯ÊýÄÉÈëÊÂÎñ¹ÜÀí. @Transactional public class AccountManager { private static Logger logger = LoggerFactory.getLogger(AccountManager.class); private UserDao userDao; private RoleDao roleDao; private UserInfoDao userInfoDao; @Transactional(rea...
public void saveUserInfo(AcctUserInfo entity) {
5
bitionaire/el-bombillo
el-bombillo-account-service/src/main/java/org/bitionaire/elbombillo/account/resources/AccountResource.java
[ "public interface ApiConstant {\n\n /** The default page size for collections. */\n public static final int DEFAULT_LIST_PAGE_SIZE = 10;\n\n}", "public interface ApiVersion {\n\n /** Version 1 of our API. */\n public static final String VERSION_1 = \"application/vnd.bombillo.v1+json\";\n\n /** The ...
import com.fasterxml.jackson.annotation.JsonView; import com.google.common.base.Optional; import com.wordnik.swagger.annotations.*; import io.dropwizard.auth.Auth; import lombok.extern.slf4j.Slf4j; import org.bitionaire.elbombillo.account.api.ApiConstant; import org.bitionaire.elbombillo.account.api.ApiVersion; import ...
package org.bitionaire.elbombillo.account.resources; @Slf4j @Path("/accounts") @Api("/accounts")
@Consumes({ ApiVersion.DEFAULT_VERSION, ApiVersion.VERSION_1 })
1
nutritionfactsorg/daily-dozen-android
app/src/main/java/org/nutritionfacts/dailydozen/task/CalculateStreakTask.java
[ "public interface Servings {\n int getServings();\n void recalculateStreak();\n Long save();\n}", "public class Bus {\n public static void register(Object object) {\n final EventBus bus = EventBus.getDefault();\n if (!bus.isRegistered(object)) {\n bus.register(object);\n ...
import com.activeandroid.ActiveAndroid; import org.nutritionfacts.dailydozen.Servings; import org.nutritionfacts.dailydozen.controller.Bus; import org.nutritionfacts.dailydozen.model.DDServings; import org.nutritionfacts.dailydozen.model.Day; import org.nutritionfacts.dailydozen.model.Food; import org.nutritionfacts.da...
package org.nutritionfacts.dailydozen.task; public class CalculateStreakTask extends BaseTask<Boolean> { private final Day startingDay; private Food food;
private Tweak tweak;
4
heremaps/here-aaa-java-sdk
here-oauth-client/src/test/java/com/here/account/client/Client2Test.java
[ "public interface HttpProvider extends Closeable {\n \n /**\n * Wrapper for an HTTP request.\n */\n public static interface HttpRequest {\n \n /**\n * Add the Authorization header to this request, with the specified \n * <tt>value</tt>.\n * See also \n ...
import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import com.here.account.http.HttpException; import com.here.account.http.HttpProvider; import com.here.account.oauth2.AccessTokenException; import com.here.account.oauth2.AccessTokenResponse; import com.here.account.oauth2.ErrorResponse; im...
package com.here.account.client; public class Client2Test { private HttpProvider backwardCompatibleHttpProvider; private Client client; private HttpProvider.HttpResponse httpResponse; private JacksonSerializer serializer; private String accessToken; private String bodyString; private in...
AccessTokenResponse accessTokenResponse = client.sendMessage(httpRequest, AccessTokenResponse.class, ErrorResponse.class,
2
AURIN/online-whatif
src/main/java/au/org/aurin/wif/impl/suitability/FactorServiceImpl.java
[ "@ResponseStatus(value = HttpStatus.NOT_FOUND)\npublic class InvalidEntityIdException extends WifInvalidInputException {\n\n /** The Constant serialVersionUID. */\n private static final long serialVersionUID = 24265676271144835L;\n\n /**\n * Instantiates a new wif invalid input exception.\n */\n public Inva...
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.annotation.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Aut...
package au.org.aurin.wif.impl.suitability; /** * The Class FactorServiceImpl. */ @Service @Qualifier("factorService") public class FactorServiceImpl implements FactorService { /** The Constant serialVersionUID. */ @SuppressWarnings("unused") private static final long serialVersionUID = 35200015343L; /*...
final WifProject project = projectService.getProject(projectId);
1
jprante/elasticsearch-knapsack
src/test/java/org/xbib/elasticsearch/plugin/knapsack/cpio/KnapsackCpioTests.java
[ "public class KnapsackExportRequestBuilder extends ActionRequestBuilder<KnapsackExportRequest, KnapsackExportResponse, KnapsackExportRequestBuilder> {\n\n public KnapsackExportRequestBuilder(ElasticsearchClient client) {\n super(client, KnapsackExportAction.INSTANCE, new KnapsackExportRequest());\n }\n...
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest; import org.elasticsearch.action.index.IndexRequest; import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.index.query.QueryBuilders; import org.junit.Test; import org.xb...
package org.xbib.elasticsearch.plugin.knapsack.cpio; public class KnapsackCpioTests extends NodeTestUtils { private final static ESLogger logger = ESLoggerFactory.getLogger(KnapsackCpioTests.class.getName()); @Test public void testCpio() throws Exception { File exportFile = File.createTempFile...
KnapsackStateResponse knapsackStateResponse = knapsackStateRequestBuilder.execute().actionGet();
5
f2prateek/device-frame-generator
src/main/java/com/f2prateek/dfg/DFGApplicationModule.java
[ "public abstract class AbstractGenerateFrameService extends IntentService\n implements DeviceFrameGenerator.Callback {\n static final int DFG_NOTIFICATION_ID = 1;\n public static final String KEY_EXTRA_DEVICE = \"KEY_EXTRA_DEVICE\";\n\n @Inject NotificationManager notificationManager;\n @Inject Bus bus;\n @...
import android.app.NotificationManager; import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.res.Resources; import android.preference.PreferenceManager; import android.view.WindowManager; import ...
/* * Copyright 2014 Prateek Srivastava (@f2prateek) * * 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 applicab...
DeviceModule.class, PreferencesModule.class, UiModule.class
5
kevinKaiF/cango
cango-instance/src/main/java/com/bella/cango/instance/oracle/applier/AbstractRecordApplier.java
[ "public class ColumnMeta {\n\n private String name;\n private int type;\n\n public ColumnMeta(String columnName, int columnType) {\n this.name = StringUtils.upperCase(columnName);// 统一为大写\n this.type = columnType;\n }\n\n public String getName() {\n return name;\n }\n\n pub...
import com.bella.cango.instance.oracle.common.db.meta.ColumnMeta; import com.bella.cango.instance.oracle.common.db.meta.ColumnValue; import com.bella.cango.instance.oracle.common.db.meta.Table; import com.bella.cango.instance.oracle.common.lifecycle.AbstractYuGongLifeCycle; import com.bella.cango.instance.oracle.common...
package com.bella.cango.instance.oracle.applier; /** * @author agapple 2014年2月25日 下午11:38:06 * @since 1.0.0 */ public abstract class AbstractRecordApplier extends AbstractYuGongLifeCycle implements RecordApplier { public static class TableSqlUnit { public String applierSql; public Map<String...
protected Integer getIndex(final Map<String, Integer> indexs, ColumnValue cv) {
1
QuietOne/MonkeyBrains
src/com/jme3/ai/agents/behaviors/npc/SimpleLookBehavior.java
[ "public class Agent<T> extends GameEntity {\n\n /**\n * Class that enables you to add all variable you need for your agent.\n */\n private T model;\n /**\n * Unique name of Agent.\n */\n private String name;\n /**\n * Name of team. Primarily used for enabling friendly fire.\n ...
import com.jme3.ai.agents.behaviors.Behavior; import com.jme3.math.FastMath; import com.jme3.ai.agents.events.GameEntitySeenEvent; import com.jme3.ai.agents.events.GameEntitySeenListener; import java.util.ArrayList; import java.util.List; import com.jme3.ai.agents.util.control.MonkeyBrainsAppState; import com.jme3.ai.a...
/** * Copyright (c) 2014, jMonkeyEngine All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions an...
protected void triggerListeners(GameEntity gameEntitySeen) {
5
Kaysoro/KaellyBot
src/main/java/mapper/PortalMapper.java
[ "public enum Language {\n\n FR(\"Français\", \"FR\"), EN(\"English\", \"EN\"), ES(\"Español\", \"ES\");\n\n private String name;\n private String abrev;\n\n Language(String name, String abrev){\n this.name = name;\n this.abrev = abrev;\n }\n\n public String getName() {\n retur...
import discord4j.core.spec.EmbedCreateSpec; import discord4j.rest.util.Color; import enums.Language; import org.apache.commons.lang3.time.DateUtils; import payloads.PortalDto; import payloads.PositionDto; import payloads.TransportDto; import util.Translator; import java.time.Duration; import java.time.Instant;
package mapper; public final class PortalMapper { private PortalMapper(){} public static EmbedCreateSpec decorateSpec(PortalDto portal, Language language){ EmbedCreateSpec.Builder builder = EmbedCreateSpec.builder() .title(portal.getDimension().getName()) .color(Colo...
private static String getPosition(PositionDto position){
2
ffalcinelli/jdivert
src/main/java/com/github/ffalcinelli/jdivert/Packet.java
[ "public class WinDivertException extends Exception {\n protected int code;\n protected String message;\n protected LastErrorException lee;\n\n public WinDivertException(int code) {\n this(code, Kernel32Util.formatMessage(code));\n }\n\n public WinDivertException(int code, String message) {\...
import static com.github.ffalcinelli.jdivert.exceptions.WinDivertException.throwExceptionOnGetLastError; import static com.sun.jna.platform.win32.WinDef.UINT; import static com.sun.jna.platform.win32.WinDef.USHORT; import com.github.ffalcinelli.jdivert.exceptions.WinDivertException; import com.github.ffalcinelli.jdiver...
* * @param address The String representing the source address to set. * @throws UnknownHostException Unlikely to be thrown... */ public void setSrcAddr(String address) throws UnknownHostException { ipHdr.setSrcAddrStr(address); } /** * Convenience method to get the String r...
WinDivertDLL.INSTANCE.WinDivertHelperCalcChecksums(memory, rawBytes.length, flags);
2
liaozhoubei/NetEasyNews
app/src/main/java/cn/bproject/neteasynews/webview/WebViewActivity.java
[ "public class CommonUtils {\n\n /**\n * 随机颜色\n */\n public static int randomColor() {\n Random random = new Random();\n int red = random.nextInt(150) + 50;//50-199\n int green = random.nextInt(150) + 50;//50-199\n int blue = random.nextInt(150) + 50;//50-199\n return...
import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.os.Build; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.KeyEvent; impo...
package cn.bproject.neteasynews.webview; public class WebViewActivity extends AppCompatActivity implements IWebPageView { // 进度条 ProgressBar mProgressBar; WebView webView; // 全屏时视频加载view FrameLayout videoFullView; Toolbar mTitleToolBar; // 进度条是否加载到90% public boolean mProgress90; ...
webView.addJavascriptInterface(new ImageClickInterface(this), "injectedObject");
3
jiang111/ZhiHu-TopAnswer
app/src/main/java/com/jiang/android/zhihu_topanswer/fragment/RecyclerViewFragment.java
[ "public abstract class BaseAdapter extends RecyclerView.Adapter<BaseViewHolder> {\n\n\n @Override\n public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n final BaseViewHolder holder = new BaseViewHolder(LayoutInflater.from(parent.getContext()).inflate(viewType, parent, false));\n...
import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.V...
package com.jiang.android.zhihu_topanswer.fragment; /** * Created by jiang on 2016/12/23. */ public class RecyclerViewFragment extends BaseFragment { private static final String TAG = "RecyclerViewFragment"; public static final int PAGE_START = 1; private int mPage = PAGE_START; private stat...
private MultiStateView mStateView;
4
marcusschiesser/openbahn-api
openbahn-api/src/de/marcusschiesser/dbpendler/server/ConnectionServerResource.java
[ "public interface ConnectionResource {\r\n\r\n\tpublic ConnectionVO[] listDaily(String startId, String destinationId );\r\n\tpublic ConnectionVO[] listDay(String startId, String destinationId, String date );\r\n\r\n}\r", "public class ConnectionVO implements Serializable {\r\n\tprivate static final long serialVer...
import java.text.ParseException; import java.util.Collection; import java.util.Date; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import java.util.logging.Logger; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; impor...
package de.marcusschiesser.dbpendler.server; /** * The server side implementation of the Jersey resource. */ @Path("/connections") public class ConnectionServerResource implements ConnectionResource { private final Logger log = Logger.getLogger(ConnectionServerResource.class.getName()); @GET ...
LogUtils.logConnections(result);
7
RestComm/sctp
sctp-impl/src/test/java/org/mobicents/protocols/sctp/netty/NettyAddressInUseTest.java
[ "public interface Association {\n\n\t/**\n\t * Return the Association channel type TCP or SCTP\n\t * \n\t * @return\n\t */\n\tpublic IpChannelType getIpChannelType();\n\n\t/**\n\t * Return the type of Association CLIENT or SERVER\n\t * \n\t * @return\n\t */\n\tpublic AssociationType getAssociationType();\n\n\t/**\n...
import org.mobicents.protocols.api.Association; import org.mobicents.protocols.api.AssociationListener; import org.mobicents.protocols.api.IpChannelType; import org.mobicents.protocols.api.PayloadData; import org.mobicents.protocols.sctp.SctpTransferTest; import org.testng.annotations.AfterClass; import org.testng.anno...
/* * TeleStax, Open Source Cloud Communications Copyright 2012. * and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser ...
public void onCommunicationUp(Association association, int maxInboundStreams, int maxOutboundStreams) {
0
koendeschacht/count-db
src/main/java/be/bagofwords/db/memory/InMemoryDataInterfaceFactory.java
[ "public interface DataInterface<T extends Object> extends DataIterable<KeyValue<T>> {\n\n T read(long key);\n\n default long readCount(long key) {\n Long result = (Long) read(key);\n if (result == null)\n return 0;\n else\n return result;\n }\n\n default T read...
import be.bagofwords.db.DataInterface; import be.bagofwords.db.combinator.Combinator; import be.bagofwords.db.impl.BaseDataInterface; import be.bagofwords.db.impl.BaseDataInterfaceFactory; import be.bagofwords.db.methods.ObjectSerializer; import be.bagofwords.minidepi.ApplicationContext;
package be.bagofwords.db.memory; public class InMemoryDataInterfaceFactory extends BaseDataInterfaceFactory { public InMemoryDataInterfaceFactory(ApplicationContext context) { super(context); } @Override
protected <T extends Object> BaseDataInterface<T> createBaseDataInterface(String name, Class<T> objectClass, Combinator<T> combinator, ObjectSerializer<T> objectSerializer, boolean isTemporaryDataInterface) {
4
antelink/SourceSquare
src/test/java/com/antelink/sourcesquare/scan/SourceSquareEngineTest.java
[ "public class SourceSquareEngine {\n\n public static final Log logger = LogFactory.getLog(SourceSquareEngine.class);\n private final AntepediaQuery query;\n\n private final EventBus eventBus;\n\n public SourceSquareEngine(EventBus eventBus, AntepediaQuery query) {\n this.eventBus = eventBus;\n ...
import static org.easymock.EasyMock.capture; import static org.easymock.EasyMock.createMock; import static org.easymock.EasyMock.expect; import static org.easymock.EasyMock.expectLastCall; import static org.easymock.EasyMock.replay; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; ...
/** * Copyright (C) 2009-2012 Antelink SAS * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License Version 3 as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but WITHO...
List<ResultEntry> results = new ArrayList<ResultEntry>();
5
Leviathan-Studio/CraftStudioAPI
src/main/java/com/leviathanstudio/craftstudio/proxy/CSCommonProxy.java
[ "@Mod(modid = CraftStudioApi.API_ID, name = CraftStudioApi.NAME, updateJSON = \"https://leviathan-studio.com/craftstudioapi/update.json\",\n version = \"1.0.0\",\n acceptedMinecraftVersions = \"1.12\")\npublic class CraftStudioApi\n{\n private static final Logger LOGGER = LogManager.getLogger...
import com.leviathanstudio.craftstudio.CraftStudioApi; import com.leviathanstudio.craftstudio.common.animation.AnimationHandler; import com.leviathanstudio.craftstudio.common.animation.IAnimated; import com.leviathanstudio.craftstudio.common.network.ClientIAnimatedEventMessage; import com.leviathanstudio.craftstudio.co...
package com.leviathanstudio.craftstudio.proxy; /** * Common base for the proxies of the CraftStudioApi * * @since 0.3.0 * * @author Timmypote * @author ZeAmateis */ public abstract class CSCommonProxy { public void preInit(FMLPreInitializationEvent e) { CraftStudioApi.NETWORK.registerMessage(Cli...
CraftStudioApi.NETWORK.registerMessage(ServerIAnimatedEventHandler.class, ServerIAnimatedEventMessage.class, 1, Side.SERVER);
5
cereda/nightingale
application/src/main/java/com/github/cereda/nightingale/utils/ConfigurationUtils.java
[ "public class Nightingale {\n\n /**\n * Main method. This is the application entry point.\n * @param args A string array containing all command line arguments.\n */\n public static void main(String[] args) {\n\n // the first component to be initialized is the\n // language controller...
import com.github.cereda.nightingale.Nightingale; import com.github.cereda.nightingale.controller.LanguageController; import com.github.cereda.nightingale.model.NightingaleException; import com.github.cereda.nightingale.model.FileType; import com.github.cereda.nightingale.model.Language; import com.github.cereda.nighti...
/** * Nightingale * Copyright (c) 2014, Paulo Roberto Massa Cereda * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above...
mapping.put("language", Language.class);
4
mguymon/naether
src/main/java/com/tobedevoured/naether/maven/Project.java
[ "public class NaetherImpl implements Naether {\n\n public static final String MIRROR_ENV = \"NAETHER_MIRROR\";\n public static final RemoteRepository DEFAULT_REPOSITORY =\n new RemoteRepository(\"central\", \"default\", \"https://repo1.maven.org/maven2/\");\n\n private static final Logger log = Logg...
import java.io.*; import java.net.MalformedURLException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.tobedevoured.naether.impl.NaetherI...
package com.tobedevoured.naether.maven; /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache Licen...
return Notation.generate( this );
3
2fast2fourier/something.apk
Something/src/main/java/net/fastfourier/something/request/ThreadPageRequest.java
[ "public class ThreadManager {\n private static final SparseArray<WeakReference<ThreadItem>> threads = new SparseArray<WeakReference<ThreadItem>>();\n\n public static void clearThreadCache(){\n threads.clear();\n }\n\n public static ThreadItem getThread(int threadId){\n WeakReference<Thread...
import android.content.Context; import android.net.Uri; import android.text.TextUtils; import com.android.volley.NetworkResponse; import com.android.volley.Request; import com.android.volley.Response; import com.salvadordalvik.fastlibrary.util.FastUtils; import net.fastfourier.something.data.ThreadManager; import net.f...
package net.fastfourier.something.request; /** * Created by matthewshepard on 1/19/14. */ public class ThreadPageRequest extends HTMLRequest<ThreadPageRequest.ThreadPage> { private long jumpToPost = 0; private Context context; public ThreadPageRequest(Context context, int threadId, int page, Respon...
addParam("perpage", SomePreferences.threadPostPerPage);
4
googlearchive/android-AutofillFramework
afservice/src/main/java/com/example/android/autofill/service/data/source/local/DigitalAssetLinksRepository.java
[ "public interface DataCallback<T> {\n void onLoaded(T object);\n\n void onDataNotAvailable(String msg, Object... params);\n}", "public interface DalService {\n @GET(\"/v1/assetlinks:check\")\n Call<DalCheck> check(@Query(\"source.web.site\") String webDomain,\n @Query(\"relation\") String p...
import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.support.annotation.NonNull; import com.example.android.autofill.service.data.DataCallback; import com.example.android.autofill.service.data.source.DalService; import com.example.android.autofill.service.data.source.DigitalAs...
/* * Copyright (C) 2017 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 app...
private final HashMap<DalInfo, DalCheck> mCache;
4
domax/gwt-dynamic-plugins
gwt-dynamic-main/gwt-dynamic-module-foo/src/main/java/org/gwt/dynamic/module/foo/client/DynamicModuleFoo.java
[ "public class ModuleContentFeatureProvider extends FeatureProvider<Element, Void> implements FeatureCommonConst {\n\n\tprivate static final Logger LOG = Logger.getLogger(ModuleContentFeatureProvider.class.getName());\n\tprivate final ViewHandler viewHandler;\n\t\n\tpublic static interface ViewHandler {\n\t\tWidget ...
import java.util.logging.Logger; import org.gwt.dynamic.common.client.features.ModuleContentFeatureProvider; import org.gwt.dynamic.common.client.features.ModuleContentFeatureProvider.ViewHandler; import org.gwt.dynamic.common.client.features.ModuleInfoFeatureProvider; import org.gwt.dynamic.common.client.module.Abstra...
/* * Copyright 2014 Maxim Dominichenko * * Licensed under The MIT License (MIT) (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * https://github.com/domax/gwt-dynamic-plugins/blob/master/LICENSE * * Unless required by applicable...
new ModuleContentFeatureProvider(new ViewHandler() {
0