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
maxpower47/DeliciousDroid
src/com/deliciousdroid/widget/SearchWidgetProvider.java
[ "public class Constants {\n\n /**\n * Account type string.\n */\n public static final String ACCOUNT_TYPE = \"com.deliciousdroid\";\n \n public static final Uri CONTENT_URI_BASE = Uri.parse(\"content://com.deliciousdroid\");\n \n public static final String CONTENT_SCHEME = \"content\";\n ...
import android.accounts.AccountManager; import android.app.PendingIntent; import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.widget.RemoteViews; import com.deliciousdroid.Constants; ...
/* * DeliciousDroid - http://code.google.com/p/DeliciousDroid/ * * Copyright (C) 2010 Matt Schmidt * * DeliciousDroid 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, * ...
Intent searchIntent = new Intent(context, Main.class);
4
horrorho/LiquidDonkey
src/main/java/com/github/horrorho/liquiddonkey/cloud/file/CloudFileWriter.java
[ "@Immutable\n@ThreadSafe\npublic enum Outcome {\n\n WRITTEN(\"Written(unencrypted)\", true),\n WRITTEN_DECRYPT(\"Written(decrypted)\", true),\n FAILED_DOWNLOAD(\"Failed(download)\", false),\n FAILED_DECRYPT_ERROR(\"Failed(decrypt)\", false),\n FAILED_DECRYPT_NO_FILE(\"Failed(internal)\", false),\n ...
import com.github.horrorho.liquiddonkey.cloud.outcome.Outcome; import com.github.horrorho.liquiddonkey.cloud.data.Snapshot; import com.github.horrorho.liquiddonkey.cloud.keybag.KeyBagManager; import com.github.horrorho.liquiddonkey.exception.BadDataException; import com.github.horrorho.liquiddonkey.iofunction.IOFunctio...
/* * The MIT License * * Copyright 2015 Ahseya. * * Permission is hereby granted, free from charge, to any person obtaining a copy * from this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, mod...
private final KeyBagManager keyBag;
2
JetBrains/teamcity-deployer-plugin
deploy-runner-agent/src/main/java/jetbrains/buildServer/deployer/agent/ssh/sftp/SftpBuildProcessAdapter.java
[ "public class DeployerAgentUtils {\n public static void logBuildProblem(BuildProgressLogger logger, String message) {\n logger.logBuildProblem(BuildProblemData\n .createBuildProblem(String.valueOf(message.hashCode()),\n DeployerRunnerConstants.BUILD_PROBLEM_TYPE,\n ...
import java.util.List; import java.util.Map; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.text.StringUtil; import com.jcraft.jsch.*; import jetbrains.buildServer.agent.BuildFinishedStatus; import jetbrains.buildServer.agent.BuildRunnerContext; import jetbrains.buildServer.agent.impl.a...
/* * Copyright 2000-2022 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
private SSHSessionProvider mySessionProvider;
4
Labs64/NetLicensingClient-java
NetLicensingClient/src/test/java/com/labs64/netlicensing/service/PaymentMethodServiceTest.java
[ "public final class Constants {\n\n private Constants() {\n }\n\n // CHECKSTYLE:OFF\n\n public static final String ID = \"id\";\n public static final String ACTIVE = \"active\";\n public static final String NUMBER = \"number\";\n public static final String NAME = \"name\";\n public static fi...
import com.labs64.netlicensing.domain.vo.Page; import com.labs64.netlicensing.exception.ServiceException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import javax.ws.rs.Path; import javax...
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
private static Context context;
3
synapticloop/routemaster
src/main/java/synapticloop/nanohttpd/example/servant/HandlerServant.java
[ "public abstract class Handler {\n\t/**\n\t * Return whether this handler can serve the requested URI\n\t * \n\t * @param uri the URI to check\n\t * \n\t * @return whether this handler can serve the requested URI\n\t */\n\tpublic abstract boolean canServeUri(String uri);\n\t\n\t/**\n\t * If the handler can serve th...
import java.io.File; import java.util.Iterator; import java.util.Map; import synapticloop.nanohttpd.handler.Handler; import synapticloop.nanohttpd.router.Routable; import synapticloop.nanohttpd.router.RouteMaster; import synapticloop.nanohttpd.utils.HttpUtils; import fi.iki.elonen.NanoHTTPD.IHTTPSession; import fi.iki....
package synapticloop.nanohttpd.example.servant; /* * Copyright (c) 2013-2020 synapticloop. * * All rights reserved. * * This source code and any derived binaries are covered by the terms and * conditions of the Licence agreement ("the Licence"). You may not use this * source code or any derived binaries excep...
Map<String, Handler> handlerCache = RouteMaster.getHandlerCache();
2
stoussaint/spring-data-marklogic
src/test/java/com/_4dconcept/springframework/data/marklogic/repository/query/PartTreeMarklogicQueryTest.java
[ "public interface MarklogicOperations {\n\n /**\n * Insert the given object.\n * Content will be converted if not one of supported type.\n * Uri will be computed as well as creation options (such as defaultCollection)\n * Insert is used to initially store the object into the database. To update a...
import com._4dconcept.springframework.data.marklogic.core.MarklogicOperations; import com._4dconcept.springframework.data.marklogic.core.convert.MappingMarklogicConverter; import com._4dconcept.springframework.data.marklogic.core.convert.MarklogicConverter; import com._4dconcept.springframework.data.marklogic.core.mapp...
/* * Copyright 2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
MarklogicConverter converter = new MappingMarklogicConverter(mappingContext);
1
AlexanderMisel/gnubridge
src/main/java/org/gnubridge/core/bidding/rules/WeakTwo.java
[ "public class Card {\n\tpublic static final int TWO = 0;\n\n\tpublic static final int THREE = 1;\n\n\tpublic static final int FOUR = 2;\n\n\tpublic static final int FIVE = 3;\n\n\tpublic static final int SIX = 4;\n\n\tpublic static final int SEVEN = 5;\n\n\tpublic static final int EIGHT = 6;\n\n\tpublic static fina...
import java.util.List; import org.gnubridge.core.Card; import org.gnubridge.core.Hand; import org.gnubridge.core.bidding.Auctioneer; import org.gnubridge.core.bidding.Bid; import org.gnubridge.core.bidding.PointCalculator; import org.gnubridge.core.deck.Clubs; import org.gnubridge.core.deck.Hearts; import org.gnubridge...
package org.gnubridge.core.bidding.rules; public class WeakTwo extends BiddingRule { private PointCalculator pc; private Suit sixCardSuit;
public WeakTwo(Auctioneer a, Hand h) {
2
fabmax/LightGL
LightGlLib/src/main/java/de/fabmax/lightgl/util/Painter.java
[ "public class ColorShader extends Shader {\n\n private static final String TAG = \"ColorShader\";\n \n private int muMvpMatrixHandle = 0;\n\n /**\n * Creates a new ColorShader.\n * \n * @param shaderMgr the {@link ShaderManager}\n */\n public ColorShader(ShaderManager shaderMgr) {\n ...
import android.graphics.Typeface; import android.opengl.Matrix; import de.fabmax.lightgl.ColorShader; import de.fabmax.lightgl.LightGlContext; import de.fabmax.lightgl.RenderPass; import de.fabmax.lightgl.ShadowRenderPass; import de.fabmax.lightgl.ShadowShader; import de.fabmax.lightgl.Texture; import de.fabmax.lightgl...
package de.fabmax.lightgl.util; public class Painter { private float alpha = 1; private float lineThickness = 1; private GlFont defaultFont; private GlFont font; private final LightGlContext glContext; private final DynamicMesh mesh; private final MeshBuilder builder; private fin...
if (prePass != null && prePass instanceof ShadowRenderPass) {
3
InfinityStudio/FoodCraft
src/main/java/com/foodcraft/init/FoodcraftPlants.java
[ "public class BlockBannana extends Block {\n\n private String name;\n private String fruit;\n\n public BlockBannana(String name,String fruit) {\n super(Material.wood);\n this.setTickRandomly(true);\n this.setHardness(0.2F);\n this.setLightOpacity(1);\n this.setStepSound(s...
import com.foodcraft.plant.blocks.BlockBannana; import com.foodcraft.plant.blocks.BlockCoconut; import com.foodcraft.plant.blocks.BlockFoodcraftCrops; import com.foodcraft.plant.blocks.BlockFruit; import com.foodcraft.plant.blocks.BlockOnion; import com.foodcraft.plant.blocks.BlockTree; import com.foodcraft.plant.block...
package com.foodcraft.init; public class FoodcraftPlants { public static Block FCleaves; public static Block BlockLishu,BlockLi; public static Block BlockLizhishu,BlockLizhi; public static Block BlockTaozishu,BlockTaozi; public static Block BlockJuzishu,BlockJuzi; public static Block BlockPi...
BlockCong = new BlockOnion();
4
membaza/users-service
src/main/java/com/membaza/api/users/controller/RoleController.java
[ "@Data\n@Document(collection = \"roles\")\npublic final class Role {\n\n @Id\n private String id;\n private String name;\n private Set<String> privileges;\n\n @JsonIgnore\n public String getId() {\n return id;\n }\n}", "@Data\n@Document(collection = \"users\")\npublic final class User ...
import com.membaza.api.users.persistence.Role; import com.membaza.api.users.persistence.User; import com.membaza.api.users.security.JwtAuthentication; import com.membaza.api.users.throwable.OperationNotAllowedException; import com.membaza.api.users.throwable.RoleNotFoundException; import com.membaza.api.users.throwable...
package com.membaza.api.users.controller; /** * @author Emil Forslund * @since 1.0.0 */ @RestController @RequestMapping("/users") public class RoleController { private final MongoTemplate mongo; public RoleController(MongoTemplate mongo) { this.mongo = requireNonNull(mongo); } @PostMapp...
throw new UserNotFoundException();
5
rey5137/material
app/src/main/java/com/rey/material/app/RecurringPickerDialog.java
[ "public class ThemeUtil {\n\t\t\n\tprivate static TypedValue value;\n\t\n\tpublic static int dpToPx(Context context, int dp){\n\t\treturn (int)(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, context.getResources().getDisplayMetrics()) + 0.5f);\n\t}\n\t\n\tpublic static int spToPx(Context context, int sp...
import android.annotation.TargetApi; import android.content.Context; import android.graphics.Canvas; import android.graphics.ColorFilter; import android.graphics.Paint; import android.graphics.Path; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.RectF; import android.graphics...
package com.rey.material.app; /** * Created by Rey on 2/2/2015. */ public class RecurringPickerDialog extends Dialog implements WeekView.OnDaySelectionChangedListener { private ModeAdapter mModeAdapter; private EndAdapter mEndAdapter; private EditText mPeriodEditText;
private TextView mPeriodUnitTextView;
5
jboss-remoting/jboss-marshalling
api/src/main/java/org/jboss/marshalling/cloner/SerializingCloner.java
[ "public interface Marshaller extends ObjectOutput, ByteOutput {\n /**\n * Write an object to the underlying storage or stream as a new instance. The class that implements this interface\n * defines how the object is written.\n *\n * @param obj the object to be written\n * @throws IOException ...
import static java.lang.System.getSecurityManager; import static java.security.AccessController.doPrivileged; import java.io.ByteArrayOutputStream; import java.io.EOFException; import java.io.Externalizable; import java.io.File; import java.io.IOException; import java.io.InterruptedIOException; import java.io.InvalidOb...
/* * JBoss, Home of Professional Open Source. * Copyright 2014 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Licen...
private final SerializableClassRegistry registry;
4
hgschmie/pgpsigner
src/java/de/softwareforge/pgpsigner/util/AppContext.java
[ "public interface Command\n{\n /**\n * Returns the name of this command.\n *\n * @return The command name.\n */\n String getName();\n\n /**\n * Returns a short, one line help for this command.\n *\n * @return A short help text.\n */\n String getHelp();\n\n /**\n * ...
import de.softwareforge.pgpsigner.key.PublicKeyRing; import de.softwareforge.pgpsigner.key.SecretKey; import de.softwareforge.pgpsigner.key.SecretKeyRing; import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.apache.commons.cli.Options; import org.apache.commons.collections.map.ListOrd...
package de.softwareforge.pgpsigner.util; /* * Copyright (C) 2007 Henning P. Schmiedehausen * * See the NOTICE file distributed with this work for additional * information * * Licensed under the Apache License, Version 2.0 (the "License"); you * may not use this file except in compliance with the License. * You...
private SecretKey signKey = null;
4
Qyotta/axon-eventstore
eventstore-client/src/test/java/de/qyotta/eventstore/EventReaderTest.java
[ "public interface ESReader {\n\n EventStreamFeed readStream(String url);\n\n EventResponse readEvent(String url);\n\n}", "@SuppressWarnings(\"nls\")\npublic class EsReaderDefaultImpl implements ESReader {\n private static final Logger LOGGER = LoggerFactory.getLogger(EsReaderDefaultImpl.class.getName());\n ...
import static org.hamcrest.Matchers.notNullValue; import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; import de.qyotta.eventstore.communication.ESReader; import de.qyotta.eventstore.communication.EsReaderDefaultImpl; import de.qyotta.even...
package de.qyotta.eventstore; public class EventReaderTest extends AbstractEsTest { private ESReader reader; @Before public void setUp() throws InterruptedException { reader = new EsReaderDefaultImpl(HttpClientFactory.httpClient(EventStoreSettings.withDefaults() .host(HOST) ....
final EventStreamFeed feed = reader.readStream(streamUrl);
3
zeromq/jzmq-api
src/main/java/org/zeromq/jzmq/bstar/BinaryStarReactorImpl.java
[ "public interface BinaryStarReactor {\n /**\n * We send state information this often. If peer doesn't respond in two heartbeats, it is 'dead'.\n */\n long BSTAR_HEARTBEAT = 1000;\n\n /**\n * Startup modes.\n */\n enum Mode {\n /**\n * Primary node.\n */\n PR...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.zeromq.api.BinaryStarReactor; import org.zeromq.api.LoopHandler; import org.zeromq.api.Message; import org.zeromq.api.Pollable; import org.zeromq.api.PollerType; import org.zeromq.api.Reactor; import org.zeromq.api.Socket; import org.zeromq.api.SocketT...
* * @param heartbeatInterval The heartbeat interval, in milliseconds */ @Override public void setHeartbeatInterval(long heartbeatInterval) { this.heartbeatInterval = heartbeatInterval; } private void updatePeerExpiry() { peerExpiry = System.currentTimeMillis() + heartbeat...
statePub.send(new Message(String.valueOf(state.ordinal())));
2
tang-jie/AvatarMQ
src/com/newlandframework/avatarmq/consumer/AvatarMQConsumer.java
[ "public interface AvatarMQAction {\n\n void start();\n\n void init();\n\n void shutdown();\n}", "public class MessageIdGenerator {\n\n public static final int StrategyUUID = 0;\n public static final int StrategyRandomDigital = 1;\n\n private int strategy = StrategyRandomDigital;\n private fin...
import com.google.common.base.Joiner; import com.newlandframework.avatarmq.core.AvatarMQAction; import com.newlandframework.avatarmq.core.MessageIdGenerator; import com.newlandframework.avatarmq.core.MessageSystemConfig; import com.newlandframework.avatarmq.model.MessageType; import com.newlandframework.avatarmq.model....
/** * 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...
request.setMsgType(MessageType.AvatarMQUnsubscribe);
3
JosuaKrause/BusVisPublic
src/main/java/infovis/data/csv/CSVBusDataReader.java
[ "public final class BusDataBuilder implements BusStationEnumerator {\n\n /** Maps the external bus station ids to the internal ones. */\n private final Map<String, Integer> idMap = new HashMap<String, Integer>();\n /** Maps a line id to a bus line. */\n private final Map<String, BusLine> lineMap = new HashMap<S...
import static infovis.data.BusDataBuilder.*; import static java.lang.Double.*; import static java.lang.Integer.*; import infovis.data.BusDataBuilder; import infovis.data.BusDataReader; import infovis.data.BusLine; import infovis.data.BusTime; import infovis.util.ChangeAwareProperties; import infovis.util.Resource; impo...
package infovis.data.csv; /** * Reading transit data in CSV format specified in <code>readme.md</code>. * * @author Joschi <josua.krause@googlemail.com> */ public class CSVBusDataReader implements BusDataReader { /** The replacement value for unknown abstract positions. */ public static final String UNKNO...
public BusDataBuilder read(final Resource r) throws IOException {
1
domkowald/tagrecommender
src/processing/LanguageModelCalculator.java
[ "public class PredictionFileWriter {\r\n\r\n\tprivate static final int OUTPUT_LIMIT = 10;\r\n\t\r\n\tprivate BookmarkReader reader;\r\n\tprivate List<int[]> results;\r\n\r\n\t\r\n\tpublic PredictionFileWriter(BookmarkReader reader, List<int[]> results) {\r\n\t\tthis.reader = reader;\r\n\t\tthis.results = results;\r...
import file.BookmarkReader; import file.BookmarkSplitter; import common.DoubleMapComparator; import common.UserData; import common.Utilities; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.concurrent.TimeUnit;...
/* TagRecommender: A framework to implement and evaluate algorithms for the recommendation of tags. Copyright (C) 2013 Dominik Kowald This program 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 Founda...
Map<Integer, Double> sortedResultMap = new TreeMap<Integer, Double>(new DoubleMapComparator(resultMap));
3
angelozerr/eclipse-wtp-webresources
org.eclipse.a.wst.html.webresources.core/src/org/eclipse/wst/html/webresources/internal/core/providers/PreferencesWebResourcesProvider.java
[ "public enum WebResourceType {\r\n\r\n\tcss, js, img;\r\n\r\n\tpublic static WebResourceType get(String value) {\r\n\t\tWebResourceType[] types = WebResourceType.values();\r\n\t\tWebResourceType type;\r\n\t\tfor (int i = 0; i < types.length; i++) {\r\n\t\t\ttype = types[i];\r\n\t\t\tif (type.name().equalsIgnoreCase...
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.ProjectScope; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Platfor...
/** * Copyright (c) 2013-2014 Angelo ZERR. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributor...
return WebResourcesCorePlugin.getDefault().getBundle()
1
integeruser/jgltut
src/integeruser/jgltut/tut12/LightManager.java
[ "public interface Bufferable {\n ByteBuffer get(ByteBuffer buffer);\n\n default ByteBuffer getAndFlip(ByteBuffer buffer) {\n buffer.clear();\n get(buffer);\n buffer.flip();\n return buffer;\n }\n}", "public class LightBlock implements Bufferable {\n public static final int ...
import integeruser.jgltut.commons.Bufferable; import integeruser.jgltut.commons.LightBlock; import integeruser.jgltut.commons.PerLight; import integeruser.jgltut.framework.Interpolators.ConstVelLinearInterpolatorVec3; import integeruser.jgltut.framework.Interpolators.WeightedLinearInterpolatorFloat; import integeruser....
} } static class SunlightValueHDR { float normTime; Vector4f ambient; Vector4f sunlightIntensity; Vector4f backgroundColor; float maxIntensity; SunlightValueHDR(float normTime, Vector4f ambient, Vector4f sunlightIntensity, Vector4f backgroundColor, ...
LightBlock getLightInformation(Matrix4f worldToCameraMat) {
1
VanetSim/VanetSim
src/vanetsim/gui/controlpanels/EditTrafficLightsControlPanel.java
[ "public final class Renderer{\r\n\r\n\t/** The only instance of this class (singleton). */\r\n\tprivate static final Renderer INSTANCE = new Renderer();\r\n\r\n\t/**\r\n\t * Gets the single instance of this renderer.\r\n\t * \r\n\t * @return single instance of this renderer\r\n\t */\r\n\tpublic static Renderer getI...
import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import j...
/* * VANETsim open source project - http://www.vanet-simulator.org * Copyright (C) 2008 - 2013 Andreas Tomandl, Florian Scheuer, Bernhard Gruber * * 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 Fou...
switchSignalState_ = ButtonCreator.getJButton("addTrafficLight.png", "switchTrafficLight", Messages.getString("EditTrafficLightsControlPanel.addTrafficLight"), this);
1
patrickfav/density-converter
src/test/java/at/favre/tools/dconvert/test/IOSConverterTest.java
[ "public class Arguments implements Serializable {\n private static final long serialVersionUID = 7;\n\n public static final float DEFAULT_SCALE = 3f;\n public static final float DEFAULT_COMPRESSION_QUALITY = 0.9f;\n public static final int DEFAULT_THREAD_COUNT = 4;\n public static final int MAX_THREA...
import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import at.favre.tools.dconvert.arg.Arguments; import at.favre.tools.dconvert.arg.EOutputCompressionMode; import at.favre....
/* * Copyright (C) 2016 Patrick Favre-Bulle * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
List<PostfixDescriptor> densityDescriptors = IOSConverter.getIosDescriptors();
4
ailab-uniud/distiller-CORE
src/main/java/it/uniud/ailab/dcore/io/GenericSheetPrinter.java
[ "public class Blackboard {\r\n\r\n /**\r\n * The default document identifier.\r\n */\r\n private static final String DEFAULT_DOCUMENT_ID = \"DocumentRoot\";\r\n\r\n /**\r\n * The full raw text of the document.\r\n */\r\n private String rawText;\r\n\r\n /**\r\n * The root block of ...
import it.uniud.ailab.dcore.Blackboard; import it.uniud.ailab.dcore.annotation.Annotable; import it.uniud.ailab.dcore.annotation.Annotation; import it.uniud.ailab.dcore.persistence.*; import it.uniud.ailab.dcore.utils.DocumentUtils; import it.uniud.ailab.dcore.utils.Either; import it.uniud.ailab.dcore.utils.Either.Left...
/* * Copyright (C) 2015 Artificial Intelligence * Laboratory @ University of Udine. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option...
private List<Map<String, Either<String, Number>>> rows;
4
segator/proxylive
src/main/java/com/github/segator/proxylive/tasks/StreamProcessorsSession.java
[ "public class ProxyLiveUtils {\n\n private static Pattern pattern = Pattern.compile(\"^(tvh|hls|dash)(s)?:\\\\/\\\\/(.+)$\");\n public static String getOS() {\n\n String OS = System.getProperty(\"os.name\").toLowerCase();\n\n if (OS.contains(\"win\")) {\n return \"win\";\n } el...
import com.github.segator.proxylive.ProxyLiveUtils; import com.github.segator.proxylive.controller.StreamController; import com.github.segator.proxylive.entity.ClientInfo; import com.github.segator.proxylive.entity.GEOInfo; import com.github.segator.proxylive.processor.DirectHLSTranscoderStreamProcessor; import com.git...
/* * The MIT License * * Copyright 2017 Isaac Aymerich <isaac.aymerich@gmail.com>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation t...
public synchronized DirectHLSTranscoderStreamProcessor getHLSStream(String clientIdentifier, String channel, String profile) {
4
kontalk/desktopclient-java
src/main/java/org/kontalk/model/chat/Chat.java
[ "public interface Searchable {\n boolean contains(String string);\n}", "public final class Contact extends Observable implements Searchable {\n private static final Logger LOGGER = Logger.getLogger(Contact.class.getName());\n\n /**\n * Online status of one contact.\n */\n public enum Online {U...
import java.awt.Color; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Observable; import java.util.Observer; import java.util.Optional; import java.util.logging.Level; imp...
/* * Kontalk Java client * Copyright (C) 2016 Kontalk Devteam <devteam@kontalk.org> * * 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 ...
mID = Model.database().execInsert(TABLE, values);
2
aleven/jpec-server
src/main/java/it/attocchi/jpec/server/api/rest/ResourceMessaggi.java
[ "@XmlRootElement\npublic class NuovoMessaggioRequest {\n\n\tprivate String mailbox;\n\tprivate String protocollo;\n\tprivate String urlDocumentale;\n\n\tprivate List<String> destinatari;\n\tprivate List<String> destinatariCC;\n\tprivate List<String> destinatariCCN;\n\tprivate String oggetto;\n\tprivate String testo...
import it.attocchi.jpa2.JpaController; import it.attocchi.jpec.server.api.rest.data.NuovoMessaggioRequest; import it.attocchi.jpec.server.api.rest.data.NuovoMessaggioResponse; import it.attocchi.jpec.server.bl.MessaggioPecBL; import it.attocchi.jpec.server.entities.AllegatoPec; import it.attocchi.jpec.server.entities.M...
package it.attocchi.jpec.server.api.rest; @Api(value = "Messaggi") @Path("/messaggi") public class ResourceMessaggi extends RestBaseJpa2 { protected static final Logger logger = LoggerFactory.getLogger(ResourceMessaggi.class); @ApiOperation(value = "/messaggi", notes = "dati di un messaggio") @ApiResponses(...
@ApiResponse(code = 200, message = "success", response = MessaggioPec.class),
3
restsql/restsql
src/org/restsql/core/impl/AbstractSqlBuilder.java
[ "public interface Request {\n\tpublic static final String PARAM_NAME_LIMIT = \"_limit\";\n\tpublic static final String PARAM_NAME_OFFSET = \"_offset\";\n\tpublic static final String PARAM_NAME_OUTPUT = \"_output\";\n\n\t/** Returns children CUD requests to a single parent for a hierarchical SQL Resource. */\n\tpubl...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.restsql.core.ColumnMetaData; import org.restsql.core.InvalidRequestException; import org.restsql.core.Request; import org.restsql.core.Request.Type; import org.restsql.core.RequestValue; import org.restsql.core...
/* Copyright (c) restSQL Project Contributors. Licensed under MIT. */ package org.restsql.core.impl; /** * Builds SQL for an operation on a SQL Resource. * * @author Mark Sawers */ public abstract class AbstractSqlBuilder implements SqlBuilder { private static final int DEFAULT_DELETE_SIZE = 100; private sta...
final List<RequestValue> requestParams, final Map<String, SqlStruct> sqls, final boolean doParent)
2
xwang1024/SIF-Resource-Explorer
src/main/java/me/xwang1024/sifResExplorer/controller/UnitsBoxController.java
[ "public class Unit {\r\n\tprivate int id;\r\n\tprivate int unitNo;\r\n\tprivate String name;\r\n\tprivate String eponym;\r\n\tprivate Card[] card; // normal, idolize normal, idolize rankMax, idolize\r\n\t\t\t\t\t\t\t// bondMax, idolize doubleMax\r\n\tprivate String[] avatar; // normal, idolize\r\n\tprivate String[]...
import java.awt.image.BufferedImage; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.sql.SQLException; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import javax.imageio.ImageIO; import javafx.beans.value.ChangeListener; impo...
private ComboBox<String> leaderSkillTypeBox; @FXML private TextField searchTf; @FXML private TableView<UnitLine> unitsTable; private ChangeListener<Boolean> listener = new ChangeListener<Boolean>() { public void changed(ObservableValue<? extends Boolean> ov, Boolean t, Boolean t1) { refreshSelectSta...
chooser.setInitialDirectory(ApplicationContext.tracedFile);
1
yuanmomo/maven-archetype
framework-init/src/main/java/net/yuanmomo/framework/controller/mybatis/DemoController.java
[ "public class Demo implements Serializable {\n /**\n * This field was generated by MyBatis Generator.\n * This field corresponds to the database column demo.id\n *\n * @mbggenerated\n */\n private Long id;\n\n /**\n * This field was generated by MyBatis Generator.\n * This field...
import com.alibaba.fastjson.JSON; import java.util.List; import net.yuanmomo.framework.bean.Demo; import net.yuanmomo.framework.bean.DemoParam; import net.yuanmomo.framework.business.mybatis.DemoBusiness; import net.yuanmomo.util.CollectionUtil; import net.yuanmomo.util.exception.BaseException; import net.yuanmomo.util...
package net.yuanmomo.framework.controller.mybatis; @Controller @RequestMapping("/demo/jsp/") public class DemoController { /** * This field was generated by MyBatis Generator. * This field corresponds to the database table demo * * @mbggenerated */ private static Logger logger = Logge...
} catch (BaseException e1) {
4
searchisko/structured-content-tools
src/test/java/org/jboss/elasticsearch/tools/content/IsDateInRangePreprocessorTest.java
[ "protected static final String CFG_CHECKED_DATE = \"checked_date\";", "protected static final String CFG_DEFAULT_DATE_FORMAT = \"yyyy-MM-dd'T'HH:mm:ss.SSSXX\";", "protected static final String CFG_LEFT_DATE = \"left_date\";", "protected static final String CFG_RESULT_FIELD = \"result_field\";", "protected s...
import static org.jboss.elasticsearch.tools.content.IsDateInRangePreprocessor.CFG_CHECKED_DATE; import static org.jboss.elasticsearch.tools.content.IsDateInRangePreprocessor.CFG_DEFAULT_DATE_FORMAT; import static org.jboss.elasticsearch.tools.content.IsDateInRangePreprocessor.CFG_LEFT_DATE; import static org.jboss.elas...
/* * JBoss, Home of Professional Open Source * Copyright 2012 Red Hat Inc. and/or its affiliates and other contributors * as indicated by the @authors tag. All rights reserved. */ package org.jboss.elasticsearch.tools.content; /** * Unit tests for {@link IsDateInRangePreprocessor}. * * @author Ryszard Kozm...
"Missing or empty 'settings/"+CFG_RESULT_FIELD+"' configuration value for 'Test mapper' preprocessor",
3
jenkinsci/tikal-multijob-plugin
src/main/java/com/tikal/jenkins/plugins/multijob/views/MultiJobView.java
[ "@ExportedBean(defaultVisibility = 999)\r\npublic class MultiJobBuild extends Build<MultiJobProject, MultiJobBuild> {\r\n\r\n private List<SubBuild> subBuilds;\r\n private MultiJobChangeLogSet changeSets = new MultiJobChangeLogSet(this);\r\n private Map<String, SubBuild> subBuildsMap = new HashMap<String, ...
import hudson.Extension; import hudson.Indenter; import hudson.Util; import hudson.model.*; import hudson.model.Descriptor.FormException; import hudson.tasks.BuildStep; import hudson.tasks.Builder; import hudson.util.DescribableList; import hudson.util.FormValidation; import hudson.util.RunList; import hudson.views.Lis...
package com.tikal.jenkins.plugins.multijob.views; public class MultiJobView extends ListView { @DataBoundConstructor public MultiJobView(String name) { super(name); } public MultiJobView(String name, ViewGroup owner) { super(name, owner); } @Extension public static fi...
if (builder instanceof MultiJobBuilder) {
2
MizzleDK/Mizuu
app/src/main/java/com/miz/utils/TvShowDatabaseUtils.java
[ "public class DbAdapterTvShowEpisodeMappings extends AbstractDbAdapter {\n\n\tpublic static final String KEY_FILEPATH = \"filepath\";\n\tpublic static final String KEY_SHOW_ID = \"show_id\";\n\tpublic static final String KEY_SEASON = \"season\";\n\tpublic static final String KEY_EPISODE = \"episode\";\n\tpublic sta...
import java.util.ArrayList; import java.util.List; import android.content.Context; import android.database.Cursor; import android.widget.Toast; import com.miz.apis.trakt.Trakt; import com.miz.db.DbAdapterTvShowEpisodeMappings; import com.miz.db.DbAdapterTvShowEpisodes; import com.miz.db.DbAdapterTvShows; import com.miz...
/* * Copyright (C) 2014 Michell Bak * * 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...
DbAdapterTvShowEpisodeMappings episodeMappingsAdapter = MizuuApplication.getTvShowEpisodeMappingsDbAdapter();
0
HancelParallelZero/hancel_android
app/src/main/java/org/parallelzero/hancel/Fragments/ContactsRingFragment.java
[ "public class Config {\n\n\tpublic static final boolean DEBUG=true; // ==> R E V I S A R P A R A T I E N D A S //\n\tpublic static final boolean DEBUG_SERVICE = true;\n\tpublic static final boolean DEBUG_LOCATION = false;\n\tpublic static final boolean DEBUG_TASKS = true;\n\tpublic static final boolean DEBUG_M...
import android.os.Bundle; import androidx.fragment.app.DialogFragment; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.ItemTouchHelper; import android.util.Log; import android.view.LayoutInflater; import android.view.View; impo...
package org.parallelzero.hancel.Fragments; /** * Created by Antonio Vanegas @hpsaturn on 11/5/15. */ public class ContactsRingFragment extends DialogFragment { public static final String TAG = ContactsRingFragment.class.getSimpleName();
private static final boolean DEBUG = Config.DEBUG;
0
excelsior-oss/excelsior-jet-api
src/main/java/com/excelsiorjet/api/tasks/TestRunTask.java
[ "public class ExcelsiorJet {\n\n private final JetHome jetHome;\n private final Log logger;\n\n private JetEdition edition;\n private OS targetOS;\n private CpuArch targetCpu;\n\n public ExcelsiorJet(JetHome jetHome, Log logger) throws JetHomeException {\n this.jetHome = jetHome;\n t...
import com.excelsiorjet.api.ExcelsiorJet; import com.excelsiorjet.api.cmd.CmdLineToolException; import com.excelsiorjet.api.tasks.config.compiler.ExecProfilesConfig; import com.excelsiorjet.api.tasks.config.packagefile.PackageFile; import com.excelsiorjet.api.tasks.config.ApplicationType; import com.excelsiorjet.api.ut...
/* * Copyright (c) 2016-2017, Excelsior LLC. * * This file is part of Excelsior JET API. * * Excelsior JET API 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...
logger.info(Txt.s("TestRunTask.Start.Info", cmdLine));
7
sumeetchhetri/gatf
plugin/src/main/java/com/gatf/generator/core/GatfTestGeneratorMojo.java
[ "public interface GatfPlugin {\r\n\tvoid doExecute(GatfPluginConfig configuration, List<String> files) throws Exception;\r\n\tvoid setProject(Object project);\r\n\tvoid shutdown();\r\n\tvoid initilaizeContext(GatfExecutorConfig configuration, boolean flag) throws Exception;\r\n\tAcceptanceTestContext getContext();\...
import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Set; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annota...
testGenerator.setPostmanCollectionVersion(getPostmanCollectionVersion()); testGenerator.setOverrideSecure(isOverrideSecure()); Thread currentThread = Thread.currentThread(); ClassLoader oldClassLoader = currentThread.getContextClassLoader(); try { currentThre...
public GatfSelDebugger debugSeleniumTest(GatfExecutorConfig configuration, String selscript, String configPath) {
7
pdsoftplan/zap-maven-plugin
zap-client-api/src/main/java/br/com/softplan/security/zap/api/ZapClient.java
[ "public interface Analyzer {\n\n\t/**\n\t * Runs an analysis of the given target and generates the report. \n\t * \n\t * @param analysisInfo the information about the analysis to be executed.\n\t * @return the report of the analysis.\n\t */\n\tZapReport analyze(AnalysisInfo analysisInfo);\n}", "public final class...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import br.com.softplan.security.zap.api.analysis.Analyzer; import br.com.softplan.security.zap.api.analysis.AnalyzerFactory; import br.com.softplan.security.zap.api.authentication.AuthenticationHandler; import br.com.softplan.security.zap.api.authentication.Authe...
package br.com.softplan.security.zap.api; /** * The main client for starting a ZAP analysis. * * @author pdsec */ public class ZapClient { private String apiKey; private ClientApi api; private AuthenticationHandler authenticationHandler; private SessionManager sessionManager; private static final Logg...
public ZapClient(ZapInfo zapInfo, AuthenticationInfo authenticationInfo) {
5
wotateam/wota
src/wota/ai/bonnmath/Scholze.java
[ "public abstract class AntAI extends AI{\t\t\n\t// Note [Visibility]\n\t/*\n\t * Everything which is intended to be used by the AI writer should be protected\n\t * and come first in this file, to aid someone reading through this file to learn \n\t * how the game works.\n\t * Everything else should not be protected,...
import wota.gamemaster.AIInformation; import wota.gameobjects.AntAI; import wota.gameobjects.Caste; import wota.gameobjects.Sugar; import wota.gameobjects.Hill; import wota.utility.SeededRandomizer; import wota.ai.bonnmath.*; import java.util.LinkedList; import java.util.List; import wota.utility.Modulo; import wota.ut...
/** * */ package wota.ai.bonnmath; /* <-- change this to de.wota.ai.YOURNAME * make sure your file is in the folder /de/wota/ai/YOURNAME * and has the same name as the class (change TemplateAI to * the name of your choice) */ /** * Put a describtion of you AI here. */ @...
for(Sugar sugar : visibleSugar){
2
fhopf/lucene-solr-talk
web/src/main/java/de/fhopf/lucenesolrtalk/web/SearchService.java
[ "public class ElasticsearchHealthCheck extends HealthCheck {\n private final Client client;\n\n public ElasticsearchHealthCheck(Client client) {\n super(\"Elasticsearch\");\n this.client = client;\n }\n \n @Override\n protected Result check() throws Exception {\n ClusterHealth...
import com.yammer.dropwizard.Service; import com.yammer.dropwizard.bundles.AssetsBundle; import com.yammer.dropwizard.config.Environment; import com.yammer.dropwizard.views.ViewBundle; import de.fhopf.lucenesolrtalk.web.elasticsearch.ElasticsearchHealthCheck; import de.fhopf.lucenesolrtalk.web.elasticsearch.Elasticsear...
package de.fhopf.lucenesolrtalk.web; public class SearchService extends Service<SearchConfiguration> { public SearchService() { super("search"); addBundle(new ViewBundle()); addBundle(new AssetsBundle()); } @Override protected void initialize(SearchConfiguration searchConfigu...
environment.addHealthCheck(new SolrHealthCheck(server));
5
codebling/VFSJFileChooser2
src/net/sf/vfsjfilechooser/accessories/bookmarks/BookmarksEditorPanel.java
[ "public class Credentials\n{\n private int port = -1;\n private String username = \"\";\n private char[] password = new char[0];\n private String hostname = \"\";\n private String protocol = \"\";\n private String defaulRemotetPath = \"\";\n\n /**\n * Create new credentials\n * @param h...
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Component; import java.awt.FlowLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.FocusAdapter; im...
/* * * Copyright (C) 2008-2009 Yves Zoundi * Copyright (C) 2008-2009 Stan Love * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENS...
JOptionPane.showMessageDialog(null,VFSResources.getMessage("VFSFileChooser.errBADURI"));
4
shreaker/V2I-Traffic-Light-Demonstrator
Android_App/Traffic_Light/src/main/java/hauptseminar/hm/edu/trafficlight/app/activity/PriorityTab.java
[ "public final class R {\n public static final class anim {\n public static final int abc_fade_in=0x7f050000;\n public static final int abc_fade_out=0x7f050001;\n public static final int abc_grow_fade_in_from_bottom=0x7f050002;\n public static final int abc_popup_enter=0x7f050003;\n ...
import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageButton; import android.widget.TextView; import hauptseminar.hm.edu.trafficlight.R; import hauptseminar.hm.edu...
package hauptseminar.hm.edu.trafficlight.app.activity; /** * Created by shreaker on 27.11.16. */ public class PriorityTab extends Fragment implements View.OnClickListener { private static final int HTTP_CODE_OK = 200; View view; @Override public View onCreateView(LayoutInflater inflater, View...
view = inflater.inflate(R.layout.priority_tab_view, container, false);
0
loganj/foursquared
main/src/com/joelapenna/foursquared/PingsSettingsActivity.java
[ "public class Foursquare {\n private static final Logger LOG = Logger.getLogger(\"com.joelapenna.foursquare\");\n public static final boolean DEBUG = true;\n public static final boolean PARSER_DEBUG = false;\n\n public static final String FOURSQUARE_API_DOMAIN = \"api.foursquare.com\";\n\n public sta...
import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.types.Settings; import com.joelapenna.foursquare.types.User; import com.joelapenna.foursquared.app.PingsService; import com.joelapenna.foursquared.location.LocationUtils; import com.joelapenna.foursquared.preferences.Preferences; import com.j...
@Override public void onNothingSelected(AdapterView<?> arg0) { } }); setIntervalSpinnerFromSettings(); mCheckBoxVibrate = (CheckBox)findViewById(R.id.pings_vibrate); mCheckBoxVibrate.setChecked(mPrefs.getBoolean(Preferences.PREFERENCE_PINGS_VI...
private void onPostTaskUserUpdate(User user, Exception reason) {
2
noctarius/snowcast
src/main/java/com/noctarius/snowcast/impl/operations/DestroySequencerDefinitionOperation.java
[ "public class NodeSequencerService\n implements SequencerService, ManagedService, MigrationAwareService, RemoteService,\n EventPublishingService<Object, Object> {\n\n private static final MethodType FUTURE_GET_TYPE = MethodType.methodType(Object.class);\n private static final MethodTy...
import com.hazelcast.instance.MemberImpl; import com.hazelcast.spi.BackupAwareOperation; import com.hazelcast.spi.EventRegistration; import com.hazelcast.spi.NodeEngine; import com.hazelcast.spi.Operation; import com.hazelcast.spi.OperationService; import com.noctarius.snowcast.impl.NodeSequencerService; import com.noc...
/* * Copyright (c) 2015-2017, Christoph Engelbert (aka noctarius) and * contributors. 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/li...
ClientDestroySequencerNotification notification = new ClientDestroySequencerNotification(sequencerName);
3
wso2/maven-tools
wso2-general-project-plugin/src/main/java/org/wso2/maven/registry/RegistryResourcePOMGenMojo.java
[ "public class FileUtils{\n\n\tprivate static Map<String,ITemporaryFileTag> temporaryTags;\n\t\n\t\n\tpublic FileUtils(){\n\t\tsuper();\n\t}\n\n\tpublic static void copyFile(String src, String dest) throws Exception {\n\t\tInputStream is = null;\n\t\tFileOutputStream fos = null;\n\n\t\ttry\n\t\t{\n\t\t\tis = new Fil...
import org.apache.maven.model.Plugin; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.wso2.developerstudio...
/* * Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
List<RegistryElement> allRegistryItems = mappedRegistryArtifact.getAllRegistryItems();
4
richkmeli/Richkware-Manager-Server
src/main/java/it/richkmeli/rms/web/v2/test/TestController.java
[ "@Entity\npublic class Device {\n @Id\n @NotNull\n @Length(max = 64)\n private String name;\n @NotNull\n @Length(max = 25)\n private String ip;\n @Length(max = 10)\n private String serverPort;\n @Length(max = 25)\n private String lastConnection;\n @Length(max = 32)\n private S...
import it.richkmeli.jframework.auth.data.exception.AuthDatabaseException; import it.richkmeli.jframework.auth.model.User; import it.richkmeli.jframework.auth.model.exception.ModelException; import it.richkmeli.jframework.network.tcp.server.http.util.JServletException; import it.richkmeli.jframework.util.RandomStringGen...
package it.richkmeli.rms.web.v2.test; @RestController public class TestController { TestController() { } public static void loadRandomTest(RMSSession rmsSession) { try { rmsSession.getAuthDatabaseManager().addUser(new User("richk@i.it", "00000000", true)); rmsSession.ge...
rmsSession.getDeviceDatabaseManager().addDevice(new Device("rick2", "43.34.43.34", "40", "20-10-18", "ckeroivervioeon", u1, "start##start##start", "","iid",null,null));
0
TPPIDev/Modpack-Tweaks
src/main/java/modpacktweaks/command/CommandMT.java
[ "@Mod(modid = ModpackTweaks.MODID, name = ModpackTweaks.NAME, version = ModpackTweaks.VERSION, dependencies = ModpackTweaks.DEPEND)\npublic class ModpackTweaks\n{\n public static final String MODID = \"modpackTweaks\";\n public static final String NAME = \"ModpackTweaks\";\n public static final String DEPE...
import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import modpacktweaks.ModpackTweaks; import modpacktweaks.config.ConfigurationHandler; import modpacktweaks.item.ModItems; import modpacktweaks.network.PacketHandl...
package modpacktweaks.command; public class CommandMT extends CommandBase { private static HashMap<String, String> modProperNames = new HashMap<String, String>(); private static HashSet<String> validCommands = new HashSet<String>(); /** First index is list, rest are mod names **/ private static Arra...
PacketHandler.INSTANCE.sendTo(new MessageShowDownloadGUI(), (EntityPlayerMP) player);
4
welovecoding/editorconfig-netbeans
src/main/java/com/welovecoding/nbeditorconfig/mapper/EditorConfigPropertyMapper.java
[ "public class LoggerSettings {\n\n public static final Level OPERATION_LOG_LEVEL = Level.INFO;\n public static final Level PROCESSOR_LOG_LEVEL = Level.INFO;\n public static final Level LISTENER_LOG_LEVEL = Level.INFO;\n public static final Level MAPPER_LOG_LEVEL = Level.INFO;\n\n private LoggerSettings() {\n ...
import com.welovecoding.nbeditorconfig.config.LoggerSettings; import com.welovecoding.nbeditorconfig.io.model.MappedCharset; import com.welovecoding.nbeditorconfig.io.model.SupportedCharsets; import com.welovecoding.nbeditorconfig.model.EditorConfigConstant; import com.welovecoding.nbeditorconfig.model.MappedEditorConf...
package com.welovecoding.nbeditorconfig.mapper; public class EditorConfigPropertyMapper { private static final Logger LOG = Logger.getLogger(EditorConfigPropertyMapper.class.getName()); static { LOG.setLevel(LoggerSettings.MAPPER_LOG_LEVEL); } public static synchronized MappedEditorConfig createEditorC...
EditorConfig ec;
5
oaqa/baseqa
src/main/java/edu/cmu/lti/oaqa/baseqa/eval/calculator/RetrievalEvalCalculator.java
[ "public static double calculateAveragePrecision(List<String> resultArray, Set<String> gsSet) {\n int[] relIndices = IntStream.range(0, resultArray.size())\n .filter(i -> gsSet.contains(resultArray.get(i))).toArray();\n double sumPrec = IntStream.range(0, relIndices.length)\n .mapToDouble(i -> (i...
import static edu.cmu.lti.oaqa.baseqa.eval.EvalCalculatorUtil.calculateAveragePrecision; import static edu.cmu.lti.oaqa.baseqa.eval.EvalCalculatorUtil.calculateF1; import static edu.cmu.lti.oaqa.baseqa.eval.EvalCalculatorUtil.calculatePrecision; import static edu.cmu.lti.oaqa.baseqa.eval.EvalCalculatorUtil.calculateRec...
package edu.cmu.lti.oaqa.baseqa.eval.calculator; public class RetrievalEvalCalculator<T extends SearchResult> extends ConfigurableProvider implements EvalCalculator<T> { @Override
public Map<Measure, Double> calculate(JCas jcas, Collection<T> resultEvaluatees,
7
kinnla/eniac
src/eniac/data/model/sw/GoLights.java
[ "public class EData extends Observable implements Comparable<EData> {\n\n\t// static key indicating that that a repaint is recommended.\n\tpublic static final String REPAINT = \"repaint\"; //$NON-NLS-1$\n\n\tpublic static final String PAINT_IMMEDIATELY = \"paint_immediately\"; //$NON-NLS-1$\n\n\tpublic enum Tag {\n...
import java.util.Observable; import java.util.Observer; import eniac.data.model.EData; import eniac.data.model.parent.Configuration; import eniac.data.model.unit.Unit; import eniac.data.type.EType; import eniac.data.view.EPanel;
/******************************************************************************* * Copyright (c) 2003-2005, 2013 Till Zoppke. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available...
EData goButton = unit.getGarten().getKind(EType.GO_BUTTON, 0);
0
Roanis/atg-tdd
Core/src/main/java/com/roanis/tdd/core/configuration/TestConfiguration.java
[ "public class CatalogTestHelper implements TestHelper {\n\t\n\tprivate CatalogTools mCatalogTools;\n\tprivate String mDefaultCatalogId;\n\t\n\tpublic void defaultCurrentCatalog() throws RepositoryException{\n\t\tsetAsCurrent(getDefaultCatalogId());\n\t}\n\t\n\tpublic void setAsCurrent(String pId) throws RepositoryE...
import com.roanis.tdd.core.commerce.catalog.CatalogTestHelper; import com.roanis.tdd.core.commerce.claimable.ClaimableTestHelper; import com.roanis.tdd.core.commerce.gifts.GiftListTestHelper; import com.roanis.tdd.core.commerce.inventory.InventoryTestHelper; import com.roanis.tdd.core.commerce.order.OrderTestHelper; im...
package com.roanis.tdd.core.configuration; public class TestConfiguration { private ServiceMap mTestHelpers; public ServiceMap getTestHelpers() { return mTestHelpers; } public void setTestHelpers(ServiceMap pTestHelpers) { mTestHelpers = pTestHelpers; } public CatalogTestHelper getCatalogTestHelper...
public ProfileTestHelper getProfileTestHelper(){
8
DaiDongLiang/DSC
src/main/java/net/floodlightcontroller/devicemanager/internal/DeviceManagerImpl.java
[ "public class FloodlightContext {\n\t//一个线程安全的HashMap仓库\n protected ConcurrentHashMap<String, Object> storage =\n new ConcurrentHashMap<String, Object>();\n\n public ConcurrentHashMap<String, Object> getStorage() {\n return storage;\n }\n}", "@JsonSerialize(using=IOFSwitchSerializer.cla...
import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.Date; import java.util.EnumSet; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedL...
@Override public void deviceMoved(IDevice device) { generateDeviceEvent(device, "host-moved"); } @Override public void deviceIPV4AddrChanged(IDevice device) { generateDeviceEvent(device, "host-ipv4-addr-changed"); } @Override public void deviceVlanChanged(IDevice device) { generateDeviceEven...
public void init(FloodlightModuleContext fmc) throws FloodlightModuleException {
2
pokowaka/android-geom
geom/src/main/java/math/geom2d/polygon/LinearRing2D.java
[ "public class AffineTransform2D implements Bijection2D, GeometricObject2D,\r\n Cloneable {\r\n\r\n // coefficients for x coordinate.\r\n protected double m00, m01, m02;\r\n\r\n // coefficients for y coordinate.\r\n protected double m10, m11, m12;\r\n\r\n // ====================================...
import math.geom2d.GeometricObject2D; import math.geom2d.Point2D; import math.geom2d.Shape2D; import math.geom2d.circulinear.CirculinearDomain2D; import math.geom2d.circulinear.CirculinearElement2D; import math.geom2d.circulinear.CirculinearRing2D; import math.geom2d.circulinear.GenericCirculinearDomain2D; impor...
/* file : LinearRing2D.java * * Project : geometry * * =========================================== * * 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 ...
public Collection<LineSegment2D> edges() {
6
aikuma/aikuma
Aikuma/src/org/lp20/aikuma/ui/RecordingLanguageActivity.java
[ "public class FileModel implements Parcelable {\n\n\tprivate static final String TAG = FileModel.class.getSimpleName();\n\t\n\tprivate static final String CLOUD_ID_FORMAT = \"^v\\\\d{2}\\\\/.+\\\\/.+\\\\/.+\\\\/.+$\";\n\t/**\n\t * Suffix of metadata, maaping and transcript\n\t */\n\tprotected static final String M...
import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Toast; import java.io.IOException; import java.util.ArrayList; ...
/* Copyright (C) 2013-2015, The Aikuma Project AUTHORS: Oliver Adams and Florian Hanke */ package org.lp20.aikuma.ui; /** * The activity that allows default languages to be specified. * * @author Oliver Adams <oliver.adams@gmail.com> * @author Florian Hanke <florian.hanke@gmail.com> */ public class Recording...
this.getSharedPreferences(AikumaSettings.getCurrentUserId(), MODE_PRIVATE);
7
Anchormen/sql4es
src/main/java/nl/anchormen/sql4es/ESQueryState.java
[ "public class ESStatement implements Statement {\n\n\tprivate static final SqlParser parser = new SqlParser();\n\tprotected ESConnection connection;\n\t\n\tprotected int queryTimeoutSec = 10;\n\tprotected boolean poolable = true;\n\tprotected boolean closeOnCompletion = false;\n\tprotected ResultSet result;\n\n\tpr...
import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.*; import nl.anchormen.sql4es.model.*; import org.elasticsearch.action.search.SearchRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.client.Client; import org.elasticsearch...
package nl.anchormen.sql4es; /** * This class maintains the state of a {@link ESStatement} and is used interpret SELECT statements, * execute and parse them and keep {@link ResultSet} state while doing so. * * @author cversloot * */ public class ESQueryState{ // relevant resources private final QueryPar...
ParseResult parseResult = parser.parse(sql, query, maxRowsRS, this.statement.getConnection().getClientInfo(), esInfo);
5
zegerhoogeboom/flysystem-java
src/test/java/com/flysystem/core/FilesystemTest.java
[ "public class FileCommands\n{\n\t/**\n\t * Interface to manipulate something from a source to target file.\n\t */\n\tpublic interface ManipulateFileCommand\n\t{\n\t\tvoid execute(File source, File target) throws FlysystemGenericException;\n\t}\n\n\tpublic static class CopyFileCommand implements ManipulateFileComman...
import com.flysystem.core.adapter.local.FileCommands; import com.flysystem.core.exception.FileExistsException; import com.flysystem.core.exception.FileNotFoundException; import com.flysystem.core.exception.FlysystemGenericException; import com.flysystem.core.exception.RootViolationException; import org.hamcrest.CoreMat...
/* * Copyright (c) 2013-2015 Frank de Jonge * * 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,...
@Test(expected = FlysystemGenericException.class)
3
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/controllers/ControllerHelper.java
[ "public class BindingInventory\n extends ObservableObject\n{\n\t/**\n\t * patterns for parsing property chains\n\t */\n\tprivate final static Pattern pathPattern = Pattern.compile(\"(\\\\\\\\|[\\\\.]*)(.+)\");\n\tprivate final static Pattern split = Pattern.compile(\"\\\\.\");\n\n\t//used for determining a range...
import android.widget.Toast; import org.json.JSONException; import org.json.JSONObject; import traction.mvc.observables.BindingInventory; import traction.mvc.implementations.ViewBindingFactory; import traction.mvc.implementations.ViewFactory; import traction.mvc.implementations.ui.menubinding.MenuInflater; import tract...
/* Copyright 2013 Tim Stratton Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing...
private IObjectListener invalidateMenuListener = new IObjectListener()
5
magnetsystems/message-samples-android
RichMessaging/app/src/main/java/com/magnet/messagingsample/activities/ChatActivity.java
[ "public class MessageRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {\n\n private static final int TEXT_TYPE = 0;\n private static final int IMAGE_TYPE = 1;\n private static final int MAP_TYPE = 2;\n private static final int VIDEO_TYPE = 3;\n\n private List<Object> messageI...
import android.app.ActionBar; import android.app.Activity; import android.content.Context; import android.content.CursorLoader; import android.content.Intent; import android.database.Cursor; import android.graphics.Bitmap; import android.net.Uri; import android.os.Parcelable; import android.provider.MediaStore; import ...
etMessage.setText(null); } private void selectImage() { Intent intent = new Intent(this, ImagePickerActivity.class); Config config = new Config.Builder() .setTabBackgroundColor(R.color.white) .setSelectionLimit(1) .build(); ImagePi...
adapter.add(new MessageText(orientation, content));
4
google/agera
extensions/database/src/test/java/com/google/android/agera/database/SqlDatabaseFunctionsTest.java
[ "@NonNull\npublic static <T> Result<T> success(@NonNull final T value) {\n return new Result<>(checkNotNull(value), null);\n}", "@NonNull\npublic static <T> Supplier<T> staticSupplier(@NonNull final T object) {\n return new StaticProducer<>(object);\n}", "@NonNull\npublic static Function<SqlDeleteRequest, Res...
import static android.database.sqlite.SQLiteDatabase.CONFLICT_FAIL; import static android.database.sqlite.SQLiteDatabase.CONFLICT_IGNORE; import static android.database.sqlite.SQLiteDatabase.CONFLICT_NONE; import static android.database.sqlite.SQLiteDatabase.CONFLICT_REPLACE; import static android.database.sqlite.SQLit...
/* * 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(databaseUpdateFunction(databaseSupplier)
5
bhatti/PlexRBAC
src/main/java/com/plexobject/rbac/repository/bdb/SecurityMappingRepositoryImpl.java
[ "@Entity\n@XmlRootElement\npublic class Domain extends PersistentObject implements Validatable,\n Identifiable<String> {\n public static final String DEFAULT_DOMAIN_NAME = Configuration\n .getInstance().getProperty(\"default.domain\", \"default\");\n\n @PrimaryKey\n private String id;\n ...
import java.util.Arrays; import java.util.Collection; import org.apache.commons.validator.GenericValidator; import org.apache.log4j.Logger; import com.plexobject.rbac.domain.Domain; import com.plexobject.rbac.domain.Permission; import com.plexobject.rbac.domain.Role; import com.plexobject.rbac.domain.Subject; import co...
package com.plexobject.rbac.repository.bdb; public class SecurityMappingRepositoryImpl implements SecurityMappingRepository { private static final Logger LOGGER = Logger .getLogger(SecurityMappingRepositoryImpl.class); private final RepositoryFactory repositoryFactory; private final String d...
RoleRepository repository = repositoryFactory.getRoleRepository(domain);
6
damianbrunold/jbead
src/ch/jbead/print/DraftPrinter.java
[ "public class BeadPainter {\n\n private CoordinateCalculator coord;\n private Model model;\n private View view;\n private boolean forceColors = false;\n private boolean drawBorder = true;\n private Font symbolfont;\n\n private static Map<Color, Color> contrastingColors = new HashMap<Color, Colo...
import java.awt.Color; import java.awt.Graphics2D; import java.awt.print.PageFormat; import ch.jbead.BeadPainter; import ch.jbead.Localization; import ch.jbead.Model; import ch.jbead.Point; import ch.jbead.SimpleCoordinateCalculator; import ch.jbead.View; import ch.jbead.ui.SymbolFont; import ch.jbead.util.Convert;
/** jbead - http://www.jbead.ch Copyright (C) 2001-2012 Damian Brunold 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 la...
BeadPainter painter = new BeadPainter(coord, model, view, SymbolFont.getForPrint(gx - 2));
5
NanYoMy/mybatis-generator
src/main/java/org/mybatis/generator/config/Context.java
[ "public class GeneratedXmlFile extends GeneratedFile {\n private Document document;\n\n private String fileName;\n\n private String targetPackage;\n\n private boolean isMergeable;\n \n private XmlFormatter xmlFormatter;\n\n /**\n * \n * @param document\n * @param fileName\n * @p...
import static org.mybatis.generator.internal.util.StringUtility.composeFullyQualifiedTableName; import static org.mybatis.generator.internal.util.StringUtility.isTrue; import static org.mybatis.generator.internal.util.StringUtility.stringHasValue; import static org.mybatis.generator.internal.util.messages.Messages.getS...
public String getIntrospectedColumnImpl() { return introspectedColumnImpl; } public void setIntrospectedColumnImpl(String introspectedColumnImpl) { this.introspectedColumnImpl = introspectedColumnImpl; } // methods related to code generation. // // Methods should be called ...
List<GeneratedXmlFile> generatedXmlFiles, List<String> warnings)
0
pokowaka/android-geom
geom/src/main/java/math/geom2d/polygon/MultiPolygon2D.java
[ "public class AffineTransform2D implements Bijection2D, GeometricObject2D,\r\n Cloneable {\r\n\r\n // coefficients for x coordinate.\r\n protected double m00, m01, m02;\r\n\r\n // coefficients for y coordinate.\r\n protected double m10, m11, m12;\r\n\r\n // ====================================...
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import math.geom2d.AffineTransform2D; import math.geom2d.Box2D; import math.geom2d.GeometricObject2D; import math.geom2d.Point2D; import math.geom2d.circulinear.CirculinearContourArray2D; import math.geom2d.circulinear.Circul...
throw new RuntimeException( "Can not add a vertex to a multipolygon with no ring"); } LinearRing2D ring = rings.get(rings.size() - 1); ring.addVertex(position); } /** * Inserts a vertex at the given position * * @throws RuntimeEx...
return new GenericCirculinearDomain2D(this.boundary().transform(inv)
4
teiid/teiid-embedded-examples
embedded-caching/src/main/java/org/teiid/example/TranslatorResultsCachingExample.java
[ "public class H2PERFTESTClient {\n \n static final String INSERT_SQL = \"insert into PERFTEST values(?, ?, ?, ?)\";\n \n public static final int KB = 1<<10;\n public static final int MB = 1<<20;\n public static final int GB = 1<<30;\n \n public static final String H2_JDBC_DRIVER = \"org.h2.D...
import static org.teiid.example.H2PERFTESTClient.*; import static org.teiid.example.TeiidEmbeddedCaching.println; import static org.teiid.example.TeiidEmbeddedCaching.prompt; import static org.teiid.example.util.JDBCUtils.executeQueryCount; import java.io.IOException; import java.sql.Connection; import java.sql.SQLExce...
/* * Copyright Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags and * the COPYRIGHT.txt file distributed with this work. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ob...
DataSource ds = EmbeddedHelper.newDataSource(H2_JDBC_DRIVER, H2_JDBC_URL, H2_JDBC_USER, H2_JDBC_PASS);
4
kevinmmarlow/Dreamer
app/src/main/java/com/android/fancyblurdemo/app/FlickrRequest.java
[ "public class NetworkResponse {\n /**\n * Creates a new network response.\n * @param statusCode the HTTP status code\n * @param data Response body\n * @param headers Headers returned with this response, or null for none\n * @param notModified True if the server returned a 304 and the data was...
import com.android.fancyblurdemo.volley.NetworkResponse; import com.android.fancyblurdemo.volley.ParseError; import com.android.fancyblurdemo.volley.Response; import com.android.fancyblurdemo.volley.toolbox.HttpHeaderParser; import com.android.fancyblurdemo.volley.toolbox.JsonRequest; import org.json.JSONArray; import ...
package com.android.fancyblurdemo.app; /** * Created by kevin.marlow on 3/20/14. */ public class FlickrRequest extends JsonRequest<List<FlickrPhoto>> { private final String jsonReqsponseWrapper = "jsonFlickrApi("; private final boolean mIsHighRes;
public FlickrRequest(String url, boolean isHighRes, Response.Listener<List<FlickrPhoto>> listener, Response.ErrorListener errorListener) {
2
richardtynan/thornsec
src/core/Main.java
[ "public class OrgsecData extends AData {\n\n\tprivate HashMap<String, NetworkData> networks;\n\n\tpublic OrgsecData() {\n\t\tsuper(\"orgsec\");\n\t}\n\t\n\tpublic void read(JSONObject nets) {\n\t\tnetworks = new HashMap<String, NetworkData>();\n\t\tIterator<?> iter = nets.keySet().iterator();\n\t\twhile (iter.hasNe...
import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import core.data.OrgsecData; import core.model.OrgsecModel; import core.view.BlockingFrame; import core.view.FullFrame; import core.view.SimpleFrame;
package core; public class Main { public static void main(String[] args) throws Exception { String text = new String(Files.readAllBytes(Paths.get(args[0])), StandardCharsets.UTF_8); OrgsecData data = new OrgsecData(); data.read(text); OrgsecModel model = new OrgsecModel(); model.setData(data); if (a...
SimpleFrame sf = new SimpleFrame(model);
4
tomasbjerre/git-changelog-lib
src/main/java/se/bjurr/gitchangelog/api/model/Issue.java
[ "public static <T> T checkNotNull(final T it, final String string) {\n if (it == null) {\n throw new IllegalStateException(string);\n }\n return it;\n}", "public static void checkState(final boolean b, final String string) {\n if (!b) {\n throw new IllegalStateException(string);\n }\n}", "public stat...
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.CUSTOM; import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.GITHUB; import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.GITLAB; import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.JIRA; im...
package se.bjurr.gitchangelog.api.model; public class Issue implements ICommits, IAuthors, Serializable { private static final long serialVersionUID = -7571341639024417199L; private final List<Commit> commits; private final List<Author> authors; /** Like JIRA, or GitHub. */ private final String name; /...
this.title = nullToEmpty(title);
3
CMPUT301F14T14/android-question-answer-app
QuestionApp/src/ca/ualberta/cs/cmput301f14t14/questionapp/AnswerViewActivity.java
[ "public interface Callback<T> {\n\t/**\n\t * Run by the onPostExecute method of a Task\n\t * @param object\n\t */\n\tpublic void run(T object);\n}", "public class ClientData {\n\n\tprivate static final String PREF_SET = \"cs.ualberta.cs.cmput301f14t14.questionapp.prefs\";\n\tprivate static final String VAL_USERNA...
import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.UUID; import ca.ualberta.cs.cmput301f14t14.questionapp.data.Callback; import ca.ualberta.cs.cmput301f14t14.questionapp.data.ClientData; import ca.ualberta.cs.cmput301f14t14.questionapp.data.DataManager; import ca.ualberta.c...
package ca.ualberta.cs.cmput301f14t14.questionapp; public class AnswerViewActivity extends Activity implements AddCommentDialogFragment.AddCommentDialogCallback { private Answer answer = null; private DataManager dataManager = null; private ClientData clientData; String aId = null; /* These need to be class ...
private class UpdateAnswerCallback implements Callback<Answer> {
0
BennSandoval/Woodmin
app/src/main/java/app/bennsandoval/com/woodmin/fragments/ResumeFragment.java
[ "public class MainActivity extends AppCompatActivity implements NavigationDrawerCallbacks {\n\n private NavigationDrawerFragment mNavigationDrawerFragment;\n private CharSequence mTitle;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n ...
import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; import android.support.v4.app.LoaderManager; import android.support.v4.conte...
package app.bennsandoval.com.woodmin.fragments; public class ResumeFragment extends Fragment implements LoaderManager.LoaderCallbacks<Cursor> { private final String LOG_TAG = ResumeFragment.class.getSimpleName(); private static final String ARG_SECTION_NUMBER = "section_number"; private Gson mGson = ...
WoodminSyncAdapter.syncImmediately(getActivity());
8
ArthurHub/Android-Fast-Image-Loader
demo/src/main/java/com/theartofdev/fastimageloaderdemo/instagram/ItemView.java
[ "public class TargetAvatarImageView extends TargetImageView {\n\n //region: Fields and Consts\n\n /**\n * Full AuthorName\n */\n protected String mName;\n\n /**\n * Acronyms, 2 letters will be written as placeholder\n */\n protected String mAcronyms;\n\n /**\n * Calculate backg...
import android.app.Activity; import android.content.Context; import android.graphics.Point; import android.view.Display; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.ImageView; import android.widget.TextView; import com.theartofdev.fastimageloader.tar...
// "Therefore those skilled at the unorthodox // are infinite as heaven and earth, // inexhaustible as the great rivers. // When they come to an end, // they begin again, // like the days and months; // they die and are reborn, // like the four seasons." // // - Sun Tsu, // "The Art of War" package com.theartofdev.fas...
mAvatar.loadAvatar(user.profile_picture, userName, Specs.INSTA_AVATAR);
2
wso2/jaggery
components/hostobjects/org.jaggeryjs.hostobjects.web/src/main/java/org/jaggeryjs/hostobjects/web/WebSocketHostObject.java
[ "public class FileHostObject extends ScriptableObject {\n\n private static final Log log = LogFactory.getLog(FileHostObject.class);\n\n private static final String hostObjectName = \"File\";\n\n public static final String JAVASCRIPT_FILE_MANAGER = \"hostobjects.file.filemanager\";\n\n private static fin...
import org.apache.catalina.websocket.MessageInbound; import org.apache.catalina.websocket.WsOutbound; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.jaggeryjs.hostobjects.file.FileHostObject; import org.jaggeryjs.hostobjects.log.LogHostObject; import org.jaggeryjs.hostob...
package org.jaggeryjs.hostobjects.web; public class WebSocketHostObject extends ScriptableObject { private static final Log log = LogFactory.getLog(WebSocketHostObject.class); private static final String hostObjectName = "WebSocket"; private ContextFactory contextFactory; private MessageInbound i...
asyncContext.addProperty(LogHostObject.LOG_LEVEL, currentContext.getProperty(LogHostObject.LOG_LEVEL));
1
msteindorfer/criterion
src/main/java/io/usethesource/criterion/JmhSetMultimapBenchmarks.java
[ "public static enum DataType {\n MAP, SET_MULTIMAP, SET\n}", "public static enum SampleDataSelection {\n MATCH, RANDOM\n}", "public enum ValueFactoryFactory {\n VF_CLOJURE {\n @Override\n public JmhValueFactory getInstance() {\n return new io.usethesource.criterion.impl.persistent.clojure.ClojureV...
import java.util.Arrays; import java.util.Iterator; import java.util.Random; import java.util.concurrent.TimeUnit; import io.usethesource.criterion.BenchmarkUtils.DataType; import io.usethesource.criterion.BenchmarkUtils.SampleDataSelection; import io.usethesource.criterion.BenchmarkUtils.ValueFactoryFactory; import io...
/** * Copyright (c) Michael Steindorfer <Centrum Wiskunde & Informatica> and Contributors. * All rights reserved. * * This file is licensed under the BSD 2-Clause License, which accompanies this project * and is available under https://opensource.org/licenses/BSD-2-Clause. */ package io.usethesource.criterion; ...
public SampleDataSelection sampleDataSelection;
1
R2RML-api/R2RML-api
r2rml-api-rdf4j-binding/src/test/java/rdf4jTest/N3Syntax_Test.java
[ "public class RDF4JR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static RDF4JR2RMLMappingManager INSTANCE = new RDF4JR2RMLMappingManager(new RDF4J());\n\n private RDF4JR2RMLMappingManager(RDF4J rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod...
import java.io.InputStream; import java.util.Collection; import java.util.Iterator; import eu.optique.r2rml.api.binding.rdf4j.RDF4JR2RMLMappingManager; import eu.optique.r2rml.api.model.impl.SQLBaseTableOrViewImpl; import org.apache.commons.rdf.api.IRI; import org.junit.Assert; import org.junit.Test; import org...
/******************************************************************************* * Copyright 2013, the Optique Consortium * 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...
Iterator<ObjectMap> omit=pom.getObjectMaps().iterator();
3
scrutmydocs/scrutmydocs
src/main/java/org/scrutmydocs/webapp/api/document/facade/DocumentApi.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 DocumentApi extends CommonBaseApi {
2
nukc/ApkMultiChannelPlugin
src/com/github/nukc/plugin/axml/ChannelEditor.java
[ "public class AXMLDoc {\n\tprivate final int MAGIC_NUMBER = 0X00080003;\n\tprivate final int CHUNK_STRING_BLOCK = 0X001C0001;\n\tprivate final int CHUNK_RESOURCE_ID = 0X00080180;\n\tprivate final int CHUNK_XML_TREE = 0X00100100;\n\t\n\tprivate final String MANIFEST \t = \"manifest\";\n\tprivate final String APPLICA...
import com.github.nukc.plugin.axml.decode.AXMLDoc; import com.github.nukc.plugin.axml.decode.BTagNode; import com.github.nukc.plugin.axml.decode.BTagNode.Attribute; import com.github.nukc.plugin.axml.decode.BXMLNode; import com.github.nukc.plugin.axml.decode.StringBlock; import com.github.nukc.plugin.axml.utils.TypedVa...
package com.github.nukc.plugin.axml; public class ChannelEditor { private final String NAME_SPACE = "http://schemas.android.com/apk/res/android"; private final String META_DATA = "meta-data"; private final String NAME = "name"; private final String VALUE = "value"; private final String UMENG_CHAN...
BXMLNode application = doc.getApplicationNode(); //manifest node
3
ktisha/Crucible4IDEA
src/com/jetbrains/crucible/ui/toolWindow/details/CommentForm.java
[ "@State(name = \"CrucibleSettings\",\n storages = {\n @Storage(file = \"$APP_CONFIG$\" + \"/crucibleConnector.xml\")\n }\n)\npublic class CrucibleSettings implements PersistentStateComponent<CrucibleSettings> {\n public String SERVER_URL = \"\";\n public String USERNAME = \"\";\n\n @Override\...
import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.SpellCheckingEditorCustomizationProvider; import com.intellij.openapi.fileTypes.PlainTextLanguage; import com.intellij.openapi.project.Project...
package com.jetbrains.crucible.ui.toolWindow.details; /** * User: ktisha */ public class CommentForm extends JPanel { private static final int ourBalloonWidth = 350; private static final int ourBalloonHeight = 200; private final EditorTextField myReviewTextField; private JBPopup myBalloon; private Edit...
final Comment addedComment = CrucibleManager.getInstance(myProject).postComment(comment, myGeneral, myReview.getPermaId());
1
asrulhadi/wap
src/java/org/homeunix/wap/CodeInjection/OutputAnalysisCodeInj.java
[ "public class LinesToCorrect {\n String nameFile;\n Map<Integer, String> MapLinesToCorrect;\n Map<Integer, String[]> MapLinesToCorrectArray;\n\n \n public LinesToCorrect (String filename){\n this.nameFile = filename;\n MapLinesToCorrect = new LinkedHashMap<Integer, String>();\n }\n\n...
import org.homeunix.wap.utils.LinesToCorrect; import org.homeunix.wap.utils.GlobalDataApp; import org.homeunix.wap.utils.ManageFiles; import org.homeunix.wap.table.tainted.ListVulners; import org.homeunix.wap.table.tainted.Vulner; import org.homeunix.wap.table.symbol.SymbolTable; import org.homeunix.wap.table.symbol.Me...
outFile.write(" - Number of vulnerable files: " + GlobalDataCodeInj.MainListVulners.size()+"\n"); outFile.write(" - List of vulnerable files:\n"); } for(Iterator <ListVulners> it = GlobalDataCodeInj.MainListVulners.values().iterator(); it.hasNext();...
Vulner v;
4
jenkinsci/scm-sync-configuration-plugin
src/test/java/hudson/plugins/scm_sync_configuration/data/V0_0_2CompatibilityTest.java
[ "public class ScmSyncConfigurationPlugin extends Plugin{\n\n public static final transient ScmSyncStrategy[] AVAILABLE_STRATEGIES = new ScmSyncStrategy[]{\n new JenkinsConfigScmSyncStrategy(),\n new BasicPluginsConfigScmSyncStrategy(),\n new JobConfigScmSyncStrategy(),\n new UserConfi...
import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; import static org.junit.Assert.assertThat; import static org.mockito.Matchers.notNull; import static org.powermock.api.mockito.PowerMockito.doNothing; import static or...
package hudson.plugins.scm_sync_configuration.data; @PrepareForTest(SaveableListener.class) public class V0_0_2CompatibilityTest extends ScmSyncConfigurationPluginBaseTest { public V0_0_2CompatibilityTest() { super(new ScmUnderTestSubversion()); } protected String getHudsonRootBaseTemplate() { ...
ScmSyncConfigurationPlugin plugin = ScmSyncConfigurationPlugin.getInstance();
0
forax/jigsaw-jrtfs
src/jdk/internal/jimage/ImageFile.java
[ "public interface Consumer<T> {\n public void accept(T element);\n}", "public interface Function<T, U> {\n public U apply(T element);\n}", "public class Collectors {\n public static <T, K, V> Collector<T, ?, Map<K,V>> toMap(Function<? super T, ? extends K> keyMapper,\n ...
import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.OutputStream; import java.nio.ByteOrder; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; import java.util.HashMap; import java.util.Ha...
/* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Softwa...
ModuleIndex mindex = modules.buildModuleIndex(l, writer);
4
MarWoes/viper
src/main/java/de/imi/marw/viper/api/routes/FilterRoutes.java
[ "public class ViperServerConfig {\n\n private String analysisFile = \"/tmp/analysis/file\";\n private int viperPort = 8090;\n private int igvPort = 9090;\n private char csvDelimiter = ';';\n private String collectionDelimiter = \",\";\n private boolean enableGrouping = true;\n private int break...
import java.util.List; import spark.Request; import spark.Response; import static spark.Spark.get; import static spark.Spark.post; import com.google.gson.Gson; import com.google.gson.JsonObject; import de.imi.marw.viper.api.ViperServerConfig; import de.imi.marw.viper.variants.VariantCallFilter; import de.imi.marw.viper...
/* Copyright (c) 2017 Marius Wöste * * This file is part of VIPER. * * VIPER is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * ...
public FilterRoutes(VariantTableCluster cluster, Gson gson, ViperServerConfig config) {
0
groupon/Selenium-Grid-Extras
SeleniumGridExtras/src/main/java/com/groupon/seleniumgridextras/grid/GridStarter.java
[ "public class Config {\n\n public static final String ACTIVATE_MODULES = \"active_modules\";\n public static final String DISABLED_MODULES = \"disabled_modules\";\n public static final String SETUP = \"setup\";\n public static final String TEAR_DOWN = \"tear_down\";\n public static final String GRID ...
import com.google.gson.JsonObject; import com.groupon.seleniumgridextras.ExecuteCommand; import com.groupon.seleniumgridextras.config.Config; import com.groupon.seleniumgridextras.config.GridNode; import com.groupon.seleniumgridextras.config.GridNode.GridNodeConfiguration; import com.groupon.seleniumgridextras.config.R...
return ExecuteCommand.execRuntime(command.toArray(new String[0]), false); } public static List<List<String>> getStartCommandsForNodes(Boolean isWindows, Config config) { List<List<String>> commands = new LinkedList<List<String>>(); List<String> configFiles = RuntimeConfig.getConfig().getNodeConfig...
GridNodeConfiguration config = GridNode.loadFromFile(configFile, false).getConfiguration();
2
mikroskeem/Shuriken
classloader/src/test/java/eu/mikroskeem/test/shuriken/classloader/TestClassLoader.java
[ "public class ShurikenClassLoader extends URLClassLoader {\n private final Map<String, Class<?>> classes = new HashMap<>();\n\n public ShurikenClassLoader(URL[] urls) {\n super(urls);\n }\n\n public ShurikenClassLoader(URL[] urls, ClassLoader parent) {\n super(urls, parent);\n }\n\n ...
import eu.mikroskeem.shuriken.classloader.ShurikenClassLoader; import eu.mikroskeem.shuriken.common.ToURL; import eu.mikroskeem.shuriken.reflect.ClassWrapper; import eu.mikroskeem.shuriken.reflect.FieldWrapper; import eu.mikroskeem.shuriken.reflect.Reflect; import org.junit.jupiter.api.Assertions; import org.junit.jupi...
package eu.mikroskeem.test.shuriken.classloader; /** * {@link ShurikenClassLoader} unit tests * * @author Mark Vainomaa */ public class TestClassLoader { @Test @SuppressWarnings("unchecked") public void testClassLoader() throws Exception { BrotliLibraryLoader.loadBrotli(); String clas...
URL[] urls = new URL[]{ToURL.to(testJar)};
1
lkorth/auto-fi
app/src/main/java/com/lukekorth/auto_fi/services/VpnService.java
[ "public class MainActivity extends AppCompatActivity {\n\n private static final int START_VPN = 1;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!hasCompletedIntro()) {\n startActivity(new Intent(this, AppIntroAct...
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.net.wifi.WifiManager; import android.os.Build; import android.support.annotation.MainThread; imp...
package com.lukekorth.auto_fi.services; public class VpnService extends android.net.VpnService implements VpnServiceInterface { public static final String DISCONNECT_VPN_INTENT_ACTION = "com.lukekorth.auto_fi.DISCONNECT_VPN"; public static final String VPN_STATUS_NOTIFICATION_CHANNEL = "vpn_status_notifica...
private Vpn mVpn;
1
Lzw2016/fastdfs-java-client
src/main/java/org/cleverframe/fastdfs/mapper/FieldMateData.java
[ "public final class OtherConstants {\n /**\n * for overwrite all old metadata\n */\n public static final byte STORAGE_SET_METADATA_FLAG_OVERWRITE = 'O';\n\n /**\n * for replace, insert when the meta item not exist, otherwise update it\n */\n public static final byte STORAGE_SET_METADATA_...
import org.cleverframe.fastdfs.constant.OtherConstants; import org.cleverframe.fastdfs.exception.FastDfsColumnMapException; import org.cleverframe.fastdfs.model.MateData; import org.cleverframe.fastdfs.utils.BytesUtil; import org.cleverframe.fastdfs.utils.MetadataMapperUtils; import org.cleverframe.fastdfs.utils.Reflec...
package org.cleverframe.fastdfs.mapper; /** * 属性映射MateData定义 * 作者:LiZW <br/> * 创建时间:2016/11/20 1:48 <br/> */ public class FieldMateData { /** * 列 */ private Field field; /** * 列索引 */ private int index; /** * 单元最大长度 */ private int max; /** * 单元长度 ...
return OtherConstants.FDFS_PROTO_PKG_LEN_SIZE;
0
zsoltk/GameOfLife
app/src/main/java/hu/supercluster/gameoflife/game/cellularautomaton/GameOfLife.java
[ "public interface CellFactory<T extends Cell> extends Serializable {\n T create(int x, int y);\n int[] flatten(T cell);\n T inflate(int[] flattened);\n}", "public class SimpleCell implements Cell {\n static final AtomicLong NEXT_ID = new AtomicLong(0);\n final long id = NEXT_ID.getAndIncrement();\n...
import android.os.Parcel; import hu.supercluster.gameoflife.game.cell.CellFactory; import hu.supercluster.gameoflife.game.cell.SimpleCell; import hu.supercluster.gameoflife.game.cell.SimpleCellFactory; import hu.supercluster.gameoflife.game.rule.ConwaysRule; import hu.supercluster.gameoflife.game.rule.Rule;
package hu.supercluster.gameoflife.game.cellularautomaton; public class GameOfLife extends AbstractCellularAutomaton<SimpleCell> { public GameOfLife(int gridSizeX, int gridSizeY) { super(gridSizeX, gridSizeY); } public GameOfLife(Parcel source) { super(source); } @Override
protected CellFactory<SimpleCell> getFactory() {
0
redsolution/bst
bst/src/main/java/ru/redsolution/bst/ui/DocumentActivity.java
[ "public class BST extends Application {\n\n\tprivate static final String HOST_URL = \"https://online.moysklad.ru\";\n\tprivate static final String IMPORT_URL = HOST_URL\n\t\t\t+ \"/exchange/rest/ms/xml/%s/list?start=%d&count=%d\";\n\tprivate static final String INVENTORY_URL = HOST_URL\n\t\t\t+ \"/exchange/rest/ms/...
import cz.msebera.android.httpclient.auth.AuthenticationException; import ru.redsolution.bst.R; import ru.redsolution.bst.data.BST; import ru.redsolution.bst.data.DocumentType; import ru.redsolution.bst.data.InternalServerException; import ru.redsolution.bst.data.OperationListener; import ru.redsolution.bst.data.table....
/** * Copyright (c) 2013, Redsolution LTD. All rights reserved. * * This file is part of Barcode Scanner Terminal project; * you can redistribute it and/or modify it under the terms of * * Barcode Scanner Terminal is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the imp...
OperationListener {
3
NickstaDB/BaRMIe
src/nb/barmie/modes/enumeration/EnumerationTask.java
[ "public abstract class DeserPayload {\n\t/*******************\n\t * Constants\n\t ******************/\n\tprotected final String REMEDIATION_NO_FIX = \"No fix currently available. Consider removing the library from the CLASSPATH of the RMI service.\";\n\t\n\t/*******************\n\t * Properties\n\t ****************...
import java.net.InetSocketAddress; import java.net.Socket; import java.rmi.NoSuchObjectException; import java.util.ArrayList; import java.util.Collections; import nb.barmie.modes.attack.DeserPayload; import nb.barmie.modes.attack.DeserPayloadFactory; import nb.barmie.modes.attack.RMIAttack; import nb.barmie.modes.attac...
package nb.barmie.modes.enumeration; /*********************************************************** * Task object which enumerates a single RMI registry * target before printing out full details. * * Written by Nicky Bloor (@NickstaDB). **********************************************************/ public class Enum...
deserPayloads = DeserPayloadFactory.findGadgetsForEndpoint(ep);
1
wakarimasenco/ChanExplorer
src/co/wakarimasen/chanexplorer/ThreadFragment.java
[ "public class Board {\n\t\n\tprivate boolean worksafe;\n\tprivate String id;\n\tprivate String name;\n\tprivate Category category;\n\t\n\tpublic static final List<Category> categories = new ArrayList<Category>();\n\tpublic static final List<Board> boards = new ArrayList<Board>();\n\t\n\tstatic {\n\t\tCategory favor...
import java.io.FileNotFoundException; import java.io.IOException; import java.net.MalformedURLException; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; import android.app.Notification; import android.app.Not...
startActivity(browserIntent); mContextPostView.setOnCreateContextMenuListener(null); mContextPostView = null; return true; } else if (item.getGroupId() == 2 && mContextPostView != null) { gotoPost(getBoard(), getThreadId(), mContextPostView.getPost() .getReplies().get(item.getItemId()), true, fals...
Post[] posts = Parser.parse(data, false, mIgnore, maxReplies, mTheme.green_text);
1
antest1/kcanotify
app/src/main/java/com/antest1/kcanotify/KcaApiData.java
[ "public final class KcaConstants {\n public final static String KC_PACKAGE_NAME = \"com.dmm.dmmlabo.kancolle\";\n public final static String DMMLOGIN_PACKAGE_NAME = \"com.dmm.app.store\";\n public final static String MAINACTIVITY_NAME = \"com.antest1.kcanotify.MainActivity\";\n public final static Strin...
import android.content.Context; import android.content.res.AssetManager; import android.os.Bundle; import android.os.Handler; import android.os.Message; import androidx.core.content.ContextCompat; import android.util.Log; import android.widget.Toast; import com.google.common.io.ByteStreams; import com.google.gson.JsonA...
if (kcShipTranslationData.has(name)) { name = kcShipTranslationData.get(name).getAsString(); } if (abbr) { for (Map.Entry<String, JsonElement> entry : kcShipAbbrData.entrySet()) { if (name.startsWith(entry.getKey())) { name = name.rep...
locale = getResourceLocaleCode(locale);
4
TechshinoEyeKey/android_sdk
app/src/main/java/com/techshino/eyekeydemo/activity/IndexActivity.java
[ "public class CustomUtil {\n\n private static final String TAG = CustomUtil.class.getSimpleName();\n\n private static CustomUtil sInstance = null;\n private Context mContext;\n RenderScript mRenderScript;\n ScriptIntrinsicYuvToRGB mIntrinsicYuvToRGB;\n\n private CustomUtil(Context context) {\n mContext = c...
import android.app.ProgressDialog; import android.content.Intent; import android.net.Uri; import android.support.design.widget.CoordinatorLayout; import android.support.v7.app.AlertDialog; import android.support.v7.widget.Toolbar; import android.text.Editable; import android.widget.EditText; import android.widget.TextV...
package com.techshino.eyekeydemo.activity; /** * Created by wangzhi on 2015/12/25. * <p> * 首页 */ public class IndexActivity extends BaseAppcompatActivity { private static final String TAG = IndexActivity.class.getSimpleName(); private static final String OFFCIAL_WEB_URL = "http://www.eyekey.com"; priva...
builder.setMessage(CustomUtil.getString(this, R.string.text_delete_confirm))
0
Multiplayer-italia/AuthMe-Reloaded
src/main/java/uk/org/whoami/authme/commands/RegisterCommand.java
[ "public class Utils {\r\n //private Settings settings = Settings.getInstance();\r\n private Player player;\r\n private String currentGroup;\r\n private static Utils singleton;\r\n private String unLoggedGroup = Settings.getUnloggedinGroup;\r\n /* \r\n public Utils(Player player) {\r\n t...
import uk.org.whoami.authme.cache.limbo.LimboPlayer; import uk.org.whoami.authme.datasource.DataSource; import uk.org.whoami.authme.security.PasswordSecurity; import uk.org.whoami.authme.settings.Messages; import uk.org.whoami.authme.settings.Settings; import java.security.NoSuchAlgorithmException; import java.ut...
/* * Copyright 2011 Sebastian Köhler <sebkoehler@whoami.org.uk>. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unle...
hash = PasswordSecurity.getHash(Settings.getPasswordHash, args[0]);
5
rhritz/kyberia-haiku
app/models/feeds/Tags.java
[ "@Entity(\"Feed\")\npublic class Feed extends MongoEntity{\n\n public static DBCollection dbcol = null;\n private static final String key = \"feed_\";\n\n protected String name;\n protected ObjectId owner;\n protected List<ObjectId> nodes;\n protected Int...
import com.mongodb.DBCursor; import java.util.List; import java.util.Map; import play.Logger; import play.mvc.Http.Request; import play.mvc.Scope.RenderArgs; import play.mvc.Scope.Session; import models.Feed; import models.Page; import models.Tag; import models.User; import plugins.MongoDB;
/* Kyberia Haiku - advanced community web application Copyright (C) 2010 Robert Hritz This program 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, o...
public void init(Page page) {
1
neowu/frontend-demo-project
website/src/main/java/app/web/controller/AccountAJAXWebServiceImpl.java
[ "public interface AccountAJAXWebService {\n @PUT\n @Path(\"/ajax/login\")\n LoginAJAXResponse login(LoginAJAXRequest request);\n\n @PUT\n @Path(\"/ajax/logout\")\n void logout();\n\n @GET\n @Path(\"/ajax/currentUser\")\n CurrentUserAJAXResponse currentUser();\n}", "public class CurrentU...
import app.api.AccountAJAXWebService; import app.api.user.CurrentUserAJAXResponse; import app.api.user.LoginAJAXRequest; import app.api.user.LoginAJAXResponse; import app.web.Sessions; import app.web.session.LoginUser; import core.framework.inject.Inject; import core.framework.web.WebContext;
package app.web.controller; /** * @author neo */ public class AccountAJAXWebServiceImpl implements AccountAJAXWebService { @Inject WebContext context; @Override
public LoginAJAXResponse login(LoginAJAXRequest request) {
3
idega/com.idega.block.importer
src/java/com/idega/block/importer/business/ImportBusinessBean.java
[ "public interface ImportFile{\n\n public Collection getRecords();\n public Object getNextRecord(); \n public ArrayList getValuesFromRecordString(String recordString);\n public String getValueAtIndexFromRecordString(int index, String recordString);\n public void setFile(File file);\n public String getEmptyValu...
import java.io.BufferedInputStream; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.rmi.RemoteException; import java.sql.SQLException; import java...
package com.idega.block.importer.business; /** * <p> * Title: IdegaWeb classes * </p> * <p> * Description: * </p> * <p> * Copyright: Copyright (c) 2002 * </p> * <p> * Company: Idega Software * </p> * * @author <a href="mailto:eiki@idega.is"> Eirikur Sveinn Hrafnsson</a> * @version 1.0 */ public c...
col = ((ImportFileClassHome) this.getIDOHome(ImportFileClass.class)).findAllImportFileClasses();
2
jenshadlich/s3srv
src/main/java/de/jeha/s3srv/resources/S3OperationsFacade.java
[ "public class RequestContext {\n\n private final boolean pathStyle;\n private final String bucket;\n private final String key;\n\n private RequestContext(boolean pathStyle, String bucket, String key) {\n this.pathStyle = pathStyle;\n this.bucket = bucket;\n this.key = key;\n }\n\...
import com.codahale.metrics.annotation.Timed; import de.jeha.s3srv.common.s3.RequestContext; import de.jeha.s3srv.operations.buckets.*; import de.jeha.s3srv.operations.objects.CreateObject; import de.jeha.s3srv.operations.objects.DeleteObject; import de.jeha.s3srv.operations.objects.ExistsObject; import de.jeha.s3srv.o...
package de.jeha.s3srv.resources; /** * @author jenshadlich@googlemail.com */ @Path("/") public class S3OperationsFacade { private static final Logger LOG = LoggerFactory.getLogger(S3OperationsFacade.class);
private final StorageBackend storageBackend;
6
guillaume-alvarez/ShapeOfThingsThatWere
core/src/com/galvarez/ttw/model/DestinationSystem.java
[ "public enum State {\n NONE, WAR, TREATY, PROTECTORATE, TRIBUTE;\n}", "@Wire\npublic final class NotificationsSystem extends VoidEntitySystem {\n\n private static final Comparator<Notification> INFO_FIRST = new Comparator<Notification>() {\n @Override\n public int compare(Notification o1, Notification o2)...
import com.artemis.Aspect; import com.artemis.ComponentMapper; import com.artemis.Entity; import com.artemis.EntitySystem; import com.artemis.annotations.Wire; import com.artemis.utils.ImmutableBag; import com.galvarez.ttw.model.DiplomaticSystem.State; import com.galvarez.ttw.model.components.*; import com.galvarez.ttw...
package com.galvarez.ttw.model; /** * Moves the entities having a {@link Destination} across the map. * * @author Guillaume Alvarez */ @Wire public final class DestinationSystem extends EntitySystem { private static final Logger log = LoggerFactory.getLogger(DestinationSystem.class); private ComponentM...
private final OverworldScreen screen;
3
wso2/carbon-business-process
components/bpel/org.wso2.carbon.bpel/src/main/java/org/wso2/carbon/bpel/core/ode/integration/store/TenantProcessStoreImpl.java
[ "public final class BPELConstants {\n private BPELConstants() {\n }\n\n public static final String BPEL_PKG_CONFIG_NS = \"http://wso2.org/bps/bpel/package/config\";\n\n public static final String BPS_CONFIG_NS = \"http://wso2.org/bps/config\";\n\n public static final String ENDPOINTREF = \"endpointRe...
import org.apache.axis2.context.ConfigurationContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.ode.bpel.compiler.api.CompilationException; import org.apache.ode.bpel.dd.DeployDocument; import org.apache.ode.bpel.dd.TAnalyticsServerProfiles; import org.apache...
log.info("Deployed BPEL process: " + bpelArchive.getName() + " in a slave node "); // No need to execute further as we have taken care of retiring the older versions and // activating the last version, hence return return; }...
if (instanceCount > BPELServerImpl.getInstance().getBpelServerConfiguration().getBpelInstanceDeletionLimit()) {
2
wildex999/TickDynamic
src/main/java/com/wildex999/tickdynamic/listinject/ListManager.java
[ "public class TickDynamicConfig {\n\t\n\tpublic static void loadConfig(TickDynamicMod mod, boolean groups) {\n\t\t//mod.config.load();\n \tmod.config = new Configuration(mod.config.getConfigFile());\n\t\t\n \t//--GENERAL CONFIG--\n\t\tmod.config.getCategory(\"general\");\n\t\tmod.config.setCategoryComment(\"g...
import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Queue; import java.util.Set; import org.apache.commons.lang3.N...
package com.wildex999.tickdynamic.listinject; /* * Written by: Wildex999 * * Overrides ArrayList to act as an replacement for loadedEntityList and loadedTileEntityList. */ public class ListManager implements List<EntityObject> { protected World world; protected TickDynamicMod mod; protected EntityType ent...
TickDynamicConfig.loadGroups(mod, "worlds.dim" + world.provider.dimensionId);
0
iChun/Sync
src/main/java/me/ichun/mods/sync/common/core/ProxyCommon.java
[ "@Mod(modid = Sync.MOD_ID, name = Sync.MOD_NAME,\n version = Sync.VERSION,\n certificateFingerprint = iChunUtil.CERT_FINGERPRINT,\n guiFactory = iChunUtil.GUI_CONFIG_FACTORY,\n dependencies = \"required-after:ichunutil@[\" + iChunUtil.VERSION_MAJOR + \".2.0,\" + (iChunUtil.VERSION_MAJOR ...
import me.ichun.mods.ichunutil.common.core.network.PacketChannel; import me.ichun.mods.ichunutil.common.item.ItemGeneric; import me.ichun.mods.sync.common.Sync; import me.ichun.mods.sync.common.block.BlockDualVertical; import me.ichun.mods.sync.common.block.EnumType; import me.ichun.mods.sync.common.creativetab.Creativ...
package me.ichun.mods.sync.common.core; public class ProxyCommon { public void preInitMod() { Sync.creativeTabSync = new CreativeTabSync();
Sync.blockDualVertical = (new BlockDualVertical()).setRegistryName("sync", "block_multi").setLightLevel(0.5F).setHardness(2.0F).setTranslationKey("sync.block.multi");
1
baratine/auction
src/test/java/examples/auction/AuctionUserSessionWebTest.java
[ "class UserInitData\n{\n private String user;\n private String password;\n\n private boolean isAdmin;\n\n public UserInitData()\n {\n }\n\n public UserInitData(String user, String password, boolean isAdmin)\n {\n this.user = user;\n this.password = password;\n this.isAdmin = isAdmin;\n }\n\n publ...
import java.io.IOException; import java.util.Arrays; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import io.baratine.web.ServiceWebSocket; import io.baratine.web.WebSocket; import com.caucho.junit.ConfigurationBaratine; import com.caucho.junit.HttpClient; import com.caucho.j...
package examples.auction; @RunWith(WebRunnerBaratine.class) @ServiceTest(UserVault.class) @ServiceTest(AuctionVault.class) @ServiceTest(AuctionUserSessionImpl.class) @ServiceTest(AuditServiceImpl.class) @ServiceTest(AuctionSettlementVault.class) @ServiceTest(MockPayPal.class) @ConfigurationBaratine(workDir = "/tmp...
.body(new WebBid(auction, bid))
3
dpr-odoo/trainee-om-shop
app/src/main/java/com/odoo/core/service/OSyncAdapter.java
[ "public class IrModel extends OModel {\n public static final String TAG = IrModel.class.getSimpleName();\n public static String AUTHORITY = App.APPLICATION_ID + \".core.provider.content.sync.ir_model\";\n OColumn name = new OColumn(\"Model Description\", OVarchar.class).setSize(100);\n OColumn model = n...
import android.accounts.Account; import android.content.AbstractThreadedSyncAdapter; import android.content.ContentProviderClient; import android.content.Context; import android.content.SyncResult; import android.os.Bundle; import android.util.Log; import com.odoo.App; import com.odoo.R; import com.odoo.base.addons.ir....
// If model allowed to delete record on server if (model.allowDeleteRecordOnServer()) { removeRecordOnServer(model); } // If model allowed to delete server removed record from local database if (model.allowDeleteRecordInLocal()) { ...
ResCompany company = new ResCompany(context);
1
kevinKaiF/cango
cango-example/src/main/java/com/bella/cango/example/MainClass.java
[ "public class CangoClient {\n final String suffixRequestUrl = \".htm\";\n final Charset UTF_8 = Charset.forName(\"UTF-8\");\n private String host;\n private int port;\n private String appName;\n private String appPath;\n\n public CangoClient(String host, int port, String appName) {\n thi...
import com.bella.cango.client.CangoClient; import com.bella.cango.client.RequestCommand; import com.bella.cango.dto.CangoRequestDto; import com.bella.cango.dto.CangoResponseDto; import com.bella.cango.enums.DbType; import java.io.IOException; import java.util.HashSet;
package com.bella.cango.example; /** * TODO * * @author kevin * @date 2016/9/27 */ public class MainClass { public static void main(String[] args) { try { String cangoHost = "localhost"; int cangoPort = 8080; String cangoAppName = "cango"; CangoClient ...
CangoRequestDto cangoRequestDto = new CangoRequestDto()
2