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
cckevincyh/FreshMarket
FreshMarket/src/com/greengrocer/freshmarket/web/servlet/admin/AdminCommodityServlet.java
[ "public class Commodity implements Serializable{ //实现序列化是因为设置了session钝化\n\n\tprivate int commodityID;\t\t\t//商品编号\n\tprivate CommodityType commodityType;\t//商品种类\n\tprivate String commodityName;\t\t\t//商品名称\n\tprivate Double commodityPrice;\t\t\t//商品价格\n\tprivate String url;\t\t\t\t\t\t//商品图片url\n\t\n\n\tpublic Com...
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.greengrocer.freshmarket.domain.Commodity; import com.greengrocer.freshmarket.domain.PageBean; import com.green...
package com.greengrocer.freshmarket.web.servlet.admin; public class AdminCommodityServlet extends BaseServlet { private CommodityService service = new CommodityService(); /** * 添加商品信息实体 * @param request * @param response * @throws ServletException * @throws IOException */ public String addCommodi...
CommodityForm commodityForm = WebUtils.uploadForm2Bean(request, CommodityForm.class);
4
rsanchez-wsu/sp16-ceg3120
src/edu/wright/cs/sp16/ceg3120/gui/tabs/components/NewConnectionDetailsPane.java
[ "public class MainTabPane extends JTabbedPane {\n\n\tprivate static final long serialVersionUID = 1147338263638840061L;\n\tprivate boolean isLearnDiscoverOpen;\n\n\t/**\n\t * Creates the MainTabPane and starts up a \"Start Page\" tab.\n\t */\n\tpublic MainTabPane() {\n\t\tsuper();\n\n\t\taddStartPageTab();\n\t\tadd...
import edu.wright.cs.sp16.ceg3120.gui.MainTabPane; import edu.wright.cs.sp16.ceg3120.gui.other.Inputs; import edu.wright.cs.sp16.ceg3120.sql.DatabaseConnector; import edu.wright.cs.sp16.ceg3120.sql.MySqlConnect; import edu.wright.cs.sp16.ceg3120.sql.PostgreConnect; import edu.wright.cs.sp16.ceg3120.util.PasswordEncrypt...
/* * Copyright (C) 2016 * * * * * 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 distri...
JLabel jlabel = new JLabel(Inputs.get(i).toString());
1
LonamiWebs/Klooni1010
core/src/dev/lonami/klooni/screens/CustomizeScreen.java
[ "public class Klooni extends Game {\n\n //region Members\n\n // FIXME theme should NOT be static as it might load textures which will expose it to the race condition iff GDX got initialized before or not\n public static Theme theme;\n public IEffectFactory effect;\n\n // ordered list of effects. inde...
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.Screen; import com.badlogic.gdx.graphics.GL20; import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.InputList...
/* 1010! Klooni, a free customizable puzzle game for Android and Desktop Copyright (C) 2017-2019 Lonami Exo @ lonami.dev 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 ve...
private final SoftButton toggleShopButton;
5
rayedchan/OIMUtilities
src/com/blogspot/oraclestack/testdriver/TestDriver.java
[ "public enum JarElementType \n{\n JavaTasks, ScheduleTasks, ThirdParty, ICFBundle;\n}", "public class OracleIdentityManagerClient \n{\n // Logger\n public static ODLLogger logger = ODLLogger.getODLLogger(OracleIdentityManagerClient.class.getName());\n \n // Instance Variables\n private OIMClient...
import java.util.Arrays; import java.util.HashSet; import java.util.logging.Level; import java.util.logging.Logger; import javax.security.auth.login.LoginException; import oracle.core.ojdl.logging.ConsoleHandler; import oracle.core.ojdl.logging.ODLLevel; import oracle.iam.identity.exception.UserSearchException; import ...
package com.blogspot.oraclestack.testdriver; /** * Used for testing purposes. * @author rayedchan */ public class TestDriver { // Adjust constant variables according to you OIM environment public static final String OIM_HOSTNAME = "localhost"; public static final String OIM_PORT = "14000"; // For SSL,...
PluginRegistration pluginReg = new PluginRegistration(oimClient);
3
ehsane/rainbownlp
src/main/java/rainbownlp/analyzer/evaluation/classification/CrossValidation.java
[ "public interface ICrossfoldValidator {\n\tpublic IEvaluationResult crossValidation(List<MLExample> examples, int folds) throws Exception;\n\tpublic LearnerEngine getLearnerEngine();\n}", "public abstract class LearnerEngine {\n\tpublic String modelFile;\n\tString taskName = \"unknown\";\n\tString trainFile;\n\tS...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import rainbownlp.analyzer.evaluation.ICrossfoldValidator; import rainbownlp.machinelearning.LearnerEngine; import rainbownlp.machinelearning.MLExample; import rainbownlp.util.FileUtil; import rainbownlp.util.ConfigurationUtil;
package rainbownlp.analyzer.evaluation.classification; public class CrossValidation implements ICrossfoldValidator { LearnerEngine mlModel; public CrossValidation(LearnerEngine learningEngine) { mlModel = learningEngine; } public EvaluationResult crossValidation(List<MLExample> examples, int folds) throws ...
FileUtil.logLine("Class: "+evaluated_class);
3
sdnwiselab/sdn-wise-java
data/src/main/java/com/github/sdnwiselab/sdnwise/mote/standalone/AbstractMote.java
[ "public abstract class AbstractCore {\n /**\n * Lenght of the function subheader.\n */\n private static final int FUNCTION_HEADER = 3;\n /**\n * Max RSSI value.\n */\n public static final int MAX_RSSI = 255;\n /**\n * Queue size.\n */\n protected static final int QUEUE_SIZE...
import com.github.sdnwiselab.sdnwise.mote.core.AbstractCore; import static com.github.sdnwiselab.sdnwise.mote.core.AbstractCore.MAX_RSSI; import com.github.sdnwiselab.sdnwise.mote.core.Pair; import com.github.sdnwiselab.sdnwise.mote.logger.MoteFormatter; import com.github.sdnwiselab.sdnwise.packet.NetworkPacket; i...
/* * Copyright (C) 2015 SDN-WISE * * 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 d...
int rssi = MAX_RSSI;
1
pxb1988/dex2jar
dex-translator/src/test/java/com/googlecode/dex2jar/test/TestUtils.java
[ "public abstract interface DexConstants {\r\n\r\n int ACC_PUBLIC = 0x0001; // class, field, method\r\n int ACC_PRIVATE = 0x0002; // class, field, method\r\n int ACC_PROTECTED = 0x0004; // class, field, method\r\n int ACC_STATIC = 0x0008; // field, method\r\n int ACC_FINAL = 0x0010; // class, field, m...
import com.android.dx.cf.direct.DirectClassFile; import com.android.dx.cf.direct.StdAttributeFactory; import com.android.dx.cf.iface.ParseException; import com.android.dx.command.dexer.DxContext; import com.android.dx.dex.DexOptions; import com.android.dx.dex.cf.CfOptions; import com.android.dx.dex.cf.CfTranslator; imp...
} public static List<Path> listPath(File file, final String... exts) { final List<Path> list = new ArrayList<>(); try { Files.walkFileTree(file.toPath(), new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path file, BasicFileA...
DexClassNode clzNode = new DexClassNode(DexConstants.ACC_PUBLIC, "L" + generateClassName + ";",
0
jeick/jamod
src/main/java/net/wimpi/modbus/facade/ModbusSerialMaster.java
[ "public class ModbusCoupler {\n\n\t// class attributes\n\tprivate static ModbusCoupler c_Self; // Singleton reference\n\n\t// instance attributes\n\tprivate ProcessImage m_ProcessImage;\n\tprivate int m_UnitID = Modbus.DEFAULT_UNIT_ID;\n\tprivate boolean m_Master = true;\n\tprivate ProcessImageFactory m_PIFactory;\...
import net.wimpi.modbus.ModbusCoupler; import net.wimpi.modbus.ModbusException; import net.wimpi.modbus.io.ModbusSerialTransaction; import net.wimpi.modbus.msg.*; import net.wimpi.modbus.net.SerialConnection; import net.wimpi.modbus.procimg.InputRegister; import net.wimpi.modbus.procimg.Register; import net.wimpi.modbu...
/*** * Copyright 2002-2010 jamod development team * * 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...
throws ModbusException {
1
tobyweston/tempus-fugit
src/test/java/com/google/code/tempusfugit/temporal/WaitForTest.java
[ "public interface Callable<V, E extends Exception> extends java.util.concurrent.Callable<V> {\n V call() throws E;\n}", "public static Condition isAlive(Thread thread) {\n return new ThreadAliveCondition(thread);\n}", "public static Condition not(Condition condition) {\n return () -> !condition.isSatis...
import com.google.code.tempusfugit.concurrency.Callable; import org.hamcrest.Description; import org.jmock.Expectations; import org.jmock.Mockery; import org.jmock.Sequence; import org.jmock.integration.junit4.JMock; import org.jmock.integration.junit4.JUnit4Mockery; import org.junit.Rule; import org.junit.Test; import...
/* * Copyright (c) 2009-2018, toby weston & tempus-fugit committers * * 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...
}, timeout(seconds(10)));
4
handexing/geekHome
geekHome-web-ui/src/main/java/com/geekhome/controller/OpenSourceController.java
[ "public enum ErrorCode {\n\t\n\tEXCEPTION(\"程序异常\", \"00001\"),\n\tUSER_NOT_EXIST(\"用户未注册\", \"00002\"),\n VERIFY_CODE_WRONG(\"验证码错误\",\"00003\"),\n OLD_PWD_WRONG(\"旧密码错误\",\"00004\"),\n USERNAME_PASSWORD_WRONG(\"用户名或密码错误\",\"00005\"),\n TODAY_HAVE_SIGN(\"今日已签到\",\"00006\");\n\n\tprivate String errorMsg...
import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.RequestBody; import org.s...
package com.geekhome.controller; @RestController @RequestMapping("openSource") public class OpenSourceController { Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired LabelDao labelDao; @Autowired
OpenSourceService openSourceService;
7
rolandkrueger/user-microservice
service/src/main/java/info/rolandkrueger/userservice/controller/UserRegistrationRestController.java
[ "public final class RestApiConstants {\n\n private RestApiConstants() {\n }\n\n public static final String AUTHORITIES_RESOURCE = \"authorities\";\n\n public static final String UPDATE_USER_RESOURCE = \"update-user\";\n public static final String LOGIN_USER_RESOURCE = \"login-user\";\n public stat...
import com.google.common.base.Strings; import info.rolandkrueger.userservice.api._internal.RestApiConstants; import info.rolandkrueger.userservice.api.model.UserRegistrationApiData; import info.rolandkrueger.userservice.model.User; import info.rolandkrueger.userservice.model.UserRegistrationResource; import info.roland...
package info.rolandkrueger.userservice.controller; /** * @author Roland Krüger */ @RestController @ExposesResourceFor(UserRegistrationResource.class)
@RequestMapping("/" + RestApiConstants.REGISTRATIONS_RESOURCE)
0
bencvt/LibShapeDraw
projects/demos/src/main/java/libshapedraw/demos/mod_LSDDemoTridentDynamic.java
[ "public class LibShapeDraw {\n private final Set<Shape> shapes;\n private final Set<Shape> shapesReadonly;\n private final Set<LSDEventListener> eventListeners;\n private final Set<LSDEventListener> eventListenersReadonly;\n private final String instanceId;\n private final String ownerId;\n pri...
import java.util.LinkedList; import libshapedraw.LibShapeDraw; import libshapedraw.event.LSDEventListener; import libshapedraw.event.LSDGameTickEvent; import libshapedraw.event.LSDPreRenderEvent; import libshapedraw.event.LSDRespawnEvent; import libshapedraw.primitive.Color; import libshapedraw.primitive.ReadonlyVector...
package libshapedraw.demos; /** * Dynamically create animated shapes. * <p> * Pressing V on the keyboard will spawn a rotating wireframe box near the * player, colored randomly and rotating at a random rate. An unlimited number * of boxes can be created. The shapes, and their associated looping * animations, ...
public void onPreRender(LSDPreRenderEvent event) {
3
cloudera/flume
flume-core/src/test/java/com/cloudera/flume/handlers/rolling/TestRollSink.java
[ "public class Context {\n Map<String, Object> table = new HashMap<String, Object>();\n final Context parent;\n\n final public static Context EMPTY = new Context(null);\n\n public Context(Context parent) {\n this.parent = parent;\n }\n\n /**\n * This should only be used rarely. You probably want\n * Log...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import java.io....
/** * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use th...
RollSink snk = new RollSink(new Context(), "test", new TimeTrigger(tagger,
0
lkoskela/maven-build-utils
src/test/java/com/lassekoskela/maven/timeline/GoalOrganizerTest.java
[ "public static final int COLUMN_WIDTH_PIXEL = 60;", "public static Goal goal(String name, long duration, long startTime, String... dependencies) {\n\treturn new Goal(name, new Duration(duration), startTime, asList(dependencies));\n}", "public static Phase phase(String name, Goal... goals) {\n\treturn new Phase(...
import static com.lassekoskela.maven.timeline.GoalOrganizer.COLUMN_WIDTH_PIXEL; import static com.lassekoskela.maven.timeline.ObjectBuilder.goal; import static com.lassekoskela.maven.timeline.ObjectBuilder.phase; import static com.lassekoskela.maven.timeline.ObjectBuilder.project; import static org.hamcrest.MatcherAsse...
package com.lassekoskela.maven.timeline; public class GoalOrganizerTest { private ConsoleLogger logger; private GoalOrganizer goalOrganizer; @Before public void setUp() { logger = new ConsoleLogger(); goalOrganizer = new GoalOrganizer(logger); } @Test(expected = IllegalArgumentException.class) public ...
SortedGoal sortedGoal = new SortedGoal(project("project1"), phase("phase1"), goal("goal1", 0, 0));
1
PascalUrso/ReplicationBenchmark
src/jbenchmarker/woot/wooth/WootHashMerge.java
[ "public abstract class Document {\n \n\n public Document() {\n }\n \n /* \n * View of the document (without metadata)\n */\n abstract public String view();\n \n /**\n * Applies an operation\n */ \n public void apply(Operation op) {\n applyLocal(op);\n }\n \n ...
import jbenchmarker.trace.TraceOperation; import jbenchmarker.woot.WootIdentifier; import jbenchmarker.woot.WootOperation; import java.util.ArrayList; import java.util.List; import java.util.Map; import jbenchmarker.core.Document; import jbenchmarker.core.MergeAlgorithm; import jbenchmarker.core.Operation; import jbenc...
/** * This file is part of ReplicationBenchmark. * * ReplicationBenchmark 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 versio...
protected List<Operation> generateLocal(TraceOperation opt) throws IncorrectTrace {
3
Metrink/croquet
croquet-examples/src/main/java/com/metrink/croquet/examples/crm/Main.java
[ "public class CroquetWicket<T extends WicketSettings> {\n protected static final EnumSet<DispatcherType> DISPATCHER_TYPES =\n EnumSet.of(DispatcherType.ASYNC,\n DispatcherType.REQUEST,\n DispatcherType.FORWARD,\n DispatcherType.INCLUDE);\n...
import org.hibernate.dialect.HSQLDialect; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.metrink.croquet.CroquetWicket; import com.metrink.croquet.CroquetWicketBuilder; import com.metrink.croquet.WicketSettings; import com.metrink.croquet.examples.crm.data.CompanyBean; import com.metrink.croquet.ex...
package com.metrink.croquet.examples.crm; /** * The main class where Croquet starts from. * * There is only the static main method here. This class has * no state. */ public class Main { @SuppressWarnings("unused") private static final Logger LOG = LoggerFactory.getLogger(Main.class); private Main(...
.addJpaEntity(CompanyBean.class)
3
thane98/3DSFE-Randomizer
randomizer/fates/model/processors/chapter/ScriptHandler.java
[ "public enum ItemType {\n Swords,\n Lances,\n Axes,\n Tomes,\n Bows,\n Shurikens,\n Staves,\n Beaststone,\n Treasure,\n Fists,\n DarkBreath,\n Breaths,\n Stones,\n Saws\n}", "public class Decompiler {\n\n\tprivate int ref;\n\tprivate List<String> result;\n\tprivate byte[]...
import randomizer.common.enums.ItemType; import randomizer.common.fs.model.Decompiler; import randomizer.common.fs.model.ScriptCompiler; import randomizer.common.structures.Chapter; import randomizer.fates.model.structures.FatesCharacter; import randomizer.fates.singletons.*; import java.io.File; import java.nio.file.P...
package randomizer.fates.model.processors.chapter; public class ScriptHandler { private static boolean[] options = FatesGui.getInstance().getSelectedOptions(); private static FatesItems fatesItems = FatesItems.getInstance(); private static FatesChapters fatesChapters = FatesChapters.getInstance(); pr...
Decompiler decompiler = new Decompiler();
1
jwtk/jjwt
extensions/orgjson/src/main/java/io/jsonwebtoken/orgjson/io/OrgJsonSerializer.java
[ "public final class Encoders {\n\n public static final Encoder<byte[], String> BASE64 = new ExceptionPropagatingEncoder<>(new Base64Encoder());\n public static final Encoder<byte[], String> BASE64URL = new ExceptionPropagatingEncoder<>(new Base64UrlEncoder());\n\n private Encoders() { //prevent instantiati...
import java.util.Date; import java.util.Map; import io.jsonwebtoken.io.Encoders; import io.jsonwebtoken.io.SerializationException; import io.jsonwebtoken.io.Serializer; import io.jsonwebtoken.lang.Classes; import io.jsonwebtoken.lang.Collections; import io.jsonwebtoken.lang.DateFormats; import io.jsonwebtoken.lang.Obje...
/* * Copyright (C) 2014 jsonwebtoken.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
if (Classes.isAvailable(JSON_STRING_CLASS_NAME)) {
3
amao12580/BookmarkHelper
app/src/main/java/pro/kisscat/www/bookmarkhelper/converter/support/impl/uc/impl/UCBrowser.java
[ "public final class R {\n public static final class anim {\n public static final int abc_fade_in=0x7f050000;\n public static final int abc_fade_out=0x7f050001;\n public static final int abc_grow_fade_in_from_bottom=0x7f050002;\n public static final int abc_popup_enter=0x7f050003;\n ...
import android.content.Context; import android.support.v4.content.ContextCompat; import java.util.LinkedList; import java.util.List; import pro.kisscat.www.bookmarkhelper.R; import pro.kisscat.www.bookmarkhelper.converter.support.impl.uc.UCBrowserAble; import pro.kisscat.www.bookmarkhelper.entry.app.Bookmark; import pr...
package pro.kisscat.www.bookmarkhelper.converter.support.impl.uc.impl; /** * Created with Android Studio. * Project:BookmarkHelper * User:ChengLiang * Mail:stevenchengmask@gmail.com * Date:2016/11/1 * Time:9:20 * <p> * UC浏览器-国内版 */ public class UCBrowser extends UCBrowserAble { private List<Bookmark> ...
private static final String filePath_cp = Path.SDCARD_ROOTPATH + Path.SDCARD_APP_ROOTPATH + Path.SDCARD_TMP_ROOTPATH + Path.FILE_SPLIT + "UC" + Path.FILE_SPLIT;
4
idega/com.idega.block.email
src/java/com/idega/block/email/patterns/MailingListMessageSearcher.java
[ "public class EmailConstants {\n\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"com.idega.block.email\";\n\t\n\tpublic static final String MAILING_LIST_MESSAGE_RECEIVER = CoreConstants.PROP_SYSTEM_ACCOUNT;\n\t\n\tpublic static final String MULTIPART_MIXED_TYPE = \"multipart/Mixed\";\n\tpublic static final S...
import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.mail.Message; import javax.mail.MessagingException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.BeanDefinition; import org.sprin...
package com.idega.block.email.patterns; @Service @Scope(BeanDefinition.SCOPE_SINGLETON) public class MailingListMessageSearcher extends DefaultSubjectPatternFinder { private static final long serialVersionUID = -339350300052921900L; private static final String MAILING_LIST_REGULAR_EXPRESSION = "\\[.*" + EmailC...
public MessageParserType getParserType() {
2
dan-zx/tedroid
tests/online_tests/src/mx/udlap/is522/tedroid/test/ScorePersistenceTest.java
[ "public class ClassicGameActivity extends BaseGoogleGamesActivity {\n \n private int totalLines;\n private int totalScore;\n private int level;\n private NextTetrominoView nextTetrominoView;\n private GameBoardView gameBoardView;\n private TextView gameOverTextView;\n private TextView scoreT...
import android.test.ActivityInstrumentationTestCase2; import android.util.Log; import android.widget.TextView; import com.robotium.solo.Solo; import mx.udlap.is522.tedroid.R; import mx.udlap.is522.tedroid.activity.ClassicGameActivity; import mx.udlap.is522.tedroid.activity.MainMenuActivity; import mx.udlap.is522.tedroi...
/* * Copyright 2014 Tedroid developers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
solo.waitForActivity(ClassicGameActivity.class);
0
box/box-android-sdk
box-content-sample/src/main/java/com/box/androidsdk/sample/MainActivity.java
[ "public class BoxConfig {\n\n private static BoxCache mCache = null;\n\n /**\n * Flag for whether logging is enabled. This will log all requests and responses made by the SDK\n */\n public static boolean IS_LOG_ENABLED = false;\n\n /**\n * Flag for whether the app is currently run in debug m...
import android.app.ProgressDialog; import android.content.Context; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAd...
package com.box.androidsdk.sample; /** * Sample content app that demonstrates session creation, and use of file api. */ public class MainActivity extends AppCompatActivity implements BoxAuthentication.AuthListener { BoxSession mSession = null; BoxSession mOldSession = null; private ListView mListVie...
BoxConfig.IS_LOG_ENABLED = true;
0
wuyisheng/libRtmp
app/src/main/java/org/yeshen/video/librtmp/unstable/net/packer/flv/FlvPacker.java
[ "public class AnnexbHelper {\n\n // Coded slice of a non-IDR picture slice_layer_without_partitioning_rbsp( )\n public final static int NonIDR = 1;\n // Coded slice of an IDR picture slice_layer_without_partitioning_rbsp( )\n public final static int IDR = 5;\n // Supplemental enhancement information ...
import android.annotation.TargetApi; import android.media.MediaCodec; import org.yeshen.video.librtmp.unstable.net.packer.AnnexbHelper; import org.yeshen.video.librtmp.unstable.net.packer.Packer; import java.nio.ByteBuffer; import static org.yeshen.video.librtmp.unstable.net.packer.flv.FlvPackerHelper.AUDIO_HEADER_SIZE...
public void setPacketListener(OnPacketListener listener) { packetListener = listener; } @Override public void start() { mAnnexbHelper.setAnnexbNaluListener(this); } @Override public void onVideoData(ByteBuffer bb, MediaCodec.BufferInfo bi) { mAnnexbHelper.analyseV...
int firstAudioPacketSize = AUDIO_SPECIFIC_CONFIG_SIZE + AUDIO_HEADER_SIZE;
3
rolandkrueger/user-microservice
service/src/test/java/info/rolandkrueger/userservice/controller/AuthorityRestController_ReadSearchTest.java
[ "@SpringBootApplication\n@PropertySource(\"userservice.properties\")\npublic class UserMicroserviceApplication {\n\n public static void main(String[] args) {\n SpringApplication.run(\n new Object[]{\n UserMicroserviceApplication.class,\n Develop...
import info.rolandkrueger.userservice.UserMicroserviceApplication; import info.rolandkrueger.userservice.api.model.AuthorityApiData; import info.rolandkrueger.userservice.api.resources.AuthoritiesResource; import info.rolandkrueger.userservice.api.resources.AuthoritiesSearchResource; import info.rolandkrueger.userservi...
package info.rolandkrueger.userservice.controller; /** * @author Roland Krüger */ @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = UserMicroserviceApplication.class) @WebIntegrationTest(randomPort = true) public class AuthorityRestController_ReadSearchTest extends AbstractRestCont...
assertThat("found authority does not match expected authority object", authoritiesMatch(admins,
5
skysign/public
basic_algorithm/src/BasicAlgorithm00/src/com/tistory/skysign/BasicAlgorithm/Main.java
[ "public class InOrder extends BinaryTreeBase{\n static void inorder(BinaryTreeNode n) {\n if (null != n.childLeft) {\n inorder(n.childLeft);\n }\n\n visit(n);\n\n if (null != n.childRight) {\n inorder(n.childRight);\n }\n }\n\n static void inorder_st...
import com.tistory.skysign.BasicAlgorithm.BinaryTree.InOrder; import com.tistory.skysign.BasicAlgorithm.BinaryTree.PostOrder; import com.tistory.skysign.BasicAlgorithm.BinaryTree.PreOrder; import com.tistory.skysign.BasicAlgorithm.Chapter11.Section01; import com.tistory.skysign.BasicAlgorithm.Chapter11.Section03; impor...
package com.tistory.skysign.BasicAlgorithm; public class Main { /** * @param args */ public static void main(String[] args) { InOrder.run(); PreOrder.run(); PostOrder.run(); System.out.println("SelectionSort"); SelectionSort.run(); System.out.println("...
Section04.run11_04();
5
magmaOffenburg/magmaChallenge
srcTools/magma/tools/benchmark/model/bench/passingchallenge/PassingBenchmark.java
[ "public class BenchmarkConfiguration\n{\n\tpublic static final String DEFAULT_SERVER_IP = \"localhost\";\n\n\tpublic static final int DEFAULT_SERVER_PORT = 3100;\n\n\tpublic static final int DEFAULT_PROXY_PORT = 3110;\n\n\tpublic static final int DEFAULT_TRAINER_PORT = 3200;\n\n\tpublic static final int DEFAULT_AVE...
import java.util.ArrayList; import java.util.Random; import magma.monitor.general.impl.MonitorComponentFactory; import magma.monitor.referee.IReferee; import magma.tools.benchmark.model.BenchmarkConfiguration; import magma.tools.benchmark.model.ISingleResult; import magma.tools.benchmark.model.ITeamResult; import magma...
package magma.tools.benchmark.model.bench.passingchallenge; public class PassingBenchmark extends BenchmarkMain { public static final int PLAYERS = 4; public static final int AVG_OUT_OF_BEST = 3; private ArrayList<Float> results; public PassingBenchmark(String roboVizServer) { super(roboVizServer, false); ...
public void collectResults(ITeamResult currentRunResult)
2
wuyan345/onlineShop
src/main/java/com/shop/controller/portal/PayController.java
[ "public class Const {\n\n\tpublic static final String HTTP_IMAGE_PREFIX = \"http://img.zxshopdemo.com/\";\n\t\n\tpublic static final int SUCCESS = 0;\n\tpublic static final int FAILED = 1;\n\t\n\tpublic static final int NORMAL_USER = 1;\n\tpublic static final int MANAGER = 0;\n\t\n\tpublic static final String CURRE...
import java.util.HashMap; import java.util.Iterator; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Co...
package com.shop.controller.portal; @Controller @RequestMapping("/pay") public class PayController { private static final Logger logger = LoggerFactory.getLogger(PayController.class); @Autowired private LoginCheck loginCheck; @Autowired private IPayService iPayService; @RequestMapping("/alipay") @Respo...
User user = (User) session.getAttribute(Const.CURRENT_USER);
3
LMAX-Exchange/disruptor-proxy
src/main/java/com/lmax/tool/disruptor/reflect/ReflectiveRingBufferInvocationHandler.java
[ "public interface DropListener\n{\n void onDrop();\n}", "public interface Invoker\n{\n void invokeWithArgumentHolder(final Object implementation, final Object argumentHolder);\n}", "public interface MessagePublicationListener\n{\n /**\n * Called before message is published to the ringbuffer\n *...
import com.lmax.disruptor.RingBuffer; import com.lmax.tool.disruptor.DropListener; import com.lmax.tool.disruptor.Invoker; import com.lmax.tool.disruptor.MessagePublicationListener; import com.lmax.tool.disruptor.OverflowStrategy; import com.lmax.tool.disruptor.ProxyMethodInvocation; import java.lang.reflect.Invocation...
/* * Copyright 2015-2016 LMAX Ltd. * * 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...
private final Map<Method, Invoker> methodToInvokerMap;
1
shyampurk/bluemix-todo-app
Android-Client/src/main/java/vitymobi/com/todobluemix/ActivityTaskList.java
[ "public class TaskListAdapter extends BaseAdapter {\n\n private Context parentContext;\n private LayoutInflater mInflater;\n private TaskSummaryTemplate[] tasksData;\n\n\n public TaskListAdapter(Context parentReference, TaskSummaryTemplate[] tasks){\n this.parentContext=parentReference;\n ...
import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.support.v7.app.AppCompatActivity; import android.view.View; i...
package vitymobi.com.todobluemix; /** * Created by manishautomatic on 22/03/16. */ public class ActivityTaskList extends AppCompatActivity implements View.OnClickListener { private Button mBtnAddNewTask; private ListView mLstVwTaskListing; private TaskListAdapter mAdapter ;
TaskListing tListing = new TaskListing();
5
TranquilMarmot/spaceout
src/com/bitwaffle/spaceout/entities/passive/particles/Explosion.java
[ "public class SoundSource {\n\t/** Buffers for transferring data */\n\tprivate FloatBuffer posBuf, velBuf;\n\t\n\t/** Handle to use for source */\n\tprivate int handle;\n\t\n\t/** If this is set to true, then this source should be removed as soon as it's done playing its sound */\n\tpublic boolean removeFlag = fals...
import org.lwjgl.util.vector.Quaternion; import org.lwjgl.util.vector.Vector3f; import com.bitwaffle.spaceguts.audio.SoundSource; import com.bitwaffle.spaceguts.entities.Entities; import com.bitwaffle.spaceguts.entities.Entity; import com.bitwaffle.spaceguts.entities.particles.Emitter; import com.bitwaffle.spaceout.res...
package com.bitwaffle.spaceout.entities.passive.particles; /** * Basically a particle that creates particles. Ha! * @author TranquilMarmot */ public class Explosion extends Entity{ /** Emitter for particles */ Emitter emitter; /** Time to live (how long the explosion lasts) */ float ttl; /** How long the...
Textures.FIRE,
5
googleapis/java-trace
google-cloud-trace/src/main/java/com/google/cloud/trace/v1/TraceServiceSettings.java
[ "public static class ListTracesPagedResponse\n extends AbstractPagedListResponse<\n ListTracesRequest,\n ListTracesResponse,\n Trace,\n ListTracesPage,\n ListTracesFixedSizeCollection> {\n\n public static ApiFuture<ListTracesPagedResponse> createAsync(\n PageContext<ListT...
import static com.google.cloud.trace.v1.TraceServiceClient.ListTracesPagedResponse; import com.google.api.core.ApiFunction; import com.google.api.core.BetaApi; import com.google.api.gax.core.GoogleCredentialsProvider; import com.google.api.gax.core.InstantiatingExecutorProvider; import com.google.api.gax.grpc.Instantia...
/* * Copyright 2021 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
public PagedCallSettings<ListTracesRequest, ListTracesResponse, ListTracesPagedResponse>
4
raycoarana/awex
awex-core/src/main/java/com/raycoarana/awex/AwexCollectionPromise.java
[ "public interface CancelCallback {\n\n void onCancel();\n\n}", "public interface DoneCallback<T> {\n\n void onDone(T result);\n\n}", "public interface FailCallback {\n\n void onFail(Exception exception);\n\n}", "public interface Filter<T> {\n boolean filter(T value);\n}", "public interface Func<...
import com.raycoarana.awex.callbacks.CancelCallback; import com.raycoarana.awex.callbacks.DoneCallback; import com.raycoarana.awex.callbacks.FailCallback; import com.raycoarana.awex.transform.Filter; import com.raycoarana.awex.transform.Func; import com.raycoarana.awex.transform.Mapper; import java.util.Collection; imp...
package com.raycoarana.awex; class AwexCollectionPromise<Result, Progress> extends AwexPromise<Collection<Result>, Progress> implements CollectionPromise<Result, Progress> { public AwexCollectionPromise(Awex awex) { super(awex); } public <U> AwexCollectionPromise(Awex mAwex, Promise<U, Progress...
}).cancel(new CancelCallback() {
0
AbrarSyed/SecretRoomsMod-forge
src/main/java/com/wynprice/secretroomsmod/handler/EnergizedPasteHandler.java
[ "@Config(modid = SecretRooms5.MODID, category = \"\")\n@EventBusSubscriber(modid=SecretRooms5.MODID)\npublic final class SecretConfig {\n\n public static final General GENERAL = new General();\n public static final EnergizedPaste ENERGIZED_PASTE = new EnergizedPaste();\n public static final SRMBlockFunctio...
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.ConcurrentModificationException; import java.util.HashMap; import org.apache.commons.lang3.tuple.P...
package com.wynprice.secretroomsmod.handler; /** * The handler for EnergizedPaste * @author Wyn Price * */ @EventBusSubscriber(modid=SecretRooms5.MODID) public class EnergizedPasteHandler { /** * The map used to keep track of everything Energized Paste related */ private static HashMap<Integer, HashMap<...
if(block instanceof ISecretBlock) return false;
3
akjava/html5gwt
src/com/akjava/gwt/html5test/client/MediaTest.java
[ "public class Uint8Array extends JavaScriptObject {\r\nprotected Uint8Array(){}\r\n\r\n/**\r\n * should id do boule?\r\n * @return\r\n */\r\n\tpublic final native int length()/*-{\r\n return this.length;\r\n }-*/;\r\n\t\r\n\tpublic final native int get(int index)/*-{\r\n return this[index];\r\n }-*/;\r\n\...
import com.akjava.gwt.html5.client.file.Uint8Array; import com.akjava.gwt.html5.client.media.AudioContext.DecodeAudioListener; import com.akjava.gwt.html5.client.media.AudioContext.DecodeErrorListener; import com.akjava.gwt.html5.client.media.AudioProcessingEvent; import com.akjava.gwt.html5.client.media.OfflineAud...
package com.akjava.gwt.html5test.client; /** * * TODO after chrome34 there are ScriptProcessorNode has bugs * @author aki * */ public class MediaTest extends VerticalPanel{ int index=0; public MediaTest(){ super(); add(new Label("offline")); loadWav("test.wav",new LoadWavListener() { @Overr...
public void onAudioProcess(AudioProcessingEvent event) {
3
deephacks/westty
westty-protobuf/src/test/java/org/deephacks/westty/protobuf/ProtobufTest.java
[ "public static final class AsyncCreateRequest extends\n com.google.protobuf.GeneratedMessage\n implements AsyncCreateRequestOrBuilder {\n // Use AsyncCreateRequest.newBuilder() to construct.\n private AsyncCreateRequest(Builder builder) {\n super(builder);\n }\n private AsyncCreateRequest(boolean noIni...
import com.google.common.base.Optional; import org.deephacks.westty.protobuf.CreateMessages.AsyncCreateRequest; import org.deephacks.westty.protobuf.CreateMessages.CreateExceptionRequest; import org.deephacks.westty.protobuf.CreateMessages.CreateRequest; import org.deephacks.westty.protobuf.CreateMessages.CreateRespons...
package org.deephacks.westty.protobuf; @RunWith(WesttyJUnit4Runner.class) public class ProtobufTest { @Inject /** make sure that we can use injection for the client */ private ProtobufClient client; /** the id of the channel used by the tests */ private int channelId; /** * Client co...
CreateRequest req = CreateRequest.newBuilder()
2
nikacotAndroid/Weather-Guru-MVP
app/src/commonTest/java/mk/petrovski/weathergurumvp/TestModels.java
[ "@Entity(nameInDb = \"city\") public class CityDetailsModel {\n\n @Id(autoincrement = true) private Long id;\n\n private String areaName;\n private String country;\n private String latitude;\n private String longitude;\n private String population;\n private String region;\n private String weatherUrl;\n pri...
import java.util.ArrayList; import java.util.List; import mk.petrovski.weathergurumvp.data.local.db.CityDetailsModel; import mk.petrovski.weathergurumvp.data.remote.model.location_models.LocationModel; import mk.petrovski.weathergurumvp.data.remote.model.location_models.ResultModel; import mk.petrovski.weathergurumvp.d...
package mk.petrovski.weathergurumvp; /** * Created by Nikola Petrovski on 3/31/2017. */ public class TestModels { public static WeatherResponseModel getWeatherResponseModel(int weatherListSize) { List<WeatherModel> list = new ArrayList<>(); for (int i = 0; i < weatherListSize; i++) { list.add(newW...
DataModel dataModel = new DataModel();
4
jagrosh/MusicBot
src/main/java/com/jagrosh/jmusicbot/audio/AudioHandler.java
[ "public class JMusicBot \n{\n public final static String PLAY_EMOJI = \"\\u25B6\"; // ▶\n public final static String PAUSE_EMOJI = \"\\u23F8\"; // ⏸\n public final static String STOP_EMOJI = \"\\u23F9\"; // ⏹\n public final static Permission[] RECOMMENDED_PERMS = {Permission.MESSAGE_READ, Permission.M...
import com.jagrosh.jmusicbot.JMusicBot; import com.jagrosh.jmusicbot.playlist.PlaylistLoader.Playlist; import com.jagrosh.jmusicbot.settings.RepeatMode; import com.sedmelluq.discord.lavaplayer.player.AudioPlayer; import com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter; import com.sedmelluq.discord.lavapl...
return -1; } else return queue.add(qtrack); } public FairQueue<QueuedTrack> getQueue() { return queue; } public void stopAndClear() { queue.clear(); defaultQueue.clear(); audioPlayer.stopTrack(); //current ...
mb.append(FormatUtil.filter(manager.getBot().getConfig().getSuccess()+" **Now Playing in "+guild.getSelfMember().getVoiceState().getChannel().getAsMention()+"...**"));
5
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/service/impl/CategoryServiceImpl.java
[ "public abstract class BaseJPAServiceImpl<T extends Entity, ID extends Serializable> implements BaseService<T, ID> {\n protected BaseJPARepository<T, ID> baseJpaRepository;\n protected Class<T> entityClass;\n\n public T insert(T object) throws Exception {\n return baseJpaRepository.insert(object);\n...
import yourwebproject2.framework.data.BaseJPAServiceImpl; import yourwebproject2.framework.exception.NotFoundException; import yourwebproject2.model.entity.Category; import yourwebproject2.model.repository.CategoryRepository; import yourwebproject2.service.CategoryService; import org.slf4j.Logger; import org.slf4j.Logg...
package yourwebproject2.service.impl; /** * Created by Y.Kamesh on 8/2/2015. */ @Service @Transactional
public class CategoryServiceImpl extends BaseJPAServiceImpl<Category, Long> implements CategoryService {
4
tripsta/spring-boot-starter-kit
application/sbsk-web/src/main/java/com/sbsk/web/controllers/ExceptionHandlingAdvisor.java
[ "public class ApiError {\n\n public static final String GENERAL_ERROR_MSG = \"Generic Error\";\n /**\n * Session Has Expired\n */\n public static final ApiError SESSION_HAS_EXPIRED = new ApiError(\"Session Has Expired\", ExceptionType.BIZ_RULE);\n /**\n * Generic Unknown error\n */\n public static fina...
import java.util.ArrayList; import java.util.List; import javax.persistence.RollbackException; import javax.servlet.http.HttpServletRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.H...
package com.sbsk.web.controllers; @ControllerAdvice public class ExceptionHandlingAdvisor { private static final Logger logger = LoggerFactory.getLogger(ExceptionHandlingAdvisor.class); private static final String MALFORMED_DATA = "Could not read JSON. Request contains malformed data"; public static ApiErr...
@ExceptionHandler(SessionNotFoundException.class)
7
wso2-extensions/identity-outbound-auth-samlsso
components/org.wso2.carbon.identity.application.authenticator.samlsso/src/main/java/org/wso2/carbon/identity/application/authenticator/samlsso/logout/validators/LogoutRequestValidator.java
[ "public class SAMLMessageContext<T1 extends Serializable, T2 extends Serializable> extends IdentityMessageContext {\n\n private String acsUrl;\n private String response;\n private String sessionID;\n private String idpSessionID;\n private String tenantDomain;\n private Boolean validStatus;\n pr...
import java.util.List; import java.util.function.Consumer; import static org.wso2.carbon.identity.application.authenticator.samlsso.util.SSOConstants.ISSUER_FORMAT; import static org.wso2.carbon.identity.application.common.util.IdentityApplicationConstants.Authenticator. SAML2SSO.IS_LOGOUT_REQ_SIGNED; import or...
/* * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
SSOConstants.StatusCodes.VERSION_MISMATCH, notification);
4
sgtcaze/NametagEdit
src/main/java/com/nametagedit/plugin/NametagCommand.java
[ "@Data\n@AllArgsConstructor\npublic class GroupData implements INametag {\n\n private String groupName;\n private String prefix;\n private String suffix;\n private String permission;\n private Permission bukkitPermission;\n private int sortPriority;\n\n public GroupData() {\n\n }\n\n publ...
import com.nametagedit.plugin.api.data.GroupData; import com.nametagedit.plugin.api.events.NametagEvent; import com.nametagedit.plugin.converter.Converter; import com.nametagedit.plugin.converter.ConverterTask; import com.nametagedit.plugin.utils.Utils; import lombok.AllArgsConstructor; import org.bukkit.Bukkit; import...
cmdReload(sender); break; case "convert": cmdConvert(sender, args); break; case "debug": handler.toggleDebug(); NametagMessages.DEBUG_TOGGLED.send(sender, handler.debug...
new ConverterTask(!destinationIsSQL, sender, handler.getPlugin()).runTaskAsynchronously(handler.getPlugin());
3
perrywang/LiteWorkflow
src/main/java/toolbox/common/workflow/service/ExecutionServiceImpl.java
[ "public interface ExecutionContext extends Context {\n \n ActiveRecord getActiveRecord();\n \n ExecutionContext getParentContext();\n \n ScriptEngine getScriptEngine();\n \n Execution getExecution();\n \n void setExecution(Execution execution);\n \n boolean evaluateCondition(Stri...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Service; import toolbox.common.workflow.core.ExecutionContext; import toolbox.common.workflow.entity.Execution; import toolbox.common.workflow.entity.Phase; ...
package toolbox.common.workflow.service; @Service public class ExecutionServiceImpl implements ExecutionService{ @Autowired private ApplicationEventPublisher eventPublisher; @Autowired private ExecutionRepository executionRepository; @Override public Execution startWorkflow(Workflo...
TransitionStartingEvent event = new TransitionStartingEvent(context, transition.getFrom(), transition.getTo());
5
ZhangFly/WTFSocket_Server_JAVA
src/wtf/socket/controller/impl/WTFSocketMsgForwardingControllerImpl.java
[ "public interface WTFSocketController {\n\n /**\n * 控制器优先级\n * 数值越低优先级越高,默认的优先级为 WTFSocketPriority.MEDIUM\n *\n * @return 优先级数值\n */\n default int priority() {\n return WTFSocketPriority.MEDIUM;\n }\n\n /**\n * 是否响应该消息\n *\n * @param msg 消息对象\n *\n * @retur...
import wtf.socket.controller.WTFSocketController; import wtf.socket.exception.WTFSocketException; import wtf.socket.protocol.WTFSocketMsg; import wtf.socket.routing.item.WTFSocketRoutingItem; import wtf.socket.util.WTFSocketPriority; import java.util.List;
package wtf.socket.controller.impl; /** * 消息转发控制器 * <p> * Created by zfly on 2017/4/29. */ public enum WTFSocketMsgForwardingControllerImpl implements WTFSocketController { INSTANCE; @Override public int priority() { return WTFSocketPriority.LOWEST; } @Override public boolean i...
public boolean work(WTFSocketRoutingItem source, WTFSocketMsg request, List<WTFSocketMsg> responses) throws WTFSocketException {
3
ceaseless-prayer/CeaselessAndroid
app/src/main/java/org/theotech/ceaselessandroid/activity/SearchResultsActivity.java
[ "public interface NoteManager {\n\n List<NotePOJO> getNotes();\n\n void addNote(String title, String text, List<PersonPOJO> personPOJOs);\n\n void editNote(String noteId, String title, String text, List<PersonPOJO> personPOJOs);\n\n void removeNote(String noteId);\n\n NotePOJO getNote(String noteId);...
import android.app.ListActivity; import android.app.SearchManager; import android.content.Context; import android.content.Intent; import android.os.Bundle; import androidx.appcompat.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Adapter...
package org.theotech.ceaselessandroid.activity; /** * Created by chrislim on 1/14/16. */ public class SearchResultsActivity extends ListActivity { private static final String TAG = SearchResultsActivity.class.getSimpleName(); PersonManager personManager;
NoteManager noteManager;
0
timwhit/lego
product-service-impl/src/main/java/com/whitney/product/service/ProductServiceImpl.java
[ "public class MessageQueue {\n public static final String SALE_CREATED = \"saleCreated\";\n}", "@Service\npublic class MapperUtils extends ModelMapper {\n public MapperUtils() {\n this.getConfiguration().setFieldMatchingEnabled(true).setFieldAccessLevel(org.modelmapper.config.Configuration.AccessLeve...
import com.fasterxml.jackson.databind.ObjectMapper; import com.whitney.common.messaging.MessageQueue; import com.whitney.common.util.MapperUtils; import com.whitney.product.data.dao.ProductDAO; import com.whitney.product.data.dto.ProductDTO; import com.whitney.product.domain.Product; import com.whitney.sales.web.vo.Sal...
package com.whitney.product.service; @Validated @Transactional @Service public class ProductServiceImpl implements ProductService { private static final Logger LOG = LoggerFactory.getLogger(ProductServiceImpl.class); @Autowired private ProductDAO productDAO; @Autowired private MapperUtils mappe...
SaleVO sale;
5
CyclopsMC/EverlastingAbilities
src/main/java/org/cyclops/everlastingabilities/ability/AbilityHelpers.java
[ "public class GeneralConfig extends DummyConfig {\n\n @ConfigurableProperty(category = \"core\", comment = \"Set 'true' to enable development debug mode. This will result in a lower performance!\", requiresMcRestart = true)\n public static boolean debug = false;\n\n @ConfigurableProperty(category = \"core\...
import com.google.common.collect.Iterables; import com.google.common.collect.Sets; import lombok.NonNull; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.item.Rarity; import net.minecraft.world.World; impor...
public static Ability addPlayerAbility(PlayerEntity player, Ability ability, boolean doAdd, boolean modifyXp) { return player.getCapability(MutableAbilityStoreConfig.CAPABILITY) .map(abilityStore -> { int oldLevel = abilityStore.hasAbilityType(ability.getAbilityType()) ...
abilityType -> Optional.of(ItemAbilityTotem.getTotem(new Ability(abilityType, 1))));
7
leelit/STUer-client
app/src/main/java/com/leelit/stuer/module_baseinfo/carpool/presenter/MyCarpoolPresenter.java
[ "public class BaseInfo {\n\n int id;\n String name;\n String tel;\n String shortTel;\n String wechat;\n String date;\n String time;\n String temporaryCount;\n String flag;\n String imei;\n String uniquecode;\n\n @Override\n public String toString() {\n return \"Carpooli...
import com.leelit.stuer.bean.BaseInfo; import com.leelit.stuer.bean.CarpoolingInfo; import com.leelit.stuer.base_presenter.IPresenter; import com.leelit.stuer.base_presenter.IMyBaseInfoPresenter; import com.leelit.stuer.base_view.viewinterface.IMyBaseInfoView; import com.leelit.stuer.module_baseinfo.carpool.model.Carpo...
package com.leelit.stuer.module_baseinfo.carpool.presenter; /** * Created by Leelit on 2016/3/9. */ public class MyCarpoolPresenter implements IMyBaseInfoPresenter,IPresenter { // Model此处无法抽象,因为接口不同; // Retrofit使用Gson进行字符串解析,并且RxJava#Observable<T>不能使用通配符,所以Gson从String-Object时必须指定确切类型,如果指定父类,则会丢失信息。 /...
private IMyBaseInfoView mView;
4
tgobbens/fluffybalance
core/src/com/balanceball/enity/PointEntity.java
[ "public class PhysicsComponent implements Component {\n public Body body;\n}", "public class PositionComponent implements Component {\n public Vector2 position = new Vector2();\n}", "public class RotationComponent implements Component {\n public float degree;\n}", "public class SizeComponent implemen...
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.physics.box2d.BodyDef; import com.badlogic.gdx.physics.box2d.CircleShape; import com.badlogic.g...
package com.balanceball.enity; /** * Created by tijs on 16/07/2017. */ public class PointEntity extends Entity { final static float RADIUS = 12.f; private float mAnimationTime; private boolean mIsPointLeft = true; private boolean mIsAvailable = true; public PointEntity(boolean isPointLeft, V...
addComponent(new VisibleComponent());
5
cbartosiak/bson-codecs-jsr310
src/main/java/io/github/cbartosiak/bson/codecs/jsr310/offsetdatetime/OffsetDateTimeAsDocumentCodec.java
[ "public static <Value> Value getFieldValue(\n Document document,\n Object key,\n Class<Value> clazz) {\n\n try {\n Value value = document.get(key, clazz);\n if (value == null) {\n throw new BsonInvalidOperationException(format(\n \"The value of the...
import static io.github.cbartosiak.bson.codecs.jsr310.internal.CodecsUtil.getFieldValue; import static io.github.cbartosiak.bson.codecs.jsr310.internal.CodecsUtil.readDocument; import static io.github.cbartosiak.bson.codecs.jsr310.internal.CodecsUtil.translateDecodeExceptions; import static java.time.OffsetDateTime.of;...
/* * Copyright 2018 Cezary Bartosiak * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
new LocalDateTimeAsDocumentCodec(),
3
fabioz/eclipse.spellchecker
src/eclipse/spellchecker/AddWordProposal.java
[ "public interface ISpellCheckEngine {\n\n\t/**\n\t * Returns a spell checker configured with the global\n\t * dictionaries and the locale dictionary that correspond to the current\n\t * {@linkplain PreferenceConstants#SPELLING_LOCALE locale preference}.\n\t * <p>\n\t * <strong>Note:</strong> Changes to the spelling...
import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.MessageDialogWithToggle; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext; import org.eclipse.swt.graphics....
/******************************************************************************* * Copyright (c) 2000, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, an...
return IProposalRelevance.ADD_WORD;
3
shopzilla/catalog-api-client
client/src/main/java/com/shopzilla/api/client/brand/AbstractBaseUrlProvider.java
[ "public interface UrlProvider {\n\n public String getProductServiceURL();\n\n public String getTaxonomyServiceURL();\n\n public String getAttributeServiceURL();\n \n public String getClassificationServiceURL();\n\n public String getBrandServiceURL();\n\n public String getMerchantServiceURL();\n...
import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang.BooleanUtils; import org.apache.commons.lang.ObjectUtils; import com.shopzilla.api.client.UrlProvider; import com.shopzilla.api.client.model.Attribute; import com.shopzilla.api.client.model.AttributeValue; import com.s...
parameters.put("publisherId", request.getPublisherId()); parameters.put("placementId", request.getPlacementId()); parameters.put("categoryId", request.getCategoryId()); parameters.put("keyword", request.getKeyword()); parameters.put("start", request.getStart()); parameter...
public Map<String, ?> makeClassificationParameterMap(ClassificationRequest request) {
5
tedgueniche/IPredict
src/ca/ipredict/predictor/CPT/CPT/CPTPredictor.java
[ "public class Item implements Comparable<Item> {\n\n\tpublic Integer val;\n\t\n\tpublic Item(Integer value) {\n\t\tval = value;\n\t}\n\t\n\t@Override\n\tpublic Item clone() {\n\t\treturn new Item(val);\n\t}\n\t\n\tpublic Item() {\n\t\tval = -1;\n\t}\n\t\t\n\tpublic String toString() {\n\t\treturn val.toString();\n\...
import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import ca.ipredict.database.Item; import ca.ipredict.database.Sequence; import ca.ipredict.helpers.MemoryLogger; impor...
package ca.ipredict.predictor.CPT.CPT; /** * CPT - Compact Prediction Tree * 1st iteration from ADMA 2013, with speed enhancement */ public class CPTPredictor extends Predictor { private PredictionTree Root; //prediction tree private Map<Integer, PredictionTree> LT; //Lookup Table private Map<Integer, Bitv...
private Bitvector getMatchingSequences(Item[] targetArray) {
0
TeamAmeriFrance/Guide-API
src/main/java/amerifrance/guideapi/item/ItemGuideBook.java
[ "@Mod(modid = GuideMod.ID, name = GuideMod.NAME, version = GuideMod.VERSION)\npublic class GuideMod {\n\n public static final String NAME = \"Guide-API\";\n public static final String ID = \"guideapi\";\n public static final String CHANNEL = \"GuideAPI\";\n public static final String VERSION = \"@VERSIO...
import amerifrance.guideapi.GuideMod; import amerifrance.guideapi.api.BookEvent; import amerifrance.guideapi.api.GuideAPI; import amerifrance.guideapi.api.IGuideItem; import amerifrance.guideapi.api.IGuideLinked; import amerifrance.guideapi.api.impl.Book; import amerifrance.guideapi.api.impl.abstraction.CategoryAbstrac...
package amerifrance.guideapi.item; public class ItemGuideBook extends Item implements IGuideItem { @Nonnull private final Book book; public ItemGuideBook(@Nonnull Book book) { this.book = book; setMaxStackSize(1); setCreativeTab(book.getCreativeTab()); setUnlocalizedNam...
tooltip.add(TextHelper.localizeEffect(book.getAuthor()));
7
sorinMD/MCTS
src/main/java/mcts/tree/selection/UCT.java
[ "public interface Game {\n\n\t/**\n\t * @return a clone of the game state\n\t */\n\tpublic int[] getState();\n\n\tpublic int getWinner();\n\n\tpublic boolean isTerminal();\n\n\tpublic int getCurrentPlayer();\n\n\t/**\n\t * Updates the state description based on the chosen action\n\t * \n\t * @param a\n\t * ...
import java.util.ArrayList; import java.util.Collections; import java.util.concurrent.ThreadLocalRandom; import mcts.game.Game; import mcts.game.GameFactory; import mcts.tree.Tree; import mcts.tree.node.StandardNode; import mcts.tree.node.Key; import mcts.tree.node.TreeNode; import mcts.utils.Selection; import mcts.uti...
package mcts.tree.selection; /** * UCT selection policy with afterstates * * @author sorinMD * */ public class UCT extends SelectionPolicy{ public UCT() {} /** * Select node based on the best UCT value. * Ties are broken randomly. * * @param node * @param tree * @return */
protected Selection selectChild(StandardNode node, Tree tree, GameFactory factory, Game obsGame){
3
badvision/jace
src/main/java/jace/cheat/Cheats.java
[ "@Stateful\r\npublic class MOS65C02 extends CPU {\r\n private static final Logger LOG = Logger.getLogger(MOS65C02.class.getName());\r\n\r\n public boolean readAddressTriggersEvent = true;\r\n static int RESET_VECTOR = 0x00FFFC;\r\n static int INT_VECTOR = 0x00FFFE;\r\n @Stateful\r\n public int A =...
import jace.apple2e.MOS65C02; import jace.config.InvokableAction; import jace.core.Computer; import jace.core.Device; import jace.core.RAMEvent; import jace.core.RAMListener; import java.util.HashSet; import java.util.Set;
/* * Copyright (C) 2012 Brendan Robert (BLuRry) brendan.robert@gmail.com. * * This library 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 2.1 of the License, or (at your option) ...
return addCheat(RAMEvent.TYPE.READ, (e) -> e.setNewValue(noOperation), address, addressEnd);
3
twilmes/sql-gremlin
src/main/java/org/twilmes/sql/gremlin/adapter/converter/ast/nodes/operator/aggregate/GremlinSqlAggFunction.java
[ "@Getter\npublic class SqlMetadata {\n private static final Logger LOGGER = LoggerFactory.getLogger(SqlMetadata.class);\n private final GraphTraversalSource g;\n private final GremlinSchema gremlinSchema;\n private final Map<String, String> tableRenameMap = new HashMap<>();\n private final Map<String...
import java.sql.SQLException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.calcite.sql.SqlAggFunction; import org.apache.calcite.sql.SqlKind; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.twilmes.sql.gremlin.adapter.converter.SqlMe...
/* * 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 ...
SqlTraversalEngine
1
Chisel-Team/ConnectedTexturesMod
src/main/java/team/chisel/ctm/client/texture/render/TextureEdgesFull.java
[ "@ParametersAreNonnullByDefault\npublic interface ISubmap {\n\n float getYOffset();\n\n float getXOffset();\n\n float getWidth();\n\n float getHeight();\n\n float getInterpolatedU(TextureAtlasSprite sprite, float u);\n\n float getInterpolatedV(TextureAtlasSprite sprite, float v);\n\n float[] to...
import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; import com.google.common.collect.Lists; import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import team.chisel.ctm.api.texture.ISubm...
package team.chisel.ctm.client.texture.render; public class TextureEdgesFull extends TextureEdges { public TextureEdgesFull(TextureTypeEdges type, TextureInfo info) { super(type, info); } @Override public List<BakedQuad> transformQuad(BakedQuad bq, ITextureContext context, int quadGoal) { ...
CTMLogicEdges ctm = (CTMLogicEdges) ((TextureContextCTM)context).getCTM(bq.getDirection());
3
zzwwws/RxZhihuDaily
app/src/main/java/com/github/zzwwws/rxzhihudaily/presenter/adapter/StoriesAdapter.java
[ "@JsonInclude(JsonInclude.Include.NON_NULL)\n@JsonPropertyOrder({\n \"date\",\n \"stories\",\n \"top_stories\"\n})\npublic class Feed {\n\n @JsonProperty(\"date\")\n private String date;\n @JsonProperty(\"stories\")\n private List<Story> stories = new ArrayList<Story>();\n @JsonProperty(\"to...
import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.bumptech.glide.Glide; import com.bum...
package com.github.zzwwws.rxzhihudaily.presenter.adapter; /** * Created by zzwwws on 2016/2/18. */ public class StoriesAdapter extends BaseRecyclerAdapter<RecyclerView.ViewHolder> { public static final int TYPE_HEADER = 0x01; public static final int TYPE_LIST_ITEM = 0x02; private Context context; ...
pager.setOnPageChangeListener(new ViewPagerCompact.SimpleOnPageChangeListener() {
4
statefulj/statefulj
statefulj-framework/statefulj-framework-tests/src/test/java/org/statefulj/framework/tests/ddd/DomainEntityTest.java
[ "public interface ReferenceFactory {\n\t\n\tString getBinderId(String key);\n\n\tString getFinderId();\n\t\n\tString getFSMHarnessId(); \n\n\tString getPersisterId(); \n\n\tString getFactoryId();\n\n\tString getStatefulFSMId();\n\t\n\tString getFSMId();\n\t\n\tString getStateId(String state);\n\t\n\tString getTrans...
import org.statefulj.framework.core.model.impl.ReferenceFactoryImpl; import org.statefulj.fsm.TooBusyException; import static org.junit.Assert.*; import static org.mockito.Mockito.*; import static org.statefulj.framework.tests.utils.ReflectionUtils.*; import java.lang.reflect.InvocationTargetException; import javax.ann...
/*** * * Copyright 2014 Andrew Hall * * 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 void testDomainEntityFSM() throws TooBusyException, SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
3
neoremind/navi-pbrpc
src/main/java/com/baidu/beidou/navi/pbrpc/client/BlockingIOPooledPbrpcClient.java
[ "public class CallFuture<T> implements Future<T>, Callback<T> {\r\n\r\n /**\r\n * 内部回调用的栅栏\r\n */\r\n private final CountDownLatch latch = new CountDownLatch(1);\r\n\r\n /**\r\n * 调用返回结果\r\n */\r\n private T result = null;\r\n\r\n /**\r\n * 调用错误信息\r\n */\r\n private Throwab...
import io.netty.channel.ChannelFuture; import org.apache.commons.pool.impl.GenericObjectPool; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.baidu.beidou.navi.pbrpc.client.callback.CallFuture; import com.baidu.beidou.navi.pbrpc.codec.Codec; import com.baidu.beidou.navi.pbrpc.codec.impl.ProtobufCode...
package com.baidu.beidou.navi.pbrpc.client; /** * ClassName: BlockingIOPooledPbrpcClient <br/> * Function: 使用连接池技术的blocking io客户端 * * @author Zhang Xu */ public class BlockingIOPooledPbrpcClient implements PbrpcClient { private static final Logger LOG = LoggerFactory.getLogger(BlockingIOPooledPbrpcClient...
private Codec codec = new ProtobufCodec();
1
madcyph3r/AdvancedMaterialDrawer
example/src/main/java/de/madcyph3r/example/example/headItemTypes/HeadItemFiveDontCloseOnChangeActivity.java
[ "public class FragmentInstruction extends Fragment {\n\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n Bundle bundle = this.getArguments();\n String instruction;\n String title;\n if(bundle !=...
import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.Fragment; import com.amulyakhare.textdrawable.TextDrawable; import de.madcyph3r.example.R; import de.madcyph3r.example.example.FragmentDummy; import de.madcyph3r....
package de.madcyph3r.example.example.headItemTypes; public class HeadItemFiveDontCloseOnChangeActivity extends MaterialNavHeadItemActivity { MaterialNavigationDrawer drawer = null; @Override protected boolean finishActivityOnNewIntent() { return false; } @Override protected int ge...
menu.add(new MaterialItemSectionFragment(this, "Instruction", fragmentInstruction, "Don't Close Drawer On HeadItem Change (Five Items)"));
4
ToroCraft/NemesisSystem
src/main/java/net/torocraft/nemesissystem/util/NemesisActions.java
[ "public class NemesisConfig {\n\n\tprivate static final String CATEGORY = \"NemesisSystem Settings\";\n\tprivate static Configuration config;\n\tprivate static final String[] DEFAULT_MOB_LIST = {\n\t\t\t\"minecraft:zombie\",\n\t\t\t\"minecraft:zombie_pigman\",\n\t\t\t\"minecraft:zombie_villager\",\n\t\t\t\"minecraf...
import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityEnderP...
package net.torocraft.nemesissystem.util; public class NemesisActions { public static void promote(World world, NemesisEntry nemesis) { if (nemesis.getLevel() >= 10) { return; } nemesis.setLevel(nemesis.getLevel() + 1); NemesisUtil.enchantEquipment(nemesis); if (shouldGainAdditionalTrait(nemesis)) { ...
public static void promoteRandomNemesis(EntityCreature entity, INemesisRegistry registry, List<NemesisEntry> nemeses) {
5
albertogiunta/justintrain-client-android
app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/utils/Ads.java
[ "public class ViewsUtils {\n\n public static final ButterKnife.Action<View> VISIBLE = (view, index) -> view.setVisibility(View.VISIBLE);\n\n public static final ButterKnife.Action<View> GONE = (view, index) -> view.setVisibility(View.GONE);\n\n public static final ButterKnife.Action<View> INVISIBLE = (view...
import com.google.android.gms.ads.AdListener; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdView; import com.google.android.gms.ads.MobileAds; import com.google.android.gms.ads.NativeExpressAdView; import android.content.Context; import android.support.design.widget.CoordinatorLayout;...
package com.jaus.albertogiunta.justintrain_oraritreni.utils; public class Ads { public static int BOTTOM_MARGIN_WITH_ADS = 60; public static int BOTTOM_MARGIN_WITHOUT_ADS = 16; public static int BOTTOM_MARGIN_ACTUAL = 16; public static boolean ignoreBeingProAndShowAds = BuildConfig.DEBU...
analyticsHelper.logScreenEvent(screenName, AD_FAILED_TO_LOAD);
5
andreynovikov/Androzic
src/main/java/com/androzic/route/RouteFileList.java
[ "public class Androzic extends BaseApplication implements OnSharedPreferenceChangeListener, XmlRenderThemeMenuCallback\n{\n\tprivate static final String TAG = \"Androzic\";\n\n\tpublic static final String BROADCAST_WAYPOINT_ADDED = \"com.androzic.waypointAdded\";\n\tpublic static final String BROADCAST_WAYPOINT_REM...
import org.xml.sax.SAXException; import com.androzic.Androzic; import com.androzic.R; import com.androzic.data.Route; import com.androzic.ui.FileListDialog; import com.androzic.util.GpxFiles; import com.androzic.util.KmlFiles; import com.androzic.util.OziExplorerFiles; import com.androzic.util.RouteFilenameFilter; impo...
/* * Androzic - android navigation client that uses OziExplorer maps (ozf2, ozfx3). * Copyright (C) 2010-2014 Andrey Novikov <http://andreynovikov.info/> * * This file is part of Androzic application. * * Androzic is free software: you can redistribute it and/or modify * it under the terms of the GNU General Pu...
routes = KmlFiles.loadRoutesFromFile(file);
3
Nantes1900/Nantes-1900
src/fr/nantes1900/models/islets/steps/BuildingsIsletStep6.java
[ "public class Edge {\r\n\r\n /**\r\n * Array of two points describing the edge.\r\n */\r\n private final Point[] points = new Point[2];\r\n\r\n /**\r\n * List of triangles containing this edge. The can be two triangles maximum.\r\n */\r\n private List<Triangle> triangles = new ArrayList<...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import javax.swing.filechooser.FileSystemView; import javax.swing.tree.DefaultMutableTreeNode; import fr.nantes1900.models.basis.Edge; import fr.nantes1900.models.basis.Mesh; import fr.nante...
package fr.nantes1900.models.islets.steps; /** * Implements a step of the process. This step is after the determination of the * neighbours and before the sort of the neighbours. * @author Daniel Lefèvre */ public class BuildingsIsletStep6 extends AbstractBuildingsIsletStep implements Writabl...
} catch (ImpossibleProjectionException e) {
4
MewX/light-novel-library_Wenku8_Android
studio-android/LightNovelLibrary/app/src/main/java/org/mewx/wenku8/fragment/NovelItemListFragment.java
[ "public class NovelInfoActivity extends BaseMaterialActivity {\n\n // constant\n private final String FromLocal = \"fav\";\n\n // private vars\n private int aid = 1;\n private String from = \"\", title = \"\";\n private boolean isLoading = true;\n private RelativeLayout rlMask = null; // mask l...
import android.content.ContentValues; import android.content.Intent; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.afollestad.materialdialogs.MaterialDialog; import com.afollestad.materialdialogs.Theme;...
package org.mewx.wenku8.fragment; public class NovelItemListFragment extends Fragment implements MyItemClickListener, MyItemLongClickListener { // type def private final String searchType = "search"; private String type, key; private boolean isLoading = false; // judge network thread continue ...
private NovelItemAdapterUpdate mAdapter = null;
1
edsilfer/marvel-characters
user-intf/src/test/java/br/com/hole19/marvel/controller/TestActivityHomepage.java
[ "public class CharacterUIService {\n\n private static final String TAG = \"CharacterUIService\";\n\n private AdapterCharacter mAdapter;\n private AdapterCharacter mSearchAdapter;\n private ActivityTemplate mHomepageActivity;\n\n @Inject\n NotificationManager mNotificationManager;\n @Inject\n ...
import android.support.v7.widget.Toolbar; import android.view.ViewPropertyAnimator; import android.widget.LinearLayout; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner; import javax...
package br.com.hole19.marvel.controller; /** * Created by edgar on 09-May-16. */ @RunWith(MockitoJUnitRunner.class) public class TestActivityHomepage { @Mock CharacterUIService characterUIService; @Mock PermissionsUtil mPermissionsManager; @Mock NotificationManager mNotificationUtil; ...
ActivityHomepage activityHomepage = Mockito.mock(ActivityHomepage.class);
5
fralalonde/iostream
src/main/java/ca/rbon/iostream/channel/part/ByteIn.java
[ "public class BufferedInputOf<T> extends BufferedInputStream implements WrapperOf<T> {\n\n final Resource<T> closer;\n\n /**\n * <p>\n * Constructor for BufferedInputOf.\n * </p>\n *\n * @param cl a {@link ca.rbon.iostream.resource.Resource} object.\n * @param is a {@link java.io.Input...
import java.io.IOException; import java.nio.charset.Charset; import ca.rbon.iostream.wrap.BufferedInputOf; import ca.rbon.iostream.wrap.BufferedReaderOf; import ca.rbon.iostream.wrap.DataInputOf; import ca.rbon.iostream.wrap.InputStreamOf; import ca.rbon.iostream.wrap.ObjectInputOf; import ca.rbon.iostream.wrap.ReaderO...
package ca.rbon.iostream.channel.part; public interface ByteIn<T> { InputStreamOf<T> inputStream() throws IOException; BufferedInputOf<T> bufferedInputStream(int bufferSize) throws IOException; BufferedInputOf<T> bufferedInputStream() throws IOException;
ZipInputOf<T> zipInputStream(Charset charset, int bufferSize) throws IOException;
6
Airpy/KeywordDrivenAutoTest
src/main/java/com/keyword/automation/customer/PageKeyword.java
[ "public class BrowserKeyword {\n // 不允许被初始化\n private BrowserKeyword() {\n\n }\n\n /**\n * 使用默认浏览器打开指定url\n *\n * @param requestUrl 请求url地址\n */\n public static void browserOpen(String requestUrl) {\n BrowserType bType = BrowserType.valueOf(Constants.DEFAULT_BROWSER);\n ...
import com.keyword.automation.action.BrowserKeyword; import com.keyword.automation.action.ElementKeyword; import com.keyword.automation.base.browser.Browsers; import com.keyword.automation.base.utils.LogUtils; import com.keyword.automation.bean.BillCell; import com.keyword.automation.bean.BillFooter; import org.openqa....
())); } else if (targetField.equalsIgnoreCase("costTypeName")) { ElementKeyword.clickElement(byCell); PageKeyword.clickSelectOptions(getCellElement(targetRow, targetField), billCell.getCostTypeName()); } else if (targetField.equalsIgnoreCase("expenditureAmount...
LogUtils.info("商品类别[" + targetMsg + "]不存在.");
3
6thsolution/ApexNLP
apex/src/main/java/com/sixthsolution/apex/nlp/event/StandardDateExtractor.java
[ "public enum Tag {\n NONE(97),\n NUMBER(98),\n PREPOSITION(99),\n RELATIVE_PREPOSITION(100),\n RELATIVE_SUFFIX(101),\n //LOCATION\n LOCATION_PREFIX(102),\n LOCATION_SUFFIX(103),\n LOCATION_NAME(137),\n //TIME\n TIME_PREFIX(104), //e.g. at, in ,the\n TIME_START_RANG...
import com.sixthsolution.apex.nlp.dict.Tag; import com.sixthsolution.apex.nlp.dict.TagValue; import com.sixthsolution.apex.nlp.dict.Tags; import com.sixthsolution.apex.nlp.ner.ChunkedPart; import com.sixthsolution.apex.nlp.ner.Label; import com.sixthsolution.apex.nlp.tagger.TaggedWord; import com.sixthsolution.apex.nlp...
month = secondNumber; dayOfMonth = firstNumber; } else { month = firstNumber; dayOfMonth = secondNumber; } } } date = LocalDate.of(year, month, dayOfMonth); return date; ...
private Pair<LocalDate, LocalDate> getLimitedDate(LocalDateTime source, ChunkedPart chunkedPart) {
7
hoijui/JavaOSC
modules/core/src/main/java/com/illposed/osc/transport/channel/OSCDatagramChannel.java
[ "public class BufferBytesReceiver implements BytesReceiver {\n\n\tprivate final ByteBuffer buffer;\n\n\tpublic BufferBytesReceiver(final ByteBuffer buffer) {\n\t\tthis.buffer = buffer;\n\t}\n\n\t@Override\n\tpublic BytesReceiver put(final byte data) {\n\n\t\tbuffer.put(data);\n\t\treturn this;\n\t}\n\n\t@Override\n...
import com.illposed.osc.BufferBytesReceiver; import com.illposed.osc.OSCPacket; import com.illposed.osc.OSCParseException; import com.illposed.osc.OSCParser; import com.illposed.osc.OSCSerializeException; import com.illposed.osc.OSCSerializer; import com.illposed.osc.OSCSerializerAndParserBuilder; import java.io.IOExce...
// SPDX-FileCopyrightText: 2015-2017 C. Ramakrishnan / Illposed Software // SPDX-FileCopyrightText: 2021 Robin Vobruba <hoijui.quaero@gmail.com> // // SPDX-License-Identifier: BSD-3-Clause package com.illposed.osc.transport.channel; /** * This class handles just the basic sending and receiving of OSC data * over ...
public void send(final ByteBuffer buffer, final OSCPacket packet, final SocketAddress remoteAddress) throws IOException, OSCSerializeException {
4
4FunApp/4Fun
client/FourFun/app/src/main/java/com/joker/fourfun/presenter/SplashPresenter.java
[ "public abstract class BaseMvpPresenter<T extends BaseView> implements BasePresenter<T> {\n public T mView;\n public CompositeDisposable mDisposable;\n\n public void attach(T mView) {\n this.mView = mView;\n mDisposable = new CompositeDisposable();\n }\n\n public void detach() {\n ...
import com.joker.fourfun.base.BaseMvpPresenter; import com.joker.fourfun.model.Picture; import com.joker.fourfun.model.Zhihu; import com.joker.fourfun.net.HttpResultFunc; import com.joker.fourfun.net.UserService; import com.joker.fourfun.presenter.contract.SplashContract; import com.joker.fourfun.utils.RetrofitUtil; im...
package com.joker.fourfun.presenter; /** * Created by joker on 2016/11/27. */ public class SplashPresenter extends BaseMvpPresenter<SplashContract.View> implements SplashContract .Presenter { private UserService mService; @Inject SplashPresenter(RetrofitUtil retrofitUtil) { mServic...
.map(new HttpResultFunc<List<Picture>>())
1
garretyoder/Cluttr
app/src/main/java/org/polaric/cluttr/activities/MainActivity.java
[ "public class Cluttr extends Application {\n private static Cluttr cluttr;\n private SharedPreferences prefs;\n private boolean newRelease=false;\n private Thread.UncaughtExceptionHandler defaultUEH;\n\n public Cluttr() {\n defaultUEH = Thread.getDefaultUncaughtExceptionHandler();\n Thr...
import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.annotation.NonNull; import android.support.design.widget.NavigationView; import android.support.v4.app....
package org.polaric.cluttr.activities; public class MainActivity extends ColorfulActivity implements NavigationView.OnNavigationItemSelectedListener, FingerprintDialog.Callback { @BindView(R.id.nav_main) protected NavigationView navMenu; @BindView(R.id.nav_footer) protected NavigationView navFooter; @...
transaction.replace(R.id.main_content,new GrantFragment(),Util.Fragment.FRAGMENT_ALBUM_TAG);
6
okean/alm-rest-api
src/test/java/org/alm/AlmApiStub.java
[ "public class Util\r\n{\r\n public static org.alm.model.Test createTestEntity(String id)\r\n {\r\n org.alm.model.Test test = new org.alm.model.Test();\r\n\r\n test.execStatus(\"No Run\");\r\n test.owner(\"admin\");\r\n test.status(\"Design\");\r\n test.subtypeId(\"MANUAL\");...
import static org.alm.Util.*; import java.io.File; import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.UUID; import javax.ws.rs.Consumes; import javax.ws.rs.CookieParam; import javax.ws.rs.GET; import javax.ws.rs.HeaderParam; import javax.ws.rs.POST; import javax.ws.rs.PU...
package org.alm; @Path("/qcbin") public class AlmApiStub { private static List<String> cookies = new ArrayList<String>(); public static String authenticationPoint(String host, String port) { return String.format("http://%s:%s/qcbin/authentication-point", host, port); } ...
public Run createRun(Run run)
2
n76/Local-GSM-Backend
app/src/main/java/org/fitchfamily/android/gsmlocation/async/DownloadSpiceRequest.java
[ "public class Config {\n public static final boolean DEBUG = BuildConfig.DEBUG;\n\n // Strings for building URLs\n // Open Cell ID uses:\n // \"http://opencellid.org/downloads/?apiKey=${API_KEY}&filename=cell_towers.csv.gz\"\n // public static final String OCI_URL_FMT = \"http://opencellid.org/downlo...
import android.content.Context; import android.net.wifi.WifiManager; import android.os.PowerManager; import android.text.TextUtils; import android.util.Log; import com.octo.android.robospice.SpiceManager; import com.octo.android.robospice.persistence.DurationInMillis; import com.octo.android.robospice.persistence.excep...
package org.fitchfamily.android.gsmlocation.async; /** * Background tasks gathers data from OpenCellId and/or Mozilla Location * services and produces a new database file in the name specified in the * Config class. We don't actually touch the file being used by * the actual tower lookup. * * If/when the to...
LogUtils.with(context).clearLog();
3
zetbaitsu/CodePolitan
app/src/main/java/id/zelory/codepolitan/data/api/CodePolitanApi.java
[ "public class BenihServiceGenerator\n{\n public static <S> S createService(Class<S> serviceClass, String baseUrl)\n {\n RestAdapter.Builder builder = new RestAdapter.Builder()\n .setLogLevel(RestAdapter.LogLevel.BASIC)\n .setConverter(new GsonConverter(Bson.pluck().getPars...
import id.zelory.benih.network.BenihServiceGenerator; import id.zelory.codepolitan.data.model.Article; import id.zelory.codepolitan.data.model.Category; import id.zelory.codepolitan.data.model.Tag; import id.zelory.codepolitan.data.api.response.ListResponse; import id.zelory.codepolitan.data.api.response.ObjectResponse...
/* * Copyright (c) 2015 Zelory. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
api = BenihServiceGenerator.createService(API.class, API.ENDPOINT);
0
messaginghub/pooled-jms
pooled-jms/src/test/java/org/messaginghub/pooled/jms/JmsPoolTopicPublisherTest.java
[ "public class MockJMSConnection implements Connection, TopicConnection, QueueConnection, AutoCloseable {\n\n private static final Logger LOG = LoggerFactory.getLogger(MockJMSConnection.class);\n\n private final MockJMSConnectionStats stats = new MockJMSConnectionStats();\n private final Map<String, MockJMS...
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import java.util.concurren...
/* * 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 may ...
assertTrue(publisher.getTopicPublisher() instanceof MockJMSTopicPublisher);
4
nerdammer/spash
core/src/main/java/it/nerdammer/spash/shell/command/spi/PwdCommand.java
[ "public abstract class AbstractCommand implements Command {\n\n private CommandTokenizer commandTokenizer;\n\n public AbstractCommand(String commandString) {\n this(commandString, Collections.<String, Boolean>emptyMap());\n }\n\n public AbstractCommand(String commandString, Map<String, Boolean> p...
import it.nerdammer.spash.shell.command.AbstractCommand; import it.nerdammer.spash.shell.command.CommandResult; import it.nerdammer.spash.shell.command.ExecutionContext; import it.nerdammer.spash.shell.common.SpashCollection; import it.nerdammer.spash.shell.common.SpashCollectionListAdapter; import java.util.Collection...
package it.nerdammer.spash.shell.command.spi; /** * A command that returns the current directory. * * @author Nicola Ferraro */ public class PwdCommand extends AbstractCommand { public PwdCommand(String commandString) { super(commandString); } @Override public CommandResult execute(Exec...
SpashCollection<String> content = new SpashCollectionListAdapter<>(Collections.singletonList(ctx.getSession().getWorkingDir()));
4
m4rciosouza/ponto-inteligente-api
src/main/java/com/kazale/pontointeligente/api/controllers/LancamentoController.java
[ "public class LancamentoDto {\n\t\n\tprivate Optional<Long> id = Optional.empty();\n\tprivate String data;\n\tprivate String tipo;\n\tprivate String descricao;\n\tprivate String localizacao;\n\tprivate Long funcionarioId;\n\n\tpublic LancamentoDto() {\n\t}\n\n\tpublic Optional<Long> getId() {\n\t\treturn id;\n\t}\n...
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Optional; import javax.validation.Valid; import org.apache.commons.lang3.EnumUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.bean...
package com.kazale.pontointeligente.api.controllers; @RestController @RequestMapping("/api/lancamentos") @CrossOrigin(origins = "*") public class LancamentoController { private static final Logger log = LoggerFactory.getLogger(LancamentoController.class); private final SimpleDateFormat dateFormat = new SimpleDa...
Optional<Funcionario> funcionario = this.funcionarioService.buscarPorId(lancamentoDto.getFuncionarioId());
1
pedrovgs/Nox
sample/src/main/java/com/github/pedrovgs/nox/sample/MainActivity.java
[ "public class NoxItem {\n\n private final String url;\n private final Integer resourceId;\n private final Integer placeholderId;\n\n public NoxItem(String url) {\n validateUrl(url);\n this.url = url;\n this.resourceId = null;\n this.placeholderId = null;\n }\n\n public NoxItem(int resourceId) {\n ...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.util.Log; import com.github.pedrovgs.nox.NoxItem; import com.github.pedrovgs.nox.NoxView; import com.github.pedrovgs.nox.OnNoxItemClickListener; import com.github.pedrovgs.nox.shape.Shape; import com...
/* * Copyright (C) 2015 Pedro Vicente Gomez Sanchez. * * 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 ...
private NoxView noxView;
1
zh32/TeleportSigns
src/main/java/de/zh32/teleportsigns/BukkitUpdateLoop.java
[ "public interface ConfigurationAdapter {\n\n\tList<SignLayout> loadLayouts();\n\n\tList<GameServer> loadServers();\n\n\tpublic long getUpdateInterval();\n\n\tpublic int getTeleportCooldown();\n\n\tpublic String getDatabasePath();\n\n\tpublic int getUpdatePerTicks();\n\n}", "@Data\n@Builder\n@AllArgsConstructor\np...
import de.zh32.teleportsigns.configuration.ConfigurationAdapter; import de.zh32.teleportsigns.sign.TeleportSign; import de.zh32.teleportsigns.task.Callback; import de.zh32.teleportsigns.task.ServerUpdateTask; import de.zh32.teleportsigns.task.bukkit.BukkitServerUpdateTask; import de.zh32.teleportsigns.task.bukkit.Bukki...
package de.zh32.teleportsigns; public class BukkitUpdateLoop extends UpdateLoop { private final Plugin plugin; private final ConfigurationAdapter configuration; private int bukkitTaskId;
public BukkitUpdateLoop(Plugin plugin, ConfigurationAdapter configuration, List<TeleportSign> teleportSigns, ServerUpdateTask updateTask) {
3
Kroger-Technology/Snow-Globe
src/integration/java/com/kroger/oss/snowGlobe/integration/tests/ReloadTest.java
[ "public class AppServiceCluster {\n\n private final String clusterName;\n private final boolean useHttps;\n private int httpResponseCode = 200;\n private String matchingPaths = \"*\";\n private Map<String, String> responseHeaders = new HashMap<>();\n private int port;\n\n /**\n * The constr...
import com.kroger.oss.snowGlobe.AppServiceCluster; import com.kroger.oss.snowGlobe.NginxRpBuilder; import org.junit.Before; import org.junit.Test; import static com.kroger.oss.snowGlobe.AppServiceCluster.makeHttpsWebService; import static com.kroger.oss.snowGlobe.NginxRpBuilder.runNginxWithUpstreams; import static com....
/* * Snow-Globe * * Copyright 2017 The Kroger Co. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
make(getRequest("https://www.nginx-test.com/login").to(nginxReverseProxy))
4
xwz/iview-android-tv
base/src/main/java/io/github/xwz/base/fragments/CategoryFragment.java
[ "public class Utils {\n\n /*\n * Making sure public utility methods remain static\n */\n private Utils() {\n }\n\n /**\n * Returns the screen/display size\n */\n public static Point getDisplaySize(Context context) {\n WindowManager wm = (WindowManager) context.getSystemService(...
import android.content.Intent; import android.os.Bundle; import android.support.v17.leanback.app.VerticalGridFragment; import android.support.v17.leanback.widget.ArrayObjectAdapter; import android.support.v17.leanback.widget.OnItemViewClickedListener; import android.support.v17.leanback.widget.Presenter; import android...
package io.github.xwz.base.fragments; public abstract class CategoryFragment extends VerticalGridFragment { private static final String TAG = "CategoryFragment"; private static final int FILM_COLUMNS = 10; private static final int SHOW_COLUMNS = 5; private String category; private boolean isFil...
category = getActivity().getIntent().getStringExtra(ContentManagerBase.CONTENT_ID);
4
OpenBEL/cytoscape-plugins
org.openbel.cytoscape.navigator/src/org/openbel/cytoscape/navigator/task/AbstractSearchKamTask.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 java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java...
/* * 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...
if (namespace != null && Utility.isEmpty(identifiers)) {
5
Kaysoro/KaellyBot
src/main/java/commands/config/PrefixCommand.java
[ "public abstract class AbstractCommand implements Command {\n\n private final static Logger LOG = LoggerFactory.getLogger(AbstractCommand.class);\n\n protected String name;\n protected String pattern;\n protected DiscordException badUse;\n private boolean isPublic;\n private boolean isUsableInMP;\...
import commands.model.AbstractCommand; import data.Constants; import data.Guild; import discord4j.core.event.domain.message.MessageCreateEvent; import discord4j.core.object.entity.Message; import discord4j.core.object.entity.User; import enums.Language; import exceptions.AdvancedDiscordException; import exceptions.Basi...
package commands.config; /** * Created by steve on 14/07/2016. */ public class PrefixCommand extends AbstractCommand { private exceptions.DiscordException prefixeOutOfBounds; public PrefixCommand(){ super("prefix","\\s+(.+)"); setUsableInMP(false); prefixeOutOfBounds = new Advance...
public void request(MessageCreateEvent event, Message message, Matcher m, Language lg) {
3
ailab-uniud/distiller-CORE
src/main/java/it/uniud/ailab/dcore/annotation/annotators/LinearEvaluatorAnnotator.java
[ "public class Blackboard {\r\n\r\n /**\r\n * The default document identifier.\r\n */\r\n private static final String DEFAULT_DOCUMENT_ID = \"DocumentRoot\";\r\n\r\n /**\r\n * The full raw text of the document.\r\n */\r\n private String rawText;\r\n\r\n /**\r\n * The root block of ...
import java.util.HashMap; import java.util.Map; import it.uniud.ailab.dcore.Blackboard; import it.uniud.ailab.dcore.persistence.DocumentComponent; import it.uniud.ailab.dcore.annotation.annotations.FeatureAnnotation; import it.uniud.ailab.dcore.annotation.Annotator; import it.uniud.ailab.dcore.persistence.Gram; import ...
/* * Copyright (C) 2015 Artificial Intelligence * Laboratory @ University of Udine. * * 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 2 * of the License, or (at your option...
public void annotate(Blackboard b,DocumentComponent c) {
1
JustBru00/RenamePlugin
src/com/gmail/justbru00/epic/rename/commands/v3/RemoveLoreLine.java
[ "public enum EpicRenameCommands {\r\n\r\n\tRENAME, LORE, EPICRENAME, SETLORELINE, \r\n\tREMOVELORELINE, INSERTLORELINE, GLOW, REMOVEGLOW, ALIGN, EXPORT, IMPORT;\r\n\t\r\n\t\r\n\tpublic static String getStringName(EpicRenameCommands e) {\r\n\t\tswitch (e) {\r\n\t\tcase RENAME: {return \"rename\";}\r\n\t\tcase LORE: ...
import java.util.List; import org.bukkit.Material; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.inventory.meta.ItemMeta; import com.gmail.justbru00.epic.rename.enums.v3.EpicRenameCommands;...
/** * @author Justin "JustBru00" Brubaker * * This is licensed under the MPL Version 2.0. See license info in LICENSE.txt */ package com.gmail.justbru00.epic.rename.commands.v3; public class RemoveLoreLine implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, Com...
if (!Blacklists.checkMaterialBlacklist(RenameUtil.getInHand(player).getType(), player)) {
2
liuling07/QiQuYing
app/src/main/java/com/lling/qiqu/service/impl/MeiTuServiceImpl.java
[ "public class Constants {\n\t\n\tpublic static final boolean DEBUG = false;\n\n\t//SplashActivity\n\tpublic static final String FIRST_USE = \"firstUse\";\n\tpublic static final String IS_RECEIVE_PUSH = \"isReceivePush\";\n\tpublic static final String IS_LOAD_IMG = \"isLoadImg\";\n\t\n\t//http请求超时时间\n\tpublic static...
import java.util.Map; import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.os.Message; import com.lidroid.xutils.HttpUtils; import com.lidroid.xutils.exception.HttpException; import com.lidroid.xutils.http.RequestParams; import com.lidroid.xutils.http.ResponseInfo; import ...
package com.lling.qiqu.service.impl; public class MeiTuServiceImpl implements IMeiTuService { private Context mContext; public MeiTuServiceImpl(Context context) { mContext = context; } @Override public void getMeiTu(final Handler handler, int newOrHotFlag, int offset, int count) { HttpUtils http = ...
http.configTimeout(Constants.REQUEST_TIME_OUT); //设置超时时间
0
cfg4j/cfg4j
cfg4j-core/src/test/java/org/cfg4j/source/metered/MeteredConfigurationSourceTest.java
[ "public interface ConfigurationSource {\n\n /**\n * Get configuration set for a given {@code environment} from this source in a form of {@link Properties}.\n * Provided {@link Environment} will be used to determine which environment to use.\n *\n * @param environment environment to use\n * @return config...
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import stat...
/* * Copyright 2015-2018 Norbert Potocki (norbert.potocki@nort.pl) * * 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 ...
doThrow(new SourceCommunicationException("", null)).when(delegate).init();
1
UKGovLD/ukl-registry-poc
src/main/java/com/epimorphics/registry/webapi/LibReg.java
[ "public class Register extends Description {\n List<RegisterEntryInfo> members;\n List<Resource> delegatedMembers;\n\n StoreAPI store;\n\n public Register(Resource root) {\n super( root );\n }\n\n public Register(Description d) {\n super( d.root );\n }\n\n public Resource getRe...
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authz.Permission; import...
return member; } public RDFNodeWrapper getItem() { return item; } } /** * Run a sparql query, expanding prefixes from the prefix registry, return as an array of variable bindings */ public List<Map<String, RDFNodeWrapper>> query(String query, Objec...
} else if (arg instanceof RegisterItem) {
1
samuil-yanovski/lol-api-library
src/yanovski/lol/api/callbacks/SummonerNamesCallback.java
[ "public class EventBusManager {\n\tprivate static Bus bus;\n\n\tpublic synchronized static Bus getInstance() {\n\t\tif (null == bus) {\n\t\t\tbus = new Bus();\n\t\t}\n\n\t\treturn bus;\n\t}\n\n\tpublic static void post(Object message) {\n\t\tBus instance = getInstance();\n\t\tinstance.post(message);\n\t}\n\n\tpubli...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import retrofit.client.Response; import yanovski.lol.api.messa...
package yanovski.lol.api.callbacks; public class SummonerNamesCallback extends GenericCallback<Response> { public SummonerNamesCallback(String requestId) { super(requestId); } @Override public void success(Response r, Response response) { ResponseNotification<SummonerNames> notification = new SummonerName...
EventBusManager.post(notification);
0
iychoi/libra
src/libra/preprocess/stage1/KmerFilterBuilderMapper.java
[ "public class IntArrayWritable extends BinaryComparable implements WritableComparable<BinaryComparable> {\n\n private static final Log LOG = LogFactory.getLog(IntArrayWritable.class);\n \n private int[] intArray;\n \n private byte[] prevBytes;\n \n public IntArrayWritable() {}\n \n public...
import java.io.IOException; import libra.common.hadoop.io.datatypes.IntArrayWritable; import libra.common.hadoop.io.datatypes.CompressedSequenceWritable; import libra.common.helpers.SequenceHelper; import libra.common.sequence.ReadInfo; import libra.preprocess.common.PreprocessorRoundConfig; import libra.preprocess.com...
/* * Copyright 2016 iychoi. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
private PreprocessorRoundConfig ppConfig;
4
ScreamingHawk/fate-sheets
app/src/main/java/link/standen/michael/fatesheets/adapter/CoreCharacterEditSectionAdapter.java
[ "public class CharacterEditAspectsFragment extends CharacterEditAbstractFragment {\n\n\t@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\t\t\t\t\t Bundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.character_edit_aspects, container, false);\n\t}\n\n\t@Overrid...
import android.content.Context; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import link.standen.michael.fatesheets.R; import link.standen.michael.fatesheets.fragment.CharacterEditAspectsFragment; import link.standen.michael.f...
package link.standen.michael.fatesheets.adapter; /** * A {@link FragmentPagerAdapter} that returns a fragment corresponding to one of the sections. */ public class CoreCharacterEditSectionAdapter extends FragmentPagerAdapter { private final Context context; public CoreCharacterEditSectionAdapter(FragmentManage...
return new CoreCharacterEditStressFragment();
3
xushaomin/apple-deploy
src/main/java/com/appleframework/deploy/web/ProjectController.java
[ "public class Project implements Serializable {\r\n\t\r\n private Integer id;\r\n\r\n private String name;\r\n\r\n private Integer type;\r\n \r\n private Integer env;\r\n \r\n private Integer plus;\r\n\r\n private Integer status;\r\n\r\n private String version;\r\n\r\n private String n...
import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.BeanUtils; import org.springframework.ste...
package com.appleframework.deploy.web; @Controller @RequestMapping("/project") public class ProjectController extends BaseController { @Resource
private ProjectService projectService;
5
VernonLee/Theogony
app/src/main/java/com/nodlee/theogony/ui/fragment/ChampionListFragment.java
[ "public class Champion extends RealmObject implements Serializable {\n @PrimaryKey\n private int id;\n private String key;\n private String name;\n private String title;\n private String image;\n private String lore;\n private String blurb;\n private String enemytipsc;\n private String...
import android.app.ActivityOptions; import android.content.Intent; import android.database.ContentObserver; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.LoaderManager; impor...
package com.nodlee.theogony.ui.fragment; /** * Created by Vernon Lee on 15-11-24. * 备注:SpanSize代表跨度,即item占多少单元格,三表示item占三个格子,而1表示一个格子 */ public class ChampionListFragment extends Fragment implements SwipeRefreshLayout.OnRefreshListener, ItemClickedListener { private static final String EXTRA_TAG_KEY = "ex...
Champion champion = mAdapter.getItem(position);
0
contentful/discovery-app-android
app/src/main/java/discovery/contentful/preview/EntryListFragment.java
[ "public class AssetPreviewActivity extends CFListActivity {\n private AssetInfoAdapter adapter;\n private CDAAsset asset;\n\n @Override protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n // Extract arguments from Intent\n asset = (CDAAsset) getIntent().getSeri...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.widget.AdapterView; import discovery.contentful.activities.AssetPreviewActivity; import discovery.contentful.activities.EntryActivity; import discovery.contentful.activities.MapA...
package discovery.contentful.preview; public class EntryListFragment extends CFListFragment { private CDAEntry entry; private CDAContentType contentType; private EntryListAdapter adapter; private Map<String, CDAField> contentTypesFields; private Map<String, CDAContentType> contentTypesMap; public static ...
contentType = Utils.getContentTypeForEntry(contentTypesMap, entry);
8
BracketCove/Profiler
app/src/test/java/com/wiseass/profiler/PhotoGalleryPresenterTest.java
[ "public class Photo {\n private String photoUri;\n\n public Photo(String photoUri) {\n this.photoUri = photoUri;\n }\n\n public String getPhotoUri() {\n return photoUri;\n }\n\n public void setPhotoUri(String photoUri) {\n this.photoUri = photoUri;\n }\n}", "public class P...
import android.content.ContentResolver; import com.wiseass.profiler.data.photos.Photo; import com.wiseass.profiler.data.photos.PhotoInjection; import com.wiseass.profiler.data.photos.PhotoSource; import com.wiseass.profiler.data.scheduler.SchedulerInjection; import com.wiseass.profiler.photogallery.PhotoGalleryContract...
package com.wiseass.profiler; /** * Responsible for Displaying a gallery of the user's device's images. When an Image is selected, * it forwards that image's URL to PhotoDetailActivity * Created by Ryan on 13/01/2017. */ @RunWith(MockitoJUnitRunner.class) public class PhotoGalleryPresenterTest { @Mock ...
private PhotoGalleryPresenter presenter;
5
ReplayMod/jGui
src/main/java/de/johni0702/minecraft/gui/element/AbstractGuiHorizontalScrollbar.java
[ "public interface GuiRenderer {\n\n ReadablePoint getOpenGlOffset();\n\n MatrixStack getMatrixStack();\n\n ReadableDimension getSize();\n\n void setDrawingArea(int x, int y, int width, int height);\n\n void bindTexture(Identifier location);\n\n void bindTexture(int glId);\n\n void drawTexturedR...
import de.johni0702.minecraft.gui.utils.Utils; import de.johni0702.minecraft.gui.utils.lwjgl.Dimension; import de.johni0702.minecraft.gui.utils.lwjgl.Point; import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension; import de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint; import de.johni0702.minecraft.gui.Gui...
/* * This file is part of jGui API, licensed under the MIT License (MIT). * * Copyright (c) 2016 johni0702 <https://github.com/johni0702> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Softw...
public void draw(GuiRenderer renderer, ReadableDimension size, RenderInfo renderInfo) {
2
mathisdt/trackworktime
app/src/main/java/org/zephyrsoft/trackworktime/report/CsvGenerator.java
[ "public class DAO {\n\n\t// TODO use prepared statements as described here: http://stackoverflow.com/questions/7255574\n\n\tprivate volatile SQLiteDatabase db;\n\tprivate final MySQLiteHelper dbHelper;\n\tprivate final Context context;\n\tprivate final WorkTimeTrackerBackupManager backupManager;\n\tprivate final Ba...
import androidx.arch.core.util.Function; import org.pmw.tinylog.Logger; import org.supercsv.cellprocessor.CellProcessorAdaptor; import org.supercsv.cellprocessor.Optional; import org.supercsv.cellprocessor.constraint.NotNull; import org.supercsv.cellprocessor.ift.CellProcessor; import org.supercsv.io.CsvBeanWriter; imp...
/* * This file is part of TrackWorkTime (TWT). * * TWT is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License 3.0 as published by * the Free Software Foundation. * * TWT is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without...
Task task = dao.getTask((Integer) arg0);
4
ubiratansoares/reactive-architectures-playground
app/src/main/java/br/ufs/demos/rxmvp/playground/trivia/infrastructure/TriviaInfrastructure.java
[ "public class DeserializationIssuesHandler<T> implements FlowableTransformer<T, T> {\n\n @Override public Publisher<T> apply(Flowable<T> upstream) {\n return upstream.onErrorResumeNext(this::handleErrorFromDeserializer);\n }\n\n private Publisher<T> handleErrorFromDeserializer(Throwable throwable) {...
import java.util.List; import br.ufs.demos.rxmvp.playground.core.infraerrors.DeserializationIssuesHandler; import br.ufs.demos.rxmvp.playground.core.infraerrors.RestErrorsHandler; import br.ufs.demos.rxmvp.playground.webservice.NumbersWebService; import br.ufs.demos.rxmvp.playground.core.behaviours.networking.Networkin...
package br.ufs.demos.rxmvp.playground.trivia.infrastructure; /** * Created by bira on 6/27/17. */ public class TriviaInfrastructure implements GetRandomFacts { private NumbersWebService webService; private TriviaGenerator triviaGenerator; private PayloadMapper mapper; private PayloadValidator val...
.compose(new DeserializationIssuesHandler<>())
0