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
bxbxbai/ZhuanLan
app/src/main/java/io/bxbxbai/zhuanlan/ui/PeopleListFragment.java
[ "public class PeopleListAdapter extends BaseRecyclerAdapter<UserEntity> {\n\n public PeopleListAdapter(Context context) {\n super(context);\n setOnItemClickListener(new OnItemClickListener<UserEntity>() {\n @Override\n public void onItemClick(View view, int i, UserEntity userE...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.util.ArrayMap; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import...
package io.bxbxbai.zhuanlan.ui; /** * @author bxbxbai */ public class PeopleListFragment extends Fragment { private RecyclerView recyclerView; private CircularLoadingView mLoadingView; private PeopleListAdapter mAdapter; @Override public View onCreateView(LayoutInflater inflater, @Nullable Vi...
Api api = ZhuanLanApi.getZhuanlanApi();
3
HotBitmapGG/LeisureRead
app/src/main/java/com/hotbitmapgg/leisureread/ui/fragment/DailyFragment.java
[ "public class RetrofitHelper {\r\n\r\n private static final String ZHIHU_DAILY_URL = \"http://news-at.zhihu.com/api/4/\";\r\n\r\n private static final String ZHIHU_LAST_URL = \"http://news-at.zhihu.com/api/3/\";\r\n\r\n private static OkHttpClient mOkHttpClient;\r\n\r\n private final ApiService mZhiHuApiService...
import butterknife.Bind; import com.hotbitmapgg.leisureread.mvp.model.entity.DailyInfo; import com.hotbitmapgg.leisureread.network.RetrofitHelper; import com.hotbitmapgg.leisureread.rx.Rxutils; import com.hotbitmapgg.leisureread.ui.adapter.DailyListAdapter; import com.hotbitmapgg.leisureread.ui.fragment.base.BaseF...
package com.hotbitmapgg.leisureread.ui.fragment; /** * Created by hcc on 2016/12/28 13:35 * 100332338@qq.com * LeisureRead * * @HotBitmapGG 日报列表界面 */ public class DailyFragment extends BaseFragment { @Bind(R.id.recycler_view) RecyclerView mRecyclerView; @Bind(R.id.swipe_refresh) Swip...
private HeaderViewRecyclerAdapter mHeaderViewRecyclerAdapter;
7
jenkinsci/github-plugin
src/main/java/org/jenkinsci/plugins/github/internal/GitHubClientCacheOps.java
[ "@Extension\npublic class GitHubWebHook implements UnprotectedRootAction {\n private static final Logger LOGGER = LoggerFactory.getLogger(GitHubWebHook.class);\n public static final String URLNAME = \"github-webhook\";\n\n // headers used for testing the endpoint configuration\n public static final Stri...
import com.cloudbees.jenkins.GitHubWebHook; import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.hash.Hashing; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import okhttp3.Cache; import org.apache.commons.i...
package org.jenkinsci.plugins.github.internal; /** * Class with util functions to operate GitHub client cache * * @author lanwen (Merkushev Kirill) * @since 1.14.0 */ public final class GitHubClientCacheOps { private static final Logger LOGGER = LoggerFactory.getLogger(GitHubClientCacheOps.class); pri...
private static class ToCacheDir extends NullSafeFunction<GitHubServerConfig, Cache> {
3
threerings/nexus
jvm-io/src/main/java/com/threerings/nexus/io/JVMIO.java
[ "public abstract class DService<T extends NexusService> implements DAttribute\n{\n /** Used to create service attributes. */\n public interface Factory<T extends NexusService>\n {\n /** Creates a service attribute with the supplied owner. */\n DService<T> createService (NexusObject owner);\n ...
import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import com.google.commo...
// // Nexus JVMIO - I/O and network services for Nexus built on java.nio // http://github.com/threerings/nexus/blob/master/LICENSE package com.threerings.nexus.io; /** * Provides {@link Streamable#Input} and {@link Streamable#Output} using reflection and I/O support * provided by the JVM. */ public class JVMIO...
public static Streamable.Input newInput (InputStream in) {
3
4FunApp/4Fun
client/FourFun/app/src/main/java/com/joker/fourfun/ui/MainActivity.java
[ "public class Constants {\n public static final String MAIN_ACTIVITY_BUNDLE = \"main_bundle\";\n public static final String MEDIA_BUNDLE = \"media_bundle\";\n public static final String MOVIE_BUNDLE = \"movie_bundle\";\n public static final String PICTURE_BUNDLE = \"picture_bundle\";\n public static ...
import android.content.Intent; import android.content.pm.ActivityInfo; import android.graphics.Color; import android.os.Build; import android.os.Bundle; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.transition.Explode; import android.view.Gravity; impor...
package com.joker.fourfun.ui; public class MainActivity extends SupportActivity { public static final int FIRST = 0; public static final int SECOND = 1; public static final int THIRD = 2; public static final int FOURTH = 3; public Bundle mPictureBundle; @BindView(R.id.fl_content) FrameLa...
LoginContext.getInstance().collect(MainActivity.this);
2
iChun/Hats
src/main/java/me/ichun/mods/hats/common/hats/HatHandler.java
[ "public class WorkspaceHats extends Workspace\n implements IHatSetter\n{\n public static final DecimalFormat FORMATTER = new DecimalFormat(\"#,###,###\");\n\n public final boolean fallback;\n public final @Nonnull LivingEntity hatEntity;\n public final HatsSavedData.HatPart hatDetails;\n publi...
import me.ichun.mods.hats.client.gui.WorkspaceHats; import me.ichun.mods.hats.common.Hats; import me.ichun.mods.hats.common.hats.advancement.Advancements; import me.ichun.mods.hats.common.item.ItemHatLauncher; import me.ichun.mods.hats.common.packet.PacketEntityHatDetails; import me.ichun.mods.hats.common.packet.Packet...
hats.add(pool); } //fill the pool if they're absent for(EnumRarity value : EnumRarity.values()) { HAT_POOLS.computeIfAbsent(value, k -> new ArrayList<>()); } Hats.LOGGER.info("Allocated Hat Pools."); } public static EnumRarity getRarityF...
if(ent == Minecraft.getInstance().player && Minecraft.getInstance().currentScreen instanceof WorkspaceHats)
0
dan-silver/cast-dashboard-android-app
app/src/main/java/com/silver/dan/castdemo/settingsFragments/MapSettings.java
[ "public class MainActivity extends AppCompatActivity implements OnSettingChangedListener, GoogleApiClient.OnConnectionFailedListener {\n\n public static final String TAG = MainActivity.class.getSimpleName();\n public static final int NAV_VIEW_WIDGETS_ITEM = 0;\n public static final int NAV_VIEW_OPTIONS_LAY...
import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CompoundButton; import android.widget.LinearLayout;...
package com.silver.dan.castdemo.settingsFragments; public class MapSettings extends WidgetSettingsFragment implements GoogleApiClient.OnConnectionFailedListener { public static String LOCATION_LAT = "LOCATION_LAT"; public static String LOCATION_LONG = "LOCATION_LONG"; public static String LOCATION_ADD...
MapType current = MapType.getMapType(mapTypeOption.getIntValue());
2
HackMyChurch/aelf-dailyreadings
app/src/main/java/co/epitre/aelf_lectures/LecturesActivity.java
[ "public class SectionBibleFragment extends SectionFragmentBase {\n public static final String TAG = \"SectionBibleFragment\";\n\n public SectionBibleFragment(){\n // Required empty public constructor\n }\n\n /**\n * Global managers / resources\n */\n private boolean initialized = false...
import android.accounts.Account; import android.app.ActivityManager; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.content.res.Configuration; import android.content.res.Resour...
case "huge": zoom = 200; break; default: // small is deprecated. Treat as "normal". zoom = 100; } editor.putInt(SettingsActivity.KEY_PREF_DISP_FONT_SIZE, zoom); } catch (ClassC...
setSection(new SectionLecturesFragment());
2
olami-developers/olami-java-client-sdk
examples/microphone-speech-input-example/src/main/java/ai/olami/example/MicrophoneSpeechRecognizerExample.java
[ "public class APIConfiguration {\n\t\n\tpublic static final int LOCALIZE_OPTION_SIMPLIFIED_CHINESE = 0;\n\tpublic static final int LOCALIZE_OPTION_TRADITIONAL_CHINESE = 1;\n\t\n\tpublic static final String API_NAME_SEG = \"seg\";\n\tpublic static final String API_NAME_NLI = \"nli\";\n\tpublic static final String AP...
import ai.olami.cloudService.SpeechResult; import java.util.Arrays; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.LineUnavailableException; import javax.sound.sampled.TargetDataLine; import ai.olami.cloudService.APIConfigu...
/* Copyright 2017, VIA Technologies, Inc. & OLAMI Team. http://olami.ai 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 appli...
private static int mLocalizeOption = APIConfiguration.LOCALIZE_OPTION_SIMPLIFIED_CHINESE;
0
simo415/spc
src/com/sijobe/spc/command/Gamemode.java
[ "public enum FontColour {\n \n BLACK(\"\\2470\"),\n DARK_BLUE(\"\\2471\"),\n DARK_GREEN(\"\\2472\"),\n DARK_AQUA(\"\\2473\"),\n DARK_RED(\"\\2474\"),\n PURPLE(\"\\2475\"),\n ORANGE(\"\\2476\"),\n GREY(\"\\2477\"),\n DARK_GREY(\"\\2478\"),\n BLUE(\"\\2479\"),\n GREEN(\"\\247a\"),\n AQUA(\"\...
import com.sijobe.spc.util.FontColour; import com.sijobe.spc.validation.Parameter; import com.sijobe.spc.validation.ParameterString; import com.sijobe.spc.validation.Parameters; import com.sijobe.spc.wrapper.CommandException; import com.sijobe.spc.wrapper.CommandSender; import com.sijobe.spc.wrapper.Player; import java...
package com.sijobe.spc.command; /** * Command sets the game mode of the player * * @author simo_415 * @version 1.0 */ @Command ( name = "gamemode", description = "Changes the gamemode", example = "adventure", videoURL = "http://www.youtube.com/watch?v=1pAkRcp3KaY", v...
public void execute(CommandSender sender, List<?> params) throws CommandException {
5
berict/Tapad
app/src/main/java/com/bedrock/padder/activity/LauncherActivity.java
[ "@TargetApi(14)\npublic class AnimateHelper {\n private WindowHelper window = new WindowHelper();\n\n static String TAG = \"AnimateHelper\";\n\n // Fade animations\n\n public static String getViewId(View view) {\n String name = view.toString();\n return name.substring(name.lastIndexOf(\"/\...
import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.util.Log; import com.bedrock.padder.R; import com.bedrock.padder.helper.AnimateHelper; import com.bedrock.padder.helper.IntentHelper; import com.bedrock.padder.helper.Toolbar...
package com.bedrock.padder.activity; public class LauncherActivity extends AppCompatActivity { private AnimateHelper anim = new AnimateHelper();
private IntentHelper intent = new IntentHelper();
1
Bssentials/Bssentials
Bssentials-Bukkit/src/main/java/bssentials/bukkit/BukkitUser.java
[ "public class Bssentials {\n\n private static IBssentials i;\n public static File warpdir;\n\n public static File DATA_FOLDER;\n\n public static IBssentials getInstance() {\n return i;\n }\n\n public static void setInstance(IBssentials bss, File dataFolder) {\n if (null == i) {\n ...
import java.io.File; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.entity.Player; im...
npc = user.getBoolean("npc", false); lastAccountName = user.getString("lastAccountName"); try { money = new BigDecimal((double) user.get("money")); } catch (Exception e) { money = BigDecimal.valueOf(Double.valueOf((int) user.get("money")));...
ConfigurationSection section = user.getConfigurationSection("homes");
4
chedim/minedriod
src/main/java/com/onkiup/minedroid/gui/views/EditText.java
[ "public interface Context {\n /**\n * @return Context id\n */\n int contextId();\n\n}", "public class ColorDrawable implements Drawable {\n\n /**\n * Rectangle color\n */\n protected GLColor color;\n\n /**\n * Rectangle size\n */\n protected Point size;\n private boole...
import com.onkiup.minedroid.Context; import com.onkiup.minedroid.gui.drawables.ColorDrawable; import com.onkiup.minedroid.gui.drawables.Drawable; import com.onkiup.minedroid.gui.events.KeyEvent; import com.onkiup.minedroid.gui.events.MouseEvent; import com.onkiup.minedroid.gui.primitives.Point; import java.lang.reflect...
package com.onkiup.minedroid.gui.views; /** * TextView that allows user to edit it's content */ public class EditText extends TextView { protected int selectionStart, selectionEnd; protected Drawable cursor; protected Timer drawCursorTimer; protected Point scroll = new Point(0, 0); protected ...
public EditText(Context context) {
0
kaklakariada/fritzbox-java-api
src/test/java/com/github/kaklakariada/fritzbox/mapping/DeserializerTest.java
[ "public static DeviceListAssert assertThat(DeviceList deviceList) {\n return new DeviceListAssert(deviceList);\n}", "@Root(name = \"SessionInfo\")\npublic class SessionInfo {\n\n @Element(name = \"SID\")\n private String sid;\n\n @Element(name = \"Challenge\")\n private String challenge;\n\n @El...
import com.github.kaklakariada.fritzbox.model.homeautomation.DeviceStats; import com.github.kaklakariada.fritzbox.model.homeautomation.Group; import com.github.kaklakariada.fritzbox.model.homeautomation.GroupInfo; import com.github.kaklakariada.fritzbox.model.homeautomation.PowerMeter; import com.github.kaklakariada.fr...
/** * A Java API for managing FritzBox HomeAutomation * Copyright (C) 2017 Christoph Pirkl <christoph at users.sourceforge.net> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either ver...
assertThat(deviceList6840).hasGroupsSize(2);
0
einsteinsci/betterbeginnings
src/main/java/net/einsteinsci/betterbeginnings/config/json/KilnConfig.java
[ "public class JsonKilnRecipe\n{\n\tprivate JsonLoadedItem input;\n\tprivate JsonLoadedItemStack output;\n\tprivate float experience;\n\n\tpublic JsonKilnRecipe(JsonLoadedItem input, JsonLoadedItemStack output, float xp)\n\t{\n\t\tthis.input = input;\n\t\tthis.output = output;\n\t\texperience = xp;\n\t}\n\tpublic Js...
import net.einsteinsci.betterbeginnings.config.json.recipe.JsonKilnRecipe; import net.einsteinsci.betterbeginnings.config.json.recipe.JsonKilnRecipeHandler; import net.einsteinsci.betterbeginnings.register.recipe.KilnRecipeHandler; import net.einsteinsci.betterbeginnings.util.FileUtil; import net.einsteinsci.betterbegi...
package net.einsteinsci.betterbeginnings.config.json; public class KilnConfig implements IJsonConfig { public static final KilnConfig INSTANCE = new KilnConfig(); private static JsonKilnRecipeHandler initialRecipes = new JsonKilnRecipeHandler(); private JsonKilnRecipeHandler mainRecipes = new JsonKilnRecipeHand...
initialRecipes.getRecipes().add(new JsonKilnRecipe(input, output, xp));
0
dantetam/civgame
src/lwjglEngine/levels/LevelManager.java
[ "public class Grid {\n\n\tprivate Tile[][] tiles;\n\tpublic int rows, cols;\n\tpublic Civilization[] civs;\n\tpublic boolean[][] verticalRivers;\n\tpublic boolean[][] horizontalRivers;\n\n\tpublic Pathfinder pathFinder;\n\t// public Civilization playerCiv;\n\t// Player's civilization will always be the first\n\n\tp...
import game.Grid; import game.LwjglGrid; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.util.ArrayList; import lwjglEngine.models.RawModel; import lwjglEngine.models.TexturedModel; import org.lwjgl.util.vector.Vector2f; import org.lwjgl.u...
package lwjglEngine.levels; public class LevelManager { //public ArrayList<Group> groups; private static Loader loader = new Loader(); public ModelManager modelManager; public LevelManager(LwjglGrid grid, double[][] heightMap) { modelManager = new ModelManager(this, grid, heightMap); } public static G...
RawModel model = OBJLoader.loadObjModel(objFile, loader);
2
ceefour/webdav-servlet
src/main/java/net/sf/webdav/methods/DoDelete.java
[ "public interface ITransaction {\n\n Principal getPrincipal();\n\n}", "public interface IWebdavStore {\n\n /**\n * Life cycle method, called by WebdavServlet's destroy() method. Should be used to clean up resources.\n */\n void destroy();\n\n /**\n * Indicates that a new request or transac...
import net.sf.webdav.locking.ResourceLocks; import java.io.IOException; import java.util.Hashtable; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.webdav.ITransaction; import net.sf.webdav.IWebdavStore; import net.sf.webdav.StoredObject; import net.sf.webdav.W...
/* * Copyright 1999,2004 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
private ResourceLocks _resourceLocks;
7
PuffOpenSource/Puff-Android
app/src/main/java/sun/bob/leela/db/DaoSession.java
[ "public class Account {\r\n\r\n private Long id;\r\n /** Not-null value. */\r\n private String name;\r\n private long type;\r\n private String account;\r\n private String masked_account;\r\n private Boolean hide_name;\r\n private String account_salt;\r\n /** Not-null value. */\r\n priv...
import android.database.sqlite.SQLiteDatabase; import java.util.Map; import de.greenrobot.dao.AbstractDao; import de.greenrobot.dao.AbstractDaoSession; import de.greenrobot.dao.identityscope.IdentityScopeType; import de.greenrobot.dao.internal.DaoConfig; import sun.bob.leela.db.Account; import sun.bob.leela.db.C...
package sun.bob.leela.db; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * {@inheritDoc} * * @see AbstractDaoSession */ public class DaoSession extends AbstractDaoSession { private final DaoConfig accountDaoConfig; private final DaoConfig categoryDaoConfig; private fi...
private final CategoryDao categoryDao;
4
hexabeast/HexBox
core/src/com/hexabeast/sandbox/mobs/Hornet.java
[ "public class AllEntities {\n\tpublic AllProjectiles projectiles;\n\tAllItems items;\n\tAllTrees trees;\n\tpublic AllMobs mobs;\n\tAllFurnitures furnitures;\n\tpublic static Entity[][] entitymap;\n\tpublic static List<int[]> changeList = new ArrayList<int[]>();\n\tpublic static int treetype = 1;\n\tpublic static in...
import java.util.ArrayList; import com.badlogic.gdx.math.Rectangle; import com.badlogic.gdx.math.Vector2; import com.hexabeast.sandbox.AllEntities; import com.hexabeast.sandbox.Constants; import com.hexabeast.sandbox.GameScreen; import com.hexabeast.sandbox.HitBox; import com.hexabeast.sandbox.HitRect; import com.hexab...
{ for(int j = 0; j<colrects.size(); j++) { colrec.x = colrects.get(j).x-(GameScreen.player.PNJ.x+GameScreen.player.transoffx)+x; colrec.y = colrects.get(j).y-(GameScreen.player.PNJ.y+GameScreen.player.transoffy)+y; colrec.width = colrects.get(j).width; colrec.height = colrects.get(...
if(AllEntities.getType(Tools.floor((x+width/2)/16), Tools.floor((y+height/2)/16)) == AllEntities.mobtype)
0
MyGrades/mygrades-app
app/src/main/java/de/mygrades/view/adapter/UniversitiesAdapter.java
[ "public class MainServiceHelper {\n private Context context;\n\n public MainServiceHelper(Context context) {\n this.context = context.getApplicationContext();\n }\n\n /**\n * Start a worker thread to load all universities from the server.\n *\n * @param publishedOnly - only published ...
import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; import com.h6ah4i.android.widget.advrecyclerview.e...
} @Override public int getChildCount(int groupPosition) { return dataProvider.getChildCount(groupPosition); } @Override public long getGroupId(int groupPosition) { return dataProvider.getGroupItem(groupPosition).getGroupId(); } @Override public long getChildId(int ...
RuleItem ruleData = dataProvider.getChildItem(groupPosition, childPosition);
3
longkai/catnut
src/org/catnut/fragment/TimelineFragment.java
[ "public class CatnutApp extends Application {\n\n\tpublic static final String TAG = \"CatnutApp\";\n\n\t/** singleton */\n\tprivate static CatnutApp sApp;\n\t/** http request header for weibo' s access token */\n\tprivate static Map<String, String> sAuthHeaders;\n\n\tprivate RequestQueue mRequestQueue;\n\tprivate S...
import android.app.Activity; import android.app.Fragment; import android.app.LoaderManager; import android.content.Context; import android.content.SharedPreferences; import android.database.Cursor; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Bundle; import android.support.v...
/* * The MIT License (MIT) * Copyright (c) 2014 longkai * The software shall be used for good, not evil. */ package org.catnut.fragment; /** * 时间线 * * @author longkai */ public abstract class TimelineFragment extends Fragment implements ConfirmBarController.Callbacks, ConfirmBarController.ConfirmListener, S...
ColorSwicher.injectColor(mSwipeRefreshLayout);
6
dmfs/xmlobjects
test/org/dmfs/xml/objectpull/StringObjectBuilderTest.java
[ "public final class ElementDescriptor<T>\n{\n\tpublic final static XmlContext DEFAULT_CONTEXT = new XmlContext()\n\t{\n\t};\n\n\t/**\n\t * The {@link QualifiedName} of this element.\n\t */\n\tpublic final QualifiedName qualifiedName;\n\n\t/**\n\t * An {@link IObjectBuilder} for elements of this type.\n\t */\n\tpubl...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import org.dmfs.xmlobjects.ElementDescriptor; import org.dmfs.xmlobjects.QualifiedName; import org.dmfs.xmlobjects.XmlContext; import org.dmfs.xmlobjects.builder.IObjectBuilder; import org.dmfs.xmlobjects.builder.StringObjectBuilder...
package org.dmfs.xml.objectpull; public class StringObjectBuilderTest {
XmlContext testContext = new XmlContext();
2
eurohlam/rss2kindle
rss-2-kindle-web-test/src/test/java/org/roag/web/SubscribersPageTest.java
[ "public class LifecycleTestExtension implements BeforeAllCallback, BeforeEachCallback, AfterEachCallback, AfterAllCallback {\n\n @Override\n public void beforeAll(ExtensionContext extensionContext) throws Exception {\n //we ignore error message here that such user already exists\n to(SignUpPage....
import com.codeborne.selenide.Condition; import com.github.javafaker.Faker; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.roag.junit.LifecycleTestExtension; import org.roag.pages.ProfilePage; i...
package org.roag.web; @ExtendWith(LifecycleTestExtension.class) @DisplayName("Subscribers operations tests") @Tag("SUBSCRIBERS") public class SubscribersPageTest { private Faker faker = new Faker(); @Test @DisplayName("Testing creation of new subscriber") void addSubscriberTest() {
at(ProfilePage.class)
4
zhaque/my-wallpaper
src/com/koonen/photostream/RotationService.java
[ "public interface CropWallpaperExecutor {\r\n\tpublic void onPreExecute();\r\n\r\n\tpublic void onPostExecuteSuccess(final Intent intent);\r\n\r\n\tpublic void onPostExecuteError();\r\n\r\n\tpublic void onPostExecuteFinish();\r\n}\r", "public class Photo implements Parcelable, FlickrConstants {\n\t// private stat...
import java.util.Date; import java.util.Timer; import java.util.TimerTask; import android.app.Service; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.os.Handler; import android.os.IBinder; import...
package com.koonen.photostream; /** * * @author Glick * */ public class RotationService extends Service { private static final String LOG_TAG = RotationService.class .getCanonicalName(); private static final int INTERVAL = 30000; private UserTask<?, ?, ?> mTask; private Long prevEl...
private UserPreferences userPreferences = null;
6
dbasedow/prospecter
src/main/java/de/danielbasedow/prospecter/benchmark/IntegerIndexTest.java
[ "public enum MatchCondition {\n EQUALS,\n LESS_THAN,\n GREATER_THAN,\n LESS_THAN_EQUALS,\n GREATER_THAN_EQUALS,\n NONE,\n IN,\n RADIUS\n}", "public class Matcher {\n protected final TIntObjectHashMap<BitSet> hits = new TIntObjectHashMap<BitSet>();\n protected final TIntObjectHashMap<...
import de.danielbasedow.prospecter.core.MatchCondition; import de.danielbasedow.prospecter.core.Matcher; import de.danielbasedow.prospecter.core.Token; import de.danielbasedow.prospecter.core.document.Field; import de.danielbasedow.prospecter.core.index.IntegerIndex; import de.danielbasedow.prospecter.core.query.QueryM...
package de.danielbasedow.prospecter.benchmark; public class IntegerIndexTest { public static void main(String[] args) { IntegerIndex index = new IntegerIndex("foo"); System.out.print((new Date()).getTime()); System.out.println(" start filling index"); fillIndex(index, 1000000, Mat...
Matcher matcher = new Matcher(new QueryManager());
1
jillesvangurp/jsonj
src/test/java/com/github/jsonj/JsonSetTest.java
[ "public static JsonPrimitiveAssert assertThat(JsonPrimitive primitive) {\n return new JsonPrimitiveAssert(primitive);\n}", "public static @Nonnull JsonArray array() {\n return new JsonArray();\n}", "public static @Nonnull Entry<String,JsonElement> field(String key, JsonElement value) {\n Entry<String, ...
import static com.github.jsonj.assertions.JsonJAssertions.assertThat; import static com.github.jsonj.tools.JsonBuilder.array; import static com.github.jsonj.tools.JsonBuilder.field; import static com.github.jsonj.tools.JsonBuilder.nullValue; import static com.github.jsonj.tools.JsonBuilder.object; import static com.git...
package com.github.jsonj; @Test public class JsonSetTest { public void shouldAddNoDuplicateStrings() { JsonSet set = new JsonSet(); set.add("42"); set.add("42"); assertThat(set.size(), is(1)); } public void shouldAddNoDuplicateStringsVarargs() { JsonSet set = new ...
set.add(primitive("42"), primitive("42"), primitive("43"));
5
MHAVLOVICK/Sketchy
src/main/java/com/sketchy/server/action/RenderImage.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 java.io.File; import javax.servlet.http.HttpServletRequest; import com.sketchy.SketchyContext; import com.sketchy.image.ImageAttributes; import com.sketchy.image.ImageProcessingThread; import com.sketchy.image.RenderedImageAttributes; import com.sketchy.server.HttpServer; import com.sketchy.server.JSONServletRes...
/* 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...
HttpServer.imageProcessingThread = new ImageProcessingThread(renderImageAttributes);
2
chedim/minedriod
src/main/java/com/onkiup/minedroid/gui/overlay/Confirm.java
[ "@Mod(\n modid = MineDroid.MODID,\n version = MineDroid.VERSION,\n guiFactory = \"com.onkiup.minedroid.config.GuiFactory\"\n)\npublic class MineDroid extends Modification {\n public static final String MODID = \"minedroid\";\n public static final String VERSION = \"1.3.2\";\n\n protect...
import com.onkiup.minedroid.MineDroid; import com.onkiup.minedroid.Context; import com.onkiup.minedroid.R; import com.onkiup.minedroid.gui.Notification; import com.onkiup.minedroid.gui.NotificationManager; import com.onkiup.minedroid.gui.events.KeyEvent; import com.onkiup.minedroid.gui.views.*; import net.minecraft.uti...
package com.onkiup.minedroid.gui.overlay; /** * Created by chedim on 8/5/15. */ public class Confirm extends Notification { protected String message; protected Handler handler; protected View.OnKeyPress keyListener = new View.OnKeyPress() { @Override
public void handle(KeyEvent event) {
5
AlbinoDrought/party-reader
app/src/main/java/party/minge/reddit/DetailedPostItemView.java
[ "abstract public class DialogReplyListener implements Replier.ReplyListener {\n private Context context;\n private String title;\n\n public DialogReplyListener(Context context, String title) {\n this.context = context;\n this.title = title;\n }\n\n @Override\n public void onFailure(E...
import android.content.Context; import android.text.format.DateUtils; import android.text.method.LinkMovementMethod; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.bumptech.glide.Glide; import com.joanzapata.iconify.widget.IconBu...
package party.minge.reddit; @EViewGroup(R.layout.detailed_post_item) public class DetailedPostItemView extends LinearLayout { @Bean protected Manager manager; @ViewById protected TextView txtPostTitle; @ViewById protected TextView txtPostSubtext; @ViewById protected TextView t...
protected MarkdownParser markdownParser;
2
ragdroid/Dahaka
app/src/main/java/com/ragdroid/dahaka/activity/home/HomeModule.java
[ "public interface MovesContract {\n\n interface View extends BaseView {\n\n void showModel(MovesModel statsModel);\n }\n\n interface Presenter extends BasePresenter<View> {\n\n }\n\n}", "public class MovesFragment extends BaseFragment<MovesContract.Presenter> implements MovesContract.View {\n\n...
import com.ragdroid.dahaka.activity.home.moves.MovesContract; import com.ragdroid.dahaka.activity.home.moves.MovesFragment; import com.ragdroid.dahaka.activity.home.moves.MovesPresenter; import com.ragdroid.dahaka.activity.home.profile.ProfileContract; import com.ragdroid.dahaka.activity.home.profile.ProfileFragment; i...
package com.ragdroid.dahaka.activity.home; /** * Created by garimajain on 17/08/17. */ @Module public abstract class HomeModule { @ContributesAndroidInjector
abstract ProfileFragment profileFragment();
4
irengrig/fossil4idea
src/org/github/irengrig/fossil4idea/FossilVcs.java
[ "public class FossilCheckinEnvironment implements CheckinEnvironment {\n private final FossilVcs myFossilVcs;\n // don't like it, but because of platform design\n private boolean myPush;\n\n public FossilCheckinEnvironment(final FossilVcs fossilVcs) {\n myFossilVcs = fossilVcs;\n }\n\n @Nullable\n @Overri...
import com.intellij.openapi.options.Configurable; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.vcs.AbstractVcs; import com.intellij.openapi.vcs.ProjectLevelVcsManager; import com.intellij.openapi.vcs.VcsKey; import com.intellij.openapi.vcs.annotate....
package org.github.irengrig.fossil4idea; /** * Created with IntelliJ IDEA. * User: Irina.Chernushina * Date: 2/12/13 * Time: 10:35 AM */ public class FossilVcs extends AbstractVcs { public static String NAME = "fossil"; public static String DISPLAY_NAME = "Fossil"; private FossilChangeProvider myChangePro...
private UiManager uiManager;
4
free-iot/freeiot-android
app/src/main/java/com/pandocloud/freeiot/ui/urlconfig/UrlConfigActivity.java
[ "public class SplashActivity extends BaseActivity {\n\n private Handler mHandler = new Handler();\n private boolean mBackPressed = false;\n\n @Override\n protected void onCreate(Bundle savedInstances) {\n super.onCreate(savedInstances);\n\n setContentView(R.layout.activity_splash);\n\n ...
import android.app.AlarmManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.Radio...
package com.pandocloud.freeiot.ui.urlconfig; public class UrlConfigActivity extends BaseActivity implements OnClickListener { public static final int URL_CONFIG_REQUEST_CODE = 1 << 2; private TextView mApiHostUrlView; private RadioGroup mUrlRadioGroup; private RadioButton mDevRadioBtn, mPreProductRadioBt...
Intent mStartActivity = new Intent(this, SplashActivity.class);
0
connect-group/thymesheet
src/main/java/com/connect_group/thymesheet/css/selectors/scanner/Scanner.java
[ "public class Selector {\n \n /** The universal tag name (i.e. {@code *}). */\n public static final String UNIVERSAL_TAG = \"*\";\n \n /**\n * Combinators\n * \n * @see <a href=\"http://www.w3.org/TR/css3-selectors/#combinators\">Combinators description</a>\n */\n public static enu...
import java.util.LinkedList; import java.util.List; import com.connect_group.thymesheet.css.selectors.Selector; import com.connect_group.thymesheet.css.selectors.Specifier; import com.connect_group.thymesheet.css.selectors.specifier.AttributeSpecifier; import com.connect_group.thymesheet.css.selectors.specifier.Negatio...
_trans = _Scanner_indicies[_trans]; cs = _Scanner_trans_targs[_trans]; if ( _Scanner_trans_actions[_trans] != 0 ) { _acts = _Scanner_trans_actions[_trans]; _nacts = (int) _Scanner_actions[_acts++]; while ( _nacts-- > 0 ) { switch ( _Scanner_actions[_acts++] ) { case 0: // line 44 "Scanner.java.rl" {...
specifiers.add(new NegationSpecifier(negationSelector));
3
kesenhoo/Camera2
src/com/adobe/xmp/XMPMetaFactory.java
[ "public class XMPMetaImpl implements XMPMeta, XMPConst\n{\n\t/** Property values are Strings by default */\n\tprivate static final int VALUE_STRING = 0;\n\t/** */\n\tprivate static final int VALUE_BOOLEAN = 1;\n\t/** */\n\tprivate static final int VALUE_INTEGER = 2;\n\t/** */\n\tprivate static final int VALUE_LONG ...
import java.io.InputStream; import java.io.OutputStream; import com.adobe.xmp.impl.XMPMetaImpl; import com.adobe.xmp.impl.XMPMetaParser; import com.adobe.xmp.impl.XMPSchemaRegistryImpl; import com.adobe.xmp.impl.XMPSerializerHelper; import com.adobe.xmp.options.ParseOptions; import com.adobe.xmp.options.SerializeOption...
//================================================================================================= //ADOBE SYSTEMS INCORPORATED //Copyright 2006-2007 Adobe Systems Incorporated //All Rights Reserved // //NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms //of the Adobe lic...
public static void serialize(XMPMeta xmp, OutputStream out, SerializeOptions options)
4
speedingdeer/linked-data-visualization-tools
src/main/java/es/upm/fi/dia/oeg/map4rdf/server/inject/BrowserActionHandlerModule.java
[ "public class GetFacetDefinitionsHandler implements ActionHandler<GetFacetDefinitions, GetFacetDefinitionsResult> {\n\n\tprivate final Map4rdfDao dao;\n\tprivate final FacetedBrowserConfiguration facetedBrowserConfiguration;\n\tprivate final boolean automaticFacets;\n \n \n\t@Inject\n\tpublic GetFacetDefiniti...
import es.upm.fi.dia.oeg.map4rdf.server.command.GetGeoResourcesAsKmlUrlHandler; import es.upm.fi.dia.oeg.map4rdf.server.command.GetGeoResourcesHandler; import es.upm.fi.dia.oeg.map4rdf.server.command.GetStatisticDatasetsHandler; import es.upm.fi.dia.oeg.map4rdf.server.command.GetStatisticYearsHandler; import es.upm.fi....
/** * Copyright (c) 2011 Ontology Engineering Group, * Departamento de Inteligencia Artificial, * Facultad de Informetica, Universidad * Politecnica de Madrid, Spain * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Sof...
bindHandler(GetGeoResourceOverlaysHandler.class);
2
RawLauncher/RawLauncher
app/src/main/java/com/sjcqs/rawlauncher/items/shortcuts/ShortcutsLoader.java
[ "public abstract class Item implements Shortcutable {\n\n public static final Comparator<? super Item> ALPHA_COMPARATOR = new Comparator<Item>() {\n private final Collator COLLATOR = Collator.getInstance(Locale.getDefault());\n\n @Override\n public int compare(Item app1, Item app2) {\n ...
import android.content.Context; import android.content.SharedPreferences; import android.os.Handler; import android.preference.PreferenceManager; import android.util.Log; import com.sjcqs.rawlauncher.R; import com.sjcqs.rawlauncher.items.Item; import com.sjcqs.rawlauncher.items.ItemLoader; import com.sjcqs.rawlauncher....
package com.sjcqs.rawlauncher.items.shortcuts; /** * Created by satyan on 9/5/17. */ class ShortcutsLoader extends ItemLoader { private static final String TAG = ShortcutsLoader.class.getName(); private final AppManager appManager; ShortcutsLoader(Context context, AppManager appManager) { su...
AppStats stats = new AppStats((App) app, count, time);
2
lijunyandev/MeetMusic
app/src/main/java/com/lijunyan/blackmusic/activity/PlaylistActivity.java
[ "public class PlaylistAdapter extends RecyclerView.Adapter<PlaylistAdapter.ViewHolder> {\n\n private static final String TAG = PlaylistAdapter.class.getName();\n private List<MusicInfo> musicInfoList;\n private Context context;\n private DBManager dbManager;\n private PlayListInfo playListInfo;\n ...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.support.design.widget.CollapsingToolbarLayout; import android.support.v7.app.ActionBar; import android.support.v7.widget.LinearLayoutMana...
private void initView(){ recyclerView = (RecyclerView)findViewById(R.id.activity_playlist_rv); playlistAdapter = new PlaylistAdapter(this,playListInfo,musicInfoList); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); recyclerView.setLayoutManager(linearLayoutMa...
intentFilter.addAction(PlayerManagerReceiver.ACTION_UPDATE_UI_ADAPTER);
4
xdevs23/Cornowser
app/src/main/java/io/xdevs23/cornowser/browser/activity/SettingsActivity.java
[ "public class XquidCompatActivity extends AppCompatActivity {\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n Logging.logd(\"INIT START\");\n super.onCreate(savedInstanceState);\n\n // Logging.logd only logs to logcat if debug mode is enabled\n // Disable deb...
import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceFragment; import android.preference.SwitchPreference; import android.suppor...
super.onCreate(savedInstanceState); addPreferencesFromResource(R.xml.settings_preferences); homePagePref = findPreference(KEY_USERHOMEPAGE); adblockPref = findPreference(KEY_GO_ADBLOCK); lastSessionPref = (SwitchPreference) findPreference(KEY_LAS...
.saveColorMode(RenderColorMode
8
CloudWise-OpenSource/SAPNetworkMonitor
server/src/main/java/com/cloudwise/sap/niping/resource/MonitorResource.java
[ "@Data\n@Builder\npublic class OAuthUser extends UserPrincipal {\n private String accountId;\n private String name;\n}", "@Data\n@Builder\n@EqualsAndHashCode(callSuper = true)\n@JsonIgnoreProperties(ignoreUnknown = true)\npublic class Monitor extends AbstractEntity {\n\n private static final long serialV...
import com.cloudwise.sap.niping.auth.OAuthUser; import com.cloudwise.sap.niping.common.entity.Monitor; import com.cloudwise.sap.niping.common.entity.MonitorJob; import com.cloudwise.sap.niping.common.vo.RestfulReturnResult; import com.cloudwise.sap.niping.exception.NiPingException; import com.cloudwise.sap.niping.filte...
package com.cloudwise.sap.niping.resource; @Slf4j @Path("/api/monitors") @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public class MonitorResource { @Inject private MonitorService monitorService; @Inject private TaskService taskService; /** * Agent和Server之间的...
return new RestfulReturnResult(new NiPingException(MonitoridNotMatchError), null);
4
sdenier/GecoSI
src/test/net/gecosi/dataframe/Si11DataFrameTest.java
[ "public final static SiMessage sicard11_b0_data = new SiMessage(new byte[] {\n\t\t0x02, (byte) 0xEF, (byte) 0x83, 0x00, 0x01, 0x00, (byte) 0xB2, 0x23, (byte) 0xE1, (byte) 0x98, (byte) 0xEA, (byte) 0xEA, (byte) 0xEA,\n\t\t(byte) 0xEA, (byte) 0xEE, (byte) 0xEE, (byte) 0xEE, (byte) 0xEE, (byte) 0xEE, (byte) 0xEE, (byt...
import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; import static test.net.gecosi.SiMessageFixtures.sicard11_b0_data; import static test.net.gecosi.SiMessageFixtures.sicard11_b4_data; import static test.net.gecosi.SiMessageFixtures.sicard11_b5_data; import static test.net.gecosi....
/** * Copyright (c) 2013 Simon Denier */ package test.net.gecosi.dataframe; /** * @author Simon Denier * @since Apr 21, 2013 * */ public class Si11DataFrameTest { @Test public void getSiCardNumber() { assertThat(subject9993810().getSiNumber(), equalTo("9993810")); } @Test public void getSiCardSeries(...
sicard11_b0_data, sicard11_b4_data, sicard11_b5_data, sicard11_b6_data, sicard11_b7_data}).startingAt(0);
0
absimas/VideoClipper
app/src/main/java/com/simas/vc/editor/tree_view/AttributeTreeAdapter.java
[ "public class AudioStream extends Stream {\n\n\tpublic static final String ATTRIBUTE_CHANNEL_COUNT = \"Channel count\";\n\tpublic static final String ATTRIBUTE_SAMPLE_RATE = \"Sample rate\";\n\n\t/**\n\t * Values are displayed to the user in a specific order. This order is saved in an ArrayList.\n\t * Index 0 will ...
import com.simas.vc.helpers.Utils; import com.simas.vc.nav_drawer.NavItem; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import android.graphics.Color; import android.graphics.PorterDuff; import android.support.v4.util.Pair; import android.util.Log; import android.vi...
/* * Copyright (c) 2015. Simas Abramovas * * This file is part of VideoClipper. * * VideoClipper 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...
root.setText(Utils.getString(R.string.audio));
3
mpsonic/Evolve-Workout-Logger
app/src/main/java/edu/umn/paull011/evolveworkoutlogger/activities/ViewRoutine.java
[ "public class DatabaseHelper extends SQLiteAssetHelper {\n\n // TODO: Implement way to store and sort exercises by category\n\n public static synchronized DatabaseHelper getInstance(Context context) {\n Log.d(TAG,\"getInstance\");\n if (mInstance == null) {\n if (context != null) {\n ...
import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.FragmentManager; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android...
package edu.umn.paull011.evolveworkoutlogger.activities; public class ViewRoutine extends AppCompatActivity implements RoutineExercisesFragment.OnFragmentInteractionListener, RoutineHistoryFragment.OnFragmentInteractionListener{ private Routine mRoutine; private RoutineStats mRoutineStats; ...
DatabaseHelper db = DatabaseHelper.getInstance(this);
0
b3dgs/warcraft-remake
warcraft-game/src/main/java/com/b3dgs/warcraft/world/WorldMinimap.java
[ "public final class Player implements Updatable\r\n{\r\n /**\r\n * Curve resource value.\r\n * \r\n * @param current The current resource value.\r\n * @param dest The destination resource value.\r\n * @return The curved value.\r\n */\r\n private static double curve(double current, int ...
import com.b3dgs.warcraft.constant.Constant; import com.b3dgs.warcraft.object.EntityModel; import com.b3dgs.warcraft.object.feature.EntityStats; import com.b3dgs.warcraft.object.feature.Warehouse; import com.b3dgs.lionengine.Resource; import com.b3dgs.lionengine.game.feature.Camera; import com.b3dgs.lionengine.ga...
/* * Copyright (C) 2013-2022 Byron 3D Games Studio (www.b3dgs.com) Pierre-Alexandre (contact@b3dgs.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 Licen...
for (final EntityStats entity : handler.get(EntityStats.class))
3
JCERTIFLab/jcertif-android-2013
src/main/java/com/jcertif/android/service/DataUpdaterService.java
[ "public class MainActivity extends SherlockFragmentActivity implements LoginFragment.OnSignedInListener,\n\t\tRefentielDataLodedListener, PullToRefreshAttacher.OnRefreshListener {\n\n\tprivate DrawerLayout mDrawerLayout;\n\tprivate ListView mDrawerList;\n\tprivate ActionBarDrawerToggle mDrawerToggle;\n\n\tprivate C...
import java.util.Arrays; import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.jcertif.android.MainActivity; import com.jcertif.android.R; import com.jcertif.android.dao.CategorieProvider; import com.jcertif.android.dao.SessionProvider; import com.jcertif.android.dao.Speaker...
/* * Copyright 2013 JCertifLab. * * 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...
List<Category> cat = parseCategoryJson(result);
6
OpenBEL/cytoscape-plugins
org.openbel.cytoscape.navigator/src/org/openbel/cytoscape/navigator/task/AddNodesEdgesTask.java
[ "public interface KamService {\n\n /**\n * Reloads the {@link ClientConnector} in this {@link KamService}\n */\n void reloadClientConnector();\n\n /**\n * Finds {@link KamNode KamNodes} by a {@link List} of\n * {@link NamespaceValue NamespaceValues} and optional {@link NodeFilter\n * no...
import org.openbel.framework.ws.model.KamEdge; import org.openbel.framework.ws.model.KamNode; import cytoscape.CyNetwork; import cytoscape.CyNode; import cytoscape.Cytoscape; import cytoscape.layout.CyLayoutAlgorithm; import cytoscape.layout.CyLayouts; import cytoscape.task.Task; import cytoscape.view.CyNetworkView; im...
/* * KAM Navigator Plugin * * URLs: http://openbel.org/ * Copyright (C) 2012, Selventa * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at...
private final KamService kamService;
0
xedin/sasi
src/java/org/apache/cassandra/db/index/sasi/conf/view/PrefixTermTree.java
[ "public class SSTableIndex\n{\n private final ColumnIndex columnIndex;\n private final SSTableReader sstable;\n private final OnDiskIndex index;\n private final AtomicInteger references = new AtomicInteger(1);\n private final AtomicBoolean obsolete = new AtomicBoolean(false);\n\n public SSTableInd...
import org.apache.cassandra.utils.IntervalTree; import com.google.common.collect.Sets; import java.nio.ByteBuffer; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.apache.cassandra.db.index.sasi.SSTableIndex; import org.apache.cassandra.db.index.sasi.disk.OnDiskIndexBuilder; import org.a...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
public Set<SSTableIndex> search(Expression e)
2
segator/proxylive
src/main/java/com/github/segator/proxylive/service/PrometheusMetrics.java
[ "public class ProxyLiveUtils {\n\n private static Pattern pattern = Pattern.compile(\"^(tvh|hls|dash)(s)?:\\\\/\\\\/(.+)$\");\n public static String getOS() {\n\n String OS = System.getProperty(\"os.name\").toLowerCase();\n\n if (OS.contains(\"win\")) {\n return \"win\";\n } el...
import com.github.segator.proxylive.ProxyLiveUtils; import com.github.segator.proxylive.entity.ClientInfo; import com.github.segator.proxylive.processor.IStreamProcessor; import com.github.segator.proxylive.tasks.DirectTranscodeTask; import com.github.segator.proxylive.tasks.IStreamTask; import com.github.segator.proxy...
package com.github.segator.proxylive.service; @Component public class PrometheusMetrics implements MeterBinder { private final StreamProcessorsSession streamProcessorsSession;
private final ProcessorTasks tasksProcessor;
5
apatry/neo4j-lucene4-index
src/test/java/org/neo4j/index/impl/lucene/TestLuceneIndex.java
[ "public class QueryContext\n{\n private final Object queryOrQueryObject;\n private Sort sorting;\n private QueryParser.Operator defaultOperator;\n private boolean tradeCorrectnessForSpeed;\n private int topHits;\n \n public QueryContext( Object queryOrQueryObject )\n {\n this.queryOrQ...
import org.apache.lucene.index.Term; import org.apache.lucene.queryparser.classic.QueryParser; import org.apache.lucene.search.BooleanClause.Occur; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.NumericRangeQuery; import org.apache.lucene.search.Sort; import org.apache.lucene.search.TermQ...
/** * Copyright (c) 2002-2014 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 Foundati...
assertThat( index.get( key, value ), isEmpty() );
5
SQLPower/power-architect
src/main/java/ca/sqlpower/architect/swingui/olap/MeasureEditPanel.java
[ "public class OLAPUtil {\n \n private static final Logger logger = Logger.getLogger(OLAPUtil.class);\n\n private OLAPUtil() {\n throw new AssertionError(\"Don't instantiate this class\");\n }\n\n /**\n * Finds the OLAPSession that owns the given OLAPObject, by following parent\n * poin...
import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.ButtonGroup; import javax.swing.JComboBox; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JScrollPane; import javax.swing.JTextArea; import j...
/* * Copyright (c) 2008, SQL Power Group Inc. * * This file is part of Power*Architect. * * Power*Architect 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 you...
MeasureExpression mExp = measure.getMeasureExp();
3
upnext/blekit-android
src/main/java/com/upnext/blekit/ActionsFactory.java
[ "public class AlertAction extends BLEAction<AlertActionParams> {\n\n public static final int NOTIFICATION_ID = 2414234;\n\n public static final String TYPE = \"alert\";\n\n /**\n * {@inheritDoc}\n */\n @Override\n public String getType() {\n return TYPE;\n }\n\n /**\n * {@inh...
import com.upnext.blekit.actions.YelpAction; import com.upnext.blekit.actions.facebook.FacebookCheckinAction; import com.upnext.blekit.actions.foursquare.FoursquareCheckinAction; import com.upnext.blekit.util.JsonParser; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.databind.JsonNode; imp...
/* * Copyright (c) 2014 UP-NEXT. All rights reserved. * http://www.up-next.com * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the...
ContentAction contentAction = new ContentAction();
2
decatur/j2js-compiler
src/main/java/com/j2js/cfg/ControlFlowGraph.java
[ "public class ASTNodeStack extends ArrayList<ASTNode> {\n \n public ASTNodeStack() {\n super();\n }\n \n public ASTNodeStack(ASTNodeStack other) {\n\t super(other);\n }\n \n public ASTNodeStack(Expression expression) {\n super();\n push(expression);\n }\n \n\tpu...
import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.SortedMap; import java.util.TreeMap; import com.j2js.ASTNodeStack; import com.j2js.cfg.transformation.Transformation; import com.j2js.dom.ASTNode; import com.j2js.dom.Blo...
package com.j2js.cfg; /** * Instances of this class represent a Control Flow Graph CFG. */ public class ControlFlowGraph extends Graph { // Ordering is only used by method getNodeAt(). private SortedMap<Integer, Node> nodesByPc = new TreeMap<Integer, Node>(); // The single entry point of control....
Block block = tryStmt.getTryBlock();
3
AEnterprise/Eureka
src/main/java/eureka/gui/Widgets/WidgetChapter.java
[ "public interface IEurekaInfo {\n\n\tString getCategory();\n\n\tint getMaxProgress();\n\n\tItemStack getDisplayStack();\n\n\tString getName();\n\n\tList<String> getRequiredResearch();\n}", "public class Logger {\n\n\tpublic static final org.apache.logging.log4j.Logger logger = LogManager.getLogger(\"Eureka\");\n\...
import java.util.List; import org.lwjgl.opengl.GL11; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; import eureka.api.IEurekaInfo; import eureka.core.Logger; import eureka.core.RenderUtils; import eureka.core.TextGetter; import eu...
package eureka.gui.Widgets; /** * Copyright (c) 2014-2015, AEnterprise * http://buildcraftadditions.wordpress.com/ * Eureka is distributed under the terms of GNU GPL v3.0 * Please check the contents of the license located in * http://buildcraftadditions.wordpress.com/wiki/licensing-stuff/ */ public class Widg...
RenderUtils.drawImage(selected ? SELECTED : UNSELECTED, x, y, width, height);
2
EyeTribe/tet-java-client
sdk/src/test/java/com/theeyetribe/test/TestApiClient.java
[ "public class Point2D\n{\n public float x;\n public float y;\n\n public static final float EPSILON = 1e-005f;\n\n public static final Point2D ZERO = new Point2D();\n\n public Point2D()\n {\n }\n\n public Point2D(float x, float y)\n {\n this.x = x;\n this.y = y;\n }\n\n ...
import com.google.gson.Gson; import com.theeyetribe.clientsdk.*; import com.theeyetribe.clientsdk.data.CalibrationResult; import com.theeyetribe.clientsdk.data.CalibrationResult.CalibrationPoint; import com.theeyetribe.clientsdk.data.GazeData; import com.theeyetribe.clientsdk.data.Point2D; import com.theeyetribe.client...
package com.theeyetribe.test; /** * Test cases related to TET Java Client */ public class TestApiClient { private CountDownLatch lock = new CountDownLatch(1); @Test public void testGazeData() { Gson gson = new Gson(); Random r = new Random(); GazeData gd = new GazeData()...
Request request = new Request(Response.class);
1
ahammer/StockSimulator
android/src/com/metalrain/stocksimulator/android/views/OrderView.java
[ "public class StockSimulator extends Application {\n\n private GameState state;\n\n private static StockSimulator instance;\n\n public static GameState getGameState() {\n return instance.state;\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n instance = this;...
import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.FrameLayout; import android.widget.TextView; import com.metalrain.stocksimulator.android.StockSimulator; imp...
package com.metalrain.stocksimulator.android.views; /** * Created by Adam Hammer on 15-06-25. */ public class OrderView extends FrameLayout { @InjectView(R.id.market_item_name) TextView marketItemName; @InjectView(R.id.quantity) EditText quantity; @InjectView(R.id.button_increase_quantity) ...
Integer orig_quantity = inventoryComponent.inventory.get(marketItemEntity.getComponent(NameComponent.class));
3
iChun/Sync
src/main/java/me/ichun/mods/sync/common/tileentity/TileEntityDualVertical.java
[ "@SideOnly(Side.CLIENT)\npublic class SyncSkinManager {\n //Cache skins throughout TEs to avoid hitting the rate limit for skin session servers\n //Hold values for a longer time, so they are loaded fast if many TEs with the same player are loaded, or when loading other chunks with the same player\n //Skin ...
import io.netty.buffer.ByteBuf; import me.ichun.mods.ichunutil.common.core.util.EntityHelper; import me.ichun.mods.sync.client.core.SyncSkinManager; import me.ichun.mods.sync.common.Sync; import me.ichun.mods.sync.common.block.BlockDualVertical; import me.ichun.mods.sync.common.packet.PacketNBT; import me.ichun.mods.sy...
NBTTagCompound tag = new NBTTagCompound(); //Setup location for dummy EntityPlayerMP dummy = setupDummy(player); dummy.inventory.clear(); //Set data d...
BlockDualVertical.renderPass = pass;
2
ailab-uniud/distiller-CORE
src/main/java/it/uniud/ailab/dcore/annotation/annotators/WikipediaInferenceAnnotator.java
[ "public class AnnotationException extends RuntimeException {\n \n public AnnotationException(Annotator sender, String message) {\n super(\"Error while annotating\\n\\t\" + \n \"Annotator \" + sender.getClass().getName() + \n \" caused an exception with message:\\n\\t\" + m...
import static it.uniud.ailab.dcore.annotation.annotators.GenericWikipediaAnnotator.WIKIFLAG; import static it.uniud.ailab.dcore.annotation.annotators.GenericEvaluatorAnnotator.SCORE; import it.uniud.ailab.dcore.annotation.AnnotationException; import it.uniud.ailab.dcore.annotation.annotations.InferenceAnnotation; i...
/* * Copyright (C) 2015 Artificial Intelligence * Laboratory @ University of Udine. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your...
WikipediaUtils.generateWikiUri(hypernym.getKey(),
7
theangrydev/fluent-bdd
all/src/test/java/acceptance/PullsInAllModulesTest.java
[ "public interface Documentation {}", "@SuppressWarnings(\"PMD\")\npublic interface WithFluentAssertJ<TestResult> extends WithFluentBdd<TestResult> {\n\tDelegateWithAssertions DELEGATE = new DelegateWithAssertions();\n\n\t/**\n\t * Delegate call to {@link org.assertj.core.api.Assertions#offset(Float)}\n\t */\n\tde...
import io.github.theangrydev.fluentbdd.Documentation; import io.github.theangrydev.fluentbdd.assertj.WithFluentAssertJ; import io.github.theangrydev.fluentbdd.core.FluentBdd; import io.github.theangrydev.fluentbdd.hamcrest.WithFluentHamcrest; import io.github.theangrydev.fluentbdd.mockito.FluentMockito; import io.githu...
/* * Copyright 2016 Liam Williams <liam.williams@zoho.com>. * * This file is part of fluent-bdd. * * 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/L...
assertNotNull(Documentation.class);
0
danielsomerfield/go-strong-auth-plugin
src/main/java/com/thoughtworks/go/strongauth/authentication/principalDetailSources/ConfigFileMonitor.java
[ "public interface ConfigurationChangeListener extends MonitorListener<ConfigurationChangedEvent> {}", "@Value\npublic class ConfigurationChangedEvent {\n private final Optional<PluginConfiguration> pluginConfiguration;\n}", "public class ConfigurationMonitor implements ChangeMonitorDelegate<ConfigurationChan...
import com.google.common.base.Optional; import com.thoughtworks.go.strongauth.config.ConfigurationChangeListener; import com.thoughtworks.go.strongauth.config.ConfigurationChangedEvent; import com.thoughtworks.go.strongauth.config.ConfigurationMonitor; import com.thoughtworks.go.strongauth.config.PluginConfiguration; i...
package com.thoughtworks.go.strongauth.authentication.principalDetailSources; public class ConfigFileMonitor implements InputStreamSource { private final ConfigurationMonitor configurationMonitor;
private Optional<FileChangeMonitor> maybeFileChangeMonitor = Optional.absent();
5
allfro/BurpKit
src/main/java/com/redcanari/ui/WebKitBrowser.java
[ "public class BurpExtender implements IBurpExtender, IMessageEditorTabFactory, IContextMenuFactory, ITab {\n private static IBurpExtenderCallbacks callbacks;\n private IExtensionHelpers helpers;\n private Tainter tainter;\n private final WebKitBrowser webKitBrowser = new WebKitBrowser(true);\n\n //\n...
import burp.BurpExtender; import burp.IMessageEditorController; import com.dlsc.trafficbrowser.beans.Traffic; import com.dlsc.trafficbrowser.scene.control.TrafficBrowser; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.redcanari.js.BurpExtenderCallbac...
/* * BurpKit - WebKit-based penetration testing plugin for BurpSuite * Copyright (C) 2015 Red Canari, Inc. * * 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 Licens...
private BurpKitBridge javaScriptHelpers;
3
HumBuch/HumBuch
src/test/java/de/dhbw/humbuch/view/LendingViewTest.java
[ "public class GuiceJUnitRunner extends BlockJUnit4ClassRunner {\n\tprivate Injector injector;\n\n\t/**\n\t * Specifies the Guice {@link Module} classes which should be used when\n\t * injecting a JUnit test class\n\t */\n\t@Target(ElementType.TYPE)\n\t@Retention(RetentionPolicy.RUNTIME)\n\t@Inherited\n\tpublic @int...
import org.junit.runner.RunWith; import com.google.inject.Inject; import de.dhbw.humbuch.guice.GuiceJUnitRunner; import de.dhbw.humbuch.guice.TestModule; import de.dhbw.humbuch.guice.GuiceJUnitRunner.GuiceModules; import de.dhbw.humbuch.model.DAO; import de.dhbw.humbuch.model.entity.TestPersistenceInitialiser; import d...
package de.dhbw.humbuch.view; @RunWith(GuiceJUnitRunner.class) @GuiceModules({ TestModule.class }) public class LendingViewTest extends BaseTest { @Inject public void setInjected(MVVMConfig mvvmConfig, TestPersistenceInitialiser testPersistenceInitialiser, LendingView view,
Properties properties, DAO<User> daoUser) {
5
rapidpro/surveyor
app/src/main/java/io/rapidpro/surveyor/activity/LoginActivity.java
[ "public class Logger {\n\n private static final String TAG = \"Surveyor\";\n\n public static void e(String message, Throwable t) {\n Log.e(TAG, message, t);\n }\n\n public static void w(String message) {\n Log.w(TAG, message);\n }\n\n public static void d(String message) {\n L...
import android.Manifest; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.KeyEvent; import android.view.View; import android.view.View.OnClickListener; import android.view.inpu...
package io.rapidpro.surveyor.activity; /** * A login screen that offers login via email/password. */ public class LoginActivity extends BaseActivity { // UI references. private AutoCompleteTextView m_emailView; private EditText m_passwordView; private View m_progressView; private View m_log...
m_emailView.setText(getPreferences().getString(SurveyorPreferences.PREV_USERNAME, ""));
2
reinra/dynaform
src/main/java/org/dynaform/dynadata/DynaDataAttributes.java
[ "public interface Form {\r\n \r\n String HL_CHILD = \"/\";\r\n String HL_DESCENDANT_OR_SELF = \"//\";\r\n String LL_CHILD = \"!\";\r\n String LL_DESCENDANT_OR_SELF = \"!!\";\r\n String INDEX_START = \"[\";\r\n String INDEX_END = \"]\";\r\n String OPERATOR_SEQUENCE = \"sequence\";\r\n String OPERATOR_CHOICE...
import org.dynaform.xml.form.Form; import org.dynaform.xml.form.FormAll; import org.dynaform.xml.form.FormChoice; import org.dynaform.xml.form.FormElement; import org.dynaform.xml.form.FormFunction; import org.dynaform.xml.form.FormRepeat; import org.dynaform.xml.form.FormSection; import org.dynaform.xml.form.Fo...
if (controlStr == null) return null; if (Control.Input.class.getSimpleName().equalsIgnoreCase(controlStr)) { return new InputImpl(); } if (Control.Text.class.getSimpleName().equalsIgnoreCase(controlStr)) { TextImpl text = new TextImpl(); if (params.containsKey(SIZE)) tex...
public <F extends Form> DynaDataAttributes section(FormSection<F> section) {
4
XiaoMi/misound
src/com/xiaomi/mitv/soundbarapp/WrapperActivity.java
[ "public class DiagnosisFragment extends BaseFragment implements View.OnClickListener {\n private ViewWrapper mUIContainer;\n private Engine mEngine;\n private OnListener mListener;\n private View mMainView;\n private SoundBarCheckTask mCheckTask;\n\n public interface OnListener{\n void goBa...
import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.text.TextUtils; import com.umeng.analytics.MobclickAgent; import com.xiaomi.mitv.idata.client.app.A...
package com.xiaomi.mitv.soundbarapp; /** * Created by chenxuetong on 8/21/14. */ public class WrapperActivity extends FragmentActivity { public static final String FRAGMENT_UPGRADE = "upgrade"; public static final String FRAGMENT_SETTINGS = "settings"; public static final String FRAGMENT_EQ = "eq"; ...
private BaseFragment mFragement;
4
Gocnak/Botnak
src/main/java/thread/heartbeat/FollowCheck.java
[ "public class BotnakTrayIcon extends TrayIcon implements ActionListener, ItemListener {\n\n public BotnakTrayIcon() {\n super(new ImageIcon(BotnakTrayIcon.class.getResource(\"/image/icon.png\")).getImage());\n setImageAutoSize(true);\n String version = \"Botnak v\" + String.valueOf(Constants...
import gui.BotnakTrayIcon; import gui.forms.GUIMain; import irc.account.Account; import util.APIRequests; import util.Timer; import util.settings.Settings; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet;
package thread.heartbeat; /** * Created by Nick on 7/31/2015. * <p> * This heartbeat thread checks the live channels you're following. */ public class FollowCheck implements HeartbeatThread { public static Set<String> followers, followedChannels; private Timer toUpdate; private boolean beating, init...
if (!initialBeat && BotnakTrayIcon.shouldDisplayFollowedActivity()) {
0
SimpleServer/SimpleServer
src/simpleserver/events/RunningEvent.java
[ "public class Coordinate {\n private int x;\n private int y;\n private int z;\n private Dimension dimension;\n private final int hashCode;\n\n public Coordinate(int x, int y, int z) {\n this(x, y, z, Dimension.EARTH);\n }\n\n public Coordinate(int x, int y, int z, Player player) {\n this(x, y, z, play...
import simpleserver.command.PlayerCommand; import simpleserver.command.ServerCommand; import simpleserver.config.xml.CommandConfig; import simpleserver.config.xml.CommandConfig.Forwarding; import simpleserver.config.xml.Event; import simpleserver.log.EventsLog; import java.io.IOException; import java.util.ArrayList; im...
/* * Copyright (c) 2010 SimpleServer authors (see CONTRIBUTORS) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, ...
Coordinate c = null;
0
oantajames/mdb-android-application
app/src/main/java/mdb/com/view/moviesgrid/FragmentMoviesList.java
[ "@PerActivity\n@Component(dependencies = ApplicationComponent.class, modules = {MoviesGridModule.class})\npublic interface MoviesGridComponent {\n\n //where\n void inject(MoviesGridActivity moviesGridActivity);\n\n void inject(FragmentMoviesList fragmentMoviesList);\n\n void inject(MoviesGridAdapter.Vie...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import an...
package mdb.com.view.moviesgrid; /** * @author james on 8/31/17. */ public class FragmentMoviesList extends AbstractMoviesGridFragment { public static final String SORT = "SORT"; @Inject MoviesRepository moviesRepository; private String sort; private EndlessRecyclerViewOnScrollListener en...
getComponent(MoviesGridComponent.class).inject(this);
0
Atmosphere/wasync
wasync/src/test/java/org/atmosphere/tests/SSETest.java
[ "public class ClientFactory {\n\n private final static ClientFactory factory = new ClientFactory();\n private final String clientClassName;\n\n public ClientFactory() {\n clientClassName = System.getProperty(\"wasync.client\");\n }\n\n /**\n * Return the default Factory.\n *\n * @r...
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertNotNull; import static org.testng.Assert.assertTrue; import java.io.IOException; import java.net.ServerSocket; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBo...
/* * 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 agreed t...
socket.on(Event.MESSAGE, new Function<String>() {
1
PreibischLab/BigStitcher
src/main/java/net/preibisch/stitcher/gui/popup/CalculatePCPopup.java
[ "public class PairwiseStitchingParameters\n{\n\tpublic double minOverlap;\n\tpublic int peaksToCheck;\n\tpublic boolean doSubpixel;\n\tpublic boolean interpolateCrossCorrelation;\n\tpublic boolean showExpertGrouping;\n\tpublic boolean useWholeImage;\n\tpublic boolean manualNumTasks;\n\tpublic int numTasks;\n\n\tpub...
import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import javax.swing.JComponent; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import mpicbg.spim.data.generic.AbstractSpimData; ...
/*- * #%L * Multiview stitching of large datasets. * %% * Copyright (C) 2016 - 2021 Big Stitcher developers. * %% * 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 ...
PairwiseStitchingParameters params = null;
0
JianyangZhang/Contact-Crawler
src/main/resources/java/crawler/thread/CrawlCustomerThread.java
[ "public class CompanyDAO {\n\n\tprivate static Connection connection = MySQLConnector.createConnection(\"EmailCrawlerDB\",\n\t\t\tEmailCrawlerConfig.getConfig().readString(\"db-username\"),\n\t\t\tEmailCrawlerConfig.getConfig().readString(\"db-password\"));\n\n\tpublic static void reconnect() throws SQLException {\...
import java.text.SimpleDateFormat; import java.util.HashMap; import crawler.DAO.CompanyDAO; import crawler.DAO.CustomerDAO; import crawler.DAO.EmailDAO; import crawler.DAO.ResultDAO; import crawler.model.CrawlerQuery; import crawler.model.Customer; import crawler.service.Callback; import crawler.service.GenerateAccurat...
package crawler.thread; public class CrawlCustomerThread implements Runnable{ private Thread t; private String threadName; private Customer customer; private Callback callback;
private CrawlerQuery query;
4
jimmoores/quandl4j
core/src/test/java/com/jimmoores/quandl/tests/ResultSaver.java
[ "public final class HeaderDefinition {\n private static Logger s_logger = LoggerFactory.getLogger(HeaderDefinition.class);\n private final Map<String, Integer> _columnNamesToIndices = new LinkedHashMap<String, Integer>();\n private final List<String> _columnNames;\n\n private HeaderDefinition(final List<String>...
import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.net.URISyntaxException; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.Asser...
package com.jimmoores.quandl.tests; /** * @deprecated this test support class covers the deprecated API. * Class that either saves a sequence of results into files. */ public class ResultSaver implements ResultProcessor { private static Logger s_logger = LoggerFactory.getLogger(ResultSaver.class); private F...
public final void processResult(final TabularResult tabularResult) {
3
USC-SQL/Violist
src/usc/sql/string/JavaAndroid.java
[ "public class ConstantInt extends Variable {\n\n\tString value;\n\tpublic ConstantInt(String value)\n\t{\n\t\tthis.value = value;\n\t}\n\t@Override\n\tpublic String getValue() \n\t{\n\t\treturn value;\n\t}\n\t@Override\n\tpublic String toString()\n\t{\n\t\treturn \"\\\"\"+value+\"\\\"\";\n\t}\n}", "public class C...
import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.*; import java.util.Map.Entry; import CallGraph.NewNode; import CallGraph.StringCallGraph; import SootEvironment.AndroidApp; impor...
//add const label if(tMap.get(signature).getLabelConstant().get(en.getKey())!=null) { // value.add(tMap.get(signature).getLabelConstant().get(en.getKey()).replaceAll("\"", "")); } t2 = System.currentTimeMillis(); totalInterpret += t2-t1; ...
else if(operand instanceof T)
6
Vhati/OpenUHS
android-reader/src/main/java/net/vhati/openuhs/androidreader/reader/HotSpotNodeView.java
[ "public final class AndroidUHSConstants {\n\n\t/** A globally shared tag name for logging. */\n\tpublic static final String LOG_TAG = \"OpenUHS\";\n\n\n\tprivate AndroidUHSConstants() {}\n}", "public abstract class NodeView extends FrameLayout {\n\tprivate UHSNode node = null;\n\tprivate UHSReaderNavCtrl navCtrl ...
import java.io.InputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.DashPathEffect; import ...
package net.vhati.openuhs.androidreader.reader; public class HotSpotNodeView extends NodeView { private final Logger logger = LoggerFactory.getLogger( AndroidUHSConstants.LOG_TAG ); protected int overlayOutlineColor = Color.rgb( 0x80, 0x80, 0x80 ); // Gray. protected int overlayZoneColor = Color.rgb( 0xFF, ...
public boolean accept( UHSNode node ) {
6
robotman3000/iCloud-Linux
iCloud Client/src/icloud/CloudSessionManager.java
[ "public abstract class JsonBody {\n\n}", "public class RequestErrorEvent extends RequestEvent {\n\n}", "public class RequestMadeEvent extends RequestEvent {\n\n}", "public class RequestRecievedEvent extends RequestEvent {\n\n}", "public class URLBuilder {\n\t// TODO: Add Javadoc; auto insert default values ...
import icloud.json.JsonBody; import icloud.request.event.RequestErrorEvent; import icloud.request.event.RequestMadeEvent; import icloud.request.event.RequestRecievedEvent; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReade...
package icloud; public class CloudSessionManager { private static final CloudSessionManager self = new CloudSessionManager(); private File defaultConfPath = new File("cloudConf.json"); private CloudSessionManager(){} public synchronized static CloudSessionManager getInstance(){ return self; } private HashM...
theRequest.handleCloudEvent(new RequestRecievedEvent());
3
WanionCane/Avaritiaddons
src/main/java/wanion/avaritiaddons/compat/jei/AvaritiaddonsJEIPlugin.java
[ "public final class GuiExtremeAutoCrafter extends WGuiContainer<TileEntityExtremeAutoCrafter>\n{\n\tprivate static final ResourceLocation guiTexture = new ResourceLocation(MOD_ID, \"textures/gui/extreme_auto_crafter.png\");\n\tprivate static final ITooltipSupplier extremeTooltipSupplier = new ExtremeTooltipSupplier...
import mezz.jei.api.IModPlugin; import mezz.jei.api.IModRegistry; import mezz.jei.api.JEIPlugin; import morph.avaritia.compat.jei.AvaritiaJEIPlugin; import net.minecraft.item.ItemStack; import wanion.avaritiaddons.block.extremeautocrafter.GuiExtremeAutoCrafter; import wanion.avaritiaddons.block.extremeautocrafter.ItemB...
package wanion.avaritiaddons.compat.jei; /* * Created by WanionCane(https://github.com/WanionCane). * * 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/MPL/2.0/. */ @JEIPlu...
modRegistry.addGhostIngredientHandler(GuiExtremeAutoCrafter.class, new AutoExtremeCrafterGhostHandler());
5
EthACKdotOrg/orWall
app/src/main/java/org/ethack/orwall/fragments/AppFragment.java
[ "public class AppListAdapter extends ArrayAdapter {\n\n private final static String TAG = \"AppListAdapter\";\n private final Context context;\n private final List<AppRule> apps;\n private final PackageManager packageManager;\n private final NatRules natRules;\n private CheckBox checkboxInternet;\...
import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.util.LongSparseArray; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; ...
package org.ethack.orwall.fragments; /** * Manage "apps" tab fragment. * * @link org.ethack.orwall.TabbedMain */ public class AppFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view; view =...
NatRules natRules = new NatRules(this.getActivity());
5
iTXTech/Daedalus
app/src/main/java/org/itxtech/daedalus/server/DnsServerHelper.java
[ "public class Daedalus extends Application {\n\n private static final String SHORTCUT_ID_ACTIVATE = \"shortcut_activate\";\n\n public static final List<DnsServer> DNS_SERVERS = new ArrayList<DnsServer>() {{\n add(new DnsServer(\"101.101.101.101\", R.string.server_twnic_primary));\n add(new DnsSe...
import android.content.Context; import android.net.Uri; import org.itxtech.daedalus.Daedalus; import org.itxtech.daedalus.provider.HttpsProvider; import org.itxtech.daedalus.provider.ProviderPicker; import org.itxtech.daedalus.service.DaedalusVpnService; import org.itxtech.daedalus.util.Logger; import java.net.InetAddr...
package org.itxtech.daedalus.server; /** * Daedalus Project * * @author iTX Technologies * @link https://itxtech.org * <p> * 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 versi...
return DaedalusVpnService.isActivated() && (server.getId().equals(getPrimary()) || server.getId().equals(getSecondary()));
3
nitindhar7/kampr
src/com/nitindhar/kampr/async/CommentsTask.java
[ "public final class R {\n public static final class attr {\n }\n public static final class color {\n /** ActionBar \n */\n public static final int actionbar_separator_dark=0x7f04000e;\n public static final int actionbar_separator_light=0x7f04000f;\n public static final ...
import java.util.ArrayList; import java.util.List; import android.content.Context; import android.os.AsyncTask; import android.widget.ListView; import com.nitindhar.forrst.model.Comment; import com.nitindhar.kampr.R; import com.nitindhar.kampr.adapters.CommentsAdapter; import com.nitindhar.kampr.data.SessionDao; import...
package com.nitindhar.kampr.async; public class CommentsTask extends AsyncTask<Integer, Integer, List<CommentsDecorator>> { private final Context context; private final ListView comments; public CommentsTask(Context context, ListView comments) { this.context = context; this.com...
SessionDao sessionDao = SessionSharedPreferencesDao.instance();
2
hosuaby/example-restful-project
src/main/java/io/hosuaby/restful/controllers/TeapotCrudController.java
[ "@Document(collection = \"teapots\")\npublic class Teapot {\n\n /** 0.3 L */\n public static final float L0_3 = (float) 0.3;\n\n /** 0.5 L */\n public static final float L0_5 = (float) 0.5;\n\n /** 1 L */\n public static final float L1 = (float) 1.0;\n\n /** 1.5 L */\n public static fin...
import io.hosuaby.restful.domain.Teapot; import io.hosuaby.restful.mappers.TeapotMapper; import io.hosuaby.restful.mappings.TeapotMapping; import io.hosuaby.restful.services.TeapotCrudService; import io.hosuaby.restful.services.exceptions.teapots.TeapotAlreadyExistsException; import io.hosuaby.restful.services.exceptio...
package io.hosuaby.restful.controllers; /** * Controller for CRUD operations of teapots. */ @RestController @RequestMapping("/crud/teapots") public class TeapotCrudController { /** Default teapots to fill repository */ private static final Set<Teapot> TEAPOTS = new HashSet<Teapot>() { private st...
throws TeapotNotExistsException {
5
qinci/MarkdownEditors
app/src/main/java/ren/qinc/markdowneditors/view/EditorActivity.java
[ "public abstract class BaseApplication extends Application {\n static Context context;\n static Resources resource;\n\n private RefWatcher refWatcher;\n\n\n @Override\n public void onCreate() {\n super.onCreate();\n context = getApplicationContext();\n resource = context.getResou...
import android.app.Activity; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.MediaStore; import android.support.annotation.NonNull; import android.support.design.widget.TextInputLayout; import android.support.v4.app.Fragment; impor...
/* * Copyright 2016. SHENQINCI(沈钦赐)<dev@qinc.me> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
SystemBarUtils.tintStatusBar(this, getResources().getColor(R.color.colorPrimary));
5
trsvax/tapestry-facebook
src/main/java/com/trsvax/facebook/components/Like.java
[ "public enum ColorScheme {\n\n\tLIGHT,DARK;\n}", "public enum Font {\n\tARIAL,LUCIDA_GRANDE,SEGOE_UI,TAHOMA,TREBUCHET_MS,VERDANA;\n}", "public enum Verb {\n\tLIKE,RECOMMEND;\n}", "public enum Layout {\n\tSTANDARD,BUTTON_COUNT,BOX_COUNT;\n\t\n\tpublic String toString() {\n\t\treturn this.name().toLowerCase();\...
import org.apache.tapestry5.MarkupWriter; import org.apache.tapestry5.annotations.BeginRender; import org.apache.tapestry5.annotations.Environmental; import org.apache.tapestry5.annotations.Parameter; import org.apache.tapestry5.dom.Element; import com.trsvax.facebook.ColorScheme; import com.trsvax.facebook.Font; impor...
//Copyright [2011] [Barry Books] // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agree...
private FacebookEnvironment environment;
4
philipperemy/Leboncoin
src/run/MonitoringTask.java
[ "public class Logger\r\n{\r\n private static final String infoKey = \"INFO\";\r\n private static final String errorKey = \"ERROR\";\r\n\r\n private static final Printer out = new Printer();\r\n\r\n public static SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\r\n...
import java.util.ArrayList; import java.util.List; import log.Logger; import persistence.PersistedObject; import recovery.AdRetrieval; import recovery.UnknownAdException; import utils.FormatConsoleTable; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import ...
package run; public class MonitoringTask implements LeboncoinRunner { @Override public void run() { FormatConsoleTable nicelyFormattedConsoleTable = new FormatConsoleTable(); Logger.traceINFO("Generating the report, Please wait..."); List<ConfItem> foundItems = new Arra...
WebClient client = Client.get();
7
idega/com.idega.block.category
src/java/com/idega/block/category/IWBundleStarter.java
[ "public abstract class CategoryBlock extends Block implements ICDynamicPageTriggerInheritable {\n\tprivate ICCategory icCategory;\n\tprivate int icCategoryId = -1;\n\tprivate int[] icCategoryIds = new int[0];\n\tpublic final static String prmCategoryId = \"catbl_catid\";\n\tprivate boolean autocreate = true;\n\tpro...
import com.idega.block.category.presentation.CategoryBlock; import com.idega.block.category.presentation.CategoryMetaDataWindow; import com.idega.block.category.presentation.CategoryWindow; import com.idega.block.category.presentation.FolderBlock; import com.idega.block.category.presentation.FolderBlockCategoryWindow; ...
package com.idega.block.category; /** * <p>Title: idegaWeb</p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: idega Software</p> * @author <a href="thomas@idega.is">Thomas Hilbig</a> * @version 1.0 * Created on Jun 10, 2004 */ public class IWBundleStarter implements IWBundleStarta...
registry.registerRefactoredClass("com.idega.block.presentation.CategoryMetaDataWindow", CategoryMetaDataWindow.class);
1
Bigkoo/Android-PickerView
pickerview/src/main/java/com/bigkoo/pickerview/builder/TimePickerBuilder.java
[ "public class PickerOptions {\n\n //constant\n private static final int PICKER_VIEW_BTN_COLOR_NORMAL = 0xFF057dff;\n private static final int PICKER_VIEW_BG_COLOR_TITLE = 0xFFf5f5f5;\n private static final int PICKER_VIEW_COLOR_TITLE = 0xFF000000;\n private static final int PICKER_VIEW_BG_COLOR_DEFAU...
import android.content.Context; import android.support.annotation.ColorInt; import android.view.View; import android.view.ViewGroup; import com.bigkoo.pickerview.configure.PickerOptions; import com.bigkoo.pickerview.listener.CustomListener; import com.bigkoo.pickerview.listener.OnTimeSelectChangeListener; import com.bi...
/** * 设置分割线的颜色 * * @param dividerColor */ public TimePickerBuilder setDividerColor(@ColorInt int dividerColor) { mPickerOptions.dividerColor = dividerColor; return this; } /** * 设置分割线的类型 * * @param dividerType */ public TimePickerBuilder set...
public TimePickerBuilder setTimeSelectChangeListener(OnTimeSelectChangeListener listener) {
1
utluiz/spring-examples
agenda-dao-spring/src/main/java/br/com/starcode/agenda/dao/memory/EntradaDaoMemoryImpl.java
[ "public interface EntradaDao {\r\n\r\n\tEntrada findById(int id);\r\n\r\n\tvoid insert(Entrada entrada);\r\n\r\n\tint update(Entrada entrada);\r\n\r\n\tint delete(Integer id);\r\n\r\n\tList<Entrada> search(FiltroEntrada filtro, OrdenacaoEntrada ordem);\r\n\r\n}", "public class Entrada {\r\n\r\n\tprivate Integer i...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.Types; import java.util.ArrayList; import java.util.List; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Autowired...
package br.com.starcode.agenda.dao.memory; @Repository @Qualifier("h2") public class EntradaDaoMemoryImpl implements EntradaDao { @Autowired @Qualifier("h2") private DataSource ds; public Entrada findById(int id) { Connection con = null; PreparedStatement ps = null; try { con = ...
ps.setTimestamp(1, DateUtil.getTimestamp(entrada.getHorario()));
4
cqyijifu/OpenFalcon-SuitAgent
src/main/java/com/yiji/falcon/agent/plugins/plugin/netDevice/SwitchPlugin.java
[ "public enum CounterType {\n /**\n * 用户上传什么样的值,就原封不动的存储\n */\n GAUGE,\n /**\n * 指标在存储和展现的时候,会被计算为speed,即(当前值 - 上次值)/ 时间间隔\n */\n COUNTER\n}", "@Data\npublic class FalconReportObject implements Cloneable{\n\n /**\n * 标明Metric的主体(属主),比如metric是cpu_idle,那么Endpoint就表示这是哪台机器的cpu_idle...
import com.yiji.falcon.agent.falcon.CounterType; import com.yiji.falcon.agent.falcon.FalconReportObject; import com.yiji.falcon.agent.falcon.MetricsType; import com.yiji.falcon.agent.plugins.SNMPV3Plugin; import com.yiji.falcon.agent.plugins.metrics.MetricsCommon; import com.yiji.falcon.agent.plugins.util.PluginActivat...
/* * www.yiji.com Inc. * Copyright (c) 2016 All Rights Reserved */ package com.yiji.falcon.agent.plugins.plugin.netDevice; /* * 修订记录: * guqiu@yiji.com 2016-07-08 14:28 创建 */ /** * 交换机设备监控插件 * @author guqiu@yiji.com */ @Slf4j public class SwitchPlugin implements SNMPV3Plugin{ private int step; priva...
public Collection<SNMPV3UserInfo> userInfo() {
8
ground-context/ground
modules/postgres/test/edu/berkeley/ground/postgres/dao/core/PostgresNodeDaoTest.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 java.util.Map; import java.util.Set; import org.junit.Test; import static junit.framework.TestCase.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import edu.berkeley.ground.common.exception.GroundException; import edu.berkeley.ground.common.model.core.Node; import e...
/** * 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 ...
Map<String, Tag> tagsMap = new HashMap<>();
3
flixel-gdx/flixel-gdx-box2d
flixel-gdx-box2d-examples/src/org/flxbox2d/examples/PlayState.java
[ "public class B2FlxB\n{\n\t/** \n\t * The ratio from meters to pixels. \n\t */\n\tpublic static final float RATIO = 32f;\n\t/**\n\t * The world where the object lives.\n\t */\n\tpublic static World world;\n\t/**\n\t * The contact manager.\n\t */\n\tpublic static B2FlxContactManager contact;\n\t/**\n\t * Let the wor...
import org.flixel.FlxButton; import org.flixel.FlxG; import org.flixel.FlxState; import org.flixel.FlxText; import org.flixel.FlxU; import org.flixel.event.IFlxButton; import org.flxbox2d.B2FlxB; import org.flxbox2d.B2FlxState; import org.flxbox2d.collision.shapes.B2FlxBox; import org.flxbox2d.collision.shapes.B2FlxSha...
package org.flxbox2d.examples; /** * A parent class for testing. * * @author Ka Wing Chin */ public class PlayState extends B2FlxState { public static int currentTest = 0; private static final int AMOUNT_OF_TESTS = 24; public FlxText title; public FlxText info; public B2FlxMouseJoint mouse; public final s...
B2FlxDebug.drawCollisions = false;
5
jbush001/WaveView
src/test/java/WaveformDataModelTest.java
[ "public class BitVector {\n // If a bit in zx_flag is 1, the corresponding bit in the value array\n // represents either z (0) or x (1). Otherwise, the value bit represents\n // a 0 or 1.\n // Index 0 is least significant position\n // All code in this class guarantees that no bits with an index grea...
import waveview.wavedata.WaveformDataModel; import waveview.wavedata.WaveformDataModel.AmbiguousNetException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.a...
NetDataModel netData1 = model.findNet("mod1.net1"); NetDataModel netData2 = model.findNet("mod1.net2"); NetDataModel netData3 = model.findNet("mod1.mod2.net3"); assertNotNull(netData1); assertSame(netData1, model.getNetDataModel(0)); assertNotNull(netData2); asser...
public void fuzzyMatch() throws AmbiguousNetException {
5
mcalejo/interprolog
src/main/java/com/declarativa/interprolog/gui/EngineInspectionWindow.java
[ "public abstract class AbstractPrologEngine implements PrologEngine{\n\t/** cache variable */\n\tprivate String prologVersion=null;\n /** Auxiliary object knowing about specific implementation details */\n protected PrologImplementationPeer peer;\n /** File path to directory with Prolog machine, or command...
import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.J...
/* Author: Miguel Calejo Contact: info@interprolog.com, www.interprolog.com Copyright InterProlog Consulting / Renting Point Lda, Portugal 2014 Use and distribution, without any warranties, under the terms of the Apache License, as per http://www.apache.org/licenses/LICENSE-2.0.html */ package com.declarativa.interpro...
else listener = new SubprocessEngineWindow((SubprocessEngine)engine,true,false);
2
caprica/picam
src/test/java/uk/co/caprica/picam/tutorial/configuration/MyCameraApplication3.java
[ "public final class CameraConfiguration {\n\n private static final Integer DEFAULT_WIDTH = 2592;\n\n private static final Integer DEFAULT_HEIGHT = 1944;\n\n private Integer cameraNumber = 0;\n\n private Integer customSensorConfig = 0;\n\n private Integer width = DEFAULT_WIDTH;\n\n private Integer ...
import uk.co.caprica.picam.CameraConfiguration; import uk.co.caprica.picam.NativeLibraryException; import uk.co.caprica.picam.enums.AutomaticWhiteBalanceMode; import uk.co.caprica.picam.enums.Encoding; import static uk.co.caprica.picam.CameraConfiguration.cameraConfiguration; import static uk.co.caprica.picam.PicamNati...
/* * This file is part of picam. * * picam 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. * * picam is distributed in the hope...
.automaticWhiteBalanceMode(AutomaticWhiteBalanceMode.AUTO)
2
karask/bitcoinpos
app/src/main/java/gr/cryptocurrencies/bitcoinpos/PaymentFragment.java
[ "public class Item implements Parcelable {\n\n private Integer itemId;\n private String name;\n private String description;\n private String color;\n private Date createdAt;\n private int displayOrder;\n private double amount;\n private boolean isAvailable;\n\n\n public Item(Integer itemI...
import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.support.design.widget.CoordinatorLayout; import android...
// @Override // public void onDrawerSlide(View view, float v) {} // @Override // public void onDrawerOpened(View view) {} // @Override // public void onDrawer...
if(Utilities.isNetworkConnectionAvailable(getActivity())) {
6
bencvt/LibShapeDraw
projects/main/src/main/java/libshapedraw/shape/WireframeLinesBlendIterable.java
[ "public interface MinecraftAccess {\n /** Tessellator.instance.startDrawing */\n public MinecraftAccess startDrawing(int mode);\n\n /** Tessellator.instance.addVertex */\n public MinecraftAccess addVertex(double x, double y, double z);\n\n /** Tessellator.instance.addVertex */\n public MinecraftAc...
import java.util.Iterator; import libshapedraw.MinecraftAccess; import libshapedraw.primitive.Color; import libshapedraw.primitive.LineStyle; import libshapedraw.primitive.ReadonlyColor; import libshapedraw.primitive.ReadonlyLineStyle; import libshapedraw.primitive.ReadonlyVector3; import libshapedraw.primitive.Vector3...
package libshapedraw.shape; /** * A series of connected line segments that smoothly blends from one line style * to another along the segments. * <p> * For most use cases you'll want to use WireframeLinesBlend instead, which * takes a Collection of ReadonlyVector3s rather than an Iterable. Only use * this cla...
public WireframeLinesBlendIterable(Vector3 origin, Iterable<ReadonlyVector3> relativePoints) {
5
HumBuch/HumBuch
src/main/java/de/dhbw/humbuch/util/CSVHandler.java
[ "public final class SubjectHandler {\n\t\n\tpublic static Set<Subject> createProfile(String[] languageInformation, String religionInformation){\n\t\tSet<Subject> subjectSet = new LinkedHashSet<Subject>();\n\t\tfor(int i = 0; i < languageInformation.length; i++){\n\t\t\tif(languageInformation[i].equals(\"E\")){\n\t\...
import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util...
package de.dhbw.humbuch.util; /** * Create student objects of data in csv file. * Checks cells for validity. * * @author Benjamin Räthlein * @author David Vitt * */ public final class CSVHandler { /** * Reads a csv file and creates student objects of it's records. * * @param path * a pa...
Parent parent = null;
2
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/ihe/QueryEvent.java
[ "public abstract class DICOMEventIdCodes extends CodedValueType\n{\n\t\n\tprotected DICOMEventIdCodes(String value, String meaning)\n\t{\n\t\tsetCodeSystemName(\"DCM\");\n\t\tsetCode(value);\n\t\tsetOriginalText(meaning);\n\t}\n\t\n\t/**\n\t * \"DCM\",\"110100\",\"Application Activity\"\n\t * \n\t *\n\t * @since E...
import java.util.LinkedList; import java.util.List; import org.openhealthtools.ihe.atna.auditor.codes.dicom.DICOMEventIdCodes; import org.openhealthtools.ihe.atna.auditor.codes.ihe.IHETransactionEventTypeCodes; import org.openhealthtools.ihe.atna.auditor.codes.rfc3881.RFC3881EventCodes; import org.openhealthtools.ihe.a...
/******************************************************************************* * Copyright (c) 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is a...
RFC3881ParticipantObjectTypeRoleCodes.QUERY,
5
graywolf336/CasinoSlots
src/main/java/com/craftyn/casinoslots/actions/impl/SmiteAction.java
[ "public class CasinoSlots extends JavaPlugin {\r\n private Economy economy = null;\r\n private PluginManager pm = null;\r\n private Towny towny = null;\r\n private WorldGuardPlugin worldGuard = null;\r\n private Update update;\r\n private int updateCheckTask;\r\n\r\n public boolean useTowny = f...
import org.bukkit.entity.Player; import com.craftyn.casinoslots.CasinoSlots; import com.craftyn.casinoslots.actions.Action; import com.craftyn.casinoslots.classes.Reward; import com.craftyn.casinoslots.classes.SlotType; import com.craftyn.casinoslots.exceptions.ActionLoadingException;
package com.craftyn.casinoslots.actions.impl; /** * The smite action. Usage: - smite [times] * * @author graywolf336 * @since 3.0.0 * @version 1.0.0 */ public class SmiteAction extends Action { private String name = "Smite"; private CasinoSlots plugin; private int times;
public SmiteAction(CasinoSlots plugin, String... args) throws ActionLoadingException {
4
gtomato/carouselview
carouselview/src/main/java/com/gtomato/android/ui/manager/CarouselLayoutManager.java
[ "public class NormalScroller implements CarouselView.Scroller {\n @Override\n public int tweakScrollDx(int dx) {\n return dx;\n }\n\n @Override\n public int tweakScrollDy(int dy) {\n return dy;\n }\n\n @Override\n public int inverseTweakScrollDx(int dx) {\n return dx;\n ...
import android.graphics.PointF; import android.graphics.Rect; import android.os.Build; import android.os.Handler; import android.os.Parcel; import android.os.Parcelable; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.RecyclerView.LayoutManager...
package com.gtomato.android.ui.manager; /** * Layout Manager used to help view layout in CarouselView. Normal users are not expected to access this class directly. * <p /> * @author sunny-chung */ public class CarouselLayoutManager extends RecyclerView.LayoutManager { private static final String TAG = Carouse...
public final static ViewTransformer DEFAULT_TRANSFORMER = new ImmutableTransformer(new LinearViewTransformer());
4
pierre/collector
src/main/java/com/ning/metrics/collector/guice/ServerModule.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 com.ning.arecibo.jmx.AreciboMonitoringModule; import com.ning.arecibo.metrics.guice.AreciboMetricsModule; import com.ning.metrics.collector.binder.config.CollectorConfig; import com.ning.metrics.collector.binder.config.CollectorConfigurationObjectFactory; import com.ning.metrics.collector.endpoint.resources.Scri...
/* * 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...
final CollectorConfig config = configFactory.build(CollectorConfig.class);
0
SilentChaos512/ScalingHealth
src/main/java/net/silentchaos512/scalinghealth/init/ModItems.java
[ "@Mod(ScalingHealth.MOD_ID)\npublic class ScalingHealth {\n public static final String MOD_ID = \"scalinghealth\";\n public static final String MOD_NAME = \"Scaling Health\";\n public static final String VERSION = \"2.5.3\";\n\n public static final Random random = new Random();\n\n public static fina...
import net.silentchaos512.scalinghealth.item.PowerCrystal; import net.silentchaos512.utils.Lazy; import java.util.ArrayList; import java.util.Collection; import java.util.Locale; import java.util.function.Supplier; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.util.IItemProvi...
/* * Scaling Health * Copyright (C) 2018 SilentChaos512 * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation version 3 * of the License. * * This library is distributed in the hope t...
BANDAGES(() -> new HealingItem(0.3f, 1)),
2
xcltapestry/XCL-Charts
lib/src/main/java/org/xclcharts/chart/ScatterChart.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 org.xclcharts.renderer.plot.PlotQuadrantRender; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Paint.Align; import android.util.Log; import java.util.List; import org.xclcharts.common.DrawHelper; import org.xclcharts.common.IFormatterTextCallBack; import org.xclcharts.rend...
/** * 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...
PlotDot dot = bd.getPlotDot();
4
CreativeMD/IGCM
src/main/java/com/creativemd/igcm/IGCMGuiManager.java
[ "public class ConfigTab extends ConfigGroupElement {\n\t\n\tpublic static final ConfigTab root = new ConfigTab(\"root\", ItemStack.EMPTY);\n\t\n\tpublic static ConfigSegment getSegmentByPath(String path) {\n\t\tif (path.equals(\"root\"))\n\t\t\treturn root;\n\t\tif (path.startsWith(\"root.\"))\n\t\t\treturn root.ge...
import com.creativemd.creativecore.common.gui.container.SubContainer; import com.creativemd.creativecore.common.gui.container.SubGui; import com.creativemd.creativecore.common.gui.opener.CustomGuiHandler; import com.creativemd.creativecore.common.gui.opener.GuiHandler; import com.creativemd.igcm.api.ConfigTab; import c...
package com.creativemd.igcm; public class IGCMGuiManager extends CustomGuiHandler { public static void openConfigGui(EntityPlayer player) { openConfigGui(player, "root"); } public static void openConfigGui(EntityPlayer player, String path) { NBTTagCompound nbt = new NBTTagCompound(); nbt.setInteger("gui...
return new SubContainerAdvancedWorkbench(player);
1