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 |
|---|---|---|---|---|---|---|
Darkona/AdventureBackpack2 | src/main/java/com/darkona/adventurebackpack/item/ItemHose.java | [
"public class CreativeTabAB\n{\n\n public static final CreativeTabs ADVENTURE_BACKPACK_CREATIVE_TAB = new CreativeTabs(ModInfo.MOD_ID.toLowerCase())\n {\n @Override\n public Item getTabIconItem()\n {\n return ModItems.machete;\n }\n\n @Override\n public Str... | import com.darkona.adventurebackpack.CreativeTabAB;
import com.darkona.adventurebackpack.common.Constants;
import com.darkona.adventurebackpack.common.ServerActions;
import com.darkona.adventurebackpack.fluids.FluidEffectRegistry;
import com.darkona.adventurebackpack.init.ModFluids;
import com.darkona.adventurebackpack... | /* if (!world.canMineBlock(player, mop.blockX, mop.blockY, mop.blockZ))
{
return stack;
}*/
if (!player.canPlayerEdit(mop.blockX, mop.blockY, mop.blockZ, mop.sideHit, null))
... | if (FluidEffectRegistry.hasFluidEffect(tank.getFluid().getFluid())) | 3 |
qcloudsms/qcloudsms_java | src/main/java/com/github/qcloudsms/VoiceFileUploader.java | [
"public interface HTTPClient {\n\n /**\n * Fetch HTTP response by given HTTP request,\n *\n * @param request Specify which to be fetched.\n *\n * @return the response to the request.\n * @throws IOException connection problem.\n * @throws URISyntaxException url syntax problem.\n ... | import com.github.qcloudsms.httpclient.HTTPClient;
import com.github.qcloudsms.httpclient.HTTPException;
import com.github.qcloudsms.httpclient.HTTPMethod;
import com.github.qcloudsms.httpclient.HTTPRequest;
import com.github.qcloudsms.httpclient.HTTPResponse;
import com.github.qcloudsms.httpclient.DefaultHTTPClient;
i... | package com.github.qcloudsms;
public class VoiceFileUploader extends SmsBase {
public enum ContentType {
WAV, MP3
}
private String url = "https://cloud.tim.qq.com/v5/tlsvoicesvr/uploadvoicefile";
public VoiceFileUploader(int appid, String appkey) {
super(appid, appkey, new Defaul... | HTTPResponse res = httpclient.fetch(req); | 4 |
googleapis/java-texttospeech | samples/snippets/src/main/java/com/example/texttospeech/SynthesizeFileBeta.java | [
"public final class AudioConfig extends com.google.protobuf.GeneratedMessageV3\n implements\n // @@protoc_insertion_point(message_implements:google.cloud.texttospeech.v1beta1.AudioConfig)\n AudioConfigOrBuilder {\n private static final long serialVersionUID = 0L;\n // Use AudioConfig.newBuilder() to cons... | import net.sourceforge.argparse4j.inf.ArgumentParser;
import net.sourceforge.argparse4j.inf.ArgumentParserException;
import net.sourceforge.argparse4j.inf.MutuallyExclusiveGroup;
import net.sourceforge.argparse4j.inf.Namespace;
import com.google.cloud.texttospeech.v1beta1.AudioConfig;
import com.google.cloud.texttospee... | /*
* Copyright 2018 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... | .setSsmlGender(SsmlVoiceGender.FEMALE) // ssmlVoiceGender = SsmlVoiceGender.FEMALE | 2 |
vclub/A-Native-TesterHome | app/src/main/java/com/testerhome/nativeandroid/fragments/TopicDetailFragment.java | [
"public class Config {\n\n// recent - 最新\n// popular - 热门的话题(回帖和喜欢超过一定的数量\n// no_reply - 还没有任何回帖的\n// excellent - 精华帖\n// last_actived - 最近活跃的\n\n public static final String TOPICS_TYPE_RECENT = \"recent\";\n public static final String TOPICS_TYPE_POPULAR = \"popular\";\n public static final... | import android.content.res.AssetManager;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.widget.TextView;
import com.facebook.drawee.view.SimpleDraweeView;
import com.testerhome.nativeandroid.Config;
import com.testerhome.nativeandroid.R;
import c... | package com.testerhome.nativeandroid.fragments;
/**
* Created by vclub on 15/9/17.
*/
public class TopicDetailFragment extends BaseFragment {
@Bind(R.id.tv_detail_title)
TextView tvDetailTitle;
@Bind(R.id.sdv_detail_user_avatar)
SimpleDraweeView sdvDetailUserAvatar;
@Bind(R.id.tv_detail_name... | TesterHomeApi.getInstance().getTopicsService().getTopicById(mTopicId, | 3 |
Doctoror/Pure-File-Manager | purefm/src/main/java/com/docd/purefm/operations/DeleteOperation.java | [
"public final class Environment {\n \n private Environment() {}\n\n @NonNull\n private static final ActivityMonitorListener sActivityMonitorListener = new ActivityMonitorListener();\n\n @NonNull\n public static final File sRootDirectory = File.listRoots()[0];\n\n @NonNull\n public static fin... | import android.content.Context;
import android.util.Log;
import com.docd.purefm.Environment;
import com.docd.purefm.commandline.CommandLine;
import com.docd.purefm.commandline.CommandRemove;
import com.docd.purefm.commandline.ShellHolder;
import com.docd.purefm.file.CommandLineFile;
import com.docd.purefm.file.FileObse... | /*
* Copyright 2014 Yaroslav Mytkalyk
* 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... | final Settings settings = Settings.getInstance(mContext); | 7 |
winterDroid/android-drawable-importer-intellij-plugin | src/main/java/de/mprengemann/intellij/plugin/androidicons/controllers/batchscale/BatchScaleImporterController.java | [
"public class AddItemBatchScaleDialog extends DialogWrapper implements AddItemBatchScaleDialogObserver {\n\n private final Project project;\n private final Module module;\n private final BatchScaleImporterController batchScaleController;\n\n private JPanel uiContainer;\n private JLabel imageContainer... | import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogWrapper;
import de.mprengemann.intellij.plugin.androidicons.dialogs.AddItemBatchScaleDialog;
import de.mprengemann.intellij.plugin.androidicons.dialogs.EditItemsBatchScaleDialog;
import de.mpreng... | package de.mprengemann.intellij.plugin.androidicons.controllers.batchscale;
public class BatchScaleImporterController implements IBatchScaleImporterController {
private Set<BatchScaleImporterObserver> observers;
private Map<String, List<ImageInformation>> images; | private Map<String, Resolution> sourceResolutions; | 4 |
Beloumi/PeaFactory | src/peafactory/peas/editor_pea/PswDialogEditor.java | [
"public class PeaSettings {\n\n\tprivate static JDialog keyboard = null;\n\tprivate static final JDialog pswGenerator = null;\n\t\n\tprivate static final boolean BOUND = true;\n\tprivate static final String EXTERNAL_FILE_PATH = null;\n\tprivate static final boolean EXTERN_FILE = true;\n\tprivate static final String... | import cologne.eck.peafactory.peas.PswDialogBase;
import cologne.eck.peafactory.peas.gui.NewPasswordDialog;
import cologne.eck.peafactory.peas.gui.PswDialogView;
import cologne.eck.peafactory.tools.Attachments;
import cologne.eck.peafactory.tools.Converter;
import cologne.eck.peafactory.tools.ReadResources;
import colo... | package cologne.eck.peafactory.peas.editor_pea;
/*
* Peafactory - Production of Password Encryption Archives
* Copyright (C) 2015 Axel von dem Bruch
*
* This library 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 Softw... | Zeroizer.zero(plainBytes); | 8 |
lawremi/CustomOreGen | src/main/java/CustomOreGen/Config/ValidatorDistribution.java | [
"public interface IOreDistribution\n{\n Map<String,String> getDistributionSettingDescriptions();\n\n Object getDistributionSetting(String name);\n\n void setDistributionSetting(String name, Object value) throws IllegalArgumentException, IllegalAccessException;\n\n void generate(IWorld world, int chunkX,... | import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.w3c.dom.Node;
import org.w3c.dom.UserDataHandler;
import CustomOreGen.Server.IOreDistribution;
import CustomOreGen.Server.IOreDistribution.IDistributionFactory;
import CustomOreGen.Server.IOreDistribution.StandardSettings;
import Cu... | package CustomOreGen.Config;
public class ValidatorDistribution extends ValidatorNode
{ | private final IDistributionFactory _distributionFactory; | 1 |
Nilhcem/droidcontn-2016 | app/src/main/java/com/nilhcem/droidcontn/data/app/DataProvider.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 com.nilhcem.droidcontn.data.app.model.Schedule;
import com.nilhcem.droidcontn.data.app.model.Session;
import com.nilhcem.droidcontn.data.app.model.Speaker;
import com.nilhcem.droidcontn.data.database.dao.SessionsDao;
import com.nilhcem.droidcontn.data.database.dao.SpeakersDao;
import com.nilhcem.droidcontn.data.... | package com.nilhcem.droidcontn.data.app;
@Singleton
public class DataProvider {
private final AppMapper appMapper;
private final NetworkMapper networkMapper;
private final DroidconService service;
private final SpeakersDao speakersDao;
private final SessionsDao sessionsDao;
private final D... | public Observable<List<Speaker>> getSpeakers() { | 2 |
spotify/spydra | spydra/src/main/java/com/spotify/spydra/submitter/api/PoolingSubmitter.java | [
"public static final String OPTIONS_FILTER_LABEL_PREFIX = \"labels.\";",
"public class DataprocApi {\n private final Metrics metrics;\n private final GcloudExecutor gcloud;\n\n public DataprocApi() {\n gcloud = new GcloudExecutor();\n metrics = MetricsFactory.getInstance();\n }\n\n @VisibleForTesting\n... | import java.util.List;
import java.util.Map;
import java.util.function.Supplier;
import static com.spotify.spydra.model.SpydraArgument.OPTIONS_FILTER_LABEL_PREFIX;
import com.spotify.spydra.api.DataprocApi;
import com.spotify.spydra.api.gcloud.GcloudClusterAlreadyExistsException;
import com.spotify.spydra.api.model.Clu... | /*-
* -\-\-
* Spydra
* --
* Copyright (C) 2016 - 2018 Spotify AB
* --
* 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
*
* Unles... | public boolean acquireCluster(SpydraArgument arguments, DataprocApi dataprocApi) | 4 |
Cantara/Java-Auto-Update | src/main/java/no/cantara/jau/coms/CheckForUpdateHelper.java | [
"public class ApplicationProcess {\n private static final Logger log = LoggerFactory.getLogger(ApplicationProcess.class);\n private File workingDirectory;\n private String[] command;\n private Map<String, String> environment;\n private Process runningProcess;\n\n private String clientId;\n priv... | import no.cantara.cs.client.ConfigServiceClient;
import no.cantara.cs.client.EventExtractionUtil;
import no.cantara.cs.client.HttpException;
import no.cantara.cs.dto.CheckForUpdateRequest;
import no.cantara.cs.dto.ClientConfig;
import no.cantara.cs.dto.event.Event;
import no.cantara.cs.dto.event.ExtractedEventsStore;
i... | package no.cantara.jau.coms;
/**
* Created by jorunfa on 29/10/15.
*/
public class CheckForUpdateHelper {
private static final Logger log = LoggerFactory.getLogger(CheckForUpdateHelper.class);
public static Runnable getCheckForUpdateRunnable(long interval, ConfigServiceClient configServiceClient,
... | EventExtractorService extractorService, | 2 |
gstreamer-java/gst1-java-core | src/org/freedesktop/gstreamer/elements/PlayBin.java | [
"public class Bus extends GstObject {\n\n public static final String GTYPE_NAME = \"GstBus\";\n\n private static final Logger LOG = Logger.getLogger(Bus.class.getName());\n private static final SyncCallback SYNC_CALLBACK = new SyncCallback();\n\n private volatile BusSyncHandler syncHandler = null;\n\n ... | import org.freedesktop.gstreamer.Pipeline;
import org.freedesktop.gstreamer.TagList;
import org.freedesktop.gstreamer.glib.NativeFlags;
import org.freedesktop.gstreamer.lowlevel.GstAPI.GstCallback;
import java.io.File;
import java.net.URI;
import java.util.EnumSet;
import java.util.Set;
import org.freedesktop.gstreamer... |
/**
* Removes a listener for the <code>video-changed</code> signal
*
* @param listener The listener that was previously added.
*/
public void disconnect(VIDEO_CHANGED listener) {
disconnect(VIDEO_CHANGED.class, listener);
}
/**
* Adds a listener for the <code>audio-cha... | @Gst.Since(minor = 10) | 2 |
flexgp/flexgp | mrgp-flexgp/src/evogpj/test/TestRGPFusedModel.java | [
"public class CSVDataJava extends ScaledData {\n\t/**\n\t * Parse given csvfile into set of input and target values.\n\t * \n\t * @param csvfile file of comma-separated values, last value in each line is\n\t * the target value\n\t */\n\tpublic CSVDataJava(String csvfile) {\n\t\tsuper(DataSizeRetreiver.num_fi... | import java.util.Scanner;
import evogpj.evaluation.java.CSVDataJava;
import evogpj.evaluation.java.DataJava;
import evogpj.genotype.Tree;
import evogpj.genotype.TreeGenerator;
import evogpj.gp.Individual;
import evogpj.gp.Population;
import java.util.ArrayList;
import java.util.List;
import evogpj.math.Function;
import... | /**
* Copyright (c) 2011-2014 Evolutionary Design and Optimization Group
*
* Licensed under the MIT License.
*
* See the "LICENSE" file for a copy of the license.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHAN... | Function func = genotype.generate(); | 6 |
xspec/xspec-maven-plugin-1 | src/main/java/io/xspec/maven/xspecMavenPlugin/utils/XmlStuff.java | [
"public class Resolver implements javax.xml.transform.URIResolver, EntityResolver {\n private final URIResolver saxonResolver;\n private final Log log;\n org.xmlresolver.Resolver cr;\n private static final boolean LOG_ENABLE = false;\n private final Pattern protocolPattern;\n\n /**\n * Creates... | import io.xspec.maven.xspecMavenPlugin.resolver.Resolver;
import io.xspec.maven.xspecMavenPlugin.resources.SchematronImplResources;
import io.xspec.maven.xspecMavenPlugin.resources.XSpecImplResources;
import io.xspec.maven.xspecMavenPlugin.resources.XSpecPluginResources;
import net.sf.saxon.lib.ExtensionFunctionDefinit... | /**
* Copyright © 2017, Christophe Marchand
* 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 ... | private final XSpecPluginResources pluginResources; | 3 |
spotify/spydra | spydra/src/main/java/com/spotify/spydra/submitter/api/DynamicSubmitter.java | [
"public static final String OPTION_CLUSTER = \"cluster\";",
"public static final String OPTION_PROJECT = \"project\";",
"public static final String OPTION_ZONE = \"zone\";",
"public class DataprocApi {\n private final Metrics metrics;\n private final GcloudExecutor gcloud;\n\n public DataprocApi() {\n g... | import static com.spotify.spydra.model.SpydraArgument.OPTION_CLUSTER;
import static com.spotify.spydra.model.SpydraArgument.OPTION_PROJECT;
import static com.spotify.spydra.model.SpydraArgument.OPTION_ZONE;
import com.spotify.spydra.api.DataprocApi;
import com.spotify.spydra.api.model.Cluster;
import com.spotify.spydra... | /*-
* -\-\-
* Spydra
* --
* Copyright (C) 2016 - 2018 Spotify AB
* --
* 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
*
* Unles... | arguments.getSubmit().getOptions().put(OPTION_CLUSTER, name); | 0 |
spectralmind/sonarflow-android | app/src/main/java/com/spectralmind/sf4android/SonarflowState.java | [
"public interface BubbleLoader{\n\tpublic void onFinished(List<Bubble> bubbles);\n};",
"public class Bubble {\n\tprivate static final Logger LOGGER = LoggerFactory.getLogger(Bubble.class);\n\t\n\tprivate static final float FADE_SIZE = 25;\n\tprivate static final float MINIMUM_SIZE_TO_SHOW_CHILDREN = 340;\n\tpriva... | import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.Lists;
import com.spectralmind.sf4android.MainActivity.BubbleLoader;
import com.spectralmind.sf4android.bubble.Bubble;
import com.spectralmind.sf4android.bubble.BubbleLayouter;
import com.spectralmind.sf4and... | package com.spectralmind.sf4android;
public class SonarflowState {
private static final Logger LOGGER = LoggerFactory.getLogger(SonarflowState.class);
private static final String GENRES_XML = "genres.xml";
private static final String MOODS_XML = "moods.xml";
private static final String ATTRIBUTES_XML ="clust... | private MoodLoader loader2; | 5 |
cgrotz/kademlia | src/main/java/de/cgrotz/kademlia/server/KademliaServerHandler.java | [
"public abstract class Event {\n\n}",
"@Data\n@Builder\npublic class ReceivedMessageEvent extends Event {\n private Message message;\n}",
"@Data\n@EqualsAndHashCode(of = \"key\")\npublic class Key {\n public final static int ID_LENGTH = 160;\n\n private BigInteger key;\n\n public Key(byte[] result) ... | import de.cgrotz.kademlia.events.Event;
import de.cgrotz.kademlia.events.ReceivedMessageEvent;
import de.cgrotz.kademlia.node.Key;
import de.cgrotz.kademlia.node.Node;
import de.cgrotz.kademlia.protocol.*;
import de.cgrotz.kademlia.routing.RoutingTable;
import de.cgrotz.kademlia.storage.LocalStorage;
import de.cgrotz.k... | package de.cgrotz.kademlia.server;
/**
* Created by Christoph on 21.09.2016.
*/
public class KademliaServerHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(KademliaServerHandler.class);
private final RoutingTable routingTable;
private final int kValue;
private final Map<Stri... | private final Node localNode; | 3 |
joelhockey/jacknji11 | src/main/java/org/pkcs11/jacknji11/jna/JNA_CK_C_INITIALIZE_ARGS.java | [
"public class CK_C_INITIALIZE_ARGS {\n\n /**\n * True if application threads which are executing calls to the library may not use native operating system calls to\n * spawn new threads; false if they may.\n */\n public static final long CKF_LIBRARY_CANT_CREATE_OS_THREADS = 0x00000001;\n /** Tru... | import java.util.List;
import com.sun.jna.Callback;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.ptr.PointerByReference;
import org.pkcs11.jacknji11.CK_C_INITIALIZE_ARGS;
import org.pkcs11.jacknji11.CK_C_INITIALIZE_ARGS.CK_CREATEMUTEX;
import org.pkcs11.jac... | /*
* Copyright 2010-2011 Joel Hockey (joel.hockey@gmail.com). All rights reserved.
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the ri... | public interface JNA_CK_LOCKMUTEX extends CK_LOCKMUTEX, Callback { | 3 |
msteindorfer/criterion | src/main/java/io/usethesource/criterion/CalculateFootprints.java | [
"public enum Archetype {\n MUTABLE, IMMUTABLE, PERSISTENT\n}",
"public static enum DataType {\n MAP, SET_MULTIMAP, SET\n}",
"public enum ValueFactoryFactory {\n VF_CLOJURE {\n @Override\n public JmhValueFactory getInstance() {\n return new io.usethesource.criterion.impl.persistent.clojure.ClojureV... | import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.Random;
import java.util.Set;... | /**
* Copyright (c) Michael Steindorfer <Centrum Wiskunde & Informatica> and Contributors.
* All rights reserved.
*
* This file is licensed under the BSD 2-Clause License, which accompanies this project
* and is available under https://opensource.org/licenses/BSD-2-Clause.
*/
package io.usethesource.criterion;
... | Archetype.PERSISTENT, true, elementCount, run, | 0 |
hhua/product-hunt-android | app/src/main/java/com/hhua/android/producthunt/activities/CollectionActivity.java | [
"public class ProductHuntApplication extends com.activeandroid.app.Application {\n private static Context context;\n\n @Override\n public void onCreate() {\n super.onCreate();\n ProductHuntApplication.context = this;\n Parse.initialize(this, ApiConfig.PARSE_API_APPLICATION_ID, ApiConfi... | import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.vie... | package com.hhua.android.producthunt.activities;
public class CollectionActivity extends AppCompatActivity {
private ProductHuntClient client;
private Collection collection;
private List<TechHunt> techHunts;
private ListView lvPosts;
private TechHuntsArrayAdapter techHuntsAdapter;
private... | intent.putExtra(Post.POST_ID_MESSAGE, techHunt.getId()); | 4 |
liaozhoubei/NetEasyNews | app/src/main/java/cn/bproject/neteasynews/activity/ChannelManagerActivity.java | [
"public class APPConst {\n private APPConst(){}\n\n // 设置ChannelManager频道管理中的每个item的间隔\n public static final int ITEM_SPACE = 5;\n\n // 0和1均表示ChannelManager频道管理中的tab不可可编辑\n // 其中tab的type为0时,字体会显示红色, 为1时会显示灰色\n public static final int ITEM_DEFAULT = 0;\n // 1均表示ChannelManager频道管理中的tab不可可编辑\n ... | import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.widget.TextView;
import com.exampl... | package cn.bproject.neteasynews.activity;
/**
* Created by Administrator on 2017/2/7.
*/
public class ChannelManagerActivity extends BaseActivity implements ChannelAdapter.ChannelItemClickListener{
private RecyclerView mRecyclerView;
private ChannelAdapter mRecyclerAdapter;
private List<ProjectChan... | private ListDataSave listDataSave; | 5 |
raphaeljolivet/java2typescript | java2typescript-jaxrs/src/main/java/java2typescript/jaxrs/ServiceDescriptorGenerator.java | [
"public class DefinitionGenerator {\n\n\tprivate final ObjectMapper mapper;\n\n\tpublic DefinitionGenerator(ObjectMapper mapper) {\n\t\tthis.mapper = mapper;\n\t}\n\n\t/**\n\t * @param module\n\t * Module to be filled with named types (classes, enums, ...)\n\t * @param classes\n\t * Class for ... | import static java2typescript.jaxrs.model.ParamType.BODY;
import static java2typescript.jaxrs.model.ParamType.FORM;
import static java2typescript.jaxrs.model.ParamType.PATH;
import static java2typescript.jaxrs.model.ParamType.QUERY;
import java.beans.Introspector;
import java.io.IOException;
import java.io.StringWriter... | /*******************************************************************************
* Copyright 2013 Raphael Jolivet
*
* 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.apa... | DefinitionGenerator defGen = new DefinitionGenerator(mapper); | 0 |
handstudio/HzGrapher | sample/src/com/handstudio/android/hzgrapher/CurveGraphActivity.java | [
"public class GraphAnimation {\n\tpublic static final int LINEAR_ANIMATION = 1;\n\t\n\tpublic static final int CURVE_REGION_ANIMATION_1 = 2;\n\tpublic static final int CURVE_REGION_ANIMATION_2 = 3;\n\t\n\tpublic static final int DEFAULT_DURATION = 2000;\n\t\n\tprivate int animation = LINEAR_ANIMATION;\n\tprivate in... | import java.util.ArrayList;
import java.util.List;
import android.app.Activity;
import android.os.Bundle;
import android.view.ViewGroup;
import com.handstudio.android.hzgrapherlib.animation.GraphAnimation;
import com.handstudio.android.hzgrapherlib.graphview.CurveGraphView;
import com.handstudio.android.hzgrapherlib.vo... | package com.handstudio.android.hzgrapher;
public class CurveGraphActivity extends Activity {
private ViewGroup layoutGraphView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_graph);
layoutGraphView = (ViewGroup) fin... | List<CurveGraph> arrGraph = new ArrayList<CurveGraph>(); | 3 |
3pillarlabs/socialauth | socialauth-filter/src/main/java/de/deltatree/social/web/filter/api/SASFHelper.java | [
"public class Contact implements Serializable {\n\tprivate static final long serialVersionUID = 7983770896851139223L;\n\n\t/**\n\t * Email\n\t */\n\tString email;\n\n\t/**\n\t * First Name\n\t */\n\tString firstName;\n\n\t/**\n\t * Last Name\n\t */\n\tString lastName;\n\n\t/**\n\t * Display Name\n\t */\n\tString di... | import java.util.List;
import org.brickred.socialauth.AuthProvider;
import org.brickred.socialauth.Contact;
import org.brickred.socialauth.Profile;
import org.brickred.socialauth.SocialAuthManager;
import de.deltatree.social.web.filter.api.security.SASFSocialAuthManager;
import de.deltatree.social.web.filter.impl.props... | package de.deltatree.social.web.filter.api;
public interface SASFHelper {
public static final String SESSION_KEY = "S_SASFHelper";
| public SASFSocialAuthManager getMgr(); | 3 |
yurisuzukiltd/AR-Music-Kit | ARMusicKit/app/src/main/java/com/yurisuzuki/CameraActivity.java | [
"public class GuitarRenderer extends InstrumentsRenderer {\n\tprivate static final String TAG = \"GuitarRenderer\";\n\tprivate CameraActivity activity;\n\n\t// マーカーデータ\n\tprivate static final String[] markerParams = {\n\t\t\t\"single;Data/C.pat;64\",\n\t\t\t\"single;Data/A.pat;64\",\n\t\t\t\"single;Data/G.pat;64\",... | import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.OrientationEventListener;
import android.view.View;
import android.widget.Fr... | * コードマーカーが認識された.
*/
void onMarkerDetected(int soundId) {
soundEnableStates[soundId] = false;
}
/**
* マーカーが消えた.
*/
void onMarkerDisappeared(int soundId) {
// 既存のonのを消して、新たにsoundIdのものをonにする.
for (int i = 0; i < 8; ++i) {
if (i == soundId) {
soundEnableStates[i] = true;
... | return new MusicBoxRenderer(this);
| 1 |
OpenMods/OpenPeripheral-Addons | src/main/java/openperipheral/addons/glasses/drawable/SolidPolygon.java | [
"public interface IPointListBuilder<P> {\n\tpublic void add(P point);\n\n\tpublic IPointList<P> buildPointList();\n\n\tpublic Box2d buildBoundingBox();\n}",
"public interface IPolygonBuilder<P> {\n\n\tpublic void addPoint(P point);\n\n\tpublic IRenderCommand build();\n}",
"@ScriptStruct\n@SerializableClass\npub... | import openmods.structured.StructureField;
import openperipheral.addons.glasses.utils.IPointListBuilder;
import openperipheral.addons.glasses.utils.IPolygonBuilder;
import openperipheral.addons.glasses.utils.Point2d;
import openperipheral.addons.glasses.utils.PointListBuilder;
import openperipheral.addons.glasses.utils... | package openperipheral.addons.glasses.drawable;
@ScriptObject
@AdapterSourceName("glasses_polygon")
public class SolidPolygon extends Polygon<Point2d> {
@Property
@StructureField
public int color = 0xFFFFFF;
@Property
@StructureField
public float opacity = 1.0f;
public SolidPolygon() {}
public SolidPolygo... | return new SolidPolygonBuilder(); | 5 |
Joy-Whale/EasyShare | platform/src/main/java/cn/joy/libs/platform/qq/QQEntryActivity.java | [
"public class AuthCallbackReceiver extends BroadcastReceiver {\n\n\tprivate static final String TAG = \"AUTHCallbackReceiver\";\n\tprivate static final String ACTION_AUTH_CALLBACK = \"cn.joy.libs.platforms.ACTION_AUTH_CALLBACK\";\n\tprivate static final String EXTRA_CALLBACK_CODE = \"EXTRA_CALLBACK_CODE\";\n\tpriva... | import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import com.tencent.connect.UserInfo;
import com.tencent.tauth.IUiListener;
import com.tencent.tauth.Tencent;
import com.tencent.tauth.UiError;
import org.json.JSONExceptio... | package cn.joy.libs.platform.qq;
public class QQEntryActivity extends Activity implements IUiListener {
private static final String TAG = "QQEntryActivity";
private static final String EXTRA_SHARE_PARAMS = "EXTRA_SHARE_PARAMS";
private static final String EXTRA_SHARE_TARGET = "EXTRA_SHARE_TARGET";
private sta... | qq = PlatformFactory.getQQ(); | 6 |
jankroken/commandline | src/test/java/com/github/jankroken/commandline/error/InvalidArgumentsTests.java | [
"public class ParseResult<T> {\n public enum ErrorType {\n OK,\n INTERNAL_ERROR,\n INVALID_COMMAND_LINE,\n INVALID_OPTION_CONFIGURATION,\n UNRECOGNIZED_SWITCH,\n INVALID_CONFIGURATION\n }\n\n private final ErrorType errorType;\n private final boolean success;\n ... | import com.github.jankroken.commandline.ParseResult;
import com.github.jankroken.commandline.domain.CommandLineWrappedException;
import com.github.jankroken.commandline.domain.InvalidCommandLineException;
import com.github.jankroken.commandline.domain.UnrecognizedSwitchException;
import org.junit.jupiter.api.Test;
impo... | package com.github.jankroken.commandline.error;
public class InvalidArgumentsTests {
@Test
public void testMissingSwitches() {
var args = EMPTY_STRING_ARRAY; | assertThatThrownBy(() -> parse(RequiredConfiguration.class, args, SIMPLE)) | 4 |
Team254/FRC-2015 | src/com/team254/frc2015/subsystems/controllers/DriveStraightController.java | [
"public class Constants extends ConstantsBase {\n public static double kDriveSensitivity = .75;\n public static double kNegativeInertiaScalar = 5.0;\n\n // Operator controls\n public static double kElevatorJogFastPwm = 1.0;\n public static double kElevatorJogMediumPwm = .7;\n public static double ... | import com.team254.frc2015.Constants;
import com.team254.frc2015.subsystems.Drive;
import com.team254.lib.trajectory.TrajectoryFollower;
import com.team254.lib.util.DriveSignal;
import com.team254.lib.util.Pose;
import com.team254.lib.util.SynchronousPID;
import static com.team254.lib.trajectory.TrajectoryFollower.Traj... | package com.team254.frc2015.subsystems.controllers;
public class DriveStraightController implements Drive.DriveController {
private TrajectoryFollowingPositionController mDistanceController;
private SynchronousPID mTurnPid;
private Pose mSetpointRelativePose;
public DriveStraightController(Pose pri... | TrajectorySetpoint initialSetpoint = new TrajectorySetpoint(); | 6 |
UweTrottmann/MovieTracker | SeriesGuideMovies/src/com/uwetrottmann/movies/ui/CancelCheckInDialogFragment.java | [
"public class ServiceManager {\n /** API key. */\n private String apiKeyValue;\n /** User email. */\n private String username;\n /** User password. */\n private String password_sha;\n /** Connection timeout (in milliseconds). */\n private Integer connectionTimeout;\n /** Read timeout (in ... | import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fr... | /*
* Copyright 2012 Uwe Trottmann
*
* 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 ... | } catch (TraktException e) { | 1 |
otaviojava/Easy-Cassandra-samples | cassandra-spring/cassandra-spring-lucene/src/java/linguagil/cassandra/temperatura/service/PrevisaoMediaService.java | [
"@Entity(name = \"previsaotempo\")\npublic class PrevisaoTempo {\n\n\t@EmbeddedId\n\tprivate PrevisaoTempoID id;\n\t\n\t@Column(name = \"temperatura\")\n\tprivate Double temperatura;\n\t\n\t@ElementCollection\n\t@Column(name = \"temperaturas\")\n\tprivate List<Double> temperaturas;\n\n\tpublic PrevisaoTempoID getId... | import java.util.Date;
import linguagil.cassandra.temperatura.model.PrevisaoTempo;
import linguagil.cassandra.temperatura.model.PrevisaoTempoID;
import linguagil.cassandra.temperatura.model.PrevisaoTempoMedia;
import linguagil.cassandra.temperatura.repository.PrevisaoTempoMediaRepository;
import linguagil.cassandra.tem... | package linguagil.cassandra.temperatura.service;
@Service
public class PrevisaoMediaService extends AbstractService{
@Autowired
private PrevisaoTempoMediaRepository repository;
@Autowired | private PrevisaoTempoRepository previsaoTempoRepository; | 4 |
eleks/rnd-android-wear-tesla | wear/src/main/java/com/eleks/tesla/mainApp/fragments/StatusTeslaFragment.java | [
"public class ChargeStateLoadedEvent {\n private ChargeState mChargeState;\n\n public ChargeStateLoadedEvent(ChargeState chargeState) {\n this.mChargeState = chargeState;\n }\n\n public ChargeState getChargeState() {\n return mChargeState;\n }\n\n public void setChargeState(ChargeSta... | import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.eleks.tesla.R;
import com.eleks.tesla.events.Charg... | package com.eleks.tesla.mainApp.fragments;
/**
* Created by maryan.melnychuk on 20.02.2015.
*/
public class StatusTeslaFragment extends BaseTeslaFragment {
private boolean isGetChargeRunning, isGetClimateRunning, isGetDriveRunning, isGetVehicleRunning;
private ProgressBar mLoadingBar;
private TextVi... | public void onEventMainThread(ClimateStateLoadedEvent event) { | 1 |
numenta/htm.java | src/test/java/org/numenta/nupic/network/PlaygroundTest.java | [
"public class Parameters implements Persistable {\n /** keep it simple */\n private static final long serialVersionUID = 1L;\n \n private static final Map<KEY, Object> DEFAULTS_ALL;\n private static final Map<KEY, Object> DEFAULTS_TEMPORAL;\n private static final Map<KEY, Object> DEFAULTS_SPATIAL;... | import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Arrays;
import java.util.function.BiFunction;
import org.junit.Ignore;
import org.numenta.nupic.Parameters;
import org.numenta.nupic.Parameters.KEY;
import org.nu... | /* ---------------------------------------------------------------------
* Numenta Platform for Intelligent Computing (NuPIC)
* Copyright (C) 2016, Numenta, Inc. Unless you have an agreement
* with Numenta, Inc., for a separate license for this software code, the
* following terms and conditions apply:
*
* This ... | Parameters p = NetworkTestHarness.getParameters().copy(); | 0 |
374901588/PaperPlane | app/src/main/java/com/hut/zero/search/SearchContract.java | [
"public interface BasePresenter {\n // 获取数据并改变界面显示,在todo-mvp的项目中的调用时机为Fragment的OnResume()方法中\n void start();\n}",
"public interface BaseView<T> {\n // 为View设置Presenter\n void setPresenter(T presenter);\n // 初始化界面控件\n void initViews();\n}",
"public enum BeanType {\n\n TYPE_ZHIHU, TYPE_GUOKE,... | import com.hut.zero.BasePresenter;
import com.hut.zero.BaseView;
import com.hut.zero.bean.BeanType;
import com.hut.zero.bean.DoubanMomentNews;
import com.hut.zero.bean.GuokeHandpickNews;
import com.hut.zero.bean.ZhihuDailyNews;
import java.util.ArrayList; | /*
* Copyright 2017 lizhaotailang
*
* 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 t... | void showResults(ArrayList<ZhihuDailyNews.Question> zhihuList, | 5 |
ls1intum/jReto | Source/src/de/tum/in/www1/jReto/routing/packets/MulticastHandshake.java | [
"public class Constants {\n\tpublic static final int PACKET_TYPE_SIZE = 4;\n\tpublic static final int INT_SIZE = 4;\n\tpublic static final int UUID_SIZE = 16;\n}",
"public class DataChecker {\n /**\n * Verifies that the data (wrapped in a DataReader) has the expected packet type, and has the minimum require... | import java.nio.ByteBuffer;
import java.util.HashSet;
import java.util.Set;
import java.util.UUID;
import de.tum.in.www1.jReto.packet.Constants;
import de.tum.in.www1.jReto.packet.DataChecker;
import de.tum.in.www1.jReto.packet.DataReader;
import de.tum.in.www1.jReto.packet.DataWriter;
import de.tum.in.www1.jReto.packe... | package de.tum.in.www1.jReto.routing.packets;
/**
* The MulticastHandshake contains information relevant to establish a routed multi- or unicast connection.
* It is sent to each peer that is part of the route.
* It contains the identifier of the peer that originally established the peer, the set of destinations of t... | DataWriter data = new DataWriter(MINIMUM_LENGTH + Constants.INT_SIZE + destinationIdentifiers.size() * Constants.UUID_SIZE + nextHopsTree.size() * (Constants.INT_SIZE + Constants.UUID_SIZE)); | 3 |
Kaysoro/KaellyBot | src/main/java/commands/config/AlmanaxAutoCommand.java | [
"public abstract class AbstractCommand implements Command {\n\n private final static Logger LOG = LoggerFactory.getLogger(AbstractCommand.class);\n\n protected String name;\n protected String pattern;\n protected DiscordException badUse;\n private boolean isPublic;\n private boolean isUsableInMP;\... | import commands.model.AbstractCommand;
import discord4j.common.util.Snowflake;
import discord4j.core.event.domain.message.MessageCreateEvent;
import discord4j.core.object.entity.Guild;
import discord4j.core.object.entity.Message;
import discord4j.core.object.entity.channel.MessageChannel;
import enums.Language;
import ... | package commands.config;
/**
* Created by steve on 14/07/2016.
*/
public class AlmanaxAutoCommand extends AbstractCommand {
public AlmanaxAutoCommand(){
super("almanax-auto", "(\\s+true|\\s+false|\\s+0|\\s+1|\\s+on|\\s+off)");
setUsableInMP(false);
}
@Override
public void request(M... | if (!AlmanaxCalendar.getAlmanaxCalendars().containsKey(channelId)) { | 3 |
lucee/extension-pdf | source/java/src/org/lucee/extension/pdf/xhtmlrenderer/FSPDFDocument.java | [
"public abstract class PDFDocument {\n\n\t// PageType\n\tpublic static final Dimension PAGETYPE_ISOB5 = new Dimension(501, 709);\n\tpublic static final Dimension PAGETYPE_ISOB4 = new Dimension(709, 1002);\n\tpublic static final Dimension PAGETYPE_ISOB3 = new Dimension(1002, 1418);\n\tpublic static final Dimension P... | import java.awt.Dimension;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import org.lucee.ex... | /**
*
* Copyright (c) 2015, Lucee Assosication Switzerland
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later ver... | Margin margin = new Margin(this, unitFactor, margintop, marginbottom, marginleft, marginright); | 3 |
Derek-Ashmore/moneta | moneta-core/src/main/java/org/moneta/dao/MonetaSearchDAO.java | [
"public class MonetaEnvironment extends BaseType {\r\n\t\r\n\tprivate static MonetaConfiguration configuration;\r\n\r\n\tpublic static MonetaConfiguration getConfiguration() {\r\n\t\treturn configuration;\r\n\t}\r\n\r\n\tpublic static void setConfiguration(MonetaConfiguration configuration) {\r\n\t\tMonetaEnvironme... | import org.apache.commons.lang3.Validate;
import org.moneta.config.MonetaEnvironment;
import org.moneta.dao.sqlgen.SqlGeneratorFactory;
import org.moneta.dao.types.SqlStatement;
import org.moneta.types.search.SearchRequest;
import org.moneta.types.search.SearchResult;
import org.moneta.types.topic.MonetaDataSourc... | /*
* This software is licensed under the Apache License, Version 2.0
* (the "License") agreement; you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | SqlStatement sqlStmt = SqlGeneratorFactory.findSqlGenerator(source.getDialect())
| 2 |
cmongis/psfj | src/knop/psfj/graphics/DistanceHeatMap.java | [
"public class BeadFrame extends Observable {\n\n\t/** The bead id. */\n\tInteger id;\n\n\t/** The boundaries. */\n\tRectangle2D boundaries;\n\n\t/** The ImagePlus stack containing the bead. */\n\tImagePlus ip;\n\n\t/** The BeadImage object from where the BeadFrame has been extracted. */\n\tBeadImage source;\n\n\t... | import knop.psfj.heatmap.HeatMapGenerator;
import knop.psfj.utils.MathUtils;
import knop.psfj.utils.TextUtils;
import ij.process.ColorProcessor;
import ij.process.ImageProcessor;
import java.awt.Color;
import javax.swing.ImageIcon;
import knop.psfj.BeadFrame;
import knop.psfj.BeadImage;
import knop.psfj.BeadImageManage... | /*
This file is part of PSFj.
PSFj is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
PSFj is distributed in the hope ... | BeadFrame f = image.getBeadFrameList().getOnlyValidBeads().get(0); | 0 |
Sleeksnap/sleeksnap | jkeymaster/com/tulskiy/keymaster/windows/WindowsProvider.java | [
"public static final int PM_REMOVE = 0x0001;",
"public static native boolean PeekMessage(MSG lpMsg, Pointer hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg);",
"public static native boolean RegisterHotKey(Pointer hWnd, int id, int fsModifiers, int vk);",
"public static native boolean UnregisterHotK... | import com.tulskiy.keymaster.common.HotKey;
import com.tulskiy.keymaster.common.HotKeyListener;
import com.tulskiy.keymaster.common.HotkeyProvider;
import com.tulskiy.keymaster.common.MediaKey;
import com.tulskiy.keymaster.windows.User32.MSG;
import static com.tulskiy.keymaster.windows.User32.PM_REMOVE;
import static c... | /*
* Copyright (c) 2011 Denis Tulskiy
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program ... | if (RegisterHotKey(null, id, KeyMap.getModifiers(hotKey.getKeyStroke()), code)) { | 2 |
bhatti/PlexRBAC | src/main/java/com/plexobject/rbac/service/impl/AuthorizationServiceImpl.java | [
"public class ServiceFactory {\n private static RepositoryFactory REPOSITORY_FACTORY = new RepositoryFactoryImpl();\n private static PermissionManager PERMISSION_MANAGER = new PermissionManagerImpl(\n REPOSITORY_FACTORY, new JavascriptEvaluator());\n\n public static RepositoryFactory getDefaultF... | import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.c... | package com.plexobject.rbac.service.impl;
@Path("/authorize")
@Component("authorizationService")
@Scope("singleton")
public class AuthorizationServiceImpl implements AuthorizationService,
InitializingBean {
private static final Logger LOGGER = Logger
.getLogger(AuthorizationServiceImpl.clas... | PermissionManager permissionManager = ServiceFactory.getPermissionManager(); | 0 |
oharaandrew314/TinkerTime | src/io/andrewohara/tinkertime/controllers/ModUpdateCoordinator.java | [
"@DatabaseTable(tableName = \"config\")\npublic class ConfigData extends BaseDaoEnabled<ConfigData, Integer> {\n\n\tpublic static final int NUM_CONCURRENT_DOWNLOADS = 4;\n\n\t/////////////\n\t// Columns //\n\t/////////////\n\n\tConfigData() { /* Used by ormlite */ }\n\n\tpublic ConfigData(Dao<ConfigData, Integer> d... | import io.andrewohara.common.workflows.tasks.TaskCallback;
import io.andrewohara.common.workflows.tasks.WorkflowTask.TaskEvent;
import io.andrewohara.tinkertime.models.ConfigData;
import io.andrewohara.tinkertime.models.Installation;
import io.andrewohara.tinkertime.views.SelectedInstallationView;
import io.andrewohara... | package io.andrewohara.tinkertime.controllers;
@Singleton
public class ModUpdateCoordinator extends TaskCallback implements ModUpdateHandler {
private final ConfigData config;
private ModUpdateHandler modSelector, installationView; | private ModListCellRenderer modListCellRenderer; | 3 |
RamuRChenchaiah/SpringSecurity-registration-login | src/main/java/com/login/security/MyUserDetailsService.java | [
"public interface RoleRepository extends JpaRepository<Role, Long> {\n\n Role findByName(String name);\n\n @Override\n void delete(Role role);\n\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\n User findByEmail(String email);\n\n @Override\n void delete(User user);\n\n... | import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.author... | package com.login.security;
@Service("userDetailsService")
@Transactional
public class MyUserDetailsService implements UserDetailsService {
@Autowired | private UserRepository userRepository; | 1 |
apache/activemq-activeio | activeio-core/src/main/java/org/apache/activeio/journal/active/LogFileManager.java | [
"public class PacketOutputStream extends OutputStream {\n \n final Packet packet;\n \n public PacketOutputStream(Packet packet) {\n this.packet = packet;\n }\n\n public void write(int b) throws IOException {\n if( !packet.write(b) )\n throw new IOException(\"Packet does no... | import org.apache.activeio.journal.InvalidRecordLocationException;
import org.apache.activeio.packet.ByteArrayPacket;
import org.apache.activeio.packet.ByteBufferPacket;
import org.apache.activeio.packet.Packet;
import edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicInteger;
import java.io.DataInput;
import... | this.archiveDirectory=archiveDirectory;
}
void initialize(int onlineLogFileCount) throws IOException {
LogFileNode logFiles[] = new LogFileNode[onlineLogFileCount];
// Create the log directory if it does not exist.
if (!logDirectory.exists()) {
if (!logDirectory.mk... | DataOutput data = new DataOutputStream(new PacketOutputStream(controlData)); | 0 |
ds84182/OpenGX | src/main/java/ds/mods/opengx/client/render/TileEntityExternalMonitorRenderer.java | [
"public class ClientEvents {\n\tpublic static ArrayList<WeakReference<ComponentMonitor>> monitors = new ArrayList<WeakReference<ComponentMonitor>>();\n\n\t@SubscribeEvent\n\tpublic void renderFramebuffersOverlay(RenderGameOverlayEvent.Post event)\n\t{\n\t\tif (event.type != ElementType.ALL) return;\n\t\t//cleanse m... | import java.lang.ref.WeakReference;
import java.util.Iterator;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11;
import ds.mods.opengx.client.ClientEvents;
import ds.mods.opengx.client.RenderUtils;
import ds.mods.opengx.c... | package ds.mods.opengx.client.render;
public class TileEntityExternalMonitorRenderer extends
TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
double var6, float var8) {
TileEntityExternalMonitor tile = (TileEntityExternalMonitor)var1;
Compo... | mon.fb = new GXFramebuffer(mon.width, mon.height); | 2 |
exovum/libgdx-cardgame | core/src/com/exovum/tools/SchoolGameScreen.java | [
"public class AnimationSystem extends IteratingSystem {\n\n ComponentMapper<TextureComponent> tm;\n ComponentMapper<AnimationComponent> am;\n ComponentMapper<StateComponent> sm;\n\n public AnimationSystem(){\n super(Family.all(TextureComponent.class,\n AnimationComponent.class,\n ... | import com.badlogic.ashley.core.PooledEngine;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.ScreenAdapter;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics... | package com.exovum.tools;
/**
* Created by exovu_000 on 12/9/2016.
*/
public class SchoolGameScreen extends ScreenAdapter {
Game game; // May need to change this to LD37Game type. Maybe not though
private boolean initialized;
private boolean paused;
private float elapsedTime = 0f;
private Wor... | engine.addSystem(new PhysicsSystem(world)); | 4 |
goshippo/shippo-java-client | src/main/java/com/shippo/model/Address.java | [
"public class APIConnectionException extends ShippoException {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic APIConnectionException(String message) {\n\t\tsuper(message);\n\t}\n\n\tpublic APIConnectionException(String message, Throwable e) {\n\t\tsuper(message, e);\n\t}\n\n}",
"public class AP... | import java.util.Map;
import java.util.List;
import com.google.gson.annotations.SerializedName;
import com.shippo.exception.APIConnectionException;
import com.shippo.exception.APIException;
import com.shippo.exception.AuthenticationException;
import com.shippo.exception.InvalidRequestException;
import com.shippo.net.AP... | package com.shippo.model;
// Class is affected by URL name inconsistencies, see APIResource.java (private static String className(Class<?> clazz))
public class Address extends APIResource {
@SerializedName("is_complete")
boolean isComplete;
String objectId;
String objectOwner;
Object objectCreated;
Object ob... | public static Address validate(String id) throws AuthenticationException, InvalidRequestException, | 2 |
eclecticlogic/pedal-dialect | src/test/java/com/eclecticlogic/pedal/JpaConfiguration.java | [
"public class HikariConnectionAccessor implements ConnectionAccessor {\n\n /**\n * @see com.eclecticlogic.pedal.connection.ConnectionAccessor#getRawConnection(java.sql.Connection)\n */\n @Override\n public Connection getRawConnection(Connection providerConnection) {\n try {\n retu... | import javax.sql.DataSource;
import com.eclecticlogic.pedal.connection.HikariConnectionAccessor;
import com.eclecticlogic.pedal.dialect.postgresql.CopyCommand;
import com.eclecticlogic.pedal.dialect.postgresql.CopyCommandImpl;
import com.eclecticlogic.pedal.provider.ProviderAccessSpi;
import com.eclecticlogic.pedal.pro... | /**
* Copyright (c) 2014-2015 Eclectic Logic LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable l... | public CopyCommand copyCommand(ProviderAccessSpi provider) { | 1 |
calibre2opds/calibre2opds | OpdsOutput/src/main/java/com/gmail/dpierron/calibre/opf/OpfOutput.java | [
"public class CachedFile extends File {\r\n private final static Logger logger = LogManager.getLogger(CachedFile.class);\r\n\r\n private long privateLastModified;\r\n private long privateLength;\r\n private long privateCrc; // A -ve value indicates invalid CRC;\r\n private final static long... | import com.gmail.dpierron.calibre.cache.CachedFile;
import com.gmail.dpierron.calibre.cache.CachedFileManager;
import com.gmail.dpierron.calibre.datamodel.*;
import com.gmail.dpierron.calibre.opds.JDOMManager;
import com.gmail.dpierron.calibre.opds.JDOMManager.Namespace;
import com.gmail.dpierron.tools.Helper;
im... | package com.gmail.dpierron.calibre.opf;
public class OpfOutput {
private final static Logger logger = LogManager.getLogger(OpfOutput.class);
private static final DateFormat CALIBRE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
private static final DateFormat CALIBRE_TIME_FORMAT = new SimpleDateForma... | CachedFile epubfile = book.getEpubFile().getFile();
| 0 |
ceefour/webdav-servlet | src/main/java/net/sf/webdav/methods/DoMkcol.java | [
"public interface ITransaction {\n\n Principal getPrincipal();\n\n}",
"public interface IWebdavStore {\n\n /**\n * Life cycle method, called by WebdavServlet's destroy() method. Should be used to clean up resources.\n */\n void destroy();\n\n /**\n * Indicates that a new request or transac... | import java.io.IOException;
import java.util.Hashtable;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.webdav.ITransaction;
import net.sf.webdav.IWebdavStore;
import net.sf.webdav.StoredObject;
import net.sf.webdav.WebdavStatus;
import net.sf.webdav.exceptions... | /*
* Copyright 1999,2004 The Apache Software Foundation.
*
* 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... | LockedObject nullResourceLo = _resourceLocks | 7 |
SamuelGjk/GComic | app/src/main/java/moe/yukinoneko/gcomic/module/gallery/GalleryPresenter.java | [
"public abstract class BasePresenter<T extends IBaseView> {\n protected CompositeSubscription mCompositeSubscription;\n protected Context mContext;\n protected T iView;\n\n public BasePresenter(Context context, T iView) {\n this.mContext = context;\n this.iView = iView;\n }\n\n publi... | import rx.functions.Action1;
import android.content.Context;
import java.util.List;
import moe.yukinoneko.gcomic.R;
import moe.yukinoneko.gcomic.base.BasePresenter;
import moe.yukinoneko.gcomic.data.ChapterData;
import moe.yukinoneko.gcomic.database.GComicDB;
import moe.yukinoneko.gcomic.database.model.ReadHistoryModel... | /*
* Copyright (C) 2016 SamuelGjk <samuel.alva@outlook.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | Subscription subscription = FileUtlis.readFileContent(path) | 4 |
JoelGodOfwar/SinglePlayerSleep | 1.14/src/com/github/joelgodofwar/sps/PluginBase.java | [
"public class MetricsLite {\r\n\r\n /**\r\n * The current revision number\r\n */\r\n private final static int REVISION = 7;\r\n\r\n /**\r\n * The base url of the metrics domain\r\n */\r\n private static final String BASE_URL = \"http://report.mcstats.org\";\r\n\r\n /**\r\n * The u... | import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import j... | package com.github.joelgodofwar.sps;
//import net.md_5.bungee.api.chat.ClickEvent;
//import net.md_5.bungee.api.chat.ComponentBuilder;
//import net.md_5.bungee.api.chat.HoverEvent;
//import net.md_5.bungee.api.chat.TextComponent;
/**
* @author JoelGodOfWar(JoelYahwehOfWar)
* some code added by Cold... | ConfigAPI.copy(getResource("lang.yml"), langFile); // copies the yaml from your jar to the folder /plugin/<pluginName>
| 3 |
alabeduarte/mypodcasts-android | app/src/main/java/com/mypodcasts/player/AudioPlayerActivity.java | [
"public class EpisodeCheckpoint {\n public static final String STATE = EpisodeCheckpoint.class.toString();\n private final Context context;\n\n @Inject\n public EpisodeCheckpoint(Context context) {\n this.context = context;\n }\n\n public int markCheckpoint(Episode episode, int currentPosition) {\n Shar... | import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.widget.TextView;
import com.mypodcasts.R;
import com.mypodcasts.episodes.EpisodeCheckpoint;
import com.mypodcasts.play... | package com.mypodcasts.player;
@ContentView(R.layout.audio_player)
public class AudioPlayerActivity extends RoboActionBarActivity {
@InjectView(R.id.tool_bar)
private Toolbar toolbar;
@Inject
private EventBus eventBus;
private AudioPlayer audioPlayer;
@Inject
private AudioPlayerController mediaC... | public void onEvent(AudioPlayingEvent event) { | 1 |
jchampemont/WTFDYUM | src/main/java/com/jeanchampemont/wtfdyum/service/impl/CronServiceImpl.java | [
"public class Event {\n\n public Event() {\n // left deliberately empty\n }\n\n public Event(final EventType type, final String additionalData) {\n this.type = type;\n this.additionalData = additionalData;\n }\n\n private EventType type;\n\n private String additionalData;\n\n ... | import org.springframework.util.StopWatch;
import java.util.HashSet;
import java.util.Set;
import com.jeanchampemont.wtfdyum.dto.Event;
import com.jeanchampemont.wtfdyum.dto.Feature;
import com.jeanchampemont.wtfdyum.dto.Principal;
import com.jeanchampemont.wtfdyum.dto.type.EventType;
import com.jeanchampemont.wtfdyum.... | /*
* Copyright (C) 2015, 2016 WTFDYUM
*
* This file is part of the WTFDYUM project.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*... | final Set<Feature> enabledFeatures = userService.getEnabledFeatures(userId); | 1 |
facebookarchive/hive-dwrf | hive-dwrf/src/main/java/com/facebook/hive/orc/WriterImpl.java | [
"public interface CompressionCodec {\n /**\n * Compress the in buffer to the out buffer.\n * @param in the bytes to compress\n * @param out the uncompressed bytes\n * @param overflow put any additional bytes here\n * @return true if the output is smaller than input\n * @throws IOException\n */\n boo... | import java.io.IOException;
import java.io.OutputStream;
import java.nio.ByteBuffer;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.TreeMap;
import com... | }
/**
* Get the stride rate of the row index.
*/
public int getRowIndexStride() {
return rowIndexStride;
}
/**
* Should be building the row index.
* @return true if we are building the index
*/
public boolean buildIndex() {
return buildIndex;
}
/**... | setRawDataSize(RawDatasizeConst.NULL_SIZE); | 4 |
52North/SensorPlanningService | 52n-sps-testplugin/src/test/java/org/n52/sps/sensor/cite/CiteTaskResultAccessTest.java | [
"public class ResultAccessDataServiceReference {\r\n \r\n private Long id; // database id\r\n \r\n private String reference;\r\n \r\n private String role;\r\n \r\n private String title;\r\n \r\n private String identifier;\r\n \r\n private String referenceAbstract;\r\n \r\n ... | import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
import org.junit.Before;
import org.junit.Test;
import org.n52.sps.sensor.model.ResultAccessDataServiceReference;
import org.n52.sps.sensor.model.SensorTask;
import org.n52.sps.service.admin.MissingSensorInformationException;
import o... | /**
* Copyright (C) 2012-${latestYearOfContribution} 52°North Initiative for Geospatial Open Source
* Software GmbH
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License version 2 as publishedby the Free
* Software Foundation.
*
... | class SensorInstanceProviderSeam extends SensorInstanceProvider {
| 3 |
eriq-augustine/jocr | src/com/eriqaugustine/ocr/drivers/ClassifierTest.java | [
"public interface OCRClassifier {\n public String classify(WrapImage image);\n}",
"public class CharacterImage {\n private static final int DEFAULT_POINT_SIZE = 2;\n\n private static final double DEFAULT_POINT_DENSITY = 0.75;\n\n private static final double DEFAULT_OVERLAP_PERCENT = 0.50;\n\n private st... | import com.eriqaugustine.ocr.classifier.OCRClassifier;
import com.eriqaugustine.ocr.image.CharacterImage;
import com.eriqaugustine.ocr.image.TextImage;
import com.eriqaugustine.ocr.image.WrapImage;
import com.eriqaugustine.ocr.utils.FontUtils;
import com.eriqaugustine.ocr.utils.ImageUtils;
import com.eriqaugustine.ocr.... | package com.eriqaugustine.ocr.drivers;
/**
* The base to for a quick classifier spot check.
* This will handle most of the setup, it just needs a constructed classifier.
*/
public abstract class ClassifierTest {
// Suggested training set.
protected final String trainingCharacters;
protected Classifier... | FontUtils.registerLocalFonts(); | 4 |
ruigoncalo/passarola | app/src/main/java/pt/passarola/ui/BeersActivity.java | [
"public class BeerViewModel {\n\n private final String id;\n private final String name;\n private final String style;\n private final String abv;\n private final String ingredients;\n private final String description;\n private final String labelPic;\n private final String labelPicSmall;\n ... | import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.MenuItem;
import java.util.List;
import javax.inject.Inject;
import butterknife.Bind;
import butterknife.ButterKnife;
import pt.passarola.R;
import pt.passarola.model.viewmo... | package pt.passarola.ui;
/**
* Created by ruigoncalo on 22/10/15.
*/
public class BeersActivity extends DaggerableAppCompatActivity
implements BeersPresenterCallback, SocialBeerListener {
@Inject BeersPresenter presenter; | @Inject TrackerManager trackerManager; | 1 |
MarWoes/viper | src/main/java/de/imi/marw/viper/api/routes/SnapshotRoutes.java | [
"public class ViperServerConfig {\n\n private String analysisFile = \"/tmp/analysis/file\";\n private int viperPort = 8090;\n private int igvPort = 9090;\n private char csvDelimiter = ';';\n private String collectionDelimiter = \",\";\n private boolean enableGrouping = true;\n private int break... | import static spark.Spark.get;
import static spark.Spark.post;
import com.google.gson.Gson;
import de.imi.marw.viper.api.ViperServerConfig;
import de.imi.marw.viper.util.Util;
import de.imi.marw.viper.variants.VariantTableCluster;
import de.imi.marw.viper.variants.table.VariantTable;
import de.imi.marw.viper.visualizat... | /* Copyright (c) 2017 Marius Wöste
*
* This file is part of VIPER.
*
* VIPER is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
... | public SnapshotRoutes(IGVVisualizer igv, VariantTableCluster cluster, Gson gson, ViperServerConfig config) { | 2 |
konifar/annict-android | app/src/main/java/com/konifar/annict/viewmodel/WorkItemViewModel.java | [
"public enum Status {\n\n WANNA_WATCH(R.string.status_wanna_watch),\n WATCHING(R.string.status_watching),\n WATCHED(R.string.status_watched),\n ON_HOLD(R.string.status_on_hold),\n STOP_WATCHING(R.string.status_stop_watching),\n NO_SELECT(R.string.status_no_select);\n\n @StringRes\n public in... | import com.android.databinding.library.baseAdapters.BR;
import com.konifar.annict.R;
import com.konifar.annict.model.Status;
import com.konifar.annict.model.Work;
import com.konifar.annict.repository.StatusRepository;
import com.konifar.annict.util.PageNavigator;
import com.konifar.annict.util.ViewHelper;
import androi... | package com.konifar.annict.viewmodel;
public class WorkItemViewModel extends BaseObservable implements ViewModel {
private static final String TAG = WorkItemViewModel.class.getSimpleName();
public final Work work;
| private final PageNavigator pageNavigator; | 3 |
webbit/webbit | src/test/java/org/webbitserver/handler/CompressionTest.java | [
"public static WebServer createWebServer(int port) {\n return new NettyWebServer(port);\n}",
"public static String contents(URLConnection urlConnection) throws IOException {\n int length = urlConnection.getContentLength();\n byte[] buffer = new byte[length == -1 ? BUFFER_SIZE_IF_NO_CONTENT_LENGTH_HEADER ... | import static org.junit.Assert.assertEquals;
import static org.webbitserver.WebServers.createWebServer;
import static org.webbitserver.testutil.HttpClient.contents;
import static org.webbitserver.testutil.HttpClient.decompressContents;
import static org.webbitserver.testutil.HttpClient.httpGetAcceptCompressed;
import s... | package org.webbitserver.handler;
public class CompressionTest {
private final WebServer webServer = createWebServer(59504);
private final String content = "Very short string for which there is no real point in compressing, but we're going to do it anyway.";
@After
public void die() throws Interr... | public void handleHttpRequest(HttpRequest request, HttpResponse response, HttpControl control) | 5 |
tommai78101/Marble-Run | src/nttu/edu/entity/Pipe.java | [
"public abstract class Ball extends Entity {\n\t\n\tpublic float[] position = new float[3];\n\tpublic float[] speed = new float[3];\n\tpublic float[] acceleration = new float[3];\n\tpublic float radius;\n\tpublic float screenWidth;\n\tpublic float screenHeight;\n\tpublic boolean insideHole;\n\t\n\t//TODO: May want ... | import nttu.edu.ball.Ball;
import nttu.edu.ball.Marble;
import nttu.edu.graphics.Art;
import nttu.edu.graphics.RenderView;
import nttu.edu.level.Stage;
import android.graphics.Canvas; | package nttu.edu.entity;
public class Pipe extends Path {
public Pipe() {
}
@Override
public void tick(Stage l) {
place();
checkCollision(l.cue);
for (Marble m : l.marbles)
checkCollision(m);
}
@Override
public void render(Canvas c, final float cx, final float cy) {
if (bitmap != null) { | float xOffset = this.position[0] - RenderView.cameraX + cx; | 3 |
NanYoMy/mybatis-generator | src/main/java/org/mybatis/generator/codegen/ibatis2/dao/elements/DeleteByExampleMethodGenerator.java | [
"public class FullyQualifiedJavaType implements\n Comparable<FullyQualifiedJavaType> {\n private static final String JAVA_LANG = \"java.lang\"; //$NON-NLS-1$\n private static FullyQualifiedJavaType intInstance = null;\n private static FullyQualifiedJavaType stringInstance = null;\n private static... | import java.util.Set;
import java.util.TreeSet;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.Interface;
import org.mybatis.generator.api.dom.java.JavaVisibility;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.api.dom.java.Par... | /*
* Copyright 2008 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | public void addImplementationElements(TopLevelClass topLevelClass) { | 4 |
adyliu/jafka | src/test/java/io/jafka/consumer/ZookeeperConsumerConnectorTest.java | [
"public abstract class BaseJafkaServer {\n\n static {\n //System.setProperty(\"jafka_mx4jenable\", \"true\");\n }\n\n protected Logger logger = LoggerFactory.getLogger(getClass());\n\n public Jafka createJafka() {\n Properties mainProperties = new Properties();\n return createJafka(... | import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
i... | /**
* 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... | Jafka[] jafkas = new Jafka[jafkaCount]; | 2 |
Slikey/EffectLib | src/main/java/de/slikey/effectlib/effect/WaveEffect.java | [
"public abstract class Effect implements Runnable {\n\n /**\n * Handles the type, the effect is played.\n *\n * @see {@link de.slikey.effectlib.EffectType}\n */\n public EffectType type = EffectType.INSTANT;\n\n /**\n * Can be used to colorize certain particles. As of 1.8, those\n *... | import de.slikey.effectlib.Effect;
import de.slikey.effectlib.EffectManager;
import de.slikey.effectlib.EffectType;
import de.slikey.effectlib.util.MathUtils;
import org.bukkit.Particle;
import de.slikey.effectlib.util.VectorUtils;
import java.util.Collection;
import java.util.HashSet;
import org.bukkit.Color;
import o... | package de.slikey.effectlib.effect;
public class WaveEffect extends Effect {
public Particle particle = Particle.DRIP_WATER;
public Particle cloudParticle = Particle.CLOUD;
public Color cloudColor = null;
/**
* Velocity of the wave
* Call velocity.zero() if the wave should be stationary
... | public WaveEffect(EffectManager effectManager) { | 1 |
momodalo/vimtouch | src/net/momodalo/app/vimtouch/VimTouch.java | [
"public class ColorScheme {\n private int foreColor;\n private int backColor;\n\n /**\n * Creates a <code>ColorScheme</code> object.\n *\n * @param foreColor The foreground color as an ARGB hex value.\n * @param backColor The background color as an ARGB hex value.\n */\n public Color... | import android.annotation.TargetApi;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DownloadManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.con... | public void onStop() {
Log.e(VimTouch.LOG_TAG, "on stop.");
mSettings.writePrefs(mPrefs);
/*
if (mTermFd != null) {
try{
//mSession.write((":q!\r").getBytes("UTF-8"));
}catch (Exception e){
}
Exec.close(mTermFd);
... | ColorScheme colorScheme = new ColorScheme(mSettings.getColorScheme()); | 0 |
Whiley/WhileyTheoremProver | src/main/java/wytp/types/util/AbstractTypeExtractor.java | [
"public static interface Named extends Declaration {\n\n\tpublic Name getName();\n\n\tpublic Tuple<VariableDeclaration> getParameters();\n\n\tpublic static abstract class FunctionOrMacro extends AbstractSyntacticItem implements Named {\n\t\tpublic FunctionOrMacro(Name name, Tuple<VariableDeclaration> parameters, St... | import java.util.Arrays;
import wyal.lang.WyalFile.Declaration.Named;
import static wyal.lang.WyalFile.Type;
import wyal.util.NameResolver;
import wyal.util.NameResolver.ResolutionError;
import wytp.types.TypeExtractor;
import wytp.types.TypeSystem;
import wyfs.util.ArrayUtils; | // Copyright 2011 The Whiley Project Developers
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | public T extract(Type type, Object supplementary) throws ResolutionError { | 3 |
Akshansh986/Webkiosk | Webkiosk/src/main/java/com/blackMonster/webkiosk/ui/Dialog/AddClassDialog.java | [
"public class TimetableDelegate {\n public static final String TAG = \"TimetableDataHandler\";\n\n\n public static List<ClassTime> getDayWiseTimetable(int day, Context context) {\n List<ClassTime> list = new ArrayList<ClassTime>();\n\n SQLiteDatabase db = TimetableDbHelper\n .getR... | import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v4.content.LocalBroadcastManager;
import android.view.View;
imp... | package com.blackMonster.webkiosk.ui.Dialog;
public class AddClassDialog extends DialogFragment {
public static final String BROADCAST_ADD_CLASS_DIALOG = "BROADCAST_ADD_CLASS_DIALOG";
NumberPicker day, time;
EditText venue;
String venueString;
char type;
String subCode;
View myDialog;
List<String> listSubN... | AttendenceOverviewTable atndOverviewTable = new AttendenceOverviewTable(getActivity()); | 3 |
comtel2000/jfxvnc | jfxvnc-net/src/main/java/org/jfxvnc/net/rfb/codec/handshaker/RfbClient33Decoder.java | [
"public class PixelFormat {\n /**\n * depth 24 (32bpp) little-endian rgb888\n */\n public final static PixelFormat RGB_888 = new PixelFormat();\n\n /**\n * depth 16 (16bpp) little-endian rgb555\n */\n public final static PixelFormat RGB_555 = new PixelFormat();\n\n static {\n RGB_888.setBitPerPixel(... | import io.netty.handler.codec.ReplayingDecoder;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.List;
import org.jfxvnc.net.rfb.codec.PixelFormat;
import org.jfxvnc.net.rfb.codec.handshaker.event.SecurityResultEvent;
import org.jfxvnc.net.rfb.codec.handshaker.event.SecurityTy... | /*******************************************************************************
* Copyright (c) 2016 comtel 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.or... | out.add(new SecurityTypesEvent(false, securityType)); | 2 |
Lambda-3/DiscourseSimplification | src/main/java/org/lambda3/text/simplification/discourse/runner/discourse_tree/extraction/rules/QuotedAttributionPreExtractor.java | [
"public enum Relation {\n\n UNKNOWN,\n\n // Coordinations\n UNKNOWN_COORDINATION, // the default for coordination\n CONTRAST,\n CAUSE_C,\n RESULT_C,\n LIST,\n DISJUNCTION,\n TEMPORAL_AFTER_C,\n TEMPORAL_BEFORE_C,\n\n // Subordinations\n UNKNOWN_SUBORDINATION, // the default for s... | import org.lambda3.text.simplification.discourse.utils.parseTree.ParseTreeException;
import org.lambda3.text.simplification.discourse.utils.parseTree.ParseTreeExtractionUtils;
import org.lambda3.text.simplification.discourse.utils.words.WordsUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.ut... | /*
* ==========================License-Start=============================
* DiscourseSimplification : QuotedISAPostExtractor
*
* Copyright © 2017 Lambda³
*
* GNU General Public License 3
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License... | List<Word> leftConstituentWords = ParseTreeExtractionUtils.getWordsInBetween(leaf.getParseTree(), quoteStart, quoteEnd, false, false); | 5 |
nextopcn/xcalendar | src/main/java/cn/nextop/thorin/rcp/support/swt/widget/xcalendar/model/config/widget/impl/XCalendarMinuteWidget.java | [
"public class XCalendar extends Canvas {\n\t//\n\tprotected final XCalendarModel model;\n\tprotected final XCalendarEventBus bus;\n\tprotected final XCalendarReactor reactor;\n\tprotected volatile boolean editable = true;\n\tprotected final Map<Object, Object> cookies;\n\tprotected Map<XCalendarState, List<XCalenda... | import cn.nextop.thorin.rcp.support.swt.widget.xcalendar.XCalendar;
import cn.nextop.thorin.rcp.support.swt.widget.xcalendar.event.bus.internal.*;
import cn.nextop.thorin.rcp.support.swt.widget.xcalendar.event.reactor.impl.action.XCalendarSelectAction;
import cn.nextop.thorin.rcp.support.swt.widget.xcalendar.model.XCal... | package cn.nextop.thorin.rcp.support.swt.widget.xcalendar.model.config.widget.impl;
/**
* @author chenby
*
*/
public class XCalendarMinuteWidget extends AbstractXCalendarWidget {
//
private final int col, row;
/**
*
*/
public XCalendarMinuteWidget(XCalendar popup, int col, int row) {
super(popup); thi... | return super.submit(new XCalendarSelectAction(v.getDate())); | 1 |
flixel-gdx/flixel-gdx-box2d | flixel-gdx-box2d-examples/src/org/flxbox2d/examples/TestCrankGearsPulley.java | [
"public class B2FlxB\n{\n\t/** \n\t * The ratio from meters to pixels. \n\t */\n\tpublic static final float RATIO = 32f;\n\t/**\n\t * The world where the object lives.\n\t */\n\tpublic static World world;\n\t/**\n\t * The contact manager.\n\t */\n\tpublic static B2FlxContactManager contact;\n\t/**\n\t * Let the wor... | import org.flxbox2d.B2FlxB;
import org.flxbox2d.collision.shapes.B2FlxBox;
import org.flxbox2d.collision.shapes.B2FlxCircle;
import org.flxbox2d.common.B2FlxV2;
import org.flxbox2d.dynamics.joints.B2FlxFrictionJoint;
import org.flxbox2d.dynamics.joints.B2FlxGearJoint;
import org.flxbox2d.dynamics.joints.B2FlxPrismaticJ... | package org.flxbox2d.examples;
/**
*
* @author Ka Wing Chin
*/
public class TestCrankGearsPulley extends PlayState
{
@Override
public void create()
{
super.create();
title.setText("Joints");
// CRANK
// Define crank.
B2FlxBox crank = new B2FlxBox(100, 360-135, 15, 60)
.setDensity(1f)
.setDra... | new B2FlxPulleyJoint(box, pulley) | 7 |
sewerk/Bill-Calculator | persistence/src/main/java/pl/srw/billcalculator/persistence/type/CurrentReadingType.java | [
"@SuppressWarnings(\"ALL\")\npublic class PgeG11BillDao extends AbstractDao<PgeG11Bill, Long> {\n\n public static final String TABLENAME = \"PGE_G11_BILL\";\n\n /**\n * Properties of entity PgeG11Bill.<br/>\n * Can be used for QueryBuilder and for referencing column names.\n */\n public static ... | import pl.srw.billcalculator.db.dao.PgeG11BillDao;
import pl.srw.billcalculator.db.dao.PgeG12BillDao;
import pl.srw.billcalculator.db.dao.PgnigBillDao;
import pl.srw.billcalculator.db.dao.TauronG11BillDao;
import pl.srw.billcalculator.db.dao.TauronG12BillDao; | package pl.srw.billcalculator.persistence.type;
/**
* Created by Kamil Seweryn.
*/
public enum CurrentReadingType {
PGNIG_TO(PgnigBillDao.TABLENAME, PgnigBillDao.Properties.ReadingTo.columnName),
PGE_TO(PgeG11BillDao.TABLENAME, PgeG11BillDao.Properties.ReadingTo.columnName),
PGE_DAY_TO(PgeG12BillDao.TA... | TAURON_TO(TauronG11BillDao.TABLENAME, TauronG11BillDao.Properties.ReadingTo.columnName), | 3 |
inovex/zax | src/main/java/com/inovex/zabbixmobile/activities/ChecksActivity.java | [
"public class ChecksApplicationsFragment extends BaseServiceConnectedFragment\n\t\timplements OnItemsLoadedListener {\n\n\tpublic static final String TAG = ChecksApplicationsFragment.class\n\t\t\t.getSimpleName();\n\n\tprivate Host mHost;\n\tprivate boolean mApplicationsProgressBarVisible = true;\n\tprivate boolean... | import com.inovex.zabbixmobile.activities.fragments.ChecksItemsFragment;
import com.inovex.zabbixmobile.listeners.OnApplicationsLoadedListener;
import com.inovex.zabbixmobile.listeners.OnChecksItemSelectedListener;
import com.inovex.zabbixmobile.listeners.OnHostsLoadedListener;
import com.inovex.zabbixmobile.model.Host... | /*
This file is part of ZAX.
ZAX is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ZAX is distributed in the hope that it will be useful... | protected ChecksHostsFragment mHostListFragment; | 1 |
JoshuaD84/HypnosMusicPlayer | src/net/joshuad/hypnos/trayicon/LinuxTrayIcon.java | [
"public class Hypnos extends Application {\n\n\tprivate static final Logger LOGGER = Logger.getLogger( Hypnos.class.getName() );\n\t\n\tpublic enum ExitCode {\n\t\tNORMAL,\n\t\tUNKNOWN_ERROR,\n\t\tAUDIO_ERROR, \n\t\tUNSUPPORTED_OS\n\t}\n\t\n\tpublic enum OS {\n\t\tWIN_XP ( \"Windows XP\" ),\n\t\tWIN_VISTA ( \"Windo... | import java.io.IOException;
import net.joshuad.hypnos.Hypnos;
import net.joshuad.hypnos.Hypnos.ExitCode;
import net.joshuad.hypnos.audio.AudioSystem;
import net.joshuad.hypnos.audio.AudioSystem.StopReason;
import net.joshuad.hypnos.fxui.FXUI; | package net.joshuad.hypnos.trayicon;
public class LinuxTrayIcon extends NativeTrayIcon {
private native void initTrayIcon ( String iconLocation );
private native void showTrayIcon ();
private native void hideTrayIcon ();
private boolean doneInit = true;
private boolean exitRequested = false;
private boolean... | private AudioSystem audioSystem; | 2 |
1and1/Troilus | troilus-core/src/test/java/net/oneandone/troilus/api/ExpliciteKeyspacenameTest.java | [
"public class DaoImpl implements Dao {\n \n private final Tablename tablename;\n private final Context ctx;\n \n /**\n * @param session the underlying session which has an assigned keyspace\n * @param tablename the table name\n */\n public DaoImpl(Session session, String tablenam... | import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.datastax.driver.core.ConsistencyLevel;
import com.google.common.collect.ImmutableSet;
import java.io.IOException;
import java.util.Optional;
import net.oneandone.troilus.Dao;
im... | /*
* Copyright 1&1 Internet AG, https://github.com/1and1/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | Hotel entity = new Hotel("BUP45544", | 3 |
xandradx/ovirt-engine-disaster-recovery | app/controllers/Configurations.java | [
"public class ServiceResponse<T> {\n\t\n\tprivate boolean success;\n\tprivate String userMessage;\n\tprivate String errorMessage;\n\tprivate String sessionId;\n\t\n\tprivate T data;\n\t\n\tpublic static <T> ServiceResponse<T> success(String userMessage) {\n\t\treturn ServiceResponse.successToken(userMessage, null, ... | import dto.response.ServiceResponse;
import helpers.GlobalConstants;
import jobs.services.HostsJob;
import jobs.services.StorageConnectionsJob;
import models.Configuration;
import models.DatabaseConnection;
import models.DatabaseIQN;
import models.RemoteHost;
import play.data.validation.Valid;
import play.i18n.Messages... | package controllers;
@With(Secure.class)
@Check(GlobalConstants.ROLE_ADMIN)
public class Configurations extends AuthenticatedController {
public static void editConfiguration() {
| Configuration configuration = Configuration.generalConfiguration(); | 4 |
buni-rock/Pixie | 04_Software/03_Development/02_SourceCode/java/src/gui/editobject/SemanticObjEdit.java | [
"public class UserPreferences implements Serializable {\n\n /**\n * Serial class version in form of MAJOR_MINOR_BUGFIX_DAY_MONTH_YEAR\n */\n private static final long serialVersionUID = 0x00_06_01_11_09_2017L;\n\n /**\n * logger instance\n */\n private final transient org.slf4j.Logger lo... | import observers.ObservedActions;
import java.awt.Color;
import java.awt.Frame;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.util.List;
import common.UserPreferences;
import common.Utils;
import gui.support.CustomTreeNode;
import gui.supp... | /*
* The MIT License
*
* Copyright 2018 Olimpia Popica, Benone Aligica
*
* Contact: contact[a(t)]annotate[(d){o}t]zone
*
* 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 restr... | Objects currentObj, | 4 |
LRMPUT/DiamentowyGrant | NavigationDG/src/org/dg/main/MainScreenSlideActivity.java | [
"public class CameraSaver implements PictureCallback, PreviewCallback{\n\tfinal String TAG = \"CameraSaver\";\n\n\t@Override\n\tpublic void onPictureTaken(byte[] data, Camera camera) {\n\t\t// TODO Auto-generated method stub\n\t\tLog.d(TAG, \"CameraSaver::onPictureTaken - jpeg\");\n\n\t\ttry {\n\n\t\t\tFile folder ... | import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.text.NumberFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Scanner;
import java.util.Timer;
import jav... | // OpenAIL - Open Android Indoor Localization
// Copyright (C) 2015 Michal Nowicki (michal.nowicki@put.poznan.pl)
// 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 ... | if (openAIL.getState() == STATE.STARTED) | 4 |
InfinityRaider/NinjaGear | src/main/java/com/infinityraider/ninjagear/entity/EntityShuriken.java | [
"@Mod(Reference.MOD_ID)\npublic class NinjaGear extends InfinityMod<IProxy, Config> {\n public static NinjaGear instance;\n\n public NinjaGear() {\n super();\n }\n\n @Override\n public String getModId() {\n return Reference.MOD_ID;\n }\n\n @Override\n protected void onModConstr... | import com.infinityraider.infinitylib.entity.EntityThrowableBase;
import com.infinityraider.ninjagear.NinjaGear;
import com.infinityraider.ninjagear.reference.Names;
import com.infinityraider.ninjagear.registry.EntityRegistry;
import com.infinityraider.ninjagear.registry.ItemRegistry;
import com.infinityraider.ninjagea... | package com.infinityraider.ninjagear.entity;
public class EntityShuriken extends EntityThrowableBase {
private float crit;
private int timer;
private Vector3d direction;
//For client side spawning
private EntityShuriken(EntityType<? extends EntityShuriken> type, World world) {
super(type... | super(EntityRegistry.getInstance().entityShuriken, thrower, world); | 2 |
xspec/xspec-maven-plugin-1 | src/test/java/io/xspec/maven/xspecMavenPlugin/utils/XmlStuffTest.java | [
"public class DefaultSchematronImplResources implements SchematronImplResources {\n public static final transient String SCHEMATRON_PREFIX = \"cp:/\";\n private String schIsoDsdlInclude;\n private String schIsoAbstractExpand;\n private String schIsoSvrlForXslt2;\n \n public DefaultSchematronImplRe... | import net.sf.saxon.s9api.Processor;
import net.sf.saxon.s9api.XsltExecutable;
import net.sf.saxon.s9api.XsltTransformer;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugin.logging.SystemStreamLog;
import org.junit.Test;
import top.marchand.maven.saxon.utils.SaxonOptions;
import java.io.File;
im... | /**
* Copyright © 2018, Christophe Marchand, XSpec organization
* 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
* ... | private final DefaultXSpecImplResources xspecResources; | 1 |
anotherMe17/CommonAdapterSample | common-rv-adapter/src/main/java/io/github/anotherme17/commonrvadapter/helper/RvHolderHelper.java | [
"public class RecyclerViewAdapter<T> extends RecyclerView.Adapter<RecyclerViewHolder> {\n\n private static final boolean DEBUG = true;\n private static final String TAG = \"RecyclerViewAdapter\";\n\n /*========== Head And Foot ==========*/\n private static final int BASE_ITEM_TYPE_HEADER = 1024;\n pr... | import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.support.annotation.ColorRes;
import android.support.annotation.DrawableRes;
import android.support.annotation.IdRes;
import android.support.annotation.StringRes;
im... | package io.github.anotherme17.commonrvadapter.helper;
/**
* @author anotherme17
*/
public class RvHolderHelper implements View.OnLongClickListener, CompoundButton.OnCheckedChangeListener, View.OnTouchListener {
private SparseArrayCompat<View> mViews;
private Context mContext;
private RecyclerView mRe... | private OnRvItemChildLongClickListener mOnRvItemChildLongClickListener; | 6 |
fabioCollini/LifeCycleBinder | lifecyclebinder-processor/src/main/java/it/codingjam/lifecyclebinder/BinderGenerator.java | [
"public class EventMethodElement {\n private static final ClassName EVENT_CLASS_NAME = ClassName.get(LifeCycleEvent.class);\n public final ExecutableElement element;\n public final LifeCycleEvent[] events;\n public final TypeName viewTypeName;\n\n public EventMethodElement(ExecutableElement element) ... | import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.CodeBlock;
import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.ParameterizedTypeName;
import com.squareup.javapoet.TypeName;
import com.squareup.javapoet.TypeSpec;
import com.squareup.javapoet.T... | /*
* Copyright 2016 Fabio Collini.
*
* 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 o... | List<TypeName> typeArguments = TypeUtils.getTypeArguments(hostElement.asType()); | 4 |
lovejjfg/MyBlogDemo | app/src/main/java/com/lovejjfg/blogdemo/activity/MainActivity.java | [
"public class AnimUtils {\n\n private AnimUtils() { }\n\n private static Interpolator fastOutSlowIn;\n private static Interpolator fastOutLinearIn;\n private static Interpolator linearOutSlowIn;\n\n public static Interpolator getFastOutSlowInInterpolator(Context context) {\n if (fastOutSlowIn ... | import android.animation.Animator;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.view.ViewCompat;
import android.support.v4.widget.NestedScrollView;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
impo... | if (isShown) {
return;
}
btHeight = mBt.getMeasuredHeight();
mBt.setTranslationY(currentDy == 0 ? btHeight : currentDy);
mBt.setAlpha(0.5f);
mBt.animate()
.translationY(0)
.alpha(1f)
.setDuration(200)
... | BaseUtil.startActivityOnspecifiedAnimation(this, ScrollingActivity.class); | 2 |
xuyunqiang/MeiziAPP | app/src/main/java/com/yunq/gankio/data/DataManager.java | [
"public interface MeiziService {\n\n /**\n * 数据主机地址\n */\n String HOST = \"http://gank.avosapps.com/api/\";\n\n @GET(\"data/福利/{pageSize}/{page}\")\n Observable<PrettyGirlData> getPrettyGirlData(@Path(\"pageSize\") int pageSize, @Path(\"page\") int page);\n\n @GET(\"data/休息视频/{pageSize}/{page... | import com.yunq.gankio.core.MeiziService;
import com.yunq.gankio.data.entity.Gank;
import com.yunq.gankio.data.entity.Girl;
import com.yunq.gankio.data.parse.GankData;
import com.yunq.gankio.data.parse.PrettyGirlData;
import com.yunq.gankio.data.parse.休息视频Data;
import java.util.Calendar;
import java.util.Date;
import j... | package com.yunq.gankio.data;
/**
* Model层数据管理类,所有的数据变换操作全部放到这个类中,
* 但随着数据操作的增多,这个类会变得越来越臃肿,
* 我们可以可以将每组相关的数据操作抽取出来放到另一个类中去管理
*/
@Singleton
public class DataManager {
private final OkHttpClient mClient;
private final MeiziService mMeiziService;
@Inject
public DataManager(OkHttpClient client) ... | new Func2<PrettyGirlData, 休息视频Data, PrettyGirlData>() { | 4 |
diadoc/diadocsdk-java | src/main/java/Diadoc/Api/documentType/DocumentTypeClient.java | [
"public class DiadocSdkException extends Exception {\n public DiadocSdkException(Exception ex) {\n super(ex);\n }\n\n public DiadocSdkException(String message) {\n super(message);\n }\n\n private String formatMessage(Throwable[] exceptions) {\n String text = super.toString();\n ... | import Diadoc.Api.exceptions.DiadocSdkException;
import Diadoc.Api.helpers.Tools;
import Diadoc.Api.httpClient.DiadocHttpClient;
import Diadoc.Api.httpClient.FileContent;
import org.apache.http.client.methods.RequestBuilder;
import org.apache.http.client.utils.URIBuilder;
import org.apache.http.entity.ByteArrayEntity;
... | package Diadoc.Api.documentType;
public class DocumentTypeClient {
public DiadocHttpClient diadocHttpClient;
public DocumentTypeClient(DiadocHttpClient diadocHttpClient) {
this.diadocHttpClient = diadocHttpClient;
}
public GetDocumentTypesResponseV2 getDocumentTypesV2(String boxId) throws ... | public FileContent getContent(String typeNamedId, String function, String version, int titleIndex, XsdContentType contentType) throws DiadocSdkException { | 3 |
kituri/KituriFlux | app/src/main/java/com/flux/kituri/app/business/backgroundService/UpdateService.java | [
"public class LoginStore extends Store {\n\n private UserData data;\n\n public LoginStore() {\n super();\n }\n\n\n public UserData getUserData(){ return data;}\n\n @Override\n @Subscribe\n public void onAction(Action action) {\n super.actionEvent(action);\n switch (action.g... | import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.util.Log;
import android.widget.Toast;
import com.flux.kituri.app.business.login.LoginStore;... | package com.flux.kituri.app.business.backgroundService;
/**
* Created by kirijin on 2016/8/29.
*/
public class UpdateService extends BaseFluxService {
static public final String ACTION_SERVICE_LOGIN = "action_service_login";
private UpdateActionsCreator updateActionsCreator;
@Override
public A... | UserData userData = UserUtils.getUserData(); | 1 |
lukasz-kusek/xml-comparator | src/main/java/com/github/lukaszkusek/xml/comparator/XMLComparatorBuilder.java | [
"public interface XMLComparatorStep {\n\n DifferenceDetails compare(Node node1, Node node2);\n}",
"public class XMLAttributesComparator implements XMLComparatorStep {\n\n private Map<String, Pattern> valueExtractors;\n\n public XMLAttributesComparator(Map<String, Pattern> valueExtractors) {\n this... | import javax.xml.transform.TransformerException;
import java.io.IOException;
import java.net.URL;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
import java.util.regex.Pattern;
import com.github.lukaszkusek.xml.comparator.comparators.... | /*
* The MIT License (MIT)
*
* Copyright (c) 2013 Lukasz Kusek
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use,... | private XMLDocument xmlDocument1; | 7 |
loopfz/Lucki | src/shaft/poker/game/table/PokerTable.java | [
"public class Card implements Comparable<Card> {\n\n public enum Rank {\n DEUCE,\n THREE,\n FOUR,\n FIVE,\n SIX,\n SEVEN,\n EIGHT,\n NINE,\n TEN,\n JACK,\n QUEEN,\n KING,\n ACE\n }\n \n public enum Suit {\n ... | import shaft.poker.game.IHand;
import shaft.poker.game.IPlayer;
import shaft.poker.game.ITable;
import shaft.poker.factory.PokerFactory;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import shaft.poker.game.Card;
import shaft.poker.game.IAction;
import shaft.... | /*
* The MIT License
*
* Copyright 2013 Thomas Schaffer <thomas.schaffer@epitech.eu>.
*
* 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 limitatio... | private List<Card> _board; | 0 |
jansoren/akka-persistence-java-example | mymicroservice-server/src/main/java/no/jansoren/mymicroservice/MymicroserviceApplication.java | [
"public class EventStore {\n\n private static final Logger LOG = LoggerFactory.getLogger(EventStore.class);\n\n private ActorRef persistenceActor;\n private LeveldbReadJournal readJournal;\n private Map<Class<? extends Projection>, Projection> projections = new HashMap<>();\n\n public EventStore(Mymi... | import io.dropwizard.Application;
import io.dropwizard.setup.Bootstrap;
import io.dropwizard.setup.Environment;
import no.jansoren.mymicroservice.eventsourcing.EventStore;
import no.jansoren.mymicroservice.eventsourcing.ShutdownManager;
import no.jansoren.mymicroservice.health.ActorSystemHealthCheck;
import no.jansoren... | package no.jansoren.mymicroservice;
public class MymicroserviceApplication extends Application<MymicroserviceConfiguration> {
private static final Logger LOG = LoggerFactory.getLogger(MymicroserviceApplication.class);
public static final String APPLICATION_NAME = "Mymicroservice";
private EventStore eve... | environment.lifecycle().manage(new ShutdownManager(eventStore)); | 1 |
njustesen/hero-aicademy | src/ai/mcts/Mcts.java | [
"public class GameState {\n\t\n\tpublic static int TURN_LIMIT = 100;\n\tpublic static boolean RANDOMNESS = false;\n\tpublic static int STARTING_AP = 3;\n\tpublic static int ACTION_POINTS = 5;\n\t\n\tprivate static final int ASSAULT_BONUS = 300;\n\tprivate static final double INFERNO_DAMAGE = 350;\n\tprivate static ... | import game.GameState;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import util.Statistics;
import action.Action;
import action.Singl... | package ai.mcts;
public class Mcts implements AI {
public static boolean RECORD_DEPTHS = true;
Map<Long, MctsNode> transTable = new HashMap<Long, MctsNode>();
public double c;
public long budget;
public IStateEvaluator defaultPolicy;
public boolean cut;
public boolean collapse;
public L... | comparator = new ComplexActionComparator();
| 8 |
cjstehno/ersatz | ersatz/src/main/java/io/github/cjstehno/ersatz/impl/ErsatzRequestWithContent.java | [
"public enum HttpMethod {\r\n\r\n /**\r\n * Wildcard matching any HTTP method.\r\n */\r\n ANY(\"*\"),\r\n\r\n /**\r\n * HTTP GET method matcher.\r\n */\r\n GET(\"GET\"),\r\n\r\n /**\r\n * HTTP HEAD method matcher.\r\n */\r\n HEAD(\"HEAD\"),\r\n\r\n /**\r\n * HTTP POS... | import io.github.cjstehno.ersatz.cfg.HttpMethod;
import io.github.cjstehno.ersatz.cfg.RequestWithContent;
import io.github.cjstehno.ersatz.encdec.DecodingContext;
import io.github.cjstehno.ersatz.encdec.RequestDecoders;
import io.github.cjstehno.ersatz.encdec.ResponseEncoders;
import io.github.cjstehno.ersatz.encd... | /**
* Copyright (C) 2022 Christopher J. Stehno
*
* 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 ... | public ErsatzRequestWithContent(final HttpMethod method, final Matcher<String> pathMatcher, final RequestDecoders globalDecoders, final ResponseEncoders globalEncoders) {
| 4 |
vector-im/riot-automated-tests | VectorMobileTests/src/test/java/mobilestests_android/RiotMiscTests.java | [
"public class RiotLegalStuffViewPageObject extends TestUtilities{\n\tprivate AndroidDriver<MobileElement> driver;\n\tpublic RiotLegalStuffViewPageObject(AppiumDriver<MobileElement> myDriver){\n\t\tdriver=(AndroidDriver<MobileElement>) myDriver;\n\t\tPageFactory.initElements(new AppiumFieldDecorator(driver), this);\... | import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.open... | package mobilestests_android;
@Listeners({ ScreenshotUtility.class })
public class RiotMiscTests extends RiotParentTest{
public static AppiumDriver<MobileElement> driver;
Dimension size;
String destDir;
DateFormat dateFormat;
public void restardDriver() throws MalformedURLException{
System.out.println("te... | capabilities.setCapability("appPackage", Constant.PACKAGE_APP_NAME); | 4 |
bingoogolapple/Graduation-Design | FrogCare/src/com/bingoogol/frogcare/ui/VirusActivity.java | [
"public class AntiVirusDao {\r\n\r\n\t/**\r\n\t * 查询一条md5信息是否是病毒\r\n\t * \r\n\t * @param context\r\n\t * @param md5\r\n\t * @return null代表安全 result病毒的描述信息\r\n\t */\r\n\tpublic static String findVirus(Context context, String md5) {\r\n\t\tString reuslt = null;\r\n\t\tSQLiteDatabase db = SQLiteDatabase.openDatabase(c... | import java.util.ArrayList;
import java.util.List;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.text.TextUtils;
import android.v... | package com.bingoogol.frogcare.ui;
public class VirusActivity extends BaseActivity {
private static final String TAG = "VirusActivity";
private ImageView iv_scan;
private TextView tv_scan_info;
private ProgressBar pb_scan;
private LinearLayout ll_container;
private AsyncTask<Void, ScanInfo, Void> task;
priva... | String md5 = Md5Util.encode(info.signatures[0].toCharsString()); | 4 |
mkovatsc/iot-semantics | reasoner/src/main/java/ch/ethz/inf/vs/semantics/reasoner/Reasoner.java | [
"public class N3TransformationVisitor extends N3BaseVisitor<Object> {\n\tprivate N3Document n3doc;\n\n\t@Override\n\tpublic Iri visitIri(@NotNull N3Parser.IriContext ctx) {\n\t\treturn new Iri(n3doc, ctx.getText());\n\t}\n\n\t@Override\n\tpublic Exvar visitExvar(@NotNull N3Parser.ExvarContext ctx) {\n\t\treturn new... | import ch.ethz.inf.vs.semantics.parser.N3TransformationVisitor;
import ch.ethz.inf.vs.semantics.parser.elements.Iri;
import ch.ethz.inf.vs.semantics.parser.elements.N3Document;
import ch.ethz.inf.vs.semantics.parser.elements.N3Element;
import ch.ethz.inf.vs.semantics.parser.elements.RDFResource;
import ch.ethz.inf.vs.s... | package ch.ethz.inf.vs.semantics.reasoner;
public class Reasoner {
public static Set<ExtractedRequest> getExecutionPlan(String baseUrl, List<String> ruleURIs, String goal) {
N3Document parsedProof = proofGoal(baseUrl, ruleURIs, goal, true, false);
HashMap<String, Lemma> lemmas = extractLemmas(parsedProof);
... | if (((RDFResource) item).subject instanceof Iri) { | 1 |
UndefinedOffset/eclipse-silverstripedt | ca.edchipman.silverStripePDT/src/ca/edchipman/silverstripepdt/wizards/NewSilverStripeClassWizardTemplatePage.java | [
"@SuppressWarnings(\"restriction\")\npublic class SilverStripePDTPlugin extends AbstractUIPlugin {\n // The plug-in ID\n public static final String PLUGIN_ID = \"ca.edchipman.silverstripepdt\"; //$NON-NLS-1$\n public static final String NATURE_ID = \"ca.edchipman.silverstripepdt.LANGUAGE\"; //$NON-NLS-1$\n... | import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorks... |
TableColumn column2 = new TableColumn(table, SWT.NONE);
column2.setText(Messages.NewGenericFileTemplatesWizardPage_1);
fTableViewer = new TableViewer(table);
fTableViewer.setLabelProvider(new TemplateLabelProvider());
fTableViewer.setContentProvider(new TemplateContentProvider(... | return SilverStripePDTPlugin.getDefault().getNewClassContextRegistry(); | 0 |
gallery/gallery-remote | com/gallery/GalleryRemote/PreviewFrame.java | [
"public class Picture extends GalleryItem implements Serializable, PreferenceNames, Cloneable {\n\tpublic static final String MODULE = \"Picture\";\n\n\tFile source = null;\n\n\tHashMap<String,String> extraFields;\n\tArrayList<ResizedDerivative> resizedDerivatives;\n\n\tboolean hidden;\n\n\tint angle = 0;\n\tboolea... | import java.awt.geom.Point2D;
import java.awt.geom.NoninvertibleTransformException;
import java.awt.event.*;
import com.gallery.GalleryRemote.model.Picture;
import com.gallery.GalleryRemote.util.GRI18n;
import com.gallery.GalleryRemote.util.ImageUtils;
import com.gallery.GalleryRemote.util.ImageLoaderUtil;
import com.g... | /*
* Gallery Remote - a File Upload Utility for Gallery
*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2001 Bharat Mediratta
*
* 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 So... | implements PreferenceNames, ImageLoaderUtil.ImageLoaderUser { | 3 |
SERG-Delft/jpacman-framework | src/main/java/nl/tudelft/jpacman/npc/ghost/Inky.java | [
"public enum Direction {\n\n /**\n * North, or up.\n */\n NORTH(0, -1),\n\n /**\n * South, or down.\n */\n SOUTH(0, 1),\n\n /**\n * West, or left.\n */\n WEST(-1, 0),\n\n /**\n * East, or right.\n */\n EAST(1, 0);\n\n /**\n * The delta x (width differen... | import nl.tudelft.jpacman.board.Direction;
import nl.tudelft.jpacman.board.Square;
import nl.tudelft.jpacman.board.Unit;
import nl.tudelft.jpacman.level.Player;
import nl.tudelft.jpacman.npc.Ghost;
import nl.tudelft.jpacman.sprite.Sprite;
import java.util.List;
import java.util.Map;
import java.util.Optional; | package nl.tudelft.jpacman.npc.ghost;
/**
* <p>
* An implementation of the classic Pac-Man ghost Inky.
* </p>
* <b>AI:</b> Inky has the most complicated AI of all. Inky considers two things: Blinky's
* location, and the location two grid spaces ahead of Pac-Man. Inky draws a
* line from Blinky to the spot that... | public Inky(Map<Direction, Sprite> spriteMap) { | 5 |
almondtools/rexlex | src/main/java/com/almondtools/rexlex/automaton/GenericAutomatonBuilder.java | [
"public interface TokenType {\n\n\tboolean error();\n\tboolean accept();\n\n}",
"static class EpsilonTransition extends BasicTransition implements EventlessTransition {\n\n\tpublic EpsilonTransition(State target) {\n\t\tsuper(target);\n\t}\n\n\t@Override\n\tpublic String toString() {\n\t\treturn new StringBuilder... | import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import com.almondtools.rexlex.TokenType;
import com.almondtools.rexlex.automaton.GenericAutomaton.EpsilonTransition;
import com.almondto... |
public static GenericAutomaton matchEmpty() {
State s = new State(DefaultTokenType.ACCEPT);
return new GenericAutomaton(s);
}
public static GenericAutomaton matchNothing() {
State s = new State();
return new GenericAutomaton(s);
}
public static GenericAutomaton matchOptional(GenericAutomaton a) {
Stat... | TokenTypeFactory tokenTypes = a0.getTokenTypes(); | 8 |
pasqualesalza/elephant56 | elephant56/src/main/java/it/unisa/elephant56/user/sample/operators/migration/RandomIndividualsMigration.java | [
"public class Pair<FirstElementType, SecondElementType> {\r\n\r\n private FirstElementType firstElement;\r\n private SecondElementType secondElement;\r\n\r\n /**\r\n * Constructs an empty pair.\r\n */\r\n public Pair() {\r\n this.firstElement = null;\r\n this.secondElement = null;\... | import java.util.*;
import it.unisa.elephant56.util.common.Pair;
import org.apache.hadoop.conf.Configuration;
import it.unisa.elephant56.core.common.IndividualWrapper;
import it.unisa.elephant56.core.common.Properties;
import it.unisa.elephant56.user.common.FitnessValue;
import it.unisa.elephant56.user.common.Ind... | package it.unisa.elephant56.user.sample.operators.migration;
/**
* Defines a migration function that randomly assigns the individuals to move.
*
* @param <IndividualType>
* @param <FitnessValueType>
*/
public abstract class RandomIndividualsMigration
<IndividualType extends Individual, Fitn... | public List<Pair<IndividualWrapper<IndividualType, FitnessValueType>, Integer>> assign(
| 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.