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
mauriciogracia/DGuitarSoftware
DGuitar/src/dguitar/adaptors/midi/MidiAdaptor.java
[ "public interface SongMeasureTrack\r\n{\r\n\r\n /**\r\n * @param virtualTrackID\r\n * @return a SongVirtualTrack for the parameter received\r\n */\r\n SongVirtualTrack getVirtualTrack(int virtualTrackID);\r\n\r\n /**\r\n * @return returns a list of the events\r\n */\r\n //List getEve...
import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import javax.sound.midi.InvalidMidiDataException; import javax.sound.midi.MetaMessage; import javax.sound...
/* * Created on Mar 18, 2005 */ package dguitar.adaptors.midi; /** * An adaptor to import MIDI files as a Song. This class is to be used mainly * for test case implementations (we can roundtrip MIDI-Adaptor-MIDI, and * compare MIDI-Adaptor to GPSong-Adaptor). * * @author crnash */ public cla...
SongVirtualTrack svt = smt.getVirtualTrack(0);
1
w9jds/MarketBot
app/src/main/java/com/w9jds/marketbot/data/loader/GroupsLoader.java
[ "public interface CrestService {\n\n @GET(\"/\")\n Observable<Response<CrestServerStatus>> getServer();\n\n @GET(\"/market/types/\")\n Call<CrestDictionary<CrestMarketType>> getMarketTypes(@Query(\"page\") int page);\n\n @GET(\"/inventory/types/{typeId}/\")\n Call<CrestType> getTypeInfo(@Path(\"ty...
import android.content.Context; import android.content.SharedPreferences; import android.net.Uri; import android.support.annotation.Nullable; import com.w9jds.marketbot.classes.CrestService; import com.w9jds.marketbot.classes.MarketBot; import com.w9jds.marketbot.classes.models.MarketItemBase; import com.w9jds.marketbo...
package com.w9jds.marketbot.data.loader; public abstract class GroupsLoader extends BaseDataManager { @Inject CrestService publicCrest; @Inject SharedPreferences sharedPreferences; @Inject boolean isFirstRun; private Context context; private boolean updateFailed = false; public abstrac...
MarketBot.createNewStorageSession().inject(this);
1
kgilmer/knapsack
org/knapsack/shell/commands/HelpCommand.java
[ "public class Launcher {\n\t/**\n\t * Felix property to specify the logger instance.\n\t */\n\tprivate static final String FELIX_LOGGER_INSTANCE = \"felix.log.logger\";\n\n\t/**\n\t * Felix property to specify bundle instances to run with framework.\n\t */\n\tprivate static final String FELIX_BUNDLE_INSTANCES = \"f...
import java.io.InputStream; import java.util.Properties; import org.knapsack.Launcher; import org.knapsack.shell.CommandParser; import org.knapsack.shell.ConsoleSocketListener; import org.knapsack.shell.StringConstants; import org.knapsack.shell.pub.IKnapsackCommand; import org.sprinkles.Applier;
/* * Copyright 2011 Ken Gilmer * * 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...
this.parser = ConsoleSocketListener.getParser();
2
komamitsu/fluency
fluency-core/src/main/java/org/komamitsu/fluency/FluencyBuilder.java
[ "public class Buffer\n implements Closeable\n{\n private static final Logger LOG = LoggerFactory.getLogger(Buffer.class);\n private final FileBackup fileBackup;\n private final RecordFormatter recordFormatter;\n private final Config config;\n\n private final Map<String, RetentionBuffer> retent...
import org.komamitsu.fluency.buffer.Buffer; import org.komamitsu.fluency.flusher.Flusher; import org.komamitsu.fluency.ingester.Ingester; import org.komamitsu.fluency.ingester.sender.ErrorHandler; import org.komamitsu.fluency.recordformat.RecordFormatter; import org.msgpack.core.annotations.VisibleForTesting;
/* * Copyright 2018 Mitsunori Komatsu (komamitsu) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
private ErrorHandler errorHandler;
3
scriptkitty/SNC
unikl/disco/calculator/symbolic_math/functions/PoissonRho.java
[ "public abstract interface SymbolicFunction extends Serializable {\r\n\r\n\t//Methods\r\n\t\r\n\t/**\r\n\t * Returns the value of the theta-dependent function at theta \r\n\t * (theta must be the first of the parameters).\r\n * @param theta\r\n\t * @param parameters the set of parameters, including theta and \r...
import unikl.disco.calculator.symbolic_math.SymbolicFunction; import unikl.disco.calculator.symbolic_math.ServerOverloadException; import unikl.disco.calculator.symbolic_math.ParameterMismatchException; import unikl.disco.calculator.symbolic_math.ThetaOutOfBoundException; import unikl.disco.calculator.symbolic_math...
/* * (c) 2017 Michael A. Beck, Sebastian Henningsen * disco | Distributed Computer Systems Lab * University of Kaiserslautern, Germany * All Rights Reserved. * * This software is work in progress and is released in the hope that it will * be useful to the scientific community. It is provided "as i...
throws ThetaOutOfBoundException, ParameterMismatchException, ServerOverloadException {
1
hecoding/Pac-Man
src/jeco/core/algorithm/moge/AbstractProblemGE.java
[ "public abstract class Problem<V extends Variable<?>> {\n //private static final Logger logger = Logger.getLogger(Problem.class.getName());\n\n public static final double INFINITY = Double.POSITIVE_INFINITY;\n protected int numberOfVariables;\n protected int numberOfObjectives;\n protected double[] l...
import java.util.ArrayList; import java.util.LinkedList; import jeco.core.problem.Problem; import jeco.core.problem.Solution; import jeco.core.problem.Solutions; import jeco.core.problem.Variable; import jeco.core.problem.solution.NeutralMutationSolution; import jeco.core.util.bnf.BnfReader; import jeco.core.util.bnf.P...
package jeco.core.algorithm.moge; public abstract class AbstractProblemGE extends Problem<Variable<Integer>> { public static final int CHROMOSOME_LENGTH_DEFAULT = 100; public static final int CODON_UPPER_BOUND_DEFAULT = 256; public static final int MAX_CNT_WRAPPINGS_DEFAULT = 3; public static final int NUM_OF_O...
protected BnfReader reader;
4
roncoo/roncoo-adminlte-springmvc
src/main/java/com/roncoo/adminlte/service/impl/dao/impl/PermissionDaoImpl.java
[ "public class RcPermission implements Serializable {\r\n private Long id;\r\n\r\n private String statusId;\r\n\r\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\r\n private Date createTime;\r\n\r\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\r\n private Date updateTime;\r\n\r\n private Stri...
import java.util.Date; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.util.StringUtils; import com.roncoo.adminlte.bean.entity.RcPermission; import com.roncoo.adminlte.bean.entity.RcPermissionExampl...
/* * Copyright 2015-2016 RonCoo(http://www.roncoo.com) Group. * * 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 * * U...
RcPermissionExample example = new RcPermissionExample();
1
DeanLee77/Nadia
src/testingPackage/DeanTest.java
[ "public class FactBooleanValue<T> extends FactValue{\n\t\n\tprivate boolean value;\n\tprivate Boolean defaultValue; // it is a Boolean Object type because if it is a primitive type then default value is already defined as 'false' \n\t\n\tpublic FactBooleanValue(boolean booleanValue) {\n\t\tsetValue(booleanValue);\n...
import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.script.ScriptEngine; import javax.script...
package testingPackage; public class DeanTest { public static void main(String[] args) { List<Node> lst = new ArrayList<>(); lst.add(new ValueConclusionLine("haha",Tokenizer.getTokens("haha"))); System.out.println(lst.get(0).getNodeName()); lst.remove(lst.get(0)); System.out.println(lst.size()); ...
Tokens st = Tokenizer.getTokens(ss);
7
danielflower/app-runner
src/test/java/e2e/GradleTest.java
[ "public class App {\n public static final Logger log = LoggerFactory.getLogger(App.class);\n\n private final Config config;\n private WebServer webServer;\n private AppEstate estate;\n private final AtomicBoolean startupComplete = new AtomicBoolean(false);\n private BackupService backupService;\n\...
import com.danielflower.apprunner.App; import com.danielflower.apprunner.Config; import com.danielflower.apprunner.mgmt.AppManager; import com.danielflower.apprunner.runners.GradleRunnerTest; import org.junit.After; import org.junit.Before; import org.junit.Test; import scaffolding.AppRepo; import scaffolding.RestClien...
package e2e; public class GradleTest { private final String port = String.valueOf(AppManager.getAFreePort()); private final String appRunnerUrl = "http://localhost:" + port; private final RestClient restClient = RestClient.create(appRunnerUrl); private final String appId = "gradle";
private final AppRepo appRepo = AppRepo.create(appId);
4
wasiahmad/intent_aware_privacy_protection_in_pws
source_code/src/edu/virginia/cs/main/MultiThread.java
[ "public class Helper {\n\n private static final TextTokenizer TOKENIZER = new TextTokenizer(true, true);\n\n /**\n * Generate a random number within a range.\n *\n * @param min\n * @param max\n * @return\n */\n public static int getRandom(int min, int max) {\n Random random =...
import edu.virginia.cs.extra.Helper; import edu.virginia.cs.config.DeploymentConfig; import edu.virginia.cs.config.RunTimeConfig; import edu.virginia.cs.config.StaticData; import edu.virginia.cs.model.TopicTree; import edu.virginia.cs.model.TopicTreeNode; import java.io.BufferedReader; import java.io.File; import java....
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package edu.virginia.cs.main; /** * * @author Wasi */ public class MultiThread { public static void main(String[] args) throw...
StaticData.loadRefModel(DeploymentConfig.ReferenceModelPath);
3
ilmila/J2EEScan
src/main/java/burp/j2ee/issues/impl/ApacheAxis.java
[ "public class HTTPMatcher {\n\n private static final Pattern SERVICES_PATTERN = Pattern.compile(\"services/(.*?)\\\\?wsdl\", Pattern.MULTILINE);\n\n private static final Pattern SERVLET_CLA_PATTERN = Pattern.compile(\"<servlet-class>(.*?)</servlet-class>\", Pattern.DOTALL | Pattern.MULTILINE);\n\n /**\n ...
import burp.CustomHttpRequestResponse; import burp.HTTPMatcher; import static burp.HTTPMatcher.URIMutator; import static burp.HTTPMatcher.getMatches; import burp.IBurpExtenderCallbacks; import burp.IExtensionHelpers; import burp.IHttpRequestResponse; import burp.IRequestInfo; import burp.IResponseInfo; import burp.ISca...
package burp.j2ee.issues.impl; public class ApacheAxis implements IModule { private static final String TITLE_AXIS_SERVICES = "Apache Axis2 - Web Service Enumeration"; private static final String DESCRIPTION_AXIS_SERVICES = "J2EEscan identified " + "the Apache Axis2 console. It was possible to en...
List<String> HAPPY_AXIS_PATHS_MUTATED = URIMutator(HAPPY_AXIS_PATHS);
1
ppasupat/web-entity-extractor-ACL2014
src/edu/stanford/nlp/semparse/open/model/feature/FeatureTypeNaiveEntityBased.java
[ "public class FrequencyTable {\n public static class Options {\n @Option public String frequencyFilename = null;\n @Option public List<Integer> frequencyAmounts = Arrays.asList(30, 300, 3000);\n }\n public static Options opts = new Options();\n\n public static Map<Integer, Set<String>> topWordsLists;\n \...
import java.util.*; import edu.stanford.nlp.semparse.open.ling.FrequencyTable; import edu.stanford.nlp.semparse.open.ling.LingUtils; import edu.stanford.nlp.semparse.open.model.candidate.Candidate; import edu.stanford.nlp.semparse.open.model.candidate.CandidateGroup; import edu.stanford.nlp.semparse.open.util.Multiset;...
package edu.stanford.nlp.semparse.open.model.feature; /** * Extract features by looking at the selected entities (strings). */ public class FeatureTypeNaiveEntityBased extends FeatureType { public static class Options { @Option public boolean useCountEntities = false; @Option public boolean addPhraseShap...
public void extract(Candidate candidate) {
2
abel533/DBMetadata
DBMetadata-swing/src/main/java/com/github/abel533/controller/LoadController.java
[ "public class DBData {\n private static DBServer dbServer;\n private static DBMetadataUtils dbMetadataUtils;\n private static SimpleDataSource dataSource;\n //登录系统的时候操作下面两项\n public static DBServerList dbServerList;\n public static List<String> dbServers;\n\n //选择配置后\n public static Database...
import com.github.abel533.component.DBData; import com.github.abel533.database.AbstractDatabaseProcess; import com.github.abel533.database.DatabaseConfig; import com.github.abel533.database.IntrospectedTable; import com.github.abel533.utils.I18n; import com.github.abel533.view.LoadFrame; import com.github.abel533.view....
package com.github.abel533.controller; public class LoadController implements Controller { private LoadFrame loadFrame; public LoadController(LoadFrame loadFrame) { super(); this.loadFrame = loadFrame; } public Controller initView() {
if (DBData.config == null) {
0
Deltik/SignEdit
src/net/deltik/mc/signedit/subcommands/RedoSignSubcommand.java
[ "public class ChatComms {\n private Player player;\n private Configuration config;\n private ResourceBundle phrases;\n private MessageFormat messageFormatter;\n\n @Inject\n public ChatComms(Player player, Configuration config, UserComms userComms) {\n this(player, config, userComms.getClass...
import net.deltik.mc.signedit.ChatComms; import net.deltik.mc.signedit.SignText; import net.deltik.mc.signedit.SignTextHistory; import net.deltik.mc.signedit.SignTextHistoryManager; import net.deltik.mc.signedit.interactions.SignEditInteraction; import org.bukkit.entity.Player; import javax.inject.Inject;
/* * Copyright (C) 2017-2021 Deltik <https://www.deltik.net/> * * This file is part of SignEdit for Bukkit. * * SignEdit for Bukkit 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...
private final ChatComms comms;
0
Ctrip-DI/Hue-Ctrip-DI
di-data-service/src/main/java/com/ctrip/di/hive/HiveCheckService.java
[ "public class HiveJobsDo {\r\n\r\n\tprivate String dbname;\r\n\tprivate String tablename;\r\n\tprivate String pt_format;\r\n\tprivate int keepdays;\r\n\tprivate double checkrate;\r\n\tprivate String username;\r\n\tprivate String email;\r\n\tprivate Date create_time;\r\n\tprivate Date modified_time;\r\n\r\n\tpublic ...
import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.mail.MessagingException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apac...
package com.ctrip.di.hive; @Service public class HiveCheckService { private static final Log logger = LogFactory.getLog(HiveCheckService.class); @Value("${HIVE_CHECK_AVG_PARTITION_NUM}") private int hive_check_avg_partition_num; @Value("${ADMIN_EMAIL}") private String admin_email; @Autow...
List<HiveJobsDo> list = getAllHiveJobs();
0
tobiasheine/Movies
app/src/androidTest/java/com/tobi/movies/steps/MovieDetailsSteps.java
[ "public class MovieApplication extends Application {\n\n private PopularMoviesComponent popularMoviesComponent;\n private MovieDetailsComponent movieDetailsComponent;\n\n @Override\n public void onCreate() {\n super.onCreate();\n ApplicationComponent applicationComponent = applicationCompo...
import android.support.test.InstrumentationRegistry; import android.support.test.rule.ActivityTestRule; import com.tobi.movies.MovieApplication; import com.tobi.movies.backend.ConfigurableBackend; import com.tobi.movies.popularstream.TestPopularMoviesComponent; import com.tobi.movies.posterdetails.ApiMovieDetails; impo...
package com.tobi.movies.steps; public class MovieDetailsSteps { private final PosterDetailsRobot movieDetailsRobot = PosterDetailsRobot.create(); @Given("^I start the details screen with movie id (\\d+)$") public void I_start_the_details_screen_with_movie(int movieId) { movieDetailsRobot.laun...
ConfigurableBackend configurableBackend = getConfigurableBackend();
1
bafomdad/uniquecrops
com/bafomdad/uniquecrops/events/UCEventHandlerClient.java
[ "public class UCDyePlantStitch extends TextureAtlasSprite {\n\n\tpublic UCDyePlantStitch(String spriteName) {\n\t\t\n\t\tsuper(spriteName);\n\t}\n\t\n\t@Override\n\t@SideOnly(Side.CLIENT)\n\tpublic void updateAnimation() {\n\t\t\n\t\tWorld world = Minecraft.getMinecraft().theWorld;\n\t\tif (world != null) {\n\t\t\t...
import java.util.Map; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.player.EntityPlayer; import net.minecraftforge.client.event.TextureStitchEvent; import net.minecraftforge.com...
package com.bafomdad.uniquecrops.events; public class UCEventHandlerClient { private static final String[] FIELD = new String[] { "mapRegisteredSprites", "field_110574_e", "bwd" }; @SubscribeEvent public void loadTextures(TextureStitchEvent.Pre event) { try { Map<String, TextureAtlasSprite> mapRegist...
mapRegisteredSprites.put("uniquecrops:blocks/dyeplant5", new UCDyePlantStitch("uniquecrops:blocks/dyeplant5"));
0
GenomicsCoreLeuven/GBSX
src/be/uzleuven/gc/logistics/GBSX/simulator/GBSsimulate.java
[ "public class FastaBufferedReader {\n \n \n private final BufferedReader fastaBufferedReader;\n private ReentrantLock lock = new ReentrantLock();\n \n /**\n * creates a new FastaBufferedReader of the given file.\n * @param file | the file that must be read\n * @param ziped | boolean if...
import be.uzleuven.gc.logistics.GBSX.utils.fasta.infrastructure.FastaBufferedReader; import be.uzleuven.gc.logistics.GBSX.utils.fasta.model.FastaRead; import be.uzleuven.gc.logistics.GBSX.utils.fastq.infrastructure.FastqBufferedWriter; import be.uzleuven.gc.logistics.GBSX.utils.fastq.infrastructure.FastqPairBufferedWri...
} } if (args[i].equals("-a")){ this.commonAdapter = args[i + 1]; } if (args[i].equals("-l")){ this.readLength = Integer.parseInt(args[i + 1]); } ...
FastqBufferedWriter outputWriter = new FastqBufferedWriter(new File(filePathFastq), false);
2
thwegene/OCT
src/oct/polygonization/OctDualMasspointQuad.java
[ "public enum OCT_EDGE implements OCT_ENUM {\r\n\r\n\t/**\r\n\t * BACK DOWN, Direction X,Y,Z: 0, -1, -1\r\n\t */\r\n\tBD(0, -1, -1, OCT_VERTEX.LBD, OCT_VERTEX.RBD), // 0\r\n\t/**\r\n\t * RIGHT DOWN, Direction X,Y,Z: 1, 0, -1\r\n\t */\r\n\tRD(1, 0, -1, OCT_VERTEX.RBD, OCT_VERTEX.RFD), // 1\r\n\t/**\r\n\t * FRONT DOWN...
import java.util.ArrayList; import java.util.HashMap; import oct.enums.OCT_EDGE; import oct.enums.OCT_ENUM; import oct.enums.OCT_FACE; import oct.enums.OCT_VERTEX; import oct.math.OctFunction; import oct.octree.OctNode; import oct.octree.OctOctree; import oct.octree.OctRST; import oct.octree.OctXYZ; import p...
package oct.polygonization; public class OctDualMasspointQuad extends OctPoly { private PApplet p5;
private OctOctree myOctree;
6
PistoiaHELM/HELMNotationToolkit
source/org/helm/notation/tools/MonomerParser.java
[ "public class MonomerException extends Exception {\n\n\t/**\n\t * Creates a new instance of <code>MonomerException</code> without detail\n\t * message.\n\t */\n\tpublic MonomerException() {\n\t}\n\n\t/**\n\t * Constructs an instance of <code>MonomerException</code> with the\n\t * specified detail message.\n\t * \n\...
import chemaxon.struc.MolAtom; import chemaxon.struc.MolBond; import chemaxon.struc.Molecule; import com.pfizer.pgrd.sdlib.EncoderException; import org.helm.notation.MonomerException; import org.helm.notation.MonomerFactory; import org.helm.notation.StructureException; import org.helm.notation.model.Attachment; import ...
} else { // we can only have two singles if (singles.size() != 2) { throw new MonomerException( "Invalid Monomer Structure: number of attachment points on monomer does not match number of attachments"); } else { String label1 = getAttachmentLabel(singles.get(0)); String label2 = getAttachme...
Map<String, Attachment> attachmentMap = MonomerFactory.getInstance()
1
magnifikus/modPLC
src/minecraft/de/squig/plc/blocks/ExtenderBasic.java
[ "public class CommonProxy implements IGuiHandler {\n\tpublic static String BLOCKS_PNG = \"/ressources/art/gui/blocks.png\";\n\tpublic static String BLOCKS2_PNG = \"/ressources/art/gui/block2.png\";\n\tpublic static String CONTROLLER_PNG = \"/ressources/art/gui/controller.png\";\n\tpublic static String EXTENDER_PNG ...
import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import net.minecraft.worl...
package de.squig.plc.blocks; public class ExtenderBasic extends BlockPLC { public ExtenderBasic(int id) { super(id, Material.rock, 0); setHardness(4.0F); setStepSound(Block.soundStoneFootstep); setBlockName("Basic Extender"); setCreativeTab(CreativeTabs.tabRedstone); } @Override public String getTextu...
return CommonProxy.BLOCKS_PNG;
0
boybeak/BeMusic
app/src/main/java/com/nulldreams/bemusic/activity/PlayDetailActivity.java
[ "public abstract class Intents {\n\n public static void viewMyAppOnStore (Context context) {\n viewAppOnStore(context, context.getPackageName());\n }\n\n public static void viewAppOnStore (Context context, String packageName) {\n Uri uri = Uri.parse(\"market://details?id=\" + packageName);\n ...
import android.Manifest; import android.animation.ObjectAnimator; import android.app.WallpaperManager; import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.media.RingtoneM...
package com.nulldreams.bemusic.activity; public class PlayDetailActivity extends AppCompatActivity implements PlayManager.Callback, PlayManager.ProgressCallback { private static final String TAG = PlayDetailActivity.class.getSimpleName(); private TextView mTitleTv, mArtistTv, mAlbumTv, mPositionTv, mDurat...
List<Song> songs = PlayManager.getInstance(this).getTotalList();
6
mpsonic/Evolve-Workout-Logger
app/src/main/java/edu/umn/paull011/evolveworkoutlogger/fragments/RoutineExercisesFragment.java
[ "public class Routine {\n\n // Private\n private String mName;\n private String mDescription;\n private ArrayList<Exercise> mExerciseList;\n private static final String TAG = Routine.class.getSimpleName();\n\n\n // Public\n public Routine(){\n this.mName = \"\";\n mExerciseList = ...
import android.content.Context; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.helper.ItemTouchHelper; import android.util....
package edu.umn.paull011.evolveworkoutlogger.fragments; /** * A simple {@link Fragment} subclass. * Activities that contain this fragment must implement the * {@link RoutineExercisesFragment.OnFragmentInteractionListener} interface * to handle interaction events. * Use the {@link RoutineExercisesFragment#newIns...
private RoutineAdapter mAdapter;
3
hxnx-sam/DiscreteSpatialPhyloSimulator
src/io/WriteNetworkShapeConfigurationXML.java
[ "public enum DemeType {\n\tMIGRATION_OF_INFECTEDS, INFECTION_OVER_NETWORK\n}", "public class JustBeforeRecoverySampler implements Sampler {\n\t\n\tprotected double justBefore = 1e-16;\n\n\tpublic JustBeforeRecoverySampler() {\n\t\t\n\t}\n\t\n\tpublic void setJustBefore(double d) {\n\t\tthis.justBefore = d;\n\t}\n...
import individualBasedModel.DemeType; import individualBasedModel.JustBeforeRecoverySampler; import individualBasedModel.ModelType; import individualBasedModel.PopulationType; import individualBasedModel.Sampler; import java.util.ArrayList; import java.util.List;
package io; /** * class to write specific network shape configuration xmls, e.g. FULL, RANDOM, LINE, STAR etc * @author slycett * @version 29 Dec 2014 * @version 23 Mar 2015 */ public class WriteNetworkShapeConfigurationXML implements ConfigurationXMLInterface { String path = "test//"; String rootname =...
Sampler theSampler = new JustBeforeRecoverySampler();
4
tinkerpop/frames
src/main/java/com/tinkerpop/frames/FramedGraphConfiguration.java
[ "public interface AnnotationHandler<T extends Annotation> {\n /**\n * @return The annotation type that this handler responds to. \n */\n public Class<T> getAnnotationType();\n\n /**\n * @param annotation The annotation\n * @param method The method being called on the frame.\n * @param a...
import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.tinkerpop.blueprints.Graph; import com.tinkerpop.frames.annotations.AnnotationHandler; import com.tinkerpop.frames.modules.DefaultClassLoaderResolver; import com.tinkerpo...
package com.tinkerpop.frames; /** * A configuration for a {@link FramedGraph}. These are supplied to * {@link Module}s for each {@link FramedGraph} being create by a * {@link FramedGraphFactory}. * * Allows registration of {@link AnnotationHandler}s, {@link FrameInitializer}s * and {@link TypeResolver}s. * ...
private List<TypeResolver> typeResolvers = new ArrayList<TypeResolver>();
5
l0rdn1kk0n/wicket-jquery-selectors
src/main/java/de/agilecoders/wicket/jquery/settings/DefaultObjectMapperFactory.java
[ "public interface Config extends IClusterable {\n\n /**\n * @return json string representation of this config\n */\n String toJsonString();\n\n /**\n * @return an immutable map of all key/values\n */\n Map<String, Object> all();\n\n /**\n * @return true, if config map is empty or ...
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.Version; import com.fasterxml.jackson.databind.Module; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import de.agilecoders.wicket.jquery.Config; import de.agilecoders.wicket.j...
package de.agilecoders.wicket.jquery.settings; /** * {@link com.fasterxml.jackson.databind.ObjectMapper} factory * * @author Michael Haitz <michael.haitz@agilecoders.de> */ public class DefaultObjectMapperFactory implements ObjectMapperFactory { /** * lazy holder pattern to prevent instantiation of ser...
protected static final ConfigSerializer CONFIG_SERIALIZER = new ConfigSerializer();
4
edwise/complete-spring-project
src/main/java/com/edwise/completespring/controllers/BookController.java
[ "@Getter\n@Setter\n@Accessors(chain = true)\npublic class BookResource extends ResourceSupport {\n private Book book;\n}", "@Component\npublic class BookResourceAssembler extends ResourceAssemblerSupport<Book, BookResource> {\n\n public BookResourceAssembler() {\n super(BookController.class, BookReso...
import com.edwise.completespring.assemblers.BookResource; import com.edwise.completespring.assemblers.BookResourceAssembler; import com.edwise.completespring.entities.Book; import com.edwise.completespring.exceptions.InvalidRequestException; import com.edwise.completespring.services.BookService; import io.swagger.annot...
package com.edwise.completespring.controllers; @RestController @RequestMapping("/api/books/") @Api(value = "books", description = "Books API", produces = "application/json") @Slf4j public class BookController { private static final int RESPONSE_CODE_OK = 200; private static final int RESPONSE_CODE_CREATED = ...
private BookService bookService;
4
shapesecurity/bandolier
src/test/java/com/shapesecurity/bandolier/es2017/Test262.java
[ "public final class BundlerOptions {\n\n\tpublic enum ImportUnresolvedResolutionStrategy {\n\t\tCOMPILE_ERROR,\n\t\tDEFAULT_TO_UNDEFINED,\n\t\tTHROW_ON_REFERENCE,\n\t\tNOTHING\n\t}\n\n\tpublic enum ExportStrategy {\n\t\tEXPLICIT,\n\t\tALL_GLOBALS,\n\t\tNONE,\n\t}\n\n\tpublic enum DangerLevel {\n\t\tSAFE, // to spec...
import com.shapesecurity.bandolier.es2017.bundlers.BundlerOptions; import com.shapesecurity.bandolier.es2017.bundlers.IModuleBundler; import com.shapesecurity.bandolier.es2017.bundlers.PiercedModuleBundler; import com.shapesecurity.bandolier.es2017.loader.FileLoader; import com.shapesecurity.bandolier.es2017.loader.IRe...
public final boolean noStrict; public final boolean onlyStrict; public final boolean async; public final boolean module; @Nonnull public final ImmutableList<String> includes; @Nonnull public final ImmutableList<String> features; public Test262Info(@Nonnull String name, @Nonnull Test262Negative negati...
private final IResourceLoader loader = new FileLoader();
3
Nantes1900/Nantes-1900
src/test/fr/nantes1900/AllTests.java
[ "public class MeshDecimationTest extends TestCase {\r\n\r\n @Test\r\n public final static void testDecimation() {\r\n ParserSTL parser = new ParserSTL(\"files/tests/testDecim.stl\");\r\n\r\n try {\r\n MeshDecimation mesh = new MeshDecimation(parser.read());\r\n\r\n // 1. Co...
import org.junit.runner.RunWith; import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; import test.fr.nantes1900.decimation.MeshDecimationTest; import test.fr.nantes1900.models.EdgeTest; import test.fr.nantes1900.models.MeshTest; import test.fr.nantes1900.models.PointTest; import test.fr.n...
package test.fr.nantes1900; /** * Class to test every class tests of the project. * @author Daniel Lefevre */ @RunWith(Suite.class) @SuiteClasses(value = {EdgeTest.class, PointTest.class, TriangleTest.class, PolygonTest.class, MeshTest.class, MatrixMethodTest.class,
ParserSTLTest.class, MeshDecimationTest.class, RecollageTest.class})
0
UweTrottmann/tmdb-java
src/test/java/com/uwetrottmann/tmdb2/assertions/PersonAssertions.java
[ "public static final Person testPerson = new Person();", "public static void assertBaseResultsPage(BaseResultsPage results) {\n assertThat(results).isNotNull();\n assertThat(results.page).isNotNull();\n assertThat(results.total_pages).isNotNull();\n assertThat(results.total_results).isNotNull();\n ...
import static com.uwetrottmann.tmdb2.TestData.testPerson; import static com.uwetrottmann.tmdb2.assertions.GenericAssertions.assertBaseResultsPage; import static com.uwetrottmann.tmdb2.assertions.MediaAssertions.assertMedia; import static org.assertj.core.api.Assertions.assertThat; import com.uwetrottmann.tmdb2.TestData...
package com.uwetrottmann.tmdb2.assertions; public class PersonAssertions { public static void assertBasePerson(BasePerson person) { assertBasePerson(person, true); } public static void assertBasePerson(BasePerson person, Boolean extensive) { assertThat(person).isNotNull(); assert...
public static void assertTestPersonExternalIds(PersonExternalIds ids) {
6
palominolabs/benchpress
worker-core/src/test/java/com/palominolabs/benchpress/worker/WorkerAdvertiserTest.java
[ "public interface ZookeeperConfig {\n @Config(\"benchpress.zookeeper.client.connection-string\")\n @Default(\"127.0.0.1:2281\")\n String getConnectionString();\n\n @Config(\"benchpress.zookeeper.path\")\n @Default(\"/benchpress\")\n String getBasePath();\n\n @Config(\"benchpress.zookeeper.worke...
import com.fasterxml.jackson.core.type.TypeReference; import com.google.common.io.Closeables; import com.google.inject.AbstractModule; import com.google.inject.Guice; import com.google.inject.Inject; import com.google.inject.Injector; import com.palominolabs.benchpress.config.ZookeeperConfig; import com.palominolabs.be...
package com.palominolabs.benchpress.worker; public final class WorkerAdvertiserTest { @Inject private WorkerAdvertiser workerAdvertiser; @Inject private ZookeeperConfig zookeeperConfig; @Inject private CuratorFramework curatorFramework; @Inject private CuratorModule.CuratorLifecycleHo...
install(new TaskPluginRegistryModule());
3
Tirasa/ADSDDL
src/test/java/net/tirasa/adsddl/unit/BasicTest.java
[ "protected static final String SDDL_ALL_SAMPLE = \"/sddlSample.bin\";", "public class SDDL {\n\n /**\n * Logger.\n */\n protected static final Logger LOG = LoggerFactory.getLogger(SDDL.class);\n\n /**\n * An unsigned 8-bit value that specifies the revision of the SECURITY_DESCRIPTOR structure...
import net.tirasa.adsddl.ntsd.utils.Hex; import net.tirasa.adsddl.ntsd.utils.NumberFacility; import net.tirasa.adsddl.ntsd.utils.SDDLHelper; import org.junit.Test; import static net.tirasa.adsddl.unit.AbstractTest.SDDL_ALL_SAMPLE; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEqua...
/* * Copyright (C) 2015 Tirasa (info@tirasa.net) * * 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 ...
final SDDL sddl = new SDDL(src);
1
caiovidaln/ifcalc
app/src/main/java/ifcalc/beta/activities/fragments/CalculatorAnualFragment.java
[ "public final class R {\n public static final class anim {\n public static final int abc_fade_in=0x7f040000;\n public static final int abc_fade_out=0x7f040001;\n public static final int abc_grow_fade_in_from_bottom=0x7f040002;\n public static final int abc_popup_enter=0x7f040003;\n ...
import android.content.Context; import android.content.SharedPreferences; import android.graphics.Typeface; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; impo...
package ifcalc.beta.activities.fragments; public class CalculatorAnualFragment extends CalculatorBaseFragment { public CalculatorAnualFragment() { // Required empty public constructor } public static CalculatorAnualFragment newInstance() { CalculatorAnualFragment fragment = new Calcula...
confDisc = new ConfiguracoesDisciplinas(TipoDisciplina.ANUAL, media);
2
sherlok/sherlok
src/test/java/org/sherlok/UimaPipelineTest.java
[ "public static <E> ArrayList<E> list() {\n return new ArrayList<E>();\n}", "public static <K, V> HashMap<K, V> map() {\n return new HashMap<K, V>();\n}", "@JsonPropertyOrder(value = { \"begin\", \"end\", \"type\" }, alphabetic = true)\npublic class JsonAnnotation {\n\n /** These keys are not considered...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.sherlok.utils.Create.list; import static org.sherlok.utils.Create.map; import static org.slf4j.LoggerFactory.getLogger; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util...
/** * Copyright (C) 2014-2015 Renaud Richardet * * 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 applicabl...
map("NeurotransmitterProp",
1
lmartire/DoApp
app/src/main/java/it/unisannio/security/DoApp/activities/AppListActivity.java
[ "public class FuzzerService extends IntentService {\n\n private String pathFile;\n\n //lista contenente i risultati\n private List<ExceptionReport> results = new ArrayList<ExceptionReport>();\n\n //lista contentente tutti i componenti che sono crashati\n private List<String> crashedComponents = new A...
import android.content.Intent; import android.os.Handler; import android.os.Message; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import android.widget.ProgressBar; import android.widget.Toast; imp...
package it.unisannio.security.DoApp.activities; /** * Created by security on 06/01/17. * * activity che presenta una progress bar che aspetta il caricamento di tutte * le app non di sistema e si permette di sceglierla * */ public class AppListActivity extends AppCompatActivity { private int msg = Commo...
Intent i = new Intent(AppListActivity.this, FuzzerService.class);
0
thiloplanz/jmockmongo
src/main/java/jmockmongo/MockMongo.java
[ "public class Count implements CommandHandler {\n\n\tprivate final MockMongo mongo;\n\n\tpublic Count(MockMongo mongo) {\n\t\tthis.mongo = mongo;\n\t}\n\n\tpublic BSONObject handleCommand(String database, BSONObject command) {\n\t\tUnsupported.supportedAndRequiredFields(command, \"count\", \"query\");\n\t\tString c...
import java.io.IOException; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executors; import jmockmongo.commands.Count; import jmockmongo.commands.DbStats; import jmockmongo.commands.FindAndModify; import jmockmongo.commands.Is...
/** * Copyright (c) 2012, Thilo Planz. All rights reserved. * * This program is free software: you can redistribute it and/or modify * it under the terms of the Apache License, Version 2.0 * as published by the Apache Software Foundation (the "License"). * * Unless required by applicable law or agreed to in writ...
handler.setCommandHandler("findandmodify", new FindAndModify(
2
SecUSo/privacy-friendly-qr-scanner
app/src/main/java/com/secuso/privacyfriendlycodescanner/qrscanner/ui/helpers/BaseActivity.java
[ "public class AboutActivity extends AppCompatActivity {\n\n @SuppressLint(\"RestrictedApi\")\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_about);\n\n getSupportActionBar().setDefaultDisplayHo...
import android.content.Intent; import android.content.SharedPreferences; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; import android.view.MenuItem; import android.view.View; import androidx.appcompat.app.ActionBarDrawerToggle; import androidx...
package com.secuso.privacyfriendlycodescanner.qrscanner.ui.helpers; /** * @author Christopher Beckmann, Karola Marky * @version 20171017 * This class is a parent class of all activities that can be accessed from the * Navigation Drawer (example see MainActivity.java) * * The default NavigationDrawer functiona...
intent = new Intent(this, HistoryActivity.class);
2
wymarc/astrolabe-generator
src/main/java/com/wymarc/astrolabe/generator/printengines/postscript/RetePrintEngine.java
[ "public class Astrolabe {\n\n public static final String[] SHOWOPTIONS = { \"Climate and mater\", \"Climate only\", \"Mater only\", \"Mater and nauticum\"};\n public static final String[] SHAPEOPTIONS = { \"Classic\", \"Octagonal\"};\n public static final String[] HOUROPTIONS = { \"Roman\", \"Arabic\", \"A...
import com.wymarc.astrolabe.Astrolabe; import com.wymarc.astrolabe.Star; import com.wymarc.astrolabe.generator.printengines.postscript.util.EPSToolKit; import com.wymarc.astrolabe.generator.printengines.postscript.util.ZodiacSigns; import com.wymarc.astrolabe.math.AstroMath; import java.awt.geom.Point2D; import java.ut...
// lines--; //Adjust line count to final value // // //draw ecliptic // String out = ""; // out += "\n" + "%% ================ Draw Ecliptic Calendar ================="; // Iterator iter = eclipticTic.iterator(); // while (iter.hasNext()){ // tic = (EclipticLine)iter...
private String placeStar(Star star){
1
OHDSI/WhiteRabbit
whiterabbit/src/main/java/org/ohdsi/whiteRabbit/scan/SourceDataScan.java
[ "public class DbType {\r\n\tpublic static DbType\tMYSQL\t\t= new DbType(\"mysql\");\r\n\tpublic static DbType\tMSSQL\t\t= new DbType(\"mssql\");\r\n\tpublic static DbType\tPDW\t\t\t= new DbType(\"pdw\");\r\n\tpublic static DbType\tORACLE\t\t= new DbType(\"oracle\");\r\n\tpublic static DbType\tPOSTGRESQL\t= new DbTy...
import java.io.*; import java.sql.ResultSet; import java.sql.SQLException; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; import com.epam.parso.Column; import com.epam.parso.SasFileProperties; import com.epam.parso.SasFileReader; import com....
ScanFieldName.DESCRIPTION, ScanFieldName.TYPE, ScanFieldName.MAX_LENGTH, ScanFieldName.N_ROWS )); if (scanValues) { overviewHeader.addAll(Arrays.asList( ScanFieldName.N_ROWS_CHECKED, ScanFieldName.FRACTION_EMPTY, ScanFieldName.UNIQUE_COUNT, ScanFieldName.FRACTION_UNI...
List<List<Pair<String, Integer>>> valueCounts = new ArrayList<>();
6
idega/com.idega.company
src/java/com/idega/company/companyregister/business/CompanyRegisterFileImportHandlerBean.java
[ "public class CompanyConstants {\n\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"com.idega.company\";\n\t\n\tpublic static final String GROUP_TYPE_COMPANY = \"iw_company\";\n\n}", "public interface IndustryCode extends IDOEntity {\n\t/**\n\t * @see com.idega.company.data.IndustryCodeBMPBean#getISATCode\n...
import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.rmi.RemoteException; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import...
} private void importOperationForms(InputStream is) throws IOException, CreateException { HSSFWorkbook wb = new HSSFWorkbook(new POIFSFileSystem(is)); HSSFSheet sheet = wb.getSheetAt(4); if(sheet != null) { Iterator it = sheet.rowIterator(); if(it.hasNext()) { it.next(); ...
industryCodes = ((IndustryCodeHome) IDOLookup.getHome(IndustryCode.class)).findAllIndustryCodes();
2
FlareBot/FlareBot
src/main/java/stream/flarebot/flarebot/scheduler/FutureAction.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.datastax.driver.core.PreparedStatement; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.Period; import stream.flarebot.flarebot.FlareBot; import stream.flarebot.flarebot.FlareBotManager; import stream.flarebot.flarebot.Getters; import stream.flarebot.flarebot.database.C...
return; } this.delay = new Period(expires.minus(created.getMillis()).getMillis()); } public FutureAction(long guildId, long channelId, long responsible, long target, String content, Period delay, Action action) { this.guildId = guildId; this.c...
FlareBot.instance().getFutureActions().add(this);
0
saladinkzn/spring-data-tarantool
src/integration/java/ru/shadam/tarantool/ops/TarantoolOperationsTests.java
[ "public class SimpleSocketChannelProvider implements SocketChannelProvider {\n private static final Logger logger = LoggerFactory.getLogger(SimpleSocketChannelProvider.class);\n\n private final String host;\n private final int port;\n\n public SimpleSocketChannelProvider(String host, int port) {\n ...
import com.google.common.collect.ImmutableMap; import com.palantir.docker.compose.DockerComposeRule; import com.palantir.docker.compose.connection.DockerPort; import com.palantir.docker.compose.connection.waiting.HealthChecks; import org.apache.commons.io.IOUtils; import org.junit.Assert; import org.junit.Before; impor...
package ru.shadam.tarantool.ops; /** * @author sala */ public class TarantoolOperationsTests { public static final String SPACE_ID = "user"; public static final String SPACE_STRING_ID = "log_entry"; @ClassRule public static DockerComposeRule docker = DockerComposeRule.builder() .file("s...
private TarantoolOperations<Long, User> userOperations;
3
nloko/SyncMyPix
src/com/nloko/android/syncmypix/SyncService.java
[ "public final class Log {\n\n\tpublic static boolean debug = false;\n\t\n\tpublic static void d(String tag, String message)\n\t{\n\t\tif (debug) {\n\t\t\tandroid.util.Log.d(tag, message);\n\t\t}\n\t}\n\t\n\tpublic static void w(String tag, String message)\n\t{\n\t\tandroid.util.Log.w(tag, message);\n\t}\n\t\n\tpubl...
import java.io.IOException; import java.io.InputStream; import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; import com.nloko.android.Log; import com.nloko.android.PhotoCache; import com.nloko.android.Utils; import com.nloko.android.syncmypix.SyncMyPix.Results; import com.nloko.android...
service.mSyncOperation.execute(users); } } @SuppressWarnings("unchecked") @Override public void handleMessage(Message msg) { switch (msg.what) { case START_SYNC: List<SocialNetworkUser> users = (List<SocialNetworkUser>)msg.obj; startSync(users); break; case SHOW_ERROR: han...
Utils.setBoolean(service.getSharedPreferences(SettingsActivity.PREFS_NAME, 0), "last_googlesync", true);
2
momodalo/vimtouch
src/kvj/app/vimtouch/ext/manager/IntegrationManager.java
[ "public class Exec\n{\n static {\n System.loadLibrary(\"vimtouch\");\n }\n\n static final String TAG = \"Exec\";\n static public VimTouch vimtouch;\n static private int dialogState = 0;\n static private int dialogDefaultState = 0;\n\n static private int State;\n static private int Cur...
import java.util.HashMap; import java.util.List; import java.util.Map; import net.momodalo.app.vimtouch.Exec; import org.kvj.bravo7.ipc.RemoteServicesCollector; import org.kvj.vimtouch.BasePlugin; import org.kvj.vimtouch.TransferableData; import org.kvj.vimtouch.ext.FieldReaderException; import org.kvj.vimtouch.ext.Inc...
package kvj.app.vimtouch.ext.manager; public class IntegrationManager { private static final String TAG = "Integration"; private Context ctx = null; private IntegrationManager(Context ctx) { this.ctx = ctx; pluginCollector = new RemoteServicesCollector<BasePlugin>(ctx, IntegrationExtension.PLUGIN_ACT...
TransferableData out = plugin.process(new TransferableData(
1
ProductLayer/ProductLayer-SDK-for-Android
ply-android-common/src/main/java/com/productlayer/android/common/view/UserPreview.java
[ "public class ProfileFragment extends NamedFragment {\n\n public static final String NAME = \"Profile\";\n\n public static final int TAB_INDEX_DEFAULT = -1;\n public static final int TAB_INDEX_TIMELINE = 0;\n public static final int TAB_INDEX_FRIENDS = 1;\n public static final int TAB_INDEX_FOLLOWERS...
import android.content.Context; import android.graphics.Color; import android.os.Build; import android.support.v4.app.DialogFragment; import android.support.v7.widget.CardView; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.w...
/* * Copyright (c) 2015, ProductLayer GmbH All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of condit...
Level level = new Level(points);
3
mfit/PdfTableAnnotator
src/main/java/at/tugraz/kti/pdftable/cli/Batch.java
[ "public class DocumentTables {\n\t\n\tpublic HashMap<Integer, ArrayList<DocumentTable>> annotationsOnPage;\n\t\n\tpublic DocumentTables() {\n\t\tannotationsOnPage = new HashMap<Integer, ArrayList<DocumentTable>>();\n\t}\n\t\n\t/**\n\t * Remove a table by specifying page number and table id.\n\t * @param pagen\n\t *...
import java.io.File; import java.io.IOException; import java.util.Collection; import java.util.Map; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerFactoryConfigurationError; import at.tugraz.kti.pdftable.document.DocumentTables; import at.tugraz.kti.pdftable.document.RichDo...
package at.tugraz.kti.pdftable.cli; /** * Command-line user interface. * You can: * - import directories * - examine a repository / working-set * - create exports of single files * - create exports of all the documents in a repository / working-set * @author "matthias frey" */ public class Batch { /** ...
App app = App.getInstance();
6
adyliu/jafka
src/main/java/io/jafka/producer/Producer.java
[ "public class Broker {\n\n /**\n * the global unique broker id\n */\n public final int id;\n\n /**\n * the broker creator (hostname with created time)\n *\n * @see ServerRegister#registerBrokerInZk()\n */\n public final String creatorId;\n\n /**\n * broker hostname\n *...
import io.jafka.api.ProducerRequest; import io.jafka.cluster.Broker; import io.jafka.cluster.Partition; import io.jafka.common.InvalidPartitionException; import io.jafka.common.NoBrokersForPartitionException; import io.jafka.common.annotations.ClientSide; import io.jafka.producer.async.CallbackHandler; import io.jafka....
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
for (Map.Entry<Integer, Broker> e : this.brokerPartitionInfo.getAllBrokerInfo().entrySet()) {
0
ajitsing/ExpenseManager
app/src/main/java/ajitsingh/com/expensemanager/database/ExpenseDatabaseHelper.java
[ "public class Expense {\n private String type;\n private String date;\n private Long amount;\n private Integer id;\n\n public Expense(Long amount, String type, String date) {\n this.type = type;\n this.date = date;\n this.amount = amount;\n }\n\n public Expense(Integer id, Long amount, String type, ...
import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import java.util.ArrayList; import java.util.List; import ajitsingh.com.expensemanager.model.Expense; import ajitsingh.com...
package ajitsingh.com.expensemanager.database; public class ExpenseDatabaseHelper extends SQLiteOpenHelper { public static final String EXPENSE_DB = "expense"; public ExpenseDatabaseHelper(Context context) { super(context, EXPENSE_DB, null, 1); } @Override public void onCreate(SQLiteDatabase sqLite...
Cursor cursor = database.rawQuery(ExpenseTable.getExpenseForCurrentMonth(DateUtil.currentMonthOfYear()), null);
4
flyersa/MuninMX
src/com/clavain/jobs/CheckJob.java
[ "public class ReturnDebugTrace {\n private String output;\n private int checktime;\n private int retval;\n private int cid;\n private int user_id;\n\n /**\n * @return the output\n */\n public String getOutput() {\n return output;\n }\n\n /**\n * @param output the output...
import org.quartz.JobDataMap; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import static com.clavain.utils.Generic.returnServiceCheck; import static com.clavain.utils.Generic.checkIsProcessing; import static com.clavain.utils.Generic.getUnixtime; import static com.clavain.utils.Databa...
/* * MuninMX * Written by Enrico Kern, kern@clavain.com * www.clavain.com * * 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...
ReturnServiceCheck rsc = new RunServiceCheck(sc).execute();
1
wrey75/WaveCleaner
src/main/java/com/oxande/wavecleaner/ui/MainScreen.java
[ "public class AudioProject {\r\n\tpublic static String DEFAULT_EXT = \".wclean\";\r\n\t\r\n\tprivate String name;\r\n\tprivate boolean saved;\r\n\tprivate ListenerManager<ProjectListener> listenerManager = new ListenerManager<>();\r\n\t\r\n\t/**\r\n\t * A project can contain more than 1 side of the disc.\r\n\t * \r...
import java.io.File; import java.io.IOException; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; import javax.swing.filechooser.FileNameExtensionFilter; import org.apache.logging.log4j.Logger; import com.oxande.wavecleaner.AudioProject; import com.oxande.wavecleaner.P...
package com.oxande.wavecleaner.ui; @SuppressWarnings("serial") public class MainScreen extends AbstractMainScreen implements AudioPlayerListener, AudioChangedListener, ProjectListener { private static Logger LOG = LogFactory.getLog(MainScreen.class); private WaveCleaner app; private AudioDocument audio; pri...
private AudioProject project;
0
idega/com.idega.block.form
src/java/com/idega/block/form/business/FormsSlidePersistence.java
[ "public class SubmissionDataBean {\n\n\tpublic static final String ATTRIBUTE_MAPPING = \"mapping\";\n\n\tpublic static final String VARIABLE_CASE_DESCRIPTION = \"string_caseDescription\";\n\tpublic static final String VARIABLE_OWNER_PERSONAL_ID = \"string_ownerKennitala\";\n\n\tpublic SubmissionDataBean() {}\n\n\tp...
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.parsers.Doc...
package com.idega.block.form.business; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.44 $ Last modified: $Date: 2009/06/08 08:34:45 $ by $Author: valdas $ */ @XFormPersistenceType("slide") @Scope(BeanDefinition.SCOPE_SINGLETON) @Repository("xformsPersistenceManag...
private XFormsDAO xformsDAO;
3
spotify/trickle
src/examples/java/com/spotify/trickle/example/Examples.java
[ "public class CallInfo {\n private final NodeInfo nodeInfo;\n private final List<ParameterValue<?>> parameterValues;\n\n public CallInfo(NodeInfo nodeInfo, List<ParameterValue<?>> parameterValues) {\n this.nodeInfo = checkNotNull(nodeInfo, \"nodeInfo\");\n this.parameterValues = ImmutableList.copyOf(parame...
import com.google.common.util.concurrent.ListenableFuture; import com.spotify.trickle.CallInfo; import com.spotify.trickle.Func0; import com.spotify.trickle.Func1; import com.spotify.trickle.Graph; import com.spotify.trickle.GraphExecutionException; import com.spotify.trickle.Input; import com.spotify.trickle.Func2; im...
package com.spotify.trickle.example; /** * This class contains examples of how to use Trickle for combining asynchronous calls. */ public class Examples { public static final Input<String> NAME = Input.named("person name"); public static final Input<String> GREETING = Input.named("greeting"); public sta...
Graph<String> g1 = call(transformName).with(NAME).named("nameTransformer");
3
strepsirrhini-army/chaos-loris
src/test/java/io/pivotal/strepsirrhini/chaosloris/web/ScheduleControllerTest.java
[ "@Repository\npublic interface ChaosRepository extends JpaRepository<Chaos, Long> {\n\n /**\n * Find all of the {@link Chaos}es related to an {@link Application}\n *\n * @param application the {@link Application} that {@link Chaos}es are related to\n * @return a collection of {@link Chaos}es rela...
import io.pivotal.strepsirrhini.chaosloris.data.ChaosRepository; import io.pivotal.strepsirrhini.chaosloris.data.Schedule; import io.pivotal.strepsirrhini.chaosloris.data.ScheduleCreatedEvent; import io.pivotal.strepsirrhini.chaosloris.data.ScheduleDeletedEvent; import io.pivotal.strepsirrhini.chaosloris.data.ScheduleR...
/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
private ScheduleRepository scheduleRepository;
4
vtsukur/spring-rest-black-market
src/test/java/org/vtsukur/spring/rest/market/AdsHttpApiTests.java
[ "@Entity\n@Data\npublic class Ad implements Identifiable<Long> {\n\n @Id\n @GeneratedValue\n private Long id;\n\n @Column(nullable = false)\n @Enumerated(EnumType.STRING)\n private Type type;\n\n public enum Type {\n\n BUY,\n\n SELL\n\n }\n\n @Column(nullable = false)\n p...
import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.dat...
package org.vtsukur.spring.rest.market; /** * @author volodymyr.tsukur */ @RunWith(SpringRunner.class) @SpringBootTest @AutoConfigureMockMvc public class AdsHttpApiTests { @Autowired private MockMvc mockMvc; @Autowired private AdRepository adRepository; @Autowired private UserRepository...
referenceUser = userRepository.findByPhoneNumber(Admin.HONTAREVA);
4
100rabhkr/DownZLibrary
downzlibrary/src/main/java/com/example/downzlibrary/RequestTasks/JsonObjectTask.java
[ "public class DownZ {\n private static DownZ instance = null;\n private Context context;\n private String url;\n private Method method;\n private ArrayList<RequestParams> params = new ArrayList<>();\n private ArrayList<HeaderParams> headers = new ArrayList<>();\n\n /**\n * Constructor\n ...
import com.example.downzlibrary.DownZ; import com.example.downzlibrary.ListnerInterface.HttpListener; import com.example.downzlibrary.Parameters.HeaderParams; import com.example.downzlibrary.Parameters.RequestParams; import com.example.downzlibrary.Response; import org.json.JSONObject; import java.util.ArrayList;
package com.example.downzlibrary.RequestTasks; /** * Created by saurabhkumar on 06/08/17. */ public class JsonObjectTask extends Task<String, Void, JSONObject> { private DownZ.Method method; private String mUrl; private HttpListener<JSONObject> callback; private boolean error = false; private...
private ArrayList<HeaderParams> headers;
2
elibom/jogger
src/test/java/com/elibom/jogger/JoggerTest.java
[ "public interface Middleware {\n\n\t/**\n\t * This method is called by {@link Jogger} when a request arrives. Notice that the implementation has to call \n\t * {@link MiddlewareChain#next} to execute the next middlewares.\n\t * \n\t * @param request the Jogger HTTP request.\n\t * @param response the Jogger HTTP res...
import com.elibom.jogger.Middleware; import com.elibom.jogger.Jogger; import com.elibom.jogger.MiddlewareChain; import static org.mockito.Matchers.any; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import java.net.ConnectException; import ja...
package com.elibom.jogger; public class JoggerTest { @Test public void shouldStartStopServer() throws Exception {
Jogger app = new Jogger();
1
multi-os-engine/moe-plugin-gradle
src/main/java/org/moe/gradle/tasks/ResourcePackager.java
[ "public class MoeExtension extends AbstractMoeExtension {\n\n private static final Logger LOG = Logging.getLogger(MoeExtension.class);\n\n @NotNull\n public final PackagingOptions packaging;\n\n @NotNull\n public final ResourceOptions resources;\n\n @NotNull\n public final XcodeOptions xcode;\n...
import org.moe.gradle.utils.TaskUtils; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; import org.gradle.api.Project; import org.gradle.api.Rule; import org.gradle.api.file.CopySpec; import org.gradle.api.tasks.SourceSet; import org.gradle.api.tasks.bundling.Jar; import org.moe.gradle.MoeE...
/* Copyright (C) 2016 Migeran 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 dis...
jar.from(src, new ConfigurationClosure<CopySpec>(ext.plugin.getProject()) {
3
Nanopublication/nanopub-java
src/main/java/org/nanopub/CheckNanopub.java
[ "public interface NanopubHandler {\n\n\tpublic void handleNanopub(Nanopub np);\n\n}", "public class LegacySignatureUtils {\n\n\tprivate LegacySignatureUtils() {} // no instances allowed\n\n\tpublic static NanopubSignatureElement getSignatureElement(Nanopub nanopub) throws MalformedCryptoElementException {\n\t\tI...
import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.List; import org.eclipse.rdf4j.RDF4JException; import org.eclipse.rdf4j.model.impl.SimpleValueFactory; import org.eclipse.rdf4j.repository.RepositoryEx...
package org.nanopub; public class CheckNanopub { @com.beust.jcommander.Parameter(description = "input-nanopubs", required = true) private List<String> inputNanopubs = new ArrayList<String>(); @com.beust.jcommander.Parameter(names = "-v", description = "Verbose") private boolean verbose = false; @com.beust....
if (se == null) legacySe = LegacySignatureUtils.getSignatureElement(np);
1
Nilhcem/devoxxfr-2016
app/src/main/java/com/nilhcem/devoxxfr/data/app/AppMapper.java
[ "public class Schedule extends ArrayList<ScheduleDay> implements Parcelable {\n\n public static final Parcelable.Creator<Schedule> CREATOR = new Parcelable.Creator<Schedule>() {\n public Schedule createFromParcel(Parcel source) {\n return new Schedule(source);\n }\n\n public Sched...
import android.support.annotation.NonNull; import android.support.annotation.Nullable; import com.nilhcem.devoxxfr.data.app.model.Schedule; import com.nilhcem.devoxxfr.data.app.model.ScheduleDay; import com.nilhcem.devoxxfr.data.app.model.ScheduleSlot; import com.nilhcem.devoxxfr.data.app.model.Session; import com.nilh...
package com.nilhcem.devoxxfr.data.app; public class AppMapper { @Inject public AppMapper() { }
public Map<Integer, Speaker> speakersToMap(@NonNull List<Speaker> from) {
4
nvinayshetty/DTOnator
src/com/nvinayshetty/DTOnator/persistence/DtonatorPreferences.java
[ "public enum ClassType {\n SINGLE_FILE_WITH_INNER_CLASS, SEPARATE_FILE\n}", "public enum FieldEncapsulationOptions {\n PROVIDE_GETTER, PROVIDE_SETTER, PROVIDE_PRIVATE_FIELD\n}", "public enum FieldType {\n GSON, POJO,GSON_EXPOSE,JACKSON,CUSTOM,AUTO_VALUE\n}", "public enum LanguageType {\n JAVA, KOT...
import java.util.EnumSet; import java.util.List; import com.intellij.openapi.components.PersistentStateComponent; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.openapi.project.Project; import com.i...
/* * Copyright (C) 2015 Vinaya Prasad N * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later v...
private List<FieldEncapsulationOptions> encapsulete;
1
DosMike/VillagerShops
src/main/java/de/dosmike/sponge/vshop/shops/StockItem.java
[ "public class Utilities {\n\n\t/**\n\t * to prevent bugs from spamming actions, we'll use this to lock any actions\n\t * until 1 tick after the inventory handler finished\n\t */\n\tpublic static final Set<UUID> actionUnstack = new HashSet<>();\n\n\t/**\n\t * remembers what player is viewing what shop as Player <-> ...
import de.dosmike.sponge.vshop.Utilities; import de.dosmike.sponge.vshop.VillagerShops; import de.dosmike.sponge.vshop.systems.GameDictHelper; import de.dosmike.sponge.vshop.systems.ItemNBTCleaner; import de.dosmike.sponge.vshop.systems.ShopType; import de.dosmike.sponge.vshop.systems.pluginfilter.DummyItemFilter; impo...
package de.dosmike.sponge.vshop.shops; public class StockItem { private static final DataQuery dqStackSize = DataQuery.of("Count"); //not interesting for filtering private static final DataQuery dqDamageMeta = DataQuery.of("UnsafeDamage"); //used for variants up to mc 1.12.2 private ItemStackSnapshot item; priva...
public ItemStackSnapshot getItem(ShopType shopType) throws FilterResolutionException {
4
fredokun/yaw
src/java/yaw/engine/World.java
[ "public class Camera {\n\n public Vector3f position; /* Position of the camera (the camera is represented by a point in space). */\n public Vector3f orientation;/* Sets the position of the point fixed by the camera. */\n private Matrix4f perspectiveMat;\n /* Angle of the field of view\n A small an...
import org.joml.Quaternionf; import org.lwjgl.glfw.GLFWKeyCallback; import org.lwjgl.glfw.GLFWKeyCallbackI; import yaw.engine.camera.Camera; import yaw.engine.items.*; import yaw.engine.light.SceneLight; import yaw.engine.meshs.*; import yaw.engine.meshs.strategy.DefaultDrawingStrategy; import yaw.engine.skybox.Skybox;...
package yaw.engine; /** * This is the facade of the engine, most Clojure calls are * made on an instance of this object. The stateful part * is delegated to the underlying MainLoop. * */ public class World { private MainLoop mainLoop; private Thread mloopThread = null; private boolean isRunning = ...
public void addCamera(int pIndex, Camera pCamera) {
0
iloveeclipse/anyedittools
AnyEditTools/src/de/loskutov/anyedit/actions/ConvertAllAction.java
[ "public class AnyEditToolsPlugin extends AbstractUIPlugin {\n\n private static AnyEditToolsPlugin plugin;\n\n private static boolean isSaveHookInitialized;\n\n /**\n * The constructor.\n */\n public AnyEditToolsPlugin() {\n super();\n if(plugin != null) {\n throw new Ill...
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.core.filebuffers.FileBuffers; import org.eclipse.core.filebuffers.ITextFileBuffer; import org.eclipse.core.filebuffers.ITextFileBufferManager; import org.eclipse.core.filebuffers.LocationKind; import org.eclipse.core.resour...
/******************************************************************************* * Copyright (c) 2009 Andrey Loskutov. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at...
.getBoolean(IAnyEditConstants.SAVE_DIRTY_BUFFER);
1
PunchThrough/bean-sdk-android
sdk/src/androidTest/java/com/punchthrough/bean/sdk/TestBeanFirmwareUpdate.java
[ "public class ImageParsingException extends Exception {\n public ImageParsingException(String detailMessage) {\n super(detailMessage);\n }\n}", "public class OADProfile extends BaseProfile {\n /**\n * Custom OAD Profile for LightBlue Bean devices.\n *\n * This class encapsulates data a...
import android.test.suitebuilder.annotation.Suppress; import android.util.Log; import com.punchthrough.bean.sdk.internal.exception.ImageParsingException; import com.punchthrough.bean.sdk.internal.upload.firmware.OADProfile; import com.punchthrough.bean.sdk.internal.upload.firmware.OADState; import com.punchthrough.bean...
package com.punchthrough.bean.sdk; public class TestBeanFirmwareUpdate extends BeanTestCase { private final String TAG = "TestBeanFirmwareUpdate"; private final int FW_TEST_MAX_DURATION = 5; // Minutes private final boolean FORCE_UPDATE = true; private Bean bean; private OADProfile.OADAppro...
public void error(BeanError error) {
3
tticoin/JointER
src/jp/tti_coin/main/java/data/nlp/relation/RelationEvaluator.java
[ "public abstract class Model {\n\tprotected Parameters params;\n\tprotected FeatureGenerator fg;\n\tprotected WeightVector weight;\n\tprotected WeightVector weightDiff;\n\tprotected WeightVector aveWeight;\n\tprotected int trainStep;\n\t\n\tpublic Model(Parameters params, FeatureGenerator fg){\n\t\tthis.params = pa...
import java.io.BufferedWriter; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.TreeMap; import com.google.common.io.Files; import model.Model; import inference.Inference; import inference.State; i...
package data.nlp.relation; public class RelationEvaluator extends Evaluator { public RelationEvaluator(Parameters params, Inference infer) { super(params, infer); } private class Counter{ int correct; int pred; int gold; public Counter(){ correct = 0; pred = 0; gold = 0; } double getPre...
Instance instance = valid.getInstance(idx);
5
sagemath/android
src/org/sagemath/droid/fragments/CellGroupsFragment.java
[ "public class HelpActivity extends ActionBarActivity {\n private static final String TAG = \"SageDroid:HelpActivity\";\n\n public static final String EXTRA_SELECTED_TAB = \"selectedTab\";\n\n private static final int TAB_START = 0;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\...
import android.annotation.TargetApi; import android.content.Intent; import android.content.res.Configuration; import android.graphics.Color; import android.os.Build; import android.os.Bundle; import android.support.v4.app.FragmentManager; import android.support.v4.app.ListFragment; import android.view.*; import android...
package org.sagemath.droid.fragments; /** * Fragment which displays the Cell Groups * * @author Rasmi.Elasmar * @author Ralf.Stephan * @author Nikhil Peter Raj */ public class CellGroupsFragment extends ListFragment { private static final String TAG = "SageDroid:CellGroupsFragment"; private static fi...
public void onGroupSelected(Group group);
8
jurihock/voicesmith
voicesmith/src/de/jurihock/voicesmith/dsp/processors/HoarsenessProcessor.java
[ "public static final float\tPI\t= (float) java.lang.Math.PI;", "public static native float abs(float real, float imag);", "public static native float imag(float abs, float arg);", "public static native float random(float min, float max);", "public static native float real(float abs, float arg);" ]
import static de.jurihock.voicesmith.dsp.Math.PI; import static de.jurihock.voicesmith.dsp.Math.abs; import static de.jurihock.voicesmith.dsp.Math.imag; import static de.jurihock.voicesmith.dsp.Math.random; import static de.jurihock.voicesmith.dsp.Math.real;
/* * Voicesmith <http://voicesmith.jurihock.de/> * * Copyright (c) 2011-2014 Juergen Hock * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your...
float re, im, abs, phase;
1
krazykira/VidEffects
videffects/src/main/java/com/sherazkhilji/videffects/view/VideoSurfaceView.java
[ "public class NoEffect implements ShaderInterface {\r\n\r\n @Override\r\n public String getShader(GLSurfaceView mGlSurfaceView) {\r\n return \"#extension GL_OES_EGL_image_external : require\\n\"\r\n + \"precision mediump float;\\n\"\r\n + \"varying vec2 vTextureCoord;\\n\"...
import android.annotation.SuppressLint; import android.content.Context; import android.graphics.SurfaceTexture; import android.media.MediaPlayer; import android.opengl.GLES20; import android.opengl.GLSurfaceView; import android.opengl.Matrix; import android.util.AttributeSet; import android.util.Log; import android.vie...
package com.sherazkhilji.videffects.view; /** * This GLSurfaceView can be used to display video that is being played by media * player and at the same time different effect can be applied on the video. * This view uses shader for applying different effects. * * @author sheraz.khilji */ @SuppressLint("ViewCo...
private class VideoRender extends BaseRenderer implements Renderer,
4
FedericoPecora/coordination_oru
src/main/java/se/oru/coordination/coordination_oru/tests/TestTrajectoryEnvelopeCoordinatorWithMotionPlanner14.java
[ "public class ConstantAccelerationForwardModel implements ForwardModel {\n\t\t\n\tprivate double maxAccel, maxVel;\n\tprivate double temporalResolution = -1;\n\tprivate int trackingPeriodInMillis = 0;\n\tprivate int controlPeriodInMillis = -1;\n\t\n\tpublic ConstantAccelerationForwardModel(double maxAccel, double m...
import java.io.File; import java.util.Comparator; import org.metacsp.multi.spatioTemporal.paths.Pose; import com.vividsolutions.jts.geom.Coordinate; import se.oru.coordination.coordination_oru.ConstantAccelerationForwardModel; import se.oru.coordination.coordination_oru.CriticalSection; import se.oru.coordination.coord...
package se.oru.coordination.coordination_oru.tests; @DemoDescription(desc = "Example showing that parking poses are considered in coordination.") public class TestTrajectoryEnvelopeCoordinatorWithMotionPlanner14 { public static void main(String[] args) throws InterruptedException { double MAX_ACCEL = 1.0; d...
CriticalSection cs = o1.getCriticalSection();
1
mini666/hive-phoenix-handler
src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
[ "@Explain(displayName = \"TableScan\", explainLevels = { Level.USER, Level.DEFAULT, Level.EXTENDED })\r\npublic class TableScanDesc extends AbstractOperatorDesc {\r\n private static final long serialVersionUID = 1L;\r\n\r\n static {\r\n\t//2015-10-14 JenogMin Ju : Apply Hive-11609 Patch\r\n// PTFUtils.makeTran...
import java.io.IOException; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; import java.util.List; import java.util.Map; import java.util.Properties; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configura...
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"...
Map<String, String> columnTypeMap = PhoenixStorageHandlerUtil.createColumnTypeMap(jobConf);
4
davemorrissey/brightpearl-api-client-java
src/test/java/uk/co/visalia/brightpearl/apiclient/BrightpearlApiSessionAuthTest.java
[ "public final class Account implements Serializable {\n\n private final Datacenter datacenter;\n\n private final String accountCode;\n\n /**\n * Construct an account instance.\n * @param datacenter the datacenter that hosts the account.\n * @param accountCode the customer account code.\n */...
import static com.github.restdriver.clientdriver.RestClientDriver.giveResponse; import static com.github.restdriver.clientdriver.RestClientDriver.onRequestTo; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import com.github.restdriver.clientdriver.ClientDriverRequest.Method...
/* * Copyright 2014 David Morrissey * * 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...
ClientFactory clientFactory = HttpClient4ClientFactoryBuilder
6
asher-stern/CRF
src/main/java/com/asher_stern/crf/crf/run/CrfTrainerFactory.java
[ "public class CrfLogLikelihoodFunction<K,G> extends DerivableFunction\n{\n\t/**\n\t * Constructs the log-likelihood function of the CRF.\n\t * Note that the whole corpus should be inside the internal memory (the JVM heap). It should not be in disk or data-base.\n\t * \n\t * @param corpus A corpus -- a list of seque...
import java.lang.reflect.Array; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.log4j.Logger; import com.asher_stern.crf.crf.CrfLogLikelihoodFunction; import com.asher_stern.crf.crf.CrfTags; i...
package com.asher_stern.crf.crf.run; /** * A factory which generates a new CRF trainer. * * @author Asher Stern * Date: Nov 23, 2014 * * @param <K> * @param <G> */ public class CrfTrainerFactory<K,G> { /** * Optional setter for regularization factor. If this method was not called, the default regulariz...
public CrfTrainer<K,G> createTrainer(List<List<? extends TaggedToken<K, G> >> corpus, CrfFeatureGeneratorFactory<K,G> featureGeneratorFactory, FilterFactory<K, G> filterFactory)
6
OpenWatch/OpenWatch-Android
app/OpenWatch/src/org/ale/openwatch/OWInvestigationViewActivity.java
[ "public class Constants {\n\n public static final String SUPPORT_EMAIL = \"team@openwatch.net\";\n public static final String GOOGLE_STORE_URL = \"https://play.google.com/store/apps/details?id=org.ale.openwatch\";\n public static final String APPLE_STORE_URL = \"https://itunes.apple.com/us/app/openwatch-so...
import android.content.Context; import android.os.Bundle; import android.support.v4.app.NavUtils; import android.text.Html; import android.util.Log; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.actionbarsherlock.app.SherlockActivity; import com.actionbarsher...
package org.ale.openwatch; public class OWInvestigationViewActivity extends SherlockActivity implements OWObjectBackedEntity { private static final String TAG = "OWInvestigationViewActivity"; //private View progress; private int model_id; private int server_id; @Override protected void onCreate(Bundle ...
OWServiceRequests.increaseHitCount(getApplicationContext(), server_id, model_id, CONTENT_TYPE.INVESTIGATION, HIT_TYPE.CLICK);
1
BudgetFreak/BudgetFreak
server/user-management/src/test/java/de/budgetfreak/usermanagement/web/UserControllerTest.java
[ "public abstract class ResourceLinks<E> {\n private Class<E> targetType;\n\n public ResourceLinks(Class<E> targetType) {\n this.targetType = targetType;\n }\n\n public abstract Collection<Link> generateLinks(E entity);\n\n public boolean accepts(Class<?> targetClass) {\n return targetCl...
import de.budgetfreak.utils.web.ResourceLinks; import de.budgetfreak.utils.webtests.JsonHelper; import de.budgetfreak.usermanagement.UserTestUtils; import de.budgetfreak.usermanagement.domain.User; import de.budgetfreak.usermanagement.service.UserService; import org.junit.Test; import org.junit.runner.RunWith; import o...
package de.budgetfreak.usermanagement.web; @RunWith(SpringRunner.class) @WebMvcTest(value = UserController.class) @Import(UserResourceAssembler.class) public class UserControllerTest { @MockBean private UserService userServiceMock; @MockBean private ResourceLinks<User> userResourceLinksMock; @...
when(userServiceMock.list()).thenAnswer(invocation -> UserTestUtils.createBobAndJane());
2
abicelis/Remindy
app/src/main/java/ve/com/abicelis/remindy/app/fragments/SettingsFragment.java
[ "public class AboutActivity extends AppCompatActivity {\n\n\n @Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_about);\n\n Toolbar toolbar = (Toolbar) findViewById(R.id.activity_about_toolba...
import android.Manifest; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.an...
package ve.com.abicelis.remindy.app.fragments; /** * Created by abice on 9/2/2017. */ public class SettingsFragment extends PreferenceFragmentCompat { //CONSTS private static final int REQUEST_CODE_WRITE_STORAGE_EXPORT = 90; private static final int REQUEST_CODE_WRITE_STORAGE_IMPORT = 100; //...
((SettingsActivity)getActivity()).mForceHomeRefresh = true;
2
Effervex/CycDAG
src/graph/module/DepthModule.java
[ "public enum CommonConcepts {\r\n\tAND(\"and\"),\r\n\tARG1GENL(\"arg1Genl\"),\r\n\tARG1ISA(\"arg1Isa\"),\r\n\tARG1NOTGENL(\"arg1NotGenl\"),\r\n\tARG1NOTISA(\"arg1NotIsa\"),\r\n\tARG2GENL(\"arg2Genl\"),\r\n\tARG2ISA(\"arg2Isa\"),\r\n\tARG2NOTGENL(\"arg2NotGenl\"),\r\n\tARG2NOTISA(\"arg2NotIsa\"),\r\n\tARGGENL(\"argG...
import gnu.trove.iterator.TIntObjectIterator; import graph.core.CommonConcepts; import graph.core.DAGEdge; import graph.core.DAGNode; import graph.core.EdgeModifier; import graph.core.Node; import graph.core.OntologyFunction; import graph.inference.QueryObject; import graph.inference.VariableNode; import java....
/******************************************************************************* * Copyright (C) 2013 University of Waikato, Hamilton, New Zealand. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this dist...
minParents.addAll(checkParentRelationship(node, CommonConcepts.GENLS,
0
slide-lig/jlcm
src/test/java/fr/liglab/jlcm/tests/PlcmTest.java
[ "public class PLCM {\n\tfinal List<PLCMThread> threads;\n\tprivate ProgressWatcherThread progressWatch;\n\tprotected static long chrono;\n\n\tprivate final PatternsCollector collector;\n\n\tprivate final long[] globalCounters;\n\t\n\tpublic PLCM(PatternsCollector patternsCollector, int nbThreads) {\n\t\tthis(patter...
import static org.junit.Assert.*; import java.util.Iterator; import org.junit.Test; import fr.liglab.jlcm.PLCM; import fr.liglab.jlcm.internals.ExplorationStep; import fr.liglab.jlcm.internals.TransactionReader; import fr.liglab.jlcm.io.AllFISConverter; import fr.liglab.jlcm.io.FileReader; import fr.liglab.jlcm.io.Patt...
package fr.liglab.jlcm.tests; public class PlcmTest { private void minerInvocation(int minsup, String path, PatternsCollector collector) { ExplorationStep init = new ExplorationStep(minsup, path);
PLCM algo = new PLCM(collector, 1);
0
swarmcom/jSynapse
src/main/java/org/swarmcom/jsynapse/service/user/UserServiceImpl.java
[ "public interface UserRepository extends MongoRepository<User, String> {\n User findOneByUserId(String userId);\n}", "public class AccessToken {\n @Id\n String id;\n\n String userId;\n\n String token;\n\n Date lastUsed;\n\n public AccessToken(@NotNull String userId, @NotNull String token, @No...
import java.util.Date; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import org.swarmcom.jsynapse.dao.UserRepository; import org.swarmcom.jsynapse.domain.AccessToken; import org.swarmcom.jsynapse.domain.User; import org.swarmcom.jsynapse.service.accesstoken.A...
/* * (C) Copyright 2015 eZuce 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 ...
throw new InvalidRequestException("Display name to set is null");
6
yammer/breakerbox
breakerbox-service/src/main/java/com/yammer/breakerbox/service/resources/ClustersResource.java
[ "public class Instances {\n private static final Logger LOGGER = LoggerFactory.getLogger(Instances.class);\n\n public static Collection<Instance> instances() {\n try {\n return PluginsFactory.getInstanceDiscovery().getInstanceList();\n } catch (Exception err) {\n LOGGER.war...
import com.codahale.metrics.annotation.Timed; import com.google.common.collect.Ordering; import com.yammer.breakerbox.service.comparable.SortRowFirst; import com.yammer.breakerbox.service.core.Instances; import com.yammer.breakerbox.service.store.TenacityPropertyKeysStore; import com.yammer.breakerbox.store.BreakerboxS...
package com.yammer.breakerbox.service.resources; @Path("/clusters") public class ClustersResource { private final Set<String> specifiedMetaClusters;
private final BreakerboxStore breakerboxStore;
2
dikhan/pagerduty-client
src/test/java/com/github/dikhan/pagerduty/client/events/HttpApiServiceImplTest.java
[ "@JsonInclude(JsonInclude.Include.NON_NULL)\npublic class ChangeEvent implements PagerDutyEvent {\n @JsonProperty(\"routing_key\")\n private final String routingKey;\n @JsonProperty(\"payload\")\n private final ChangeEventPayload payload;\n @JsonProperty(\"links\")\n private final List<LinkContext...
import com.github.dikhan.pagerduty.client.events.domain.ChangeEvent; import com.github.dikhan.pagerduty.client.events.domain.EventResult; import com.github.dikhan.pagerduty.client.events.domain.Incident; import com.github.dikhan.pagerduty.client.events.utils.EventHelper; import com.github.dikhan.pagerduty.client.events...
} @Test public void notifyIncidentEventAndErrorResponseFromUpstreamServer() throws Exception { Incident incident = prepareSampleTriggerIncident("SERVICE_KEY"); MockServerUtils.prepareMockServerToReceiveEventAndReplyWithWithErrorResponse(mockServerClient, incident, EventHelpe...
ChangeEvent changeEvent = prepareSampleChangeEvent("SERVICE_KEY");
6
tomayac/rest-describe-and-compile
src/com/google/code/apis/rest/client/GUI/RestCompilePanel.java
[ "public class CodeGenerator {\n // available languages\n public static final String php5 = \"PHP 5\";\n public static final String java = \"Java\";\n public static final String python = \"Python\";\n public static final String ruby = \"Ruby\";\n public static final String csharp = \"C#\"; \n public static...
import java.util.Iterator; import java.util.Vector; import com.google.code.apis.rest.client.CodeGeneration.CodeGenerator; import com.google.code.apis.rest.client.Wadl.Analyzer; import com.google.code.apis.rest.client.Wadl.ApplicationNode; import com.google.code.apis.rest.client.Wadl.MethodNode; import com.google.code.a...
Hyperlink hyperlink = new Hyperlink("<nobr><img align=\"absmiddle\" src=\"./images/details.png\" />" + className + "</nobr>", true, ""); hyperlink.addClickListener(new ClickListener() { public void onClick(Widget sender) { int pos = codeTextArea.getText().indexOf(className); code...
ParamNode param = (ParamNode) allParamsIterator.next();
4
immibis/bearded-octo-nemesis
immibis/bon/org/objectweb/asm/tree/FieldNode.java
[ "public abstract class AnnotationVisitor {\n\n /**\n * The ASM API version implemented by this visitor. The value of this field\n * must be one of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}.\n */\n protected final int api;\n\n /**\n * The annotation visitor to which this visitor must dele...
import immibis.bon.org.objectweb.asm.Attribute; import immibis.bon.org.objectweb.asm.ClassVisitor; import immibis.bon.org.objectweb.asm.FieldVisitor; import immibis.bon.org.objectweb.asm.Opcodes; import immibis.bon.org.objectweb.asm.TypePath; import java.util.ArrayList; import java.util.List; import immibis.bon.org.obj...
/*** * ASM: a very small and fast Java bytecode manipulation framework * Copyright (c) 2000-2011 INRIA, France Telecom * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistribution...
this(Opcodes.ASM5, access, name, desc, signature, value);
4
FlareBot/FlareBot
src/main/java/stream/flarebot/flarebot/objects/GuildWrapper.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 net.dv8tion.jda.core.Permission; import net.dv8tion.jda.core.entities.Guild; import net.dv8tion.jda.core.entities.Role; import net.dv8tion.jda.core.entities.User; import stream.flarebot.flarebot.FlareBot; import stream.flarebot.flarebot.Getters; import stream.flarebot.flarebot.mod.Moderation; import stream.flare...
package stream.flarebot.flarebot.objects; public class GuildWrapper { public static transient final long DATA_VERSION = 1; public final long dataVersion = DATA_VERSION; private String guildId; private char prefix = Constants.COMMAND_CHAR; private Welcome welcome = new Welcome(); private Per...
return Getters.getGuildById(guildId);
1
stacksync/sync-service
src/test/java/com/stacksync/syncservice/test/handler/UpdateMetadataTest.java
[ "public abstract class ConnectionPool {\n\n\tpublic abstract Connection getConnection() throws SQLException;\n\n}", "public class ConnectionPoolFactory {\n\tprivate static final Logger logger = Logger.getLogger(ConnectionPoolFactory.class.getName());\n\n\tpublic static ConnectionPool getConnectionPool(String data...
import java.sql.Connection; import java.util.UUID; import org.junit.BeforeClass; import org.junit.Test; import com.stacksync.commons.models.ItemMetadata; import com.stacksync.commons.models.User; import com.stacksync.commons.models.Workspace; import com.stacksync.syncservice.db.ConnectionPool; import com.stacksync.sync...
package com.stacksync.syncservice.test.handler; public class UpdateMetadataTest { private static APIHandler handler; private static WorkspaceDAO workspaceDAO; private static UserDAO userDao; private static User user1; private static User user2; @BeforeClass public static void initializeData() throws Except...
ConnectionPool pool = ConnectionPoolFactory.getConnectionPool(datasource);
1
SamuelGjk/DiyCode
app/src/main/java/moe/yukinoneko/diycode/module/topic/create/CreateTopicActivity.java
[ "public class Node {\n\n @SerializedName(\"id\") public int id; // 节点 id\n @SerializedName(\"name\") public String name; // 节点名\n @SerializedName(\"topics_count\") public int topicsCount; // 话题数量\n @SerializedName(\"summary\") public String summary;...
import android.app.ProgressDialog; import android.content.Intent; import android.content.pm.ActivityInfo; import android.os.Bundle; import android.support.v7.widget.AppCompatEditText; import android.support.v7.widget.AppCompatSpinner; import android.view.Menu; import android.view.MenuItem; import android.view.View; imp...
/* * Copyright (c) 2017 SamuelGjk <samuel.alva@outlook.com> * * This file is part of DiyCode * * DiyCode 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 o...
insertPhoto(editContent, imageUrl);
4
PeterCxy/BlackLight
src/us/shandian/blacklight/ui/entry/EntryActivity.java
[ "public abstract class BaseApi\n{\n\tprivate static final String TAG = BaseApi.class.getSimpleName();\n\t\n\t// Http Methods\n\tprotected static final String HTTP_GET = HttpUtility.GET;\n\tprotected static final String HTTP_POST = HttpUtility.POST;\n\t\n\t// Access Token\n\tprivate static String mAccessToken;\n\t\n...
import us.shandian.blacklight.support.Utility; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import us.shandian.blacklight.api.BaseApi; import us.shandian.blacklight.cache.login.LoginApiCache; import us.shandian.blacklight.cache.file.FileCacheManager; import us.shandian.blackligh...
/* * Copyright (C) 2014 Peter Cai * * This file is part of BlackLight * * BlackLight 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 ve...
CrashHandler.init(this);
5
gems-uff/prov-viewer
src/main/java/br/uff/ic/utility/GraphUtils.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 br.uff.ic.utility.graph.GraphVertex; import br.uff.ic.utility.graph.Vertex; import edu.uci.ics.jung.graph.DirectedGraph; import edu.uci.ics.jung.graph.Graph; import edu.uci.ics.jung.graph.util.Pair; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; import br...
/* * 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...
} else if (vertex instanceof ActivityVertex) {
2
ground-context/ground
modules/postgres/test/edu/berkeley/ground/postgres/dao/version/PostgresVersionSuccessorDaoTest.java
[ "public class GroundException extends Exception {\n\n private static final long serialVersionUID = 1L;\n\n private final String message;\n private final ExceptionType exceptionType;\n\n public enum ExceptionType {\n DB(\"Database Exception:\", \"%s\"),\n ITEM_NOT_FOUND(\"GroundItemNotFoundException\", \"N...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; import edu.berkeley.ground.common.exception.GroundException; import edu.berkeley.ground.common.model.version.Version; import edu.berkeley.ground.common.model.version.VersionSuccessor; import edu.berkeley.ground.postgres.dao.PostgresTest; ...
/** * 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 * distributed ...
PostgresUtils.executeSqlList(PostgresTest.dbSource, (PostgresStatements) PostgresTest.postgresVersionDao.insert(new Version(fromId)));
1
CreativeMD/IGCM
src/main/java/com/creativemd/igcm/client/gui/SubGuiConfigSegement.java
[ "@Mod(modid = IGCM.modid, version = IGCM.version, name = \"InGameConfigManager\", acceptedMinecraftVersions = \"\", dependencies = \"required-before:creativecore\")\npublic class IGCM {\n\t\n\tpublic static Logger logger = LogManager.getLogger(IGCM.modid);\n\t\n\tpublic static final String modid = \"igcm\";\n\tpubl...
import java.util.ArrayList; import java.util.Collection; import com.creativemd.creativecore.common.gui.ContainerControl; import com.creativemd.creativecore.common.gui.GuiControl; import com.creativemd.creativecore.common.gui.container.SubGui; import com.creativemd.creativecore.common.gui.controls.container.SlotControlN...
package com.creativemd.igcm.client.gui; public class SubGuiConfigSegement extends SubGui { public static final int loadPerTick = 20; public SubGuiConfigSegement(ConfigSegment element) { super(250, 250); this.element = element; } public int aimedScrollPos = -1; public int index; public int height; p...
if (element instanceof ConfigBranch)
2
metova/privvy
sample/src/main/java/com/metova/privvy/sample/di/PrivvyModule.java
[ "@ButtonScope\n@Subcomponent(modules = {ButtonModule.class})\npublic interface ButtonComponent {\n\n RouteData ROUTE_DATA = RouteData.Builder()\n .viewType(ViewType.FRAGMENT)\n .viewClass(ButtonFragment.class)\n .viewId(R.id.button_component)\n .build();\n\n ButtonC...
import com.metova.privvy.sample.ui.floatingnumber.buttons.ButtonComponent; import com.metova.privvy.sample.ui.floatingnumber.buttons.ButtonModule; import com.metova.privvy.sample.ui.list.ListComponent; import com.metova.privvy.sample.ui.list.ListModule; import com.metova.privvy.sample.ui.floatingnumber.number.NumberCom...
package com.metova.privvy.sample.di; @Module(subcomponents = { NumberComponent.class, ButtonComponent.class, ListComponent.class, // SkeletonComponent.class }) public class PrivvyModule { @Provides @PrivvyScope NumberComponent provideNumberComponent(NumberComponent.Builder...
return builder.buttonModule(new ButtonModule()).build();
1
stoussaint/spring-data-marklogic
src/main/java/com/_4dconcept/springframework/data/marklogic/core/query/QueryBuilder.java
[ "public interface MarklogicCollectionUtils {\n\n default <T> List<String> extractCollections(T entity, MappingContext<? extends MarklogicPersistentEntity<?>, MarklogicPersistentProperty> mappingContext) {\n ArrayList<String> collections = new ArrayList<>();\n\n collections.addAll(extractCollections...
import com._4dconcept.springframework.data.marklogic.MarklogicCollectionUtils; import com._4dconcept.springframework.data.marklogic.MarklogicTypeUtils; import com._4dconcept.springframework.data.marklogic.MarklogicUtils; import com._4dconcept.springframework.data.marklogic.core.MarklogicOperationOptions; import com._4d...
/* * Copyright 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
private MappingContext<? extends MarklogicPersistentEntity<?>, MarklogicPersistentProperty> mappingContext;
7
andyiac/githot
app/src/main/java/com/knight/arch/ui/ReposDetailsActivity.java
[ "public interface ApiService {\n\n @GET(\"/search/users\")\n Observable<Users<User>> getUsersRxJava(\n @Query(value = \"q\", encodeValue = false) String query,\n @Query(\"page\") int pageId\n );\n\n @GET(\"/search/users\")\n Observable<Users<User>> getUsersRxJava(\n @...
import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v7.app.ActionBar; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.text....
package com.knight.arch.ui; /** * @author andyiac * @date 15-8-4 * @web http://blog.andyiac.com/ */ public class ReposDetailsActivity extends InjectableActivity { private Repository mRepository; private RecyclerView mRecyclerView; private HotReposDetailsListAdapterHolder adapter; private Linea...
ApiService oAuthApiService;
0
Thomas-Bergmann/Tournament
de.hatoka.user/src/test/java/de/hatoka/user/capi/business/TestBusinessInjectorProvider.java
[ "public class CommonDaoModule implements Module\n{\n private long start;\n\n public CommonDaoModule()\n {\n this(0);\n }\n\n public CommonDaoModule(long sequenceStartPosition)\n {\n start = sequenceStartPosition;\n }\n\n @Override\n public void configure(Binder binder)\n ...
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Module; import de.hatoka.common.capi.modules.CommonDaoModule; import de.hatoka.mail.capi.config.SmtpConfiguration; import de.hatoka.mail.internal.module...
package de.hatoka.user.capi.business; public final class TestBusinessInjectorProvider { public static Injector get(Module... modules) { List<Module> list = new ArrayList<>(Arrays.asList(modules));
list.addAll(Arrays.asList(new CommonDaoModule(), new UserDaoJpaModule(), new UserBusinessModule(),
0
ZonCon/Ecommerce-Retronight-Android
app/src/main/java/com/megotechnologies/ecommerce_retronight/loading/FragmentLoading.java
[ "public class FragmentMeta extends Fragment{\n\n\tprotected View v;\n\tprotected MainActivity activity;\n\tprotected DbConnection dbC;\n\tprotected Boolean LOCATION_SELECTED = false;\n\tprotected Boolean IS_SIGNEDIN = false;\n\tprotected Boolean IS_CLICKED = false;\n\n\t@Override\n\tpublic void onCreate(Bundle save...
import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.drawable.AnimationDrawable; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.view.LayoutInflater; import android.view.View; ...
package com.megotechnologies.ecommerce_retronight.loading; public class FragmentLoading extends FragmentMeta implements ZCFragmentLifecycle, ZCRunnable { TextView tvPoweredBy; RelativeLayout rlLoadingC; ImageView ivLoading, ivLoadingBg; protected Thread threadChecker; protected ThreadStreams threadStream; pr...
v = inflater.inflate(R.layout.fragment_loading, container, false);
2
cernekee/ics-openconnect
app/src/main/java/app/openconnect/api/ExternalOpenVPNService.java
[ "public class VpnProfile implements Comparable<VpnProfile> {\n public static final String INLINE_TAG = \"[[INLINE]]\";\n\n public SharedPreferences mPrefs;\n public String mName;\n\n private UUID mUuid;\n\n private void loadPrefs(SharedPreferences prefs) {\n \tmPrefs = prefs;\n\n \tString uuid ...
import java.lang.ref.WeakReference; import java.util.LinkedList; import java.util.List; import android.app.Service; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.content.pm.ApplicationInfo; import android.con...
/* * Adapted from OpenVPN for Android * Copyright (c) 2012-2013, Arne Schwabe * All rights reserved. * * 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, ...
for(VpnProfile vp: ProfileManager.getProfiles())
4
elibom/jogger
src/test/java/com/elibom/jogger/DefaultExceptionHandlerTest.java
[ "public class DefaultExceptionHandler implements ExceptionHandler {\n\t\n\tprivate Configuration freemarker;\n\t\n\tpublic DefaultExceptionHandler() {\n\t\tthis.freemarker = new Configuration();\n\t\tthis.freemarker.setClassForTemplateLoading(Jogger.class, \"/templates/\");\n\t}\n\n\tpublic void handle(Exception e,...
import com.elibom.jogger.DefaultExceptionHandler; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import com.elibom.jogger.exception.NotFoundException; import com.el...
package com.elibom.jogger; public class DefaultExceptionHandlerTest { @Test public void shouldHandleException() throws Exception { Request request = mock(Request.class); when(request.getHeader(Headers.ACCEPT)).thenReturn("text/html");
Response response = mock(Response.class);
5
jaumecornado/DroidNubeKit
src/main/java/net/moddity/droidnubekit/interfaces/CloudKitService.java
[ "public interface DNKCallback<T> {\n void success(T t);\n void failure(Throwable exception);\n}", "public class DNKRecordLookupRequest {\n private List<DNKLookupRecord> records;\n private DNKZone zoneID;\n private List<String> desiredKeys;\n\n public List<DNKLookupRecord> getRecords() {\n ...
import net.moddity.droidnubekit.requests.DNKCallback; import net.moddity.droidnubekit.requests.DNKRecordLookupRequest; import net.moddity.droidnubekit.requests.DNKRecordModifyRequest; import net.moddity.droidnubekit.requests.DNKRecordQueryRequest; import net.moddity.droidnubekit.responsemodels.DNKRecord; import net.mod...
package net.moddity.droidnubekit.interfaces; /** * Created by jaume on 11/6/15. */ public interface CloudKitService { @GET("/database/{version}/{container}/{environment}/{database}/zones/list") void getZones(@Path("version") String version, @Path("container") String container, @Path("environment") String ...
void queryRecords(@Path("version") String version, @Path("container") String container, @Path("environment") String environment, @Path("database") String database, @Body DNKRecordQueryRequest recordQueryRequest, @Query("ckAPIToken") String ckAPIToken, Callback<DNKRecordsResponse> callback);
5
danicadamljanovic/freya
freya/freya-annotate/src/main/java/org/freya/analyser/QueryResultsMaker.java
[ "public class FormalQueryResult {\r\n\r\n\t/**\r\n\t * \r\n\t */\r\n\tprivate static final long serialVersionUID = 1L;\r\n\t\r\n\tList<String> uris = new ArrayList<String>();\r\n\t/* holding results */\r\n\tList<List<String>> data;\r\n\r\n\t/* holding executed sparql query which is a context query */\r\n\tString q...
import java.util.ArrayList; import java.util.List; import org.freya.model.FormalQueryResult; import org.freya.model.OntologyElement; import org.freya.model.PropertyElement; import org.freya.model.QueryElement; import org.freya.model.Question; import org.freya.util.FreyaConstants; import org.freya.util.QueryUtil...
/** * */ package org.freya.analyser; /** * @author danica */ @Component public class QueryResultsMaker { static org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory .getLog(QueryResultsMaker.class); @Autowired QueryUtil queryUtil; /...
if (aType != null && aType.size() > 0 && aType.get(0) instanceof PropertyElement) {
2
matburt/mobileorg-android
MobileOrg/src/main/java/com/matburt/mobileorg/gui/outline/ConflictResolverActivity.java
[ "public class OrgContract {\n\tpublic static final String CONTENT_AUTHORITY = \"com.matburt.mobileorg.orgdata.OrgProvider\";\n\tprivate static final Uri BASE_CONTENT_URI = Uri.parse(\"content://\" + CONTENT_AUTHORITY);\n\tprivate static final String PATH_ORGDATA = OrgDatabase.Tables.ORGDATA;\n\tprivate static final...
import android.content.ContentValues; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.NavUtils; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuInf...
package com.matburt.mobileorg.gui.outline; public class ConflictResolverActivity extends AppCompatActivity { EditText editText; String filename; Long nodeId; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layou...
nodeId = getIntent().getLongExtra(OrgContract.NODE_ID, -1);
0
vihuela/Lay-s
lay-s/src/main/java/com/hadlink/lay_s/delegate/ImageListDelegate.java
[ "public class ImageDetail {\n public String id;\n public String desc;\n /**\n * userName : 娴子Love火影\n * userId : 355362267\n * userSign : 1694498816 355112415\n * isSelf : 0\n * portrait : db65e5a8b4e5ad904c6f7665e781abe5bdb12e15\n * isVip : 0\n * isLanv : 0\n * isJiaju :\n ...
import android.content.Context; import android.content.Intent; import android.graphics.Rect; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.text.TextUtils; import android.view.View; import com.hadlink.lay_s.R; import com.hadlink.lay_s.datamanager.bean.ImageDetail; import c...
/* * Copyright (c) 2016, lyao. lomoliger@hotmail.com * * Part of the code from the open source community, * thanks stackOverflow & gitHub . * 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 ...
AdapterViewAdapter<ImageDetail> adapter;
0