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
Ahmed-Abdelmeged/ADAS
app/src/main/java/com/example/mego/adas/videos/ui/VideosFragments.java
[ "public final class Constants {\n\n /**\n * Key for get teh video item bundle extra\n */\n public static final String KEY_ITEM_VIDEO = \"item_video\";\n\n /**\n * key for get the accident id key bundle extra\n */\n public static final String ACCIDENT_ID_KEY = \"accident_id\";\n\n /**\...
import android.arch.lifecycle.LifecycleFragment; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.vi...
/* * Copyright (c) 2017 Ahmed-Abdelmeged * * github: https://github.com/Ahmed-Abdelmeged * email: ahmed.abdelmeged.vm@gamil.com * Facebook: https://www.facebook.com/ven.rto * Twitter: https://twitter.com/A_K_Abd_Elmeged * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this ...
if (YouTubeApiUtilities.getVideos(response.body()).size() == 0) {
3
witwall/sfntly-java
src/main/java/com/google/typography/font/sfntly/table/core/PostScriptTable.java
[ "public class ReadableFontData extends FontData {\n\n public static ReadableFontData createReadableFontData(byte[] b) {\n ByteArray<?> ba = new MemoryByteArray(b);\n return new ReadableFontData(ba);\n }\n\n\n /**\n * Flag on whether the checksum has been set.\n */\n private volatile boolean checksumSe...
import com.google.typography.font.sfntly.data.ReadableFontData; import com.google.typography.font.sfntly.data.WritableFontData; import com.google.typography.font.sfntly.table.Header; import com.google.typography.font.sfntly.table.Table; import com.google.typography.font.sfntly.table.TableBasedTableBuilder; import java....
"trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine", "Omega", "ae", ...
private PostScriptTable(Header header, ReadableFontData data) {
0
HancelParallelZero/hancel_android
app/src/main/java/org/parallelzero/hancel/Fragments/ContactsRingFragment.java
[ "public class Config {\n\n\tpublic static final boolean DEBUG=true; // ==> R E V I S A R P A R A T I E N D A S //\n\tpublic static final boolean DEBUG_SERVICE = true;\n\tpublic static final boolean DEBUG_LOCATION = false;\n\tpublic static final boolean DEBUG_TASKS = true;\n\tpublic static final boolean DEBUG_M...
import android.os.Bundle; import androidx.fragment.app.DialogFragment; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.ItemTouchHelper; import android.util.Log; import android.view.LayoutInflater; import android.view.View; impo...
package org.parallelzero.hancel.Fragments; /** * Created by Antonio Vanegas @hpsaturn on 11/5/15. */ public class ContactsRingFragment extends DialogFragment { public static final String TAG = ContactsRingFragment.class.getSimpleName(); private static final boolean DEBUG = Config.DEBUG; private But...
private ListContactsAdapter mContactsAdapter;
5
zetbaitsu/CodePolitan
app/src/main/java/id/zelory/codepolitan/ui/fragment/ChooseTagFragment.java
[ "public abstract class BenihFragment<Data extends Parcelable> extends RxFragment\n{\n protected Data data;\n\n public BenihFragment()\n {\n\n }\n\n @Override\n public void onCreate(@Nullable Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n Timber.tag(getClass...
import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.support.annotation.Nullable; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.view.View; import android.widget.EditText; import android.widget.Image...
/* * Copyright (c) 2015 Zelory. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
public void showTags(List<Tag> tags)
6
cyberpython/lingua
src/lingua/ui/gtk/main_window/widgets/InputFileWindow.java
[ "public class StringResources {\n private HashMap<String, String> strings;\n\n private static StringResources instance = null;\n\n\n private StringResources() {\n this.strings = new HashMap<String, String>();\n strings.put(\"app_name\", _(\"Περιβάλλον Ανάπτυξης Για Τη ΓΛΩΣΣΑ\"));\n str...
import glossa.ui.cli.CharsetDetector; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.Charset; import lingua.resources.StringResources; impo...
/* * The MIT License * * Copyright 2012 Georgios Migdos <cyberpython@gmail.com>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitat...
filename = DialogManager.showOpenDialog(OpenInputFileDialog.getInstance());
6
genious7/FanFictionReader
fanfictionReader/src/main/java/com/spicymango/fanfictionreader/menu/storymenu/StoryMenuLoaders.java
[ "public abstract class BaseLoader<T extends Parcelable> extends\n\t\tAsyncTaskLoader<List<T>> {\n\tprivate final static String STATE_LOADER = \"STATE LOADER\";\n\tprivate final static String STATE_CURRENT = \"STATE CURRENT PAGE\";\n\tprivate final static String STATE_DATA = \"STATE CURRENT DATA\";\n\tprivate final ...
import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Locale; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import com.spicymango.fan...
package com.spicymango.fanfictionreader.menu.storymenu; final class StoryMenuLoaders { // ArchiveOfOurOwnLoaders /** * The loader responsible for loading regular Archive of Our Own stories. * * @author Michael Chen * */ public final static class AO3RegularStoryLoader extends BaseLoader<Story> { p...
private ArrayList<SpinnerData> mSpinnerData;
4
romelo333/notenoughwands1.8.8
src/main/java/romelo333/notenoughwands/setup/ClientProxy.java
[ "public class ConfigSetup {\n public static String CATEGORY_GENERAL = \"general\";\n public static String CATEGORY_WANDS = \"wandsettings\";\n public static String CATEGORY_MOVINGBLACKLIST = \"movingblacklist\";\n public static String CATEGORY_CAPTUREBLACKLIST = \"captureblacklist\";\n\n public stati...
import mcjty.lib.setup.DefaultClientProxy; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumHand; import net.minecraftforge.client.event.RenderWorldLastEvent; import net.minecraftforge.common.MinecraftForge; impo...
package romelo333.notenoughwands.setup; public class ClientProxy extends DefaultClientProxy { @Override public void preInit(FMLPreInitializationEvent e) { super.preInit(e); MinecraftForge.EVENT_BUS.register(this); } @Override public void init(FMLInitializationEvent e) { s...
if (ConfigSetup.clientSideProtection < 0) {
0
hanks-zyh/FlyWoo
app/src/main/java/com/zjk/wifiproject/file/OnFileCheckListener.java
[ "public class BaseApplication extends Application {\n\n public static boolean isDebugmode = true;\n private boolean isPrintLog = true;\n\n /** 静音、震动默认开关 **/\n private static boolean isSlient = false;\n private static boolean isVIBRATE = true;\n\n /** 新消息提醒 **/\n private static int notiSoundPool...
import android.content.Intent; import android.view.View; import com.zjk.wifiproject.BaseApplication; import com.zjk.wifiproject.config.ConfigBroadcast; import com.zjk.wifiproject.entity.FileState; import com.zjk.wifiproject.entity.Message; import com.zjk.wifiproject.entity.WFile; import com.zjk.wifiproject.main.MainAct...
/* * Created by Hanks * Copyright (c) 2015 NaShangBan. All rights reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unle...
BaseApplication.sendFileStates.put(file.getAbsolutePath(), fs);
0
mokies/ratelimitj
ratelimitj-redis/src/test/java/es/moki/ratelimitj/redis/request/RedisSlidingWindowSyncRequestRateLimiterTest.java
[ "@ParametersAreNonnullByDefault\npublic class RequestLimitRule {\n\n private final int durationSeconds;\n private final long limit;\n private final int precision;\n private final String name;\n private final Set<String> keys;\n\n private RequestLimitRule(int durationSeconds, long limit, int precis...
import es.moki.ratelimitj.core.limiter.request.RequestLimitRule; import es.moki.ratelimitj.core.limiter.request.RequestRateLimiter; import es.moki.ratelimitj.core.time.TimeSupplier; import es.moki.ratelimitj.redis.extensions.RedisStandaloneConnectionSetupExtension; import es.moki.ratelimitj.test.limiter.request.Abstrac...
package es.moki.ratelimitj.redis.request; public class RedisSlidingWindowSyncRequestRateLimiterTest extends AbstractSyncRequestRateLimiterTest { @RegisterExtension static RedisStandaloneConnectionSetupExtension extension = new RedisStandaloneConnectionSetupExtension(); @Override
protected RequestRateLimiter getRateLimiter(Set<RequestLimitRule> rules, TimeSupplier timeSupplier) {
1
VernonLee/Theogony
app/src/main/java/com/nodlee/theogony/ui/activity/SearchActivity.java
[ "public class Champion extends RealmObject implements Serializable {\n @PrimaryKey\n private int id;\n private String key;\n private String name;\n private String title;\n private String image;\n private String lore;\n private String blurb;\n private String enemytipsc;\n private String...
import android.app.SearchManager; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.LoaderManager; import android.support.v4.content.Loader; import android.support.v7.widget.SearchView; import android.view.View; import com.bumptech.glide.Glide; import com.nodlee.theogony.R; import c...
package com.nodlee.theogony.ui.activity; /** * Created by Vernon Lee on 15-12-10. */ public class SearchActivity extends BaseActivity implements ItemClickedListener, SearchView.OnQueryTextListener { private static final int LOADER_CHAMPIONS = 1; @BindView(R.id.search_view) SearchView mSearchView; ...
AutoFitRecyclerView mChampionListRecyclerView;
4
reines/game
game-server/src/main/java/com/game/server/Server.java
[ "public class Packet {\n\tprivate static final Logger log = LoggerFactory.getLogger(Packet.class);\n\n\tpublic static final int HEADER_SIZE = 4 + 4; // type + size\n\n\tprotected static final CharsetDecoder stringDecoder;\n\n\tstatic {\n\t\tstringDecoder = Charset.forName(\"UTF-8\").newDecoder();\n\t}\n\n\t// X_SEN...
import java.io.File; import java.io.IOException; import java.net.InetSocketAddress; import java.net.URL; import java.security.PrivateKey; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import java.util.Queue; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandL...
package com.game.server; public class Server implements IoHandler, Runnable { private static final Logger log = LoggerFactory.getLogger(Server.class); public static final int DEFAULT_PORT = 36954; public static final int LOOP_DELAY = 100; protected static final Options options; static { options = new Opti...
acceptor.getFilterChain().addLast("codec", new ProtocolCodecFilter(new PacketCodecFactory()));
1
PioBeat/GravSupport
src/main/java/net/offbeatpioneer/intellij/plugins/grav/editor/strategy/FileEditorStrategy.java
[ "public class GravLangFileEditor implements FileEditor, TableModelListener, BulkFileListener {\n final static String NAME = \"Grav Language Editor\";\n private GravLanguageEditorForm myEditorUI;\n\n private TranslationTableModel model;\n FileEditorStrategy editorStrategy;\n MessageBusConnection conne...
import com.intellij.openapi.command.WriteCommandAction; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.EditorFactory; import com.intellij.openapi.editor.event.EditorFactoryListener; import com.inte...
package net.offbeatpioneer.intellij.plugins.grav.editor.strategy; /** * This class provides different strategies for handling translations: * <ul> * <li>File-based</li> * <li>Directory-based</li> * </ul> * <p> * Grav supports these two mechanisms for translation management. * The concrete implementations imp...
public void initTab(GravLanguageEditorForm gui) {
2
leonardoanalista/java2word
java2word/src/test/java/word/w2004/TableFactoryMethodTest.java
[ "public class TableCol implements ITableItemStrategy{\n\t\n\tpublic String getTop() {\n\t\treturn \"\\n\t\t<w:tr wsp:rsidR=\\\"00505659\\\" wsp:rsidRPr=\\\"00505659\\\">\";\n\t}\n\n\tpublic String getMiddle() {\n\t\tString td =\n\t\t\t\" <w:tc> \"\n\t\t\t+\"\\n <w:tcPr> \"\n\t\t\t+...
import junit.framework.Assert; import org.junit.Test; import word.w2004.elements.tableElements.TableCol; import word.w2004.elements.tableElements.TableDefinition; import word.w2004.elements.tableElements.TableEle; import word.w2004.elements.tableElements.TableFactoryMethod; import word.w2004.elements.tableElements.Tabl...
package word.w2004; public class TableFactoryMethodTest extends Assert{ @Test public void testGetInstance(){ TableFactoryMethod instance = TableFactoryMethod.getInstance(); assertNotNull(instance); } @Test public void testGetTableItem(){ TableFactoryMethod instance = TableFactoryMethod.getInstance();...
assertTrue(instance.getTableItem(TableEle.TD) instanceof TableCol);
0
florent37/OCiney
app/src/main/java/com/bdc/ociney/activity/TheaterActivity.java
[ "public class BaseActivity extends AppCompatActivity implements LifecycleRegistryOwner {\n\n private final LifecycleRegistry mRegistry = new LifecycleRegistry(this);\n private AdsManager adsManager;\n\n public LifecycleRegistry getLifecycle() {\n return this.mRegistry;\n }\n\n @Override\n p...
import android.content.Intent; import android.content.res.Resources; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Bundle; import android.support.v4.app.FragmentTransaction; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.widget.T...
package com.bdc.ociney.activity; /** * Created by florentchampigny on 21/04/2014. */ public class TheaterActivity extends BaseActivity { TheaterFragment fragment; Toolbar toolbar; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); /...
AccessBaseFavoris db = new AccessBaseFavoris(this);
1
DiatomStudio/SketchChair
src/ShapePacking/spOutline.java
[ "public class functions {\n\tpublic static int DONT_INTERSECT = 0;\n\tpublic static int COLLINEAR = 1;\n\tpublic static int DO_INTERSECT = 2;\n\n\tpublic static float x = 0;\n\tpublic static float y = 0;\n\n\tpublic static float angleOf(Vec2D v1) {\n\t\tv1.normalize();\n\t\tfloat an = (float) Math.atan2(v1.y, v1.x)...
import ToolPathWriter.DXFWriter; import ToolPathWriter.HPGLWriter; import processing.core.PConstants; import processing.core.PGraphics; import toxi.geom.Vec2D; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; import java.util.Map; import cc.sketchchair.functions.functions; import cc.sketch...
/******************************************************************************* * This is part of SketchChair, an open-source tool for designing your own furniture. * www.sketchchair.cc * * Copyright (C) 2012, Diatom Studio ltd. Contact: hello@diatom.cc * * This program is free software: you c...
public spOutline(Sketch parentSketch, ArrayList<SketchPoint> outline) {
3
jinkg/UAFClient
fidoclient/src/main/java/com/yalin/fidoclient/op/CheckPolicy.java
[ "public class ASMException extends Exception {\n public short statusCode;\n\n public ASMException(short statusCode) {\n this.statusCode = statusCode;\n }\n}", "public class ASMRequest<T> {\n public static final String authenticatorIndexName = \"authenticatorIndex\";\n\n public Request reques...
import com.yalin.fidoclient.asm.exceptions.ASMException; import com.yalin.fidoclient.asm.msg.ASMRequest; import com.yalin.fidoclient.asm.msg.Request; import com.yalin.fidoclient.msg.Policy; import com.yalin.fidoclient.msg.RegistrationRequest; import com.yalin.fidoclient.ui.fragment.AuthenticatorListFragment;
/* * Copyright 2016 YaLin Jin * * 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 ...
asmRequest.requestType = Request.GetInfo;
2
albertoruibal/carballo
core/src/main/java/com/alonsoruibal/chess/movegen/MagicMoveGenerator.java
[ "public class Board {\n\tpublic static final int MAX_MOVES = 1024;\n\tpublic static final String FEN_START_POSITION = \"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1\";\n\tpublic static final String CHESS960_START_POSITIONS[] = {\"QNNRKR\", \"NQNRKR\", \"NNQRKR\", \"NNRQKR\", \"NNRKQR\", \"NNRKRQ\", \"QN...
import com.alonsoruibal.chess.Board; import com.alonsoruibal.chess.Color; import com.alonsoruibal.chess.Move; import com.alonsoruibal.chess.Piece; import com.alonsoruibal.chess.bitboard.BitboardAttacks; import com.alonsoruibal.chess.bitboard.BitboardUtils;
package com.alonsoruibal.chess.movegen; /** * Magic move generator * Generate pseudo-legal moves because can leave the king in check. * It does not set the check flag. * * @author Alberto Alonso Ruibal */ public class MagicMoveGenerator implements MoveGenerator { private int[] moves; private int moveIndex; ...
if (((square & BitboardUtils.b2_d) != 0) && (((square << 16) & all) == 0)) {
5
magnetsystems/message-samples-android
SmartShopper/app/src/main/java/com/magnet/smartshopper/activities/ProductListActivity.java
[ "public class ProductAdapter extends ArrayAdapter<Product> {\n // View lookup cache\n private static class ViewHolder {\n public ImageView ivItemImage;\n public TextView tvItemTitle;\n public TextView tvItemPrice;\n }\n\n public ProductAdapter(Context context, ArrayList<Product> aBo...
import android.content.Intent; import android.content.res.Resources; import android.os.AsyncTask; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterView; import android.widget.ListView...
package com.magnet.smartshopper.activities; public class ProductListActivity extends AppCompatActivity { private static final String API_KEY = "API_KEY"; private static String RESPONSE_FORMAT = "RESPONSE_FORMAT"; private static final String BASE_URL = "BASE_URL"; private final String TAG = "P...
SearchItemServiceClient apiService = restAdapter.create(SearchItemServiceClient.class);
3
CorwinJV/MobTotems
src/main/java/com/corwinjv/mobtotems/blocks/ModBlocks.java
[ "public class Reference {\n public static final String MOD_ID = \"mobtotems\";\n public static final String MOD_NAME = \"Mob Totems\";\n public static final String MOD_VERSION = \"1.12.1-0.3.0\";\n public static final String RESOURCE_PREFIX = MOD_ID + \":\";\n\n public static final String GUI_FACTORY...
import com.corwinjv.mobtotems.Reference; import com.corwinjv.mobtotems.blocks.items.TotemWoodItemBlock; import com.corwinjv.mobtotems.blocks.tiles.IncenseKindlingBoxTileEntity; import com.corwinjv.mobtotems.blocks.tiles.OfferingBoxTileEntity; import com.corwinjv.mobtotems.blocks.tiles.SacredLightTileEntity; import com....
package com.corwinjv.mobtotems.blocks; /** * Created by CorwinJV on 9/1/14. */ @Mod.EventBusSubscriber(modid = Reference.MOD_ID) public class ModBlocks { public static final HashSet<ItemBlock> ITEM_BLOCKS = new HashSet<>(); public static final String TOTEM_WOOD_NAME = "totem_wood"; public static fina...
GameRegistry.registerTileEntity(IncenseKindlingBoxTileEntity.class, Reference.RESOURCE_PREFIX + INCENSE_KINDLING_BOX_NAME);
2
rquast/swingsane
src/main/java/com/swingsane/gui/dialog/ImageTransformDialog.java
[ "public class BinarizeTransform implements IImageTransform {\n\n private int luminanceThreshold;\n\n private File sourceImageFile;\n private File outputImageFile;\n\n private static final ImageTransformType imageTransformType = ImageTransformType.BINARIZE;\n\n @Override\n public void configure(IPreferredDefau...
import java.awt.BorderLayout; import java.awt.Component; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; import javax.swi...
package com.swingsane.gui.dialog; /** * @author Roland Quast (roland@formreturn.com) * */ @SuppressWarnings("serial") public class ImageTransformDialog extends JDialog { private final JPanel contentPanel = new JPanel(); private int dialogResult = JOptionPane.CANCEL_OPTION; private static final int BOUND...
CropTransform cropTransform = new CropTransform();
1
bafomdad/uniquecrops
com/bafomdad/uniquecrops/crops/MaryJane.java
[ "public abstract class BlockCropsBase extends BlockCrops {\n\t\n\tprivate EnumCrops type;\n\tprotected boolean extra;\n\tprotected boolean canPlant;\n\tprotected boolean clickHarvest;\n\n\tpublic BlockCropsBase(EnumCrops type, boolean extra, boolean canPlant) {\n\t\t\n\t\tthis.type = type;\n\t\tthis.extra = extra;\...
import java.util.Random; import javax.annotation.Nullable; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentit...
package com.bafomdad.uniquecrops.crops; public class MaryJane extends BlockCropsBase { public MaryJane() { super(EnumCrops.BLAZINGPLANT, true, UCConfig.cropMaryjane); this.clickHarvest = false; } @Override public Item getSeed() {
return UCItems.seedsMaryjane;
4
abstractj/kalium
src/main/java/org/abstractj/kalium/keys/KeyPair.java
[ "public class Point {\n\n private static final String STANDARD_GROUP_ELEMENT = \"0900000000000000000000000000000000000000000000000000000000000000\";\n\n private final byte[] point;\n\n public Point() {\n this.point = HEX.decode(STANDARD_GROUP_ELEMENT);\n }\n\n public Point(byte[] point) {\n ...
import org.abstractj.kalium.crypto.Point; import org.abstractj.kalium.encoders.Encoder; import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_PUBLICKEYBYTES; import static org.abstractj.kalium.NaCl.Sodium.CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES; import static org.abstractj.ka...
/** * Copyright 2013 Bruno Oliveira, and individual contributors * * 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...
checkLength(this.secretKey, CRYPTO_BOX_CURVE25519XSALSA20POLY1305_SECRETKEYBYTES);
3
amrmagdy4/kite
kite-core/src/main/java/edu/umn/cs/kite/util/microblogs/Microblog.java
[ "public class DebugFlagger {\n public enum DebuggingState {DEBUG_ON, DEBUG_OFF}\n public enum TestingState {TEST_ON, TEST_OFF}\n\n /*\n public static DebuggingState debugTimedExecution = DebuggingState.DEBUG_ON;\n\n public static DebuggingState debugMQL = DebuggingState.DEBUG_ON;\n\n public static...
import edu.umn.cs.kite.common.DebugFlagger; import edu.umn.cs.kite.datamodel.Attribute; import edu.umn.cs.kite.datamodel.Scheme; import edu.umn.cs.kite.querying.condition.Condition; import edu.umn.cs.kite.util.GeoLocation; import edu.umn.cs.kite.util.Rectangle; import edu.umn.cs.kite.util.serialization.ByteStream; impo...
package edu.umn.cs.kite.util.microblogs; /** * Created by amr_000 on 8/1/2016. */ public class Microblog implements Serializable { //private long id; private Long timestamp; //private ArrayList<String> keywords; //private GeoLocation geolocation; //private String username; private HashMap...
GeoLocation loc, String user, long systemKey) {
4
henrytao-me/recyclerview-multistate-section-endless-adapter
sample/src/main/java/me/henrytao/sample/fragment/MultiStateFragment.java
[ "public abstract class RecyclerViewAdapter extends BaseAdapter implements MultiStateAdapter, EndlessAdapter {\n\n private boolean mEndlessEnabled = false;\n\n private int mEndlessThreshold = 1;\n\n @SuppressLint(\"UseSparseArrays\")\n private Map<Integer, Integer> mFooterStates = new HashMap<>();\n\n @Suppress...
import me.henrytao.recyclerview.adapter.MultiStateAdapter.OnVisibilityChangedListener; import me.henrytao.recyclerview.config.Constants; import me.henrytao.recyclerview.config.Visibility; import me.henrytao.sample.adapter.MultiStateAdapter; import me.henrytao.sample.adapter.SimpleAdapter; import me.henrytao.sample.util...
/* * Copyright 2016 "Henry Tao <hi@henrytao.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 applicable ...
mMultiStateAdapter.setVisibility(0, View.GONE, Constants.Type.FOOTER);
2
Blazemeter/blazemeter-jenkins-plugin
src/main/java/hudson/plugins/blazemeter/PerformanceBuilderDSLExtension.java
[ "public class JenkinsBlazeMeterUtils extends BlazeMeterUtils {\n\n private static final String APP_KEY = \"app_key=jnk100x987c06f4e10c4\";\n\n private static final String CLIENT_IDENTIFICATION = \"&_clientId=CI_JENKINS&_clientVersion=\"\n + Utils.version();\n\n public static String JENKINS_PLUGI...
import java.util.List; import com.blazemeter.api.explorer.User; import com.blazemeter.api.explorer.Workspace; import com.blazemeter.api.explorer.test.AbstractTest; import com.cloudbees.plugins.credentials.CredentialsScope; import hudson.Extension; import hudson.plugins.blazemeter.utils.JenkinsBlazeMeterUtils; import hu...
/** * Copyright 2018 BlazeMeter Inc. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to i...
JenkinsTestListFlow jenkinsTestListFlow = new JenkinsTestListFlow(bzmUtils, limit);
1
izumin5210/Droidux
examples/todomvc/src/main/java/info/izumin/android/droidux/example/todomvc/reducer/TodoListReducer.java
[ "public class AddTodoAction implements Action {\n public static final String TAG = AddTodoAction.class.getSimpleName();\n\n private final String text;\n\n public AddTodoAction(String text) {\n this.text = text;\n }\n\n public String getText() {\n return text;\n }\n\n @Override\n ...
import java.util.List; import info.izumin.android.droidux.annotation.Dispatchable; import info.izumin.android.droidux.annotation.Reducer; import info.izumin.android.droidux.example.todomvc.action.AddTodoAction; import info.izumin.android.droidux.example.todomvc.action.ClearCompletedTodoAction; import info.izumin.androi...
package info.izumin.android.droidux.example.todomvc.reducer; /** * Created by izumin on 11/4/15. */ @Reducer(TodoList.class) public class TodoListReducer { public static final String TAG = TodoListReducer.class.getSimpleName(); @Dispatchable(AddTodoAction.class) public TodoList onAddedTodo(TodoList s...
@Dispatchable(DeleteTodoAction.class)
2
jlaw90/Grimja
liblab/src/com/sqrt/liblab/codec/SetCodec.java
[ "public class GrimBitmap extends LabEntry {\n /**\n * The images contained within this bitmap\n */\n public final List<BufferedImage> images;\n\n public GrimBitmap(LabFile container, String name) {\n super(container, name);\n images = new LinkedList<BufferedImage>();\n }\n}", "pu...
import java.io.IOException; import java.util.ArrayList; import java.util.List; import com.sqrt.liblab.entry.graphics.GrimBitmap; import com.sqrt.liblab.entry.model.ColorMap; import com.sqrt.liblab.entry.model.set.Light; import com.sqrt.liblab.entry.model.set.Sector; import com.sqrt.liblab.entry.model.set.Set; import co...
int n = t.readInt(); set.colorMaps = new ColorMap[n]; for(int i = 0; i < n; i++) { t.skipWhitespace(); t.expectString("colormap"); String name = t.readString(); set.colorMaps[i] = (ColorMap) source.container.container.findByName(name); } ...
Vector3f cv = t.readVector3();
8
michal-michaluk/ddd-wro-warehouse
warehouse-infrastructure/src/main/java/warehouse/Main.java
[ "public class QualityReportService {\n\n private final ProductStockEventStore stocks;\n private final EventMappings.ExternalEvents events;\n\n public QualityReportService(ProductStockEventStore stocks, EventMappings mappings) {\n this.stocks = stocks;\n this.events = mappings.externalEvents()...
import org.sql2o.Sql2o; import quality.QualityReportService; import rest.api.v1.Inbox; import rest.api.v1.MasterData; import rest.api.v1.ProductStocks; import warehouse.carts.CartDefinitionRepository; import warehouse.picklist.FifoViewProjection; import warehouse.products.ProductStockEventSourcingRepository; import war...
package warehouse; /** * Created by michal on 13.07.2016. */ public class Main { public static void main(String[] args) { Sql2o database = new Sql2o(args[0], args[1], args[2]); OpsSupport support = new OpsSupport(); EventMappings mappings = new EventMappings(); TLabelsFormats l...
ProductStockEventStore stockEvents = new ProductStockSql2oEventsStore(database);
7
turn/camino
src/main/java/com/turn/camino/render/functions/FileSystemFunctions.java
[ "public interface Context {\n\n\t/**\n\t * Get system environment\n\t *\n\t * @return system environment\n\t */\n\tEnv getEnv();\n\n\t/**\n\t * Creates child context\n\t *\n\t * @return new context\n\t */\n\tContext createChild();\n\n\t/**\n\t * Gets parent context\n\t *\n\t * Returns a parent context, or null if c...
import static com.turn.camino.util.Message.prefix; import com.turn.camino.Context; import com.turn.camino.render.Function; import com.turn.camino.render.FunctionCallException; import com.turn.camino.render.FunctionCallExceptionFactory; import com.turn.camino.util.Message; import com.turn.camino.util.Validation; import ...
/* * Copyright (C) 2014-2018, Amobee Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
public Object invoke(List<?> params, Context context) throws FunctionCallException {
0
davidmoten/rxjava2-jdbc
rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/callable/internal/Getter2.java
[ "public static final class CallableResultSets2Builder<T1, T2> implements Getter3<T1, T2> {\n\n private final CallableBuilder b;\n private final Function<? super ResultSet, ? extends T1> f1;\n private final Function<? super ResultSet, ? extends T2> f2;\n\n CallableResultSets2Builder(CallableBuilder b, Fu...
import java.sql.ResultSet; import javax.annotation.Nonnull; import org.davidmoten.rx.jdbc.CallableBuilder.CallableResultSets2Builder; import org.davidmoten.rx.jdbc.Util; import org.davidmoten.rx.jdbc.tuple.Tuple2; import org.davidmoten.rx.jdbc.tuple.Tuple3; import org.davidmoten.rx.jdbc.tuple.Tuple4; import org.davidmo...
package org.davidmoten.rx.jdbc.callable.internal; public interface Getter2<T1> { <T2> CallableResultSets2Builder<T1, T2> get(Function<? super ResultSet, ? extends T2> function); default <T2> CallableResultSets2Builder<T1, T2> getAs(@Nonnull Class<T2> cls) { Preconditions.checkNotNull(cls, "cls c...
default <A, B, C> CallableResultSets2Builder<T1, Tuple3<A, B, C>> getAs(@Nonnull Class<A> cls1,
3
idega/se.idega.idegaweb.commune.accounting
src/java/se/idega/idegaweb/commune/accounting/invoice/business/CheckAmountBusinessBean.java
[ "public interface PaymentHeader extends com.idega.data.IDOEntity\n{\n public java.sql.Date getDateAttested();\n public java.sql.Date getPeriod();\n public com.idega.block.school.data.School getSchool();\n public com.idega.block.school.data.SchoolCategory getSchoolCategory();\n public java.lang.String getSchoolCateg...
import com.idega.block.school.business.SchoolUserBusiness; import com.idega.block.school.data.School; import com.idega.block.school.data.SchoolCategory; import com.idega.block.school.data.SchoolCategoryHome; import com.idega.block.school.data.SchoolHome; import com.idega.business.IBOLookupException; import com.idega.bu...
PaymentRecord [] records = new PaymentRecord [0]; if (null != schoolCategoryId && null != providerId) { records = getInvoiceBusiness () .getPaymentRecordsBySchoolCategoryAndProviderAndPeriod (schoolCategoryId, providerId, startPeriod, endPeriod); } final Document document = new Document (PageSi...
== PostingFieldBMPBean.JUSTIFY_RIGHT) {
5
edwise/complete-spring-project
src/test/java/com/edwise/completespring/controllers/FooControllerTest.java
[ "@Getter\n@Setter\n@Accessors(chain = true)\npublic class FooResource extends ResourceSupport {\n private Foo foo;\n}", "@Component\npublic class FooResourceAssembler extends ResourceAssemblerSupport<Foo, FooResource> {\n\n public FooResourceAssembler() {\n super(FooController.class, FooResource.clas...
import com.edwise.completespring.assemblers.FooResource; import com.edwise.completespring.assemblers.FooResourceAssembler; import com.edwise.completespring.entities.Foo; import com.edwise.completespring.entities.FooTest; import com.edwise.completespring.exceptions.InvalidRequestException; import org.junit.Before; impor...
package com.edwise.completespring.controllers; @RunWith(MockitoJUnitRunner.class) public class FooControllerTest { private static final long FOO_ID_TEST1 = 1L; private static final String FOO_TEXT_ATTR_TEST1 = "AttText1"; private static final LocalDate DATE_TEST1 = LocalDate.of(2013, 1, 26); @Mock ...
Foo fooReq = FooTest.createFoo(FOO_ID_TEST1, null, null);
3
Fedict/dcattools
scrapers/src/main/java/be/fedict/dcat/scrapers/brugge/HtmlBrugge.java
[ "public class Cache {\n private static final Logger logger = LoggerFactory.getLogger(Cache.class);\n \n private DB db = null;\n private static final String CACHE = \"cache\";\n private static final String URLS = \"urls\";\n private static final String PAGES = \"pages\";\n\n /**\n * Stor...
import be.fedict.dcat.scrapers.Cache; import be.fedict.dcat.scrapers.Page; import be.fedict.dcat.helpers.Storage; import be.fedict.dcat.scrapers.Html; import be.fedict.dcat.vocab.MDR_LANG; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.uti...
/* * Copyright (c) 2017, FPS BOSA DG DT * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of condit...
store.add(dist, DCTERMS.LANGUAGE, MDR_LANG.MAP.get(lang));
4
heremaps/here-aaa-java-sdk
here-oauth-client/src/main/java/com/here/account/auth/provider/FromDefaultHereCredentialsPropertiesFile.java
[ "public class OAuth1ClientCredentialsProvider implements ClientCredentialsProvider {\n\n private final Clock clock;\n private final String tokenEndpointUrl;\n private final OAuth1Signer oauth1Signer;\n private final String scope;\n \n /**\n * Construct a new {@code OAuth1ClientCredentialsProvi...
import java.io.File; import java.io.IOException; import java.util.Properties; import com.here.account.auth.OAuth1ClientCredentialsProvider; import com.here.account.http.HttpConstants.HttpMethods; import com.here.account.http.HttpProvider.HttpRequestAuthorizer; import com.here.account.oauth2.ClientAuthorizationRequestPr...
/* * Copyright (c) 2017 HERE Europe B.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
public HttpRequestAuthorizer getClientAuthorizer() {
2
mikolajmitura/java-properties-to-json
src/main/java/pl/jalokim/propertiestojson/resolvers/primitives/adapter/PrimitiveJsonTypeResolverToNewApiAdapter.java
[ "public abstract class AbstractJsonType {\r\n\r\n /**\r\n * This one simply concatenate to rest of json. Simply speaking when will not converted then will not create whole json correctly.\r\n *\r\n * @return string for part of json.\r\n */\r\n public abstract String toStringJson();\r\n\r\n ...
import static java.util.Arrays.asList; import static pl.jalokim.utils.reflection.InvokableReflectionUtils.invokeMethod; import static pl.jalokim.utils.reflection.InvokableReflectionUtils.setValueForField; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import java.util.Optional; import...
package pl.jalokim.propertiestojson.resolvers.primitives.adapter; @SuppressWarnings("unchecked") @SuppressFBWarnings("UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR")
public final class PrimitiveJsonTypeResolverToNewApiAdapter extends PrimitiveJsonTypeResolver<Object>
2
k0shk0sh/FastAccess
app/src/main/java/com/fastaccess/ui/modules/apps/device/DeviceAppsView.java
[ "public class DeviceAppsEventModel {\n\n public DeviceAppsEventModel() {}\n}", "public class InputHelper {\n\n\n private static boolean isWhiteSpaces(String s) {\n return s != null && s.matches(\"\\\\s+\");\n }\n\n public static boolean isEmpty(String text) {\n return text == null || Tex...
import android.content.Context; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.content.Loader; import android.support.v4.widget.NestedScrollView; import android.support.v7.app.AppCompatActivity; import android.support.v7.view.Ac...
package com.fastaccess.ui.modules.apps.device; /** * Created by Kosh on 10 Oct 2016, 11:47 PM */ public class DeviceAppsView extends BaseFragment<DeviceAppsMvp.View, DeviceAppsPresenter> implements DeviceAppsMvp.View { public static final String TAG = "DeviceAppsView"; @BindView(R.id.recycler) DynamicR...
@BindView(R.id.empty_text) FontTextView emptyText;
5
blacklocus/jres
jres-test/src/test/java/com/blacklocus/jres/request/search/facet/JresTermsFacetTest.java
[ "public class BaseJresTest {\n\n @BeforeClass\n public static void startLocalElasticSearch() {\n ElasticSearchTestInstance.triggerStaticInit();\n }\n\n /**\n * Configured to connect to a local ElasticSearch instance created specifically for unit testing\n */\n protected Jres jres = new...
import com.blacklocus.jres.BaseJresTest; import com.blacklocus.jres.model.search.TermsFacet; import com.blacklocus.jres.request.index.JresCreateIndex; import com.blacklocus.jres.request.index.JresIndexDocument; import com.blacklocus.jres.request.index.JresRefresh; import com.blacklocus.jres.request.mapping.JresPutMappi...
/** * Copyright 2015 BlackLocus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
jres.quest(new JresCreateIndex(index));
2
Sheigutn/pushbullet-java-8
src/main/java/com/github/sheigutn/pushbullet/items/push/sent/Push.java
[ "public class DeleteSpecificPushRequest extends DeleteRequest<Void> {\n\n public DeleteSpecificPushRequest(String pushIdentity) {\n super(Urls.PUSHES + \"/\" + pushIdentity);\n }\n}", "public class ChangePushDismissStatusRequest extends PostRequest<Push> {\n\n @SerializedName(\"dismissed\")\n p...
import com.github.sheigutn.pushbullet.http.defaults.delete.DeleteSpecificPushRequest; import com.github.sheigutn.pushbullet.http.defaults.post.ChangePushDismissStatusRequest; import com.github.sheigutn.pushbullet.items.PushbulletObject; import com.github.sheigutn.pushbullet.interfaces.Deletable; import com.github.sheig...
package com.github.sheigutn.pushbullet.items.push.sent; @Getter @Setter(AccessLevel.PROTECTED) @ToString(callSuper = true) @NoArgsConstructor(access = AccessLevel.PROTECTED) public class Push extends PushbulletObject implements Deletable, Dismissable { /** * The type of the push */
private PushType type;
5
fvalente/LogDruid
src/logdruid/engine/ReportProcessor.java
[ "public class Source implements Comparable{\n\tprivate static Logger logger = Logger.getLogger(Source.class.getName());\n\tprivate String sourceName;\n\tprivate String sourcePattern;\n\tprivate DateFormat dateFormat;\n\tprivate Boolean active;\n\tprivate MetadataRecording activeMetadataRecording;\n\tprivate ArrayLi...
import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.regex.Matcher; import org.apa...
if (recItem2.isSelected()) { try { temp.add(matcher2.group(count + 1)); } catch (StringIndexOutOfBoundsException siobe) { logger.debug("not matched: " + rec.getName() + reportItem.getLine()); temp.add(""); } catch (IllegalStateException e) { logger.debug("not matched2: " + rec...
ReportData.occurenceReport.put(source, new ConcurrentHashMap<Recording, Map<List<Object>, Long>>());
3
KDE/kdeconnect-android
src/org/kde/kdeconnect/Plugins/MousePadPlugin/SendKeystrokesToHostActivity.java
[ "public class BackgroundService extends Service {\n private static final int FOREGROUND_NOTIFICATION_ID = 1;\n\n private static BackgroundService instance;\n\n public interface DeviceListChangedCallback {\n void onDeviceListChanged();\n }\n\n public interface PluginCallback<T extends Plugin> ...
import android.content.Intent; import android.content.SharedPreferences; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; import android.widget.Toast; import androidx.annotation.RequiresApi; import androidx.appcompat.app.AppCompatActivity; import org.kde.kdeconnect.Backgro...
/* * SPDX-FileCopyrightText: 2021 Daniel Weigl <DanielWeigl@gmx.at> * * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL */ package org.kde.kdeconnect.Plugins.MousePadPlugin; public class SendKeystrokesToHostActivity extends AppCompatActivity { // text with these lengt...
items.add(new EntryItemWithIcon(d.getName(), d.getIcon()));
3
openbakery/timetracker
src/main/java/org/openbakery/timetracker/web/report/GenerateCSVReportButton.java
[ "@Entity\n@Table(name = \"timeentry\")\npublic class TimeEntry implements Serializable {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\t@Id\n\t@GeneratedValue\n\tprivate int id;\n\n\t@Column(name = \"begin_time\")\n\t@Temporal(TemporalType.TIMESTAMP)\n\tprivate Date begin;\n\n\t@Column(name = \"end_time...
import org.apache.wicket.Localizer; import org.apache.wicket.markup.html.form.Button; import org.apache.wicket.model.ResourceModel; import org.apache.wicket.request.handler.resource.ResourceStreamRequestHandler; import org.apache.wicket.request.resource.ContentDisposition; import org.apache.wicket.spring.injection.anno...
package org.openbakery.timetracker.web.report; /** * User: rene * Date: 06.05.11 */ public class GenerateCSVReportButton extends Button { private static Logger log = LoggerFactory.getLogger(GenerateCSVReportButton.class); private static final String SEPARATOR = ";"; private static final String NEWLIN...
List<TimeEntry> timeEntryList = null;
0
OpsLabJPL/MarsImagesAndroid
MarsImages/MarsImages/src/main/java/gov/nasa/jpl/hi/marsimages/models/ImageQuad.java
[ "public abstract class Rover {\n\n public static final String CURIOSITY = \"Curiosity\";\n public static final String OPPORTUNITY = \"Opportunity\";\n public static final String SPIRIT = \"Spirit\";\n\n public static final String TAG = \"Rover\";\n\n static final String SOL = \"Sol\";\n static fin...
import android.graphics.Bitmap; import android.util.Log; import android.view.View; import com.evernote.edam.type.Note; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.core.assist.FailReason; import com.nostra13.universalimageloader.core.assist.ImageSize; import com.no...
double d2 = distanceBetween(center, v2); double d3 = distanceBetween(center, v3); boundingSphereRadius = d0; if (d1>boundingSphereRadius) boundingSphereRadius=d1; if (d2>boundingSphereRadius) boundingSphereRadius=d2; if (d3>boundingSphereRadius) boundingSphereRadius=d3; ...
public boolean cameraIsLookingAtMe(Camera viewPortCamera) {
2
jamesonwilliams/medium-sdk-java
src/main/java/com/medium/api/Medium.java
[ "public class AccessToken {\n\n /**\n * The JSON key for the token type.\n */\n private static final String TOKEN_TYPE_KEY = \"token_type\";\n\n /**\n * The JSON key for the access token field.\n */\n private static final String ACCESS_TOKEN_KEY = \"access_token\";\n\n /**\n * The...
import com.medium.api.auth.AccessToken; import com.medium.api.auth.Scope; import com.medium.api.model.Contributor; import com.medium.api.model.Image; import com.medium.api.model.Post; import com.medium.api.model.Publication; import com.medium.api.model.Submission; import com.medium.api.model.User; import java.util.Coll...
/* * Copyright 2017 nosemaj.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 to in w...
final Submission submission, final String userId);
6
AtomicBlom/ShearMadness
src/integration/java/com/github/atomicblom/shearmadness/variations/immersiveengineering/IEVariations.java
[ "@SideOnly(Side.CLIENT)\npublic interface IVariationRegistry\n{\n /**\n * Registers a Model Maker that will be used when the function predicate matches\n * @param handlesVariant a function that should return true if your IModelMaker applies to the itemStack\n * @param variationModelMaker the model ma...
import com.github.atomicblom.shearmadness.api.IVariationRegistry; import com.github.atomicblom.shearmadness.api.ItemStackHelper; import com.github.atomicblom.shearmadness.api.events.RegisterShearMadnessVariationEvent; import com.github.atomicblom.shearmadness.api.transformation.ConveyorTransformations; import com.githu...
package com.github.atomicblom.shearmadness.variations.immersiveengineering; @Mod.EventBusSubscriber(Side.CLIENT) public class IEVariations { @SubscribeEvent(priority = EventPriority.HIGH) @Optional.Method(modid = IEReference.IMMERSIVE_ENGINEERING) public static void onShearMadnessRegisterVariations(Regist...
new ImmersiveEngineeringPostModelMaker()
4
jimmoores/quandl4j
core/src/test/java/com/jimmoores/quandl/example/Example2.java
[ "public final class DataSetRequest implements Request {\n private static final String START_DATE_PARAM = \"start_date\";\n private static final String END_DATE_PARAM = \"end_date\";\n private static final String COLUMN_INDEX_PARAM = \"column_index\";\n private static final String FREQUENCY_PARAM = \"collapse\";...
import com.jimmoores.quandl.DataSetRequest; import com.jimmoores.quandl.Frequency; import com.jimmoores.quandl.QuandlSession; import com.jimmoores.quandl.TabularResult; import com.jimmoores.quandl.Transform;
package com.jimmoores.quandl.example; /** * @deprecated this example covers the deprecated API. * Example 2. */ public final class Example2 { private static final int CLOSE_COLUMN = 4; /** * Private default constructor. */ private Example2() { } /** * The main body of the code. */ privat...
.withFrequency(Frequency.QUARTERLY)
1
Daskiworks/ghwatch
app/src/main/java/com/daskiworks/ghwatch/backend/NotificationDetailLoader.java
[ "public class Utils {\n\n public static final long MILLIS_SECOND = 1000L;\n public static final long MILLIS_MINUTE = 60 * MILLIS_SECOND;\n public static final long MILLIS_HOUR = 60 * MILLIS_MINUTE;\n public static final long MILLIS_DAY = 24 * MILLIS_HOUR;\n\n /**\n * Get Vibrator if available in system.\n ...
import android.content.Context; import android.util.Log; import com.daskiworks.ghwatch.Utils; import com.daskiworks.ghwatch.auth.AuthenticationManager; import com.daskiworks.ghwatch.model.Label; import com.daskiworks.ghwatch.model.Notification; import com.daskiworks.ghwatch.model.NotificationStream; import com.daskiwor...
/* * Copyright 2015 contributors as indicated by the @authors tag. * * 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 re...
inputObject.setSubjectDetailHtmlUrl(Utils.trimToNull(remoteResponse.getString("html_url")));
0
marcbux/Hi-WAY
hiway-db/src/main/java/de/huberlin/hiwaydb/useDB/HiwayDB.java
[ "@Entity\npublic class Accesstime {\n\n\t@Id\n\t@GeneratedValue\n\tprivate Long id;\n\n\tprivate String funktion;\n\tprivate String input;\n\tprivate Long tick;\n\tprivate Long tock;\n\tprivate Long ticktockdif;\n\tprivate Long dbvolume;\n\tprivate Long returnvolume;\n\tprivate String wfName;\n\tprivate String runI...
import java.io.PrintWriter; import java.io.StringWriter; import java.io.Writer; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibern...
String filename = null; File file = null; if (logEntryRow.getFile() != null && invoc != null) { filename = logEntryRow.getFile(); query = oneSession.createQuery("FROM File E WHERE E.name='" + filename + "' AND E.invocation=" + invoc.getId()); System.out.println("File Query:" + query.toString())...
Hiwayevent he = new Hiwayevent();
2
ProductLayer/ProductLayer-SDK-for-Android
ply-android-demo/src/main/java/com/productlayer/android/demo/handler/DemoNavigationHandler.java
[ "public class GlobalTimelineFragment extends TimelineFragment {\n\n public static final String NAME = \"GlobalTimeline\";\n public static final String SETTINGS_TAG = \"global\";\n public static final int DEFAULT_SETTINGS = 0;\n\n /**\n * @return this fragment's name and initialization parameters\n ...
import com.productlayer.android.common.fragment.GlobalTimelineFragment; import com.productlayer.android.common.fragment.ProductFragment; import com.productlayer.android.common.handler.NavigationHandler; import com.productlayer.android.sdk.PLYAndroid; import com.productlayer.android.sdk.PLYCompletion; import com.product...
/* * Copyright (c) 2016, ProductLayer GmbH All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of condit...
public void showSignInDialog(PLYAndroid.Query queryOnSuccess, PLYCompletion queryOnSuccessCompletion,
4
jbush001/WaveView
src/main/java/waveview/MainWindow.java
[ "public final class Search {\n private final BooleanExpressionNode searchExpression;\n\n /// Generate a search given a set of nets that matches at the given\n /// timestamp.\n public static String generateFromValuesAt(NetDataModel[] nets, long timestamp) {\n StringBuilder searchExpr = new StringB...
import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.File; import java.io.IOException; import javax.swing.ImageIcon; import ...
// // Copyright 2011-2012 Jeff Bush // // 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 ...
private final WaveformDataModel waveformDataModel = new WaveformDataModel();
4
google/kiwi-solver
src/main/java/kiwi/modeling/Constraints.java
[ "public class Solver {\n\n private final Trail trail;\n private final PropagationQueue pQueue;\n private final DFSearch search;\n\n private boolean feasible = true;\n\n public Solver() {\n this.trail = new Trail();\n this.pQueue = new PropagationQueue();\n this.search = new DFSearch(pQueue, trail);\n ...
import kiwi.Solver; import kiwi.constraint.AllDifferent; import kiwi.constraint.DifferentVal; import kiwi.constraint.DifferentVar; import kiwi.constraint.LowerEqualVal; import kiwi.constraint.LowerEqualVar; import kiwi.constraint.Sum; import kiwi.propagation.Propagator; import kiwi.variable.IntVar;
/* * Copyright 2016, Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
return new LowerEqualVar(x, y, false);
5
christophesmet/ledsgetIton
app/src/main/java/com/getiton/android/app/tutorial/TutorialRegisterFlowActivity.java
[ "public class ApplicationController extends MultiDexApplication {\n\n private ObjectGraph mObjectGraph;\n\n\n @Override\n public void onCreate() {\n super.onCreate();\n setupDagger();\n setupDb();\n Fabric.with(this, new Crashlytics());\n Crashlytics.logException(new Exce...
import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.widget.Toolbar; import android.view.View; import android.widget.ProgressBar; i...
Intent output = new Intent(act, TutorialRegisterFlowActivity.class); output.putExtra(KEY_CONFIG, config); return output; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.tutorial_register_flo...
Intent intent = RgbV1Activity.creatIntent(this, macId, 0xFF33000);
4
liuyanggithub/Hi
src/com/ly/hi/im/ui/fragment/RecentFragment.java
[ "public class MessageRecentAdapter extends ArrayAdapter<BmobRecent> implements Filterable{\n\t\n\tprivate LayoutInflater inflater;\n\tprivate List<BmobRecent> mData;\n\tprivate Context mContext;\n\t\n\tpublic MessageRecentAdapter(Context context, int textViewResourceId, List<BmobRecent> objects) {\n\t\tsuper(contex...
import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterVie...
package com.ly.hi.im.ui.fragment; /** ×î½ü»á»° * @author liuy */ public class RecentFragment extends FragmentBase implements OnItemClickListener,OnItemLongClickListener{ ClearEditText mClearEditText; ListView listview; MessageRecentAdapter adapter; @Override public View onCreateView(LayoutInflater infl...
Intent intent = new Intent(getActivity(), ChatActivity.class);
1
Yelp/yelp-android
src/test/java/com/yelp/clientlib/exception/ErrorHandlingInterceptorTest.java
[ "public class BusinessUnavailable extends YelpAPIError {\n public BusinessUnavailable(int code, String message, String id, String text) {\n super(code, message, id, text);\n }\n}", "public class InternalError extends YelpAPIError {\n public InternalError(int code, String message, String id, String...
import okhttp3.Interceptor; import okhttp3.MediaType; import okhttp3.Protocol; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; import com.yelp.clientlib.exception.exceptions.BusinessUnavailable; import com.yelp.clientlib.exception.exceptions.InternalError; import com.yelp.clientlib.excepti...
package com.yelp.clientlib.exception; @RunWith(PowerMockRunner.class) @PrepareForTest({Request.class, Response.class, Protocol.class}) public class ErrorHandlingInterceptorTest { Interceptor errorHandlingInterceptor; @Before public void setUp() { this.errorHandlingInterceptor = new ErrorHandli...
ErrorTestUtils.verifyErrorContent(error, errorCode, errorMessage, null, null);
4
ceridwen-com/ceridwen-standard-interchange-protocol-library
src/main/java/com/ceridwen/circulation/SIP/messages/ItemInformationResponse.java
[ "public enum FieldPolicy {\n REQUIRED,\n NOT_REQUIRED,\n DEFAULT;\n}", "public enum CirculationStatus implements AbstractEnumeration {\n OTHER(\"01\"),\n ON_ORDER(\"02\"),\n AVAILABLE(\"03\"),\n CHARGED(\"04\"),\n CHARGED_UNTIL_RECALL_DATE(\"05\"),\n IN_PROCESS(\"06\"),\n ...
import java.util.Date; import com.ceridwen.circulation.SIP.annotations.Command; import com.ceridwen.circulation.SIP.annotations.PositionedField; import com.ceridwen.circulation.SIP.annotations.TaggedField; import com.ceridwen.circulation.SIP.annotations.TestCaseDefault; import com.ceridwen.circulation.SIP.annotations.T...
/* * Copyright (C) 2020 Ceridwen Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is ...
private CurrencyType currencyType;
2
taoneill/war
war/src/main/java/com/tommytony/war/mapper/WarYmlMapper.java
[ "public class War extends JavaPlugin {\n\tstatic final boolean HIDE_BLANK_MESSAGES = true;\n\tpublic static War war;\n\tprivate static ResourceBundle messages = ResourceBundle.getBundle(\"messages\");\n\tprivate final List<OfflinePlayer> zoneMakerNames = new ArrayList<>();\n\tprivate final List<String> commandWhite...
import com.tommytony.war.War; import com.tommytony.war.Warzone; import com.tommytony.war.config.KillstreakReward; import com.tommytony.war.config.MySQLConfig; import com.tommytony.war.job.RestoreYmlWarhubJob; import com.tommytony.war.job.RestoreYmlWarzonesJob; import com.tommytony.war.structure.WarHub; import com.tommy...
package com.tommytony.war.mapper; public class WarYmlMapper { public static void load() { (War.war.getDataFolder()).mkdir(); (new File(War.war.getDataFolder().getPath() + "/dat")).mkdir(); File warTxtFile = new File(War.war.getDataFolder().getPath() + "/war.txt"); File warYmlFile = new File(War.war.getData...
RestoreYmlWarhubJob restoreWarhub = new RestoreYmlWarhubJob(hubConfigSection);
4
Tonius/SimplyJetpacks
src/main/java/tonius/simplyjetpacks/item/ItemJetpackFueller.java
[ "@Mod(modid = SimplyJetpacks.MODID, version = SimplyJetpacks.VERSION, dependencies = SimplyJetpacks.DEPENDENCIES, guiFactory = SimplyJetpacks.GUI_FACTORY)\npublic class SimplyJetpacks {\n \n public static final String MODID = \"simplyjetpacks\";\n public static final String VERSION = \"@VERSION@\";\n pu...
import java.util.List; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumAction; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDire...
package tonius.simplyjetpacks.item; public class ItemJetpackFueller extends ItemRegistered { public ItemJetpackFueller(String registryName) { super(registryName); this.setUnlocalizedName(SimplyJetpacks.PREFIX + "jetpackFueller"); this.setTextureName(SimplyJetpacks.RESOURCE_P...
PackBase pack = packItem.getPack(chestplate);
1
orgzly/org-java
src/main/java/com/orgzly/org/parser/OrgSaxyParser.java
[ "public class OrgFile {\n\n /** In-buffer settings. */\n private OrgFileSettings settings;\n\n /** Text before the first heading. */\n private String preface;\n\n public OrgFile() {\n\t}\n\n public OrgFileSettings getSettings() {\n if (settings == null) {\n settings = new OrgFile...
import com.orgzly.org.OrgFile; import com.orgzly.org.OrgHead; import com.orgzly.org.OrgPatterns; import com.orgzly.org.OrgStringUtils; import com.orgzly.org.datetime.OrgRange; import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import java.util.HashSet; import java.util.Set; import java.ut...
package com.orgzly.org.parser; /** * The actual parsing happens here. */ class OrgSaxyParser extends OrgParser { private static final int FIRST_HEADING_POSITION_NUMBER = 1; private BufferedReader reader; private OrgSaxyParserListener listener; private Pattern statePattern; public OrgSaxyPars...
OrgFile orgFile = new OrgFile();
0
ceylon/ceylon-module-resolver
maven/src/main/java/com/redhat/ceylon/cmr/maven/AetherContentStore.java
[ "@SuppressWarnings(\"serial\")\npublic class ArtifactContext implements Serializable, ContentOptions {\n public static final String CAR = \".car\";\n public static final String JAR = \".jar\";\n public static final String JS_MODEL = \"-model.js\";\n public static final String JS = \".js\";\n public s...
import com.redhat.ceylon.cmr.spi.OpenNode; import com.redhat.ceylon.cmr.spi.SizedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.util.Collections; import com.redhat.ceylon.cmr.api.ArtifactContext; import com.redhat.ceylon.common.log.L...
/* * Copyright 2011 Red Hat inc. and third party contributors as noted * by the author tags. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENS...
public SizedInputStream getBinariesAsSizedStream() throws IOException {
5
mike10004/xvfb-manager-java
xvfb-manager/src/test/java/com/github/mike10004/xvfbmanager/DefaultXvfbControllerTest.java
[ "protected interface XLockFileChecker {\n void waitForCleanup(String display, long timeoutMs) throws LockFileCheckingException;\n\n @SuppressWarnings(\"unused\")\n class LockFileCheckingException extends XvfbException {\n public LockFileCheckingException() {\n }\n\n public LockFileChec...
import io.github.mike10004.subprocess.ProcessMonitor; import com.github.mike10004.xvfbmanager.DefaultXvfbController.XLockFileChecker; import com.github.mike10004.xvfbmanager.DefaultXvfbController.XwininfoParser; import com.github.mike10004.xvfbmanager.DefaultXvfbController.XwininfoXwindowParser; import com.github.mike1...
package com.github.mike10004.xvfbmanager; public class DefaultXvfbControllerTest { @Test public void XwininfoParser_parseWindow() throws Exception { XwininfoXwindowParser parser = new XwininfoXwindowParser();
List<Pair<String, XWindow>> testCases = Arrays.asList(
3
narrowtux/Showcase
src/main/java/com/narrowtux/showcase/types/TutorialShowcaseExtra.java
[ "public class Metrics {\n\n /**\n * The current revision number\n */\n private final static int REVISION = 5;\n\n /**\n * The base url of the metrics domain\n */\n private static final String BASE_URL = \"http://metrics.griefcraft.com\";\n\n /**\n * The url used to report a server...
import com.narrowtux.showcase.Metrics; import com.narrowtux.showcase.Showcase; import com.narrowtux.showcase.ShowcaseExtra; import com.narrowtux.showcase.ShowcaseItem; import com.narrowtux.showcase.ShowcasePlayer;
/* * Copyright (C) 2011 Moritz Schmale <narrow.m@gmail.com> * * Showcase 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. * * Th...
private ShowcaseItem showcase = null;
3
patrickfav/uber-adb-tools
src/main/java/at/favre/tools/uberadb/actions/PackageDependentAction.java
[ "public interface AdbLocationFinder {\n enum Location {\n PATH, CUSTOM, WIN_DEFAULT, MAC_DEFAULT, LINUX_DEFAULT, ANDROID_HOME\n }\n\n /**\n * Returns the location of the adb\n *\n * @param cmdProvider used to test if adb is executable\n * @param customPath to check provided by user\...
import at.favre.tools.uberadb.AdbLocationFinder; import at.favre.tools.uberadb.CmdProvider; import at.favre.tools.uberadb.parser.AdbDevice; import at.favre.tools.uberadb.parser.DumpsysPackageParser; import at.favre.tools.uberadb.parser.InstalledPackagesParser; import at.favre.tools.uberadb.parser.PackageMatcher; import...
/* * * * Copyright 2016 Patrick Favre-Bulle * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unl...
DumpsysPackageParser.PackageInfo packageInfo = getPackageInfo(device, filteredPackage, cmdProvider, adbLocation);
3
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
[ "public class BuildConfiguration\n{\n /**\n * Constant for the default configuration name.\n */\n public static final String DEFAULT_CONFIGURATION = \"Release\";\n\n /**\n * Construct a default BuildConfiguration.\n */\n public BuildConfiguration()\n {\n name = DEFAULT_CONFIGUR...
import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.security.InvalidParameterException; import java.text.ParseException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.rege...
/* * Copyright 2013 Andrew Everitt, Andrew Heckford, Daniele Masato * * 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 requ...
protected List<File> getProjectSources( VCProject vcProject, boolean includeHeaders, List<String> excludes )
7
lightcouch/LightCouch
src/test/java/org/lightcouch/tests/ChangeNotificationsTest.java
[ "public class Changes {\n\t\n\tprivate BufferedReader reader;\n\tprivate HttpGet httpGet;\n\tprivate Row nextRow;\n\tprivate boolean stop;\n\t\n\tprivate CouchDbClientBase dbc;\n\tprivate Gson gson;\n\tprivate URIBuilder uriBuilder;\n\t\n\tChanges(CouchDbClientBase dbc) {\n\t\tthis.dbc = dbc;\n\t\tthis.gson = dbc.g...
import org.lightcouch.CouchDbInfo; import org.lightcouch.Response; import com.google.gson.JsonObject; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; import java.util.List; import org.junit....
/* * Copyright (C) 2011 lightcouch.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 ...
ChangesResult changes = dbClient.changes()
1
iLexiconn/Magister.java
src/main/java/net/ilexiconn/magister/handler/PresenceHandler.java
[ "public class Magister {\n public static final String VERSION = \"0.1.2\";\n\n public static final int SESSION_TIMEOUT = 1200000;\n\n public Gson gson = new GsonBuilder()\n .registerTypeAdapter(Profile.class, new ProfileAdapter())\n .registerTypeAdapter(Study[].class, new StudyAdapter...
import net.ilexiconn.magister.container.Presence; import net.ilexiconn.magister.container.PresencePeriod; import net.ilexiconn.magister.exeption.PrivilegeException; import net.ilexiconn.magister.util.GsonUtil; import net.ilexiconn.magister.util.HttpUtil; import java.io.IOException; import java.util.HashMap; import java...
/* * Copyright (c) 2015 iLexiconn * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publis...
return gson.fromJson(HttpUtil.httpGet(magister.schoolUrl.getApiUrl() + "personen/" + magister.profile.id + "/absenties?tot=" + (period == null ? magister.currentStudy.startDate : period.start) + "&van=" + (period == null ? magister.currentStudy.endDate : period.end)), Presence[].class);
7
apache/geronimo-gshell
gshell-core/src/main/java/org/apache/geronimo/gshell/commandline/ExecutingVisitor.java
[ "public class ASTQuotedString\n extends StringSupport\n{\n public ASTQuotedString(final int id) {\n super(id);\n }\n\n public ASTQuotedString(final CommandLineParser p, final int id) {\n super(p, id);\n }\n\n public String getValue() {\n return unquote(super.getValue());\n ...
import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.commons.lang.NullArgumentException; import java.util.List; import java.util.ArrayList; import org.apache.geronimo.gshell.commandline.parser.CommandLineParserVisitor; import org.apache.geronimo.gshell.commandline.parse...
/* * 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 ...
private final Shell shell;
4
yassirh/digitalocean-swimmer
DigitalOceanSwimmer/src/main/java/com/yassirh/digitalocean/utils/MyBroadcastReceiver.java
[ "public class Account {\n\n\tprivate Long id;\n\tprivate String name;\n\tprivate String token;\n\tprivate String refreshToken;\n\tprivate Date expiresIn;\n\tprivate boolean selected;\n\t\n\tpublic Account() {\n\t}\n\t\n\tpublic Account(Long id, String name, String token, String refreshToken,\n\t\t\tDate expiresIn, ...
import java.util.Date; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.yassirh.digitalocean.model.Account; import com.yassirh.digitalocean.service.AccountService; import com.yassirh.digitalocean.service.DomainService; import com.yassirh.digitalocean.se...
package com.yassirh.digitalocean.utils; public class MyBroadcastReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { Account currentAccount = ApiHelper.getCurrentAccount(context); if(currentAccount == null){ return; } if(!ApiHelper.isValidToken(current...
SSHKeyService sshKeyService = new SSHKeyService(context);
7
JeffreyFalgout/ThrowingStream
throwing-stream/src/main/java/name/falgout/jeffrey/throwing/stream/terminal/ThrowingIntStreamTerminal.java
[ "public interface ThrowingBaseSpliterator<E, X extends Throwable, S extends ThrowingBaseSpliterator<E, X, S>> {\n public static interface ThrowingSpliterator<E, X extends Throwable>\n extends ThrowingBaseSpliterator<E, X, ThrowingSpliterator<E, X>> {}\n\n public static interface OfPrimitive<E, E_CONS, X exte...
import java.util.IntSummaryStatistics; import java.util.OptionalDouble; import java.util.OptionalInt; import java.util.function.BiConsumer; import java.util.function.IntBinaryOperator; import java.util.function.IntConsumer; import java.util.function.IntPredicate; import java.util.function.ObjIntConsumer; import java.ut...
package name.falgout.jeffrey.throwing.stream.terminal; public interface ThrowingIntStreamTerminal<X extends Throwable> extends ThrowingBaseStreamTerminal<Integer, X> { @Override public ThrowingIterator.OfInt<X> iterator(); @Override public ThrowingBaseSpliterator.OfInt<X> spliterator(); default publi...
public int reduce(int identity, ThrowingIntBinaryOperator<? extends X> op) throws X;
2
OpenBEL/cytoscape-plugins
org.openbel.cytoscape.navigator/src/org/openbel/cytoscape/navigator/NetworkUtility.java
[ "public static final String KAM_COMPILE_DATE_ATTR = \"KAM_COMPILE_DATE\";", "public static final String KAM_EDGE_ID_ATTR = \"KAM_EDGE_ID\";", "public static final String KAM_NAME_ATTR = \"KAM_NAME\";", "public static final String KAM_NODE_FUNCTION_ATTR = \"KAM_NODE_FUNCTION\";", "public static final String ...
import static org.openbel.cytoscape.navigator.KamNavigatorPlugin.KAM_COMPILE_DATE_ATTR; import static org.openbel.cytoscape.navigator.KamNavigatorPlugin.KAM_EDGE_ID_ATTR; import static org.openbel.cytoscape.navigator.KamNavigatorPlugin.KAM_NAME_ATTR; import static org.openbel.cytoscape.navigator.KamNavigatorPlugin.KAM_...
/* * 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...
edgeAtt.setAttribute(cye.getIdentifier(), KAM_EDGE_ID_ATTR,
1
VladThodo/behe-keyboard
app/src/main/java/com/vlath/keyboard/keyboard/PointerTracker.java
[ "public final class BogusMoveEventDetector {\n private static final String TAG = BogusMoveEventDetector.class.getSimpleName();\n private static final boolean DEBUG_MODE = DebugFlags.DEBUG_ENABLED;\n\n // Move these thresholds to resource.\n // These thresholds' unit is a diagonal length of a key.\n p...
import com.vlath.keyboard.latin.common.Constants; import com.vlath.keyboard.latin.common.CoordinateUtils; import com.vlath.keyboard.latin.define.DebugFlags; import com.vlath.keyboard.latin.settings.Settings; import android.content.res.Resources; import android.content.res.TypedArray; import androidx.annotation.NonNull;...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
private static boolean DEBUG_MODE = DebugFlags.DEBUG_ENABLED || DEBUG_EVENT;
6
roscrazy/Android-RealtimeUpdate-CleanArchitecture
mvp/src/main/java/com/mike/feed/util/ImageLoader.java
[ "public class BitmapItem {\n private Bitmap bitmap;\n\n public Bitmap getBitmap() {\n return bitmap;\n }\n\n public void setBitmap(Bitmap bitmap) {\n this.bitmap = bitmap;\n }\n}", "public class BitmapUseCase extends UseCase{\n\n private BitmapRepository mRepository;\n\n\n @NonN...
import android.graphics.Bitmap; import android.widget.ImageView; import com.mike.feed.R; import com.mike.feed.dependency.injection.scope.FragmentScope; import com.mike.feed.domain.BitmapItem; import com.mike.feed.domain.interactor.BitmapUseCase; import com.mike.feed.domain.interactor.BitmapUseCaseFactory; import...
package com.mike.feed.util; @FragmentScope public class ImageLoader { public static final int DEFAULT_IMAGE_ID = R.drawable.ic_loading; public static final int DEFAULT_IMAGE_ERROR = R.drawable.ic_error; private final MemoryCache mMemoryCache; private final Map<ImageView, String> mIma...
BitmapUseCase bitmapUseCase = mBitmapUseCaseFactory.create(url, reqWidth, reqHeight);
1
Nanopublication/nanopub-java
src/main/java/org/nanopub/op/Extract.java
[ "public class MalformedNanopubException extends Exception {\n\n\tprivate static final long serialVersionUID = -1022546557206977739L;\n\n\tpublic MalformedNanopubException(String message) {\n\t\tsuper(message);\n\t}\n\n}", "public class MultiNanopubRdfHandler extends AbstractRDFHandler {\n\n\tpublic static void pr...
import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List; import java.util.zip.GZIPOutputStream; import org.eclipse.rdf4j.model.Statement; import or...
package org.nanopub.op; public class Extract { @com.beust.jcommander.Parameter(description = "input-nanopubs", required = true) private List<File> inputNanopubs = new ArrayList<File>(); @com.beust.jcommander.Parameter(names = "-a", description = "Extract assertion triples") private boolean extractAssertion =...
MultiNanopubRdfHandler.process(rdfInFormat, inputFile, new NanopubHandler() {
1
thlcly/Mini-JVM
src/main/java/com/aaront/exercise/jvm/commands/IIncCommand.java
[ "@Data\npublic class ClassFile {\n private String magicNumber;\n private int majorVersion;\n private int minorVersion;\n private ClassIndex classIndex;\n private InterfaceIndex interfaceIndex;\n private ConstantPool constantPool;\n private List<ClassAccessFlag> accessFlags;\n private List<Fi...
import com.aaront.exercise.jvm.ClassFile; import com.aaront.exercise.jvm.constant.ConstantPool; import com.aaront.exercise.jvm.engine.ExecutionResult; import com.aaront.exercise.jvm.engine.JavaObject; import com.aaront.exercise.jvm.engine.JavaType; import com.aaront.exercise.jvm.engine.StackFrame; import com.aaront.exe...
package com.aaront.exercise.jvm.commands; /** * @author tonyhui * @since 2017/8/23 */ public class IIncCommand extends TwoOperandCommand { public IIncCommand(ClassFile clzFile, String opCode, int operand1, int operand2) { super(clzFile, opCode, operand1, operand2); } @Override
public String toString(ConstantPool pool) {
1
mguetlein/CheS-Mapper
src/main/java/org/chesmapper/view/gui/table/TreeView.java
[ "public class Cluster extends ZoomableCompoundGroup implements CompoundGroupWithProperties, DoubleNameElement,\r\n\t\tComparable<Cluster>\r\n{\r\n\tprivate ClusterData clusterData;\r\n\r\n\tHashMap<String, List<Compound>> compoundsOrderedByPropterty = new HashMap<String, List<Compound>>();\r\n\r\n\tprivate boolean ...
import java.awt.BorderLayout; import java.awt.Component; import java.awt.Graphics; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JScrollPane; import javax.swing....
package org.chesmapper.view.gui.table; public class TreeView extends BlockableFrame { private static int ICON_W = 50; private static int ICON_H = 50; protected ViewControler viewControler; protected Clustering clustering; protected ClusterController clusterControler; protected GUIControler guiControler; pro...
HashMap<Compound, MyNode> map = new HashMap<Compound, TreeView.MyNode>();
3
marcocor/smaph
src/main/java/it/unipi/di/acube/smaph/learn/featurePacks/AnnotationFeaturePack.java
[ "public class QueryInformation {\n\tpublic boolean includeSourceNormalSearch;\n\tpublic boolean includeSourceWikiSearch;\n\tpublic boolean includeSourceSnippets;\n\tpublic Double webTotalNS;\n\tpublic List<String> allBoldsNS;\n\tpublic HashMap<Integer, Integer> idToRankNS;\n\tpublic List<Pair<String, Integer>> bold...
import it.unipi.di.acube.batframework.data.Annotation; import it.unipi.di.acube.batframework.data.Tag; import it.unipi.di.acube.batframework.utils.Pair; import it.unipi.di.acube.batframework.utils.WikipediaInterface; import it.unipi.di.acube.smaph.QueryInformation; import it.unipi.di.acube.smaph.SmaphUtils; import it.u...
package it.unipi.di.acube.smaph.learn.featurePacks; /** * This feature pack represents a set of feature of an annotation, based on the * number of tokens covered and the edit distance towards bolds and anchors. * */ public class AnnotationFeaturePack extends FeaturePack<Annotation> { private static String[] ftr...
WikipediaToFreebase w2f, EntityToAnchors e2a) {
4
ppasupat/web-entity-extractor-ACL2014
src/edu/stanford/nlp/semparse/open/model/feature/FeaturePostProcessorConjoin.java
[ "public class Example {\n public String displayId; // For debugging\n \n public final String phrase;\n public final ExpectedAnswer expectedAnswer;\n public KNode tree; // Deterministic function of the phrase\n public List<CandidateGroup> candidateGroups;\n public List<Candidate> candidates; // Candidate p...
import java.util.regex.Pattern; import edu.stanford.nlp.semparse.open.dataset.Example; import edu.stanford.nlp.semparse.open.ling.LingUtils; import edu.stanford.nlp.semparse.open.ling.QueryTypeTable; import edu.stanford.nlp.semparse.open.ling.WordNetClusterTable; import edu.stanford.nlp.semparse.open.model.FeatureMatch...
package edu.stanford.nlp.semparse.open.model.feature; public class FeaturePostProcessorConjoin extends FeaturePostProcessor { public static class Options { @Option(gloss = "conjoin features with an abstract representation of the query") public boolean useConjoin = false; @Option public String cjQu...
queryType = WordNetClusterTable.getCluster(LingUtils.findHeadWord(phrase, true));
3
bhatti/PlexRBAC
src/main/java/com/plexobject/rbac/http/impl/RestClientImpl.java
[ "public class Configuration {\n private static final String RESOURCE_NAME = \"application.properties\";\n private static final String CONFIG_DATABASE_KEY = \"config.db.name\";\n private static final String PAGE_SIZE = \"page.size\";\n private static final int MAX_PAGE_SIZE = 256;\n private static fin...
import java.io.IOException; import java.io.InputStream; import java.io.StringWriter; import java.net.SocketException; import org.apache.commons.httpclient.Credentials; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpMethodBase; import org.apache.commons.httpclient.UsernamePassw...
package com.plexobject.rbac.http.impl; /** * This class provides APIs to call remote Web service with JSON payload * */ public class RestClientImpl implements RestClient { private static final Logger LOGGER = Logger.getLogger(RestClientImpl.class); private static final int CONNECTION_TIMEOUT_MILLIS = Co...
final Timing timer = Metric.newTiming("RestClientImpl.execute");
5
suguru/mongo-java-async-driver
src/main/java/jp/ameba/mongo/MongoConnection.java
[ "public class Delete extends Request {\n\t\n\tprivate int flags;\n\t\n\tprivate BSONObject selector;\n\t\n\t/**\n\t * Update\n\t * \n\t * @param collectionName\n\t * @param upsert\n\t * @param multiUpdate\n\t * @param selector\n\t * @param update\n\t */\n\tpublic Delete(\n\t\t\tString databaseName,\n\t\t\tString co...
import jp.ameba.mongo.protocol.Delete; import jp.ameba.mongo.protocol.GetMore; import jp.ameba.mongo.protocol.Insert; import jp.ameba.mongo.protocol.KillCursors; import jp.ameba.mongo.protocol.Query; import jp.ameba.mongo.protocol.Response; import jp.ameba.mongo.protocol.Update;
package jp.ameba.mongo; /** * MongoDB に対する接続および通信を行うためのインターフェイス * 低レイヤーのプロトコル処理を実行するためのメソッドを提供します。 * * @author suguru */ public interface MongoConnection { /** * この接続を識別するための ID を取得します。 * @return */ int getChannelId(); /** * 接続をオープンします。 * @throws MongoException */ void open() throws MongoExce...
void delete(Delete delete);
0
remijouannet/get10
app/src/main/java/com/remijouannet/get10/fragment/ChooseFragment.java
[ "public class FirstActivity extends Activity {\n private static final String TAG = FirstActivity.class.getSimpleName(); /* define log tag*/\n private static Bundle Instance;\n\n public static Point size = new Point();\n public static double screenInches;\n public static double density;\n public st...
import com.remijouannet.get10.activity.GameActivity; import com.remijouannet.get10.Data; import com.remijouannet.get10.gameMode.GameMode; import com.remijouannet.get10.R; import com.remijouannet.get10.Settings; import com.remijouannet.get10.graphic2D.Tools; import android.app.ListFragment; import android.content.Contex...
/* Copyright (C) 2015 Rémi Jouannet <remijouannet@gmail.com> This file is part of get10. get10 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
Intent i = new Intent(context, GameActivity.class);
1
titorenko/quick-csv-streamer
src/main/java/uk/elementarysoftware/quickcsv/parser/ByteSlice.java
[ "public static class ByteArrayChunk extends ReusableChunk {\n public static final ByteArrayChunk EMPTY = new ByteArrayChunk(new byte[0], 0, false, (b) -> {});\n \n private final byte[] data;\n private final int length;\n private final boolean isLast;\n\n /**\n * @param data - underlying co...
import java.nio.charset.Charset; import uk.elementarysoftware.quickcsv.api.ByteArraySource.ByteArrayChunk; import uk.elementarysoftware.quickcsv.api.CSVParserBuilder.CSVFileMetadata; import uk.elementarysoftware.quickcsv.functional.Pair; import uk.elementarysoftware.quickcsv.functional.PrimitiveFunctions.FunBiCharToBoo...
package uk.elementarysoftware.quickcsv.parser; public interface ByteSlice { static final byte CR = 0xD; static final byte LF = 0xA; public static ByteSlice wrap(ByteArrayChunk it, Charset charset) { return new SingleByteSlice(it, charset); } public static ByteSlice empty() { re...
default public void skipField(final CSVFileMetadata metadata) {
1
TooTallNate/Java-WebSocket
src/test/java/org/java_websocket/issues/Issue598Test.java
[ "public interface WebSocket {\n\n /**\n * sends the closing handshake. may be send in response to an other handshake.\n *\n * @param code the closing code\n * @param message the closing message\n */\n void close(int code, String message);\n\n /**\n * sends the closing handshake. may be send in res...
import java.net.InetSocketAddress; import java.net.URI; import java.nio.ByteBuffer; import java.util.Collections; import java.util.List; import java.util.concurrent.CountDownLatch; import org.java_websocket.WebSocket; import org.java_websocket.client.WebSocketClient; import org.java_websocket.drafts.Draft; import org.j...
/* * Copyright (c) 2010-2020 Nathan Rajlich * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify...
public void onOpen(WebSocket conn, ClientHandshake handshake) {
4
krasa/EclipseCodeFormatter
src/java/krasa/formatter/plugin/EclipseCodeFormatter.java
[ "public abstract class CodeFormatterFacade {\n\n\t@NotNull\n\tprotected Map<String, String> toMap(Properties properties) {\n\t\tMap<String, String> options = new HashMap<String, String>();\n\t\tfor (final String name : properties.stringPropertyNames()) {\n\t\t\toptions.put(name, properties.getProperty(name));\n\t\t...
import com.intellij.codeInsight.template.impl.TemplateManagerImpl; import com.intellij.codeInsight.template.impl.TemplateState; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.*; import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.vfs.VirtualFile; im...
package krasa.formatter.plugin; /** * @author Vojtech Krasa */ public class EclipseCodeFormatter { private static final Logger LOG = Logger.getInstance(EclipseCodeFormatter.class.getName()); private Settings settings; @NotNull protected final CodeFormatterFacade codeFormatterFacade; private List<Processor>...
public void format(PsiFile psiFile, int startOffset, int endOffset) throws FileDoesNotExistsException {
1
mikljohansson/retroboy
app/src/main/java/se/embargo/retroboy/ImageActivity.java
[ "public class CompositeFilter extends AbstractFilter {\r\n\tprivate List<IImageFilter> _filters = new ArrayList<IImageFilter>();\r\n\t\r\n\tpublic void add(IImageFilter filter) {\r\n\t\t_filters.add(filter);\r\n\t}\r\n\t\r\n\t@Override\r\n\tpublic int getEffectiveWidth(int framewidth, int frameheight) {\r\n\t\tfor ...
import java.io.File; import se.embargo.core.concurrent.ProgressTask; import se.embargo.core.graphic.Bitmaps; import se.embargo.core.widget.ListPreferenceDialog; import se.embargo.retroboy.filter.CompositeFilter; import se.embargo.retroboy.filter.IImageFilter; import se.embargo.retroboy.filter.ImageBitmapFilter; import ...
} private void reset() { if (_detailedPreferences.getVisibility() == View.VISIBLE) { _detailedPreferences.setVisibility(View.GONE); } } private void toggleDetailedPreferences() { if (_detailedPreferences.getVisibility() != View.VISIBLE) { _detailedPreferences.setVisibility(View.VISIBLE); } ...
CompositeFilter filter = new CompositeFilter();
0
m4rciosouza/ponto-inteligente-api
src/test/java/com/kazale/pontointeligente/api/controllers/LancamentoControllerTest.java
[ "public class LancamentoDto {\n\t\n\tprivate Optional<Long> id = Optional.empty();\n\tprivate String data;\n\tprivate String tipo;\n\tprivate String descricao;\n\tprivate String localizacao;\n\tprivate Long funcionarioId;\n\n\tpublic LancamentoDto() {\n\t}\n\n\tpublic Optional<Long> getId() {\n\t\treturn id;\n\t}\n...
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Optional; import org.junit.Test; import org.junit.runner.RunWith; i...
package com.kazale.pontointeligente.api.controllers; @RunWith(SpringRunner.class) @SpringBootTest @AutoConfigureMockMvc @ActiveProfiles("test") public class LancamentoControllerTest { @Autowired private MockMvc mvc; @MockBean
private LancamentoService lancamentoService;
5
VisualDataWeb/OWL2VOWL
src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/parser/vowl/property/ObjectPropertyVisitor.java
[ "public enum VowlAttribute {\n\tINTERSECTION(\"intersection\"),\n\tOBJECT(\"object\"),\n\tDEPRECATED(\"deprecated\"),\n\tEXTERNAL(\"external\"),\n\tRDF(\"rdf\"),\n\tUNION(\"union\"),\n\tCOMPLEMENT(\"complement\"),\n\tDATATYPE(\"datatype\"),\n\tTRANSITIVE(\"transitive\"),\n\tFUNCTIONAL(\"functional\"),\n\tINVERSE_FU...
import de.uni_stuttgart.vis.vowl.owl2vowl.constants.VowlAttribute; import de.uni_stuttgart.vis.vowl.owl2vowl.model.data.VowlData; import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.AbstractNode; import de.uni_stuttgart.vis.vowl.owl2vowl.model.entities.nodes.classes.NullClass; import de.uni_stuttgart.vis.vow...
package de.uni_stuttgart.vis.vowl.owl2vowl.parser.vowl.property; public class ObjectPropertyVisitor extends PropertyVisitor { private Logger logger = LogManager.getLogger(ObjectPropertyVisitor.class);
public ObjectPropertyVisitor(VowlData vowlData, OWLProperty owlObjectProperty) {
1
NikitaKozlov/Pury
pury/src/test/java/com/nikitakozlov/pury/aspects/MethodProfilingAspectTest.java
[ "public final class Pury {\n\n public static final String LOG_TAG = \"Pury\";\n public static final String LOGGER_PLUGIN = \"LoggerPlugin\";\n\n public static void setLogger(Logger logger) {\n }\n\n public synchronized static Logger getLogger() {\n return null;\n }\n\n public static bool...
import com.nikitakozlov.pury.Pury; import com.nikitakozlov.pury.PurySetter; import com.nikitakozlov.pury.annotations.MethodProfiling; import com.nikitakozlov.pury.annotations.MethodProfilings; import com.nikitakozlov.pury.profile.Profiler; import com.nikitakozlov.pury.profile.ProfilerId; import com.nikitakozlov.pury.pr...
package com.nikitakozlov.pury.aspects; public class MethodProfilingAspectTest { private static final int RUNS_COUNTER_5 = 5; private static final String PROFILER_NAME_1 = "profilerName 1"; private static final int STAGE_ORDER_1 = 1; private static final String STAGE_NAME_1 = "stageName 1"; pr...
ProfilerId profilerId = new ProfilerId(PROFILER_NAME_1, RUNS_COUNTER_5);
3
rogermarte/paddle-manager-android-app
app/src/main/java/es/rogermartinez/paddlemanager/listplayers/view/fragment/ListPlayersActivityFragment.java
[ "public class ErrorEvent {\n\n public static final int ACTION_NO_ACTION = 0;\n public static final int ACTION_REDIRECT_TO_LOGIN = 1;\n public static final int ACTIONS_REQUEST_NEW_SCOPES = 2;\n public static Exception exception;\n\n private String message;\n private int action = ACTION_NO_ACTION;\n...
import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view....
package es.rogermartinez.paddlemanager.listplayers.view.fragment; /** * A placeholder fragment containing a simple view. */ public class ListPlayersActivityFragment extends BaseFragment implements PrepareListPlayersController.View { @Inject PrepareListPlayersController controller; private RecyclerV...
List<Player> players;
1
HumBuch/HumBuch
src/main/java/de/dhbw/humbuch/view/DunningView.java
[ "public class MessageEvent {\r\n\r\n\tpublic final String caption;\r\n\tpublic final String message;\r\n\tpublic final Type type;\r\n\r\n\tpublic enum Type {\r\n\t\tINFO, TRAYINFO, WARNING, ERROR;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates an event with the specified caption and {@link Type}.INFO as\r\n\t * standard type\...
import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.HashSet; import java.util.List; import java.util.NoSuchElementException; import java.util.Set; import com.google.common.eventbus.EventBus; import com.google.inject.Inject; import com.va...
buttons.addComponent(btnDunningSent); buttons.addComponent(btnShowDunning); btnDunningSent.setEnabled(false); btnShowDunning.setEnabled(false); head.addComponent(buttons); head.setComponentAlignment(buttons, Alignment.TOP_RIGHT); addComponent(head); //Table tblDunnings = new Table(); tblDun...
StreamResource sr = new StreamResource(new PDFHandler.PDFStreamSource(baos), fileNameIncludingHash);
5
JoaquimLey/avenging
core/src/main/java/com/joaquimley/core/data/DataManager.java
[ "@JsonIgnoreProperties(ignoreUnknown = true)\npublic class CharacterMarvel implements Parcelable {\n\n @JsonProperty(value = \"id\")\n private long mId;\n @JsonProperty(value = \"name\")\n private String mName;\n @JsonProperty(value = \"description\")\n private String mDescription;\n @JsonPrope...
import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.List; import retrofit2.Call; import android.support.annotation.StringDef; import android.util.Log; import com.joaquimley.core.BuildConfig; import com.joaquimley.core.data.model.CharacterMarvel; import com.joaquimley.core...
/* * Copyright (c) Joaquim Ley 2016. All Rights Reserved. * <p/> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless req...
RemoteCallback<DataWrapper<List<CharacterMarvel>>> listener) {
0
knishiura-lab/AjaxMutator
src/test/java/jp/gr/java_conf/daisy/ajax_mutator/mutator/DOMCloningMutatorTest.java
[ "public class MutateVisitor implements NodeVisitor {\n private final ImmutableSet<EventAttacherDetector> eventAttacherDetectors;\n private final ImmutableSet<TimerEventDetector> timerEventDetectors;\n private final ImmutableSet<? extends AbstractDetector<DOMCreation>> domCreationDetectors;\n private fin...
import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; import jp.gr.java_conf.daisy.ajax_mutator.MutateVisitor; import jp.gr.java_conf.daisy.ajax_mutator.MutateVisitorBuilder; import jp.gr.java_conf.daisy.ajax_mutator.detector.dom_manipulation_detector.CloneNodeDetector; import jp.gr...
package jp.gr.java_conf.daisy.ajax_mutator.mutator; public class DOMCloningMutatorTest extends MutatorTestBase { @Override protected void prepare() { inputs = new String[] { "$elm.clone();", "// some comment here" + System.lineSeparator(), "elm.cloneNo...
Set<DOMCloning> domClonings = visitor.getDomClonings();
3
mitdbg/AdaptDB
src/main/java/perf/benchmark/CreateTableInfo.java
[ "public class Globals {\n // Re-partition cost multiplier.\n static public final int c = 4;\n\n // Query window size.\n static public final int window_size = 20;\n static public final int QUERY_WINDOW_SIZE = 10;\n\n\tstatic Map<String, TableInfo> tableInfos = new HashMap<String, TableInfo>();\n\n ...
import core.common.globals.Globals; import core.common.globals.Schema; import core.common.globals.TableInfo; import core.utils.ConfUtils; import core.utils.HDFSUtils;
package perf.benchmark; /** * Created by anil on 12/11/15. */ public class CreateTableInfo { double numTuples = -1; char delimiter = '9'; // Assuming '9' is never a delimiter. Schema schema = null; String tableName = ""; public void loadSettings(String[] args) { int counter = 0; while (counter < args.leng...
TableInfo tableInfo = new TableInfo(tableName, numTuples, delimiter, schema);
2
splendidbits/play-pushservices
module/app/helpers/pushservices/MessageBuilder.java
[ "public enum MessagePriority {\n @EnumValue(\"low\")\n PRIORITY_LOW,\n\n @EnumValue(\"normal\")\n PRIORITY_NORMAL,\n\n @EnumValue(\"high\")\n PRIORITY_HIGH,\n}", "public class MessageValidationException extends Throwable {\n\n public MessageValidationException(String message) {\n super...
import enums.pushservices.MessagePriority; import exceptions.pushservices.MessageValidationException; import models.pushservices.db.Credentials; import models.pushservices.db.Message; import models.pushservices.db.PayloadElement; import models.pushservices.db.Recipient; import javax.annotation.Nonnull; import javax.ann...
package helpers.pushservices; /** * Easily build a Push Service's Platform {@link Message} which can be then * added to a task and sent to the platform providers using the {@link java.util.TaskQueue}. */ public class MessageBuilder { public static class Builder { private final int ONE_WEEK_IN_SECONDS ...
private MessagePriority mMessagePriority = MessagePriority.PRIORITY_LOW;
0
Bombe/jSite
src/main/java/de/todesbaum/jsite/application/WebOfTrustInterface.java
[ "public class Client implements ConnectionListener {\n\n\t/** The connection this client operates on. */\n\tprivate final Connection connection;\n\n\t/** The identifiers the client filters messages for. */\n\tprivate List<String> identifiers = new ArrayList<String>();\n\n\t/** The queued messages. */\n\tprivate fin...
import de.todesbaum.util.freenet.fcp2.FcpPluginMessage; import de.todesbaum.util.freenet.fcp2.Message; import de.todesbaum.util.freenet.fcp2.wot.DefaultOwnIdentity; import de.todesbaum.util.freenet.fcp2.wot.OwnIdentity; import static java.util.Collections.emptyList; import java.io.IOException; import java.util.ArrayLis...
/* * jSite - WebOfTrustInterface.java - Copyright © 2012–2019 David Roden * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later...
public List<OwnIdentity> getOwnIdentities() {
5
blacklocus/jres
jres-test/src/test/java/com/blacklocus/jres/request/search/JresDeleteByQueryTest.java
[ "public class BaseJresTest {\n\n @BeforeClass\n public static void startLocalElasticSearch() {\n ElasticSearchTestInstance.triggerStaticInit();\n }\n\n /**\n * Configured to connect to a local ElasticSearch instance created specifically for unit testing\n */\n protected Jres jres = new...
import com.blacklocus.jres.BaseJresTest; import com.blacklocus.jres.request.index.JresIndexDocument; import com.blacklocus.jres.request.index.JresRefresh; import com.blacklocus.jres.request.search.query.JresMatchAllQuery; import com.blacklocus.jres.request.search.query.JresMatchQuery; import com.blacklocus.jres.respons...
/** * Copyright 2015 BlackLocus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
jres.quest(new JresDeleteByQuery(index, type, new JresMatchAllQuery()));
3
roncoo/roncoo-adminlte-springmvc
src/main/java/com/roncoo/adminlte/controller/admin/SecurityController.java
[ "public class RcRole implements Serializable {\r\n private Long id;\r\n\r\n private String statusId;\r\n\r\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\r\n private Date createTime;\r\n\r\n @JsonFormat(pattern = \"yyyy-MM-dd HH:mm:ss\")\r\n private Date updateTime;\r\n\r\n private String rol...
import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.sp...
package com.roncoo.adminlte.controller.admin; @Controller @RequestMapping(value = "/admin/security/", method = RequestMethod.POST) public class SecurityController extends BaseController { @Autowired private UserBiz biz; @RequestMapping(value = LIST, method = RequestMethod.GET) public void list() ...
public String save(RcUser rcUser, @RequestParam(value = "role", required = false) String role) {
1
dvorka/shifts-solver
test/com/mindforger/shiftsolver/solver/commons/AbstractShiftSolverTest.java
[ "public class RiaState {\n\n\tprivate UserBean currentUser;\n\tprivate UserSettingsBean userSettings;\n\n\tprivate Employee[] employees;\n\tprivate PeriodPreferences[] periodPreferencesArray;\n\tprivate PeriodSolution[] periodSolutions;\n\t\t\n\tprivate Map<String,Employee> employeesByKey;\n\tprivate Map<String,Per...
import java.util.ArrayList; import java.util.List; import com.mindforger.shiftsolver.client.RiaState; import com.mindforger.shiftsolver.shared.ShiftSolverLogger; import com.mindforger.shiftsolver.shared.model.DayPreference; import com.mindforger.shiftsolver.shared.model.Employee; import com.mindforger.shiftsolver.share...
e.setKey(""+key++); e.setFirstname("Marika"); e.setFamilyname("T"); e.setFulltime(true); e.setFemale(true); team.addEmployee(e); e=new Employee(); e.setKey(""+key++); e.setFirstname("Michaela"); e.setFamilyname("V"); e.setFulltime(true); e.setFemale(true); team.addEmployee(e); e=new Em...
ShiftSolverLogger.debug("Test data:");
1
droidstealth/droid-stealth
DroidStealth/src/main/java/com/stealth/settings/LaunchSettingsFragment.java
[ "public class StealthButton extends AppWidgetProvider {\n\n\tpublic static final String ACTION_BUTTON_PRESS = \"buttonPress\";\n\tprivate static final long TOUCH_INTERVAL = 1500;\n\n\t/**\n\t * Update all the instances of this widget\n\t *\n\t * @param context using what context\n\t */\n\tpublic static void updateM...
import android.os.Bundle; import android.support.v4.app.Fragment; import android.text.Editable; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.EditTe...
package com.stealth.settings; /** * A simple {@link android.support.v4.app.Fragment} subclass. Use the {@link LaunchSettingsFragment#newInstance} factory * method to create an instance of this fragment. */ public class LaunchSettingsFragment extends Fragment implements CompoundButton.OnCheckedChangeListener, View...
mDialer.setChecked(LaunchManager.isDialerEnabled());
6
pugwoo/nimble-orm
src/test/java/com/pugwoo/dbhelper/test/test_common/TestDBHelper_query.java
[ "public interface DBHelper {\n\t\n\t/**\n\t * 手动回滚@Transactional的事务。\n\t * 对于已知需要回滚的动作,我更推荐主动调用让其回滚,而非抛出RuntimeException。\n\t * 当前如果没有事务而调用该方法,将抛出org.springframework.transaction.NoTransactionException。<br><br>\n\t * \n\t * 对于手动回滚事务rollback抛出`org.springframework.transaction.UnexpectedRollbackException: Transaction r...
import com.pugwoo.dbhelper.DBHelper; import com.pugwoo.dbhelper.IDBHelperSlowSqlCallback; import com.pugwoo.dbhelper.enums.FeatureEnum; import com.pugwoo.dbhelper.json.NimbleOrmJSON; import com.pugwoo.dbhelper.model.PageData; import com.pugwoo.dbhelper.test.entity.*; import com.pugwoo.dbhelper.test.utils.CommonOps; imp...
assert count == 0; List<StudentDO> studentDOS = CommonOps.insertBatch(dbHelper, 99); SchoolDO schoolDO = new SchoolDO(); schoolDO.setName("sysu"); dbHelper.insert(schoolDO); assert schoolDO.getId() != null; for(StudentDO studentDO : studentDOS) { st...
+ "sql:" + sql + "args:" + NimbleOrmJSON.toJson(args));
3
UweTrottmann/Shopr
Android/Shopr/src/main/java/com/uwetrottmann/shopr/ui/ItemListFragment.java
[ "public class ItemAdapter extends ArrayAdapter<Item> {\n\n private static final int LAYOUT = R.layout.item_layout;\n\n private LayoutInflater mInflater;\n\n private OnItemCritiqueListener mCritiqueListener;\n\n private OnItemDisplayListener mItemListener;\n\n public interface OnItemCritiqueListener {...
import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.LoaderManager.LoaderCallbacks; import android.support.v4.content.Loader; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater;...
package com.uwetrottmann.shopr.ui; /** * Shows a list of clothing items the user can critique by tapping an up or down * vote button. */ public class ItemListFragment extends Fragment implements LoaderCallbacks<List<Item>>, OnItemCritiqueListener, OnItemDisplayListener { public static final String...
private ItemAdapter mAdapter;
0
BlochsTech/BitcoinCardTerminal
src/com/blochstech/bitcoincardterminal/Model/CardModel.java
[ "public class Message {\n\tpublic long CreatedMillis;\n\tpublic String Message;\n\tpublic MessageType Type;\n\n\tpublic Message(String message, MessageType type, long createdMillis){\n\t\tthis.Type = type;\n\t\tthis.Message = message;\n\t\tthis.CreatedMillis = createdMillis;\n\t}\n\tpublic Message(String message, M...
import com.blochstech.bitcoincardterminal.Interfaces.Message; import com.blochstech.bitcoincardterminal.Model.Communication.BitcoinCard; import com.blochstech.bitcoincardterminal.Model.Communication.Callback; import com.blochstech.bitcoincardterminal.Utils.Event; import com.blochstech.bitcoincardterminal.Utils.EventLis...
package com.blochstech.bitcoincardterminal.Model; class CardModel { private Event<Message> messageEvent; private Object fireKey = new Object();
private EventListener<Message> messageListener = new MessageListener();
4
nextgis/android_maplib
src/main/java/com/nextgis/maplib/map/Layer.java
[ "public interface ILayerView\n{\n /**\n * @return If layer visible or not\n */\n boolean isVisible();\n\n /**\n * Set if layer visible or not\n * @param visible true if layer must be visible, or false\n */\n void setVisible(boolean visible);\n\n /**\n * Return max zoom for lay...
import com.nextgis.maplib.util.GeoConstants; import org.json.JSONException; import org.json.JSONObject; import java.io.File; import static com.nextgis.maplib.util.Constants.*; import android.content.Context; import android.util.Log; import com.nextgis.maplib.api.ILayerView; import com.nextgis.maplib.api.IRenderer; impo...
/* * Project: NextGIS Mobile * Purpose: Mobile GIS for Android. * Author: Dmitry Baryshnikov (aka Bishop), bishop.dev@gmail.com * Author: NikitaFeodonit, nfeodonit@yandex.com * Author: Stanislav Petriakov, becomeglory@gmail.com * ****************************************************************************...
if(Constants.DEBUG_MODE){
6