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
Spedge/hangar
hangar-api/src/test/java/com/spedge/hangar/testutils/TestStorage.java
[ "public abstract class IndexArtifact implements Serializable\n{\n private static final long serialVersionUID = -5720959937441417671L;\n private String location;\n\n public IndexArtifact(String location)\n {\n this.location = location;\n }\n\n public String getLocation()\n {\n retu...
import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.StreamingOutput; import com.codahale.metrics.health.HealthCheck; import com.spedge.hangar.index....
package com.spedge.hangar.testutils; public class TestStorage implements IStorage { private Map<String, String> fakeStorage; public TestStorage() { fakeStorage = new HashMap<String, String>(); } public HealthCheck getHealthcheck() { return null; } public IndexArtifact generateArtifactPath(JavaIndex...
public IndexArtifact getIndexArtifact(IndexKey key, String uploadPath) throws IndexException
1
dvanherbergen/robotframework-formslibrary
src/main/java/org/robotframework/formslibrary/keyword/LWWindowKeywords.java
[ "public class ContextOperator {\r\n\r\n\tprivate Container context;\r\n\r\n\t/**\r\n\t * Initialize a context operator for the current context.\r\n\t */\r\n\tpublic ContextOperator() {\r\n\t\tthis(FormsContext.getContext());\r\n\t}\r\n\r\n\t/**\r\n\t * Initialize a context operator for the given context.\r\n\t */\r...
import java.util.List; import org.robotframework.formslibrary.operator.ContextOperator; import org.robotframework.formslibrary.operator.FrameOperator; import org.robotframework.formslibrary.operator.LWWindowOperator; import org.robotframework.formslibrary.operator.OracleEngineOperator; import org.robotframework.fo...
package org.robotframework.formslibrary.keyword; @RobotKeywords public class LWWindowKeywords { @RobotKeyword("List Window Titles.\n\nLogs the open window titles.\n\nExample:\n| List Window Titles |\n") public List<String> listWindowTitles() { List<String> result = new LWWindowOperator().getWindowTit...
return new ContextOperator().capture(targetDirectory);
0
citysearch/web-widgets
src/main/java/com/citysearch/webwidget/facade/InsiderPagesNearByPlacesFacade.java
[ "public class HouseAd {\n private String title;\n private String tagLine;\n private String destinationUrl;\n private String imageURL;\n private String trackingUrl;\n private String displayUrl;\n\n public String getTrackingUrl() {\n return trackingUrl;\n }\n\n public void setTrackin...
import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.TreeSet; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import com.citysearch.webwidget.bean.HouseAd; import com.citysearch.webwidget.bean.NearbyPlace; import com.citysearch.webwidget.bean.NearbyPlaces...
package com.citysearch.webwidget.facade; public class InsiderPagesNearByPlacesFacade extends AbstractNearByPlacesFacade { private Logger log = Logger.getLogger(getClass()); protected InsiderPagesNearByPlacesFacade(String contextPath, int displaySize) { super(contextPath, displaySize); } pu...
ProfileHelper phelper = new ProfileHelper(getContextPath());
7
SolraBizna/jarm
src/name/bizna/ocarmsim/gdb/GDBDebugger.java
[ "public final class BusErrorException extends Exception {\n\n\tprivate static final long serialVersionUID = 1;\n\n\tprivate final String reason;\n\tprivate final long address;\n\tprivate final AccessType accessType;\n\n\tpublic BusErrorException(String reason, long address, AccessType accessType) {\n\t\tsuper(Strin...
import java.awt.event.ActionEvent; import java.io.IOException; import java.net.ServerSocket; import java.util.concurrent.atomic.AtomicBoolean; import javax.swing.AbstractAction; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JPanel; import name.bizna.jarm.BusErrorException; import name.bi...
case 12: case 13: case 14: return toHex(swapEndian(cpu.readRegister(register)), 4); case 15: return toHex(swapEndian(cpu.readCurrentPC()), 4); case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: // TODO: check! return new StringBuilder() .app...
} catch (BusErrorException ex) {
0
HumBuch/HumBuch
src/main/java/de/dhbw/humbuch/util/CSVHandler.java
[ "public final class SubjectHandler {\n\t\n\tpublic static Set<Subject> createProfile(String[] languageInformation, String religionInformation){\n\t\tSet<Subject> subjectSet = new LinkedHashSet<Subject>();\n\t\tfor(int i = 0; i < languageInformation.length; i++){\n\t\t\tif(languageInformation[i].equals(\"E\")){\n\t\...
import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util...
* If the name of a header in the csv changes, the new name can be mapped in the properties file. As a result, * changes of csv headers can be adopted easily without the need of touching the code. * Also, the properties file enables the program to handle csv files even in case the order of the header fields * ch...
Set<Subject> subjectSet = SubjectHandler.createProfile(foreignLanguage, religion);
0
hyounesy/ChAsE
src/org/sfu/chase/core/ChaseOp.java
[ "public class ClustFramework\n{\n private Table m_Table;\n private Table m_UnNormTable;\n private GroupInfo[] m_Groups; \n private int[] m_GroupOrder;\n private ClustInfo m_RootClustInfo;\n \n private String[] m_RegionNames;\n private int m_MaxRegionSize = ...
import java.awt.event.ActionEvent; import java.io.File; import org.sfu.chase.core.ClustFramework; import org.sfu.chase.gui.PChasePainter; import org.sfu.chase.input.DataModel; import org.sfu.chase.input.InputDialog; import org.sfu.chase.util.UpdateManager; import still.data.MemoryTable; import still.data.Operator; impo...
package org.sfu.chase.core; public class ChaseOp extends BasicOp { private static final long serialVersionUID = 5118434778904392340L; public ClustFramework m_Framework; private static String m_gffFilePath;// = "/Users/hyounesy/SFU/Research/BioVis/data/Brad/Allenhancers_nopromok4me3.gff"; // "/U...
super(new MemoryTable(dataModel.getDataTable().getData(), null), true);
5
terzerm/hover-raft
src/main/java/org/tools4j/hoverraft/command/Command.java
[ "public interface DirectPayload {\n\n int byteLength();\n\n int offset();\n\n DirectBuffer readBufferOrNull();\n\n MutableDirectBuffer writeBufferOrNull();\n\n void wrap(DirectBuffer buffer, int offset);\n\n void wrap(MutableDirectBuffer buffer, int offset);\n\n void unwrap();\n\n default bo...
import org.tools4j.hoverraft.direct.DirectPayload; import org.tools4j.hoverraft.event.Event; import org.tools4j.hoverraft.event.EventHandler; import org.tools4j.hoverraft.server.ServerContext; import org.tools4j.hoverraft.state.Transition;
/** * The MIT License (MIT) * * Copyright (c) 2016-2017 hover-raft (tools4j), Marco Terzer * * 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 limi...
default Transition accept(final ServerContext serverContext, final EventHandler eventHandler) {
4
MindscapeHQ/raygun4android
provider/src/main/java/com/raygun/raygun4android/RaygunClient.java
[ "public class RaygunLogger {\n\n public static void d(String string) {\n if (string != null) {\n Timber.tag(RaygunSettings.LOGGING_TAG).d(string);\n }\n }\n\n public static void i(String string) {\n if (string != null) {\n Timber.tag(RaygunSettings.LOGGING_TAG).i(...
import android.app.Activity; import android.app.Application; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.os.Bundle; import com.raygun.raygun4android.logging.RaygunLogger; import com.raygun.raygun4android.logging.TimberRaygunLoggerIm...
package com.raygun.raygun4android; /** * The official Raygun provider for Android. This is the main class that provides functionality for * automatically sending exceptions to the Raygun service. * * You should call init() on the static RaygunClient instance, passing in the application, instead * of instantiat...
TimberRaygunLoggerImplementation.init();
1
finmath/finmath-experiments
src/main/java/net/finmath/experiments/montecarlo/assetderivativevaluation/BlackScholesMonteCarloValuationTest.java
[ "public class EuropeanOption2 extends AbstractAssetMonteCarloProduct {\n\n\tprivate final double maturity;\n\tprivate final double strike;\n\n\t/**\n\t * Construct a product representing an European option on an asset S (where S the asset with index 0 from the model - single asset case).\n\t *\n\t * @param strike T...
import static org.junit.Assert.assertTrue; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.text.DecimalFormat; import java.util.HashMap; import java.util.Map; import org.junit.Test; import net.finmath.exception.CalculationException; import net.finmath.experiments...
final DecimalFormat numberFormatDeviation = new DecimalFormat(" 0.00E00; -0.00E00"); final double initialValue = blackScholesModel.getAssetValue(0.0, 0).get(0); final double riskFreeRate = blackScholesModel.getModel().getRiskFreeRate().doubleValue(); final double volatility = blackScholesModel.getModel().getV...
final EuropeanOptionGammaLikelihood callOptionGammaLikelihood = new EuropeanOptionGammaLikelihood(optionMaturity, optionStrike);
3
TalkingData/Myna
Android/lib-Myna/src/main/java/com/talkingdata/myna/RandomForestClassifier.java
[ "public class Feature {\n private int batchSize;\n private SensorFeature feature;\n\n public Feature() {\n feature = new SensorFeature();\n batchSize = 0;\n }\n\n /**\n * Get selected feature\n * @return selected feature\n */\n public SensorFeature getSelectedFeatures(){\...
import com.talkingdata.myna.sensor.Feature; import com.talkingdata.myna.sensor.SensorData; import com.talkingdata.myna.sensor.SensorFeature; import com.talkingdata.myna.tools.Utils; import org.json.JSONArray; import org.json.JSONObject; import java.util.Iterator; import dice.data.Instance; import dice.data.Instances; i...
package com.talkingdata.myna; public class RandomForestClassifier implements ClassifierInterface { private int attrSize = 0; private int labelNum = 0; private int maxS = 0; private Node[] trees = null;
private CBRRDTModel model;
7
Multiplayer-italia/AuthMe-Reloaded
src/main/java/uk/org/whoami/authme/commands/ChangePasswordCommand.java
[ "public class PlayerAuth {\r\n\r\n private String nickname;\r\n private String hash;\r\n private String ip;\r\n private long lastLogin;\r\n private int x,y,z;\r\n private String salt = \"\";\r\n private String vBhash = null;\r\n private int groupId;\r\n\r\n public PlayerAuth(String nickna...
import java.security.NoSuchAlgorithmException; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import uk.org.whoami.authme.ConsoleLogger; import uk.org.whoami.authme.cache.auth.PlayerAuth; import uk.org.whoami...
/* * 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...
PlayerAuth auth = PlayerCache.getInstance().getAuth(name);
0
kstenschke/referencer-plugin
src/com/kstenschke/referencer/referencers/goTo/GoToReferencerPatterns.java
[ "public class Preferences {\n\n /* @NonNls = element is not a string requiring internationalization and it does not contain such strings. */\n @NonNls\n private static final String PROPERTY_GOTO_LIST_BOOKMARKS = \"PluginReferencer.GotoListBookmarks\";\n @NonNls\n private static final String PROPERTY...
import com.intellij.openapi.editor.Document; import com.kstenschke.referencer.Preferences; import com.kstenschke.referencer.parsers.ParserPattern; import com.kstenschke.referencer.resources.StaticTexts; import com.kstenschke.referencer.utils.UtilsArray; import com.kstenschke.referencer.utils.UtilsString; import java.ut...
/* * Copyright Kay Stenschke * * 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 writ...
return Preferences.getGoToPatterns().length() > 0;
0
dingwpmz/Mycat-Demo
src/main/java/persistent/prestige/modules/eshop/service/impl/OrderServiceImpl.java
[ "@Repository(\"orderDao\")\r\n@MybatisScan\r\npublic interface OrderDao extends Dao<Order, java.lang.Integer> {\r\n\r\n\tList<OrderVo> findVos(@Param(\"buyUid\") String buyUid,\r\n\t\t\t@Param(\"start\") Integer start, @Param(\"end\") Integer end);\r\n\r\n}\r", "@Repository(\"orderItemDao\")\r\n@MybatisScan\r\npu...
import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import persistent.prestige.modules.eshop.dao.OrderD...
/* * Powered By agile * Web Site: http://www.agile.com * Since 2008 - 2016 */ package persistent.prestige.modules.eshop.service.impl; /** * Order service实现类 * @author 雅居乐 2016-8-27 10:27:01 * @version 1.0 */ @Service("orderService") public class OrderServiceImpl implements OrderService{ ...
private SkuDao skuDao;
2
dmtan90/Sense-Hub-Android-Things
app/src/main/java/com/agrhub/sensehub/components/connector/Rm3Connector.java
[ "public enum AirConditionerCmd {\r\n AIR_CONDITIONER_CMD_UNKNOWN(-1),\r\n AIR_CONDITIONER_CMD_PWR_ON(0),\r\n AIR_CONDITIONER_CMD_PWR_OFF(1),\r\n AIR_CONDITIONER_CMD_TMP_16(2),\r\n AIR_CONDITIONER_CMD_TMP_18(3),\r\n AIR_CONDITIONER_CMD_TMP_20(4),\r\n AIR_CONDITIONER_CMD_TMP_22(5),\r\n AIR_CON...
import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.util.Base64; import android.util.Log; import com.agrhub.sensehub.components.util.AirConditionerCmd; import com.agrhub.sensehub.components.util.AirConditionerMode; import com.agrhub.sensehub.compo...
package com.agrhub.sensehub.components.connector; /** * Created by tanca on 10/28/2017. */ public class Rm3Connector extends BroadlinkConnector { private String TAG = getClass().getSimpleName(); private final int RM3_CMD_SEND_DATA = 0x6a; private final int RM3_CMD_ENT_LEARN = 0x6a; p...
AirConditionerMode oldMode = state.getAcMode();
1
mattinsler/guiceymongo
src/main/java/com/mattinsler/guiceymongo/guice/spi/BuilderImpls.java
[ "public interface IsData {\n}", "public interface BucketConfiguration {\n\tBucketOptionConfiguration to(String bucket);\n}", "public interface BucketOptionConfiguration {\n\tFinishableConfiguration inDatabase(String databaseKey);\n}", "public interface CollectionConfiguration extends CollectionConfigurationOn...
import com.google.inject.Binder; import com.google.inject.Module; import com.mattinsler.guiceymongo.data.IsData; import com.mattinsler.guiceymongo.guice.spi.Builders.BucketConfiguration; import com.mattinsler.guiceymongo.guice.spi.Builders.BucketOptionConfiguration; import com.mattinsler.guiceymongo.guice.spi.Builders....
/** * Copyright (C) 2010 Lowereast Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
private static class Bucket implements Builders.BucketConfiguration, Builders.BucketOptionConfiguration {
2
danielflower/multi-module-maven-release-plugin
src/test/java/e2e/NestedModulesTest.java
[ "public class MvnRunner {\n\n private static boolean haveInstalledPlugin = false;\n private final File mvnHome;\n public boolean logToStandardOut = false;\n public String mavenOpts;\n\n public MvnRunner() {\n this(null);\n }\n\n public MvnRunner(File mvnHome) {\n this.mvnHome = mv...
import org.apache.maven.shared.invoker.MavenInvocationException; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.lib.ObjectId; import org.junit.BeforeClass; import org.junit.Test; import scaffolding.MvnRunner; import scaffolding.TestProject; import java.io.IOException; import java.util.List; import static org....
package e2e; public class NestedModulesTest { final String expectedAggregatorVersion = "0.0."; final String expectedParentVersion = "1.2.3."; final String expectedCoreVersion = "2.0."; final String expectedAppVersion = "3.2."; final String expectedServerModulesVersion = "1.0.2.4."; final St...
MvnRunner.installReleasePluginToLocalRepo();
0
vonZeppelin/planning-poker
src/main/java/org/lbogdanov/poker/web/page/ProfilePage.java
[ "public static final int USER_EMAIL_MAX_LENGTH = 254;", "public static final int USER_FIRST_NAME_MAX_LENGTH = 128;", "public static final int USER_LAST_NAME_MAX_LENGTH = 128;", "@Entity\n@Table(name = \"USERS\")\npublic class User extends AbstractEntity {\n\n @Column(name = \"FIRST_NAME\", length = USER_FI...
import static org.apache.wicket.validation.validator.StringValidator.maximumLength; import static org.lbogdanov.poker.core.Constants.USER_EMAIL_MAX_LENGTH; import static org.lbogdanov.poker.core.Constants.USER_FIRST_NAME_MAX_LENGTH; import static org.lbogdanov.poker.core.Constants.USER_LAST_NAME_MAX_LENGTH; import java...
package org.lbogdanov.poker.web.page; /** * Represents a user's profile page. * * @author Alexandra Fomina */ @RequiresUser public class ProfilePage extends AbstractPage { @Inject private UserService userService; /** * Creates a new instance of <code>Profile</code> page. */ public ...
new BootstrapFeedbackPanel("feedback"), buttonGroup);
5
GoogleCloudPlatform/qupath-chcapi-extension
src/main/java/com/quantumsoft/qupathcloud/dao/DeleteInstanceCallable.java
[ "static final String APPLICATION_JSON_CHARSET_UTF8 = \"application/json; charset=utf-8\";", "static final String BEARER = \"Bearer \";", "public static final String FAILED_HTTP = \"Failed HTTP! Status code: \";", "public class QuPathCloudException extends Exception {\n\n /**\n * Instantiates a new QuPath c...
import static com.quantumsoft.qupathcloud.dao.Constants.APPLICATION_JSON_CHARSET_UTF8; import static com.quantumsoft.qupathcloud.dao.Constants.BEARER; import static com.quantumsoft.qupathcloud.exception.Errors.FAILED_HTTP; import static org.apache.http.HttpHeaders.AUTHORIZATION; import static org.apache.http.HttpHeader...
// Copyright (C) 2019 Google LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distribute...
private OAuth20 oAuth20;
4
juiser/juiser
spring/spring-boot-starter/src/main/java/org/juiser/spring/boot/config/JuiserDefaultAutoConfiguration.java
[ "public class JwtConfig {\n\n public static final long DEFAULT_CLOCK_SKEW_SECONDS = 3 * 60; // 3 minutes\n\n private boolean enabled; //true = a jwt is expected, false = simple string or json is expected\n\n private Long allowedClockSkewSeconds; //seconds by which the gateway and origin server clocks are a...
import io.jsonwebtoken.Claims; import org.juiser.jwt.config.JwtConfig; import org.juiser.model.User; import org.juiser.servlet.GuestFallbackUserFactory; import org.juiser.servlet.RequestGuestFactory; import org.juiser.servlet.RequestHeaderUserFactory; import org.juiser.spring.web.RequestContextUser; import org.juiser.s...
/* * Copyright 2017 Les Hazlewood and the respective Juiser contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * U...
return new RequestContextUser();
5
google/easy-gwt-mock
java/com/google/gwt/testing/easygwtmock/rebind/MocksGenerator.java
[ "public class UndeclaredThrowableException extends RuntimeException {\n \n private Throwable undeclaredThrowable;\n\n public UndeclaredThrowableException(Throwable exception) {\n super(\"Cannot throw undeclared exception: \" + exception.toString(), exception);\n this.undeclaredThrowable = exception;\n }\n...
import com.google.gwt.core.ext.GeneratorContext; import com.google.gwt.core.ext.TreeLogger; import com.google.gwt.core.ext.UnableToCompleteException; import com.google.gwt.core.ext.typeinfo.JClassType; import com.google.gwt.core.ext.typeinfo.JConstructor; import com.google.gwt.core.ext.typeinfo.JMethod; import com.goog...
/* * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
composer.addImport(Method.class.getCanonicalName());
3
vincetreur/Ristretto
ristretto-lint-checks/src/main/java/com/appsingularity/ristretto/lint/checks/detectors/WithViewDetector.java
[ "public class MethodDefinition {\n private static final String STAR = \"*\";\n public final String methodName;\n private final List<ClassDefinition> classes;\n\n public MethodDefinition(String aMethodName, ClassDefinition aClassName, ClassDefinition... moreClassNames) {\n methodName = aMethodName...
import com.android.tools.lint.detector.api.Category; import com.android.tools.lint.detector.api.Detector; import com.android.tools.lint.detector.api.Implementation; import com.android.tools.lint.detector.api.Issue; import com.android.tools.lint.detector.api.JavaContext; import com.android.tools.lint.detector.api.Scope;...
package com.appsingularity.ristretto.lint.checks.detectors; public class WithViewDetector extends Detector implements Detector.JavaScanner { private static final String MESSAGE_FORMAT = "Consider using `withView({0})`"; private static final MethodDefinition METHOD_CALL = MethodDefinitions.RISTRETTO_WITH_...
if (isNode(context, node, METHOD_CALL)) {
4
utluiz/spring-examples
agenda-dao-spring-vazia/src/test/java/br/com/starcode/agenda/dao/EntradaDaoTest.java
[ "@Configuration\r\n@ComponentScan(basePackages = {\r\n\t\t\"br.com.starcode.agenda.dao.mysqltemplate\",\r\n\t\t\"br.com.starcode.agenda.dao.mysql\"})\r\npublic class MySqlTestConfig {\r\n\t\r\n\t@Bean \r\n\t@Qualifier(\"mysql\") \r\n\t@Primary\r\n\tpublic DataSource dataSourceMySql() {\r\n\t\tMysqlDataSource ds = n...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory....
package br.com.starcode.agenda.dao; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes={MySqlTestConfig.class}) @Profile("test") @Transactional public class EntradaDaoTest { @Autowired protected EntradaDao entradaDao; @Test public void findTest() throws Exception {
Entrada entrada = entradaDao.findById(1);
2
ewidgetfx/ewidgetfx
app-launchers/LaunchTrayFX/src/main/java/org/ewidgetfx/applauncher/apptrayfx/VerticalAppTray.java
[ "public class IconSwipeListInfo {\n\n private final DoubleProperty width = new SimpleDoubleProperty();\n private final DoubleProperty height = new SimpleDoubleProperty();\n private final Rectangle scrollViewPort = new Rectangle();\n\n public double getWidth() {\n return width.get();\n }\n\n ...
import javafx.animation.KeyFrame; import javafx.animation.KeyValue; import javafx.animation.Timeline; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.collections.ListChangeListener; import javafx.collections.ObservableList; import javafx.event.ActionEvent; import javaf...
/* * Copyright 2013 eWidgetFX. * * 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 ...
Widget w = WidgetFactory.lookup(icon.getWidgetFilename());
8
huazhouwang/Synapse
app/src/main/java/io/whz/synapse/matrix/Matrix.java
[ "static void checkDimensions(int row, int col) {\n checkExpression(row > 0 && col > 0,\n \"Row and column should be positive\");\n}", "static void checkExpression(boolean expression, String message) {\n Precondition.checkArgument(expression, message);\n}", "static void checkInnerDimensions(@Non...
import android.support.annotation.NonNull; import java.io.Serializable; import java.util.Random; import static io.whz.synapse.matrix.MatrixChecker.checkDimensions; import static io.whz.synapse.matrix.MatrixChecker.checkExpression; import static io.whz.synapse.matrix.MatrixChecker.checkInnerDimensions; import static io....
package io.whz.synapse.matrix; public class Matrix implements Serializable { private final int mRow; private final int mCol; private final double[] mArray; private Matrix(double[] array, int row, int col) { mRow = row; mCol = col; mArray = array; } public int[] sha...
checkDimensions(row, col);
0
rpgmakervx/slardar
src/main/java/org/easyarch/slardar/session/DBSessionFactory.java
[ "public class CacheEntity {\n\n private int size;\n\n private CacheMode mode;\n\n private boolean enable;\n\n public CacheEntity(int size, CacheMode mode, boolean enable) {\n this.size = size;\n this.mode = mode;\n this.enable = enable;\n if (size == 0){\n this.ena...
import org.easyarch.slardar.entity.CacheEntity; import org.easyarch.slardar.jdbc.exec.AbstractExecutor; import org.easyarch.slardar.jdbc.exec.CachedExecutor; import org.easyarch.slardar.jdbc.exec.SqlExecutor; import org.easyarch.slardar.session.impl.DefaultDBSession; import org.easyarch.slardar.session.impl.MapperDBSes...
package org.easyarch.slardar.session; /** * Description : * Created by xingtianyu on 16-12-29 * 上午12:11 * description: */ public class DBSessionFactory { private Configuration configuration; public DBSessionFactory(Configuration configuration){ this.configuration = configuration; } p...
private AbstractExecutor getExecutor(){
1
wotateam/wota
src/wota/ai/clonewarriors/GathererAI.java
[ "public class Ant extends BaseAnt {\n\t\n\t/** health is decreased by attacking enemies. Ant dies if health reaches 0. */\n\tpublic final double health;\n\t\n\t/** amount of sugar which is carried */\n\tpublic final int sugarCarry;\n\t\n\t/** The name of this ant's AI class, not including the package name.*/\n\tpub...
import java.util.Random; import wota.ai.*; import wota.gameobjects.Ant; import wota.gameobjects.AntAI; import wota.gameobjects.Hill; import wota.gameobjects.Parameters; import wota.gameobjects.Sugar; import wota.utility.SeededRandomizer;
package wota.ai.clonewarriors; //@AIInformation(creator = "Elrond1337", name = "Clone Warriors") public class GathererAI extends AntAI { private double lastDir = 0; private double health = -1; boolean lostHealth = false; final double RUN_AWAY_FACTOR = 3; // factor of which Ants must be overpowered to run awa...
Ant enemy = closest(visibleEnemies());
0
hoko/hoko-android
hoko/src/main/java/com/hokolinks/deeplinking/AnnotationParser.java
[ "public class Hoko {\n\n public static final String VERSION = \"2.3.0\";\n\n // Static Instance\n private static Hoko sInstance;\n\n // Private modules\n private Deeplinking mDeeplinking;\n\n // Private variables\n private boolean mDebugMode;\n private String mToken;\n\n // Private initia...
import android.annotation.TargetApi; import android.app.Activity; import android.content.Context; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4....
package com.hokolinks.deeplinking; /** * HokoAnnotation parser serves the purpose of analyzing the Activity classes on the application * and determining their deeplinking capabilities based on the given Hoko annotations. */ public class AnnotationParser { // Route link /** * Get the route annotat...
String route = activity.getIntent().getStringExtra(IntentRouteImpl.BUNDLE_KEY);
2
OpenTreeMap/otm-android
OpenTreeMap/src/main/java/org/azavea/otm/ui/MainMapFragment.java
[ "public class GoogleMapsListeners {\n // We need to set a listener for marker drag, or markers will not give the correct position\n // when we later call marker.getPosition()\n // Note that we do not have to actually *do* anything in our listener\n public static class NoopDragListener implements GoogleM...
import android.app.Activity; import android.app.Fragment; import android.app.ProgressDialog; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.BitmapFactory; import android.location.Geocoder; import android.location.Location; import android.os.Build; import android.os.Bund...
/********************************* * Private methods *********************************/ private void showPlotFromIntent(Intent data, GoogleMap map) { try { // The plot was updated, so update the pop-up with any new data String plotJSON = data.getExtras().getString("pl...
map.setOnMarkerDragListener(new GoogleMapsListeners.NoopDragListener());
0
shapesecurity/shift-semantics-java
src/main/java/com/shapesecurity/shift/es2017/semantics/asgvisitor/BlockSquasher.java
[ "public class Semantics {\n\t@Nonnull\n\tpublic final Node node;\n\t@Nonnull\n\tpublic final ImmutableList<Variable> locals;\n\t@Nonnull\n\tpublic final ImmutableList<String> scriptVarDecls;\n\t@Nonnull\n\tpublic final ScopeLookup scopeLookup;\n\t@Nonnull\n\tpublic final IdentityHashMap<LiteralFunction, Scope> func...
import com.shapesecurity.functional.data.ImmutableList; import com.shapesecurity.shift.es2017.semantics.Semantics; import com.shapesecurity.shift.es2017.semantics.asg.Node; import com.shapesecurity.shift.es2017.semantics.visitor.Director; import com.shapesecurity.shift.es2017.semantics.visitor.NodeAdaptingReducer; impo...
package com.shapesecurity.shift.es2017.semantics.asgvisitor; public class BlockSquasher extends ReconstructingReducer { public static Reducer<Node> create() { return new NodeAdaptingReducer(new BlockSquasher()); } protected BlockSquasher() { super(); }
public static Semantics reduce(@Nonnull Semantics semantics) {
0
Archistar/archistar-core
src/test/java/at/ac/ait/archistar/integration/AbstractIntegrationTest.java
[ "public class DisconnectedException extends Exception {\n\n private static final long serialVersionUID = 3950283191217740878L;\n}", "public interface StorageServer extends ExecutionHandler {\n\n /**\n * returns stored fragment count -- used for debug purposes\n * \n * @return the stored fragment...
import java.util.HashMap; import java.util.Map; import java.util.UUID; import static org.fest.assertions.api.Assertions.*; import org.junit.Test; import at.ac.ait.archistar.backendserver.storageinterface.DisconnectedException; import at.ac.ait.archistar.backendserver.storageinterface.StorageServer; import at.ac.ait.arc...
package at.ac.ait.archistar.integration; public abstract class AbstractIntegrationTest { protected final static byte[] testData = {65, 66, 67, 68, 69, 70, 71, 72, 73, 74}; protected Map<String, StorageServer> servers;
protected static TestEngine engine;
2
jochen777/jFormchecker
src/main/java/de/jformchecker/GenericFormBuilder.java
[ "public class ValidationResult {\n\n\tboolean isValid = false;\n\t\n\t// caching:\n\tprivate static ValidationResult okResult = new ValidationResult(true, \"\", null, null);\n\n\tpublic boolean isValid() {\n\t\treturn isValid;\n\t}\n\n\tpublic String getMessage() {\n\t\treturn message;\n\t}\n\n\tpublic Object[] ge...
import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import de.jformchecker.criteria.ValidationResult; import de.jformchecker.elements.FileUploadInput; import de.jformchecker.message.MessageSource; import de.jformchecker.request.Request; import de.jformchecker.security.XSRFBuilder;
package de.jformchecker; /** * Builds: a generic form the label-elements * * @author jochen * */ public abstract class GenericFormBuilder { String submitClass = ""; protected abstract String getHelpTag(String helpText, FormCheckerElement elem); public abstract TagAttributes getLabelAttributes(FormChecke...
XSRFBuilder csrfBuilder = new XSRFBuilder();
4
travel-cloud/Cheddar
cheddar/cheddar-metrics-intercom/src/test/java/com/clicktravel/cheddar/metrics/intercom/IntercomMetricCollectorTest.java
[ "public static MetricOrganisation randomMetricOrganisation() {\n return randomMetricOrganisation(false);\n}", "public static MetricOrganisation randomMetricOrganisationWithCreatedAt() {\n return randomMetricOrganisation(true);\n}", "public static MetricUser randomMetricUser() {\n final int numberOfOrga...
import static com.clicktravel.cheddar.metrics.intercom.random.data.RandomIntercomDataGenerator.randomIntercomUser; import static com.clicktravel.cheddar.metrics.intercom.random.data.RandomMetricDataGenerator.randomMetricOrganisation; import static com.clicktravel.cheddar.metrics.intercom.random.data.RandomMetricDataGen...
/* * Copyright 2014 Click Travel Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
final MetricOrganisation metricOrganisation = randomMetricOrganisationWithCreatedAt();
1
rrbrambley/MessageBeast-Android
src/main/java/com/alwaysallthetime/messagebeast/manager/ActionMessageManager.java
[ "public class ADNApplication extends Application {\n private static Context sContext;\n\n public static Context getContext() {\n return sContext;\n }\n\n /**\n * For apps that would rather not use ADNApplication as their Application type,\n * call this method when your app starts to allow...
import android.util.Log; import com.alwaysallthetime.adnlib.GeneralParameter; import com.alwaysallthetime.adnlib.QueryParameters; import com.alwaysallthetime.adnlib.data.Annotation; import com.alwaysallthetime.adnlib.data.Channel; import com.alwaysallthetime.adnlib.data.Message; import com.alwaysallthetime.messagebeast...
if(!isActioned(actionChannelId, targetMessagePlus.getMessage().getId())) { Message message = targetMessagePlus.getMessage(); String targetMessageId = message.getId(); //create machine only message in action channel that points to the target message id. Message m =...
OrderedMessageBatch targetMessages = mDatabase.getMessages(targetMessageIds);
6
scalyr/Scalyr-Java-Client
src/main/com/scalyr/api/logs/LogService.java
[ "public class ScalyrException extends RuntimeException {\n public ScalyrException(String message) {\n super(message);\n }\n\n public ScalyrException(String message, Throwable cause) {\n super(message, cause);\n }\n}", "public class ScalyrNetworkException extends ScalyrException {\n public ScalyrNetwork...
import com.scalyr.api.ScalyrException; import com.scalyr.api.ScalyrNetworkException; import com.scalyr.api.internal.ScalyrService; import com.scalyr.api.json.JSONArray; import com.scalyr.api.json.JSONObject; import com.scalyr.api.json.JSONStreamAware;
/* * Scalyr client library * Copyright 2012 Scalyr, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
throws ScalyrException, ScalyrNetworkException {
0
cilogi/gaeshiro
src/main/java/com/cilogi/shiro/web/oauth/OAuthLoginServlet.java
[ "@Cache\n@Entity\n//@JsonInclude(JsonInclude.Include.NON_NULL)\npublic class GaeUser implements Serializable {\n static final Logger LOG = Logger.getLogger(GaeUser.class.getName());\n\n static final int HASH_ITERATIONS = 1;\n static final String HASH_ALGORITHM = Sha256Hash.ALGORITHM_NAME;\n\n\n @Id\n ...
import com.cilogi.shiro.gae.GaeUser; import com.cilogi.shiro.gae.GaeUserDAO; import com.cilogi.shiro.gae.UserAuthType; import com.cilogi.shiro.oauth.OAuthAuthenticationToken; import com.cilogi.shiro.oauth.OAuthInfo; import com.cilogi.shiro.oauth.provider.FacebookAuth; import com.cilogi.shiro.oauth.provider.GoogleAuth; ...
// Copyright (c) 2012 Tim Niblett. All Rights Reserved. // // File: OAuthLoginServlet.java (05-Oct-2012) // Author: tim // // Copyright in the whole and every part of this source file belongs to // Tim Niblett (the Author) and may not be used, sold, licenced, // transferred, copied or reproduced in whole ...
public OAuthLoginServlet(@Named("social.site") String site, Provider<GaeUserDAO> daoProvider) {
1
cianfrocco-lab/COSMIC-CryoEM-Gateway
globus_sources/portal/src/main/java/edu/sdsc/globusauth/action/TransferStatusAction.java
[ "public class ProfileManager extends HibernateUtil {\n public OauthProfile add(OauthProfile oathProfile) {\n User user = new User();\n String password = \"Globus\" + oathProfile.getUsername() + Calendar.getInstance().getTimeInMillis();\n user.setFirstName(oathProfile.getFirstName());\n ...
import edu.sdsc.globusauth.controller.ProfileManager; import edu.sdsc.globusauth.util.OauthConstants; import org.apache.log4j.Logger; import org.globusonline.transfer.Authenticator; import org.globusonline.transfer.GoauthAuthenticator; import org.globusonline.transfer.JSONTransferAPIClient; import org.json.JSONArray; i...
package edu.sdsc.globusauth.action; /** * Created by cyoun on 11/29/16. */ public class TransferStatusAction extends NgbwSupport { private static final Logger logger = Logger.getLogger(TransferStatusAction.class.getName());
private JSONTransferAPIClient client;
4
adiyoss/StructED
src/com/structed/models/inference/InferenceMultiClassOld.java
[ "public class ClassifierData {\n\n public ITaskLoss taskLoss;\n public IUpdateRule updateRule;\n public IInference inference;\n public IKernel kernel;\n public IFeatureFunctions phi;\n public List<Double> arguments;\n public int iteration = 0;\n public String verbose = \"\";\n}", "public c...
import com.structed.data.entities.PredictedLabels; import com.structed.data.entities.Vector; import com.structed.data.Logger; import com.structed.utils.comperators.MapValueComparatorDescending; import com.structed.utils.MathHelpers; import com.structed.models.ClassifierData; import com.structed.constants.Consts; import...
/* * The MIT License (MIT) * * StructED - Machine Learning Package for Structured Prediction * * Copyright (c) 2015 Yossi Adi, E-Mail: yossiadidrum@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), t...
public PredictedLabels predictForTrain(Example vector, Vector W, String realClass, ClassifierData classifierData, double epsilonArgMax)
5
vy/hrrs
replayer/src/main/java/com/vlkan/hrrs/replayer/http/ApacheHttpRequestRecordReplayer.java
[ "public interface HttpRequestHeader {\n\n String getName();\n\n String getValue();\n\n Builder toBuilder();\n\n interface Builder {\n\n Builder setName(String name);\n\n Builder setValue(String value);\n\n HttpRequestHeader build();\n\n }\n\n}", "public interface HttpRequestPay...
import com.codahale.metrics.MetricRegistry; import com.vlkan.hrrs.api.HttpRequestHeader; import com.vlkan.hrrs.api.HttpRequestPayload; import com.vlkan.hrrs.api.HttpRequestRecord; import com.vlkan.hrrs.replayer.cli.Config; import com.vlkan.hrrs.replayer.jtl.JtlPrinter; import org.apache.http.HttpEntity; import org.apac...
package com.vlkan.hrrs.replayer.http; @Singleton public class ApacheHttpRequestRecordReplayer implements HttpRequestRecordReplayer { private static final Logger LOGGER = LoggerFactory.getLogger(ApacheHttpRequestRecordReplayer.class); private final MetricRegistry metricRegistry; private final JtlPrint...
for (HttpRequestHeader header : record.getHeaders()) {
0
kebernet/shortyz
app/src/main/java/com/totsp/crossword/net/Downloaders.java
[ "@SuppressWarnings(\"SimpleDateFormat\")\r\npublic class BrowseActivity extends ShortyzActivity implements RecyclerItemClickListener.OnItemClickListener{\r\n private static final String MENU_ARCHIVES = \"Archives\";\r\n private static final int DOWNLOAD_DIALOG_ID = 0;\r\n private static final int REQUEST_W...
import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.os.Environment; import androidx.core.app.NotificationCompat; ...
package com.totsp.crossword.net; public class Downloaders { private static final Logger LOG = Logger.getLogger("com.totsp.crossword"); private Context context; private List<Downloader> downloaders = new LinkedList<Downloader>(); private NotificationManager notificationManager; privat...
downloaders.add(new GmailDownloader(application.getGmailService()));
2
Idrinth/WARAddonClient
src/main/java/de/idrinth/waraddonclient/model/AddonList.java
[ "public class UnknownAddon implements Addon {\r\n \r\n private boolean hasSettings = false;\r\n\r\n private String file = \"\";\r\n\r\n private String reason = \"\";\r\n\r\n private String url = \"\";\r\n\r\n private String name;\r\n\r\n private String installed = \"-\";\r\n\r\n private fina...
import de.idrinth.waraddonclient.model.addon.UnknownAddon; import de.idrinth.waraddonclient.model.addon.ActualAddon; import de.idrinth.waraddonclient.model.addon.Addon; import de.idrinth.waraddonclient.service.Config; import de.idrinth.waraddonclient.service.logger.BaseLogger; import de.idrinth.waraddonclient.service.R...
package de.idrinth.waraddonclient.model; public abstract class AddonList implements Runnable { protected final HashMap<String, Addon> list = new HashMap<>(); protected final ArrayList<Addon> rows = new ArrayList<>(); private final HashMap<String, String> unknowns = new CaseInsensitiveHashMap<>(); ...
private final XmlParser parser;
6
fvalente/LogDruid
src/logdruid/ui/mainpanel/SourceInfoPanel.java
[ "public class Repository {\n\tprivate static Logger logger = Logger.getLogger(DataMiner.class.getName());\n\tprivate ArrayList<Recording> recordings;\n\tprivate ArrayList<Source> sources;\n\tprivate String baseSourcePath;\n\tprivate ArrayList<DateFormat> dates;\n\tprivate boolean recursiveMode;\n\tprivate boolean o...
import javax.swing.JPanel; import java.awt.BorderLayout; import javax.swing.JScrollBar; import javax.swing.JScrollPane; import javax.swing.JTextPane; import javax.swing.JLabel; import javax.swing.BoxLayout; import java.awt.FlowLayout; import java.awt.Component; import java.util.Collections; import java.util.Map; import...
/******************************************************************************* * LogDruid : Generate charts and reports using data gathered in log files * Copyright (C) 2016 Frederic Valente (frederic.valente@gmail.com) * * This program is free software: you can redistribute it and/or modify it under the terms of...
public SourceInfoPanel(Repository repo, Source src) {
1
lovexiaov/android_pinyin_ime
app/src/main/java/com/android/inputmethod/pinyin/common/XmlKeyboardLoader.java
[ "public class SkbTemplate {\n private int mSkbTemplateId;\n private Drawable mSkbBg;\n private Drawable mBalloonBg;\n private Drawable mPopupBg;\n private float mXMargin = 0;\n private float mYMargin = 0;\n /** Key type list. */\n private Vector<SoftKeyType> mKeyTypeList = new Vector<SoftKeyType>();\n\n /*...
import android.content.Context; import android.content.res.Resources; import android.content.res.XmlResourceParser; import android.graphics.drawable.Drawable; import com.android.inputmethod.pinyin.skb.SkbTemplate; import com.android.inputmethod.pinyin.skb.SoftKey; import com.android.inputmethod.pinyin.skb.SoftKeyToggle...
if (id != lastKeyTypeId + 1) { return null; } SoftKeyType keyType = mSkbTemplate.createKeyType(id, bg, hlBg); keyType.setColors(color, colorHl, colorBalloon); if (!mSkbTemplate.addKeyType(keyType)) { return null; } ...
int rowId = getInteger(xrp, XMLATTR_ROW_ID, KeyRow.ALWAYS_SHOW_ROW_ID);
5
crescentflare/UniLayout
UniLayoutAndroid/UniLayoutExample/src/main/java/com/crescentflare/unilayoutexample/reusingcontainer/ReusingContainerAdapter.java
[ "public class UniReusingContainer extends ScrollView\n{\n // ---\n // Members\n // ---\n\n private LayoutContainer contentView;\n private UniScrollListener scrollListener;\n private DragState dragState = DragState.Idle;\n private VelocityTracker velocityTracker;\n private int draggingPositio...
import android.view.View; import android.view.ViewGroup; import com.crescentflare.unilayout.containers.UniReusingContainer; import com.crescentflare.unilayout.helpers.UniLayoutParams; import com.crescentflare.unilayout.views.UniReusableView; import com.crescentflare.unilayoutexample.R; import com.crescentflare.unilayou...
package com.crescentflare.unilayoutexample.reusingcontainer; /** * Reusing container example: adapter * Provides display of reusable items */ public class ReusingContainerAdapter extends UniReusingContainer.Adapter { // --- // Members // --- private List<ReusableItem> items = new ArrayList<>(); ...
return new SectionView(container.getContext());
5
huijimuhe/common-layout-android
CommonLayout/app/src/main/java/com/huijimuhe/commonlayout/adapter/render/xcArticleSectionImageRender.java
[ "public class AppContext extends Application {\n private static AppContext INSTANCE=null;\n\n @Override\n public void onCreate() {\n super.onCreate();\n INSTANCE=this;\n }\n\n public static AppContext getInstance(){return INSTANCE;}\n}", "public abstract class AbstractRender{\n\n p...
import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.huijimuhe.commonlayout.AppContext; import com.huijimuhe.commonlayout.R; import com.huijimuhe.commonlayout.adapter.base...
package com.huijimuhe.commonlayout.adapter.render; /** * Copyright (C) 2016 Huijimuhe Technologies. All rights reserved. * <p> * Contact: 20903213@qq.com Zengweizhou * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You...
public ViewHolder(View v, final AbstractRenderAdapter adapter) {
2
xiaoyaoyou1212/BLE
newapp/src/main/java/com/vise/bledemo/activity/DeviceDetailActivity.java
[ "public enum BluetoothServiceType {\n AUDIO(BluetoothClass.Service.AUDIO), //音频服务\n CAPTURE(BluetoothClass.Service.CAPTURE), //捕捉服务\n INFORMATION(BluetoothClass.Service.INFORMATION), //信息服务\n LIMITED_DISCOVERABILITY(BluetoothClass.Service.LIMITED_DISCOVERABILITY), //有限发现服务\n NETWORKING(Bl...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TextView; import com.vise.baseble.common.B...
package com.vise.bledemo.activity; /** * 设备详细信息展示界面 */ public class DeviceDetailActivity extends AppCompatActivity { public static final String EXTRA_DEVICE = "extra_device"; private ListView mList; private View mEmpty; private BluetoothLeDevice mDevice; /** * 追加广播包信息 * * @par...
private void appendAdRecordView(final MergeAdapter adapter, final String title, final AdRecord record) {
5
idega/com.idega.block.email
src/java/com/idega/block/email/parser/DefaultMessageParser.java
[ "public class EmailConstants {\n\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"com.idega.block.email\";\n\t\n\tpublic static final String MAILING_LIST_MESSAGE_RECEIVER = CoreConstants.PROP_SYSTEM_ACCOUNT;\n\t\n\tpublic static final String MULTIPART_MIXED_TYPE = \"multipart/Mixed\";\n\tpublic static final S...
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logg...
// Plain text if (part.getContent() instanceof String) msg += parsePlainTextMessage((String) part.getContent()); msgAndAttachements[0] = msg; } else if (part.isMimeType(MimeTypeUtil.MIME_TYPE_HTML)) { // HTML if (part.getContent() instanceof String) msg += parseHTMLMessage((String) part.getCont...
public Collection<? extends EmailMessage> getParsedMessages(ApplicationEmailEvent emailEvent) {
2
c-rack/cbor-java
src/main/java/co/nstant/in/cbor/CborDecoder.java
[ "public class ArrayDecoder extends AbstractDecoder<Array> {\n\n public ArrayDecoder(CborDecoder decoder, InputStream inputStream) {\n super(decoder, inputStream);\n }\n\n @Override\n public Array decode(int initialByte) throws CborException {\n long length = getLength(initialByte);\n ...
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.LinkedList; import java.util.List; import java.util.Objects; import co.nstant.in.cbor.decoder.ArrayDecoder; import co.nstant.in.cbor.decoder.ByteStringDecoder; import co.nstant.in.c...
package co.nstant.in.cbor; /** * Decoder for the CBOR format based. */ public class CborDecoder { private final InputStream inputStream; private final UnsignedIntegerDecoder unsignedIntegerDecoder; private final NegativeIntegerDecoder negativeIntegerDecoder; private final ByteStringDecoder byteStr...
if (!(dataItem instanceof Array)) {
5
ni3po42/traction.mvc
Demo/src/main/java/ni3po42/android/tractiondemo/views/SwipeEntryView.java
[ "public class UIProperty<T>\nimplements IUIElement<T>\n{\t\t\t\t\n\tprotected String path;\n protected T tempValue;\n\n\tprivate IUIElement.IUIUpdateListener<T> updateListener;\t\t\n\t\n\tprivate boolean _isUpdating;\n\t\n\tprotected String pathAttribute = null;\n\tprotected final IViewBinding parentViewBinding;...
import android.animation.Animator; import android.animation.ObjectAnimator; import android.content.Context; import android.util.AttributeSet; import android.widget.LinearLayout; import traction.mvc.implementations.ui.UIProperty; import traction.mvc.implementations.ui.viewbinding.ViewBindingHelper; import traction.mvc.i...
/* 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...
implements IProxyViewBinding, SwipableListView.ISwipable, Animator.AnimatorListener
2
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/ConditionFormatterFactory.java
[ "public interface Callback<T> {\r\n\r\n /**\r\n * 適用可能なロケールかどうか。\r\n * @since 0.5\r\n * @param locale ロケール情報。\r\n * @return\r\n */\r\n boolean isApplicable(Locale locale);\r\n\r\n /**\r\n * フォーマットの後に実行する処理。\r\n * @param data 変換元のデータ\r\n * @param value フォーマットされた値。\r\n * @...
import java.util.regex.Matcher; import java.util.regex.Pattern; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.mygreen.cellformatter.callback.Callback; import com.github.mygreen.cellformatter.callback.DBNum1; import com.github.mygreen.cellformatter.callback.DBNum2; import com.github.m...
package com.github.mygreen.cellformatter; /** * 条件付きの書式の組み立てるための抽象クラス。 * <p>主にテンプレートメソッドの実装を行う。 * * @version 0.10 * @author T.TSUCHIE * @param <F> 組み立てるフォーマッタクラス */ public abstract class ConditionFormatterFactory<F> { private static Logger logger = LoggerFactory.getLogger(ConditionForma...
callback = DBNum2.create();
2
davidmoten/rxjava2-jdbc
rxjava2-jdbc/src/main/java/org/davidmoten/rx/jdbc/GetterTx.java
[ "public class Tuple2<T1, T2> {\n\n private final T1 value1;\n private final T2 value2;\n\n /**\n * Constructor.\n * \n * @param value1\n * first element\n * @param value2\n * second element\n */\n public Tuple2(T1 value1, T2 value2) {\n this.value...
import java.sql.ResultSet; import java.util.Optional; import javax.annotation.Nonnull; import org.davidmoten.rx.jdbc.tuple.Tuple2; import org.davidmoten.rx.jdbc.tuple.Tuple3; import org.davidmoten.rx.jdbc.tuple.Tuple4; import org.davidmoten.rx.jdbc.tuple.Tuple5; import org.davidmoten.rx.jdbc.tuple.Tuple6; import org.da...
package org.davidmoten.rx.jdbc; public interface GetterTx { /** * Transforms the results using the given function. * * @param mapper * transforms ResultSet row to an object of type T * @param <T> * the type being mapped to * @return the results of the ...
default <T1, T2, T3, T4, T5, T6> Flowable<Tx<Tuple6<T1, T2, T3, T4, T5, T6>>> getAs(
4
rodhilton/jasome
src/main/java/org/jasome/metrics/calculators/MethodAndAttributeInheritanceCalculator.java
[ "public class Method extends Code {\n private final MethodDeclaration declaration;\n\n public final static Method UNKNOWN = new Method();\n\n private Method() {\n super(\"unknownMethod\");\n this.declaration = null;\n }\n\n public Method(MethodDeclaration declaration) {\n super(d...
import com.github.javaparser.ast.Modifier; import com.github.javaparser.ast.NodeList; import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration; import com.github.javaparser.ast.body.FieldDeclaration; import com.github.javaparser.ast.body.VariableDeclarator; import com.github.javaparser.ast.expr.SimpleName; imp...
package org.jasome.metrics.calculators; public class MethodAndAttributeInheritanceCalculator implements Calculator<Type> { @Override public Set<Metric> calculate(Type type) { Graph<Type> inheritanceGraph = type.getParentPackage().getParentProject().getMetadata().getInheritanceGraph(); Clas...
metricBuilder.add(Metric.of("NMIR", "Number of Methods Inherited Ratio", NumericValue.ofRational(inheritedAndNotOverriddenMethods.size(), inheritableMethods.size()).times(NumericValue.of(100))));
4
jbossas/jboss-vfs
src/test/java/org/jboss/test/vfs/FileVFSUnitTestCase.java
[ "public class ClassPathIterator {\n ZipInputStream zis;\n FileIterator fileIter;\n File file;\n VirtualFileIterator vfIter;\n VirtualFile vf;\n int rootLength;\n\n public ClassPathIterator(URL url) throws IOException {\n String protocol = url != null ? url.getProtocol() : null;\n ...
import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.net.URI; import java.net.URL; import java.net.URLClassLoader; import java.net.URLDecoder; import ja...
/* * JBoss, Home of Professional Open Source * Copyright 2006, Red Hat Middleware LLC, and individual contributors * by the @authors tag. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License a...
VirtualFile root0 = VFS.getChild(rootURL.getPath());
4
srdc/cda2fhir
src/test/java/tr/com/srdc/cda2fhir/ValidatorTest.java
[ "public class Config {\n\n private static FhirContext fhirCtx;\n\n // Default values for some mandatory attributes, which cannot be retrieved from CDA document\n public static final String DEFAULT_COMMUNICATION_LANGUAGE_CODE_SYSTEM = \"urn:ietf:bcp:47\";\n public static final ConditionVerificationStatus...
import ca.uhn.fhir.model.dstu2.resource.Bundle; import tr.com.srdc.cda2fhir.conf.Config; import tr.com.srdc.cda2fhir.transform.CCDTransformerImpl; import tr.com.srdc.cda2fhir.transform.ICDATransformer; import tr.com.srdc.cda2fhir.util.FHIRUtil; import tr.com.srdc.cda2fhir.util.IdGeneratorEnum; import tr.com.srdc.cda2fh...
package tr.com.srdc.cda2fhir; /* * #%L * CDA to FHIR Transformer Library * %% * Copyright (C) 2016 SRDC Yazilim Arastirma ve Gelistirme ve Danismanlik Tic. A.S. * %% * 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...
ICDATransformer ccdTransformer = new CCDTransformerImpl(IdGeneratorEnum.COUNTER);
2
yyxhdy/ManyEAs
src/jmetal/util/offspring/DifferentialEvolutionOffspring2.java
[ "public abstract class Operator implements Serializable {\n \n /**\n * Stores the current operator parameters. \n * It is defined as a Map of pairs <<code>String</code>, <code>Object</code>>, \n * and it allow objects to be accessed by their names, which are specified \n * by the string.\n */\n prote...
import jmetal.core.Operator; import jmetal.core.Solution; import jmetal.core.SolutionSet; import jmetal.operators.crossover.DifferentialEvolutionCrossover; import jmetal.operators.selection.SelectionFactory; import jmetal.util.JMException; import jmetal.util.PseudoRandom; import java.util.HashMap; import java.util.logg...
/** * DifferentialEvolutionOffspring.java * * @author Antonio J. Nebro * @version 1.0 * * This class returns a solution after applying DE */ package jmetal.util.offspring; public class DifferentialEvolutionOffspring2 extends Offspring { private double CR_ ; private double F_ ; private Operator crossover...
public Solution getOffspring(SolutionSet solutionSet, int index) {
2
niteshpatel/ministocks
src/main/java/nitezh/ministock/activities/PortfolioActivity.java
[ "public class DialogTools {\n\n public static void showSimpleDialog(Context context, String title, String body) {\n alertWithCallback(context, title, body, \"Close\", null, null, null);\n }\n\n\n public static void alertWithCallback(\n Context context,\n String title,\n ...
import android.app.Activity; import android.app.Dialog; import android.os.Bundle; import android.text.InputType; import android.view.ContextMenu; import android.view.ContextMenu.ContextMenuInfo; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.widget.Adapt...
/* The MIT License Copyright (c) 2013 Nitesh Patel http://niteshpatel.github.io/ministocks 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...
StockQuote data = this.portfolioRepository.stocksQuotes.get(mStockSymbol);
6
PanagiotisDrakatos/Universal-Encryption-Channel
SecureJavaChannel/src/main/java/IOSocket/SessionHandler.java
[ "public final class DHkeyExchange implements IOSynAck {\n\n private static IOMessageExhange Builder;\n private static RandomGenerator Genarator;\n\n private final IOTransport socketChanel;\n private final SessionKey Sessionkey;\n private ClientKey ClientKey;\n\n public DHkeyExchange(IOTransport so...
import Handshake.DHkeyExchange; import Handshake.IOCallback; import Handshake.IOMessageExhange; import Handshake.IOSynAck; import Properties.Properties; import java.io.IOException; import java.net.SocketException; import java.util.logging.Level; import java.util.logging.Logger; import org.AES_Encryption.ClientKey; impo...
package IOSocket; public class SessionHandler extends Thread { private final IOTransport socketChanel; private final IOSynAck keyExchange;
private final SessionKey Sessionkey;
6
hhaslam11/Text-Fighter
src/com/hotmail/kalebmarc/textfighter/main/Weapon.java
[ "public class Armour {\r\n\r\n private static ArrayList<Armour> armours = new ArrayList<>(3);\r\n private String name;\r\n private int price;\r\n private int damResist;//x%\r\n private int level;\r\n private boolean owns;\r\n private boolean equipped;\r\n\r\n public Armour(String name, int p...
import com.hotmail.kalebmarc.textfighter.item.Armour; import com.hotmail.kalebmarc.textfighter.player.Achievements; import com.hotmail.kalebmarc.textfighter.player.Coins; import com.hotmail.kalebmarc.textfighter.player.Stats; import com.hotmail.kalebmarc.textfighter.player.Xp; import javax.swing.*; import java.ut...
} //Display stuff com.hotmail.kalebmarc.textfighter.player.Stats.totalDamageDealt += damageDealt; com.hotmail.kalebmarc.textfighter.player.Xp.setBattleXp(damageDealt, true); if(!Enemy.get().takeDamage(damageDealt)) { // !dead Ui.cls(); Ui.println("...
if (price > Coins.get()) {
2
nullpointerexceptionapps/TeamCityDownloader
java/com/raidzero/teamcitydownloader/adapters/ProjectAdapter.java
[ "public class TeamCityProject implements Parcelable {\n\n private static final String tag = \"TeamCityProject\";\n\n private String id;\n private String name;\n private String url;\n\n public TeamCityProject(String id, String name, String url) {\n this.id = id;\n this.name = name;\n ...
import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.TextView; import com.raidzero.teamcitydownloader.R; import com.raid...
package com.raidzero.teamcitydownloader.adapters; /** * Created by raidzero on 5/8/14 1:17 PM */ public class ProjectAdapter extends ArrayAdapter<TeamCityProject> { private static final String tag="ProjectAdapter"; private boolean enableCheckbox = false; private boolean checkboxes[] = null;
private AppHelper helper;
1
novucs/factions-top
hook/factions-2-12/src/main/java/net/novucs/ftop/hook/Factions0212.java
[ "public class ChunkPos {\n\n private final String world;\n private final int x;\n private final int z;\n\n public static ChunkPos of(Chunk chunk) {\n return new ChunkPos(chunk.getWorld().getName(), chunk.getX(), chunk.getZ());\n }\n\n public static ChunkPos of(ChunkSnapshot snapshot) {\n ...
import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; import com.massivecraft.factions.Factions; import com.massivecraft.factions.entity.BoardColl; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.FactionColl; import com.massivecraft.factions.e...
package net.novucs.ftop.hook; public class Factions0212 extends FactionsHook { public Factions0212(Plugin plugin) { super(plugin); } @Override public String getFactionAt(String worldName, int chunkX, int chunkZ) { Faction faction = BoardColl.get().getFactionAt(PS.valueOf(worldName, ...
callEvent(new FactionJoinEvent(newFactionId, player));
3
Tubitv/TubiPlayer
lib/src/main/java/com/tubitv/media/bindings/UserController.java
[ "public interface PlaybackActionCallback {\n\n void onProgress(@Nullable MediaModel mediaModel, long milliseconds, long durationMillis);\n\n void onSeek(@Nullable MediaModel mediaModel, long oldPositionMillis, long newPositionMillis);\n\n void onPlayToggle(@Nullable MediaModel mediaModel, boolean playing);...
import android.content.Context; import android.databinding.BaseObservable; import android.databinding.ObservableBoolean; import android.databinding.ObservableField; import android.databinding.ObservableInt; import android.net.Uri; import android.os.Handler; import android.support.annotation.NonNull; import android.text...
package com.tubitv.media.bindings; /** * This class contains business logic of user interaction between user and player action. This class will be serving * as interface between Player UI and Business logic, such as seek, pause, UI logic for displaying ads vs movie. */ public class UserController extends BaseObse...
videoRemainInString.set(Utils.getProgressTime((duration - position), true));
6
wangchongjie/multi-engine
src/main/java/com/baidu/unbiz/multiengine/codec/bytebuf/ByteEncoder.java
[ "public interface ByteBufCodec {\n\n /**\n * 将对象编码成ByteBuf\n * \n * @param object 编码对象\n * @return byte数组\n * @throws CodecException\n */\n byte[] encode(Object object) throws CodecException;\n\n /**\n * 将ByteBuf解码成对象\n * \n * @param byteBuf 字节缓冲区 @see ByteBuf\n * @p...
import org.slf4j.Logger; import com.baidu.unbiz.multiengine.codec.ByteBufCodec; import com.baidu.unbiz.multiengine.codec.HeadCodec; import com.baidu.unbiz.multiengine.codec.MsgCodec; import com.baidu.unbiz.multiengine.codec.common.MsgHeadCodec; import com.baidu.unbiz.multiengine.codec.common.ProtostuffCodec; import com...
package com.baidu.unbiz.multiengine.codec.bytebuf; /** * 二进制编码器 */ public class ByteEncoder extends MessageToByteEncoder<Object> { protected static final Logger LOG = AopLogFactory.getLogger(ByteEncoder.class); private Class<?> headerClass; /** * ByteBuf的编解码器 */ protected ByteBufCodec...
protected void encode(ChannelHandlerContext ctx, Object msg, ByteBuf out) throws CodecException {
5
Emerjoin/Hi-Framework
Web/src/main/java/org/emerjoin/hi/web/DispatcherServlet.java
[ "public class AppConfigurations {\n\n private String viewsDirectory;\n private String welcomeUrl;\n private String templates[]={\"index\"};\n private List<String> frontiers = new ArrayList<>();\n private List<String> frontierPackages = new ArrayList<>();\n private Tunings tunings = new Tunings();\...
import org.emerjoin.hi.web.config.AppConfigurations; import org.emerjoin.hi.web.config.ConfigProvider; import org.emerjoin.hi.web.boot.BootAgent; import org.emerjoin.hi.web.internal.Router; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.enterprise.inject.spi.CDI; import javax.inject.Inject; impor...
package org.emerjoin.hi.web; /** * Created by Mario Junior. */ @WebServlet(urlPatterns = "/*",name = "Hi-Framework-Dispatcher-Servlet",loadOnStartup = 1) public class DispatcherServlet extends HttpServlet { private static Logger _log = LoggerFactory.getLogger(DispatcherServlet.class); @Inject priva...
private Router router;
3
alt236/EasyCursor---Android
library/src/main/java/uk/co/alt236/easycursor/objectcursor/EasyObjectCursor.java
[ "public interface EasyCursor extends Cursor {\n\n /**\n * Returns the value of the requested column as a byte array or throws\n * IllegalArgumentException if the column doesn't exist.\n *\n * @param columnName the column name\n * @return the value from cursor\n * @throws IllegalArgumentEx...
import uk.co.alt236.easycursor.exceptions.ConversionErrorException; import uk.co.alt236.easycursor.internal.conversion.ObjectConverter; import uk.co.alt236.easycursor.internal.conversion.ObjectType; import android.database.AbstractCursor; import android.util.Log; import java.lang.reflect.InvocationTargetException; impo...
/* * *************************************************************************** * Copyright 2015 Alexandros Schillings * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * ht...
private final ObjectConverter mObjectConverter;
3
sivaprasadreddy/jblogger
src/main/java/com/sivalabs/jblogger/web/controllers/BaseController.java
[ "@Entity\n@Table(name = \"TAGS\")\n@Data\npublic class Tag implements Serializable, Comparable<Tag>\n{\n\tprivate static final long serialVersionUID = 1L;\n\n\t@Id\n\t@SequenceGenerator(name=\"tag_id_generator\", sequenceName=\"tag_id_seq\", initialValue = 100, allocationSize=1)\n\t@GeneratedValue(generator = \"tag...
import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.MessageSource; import org.springframework.security.core.annotation.Authentication...
package com.sivalabs.jblogger.web.controllers; public abstract class BaseController { protected final Logger logger = LoggerFactory.getLogger(getClass()); @Autowired protected ApplicationEventPublisher publisher; @Autowired protected MessageSource messageSource; @Autowired protected BlogService blogService; ...
public AuthenticatedUser authenticatedUser(@AuthenticationPrincipal AuthenticatedUser authenticatedUser)
1
Yuanhongliang/HLOLI
app/src/main/java/com/xiaoyuan/hloli/ui/home/activity/ColumnListActivity.java
[ "public abstract class BaseActivity<T extends BasePresenter, E extends BaseModel> extends AppCompatActivity {\n\n public T mPresenter;\n public E mModel;\n public Context mContext;\n\n @Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n doBeforeSetcontentView();\n ...
import android.content.Context; import android.content.Intent; import android.os.Build; import android.support.design.widget.AppBarLayout; import android.support.design.widget.CollapsingToolbarLayout; import android.support.v4.app.ActivityOptionsCompat; import android.support.v7.widget.LinearLayoutManager; import andro...
package com.xiaoyuan.hloli.ui.home.activity; /** * Created by yuan on 2017/5/9. */ public class ColumnListActivity extends BaseActivity<ColumnListPresenterImpl, ColumnListModelImpl> implements ColumnListContract.View, AppBarLayout.OnOffsetChangedListener, View.OnClickListener { @Bind(R.id.app_bar) AppBa...
ListAdapter adapter;
1
Velli20/Tachograph
app/src/main/java/com/velli20/tachograph/ActivityLogSummaryDay.java
[ "public class DataBaseHandler extends SQLiteOpenHelper implements OnDatabaseActionCompletedListener {\n public static final String TAG = \"DataBaseHandler \";\n public static final boolean DEBUG = false;\n\n public static final int DATABASE_VERSION = 3;\n public static final String DATABASE_NAME = \"dri...
import android.content.Context; import android.content.Intent; import android.os.Build; import android.os.Bundle; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android....
/* * * * MIT License * * * * Copyright (c) [2017] [velli20] * * * * 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 righ...
public void onWorkingTimeCalculationsReady(ArrayList<WeekHolder> workingWeeks) {
4
drbild/c2dm4j
src/test/java/org/whispercomm/c2dm4j/async/handler/DeviceBackoffThrottleTest.java
[ "public interface Message {\n\n\t/**\n\t * Gets the identifier for the client to whom the message will be sent.\n\t * \n\t * @return the registration id of the client.\n\t */\n\tpublic String getRegistrationId();\n\n\t/**\n\t * Gets the collapse key for the message. The collapse key is used to\n\t * collapse simila...
import org.junit.Before; import org.junit.Test; import org.whispercomm.c2dm4j.Message; import org.whispercomm.c2dm4j.Response; import org.whispercomm.c2dm4j.ResponseType; import org.whispercomm.c2dm4j.TestMessageFactory; import org.whispercomm.c2dm4j.async.TestContextFactory; import org.whispercomm.c2dm4j.backoff.Attem...
/* * Copyright 2012 The Regents of the University of Michigan * * 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 b...
Context<Message, MessageDecision> context = TestContextFactory
0
Hoiio/hoiio-java
src/com/hoiio/sdk/services/FaxService.java
[ "public class HoiioException extends Exception {\n\n\tprivate static final long serialVersionUID = 1L;\n\t\n\tprivate HoiioStatus status;\n\tprivate String response;\n\t\n\t/**\n\t * Constructs the HoiioException object\n\t */\n\tpublic HoiioException() {\n\t\tsuper();\n\t}\n\t\n\t/**\n\t * Constructs the HoiioExce...
import javax.xml.bind.DatatypeConverter; import com.hoiio.sdk.exception.HoiioException; import com.hoiio.sdk.exception.InternalServerErrorException; import com.hoiio.sdk.objects.HoiioRequest; import com.hoiio.sdk.objects.enums.FaxType; import com.hoiio.sdk.objects.fax.Fax; import com.hoiio.sdk.objects.fax.FaxHistory; i...
package com.hoiio.sdk.services; /* Copyright (C) 2012 Hoiio Pte Ltd (http://www.hoiio.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ri...
map.put(Params.FROM.toString(), DateUtil.dateToString(from), false);
8
vocefiscal/vocefiscal-android
Code/src/org/vocefiscal/adapters/SectionsPagerAdapter.java
[ "public class ImageFetcher extends ImageResizer \n{\n private static final String TAG = \"ImageFetcher\";\n private static final int HTTP_CACHE_SIZE = 10 * 1024 * 1024; // 10MB\n private static final String HTTP_CACHE_DIR = \"http\";\n private static final int IO_BUFFER_SIZE = 8 * 1024;\n\n private D...
import java.util.ArrayList; import org.vocefiscal.bitmaps.ImageFetcher; import org.vocefiscal.database.VoceFiscalDatabase; import org.vocefiscal.fragments.ConferirFragment; import org.vocefiscal.fragments.FiscalizarFragment; import org.vocefiscal.models.Fiscalizacao; import android.support.v4.app.Fragment; import andro...
/** * */ package org.vocefiscal.adapters; /** * @author andre * */ /** * A {@link FragmentPagerAdapter} that returns a fragment corresponding to * one of the sections/tabs/pages. */ public class SectionsPagerAdapter extends FragmentPagerAdapter { private ArrayList<Fiscalizacao> listaDeFiscalizacoes;
private ImageFetcher conferirImageFetcher;
0
napstr/SqlSauce
notifications/src/test/java/space/npstr/sqlsauce/notifications/ChangefeedTest.java
[ "@ExtendWith(LogExceptionExtension.class)\npublic abstract class BaseTest {\n\n public static final String TEST_JDBC_URL_ENV = \"TEST_DB_JDBC\";\n\n protected static final Logger log = LoggerFactory.getLogger(BaseTest.class);\n\n // general purpose reusable sql statements\n //language=PostgreSQL\n pr...
import org.json.JSONObject; import org.junit.jupiter.api.Test; import space.npstr.sqlsauce.BaseTest; import space.npstr.sqlsauce.DatabaseWrapper; import space.npstr.sqlsauce.DbUtils; import space.npstr.sqlsauce.notifications.changefeed.ChangeFeedAdapter; import space.npstr.sqlsauce.notifications.changefeed.ChangeFeedNo...
/* * MIT License * * Copyright (c) 2017-2018, Dennis Neufeld * * 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, c...
interval, (SimpleNsExceptionHandler) exceptions::add);
8
dss886/nForumSDK
src/com/dss886/nForumSDK/service/FavouriteService.java
[ "public class ParamOption {\n\n Map<String, String> params;\n List<NameValuePair> nameValuePairs;\n\n public ParamOption() {\n params = new HashMap<String, String>();\n }\n\n public ParamOption(List<NameValuePair> nameValuePairs) {\n this.nameValuePairs = nameValuePairs;\n }\n\n /...
import java.io.IOException; import com.dss886.nForumSDK.util.ParamOption; import org.apache.http.impl.client.DefaultHttpClient; import org.json.JSONException; import com.dss886.nForumSDK.http.GetMethod; import com.dss886.nForumSDK.http.NForumException; import com.dss886.nForumSDK.http.PostMethod; import com.dss8...
/* * Copyright (C) 2010-2014 dss886 * * 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...
public Favorite getFavourite(int level) throws JSONException,
4
NeoTech-Software/Android-Retainable-Tasks
demo/src/main/java/org/neotech/app/retainabletasksdemo/activity/DemoActivityBasic.java
[ "public interface OnAlertDialogClickListener {\n void onDialogFragmentClick(DialogFragment fragment, int which);\n}", "public class ProgressDialog extends DialogFragment implements DialogInterface.OnClickListener {\n\n public static ProgressDialog getExistingInstance(FragmentManager fragmentManager, String ...
import android.os.Bundle; import androidx.annotation.NonNull; import com.google.android.material.snackbar.Snackbar; import androidx.fragment.app.DialogFragment; import android.view.View; import android.widget.Button; import android.widget.Toast; import org.neotech.app.retainabletasksdemo.OnAlertDialogClickListener; imp...
package org.neotech.app.retainabletasksdemo.activity; public final class DemoActivityBasic extends TaskActivityCompat implements View.OnClickListener, Task.AdvancedCallback, OnAlertDialogClickListener { private static final String TASK_RETAIN_UI_STATE = "retain-ui-state"; private static final String TASK_PR...
private ProgressDialog progressDialog;
1
aginsun/Journey-of-Legends
Journey of Legends/aginsun/journey/client/handlers/ClientTickHandler.java
[ "public class GuiPriceBar extends Gui\n{\n public int xPosition;\n public int borderColor;\n public int yPosition;\n private int width;\n private int height;\n public float barPosition;\n public int id;\n public boolean border;\n public int colour;\n\n public GuiPriceBar(int i, int j, ...
import java.awt.Color; import java.util.EnumSet; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.Tessellator; import net.minecraft.entity.player.EntityPlayer;...
package aginsun.journey.client.handlers; public class ClientTickHandler implements ITickHandler { public Minecraft mc; public World world; private EntityPlayer player; public GoldKeeper gold;
private GuiPriceBar bar;
0
ceridwen-com/ceridwen-standard-interchange-protocol-library
src/main/java/com/ceridwen/circulation/SIP/netty/server/channel/SIPChannelHandler.java
[ "public class MessageNotUnderstood extends Exception {\n /**\n\t * \n\t */\n private static final long serialVersionUID = 1857825095575274480L;\n\n public MessageNotUnderstood() {\n super();\n }\n\n public MessageNotUnderstood(Throwable ex) {\n super(ex);\n }\n}", "@Command(\"97\")\n@T...
import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.apache.commons.logging.Log; ...
/* * Copyright (C) 2020 Ceridwen Limited * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is ...
response = new SCResend();
3
aponom84/MetrizedSmallWorld
src/main/java/org/latna/msw/evaluation/WikiSparseAggregationTest.java
[ "public abstract class MetricElement {\n private final List<MetricElement> friends;\n\n public MetricElement() {\n friends = Collections.synchronizedList(new ArrayList());\n }\n \n /**\n * Calculate metric between current object and another.\n * @param gme any element for whose metric ...
import org.latna.msw.MetricElement; import org.latna.msw.MaskValidator; import org.latna.msw.MetrizedSmallWorld; import org.latna.msw.AlgorithmLib; import org.latna.msw.euclidian.EuclidianFactory; import org.latna.msw.wikisparse.WikiSparse; import org.latna.msw.wikisparse.WikiSparseFactory; import java.io.File; import ...
package org.latna.msw.evaluation; /** * V02.05.2014 * @author Alexander Ponomarenko aponom84@gmail.com */ public class WikiSparseAggregationTest { public static final int NUMBER_OF_THREADS = 4; public static final String outFileName = "WikiSparceAggregate.txt"; /* public static SearchResu...
AlgorithmLib.aggregateSearch3(db, query, maxAttempts, exactNumbers[i], maskValidator);
3
AKuznetsov/russianmorphology
dictionary-reader/src/test/java/org/apache/lucene/TestAllWords.java
[ "public class EnglishLetterDecoderEncoder implements LetterDecoderEncoder {\n public static final int ENGLISH_SMALL_LETTER_OFFSET = 96;\n static public int SUFFIX_LENGTH = 6;\n public static final int DASH_CHAR = 45;\n public static final int DASH_CODE = 27;\n\n public Integer encode(String string) {...
import java.util.Map; import java.util.concurrent.atomic.AtomicLong; import static org.hamcrest.Matchers.hasItem; import org.apache.lucene.morphology.*; import org.apache.lucene.morphology.dictionary.*; import org.apache.lucene.morphology.english.EnglishLetterDecoderEncoder; import org.apache.lucene.morphology.en...
/** * Copyright 2009 Alexander Kuznetsov * * 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...
LetterDecoderEncoder decoderEncoder = new RussianLetterDecoderEncoder();
3
corneil/spring-data-demo
spring-data-neo4j4-demo/src/main/java/org/springframework/data/neo4j/demo/service/UserGroupDataServiceImpl.java
[ "@NodeEntity\n@Data\n@EqualsAndHashCode(of = \"groupName\")\npublic class GroupInfo {\n @NotNull\n private String groupName;\n @NotNull\n @Relationship(type = \"OWNER\")\n private UserInfo groupOwner;\n @GraphId\n private Long id;\n\n public GroupInfo() {\n super();\n }\n\n publ...
import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.neo4j.demo.data.GroupInfo; import org.springframework.data.neo4j.demo.data.GroupMember; import org.springframework.data.neo4j.demo.data.UserInfo; import org.springframe...
package org.springframework.data.neo4j.demo.service; @Service @Transactional @Validated public class UserGroupDataServiceImpl implements UserGroupDataService { private static Logger logger = LoggerFactory.getLogger(UserGroupDataServiceImpl.class); @Autowired protected GroupRepository groupRepository; ...
protected GroupMemberRepository memberRepository;
3
daalft/PaliNLP2
src/de/unitrier/daalft/pali/morphology/strategy/NounStrategy.java
[ "public class ConstructedWord\n{\n\n\t////////////////////////////////////////////////////////////////////////////////////////////////\n\t// Constants\n\t////////////////////////////////////////////////////////////////////////////////////////////////\n\n\t////////////////////////////////////////////////////////////...
import java.util.ArrayList; import java.util.List; import de.general.log.*; import de.unitrier.daalft.pali.morphology.element.ConstructedWord; import de.unitrier.daalft.pali.morphology.element.FeatureSet; import de.unitrier.daalft.pali.morphology.element.Morph; import de.unitrier.daalft.pali.morphology.element.Morpheme...
package de.unitrier.daalft.pali.morphology.strategy; /** * Pre-configured class for nouns. Uses the general declension strategy. * @author David * */ public class NounStrategy extends AbstractStrategy { //////////////////////////////////////////////////////////////// // Constants ////////////////////////...
Paradigm emptyParadigm;
3
Sleeksnap/sleeksnap
src/org/sleeksnap/uploaders/url/TinyURLShortener.java
[ "public class HttpUtil {\n\n\t/**\n\t * Attempt to encode the string silenty\n\t * \n\t * @param string\n\t * The string\n\t * @return The encoded string\n\t */\n\tpublic static String encode(String string) {\n\t\ttry {\n\t\t\treturn URLEncoder.encode(string, \"UTF-8\");\n\t\t} catch (UnsupportedEncoding...
import java.util.regex.Matcher; import java.util.regex.Pattern; import org.sleeksnap.http.HttpUtil; import org.sleeksnap.http.RequestData; import org.sleeksnap.upload.URLUpload; import org.sleeksnap.uploaders.UploadException; import org.sleeksnap.uploaders.Uploader;
/** * Sleeksnap, the open source cross-platform screenshot uploader * Copyright (C) 2014 Nikki <nikki@nikkii.us> * * 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 L...
RequestData data = new RequestData();
1
d-sauer/JCalcAPI
src/main/java/org/jdice/calc/AbstractCalculator.java
[ "public class BindExtensionProvider {\r\n \r\n private static HashMap<Class, Class<? extends Extension>> bind = new HashMap<Class, Class<? extends Extension>>();\r\n \r\n /**\r\n * Bind implemented interface used in {@link AbstractCalculator} instances with concrete implementation of {@link Operator...
import java.text.ParseException; import java.util.Iterator; import java.util.LinkedList; import org.jdice.calc.internal.BindExtensionProvider; import org.jdice.calc.internal.Bracket; import org.jdice.calc.internal.CList; import org.jdice.calc.internal.CListListener; import org.jdice.calc.internal.CacheExtension;...
/* * Copyright 2014 Davor Sauer * * 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...
CacheExtension.setOperator(c);
4
wso2/analytics-solutions
components/ei-analytics/org.wso2.analytics.solutions.ei.analytics/components/siddhi-extensions/siddhi-execution-esbanalytics/src/main/java/org/wso2/extension/siddhi/execution/esbanalytics/decompress/DecompressStreamProcessorExtension.java
[ "public class CompressedEventUtils {\n\n /**\n * Get attributes to be populated in the uncompressed message as an object array\n *\n * @param columns List of output column names\n * @param event event\n * @param payloadsList List of payloads\n * @param eventIndex Index of th...
import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Input; import io.siddhi.annotation.Example; import io.siddhi.annotation.Extension; import io.siddhi.annotation.Parameter; import io.siddhi.annotation.ReturnAttribute; import io.siddhi.annotation.util.DataType; import io.siddhi.core.config.Siddhi...
* @param streamEventChunk Incoming compressed events chunk * @param nextProcessor Next event processor to hand over uncompressed event chunk * @param streamEventCloner Event cloner to copy the compressed event * @param complexEventPopulater Event populator to add uncompressed fields...
case TYPE_BOOL:
1
dspinellis/UMLGraph
src/main/java/org/umlgraph/doclet/ClassGraph.java
[ " public static String buildRelativePathFromClassNames(String contextPackageName, String classPackageName) {\n// path, relative to the root, of the destination class\nString[] contextClassPath = contextPackageName.split(\"\\\\.\");\nString[] currClassPath = classPackageName.split(\"\\\\.\");\n\n// compute relativ...
import static org.umlgraph.doclet.StringUtil.buildRelativePathFromClassNames; import static org.umlgraph.doclet.StringUtil.escape; import static org.umlgraph.doclet.StringUtil.fmt; import static org.umlgraph.doclet.StringUtil.guilWrap; import static org.umlgraph.doclet.StringUtil.guillemize; import static org.umlgraph....
/* * Create a graphviz graph based on the classes in the specified java * source files. * * (C) Copyright 2002-2005 Diomidis Spinellis * * Permission to use, copy, and distribute this software and its * documentation for any purpose and without fee is hereby granted, * provided that the above copyright notice a...
tableLine(Align.LEFT, Font.CLASS.wrap(opt, htmlNewline(escape(c.commentText()))));
5
NeuralEnsemble/neuroConstruct
src/ucl/physiol/neuroconstruct/neuroml/NeuroML2Reader.java
[ "public class NeuroML2CellReader {\n \n public static ClassLogger logger = new ClassLogger(\"NeuroML2CellReader\");\n \n org.neuroml.model.Cell nml2Cell = null;\n \n org.neuroml.model.Cell2CaPools nml2Cell2CaPools = null;\n \n org.neuroml.model.Morphology nml2morphology = null;\n \n pr...
import java.io.*; import java.nio.file.*; import java.net.MalformedURLException; import java.util.HashMap; import java.util.TreeMap; import java.util.LinkedHashMap; import java.util.Vector; import java.util.Random; import java.awt.Color; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet...
/** * neuroConstruct * Software for developing large scale 3D networks of biologically realistic neurons * * Copyright (c) 2009 Padraig Gleeson * UCL Department of Neuroscience, Physiology and Pharmacology * * Development of this software was made possible with funding from the * Medical Research Council ...
logger.logComment("Read in NeuroML 2 cell: " + CellTopologyHelper.printDetails(imported_cell, project), true);
1
mzlogin/guanggoo-android
app/src/main/java/org/mazhuang/guanggoo/notifications/NotificationsPresenter.java
[ "public class NetworkTaskScheduler {\n\n private ExecutorService mExecutor;\n\n private static class InstanceHolder {\n private static NetworkTaskScheduler sInstance = new NetworkTaskScheduler();\n }\n\n public static NetworkTaskScheduler getInstance() {\n return InstanceHolder.sInstance;\...
import org.mazhuang.guanggoo.data.NetworkTaskScheduler; import org.mazhuang.guanggoo.data.OnResponseListener; import org.mazhuang.guanggoo.data.entity.ListResult; import org.mazhuang.guanggoo.data.entity.Notification; import org.mazhuang.guanggoo.data.task.BaseTask; import org.mazhuang.guanggoo.data.task.GetNotificatio...
package org.mazhuang.guanggoo.notifications; /** * @author mazhuang * @date 2018/8/19 */ public class NotificationsPresenter implements NotificationsContract.Presenter { private NotificationsContract.View mView; private BaseTask mCurrentTask; public NotificationsPresenter(NotificationsContract.View ...
NetworkTaskScheduler.getInstance().execute(mCurrentTask);
0
ground-context/ground
modules/postgres/test/edu/berkeley/ground/postgres/dao/core/PostgresNodeDaoTest.java
[ "public class GroundException extends Exception {\n\n private static final long serialVersionUID = 1L;\n\n private final String message;\n private final ExceptionType exceptionType;\n\n public enum ExceptionType {\n DB(\"Database Exception:\", \"%s\"),\n ITEM_NOT_FOUND(\"GroundItemNotFoundException\", \"N...
import java.util.Map; import java.util.Set; import org.junit.Test; import static junit.framework.TestCase.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import edu.berkeley.ground.common.exception.GroundException; import edu.berkeley.ground.common.model.core.Node; import e...
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed ...
VersionSuccessor successor = PostgresTest.versionSuccessorDao.retrieveFromDatabase(
5
neowu/core-ng-demo-project
demo-service/src/main/java/app/demo/customer/web/CustomerWebServiceImpl.java
[ "public interface CustomerWebService {\n @GET\n @Path(\"/customer/:id\")\n CustomerView get(@PathParam(\"id\") Long id);\n\n @POST\n @Path(\"/customer\")\n @ResponseStatus(HTTPStatus.CREATED)\n CustomerView create(CreateCustomerRequest request);\n\n @PUT\n @Path(\"/customer/:id\")\n Cu...
import app.demo.api.CustomerWebService; import app.demo.api.customer.CreateCustomerRequest; import app.demo.api.customer.CustomerView; import app.demo.api.customer.SearchCustomerRequest; import app.demo.api.customer.SearchCustomerResponse; import app.demo.api.customer.UpdateCustomerRequest; import app.demo.customer.ser...
package app.demo.customer.web; public class CustomerWebServiceImpl implements CustomerWebService { @Inject CustomerService customerService; @Override public CustomerView get(Long id) { return customerService.get(id); } @Override public CustomerView create(CreateCustomerRequest re...
public CustomerView update(Long id, UpdateCustomerRequest request) {
5
chedim/minedriod
src/main/java/com/onkiup/minedroid/gui/drawables/ColorDrawable.java
[ "@SideOnly(Side.CLIENT)\npublic class GuiManager {\n /**\n * Current MineDroid theme\n */\n public static HashMap<Integer, Style> themes = new HashMap<Integer, Style>();\n\n /**\n * Minecraft client instance\n */\n @SideOnly(Side.CLIENT)\n protected static Minecraft mc = Minecraft.get...
import com.onkiup.minedroid.gui.GuiManager; import com.onkiup.minedroid.gui.XmlHelper; import com.onkiup.minedroid.gui.primitives.Color; import com.onkiup.minedroid.gui.primitives.GLColor; import com.onkiup.minedroid.gui.primitives.Point; import com.onkiup.minedroid.gui.resources.Style; import com.onkiup.minedroid.gui....
package com.onkiup.minedroid.gui.drawables; /** * Draws a colored rectangle */ public class ColorDrawable implements Drawable { /** * Rectangle color */ protected GLColor color; /** * Rectangle size */ protected Point size; private boolean debug; public ColorDrawable()...
setSize(xmlHelper.getSize(GuiManager.NS, new Point(0, 0)));
0
CaMnter/EasyGank
app/src/main/java/com/camnter/easygank/views/EasyWebViewActivity.java
[ "public abstract class BaseToolbarActivity extends BaseAppCompatActivity {\n\n @Bind(R.id.toolbar) protected Toolbar mToolbar;\n @Bind(R.id.app_bar_layout) protected AppBarLayout mAppBarLayout;\n\n protected ActionBarHelper mActionBarHelper;\n\n\n /**\n * Initialize the toolbar in the layout\n *...
import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.design.widget.Snackbar; import a...
/* * {EasyGank} Copyright (C) {2015} {CaMnter} * * This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. * This is free software, and you are welcome to redistribute it * under certain conditions; type `show c' for details. * * The hypothetical commands `show w' and `show c' should show th...
if (GankTypeDict.urlType2TypeDict.get(this.getGankType()) == GankType.video) {
2
jentrata/jentrata
ebms-as4/src/main/java/org/jentrata/ebms/as4/internal/routes/EbMS3InboundRouteBuilder.java
[ "public class Security {\n\n public static final Security DEFAULT_SECURITY = new Security();\n\n public enum ReplyPatternType {\n Callback,\n Response\n }\n\n private boolean sendReceipt = true;\n private ReplyPatternType sendReceiptReplyPattern = ReplyPatternType.Callback;\n private...
import org.apache.camel.Exchange; import org.apache.camel.LoggingLevel; import org.apache.camel.Processor; import org.apache.camel.ValidationException; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.builder.xml.Namespaces; import org.apache.camel.component.freemarker.FreemarkerConstants; import o...
package org.jentrata.ebms.as4.internal.routes; /** * Exposes an HTTP endpoint that consumes AS4 Messages * * @author aaronwalker */ public class EbMS3InboundRouteBuilder extends RouteBuilder { private String ebmsHttpEndpoint = "jetty:http://0.0.0.0:8081/jentrata/ebms/inbound"; private String ebmsRespons...
private MessageDetector messageDetector;
1
wanasit/chrono-java
src/main/java/com/wanasit/chrono/parser/en/ENInternationalStandardParser.java
[ "public class ChronoOption {\n\n public static final ChronoOption sharedOptions = standardOptions();\n\n public final List<Parser> parsers = new ArrayList<Parser>();\n public final List<Refiner> refiners = new ArrayList<Refiner>();\n\n public final Map<String, Integer> timezoneMap = new HashMap<String, ...
import java.util.Date; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.wanasit.chrono.ChronoOption; import com.wanasit.chrono.ParsedDateComponent; import com.wanasit.chrono.ParsedResult; import com.wanasit.chrono.ParsedDateComponent.Components; import com.wanasit.chrono.parser.ParserAbstract;
package com.wanasit.chrono.parser.en; public class ENInternationalStandardParser extends ParserAbstract { // YYYY-MM-DDThh:mm:ss.sTZD // TZD = (Z or +hh:mm or -hh:mm) protected static String regPattern = "(?<=\\W|^)" + "([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})" + "(?:T" //.. + "...
result.start.assign(Components.Year, Integer.parseInt(matcher.group(YEAR_NUMBER_GROUP)));
3
biointec/halvade
halvade/src/be/ugent/intec/halvade/tools/BWAAlnInstance.java
[ "public enum HalvadeCounters {\n TIME_BWA_ALN,\n TIME_BWA_MEM,\n TIME_BOWTIE2,\n TIME_CUSHAW2,\n TIME_BWA_SAMPE,\n TIME_STAR,\n TIME_STAR_REF,\n TIME_STAR_BUILD,\n TIME_ELPREP,\n TIME_BEDTOOLS,\n TIME_SAMTOBAM,\n TIME_SAMPLESAM,\n TIME_HADOOP_SAMTOBAM,\n TIME_PICARD_CLEANSA...
import org.apache.hadoop.mapreduce.Mapper; import be.ugent.intec.halvade.hadoop.mapreduce.HalvadeCounters; import be.ugent.intec.halvade.utils.CommandGenerator; import be.ugent.intec.halvade.utils.HalvadeFileUtils; import be.ugent.intec.halvade.utils.Logger; import be.ugent.intec.halvade.utils.HalvadeConf; import be.ug...
/* * Copyright (C) 2014 ddecap * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed...
private SAMStreamHandler ssh;
4
wso2-extensions/identity-outbound-auth-samlsso
components/org.wso2.carbon.identity.application.authenticator.samlsso/src/test/java/org/wso2/carbon/identity/application/authenticator/samlsso/manager/X509CredentialImplTest.java
[ "public final class TestConstants {\n\n private TestConstants() {\n\n }\n\n public static final String SAML2_POST_REQUEST =\n \"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c2FtbHA6QXV0aG5SZXF1ZXN0IHhtbG5zOnNhbWxwPSJ1cm46b2F\" +\n \"zaXM6bmFtZXM6dGM6U0FNTDoyLjA6cHJvdG9j...
import org.apache.commons.collections.CollectionUtils; import org.mockito.Mock; import org.opensaml.security.credential.UsageType; import org.opensaml.security.x509.X509Credential; import org.powermock.core.classloader.annotations.PrepareForTest; import org.testng.IObjectFactory; import org.testng.annotations.BeforeCla...
/* * Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
keyStore = SSOUtils.loadKeyStoreFromFileSystem(TestUtils.getFilePath("wso2carbon.jks"),
1
Radseq/Mystic-Bastion
src/main/java/renderEngine/EntityRenderer.java
[ "public class Entity {\r\n\r\n\tprivate TexturedModel model;\r\n\tprivate Vector3f position;\r\n\tprivate float rotX, rotY, rotZ;\r\n\tprivate float scale;\r\n\r\n\tprivate int textureIndex = 0;\r\n\tprivate String entityName;\r\n\r\n\t// private float positionX;\r\n\t// private float positionY;\r\n\t// private flo...
import java.util.List; import java.util.Map; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL13; import org.lwjgl.opengl.GL20; import org.lwjgl.opengl.GL30; import org.lwjgl.util.vector.Matrix4f; import entities.Entity; import models.RawModel; import models.TexturedModel; import shaders.StaticShader; import tex...
package renderEngine; /* Render entity model from VAO */ public class EntityRenderer { private StaticShader shader; public EntityRenderer(StaticShader shader, Matrix4f projectionMatrix) { this.shader = shader; shader.start(); shader.loadProjectionMatrix(projectionMatrix); shader.connectTextureUnits(); ...
Matrix4f transformationMatrix = Maths.createTransformationMatrix(entity.getPosition(), entity.getRotX(),
4
Gocnak/Botnak
src/main/java/gui/forms/GUISettings.java
[ "@SuppressWarnings(\"unused\")\npublic class Scalr {\n /**\n * System property name used to define the debug boolean flag.\n * <p>\n * Value is \"<code>imgscalr.debug</code>\".\n */\n public static final String DEBUG_PROPERTY_NAME = \"imgscalr.debug\";\n\n /**\n * System property name u...
import gui.JFontChooser; import lib.scalr.Scalr; import sound.Sound; import sound.SoundEngine; import util.Constants; import util.Utils; import util.settings.Settings; import javax.imageio.ImageIO; import javax.swing.*; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.DefaultTreeModel; import jav...
public void customModButtonActionPerformed() { setIcon(0); } public void useCustomBroadStateChanged() { customBroad.setEnabled(useCustomBroad.isSelected()); customBroadButton.setEnabled(useCustomBroad.isSelected()); } public void customBroadButtonActionPerformed() { ...
img = Scalr.resize(img, Scalr.Method.ULTRA_QUALITY, 40, 14);
0
gantonious/ViewCellAdapter
sample-app/src/main/java/ca/antonious/sample/ComplexDecoratorCompositionSample.java
[ "public class SampleModel {\n private String name;\n\n public SampleModel(String name) {\n this.name = name;\n }\n\n public String getName() {\n return name;\n }\n}", "public class EmptyViewCell extends GenericViewCell<EmptyViewCell.ViewHolder, String> {\n\n public EmptyViewCell(St...
import android.os.Bundle; import android.support.v4.content.ContextCompat; import android.support.v7.widget.LinearLayoutManager; import android.view.Menu; import android.view.MenuItem; import java.util.Arrays; import java.util.Locale; import ca.antonious.sample.models.SampleModel; import ca.antonious.sample.viewcells.E...
package ca.antonious.sample; /** * Created by George on 2017-01-08. */ public class ComplexDecoratorCompositionSample extends BaseActivity { private ViewCellAdapter viewCellAdapter;
private HomogeneousSection<SampleModel, SampleModelViewCell> section1;
0
AngelaFabregues/dipGame
dip/src/es/csic/iiia/fabregues/dip/Player.java
[ "public enum Phase {\n\tSPR, SUM, FAL, AUT, WIN\n}", "public class Power {\n\t\n\tprivate String name;\n\t\n\tprivate List<Province> own;\n\tprivate List<Province> homes;\n\tprivate List<Region> control;\n\t\n\tpublic Power(String name) {\n\t\tthis.name = name;\n\n\t\tresetControl();\n\t\t\n\t\tresetOwn();\n\t\th...
import java.io.IOException; import java.util.List; import es.csic.iiia.fabregues.dip.board.Phase; import es.csic.iiia.fabregues.dip.board.Power; import es.csic.iiia.fabregues.dip.comm.Comm; import es.csic.iiia.fabregues.dip.comm.IComm; import es.csic.iiia.fabregues.dip.comm.MessageBuilder; import es.csic.iiia.fabregues...
package es.csic.iiia.fabregues.dip; /** * Player of the game. * * @author Angela Fabregues, IIIA-CSIC, fabregues@iiia.csic.es */ public abstract class Player extends Observer{ protected Power me; private boolean dead = false; public Power getMe() { return me; } protected int passcode; private String...
List<Order> orders = play();
7
idega/is.idega.idegaweb.egov.bpm
src/java/is/idega/idegaweb/egov/bpm/cases/presentation/beans/CasesBPMAssetsState.java
[ "public class IWBundleStarter implements IWBundleStartable {\n\t\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"is.idega.idegaweb.egov.bpm\";\n\n\tpublic void start(IWBundle starterBundle) {\n\t\t\n//\t\tEgovBPMViewManager viewManager = EgovBPMViewManager.getInstance(starterBundle.getApplication());\n//\t\t...
import is.idega.idegaweb.egov.bpm.IWBundleStarter; import is.idega.idegaweb.egov.bpm.cases.CasesBPMProcessView; import is.idega.idegaweb.egov.bpm.cases.CasesBPMProcessView.CasesBPMProcessViewBean; import is.idega.idegaweb.egov.bpm.cases.CasesBPMProcessView.CasesBPMTaskViewBean; import is.idega.idegaweb.egov.bpm.media.P...
package is.idega.idegaweb.egov.bpm.cases.presentation.beans; /** * * @author <a href="civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.47 $ * * Last modified: $Date: 2009/07/14 16:26:58 $ by $Author: valdas $ * */ @Scope("request") @Service(CasesBPMAssetsState.beanIdentifier) public class Ca...
public CasesBPMProcessViewBean getProcessView() {
2
emboss/krypt-core-java
src/org/jruby/ext/krypt/asn1/Asn1Codecs.java
[ "public class Errors {\n \n private Errors() { }\n \n public static RaiseException newKryptError(Ruby rt, String message) {\n return newError(rt, \"Krypt::Error\", message);\n }\n \n public static RaiseException newParseError(Ruby rt, String message) {\n return newError(rt, \"Krypt...
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.math.BigInteger; import java.nio.charset.Charset; import org.jcodings.specific.UTF8Encoding; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFor...
/* * krypt-core API - Java version * * Copyright (c) 2011-2013 * Hiroshi Nakamura <nahi@ruby-lang.org> * Martin Bosslet <martin.bosslet@gmail.com> * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the ...
static final Asn1Codec DEFAULT = new Asn1Codec() {
1
tvportal/android
app/src/main/java/com/mitechlt/tvportal/play/async/AsyncLinkParser.java
[ "public class VideoCastManager extends BaseCastManager\n implements OnMiniControllerChangedListener, OnFailedListener {\n\n public static final String EXTRA_HAS_AUTH = \"hasAuth\";\n public static final String EXTRA_MEDIA = \"media\";\n public static final String EXTRA_START_POINT = \"startPoint\";\...
import android.app.Activity; import android.app.ProgressDialog; import android.content.ContentResolver; import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; import android.net.Uri; import android.os...
System.out.println(urlToReturn); }*/ else if (mirrorName.equals("movpod.net")) { // 1. Parse the PrimeWire frame, to get the actual mMirrorLink to the hosting site /* Document doc = Jsoup.connect(mirrorLink).timeout(10000).get(); Element frame ...
Intent intent = new Intent(mContext, LocalPlayerActivity.class);
3
alleveenstra/Mujina
mujina-idp/src/main/java/nl/surfnet/mujina/controllers/IdentityProviderAPI.java
[ "@XmlRootElement\npublic class Attribute implements Serializable {\n private static final long serialVersionUID = 1L;\n\n private String value;\n\n public String getValue() {\n return value;\n }\n\n @XmlElement\n public void setValue(final String value) {\n this.value = value;\n }...
import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.autho...
/* * Copyright 2012 SURFnet bv, The Netherlands * * 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 ...
public void setAttribute(@PathVariable String name, @RequestBody Attribute attribute) {
0