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
jiro-aqua/JotaTextEditor
app/src/main/java/jp/sblo/pandora/jota/text/TextView.java
[ "public class JotaTextEditor extends Application {\r\n public static boolean sFroyo = ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO );\r\n public static boolean sHoneycomb = ( Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB );\r\n public static boolean sIceCreamSandwich = ( Build.VERSION.SDK_...
import java.io.IOException; import java.lang.ref.WeakReference; import java.util.ArrayList; import jp.sblo.pandora.jota.JotaTextEditor; import jp.sblo.pandora.jota.KeywordHighlght; import jp.sblo.pandora.jota.R; import jp.sblo.pandora.jota.SettingsActivity; import jp.sblo.pandora.jota.text.UndoBuffer.TextChange; import...
if (password && (mInputType&EditorInfo.TYPE_MASK_CLASS) == EditorInfo.TYPE_CLASS_TEXT) { mInputType = (mInputType & ~(EditorInfo.TYPE_MASK_VARIATION)) | EditorInfo.TYPE_TEXT_VARIATION_PASSWORD; } if (selectallonfocus) { mSelectAllOnFocus ...
KeywordHighlght.refresh();
1
8enet/AppOpsX
app/src/main/java/com/zzzmode/appopsx/ui/main/SettingsActivity.java
[ "public class BaseActivity extends AppCompatActivity {\n\n @Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n LangHelper.updateLanguage(this);\n super.onCreate(savedInstanceState);\n AppCompatDelegate.setDefaultNightMode(SpHelper.getThemeMode(this));\n\n }\n\n @Override\n pro...
import android.annotation.SuppressLint; import android.app.Activity; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.content.Intent; import android.con...
package com.zzzmode.appopsx.ui.main; /** * Created by zl on 2017/1/16. */ public class SettingsActivity extends BaseActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_setting); Toolbar toolbar = f...
getResources().getStringArray(R.array.languages)[LangHelper.getLocalIndex(getContext())]);
3
alaisi/postgres-async-driver
src/main/java/com/github/pgasync/netty/NettyProtocolStream.java
[ "public abstract class PgProtocolStream implements ProtocolStream {\n\n protected final SocketAddress address;\n protected final boolean useSsl;\n protected final Executor futuresExecutor;\n protected final Charset encoding;\n\n private CompletableFuture<? super Message> onResponse;\n private fina...
import com.github.pgasync.PgProtocolStream; import com.github.pgasync.message.Message; import com.github.pgasync.message.backend.SSLHandshake; import com.github.pgasync.message.frontend.SSLRequest; import com.github.pgasync.message.frontend.StartupMessage; import com.github.pgasync.message.frontend.Terminate; import io...
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed u...
private StartupMessage startupWith;
4
pierre/collector
src/test/java/com/ning/metrics/collector/jaxrs/TestEventFilterRequestHandler.java
[ "public interface CollectorConfig\n{\n @Config(\"collector.dfs.block.size\")\n @Default(\"134217728\")\n long getHadoopBlockSize();\n\n @Config(\"collector.hadoop.ugi\")\n @Default(\"nobody,nobody\")\n String getHadoopUgi();\n\n // Whether to forward events to ActiveMQ\n\n @Config(\"collecto...
import org.testng.annotations.Test; import com.google.inject.Inject; import com.ning.metrics.collector.binder.config.CollectorConfig; import com.ning.metrics.collector.endpoint.ParsedRequest; import com.ning.metrics.collector.filtering.Filter; import com.ning.metrics.collector.hadoop.processing.ConfigTestModule; import...
/* * Copyright 2010-2012 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
private abstract static class ParsedRequestFilter implements Filter<ParsedRequest> {}
1
ngageoint/elasticgeo
gt-elasticsearch/src/main/java/mil/nga/giat/data/elasticsearch/ElasticFeatureTypeBuilder.java
[ "public static final String ANALYZED = \"analyzed\";", "public static final String DATE_FORMAT = \"date_format\";", "public static final String FULL_NAME = \"full_name\";", "public static final String GEOMETRY_TYPE = \"geometry_type\";", "public static final String NESTED = \"nested\";", "public enum Elas...
import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import static mil.nga.giat.data.elasticsearch.ElasticConstants.ANALYZED; import static mil.nga.giat.data.elasticsearch.ElasticConstants.DATE_FORMAT; import static mil.nga.giat.data.elasticsearch.ElasticConstants.FULL_NAME; import st...
/* * This file is hereby placed into the Public Domain. This means anyone is * free to do whatever they wish with this file. */ package mil.nga.giat.data.elasticsearch; /** * Builds a feature type based on the attributes defined in the * {@link ElasticLayerConfiguration}. * */ class ElasticFeatureTypeBuilde...
att.getUserData().put(ANALYZED, attribute.getAnalyzed());
0
cluelessjoe/jooq-flyway-typesafe-migration
migrator/src/main/generated-sources/org/jooq/example/migrator/model/v1/Keys.java
[ "@Generated(\n value = {\n \"http://www.jooq.org\",\n \"jOOQ version:3.9.2\",\n \"schema version:null\"\n },\n date = \"2017-05-16T21:33:40.187Z\",\n comments = \"This class is generated by jOOQ\"\n)\n@SuppressWarnings({ \"all\", \"unchecked\", \"rawtypes\" })\npublic class v1_Autho...
import javax.annotation.Generated; import org.jooq.ForeignKey; import org.jooq.UniqueKey; import org.jooq.example.migrator.model.v1.tables.records.v1_AuthorRecord; import org.jooq.example.migrator.model.v1.tables.records.v1_BookRecord; import org.jooq.example.migrator.model.v1.tables.records.v1_SchemaVersionRecord; imp...
/* * This file is generated by jOOQ. */ package org.jooq.example.migrator.model.v1; /** * A class modelling foreign key relationships between tables of the <code>FLYWAY_TEST</code> * schema */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.9.2", "schema version:null" ...
public static final UniqueKey<v1_AuthorRecord> v1_PK_T_AUTHOR = createUniqueKey(v1_Author.v1_AUTHOR, "PK_T_AUTHOR", v1_Author.v1_AUTHOR.v1_ID);
3
fabioCollini/mv2m
demo/src/test/java/it/cosenonjaviste/demomv2m/core/list/NoteListViewModelTest.java
[ "public class TestData {\n\n public static final String ID_1 = \"1\";\n public static final String ID_2 = \"2\";\n public static final String ID_A = \"a\";\n public static final String TITLE_A = \"xyz\";\n public static final String TEXT_A = \"jkl\";\n public static final String NEW_TITLE = \"newT...
import android.databinding.Observable; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.Spy; import org.mockito.runners.MockitoJUnitRunner; import java.util.concurrent.Executo...
/* * Copyright 2015 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 or agre...
@Mock Navigator navigator;
1
igd-geo/mongomvcc
src/test/java/de/fhg/igd/mongomvcc/impl/AbstractMongoDBVDatabaseTest.java
[ "public interface VBranch {\n\t/**\n\t * @return the CID of the branch's head\n\t */\n\tlong getHead();\n\t\n\t/**\n\t * <p>Gets or creates a database collection. Collections have no special\n\t * meaning, they are just used to group objects.</p>\n\t * <p>The collection's state depends on the branch currently check...
import de.fhg.igd.mongomvcc.VCollection; import de.fhg.igd.mongomvcc.VConstants; import de.fhg.igd.mongomvcc.VCursor; import de.fhg.igd.mongomvcc.VDatabase; import de.fhg.igd.mongomvcc.VFactory; import static org.junit.Assert.assertNotNull; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map;...
// This file is part of MongoMVCC. // // Copyright (c) 2012 Fraunhofer IGD // // MongoMVCC is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any l...
protected static final VFactory _factory = new MongoDBVFactory();
5
montimaj/Remouse
app/src/main/java/project/android/net/ClientIOThread.java
[ "public class ConnectionFragment extends Fragment {\n\n private View mView;\n private ListView mListView;\n private TextView mTextView;\n private CustomAdapter mCustomAdapter;\n private ArrayList<ServerInfo> mNetworkList;\n private AlertDialog mAlertDialog;\n private boolean mInitDiscover;\n ...
import android.app.Activity; import android.content.Intent; import android.widget.Toast; import java.io.BufferedReader; import java.io.IOException; import project.android.ConnectionFragment; import project.android.MainActivity; import project.android.security.EKEProvider; import static project.android.ConnectionFragmen...
package project.android.net; /** * Implementation of the <code>java.lang.Runnable</code> for the thread * responsible for client-server interaction. * * <p> * This thread is started by the {@link ConnectionTask#onPostExecute(EKEProvider)} * method. * </p> * * @see project.android.net.ConnectionTas...
ConnectionFragment connectionFragment = (ConnectionFragment) MainActivity.getConnectionFragment();
0
SamuelGjk/GComic
app/src/main/java/moe/yukinoneko/gcomic/module/favorite/FavoriteGridAdapter.java
[ "@Table(\"gcomic_favorite\")\npublic class FavoriteModel {\n\n @PrimaryKey(AssignType.BY_MYSELF)\n public int comicId;\n\n public String comicTitle;\n\n public String comicAuthors;\n\n public String comicCover;\n\n public long favoriteTime;\n\n public FavoriteModel(int comicId, String comicTitl...
import android.content.Context; import android.support.v7.widget.AppCompatTextView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.amulyakhare.textdrawable.TextDrawable; import com.amulyakhare.textdrawable.util.Color...
/* * 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. * ...
ComicDetailsActivity.launchActivityForResult(mContext, comicCover, favorite.comicId, favorite.comicTitle, favorite.comicAuthors, favorite.comicCover, FavoriteActivity.REQUEST_CODE_FAVORITE_COMIC);
2
tagsys/tagbeat
src/main/java/org/tagsys/tagbeat/TagbeatServer.java
[ "public class ChangeFrameSize implements Command{\n\n\tint Q;\n\t\n\tpublic ChangeFrameSize(int Q){\n\t\tthis.Q = Q;\n\t}\n\t\n\t@Override\n\tpublic void execute() {\n\t\tCompressiveReading.instance().changeFrameSize(Q);\n\t}\n\t\n}", "public class ChangeSampleNumber implements Command{\n\n\tint N=5000;\n\t\n\tpu...
import java.awt.Desktop; import java.net.URI; import java.net.URISyntaxException; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.CloseableHttpClient; imp...
package org.tagsys.tagbeat; public class TagbeatServer { private static Gson gson = new Gson(); private static WebSocketClient socketClient; private static Processor processor; public static void main(String[] args) throws URISyntaxException { System.out.println("start tagbeat..."); Spark.port(9001...
processor.addCommmand(new ChangeSampleNumber(Integer.parseInt(NString)));
1
jasonbaldridge/maul
src/main/java/edu/berkeley/nlp/lm/values/UncompressedProbBackoffValueContainer.java
[ "public final class CustomWidthArray implements Serializable\n{\n\n\tpublic int getKeyWidth() {\n\t\treturn keyWidth;\n\t}\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tprivate final static int LOG2_BITS_PER_WORD = 6;\n\n\tprivate final static int BITS_PER_WORD = 1 << LOG2_BITS_PER_WORD;\n\n\tprivate f...
import java.util.List; import edu.berkeley.nlp.lm.array.CustomWidthArray; import edu.berkeley.nlp.lm.array.LongArray; import edu.berkeley.nlp.lm.bits.BitList; import edu.berkeley.nlp.lm.bits.BitStream; import edu.berkeley.nlp.lm.collections.Indexer; import edu.berkeley.nlp.lm.collections.LongToIntHashMap; import edu.be...
package edu.berkeley.nlp.lm.values; public final class UncompressedProbBackoffValueContainer extends RankedValueContainer<ProbBackoffPair> implements ProbBackoffValueContainer { private static final long serialVersionUID = 964277160049236607L; @PrintMemoryCount final long[] probsAndBackoffsForRank; // ugly: we ...
transient LongToIntHashMap countIndexer;
5
trc492/Frc2017FirstSteamWorks
src/team492/CmdVisionGearDeploy.java
[ "public class HalDashboard extends SmartDashboard\n{\n private static final String moduleName = \"HalDashboard\";\n private static final boolean debugEnabled = false;\n private static final boolean tracingEnabled = false;\n private static final TrcDbgTrace.TraceLevel traceLevel = TrcDbgTrace.TraceLevel....
import hallib.HalDashboard; import team492.PixyVision.TargetInfo; import trclib.TrcEvent; import trclib.TrcRobot; import trclib.TrcStateMachine; import trclib.TrcTimer;
/* * Copyright (c) 2017 Titan Robotics Club (http://www.titanrobotics.com) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights ...
private TrcStateMachine<State> sm;
4
lenis0012/LoginSecurity-2
src/main/java/com/lenis0012/bukkit/loginsecurity/modules/storage/LoginSecurityImport.java
[ "public class LoginSecurity extends PluginHolder {\n private static final ExecutorService executorService = Executors.newCachedThreadPool();\n\n /**\n * Get the executor LoginSecurity uses for async processing.\n *\n * @return Executor service.\n */\n public static ExecutorService getExecut...
import com.lenis0012.bukkit.loginsecurity.LoginSecurity; import com.lenis0012.bukkit.loginsecurity.database.InventoryRepository; import com.lenis0012.bukkit.loginsecurity.database.LocationRepository; import com.lenis0012.bukkit.loginsecurity.database.LoginSecurityDatabase; import com.lenis0012.bukkit.loginsecurity.data...
package com.lenis0012.bukkit.loginsecurity.modules.storage; public class LoginSecurityImport implements StorageImport { private final LoginSecurity loginSecurity; private final CommandSender sender; public LoginSecurityImport(LoginSecurity loginSecurity, CommandSender sender) { this.loginSecurit...
final LoginSecurityDatabase datastore = LoginSecurity.getDatastore();
3
JosuaKrause/NBTEditor
src/nbt/gui/NBTEdit.java
[ "public class Chunk {\n\n /**\n * The maximal world height.\n */\n public static final int WORLD_MAX_Y = 256;\n\n private final NBTCompound level;\n\n private final NBTCompound root;\n\n private final File file;\n\n private final ChunkInFilePosition otherPos;\n\n /**\n * Creates a chunk from a given re...
import java.awt.event.ActionEvent; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.text.ParseException; import java.util.List; import java.util.Scanner; import javax.swing.AbstractAction; import javax.swing.Action...
add(new JButton(new AbstractAction("Save") { private static final long serialVersionUID = -7308700550861060140L; @Override public void actionPerformed(final ActionEvent ae) { final File file = getFile(); if(file == null || !canSave()) return; final NBTRecord r = (NBTRecor...
final List<ChunkInFilePosition> coords = mr.getChunks();
1
m-szalik/dbpatch
dbpatch-core/src/test/java/org/jsoftware/dbpatch/command/AbstractDbCommandTest.java
[ "public abstract class AbstractPatch implements Serializable {\n private static final long serialVersionUID = 4178101927323891639L;\n private String name;\n private int statementCount = -1;\n private File file;\n\n public enum DbState {\n COMMITTED, IN_PROGRESS, NOT_AVAILABLE\n }\n\n pub...
import org.apache.commons.io.IOUtils; import org.hsqldb.jdbc.JDBCDriver; import org.jsoftware.dbpatch.config.AbstractPatch; import org.jsoftware.dbpatch.config.ConfigurationEntry; import org.jsoftware.dbpatch.config.EnvSettings; import org.jsoftware.dbpatch.config.Patch; import org.jsoftware.dbpatch.config.PropertiesCo...
package org.jsoftware.dbpatch.command; public abstract class AbstractDbCommandTest { private static final String JDBCURI="jdbc:hsqldb:mem:mymemdb"; protected Connection connection; protected ConfigurationEntry configurationEntry; private File dir; private final static DbManagerCredentialsCallback...
Constructor<T> constructor = cmdClazz.getConstructor(EnvSettings.class);
1
concordion/cubano
cubano-concordion/src/main/java/org/concordion/cubano/framework/ConcordionBase.java
[ "public interface FixtureListener {\n void beforeExample(Class<? extends ConcordionBase> aClass, String exampleName, Logger logger);\n\n void afterExample(Class<? extends ConcordionBase> aClass, String exampleName, Logger logger);\n\n void beforeSpecification(Class<? extends ConcordionBase> aClass, Logger ...
import org.apache.commons.lang3.tuple.ImmutablePair; import org.concordion.api.*; import org.concordion.api.option.ConcordionOptions; import org.concordion.api.option.MarkdownExtensions; import org.concordion.cubano.framework.fixture.FixtureListener; import org.concordion.cubano.framework.fixture.FixtureLogger; import ...
package org.concordion.cubano.framework; /** * Basic Concordion Fixture for inheritance by index fixtures with no tests. * <p> * Supports the automatic closing of {@link Closeable} resources at either the {@link ResourceScope#SPECIFICATION} * or {@link ResourceScope#SUITE} level. After calling {@link #registerCl...
public abstract class ConcordionBase implements ResourceRegistry {
3
BurstProject/burstcoin
src/java/nxt/http/CreateATProgram.java
[ "public final class Account {\n\n public static enum Event {\n BALANCE, UNCONFIRMED_BALANCE, ASSET_BALANCE, UNCONFIRMED_ASSET_BALANCE,\n LEASE_SCHEDULED, LEASE_STARTED, LEASE_ENDED\n }\n\n public static class AccountAsset {\n\n private final long accountId;\n private final long ...
import static nxt.http.JSONResponses.INCORRECT_AUTOMATED_TRANSACTION_NAME; import static nxt.http.JSONResponses.INCORRECT_AUTOMATED_TRANSACTION_NAME_LENGTH; import static nxt.http.JSONResponses.INCORRECT_AUTOMATED_TRANSACTION_DESCRIPTION; import static nxt.http.JSONResponses.INCORRECT_AUTOMATED_TRANSACTION_DESCRIPTION_...
package nxt.http; public final class CreateATProgram extends CreateTransaction { static final CreateATProgram instance = new CreateATProgram(); private CreateATProgram() { super (new APITag[] {APITag.AT, APITag.CREATE_TRANSACTION}, "name", "description", "creationBytes", "code", "data", "dpages", "cspages",...
creation.putShort(AT_Constants.getInstance().AT_VERSION(Nxt.getBlockchain().getHeight()));
3
Labs64/NetLicensingClient-java
NetLicensingClient/src/main/java/com/labs64/netlicensing/service/LicenseService.java
[ "public final class Constants {\n\n private Constants() {\n }\n\n // CHECKSTYLE:OFF\n\n public static final String ID = \"id\";\n public static final String ACTIVE = \"active\";\n public static final String NUMBER = \"number\";\n public static final String NAME = \"name\";\n public static fi...
import java.util.HashMap; import java.util.Map; import javax.ws.rs.core.Form; import org.apache.commons.lang3.StringUtils; import com.labs64.netlicensing.domain.Constants; import com.labs64.netlicensing.domain.entity.License; import com.labs64.netlicensing.domain.vo.Context; import com.labs64.netlicensing.domain.vo.Pag...
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
public static Page<License> list(final Context context, final String filter) throws NetLicensingException {
3
xiaolongzuo/personal-blog-webapp
personal-blog-webapp-site/src/main/java/com/zuoxiaolong/dao/ArticleDao.java
[ "public class HttpClient {\n\n private static final Logger log = LoggerFactory.getLogger(HttpClient.class);\n\n private HttpClient() {}\n\n private static final String URL = \"http://127.0.0.1:8888\";\n\n private static Map<String, Object> map(String[] keys, Object... values) {\n if (keys == null...
import java.sql.*; import java.text.SimpleDateFormat; import java.util.*; import java.util.Date; import com.zuoxiaolong.client.HttpClient; import com.zuoxiaolong.client.HttpUriEnums; import com.zuoxiaolong.freemarker.ArticleHelper; import com.zuoxiaolong.model.Status; import com.zuoxiaolong.model.Type; import com.zuoxi...
public List<Map<String, String>> getArticles(final String orderColumn, final ViewMode viewMode) { return getArticles(orderColumn, null, null, viewMode); } public List<Map<String, String>> getArticles(final String orderColumn, final Type type, final ViewMode viewMode) { return getArticles(or...
article.put("url", ArticleHelper.generateDynamicPath(Integer.valueOf(id)));
2
bodar/yatspec
src/com/googlecode/yatspec/rendering/wiki/WikiResultRenderer.java
[ "public interface SpecResultListener {\n void complete(File yatspecOutputDir, Result result) throws Exception;\n}", "public class Files {\n\n public static void overwrite(File output, String content) throws Exception {\n output.delete();\n output.getParentFile().mkdirs();\n write(conten...
import com.googlecode.funclate.stringtemplate.EnhancedStringTemplateGroup; import com.googlecode.totallylazy.Callable1; import com.googlecode.totallylazy.Pair; import com.googlecode.totallylazy.Predicate; import com.googlecode.yatspec.junit.Notes; import com.googlecode.yatspec.junit.SpecResultListener; import com.googl...
package com.googlecode.yatspec.rendering.wiki; public class WikiResultRenderer implements SpecResultListener { private final List<Pair<Predicate, Renderer>> customRenderers = new ArrayList<Pair<Predicate, Renderer>>(); @Override
public void complete(File yatspecOutputDir, Result result) throws Exception {
5
vbier/habpanelviewer
app/src/main/java/de/vier_bier/habpanelviewer/command/InternalCommandHandler.java
[ "public final class Constants {\n /** activity request related constants **/\n public static final int REQUEST_DEVICE_ADMIN = 101;\n public static final int REQUEST_PICK_APPLICATION = 102;\n public static final int REQUEST_MEDIA_PROJECTION = 103;\n\n /** permission related constants **/\n public s...
import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Bitmap; import android.preference.PreferenceManager; import android.util.Log; import org.greenrobot.eventbus.EventBus; import java.io.ByteArrayOutputStream; import java.util.regex.Matcher; import java.util.regex.Pattern; im...
package de.vier_bier.habpanelviewer.command; /** * Handler for RESTART, UPDATE_ITEMS, ENABLE_MOTION_DETECTION, DISABLE_MOTION_DETECTION, START_APP, * CAPTURE_SCREEN commands. */ public class InternalCommandHandler implements ICommandHandler { private static final String TAG = "HPV-InternalCommandHa"; p...
private final IMotionDetector mMotionDetector;
5
lmazuel/onagui
src/main/java/fr/onagui/alignment/io/EuzenatRDFImpl.java
[ "public class Alignment<ONTORES1, ONTORES2> {\n\n\t// Les deux ontologies mise en jeu dans ce mapping\n\tprivate OntoContainer<ONTORES1> onto1 = null;\n\tprivate OntoContainer<ONTORES2> onto2 = null;\n\n\t// La liste ordonnée de tous les mappings\n\tprivate SortedSet<Mapping<ONTORES1, ONTORES2>> mapping = null;\n\n...
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.text.SimpleDateFormat; import java.util.Map; import java.util.TreeMap; import org.eclipse.rdf4j.mod...
package fr.onagui.alignment.io; public class EuzenatRDFImpl implements IOAlignment { // Liste des namespaces public static final String ALIGN_NS = "http://knowledgeweb.semanticweb.org/heterogeneity/alignment#"; public static final String DCTERMS_NS = "http://purl.org/dc/terms/"; // Type et propriété conforme ...
MAPPING_TYPE type = MAPPING_TYPE
2
fluxroot/pulse
src/main/java/com/fluxchess/pulse/Position.java
[ "static int next(long bitboard) {\n\treturn toX88Square(numberOfTrailingZeros(bitboard));\n}", "static int size(long bitboard) {\n\treturn bitCount(bitboard);\n}", "public final class Castling {\n\n\tpublic static final int WHITE_KINGSIDE = 1; // 1 << 0\n\tpublic static final int WHITE_QUEENSIDE = 1 << 1;\n\tpu...
import com.fluxchess.pulse.model.*; import java.security.SecureRandom; import static com.fluxchess.pulse.Bitboard.next; import static com.fluxchess.pulse.Bitboard.size; import static com.fluxchess.pulse.model.Castling.*; import static com.fluxchess.pulse.model.Color.*; import static com.fluxchess.pulse.model.Depth.MAX_...
/* * Copyright 2013-2021 Phokham Nonava * * Use of this source code is governed by the MIT license that can be * found in the LICENSE file. */ package com.fluxchess.pulse; final class Position { private static final int MAX_MOVES = MAX_PLY + 1024; final int[] board = new int[Square.VALUES_LENGTH];
final long[][] pieces = new long[Color.values.length][PieceType.values.length];
7
EndlessCodeGroup/RPGInventory
src/main/java/ru/endlesscode/rpginventory/api/PetAPI.java
[ "public class InventoryManager {\n static final String TITLE = RPGInventory.getLanguage().getMessage(\"title\");\n private static final Map<UUID, PlayerWrapper> INVENTORIES = new HashMap<>();\n\n private static ItemStack FILL_SLOT = null;\n private static Reporter reporter;\n\n private InventoryManag...
import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.Nullable; import ru.endlesscode.rpginventory.inventory.InventoryManager; import ru.endlesscode.rpginventory.inventory.PlayerWrapper; import ru.endlesscode.rpginventory.pet.PetManager; import ru.endlesscode.rpginvent...
/* * This file is part of RPGInventory. * Copyright (C) 2015-2017 Osip Fatkullin * * RPGInventory 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) a...
return ItemUtils.isEmpty(petItem) ? null : petItem;
4
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/effects/Transitions.java
[ "public static Transform getInstance(Element e) {\n return getInstance(e, null);\n}", "public static boolean isTransform(String propName) {\n return transformRegex.test(propName);\n}", "public static final String transform = vendorProperty(\"transform\");", "public class GQuery implements Lazy<GQuery, LazyG...
import static com.google.gwt.query.client.plugins.effects.Transform.transform; import com.google.gwt.dom.client.Element; import com.google.gwt.query.client.Function; import com.google.gwt.query.client.GQuery; import com.google.gwt.query.client.Properties; import com.google.gwt.query.client.js.JsUtils; import com.google...
/* * Copyright 2014, The gwtquery team. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
return isEmpty() ? "" : getInstance(get(0), null).toString();
0
annefried/sitent
de.uni-saarland.coli.sitent/src/main/java/sitent/tests/HumanUpperBound.java
[ "public class EvaluationUtils {\n\n\tstatic Logger log = Logger.getLogger(EvaluationUtils.class.getName());\n\n\t/**\n\t * Given a confusion matrix represented as a nested map, outputs a confusion\n\t * matrix, accuracy and per-class statistics for precision, recall and\n\t * F-measure, as well as macro-averages.\n...
import static org.apache.uima.fit.factory.CollectionReaderFactory.createReader; import static org.apache.uima.fit.pipeline.SimplePipeline.runPipeline; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; impor...
package sitent.tests; public class HumanUpperBound extends JCasAnnotator_ImplBase { static Logger log = Logger.getLogger(HumanUpperBound.class.getName()); /*** * We compute an upper bound for system performance by iterating over all * clauses: for each pair of human annotators, two entries are added to a ...
SitEntUtils.incrementMapForKey(goldStandardCounts, sitLabels1.iterator().next());
6
ase34/flyingblocksapi
natives-v1_6_R3/src/main/java/de/ase34/flyingblocksapi/natives/v1_6_R3/NativesAPI.java
[ "public abstract class FlyingBlock {\n\n /**\n * Default age for the horse.\n */\n public static int AGE = -4077000;\n /**\n * Default height offset for the skull.\n */\n public static double OFFSET = 100;\n /**\n * Default tracker update interval in ticks.\n */\n public st...
import java.util.ArrayList; import java.util.List; import org.bukkit.World; import org.bukkit.craftbukkit.v1_6_R3.CraftWorld; import org.bukkit.entity.Entity; import de.ase34.flyingblocksapi.FlyingBlock; import de.ase34.flyingblocksapi.natives.v1_6_R3.entities.CustomFallingBlock; import de.ase34.flyingblocksapi.natives...
package de.ase34.flyingblocksapi.natives.v1_6_R3; public class NativesAPI extends de.ase34.flyingblocksapi.natives.api.NativesAPI { @Override public List<Entity> removeFlyingBlocks(World world) { ArrayList<Entity> entities = new ArrayList<Entity>(); net.minecraft.server.v1_6_R3.World nmswor...
if (entity instanceof CustomFallingBlock) {
1
redomar/JavaGame
src/com/redomar/game/net/GameServer.java
[ "public class Game extends Canvas implements Runnable {\n\n\t// Setting the size and name of the frame/canvas\n\tprivate static final long serialVersionUID = 1L;\n\tprivate static final String game_Version = \"v1.8.5 Alpha\";\n\tprivate static final int WIDTH = 160;\n\tprivate static final int HEIGHT = (WIDTH / 3 *...
import com.redomar.game.Game; import com.redomar.game.entities.PlayerMP; import com.redomar.game.net.packets.Packet; import com.redomar.game.net.packets.Packet.PacketTypes; import com.redomar.game.net.packets.Packet00Login; import com.redomar.game.net.packets.Packet01Disconnect; import com.redomar.game.net.packets.Pack...
package com.redomar.game.net; public class GameServer extends Thread { private DatagramSocket socket; private Game game; private List<PlayerMP> connectedPlayers = new ArrayList<PlayerMP>();
private Printing print = new Printing();
8
vsigler/ActiveAndroid-Validation
src/test/java/cz/sigler/android/aavalidation/wrapper/ModelSupportWrapperTest.java
[ "public class ModelSupportFactory {\n\n\t/**\n\t * Creates a new instance of the model and wraps the validating layer around it.\n\t *\n\t * @param <T>\n\t *\t\t\t\t\tsubclass of Model\n\t * @param modelClass\n\t *\t\t\t\t\tmodel class\n\t * @return wrapped model instance\n\t */\n\tpublic static <T extends Model> I...
import android.content.ContentValues; import android.database.Cursor; import static org.mockito.Mockito.*; import static org.junit.Assert.*; import com.activeandroid.Model; import com.activeandroid.annotation.Column; import com.activeandroid.util.SQLiteUtils; import cz.sigler.android.aavalidation.ModelSupportFactory; i...
/* * Copyright (C) 2013 Vojtech Sigler. * * 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 a...
IModelSupport<TestModel> support = ModelSupportFactory.wrapModel(model);
0
eckig/graph-editor
core/src/main/java/de/tesis/dynaware/grapheditor/core/skins/defaults/DefaultNodeSkin.java
[ "public abstract class GConnectorSkin extends GSkin<GConnector> {\n\n /**\n * Creates a new {@link GConnectorSkin}.\n *\n * @param connector the {@link GConnector} represented by the skin\n */\n public GConnectorSkin(final GConnector connector) {\n super(connector);\n }\n\n /**\n ...
import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import de.tesis.dynaware.grapheditor.GConnectorSkin; import de.tesis.dynaware.grapheditor.GNodeSkin; import de.tesis.dynaware.grapheditor.core.connectors.DefaultConnectorTypes; import de.tesis.dynaware.graphedito...
/* * Copyright (C) 2005 - 2014 by TESIS DYNAware GmbH */ package de.tesis.dynaware.grapheditor.core.skins.defaults; /** * The default node skin. Uses a {@link ResizableBox}. * * <p> * If a node uses this skin its connectors must have one of the 8 types defined in {@link DefaultConnectorTypes}. If a * connect...
for (final GConnector connector : getItem().getConnectors())
3
mengdd/TodoRealm
app/src/main/java/com/ddmeng/todorealm/home/viewholder/HomeListViewHolder.java
[ "public class Task extends RealmObject {\n @PrimaryKey\n private long id;\n @Required\n private String title;\n private boolean isDone;\n private long listId;\n private long createdTime;\n private String note;\n\n public long getId() {\n return id;\n }\n\n public void setId(l...
import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.TextView; import com.ddmeng.todorealm.R; import com.ddmeng.todorealm.data.models.Task; import com.ddmeng.todorealm.data.models.TodoList; import com.ddmeng.todorealm.home.HomeListAdapter; import com.ddmeng.todorealm.ui.multise...
package com.ddmeng.todorealm.home.viewholder; public class HomeListViewHolder extends RecyclerView.ViewHolder implements SelectableHolder { @BindView(R.id.title) TextView titleTextView; @BindView(R.id.number) TextView numberTextView; private HomeListAdapter.HomeListCallback callback; privat...
LogUtils.d("getItemId: " + getItemId());
5
idega/is.idega.idegaweb.egov.bpm
src/java/is/idega/idegaweb/egov/bpm/cases/exe/CasesBPMProcessDefinitionW.java
[ "public interface AppSupportsManager {\n\t\n\t@Transactional(readOnly = true)\n\tpublic abstract List<String> getRolesCanStartProcess();\n\t\n\t@Transactional\n\tpublic abstract void updateRolesCanStartProcess(List<String> rolesKeys);\n\t\n\tpublic abstract void setProcessName(String processName);\n\t\n\tpublic abs...
import is.idega.idegaweb.egov.application.business.ApplicationBusiness; import is.idega.idegaweb.egov.application.data.Application; import is.idega.idegaweb.egov.application.data.ApplicationHome; import is.idega.idegaweb.egov.bpm.application.AppSupportsManager; import is.idega.idegaweb.egov.bpm.application.AppSupportsM...
package is.idega.idegaweb.egov.bpm.cases.exe; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.52 $ Last modified: $Date: 2009/06/30 13:17:35 $ by $Author: valdas $ */ @Scope(BeanDefinition.SCOPE_PROTOTYPE) @Service(CasesBPMProcessDefinitionW.SPRING_BEAN_IDENTIFIER)...
private CasesBPMDAO casesBPMDAO;
7
firepick1/FireBOM
src/main/java/org/firepick/firebom/bom/BOMHtmlPrinter.java
[ "public class Main {\n public static void main(String[] args) throws Exception {\n mainStream(args, System.out);\n }\n\n public static void mainStream(String[] args, PrintStream printStream) throws Exception {\n BOMFactory bomFactory = new BOMFactory();\n\n try {\n if (!pars...
import org.firepick.firebom.Main; import org.firepick.relation.IRelation; import org.firepick.relation.IRow; import org.firepick.relation.IRowVisitor; import org.firepick.relation.RelationPrinter; import java.io.*;
package org.firepick.firebom.bom; /* BOMHtmlPrinter.java Copyright (C) 2013 Karl Lew <karl@firepick.org>. All rights reserved. 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 ht...
InputStream is = Main.class.getResourceAsStream("/firebom.css");
0
jimmc/HapiPodcastJ
src/info/xuluan/podcast/provider/FeedItem.java
[ "public class ChannelActivity extends PodcastBaseActivity implements PodcastTab {\n\t\n\tprivate static final int MENU_ITEM_DETAILS = Menu.FIRST + 9;\n\tprivate static final int MENU_ITEM_START_DOWNLOAD = Menu.FIRST + 10;\n\tprivate static final int MENU_ITEM_START_PLAY = Menu.FIRST + 11;\n\tprivate static final in...
import info.xuluan.podcast.ChannelActivity; import info.xuluan.podcast.PlayerActivity; import info.xuluan.podcast.utils.FileUtils; import info.xuluan.podcast.utils.Log; import info.xuluan.podcast.utils.SDCardMgr; import info.xuluan.podcast.utils.ZipExporter; import java.io.BufferedOutputStream; import java.io.Fi...
log.debug("item update start"); try { ContentValues cv = new ContentValues(); if (pathname != null) cv.put(ItemColumns.PATHNAME, pathname); if (offset >= 0) cv.put(ItemColumns.OFFSET, offset); if (status >= 0) cv.put(ItemColumns.STATUS, status); if (failcount >= 0) cv.put(...
filename = SDCardMgr.getExportDir()+"/"+filename;
4
ground-context/ground
modules/postgres/app/edu/berkeley/ground/postgres/dao/usage/PostgresLineageGraphDao.java
[ "public class GroundException extends Exception {\n\n private static final long serialVersionUID = 1L;\n\n private final String message;\n private final ExceptionType exceptionType;\n\n public enum ExceptionType {\n DB(\"Database Exception:\", \"%s\"),\n ITEM_NOT_FOUND(\"GroundItemNotFoundException\", \"N...
import edu.berkeley.ground.common.dao.usage.LineageGraphDao; import edu.berkeley.ground.common.exception.GroundException; import edu.berkeley.ground.common.model.usage.LineageGraph; import edu.berkeley.ground.common.util.IdGenerator; import edu.berkeley.ground.postgres.dao.SqlConstants; import edu.berkeley.ground.postg...
/** * 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 * <p> * <p>http://www.apache.org/licenses/LICENSE-2.0 * <p> * <p>Unless required by applicable law or agreed to in writing, software dist...
statements.append(String.format(SqlConstants.INSERT_GENERIC_ITEM_WITH_NAME, "lineage_graph", newLineageGraph.getId(),
2
winterDroid/android-drawable-importer-intellij-plugin
src/main/java/de/mprengemann/intellij/plugin/androidicons/controllers/settings/ISettingsController.java
[ "public interface IController<T> {\n void addObserver(T observer);\n\n void removeObserver(T observer);\n\n void tearDown();\n}", "public enum Destination {\n DRAWABLE(\"drawable\"),\n MIPMAP(\"mipmap\");\n\n\n private final String folderName;\n\n Destination(String folderName) {\n thi...
import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import de.mprengemann.intellij.plugin.androidicons.controllers.IController; import de.mprengemann.intellij.plugin.androidicons.images.ResizeAlgorithm; import de.mprengemann.intellij.plugin.androidicons.model.Destination; import de...
package de.mprengemann.intellij.plugin.androidicons.controllers.settings; public interface ISettingsController extends IController<SettingsObserver> { void saveResRootForProject(String fileUrl); VirtualFile getResourceRoot(); String getResourceRootPath(); String getLastImageFolder(); void saveLa...
void saveResolutions(Set<Resolution> resolutions);
4
flipkart-incubator/hydra
hydra-dispatcher/src/main/java/com/flipkart/hydra/dispatcher/DefaultDispatcher.java
[ "public interface Composer {\n\n public Object compose(Map<String, Object> values) throws ComposerEvaluationException;\n\n public List<String> getDependencies();\n}", "public class DefaultComposer implements Composer {\n\n private final Object context;\n private final List<String> dependencies;\n\n ...
import com.flipkart.hydra.composer.Composer; import com.flipkart.hydra.composer.DefaultComposer; import com.flipkart.hydra.composer.exception.ComposerEvaluationException; import com.flipkart.hydra.composer.exception.ComposerInstantiationException; import com.flipkart.hydra.dispatcher.exception.DispatchFailedException; ...
/* * Copyright 2015 Flipkart Internet, pvt ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
} catch (ComposerInstantiationException e) {
3
mp911de/spinach
src/test/java/biz/paluch/spinach/SslTest.java
[ "public static String host() {\n return System.getProperty(\"host\", \"localhost\");\n}", "public static int sslPort() {\n return Integer.valueOf(System.getProperty(\"sslport\", \"7443\"));\n}", "public class DefaultDisqueClient {\n\n public final static DefaultDisqueClient instance = new DefaultDisque...
import com.lambdaworks.redis.ClientOptions; import com.lambdaworks.redis.JavaRuntime; import com.lambdaworks.redis.RedisConnectionException; import com.lambdaworks.redis.resource.ClientResources; import static biz.paluch.spinach.TestSettings.host; import static biz.paluch.spinach.TestSettings.sslPort; import static org...
/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
FastShutdown.shutdown(disqueClient);
4
danielflower/app-runner
src/test/java/com/danielflower/apprunner/web/WebServerTest.java
[ "public class AppEstate {\n public static final Logger log = LoggerFactory.getLogger(AppEstate.class);\n\n private final List<AppDescription> managers = new ArrayList<>();\n private final ProxyMap proxyMap;\n private final FileSandbox fileSandbox;\n private final List<AppChangedListener> appAddedList...
import com.danielflower.apprunner.AppEstate; import com.danielflower.apprunner.FileSandbox; import com.danielflower.apprunner.mgmt.SystemInfo; import com.danielflower.apprunner.runners.AppRunnerFactoryProvider; import com.danielflower.apprunner.web.v1.AppResource; import com.danielflower.apprunner.web.v1.SystemResource...
package com.danielflower.apprunner.web; public class WebServerTest { private static final int PROXY_TIMEOUT = 3000; private HttpClient client; private WebServer webServer; private ProxyMap proxyMap = new ProxyMap(); private TestServer appServer; private String webServerUrl; @Before ...
new SystemResource(systemInfo, new AtomicBoolean(true), new ArrayList<>(), null), new AppResource(estate, systemInfo, fileSandbox()), PROXY_TIMEOUT, PROXY_TIMEOUT, "apprunner", 500 * 1024 * 1024);
5
paolodongilli/SASAbus
src/it/sasabz/android/sasabus/classes/services/CheckUpdate.java
[ "public class CheckDatabaseActivity extends Activity {\r\n\r\n\tpublic final static int DOWNLOAD_SUCCESS_DIALOG = 0;\r\n\tpublic final static int DOWNLOAD_ERROR_DIALOG = 1;\r\n\tpublic final static int MD5_ERROR_DIALOG = 2;\r\n\tpublic final static int NO_NETWORK_CONNECTION = 3;\r\n\tpublic final static int NO_DB_U...
import java.io.File; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; import it.sasabz.android.sasabus.CheckDatabaseActivity; import it.sasabz.android.sasabus.R; import it.sasabz.android.sasabus.SASAbus; import it.sasabz.and...
package it.sasabz.android.sasabus.classes.services; public class CheckUpdate extends AsyncTask<Void, String, Long> { private final OnlineSearchFragment activity; private final String TAG = "CheckUpdate"; public CheckUpdate(OnlineSearchFragment activity) { super(); this.activity = activity; } @Override...
end = Config.getEndDate();
2
contentful/discovery-app-android
app/src/main/java/discovery/contentful/preview/EntryListFragment.java
[ "public class AssetPreviewActivity extends CFListActivity {\n private AssetInfoAdapter adapter;\n private CDAAsset asset;\n\n @Override protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n // Extract arguments from Intent\n asset = (CDAAsset) getIntent().getSeri...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.widget.AdapterView; import discovery.contentful.activities.AssetPreviewActivity; import discovery.contentful.activities.EntryActivity; import discovery.contentful.activities.MapA...
package discovery.contentful.preview; public class EntryListFragment extends CFListFragment { private CDAEntry entry; private CDAContentType contentType; private EntryListAdapter adapter; private Map<String, CDAField> contentTypesFields; private Map<String, CDAContentType> contentTypesMap; public static ...
b.putSerializable(IntentConsts.EXTRA_ENTRY, entry);
7
melloc/roguelike
engine/src/main/java/edu/brown/cs/roguelike/engine/game/AnnounceLayer.java
[ "public final class Vec2i implements Serializable {\r\n\tprivate static final long serialVersionUID = 5659632794862666943L;\r\n\t\r\n\t/**\r\n\t * Since {@link Vec2i} instances are immutable, their x and y fields may be accessed without getters.\r\n\t */\r\n\tpublic final int x, y;\r\n\t\r\n\t/**\r\n\t * Creates a ...
import java.util.ArrayList; import com.googlecode.lanterna.input.Key; import com.googlecode.lanterna.input.Key.Kind; import cs195n.Vec2i; import edu.brown.cs.roguelike.engine.events.GameAction; import edu.brown.cs.roguelike.engine.graphics.Application; import edu.brown.cs.roguelike.engine.graphics.Layer; import edu.bro...
package edu.brown.cs.roguelike.engine.game; public class AnnounceLayer implements Layer { private final static int NUM_LINES = 2; private ArrayList<String> announcements; private Application app; private boolean firstPage; public AnnounceLayer(Application app, ArrayList<String> announcements) { this.app =...
public void doDraw(Section s) {
4
PunchThrough/bean-sdk-android
sdk/src/androidTest/java/com/punchthrough/bean/sdk/TestBeanFirmwareUpdate.java
[ "public class ImageParsingException extends Exception {\n public ImageParsingException(String detailMessage) {\n super(detailMessage);\n }\n}", "public class OADProfile extends BaseProfile {\n /**\n * Custom OAD Profile for LightBlue Bean devices.\n *\n * This class encapsulates data a...
import android.test.suitebuilder.annotation.Suppress; import android.util.Log; import com.punchthrough.bean.sdk.internal.exception.ImageParsingException; import com.punchthrough.bean.sdk.internal.upload.firmware.OADProfile; import com.punchthrough.bean.sdk.internal.upload.firmware.OADState; import com.punchthrough.bean...
package com.punchthrough.bean.sdk; public class TestBeanFirmwareUpdate extends BeanTestCase { private final String TAG = "TestBeanFirmwareUpdate"; private final int FW_TEST_MAX_DURATION = 5; // Minutes private final boolean FORCE_UPDATE = true; private Bean bean;
private OADProfile.OADApproval oadApproval;
1
jiacai2050/JCScheme
src/main/java/net/liujiacai/jcscheme/keyword/If.java
[ "public class JCConstants {\n\t\t\n\tpublic static final String START_TOKEN = \"(\";\n\tpublic static final String END_TOKEN = \")\";\n\n // bool functions\n public static final String AND = \"and\";\n public static final String OR = \"or\";\n public static final String NOT = \"not\";\n\n // number f...
import net.liujiacai.jcscheme.util.JCConstants; import net.liujiacai.jcscheme.JCExpression; import net.liujiacai.jcscheme.JCEnvironment; import net.liujiacai.jcscheme.exception.IllegalExpressionException; import net.liujiacai.jcscheme.type.JCBool; import net.liujiacai.jcscheme.type.JCObject; import java.util.List;
package net.liujiacai.jcscheme.keyword; public class If { public static boolean isIf(JCExpression exp) { List<JCExpression> children = exp.getChildren(); if(children.size() > 0) {
if (children.get(0).getValue().equals(JCConstants.IF)) {
0
iChun/Hats
src/main/java/me/ichun/mods/hats/client/core/EventHandlerClient.java
[ "@OnlyIn(Dist.CLIENT)\n//Most of this \"stolen\" from iChunUtil ClientEntityTracker\npublic class EntityDummy extends EntityTracker// iChunUtil's client entity tracker\n{\n public EntityDummy(EntityType<?> entityTypeIn, World worldIn, @Nonnull Entity parent)\n {\n super(entityTypeIn, worldIn);\n ...
import me.ichun.mods.hats.client.entity.EntityDummy; import me.ichun.mods.hats.client.gui.WorkspaceHats; import me.ichun.mods.hats.client.layer.LayerHat; import me.ichun.mods.hats.client.model.ModelRendererDragonHook; import me.ichun.mods.hats.client.toast.Toast; import me.ichun.mods.hats.common.Hats; import me.ichun.m...
package me.ichun.mods.hats.client.core; public class EventHandlerClient { public KeyBind keyBindHats; public boolean serverHasMod; public int renderCount; public ArrayList<Integer> requestedHats = new ArrayList<>(); public HatsSavedData.PlayerHatData hatsInventory; public EntityTracker rend...
Hats.channel.sendToServer(new PacketRequestEntityHatDetails(requestedHats.toArray(new Integer[0])));
7
EvilBT/HDImageView
library/src/main/java/xyz/zpayh/hdimage/datasource/interceptor/NetworkInterceptor.java
[ "public interface Interceptor {\n BitmapRegionDecoder intercept(Chain chain) throws IOException;\n\n interface Chain {\n\n Uri uri();\n\n BitmapRegionDecoder chain(Uri uri) throws IOException;\n }\n}", "public final class DiskLruCache implements Closeable {\n static final String JOURNAL_...
import android.content.Context; import android.graphics.BitmapRegionDecoder; import android.net.Uri; import androidx.annotation.CheckResult; import android.util.Log; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; ...
/* * * * Copyright 2017 陈志鹏 * * * * 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 applic...
private DiskLruCache mHttpDiskCache;
1
Rai220/Telephoto
app/src/main/java/com/rai220/securityalarmbot/commands/MDSensitivityCommand.java
[ "public class BotService extends Service implements MotionDetectorController.MotionDetectorListener, IStartService {\n public static final String TELEPHOTO_SERVICE_STOPPED = \"TELEPHOTO_SERVICE_STOPPED\";\n\n private TelegramService telegramService;\n private BatteryReceiver batteryReceiver;\n private S...
import com.pengrad.telegrambot.model.Message; import com.rai220.securityalarmbot.BotService; import com.rai220.securityalarmbot.R; import com.rai220.securityalarmbot.commands.types.SensitivityType; import com.rai220.securityalarmbot.prefs.Prefs; import com.rai220.securityalarmbot.prefs.PrefsController; import com.rai22...
package com.rai220.securityalarmbot.commands; /** * */ public class MDSensitivityCommand extends AbstractCommand { public MDSensitivityCommand(BotService service) { super(service); } @Override public String getCommand() { return "/md_sensitivity"; } @Override public S...
final SensitivityType sensType = SensitivityType.getByName(message.text());
1
ykameshrao/spring-mvc-angular-js-hibernate-bootstrap-java-single-page-jwt-auth-rest-api-webapp-framework
src/main/java/yourwebproject2/controller/JobController.java
[ "@JsonInclude(JsonInclude.Include.NON_NULL)\npublic class APIResponse {\n public static final String API_RESPONSE = \"apiResponse\";\n Object result;\n String time;\n long code;\n\n public static class ExceptionAPIResponse extends APIResponse {\n Object details;\n\n public Object getDet...
import yourwebproject2.framework.api.APIResponse; import yourwebproject2.framework.controller.BaseController; import yourwebproject2.model.dto.JobDTO; import yourwebproject2.model.entity.Category; import yourwebproject2.model.entity.Job; import yourwebproject2.service.CategoryService; import yourwebproject2.service.Job...
package yourwebproject2.controller; /** * Job submission and status APIs * * Created by Y.Kamesh on 8/2/2015. */ @Controller @RequestMapping("job") public class JobController extends BaseController { private static Logger LOG = LoggerFactory.getLogger(JobController.class); @Autowired private JobServ...
APIResponse submitJob(@RequestBody JobDTO jobDTO) throws Exception {
0
mjuhasz/BDSup2Sub
src/main/java/bdsup2sub/supstream/bd/SupBD.java
[ "public class Bitmap {\n\n private static final Logger logger = Logger.getInstance();\n\n private final int width;\n private final int height;\n private final byte buffer[];\n\n public Bitmap(int width, int height) {\n this.width = width;\n this.height = height;\n this.buffer = n...
import bdsup2sub.bitmap.Bitmap; import bdsup2sub.bitmap.Palette; import bdsup2sub.core.*; import bdsup2sub.supstream.*; import bdsup2sub.tools.FileBuffer; import bdsup2sub.tools.FileBufferException; import bdsup2sub.utils.ToolBox; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.List;
/* * Copyright 2014 Volker Oth (0xdeadbeef) / Miklos Juhasz (mjuhasz) * * 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 req...
private Palette palette;
1
SynBioDex/SBOLDesigner
src/main/java/edu/utah/ece/async/sboldesigner/sbol/editor/dialog/OldInputDialog.java
[ "public class CharSequenceUtil {\r\n\tprivate CharSequenceUtil() {}\r\n\t\r\n\tpublic static CharSequence shorten(final CharSequence seq, final int maxLength) {\r\n\t\tint length = seq.length();\r\n\t\tif (length < maxLength) {\r\n\t\t\treturn seq;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tint endLength = maxLength / 3;\r\n\...
import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import javax.swing.BorderFactory; import javax.swing...
registrySelection = new JComboBox(Iterables.toArray(registries, Registry.class)); if (registries.size() > 0) { registrySelection.setSelectedIndex(selectedRegistry); } registrySelection.addActionListener(actionListener); registrySelection.setRenderer(registryRenderer); builder.add("Registry...
protected JPanel createTablePanel(AbstractListTableModel<?> tableModel, String title) {
3
ThreeTen/threetenbp
src/test/java/org/threeten/bp/TestZonedDateTime.java
[ "public final class DateTimeFormatter {\n\n //-----------------------------------------------------------------------\n /**\n * Returns the ISO date formatter that prints/parses a date without an offset,\n * such as '2011-12-03'.\n * <p>\n * This returns an immutable formatter capable of print...
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; import static org.threeten.bp.Month.JANUARY; import static org.threeten.bp.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_MONTH; import static org.threeten.bp.temporal.ChronoField.ALIGNED_DAY_OF_WEEK_IN_YEAR; import static org.threet...
assertEquals(test.getNano(), 0); } //----------------------------------------------------------------------- @Test(expectedExceptions=DateTimeException.class) public void factory_ofInstant_maxInstantWithMaxOffset() { Instant instant = Instant.ofEpochSecond(Long.MAX_VALUE); Zoned...
public <R> R query(TemporalQuery<R> query) {
6
MrCrayfish/MrCrayfishSkateboardingMod
src/main/java/com/mrcrayfish/skateboarding/tricks/flip/Trick360Kickflip.java
[ "public enum Difficulty {\n\t\n\tEASY(6, 50), MEDIUM(8, 70), HARD(10, 100), IMPOSSIBLE(12, 150);\n\n\tprivate int performTime;\n\tprivate int extraComboTime;\n\n\tDifficulty(int performTime, int extraComboTime) {\n\t\tthis.performTime = performTime;\n\t\tthis.extraComboTime = extraComboTime;\n\t}\n\t\n\tpublic int ...
import net.minecraft.client.model.ModelRenderer; import net.minecraft.client.renderer.GlStateManager; import com.mrcrayfish.skateboarding.api.Difficulty; import com.mrcrayfish.skateboarding.api.trick.Flip; import com.mrcrayfish.skateboarding.entity.EntitySkateboard; import com.mrcrayfish.skateboarding.util.TrickHelper;...
package com.mrcrayfish.skateboarding.tricks.flip; public class Trick360Kickflip extends Flip { @Override public void updateBoard(EntitySkateboard skateboard) { TrickHelper.flipBoard(skateboard, 360F, performTime(), Axis.Z); TrickHelper.spinBoard(skateboard, 360F, performTime()); } @Override public String ...
public Difficulty difficulty()
0
Orange-OpenSource/android-trail-drawing
src/main/java/com/orange/dgil/trail/android/impl/TrailDrawer.java
[ "public interface ITrailDrawer {\n void setAnimationListener(IAnimListener i);\n\n TrailOptions getTrailOptions();\n AnimParameters getAnimationParameters();\n\n /** hide the trail AND clear all points from the underlying buffer */\n void clear();\n\n /** hide the trail BUT keep all points in the underlying b...
import android.graphics.Canvas; import android.view.View; import com.orange.dgil.trail.android.ITrailDrawer; import com.orange.dgil.trail.android.animation.AnimManager; import com.orange.dgil.trail.android.animation.AnimParameters; import com.orange.dgil.trail.android.animation.IAnimDrawer; import com.orange.dgil.trail...
/** * Trail drawing library * Copyright (C) 2016 Orange * Authors: christophe.maldivi@orange.com, eric.petit@orange.com * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MP...
public TrailOptions getTrailOptions() {
7
adelbs/ISO8583
src/test/java/org/adelbs/iso8583/clientserver/MockMessageFactory.java
[ "public enum EncodingEnum implements Encoding {\n\n\tBCD(\"BCD\", new EncodingBCD()), \n\tEBCDIC(\"EBCDIC\", new EncodingEBCDIC()), \n\tISO88591(\"ISO 8859-1\", new EncodingUTF8()), \n\tUTF8(\"UTF-8\", new EncodingUTF8()), \n\tHEXA(\"HEXA\", new EncodingHEXA()),\n\tBASE64(\"BASE64\", new EncodingBASE64()),\n\tBYTE(...
import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpression; import javax.xml.xpath.XPathExpressio...
package org.adelbs.iso8583.clientserver; class MockMessageFactory { private MockMessageFactory(){}
public static MessageVO createMockMessage(final String messageType, final Iso8583Config isoConfig) throws XPathExpressionException, SAXException, IOException, ParserConfigurationException{
3
allegro/elasticsearch-reindex-tool
src/main/java/pl/allegro/tech/search/elasticsearch/tools/reindex/ReindexCommandParser.java
[ "public class ReindexCommand {\n\n @Parameter(names = { \"-s\", \"source\" }, description = \"Source f.e. http://localhost:9300/source_index/type\",\n required = true)\n private String source;\n\n @Parameter(names = { \"-sc\", \"source-cluster\" }, description = \"Source cluster name\", required = true)\n ...
import com.beust.jcommander.JCommander; import com.beust.jcommander.ParameterException; import pl.allegro.tech.search.elasticsearch.tools.reindex.command.ReindexCommand; import pl.allegro.tech.search.elasticsearch.tools.reindex.connection.ElasticDataPointer; import pl.allegro.tech.search.elasticsearch.tools.reindex.con...
package pl.allegro.tech.search.elasticsearch.tools.reindex; public class ReindexCommandParser { private ElasticDataPointer sourcePointer; private ElasticDataPointer targetPointer; private QuerySegmentation segmentation; public boolean tryParse(String... args) { ReindexCommand command = new ReindexComma...
return QuerySegmentationFactory.create(command);
5
Appendium/flatpack
flatpack/src/main/java/net/sf/flatpack/brparse/BuffReaderFixedParser.java
[ "public interface DataSet extends Record, RecordDataSet {\r\n\r\n /**\r\n * Goes to the top of the data set. This will put the pointer one record\r\n * before the first in the set. Next() will have to be called to get the\r\n * first record after this call.\r\n */\r\n void goTop();\r\n\r\n ...
import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import net.sf.flatpack.DataSet; import net.sf.flatpack.DefaultDataSet; impor...
/* * ObjectLab, http://www.objectlab.co.uk/open is supporting FlatPack. * * Based in London, we are world leaders in the design and development * of bespoke applications for the securities financing markets. * * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a> * ___ _ ...
final List<ColumnMetaData> cmds = ParserUtils.getColumnMetaData(mdkey, getPzMetaData());
3
wangchongjie/multi-task
src/test/java/com/baidu/unbiz/multitask/demo/test/CustomizedParallelFetchTest.java
[ "public class TaskPair extends Pair<String, Object> {\n\n public TaskPair() {\n }\n\n public TaskPair(String taskName, Object param) {\n this.field1 = taskName;\n this.field2 = param;\n }\n\n public TaskPair wrap(String taskName, Object param) {\n return new TaskPair(taskName, pa...
import java.util.List; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ExecutorService; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import javax.annotation.Resource; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.t...
package com.baidu.unbiz.multitask.demo.test; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "/applicationContext-test.xml") public class CustomizedParallelFetchTest { @Resource(name = "simpleParallelExePool")
private CustomizedParallelExePool parallelExePool;
1
Karumi/Dexter
sample/src/main/java/com/karumi/dexter/sample/SampleActivity.java
[ "public final class Dexter\n implements DexterBuilder, DexterBuilder.Permission, DexterBuilder.SinglePermissionListener,\n DexterBuilder.MultiPermissionListener {\n\n private static DexterInstance instance;\n\n private Collection<String> permissions;\n private MultiplePermissionsListener listener = new Bas...
import android.Manifest; import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Build; import android.os.Bundle; import com.google.android.material.snackbar.Snackbar; import androidx.core.content.ContextCompat; import a...
/* * Copyright (C) 2015 Karumi. * * 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...
DialogOnDeniedPermissionListener.Builder.withContext(this)
3
jayqqaa12/jbase
jbase-cache/src/main/java/com/jayqqaa12/jbase/cache/core/JbaseCache.java
[ "@Data\n@Builder\n@Slf4j\npublic class AutoLoadObject {\n\n private String region;\n private String key;\n\n\n //主动传入的加载方法\n private Supplier<Object> function;\n\n /**\n * 过期时长 单位:秒\n */\n private int expire;\n\n\n private volatile boolean isLock;\n\n /**\n * 最后更新时间\n */\n private volatile Long las...
import com.jayqqaa12.jbase.cache.core.load.AutoLoadObject; import com.jayqqaa12.jbase.cache.core.load.AutoLoadSchedule; import com.jayqqaa12.jbase.cache.notify.Command; import com.jayqqaa12.jbase.cache.notify.Notify; import com.jayqqaa12.jbase.cache.provider.CacheProviderGroup; import com.jayqqaa12.jbase.cache.util.Cac...
package com.jayqqaa12.jbase.cache.core; /** * Cache操作入口类 */ @Slf4j @Data public class JbaseCache { private CacheProviderGroup provider; private Notify notify; private AutoLoadSchedule autoLoadSchdule; private JbaseCache() { } public static JbaseCache build(CacheConfig cacheConfig) { JbaseC...
notify.send(new Command(Command.OPT_EVICT_KEY, region, key));
2
accountingSoftwareCSE343Group4/accounting_Soft
src/accounting/software/GUIStaffs/MainFrame.java
[ "public class AccountingSystem {\n\n // Lists of Classes\n private List<Personnel> personnelList = new ArrayList();\n private List<Fuel> fuelList = new ArrayList();\n private List<Sales> salesList = new ArrayList();\n private List<OtherExpense> otherExpenseList = new ArrayList();\n\n // For Gui\n ...
import accounting.software.AccountingSystem; import accounting.software.Fuel; import accounting.software.OtherExpense; import accounting.software.Personnel; import accounting.software.Printer; import accounting.software.Sales; import accounting.software.TakeDataOnline; import com.itextpdf.text.DocumentException;...
package accounting.software.GUIStaffs; /** * Main Frame class. * * @author Furkan */ public class MainFrame extends javax.swing.JFrame { /** * This frame */ public static MainFrame mainFrame; private DieselDialog dieselDialog = new DieselDialog(this, true); private Gaso...
if (AccountingSystem.getInstance().readToJson()) {
0
xcltapestry/XCL-Charts
lib/src/main/java/org/xclcharts/chart/DountChart.java
[ "public class DrawHelper {\n\t\n\tprivate static DrawHelper instance = null;\n\t\n\tprivate RectF mRectF = null;\n\tprivate Path mPath = null;\n\tprivate Paint mPaint = null;\n\n\tpublic DrawHelper(){}\n\n\tpublic static synchronized DrawHelper getInstance()\n\t{\n\t\tif(instance == null){\n\t\t\tinstance = new Dra...
import android.graphics.Paint; import android.graphics.PointF; import android.graphics.Paint.Align; import org.xclcharts.common.DrawHelper; import org.xclcharts.common.MathHelper; import org.xclcharts.renderer.XEnum; import org.xclcharts.renderer.plot.PlotAttrInfo; import org.xclcharts.renderer.plot.PlotAttrInfoRender;...
/** * Copyright 2014 XCL-Charts * * 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...
mFillRadius = (int) MathHelper.getInstance().round( mul(getRadius(),mInnerRadius), 2);
1
caoli5288/PlayerSQL
playersql/src/main/java/com/mengcraft/playersql/task/DailySaveTask.java
[ "public class Config {\n\n public static final Configuration CONF;\n\n public static final boolean SYN_CHEST;\n public static final boolean SYN_EFFECT;\n public static final boolean SYN_EXP;\n public static final boolean SYN_FOOD;\n public static final boolean SYN_HEALTH;\n public static final ...
import com.mengcraft.playersql.Config; import com.mengcraft.playersql.PlayerData; import com.mengcraft.playersql.PluginMain; import com.mengcraft.playersql.UserManager; import lombok.RequiredArgsConstructor; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; import java.util.UUID; import stati...
package com.mengcraft.playersql.task; /** * Created on 16-1-4. */ @RequiredArgsConstructor public class DailySaveTask extends BukkitRunnable {
private UserManager manager = UserManager.INSTANCE;
3
inouire/baggle
baggle-client/src/inouire/baggle/client/threads/ServerConnection.java
[ "public class Language {\n\n static String[] tooltip_fr = new String[]{\n \"Lister les serveurs sur le réseau officiel\",//0\n \"Lister les serveurs en réseau local\",//1\n };\n static String[] tooltip_en = new String[]{\n \"List servers of the official network\",//0\n \"List se...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.InetSocketAddress; import java.net.Socket; import java.net.SocketAddress; import java.net.UnknownHostException; import java.util.HashMap; import javax.swing.JOptionPane; import inouir...
case STATUS: STATUSDatagram statusD = new STATUSDatagram(datagram); STATUSAction(statusD); break; default: SimpleLog.logger.warn("Unexpected message: "+packet);...
if(wordD.status==Words.GOOD){
4
Elvynia/formation-exercices
src/fr/formation/exo2/Main.java
[ "public class Freelance implements Payrole {\n\t\n\tprivate String name;\n\t\n\tprivate String siren;\n\n\tprivate final List<Invoice> invoices;\n\t\n\tpublic Freelance() {\n\t\tthis.invoices = new ArrayList<>();\n\t}\n\t\n\t/**\n\t * {@inheritDoc}\n\t */\n\t@Override\n\tpublic int calculateSalary() {\n\t\tint resu...
import java.util.Date; import fr.formation.exo2.objets.Freelance; import fr.formation.exo2.objets.Producer; import fr.formation.exo2.objets.ProducerWithRisk; import fr.formation.exo2.objets.Representant; import fr.formation.exo2.objets.Salesman; import fr.formation.exo2.objets.Staff; import fr.formation.exo2.objets.War...
package fr.formation.exo2; /** * Classe principale. * * @author hb-asus * */ public class Main { /** * Point d'entrée de l'application. * * @param args * les arguments système. */ public static void main(String[] args) { if (args.length == 1) { final String companyName = args[0]; ...
new ProducerWithRisk("Jean", "Flippe", 28, hireDate, 1000));
2
matt-allen/repay-android
repay/src/main/java/com/repay/android/frienddetails/FriendOverviewFragment.java
[ "public class Application extends android.app.Application {\n\n private static final String TAG = Application.class.getSimpleName();\n\n\tprivate static DisplayImageOptions mImageOptions;\n\tprivate ImageLoaderConfiguration mLoadConfig;\n\n\t@Override\n\tpublic void onCreate()\n\t{\n\t\tsuper.onCreate();\n\t\tLo...
import android.app.AlertDialog; import android.net.Uri; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.view.ViewPropertyAnimator; import android.widget.Button; import android.widget.TextView;...
package com.repay.android.frienddetails; /** * Property of Matt Allen * mattallen092@gmail.com * http://mattallensoftware.co.uk/ * <p/> * This software is distributed under the Apache v2.0 license and use * of the Repay name may not be used without explicit permission from the project owner. */ public class...
private RoundedImageView mFriendPic;
4
pangliang/MirServer-Netty
GameServer/src/main/java/com/zhaoxiaodan/mirserver/gameserver/engine/ItemEngine.java
[ "public class DB {\n\n\tprivate static SessionFactory ourSessionFactory;\n\tprivate static ServiceRegistry serviceRegistry;\n\n\tpublic static void init() throws Exception {\n\t\tConfiguration configuration = new Configuration();\n\t\tconfiguration.configure();\n\n\t\tserviceRegistry = new StandardServiceRegistryB...
import com.zhaoxiaodan.mirserver.db.DB; import com.zhaoxiaodan.mirserver.gameserver.entities.Player; import com.zhaoxiaodan.mirserver.gameserver.entities.PlayerItem; import com.zhaoxiaodan.mirserver.gameserver.entities.StdItem; import com.zhaoxiaodan.mirserver.gameserver.objects.DropItem; import com.zhaoxiaodan.mirserv...
package com.zhaoxiaodan.mirserver.gameserver.engine; public class ItemEngine { private static final Logger logger = LogManager.getLogger(); private static Map<String, StdItem> itemNames = new HashMap<>(); public synchronized static void reload() throws Exception {
List<StdItem> itemList = DB.query(StdItem.class);
0
tfg13/LanXchange
modules/swing/src/main/java/de/tobifleig/lxc/plaf/swing/LXCPanel.java
[ "public class LXC {\n\n /**\n * The internal version id.\n * For automatic updates.\n */\n public static final int versionId = 170;\n /**\n * The external version id.\n */\n public static final String versionString = \"v1.50\";\n /**\n * Logger for core components\n */\n ...
import de.tobifleig.lxc.LXC; import de.tobifleig.lxc.data.LXCFile; import de.tobifleig.lxc.data.LXCJob; import de.tobifleig.lxc.data.VirtualFile; import de.tobifleig.lxc.data.impl.RealFile; import de.tobifleig.lxc.log.LXCLogBackend; import de.tobifleig.lxc.log.LXCLogger; import de.tobifleig.lxc.plaf.GuiListener; import...
private int subJobDeleteSelected = -1; private int traySelected = HOVER_NONE; private boolean detailSelected = false; private int masterDrawMode = DRAWMODE_INIT; private int activeOverlays = OVERLAY_NONE; private GuiListener guiListener; private final OptionsDialog options; private boole...
String versionText = LXC.versionString + " (" + LXC.versionId + ")";
0
DMCApps/NavigationFragment
app/src/main/java/com/github/dmcapps/navigationfragmentexample/v7/SupportExamplesActivity.java
[ "public class NavigationDrawerClearStackExampleActivity extends SingleStackSuperActivity implements NavigationView.OnNavigationItemSelectedListener {\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_navi...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import com.github.dmcapps.navigationfragmentexample.R; import com.github.dmcapps.navi...
package com.github.dmcapps.navigationfragmentexample.v7; /** * Created by dcarmo on 2016-10-01. */ public class SupportExamplesActivity extends ActionBarActivity implements AdapterView.OnItemClickListener { ListView mList; @Override protected void onCreate(Bundle savedInstanceState) { super....
intent = new Intent(this, NavigationDrawerExampleActivity.class);
1
dkzwm/SmoothRefreshLayout
app/src/main/java/me/dkzwm/widget/srl/sample/ui/TestNestedHorizontalViewsActivity.java
[ "public abstract class RefreshingListenerAdapter implements SmoothRefreshLayout.OnRefreshListener {\n @Override\n public void onRefreshing() {}\n\n @Override\n public void onLoadingMore() {}\n}", "public class SmoothRefreshLayout extends ViewGroup\n implements NestedScrollingParent3, NestedScro...
import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.os.Handler; import android.view.MenuItem; import android.widget.Toast; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.viewpager.widget.ViewPager; import com.Toxic...
package me.dkzwm.widget.srl.sample.ui; /** * Created by dkzwm on 2017/9/13. * * @author dkzwm */ public class TestNestedHorizontalViewsActivity extends AppCompatActivity { private static final int[] sColors = new int[] {Color.WHITE, Color.GREEN, Color.YELLOW, Color.BLUE, Color.RED, Color.BLACK}; ...
private ViewPagerAdapter mAdapter;
3
winzillion/FluxJava
demo-rx/src/main/java/com/example/fluxjava/rx/domain/stores/UserStore.java
[ "public class UserAction extends FluxAction<Integer, List<User>> {\n\n public UserAction(final Integer inType, final List<User> inData) {\n super(inType, inData);\n }\n\n}", "public class User {\n\n public String name;\n\n public User() {}\n\n public User(final String inName) {\n name...
import com.example.fluxjava.rx.domain.actions.UserAction; import com.example.fluxjava.rx.domain.models.User; import io.wzcodes.fluxjava.FluxContext; import io.wzcodes.fluxjava.IFluxAction; import io.wzcodes.fluxjava.IFluxBus; import io.wzcodes.fluxjava.rx.RxStore; import java.util.ArrayList; import static com.example.f...
/* * Copyright (C) 2016 Bugs will find a way (https://wznote.blogspot.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unl...
return UserAction.class;
0
binzhihao/Reader
app/src/main/java/com/bean/simplenews/module/news/presenter/NewsListPresenter.java
[ "public class Urls {\n\n //http://c.m.163.com/nc/article/headline/T1348647909107/0-20.html\n public static final int PAGE_SIZE = 20;\n public static final String CATEGORY_TOP = \"headline\";\n public static final String CATEGORY_COMMON = \"list\";\n\n public static final String TOP_ID = \"T1348647909...
import android.content.Context; import com.bean.simplenews.api.Urls; import com.bean.simplenews.module.news.model.bean.NewsBean; import com.bean.simplenews.common.Constants; import com.bean.simplenews.common.base.BasePresenter; import com.bean.simplenews.module.news.model.NewsListHelper; import com.bean.simplenews.modu...
package com.bean.simplenews.module.news.presenter; public class NewsListPresenter extends BasePresenter<NewsListView> implements NewsListPresenterBiz, NewsListHelper.OnLoadNewsListListener { private String mCategory, mId; private Context mContext; private int mLastPageIndex = 0; private boolean mIs...
onLocalSuccess((ArrayList<NewsBean>) list, isUp);
1
unruly/control
src/main/java/co/unruly/control/validation/Validators.java
[ "public interface Optionals {\n\n /**\n * Converts an Optional to a Stream.\n * If the Optional was present, you get a Stream of one item.\n * If it was absent, you get an empty stream.\n *\n * Flatmapping a Stream of Optionals over this method will return a Stream of the\n * contents of ...
import co.unruly.control.Optionals; import co.unruly.control.ThrowingLambdas.ThrowingFunction; import co.unruly.control.result.Result; import java.util.Arrays; import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; import java.u...
package co.unruly.control.validation; public interface Validators { @SafeVarargs public static <T, E> Validator<T, E> compose(Validator<T, E>... validators) { return t -> Arrays.stream(validators).flatMap(v -> v.validate(t)); } public static <T, E> Validator<T, E> rejectIf(Predicate<T> te...
public static <T, E> Function<Result<T, FailedValidation<T, E>>, Result<T, FailedValidation<T, E>>> ignoreWhen(Predicate<E> filterCondition) {
2
TechzoneMC/NPCLib
nms-v1_8_R1/src/main/java/net/techcable/npclib/nms/versions/v1_8_R1/NMS.java
[ "public interface HumanNPC extends LivingNPC {\r\n\r\n /**\r\n * Return this npc's skin\r\n * <p/>\r\n * A value of null represents a steve skin\r\n *\r\n * @return this npc's skin\r\n */\r\n public UUID getSkin();\r\n\r\n /**\r\n * Set the npc's skin\r\n * <p/>\r\n * A ...
import java.util.Collection; import java.util.UUID; import java.util.concurrent.TimeUnit; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; import com.mojang.authlib.GameProfile; import net.minecraft.server.v1_8_R1.EntityLiving; import ...
package net.techcable.npclib.nms.versions.v1_8_R1; public class NMS implements net.techcable.npclib.nms.NMS { private static NMS instance; public NMS() { if (instance == null) instance = this; } public static NMS getInstance() { return instance; } @Override
public IHumanNPCHook spawnHumanNPC(Location toSpawn, HumanNPC npc) {
3
EthanCo/Halo-Turbo
halo-turbo/src/main/java/com/ethanco/halo/turbo/SocketFactory.java
[ "public interface ISocket {\n boolean start();\n\n void stop();\n\n List<IHandler> getHandlers();\n\n void addHandler(IHandler handler);\n\n boolean removeHandler(IHandler handler);\n\n boolean isRunning();\n}", "public class Config {\n //模式\n public Mode mode;\n //目标IP\n public Stri...
import com.ethanco.halo.turbo.ads.ISocket; import com.ethanco.halo.turbo.bean.Config; import com.ethanco.halo.turbo.impl.socket.MulticastSocket; import com.ethanco.halo.turbo.impl.socket.UdpClientSocket; import com.ethanco.halo.turbo.type.Mode; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTa...
package com.ethanco.halo.turbo; /** * Created by EthanCo on 2016/9/19. */ class SocketFactory { public static ISocket create(Config config) { ISocket haloImpl; Mode mode = config.mode; if (mode == Mode.MULTICAST) { haloImpl = new MulticastSocket(config); } else if(...
haloImpl = new UdpClientSocket(config);
3
yammer/tenacity
tenacity-core/src/test/java/com/yammer/tenacity/tests/TenacityCircuitBreakersResourceTest.java
[ "@JsonDeserialize(using = CircuitBreaker.Deserializer.class)\npublic class CircuitBreaker {\n public enum State {\n OPEN, CLOSED, FORCED_OPEN, FORCED_CLOSED,\n FORCED_RESET //Used to \"unset\" any FORCED state\n }\n\n public static class Deserializer extends StdDeserializer<CircuitBreaker> {\...
import com.yammer.tenacity.core.core.CircuitBreaker; import com.yammer.tenacity.core.properties.TenacityPropertyKey; import com.yammer.tenacity.core.properties.TenacityPropertyRegister; import com.yammer.tenacity.core.resources.TenacityCircuitBreakersResource; import com.yammer.tenacity.testing.TenacityTestRule; import...
package com.yammer.tenacity.tests; public class TenacityCircuitBreakersResourceTest { @Rule public final TenacityTestRule tenacityTestRule = new TenacityTestRule(); @SuppressWarnings("unchecked") private static final Collection<TenacityPropertyKey> keysMock = mock(Collection.class); @ClassRule...
.get(CircuitBreaker[].class)).isEmpty();
0
NICTA/nicta-ner
nicta-ner/src/main/java/org/t3as/ner/data/Date.java
[ "public class EntityClass {\n\n public static final EntityClass UNKNOWN = new EntityClass(\"UNKNOWN\");\n public static final EntityClass DATE = new EntityClass(\"DATE\");\n\n private final String entityClass;\n\n @JsonCreator\n public EntityClass(@JsonProperty(\"entityClass\") final String entityCla...
import static org.t3as.ner.data.Date.DateType.DATE_MM; import static org.t3as.ner.data.Date.DateType.DATE_WEEKDAY; import static org.t3as.ner.data.Date.DateType.DATE_YY; import static org.t3as.ner.data.Date.DateType.NONE; import static org.t3as.ner.data.Date.DateType.TIME; import static org.t3as.ner.data.Date.DateType....
/* * #%L * NICTA t3as Named-Entity Recognition library * %% * Copyright (C) 2010 - 2014 NICTA * %% * 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 ...
|| toEngLowerCase(_word).endsWith("th")) {
4
Atmosphere/wasync
wasync/src/main/java/org/atmosphere/wasync/serial/SerializedSocket.java
[ "public class FunctionWrapper {\n\n private final String functionName;\n private final Function<?> function;\n\n public FunctionWrapper(String functionName, Function<?> function) {\n this.functionName = functionName;\n this.function = function;\n }\n\n public Function<?> function(){\n ...
import java.io.IOException; import java.util.List; import org.asynchttpclient.AsyncHttpClient; import org.asynchttpclient.ListenableFuture; import org.asynchttpclient.Response; import org.atmosphere.wasync.FunctionWrapper; import org.atmosphere.wasync.Options; import org.atmosphere.wasync.Socket; import org.atm...
/* * Copyright 2008-2022 Async-IO.org * * 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...
public SocketRuntime createRuntime(DefaultFuture future, Options options, List<FunctionWrapper> functions) {
0
KostyaSha/github-integration-plugin
github-pullrequest-plugin/src/main/java/org/jenkinsci/plugins/github/pullrequest/events/impl/GitHubPRLabelRemovedEvent.java
[ "public class GitHubPRDecisionContext extends GitHubDecisionContext<GitHubPREvent, GitHubPRCause> {\n private final GHPullRequest remotePR;\n private final GitHubPRPullRequest localPR;\n private final GitHubPRUserRestriction prUserRestriction;\n private final GitHubPRRepository localRepo;\n\n protect...
import com.github.kostyasha.github.integration.generic.GitHubPRDecisionContext; import hudson.Extension; import hudson.model.TaskListener; import org.jenkinsci.Symbol; import org.jenkinsci.plugins.github.pullrequest.GitHubPRCause; import org.jenkinsci.plugins.github.pullrequest.GitHubPRLabel; import org.jenkinsci.plugi...
package org.jenkinsci.plugins.github.pullrequest.events.impl; /** * When label is removed from GitHub issue(== pull request). Set of labels is considered removed only when * at least one label of set was newly removed (was saved in local PR previously) * AND every label of set was already removed from remote PR....
public GitHubPRCause check(@NonNull GitHubPRDecisionContext prDecisionContext) throws IOException {
0
jonfryd/tifoon
tifoon-core/src/main/java/com/elixlogic/tifoon/domain/service/scanner/impl/PortScannerResultDiffServiceImpl.java
[ "@Embeddable\n@Data\n@NoArgsConstructor(access = AccessLevel.PRIVATE)\n@EqualsAndHashCode(callSuper = false)\npublic class NetworkResult extends ReflectionObjectTreeAware implements Serializable {\n public static class OpenHostsJsonConverter implements AttributeConverter<HashMap<String, OpenHost>, byte[]> {\n ...
import com.elixlogic.tifoon.domain.model.scanner.NetworkResult; import com.elixlogic.tifoon.domain.model.scanner.PortScannerResult; import com.google.common.collect.*; import com.elixlogic.tifoon.domain.model.object.BaseEntity; import com.elixlogic.tifoon.domain.model.object.ObjectTreeAware; import com.elixlogic.tifoon...
package com.elixlogic.tifoon.domain.service.scanner.impl; @Service @Slf4j public class PortScannerResultDiffServiceImpl implements PortScannerResultDiffService { private final Javers javers; @Value private static class ChangesHolder { private final SetMultimap<Class<? extends BaseEntity>, Proper...
final Map<String, NetworkResult> oldResultsMap = _oldResult.mapNetworkResultsByNetworkId();
0
yyvess/jsconf
src/main/java/net/jmob/jsconf/core/ConfigurationFactory.java
[ "public class BeanDefinition {\n\n private String id;\n private String key;\n private String className;\n private boolean isAInterface;\n private boolean reloading;\n\n public String getId() {\n if (hasText(id)) {\n return id;\n }\n return this.key;\n }\n\n pu...
import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; import com.typesafe.config.ConfigParseOptions; import com.typesafe.config.ConfigSyntax; import net.jmob.jsconf.core.impl.BeanDefinition; import net.jmob.jsconf.core.impl.BeanFactory; import net.jmob.jsconf.core.impl.ProxyPostProcessor; import ...
} public ConfigurationFactory strict() { return withStrict(true); } public ConfigurationFactory withStrict(boolean strict) { setStrict(strict); return this; } public ConfigurationFactory useProfiles() { return withProfiles(true); } public Configuratio...
registerBean(new BeanFactory(this.context)
1
jeluard/stone
examples/src/test/java/com/github/jeluard/stone/example/DatabaseExample.java
[ "public interface ConsolidationListener {\n\n interface Persistent extends ConsolidationListener {\n\n /**\n * @return latest (most recent) timestamp persisted\n */\n Optional<Long> getLatestTimestamp();\n\n }\n\n /**\n * Invoked each time a newly published value cross a {@link Window} boundary t...
import com.github.jeluard.stone.api.ConsolidationListener; import com.github.jeluard.stone.api.TimeSeries; import com.github.jeluard.stone.api.Window; import com.github.jeluard.stone.consolidator.MaxConsolidator; import com.github.jeluard.stone.consolidator.MinConsolidator; import com.github.jeluard.stone.dispatcher.se...
/** * Copyright 2012 Julien Eluard * This project includes software developed by Julien Eluard: https://github.com/jeluard/ * * 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 * * htt...
final Database database = new Database(new SequentialDispatcher(), new MemoryStorageFactory());
6
begab/kpe
src/hu/u_szeged/kpe/KpeMain.java
[ "public class NGram extends ArrayList<CoreLabel> implements Cloneable {\n\n private static PorterStemmer ps = new PorterStemmer();\n private static final long serialVersionUID = 3797853353962652098l;\n private static final CoreLabelComparator coreLabelComparator = new CoreLabelComparator();\n private static Wor...
import hu.u_szeged.kpe.candidates.NGram; import hu.u_szeged.kpe.main.ExtractionModelBuilder; import hu.u_szeged.kpe.main.KPEFilter; import hu.u_szeged.kpe.main.KeyPhraseExtractor; import hu.u_szeged.kpe.readers.DocumentSet; import hu.u_szeged.kpe.readers.KpeReader; import hu.u_szeged.ml.mallet.MalletClassifier; import ...
NLPUtils.readDocToCollection(System.getProperty("user.dir") + "/resources/features", featureClasses); selectedFeatures = new LinkedList<String>(); mode = extendToDesiredLength(Integer.toBinaryString(featureCoding), featureClasses.size()); // mode = featureCoding; String escapedFeatureEncoding = mode...
KPEFilter kf = km.getKPEFilter();
2
cvtienhoven/graylog-plugin-aggregates
src/main/java/org/graylog/plugins/aggregates/rule/RuleServiceImpl.java
[ "public class AggregatesAlertCondition extends AbstractAlertCondition {\n private static final Logger LOG = LoggerFactory.getLogger(AggregatesAlertCondition.class);\n private final String description;\n private final String query;\n private final String field;\n private final Long numberOfMatches;\n ...
import com.google.common.collect.Lists; import com.mongodb.BasicDBObject; import com.mongodb.DBCollection; import org.graylog.plugins.aggregates.alerts.AggregatesAlertCondition; import org.graylog.plugins.aggregates.history.HistoryItemService; import org.graylog.plugins.aggregates.rule.rest.models.requests.AddRuleReque...
package org.graylog.plugins.aggregates.rule; public class RuleServiceImpl implements RuleService { private final JacksonDBCollection<RuleImpl, String> coll; private final Validator validator; private final StreamService streamService; private static final Logger LOG = LoggerFactory.getLogger(RuleServiceImpl.cl...
public Rule fromRequest(AddRuleRequest request) {
2
hpdcj/PCJ
src/main/java/org/pcj/internal/InternalCommonGroup.java
[ "public class BarrierStates {\n\n private final ConcurrentMap<Integer, AtomicInteger> counterMap;\n private final ConcurrentMap<Integer, State> stateMap;\n\n public BarrierStates() {\n counterMap = new ConcurrentHashMap<>();\n stateMap = new ConcurrentHashMap<>();\n }\n\n public int get...
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import java.util.Queue; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent....
/* * Copyright (c) 2011-2021, PCJ Library, Marek Nowicki * All rights reserved. * * Licensed under New BSD License (3-clause license). * * See the file "LICENSE" for the full license governing this code. */ package org.pcj.internal; /** * Internal (with common ClassLoader) representation of Group. It contains...
private final BroadcastStates broadcastStates;
1
utluiz/spring-examples
agenda-web-completa/src/main/java/br/com/starcode/agenda/controller/EntradaController.java
[ "public class Entrada {\r\n\r\n\tprivate Integer id;\r\n\tprivate Date horario;\r\n\tprivate String descricao;\r\n\tprivate Prioridade prioridade;\r\n\tprivate Integer idUsuario;\r\n\t\r\n\tpublic Integer getId() {\r\n\t\treturn id;\r\n\t}\r\n\t\r\n\tpublic void setId(Integer id) {\r\n\t\tthis.id = id;\r\n\t}\r\n\t...
import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.security.web.bind.annotation.AuthenticationPrincipal; import org.springframe...
package br.com.starcode.agenda.controller; /** * VIEW -> JSP * CONTROLLERS * SERVICES * REPOSITORY * JPA / DAO */ @Controller public class EntradaController { @Autowired EntradaService entradaService; @RequestMapping("/entradas") ModelAndView entradas( @ModelAttribute("filtro") ...
List<Entrada> entradas = entradaService.search(filtro, ordem);
0
Stratio/stratio-connector-cassandra
cassandra-connector/src/main/java/com/stratio/connector/cassandra/engine/CassandraStorageEngine.java
[ "public final class CassandraExecutor {\n\n /**\n * The {@link com.stratio.connector.cassandra.utils.Utils}.\n */\n private static Utils utils = new Utils();\n\n /**\n * Private class constructor as all methods are static.\n */\n private CassandraExecutor() {\n }\n\n /**\n * Ex...
import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import com.datastax.driver.core.Session; import com.stratio.connector.cassandra.CassandraExecutor; import com.stratio.connector.cassandra.statements.DeleteStatement; impo...
/* * Licensed to STRATIO (C) under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional information * regarding copyright ownership. The STRATIO (C) licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file...
DeleteStatement deleteStatement = new DeleteStatement(tableName, whereFilters);
1
google/android-classyshark
ClassySharkWS/src/com/google/classyshark/silverghost/SilverGhostFacade.java
[ "public class ContentReader {\n\n /**\n * components that are part of jar & apk\n */\n public enum ARCHIVE_COMPONENT {\n ANDROID_MANIFEST, NATIVE_LIBRARY\n }\n\n public static class Component {\n\n public Component(String name, ARCHIVE_COMPONENT component) {\n this.name ...
import java.util.LinkedList; import java.util.List; import com.google.classyshark.silverghost.contentreader.ContentReader; import com.google.classyshark.silverghost.exporter.Exporter; import com.google.classyshark.silverghost.exporter.FlatMethodCountExporter; import com.google.classyshark.silverghost.exporter.MethodCou...
/* * Copyright 2016 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 i...
Translator translator = new ApkTranslator(new File(args.get(1)));
6
Gocnak/Botnak
src/main/java/lib/pircbot/PircBot.java
[ "public class FaceManager {\n\n public static final int DOWNLOAD_MAX_FACE_HEIGHT = 26;\n public static final int DOWNLOAD_MAX_ICON_HEIGHT = 26;\n\n //loading the faces\n public static boolean doneWithFaces = false;\n public static boolean doneWithTwitchFaces = false;\n public static boolean doneWi...
import com.sun.istack.internal.Nullable; import face.FaceManager; import gui.forms.GUIMain; import irc.message.MessageHandler; import util.Constants; import util.Utils; import util.settings.Settings; import java.awt.*; import java.util.*; import java.util.List; import java.util.regex.Matcher;
/* Copyright Paul James Mutton, 2001-2009, http://www.jibble.org/ This file is part of PircBot. This software is dual-licensed, allowing you to choose between the GNU General Public License (GPL) and the www.jibble.org Commercial License. Since the GPL may be too restrictive for use in a proprietary application, a c...
private MessageHandler handler;
2
VisualizeMobile/AKANAndroid
src/br/com/visualize/akan/domain/controller/StatisticController.java
[ "public class StatisticDao extends Dao{\n\t\n\tprivate static StatisticDao instanceStatisticDao = null;\n\t\n\tprivate static String tableName = \"STATISTIC\";\n\tprivate static String tableColumns[ ] = { \"ID_STATISTIC\", \"MONTH_STATISTIC\",\n \"STD_DEVIATION\", \"AVERAGE_STATISTIC\", \"MAX_VALUE_STATISTIC...
import java.util.Iterator; import java.util.List; import org.apache.http.client.ResponseHandler; import org.json.JSONException; import android.content.Context; import android.util.Log; import br.com.visualize.akan.api.dao.StatisticDao; import br.com.visualize.akan.api.helper.JsonHelper; import br.com.visualize.akan.api...
package br.com.visualize.akan.domain.controller; public class StatisticController { private UrlController urlController; private static List<Statistic> statisticList; private static StatisticController instanceStatisticController = null; private StatisticDao statisticDao = null; private StatisticController( ...
throws NullCongressmanException, JSONException,
4
Team254/FRC-2015
src/com/team254/frc2015/subsystems/controllers/DriveFinishLineController.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.util.DriveSignal; import com.team254.lib.util.Pose; import com.team254.lib.util.SynchronousPID;
package com.team254.frc2015.subsystems.controllers; public class DriveFinishLineController implements Drive.DriveController { BangBangFinishLineController m_controller; Pose m_setpoint = new Pose(0, 0, 0, 0, 0, 0); double m_heading = 0; private SynchronousPID mTurnPid; public DriveSignal m_cached...
Constants.kDriveStraightKp,
0
blubin/JOpt
src/main/java/edu/harvard/econcs/jopt/example/SimpleQPExample.java
[ "public interface IMIP extends Serializable {\n\n\n\t// Variables\n\t////////////\n\t/**\n\t * @return a Map from Strings to Variables.\n\t */\n\tMap<String,Variable> getVars();\n\n /**\n * @return whether the mip contains the variable.\n */\n boolean containsVar(Variable var);\n\n /**\n * @ret...
import edu.harvard.econcs.jopt.solver.IMIP; import edu.harvard.econcs.jopt.solver.IMIPResult; import edu.harvard.econcs.jopt.solver.client.SolverClient; import edu.harvard.econcs.jopt.solver.mip.CompareType; import edu.harvard.econcs.jopt.solver.mip.Constraint; import edu.harvard.econcs.jopt.solver.mip.MIP; import edu....
/* * Copyright (c) 2005-2017 Benjamin Lubin * Copyright (c) 2005-2017 The President and Fellows of Harvard College * 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 o...
mip = new MIP();
5
Sensirion/SmartGadget-Android
app/src/main/java/com/sensirion/smartgadget/view/history/type/HistoryIntervalType.java
[ "public abstract class AbstractHistoryDataView extends AbstractDatabaseObject {\n\n AbstractHistoryDataView(final String viewName) {\n super(viewName, DatabaseObjectType.VIEW);\n }\n\n /**\n * Obtains the SQL needed for obtaining the historical data of the selected view.\n *\n * @param d...
import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.StringRes; import com.sensirion.smartgadget.R; import com.sensirion.smartgadget.persistence.history_database.table.AbstractHistoryDataView; import com.sensirion.smartgadget.persistence.history_database.table.His...
/* * Copyright (c) 2017, Sensirion AG * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditio...
HistoryDataLast1DayView.getInstance(),
2
MHAVLOVICK/Sketchy
src/main/java/com/sketchy/server/action/SavePathingSettings.java
[ "public enum SketchyContext {\n\tINSTANCE;\n\t\n\tprivate static NumberFormat nf = NumberFormat.getInstance();\n\n\tpublic static final Map<String, String> PEN_SIZES = new LinkedHashMap<String, String>();\n\tstatic{\n\t\tnf.setMinimumIntegerDigits(1);\n\t\tnf.setMinimumFractionDigits(1);\n\t\t\n\t\tfor (double penS...
import javax.servlet.http.HttpServletRequest; import com.sketchy.SketchyContext; import com.sketchy.metadata.MetaDataObject; import com.sketchy.pathing.PathingProcessorProperties; import com.sketchy.server.HttpServer; import com.sketchy.server.JSONServletResult; import com.sketchy.server.ServletAction; import com.sketc...
/* Sketchy Copyright (C) 2015 Matthew Havlovick http://www.quickdrawbot.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 2 of the License, or (at your op...
JSONServletResult jsonServletResult = new JSONServletResult(Status.SUCCESS);
6
kyle-liu/netty4study
testsuite/src/test/java/io/netty/testsuite/transport/socket/SocketTestPermutation.java
[ "public final class ServerBootstrap extends AbstractBootstrap<ServerBootstrap, ServerChannel> {\n\n private static final InternalLogger logger = InternalLoggerFactory.getInstance(ServerBootstrap.class);\n\n private final Map<ChannelOption<?>, Object> childOptions = new LinkedHashMap<ChannelOption<?>, Object>(...
import io.netty.bootstrap.Bootstrap; import io.netty.bootstrap.ChannelFactory; import io.netty.bootstrap.ServerBootstrap; import io.netty.buffer.ByteBufAllocator; import io.netty.buffer.PooledByteBufAllocator; import io.netty.buffer.UnpooledByteBufAllocator; import io.netty.channel.Channel; import io.netty.channel.Even...
/* * Copyright 2012 The Netty Project * * The Netty Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
return new Bootstrap().group(oioWorkerGroup).channel(OioDatagramChannel.class);
6
sensorstorm/StormCV
stormcv-examples/src/nl/tno/stormcv/example/E1_GrayScaledTopology.java
[ "public class StormCVConfig extends Config{\n\n\tprivate static final long serialVersionUID = 6290659199719921212L;\n\n\t/**\n\t * <b>Boolean (default = false)</b> configuration parameter indicating if the spout must cache emitted tuples so they can be replayed\n\t */\n\tpublic static final String STORMCV_SPOUT_FAU...
import java.util.ArrayList; import java.util.List; import nl.tno.stormcv.StormCVConfig; import nl.tno.stormcv.batcher.SlidingWindowBatcher; import nl.tno.stormcv.bolt.BatchInputBolt; import nl.tno.stormcv.bolt.SingleInputBolt; import nl.tno.stormcv.fetcher.StreamFrameFetcher; import nl.tno.stormcv.model.Frame; import n...
package nl.tno.stormcv.example; public class E1_GrayScaledTopology { public static void main(String[] args){ // first some global (topology configuration) StormCVConfig conf = new StormCVConfig(); conf.setNumWorkers(4); // number of workers in the topology conf.setMaxSpoutPending(32); // maximum un-acked/u...
builder.setSpout("spout", new CVParticleSpout( new StreamFrameFetcher(urls).frameSkip(frameSkip) ), 1 );
7
KeithYokoma/LGTMCamera
app/src/main/java/jp/yokomark/lgtm/app/history/ui/ComposeHistoryActivity.java
[ "@Module(\n\t\tcomplete = false,\n\t\tlibrary = true\n)\npublic class ActivityModule {\n\tprivate final Activity mActivity;\n\n\tpublic ActivityModule(Activity activity) {\n\t\tmActivity = activity;\n\t}\n\n\t@Provides\n\t@Singleton\n\tObjectGraph provideActivityGraph() {\n\t\tif (mActivity instanceof DaggerFragmen...
import android.os.Bundle; import android.view.MenuItem; import com.anprosit.android.dagger.ActivityModule; import com.anprosit.android.dagger.ui.DaggerActivity; import com.squareup.otto.Bus; import com.squareup.otto.Subscribe; import java.util.Arrays; import java.util.List; import javax.inject.Inject; import jp.yokomar...
package jp.yokomark.lgtm.app.history.ui; /** * @author yokomakukeishin * @version 1.0.0 * @since 1.0.0 */ public class ComposeHistoryActivity extends DaggerActivity { public static final String TAG = ComposeHistoryActivity.class.getSimpleName(); @Inject ComposeHistoryCollection mCollection; @Injec...
return Arrays.asList(new ActivityModule(this), new ComposeHistoryModule());
5
ground-context/ground
modules/postgres/app/edu/berkeley/ground/postgres/controllers/EdgeController.java
[ "public class GroundException extends Exception {\n\n private static final long serialVersionUID = 1L;\n\n private final String message;\n private final ExceptionType exceptionType;\n\n public enum ExceptionType {\n DB(\"Database Exception:\", \"%s\"),\n ITEM_NOT_FOUND(\"GroundItemNotFoundException\", \"N...
import akka.actor.ActorSystem; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import edu.berkeley.ground.common.exception.GroundException; import edu.berkeley.ground.common.model.core.Edge; import edu.berkeley.ground.common.model.core.EdgeVersion; import edu.berke...
package edu.berkeley.ground.postgres.controllers; public class EdgeController extends Controller { private CacheApi cache; private ActorSystem actorSystem; private PostgresEdgeDao postgresEdgeDao; private PostgresEdgeVersionDao postgresEdgeVersionDao; @Inject final void injectUtils(final CacheApi cache...
.exceptionally(e -> GroundUtils.handleException(e, request()));
5
Team254/FRC-2013
src/com/team254/frc2013/subsystems/Shooter.java
[ "public class Constants extends ConstantsBase {\n // Declare the constants and their default values here.\n // Control board mappings\n public static final Constant leftJoystickPort = new Constant(\"leftJoystickPort\", 1);\n public static final Constant rightJoystickPort = new Constant(\"rightJoystickPort\", 2)...
import com.team254.frc2013.Constants; import com.team254.frc2013.ShooterGains; import com.team254.lib.control.ControlOutput; import com.team254.lib.control.ControlSource; import com.team254.lib.control.impl.FlywheelController; import com.team254.lib.util.Util; import edu.wpi.first.wpilibj.Counter; import edu.wpi.first....
package com.team254.frc2013.subsystems; /** * Class representing the shooter wheels, managing its motors and sensors. * * @author richard@team254.com (Richard Lin) * @author tom@team254.com (Tom Bottiglieri) * @author eric.vanlare14@bcp.org (Eric van Lare) * @author eliwu26@gmail.com (Elias Wu) */ public class...
new ShooterSource(), ShooterGains.getGains()[0], 1.0 / 100.0);
1
boaglio/spring-boot-greendogdelivery-casadocodigo
src/main/java/com/boaglio/casadocodigo/greendogdelivery/api/PedidoAPI.java
[ "@Entity\npublic class Cliente {\n\n\t@Id\n @GeneratedValue(strategy = GenerationType.IDENTITY)\n\tprivate Long id;\n\n @NotNull\n @Length(min=2, max=30,message=\"O tamanho do nome deve ser entre {min} e {max} caracteres\")\n\tprivate String nome;\n\n @NotNull\n @Length(min=2, max=300,message=\"O tam...
import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Optional; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVar...
package com.boaglio.casadocodigo.greendogdelivery.api; @RestController @RequestMapping("/api") public class PedidoAPI { private final PedidoRepository pedidoRepository; private final ClienteRepository clienteRepository; private final ItemRepository itemRepository; public PedidoAPI(PedidoRepository pedidoRepos...
List<Item> itens = new ArrayList<>();
1