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
FlareBot/FlareBot
src/main/java/stream/flarebot/flarebot/commands/music/SeekCommand.java
[ "public class FlareBot {\n\n public static final Logger LOGGER;\n public static final Gson GSON = new GsonBuilder().create();\n private static final AtomicBoolean RUNNING = new AtomicBoolean(false);\n public static final AtomicBoolean EXITING = new AtomicBoolean(false);\n public static final AtomicBo...
import com.arsenarsen.lavaplayerbridge.player.Track; import net.dv8tion.jda.core.entities.Member; import net.dv8tion.jda.core.entities.Message; import net.dv8tion.jda.core.entities.TextChannel; import net.dv8tion.jda.core.entities.User; import org.joda.time.Duration; import stream.flarebot.flarebot.FlareBot; import str...
package stream.flarebot.flarebot.commands.music; public class SeekCommand implements Command { @Override public void onCommand(User sender, GuildWrapper guild, TextChannel channel, Message message, String[] args, Member member) { if (args.length == 1) { Long millis = GeneralUtils.parseTi...
Track t = FlareBot.instance().getMusicManager().getPlayer(guild.getGuildId()).getPlayingTrack();
0
egetman/ibm-bpm-rest-client
src/main/ru/bpmink/bpm/api/impl/simple/SecuredBpmClient.java
[ "public interface BpmClient extends Closeable {\n\n /**\n * Client for actions on exposed bpm api.\n *\n * @return {@link ru.bpmink.bpm.api.client.ExposedClient}\n */\n ExposedClient getExposedClient();\n\n /**\n * Client for actions on process bpm api.\n *\n * @return {@link ru...
import com.google.common.io.Closeables; import org.apache.http.HttpVersion; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.CredentialsProvider; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.scheme.PlainSock...
package ru.bpmink.bpm.api.impl.simple; /** * Default (Secure-all) implementation of {@link ru.bpmink.bpm.api.client.BpmClient} which * supports {@link org.apache.http.impl.auth.BasicScheme} authentication. * Need to be carefully rewrite. */ @Immutable @SuppressFBWarnings("JCIP_FIELD_ISNT_FINAL_IN_IMMUTABLE_CLA...
this.rootUri = new SafeUriBuilder(serverUri).addPath(ROOT_ENDPOINT).build();
7
apptik/MultiView
app/src/main/java/io/apptik/multiview/AnimatorsFragment.java
[ "public class BasicMixedRecyclerAdapter extends RecyclerView.Adapter<BasicMixedRecyclerAdapter.ViewHolder> {\n private static final String TAG = \"BasicMixedAdapter\";\n private JsonArray jarr;\n Cursor c;\n\n\n public class ViewHolder extends RecyclerView.ViewHolder {\n public final TextView txt...
import io.apptik.multiview.adapter.BasicMixedRecyclerAdapter; import io.apptik.multiview.adapter.BasicRecyclerAdapter; import io.apptik.multiview.mock.MockData; import io.apptik.multiview.animators.AnimatorProvider; import io.apptik.multiview.animators.FlexiItemAnimator; import io.apptik.multiview.animators.Providers; ...
/* * Copyright (C) 2015 AppTik Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
recyclerAdapter = new BasicRecyclerAdapter(MockData.getMockJsonArray(333, 500));
2
kaklakariada/portmapper
src/main/java/org/chris/portmapper/router/sbbi/SBBIRouter.java
[ "public class PortMapperApp extends SingleFrameApplication {\n\n /**\n * The name of the system property which will be used as the directory where all configuration files will be stored.\n */\n private static final String CONFIG_DIR_PROPERTY_NAME = \"portmapper.config.dir\";\n\n /**\n * The fil...
import java.io.IOException; import java.net.URL; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; import org.chris.portmapper.PortMapperApp; import org.chris.portmapper.Settings; import org.chris.portmapper.model.PortMapping; import org.c...
/** * UPnP PortMapper - A tool for managing port forwardings via UPnP * Copyright (C) 2015 Christoph Pirkl <christoph at users.sourceforge.net> * * 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 Founda...
final Settings settings = app.getSettings();
1
mgledi/DRUMS
src/main/java/com/unister/semweb/drums/bucket/Bucket.java
[ "public class DRUMSParameterSet<Data extends AbstractKVStorable> {\r\n /** My private Logger. */\r\n private static Logger logger = LoggerFactory.getLogger(DRUMSParameterSet.class);\r\n\r\n private static final String PROTOTYPE_FILE = \"prototype.dat\";\r\n private static final String PROPERTY_FILE = \"...
import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays; import com.unister.semweb.drums.DRUMSParameterSet; import com.unister.semweb.drums.api.DRUMS; import com.unister.semweb.drums.bucket.hashfunction.AbstractHashFunction; import com.unister.semweb.drums.file.FileLockException; import com.unis...
/* Copyright (C) 2012-2013 Unister GmbH * * 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) any later version. * * This program is d...
private DRUMSParameterSet<Data> gp;
0
r-koubou/KSPSyntaxParser
src/java/net/rkoubou/kspparser/KSPSyntaxParser.java
[ "public class AnalyzeErrorCounter\n{\n\n /** 解析中に検知したエラー総数 */\n static private int errorCount = 0;\n\n /** 解析中に検知した警告総数 */\n static private int warningCount = 0;\n\n /**\n * ctor\n */\n private AnalyzeErrorCounter()\n {}\n\n /**\n * エラー総数を+1\n */\n static public void e()\n...
import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.PrintStream; import java.io.Writer; import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.CmdLineParser; import net.rkoubou.kspparser.analyzer.AnalyzeErrorCounter; import net.rkoubou.kspparser.analyzer.S...
/* ========================================================================= KSPSyntaxParser.java Copyright (c) R-Koubou ======================================================================== */ package net.rkoubou.kspparser; /** * KSPSyntaxParser */ public class KSPSyntaxParser { ////////////...
SemanticAnalyzer semanticAnalyzer = new SemanticAnalyzer( symbolCollector );
1
okinawaopenlabs/of-patch-manager
src/main/java/org/okinawaopenlabs/ofpm/validate/topology/physical/DisconnectPhysicalLinksJsonInValidate.java
[ "public class ErrorMessage {\n\tpublic static final String CONNECTION_FAIL = \"Connection failed: %s.\";\n\tpublic static final String WRONG_RESPONSE = \"Response of %s is wrong.\";\n\tpublic static final String INVALID_JSON = \"Invalid json syntax.\";\n\tpublic static final String INVALID_PARAMETER = \"%s is...
import java.util.List; import java.util.regex.Pattern; import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; import static org.okinawaopenlabs.constants.ErrorMessage.*; import static org.okinawaopenlabs.constants.OfpmDefinition.*; import org.okinawaopenlabs.ofpm.exception.ValidateException; impor...
/* * Copyright 2015 Okinawa Open Laboratory, General Incorporated Association * * 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...
public void checkValidation(DisconnectPhysicalLinksJsonIn disconnectPhysicalLink) throws ValidateException {
4
mstojcevich/Radix
core/src/sx/lambda/voxel/net/mc/client/MinecraftClientConnection.java
[ "public class RadixClient extends ApplicationAdapter {\n\n // TODO CLEANUP the render loop is VERY undocumented and things happen all over the place, clean that up\n\n public static final String GAME_TITLE = \"VoxelTest\";\n private static RadixClient theGame;\n\n private SettingsManager settingsManager...
import com.badlogic.gdx.Gdx; import org.spacehq.mc.protocol.MinecraftProtocol; import org.spacehq.mc.protocol.data.message.Message; import org.spacehq.mc.protocol.data.message.TranslationMessage; import org.spacehq.mc.protocol.packet.ingame.server.*; import org.spacehq.mc.protocol.packet.ingame.server.entity.ServerEnti...
package sx.lambda.voxel.net.mc.client; public class MinecraftClientConnection { private final RadixClient game; private final Client client; private final ChatHandler chatHandler; private final Map<Class<? extends Packet>, PacketHandler> handlerMap = new HashMap<>(); public MinecraftClientConn...
handlerMap.put(LoginSuccessPacket.class, new LoginSuccessHandler());
1
pierre/collector
src/test/java/com/ning/metrics/collector/endpoint/resources/JettyTestModule.java
[ "public abstract class FastCollectorConfig implements CollectorConfig\n{\n private static final long START_TIME = System.currentTimeMillis();\n private int cachedPort = -1;\n\n /**\n * @return true - enable a Mock AMQ for tests by default\n * @see com.ning.metrics.collector.realtime.RealTimeQueueTe...
import com.google.inject.AbstractModule; import com.google.inject.servlet.ServletModule; import com.ning.metrics.collector.FastCollectorConfig; import com.ning.metrics.collector.binder.config.CollectorConfig; import com.ning.metrics.collector.binder.config.CollectorConfigurationObjectFactory; import com.ning.metrics.co...
/* * Copyright 2010-2011 Ning, Inc. * * Ning 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/licenses/LICENSE-2.0 * * Unless required by a...
abstract static class AutoFlushConfig extends FastCollectorConfig
0
Azure/azure-storage-android
microsoft-azure-storage/src/com/microsoft/azure/storage/table/CloudTable.java
[ "public final class Constants {\n /**\n * Defines constants for ServiceProperties requests.\n */\n public static class AnalyticsConstants {\n\n /**\n * The XML element for the CORS Rule AllowedHeaders\n */\n public static final String ALLOWED_HEADERS_ELEMENT = \"AllowedHe...
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringWriter; import java.net.HttpURLConnection; import java.net.URI; import java.net.URISyntaxException; import java.security.InvalidKeyException; import java.util.ArrayList; import java.util.HashMap; import java.util.Locale; import com.mi...
* If a storage service error occurred during the operation. */ @DoesServiceRequest public boolean exists() throws StorageException { return this.exists(null /* options */, null /* opContext */); } /** * Returns a value that indicates whether the table exists in the st...
ExecutionEngine.executeWithRetry(this.tableServiceClient, this,
4
sewerk/Bill-Calculator
persistence/src/main/java/pl/srw/billcalculator/persistence/type/BillType.java
[ "public interface Bill {\n\n Long getId();\n Long getPricesId();\n\n Date getDateFrom();\n void setDateFrom(Date dateFrom);\n Date getDateTo();\n void setDateTo(Date dateTo);\n Double getAmountToPay();\n void setAmountToPay(Double value);\n}", "@Entity(active = true)\npublic class PgeG11Bi...
import org.greenrobot.greendao.AbstractDao; import pl.srw.billcalculator.db.Bill; import pl.srw.billcalculator.db.PgeG11Bill; import pl.srw.billcalculator.db.PgeG12Bill; import pl.srw.billcalculator.db.PgnigBill; import pl.srw.billcalculator.db.Prices; import pl.srw.billcalculator.db.TauronG11Bill; import pl.srw.billca...
package pl.srw.billcalculator.persistence.type; /** * Created by Kamil Seweryn. */ public enum BillType { PGE_G11, PGE_G12, PGNIG, TAURON_G11, TAURON_G12; public AbstractDao<? extends Bill, Long> getDao() { assertNotNull(Database.getSession()); switch (this) { c...
private void assertNotNull(final DaoSession session) {
6
edsilfer/marvel-characters
user-intf/src/main/java/br/com/hole19/marvel/ui/commons/adapter/AdapterCharacter.java
[ "public class Character implements Serializable {\n\n private long id;\n private String name;\n private String description;\n private String modified;\n private Thumbnail thumbnail;\n private String resourceURI;\n private Collection comics;\n private Collection series;\n private Collectio...
import android.os.Environment; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ImageView; impo...
package br.com.hole19.marvel.ui.commons.adapter; /** * Created by edgar on 29-Apr-16. */ public class AdapterCharacter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements Publisher { private static final String TAG = "AdapterCharacter"; private List<Character> mDataset;
private List<Subscriber> mSubscribers = new ArrayList<>();
5
pe-pan/flappy
mobile/src/main/java/net/panuska/tlappy/CustomControlsActivity.java
[ "public class BufferedImage {\n private Bitmap b;\n private Graphics g;\n public static final int TYPE_INT_RGB = Bitmap.Config.ARGB_8888.ordinal();\n\n public BufferedImage(BitmapDrawable d) {\n Bitmap immb = d.getBitmap();\n b = immb.copy(Bitmap.Config.ARGB_8888, false);\n }\n\n pub...
import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.util.SparseIntArray; import android.view.KeyEvent; import android.view.SurfaceView; import net.panuska.tlappy.awt.BufferedImage; import net.panuska.tlappy.awt.Color; import net.panuska.tlappy.mobile.R; import static net.panus...
package net.panuska.tlappy; /** * Flappy: * Original game created by dB-SOFT in 1984 for SHARP MZ-800 computer. * Java version by Petr Slechta, 2014. * Android version by Petr Panuska, 2017. */ public class CustomControlsActivity extends TlappyActivity { private static final String TAG = CustomControlsActi...
private static final BufferedImage[][] animation = {
0
marcohc/android-clean-architecture
app/src/main/java/com/marcohc/architecture/app/data/cache/UserCache.java
[ "public class UserEntity implements Entity {\n\n // ************************************************************************************************************************************************************************\n // * Attributes\n // ***************************************************************...
import com.marcohc.architecture.app.BuildConfig; import com.marcohc.architecture.app.domain.entity.UserEntity; import com.marcohc.architecture.app.internal.di.ApplicationInjector; import com.marcohc.architecture.cache.DataCache; import com.marcohc.architecture.cache.JsonSerializer; import com.marcohc.architecture.commo...
package com.marcohc.architecture.app.data.cache; /** * User mCache which keeps the response from data sources in the android mCache using {@link DualCache}. * * @author Marco Hernaiz * @since 08/08/16 */ public final class UserCache implements DataCache<List<UserEntity>> { private static final long CACHE_...
return Parser.parseCollection(jsonStored, new GenericCollection<>(List.class, UserEntity.class));
5
santiago-hollmann/igcparser
igcParser/src/main/java/com/shollmann/android/igcparser/Parser.java
[ "public class BRecord implements ILatLonRecord, Serializable {\n private static final int TIME_START_INDEX = 1;\n private static final int TIME_END_INDEX = 7;\n private static final int LAT_END_INDEX = 15;\n private static final int LON_END_INDEX = 24;\n private static final int FIX_VALIDITY_START_IN...
import com.shollmann.android.igcparser.model.BRecord; import com.shollmann.android.igcparser.model.CRecordWayPoint; import com.shollmann.android.igcparser.model.IGCFile; import com.shollmann.android.igcparser.util.Constants; import com.shollmann.android.igcparser.util.CoordinatesUtilities; import com.shollmann.android....
/* * MIT License * * Copyright (c) 2016 Santiago Hollmann * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy...
WaypointUtilities.classifyWayPoints(igcFile.getWaypoints());
7
ailab-uniud/distiller-CORE
src/main/java/it/uniud/ailab/dcore/Blackboard.java
[ "public abstract class DocumentComponent extends Annotable {\n\n private final String text;\n private Locale language;\n\n /**\n * Creates a document component.\n *\n * @param text the text of the component\n * @param language the language of the component\n * @param identifier the uniq...
import java.util.Collection; import java.util.List; import java.util.stream.Collectors; import com.fasterxml.jackson.annotation.JsonIgnore; import com.rits.cloning.Cloner; import java.util.HashMap; import java.util.Map; import it.uniud.ailab.dcore.persistence.DocumentComponent; import it.uniud.ailab.dcore.persi...
/* * 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...
for (Sentence s : DocumentUtils.getSentences(document)) {
6
jenkinsci/github-plugin
src/main/java/com/cloudbees/jenkins/GitHubSetCommitStatusBuilder.java
[ "public abstract class GitHubStatusContextSource extends AbstractDescribableImpl<GitHubStatusContextSource>\n implements ExtensionPoint {\n\n /**\n * @param run actual run\n * @param listener build listener\n *\n * @return simple short string to represent context of this state\n *...
import edu.umd.cs.findbugs.annotations.NonNull; import hudson.Extension; import hudson.FilePath; import hudson.Launcher; import hudson.model.AbstractProject; import hudson.model.Run; import hudson.model.TaskListener; import hudson.tasks.BuildStepDescriptor; import hudson.tasks.Builder; import jenkins.tasks.SimpleBuildS...
package com.cloudbees.jenkins; @Extension public class GitHubSetCommitStatusBuilder extends Builder implements SimpleBuildStep { private static final ExpandableMessage DEFAULT_MESSAGE = new ExpandableMessage(""); private ExpandableMessage statusMessage = DEFAULT_MESSAGE; private GitHubStatusContextSour...
setter.setErrorHandlers(Collections.<StatusErrorHandler>singletonList(new ShallowAnyErrorHandler()));
3
ttddyy/spring-social-evernote
src/test/java/org/springframework/social/evernote/api/impl/ThriftWrapperUnwrapTest.java
[ "public class Bar implements org.apache.thrift.TBase<Bar, Bar._Fields>, java.io.Serializable, Cloneable {\n private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(\"Bar\");\n\n private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.ap...
import org.junit.Test; import org.springframework.aop.support.AopUtils; import org.springframework.social.evernote.api.impl.entity.Bar; import org.springframework.social.evernote.api.impl.entity.Baz; import org.springframework.social.evernote.api.impl.entity.Foo; import java.util.ArrayList; import java.util.HashMap; im...
package org.springframework.social.evernote.api.impl; /** * @author Tadaya Tsuyukubo */ public class ThriftWrapperUnwrapTest { @Test public void testUnwrap() throws Exception { Foo foo = new Foo("foo", new ArrayList<String>(), new HashSet<String>(), new HashMap<String, String>()); Bar bar = new Bar(); Ba...
Foo unwrapped = unwrap(wrapped);
4
guillaume-alvarez/ShapeOfThingsThatWere
core/src/com/galvarez/ttw/screens/overworld/controls/InputManager.java
[ "public final class Assets implements Disposable {\n\n public static final String FONTS_ROMANICA_TTF = \"fonts/Romanica.ttf\";\n public static final String UISKIN_JSON = \"uiskin/uiskin.json\";\n private final Skin skin;\n\n public enum Icon {\n DISCOVERY(\"discovery-bulb\"),\n DIPLOMACY(\...
import com.galvarez.ttw.utils.Assets; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.artemis.Entity; import com.artemis.World; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.InputMultiplexer; import com.badlogic.gdx.InputProcessor; import com.badlogic.gdx.graphics.OrthographicCamera; import c...
package com.galvarez.ttw.screens.overworld.controls; public class InputManager { private static final Logger log = LoggerFactory.getLogger(InputManager.class); final Stage stage; private final OverworldSelectorController select; private final OverworldDragController drag; final OverworldFlagController...
&& entity.getComponent(AIControlled.class) == null) {
2
sumeetchhetri/gatf
alldep-jar/src/main/java/com/gatf/GatfPlugin.java
[ "public class AcceptanceTestContext {\r\n\r\n\tprivate Logger logger = Logger.getLogger(AcceptanceTestContext.class.getSimpleName());\r\n\t\r\n\tpublic final static String\r\n\t PROP_SOAP_ACTION_11 = \"SOAPAction\",\r\n\t PROP_SOAP_ACTION_12 = \"action=\",\r\n\t PROP_CONTENT_TYPE = \"Content-Type\",\r\n\t ...
import java.util.List; import java.util.Set; import com.gatf.executor.core.AcceptanceTestContext; import com.gatf.executor.core.GatfExecutorConfig; import com.gatf.executor.core.TestCase; import com.gatf.executor.executor.TestCaseExecutorUtil; import com.gatf.executor.report.TestCaseReport; import com.gatf.selen...
/* Copyright 2013-2019, Sumeet Chhetri 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 ap...
GatfSelDebugger debugSeleniumTest(GatfExecutorConfig configuration, String selscript, String configPath);
5
Jannyboy11/CustomRecipes
src/main/java/com/gmail/jannyboy11/customrecipes/impl/crafting/vanilla/addremove/ShapelessRemover.java
[ "public class CustomRecipesPlugin extends JavaPlugin implements CustomRecipesApi {\n\n\tprivate final NavigableMap<String, BiConsumer<? super Player, ? super List<String>>> adders = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\tprivate final NavigableMap<String, BiConsumer<? super Player, ? super List<String>>> ...
import java.util.List; import java.util.function.BiConsumer; import org.bukkit.ChatColor; import org.bukkit.NamespacedKey; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import com.gmail.jannyboy11.customrecipes.CustomRecipesPlugin; import com.gmail.jannyboy11.customrecipes.api.InventoryUtils; ...
package com.gmail.jannyboy11.customrecipes.impl.crafting.vanilla.addremove; public class ShapelessRemover implements BiConsumer<Player, List<String>> { private final CustomRecipesPlugin plugin; public ShapelessRemover(CustomRecipesPlugin plugin) { this.plugin = plugin; } @Override public void accept(Playe...
CRShapelessRecipe toBeRemoved = null;
4
jonathanlermitage/tikione-steam-cleaner
src/main/java/fr/tikione/steam/cleaner/util/conf/Patterns.java
[ "public class InfinitiveLoopException\n extends Exception\n implements Serializable {\n\n /** Serial version UID. */\n private static final long serialVersionUID = 4052546955101609848L;\n\n /**\n * Constructs an instance of <code>InfinitiveLoopException</code> with the specified detail me...
import fr.tikione.ini.InfinitiveLoopException; import fr.tikione.ini.Ini; import fr.tikione.steam.cleaner.Main; import fr.tikione.steam.cleaner.util.Log; import fr.tikione.steam.cleaner.util.Redist; import java.io.CharConversionException; import java.io.File; import java.io.IOException; import java.util.ArrayList; impo...
package fr.tikione.steam.cleaner.util.conf; /** * Configuration handler. */ public class Patterns { public static final String REMOTE_DEFINITION_FILES_SEPARATOR = "##n##"; /** INI configuration file section : redistributable packages file and folder patterns. */ private static final String CO...
private Ini ini;
1
jjhesk/slideSelectionList
SmartSelectionList/app/src/main/java/com/tradlulu/demoCollectionList/SimpleFast.java
[ "public abstract class DynamicAdapter<H extends LevelResources> extends FragmentStatePagerAdapter {\n private int level_current;\n protected ArrayList<H> levelObjects = new ArrayList<>();\n protected Fragment firstPage;\n protected H firstPageListConfiguration;\n private ArrayList<SimpleSingleList> v...
import android.os.Bundle; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import com.hkm.slideselection.V1.DynamicAdapter; import com.hkm.slideselection.app.SimpleStepSelectionFragment; import com.hkm.slideselection.worker.SelectChoice; import com.hkm.slideselection.app.HbSelectionFragment; ...
package com.tradlulu.demoCollectionList; /** * Created by hesk on 16/9/15. */ public class SimpleFast extends AppCompatActivity implements bridgeChanger { SimpleStepSelectionFragment thecontroller; Handler uiHandler = new Handler(); @Override protected void onCreate(Bundle savedInstanceState) { ...
public void SelectNow(final ViewPagerHolder pager, final DynamicAdapter mAdapter, final SelectChoice choice) {
4
dragonite-network/dragonite-java
dragonite-mux/src/main/java/com/vecsight/dragonite/mux/conn/MultiplexedConnection.java
[ "public class ConnectionNotAliveException extends MuxException {\n\n public ConnectionNotAliveException() {\n super(\"Connection is not alive\");\n }\n\n public ConnectionNotAliveException(final String msg) {\n super(msg);\n }\n\n}", "public class SenderClosedException extends MuxExcepti...
import com.vecsight.dragonite.mux.exception.ConnectionNotAliveException; import com.vecsight.dragonite.mux.exception.SenderClosedException; import com.vecsight.dragonite.mux.frame.Frame; import com.vecsight.dragonite.mux.frame.types.CloseConnectionFrame; import com.vecsight.dragonite.mux.frame.types.ContinueConnectionF...
/* * The Dragonite Project * ------------------------- * See the LICENSE file in the root directory for license information. */ package com.vecsight.dragonite.mux.conn; public class MultiplexedConnection { private final Multiplexer multiplexer; private final short connectionID; private final Pac...
if (frame instanceof DataFrame) {
5
Sotera/distributed-graph-analytics
dga-giraph/src/main/java/com/soteradefense/dga/LouvainRunner.java
[ "public class LouvainVertexInputFormat extends TextVertexInputFormat<Text, LouvainNodeState, LongWritable> {\n\n\t@Override\n\tpublic TextVertexReader createVertexReader(InputSplit inputSplit, TaskAttemptContext taskAttemptContext) throws IOException {\n DGALoggingUtil.setDGALogLevel(getConf());\n\t\treturn ...
import com.soteradefense.dga.io.formats.DGALongEdgeValueInputFormat; import com.soteradefense.dga.io.formats.LouvainVertexInputFormat; import com.soteradefense.dga.io.formats.LouvainVertexOutputFormat; import com.soteradefense.dga.louvain.giraph.LouvainComputation; import com.soteradefense.dga.louvain.giraph.LouvainMas...
/* * * 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 * "Licens...
requiredConfiguration.setDGAGiraphProperty("-mc", LouvainMasterCompute.class.getCanonicalName());
3
Anchormen/sql4es
src/main/java/nl/anchormen/sql4es/parse/sql/HavingParser.java
[ "public interface QueryState {\n\n\t/**\n\t * Provides the original query provided to the driver\n\t * @return\n\t */\n\tpublic String originalSql();\n\n\t/**\n\t * Returns the heading build for the query\n\t * @return\n\t */\n\tpublic Heading getHeading();\n\t\n\t/**\n\t * Adds exception to this state signaling so...
import com.facebook.presto.sql.tree.AstVisitor; import com.facebook.presto.sql.tree.BooleanLiteral; import com.facebook.presto.sql.tree.ComparisonExpression; import com.facebook.presto.sql.tree.DereferenceExpression; import com.facebook.presto.sql.tree.DoubleLiteral; import com.facebook.presto.sql.tree.Expression; impo...
package nl.anchormen.sql4es.parse.sql; /** * A Presto {@link AstVisitor} implementation that parses GROUP BY clauses * * @author cversloot * */ public class HavingParser extends AstVisitor<IComparison, QueryState>{ @Override protected IComparison visitExpression(Expression node, QueryState state) { if( ...
col2 = Heading.findOriginal(state.originalSql(), col2, "having.+", "\\W");
2
TheCreeperOfRedstone/RPG-Items-2
src/think/rpgitems/config/Update02To03.java
[ "@SuppressWarnings(\"deprecation\")\npublic class Plugin extends JavaPlugin {\n\n public static Logger logger = Logger.getLogger(\"RPGItems\");\n\t\n public static Plugin plugin;\n\n @Override\n public void onLoad() {\n plugin = this;\n reloadConfig();\n Font.load();\n Power....
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.bukkit.ChatColor; import org.bukkit.Color; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.buk...
package think.rpgitems.config; public class Update02To03 implements Updater { @SuppressWarnings("unchecked") @Override public void update(ConfigurationSection section) { Plugin plugin = Plugin.plugin; try { FileInputStream in = null; YamlConfiguration itemStorage...
ArrayList<Power> powers = new ArrayList<Power>();
5
1and1/reactive
reactive-kafka-example/src/main/java/net/oneandone/reactive/kafka/rest/BusinesEventApplication.java
[ "public class StdProblem extends Problem {\n \n private StdProblem(ImmutableMap<String, String> problemData) {\n super(problemData);\n }\n\n public static StdProblem of(WebApplicationException wae) {\n return new StdProblem(parseProblemData(wae.getResponse()));\n }\n\n\n public boole...
import com.unitedinternet.mam.incubator.hammer.problem.StdProblem; import net.oneandone.incubator.neo.freemarker.FreemarkerProvider; import net.oneandone.incubator.neo.problem.GenericExceptionMapper; import net.oneandone.reactive.kafka.CompletableKafkaProducer; import net.oneandone.reactive.kafka.KafkaSource; import ne...
/* * Copyright 1&1 Internet AG, https://github.com/1and1/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
.withProblemMapper(SchemaException.class, "POST", "PUT", e -> StdProblem.newUnsupportedMimeTypeProblem().withParam("type", e.getType()))
7
PushOCCRP/Push-Android
app/src/main/java/com/pushapp/press/fragment/DetailPost.java
[ "public class StringReplacer {\n public static String replace(String input, Pattern regex, StringReplacerCallback callback) {\n StringBuffer resultString = new StringBuffer();\n Matcher regexMatcher = regex.matcher(input);\n while (regexMatcher.find()) {\n regexMatcher.appendRepla...
import android.content.ComponentCallbacks2; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Point; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.ColorDrawable; import android.graphic...
package com.pushapp.press.fragment; public final class DetailPost extends Fragment implements ObservableScrollViewCallbacks, ComponentCallbacks2 { private static final String KEY_CONTENT = "TestFragment:Content"; private static final String KEY_TITLE = "TestFragment:Title"; private static final Strin...
Date date = DateUtil.postsDatePublishedFormatter.parse(String.valueOf(postItem.getPublishDate()));
4
mathisdt/sdb2
src/main/java/org/zephyrsoft/sdb2/SpringConfiguration.java
[ "public class KeyboardShortcutManager implements KeyEventDispatcher {\n\t\n\tprivate Set<KeyboardShortcut> shortcuts = new HashSet<>();\n\t\n\t/**\n\t * @see java.awt.KeyEventDispatcher#dispatchKeyEvent(java.awt.event.KeyEvent)\n\t */\n\t@Override\n\tpublic boolean dispatchKeyEvent(KeyEvent e) {\n\t\tfor (KeyboardS...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.togglz.core.context.StaticFeatureManagerProvider; import org.togglz.core.manager.FeatureManager; import org.togglz.core.manager.FeatureMana...
/* * This file is part of the Song Database (SDB). * * SDB 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. * * SDB is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; wit...
public IndexerService indexerService() {
3
cjstehno/ersatz
ersatz/src/test/java/io/github/cjstehno/ersatz/impl/ExpectationsImplTest.java
[ "public enum HttpMethod {\r\n\r\n /**\r\n * Wildcard matching any HTTP method.\r\n */\r\n ANY(\"*\"),\r\n\r\n /**\r\n * HTTP GET method matcher.\r\n */\r\n GET(\"GET\"),\r\n\r\n /**\r\n * HTTP HEAD method matcher.\r\n */\r\n HEAD(\"HEAD\"),\r\n\r\n /**\r\n * HTTP POS...
import io.github.cjstehno.ersatz.cfg.HttpMethod; import io.github.cjstehno.ersatz.cfg.Request; import io.github.cjstehno.ersatz.cfg.RequestWithContent; import io.github.cjstehno.ersatz.encdec.RequestDecoders; import io.github.cjstehno.ersatz.encdec.ResponseEncoders; import io.github.cjstehno.ersatz.server.ClientRe...
assertRequest(request); assertRequestMatch(request(HEAD).query("a", "b"), true); assertRequestMatch(request(HEAD).query("a", "c"), false); assertRequestMatch(request(HEAD), false); assertRequestMatch(request(GET).query("a", "b"), false); assertRequestMatch(request(DE...
void matching(final HttpMethod method, final String path) {
7
goshippo/shippo-java-client
src/main/java/com/shippo/model/Manifest.java
[ "public class APIConnectionException extends ShippoException {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic APIConnectionException(String message) {\n\t\tsuper(message);\n\t}\n\n\tpublic APIConnectionException(String message, Throwable e) {\n\t\tsuper(message, e);\n\t}\n\n}", "public class AP...
import java.util.Map; import com.shippo.exception.APIConnectionException; import com.shippo.exception.APIException; import com.shippo.exception.AuthenticationException; import com.shippo.exception.InvalidRequestException; import com.shippo.net.APIResource;
package com.shippo.model; public class Manifest extends APIResource { String objectState; String status; String objectId; String objectOwner; Object objectCreated; Object objectUpdated; Object provider; Object shipmentDate; Object addressFrom; Object documents;
public static Manifest create(Map<String, Object> params) throws AuthenticationException, InvalidRequestException,
2
segator/proxylive
src/main/java/com/github/segator/proxylive/tasks/StreamProcessorsSession.java
[ "public class ProxyLiveUtils {\n\n private static Pattern pattern = Pattern.compile(\"^(tvh|hls|dash)(s)?:\\\\/\\\\/(.+)$\");\n public static String getOS() {\n\n String OS = System.getProperty(\"os.name\").toLowerCase();\n\n if (OS.contains(\"win\")) {\n return \"win\";\n } el...
import com.github.segator.proxylive.ProxyLiveUtils; import com.github.segator.proxylive.controller.StreamController; import com.github.segator.proxylive.entity.ClientInfo; import com.github.segator.proxylive.entity.GEOInfo; import com.github.segator.proxylive.processor.DirectHLSTranscoderStreamProcessor; import com.git...
/* * The MIT License * * Copyright 2017 Isaac Aymerich <isaac.aymerich@gmail.com>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation t...
client.setIp(InetAddress.getByName(ProxyLiveUtils.getRequestIP(request)));
0
1and1/Troilus
troilus-core/src/test/java/net/oneandone/troilus/api/UserDefinedFunctionsTest.java
[ "public class CassandraDB {\n private static final String CASSANDRA_YAML_FILE = \"cassandra.yaml\";\n\n private static CassandraDaemon cassandraDaemon;\n private static int nativePort = 0;\n private static Cluster globalCluster;\n private static Session globalSession;\n private static String globa...
import java.io.IOException; import java.util.Optional; import java.util.concurrent.CompletableFuture; import net.oneandone.troilus.CassandraDB; import net.oneandone.troilus.Dao; import net.oneandone.troilus.DaoImpl; import net.oneandone.troilus.Record; import net.oneandone.troilus.Result; import net.oneandone.troilus.e...
/* * Copyright 1&1 Internet AG, https://github.com/1and1/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
Optional<Record> record = feeDao.readWithKey(FeesTable.CUSTOMER_ID, "233132")
2
dbooga/MonsterHunter3UDatabase
MonsterHunter3UDatabase/src/com/daviancorp/android/ui/adapter/WeaponDetailPagerAdapter.java
[ "public class S {\n\t// Item sections\n\tpublic static final long SECTION_DECORATIONS = 1118;\n\t\n\tpublic static final long SECTION_HEAD = 1314;\n\tpublic static final long SECTION_BODY = 1646;\n\tpublic static final long SECTION_ARMS = 1983;\n\tpublic static final long SECTION_WAIST = 2303;\n\tpublic static fina...
import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import com.daviancorp.android.data.database.S; import com.daviancorp.android.ui.detail.ComponentListFragment; import com.daviancorp.android.ui.detail.WeaponBladeDetailFragment; impo...
package com.daviancorp.android.ui.adapter; public class WeaponDetailPagerAdapter extends FragmentPagerAdapter { private long weaponId; public WeaponDetailPagerAdapter(FragmentManager fm, long id) { super(fm); this.weaponId = id; } @Override public Fragment getItem(int index) { switch (index) { case...
return WeaponBowgunDetailFragment.newInstance(weaponId);
4
lovexiaov/android_pinyin_ime
app/src/main/java/com/android/inputmethod/pinyin/common/XmlKeyboardLoader.java
[ "public class SkbTemplate {\n private int mSkbTemplateId;\n private Drawable mSkbBg;\n private Drawable mBalloonBg;\n private Drawable mPopupBg;\n private float mXMargin = 0;\n private float mYMargin = 0;\n /** Key type list. */\n private Vector<SoftKeyType> mKeyTypeList = new Vector<SoftKeyType>();\n\n /*...
import android.content.Context; import android.content.res.Resources; import android.content.res.XmlResourceParser; import android.graphics.drawable.Drawable; import com.android.inputmethod.pinyin.skb.SkbTemplate; import com.android.inputmethod.pinyin.skb.SoftKey; import com.android.inputmethod.pinyin.skb.SoftKeyToggle...
/** Key margin in x-way. */ float mKeyXMargin = 0; /** Key margin in y-way. */ float mKeyYMargin = 0; /** * Used to indicate whether next event has been fetched during processing * the the current event. */ boolean mNextEventFetched = false; String mAttrTmp; class KeyCommonAttributes { ...
SoftKey softKey = getSoftKey(xrp, attrKey);
1
AnaelMobilia/NextINpact-Unofficial
app/src/main/java/com/pcinpact/DebugActivity.java
[ "public class CacheManager {\n\n /**\n * Nettoie le cache de l'application des articles obsolètes.\n *\n * @param unContext context application\n */\n public static void nettoyerCache(final Context unContext) {\n // DEBUG\n if (Constantes.DEBUG) {\n Log.d(\"CacheManage...
import com.pcinpact.utils.Constantes; import java.util.ArrayList; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.pcinpact.datastorage.CacheManager; import com.pcinp...
/* * Copyright 2013 - 2021 Anael Mobilia and contributors * * This file is part of NextINpact-Unofficial. * * NextINpact-Unofficial 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 th...
ArrayList<CommentaireItem> lesCommentaires = monDAO.chargerCommentairesTriParID(articlePk);
3
upnext/blekit-android
src/main/java/com/upnext/blekit/conditions/BLECondition.java
[ "public enum BeaconEvent {\n\n /**\n * A beacon has appeared in range\n */\n REGION_ENTER,\n\n /**\n * A beacon has disappeared from range.\n * This event is in reality delayed to prevent imemdiate enter-exit-enter events.\n * Because of that LEAVE is delayed by {@link com.upnext.blekit...
import com.upnext.blekit.model.Zone; import com.upnext.blekit.util.ExpressionEvaluator; import com.upnext.blekit.util.L; import java.util.Map; import android.content.Context; import com.upnext.blekit.BeaconEvent; import com.upnext.blekit.model.Beacon; import com.upnext.blekit.model.Trigger;
/* * Copyright (c) 2014 UP-NEXT. All rights reserved. * http://www.up-next.com * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the...
protected Zone zone;
3
alexruiz/dw-lombok
src/javac/lombok/javac/handlers/BoundSetterHandler.java
[ "public static boolean stopAstGeneration(AccessLevel level) {\n return level == NONE;\n}", "public static String canBeUsedOnFieldOnly(Class<? extends Annotation> annotationType) {\n return errorMessage(\"@%s can be used on fields only\", annotationType);\n}", "public final class Names {\n\n /** Name of the f...
import static com.sun.tools.javac.code.Flags.*; import static lombok.core.handlers.TransformationsUtil.*; import static lombok.core.util.AstGeneration.stopAstGeneration; import static lombok.core.util.ErrorMessages.canBeUsedOnFieldOnly; import static lombok.core.util.Names.*; import static lombok.javac.handlers.FieldBu...
/* * Created on Nov 30, 2010 * * 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 writing...
astWrapper.addError(canBeUsedOnFieldOnly(TARGET_ANNOTATION_TYPE));
1
cloudspannerecosystem/pgadapter
src/main/java/com/google/cloud/spanner/pgadapter/wireprotocol/QueryMessage.java
[ "public class ConnectionHandler extends Thread {\n\n private static final Logger logger = Logger.getLogger(ConnectionHandler.class.getName());\n private static final AtomicLong CONNECTION_HANDLER_ID_GENERATOR = new AtomicLong(0L);\n private final ProxyServer server;\n private final Socket socket;\n private fin...
import com.google.cloud.spanner.pgadapter.ConnectionHandler; import com.google.cloud.spanner.pgadapter.ConnectionHandler.QueryMode; import com.google.cloud.spanner.pgadapter.statements.IntermediateStatement; import com.google.cloud.spanner.pgadapter.statements.PSQLStatement; import com.google.cloud.spanner.pgadapter.wi...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
QueryMode.SIMPLE).send();
1
srcdeps/srcdeps-core
srcdeps-core-config-yaml/src/main/java/org/srcdeps/config/yaml/writer/YamlWriterVisitor.java
[ "public class Configuration {\n public static class Builder extends DefaultContainerNode<Node> {\n\n final ScalarNode<SrcVersion> buildRef = new DefaultScalarNode<>(\"buildRef\", SrcVersion.getBranchMaster());\n final ScalarNode<Duration> buildTimeout = new DefaultScalarNode<>(\"buildTimeout\", Dur...
import java.io.Closeable; import java.io.IOException; import java.io.Writer; import java.util.List; import org.srcdeps.core.config.Configuration; import org.srcdeps.core.config.tree.ContainerNode; import org.srcdeps.core.config.tree.ListNode; import org.srcdeps.core.config.tree.Node; import org.srcdeps.core.config.tree...
/** * Copyright 2015-2018 Maven Source Dependencies * Plugin contributors as indicated by the @author tags. * * 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...
public boolean listBegin(ListNode<? extends Node> node) {
2
GoogleCloudPlatform/cloud-spanner-r2dbc
cloud-spanner-r2dbc/src/test/java/com/google/cloud/spanner/r2dbc/it/ClientLibraryBasedIntegrationTest.java
[ "public static final String DRIVER_NAME = \"cloudspanner\";", "public static final Option<String> INSTANCE = Option.valueOf(\"instance\");", "public abstract class SpannerType implements io.r2dbc.spi.Type {\n\n private Type type;\n\n private static final Map<Code, Class<?>> SPANNER_TO_JAVA_TYPES = buildTypeMa...
import static com.google.cloud.spanner.r2dbc.SpannerConnectionFactoryProvider.DRIVER_NAME; import static com.google.cloud.spanner.r2dbc.SpannerConnectionFactoryProvider.INSTANCE; import static io.r2dbc.spi.ConnectionFactoryOptions.DATABASE; import static io.r2dbc.spi.ConnectionFactoryOptions.DRIVER; import static org.a...
/* * Copyright 2019-2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
.option(INSTANCE, DatabaseProperties.INSTANCE)
1
eriq-augustine/jocr
src/com/eriqaugustine/ocr/drivers/GridBreakup.java
[ "public class WrapImage {\n private static Logger logger = LogManager.getLogger(WrapImage.class.getName());\n\n private MagickImage internalImage;\n\n private int imageWidth;\n private int imageHeight;\n\n private Pixel[] cachePixels;\n // {<threshold>: discretePixels}\n private Map<Integer, boolean[]...
import com.eriqaugustine.ocr.image.WrapImage; import com.eriqaugustine.ocr.image.TextImage; import com.eriqaugustine.ocr.utils.FileUtils; import com.eriqaugustine.ocr.utils.FontUtils; import com.eriqaugustine.ocr.utils.ImageUtils;
package com.eriqaugustine.ocr.drivers; /** * Breakup an image. */ public class GridBreakup { private static final String BASE_OUT_DIR = "out"; private static final String OUT_PREFIX = "gridBreakup"; public static void main(String[] args) { if (args.length < 1) { System.err.println("USAGE: j...
WrapImage baseImage = WrapImage.getImageFromFile(args[0]);
0
tassioauad/GameCheck
app/src/main/java/com/tassioauad/gamecheck/model/api/asynctask/impl/GameSearchByPlatformAsyncTask.java
[ "public class AsyncTaskResult<T>\n{\n private T result;\n private Exception error;\n\n public AsyncTaskResult() {\n\n }\n\n public AsyncTaskResult(T result) {\n this.result = result;\n }\n\n public AsyncTaskResult(Exception error) {\n this.error = error;\n }\n\n public T get...
import android.content.Context; import com.tassioauad.gamecheck.model.api.asynctask.AsyncTaskResult; import com.tassioauad.gamecheck.model.api.asynctask.GenericAsyncTask; import com.tassioauad.gamecheck.model.api.asynctask.exception.BadRequestException; import com.tassioauad.gamecheck.model.api.resource.GameResource; i...
package com.tassioauad.gamecheck.model.api.asynctask.impl; public class GameSearchByPlatformAsyncTask extends GenericAsyncTask<Platform, Void, List<Game>> { private GameResource gameResource; private final String sort = "original_release_date:desc"; private final String format = "json"; public G...
return new AsyncTaskResult<>(new BadRequestException());
2
liying2008/neu-ipgw
app/src/main/java/com/liying/ipgw/activity/HdtvReviewActivity.java
[ "public class ProgressDialog extends android.app.ProgressDialog {\r\n private TextView tvLoadingMsg;\r\n private Context context;\r\n private String msg = \"\";\r\n public ProgressDialog(Context context, String msg) {\r\n super(context);\r\n this.context = context;\r\n this.msg = ms...
import android.app.AlertDialog; import com.liying.ipgw.dialog.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget.ExpandableListView; import android.widget.TextView; import com.liyi...
package com.liying.ipgw.activity; /** * ======================================================= * 作者:liying - liruoer2008@yeah.net * 日期:2017/3/15 23:16 * 版本:1.0 * 描述:回看节目列表Activity * 备注:由于选择的算法不好,导致在不同的时区情况下日期排序错乱 * ======================================================= */ public class HdtvRe...
String[] programInfo = intentData.getStringArrayExtra(Constants.PROGRAM);
6
nullpointerexceptionapps/TeamCityDownloader
java/com/raidzero/teamcitydownloader/activities/settings/SettingsMainActivity.java
[ "public class MainActivity extends ActionBarActivity implements NavigationDrawerFragment.NavigationDrawerCallbacks {\n\n private static final String tag = \"MainActivity\";\n\n public static AppHelper helper;\n\n private long lastBackPressTime = 0;\n\n private NavigationDrawerFragment mNavigationDrawerF...
import android.content.ActivityNotFoundException; import android.content.Intent; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.MenuItem; import com.raidzero.teamcityd...
package com.raidzero.teamcitydownloader.activities.settings; /** * Created by posborn on 6/24/14. */ public class SettingsMainActivity extends ActionBarActivity { @Override public void onCreate(Bundle savedInstanceState) { ThemeUtility.setAppTheme(this); super.onCreate(savedInstanceState)...
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(Common.gitHubUrl)));
2
terzerm/hover-raft
src/main/java/org/tools4j/hoverraft/state/CandidateState.java
[ "public interface ConsensusConfig {\n long minElectionTimeoutMillis();\n long maxElectionTimeoutMillis();\n long heartbeatTimeoutMillis();\n Optional<String> ipcMulticastChannel();\n int serverCount();\n ServerConfig serverConfig(int index);\n int sourceCount();\n SourceConfig sourceConfig(i...
import org.tools4j.hoverraft.config.ConsensusConfig; import org.tools4j.hoverraft.event.EventHandler; import org.tools4j.hoverraft.message.AppendRequest; import org.tools4j.hoverraft.message.VoteRequest; import org.tools4j.hoverraft.message.VoteResponse; import org.tools4j.hoverraft.server.ServerContext; import org.too...
/** * The MIT License (MIT) * * Copyright (c) 2016-2017 hover-raft (tools4j), Marco Terzer * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limi...
public Transition onVoteResponse(final ServerContext serverContext, final VoteResponse voteResponse) {
4
DmitryMalkovich/gito-github-client
app/src/main/java/com/dmitrymalkovich/android/githubanalytics/data/source/local/GithubAnalyticsDbHelper.java
[ "public class ClonesContract {\n public static final String CONTENT_AUTHORITY = \"com.dmitrymalkovich.android.githubanalytics.data\";\n public static final String PATH_CLONES = \"traffic.clones\";\n private static final Uri BASE_CONTENT_URI = Uri.parse(\"content://\" + CONTENT_AUTHORITY);\n public stati...
import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import com.dmitrymalkovich.android.githubanalytics.data.source.local.contract.ClonesContract; import com.dmitrymalkovich.android.githubanalytics.data.source.local.contract.ReferrerContract; im...
/* * Copyright 2017. Dmitry Malkovich * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agr...
final String SQL_CREATE_TRENDING_TABLE = "CREATE TABLE " + TrendingContract.TrendingEntry.TABLE_NAME
4
mechero/code-quality-game
sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/stats/service/SonarStatsServiceImpl.java
[ "public enum BadgeDetails {\n\n EARLY_BIRD(\"Early Bird\", \"You're an early adopter of the game\"),\n UNIT_TESTER_PAPER(\"Paper Unit Tester\", \"You covered legacy code with at least 1 Unit Test\"),\n UNIT_TESTER_BRONZE(\"Bronze Unit Tester\", \"You covered legacy code with at least 10 Unit Tests\"),\n ...
import com.thepracticaldeveloper.devgame.modules.badges.domain.BadgeDetails; import com.thepracticaldeveloper.devgame.modules.badges.domain.SonarBadge; import com.thepracticaldeveloper.devgame.modules.stats.domain.SeverityType; import com.thepracticaldeveloper.devgame.modules.stats.domain.SonarStatsRow; import com.thep...
package com.thepracticaldeveloper.devgame.modules.stats.service; @Service final class SonarStatsServiceImpl implements SonarStatsService { private static final Log log = LogFactory.getLog(SonarStatsServiceImpl.class); private final UserMongoRepository userRepository; private final ScoreCardMongoReposit...
public List<SonarStatsRow> getSortedStatsPerUser() {
3
tevjef/Vapor
vapor-app/src/main/java/com/tevinjeffrey/vapor/okcloudapp/CloudAppService.java
[ "public class AccountModel {\n\n private static final String TAG = \"AccountModel\";\n private long id;\n private String email;\n private String domain;\n private String domain_home_page;\n private boolean private_items;\n private boolean subscribed;\n private String subscription_expires_at;...
import com.squareup.okhttp.RequestBody; import com.tevinjeffrey.vapor.okcloudapp.model.AccountModel; import com.tevinjeffrey.vapor.okcloudapp.model.AccountStatsModel; import com.tevinjeffrey.vapor.okcloudapp.model.CloudAppJsonAccount; import com.tevinjeffrey.vapor.okcloudapp.model.CloudAppJsonItem; import com.tevinjeff...
package com.tevinjeffrey.vapor.okcloudapp; public interface CloudAppService { @Headers("Accept: application/json") @GET("/{item-id}")
Observable<ItemModel> getItem(@Path("item-id") String itemId);
4
jasonbaldridge/maul
src/main/java/edu/berkeley/nlp/lm/ArrayEncodedProbBackoffLm.java
[ "public class Counter<E> implements Serializable\n{\n\tprivate static final long serialVersionUID = 1L;\n\n\tprivate final Map<E, Double> entries;\n\n\tprivate boolean dirty = true;\n\n\tprivate double cacheTotal = 0.0;\n\n\tprivate double defaultCount = 0.0;\n\n\tpublic double getDefaultCount() {\n\t\treturn defau...
import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Random; import edu.berkeley.nlp.lm.collections.Counter; import edu.berkeley.nlp.lm.map.ContextEncodedNgramMap; import edu.berkeley.nlp.lm.map.NgramMap; import edu.berkeley.nlp.lm.values.ProbBackoffValueContainer; import edu...
package edu.berkeley.nlp.lm; /** * Language model implementation which uses Kneser-Ney-style backoff * computation. * * Note that unlike the description in Pauls and Klein (2011), we store trie for * which the first word in n-gram points to its prefix for this particular * implementation. This is in contrast ...
private final NgramMap<ProbBackoffPair> map;
2
davidbecker/taloonerrl
core/src/main/java/de/brainstormsoftworks/taloonerrl/core/engine/InputSystem.java
[ "public class CursorComponent extends Component {\n\n}", "public class HighlightAbleComponent extends PooledComponent implements IDisposableInstance {\n\tpublic static final int HIGHLIGHT_STYLE_NONE = 0;\n\tpublic static final int HIGHLIGHT_STYLE_BLINKING = 1;\n\tpublic static final int HIGHLIGHT_STYLE_STATIC = 2...
import java.util.ArrayList; import com.artemis.Aspect; import com.artemis.EntitySubscription; import com.artemis.utils.IntBag; import com.badlogic.gdx.Input.Buttons; import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.InputAdapter; import com.badlogic.gdx.math.Vector3; import de.brainstormsoftworks.taloonerrl.c...
/******************************************************************************* * Copyright (c) 2015-2018 David Becker. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v2.0 * which accompanies this distribution, and is available at ...
.get(Aspect.all(PositionComponent.class, PlayerComponent.class));
2
kwanghoon/MySmallBasic
MySmallBasic/src/com/coducation/smallbasic/test/RegressionTest.java
[ "public class BlockStmt extends Stmt\r\n{\r\n\t\tpublic BlockStmt(ArrayList<Stmt> stmts) \r\n\t\t{\r\n\t\t\tsuper();\r\n\t\t\tthis.stmts = stmts;\r\n\t\t} // Builder\r\n\t\t\r\n\t\tpublic Result evalStmt(Env env) throws Exception {\r\n\t\t\tResult res = null;\r\n\t\t\t\r\n\t\t\tfor(int size = 0; size < stmts.size()...
import static org.junit.Assert.*; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Set; import org.junit.Test; import com.coducation.smallbasic.BlockStmt; import com.coducation.smallbasic.BB...
package com.coducation.smallbasic.test; public class RegressionTest { @Test public void test() { File dir = new File(".//Sample/"); File[] files = dir.listFiles(); int Total = files.length; int count = 0; for (File file : files) { try { String Filename = file.getAbsolutePath(); Syst...
if (stack.getTree() instanceof BlockStmt) {
0
apache/karaf-cave
deployer/service/src/main/java/org/apache/karaf/cave/deployer/service/management/DeployerMBeanService.java
[ "public class Bundle {\n\n private String id;\n private String name;\n private String version;\n private String state;\n private int startLevel;\n\n public String getId() {\n return id;\n }\n\n public void setId(String id) {\n this.id = id;\n }\n\n public int getStartLeve...
import org.apache.karaf.cave.deployer.Bundle; import org.apache.karaf.cave.deployer.Connection; import org.apache.karaf.cave.deployer.DeployerService; import org.apache.karaf.cave.deployer.Feature; import org.apache.karaf.cave.deployer.FeaturesRepository; import org.osgi.service.component.annotations.Component; import ...
/* * 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 writing, software * distrib...
CompositeType bundleType = new CompositeType("Bundle", "A bundle on the remote instance",
0
davidmoten/rxjava2-jdbc
rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/pool/NonBlockingConnectionPool.java
[ "public interface ConnectionProvider {\n\n /**\n * Returns a new {@link Connection} (perhaps from a Connection pool).\n * \n * @return a new Connection to a database\n */\n @Nonnull\n Connection get();\n\n /**\n * Closes the connection provider and releases its resources. For example...
import java.sql.Connection; import java.util.Optional; import java.util.Properties; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; import javax.sql.DataSourc...
* Sets the health check for a Connection in the pool that is run only if the * time since the last checkout of this Connection finished is more than * idleTimeBeforeHealthCheck and a checkout of this Connection has just been * requested. * * @param sql * ...
public Single<Member<Connection>> member() {
6
R2RML-api/R2RML-api
r2rml-api-rdf4j-binding/src/test/java/rdf4jTest/PredicateObjectMap_Test.java
[ "public class RDF4JR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static RDF4JR2RMLMappingManager INSTANCE = new RDF4JR2RMLMappingManager(new RDF4J());\n\n private RDF4JR2RMLMappingManager(RDF4J rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod...
import java.io.InputStream; import java.util.Collection; import java.util.Iterator; import eu.optique.r2rml.api.binding.rdf4j.RDF4JR2RMLMappingManager; import eu.optique.r2rml.api.model.impl.SQLBaseTableOrViewImpl; import org.junit.Assert; import org.junit.Test; import org.eclipse.rdf4j.model.Model; import org....
/******************************************************************************* * Copyright 2013, the Optique Consortium * 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...
SQLBaseTableOrViewImpl ta= (SQLBaseTableOrViewImpl) table;
1
byhieg/easyweather
app/src/main/java/com/weather/byhieg/easyweather/city/ProvinceFragment.java
[ "public class MyApplication extends Application{\n\n private static MyApplication mcontext;\n public static DaoMaster daoMaster;\n public static DaoSession daoSession;\n public static LocationClient mLocationClient;\n\n\n private static final String cityUrl = \"https://free-api.heweather.com/\";\n ...
import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ListView; import android.widget.Toast; import com.weather.byhieg.easyweather.MyApplication; import com.w...
package com.weather.byhieg.easyweather.city; /** * A simple {@link Fragment} subclass. */ public class ProvinceFragment extends BaseFragment implements CityContract.ProvinceView{ public static final String TAG = "com.weather.byhieg.easyweather.city.ProvinceFragment"; private List<ProvinceContext> prov...
adapter = new ProvinceListAdapter(provinces, MyApplication.getAppContext());
0
SEMERU-WM/ChangeScribe
CommitSummarizer/CommitSummarizer.core/src/main/java/co/edu/unal/colswe/changescribe/core/textgenerator/phrase/MethodPhraseGenerator.java
[ "public class Constants {\n\n\tpublic static final String RENAME = \"RENAME\";\n\tpublic static final String TREE = \"^{tree}\";\n\tpublic static final String DELETE = \"DELETE\";\n\tpublic static final String REMOVE = \"REMOVE\";\n\tpublic static final String ADD = \"ADD\";\n\tpublic static final String MODIFY = \...
import java.util.LinkedList; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.eclipse.jdt.core.dom.MethodDeclaration; import org.eclipse.jdt.core.dom.SingleVariableDeclaration; import org.eclipse.jdt.core.dom.TypeDeclaration; import co.edu.unal.colswe.changescribe.core.Constants; import co...
package co.edu.unal.colswe.changescribe.core.textgenerator.phrase; public class MethodPhraseGenerator implements PhraseGenerator { private MethodDeclaration method; private final StereotypedElement element; private String type; private String phraseString; private LinkedList<Parameter> parameters = new Linke...
final LinkedList<TaggedTerm> taggedMethod = POSTagger.tag(Tokenizer.split(getMethod().getName().getFullyQualifiedName()));
6
bingyulei007/bingexcel
excel/src/main/java/com/bing/excel/converter/collections/CollectionConverter.java
[ "public interface FieldValueConverter extends ConverterMatcher {\n\t OutValue toObject(Object source,ConverterHandler converterHandler);\n\t Object fromString(String cell,ConverterHandler converterHandler,Type targetType);\n}", "public interface ConverterHandler {\n\n\t\n\t/**\n\t * Get default FieldConverter w...
import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; import com.bing.excel.converter.FieldValueConverter; import com.bing.excel.core.handler....
package com.bing.excel.converter.collections; /** * @author shizhongtao * * date 2016-3-24 * Description: */ // TODO 等待完善 @Deprecated public class CollectionConverter extends AbstractFieldConvertor { private final String splitCharacter; public final static String SPACE_SPLIT=" "; public final static String...
throw new ConversionException("can find the converter for type ["
2
UWFlow/flow-android
src/com/uwflow/flow_android/fragment/CourseScheduleFragment.java
[ "public class CourseClassListAdapter extends BaseAdapter {\n private List<Section> mClasses;\n private Context mContext;\n\n public CourseClassListAdapter(List<Section> classes, Context context) {\n mClasses = classes;\n mContext = context;\n }\n\n public int getCount() {\n retur...
import android.graphics.Typeface; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.*; import com.crashlytics.android.Crashlytics; import com.uwflow.flow_android.R; import com.uwflow.flow_android.adapters...
package com.uwflow.flow_android.fragment; /** * Created by jasperfung on 2/21/14. */ public class CourseScheduleFragment extends TrackedFragment { private static final String TAG = "CourseScheduleFragment"; private String mCourseID; private LinearLayout mScheduleContainer; private TableLayout mCla...
FlowApiRequests.getCourseSections(
5
philliphsu/ClockPlus
app/src/main/java/com/philliphsu/clock2/alarms/background/PendingAlarmScheduler.java
[ "@AutoValue\npublic abstract class Alarm extends ObjectWithId implements Parcelable {\n private static final int MAX_MINUTES_CAN_SNOOZE = 30;\n\n // =================== MUTABLE =======================\n private long snoozingUntilMillis;\n private boolean enabled;\n private final boolean[] recurringDa...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.philliphsu.clock2.alarms.Alarm; import com.philliphsu.clock2.alarms.data.AlarmCursor; import com.philliphsu.clock2.alarms.data.AlarmsTableManager; import com.philliphsu.clock2.alarms.misc.AlarmController;...
/* * Copyright 2017 Phillip Hsu * * This file is part of ClockPlus. * * ClockPlus 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...
AlarmCursor cursor = new AlarmsTableManager(context).queryItem(id);
1
kovertopz/Paulscode-SoundSystem
src/main/java/paulscode/sound/codecs/CodecJSpeex.java
[ "public interface ICodec\n{\n/**\n * Should tell derived classes when they may need to reverse the byte order of\n * the data before returning it in the read() and readAll() methods. The\n * reason for the reversBytOrder method is because some external codec\n * libraries produce audio data in a format that some e...
import java.io.DataInputStream; import java.io.EOFException; import java.io.InputStream; import java.io.IOException; import java.net.URL; import javax.sound.sampled.AudioFormat; import paulscode.sound.ICodec; import paulscode.sound.SoundBuffer; import paulscode.sound.SoundSystemConfig; import paulscode.sound.SoundSyste...
package paulscode.sound.codecs; /** * The CodecJSpeex class provides an ICodec interface for reading from * files encoded by Speex. *<b><i> SoundSystem CodecJSpeex Class License:</b></i><br><b><br> * You are free to use this class for any purpose, commercial or otherwise. * You may modify this class or...
private SpeexDecoder speexDecoder;
4
free-iot/freeiot-android
app/src/main/java/com/pandocloud/freeiot/ui/helper/ProductInfoHelper.java
[ "public class ProductApi extends AbsOpenApi {\n\t\n\t/**\n\t * get product info\n\t */\n\tprivate static final String PRODUCT_INFO = \"/v1/product/info\";\n\t\n\n\t/**\n\t * get product information by product key\n\t * \n\t * <p>Method: GET</p>\n\t * @param context\n\t * @param productKey\n\t * @param responseHandl...
import com.pandocloud.android.api.interfaces.RequestListener; import com.pandocloud.freeiot.api.ProductApi; import com.pandocloud.freeiot.ui.app.AppConstants; import com.pandocloud.freeiot.ui.app.ProductInfoPrefs; import com.pandocloud.freeiot.ui.bean.ProductInfo; import com.pandocloud.freeiot.ui.bean.http.ProductInfoR...
package com.pandocloud.freeiot.ui.helper; public class ProductInfoHelper { private RequestListener listener; public ProductInfoHelper(RequestListener listener) { if (listener == null) { throw new IllegalArgumentException("ReuqestListener not allow be null..."); } this.listener = listener; } pub...
ProductApi.getProductInfo(context, AppConstants.PRODUCT_KEY, new BaseJsonHttpResponseHandler<ProductInfoResponse>() {
1
GamingMesh/Jobs
src/main/java/com/gamingmesh/jobs/PlayerManager.java
[ "public class ConfigManager {\n private static JobsConfiguration config;\n private static JobConfig jobConfig;\n \n public static JobsConfiguration getJobsConfiguration() {\n return config;\n }\n \n public static void registerJobsConfiguration(JobsConfiguration c) {\n config = c;\...
import com.gamingmesh.jobs.container.JobProgression; import com.gamingmesh.jobs.container.JobsPlayer; import com.gamingmesh.jobs.container.Title; import com.gamingmesh.jobs.dao.JobsDAO; import com.gamingmesh.jobs.i18n.Language; import com.gamingmesh.jobs.util.ChatColor; import java.util.ArrayList; import java.util.Coll...
Jobs.getJobsDAO().quitJob(jPlayer, job); Jobs.leaveSlot(job); } } /** * Causes player to leave all their jobs * @param jPlayer */ public void leaveAllJobs(JobsPlayer jPlayer) { synchronized (jPlayer.saveLock) { for (JobProgression job :...
Title oldTitle = ConfigManager.getJobsConfiguration().getTitleForLevel(oldLevel);
4
jchampemont/WTFDYUM
src/main/java/com/jeanchampemont/wtfdyum/service/impl/UserServiceImpl.java
[ "public class Event {\n\n public Event() {\n // left deliberately empty\n }\n\n public Event(final EventType type, final String additionalData) {\n this.type = type;\n this.additionalData = additionalData;\n }\n\n private EventType type;\n\n private String additionalData;\n\n ...
import java.util.Set; import com.jeanchampemont.wtfdyum.dto.Event; import com.jeanchampemont.wtfdyum.dto.Feature; import com.jeanchampemont.wtfdyum.dto.type.EventType; import com.jeanchampemont.wtfdyum.dto.type.UserLimitType; import com.jeanchampemont.wtfdyum.service.FeatureService; import com.jeanchampemont.wtfdyum.se...
/* * Copyright (C) 2015, 2016 WTFDYUM * * This file is part of the WTFDYUM project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *...
final RedisTemplate<String, Feature> featureRedisTemplate,
1
KasperFranz/BetterChunkLoader
src/main/java/guru/franz/mc/bcl/command/BCL.java
[ "@Plugin(id = BetterChunkLoaderPluginInfo.ID,\n name = BetterChunkLoaderPluginInfo.NAME,\n description = BetterChunkLoaderPluginInfo.DESCRIPTION,\n version = BetterChunkLoaderPluginInfo.VERSION,\n authors = BetterChunkLoaderPluginInfo.AUTHORS\n)\npublic class BetterChunkLoader {\n\n p...
import guru.franz.mc.bcl.BetterChunkLoader; import guru.franz.mc.bcl.BetterChunkLoaderPluginInfo; import guru.franz.mc.bcl.utils.Messages; import guru.franz.mc.bcl.utils.Messenger; import guru.franz.mc.bcl.utils.Permission; import org.spongepowered.api.command.CommandResult; import org.spongepowered.api.command.Command...
package guru.franz.mc.bcl.command; public class BCL implements CommandExecutor { @Override public CommandResult execute(CommandSource commandSource, CommandContext commandContext) { if (!BetterChunkLoader.instance().enabled) {
commandSource.sendMessage(Text.builder(Messages.PLUGIN_DISABLED_DATASTORE).color(Messenger.ERROR_COLOR).build());
2
gems-uff/prov-viewer
src/main/java/br/uff/ic/provviewer/Layout/ProvViewerLayout.java
[ "public class VariableNames {\n public static String CollapsedVertexAgentAttribute = \"Agents\";\n public static String CollapsedVertexActivityAttribute = \"Activities\";\n public static String CollapsedVertexEntityAttribute = \"Entities\";\n public static String GraphFile = \"GraphFile\";\n public s...
import edu.uci.ics.jung.algorithms.util.IterativeContext; import edu.uci.ics.jung.graph.DirectedGraph; import edu.uci.ics.jung.graph.Graph; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import br.u...
/* * The MIT License * * Copyright 2017 Kohwalter. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modif...
if (v instanceof AgentVertex
3
javaBin/AndroiditoJZ12
android/src/main/java/com/google/android/apps/iosched/io/BlocksHandler.java
[ "public class ScheduleContract {\n\n /**\n * Special value for {@link SyncColumns#UPDATED} indicating that an entry\n * has never been updated, or doesn't exist yet.\n */\n public static final long UPDATED_NEVER = -2;\n\n /**\n * Special value for {@link SyncColumns#UPDATED} indicating that...
import static com.google.android.apps.iosched.util.LogUtils.LOGE; import static com.google.android.apps.iosched.util.LogUtils.LOGV; import static com.google.android.apps.iosched.util.LogUtils.makeLogTag; import android.content.ContentProviderOperation; import android.content.Context; import com.google.android.apps.iosc...
/* * Copyright 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
long startTimeL = ParserUtils.parseTime(startTime);
2
koendeschacht/count-db
src/main/java/be/bagofwords/db/filedb/FileDataInterface.java
[ "public abstract class CoreDataInterface<T> extends BaseDataInterface<T> {\n\n protected final UpdateListenerCollection<T> updateListenerCollection = new UpdateListenerCollection<>();\n\n public CoreDataInterface(String name, Class<T> objectClass, Combinator<T> combinator, ObjectSerializer<T> objectSerializer...
import be.bagofwords.db.CoreDataInterface; import be.bagofwords.db.combinator.Combinator; import be.bagofwords.db.impl.DBUtils; import be.bagofwords.db.methods.DataStream; import be.bagofwords.db.methods.DataStreamUtils; import be.bagofwords.db.methods.KeyFilter; import be.bagofwords.db.methods.ObjectSerializer; import...
return keysInFileIt.next(); } else { return null; } } }); } @Override public long freeMemory() { MutableLong totalBytesReleased = new MutableLong(0); ifNotClosed(() -> { for (FileBucket ...
if (DBUtils.DEBUG && numOfFilesRewritten > 0) {
2
ShprAlex/SproutLife
src/com/sproutlife/model/step/Step.java
[ "public class Settings {\n HashMap<String, Object> settings;\n\n public static String SEED_TYPE = \"seedType\";\n public static String LIFE_MODE = \"competitiveMode\";\n public static String MUTATION_ENABLED = \"mutationEnabled\";\n public static String MUTATION_RATE = \"mutationRate\";\n public s...
import java.util.Collection; import com.sproutlife.Settings; import com.sproutlife.model.GameModel; import com.sproutlife.model.Stats; import com.sproutlife.model.echosystem.Board; import com.sproutlife.model.echosystem.Echosystem; import com.sproutlife.model.echosystem.Organism;
/******************************************************************************* * Copyright (c) 2016 Alex Shapiro - github.com/shpralex * This program and the accompanying materials * are made available under the terms of the The MIT License (MIT) * The above copyright notice and this permission notice shall be in...
public Stats getStats() {
2
assist-group/assist-mcommerce-sdk-android
sdk/src/main/java/ru/assisttech/sdk/processor/AssistRecurrentPayProcessor.java
[ "public class AssistPaymentData {\n\n private Map<String, String> values;\n private String merchantID;\n private String login;\n private String password;\n private PrivateKey privateKey;\n private List<AssistOrderItem> orderItems;\n private String link;\n\n public AssistPaymentData() {\n ...
import android.content.Context; import android.util.Log; import android.util.Xml; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util....
package ru.assisttech.sdk.processor; public class AssistRecurrentPayProcessor extends AssistBaseProcessor { public static final String TAG = AssistRecurrentPayProcessor.class.getSimpleName(); public AssistRecurrentPayProcessor(Context context, AssistProcessorEnvironment environment) { super(conte...
AssistPaymentData data = getEnvironment().getData();
0
e-gov/AJ
filter/src/main/java/ee/ria/dumonitor/filter/XRoadInterceptorServlet.java
[ "public enum Property implements PropertyHolder {\n\n FILTER_CONFIGURATION_FILE(\"dumonitor.filter.configuration.file\"),\n TURVASERVER_URL(\"dumonitor.filter.turvaserver.url\"),\n ANDMEKOGU_URL(\"dumonitor.filter.andmekogu.url\"),\n TURVASERVER_INTERCEPTOR_PATH(\"dumonitor.filter.turvaserver.interceptor.path\"...
import ee.ria.dumonitor.filter.http.HttpStatus; import ee.ria.dumonitor.filter.processor.MessageProcessorQueue; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.InputStream; import java.net.Http...
/* * MIT License * Copyright (c) 2016 Estonian Information System Authority (RIA) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the...
HttpURLConnection connection = HttpUtil.openConnection(url);
2
Techjar/VivecraftForgeExtensions_110
src/main/java/com/techjar/vivecraftforge/network/packet/PacketVersion.java
[ "public class Config {\n\tpublic static Configuration config;\n\tpublic static boolean vrOnly;\n\tpublic static double vrOnlyKickDelay;\n\tpublic static boolean printMoney;\n\tpublic static String vrOnlyKickMessage;\n\tpublic static boolean enableJoinMessages;\n\tpublic static String joinMessageVR;\n\tpublic static...
import com.google.common.base.Charsets; import com.techjar.vivecraftforge.Config; import com.techjar.vivecraftforge.VivecraftForge; import com.techjar.vivecraftforge.network.IPacket; import com.techjar.vivecraftforge.util.MessageFormatter; import com.techjar.vivecraftforge.util.PlayerTracker; import com.techjar.vivecra...
package com.techjar.vivecraftforge.network.packet; /* * Why the fuck does the client want a length-prefixed string, but sends * a string that's just char bytes with no length prefix? This whole * protocol is an awful mess. I didn't write it, so don't blame me. */ public class PacketVersion implements IPacket { p...
VivecraftForgeLog.info("VR player joined: %s", message);
6
zeevy/grblcontroller
app/src/main/java/in/co/gorest/grblcontroller/ui/ConsoleTabFragment.java
[ "public class IconButton extends Button implements HasOnViewAttachListener {\n\n private HasOnViewAttachListenerDelegate delegate;\n\n public IconButton(Context context) {\n super(context);\n init();\n }\n\n public IconButton(Context context, AttributeSet attrs) {\n super(context, a...
import android.app.AlertDialog; import android.content.DialogInterface; import androidx.databinding.DataBindingUtil; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.appcompat.widget.S...
/* * /** * * Copyright (C) 2017 Grbl Controller Contributors * * * * 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) any...
recyclerView.addOnScrollListener(new EndlessRecyclerViewScrollListener(linearLayoutManager) {
4
mgilangjanuar/GoSCELE
app/src/main/java/com/mgilangjanuar/dev/goscele/modules/course/provider/CourseDetailProvider.java
[ "public abstract class BaseProvider extends AsyncTask<String, Integer, List<Elements>> {\n\n protected Map<String, String> cookies = new HashMap<>();\n\n public BaseProvider() {\n super();\n }\n\n @Override\n @Deprecated\n protected List<Elements> doInBackground(String... params) {\n ...
import android.text.TextUtils; import com.mgilangjanuar.dev.goscele.base.BaseProvider; import com.mgilangjanuar.dev.goscele.modules.common.model.CookieModel; import com.mgilangjanuar.dev.goscele.modules.course.adapter.CourseDetailRecyclerViewAdapter; import com.mgilangjanuar.dev.goscele.modules.course.listener.CourseDe...
package com.mgilangjanuar.dev.goscele.modules.course.provider; /** * Created by mgilangjanuar (mgilangjanuar@gmail.com) * * @since 2017 */ public class CourseDetailProvider extends BaseProvider { private String url;
private CourseDetailListener listener;
3
keeps/roda-in
src/main/java/org/roda/rodain/core/sip/creators/SipPreviewCreator.java
[ "public class ConfigurationManager {\n private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationManager.class.getName());\n\n private static final Path rodainPath = computeRodainPath();\n private static Path schemasPath, templatesPath, logPath, metadataPath, helpPath, externalConfigPath,\n ex...
import java.io.File; import java.io.IOException; import java.nio.file.AccessDeniedException; import java.nio.file.FileSystems; import java.nio.file.FileVisitResult; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.PathMatcher; import java.nio.file.Paths; import java.nio.file.SimpleFileVisitor...
package org.roda.rodain.core.sip.creators; /** * @author Andre Pereira apereira@keep.pt * @since 20-10-2015. */ public class SipPreviewCreator extends Observable implements TreeVisitor { private static final Logger LOGGER = LoggerFactory.getLogger(SipPreviewCreator.class.getName()); private String startPath; ...
protected MetadataOption metadataOption;
2
maeln/LambdaHindleyMilner
src/test/java/inference/TypeEnvTest.java
[ "public class Variable extends Expression {\n\tprivate String name;\n\n\tpublic Variable(String name) {\n\t\tthis.name = name;\n\t}\n\n\tpublic String getName() {\n\t\treturn name;\n\t}\n\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}\n\n\n\t@Override\n\tpublic Type infer(TypeInferenceEnv env) {\...
import ast.Variable; import inference.environements.TypeEnv; import org.junit.Test; import types.Scheme; import types.TVariable; import types.Type; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import static types.Scheme.forall; import static org.junit.Assert.*...
package inference; /** * Created by valentin on 24/10/2016. */ public class TypeEnvTest { private String name = "TEST"; private int n = 10; @Test public void createTypeEnv() throws Exception {
TypeEnv result = singleton(new Variable(name), forall(variable(name)));
0
indywidualny/Centrum.fm
app/src/main/java/org/indywidualni/centrumfm/fragment/MainFragment.java
[ "public class MyApplication extends Application {\n\n private static Context mContext;\n private Tracker mTracker;\n\n public static Context getContextOfApplication() {\n return mContext;\n }\n\n @Override\n public void onCreate() {\n mContext = getApplicationContext();\n supe...
import android.database.sqlite.SQLiteConstraintException; import android.os.AsyncTask; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import...
package org.indywidualni.centrumfm.fragment; public class MainFragment extends TrackedFragment { private static final String TAG = MainFragment.class.getSimpleName(); private static final String DATA_PARCEL = "data_parcel";
private static List<Channel.Item> rssItems = new ArrayList<>();
3
digitalpetri/ethernet-ip
cip-core/src/main/java/com/digitalpetri/enip/cip/services/LargeForwardOpenService.java
[ "public class CipResponseException extends Exception {\n\n private final int generalStatus;\n private final int[] additionalStatus;\n\n public CipResponseException(int generalStatus, int[] additionalStatus) {\n this.generalStatus = generalStatus;\n this.additionalStatus = additionalStatus;\n ...
import com.digitalpetri.enip.cip.CipResponseException; import com.digitalpetri.enip.cip.epath.EPath.PaddedEPath; import com.digitalpetri.enip.cip.epath.LogicalSegment.ClassId; import com.digitalpetri.enip.cip.epath.LogicalSegment.InstanceId; import com.digitalpetri.enip.cip.structs.LargeForwardOpenRequest; import com.d...
package com.digitalpetri.enip.cip.services; public class LargeForwardOpenService implements CipService<LargeForwardOpenResponse> { public static final int SERVICE_CODE = 0x5B; private static final PaddedEPath CONNECTION_MANAGER_PATH = new PaddedEPath( new ClassId(0x06),
new InstanceId(0x01)
3
mojohaus/jaxb2-maven-plugin
src/main/java/org/codehaus/mojo/jaxb2/schemageneration/postprocessing/javadoc/JavaDocExtractor.java
[ "public class ClassLocation extends PackageLocation {\n\n // Internal state\n private String className;\n private String classXmlName;\n\n /**\n * Creates a new ClassLocation with the supplied package and class names.\n *\n * @param packageName The name of the package for a class potentiall...
import com.thoughtworks.qdox.JavaProjectBuilder; import com.thoughtworks.qdox.model.JavaAnnotatedElement; import com.thoughtworks.qdox.model.JavaAnnotation; import com.thoughtworks.qdox.model.JavaClass; import com.thoughtworks.qdox.model.JavaField; import com.thoughtworks.qdox.model.JavaMethod; import com.thoughtworks....
package org.codehaus.mojo.jaxb2.schemageneration.postprocessing.javadoc; /* * 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 fil...
final ClassLocation classLocation = new ClassLocation(packageName, simpleClassName, classXmlName);
0
lixiaocong/lxcCMS
src/main/java/com/lixiaocong/cms/config/WebMvcConfig.java
[ "public class BlogInterceptor extends HandlerInterceptorAdapter {\n\n private final IConfigService configService;\n\n public BlogInterceptor(IConfigService configService) {\n this.configService = configService;\n }\n\n @Override\n public boolean preHandle(HttpServletRequest request, HttpServle...
import com.lixiaocong.cms.interceptor.BlogInterceptor; import com.lixiaocong.cms.interceptor.DownloaderInterceptor; import com.lixiaocong.cms.interceptor.QQInterceptor; import com.lixiaocong.cms.interceptor.WeixinInterceptor; import com.lixiaocong.cms.service.IConfigService; import org.springframework.beans.factory.ann...
/* BSD 3-Clause License Copyright (c) 2016, lixiaocong(lxccs@iCloud.com) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright not...
registry.addInterceptor(new WeixinInterceptor(this.configService)).addPathPatterns("/weixin/**");
3
in-the-keyhole/khs-trouble-maker
src/main/java/khs/trouble/controller/TroubleController.java
[ "@Entity\n@Table(name = \"event\")\npublic class Event {\n\n\t@Id\n\t@GeneratedValue\n\t@Column(name = \"id\")\n\tprivate Long id;\n\n\t@Column(name = \"created\")\n\tprivate Date created;\n\n\t@Column(name = \"action\")\n\tprivate String action;\n\n\t@Column(name = \"description\", length = 500)\n\tprivate String ...
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.client.discovery.DiscoveryClient; import ...
package khs.trouble.controller; @Controller @RequestMapping(value = "/api") public class TroubleController { @Autowired TroubleService service; @Autowired
EventService eventService;
3
guiguito/AIRShare
shAIRe/src/main/java/com/ggt/airshare/httpserver/ShAIReHttpServer.java
[ "public class UrlShortener {\n\n private static UrlShortener mInstance;\n\n private static AQuery mAQuery;\n\n private static final String ERROR_MESSAGE = \"Url shortening failed\";\n\n private UrlShortener(Context context) {\n if (mAQuery == null) {\n mAQuery = new AQuery(context);\n ...
import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.text.TextUtils; import com.ggt.airshare.R; import com.ggt.airshare.urlshortener.UrlShortener; import com.ggt.airshare.urlshortener.UrlShortenerException; import com.ggt.airshare.urlshort...
package com.ggt.airshare.httpserver; /** * Sharing nano server . * * @author gduche */ public class ShAIReHttpServer extends NanoHTTPD implements UrlShortenerListener { private String mFilePath; private String mMimeType; private String mTextToShare; private Context mContext; private String ...
UrlShortenerException exception) {
1
Djonique/Birdays
app/src/main/java/com/djonique/birdays/database/DbFamous.java
[ "public class Person implements Item, Comparable<Person> {\n\n private String name, phoneNumber, email;\n private long date, timeStamp;\n private boolean yearUnknown;\n\n /**\n * Default constructor\n */\n public Person() {\n this.timeStamp = new Date().getTime();\n }\n\n /**\n ...
import android.content.ContentValues; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import com.djonique.birdays.R; import com.djonique.birdays.models.Person; import com.djonique.birdays.utils.Utils; import static com.djonique.birdays.database.DbHelper.COLUMN_DATE; import static com.djon...
/* * Copyright 2017 Evgeny Timofeev * * 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 ...
cv.put(COLUMN_NAME, person.getName());
3
lukaspili/Volley-Ball
samples/src/main/java/com/siu/android/volleyball/samples/activity/scenarios/Scenario2Activity.java
[ "@SuppressWarnings(\"rawtypes\")\npublic class BallRequestQueue { //extends RequestQueue {\n\n /**\n * Used for generating monotonically-increasing sequence numbers for requests.\n */\n private AtomicInteger mSequenceGenerator = new AtomicInteger();\n\n /**\n * Staging area for requests that al...
import com.siu.android.volleyball.BallRequestQueue; import com.siu.android.volleyball.samples.volley.fake.FakeCache; import com.siu.android.volleyball.samples.volley.fake.FakeNetwork; import com.siu.android.volleyball.samples.volley.request.ScenarioRequest; import com.siu.android.volleyball.toolbox.VolleyBall; import c...
package com.siu.android.volleyball.samples.activity.scenarios; /** * Scenario 2 * <p/> * 1. Start the request * 2. Cache thread hits and returns a valid response -> post a final response * 3. Local thread returns valid response -> ignored * 4. End */ public class Scenario2Activity extends ScenarioActivity { ...
return VolleyBall.newRequestQueue(new VolleyBallConfig.Builder(this)
4
kravchik/senjin
src/main/java/yk/senjin/examples/specular/WatchSpecular.java
[ "public class DrawIndicesShort extends AbstractState {\n private ShortBuffer indexBuffer;\n /**\n * Specifies what kind of primitives to render. Symbolic constants\n * GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP,\n * GL_TRIANGLE_FAN, GL_TRIANGLES, GL_QUAD_STRIP, GL_QUADS, a...
import org.lwjgl.LWJGLException; import yk.jcommon.fastgeom.Vec2f; import yk.jcommon.fastgeom.Vec3f; import yk.senjin.DrawIndicesShort; import yk.senjin.Simple3DWatch; import yk.senjin.SomeTexture; import yk.senjin.shaders.gshader.GProgram; import yk.senjin.vbo.AVboTyped; import static org.lwjgl.opengl.GL11.GL_TRIANGLE...
package yk.senjin.examples.specular; /** * Created with IntelliJ IDEA. * User: yuri * Date: 22/10/15 * Time: 21:06 */ public class WatchSpecular extends Simple3DWatch { public WatchSpecular(int w, int h, boolean createThread) throws LWJGLException { super(w, h, createThread); } public stat...
public SomeTexture texture;
2
autentia/wadl-tools
spring-wadl-generator/src/test/java/com/autentia/web/rest/wadl/builder/namespace/GrammarsDiscovererTest.java
[ "public class Contact {\n\n public static final String EXPECTED_SCHEMA = \"<?xml version=\\\"1.0\\\" standalone=\\\"yes\\\"?>\\n\" +\n \"<xs:schema version=\\\"1.0\\\" xmlns:xs=\\\"http://www.w3.org/2001/XMLSchema\\\">\\n\" +\n '\\n' +\n \" <xs:complexType name=\\\"contact\\\">\...
import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.isIn; import static org.junit.Assert.assertThat; import static org.mockito.Mockito.*; import com.autentia.dummy.Contact; import com.autentia.dummy.ContactAnnotated; import com.autentia.dummy.ContactAnnotatedWithDifferentName; im...
/** * Copyright 2013 Autentia Real Business Solution S.L. * * 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 * * Unl...
new ClassMetadataFromClass(String.class),
4
sidoh/reactor_simulator
src/main/java/org/sidoh/reactor_simulator/simulator/BigReactorSimulator.java
[ "public class CoolantTemperatureMonitor extends TimeSeriesSimulationMonitor {\n @Override\n public double extractValue(MultiblockReactorSimulator simulator) {\n return simulator.getCoolantTemperature();\n }\n\n @Override\n public void report(TimeSeriesMonitor monitor, ReactorResult result) {\n result.set...
import java.util.Arrays; import java.util.List; import erogenousbeef.bigreactors.api.IHeatEntity; import erogenousbeef.bigreactors.api.registry.ReactorConversions; import erogenousbeef.bigreactors.api.registry.ReactorInterior; import erogenousbeef.bigreactors.api.registry.TurbineCoil; import erogenousbeef.bigreactors.c...
package org.sidoh.reactor_simulator.simulator; public class BigReactorSimulator { private boolean activelyCooled; private static final String OUR_10X10 = "E E E E E E E E" + "E E X E E X E E" + "E X X X X X X E" + "E E X D D X E E" + "E E X D D X E E" + "...
factoryOf(ReactorHeatMonitor.class)
6
onyxbits/TradeTrax
src/main/java/de/onyxbits/tradetrax/pages/edit/LiquidateEditor.java
[ "@Import(stylesheet = \"context:layout/layout.css\")\npublic class Layout {\n\n\t/**\n\t * Use with @SessionAttribute to set the default value of the searchbox. This\n\t * suggestion should be changed whenever the user is saving a stock related\n\t * form that redirects to another page from which the id of the edit...
import java.text.ParseException; import java.util.Date; import org.apache.tapestry5.alerts.AlertManager; import org.apache.tapestry5.alerts.Duration; import org.apache.tapestry5.alerts.Severity; import org.apache.tapestry5.annotations.Component; import org.apache.tapestry5.annotations.Import; import org.apache.tapestry...
package de.onyxbits.tradetrax.pages.edit; @Import(library = "context:js/mousetrap.min.js") public class LiquidateEditor {
@SessionAttribute(Layout.FOCUSID)
0
philliphsu/ClockPlus
app/src/main/java/com/philliphsu/clock2/alarms/ui/AlarmsFragment.java
[ "@AutoValue\npublic abstract class Alarm extends ObjectWithId implements Parcelable {\n private static final int MAX_MINUTES_CAN_SNOOZE = 30;\n\n // =================== MUTABLE =======================\n private long snoozingUntilMillis;\n private boolean enabled;\n private final boolean[] recurringDa...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.content.Loader; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.philliphsu.bottomsheetpickers.ti...
/* * Copyright 2017 Phillip Hsu * * This file is part of ClockPlus. * * ClockPlus 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...
private AsyncAlarmsTableUpdateHandler mAsyncUpdateHandler;
3
cs2103jan2015-w13-3j/main
src/udo/logic/command/AddCommand.java
[ "public class Logic {\n private Gui gui;\n private static Logic logicObj = null;\n private Storage storage;\n private Reminder reminder;\n\n private static final String ERR_FORMAT = \"Error: %s\";\n public static final String ERR_INVALID_CMD_NAME = \"invalid command name\";\n public static fina...
import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import udo.logic.Logic; import udo.storage.Task; import udo.storage.Task.TaskType; import udo.util.Config; import udo.util.Config.CommandName;
package udo.logic.command; //@author A0093587M public class AddCommand extends Command { public static final String STATUS_ADDED = "Task: %s added successfully"; private static final Logger log = Logger. getLogger(AddCommand.class.getName()); public AddCommand() { super(); s...
Date[] deadlines = getOption(Config.OPT_DEADLINE).dateArgument;
3
sathipal/lwm2m_over_mqtt
src/leshan/server/mqtt/LeshanServer.java
[ "public class Client {\n\n private static final long DEFAULT_LIFETIME_IN_SEC = 86400L;\n\n private static final String DEFAULT_LWM2M_VERSION = \"1.0\";\n\n private final Date registrationDate;\n\n private InetAddress address;\n\n private int port;\n\n /*\n * The address of the LWM2M Server's C...
import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.HashSet; import java.util.Set; import leshan.core.objectspec.Resources; import leshan.core.response.ClientResponse; import leshan.core.response.ExceptionConsumer; import leshan.core.response.ResponseConsumer; import leshan.server.LwM2mServ...
/* * Copyright (c) 2013, Sierra Wireless * * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, * this li...
private MqttV3MessageReceiver callback;
6
jaksab/EasyNetwork
easynet/src/main/java/pro/oncreate/easynet/processing/BaseTask.java
[ "@SuppressWarnings(\"unused,WeakerAccess\")\npublic class EasyNet {\n\n\n //\n // Fields\n //\n\n public static final String CACHE_DIR_NAME = \"easy-network-cache\";\n\n volatile private static EasyNet config;\n private boolean writeLogs = BuildConfig.DEBUG;\n private Request request;\n priv...
import android.os.AsyncTask; import android.os.Process; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Outp...
String newUrl = connection.getHeaderField("Location"); boolean next = true; if (listener != null) next = listener.redirect(newUrl); if (!next) { NLog.logE("[The redirect is forbidden]: " + n...
urlParams = NDataBuilder.getQuery(requestModel.getParams(), charset);
7
ZonCon/Ecommerce-Retronight-Android
app/src/main/java/com/megotechnologies/ecommerce_retronight/shop/FragmentShopCategories.java
[ "public class FragmentMeta extends Fragment{\n\n\tprotected View v;\n\tprotected MainActivity activity;\n\tprotected DbConnection dbC;\n\tprotected Boolean LOCATION_SELECTED = false;\n\tprotected Boolean IS_SIGNEDIN = false;\n\tprotected Boolean IS_CLICKED = false;\n\n\t@Override\n\tpublic void onCreate(Bundle save...
import android.graphics.Bitmap; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.Message; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.Image...
package com.megotechnologies.ecommerce_retronight.shop; public class FragmentShopCategories extends FragmentMeta implements ZCFragmentLifecycle, ZCRunnable { int IV_ID_PREFIX = 4000; Boolean RUN_FLAG = false; Thread thPictDownload; LinearLayout llContainer; VideoView videoGhana; @Override public View on...
v = inflater.inflate(R.layout.fragment_shop_categories, container, false);
2
petosorus/dotalys-cli
src/de/lighti/packet/Entities.java
[ "public class DotaPlay {\r\n public interface ProgressListener {\r\n void bytesRemaining( int position );\r\n }\r\n\r\n /**\r\n * The current parsing state.\r\n */\r\n private static ParseState state;\r\n\r\n private static List<GameEventListener> listeners = new ArrayList<GameEventLis...
import java.io.IOException; import java.nio.ByteBuffer; import java.util.HashSet; import java.util.Set; import java.util.logging.Logger; import com.valve.dota2.Netmessages.CSVCMsg_PacketEntities; import de.lighti.DotaPlay; import de.lighti.GameEventListener; import de.lighti.model.Entity; import de.lighti.mode...
package de.lighti.packet; /** * This class handles the CSVCMsg_PacketEntities SVCMessage. The packet is originally * a binary field and denotes created, changed, and deleted entities. * * The code is based on the c++ parser library https://github.com/dschleck/edith * * @author Tobias Mahlmann *...
final Entity removed = state.getEntity( entityId[0] );
2
4FunApp/4Fun
server/4FunServer/src/com/mollychin/servlet/RegisterServlet.java
[ "public class User {\n\tprivate String userName;\n\tprivate String password;\n\tprivate int sex;\n\tprivate String email;\n\n\tpublic String getUserName() {\n\t\treturn userName;\n\t}\n\n\tpublic void setUserName(String userName) {\n\t\tthis.userName = userName;\n\t}\n\n\tpublic String getPassword() {\n\t\treturn p...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import j...
package com.mollychin.servlet; /** * Servlet implementation class RegisterServlet */ @WebServlet("/RegisterServlet") public class RegisterServlet extends HttpServlet { private static final long serialVersionUID = 1L; private static int STATE_CODE = ConstantsUtil.REGISTER_USER_REPEAT_ERROR_CODE; protected void...
UserLoginInfo info = new UserLoginInfo();
1
igd-geo/mongomvcc
src/main/java/de/fhg/igd/mongomvcc/impl/MongoDBVMaintenance.java
[ "public interface VHistory {\n\t/**\n\t * Retrieves a commit's parent CID\n\t * @param cid the commit's CID\n\t * @return the CID of the commit's parent (may be 0 if the commit\n\t * is the root commit)\n\t * @throws VException if there is no commit with such a CID\n\t */\n\tlong getParent(long cid);\n\t\n\t/**\n\t...
import de.fhg.igd.mongomvcc.helper.IdSet; import de.fhg.igd.mongomvcc.impl.internal.Commit; import de.fhg.igd.mongomvcc.impl.internal.MongoDBConstants; import de.fhg.igd.mongomvcc.impl.internal.Tree; import java.util.Map; import java.util.concurrent.TimeUnit; import com.mongodb.BasicDBObject; import com.mongodb.DBColle...
// This file is part of MongoMVCC. // // Copyright (c) 2012 Fraunhofer IGD // // MongoMVCC is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any l...
VHistory history = _db.getHistory();
0
xvik/generics-resolver
src/main/java/ru/vyarus/java/generics/resolver/util/type/instance/ParameterizedInstanceType.java
[ "@SuppressWarnings({\"PMD.LooseCoupling\", \"PMD.GodClass\", \"PMD.AvoidLiteralsInIfCondition\"})\npublic final class GenericsResolutionUtils {\n\n private static final String GROOVY_OBJECT = \"GroovyObject\";\n\n private GenericsResolutionUtils() {\n }\n\n /**\n * Analyze class hierarchy and resolv...
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import ru.vyarus.java.generics.resolver.util.GenericsResolutionUtils; import ru.vyarus.java.generics.resolver.util.GenericsUtils; import ru.vyarus.java.generics.resolver.util.TypeToStringUtils; import ru.vyarus.java.generics.resolver.util.TypeUtils; import ru.v...
package ru.vyarus.java.generics.resolver.util.type.instance; /** * {@link InstanceType} container for {@link ParameterizedType}. Holds known type together with original instance(s). * Note that if contained type does not have generics it would still be {@link ParameterizedType} with empty generics * array because...
final Map<String, Type> generics = GenericsResolutionUtils
0
gantonious/ViewCellAdapter
sample-app/src/main/java/ca/antonious/sample/GridLayoutSample.java
[ "public class SampleModel {\n private String name;\n\n public SampleModel(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n}", "public class EmptyViewCell extends GenericViewCell<EmptyViewCell.ViewHolder, String> {\n\n public EmptyViewCell(St...
import android.os.Bundle; import android.support.v4.content.ContextCompat; import android.support.v7.widget.LinearLayoutManager; import android.view.Menu; import android.view.MenuItem; import java.util.Arrays; import java.util.Locale; import ca.antonious.sample.models.SampleModel; import ca.antonious.sample.viewcells.E...
package ca.antonious.sample; /** * Created by George on 2017-05-14. */ public class GridLayoutSample extends BaseActivity { private ViewCellAdapter viewCellAdapter; private HomogeneousSection<SampleModel, SampleModelViewCell> section1; private HomogeneousSection<SampleModel, SampleModelViewCell> sect...
private AbstractViewCell buildHeader(String headerLabel) {
7
GoogleCloudPlatform/gcs-uploader
app-desktop/src/main/java/com/google/ce/media/contentuploader/controllers/TokenController.java
[ "@Component\npublic class AuthConfig {\n public static final long REFRESH_THRESHOLD_SECS = 60*10L; //10 minutes\n public static final Object REFRESH_LOCK = new Object();\n private final EnvConfig envConfig;\n\n private AuthInfo authInfo;\n private GoogleCredentials credentials;\n private Storage storage;\n\n ...
import org.springframework.web.client.RestTemplate; import javax.servlet.http.HttpServletRequest; import java.net.URI; import java.net.URISyntaxException; import com.google.ce.media.contentuploader.config.AuthConfig; import com.google.ce.media.contentuploader.config.EnvConfig; import com.google.ce.media.contentuploader...
/* * 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 ...
private final EnvConfig envConfig;
1