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
m4rciosouza/ponto-inteligente-api
src/main/java/com/kazale/pontointeligente/api/controllers/CadastroPJController.java
[ "public class CadastroPJDto {\n\t\n\tprivate Long id;\n\tprivate String nome;\n\tprivate String email;\n\tprivate String senha;\n\tprivate String cpf;\n\tprivate String razaoSocial;\n\tprivate String cnpj;\n\n\tpublic CadastroPJDto() {\n\t}\n\n\tpublic Long getId() {\n\t\treturn id;\n\t}\n\n\tpublic void setId(Long...
import java.security.NoSuchAlgorithmException; import javax.validation.Valid; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.validation.BindingResult; import org.springfram...
package com.kazale.pontointeligente.api.controllers; @RestController @RequestMapping("/api/cadastrar-pj") @CrossOrigin(origins = "*") public class CadastroPJController { private static final Logger log = LoggerFactory.getLogger(CadastroPJController.class); @Autowired private FuncionarioService funcionarioServ...
funcionario.setSenha(PasswordUtils.gerarBCrypt(cadastroPJDto.getSenha()));
6
sqrlserverjava/sqrl-server-base
src/test/java/com/github/sqrlserverjava/backchannel/SqrlServerOperationsQrCodeTest.java
[ "public class AuthPageData {\n\tprivate final String\t\t\t\turl;\n\tprivate final ByteArrayOutputStream\tqrBaos;\n\tprivate final SqrlNutToken0\t\t\tnut;\n\tprivate final String\t\t\t\tcorrelator;\n\n\tpublic AuthPageData(final String url, final ByteArrayOutputStream qrBaos, final SqrlNutToken0 nut,\n\t\t\tfinal St...
import static junit.framework.TestCase.assertNotNull; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; import org.springframework.mock.web.Moc...
package com.github.sqrlserverjava.backchannel; /** * Tests QR code generation for each image format we support * * @author Dave Badia * */ @RunWith(Parameterized.class) public class SqrlServerOperationsQrCodeTest { @Parameters(name = "{index}: imageFormat=({0})") public static Collection<Object[]> data() {...
final MockHttpServletRequest loginPageRequest = TestCaseUtil.buildMockRequest(loginRequestUrl);
3
adyliu/jafka
src/main/java/io/jafka/log/LogManager.java
[ "public class ServerConfig extends ZKConfig {\n\n private final Authentication authentication;\n\n public ServerConfig(Properties props) {\n super(props);\n authentication = Authentication.build(getString(props, \"password\", null));\n }\n\n /**\n * the port to listen and accept connec...
import io.jafka.api.OffsetRequest; import io.jafka.api.PartitionChooser; import io.jafka.common.InvalidPartitionException; import io.jafka.server.ServerConfig; import io.jafka.server.ServerRegister; import io.jafka.server.TopicTask; import io.jafka.utils.Closer; import io.jafka.utils.IteratorTemplate; import io.jafka.u...
} /** * Register this broker in ZK for the first time. */ public void startup() { if (config.getEnableZookeeper()) { serverRegister.registerBrokerInZk(); for (String topic : getAllTopics()) { serverRegister.processTask(new TopicTask(TopicTask.TaskTy...
TopicNameValidator.validate(topic);
5
konifar/annict-android
app/src/main/java/com/konifar/annict/viewmodel/RecordCreateViewModel.java
[ "@Parcel\n@Table\npublic class Program {\n\n public static final String TAG = Program.class.getSimpleName();\n\n @PrimaryKey(auto = false)\n @Column(indexed = true)\n @SerializedName(\"id\")\n public long id;\n\n @Column\n @SerializedName(\"started_at\")\n public Date startedAt;\n\n @Colu...
import com.konifar.annict.BR; import com.konifar.annict.R; import com.konifar.annict.model.Program; import com.konifar.annict.model.Record; import com.konifar.annict.repository.RecordRepository; import com.konifar.annict.util.PageNavigator; import com.konifar.annict.util.ViewHelper; import android.content.Context; impo...
package com.konifar.annict.viewmodel; public class RecordCreateViewModel extends BaseObservable implements ViewModel { private static final String TAG = RecordCreateViewModel.class.getSimpleName(); private static final int PROGRESS_BAR_PRECISION = 10; private static final float DEFAULT_RATING = 3.0f...
thumbUrl = ViewHelper.getTwitterProfileImageUrl(program.work.twitterUserName);
4
decatur/j2js-compiler
src/main/java/com/j2js/cfg/ControlFlowGraph.java
[ "public class ASTNodeStack extends ArrayList<ASTNode> {\n \n public ASTNodeStack() {\n super();\n }\n \n public ASTNodeStack(ASTNodeStack other) {\n\t super(other);\n }\n \n public ASTNodeStack(Expression expression) {\n super();\n push(expression);\n }\n \n\tpu...
import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.SortedMap; import java.util.TreeMap; import com.j2js.ASTNodeStack; import com.j2js.cfg.transformation.Transformation; import com.j2js.dom.ASTNode; import com.j2js.dom.Blo...
node.setDomParent(predecessor); edge = addEdge(node, target); } } } /** * For each node in tree, mark global targets. */ void visitToMark(Node node) { // Be concurrent safe. for (Node child : new ArrayList<Node>(node.getDomCh...
InfixExpression infix = new InfixExpression(
5
SoyaLeaf/CalendarII
app/src/main/java/top/soyask/calendarii/ui/fragment/setting/birth/AddFragment.java
[ "public class BirthdayDao {\n\n public static final String BIRTHDAY = \"BIRTHDAY\";\n\n private DBUtils mDBUtils;\n\n private static BirthdayDao mBirthdayDao;\n\n private BirthdayDao(DBUtils dBUtils) {\n this.mDBUtils = dBUtils;\n }\n\n public static BirthdayDao getInstance(Context context)...
import android.support.annotation.NonNull; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.CompoundButton; import android.widget.EditText; import android.widget.NumberPicker; import android.widget.RadioButton; import android.widget.Spinner; import j...
package top.soyask.calendarii.ui.fragment.setting.birth; public class AddFragment extends BaseFragment implements AdapterView.OnItemSelectedListener, CompoundButton.OnCheckedChangeListener, View.OnClickListener { private String[] mName; private EditText mEtWho; private NumberPicker mNpMonth; priva...
private static final NumberPicker.Formatter LUNAR_MONTH_FORMATTER = value -> LunarUtils.LUNAR_MONTH[value - 1];
4
zavakid/mushroom
src/main/java/com/zavakid/mushroom/impl/MetricsSinkAdapter.java
[ "public abstract class MetricsFilter implements MetricsPlugin {\n\n public abstract void init(SubsetConfiguration conf);\n\n /**\n * Whether to accept the name\n * \n * @param name to filter on\n * @return true to accept; false otherwise.\n */\n public abstract boolean accepts(String na...
import com.zavakid.mushroom.lib.MetricsRegistry; import com.zavakid.mushroom.util.Contracts; import java.util.Random; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.zavakid.mushroom.MetricsFilter; import com.zavakid.mushroom.MetricsRecordBuilder; import com.zavakid.mushr...
/** Copyright [2013] [Mushroom] 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...
this.name = Contracts.checkNotNull(name, "name");
7
fjoncourt/jfwknop
src/main/java/com/cipherdyne/gui/wizard/views/AccessView.java
[ "public interface IFwknopVariable {\n void setText(final String val);\n\n String getText();\n\n void setDefaultValue();\n\n boolean isDefault();\n}", "public class JFwknopTextField extends JTextField implements IFwknopVariable {\n\n private static final long serialVersionUID = 1L;\n private fina...
import com.cipherdyne.gui.components.IFwknopVariable; import com.cipherdyne.gui.components.JFwknopTextField; import com.cipherdyne.gui.wizard.EnumWizardButton; import com.cipherdyne.gui.wizard.EnumWizardVariable; import com.cipherdyne.gui.wizard.EnumWizardView; import java.util.Map; import javax.swing.JButton;
/* * JFwknop is developed primarily by the people listed in the file 'AUTHORS'. * Copyright (C) 2016 JFwknop developers and contributors. * * 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; ...
public void initialize(Map<EnumWizardVariable, IFwknopVariable> varMap, Map<EnumWizardButton, JButton> btnMap) {
3
yyon/grapplemod
main/java/com/yyon/grapplinghook/network/GrappleAttachMessage.java
[ "public class GrappleCustomization {\n\tpublic static final String[] booleanoptions = new String[] {\"phaserope\", \"motor\", \"motorwhencrouching\", \"motorwhennotcrouching\", \"smartmotor\", \"enderstaff\", \"repel\", \"attract\", \"doublehook\", \"smartdoublemotor\", \"motordampener\", \"reelin\", \"pullbackward...
import java.util.LinkedList; import com.yyon.grapplinghook.GrappleCustomization; import com.yyon.grapplinghook.grapplemod; import com.yyon.grapplinghook.vec; import com.yyon.grapplinghook.controllers.SegmentHandler; import com.yyon.grapplinghook.entities.grappleArrow; import io.netty.buffer.ByteBuf; import net.minecraf...
package com.yyon.grapplinghook.network; /* * This file is part of GrappleMod. GrappleMod is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) a...
public LinkedList<vec> segments;
2
SpongePowered/event-impl-gen
src/main/java/org/spongepowered/eventimplgen/processor/EventImplWriter.java
[ "public final class AnnotationUtils {\n\n private AnnotationUtils() {\n }\n\n @SuppressWarnings({\"unchecked\", \"TypeParameterUnusedInFormals\"})\n public static <T> T getValue(final AnnotationMirror anno, final String key) {\n if (anno == null) {\n return null;\n }\n\n ...
import com.squareup.javapoet.ClassName; import com.squareup.javapoet.JavaFile; import org.checkerframework.checker.nullness.qual.Nullable; import org.spongepowered.api.util.annotation.eventgen.ImplementedBy; import org.spongepowered.eventimplgen.AnnotationUtils; import org.spongepowered.eventimplgen.eventgencore.Proper...
/* * This file is part of Event Implementation Generator, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documenta...
private final Set<EventFactoryPlugin> plugins;
7
point85/caliper
src/test/java/org/point85/uom/test/library/TestPerformance.java
[ "public class MeasurementSystem {\n\t// name of resource bundle with translatable strings for exception messages\n\tprivate static final String MESSAGE_BUNDLE_NAME = \"Message\";\n\n\t// resource bundle for exception messages\n\tprivate static ResourceBundle messages;\n\n\t// standard unified system\n\tprivate stat...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import org.point85.uom.MeasurementSystem; import org.point85.uom.Quantity; import org.point85.uom.Unit; import org.point85.uom.UnitOfMeasure; import org.point85.uom.UnitType;
package org.point85.uom.test.library; public class TestPerformance { // unit map private Map<UnitType, List<UnitOfMeasure>> unitListMap = new HashMap<UnitType, List<UnitOfMeasure>>(); TestPerformance() throws Exception { MeasurementSystem sys = MeasurementSystem.getSystem(); for (Unit u : Unit.values()) { ...
Quantity rowQty = new Quantity(10.0d, rowUOM);
1
idega/is.idega.idegaweb.msi
src/java/is/idega/idegaweb/msi/presentation/RaceEditor.java
[ "public class TimeTransmitterRentProperties {\n\tprivate String price;\n\tprivate boolean rentOn;\n\tpublic String getPrice() {\n\t\treturn price;\n\t}\n\tpublic void setPrice(String price) {\n\t\tthis.price = price;\n\t}\n\tpublic boolean isRentOn() {\n\t\treturn rentOn;\n\t}\n\tpublic void setRentOn(boolean rentO...
import is.idega.idegaweb.msi.bean.TimeTransmitterRentProperties; import is.idega.idegaweb.msi.business.ConverterUtility; import is.idega.idegaweb.msi.data.Event; import is.idega.idegaweb.msi.data.Race; import is.idega.idegaweb.msi.data.RaceCategory; import is.idega.idegaweb.msi.data.RaceEvent; import is.idega.idegaweb....
package is.idega.idegaweb.msi.presentation; public class RaceEditor extends RaceBlock { protected static final String PARAMETER_ACTION = "msi_prm_action"; protected static final String PARAMETER_SEASON_PK = "prm_season_pk"; protected static final String PARAMETER_RACE_PK = "prm_race_pk"; protected static fin...
races = ConverterUtility.getInstance().convertSeasonToGroup(selectedSeason).getChildGroups(types, true);
1
boaglio/spring-boot-greendogdelivery-casadocodigo
src/main/java/com/boaglio/casadocodigo/greendogdelivery/rest/NovoPedidoController.java
[ "@Entity\npublic class Cliente {\n\n\t@Id\n @GeneratedValue(strategy = GenerationType.IDENTITY)\n\tprivate Long id;\n\n @NotNull\n @Length(min=2, max=30,message=\"O tamanho do nome deve ser entre {min} e {max} caracteres\")\n\tprivate String nome;\n\n @NotNull\n @Length(min=2, max=300,message=\"O tam...
import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import...
package com.boaglio.casadocodigo.greendogdelivery.rest; @RestController public class NovoPedidoController { @Autowired public NovoPedidoController(ClienteRepository clienteRepository,ItemRepository itemRepository,EnviaNotificacao enviaNotificacao) { this.clienteRepository =clienteRepository; this.itemRepo...
List<Item> itensPedidos = new ArrayList<Item>();
1
eckig/graph-editor
core/src/main/java/de/tesis/dynaware/grapheditor/core/selections/DefaultSelectionManager.java
[ "public interface SelectionManager {\n\n /**\n * Gets the list of currently selected nodes.\n *\n * <p>\n * This list is read-only. Nodes should be selected via {@link #select(EObject)}.\n * </p>\n *\n * @return the unmodifiable list of currently selected nodes\n */\n List<GNod...
import java.util.List; import org.eclipse.emf.ecore.EObject; import de.tesis.dynaware.grapheditor.SelectionManager; import de.tesis.dynaware.grapheditor.SkinLookup; import de.tesis.dynaware.grapheditor.core.DefaultGraphEditor; import de.tesis.dynaware.grapheditor.core.view.GraphEditorView; import de.tesis.dynaware.grap...
/* * Copyright (C) 2005 - 2014 by TESIS DYNAware GmbH */ package de.tesis.dynaware.grapheditor.core.selections; /** * Manages all graph editor logic relating to selections of one or more nodes * and/or joints. * * <p> * Delegates certain jobs to the following classes. * * <ol> * <li>SelectionCreator - cr...
public void addConnector(final GConnector connector)
5
saltedge/saltedge-android
saltedge-library/src/main/java/com/saltedge/sdk/connector/CurrenciesConnector.java
[ "public interface FetchCurrencyRatesResult {\n\n /**\n * Callback method is invoked when Fetch Currency Rates operation finished with success\n *\n * @param rates List of SECurrencyRate objects\n */\n void onFetchCurrenciesSuccess(List<SECurrencyRate> rates);\n\n /**\n * Callback method...
import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; import com.saltedge.sdk.interfaces.FetchCurrencyRatesResult; import com.saltedge.sdk.model.SECurrencyRate; import com.saltedge.sdk.model.response.CurrenciesResponse; import com.saltedge.sdk.network.SERestClient; import com.saltedge.sdk.utils.S...
/* Copyright © 2019 Salt Edge. https://saltedge.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publis...
ArrayList<SECurrencyRate> currencies = new ArrayList<>(responseBody.getCurrencies());
1
hea3ven/BuildingBricks
src/main/java/com/hea3ven/buildingbricks/core/block/BlockBuildingBricksCorner.java
[ "public class BlockBuildingBricksNonSolid extends BlockBuildingBricksBase {\n\n\tpublic BlockBuildingBricksNonSolid(StructureMaterial structMat, MaterialBlockType blockType) {\n\t\tsuper(structMat, blockType);\n\t}\n\n\t@Override\n\tpublic boolean isFullCube(IBlockState state) {\n\t\treturn false;\n\t}\n\n\t@Overri...
import net.minecraft.block.BlockSlab.EnumBlockHalf; import net.minecraft.block.properties.IProperty; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.m...
package com.hea3ven.buildingbricks.core.block; public class BlockBuildingBricksCorner extends BlockBuildingBricksNonSolid { public BlockBuildingBricksCorner(StructureMaterial structMat) {
super(structMat, MaterialBlockType.CORNER);
3
plusonelabs/calendar-widget
app/src/main/java/org/andstatus/todoagenda/task/dmfs/DmfsOpenTasksProvider.java
[ "public class EventSource {\n private static final String TAG = EventSource.class.getSimpleName();\n public final static EventSource EMPTY = new EventSource(EventProviderType.EMPTY, 0, \"Empty\", \"\", 0, false);\n public static final String STORE_SEPARATOR = \",\";\n\n private static final String KEY_P...
import android.content.ContentUris; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.text.TextUtils; import org.andstatus.todoagenda.prefs.EventSource; import org.andstatus.todoagenda.prefs.FilterMode; import org.andstatus.todoagenda.p...
package org.andstatus.todoagenda.task.dmfs; public class DmfsOpenTasksProvider extends AbstractTaskProvider { public DmfsOpenTasksProvider(EventProviderType type, Context context, int widgetId) { super(type, context, widgetId); } @Override public List<TaskEvent> queryTasks() { myC...
Intent intent = CalendarIntentUtil.createViewIntent();
7
maruohon/justenoughdimensions
src/main/java/fi/dy/masa/justenoughdimensions/util/ClientUtils.java
[ "@Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_VERSION, certificateFingerprint = Reference.FINGERPRINT,\n guiFactory = \"fi.dy.masa.justenoughdimensions.config.JustEnoughDimensionsGuiFactory\",\n updateJSON = \"https://raw.githubusercontent.com/maruohon/justenoughdimensions...
import javax.annotation.Nullable; import com.google.gson.JsonObject; import net.minecraft.client.audio.MusicTicker.MusicType; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; import net.minecraft.world.WorldProvider; import net.minecraftforge.client.IRenderHandler; import fi.dy.masa.just...
package fi.dy.masa.justenoughdimensions.util; public class ClientUtils { public static boolean setRenderersFrom(WorldProvider provider, @Nullable JsonObject obj) { if (obj == null) { /* setRenderer(provider, null, RendererType.SKY); setRenderer(provider, nul...
if ("DummyRenderer".equals(name))
1
Roba1993/octo-chat
src/main/java/de/robertschuette/octochat/chats/ChatHandler.java
[ "public class ChatData {\n private Chat chat;\n private String userId;\n private String userName;\n private String lastMessage;\n private String lastMessageTime;\n private boolean lastMessageUnread;\n private boolean isOnline;\n\n /**\n * Constructor to create a new chat data object.\n ...
import de.robertschuette.octochat.model.ChatData; import de.robertschuette.octochat.model.ChatDataStore; import de.robertschuette.octochat.model.ChatHandlerSettings; import de.robertschuette.octochat.model.ChatSettings; import de.robertschuette.octochat.util.Util; import javafx.scene.control.SplitPane; import javafx.sc...
package de.robertschuette.octochat.chats; /** * This class holds the main logic of this application and * routes the main actions. * * @author Robert Schütte */ public class ChatHandler extends SplitPane implements Runnable { private ChatDataStore cds; private List<Chat> chats; private StackPane cha...
private ChatHandlerSettings chatHandlerSettings;
2
yuqirong/Koku
app/src/main/java/com/yuqirong/koku/fragment/SearchUserFragment.java
[ "public class SearchUserActivity extends SwipeBackActivity {\n\n private Toolbar mToolbar;\n private FrameLayout mFrameLayout;\n private FragmentManager fm;\n\n public static final int SEARCH_USER = 1050;\n public static final int AT_USER = 1060;\n private int type;\n private ActionBar actionBa...
import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.vi...
package com.yuqirong.koku.fragment; /** * 搜索用户和@好友共用的fragment * Created by Anyway on 2015/9/23. */ public class SearchUserFragment extends BaseFragment { private TextView tv_tips; private RecyclerView mRecyclerView; private List<User> user; private SearchUserAdapter searchUserAdapter; priva...
String url = AppConstant.FRIENDSHIPS_FRIENDS_URL + "?access_token=" + SharePrefUtil.getString(context, "access_token", "") + "&uid=" + SharePrefUtil.getString(context, "uid", "") + "&count=50";
3
DataAgg/DAFramework
core-service/src/main/java/com/dataagg/commons/controller/AreaController.java
[ "@Component\npublic class AreaDao extends IdEntityService<EArea> {\n\n\t@Autowired\n\tpublic AreaDao(@Autowired DataSource dataSource) {\n\t\tsuper(new NutDao(dataSource));\n\t}\n\n\tpublic EArea allArea(WMap query) {\n\t\t//处理查询条件\n\t\tCriteria cnd = Cnd.cri();\n\t\tcnd.where().andEquals(\"del_flag\", Constans.POS...
import java.util.List; import org.nutz.dao.Cnd; import org.nutz.dao.pager.Pager; import org.nutz.dao.sql.Criteria; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVariable; import org.springframewo...
package com.dataagg.commons.controller; /** * Created by carlos on 2017/3/29. * 区域管理 controller */ @RestController @RequestMapping("/area") public class AreaController { private Logger LOG = LoggerFactory.getLogger(AreaController.class); @Autowired
public AreaService areaService;
2
niaoge/spring-dynamic
2-hi-spring-dynamic/src/main/java/com/helpinput/spring/support/SourceFileMonitorListener.java
[ "public class LoggerBase {\n\tpublic static final Logger logger =LoggerFactory.getLogger(LoggerBase.class);\n}", "public class ContextHolder {\n\tpublic static SafeHolder<String> refreshers = new SafeHolder<>();\n\t\n\tpublic static SafeHolder<BeanRegistInterceptor> beanRegistIntercpterHolder = new SafeHolder<>()...
import com.helpinput.core.LoggerBase; import com.helpinput.holder.ContextHolder; import com.helpinput.propertyeditors.GLClassEditor; import com.helpinput.propertyeditors.PropertyEditorRegister; import com.helpinput.settings.Options; import com.helpinput.spring.SourceFileMonitor; import com.helpinput.spring.registinerce...
/* * Copyright 2013-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
ContextHolder.beanRegistIntercpterHolder.register(new ProxybeanRegistInterceptor());
1
ptitfred/magrit
server/sshd/src/main/java/org/kercoin/magrit/sshd/Server.java
[ "public class Configuration {\n\n\tprivate static final String DEFAULT_BASE_DIR = System.getProperty(\"java.io.tmpdir\") + \"/magrit\";\n\n\tprivate int sshPort = 2022;\n\t\n\tprivate File repositoriesHomeDir = new File(DEFAULT_BASE_DIR, \"repos\");\n\t\n\tprivate File publickeysRepositoryDir = new File(DEFAULT_BAS...
import java.io.IOException; import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.List; import org.apache.sshd.SshServer; import org.apache.sshd.common.NamedFactory; import org.apache.sshd.common.util.SecurityUtils; import org.apache.sshd.server.CommandFactory; import org.apache.sshd.server.Fo...
/* Copyright 2011-2012 Frederic Menou and others referred in AUTHORS file. This file is part of Magrit. Magrit is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your ...
public Server(final Context ctx, CommandFactory factory) {
1
spring-cloud/spring-cloud-netflix
spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/config/EurekaConfigServerBootstrapConfiguration.java
[ "@ConfigurationProperties(EurekaClientConfigBean.PREFIX)\npublic class EurekaClientConfigBean implements EurekaClientConfig, Ordered {\n\n\t/**\n\t * Default prefix for Eureka client config properties.\n\t */\n\tpublic static final String PREFIX = \"eureka.client\";\n\n\t/**\n\t * Default Eureka URL.\n\t */\n\tpubl...
import com.netflix.discovery.EurekaClientConfig; import com.netflix.discovery.shared.transport.EurekaHttpClient; import org.springframework.beans.factory.ObjectProvider; import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.condition.AllNestedConditions; im...
/* * Copyright 2013-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by a...
return (WebClientEurekaHttpClient) new WebClientTransportClientFactory(builder::getIfAvailable)
6
SEMERU-WM/ChangeScribe
CommitSummarizer/CommitSummarizer.core/src/main/java/changescribe/core/handlers/CommitCommandHandler.java
[ "public class Messages extends NLS {\n\tprivate static final String BUNDLE_NAME = \"co.edu.unal.colswe.changescribe.core.messages\"; //$NON-NLS-1$\n\t\n\tpublic static String DescribeVersionsDialog_ComputeChanges;\n\n\tpublic static String DescribeVersionsDialog_EmptyNewerCommit;\n\n\tpublic static String DescribeV...
import java.util.Set; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jgit.api.Git; import org.eclip...
package changescribe.core.handlers; /** * Our sample handler extends AbstractHandler, an IHandler base class. * @see org.eclipse.core.commands.IHandler * @see org.eclipse.core.commands.AbstractHandler */ public class CommitCommandHandler extends AbstractHandler { private IWorkbenchWindow window; private Git...
UIUtils.showInformationWindow(window, Messages.INFORMATION, e.getMessage());
0
nextgis/nextgislogger
app/src/main/java/com/nextgis/logger/UI/activity/SessionsActivity.java
[ "public class LoggerApplication extends Application implements IGISApplication {\n private static final String MAP_NAME = \"default\";\n private static final String PERMISSION_MANAGE_ACCOUNTS = \"android.permission.MANAGE_ACCOUNTS\";\n private static final String PERMISSION_AUTHENTICATE_ACCOUNTS = \"androi...
import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; import android.net.Uri; import android.os.AsyncTask; im...
if (item.getItemId() == R.id.action_share || item.getItemId() == R.id.action_delete) { ArrayList<Integer> result = new ArrayList<>(); SparseBooleanArray sbaSelectedItems = mLvSessions.getCheckedItemPositions(); for (int i = 0; i < sbaSelectedItems.size(); i++) { ...
String preamble = BaseEngine.getPreamble(marks.getString(1), marks.getString(2), sessions.getString(2), marks.getLong(3));
2
MX-Futhark/hook-any-text
src/main/java/hextostring/ConvertOptions.java
[ "public class DebuggingFlags implements ValueClass {\n\n\t// _global\n\tprivate static final String LINE_LIST_HEX_INPUT_CHAR = \"g\";\n\t// input after _hexadecimal replacements\n\tprivate static final String LINE_LIST_HEX_AFTER_HEX_REPL_CHAR = \"h\";\n\t// _transitory phase between hex & string\n\tprivate static f...
import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.nio.charset.Charset; import hextostring.debug.DebuggingFlags; import hextostring.replacement.Replacements; import hextostring.utils.Charsets; import main.options.Options; import main...
package hextostring; /** * Options for string conversion. * * @author Maxime PIA */ public class ConvertOptions extends Options implements Serializable { /** * Backward-compatible with 0.7.0 */ private static final long serialVersionUID = 00000000007000001L; public static final int DEFAULT_STRICTNESS = ...
public static final Values<Charset> CHARSET_DOMAIN =
6
michaelmarconi/oncue
oncue-tests/src/test/java/oncue/tests/RerunJobTest.java
[ "public class EnqueueJob implements Serializable {\n\n\tprivate static final long serialVersionUID = -1624154938276876491L;\n\n\tprotected String workerType;\n\tprotected Map<String, String> params;\n\n\tpublic EnqueueJob(String workerType) {\n\t\tthis(workerType, Collections.<String, String> emptyMap());\n\t}\n\n\...
import redis.clients.jedis.Jedis; import akka.actor.ActorRef; import akka.testkit.JavaTestKit; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.util.Arrays; import java.util.HashSet; import oncue.common.messages.EnqueueJob; i...
/******************************************************************************* * Copyright 2013 Michael Marconi * * 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.o...
return !(message instanceof JobProgress);
2
1and1/reactive
reactive-kafka-example/src/main/java/net/oneandone/reactive/kafka/rest/BusinesEventApplication.java
[ "public class StdProblem extends Problem {\n \n private StdProblem(ImmutableMap<String, String> problemData) {\n super(problemData);\n }\n\n public static StdProblem of(WebApplicationException wae) {\n return new StdProblem(parseProblemData(wae.getResponse()));\n }\n\n\n public boole...
import com.unitedinternet.mam.incubator.hammer.problem.StdProblem; import net.oneandone.incubator.neo.freemarker.FreemarkerProvider; import net.oneandone.incubator.neo.problem.GenericExceptionMapper; import net.oneandone.reactive.kafka.CompletableKafkaProducer; import net.oneandone.reactive.kafka.KafkaSource; import ne...
/* * Copyright 1&1 Internet AG, https://github.com/1and1/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
register(new GenericExceptionMapper().withProblemMapper(AvroSerializationException.class, e -> StdProblem.newMalformedRequestDataProblem())
0
aginsun/Journey-of-Legends
Journey of Legends/aginsun/journey/client/handlers/ClientTickHandler.java
[ "public class GuiPriceBar extends Gui\n{\n public int xPosition;\n public int borderColor;\n public int yPosition;\n private int width;\n private int height;\n public float barPosition;\n public int id;\n public boolean border;\n public int colour;\n\n public GuiPriceBar(int i, int j, ...
import java.awt.Color; import java.util.EnumSet; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.Tessellator; import net.minecraft.entity.player.EntityPlayer;...
package aginsun.journey.client.handlers; public class ClientTickHandler implements ITickHandler { public Minecraft mc; public World world; private EntityPlayer player; public GoldKeeper gold; private GuiPriceBar bar; private int CreateGuild; @Override public void tickStart(EnumSet<Ti...
worthy -= (LevelKeeper.getLevel(player) * 850 - 850);
4
MaxSmile/EasyVPN-Free
Android-code/app/src/main/java/com/vasilkoff/easyvpnfree/activity/HomeActivity.java
[ "public class Country {\n\n private String CountryName;\n private String CapitalName;\n private double CapitalLatitude;\n private double CapitalLongitude;\n private String CountryCode;\n\n public Country(String countryName, String capitalName, double capitalLatitude, double capitalLongitude, Strin...
import android.content.Intent; import android.content.res.Configuration; import android.graphics.drawable.BitmapDrawable; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.support.v4.content.ContextCompat; import android.text.method.LinkMovementMethod; import an...
package com.vasilkoff.easyvpnfree.activity; public class HomeActivity extends BaseActivity { private MapView mapView; public static final String EXTRA_COUNTRY = "country"; private PopupWindow popupWindow; private RelativeLayout homeContextRL; private List<Server> countryList; ...
private List<Country> countryLatLonList = null;
0
teivah/TIBreview
src/test/java/com/tibco/exchange/tibreview/processor/resourcerule/CProcessorSSLClinetResourceTest.java
[ "public class TIBResource {\n\tprivate String filePath;\n\tprivate String type;\n\t\n\tprivate static final String REQUEST_GET_TYPE = \"/jndi:namedResource/@type\";\n\t\n\tpublic TIBResource(String filePath) throws Exception {\n\t\tthis.filePath = filePath;\n\t\tthis.type = Util.xpathEval(filePath, Constants.RESOUR...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import org.apache.log4j.Logger; import org.junit.Test; import com.tibco.exchange.tibreview.common.TIBResource; import com.tibco.exchange.tibreview.engine.Context; import com.tibco.exchange.tibreview.mod...
package com.tibco.exchange.tibreview.processor.resourcerule; public class CProcessorSSLClinetResourceTest { private static final Logger LOGGER = Logger.getLogger(CProcessorSSLClinetResourceTest.class); @Test public void testCProcessorSSLClinetResourceTest() {
TIBResource fileresource;
0
wxiaoqi/ace-cache
src/main/java/com/ace/cache/AutoConfiguration.java
[ "public interface CacheAPI {\n /**\n * 传入key获取缓存json,需要用fastjson转换为对象\n *\n * @param key\n * @return\n * @author Ace\n * @date 2017年5月12日\n */\n public String get(String key);\n\n /**\n * 保存缓存\n *\n * @param key\n * @param value\n * @param expireMin\n * @...
import com.ace.cache.api.CacheAPI; import com.ace.cache.api.impl.CacheRedis; import com.ace.cache.config.RedisConfig; import com.ace.cache.service.impl.BootRedisServiceImpl; import com.ace.cache.service.impl.RedisServiceImpl; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotatio...
package com.ace.cache; /** * @author ace * @create 2017/11/17. */ @ComponentScan({"com.ace.cache"}) @EnableAspectJAutoProxy public class AutoConfiguration { @Bean @ConfigurationProperties(prefix = "spring.redis") @ConditionalOnProperty(name = "spring.redis.enable",havingValue = "true") public Redi...
public RedisServiceImpl constructRedisServiceImpl() {
4
Appendium/flatpack
flatpack/src/main/java/net/sf/flatpack/brparse/BuffReaderDataSet.java
[ "public abstract class AbstractParser implements Parser {\r\n\r\n private boolean handlingShortLines = false;\r\n\r\n private boolean ignoreExtraColumns = false;\r\n\r\n private boolean preserveLeadingWhitespace = true; // this is the old default value\r\n\r\n private boolean preserveTrailingWhitespace ...
import net.sf.flatpack.AbstractParser; import net.sf.flatpack.DefaultDataSet; import net.sf.flatpack.Parser; import net.sf.flatpack.ordering.OrderBy; import net.sf.flatpack.structure.Row; import net.sf.flatpack.util.FPException; import net.sf.flatpack.xml.MetaData;
/* * ObjectLab, http://www.objectlab.co.uk/open is supporting FlatPack. * * Based in London, we are world leaders in the design and development * of bespoke applications for the securities financing markets. * * <a href="http://www.objectlab.co.uk/open">Click here to learn more</a> * ___ _ ...
public void orderRows(final OrderBy ob) {
3
matejdro/WearVibrationCenter
mobile/src/main/java/com/matejdro/wearvibrationcenter/mute/TimedMuteManager.java
[ "public interface CommPaths\n{\n String PHONE_APP_CAPABILITY = \"VibrationCenterPhone\";\n String WATCH_APP_CAPABILITY = \"VibrationCenterWatch\";\n\n String COMMAND_VIBRATE = \"/Command/Vibrate\";\n String COMMAND_ALARM = \"/Command/Alarm\";\n String COMMAND_APP_MUTE = \"/Command/AppMute\";\n Str...
import android.Manifest; import android.annotation.TargetApi; import android.app.AlarmManager; import android.app.Notification; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.c...
package com.matejdro.wearvibrationcenter.mute; public class TimedMuteManager implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, MessageApi.MessageListener { private static final int NOTIFICATION_ID_MUTE_DURATION = 0; private static final String ACTON_UNMUTE ...
ZenModeChange doNotDistrubChange = Preferences.getEnum(service.getGlobalSettings(), GlobalSettings.TIMED_MUTE_ZEN_CHANGE);
4
samtingleff/jchronic
src/test/java/com/mdimension/jchronic/ChronicTestCase.java
[ "public class Handler {\n private static Map<Handler.HandlerType, List<Handler>> _definitions;\n\n public static enum HandlerType {\n TIME, DATE, ANCHOR, ARROW, NARROW\n }\n\n private HandlerPattern[] _patterns;\n private IHandler _handler;\n private boolean _compatible;\n\n public Handler(IHandler handle...
import java.util.Calendar; import java.util.LinkedList; import java.util.List; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; import com.mdimension.jchronic.handlers.Handler; import com.mdimension.jchronic.repeaters.EnumRepeater...
package com.mdimension.jchronic; @RunWith(JUnit4.class) public class ChronicTestCase { private Calendar _now; @Before public void setUp() throws Exception { _now = Time.construct(2006, 8, 16, 14, 0, 0, 0); } @Test public void testPostNormalizeAmPmAliases() { List<Token> tokens = new LinkedList...
tokens = Handler.dealiasAndDisambiguateTimes(tokens, new Options());
0
zzz40500/ThemeDemo
baselibrary/src/main/java/com/dim/widget/FrameLayout.java
[ "public class CircleRevealHelper {\n\n private ValueAnimator mValueAnimator;\n\n public CircleRevealHelper(View view) {\n mView = view;\n\n\n if (view instanceof CircleRevealEnable) {\n mCircleRevealEnable = (CircleRevealEnable) view;\n } else {\n throw new RuntimeEx...
import android.annotation.TargetApi; import android.content.Context; import android.graphics.Canvas; import android.os.Build; import android.util.AttributeSet; import android.view.*; import com.dim.circletreveal.CircleRevealHelper; import com.dim.circletreveal.CircleRevealEnable; import com.dim.listener.SingleClickList...
package com.dim.widget; /** * Created by zzz40500 on 15/8/26. */ public class FrameLayout extends android.widget.FrameLayout implements CircleRevealEnable,SkinEnable { private CircleRevealHelper mCircleRevealHelper ;
private SkinHelper mSkinHelper;
6
otaviojava/Easy-Cassandra
src/main/java/org/easycassandra/persistence/cassandra/spring/SimpleCassandraTemplateImpl.java
[ "public interface BatchBuilder extends AlterationBuilder {\n /**\n * Enables or not tracing for this query.\n * @param tracing the tracing\n * @return Adds if true or Disables if not\n */\n BatchBuilder withTracing(boolean tracing);\n /**\n * Sets the query fetch size.\n * @see {@li...
import java.util.List; import org.easycassandra.persistence.cassandra.BatchBuilder; import org.easycassandra.persistence.cassandra.PersistenceBuilder; import org.easycassandra.persistence.cassandra.PersistenceBuilderImpl; import org.easycassandra.persistence.cassandra.CassandraFactory; import org.easycassandra.per...
/* * Copyright 2013 Otávio Gonçalves de Santana (otaviojava) * 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 ...
private RunCassandraCommand command;
4
eriq-augustine/jocr
src/com/eriqaugustine/ocr/drivers/EntropyReducerTest.java
[ "public interface OCRClassifier {\n public String classify(WrapImage image);\n}", "public class PLOVEClassifier extends CharacterClassifier {\n private static Logger logger = LogManager.getLogger(PLOVEClassifier.class.getName());\n\n public PLOVEClassifier(String trainingCharacters, String[] fonts, FeatureV...
import com.eriqaugustine.ocr.classifier.OCRClassifier; import com.eriqaugustine.ocr.classifier.PLOVEClassifier; import com.eriqaugustine.ocr.classifier.reduce.EntropyReducer; import com.eriqaugustine.ocr.classifier.reduce.FeatureVectorReducer; import com.eriqaugustine.ocr.plove.PLOVE; import com.eriqaugustine.ocr.utils...
package com.eriqaugustine.ocr.drivers; /** * Quck test for PLOVEClassifier. */ public class EntropyReducerTest extends ClassifierTest { public static void main(String[] args) throws Exception { EntropyReducerTest test = new EntropyReducerTest(); test.run(); } private void run() throws Excepti...
new PLOVEClassifier(trainingCharacters, fonts, reduce);
1
senseobservationsystems/sense-android-library
sense-android-library/src/nl/sense_os/service/deviceprox/WIFIDeviceProximity.java
[ "public static class DataPoint implements BaseColumns {\n\n public static final String CONTENT_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE\n + \"/vnd.sense_os.data_point\";\n public static final String CONTENT_ITEM_TYPE = ContentResolver.CURSOR_ITEM_BASE_TYPE\n + \"/vnd.sense_os.data_poi...
import java.util.List; import nl.sense_os.service.R; import nl.sense_os.service.constants.SenseDataTypes; import nl.sense_os.service.constants.SensorData.DataPoint; import nl.sense_os.service.constants.SensorData.SensorNames; import nl.sense_os.service.provider.SNTP; import nl.sense_os.service.shared.SensorDataPoint; i...
/************************************************************************************************** * Copyright (C) 2010 Sense Observation Systems, Rotterdam, the Netherlands. All rights reserved. * *************************************************************************************************/ package nl.sense_os....
dataPoint.timeStamp = SNTP.getInstance().getTime();
2
ordina-jworks/microservices-dashboard
microservices-dashboard-server-core/src/main/java/be/ordina/msdashboard/applicationinstance/ApplicationInstanceUpdater.java
[ "public final class CreateApplicationInstance {\n\n\tprivate final ServiceInstance serviceInstance;\n\n\tpublic CreateApplicationInstance(ServiceInstance serviceInstance) {\n\t\tAssert.notNull(serviceInstance, \"serviceInstance must not be null!\");\n\t\tthis.serviceInstance = serviceInstance;\n\t}\n\n\tpublic Serv...
import be.ordina.msdashboard.applicationinstance.commands.CreateApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.DeleteApplicationInstance; import be.ordina.msdashboard.applicationinstance.commands.UpdateActuatorEndpoints; import be.ordina.msdashboard.applicationinstance.events.Application...
/* * Copyright 2015-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
@EventListener(ServiceInstanceDiscovered.class)
5
ptgoetz/storm-hdfs
src/main/java/org/apache/storm/hdfs/trident/HdfsState.java
[ "public interface RotationAction extends Serializable {\n void execute(FileSystem fileSystem, Path filePath) throws IOException;\n}", "public class HdfsSecurityUtil {\n public static final String STORM_KEYTAB_FILE_KEY = \"hdfs.keytab.file\";\n public static final String STORM_USER_NAME_KEY = \"hdfs.kerbe...
import backtype.storm.task.IMetricsContext; import backtype.storm.topology.FailedException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.client.HdfsDataOutputStream; im...
package org.apache.storm.hdfs.trident; public class HdfsState implements State { public static abstract class Options implements Serializable { protected String fsUrl; protected String configKey; protected transient FileSystem fs; private Path currentFile;
protected FileRotationPolicy rotationPolicy;
5
hprose/hprose-j2me
cldc/1.1ext/src/hprose/client/HproseClient.java
[ "public interface HproseCallback {\r\n void handler(Object result, Object[] arguments);\r\n}\r", "public interface HproseInvoker {\r\n void invoke(String functionName, HproseCallback callback);\r\n void invoke(String functionName, HproseCallback callback, HproseErrorEvent errorEvent);\r\n void invoke(...
import java.io.OutputStream; import hprose.common.HproseErrorEvent; import hprose.common.HproseCallback; import hprose.common.HproseInvoker; import hprose.common.HproseException; import hprose.common.HproseResultMode; import hprose.common.HproseFilter; import hprose.io.HproseWriter; import hprose.io.HproseReade...
/**********************************************************\ | | | hprose | | | | Official WebSite: http://www.hprose.com/ | | ...
public final void invoke(String functionName, HproseCallback callback) {
0
tfg13/LanXchange
modules/core/src/main/java/de/tobifleig/lxc/net/io/Leecher.java
[ "public class LXCFile implements Serializable {\n\n static final long serialVersionUID = 2812501218020544733L;\n /**\n * The user wants to share a single file.\n */\n public static final int TYPE_FILE = 1;\n /**\n * The user wants to share a single folder.\n */\n public static final i...
import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.Socket; import java.util.ArrayList; import java.util.List; import java.util.Locale; import de.tobifleig.lxc.data.LXCFile; import de.tobifleig.lxc.data.VirtualFile; import de....
/* * Copyright 2009, 2010, 2011, 2012, 2013, 2014 Tobias Fleig (tobifleig gmail com) * * All rights reserved. * * This file is part of LanXchange. * * LanXchange 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 Fo...
public Leecher(Socket socket, ObjectInputStream input, ObjectOutputStream output, LXCFile transFile, File targetFolder, int transVersion) {
0
millecker/senti-storm
src/at/illecker/sentistorm/SentiStormTopology.java
[ "public class FeatureGenerationBolt extends BaseBasicBolt {\n public static final String ID = \"feature-generation-bolt\";\n public static final String CONF_LOGGING = ID + \".logging\";\n private static final long serialVersionUID = 5340637976415982170L;\n private static final Logger LOG = LoggerFactory\n ...
import backtype.storm.topology.IRichSpout; import backtype.storm.topology.TopologyBuilder; import cmu.arktweetnlp.Tagger.TaggedToken; import com.esotericsoftware.kryo.serializers.DefaultSerializers.TreeMapSerializer; import java.util.Arrays; import java.util.TreeMap; import at.illecker.sentistorm.bolt.FeatureGeneration...
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
PreprocessorBolt preprocessorBolt = new PreprocessorBolt();
2
42Lines/blog-cdidemo
src/main/java/net/ftlines/blog/cdidemo/web/app/TeamEditPage.java
[ "@Entity\r\npublic class Member {\r\n @GeneratedValue\r\n @Id\r\n private Long id;\r\n\r\n @ManyToOne(optional = false)\r\n private Employee employee;\r\n\r\n @ManyToOne(optional = false)\r\n private Position position;\r\n\r\n @Temporal(TemporalType.DATE)\r\n private Date effectiveDate;\r\n\r\n public Emp...
import javax.inject.Inject; import net.ftlines.blog.cdidemo.model.Member; import net.ftlines.blog.cdidemo.model.PositionsRepository; import net.ftlines.blog.cdidemo.model.Team; import net.ftlines.blog.cdidemo.web.EntityModel; import net.ftlines.blog.cdidemo.web.UserAction; import org.apache.wicket.ajax.AjaxReques...
package net.ftlines.blog.cdidemo.web.app; public class TeamEditPage extends BasePage { @Inject UserAction action; public TeamEditPage(PageParameters params) { action.begin(); Long teamId = params.get("id").toLong();
IModel<Team> team = new EntityModel<Team>(Team.class, teamId);
2
mojohaus/mrm
mrm-servlet/src/main/java/org/codehaus/mojo/mrm/servlet/FileSystemServlet.java
[ "public class DefaultDirectoryEntry\n extends AbstractEntry\n implements DirectoryEntry\n{\n /**\n * Ensure consistent serialization.\n *\n * @since 1.0\n */\n private static final long serialVersionUID = 1L;\n\n /**\n * Creates an entry in the specified file system with the speci...
import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.io.Reader; import java.net.HttpURLConnection; import java.net.InetAddress; import java.net.UnknownHostException; import java.text.SimpleDateFormat; import java.util.Collections; import java....
/* * Copyright 2011 Stephen Connolly * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
if ( entry instanceof FileEntry )
3
dragonite-network/dragonite-java
dragonite-mux/src/main/java/com/vecsight/dragonite/mux/frame/types/DataFrame.java
[ "public class IncorrectFrameException extends MuxException {\n\n public IncorrectFrameException(final String msg) {\n super(msg);\n }\n\n}", "public interface Frame {\n\n byte getVersion();\n\n FrameType getType();\n\n byte[] toBytes();\n\n int getFixedLength();\n\n int getExpectedLeng...
import com.vecsight.dragonite.mux.exception.IncorrectFrameException; import com.vecsight.dragonite.mux.frame.Frame; import com.vecsight.dragonite.mux.frame.FrameType; import com.vecsight.dragonite.mux.misc.MuxGlobalConstants; import com.vecsight.dragonite.utils.binary.BinaryReader; import com.vecsight.dragonite.utils.b...
/* * The Dragonite Project * ------------------------- * See the LICENSE file in the root directory for license information. */ package com.vecsight.dragonite.mux.frame.types; /* * VERSION 1 SB * TYPE 1 SB * connID 2 SS * length 2 US * data [length] */ public class DataFrame implements Fram...
private static final FrameType TYPE = FrameType.DATA;
2
scrutmydocs/scrutmydocs
src/main/java/org/scrutmydocs/webapp/api/index/facade/IndexApi.java
[ "public class RestAPIException extends Exception {\r\n\tprivate static final long serialVersionUID = 1L;\r\n\r\n\tpublic RestAPIException(String message) {\r\n\t\tsuper(message);\r\n\t}\r\n\r\n\tpublic RestAPIException(Exception e) {\r\n\t\tsuper(e.getMessage());\r\n\t}\r\n\r\n}\r", "public class Api implements S...
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import o...
/* * Licensed to scrutmydocs.org (the "Author") under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Author licenses this * file to you under the Apache License, Version 2.0 (the * "License"); you ma...
public class IndexApi extends CommonBaseApi {
2
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/optional/Html.java
[ "public interface ChainedHttpConfig extends HttpConfig {\n\n interface ChainedRequest extends Request {\n ChainedRequest getParent();\n\n List<HttpCookie> getCookies();\n\n Object getBody();\n\n String getContentType();\n\n Map<String, BiConsumer<ChainedHttpConfig, ToServer>> g...
import java.util.function.Supplier; import static groovyx.net.http.NativeHandlers.Encoders.handleRawUpload; import static groovyx.net.http.NativeHandlers.Encoders.stringToStream; import groovy.util.XmlSlurper; import groovyx.net.http.ChainedHttpConfig; import groovyx.net.http.FromServer; import groovyx.net.http.NativeH...
/** * Copyright (C) 2017 HttpBuilder-NG 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 applicab...
if (handleRawUpload(config, ts)) {
5
ralscha/eds-starter6-mongodb
src/main/java/ch/rasc/eds/starter/service/UserService.java
[ "@Component\npublic class MongoDb {\n\n\tprivate final MongoDatabase mongoDatabase;\n\n\tpublic MongoDb(final MongoDatabase mongoDatabase) {\n\t\tthis.mongoDatabase = mongoDatabase;\n\t}\n\n\t@PostConstruct\n\tpublic void createIndexes() {\n\n\t\tif (!indexExists(User.class, CUser.email)) {\n\t\t\tthis.getCollectio...
import static ch.ralscha.extdirectspring.annotation.ExtDirectMethodType.STORE_MODIFY; import static ch.ralscha.extdirectspring.annotation.ExtDirectMethodType.STORE_READ; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.uti...
package ch.rasc.eds.starter.service; @Service @RequireAdminAuthority public class UserService { private final MessageSource messageSource; private final Validator validator;
private final MongoDb mongoDb;
0
Mokto/streaming-android-tv
app/src/main/java/android/support/v17/leanback/streamingapp/app/page/MoviesFragment.java
[ "public class IO {\n\n private static IO instance;\n\n public Socket socket;\n\n\n public static Emitter emit(final String event, final String data, final Ack callback) {\n return getInstance().socket.emit(event, data, callback);\n }\n public static Emitter emit(final String event, final JSONO...
import android.content.Intent; import android.os.Bundle; import android.support.v17.leanback.app.RowsFragment; import android.support.v17.leanback.streamingapp.api.IO; import android.support.v17.leanback.streamingapp.app.infinitegrid.InfiniteGridActivity; import android.support.v17.leanback.streamingapp.model.Card; imp...
package android.support.v17.leanback.streamingapp.app.page; public class MoviesFragment extends RowsFragment { private final ArrayObjectAdapter mRowsAdapter; public MoviesFragment() { mRowsAdapter = new ArrayObjectAdapter(new ShadowRowPresenterSelector()); setAdapter(mRowsAdapter); ...
Intent intent = new Intent(getActivity().getBaseContext(), InfiniteGridActivity.class);
1
xushaomin/apple-config
apple-config-nacos/src/main/java/com/appleframework/config/PropertyConfigurerFactory.java
[ "public class Constants {\r\n\t\t\r\n\tpublic static String KEY_SPA = \"spring.profiles.active\";\r\n\t\r\n\tpublic static String KEY_APP_ID = \"app.id\";\r\n\t\t\r\n\tpublic static String KEY_APP_ENV = \"app.env\";\r\n\t\r\n\tpublic static String KEY_ENV = \"env\";\r\n\t\r\...
import java.io.IOException; import java.io.StringReader; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Properties; import java.util.Set; import com.alibaba.nacos.api.NacosFactory; import com.alibaba.nacos.api.PropertyKeyConst; import com.alibaba.nacos.api.config.ConfigServi...
@Override public void innerReceive(Properties properties) { logger.warn("已改动的配置:\n" + properties); Map<String, Properties> map = new HashMap<>(); try { Set<String> propertyNames = properties.stringPropertyNames(); for (String key : propertyNames) { String value = proper...
String env = System.getProperty(Constants.KEY_APP_ENV);
0
casiez/libparamtuner
src/gui/src/main/java/fr/univ_lille1/libparamtuner/gui/parameters_panel/ParameterPanel.java
[ "public class MainFrame extends Application {\r\n\t\r\n\tprivate Stage stage;\r\n\tprivate Scene scene;\r\n\t\r\n\tfinal FileChooser fileChooser = new FileChooser();\r\n\tprivate VBox contentPanel;\r\n\tpublic ScrollPane contentScroll; // TODO private\r\n\tprivate MenuItem btnSave;\r\n\tMenu openrecent;\r\n\r\n\tpu...
import fr.univ_lille1.libparamtuner.gui.MainFrame; import fr.univ_lille1.libparamtuner.parameters.BooleanParameter; import fr.univ_lille1.libparamtuner.parameters.FloatParameter; import fr.univ_lille1.libparamtuner.parameters.IntegerParameter; import fr.univ_lille1.libparamtuner.parameters.Parameter; import fr.uni...
/* * libParamTuner * Copyright (C) 2017 Marc Baloup, Veïs Oudjail * * 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...
if (p instanceof StringParameter) {
5
simon816/ChatUI
src/main/java/com/simon816/chatui/pagination/PaginationTab.java
[ "public class PlayerContext {\r\n\r\n public final int height;\r\n public final int width;\r\n public final boolean forceUnicode;\r\n\r\n private final UUID playerUUID;\r\n private final TextUtils utils;\r\n\r\n public PlayerContext(Player player, int width, int height, boolean forceUnicode, FontD...
import com.simon816.chatui.lib.PlayerContext; import com.simon816.chatui.tabs.Tab; import com.simon816.chatui.ui.LineFactory; import com.simon816.chatui.ui.UIComponent; import com.simon816.chatui.ui.VBoxUI; import org.spongepowered.api.text.Text; import java.util.Arrays; import java.util.Collections;
package com.simon816.chatui.pagination; public class PaginationTab extends Tab { private static class RawTextComonent implements UIComponent { private Iterable<Text> origTextContent; RawTextComonent() { } public void setTextContent(Iterable<Text> textContent) { ...
public void draw(PlayerContext ctx, LineFactory lineFactory) {
2
PlayFab/JavaSDK
PlayFabClientSDK/src/test/java/com/playfab/test/PlayFabApiTest.java
[ "public class PlayFabErrors {\n /**\n * Error codes returned by PlayFabAPIs\n */\n public static enum PlayFabErrorCode {\n Success(0),\n Unknown(1),\n ConnectionError(2),\n JsonParseError(3),\n UnkownError(500),\n InvalidParams(1000),\n AccountNotFound(...
import static org.junit.Assert.*; import org.junit.*; import java.util.*; import java.io.*; import java.util.Properties; import com.google.gson.*; import com.google.gson.reflect.*; import com.playfab.PlayFabErrors.*; import com.playfab.PlayFabSettings; import com.playfab.PlayFabClientModels; import com.playfab.PlayFabC...
PlayFabClientModels.GetLeaderboardRequest clientRequest = new PlayFabClientModels.GetLeaderboardRequest(); clientRequest.MaxResultsCount = 3; clientRequest.StatisticName = TEST_STAT_NAME; PlayFabResult<PlayFabClientModels.GetLeaderboardResult> clientResult = PlayFabClientAPI.GetLeaderboa...
PlayFabDataModels.ObjectResult tempObjResult = null;
6
neo4j-contrib/neo4j-jdbc
neo4j-jdbc-bolt/src/test/java/org/neo4j/jdbc/bolt/utils/JdbcConnectionTestUtils.java
[ "public class BoltDriver extends BoltNeo4jDriverImpl {\n\n\tpublic static final String JDBC_BOLT_PREFIX = \"^bolt(\\\\+s|\\\\+ssc)?$\";\n\tprivate static final BoltDriverCache cache = new BoltDriverCache(params ->\n\t{\n\t\treturn GraphDatabase.driver(params.getRoutingUris().get(0), params.getAuthToken(), params.ge...
import org.neo4j.driver.AccessMode; import org.neo4j.driver.GraphDatabase; import org.neo4j.driver.Session; import org.neo4j.driver.SessionConfig; import org.neo4j.jdbc.bolt.BoltDriver; import org.neo4j.jdbc.boltrouting.BoltRoutingNeo4jDriver; import org.testcontainers.containers.Neo4jContainer; import java.sql.Connect...
package org.neo4j.jdbc.bolt.utils; /** * Help to build the connection for the IT test */ public class JdbcConnectionTestUtils { public static final String USERNAME = "user"; public static final String PASSWORD = "password"; public static final boolean SSL_ENABLED = false; public static boolean w...
waitForDatabase(getVersion(neo4j), session);
2
PhantomThief/more-lambdas-java
core/src/test/java/com/github/phantomthief/test/MoreFunctionsTest.java
[ "public static <R> R catching(Callable<R> callable) {\n return catching(callable, e -> logger.error(FAIL_SAFE_MARK, e));\n}", "public static <K, V> Consumer<Entry<K, V>> consumerKv(BiConsumer<K, V> func) {\n return entry -> func.accept(entry.getKey(), entry.getValue());\n}", "public static <K, V> Predicat...
import static com.github.phantomthief.util.MoreFunctions.catching; import static com.github.phantomthief.util.MoreFunctions.consumerKv; import static com.github.phantomthief.util.MoreFunctions.filterKv; import static com.github.phantomthief.util.MoreFunctions.mapKv; import static com.github.phantomthief.util.MoreFuncti...
package com.github.phantomthief.test; /** * @author w.vela */ class MoreFunctionsTest { @Test void testTrying() { assertNull(catching(i -> function(i, Exception::new), 1)); assertNull(catching(i -> function(i, IllegalArgumentException::new), 1)); assertEquals("1", catching(i -> f...
.forEach(consumerKv((k, v) -> System.out.println(k + "==>" + v)));
1
lheido/LheidoSMS
app/src/main/java/com/lheidosms/service/MainService.java
[ "public class Global {\n public static ArrayList<LheidoContact> conversationsList = new ArrayList<LheidoContact>();\n}", "public class MainLheidoSMS extends ActionBarActivity\n implements NavigationDrawerFragment.NavigationDrawerCallbacks {\n\n private static final int PICK_CONTACT = 100;\n /**\n ...
import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.database.Cursor; import android.media.AudioManager; import an...
if(activ_notif){ Intent notificationIntent = new Intent(mContext, MainLheidoSMS.class); notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); PendingIntent pIntent = PendingIn...
LheidoContact c = Global.conversationsList.remove(i);
3
Medo42/Gmk-Splitter
src/com/ganggarrison/gmdec/xml/ActionXmlFormat.java
[ "public class XmlReader {\r\n\tprivate final Document domDocument;\r\n\tprivate Element currentParent = null;\r\n\tprivate Element currentChild = null;\r\n\r\n\tpublic XmlReader(File xmlFile) throws IOException {\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tf...
import java.util.ArrayList; import java.util.List; import org.lateralgm.file.GmFile; import org.lateralgm.resources.GmObject; import org.lateralgm.resources.InstantiableResource; import org.lateralgm.resources.Resource; import org.lateralgm.resources.ResourceReference; import org.lateralgm.resources.library.LibAction; ...
/* * Copyright (C) 2010 Medo <smaxein@googlemail.com> * Copyright (C) 2008, 2009 IsmAvatar <IsmAvatar@gmail.com> * * This file is part of GmkSplitter. * GmkSplitter is free software and comes with ABSOLUTELY NO WARRANTY. * See LICENSE for details. */ package com.ganggarrison.gmdec.xml; public class ActionXm...
public void write(Action act, XmlWriter out) {
1
google/agera
extensions/net/src/test/java/com/google/android/agera/net/HttpRequestTest.java
[ "static final int CONNECT_TIMEOUT_MS = 2500;", "static final int READ_TIMEOUT_MS = 2500;", "@NonNull\n@SuppressWarnings(\"unchecked\")\npublic static HTHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile\nhttpDeleteRequest(@NonNull final String url) {\n return new HttpRequestCompiler(\"DELETE\", url)...
import com.google.android.agera.net.HttpRequestCompilerStates.HTHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile; import java.util.Map; import nl.jqno.equalsverifier.EqualsVerifier; import org.junit.Test; import static com.google.android.agera.net.HttpRequestCompiler.CONNECT_TIMEOUT_MS; import static com.g...
/* * Copyright 2015 Google 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 applica...
assertThat(httpRequest.connectTimeoutMs, is(CONNECT_TIMEOUT_MS));
0
TrumanDu/AutoProgramming
src/main/java/com/aibibang/web/system/controller/LoginController.java
[ "public class BaseController {\r\n\r\n\t/**\r\n\t * 将前台传递过来的日期格式的字符串,自动转化为Date类型\r\n\t * \r\n\t * @param binder\r\n\t */\r\n\t@InitBinder\r\n\tpublic void initBinder(ServletRequestDataBinder binder) {\r\n\r\n\t\tbinder.registerCustomEditor(Date.class, new DateConvertEditor());\r\n\t}\r\n\t\r\n\t/**\r\n\t * 抽取由逗号分隔的...
import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.log4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework...
package com.aibibang.web.system.controller; @Controller @RequestMapping("/login") public class LoginController extends BaseController { private Logger logger = Logger.getLogger(LoginController.class); @Resource private SysUserService sysUserService; @Resource private SysMenuService sysMen...
session.setAttribute(SessionAttr.USER_MENUS.getValue(), MenuUtils.getMenu(menuList, userMenus));
2
lucene-gosen/lucene-gosen
src/test/java/net/java/sen/SentenceTest.java
[ "public class Morpheme {\n \n /**\n * The {@link Dictionary} that contains this <code>Morpheme</code>\n */\n private Dictionary dictionary;\n \n /**\n * The index of this part-of-speech within the part-of-speech information\n * file\n */\n private int partOfSpeechIndex;\n \n /**\n * Indicates if...
import org.apache.lucene.util.LuceneTestCase; import org.junit.Test; import static net.java.sen.SenTestUtil.*; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.NoSuchElementException; import net.java.sen.dictionary.Morpheme; import net.java.sen.dictionary.Reading; import n...
/* * Copyright (C) 2006-2007 * Matt Francis <asbel@neosheffield.co.uk> * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or any later version. *...
private void sentenceTestFixture (Sentence sentence, int expectedLength, TestSpan[] expectedSpans) {
1
gazbert/bxbot-ui-server
bxbot-ui-server-services/src/test/java/com/gazbert/bxbot/ui/server/services/config/TestExchangeConfigService.java
[ "public class BotConfig {\n\n private String id;\n private String alias;\n private String baseUrl;\n private String username;\n private String password;\n\n // required for Jackson\n public BotConfig() {\n }\n\n public BotConfig(BotConfig other) {\n this.id = other.id;\n thi...
import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.test.context.junit4.SpringRunner; import java.util.Arrays; import java.util.List; import static org.assertj.core.api.Java6Assertions.assertThat; import ...
/* * The MIT License (MIT) * * Copyright (c) 2017 Gareth Jon Lynch * * 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 * ...
ExchangeConfigRepository exchangeConfigRepository;
5
simo415/spc
src/com/sijobe/spc/command/Bring.java
[ "public abstract class Parameter {\n\n private String label;\n private boolean optional;\n private boolean variableLength;\n \n public Parameter(String label, boolean optional) {\n this.label = label;\n this.optional = optional;\n }\n \n public Parameter(String label, boolean optional, boo...
import com.sijobe.spc.validation.Parameter; import com.sijobe.spc.validation.ParameterInteger; import com.sijobe.spc.validation.ParameterString; import com.sijobe.spc.validation.Parameters; import com.sijobe.spc.wrapper.CommandException; import com.sijobe.spc.wrapper.CommandSender; import com.sijobe.spc.wrapper.Entity;...
package com.sijobe.spc.command; /** * Allows the user to bring all of a certain entity type using the specified * type variable, or items if no parameters are specified * * @author q3hardcore * @version 1.0 */ @Command ( name = "bring", description = "Brings all of the specified entity type, this will b...
public void execute(CommandSender sender, List<?> params) throws CommandException {
5
VisualDataWeb/OWL2VOWL
src/main/java/de/uni_stuttgart/vis/vowl/owl2vowl/Owl2Vowl.java
[ "public interface Converter {\n\tString getLoadingInfoString();\n\tvoid setOntologyHasMissingImports(boolean val);\n\tboolean ontologyHasMissingImports();\n\tvoid addLoadingInfo(String msg);\n\tboolean getCurrentlyLoadingFlag();\n\tvoid setCurrentlyLoadingFlag(boolean val);\n\tvoid setCurrentlyLoadingFlag(String pa...
import de.uni_stuttgart.vis.vowl.owl2vowl.converter.Converter; import de.uni_stuttgart.vis.vowl.owl2vowl.converter.IRIConverter; import de.uni_stuttgart.vis.vowl.owl2vowl.converter.InputStreamConverter; import de.uni_stuttgart.vis.vowl.owl2vowl.converter.OntologyConverter; import de.uni_stuttgart.vis.vowl.owl2vowl.expo...
package de.uni_stuttgart.vis.vowl.owl2vowl; /** * Global class for easy to use of this library to include in other projects. */ public class Owl2Vowl { protected Converter converter; public Owl2Vowl(OWLOntology ontology) { converter = new OntologyConverter(ontology); converter.clearLoadingMsg(); } public...
converter = new InputStreamConverter(ontology);
2
aripollak/PictureMap
libs/src/com/drewChanged/metadata/iptc/IptcReader.java
[ "public class JpegProcessingException extends CompoundException\r\n{\r\n public JpegProcessingException(String message)\r\n {\r\n super(message);\r\n }\r\n\r\n public JpegProcessingException(String message, Throwable cause)\r\n {\r\n super(message, cause);\r\n }\r\n\r\n public Jpe...
import com.drewChanged.imaging.jpeg.JpegProcessingException; import com.drewChanged.imaging.jpeg.JpegSegmentReader; import com.drewChanged.metadata.Directory; import com.drewChanged.metadata.Metadata; import com.drewChanged.metadata.MetadataException; import com.drewChanged.metadata.MetadataReader; import java.io...
/* * This is public domain software - that is, you can do whatever you want * with it, and include it software that is licensed under the GNU or the * BSD license, or whatever other licence you choose, including proprietary * closed source licenses. I do ask that you leave this header in tact. * * If you m...
public IptcReader(InputStream is) throws JpegProcessingException
0
Fabric3/spring-samples
apps/bigbank/bigbank-loan/src/main/java/org/fabric3/samples/bigbank/loan/loan/LoanServiceImpl.java
[ "public class LoanException extends Exception {\n private static final long serialVersionUID = 7596067031743965923L;\n\n public LoanException(String message) {\n super(message);\n }\n\n public LoanException(String message, Throwable cause) {\n super(message, cause);\n }\n\n public Lo...
import org.fabric3.samples.bigbank.api.loan.LoanException; import org.fabric3.samples.bigbank.api.loan.LoanService; import org.fabric3.samples.bigbank.api.message.LoanApplication; import org.fabric3.samples.bigbank.api.message.LoanRequest; import org.fabric3.samples.bigbank.api.message.OptionSelection; import org.fabri...
/* * See the NOTICE file distributed with this work for information * regarding copyright ownership. This file is licensed * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://ww...
public long apply(LoanRequest request) throws LoanException {
3
alessandropellegrini/z64sim
iodevice/src/org/luaj/vm2/ast/NameResolver.java
[ "public static class Assign extends Stat {\n\tpublic final List vars;\n\tpublic final List exps;\n\t\t\n\tpublic Assign(List vars, List exps) {\n\t\tthis.vars = vars;\n\t\tthis.exps = exps;\n\t}\n\n\tpublic void accept(Visitor visitor) {\n\t\tvisitor.visit(this);\n\t}\n\n}", "public static class FuncDef extends S...
import java.util.List; import org.luaj.vm2.LuaValue; import org.luaj.vm2.ast.Exp.Constant; import org.luaj.vm2.ast.Exp.NameExp; import org.luaj.vm2.ast.Exp.VarExp; import org.luaj.vm2.ast.Stat.Assign; import org.luaj.vm2.ast.Stat.FuncDef; import org.luaj.vm2.ast.Stat.GenericFor; import org.luaj.vm2.ast.Stat.LocalAssign...
package org.luaj.vm2.ast; /** * Visitor that resolves names to scopes. * Each Name is resolved to a NamedVarible, possibly in a NameScope * if it is a local, or in no named scope if it is a global. */ public class NameResolver extends Visitor { private NameScope scope = null; private void pushScope() { ...
public void visit(Assign stat) {
0
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...
public int serialize(ByteStream byteStream, Scheme scheme) {
6
davidmoten/rtree
src/main/java/com/github/davidmoten/rtree/internal/NonLeafHelper.java
[ "public final class Context<T, S extends Geometry> {\n\n private final int maxChildren;\n private final int minChildren;\n private final Splitter splitter;\n private final Selector selector;\n private final Factory<T, S> factory;\n\n /**\n * Constructor.\n * \n * @param minChildren\n ...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Optional; import com.github.davidmoten.rtree.Context; import com.github.davidmoten.rtree.Entry; import com.github.davidmoten.rtree.Node; import com.github.davidmoten.rtree.NonLeaf; import com.github.davidmoten.rtree.geomet...
package com.github.davidmoten.rtree.internal; public final class NonLeafHelper { private NonLeafHelper() { // prevent instantiation } public static <T, S extends Geometry> void search(Func1<? super Geometry, Boolean> criterion,
Subscriber<? super Entry<T, S>> subscriber, NonLeaf<T, S> node) {
3
shibing624/crf-seg
src/main/java/org/xm/xmnlp/seg/Segment.java
[ "public class Xmnlp {\n /**\n * 日志组件\n */\n private static Logger logger = LogManager.getLogger();\n\n public static final class Config {\n /**\n * 默认关闭调试\n */\n public static boolean DEBUG = false;\n /**\n * 字符类型对应表\n */\n public static S...
import org.xm.xmnlp.Xmnlp; import org.xm.xmnlp.dictionary.other.CharTable; import org.xm.xmnlp.seg.domain.Term; import org.xm.xmnlp.util.SentencesUtil; import org.xm.xmnlp.util.TextUtil; import java.util.Collections; import java.util.LinkedList; import java.util.List; import static org.xm.xmnlp.util.Static.logger;
package org.xm.xmnlp.seg; /** * 分词器(分词服务)<br> * 是所有分词器的基类(Abstract)<br> * 分词器的分词方法是线程安全的,但配置方法则不保证 * <p/> * Created by xuming on 2016/7/22. */ public abstract class Segment { /** * 分词器配置 */ protected TokenizerConfig tokenizerConfig; /** * 构造一个分词器 */ public Segment() { ...
logger.error("线程同步异常:" + TextUtil.exceptionToString(e));
5
waynell/VideoListPlayer
app/src/main/java/com/waynell/videolist/demo/activity/RecyclerViewActivity.java
[ "public abstract class BaseViewHolder<T extends BaseItem> extends RecyclerView.ViewHolder {\n\n public BaseViewHolder(View itemView) {\n super(itemView);\n ButterKnife.bind(this, itemView);\n }\n\n public abstract void onBind(int position, T iItem);\n}", "public class ViewHolderFactory {\n\...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.ViewGroup; import com.waynell.videolist.demo.R; import com.waynell.videolist.dem...
package com.waynell.videolist.demo.activity; /** * @author Wayne */ public class RecyclerViewActivity extends AppCompatActivity { @Bind(R.id.recycler_view) RecyclerView mRecyclerView; private int mScrollState;
private SingleListViewItemActiveCalculator mCalculator;
4
TeamCohen/SEAL
src/com/rcwang/seal/translation/OriginalTranslator.java
[ "public class Entity implements Comparable<Entity> {\r\n\r\n public static Logger log = Logger.getLogger(Entity.class);\r\n \r\n /** final score of this entity */\r\n public static final String SCORE = \"Score\";\r\n /** a name for the weight of string length */\r\n public static final String NAME_LENGTH = \"...
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.log4j.Logger; import com.rcwang.seal.expand.Entity; import com.rcwang.seal.expand.EntityList; import com.rcwang.seal.expand.LangP...
/************************************************************************** * Developed by Language Technologies Institute, Carnegie Mellon University * Written by Richard Wang (rcwang#cs,cmu,edu) **************************************************************************/ package com.rcwang.seal.translation; ...
for (Entity entity : entities)
0
mszubert/2048
src/main/java/put/ci/cevo/util/serialization/SerializationManagerFactory.java
[ "@AutoRegistered(defaultSerializer = true)\npublic class DoubleArraySerializer implements ObjectSerializer<double[]> {\n\n\t@Override\n\tpublic void save(SerializationManager manager, double[] arr, SerializationOutput output) throws IOException {\n\t\toutput.writeInt(arr.length);\n\t\tfor (double element : arr) {\n...
import java.util.List; import org.apache.log4j.Logger; import put.ci.cevo.util.serialization.serializers.DoubleArraySerializer; import put.ci.cevo.util.serialization.serializers.DoubleSerializer; import put.ci.cevo.util.serialization.serializers.IntArraySerializer; import put.ci.cevo.util.serialization.serializers.Inte...
package put.ci.cevo.util.serialization; public class SerializationManagerFactory { private static final Logger logger = Logger.getLogger(SerializationManagerFactory.class); public static SerializationManager create(List<ObjectSerializer<?>> serializers) { SerializationManager manager = new SerializationManag...
serializers.add(new ListSerializer<>());
4
nmby/jUtaime
project/src/main/java/xyz/hotchpotch/jutaime/throwable/RaiseMatcher.java
[ "public class InChain extends InChainBase {\r\n \r\n // [static members] ++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n \r\n /**\r\n * スローされた例外の例外チェインの中に、期待される型の例外が含まれるかを検査する {@code Matcher} オブジェクトを返します。<br>\r\n * このメソッドにより返される {@code Matcher} オブジェクトは、例外チェインの中の例外の型が期待された型のサブクラスの場合も...
import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.stream.Collectors; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; import xyz.hotchpotch.jutaime.throwable.matchers.InChain; import xyz.hotchpotch.jutaime.throwable.ma...
package xyz.hotchpotch.jutaime.throwable; /** * 複数の {@code Matcher} を and 条件で連結する、コンテナ {@code Matcher} です。<br> * このクラスのインスタンスは、{@link RaiseMatchers} クラスの static ファクトリメソッドにより提供されます。<br> * <br> * このクラスはスレッドセーフではありません。<br> * ひとつの {@code Matcher} オブジェクトが複数のスレッドから操作されることは想定されていません。<br> * * @since 1.0...
matchers.add(RootCauseExact.rootCauseExact(expectedType));
6
dannormington/appengine-cqrs
src/main/java/com/cqrs/appengine/sample/AttendeeApi.java
[ "public class AggregateNotFoundException extends AggregateException {\n\n\tprivate static final String ERROR_TEXT = \"The aggregate you requested cannot be found.\";\n\t\n\tprivate static final long serialVersionUID = 1L;\n\n\t/**\n\t * Constructor\n\t * \n\t * @param aggregateId\n\t */\n\tpublic AggregateNotFoundE...
import com.cqrs.appengine.core.exceptions.AggregateNotFoundException; import com.cqrs.appengine.core.exceptions.EventCollisionException; import com.cqrs.appengine.core.exceptions.HydrationException; import com.cqrs.appengine.core.messaging.Command; import com.cqrs.appengine.core.messaging.SimpleMessageBus; import com.c...
package com.cqrs.appengine.sample; @Api( name="thatconference", version = "v1", description = "That Conference Sample API", clientIds = {com.google.api.server.spi.Constant.API_EXPLORER_CLIENT_ID} ) public class AttendeeApi { @ApiMethod( httpMethod = "POST", ...
public void changeEmail(ChangeAttendeeEmail command) throws ConflictException, NotFoundException, BadRequestException {
5
tang-jie/AvatarMQ
src/com/newlandframework/avatarmq/consumer/ConsumerHookMessageEvent.java
[ "public abstract class HookMessageEvent<T> {\n\n public void disconnect(T message) {\n }\n\n public T callBackMessage(T message) {\n return message;\n }\n\n}", "public class ResponseMessage extends BusinessMessage {\n\n public ResponseMessage() {\n super();\n }\n}", "public abstr...
import com.newlandframework.avatarmq.core.HookMessageEvent; import com.newlandframework.avatarmq.model.ResponseMessage; import com.newlandframework.avatarmq.msg.BaseMessage; import com.newlandframework.avatarmq.msg.ConsumerAckMessage; import com.newlandframework.avatarmq.msg.Message;
/** * Copyright (C) 2016 Newland Group Holding Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
ResponseMessage response = (ResponseMessage) obj;
1
butter-fly/belling-admin
src/main/java/com/belling/admin/controller/houtai/UserController.java
[ "@Data\n@EqualsAndHashCode(callSuper = false)\npublic class User extends PersistentObject {\n\t\n\t/** 序列化ID */\n\tprivate static final long serialVersionUID = 1106412532325860697L;\n\t\n\t/** 登录名 */\n\tprivate String account;\n\t\n\t/** 密码 */\n\t@JSONField(serialize = false)\n\tprivate String password;\n\t\n\t/** ...
import java.util.Date; import javax.servlet.http.HttpServletRequest; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.spring...
package com.belling.admin.controller.houtai; /** * @author Sunny */ @Controller @RequestMapping("/admin/user") public class UserController extends BaseController { /** * 用户业务对象 */ @Autowired private UserService userService; /** * 默认密码 */ @Value("${system.init.password}") private String passwor...
Pagination<User> page = new Pagination<User>();
4
DevConMyanmar/devcon-android-2013
src/org/devcon/android/fragments/SpeakerFragment.java
[ "public class SpeakerDetailActivity extends BaseActivity {\n\n private static final String TAG = makeLogTag(SpeakerFragment.class);\n\n private String sName, sTitle, sBio, sEmail, photoURL;\n private int sId;\n private StorageUtil store;\n private ArrayList<Talk> talks = new ArrayList<Talk>();\n p...
import android.content.Intent; import android.graphics.Color; import android.os.Build; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ListView; import android.widget.ProgressBar; import com.a...
package org.devcon.android.fragments; public class SpeakerFragment extends SherlockFragment { private static final String TAG = makeLogTag(SpeakerFragment.class); ListView lv; private SpeakerAdapter adapter; private ArrayList<Speaker> speaker = new ArrayList<Speaker>(); private ProgressBar m...
LogUtil.LOGD(TAG, "You clicked at " + position);
5
PowerBack/AnKey
AnKey/presenter/src/main/java/net/qiujuer/powerback/ankey/presenter/DetailPresenter.java
[ "@Table(name = \"Info\")\npublic class InfoModel extends Model implements ModelStatus {\n\n @Column(name = \"InfoId\")\n private UUID infoId;\n\n @Column(name = \"Description\")\n private String description;\n\n @Column(name = \"Site\")\n public SiteModel site;\n\n @Column(name = \"Color\")\n ...
import android.content.ClipboardManager; import android.content.Context; import net.qiujuer.genius.kit.util.Tools; import net.qiujuer.genius.kit.util.UiKit; import net.qiujuer.powerback.ankey.model.db.InfoModel; import net.qiujuer.powerback.ankey.model.view.InfoDecryptModel; import net.qiujuer.powerback.ankey.presenter...
package net.qiujuer.powerback.ankey.presenter; /** * Created by qiujuer * on 15/11/24. */ public class DetailPresenter { private DetailView mView; private InfoDecryptModel mDModel; public DetailPresenter(DetailView view) { mView = view; } public void copy() { ClipboardManager...
mView.setError(EditView.ERROR_NOT_FOUND_MODEL);
4
eBay/xcelite
src/main/java/com/ebay/xcelite/utils/diff/XceliteDiff.java
[ "public interface SheetReader<T> {\r\n\r\n /**\r\n * Reads the sheet and returns a collection of the specified type.\r\n * \r\n * @return collection of the specified type\r\n */\r\n Collection<T> read();\r\n\r\n /**\r\n * Whether to skip the first row or not when reading the sheet.\r\n * \r\n * @pa...
import java.util.Collection; import javax.annotation.Nonnull; import org.apache.commons.collections.CollectionUtils; import com.ebay.xcelite.reader.SheetReader; import com.ebay.xcelite.utils.diff.info.Collections; import com.ebay.xcelite.utils.diff.info.Files; import com.ebay.xcelite.utils.diff.info.Info; import...
/* Copyright [2013-2014] eBay Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applic...
Info<T> info = new ReportInfo<T>(new Files(a.getSheet().getFile().getAbsolutePath(), b.getSheet().getFile()
3
eckig/graph-editor
core/src/main/java/de/tesis/dynaware/grapheditor/core/selections/SelectionTracker.java
[ "public abstract class GSkin<T extends EObject>\n{\n\n private final BooleanProperty selectedProperty = new BooleanPropertyBase(false)\n {\n\n @Override\n protected void invalidated()\n {\n selectionChanged(get());\n }\n\n @Override\n public Object getBean(...
import java.util.HashSet; import java.util.List; import org.eclipse.emf.ecore.EObject; import de.tesis.dynaware.grapheditor.GSkin; import de.tesis.dynaware.grapheditor.SkinLookup; import de.tesis.dynaware.grapheditor.model.GConnection; import de.tesis.dynaware.grapheditor.model.GConnector; import de.tesis.dynaware.grap...
package de.tesis.dynaware.grapheditor.core.selections; /** * Provides observable lists of selected nodes and joints for convenience. */ public class SelectionTracker { private final ObservableSet<EObject> selectedElements = FXCollections.observableSet(new HashSet<>()); private final SkinLookup skinLookup...
else if (obj instanceof GJoint j)
4
cecom/PACIFy
impl/src/main/java/com/geewhiz/pacify/Replacer.java
[ "public interface Defect {\n\n String getDefectMessage();\n\n}", "public abstract class DefectException extends Exception implements Defect {\n\n private static final long serialVersionUID = 1L;\n\n private PMarker pMarker;\n private PArchive pArchive;\n private PFile ...
import com.geewhiz.pacify.defect.DefectMessage; import com.geewhiz.pacify.managers.EntityManager; import com.geewhiz.pacify.managers.FilterManager; import com.geewhiz.pacify.managers.PropertyResolveManager; import com.geewhiz.pacify.utils.DefectUtils; import com.geewhiz.pacify.utils.FileUtils; import com.geewhiz....
/*- * ========================LICENSE_START================================= * com.geewhiz.pacify.impl * %% * Copyright (C) 2011 - 2017 Sven Oppermann * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtai...
private EntityManager entityManager;
3
RestNEXT/restnext
restnext-security/src/main/java/org/restnext/security/SecurityScanner.java
[ "public static Set<Path> deepListChildren(Path directory) {\n return deepListChildren(directory, DEFAULT_GLOB);\n}", "public static Set<Path> listChildren(Path directory) {\n return listChildren(directory, DEFAULT_GLOB);\n}", "public class ClasspathRegister {\n\n /**\n * Parameters of the method to add an ...
import static org.restnext.util.FileUtils.deepListChildren; import static org.restnext.util.FileUtils.listChildren; import java.io.IOException; import java.io.InputStream; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; import java.util.Collectio...
/* * Copyright (C) 2016 Thiago Gutenberg Carvalho da Costa * * 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 ...
.withImports(Request.class));
3
vince-from-nice/osmaxil
src/main/java/org/openstreetmap/osmaxil/flow/VegetationMakerFlow.java
[ "public class OsmXmlNode {\r\n\r\n\t@XmlAttribute\r\n\tpublic Long id;\r\n\r\n\t@XmlAttribute\r\n\tpublic int version;\r\n\r\n\t@XmlAttribute\r\n\tpublic Long changeset;\r\n\r\n\t@XmlAttribute\r\n\tpublic String user;\r\n\r\n\t@XmlAttribute\r\n\tpublic String visible;\r\n\r\n\t@XmlAttribute\r\n\tpublic Integer uid;...
import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.openstreetmap.osmaxil.dao.xml.osm.OsmXmlNode; import org.openstreetmap.osmaxil.d...
package org.openstreetmap.osmaxil.flow; @Component("VegetationMaker") @Lazy
public class VegetationMakerFlow extends AbstractMakerFlow<VegetationElement, VegetationImport> {
5
xurxodev/Movies-Android-Kata
app/src/main/java/com/xurxodev/moviesandroidkata/di/module/ActivityModule.java
[ "public class GetMovieDetailUseCase implements UseCase {\n\n public interface Callback {\n void onCompetitorDetailLoaded(final Movie competitor);\n\n void onCompetitorDetailNotFound();\n\n void onConnectionError();\n }\n\n private MovieRepository competitorRepository;\n private Asyn...
import android.app.Activity; import com.xurxodev.moviesandroidkata.di.scope.ActivityScope; import com.xurxodev.moviesandroidkata.domain.usecase.GetMovieDetailUseCase; import com.xurxodev.moviesandroidkata.domain.usecase.GetMoviesUseCase; import com.xurxodev.moviesandroidkata.presentation.navigator.TransitionAnimationNa...
package com.xurxodev.moviesandroidkata.di.module; @Module public class ActivityModule { private final Activity activityContext; public ActivityModule(Activity activityContext) { this.activityContext = activityContext; } @Provides @ActivityScope Activity provideActivityContext() { ...
MoviesPresenter provideMoviesPresenter(
4
roshakorost/Phial
phial-overlay/src/main/java/com/mindcoders/phial/internal/share/ShareView.java
[ "public interface OverlayCallback {\n\n /**\n * Called to close phial debug window\n */\n void finish();\n\n\n /**\n * Finds view in application view hierarchy\n *\n * @param id view id.\n * @return view or null if view is missing\n */\n @Nullable\n View findViewById(int i...
import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.content.Context; import android.support.annotation.LayoutRes; import android.support.annotation.NonNull; import android.support.annotation.VisibleForTesting; import android.view.LayoutInflater; import android.view.View; ...
package com.mindcoders.phial.internal.share; /** * Created by rost on 10/22/17. */ public class ShareView extends FrameLayout implements PageView { private final GridView contentGV; private final EditText messageTV; private final ShareManager shareManager; private final AttachmentManager attachmen...
final AnimatorFactory factory = AnimatorFactory.createFactory(view);
5
GoogleCloudPlatform/healthcare-api-dicom-fuse
src/main/java/com/google/dicomwebfuse/dao/spec/SeriesPathBuilder.java
[ "public static final String DATASETS = \"/datasets/\";", "public static final String DICOM_STORES = \"/dicomStores/\";", "public static final String DICOM_WEB = \"/dicomWeb\";", "public static final String LOCATIONS = \"/locations/\";", "public static final String PROJECTS = \"/projects/\";", "public stat...
import static com.google.dicomwebfuse.dao.Constants.DATASETS; import static com.google.dicomwebfuse.dao.Constants.DICOM_STORES; import static com.google.dicomwebfuse.dao.Constants.DICOM_WEB; import static com.google.dicomwebfuse.dao.Constants.LOCATIONS; import static com.google.dicomwebfuse.dao.Constants.PROJECTS; impo...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
public String toPath() throws DicomFuseException {
7
messaginghub/pooled-jms
pooled-jms/src/test/java/org/messaginghub/pooled/jms/JmsPoolSessionTest.java
[ "public class MockJMSConnection implements Connection, TopicConnection, QueueConnection, AutoCloseable {\n\n private static final Logger LOG = LoggerFactory.getLogger(MockJMSConnection.class);\n\n private final MockJMSConnectionStats stats = new MockJMSConnectionStats();\n private final Map<String, MockJMS...
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNotSame; import static org.junit.jupiter.api.Assertions.assertNull; import static or...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
mockSession.addSessionListener(new MockJMSDefaultSessionListener() {
2
lacimarsik/harmony-analyser
src/main/java/org/harmony_analyser/jharmonyanalyser/services/AnalysisFactory.java
[ "@SuppressWarnings(\"SameParameterValue\")\n\npublic class FlatTimeSeriesFilter extends AnalysisFilter {\n\tprivate float samplingRate;\n\tprivate int vectorSize;\n\n\tpublic FlatTimeSeriesFilter() {\n\t\tkey = \"filters:flat_time_series\";\n\t\tname = \"Timestamp to flat time series filter\";\n\t\tdescription = \"...
import org.harmony_analyser.jharmonyanalyser.filters.FlatTimeSeriesFilter; import org.harmony_analyser.jharmonyanalyser.plugins.EmptyPlugin; import org.harmony_analyser.jharmonyanalyser.plugins.chordanal_plugins.*; import org.harmony_analyser.jharmonyanalyser.plugins.chromanal_plugins.*; import org.harmony_analyser.jha...
package org.harmony_analyser.jharmonyanalyser.services; /** * Factory to create Analysis plugins on demand */ public class AnalysisFactory { private final String[] CHORD_ANALYSER_PLUGINS = new String[] { "chord_analyser:chord_complexity_distance", "chord_analyser:average_chord_complexity_distance" }; priv...
plugin = new EmptyPlugin();
1
Bleuzen/Blizcord
src/com/github/bleuzen/blizcord/gui/GUI_Main.java
[ "public class Config {\n\n\tpublic static final String CONTROL_CHANNEL = \"CONTROL_CHANNEL\";\n\tpublic static final String VOICE_CHANNEL = \"VOICE_CHANNEL\";\n\tpublic static final String BOT_TOKEN = \"BOT_TOKEN\";\n\tpublic static final String COMMAND_PREFIX = \"COMMAND_PREFIX\";\n\tpublic static final String DIS...
import java.awt.BorderLayout; import java.awt.Component; import java.awt.GridLayout; import java.awt.Image; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.BufferedReader; import java.io.BufferedWriter; import ...
lblCurrstatus.setText("Running"); } else { // Failed to start // Reset Status lblCurrstatus.setText("Stopped"); // Re-enable Start and Edit buttons btnStart.setEnabled(true); btnEdit.setEnabled(true); } } }).start(); } }); btnStart.setB...
AudioPlayerThread.addToPlaylist(f.getAbsolutePath(), false);
5
googlecreativelab/justaline-android
app/src/main/java/com/arexperiments/justaline/RoomManager.java
[ "public class Anchor {\n\n @PropertyName(\"anchorId\")\n protected String anchorId;\n\n @PropertyName(\"anchorResolutionError\")\n protected boolean anchorResolutionError;\n\n public Anchor() {\n // Default constructor required for calls to DataSnapshot.getValue(Anchor.class)\n }\n\n pub...
import android.content.Context; import android.util.Log; import com.arexperiments.justaline.model.Anchor; import com.arexperiments.justaline.model.Participant; import com.arexperiments.justaline.model.RoomData; import com.arexperiments.justaline.model.Stroke; import com.arexperiments.justaline.model.StrokeUpdate; impor...
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in ...
Participant participant = Participant.readyToSetAnchor(false);
1
eostermueller/heapSpank
src/test/java/com/github/eostermueller/heapspank/leakyspank/console/TestJMapHistoRunner.java
[ "public class JMapHistoLine {\n\tpublic int num = Integer.MAX_VALUE;\n\n\t/** \n\t * What was the 'num' value, a ranking of most memory \n\t * consumed with 1=most memory consumed, for a previous invocation of jmap -histo ?\n\t */\n\t//public int rankIncrease = Integer.MIN_VALUE; \n\tpublic long instances = -1;\n\...
import static org.junit.Assert.*; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; import org.junit.Ignore; import org.junit.Test; import com.github.eostermueller.heapspank.leakyspank.JMapHistoLine; import com.github.eostermueller.heapspank.leakyspank.JvmAttachException; import com.github.eost...
package com.github.eostermueller.heapspank.leakyspank.console; public class TestJMapHistoRunner { private static final String JMAP_HISTO_COLUMN_HEADERS_1 = "num #instances #bytes class name"; private static final String JMAP_HISTO_COLUMN_HEADERS_2 = "----------------------------------------------"; ...
JMapHisto histo = new VirtualMachineWrapper(""+IOUtil.getMyPid());
3
azinik/ADRMine
release/v1/java_src/ADRMine/src/main/java/edu/asu/diego/adrmine/evaluation/CRFBasedExtractionUtils.java
[ "public class TokenSequenceExampleBuilder {\n\t//This classifies a chunk as having ADR or not\n\tpublic static String ExperimentGroupADRConcepts = \"ADRConceptTokenSeq\";\n\n\tpublic enum TokenLabel {\n\t\tOUT(0),\n\t\tBADR(1),\n\t\tIADR(2),\n\t\tBIND(3),\n\t\tIIND(4),\n\t\tBBEN(5),\n\t\tIBEN(6);\n\t\tprivate stati...
import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import edu.asu.diego.adrmine.classification.TokenSequenceExampleBuilder; import rainbownlp.core.Artifact; import rainbownlp.core.Phrase; import rainbownlp...
package edu.asu.diego.adrmine.evaluation; public class CRFBasedExtractionUtils { public static String experimentgroup = TokenSequenceExampleBuilder.ExperimentGroupADRConcepts; // public statiSc String experimentgroupLexiconCand = LexiconCandidateSVMExampleBuilder.ExperimentGroupADRConceptsLexiconCandidates; public...
public static List<String> getCRFExtractedConceptsForSent(Artifact sent, String experimentGroup, TargetSemanticType targetSemanticType,
1
AbrarSyed/SecretRoomsMod-forge
src/main/java/com/wynprice/secretroomsmod/SecretItems.java
[ "public class BaseItemDoor extends Item\n{\n\tprivate final BaseBlockDoor door;\n\t\n\tpublic BaseItemDoor(Block door, String name)\n\t{\n\t\tthis.door = (BaseBlockDoor) door;\n\t\tsetUnlocalizedName(name);\n\t\tsetRegistryName(SecretRooms5.MODID, name);\n\t}\n\n\t\n\t@Override\n\tpublic EnumActionResult onItemUse(...
import com.wynprice.secretroomsmod.base.BaseItemDoor; import com.wynprice.secretroomsmod.integration.malisisdoors.SecretCompactMalisisDoors; import com.wynprice.secretroomsmod.items.CamouflagePaste; import com.wynprice.secretroomsmod.items.ProgrammableSwitchProbe; import com.wynprice.secretroomsmod.items.SwitchProbe; i...
package com.wynprice.secretroomsmod; @EventBusSubscriber(modid=SecretRooms5.MODID) public class SecretItems { public static final Item CAMOUFLAGE_PASTE = new CamouflagePaste(); public static final Item SECRET_WOODEN_DOOR = SecretCompatibility.MALISISDOORS ? SecretCompactMalisisDoors.WOODEN_DOOR_ITEM : new BaseIte...
public static final Item PROGRAMMABLE_SWITCH_PROBE = new ProgrammableSwitchProbe();
3
eskatos/asadmin
asadmin-maven-plugin/src/main/java/org/n0pe/mojo/asadmin/AbstractAsadminMojo.java
[ "public class AsAdmin\n{\n\n private static final String OUTPUT_PREFIX = \"[ASADMIN] \";\n private static Map<IAsAdminConfig, AsAdmin> instances;\n public static final String HOST_OPT = \"--host\";\n public static final String PORT_OPT = \"--port\";\n public static final String SECURE_OPT = \"--secur...
import org.n0pe.asadmin.IAsAdminConfig; import java.io.File; import java.util.Collections; import java.util.Map; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.SystemUtils; import org.apache.maven.plugin.A...
return user; } @Override public final String getPasswordFile() { return passwordfile; } @Override public String getHost() { return host; } @Override public String getPort() { return port; } @Override pu...
protected void setPatterns( IAsAdminCmd cmd )
3
Vrael/eManga
app/src/main/java/com/emanga/emanga/app/deserializers/MangaDeserializer.java
[ "public class App extends Application {\n\tprivate static String TAG = App.class.getName();\n\n public static final String PREFS_NAME = \"MangappPrefs\";\n public static UUID userId;\n\n private static App sInstance;\n\n public SmartRequestQueue mRequestQueue;\n public ObjectMapper mMapper;\n\n pr...
import com.emanga.emanga.app.controllers.App; import com.emanga.emanga.app.models.Author; import com.emanga.emanga.app.models.Chapter; import com.emanga.emanga.app.models.Genre; import com.emanga.emanga.app.models.Manga; import com.emanga.emanga.app.utils.Dates; import com.fasterxml.jackson.core.JsonParser; import com....
package com.emanga.emanga.app.deserializers; /** * Created by Ciro on 24/02/14. */ public class MangaDeserializer extends JsonDeserializer<Manga> { @Override public Manga deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { JsonNode node = ...
created_at = Dates.sdf.parse(created_atNode.asText());
5
kyle-liu/netty4study
transport/src/main/java/io/netty/channel/socket/nio/NioSocketChannel.java
[ "@SuppressWarnings(\"ClassMayBeInterface\")\npublic abstract class ByteBuf implements ReferenceCounted, Comparable<ByteBuf> {\n\n /**\n * Returns the number of bytes (octets) this buffer can contain.\n */\n public abstract int capacity();\n\n /**\n * Adjusts the capacity of this buffer. If the...
import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; import io.netty.channel.ChannelException; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelMetadata; import io.netty.channel.ChannelOutboundBuffer; import io.netty.channel.ChannelPromise; import io.netty.channel.EventLoop; import io.n...
} @Override public InetSocketAddress localAddress() { return (InetSocketAddress) super.localAddress(); } @Override public InetSocketAddress remoteAddress() { return (InetSocketAddress) super.remoteAddress(); } @Override public boolean isOutputShutdown() { r...
protected void doWrite(ChannelOutboundBuffer in) throws Exception {
2
aredee/accumulo-mesos
accumulo-mesos-executor/src/main/java/aredee/mesos/frameworks/accumulo/executor/AccumuloStartExecutor.java
[ "public class Environment {\n\n public static final String JAVA_HOME = \"JAVA_HOME\";\n\n public static final String CLASSPATH = \"CLASSPATH\";\n\n public static final String HADOOP_PREFIX = \"HADOOP_PREFIX\";\n public static final String HADOOP_CONF_DIR = \"HADOOP_CONF_DIR\";\n public static final S...
import aredee.mesos.frameworks.accumulo.configuration.Environment; import aredee.mesos.frameworks.accumulo.initialize.AccumuloInitializer; import aredee.mesos.frameworks.accumulo.initialize.AccumuloSiteXml; import aredee.mesos.frameworks.accumulo.model.ServerProfile; import aredee.mesos.frameworks.accumulo.process.Accu...
package aredee.mesos.frameworks.accumulo.executor; public class AccumuloStartExecutor implements Executor { private static final Logger LOGGER = LoggerFactory.getLogger(AccumuloStartExecutor.class); private static final ObjectMapper mapper = new ObjectMapper(); private Process serverProcess = null; ...
ServerProfile profile = null;
3