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
neo4j/docker-neo4j
src/test/java/com/neo4j/docker/neo4jadmin/TestBackupRestore.java
[ "public class DatabaseIO\n{\n\tprivate static Config TEST_DRIVER_CONFIG = Config.builder().withoutEncryption().build();\n\tprivate static final Logger log = LoggerFactory.getLogger( DatabaseIO.class );\n\n\tprivate GenericContainer container;\n\tprivate String boltUri;\n\n\tpublic DatabaseIO( GenericContainer conta...
import com.neo4j.docker.utils.DatabaseIO; import com.neo4j.docker.utils.HostFileSystemOperations; import com.neo4j.docker.utils.Neo4jVersion; import com.neo4j.docker.utils.SetContainerUser; import com.neo4j.docker.utils.TestSettings; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assumptions; imp...
package com.neo4j.docker.neo4jadmin; public class TestBackupRestore { // with authentication // with non-default user private static final Logger log = LoggerFactory.getLogger( TestBackupRestore.class ); @BeforeAll static void beforeAll() { Assumptions.assumeTrue( TestSettings.NEO4J_...
SetContainerUser.nonRootUser( container );
3
lokalized/lokalized-java
src/main/java/com/lokalized/Ordinality.java
[ "@Immutable\nstatic class MapEntry<K, V> {\n @Nonnull\n private final K key;\n @Nonnull\n private final V value;\n\n /**\n * Provides a map entry with the given key and value.\n *\n * @param key the key for the map entry, not null\n * @param value the value for the map entry, not null\n * @param <K...
import com.lokalized.Maps.MapEntry; import javax.annotation.Nonnull; import java.math.BigDecimal; import java.math.BigInteger; import java.text.Collator; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.Optional; import java...
if (inSet(n, BIG_DECIMAL_2, BIG_DECIMAL_3)) return TWO; // n = 4 if (equal(n, BIG_DECIMAL_4)) return FEW; // n = 6 if (equal(n, BIG_DECIMAL_6)) return MANY; return OTHER; }, Sets.sortedSet( ONE, ...
&& notInSet(n.remainder(BIG_DECIMAL_100), BIG_DECIMAL_12, BIG_DECIMAL_13))
5
2cloud/android2cloud
src/com/suchagit/android2cloud/Billing.java
[ "class RequestPurchase extends BillingRequest {\n public final String mProductId;\n public final String mDeveloperPayload;\n\n public RequestPurchase(String itemId) {\n this(itemId, null);\n }\n\n public RequestPurchase(String itemId, String developerPayload) {\n // This object is never...
import android.app.Dialog; import android.content.ComponentName; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment...
/* * Copyright (C) 2010 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
public void onRequestPurchaseResponse(RequestPurchase request,
0
atolcd/alfresco-audit-share
audit-share-platform/src/main/java/com/atolcd/alfresco/web/scripts/shareStats/AuditExportGet.java
[ "public class AuditObjectPopularity {\n\tprivate int popularity;\n\tprivate String auditObject; // 'audit_object' database field\n\tprivate String objectName;\n\tprivate String objectDisplayName;\n\tprivate String auditSite;\n\tprivate String siteComponent;\n\n\tpublic AuditObjectPopularity() {\n\n\t}\n\n\tpublic i...
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.charset.Charset; import java.sql.SQLException; import java.util.ArrayList; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; im...
Assert.notNull(authorityService); } @Override public void execute(WebScriptRequest req, WebScriptResponse res) throws IOException { try { if (PermissionsHelper.isAuthorized(req)) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); Charset charset = Charset.forName("UTF-8"); ...
List<AuditObjectPopularity> listAudit = (List<AuditObjectPopularity>) model.get("popularity");
0
ulisesbocchio/spring-boot-security-saml
spring-boot-security-saml/src/main/java/com/github/ulisesbocchio/spring/boot/security/saml/configurer/ServiceProviderBuilder.java
[ "public class DSLSAMLContextProviderImpl extends SAMLContextProviderImpl {\n\n\n /**\n * Key manager provides information about private certificate and trusted keys provide in addition to\n * cryptographic material present in entity metadata documents.\n *\n * @param keyManager key manager\n ...
import com.github.ulisesbocchio.spring.boot.security.saml.bean.override.DSLSAMLContextProviderImpl; import com.github.ulisesbocchio.spring.boot.security.saml.bean.override.DSLSAMLContextProviderLB; import com.github.ulisesbocchio.spring.boot.security.saml.bean.override.LocalExtendedMetadata; import com.github.ulisesboc...
* coming from IDP or IDP initialized SSO. HTTP-POST and HTTP-Redirect bindings are supported. * </p> * * @return the {@link WebSSOProfileHoKImpl} configurer. * @throws Exception Any exception during configuration. */ public WebSSOProfileHoKConfigurer hokProfile() { return getOr...
public ServiceProviderBuilder localExtendedMetadata(LocalExtendedMetadata extendedMetadata) {
2
RedditAndroidDev/Tamagotchi
Tamagotchi/src/com/redditandroiddevelopers/tamagotchi/TamagotchiConfiguration.java
[ "public class CreatureDao {\n private CommonDatabase<Creature> db;\n private Mapper<Creature> rowMapper;\n\n public CreatureDao(CommonDatabase<Creature> database,\n Mapper<Creature> mapper) {\n db = database;\n rowMapper = mapper;\n }\n\n public Creature create(Creature creat...
import com.badlogic.gdx.Application; import com.badlogic.gdx.graphics.Color; import com.redditandroiddevelopers.tamagotchi.dao.CreatureDao; import com.redditandroiddevelopers.tamagotchi.dao.CreatureEvolutionDao; import com.redditandroiddevelopers.tamagotchi.dao.CreatureRaiseTypeDao; import com.redditandroiddevelopers.t...
package com.redditandroiddevelopers.tamagotchi; /** * A place to store runtime configuration for use throughout the lifetime of a * {@link TamagotchiGame} object. Not to be confused with a store for game * settings. * * @author Santoso Wijaya */ public class TamagotchiConfiguration { public boolean debug...
public CreatureRaiseTypeDao creatureRaiseTypeDao;
2
TheGoodlike13/hls-downloader
src/test/java/eu/goodlike/hls/download/m3u/MediaPlaylistTest.java
[ "public interface FfmpegProcessor {\n\n /**\n * Spawns an ffmpeg process with given input, output and any additional params provided by the implementation\n *\n * @param output output file name\n * @param firstInput input file name\n * @param inputs additional input file names\n * @return...
import com.google.common.collect.ImmutableList; import eu.goodlike.hls.download.ffmpeg.FfmpegProcessor; import eu.goodlike.hls.download.m3u.data.MediaPlaylistData; import eu.goodlike.hls.download.m3u.data.MediaPlaylistDataFactory; import eu.goodlike.hls.download.m3u.data.builder.MediaPlaylistBuilder; import eu.goodlike...
package eu.goodlike.hls.download.m3u; public class MediaPlaylistTest { private static final String PLAYLIST_NAME = "source"; private static final String RESOLUTION = "1920x1080"; private static final HttpUrl URL = HttpUrl.parse("https://localhost:8080/source.m3u"); private final HlsParser hlsParser...
StreamPartDurationTag partDurationTag = new StreamPartDurationTag(BigDecimal.ONE);
7
kakao/hbase-tools
hbase0.98/hbase-table-stat-0.98/src/test/java/com/kakao/hbase/stat/TableStatOptionTest.java
[ "public abstract class Args {\n public static final String OPTION_REGION = \"region\";\n public static final String OPTION_OUTPUT = \"output\";\n public static final String OPTION_SKIP_EXPORT = \"skip-export\";\n public static final String OPTION_VERBOSE = \"verbose\";\n public static final String OP...
import com.kakao.hbase.common.Args; import com.kakao.hbase.common.util.AlertSender; import com.kakao.hbase.common.util.AlertSenderTest; import com.kakao.hbase.stat.load.Level; import com.kakao.hbase.stat.load.SortKey; import com.kakao.hbase.stat.load.TableName; import org.apache.hadoop.hbase.HRegionInfo; import org.apa...
/* * Copyright 2015 Kakao Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
assertNull(command.getLoad().getLoadMapPrev().get(new Level(new TableName(tableName))));
5
jhy/jsoup
src/test/java/org/jsoup/nodes/DocumentTest.java
[ "public class Jsoup {\n private Jsoup() {}\n\n /**\n Parse HTML into a Document. The parser will make a sensible, balanced document tree out of any HTML.\n\n @param html HTML to parse\n @param baseUri The URL where the HTML was retrieved from. Used to resolve relative URLs to absolute URLs, tha...
import org.jsoup.Jsoup; import org.jsoup.TextUtil; import org.jsoup.integration.ParseTest; import org.jsoup.nodes.Document.OutputSettings; import org.jsoup.nodes.Document.OutputSettings.Syntax; import org.jsoup.parser.ParseSettings; import org.jsoup.parser.Parser; import org.jsoup.select.Elements; import org.junit.jupi...
package org.jsoup.nodes; /** Tests for Document. @author Jonathan Hedley, jonathan@hedley.net */ public class DocumentTest { private static final String charsetUtf8 = "UTF-8"; private static final String charsetIso8859 = "ISO-8859-1"; @Test public void setTextPreservesDocumentStructure() { ...
Parser parser = Parser.htmlParser().settings(ParseSettings.preserveCase);
6
jwtk/jjwt
extensions/orgjson/src/main/java/io/jsonwebtoken/orgjson/io/OrgJsonSerializer.java
[ "public final class Encoders {\n\n public static final Encoder<byte[], String> BASE64 = new ExceptionPropagatingEncoder<>(new Base64Encoder());\n public static final Encoder<byte[], String> BASE64URL = new ExceptionPropagatingEncoder<>(new Base64UrlEncoder());\n\n private Encoders() { //prevent instantiati...
import java.util.Date; import java.util.Map; import io.jsonwebtoken.io.Encoders; import io.jsonwebtoken.io.SerializationException; import io.jsonwebtoken.io.Serializer; import io.jsonwebtoken.lang.Classes; import io.jsonwebtoken.lang.Collections; import io.jsonwebtoken.lang.DateFormats; import io.jsonwebtoken.lang.Obje...
/* * Copyright (C) 2014 jsonwebtoken.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
Collection c = Collections.arrayToList(object);
4
SergioDim3nsions/RealmContactsForAndroid
app/src/main/java/sergio/vasco/realmforandroid/app/section/main/di/MainActivityModule.java
[ "public interface Bus {\n void post(Object object);\n void postInmediate(Object object);\n void register(Object object);\n void unregister(Object object);\n}", "public interface InteractorInvoker {\n void execute(Interactor interactor);\n void execute(Interactor interactor, InteractorPriority priority);\n}"...
import dagger.Module; import dagger.Provides; import sergio.vasco.androidforexample.domain.abstractions.Bus; import sergio.vasco.androidforexample.domain.interactors.InteractorInvoker; import sergio.vasco.androidforexample.domain.interactors.main.GetContactsFromDataBaseInteractor; import sergio.vasco.androidforexample....
package sergio.vasco.realmforandroid.app.section.main.di; /** * Name: Sergio Vasco * Date: 15/1/16. */ @Module public class MainActivityModule { private final MainActivity mainActivity; public MainActivityModule(MainActivity mainActivity) { this.mainActivity = mainActivity; }
@PerActivity @Provides MainPresenter providedMainPresenter(Bus bus,InteractorInvoker interactorInvoker, InsertContactsIntoDataBaseInteractor insertContactsIntoDataBaseInteractor,GetContactsFromDataBaseInteractor getContactsFromDataBaseInteractor, PresentationContactMapper presentationContactMapper){
2
jsmith613/Aruco-Marker-Tracking-Android
openCVTutorial1CameraPreview/src/main/java/es/ava/aruco/android/Aruco3dActivity.java
[ "public abstract class RendererActivity extends Activity implements ISceneController\n{\n\tpublic Scene scene;\n\tprotected GLSurfaceView _glSurfaceView;\n\t\n\tprotected Handler _initSceneHander;\n\tprotected Handler _updateSceneHander;\n\t\n private boolean _renderContinuously;\n \n \n\tfinal Runnable _i...
import java.util.Vector; import min3d.core.RendererActivity; import min3d.vos.Light; import org.opencv.core.Mat; import android.app.AlertDialog; import android.content.DialogInterface; import android.graphics.PixelFormat; import android.os.Bundle; import android.view.ViewGroup.LayoutParams; import android.view.Window; ...
package es.ava.aruco.android; public abstract class Aruco3dActivity extends RendererActivity { public boolean mLookForBoard; public float mMarkerSize;
public BoardConfiguration mBC;
3
JoostvDoorn/GlutenVrijApp
app/src/main/java/com/joostvdoorn/glutenvrij/scanner/core/oned/MultiFormatUPCEANReader.java
[ "public final class BarcodeFormat {\n\n // No, we can't use an enum here. J2ME doesn't support it.\n\n private static final Hashtable VALUES = new Hashtable();\n\n /** Aztec 2D barcode format. */\n public static final BarcodeFormat AZTEC = new BarcodeFormat(\"AZTEC\");\n\n /** CODABAR 1D format. */\n public s...
import com.joostvdoorn.glutenvrij.scanner.core.BarcodeFormat; import com.joostvdoorn.glutenvrij.scanner.core.DecodeHintType; import com.joostvdoorn.glutenvrij.scanner.core.NotFoundException; import com.joostvdoorn.glutenvrij.scanner.core.Reader; import com.joostvdoorn.glutenvrij.scanner.core.ReaderException; import com...
/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
} catch (ReaderException re) {
4
lucassaldanha/playdoh
src/test/java/com/lsoftware/playdoh/PlaydohRandomDataObjectBuilder.java
[ "public class ObjectWithArray {\n\n private Integer[] intArray;\n\n public ObjectWithArray() {}\n\n public void setIntArray(Integer[] intArray) {\n this.intArray = intArray;\n }\n\n public Integer[] getIntArray() {\n return intArray;\n }\n}", "public class ObjectWithCollection {\n\...
import com.lsoftware.playdoh.objects.collections.ObjectWithArray; import com.lsoftware.playdoh.objects.collections.ObjectWithCollection; import com.lsoftware.playdoh.objects.collections.ObjectWithStringObjectMap; import com.lsoftware.playdoh.objects.models.*; import com.lsoftware.playdoh.objects.models.ClassWithoutDefa...
package com.lsoftware.playdoh; public class PlaydohRandomDataObjectBuilder { @Test public void testBuildDummyObject() throws Exception { final Dummy builtDummy = Playdoh.build(Dummy.class); assertNotNull(builtDummy); assertNotNull(builtDummy.getIntegerValue()); assertNotNull(...
ClassWithoutDefaultConstructor object = Playdoh.build(ClassWithoutDefaultConstructor.class);
3
mechero/code-quality-game
sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/users/service/YamlUserCreatorService.java
[ "public interface UserMongoRepository extends CrudRepository<User, String> {\n\n Optional<User> findUserByLogin(final String login);\n\n List<User> findAllByTeam(final String team);\n\n @Query(\"{'team': {$not: {$eq: null}}}\")\n Stream<User> findAllUsersWithTeam();\n\n @Query(\"{'team': {$not: {$eq:...
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; import com.thepracticaldeveloper.devgame.modules.users.dao.UserMongoRepository; import com.thepracticaldeveloper.devgame.modules.users.dao.TeamMongoRepository; import com.thepracticaldeveloper.devgame.modules.u...
package com.thepracticaldeveloper.devgame.modules.users.service; @Service public class YamlUserCreatorService { private static final Logger log = LoggerFactory.getLogger(YamlUserCreatorService.class); private static final ObjectMapper yamlMapper = new ObjectMapper(new YAMLFactory());
private final UserMongoRepository userRepository;
0
lucene-gosen/lucene-gosen
src/main/java/net/java/sen/SenFactory.java
[ "public class IOUtils {\n /** This reflected {@link Method} is {@code null} before Java 7 */\n private static final Method SUPPRESS_METHOD;\n static {\n Method m;\n try {\n m = Throwable.class.getMethod(\"addSuppressed\", Throwable.class);\n } catch (Exception e) {\n m = null;\n }\n SUPP...
import net.java.sen.dictionary.Dictionary; import net.java.sen.dictionary.Tokenizer; import net.java.sen.dictionary.Viterbi; import net.java.sen.tokenizers.ja.JapaneseTokenizer; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; i...
/* * Copyright (C) 2002-2007 * Takashi Okamoto <tora@debian.org> * Matt Francis <asbel@neosheffield.co.uk> * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of ...
static Viterbi getViterbi(String dictionaryDir, boolean tokenizeUnknownKatakana) {
3
MaxSmile/EasyVPN-Free
Android-code/app/src/main/java/com/vasilkoff/easyvpnfree/adapter/BookmarkServerListAdapter.java
[ "public class ServerActivity extends BaseActivity {\n\n private static final int START_VPN_PROFILE = 70;\n private BroadcastReceiver br;\n private BroadcastReceiver trafficReceiver;\n public final static String BROADCAST_ACTION = \"de.blinkt.openvpn.VPN_STATUS\";\n\n private static OpenVPNService mVP...
import android.content.Context; import android.content.Intent; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import com.vasilkoff.e...
package com.vasilkoff.easyvpnfree.adapter; /** * Created by Kusenko on 22.01.2017. */ public class BookmarkServerListAdapter extends RecyclerView.Adapter<BookmarkServerListAdapter.BookmarkHolder>{ private List<Server> serverList = new ArrayList<Server>(); private Context context; private Map<String,...
private DBHelper dbHelper;
1
RepreZen/KaiZen-OpenAPI-Editor
com.reprezen.swagedit/src/com/reprezen/swagedit/validation/SwaggerValidator.java
[ "public class Activator extends AbstractUIPlugin {\n\n public static final String PLUGIN_ID = \"com.reprezen.swagedit\";\n public static final String TEMPLATE_STORE_ID = PLUGIN_ID + \".templates\";\n\n private static Activator plugin;\n\n private ContributionTemplateStore templateStore;\n\n private C...
import java.util.HashMap; import org.eclipse.jface.preference.IPreferenceStore; import com.reprezen.swagedit.Activator; import com.reprezen.swagedit.core.json.references.JsonReferenceFactory; import com.reprezen.swagedit.core.json.references.JsonReferenceValidator; import com.reprezen.swagedit.core.validation.JsonSchem...
/******************************************************************************* * Copyright (c) 2016 ModelSolv, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is a...
private JsonSchemaValidator schemaValidator;
3
Amab/SWADroid
SWADroid/src/main/java/es/ugr/swad/swadroid/modules/information/Information.java
[ "public class Constants {\n /**\n * URL of SWAD UGR Server\n */\n public static final String SWAD_UGR_SERVER = \"swad.ugr.es\";\n /**\n * URL of OpenSWAD Server\n */\n public static final String OPENSWAD_SERVER = \"openswad.org\";\n /**\n * Server URL\n */\n public static f...
import android.os.Bundle; import android.view.View; import android.webkit.WebView; import org.ksoap2.serialization.SoapObject; import es.ugr.swad.swadroid.Constants; import es.ugr.swad.swadroid.R; import es.ugr.swad.swadroid.gui.ProgressScreen; import es.ugr.swad.swadroid.gui.WebViewFactory; import es.ugr.swad.swadroid...
/** * Information module for get courses's information * * @author Jose Antonio Guerrero Aviles <cany20@gmail.com> */ package es.ugr.swad.swadroid.modules.information; /** * Module for get course info * @see <a href="https://openswad.org/ws/#getCourseInfo">getCourseInfo</a> * */ public class Information ext...
webview = WebViewFactory.getMathJaxWebView(webview);
2
briandilley/jsonrpc4j
src/test/java/com/googlecode/jsonrpc4j/server/JsonRpcServerTest.java
[ "public interface ErrorResolver {\n\t\n\t/**\n\t * Resolves the error using the {@link Throwable} that\n\t * was thrown by the given {@link Method} when passed\n\t * the given {@code arguments}. If the error can not\n\t * be resolved then null is returned.\n\t *\n\t * @param t the {@link Throwable}\n\t * @...
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.TextNode; import com.googlecode.jsonrpc4j.ErrorResolver; import com.googlecode.jsonrpc4j.JsonRpcInterceptor; import com.googlecode.jsonrpc4j.JsonRpcServer; import com.googlecode.jsonrpc4j.util.Util; import org.easymock.EasyMock; ...
package com.googlecode.jsonrpc4j.server; @RunWith(EasyMockRunner.class) public class JsonRpcServerTest { @Mock(type = MockType.NICE) private ServiceInterface mockService; @Mock(type = MockType.NICE) private JsonRpcInterceptor mockInterceptor; private ByteArrayOutputStream byteArrayOutputStream; private JsonR...
jsonRpcServer = new JsonRpcServer(Util.mapper, mockService, ServiceInterface.class);
4
meridor/stecker
stecker-plugin-loader/src/test/java/org/meridor/stecker/dev/DevClassesScannerTest.java
[ "public final class JarHelper {\n\n private static final String CLASS_EXTENSION = \".class\";\n\n private static final String FILE_SEPARATOR = FileSystems.getDefault().getSeparator();\n\n private static final String DEPENDENCY_JAR_NAME = \"dependency.jar\";\n\n public static final String TEST_RESOURCE_N...
import org.junit.Rule; import org.junit.Test; import org.meridor.stecker.JarHelper; import org.meridor.stecker.PluginException; import org.meridor.stecker.TemporaryDirectory; import org.meridor.stecker.impl.data.AnnotatedImpl; import org.meridor.stecker.impl.data.TestAnnotation; import org.meridor.stecker.impl.data.Tes...
package org.meridor.stecker.dev; public class DevClassesScannerTest { @Rule public TemporaryDirectory temporaryDirectory = new TemporaryDirectory(); private static final List<Class> EXTENSION_POINTS = Arrays.asList(new Class[]{
TestExtensionPoint.class,
4
afpdev/alpheusafpparser
src/main/java/com/mgz/afp/ptoca/controlSequence/PTOCAControlSequence.java
[ "@AFPType\npublic abstract class StructuredField implements IAFPDecodeableWriteable {\n\n @AFPField\n StructuredFieldIntroducer structuredFieldIntroducer;\n /**\n * The structured field's padding data. Contains null if this structured field has no padding\n * data.\n */\n @AFPField(isOptional = true, maxS...
import java.io.OutputStream; import java.nio.charset.Charset; import com.mgz.afp.base.StructuredField; import com.mgz.afp.base.annotations.AFPField; import com.mgz.afp.base.annotations.AFPType; import com.mgz.afp.enums.AFPColorSpace; import com.mgz.afp.enums.AFPColorValue; import com.mgz.afp.enums.AFPOrientation; impor...
/* Copyright 2015 Rudolf Fiala This file is part of Alpheus AFP Parser. Alpheus AFP Parser 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. ...
csi.csPrefix = UtilBinaryDecoding.parseShort(sfData, offset, 1);
4
GoogleCloudPlatform/qupath-chcapi-extension
src/main/java/com/quantumsoft/qupathcloud/dao/DownloadDicomCallable.java
[ "static final String APPLICATION_DICOM_JSON_CHARSET_UTF8 = \"application/dicom+json; charset=utf-8\";", "static final String APPLICATION_DICOM_TRANSFER_SYNTAX = \"application/dicom; transfer-syntax=*\";", "static final String BEARER = \"Bearer \";", "public static final String FAILED_HTTP = \"Failed HTTP! Sta...
import static com.quantumsoft.qupathcloud.dao.Constants.APPLICATION_DICOM_JSON_CHARSET_UTF8; import static com.quantumsoft.qupathcloud.dao.Constants.APPLICATION_DICOM_TRANSFER_SYNTAX; import static com.quantumsoft.qupathcloud.dao.Constants.BEARER; import static com.quantumsoft.qupathcloud.exception.Errors.FAILED_HTTP; ...
// 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;
5
it114/OneFramework
Sample1/src/com/it114/android/oneframework/sample1/demo/main/MainActivity.java
[ "public abstract class BaseActivity extends Activity{\n protected final static String TAG = BaseFragmentActivity.class.getName();\n public ActivityCommon activityState = new ActivityCommonImpl();\n protected ViewFinder mViewFinder;\n protected View titleBar;\n protected TitleBarViewImpl titleBarView;...
import android.content.Intent; import android.os.Bundle; import butterknife.OnClick; import com.it114.android.oneframework.core.ui.activity.BaseActivity; import com.it114.android.oneframework.sample1.R; import com.it114.android.oneframework.sample1.demo.adapter.AdapterActivity; import com.it114.android.oneframework.sam...
package com.it114.android.oneframework.sample1.demo.main; /** * Created by andy on 10/15/2015. */ public class MainActivity extends BaseActivity { @Override protected void init(Bundle savedInstanceState) { } @Override protected int getLayoutId() { return R.layout.main_activity_layout;...
Intent intent = new Intent(this,RequestActivity.class);
3
PedroGomes/TPCw-benchmark
src/org/uminho/gsd/benchmarks/benchmark/BenchmarkExecutor.java
[ "public class ResultHandler {\n\n\tprivate static List<ResultHandler> client_results = new CopyOnWriteArrayList<ResultHandler>();\n\n\tprivate Map<String, String> bechmark_info = null;\n\n\tprivate int testsamples = 100;\n\n\tprivate String test_name;\n\n\n\t/**\n\t * results -> for each operation store the result...
import java.util.concurrent.CountDownLatch; import org.uminho.gsd.benchmarks.dataStatistics.ResultHandler; import org.uminho.gsd.benchmarks.interfaces.Workload.AbstractWorkloadGeneratorFactory; import org.uminho.gsd.benchmarks.interfaces.Workload.WorkloadGeneratorInterface; import org.uminho.gsd.benchmarks.interfaces.e...
/* * ********************************************************************* * Copyright (c) 2010 Pedro Gomes and Universidade do Minho. * All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy...
final WorkloadGeneratorInterface workloadGenerator = workloadInterface.getClient();
2
all4you/redant
redant-core/src/main/java/com/redant/core/executor/HttpResponseExecutor.java
[ "public class InvocationException extends Exception{\n\tprivate static final long serialVersionUID = 1L;\n\n public InvocationException(String message, Throwable cause) {\n super(message, cause);\n }\n\n}", "public class HttpRenderUtil {\n\n public static final String EMPTY_CONTENT = \"\";\n\n ...
import cn.hutool.core.collection.CollectionUtil; import com.redant.core.common.exception.InvocationException; import com.redant.core.common.util.HttpRenderUtil; import com.redant.core.common.util.HttpRequestUtil; import com.redant.core.context.RedantContext; import com.redant.core.controller.ControllerProxy; import com...
package com.redant.core.executor; /** * @author houyi */ public class HttpResponseExecutor extends AbstractExecutor<HttpResponse> { private final static Logger LOGGER = LoggerFactory.getLogger(HttpResponseExecutor.class); private static ControllerContext controllerContext = DefaultControllerContext.getIn...
RedantContext.currentContext().setRequest(httpRequest);
3
R2RML-api/R2RML-api
r2rml-api-jena-binding/src/test/java/jenaTest/RDFSyntax_Test.java
[ "public class JenaR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static JenaR2RMLMappingManager INSTANCE = new JenaR2RMLMappingManager(new JenaRDF());\n\n private JenaR2RMLMappingManager(JenaRDF rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod...
import org.apache.jena.rdf.model.ModelFactory; import eu.optique.r2rml.api.model.LogicalTable; import eu.optique.r2rml.api.model.ObjectMap; import eu.optique.r2rml.api.model.PredicateMap; import eu.optique.r2rml.api.model.PredicateObjectMap; import eu.optique.r2rml.api.model.SubjectMap; import eu.optique.r2rml.ap...
/******************************************************************************* * Copyright 2013, the Optique Consortium * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http...
Iterator<PredicateMap> pmit=pom.getPredicateMaps().iterator();
4
kpavlov/fixio
core/src/main/java/fixio/netty/pipeline/server/FixAcceptorChannelInitializer.java
[ "public interface FixMessage {\n\n String FIX_4_0 = \"FIX.4.0\";\n String FIX_4_1 = \"FIX.4.1\";\n String FIX_4_2 = \"FIX.4.2\";\n String FIX_4_3 = \"FIX.4.3\";\n String FIX_4_4 = \"FIX.4.4\";\n String FIX_5_0 = \"FIXT.1.1\";\n\n FixMessageHeader getHeader();\n\n List<FixMessageFragment> get...
import fixio.fixprotocol.FixMessage; import fixio.fixprotocol.FixMessageBuilder; import fixio.handlers.FixApplication; import fixio.netty.pipeline.FixChannelInitializer; import fixio.netty.pipeline.SessionRepository; import io.netty.channel.Channel; import io.netty.channel.EventLoopGroup; import io.netty.handler.codec....
/* * Copyright 2014 The FIX.io Project * * The FIX.io Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unles...
protected MessageToMessageCodec<FixMessage, FixMessageBuilder> createSessionHandler() {
1
scop/portecle
src/main/net/sf/portecle/DKeyStoreReport.java
[ "public static final ResourceBundle RB = ResourceBundle.getBundle(RB_BASENAME);", "public enum DigestType\n{\n\t/** MD5 Digest Type */\n\tMD5,\n\t/** SHA-1 Digest Type */\n\tSHA1;\n}", "public enum KeyStoreType\n{\n\t// Note: Java 8+ succeeds at least sometimes opening PKCS#12 as JKS, causing confusion and redu...
import static net.sf.portecle.FPortecle.RB; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Toolkit; import java.awt.datatransfer.Clipboard; import java.awt.datatransfer.StringSelection; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import ...
/* * DKeyStoreReport.java * This file is part of Portecle, a multipurpose keystore and certificate tool. * * Copyright © 2004 Wayne Grant, waynedgrant@hotmail.com * 2004-2014 Ville Skyttä, ville.skytta@iki.fi * * This program is free software; you can redistribute it and/or * modify it under the ter...
KeyStoreType ksType = KeyStoreType.valueOfType(m_keystore.getType());
2
stefanhaustein/nativehtml
swing/src/main/java/org/kobjects/nativehtml/swing/AbstractSwingComponentElement.java
[ "public enum CssEnum {\n ERROR,\n\n AUTO, AQUA,\n BLACK, BLOCK, BOTH, BOTTOM, BLUE,\n CENTER, CIRCLE,\n DECIMAL, DISC,\n FIXED, FUCHSIA,\n GRAY, GREEN,\n INHERIT, INLINE, INLINE_BLOCK, INSIDE, ITALIC,\n LEFT, LIME, LIST_ITEM, LOWER_LATIN, LOWER_GREEK, LOWER_ROMAN,\n MAROON, MEDIUM, MIDDLE,\n NAVY, NONE, ...
import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Shape; import java.util.HashMap; import javax.swing.JComponent; import org.kobjects.nativehtml.css.CssEnum; import org.kobjects.nativehtml.css.CssProperty; import org.kobjects.nativehtml.css.CssStyleDecla...
package org.kobjects.nativehtml.swing; public abstract class AbstractSwingComponentElement extends JComponent implements org.kobjects.nativehtml.layout.ComponentElement { private final Document document; protected final String elementName; private HashMap<String, String> attributes; private CssStyleDeclaration ...
CssEnum repeat = style.getEnum(CssProperty.BACKGROUND_REPEAT);
0
LegendOnline/InventoryAPI
src/main/java/com/minecraftlegend/inventoryapi/GUIEvent.java
[ "public class ComponentClickEvent implements EventWrapper {\n\n private GUIContainer gui;\n private GUIComponent component;\n private ItemStack item, cursor;\n private HumanEntity player;\n private Inventory clickedInventory;\n private ClickType click;\n private int slot, rawSlot;\n\n public...
import com.minecraftlegend.inventoryapi.Events.ComponentClickEvent; import com.minecraftlegend.inventoryapi.Events.ComponentDragEvent; import com.minecraftlegend.inventoryapi.Events.ComponentMoveEvent; import com.minecraftlegend.inventoryapi.Events.ContainerCloseEvent; import com.minecraftlegend.inventoryapi.Events.Con...
package com.minecraftlegend.inventoryapi; /** * @Author Sauerbier | Jan * @Copyright 2016 by Jan Hof * All rights reserved. **/ public interface GUIEvent { /** * This event is triggered when ever a player clicks on a {@link GUIElement} * It is only fired if the {@link GUIElement} this event haven ...
default void onOpen( ContainerOpenEvent event ) {
4
jrenner/gdx-proto
core/src/org/jrenner/fps/event/ClientEventManager.java
[ "public class LevelBuilder {\n\tpublic static LevelBuilder inst;\n\tprivate static Array<Model> models;\n\tpublic static Array<LevelStatic> staticPieces; // server only: stores level geometry for sending to clients on connect\n\n\tprivate static ModelBuilder mb;\n\n\tpublic static void init() {\n\t\tstaticPieces = ...
import com.badlogic.gdx.math.Vector3; import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.GdxRuntimeException; import org.jrenner.fps.LevelBuilder; import org.jrenner.fps.Log; import org.jrenner.fps.Main; import org.jrenner.fps.Tools; import org.jrenner.fps.View; import org.jrenner.fps.effects.BulletHit;...
package org.jrenner.fps.event; public class ClientEventManager { private final Array<ClientEvent> eventQueue = new Array<>(); private static final Vector3 tmp = new Vector3(); /** called from the main game thread, not the network thread, should be thread-safe with most game logic operations */ public void proce...
Log.debug("Player assigned to entity with ID: " + assignPlayer.id);
1
RoseTec/JigSPuzzle
src/main/java/jigspuzzle/view/desktop/about/AboutDialog.java
[ "public class SettingsController extends AbstractController {\n\n private static SettingsController instance;\n\n public static SettingsController getInstance() {\n if (instance == null) {\n instance = new SettingsController();\n }\n return instance;\n }\n\n /**\n * {...
import java.net.URISyntaxException; import java.util.HashMap; import java.util.Map; import java.util.Observable; import jigspuzzle.controller.SettingsController; import jigspuzzle.view.ImageGetter; import jigspuzzle.view.desktop.swing.TopToButtomLayoutManager; import jigspuzzle.view.desktop.swing.ImageJPanel; import ji...
package jigspuzzle.view.desktop.about; /** * A dialog for details on JigSPuzzle. * * @author RoseTec */ public class AboutDialog extends javax.swing.JDialog { private static String LINK_TO_SOURCES = "https://github.com/RoseTec/JigSPuzzle"; public AboutDialog(java.awt.Frame parent) { super(parent...
jPanel4 = new ImageJPanel(ImageGetter.getInstance().getJigSPuzzleImage());
1
integeruser/jgltut
src/integeruser/jgltut/tut17/DoubleProjection.java
[ "public enum MouseButtons {\n MB_LEFT_BTN,\n MB_RIGHT_BTN,\n MB_MIDDLE_BTN\n}", "public static class ViewData {\n public Vector3f targetPos;\n public Quaternionf orient;\n public float radius;\n public float degSpinRotation;\n\n public ViewData(Vector3f targetPos, Quaternionf orient, float...
import integeruser.jglsdk.glutil.MousePoles.MouseButtons; import integeruser.jglsdk.glutil.MousePoles.ViewData; import integeruser.jglsdk.glutil.MousePoles.ViewPole; import integeruser.jglsdk.glutil.MousePoles.ViewScale; import integeruser.jgltut.Tutorial; import integeruser.jgltut.commons.LightBlock; import integeruse...
if (!depthClampProj) { glDisable(GL_DEPTH_CLAMP); } glViewport(displaySize.x + (displayWidth % 2), 0, displaySize.x, displaySize.y); scene.render(modelMatrix); glEnable(GL_DEPTH_CLAMP); } @Override protected void reshape(int w, int h) { displayW...
private ViewPole viewPole = new ViewPole(initialView, initialViewScale, MouseButtons.MB_LEFT_BTN);
2
UBOdin/jsqlparser
testsrc/net/sf/jsqlparser/test/update/UpdateTest.java
[ "public class JSQLParserException extends Exception {\r\n\tprivate Throwable cause = null;\r\n\r\n\tpublic JSQLParserException() {\r\n\t\tsuper();\r\n\t}\r\n\r\n\tpublic JSQLParserException(String arg0) {\r\n\t\tsuper(arg0);\r\n\t}\r\n\r\n\tpublic JSQLParserException(Throwable arg0) {\r\n\t\tthis.cause = arg0;\r\n\...
import java.io.StringReader; import junit.framework.TestCase; import net.sf.jsqlparser.JSQLParserException; import net.sf.jsqlparser.expression.JdbcParameter; import net.sf.jsqlparser.expression.LongValue; import net.sf.jsqlparser.expression.StringValue; import net.sf.jsqlparser.expression.operators.relational.Gr...
package net.sf.jsqlparser.test.update; public class UpdateTest extends TestCase { CCJSqlParserManager parserManager = new CCJSqlParserManager(); public UpdateTest(String arg0) { super(arg0); } public void testUpdate() throws JSQLParserException { String statement = "UPDATE mytable set col1='as', ...
Update update = (Update) parserManager.parse(new StringReader(statement));
6
jackpotsvr/Java-Conquer-Server
src/main/java/net/co/java/tasks/BlessTask.java
[ "public abstract class Entity implements Spawnable, Serializable {\n\n\tprivate static final long serialVersionUID = -8544332465232461099L;\n\tprotected transient final long identity;\n\tprotected final String name;\n\t\n\tprotected volatile int mesh;\n\tprotected volatile int hairstyle;\n\tprotected volatile Locat...
import net.co.java.entity.Entity; import net.co.java.entity.Player; import net.co.java.packets.UpdatePacket; import net.co.java.skill.Bless; import net.co.java.skill.TargetBuilder; import java.util.concurrent.TimeUnit;
package net.co.java.tasks; /** * Created by Thomas on 03/04/2015. */ public class BlessTask extends EntityTickTask<Player> { private final Bless bless; private int tickCount = 0; public BlessTask(Bless bless, Player entity) { super(entity); this.bless = bless; } @Override ...
for(Entity e : tb.getEntities()) {
0
dotcool/coolreader
src/com/dotcool/reader/adapter/BookmarkModelAdapter.java
[ "public class UIHelper {\n\n\tprivate static final String TAG = UIHelper.class.toString();\n\n\tpublic static void CheckScreenRotation(Activity activity) {\n\t\tswitch (getIntFromPreferences(Constants.PREF_ORIENTATION, 0)) {\n\t\tcase 0:\n\t\t\tactivity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_UNSPEC...
import java.util.ArrayList; import java.util.Collection; import java.util.List; import android.app.Activity; import android.content.Context; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Che...
package com.dotcool.reader.adapter; public class BookmarkModelAdapter extends ArrayAdapter<BookmarkModel> { private static final String TAG = BookmarkModelAdapter.class.toString(); private final int layoutResourceId; private final Context context; private List<BookmarkModel> data; private PageModel novel = nul...
addAll(NovelsDao.getInstance().getAllBookmarks(UIHelper.getAllBookmarkOrder(context)));
0
CyclopsMC/IntegratedTunnels
src/main/java/org/cyclops/integratedtunnels/part/PartTypeInterfaceItem.java
[ "public class Capabilities {\n @CapabilityInject(IEnergyNetwork.class)\n public static Capability<IEnergyNetwork> NETWORK_ENERGY = null;\n @CapabilityInject(IFluidNetwork.class)\n public static Capability<IFluidNetwork> NETWORK_FLUID = null;\n @CapabilityInject(IInventoryState.class)\n public stat...
import com.google.common.collect.Iterators; import net.minecraft.item.ItemStack; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import org.cyclops.commoncap...
package org.cyclops.integratedtunnels.part; /** * Interface for item handlers. * @author rubensworks */ public class PartTypeInterfaceItem extends PartTypeInterfacePositionedAddon<IItemNetwork, IItemHandler, PartTypeInterfaceItem, PartTypeInterfaceItem.State> { public PartTypeInterfaceItem(String name) { ...
if (isNetworkAndPositionValid() && capability == Capabilities.SLOTLESS_ITEMHANDLER) {
0
programingjd/okserver
src/samples/java/info/jdavid/ok/server/samples/EchoHttpServer.java
[ "@SuppressWarnings({ \"WeakerAccess\" })\npublic class RequestHandlerChain extends AbstractRequestHandler {\n\n public static void main(final String[] args) {\n cmd(args);\n }\n\n @SuppressWarnings(\"UnusedReturnValue\")\n static HttpServer cmd(final String[] args) {\n //final String[] args = new String[]...
import javax.annotation.Nullable; import info.jdavid.ok.server.RequestHandlerChain; import info.jdavid.ok.server.handler.RegexHandler; import info.jdavid.ok.server.handler.Request; import okhttp3.MediaType; import okhttp3.ResponseBody; import info.jdavid.ok.server.HttpServer; import info.jdavid.ok.server.Response; impo...
package info.jdavid.ok.server.samples; @SuppressWarnings("WeakerAccess") public class EchoHttpServer {
private final HttpServer mServer;
3
LMAX-Exchange/disruptor-proxy
src/main/java/com/lmax/tool/disruptor/reflect/ReflectiveRingBufferInvocationHandler.java
[ "public interface DropListener\n{\n void onDrop();\n}", "public interface Invoker\n{\n void invokeWithArgumentHolder(final Object implementation, final Object argumentHolder);\n}", "public interface MessagePublicationListener\n{\n /**\n * Called before message is published to the ringbuffer\n *...
import com.lmax.disruptor.RingBuffer; import com.lmax.tool.disruptor.DropListener; import com.lmax.tool.disruptor.Invoker; import com.lmax.tool.disruptor.MessagePublicationListener; import com.lmax.tool.disruptor.OverflowStrategy; import com.lmax.tool.disruptor.ProxyMethodInvocation; import java.lang.reflect.Invocation...
/* * Copyright 2015-2016 LMAX 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...
private final RingBuffer<ProxyMethodInvocation> ringBuffer;
4
OrangeTeam/FamilyLink
app/src/org/orange/familylink/location/LocationService.java
[ "public class ContactDetailActivity extends BaseActivity {\n\tprivate static String[] projection = {\n\t\t\tContract.Contacts._ID,\n\t\t\tContract.Contacts.COLUMN_NAME_NAME,\n\t\t\tContract.Contacts.COLUMN_NAME_PHONE_NUMBER};\n\n\tprivate Animation mAnimationShake;\n\tprivate EditText mEditTextPhone = null;\n\tpriv...
import java.util.Timer; import java.util.TimerTask; import org.orange.familylink.ContactDetailActivity; import org.orange.familylink.R; import org.orange.familylink.ContactDetailActivity.Contact; import org.orange.familylink.data.Message.Code; import org.orange.familylink.data.Settings; import org.orange.familylink.sms...
package org.orange.familylink.location; /** * 定位服务 * @author Orange Team * */ public class LocationService extends Service { static Context mContext; //调用一个定位类 static LocationTracker mLocationTracker; private Looper mServiceLooper; //服务帮助的一个内部类 private ServiceHandler mServiceHandler; //短信发送时间计划控制 pr...
if(Settings.getStartLocationService(LocationService.this)){
3
CalebFenton/resequencer
src/main/java/org/cf/resequencer/Main.java
[ "public class FingerprintReader {\n\n private static final String[] OperationAttributeList = new String[] {\n \"name\", \"type\", \"afterRegex\", \"beforeRegex\", \"insideRegex\", \"afterOP\", \"beforeOP\", \"insideOP\",\n \"replaceWhat\", \"deletePath\" };\n private fina...
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.HashMap; import java.util.Random; import java.util.Set; import org.apache.commons.io.FileUtils; import org.cf.resequencer.patch.FingerprintReader; import org.cf.resequencer.patch.Sm...
/* * Sequencer * * TODO: * implement --sign-key and --sign-cert * add region resolution to variables (impossible) * afterOP (probably beforeOP) needs proper existance checking * and should always be there for it to work. give warning if not. * it has been completely rewritten once, and everyone knows developers...
SmaliFile[] smaliFiles = getSmaliFiles();
1
mengjies/MJWeather
app/src/main/java/com/mj/weather/weather/view/fragment/SignInFragment.java
[ "public class LoginActivity extends BaseActivity {\n private static final String TAG = \"LoginActivity\";\n\n @Inject\n LoginPresenter loginPresenter;\n\n\n public static void actionStart(Activity act) {\n Intent intent = new Intent(act, LoginActivity.class);\n act.startActivity(intent);\n...
import android.content.Context; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.view.Vie...
package com.mj.weather.weather.view.fragment; /** * Created by MengJie on 2017/6/20. */ public class SignInFragment extends BaseFragment implements SignInContract.View, View.OnClickListener { private static final String TAG = "SignInFragment"; private EditText etUsername; private EditText etPassword...
ToastUtils.showToast("用户名不合法!");
4
XSoftlab/ml4j
examples/src/main/java/net/xsoftlab/ml4j/coursera/ml/ex3/Ex3_OneVsAll_MultiThread.java
[ "public abstract class MinFunc {\n\n\tprotected BaseModel model;// 训练模型\n\tprotected int maxIter = 500;// 最大训练次数\n\tprotected float epsilon = (float) 1e-6;// 精度阈值\n\n\tprotected FloatMatrix theta;// 参数\n\tprotected boolean logFlag = true;// 是否打印过程日志\n\n\tLogger logger = LoggerFactory.getLogger(this.getClass());\n\n...
import java.io.IOException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import net.xsoftlab.ml4j.minfunc.MinFunc; import net.xsoftlab.ml4j.model.supervised.BaseModel; import net.xsoftlab.ml4j.model.supervised.LogisticRegression; import ...
package net.xsoftlab.ml4j.coursera.ml.ex3; public class Ex3_OneVsAll_MultiThread extends TestUtil { public static void main(String[] args) throws IOException, InterruptedException { tic(); logger.info("加载数据...\n"); String x_path = COURSE_ML_PATH + "/ex3/X.data"; String y_path = COURSE_ML_PATH + "/ex3/y...
FloatMatrix X = MatrixUtil.loadData(x_path, "\\s+", true);
3
thlcly/Mini-JVM
src/main/java/com/aaront/exercise/jvm/commands/LLoadNCommand.java
[ "@Data\npublic class ClassFile {\n private String magicNumber;\n private int majorVersion;\n private int minorVersion;\n private ClassIndex classIndex;\n private InterfaceIndex interfaceIndex;\n private ConstantPool constantPool;\n private List<ClassAccessFlag> accessFlags;\n private List<Fi...
import com.aaront.exercise.jvm.ClassFile; import com.aaront.exercise.jvm.constant.ConstantPool; import com.aaront.exercise.jvm.engine.ExecutionResult; import com.aaront.exercise.jvm.engine.JavaObject; import com.aaront.exercise.jvm.engine.StackFrame;
package com.aaront.exercise.jvm.commands; /** * @author tonyhui * @since 2017/8/22 */ public class LLoadNCommand extends NoOperandCommand { int pos;
public LLoadNCommand(ClassFile clzFile, String opCode, int pos) {
0
mlaccetti/JavaPNS
src/test/java/javapns/test/NotificationTest.java
[ "public class Push {\n\n private static final Logger logger = LoggerFactory.getLogger(Push.class);\n\n private Push() {\n // empty\n }\n\n /**\n * Push a simple alert to one or more devices.\n *\n * @param message the alert message to push.\n * @param keystore a keystore containing your private ...
import javapns.Push; import javapns.communication.exceptions.CommunicationException; import javapns.communication.exceptions.KeystoreException; import javapns.devices.Device; import javapns.devices.implementations.basic.BasicDevice; import javapns.notification.*; import javapns.notification.transmission.NotificationPro...
package javapns.test; /** * A command-line test facility for the Push Notification Service. * <p>Example: <code>java -cp "[required libraries]" NotificationTest keystore.p12 mypass 2ed202ac08ea9033665e853a3dc8bc4c5e78f7a6cf8d55910df230567037dcc4</code></p> * <p> * <p>By default, this test uses the sandbox servi...
public void eventAllThreadsStarted(final NotificationThreads notificationThreads) {
7
AVMf/avmf
src/main/java/org/avmframework/examples/inputdatageneration/calendar/CalendarTestObject.java
[ "public class Vector extends AbstractVector {\n\n public void addVariable(Variable variable) {\n variables.add(variable);\n }\n\n public List<Variable> getVariables() {\n return new ArrayList<>(variables);\n }\n\n public void setVariablesToInitial() {\n for (Variable var : variables) {\n var.setV...
import org.avmframework.Vector; import org.avmframework.examples.inputdatageneration.Branch; import org.avmframework.examples.inputdatageneration.BranchTargetObjectiveFunction; import org.avmframework.examples.inputdatageneration.TestObject; import org.avmframework.variable.IntegerVariable;
package org.avmframework.examples.inputdatageneration.calendar; public class CalendarTestObject extends TestObject { static final int NUM_BRANCHING_NODES = 23; static final int INITIAL_VALUE = 0; static final int MIN = 0; static final int MAX = 1000; @Override public Vector getVector() { Vector vec...
vector.addVariable(new IntegerVariable(INITIAL_VALUE, MIN, MAX));
4
jackpotsvr/Java-Conquer-Server
src/main/java/net/co/java/packets/ItemUsage.java
[ "public class Location {\n\n\tpublic final static int VIEW_RANGE = 18;\n\tpublic final int xCord, yCord;\n\tpublic final Map map;\n\tpublic final int direction;\n\t\n\t/**\n\t * Construct a new Location in this Map\n\t * @param map\n\t * @param xCord\n\t * @param yCord\n\t */\n\tpublic Location(Map map, int xCord, ...
import net.co.java.entity.Location; import net.co.java.entity.Player; import net.co.java.item.ItemInstance; import net.co.java.item.ItemInstance.EquipmentInstance; import net.co.java.model.AccessException; import net.co.java.packets.GeneralData.SubType; import net.co.java.server.GameServerClient; import net.co.java.ser...
package net.co.java.packets; /** * Item usage packet * @author Thomas Gmelig Meyling * @author Jan-Willem Gmelig Meyling */ public class ItemUsage implements PacketHandler { private final long identity; private final long parameter; private final Mode mode; private final long timestamp; public ItemUsage(l...
ItemInstance item = client.getModel().getItemInstance(identity);
2
JessYanCoding/MVPArt
art/src/main/java/me/jessyan/art/di/module/AppModule.java
[ "@Singleton\n@Component(modules = {AppModule.class, ClientModule.class, GlobalConfigModule.class})\npublic interface AppComponent {\n Application application();\n\n /**\n * 用于管理所有 {@link Activity}\n * 之前 {@link AppManager} 使用 Dagger 保证单例, 只能使用 {@link AppComponent#appManager()} 访问\n * 现在直接将 AppMana...
import android.app.Application; import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.FragmentManager; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import java.util.ArrayList; import java.util.List; import...
/* * Copyright 2017 JessYan * * 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 ...
abstract FragmentManager.FragmentLifecycleCallbacks bindFragmentLifecycle(FragmentLifecycle fragmentLifecycle);
3
debdattabasu/RoboMVVM
library/src/main/java/org/dbasu/robomvvm/viewmodel/ViewModel.java
[ "public enum BindMode {\n\n /**\n * Makes a one-way binding where the target property is set whenever the source property changes.\n */\n SOURCE_TO_TARGET(true, false),\n\n /**\n * Makes a one-way binding where the source property is set whenever the target property changes.\n */\n TARGE...
import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.google.common.base.Preconditions; import org.dbasu.robomvvm.binding.BindMode; import org.dbasu.robomvvm.binding.Binding; import org.dbasu.robomvvm.binding.ValueConverter; import org.db...
/** * @project RoboMVVM * @project RoboMVVM(https://github.com/debdattabasu/RoboMVVM) * @author Debdatta Basu * * @license 3-clause BSD license(http://opensource.org/licenses/BSD-3-Clause). * Copyright (c) 2014, Debdatta Basu. All rights reserved. * * Redistribution and use in source and binary forms,...
Preconditions.checkArgument(ThreadUtil.isUiThread(), "ViewModel.convertView can only be called from the UI thread");
6
PedroGomes/TPCw-benchmark
TPCW_MySQL_Implementation/src/org/uminho/gsd/benchmarks/TPCW_MySQL/populator/Populator.java
[ "public class ResultHandler {\n\n\tprivate static List<ResultHandler> client_results = new CopyOnWriteArrayList<ResultHandler>();\n\n\tprivate Map<String, String> bechmark_info = null;\n\n\tprivate int testsamples = 100;\n\n\tprivate String test_name;\n\n\n\t/**\n\t * results -> for each operation store the result...
import org.uminho.gsd.benchmarks.interfaces.executor.AbstractDatabaseExecutorFactory; import org.uminho.gsd.benchmarks.interfaces.executor.DatabaseExecutorInterface; import org.uminho.gsd.benchmarks.interfaces.populator.AbstractBenchmarkPopulator; import java.util.*; import java.util.concurrent.CountDownLatch; import j...
/* * ********************************************************************* * Copyright (c) 2010 Pedro Gomes and Universidade do Minho. * All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy...
private static /* final */ int NUM_EBS = Constants.NUM_EBS;
1
BlackCraze/GameResourceBot
src/main/java/de/blackcraze/grb/commands/concrete/Group.java
[ "public interface BaseCommand {\r\n\r\n void run(Scanner scanner, Message message);\r\n\r\n default String help(Message message) {\r\n String className = this.getClass().getSimpleName();\r\n String key = className.toUpperCase();\r\n return Resource.getHelp(key, getResponseLocale(message),...
import de.blackcraze.grb.commands.BaseCommand; import de.blackcraze.grb.core.Speaker; import de.blackcraze.grb.i18n.Resource; import de.blackcraze.grb.model.PrintableTable; import de.blackcraze.grb.model.entity.StockType; import de.blackcraze.grb.model.entity.StockTypeGroup; import de.blackcraze.grb.util.PrintUti...
package de.blackcraze.grb.commands.concrete; public class Group implements BaseCommand { public void run(Scanner scanner, Message message) { // Create the user if it does not exist. // Block this command within DMs. getMateDao().getOrCreateMate(message, getResponseLocale(messa...
Speaker.err(message, Resource.getError("GROUP_SUBCOMMAND_UNKNOWN",
2
thx/RAP
src/main/java/com/taobao/rigel/rap/project/service/ProjectMgr.java
[ "public class User implements java.io.Serializable {\n private int id;\n private String name;\n private String account;\n private String password;\n private String email;\n private Date createDate;\n private boolean isLockedOut;\n private Date lastLoginDate;\n private int incorrectLoginAt...
import com.taobao.rigel.rap.account.bo.User; import com.taobao.rigel.rap.project.bo.Action; import com.taobao.rigel.rap.project.bo.Module; import com.taobao.rigel.rap.project.bo.Page; import com.taobao.rigel.rap.project.bo.Project; import java.util.List; import java.util.Map;
package com.taobao.rigel.rap.project.service; public interface ProjectMgr { /** * get project list * * @param user * @param curPageNum * @param pageSize * @return */ List<Project> getProjectList(User user, int curPageNum, int pageSize); /** * add...
Module getModule(int id);
2
xSAVIKx/openweathermap-java-api
api-examples/src/main/java/org/openweathermap/api/example/UviForecastExample.java
[ "public interface DataWeatherClient extends WeatherClient {\n\n CurrentWeather getCurrentWeather(CurrentWeatherOneLocationQuery query);\n\n List<CurrentWeather> getCurrentWeather(CurrentWeatherMultipleLocationsQuery query);\n\n ForecastInformation<HourlyForecast> getForecastInformation(HourlyForecastQuery ...
import org.openweathermap.api.DataWeatherClient; import org.openweathermap.api.UrlConnectionDataWeatherClient; import org.openweathermap.api.common.Coordinate; import org.openweathermap.api.model.uvi.Uvi; import org.openweathermap.api.query.Language; import org.openweathermap.api.query.UnitFormat; import org.openweathe...
/* * Copyright 2021, Yurii Serhiichuk * * 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...
List<Uvi> result = client.getUviForecast(query);
3
pdsoftplan/zap-maven-plugin
zap-client-api/src/test/java/br/com/softplan/security/zap/api/authentication/FormAuthenticationHandlerIT.java
[ "public abstract class AbstractAuthenticationHandler implements AuthenticationHandler {\n\n\tprivate static final Logger LOGGER = LoggerFactory.getLogger(AbstractAuthenticationHandler.class);\n\t\n\tprotected static final String UTF_8 = StandardCharsets.UTF_8.name();\n\t\n\tprotected static final String ZAP_DEFAULT...
import static br.com.softplan.security.zap.api.authentication.AbstractAuthenticationHandler.*; import static org.testng.Assert.*; import org.testng.annotations.Test; import br.com.softplan.security.zap.api.model.AuthenticationInfo; import br.com.softplan.security.zap.api.util.BaseIT; import br.com.softplan.security.zap...
package br.com.softplan.security.zap.api.authentication; public class FormAuthenticationHandlerIT extends BaseIT { @Test
public void handleAuthenticationTest() throws ClientApiException {
4
geoparser/geolocator-2.0
geo-locator/src/edu/cmu/geolocator/parser/utils/ParserUtils.java
[ "public class StringUtil {\n\n static Pattern pattern = Pattern.compile(\"\\\\p{InCombiningDiacriticalMarks}+\");\n\n /**\n * check each word in the given string array is capitalized or not Input: array of strings Output:\n * U U L L U L U L L L U L....\n */\n public static String[] capitalizedArray(String...
import edu.cmu.geolocator.common.StringUtil; import edu.cmu.geolocator.model.LocEntityAnnotation; import edu.cmu.geolocator.model.Tweet; import edu.cmu.geolocator.resource.dictionary.Dictionary; import edu.cmu.geolocator.resource.dictionary.Dictionary.DicType; import java.io.IOException; import java.util.ArrayList; imp...
public static boolean isEsFilterword(String word) { word = StringUtil.getDeAccentLoweredString(word); for (String tok : word.split(" ")) { if (esdictset.contains(tok) == false && dictset.contains(tok) == false) return false; } return true; } // check if all the part of speech includ...
public static boolean isallCap(Tweet tweet) {
2
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()...
public void inflate(XmlHelper xmlHelper, Style theme) {
5
meefik/linuxdeploy
app/src/main/java/ru/meefik/linuxdeploy/activity/MainActivity.java
[ "public class EnvUtils {\n\n /**\n * Extract file to env directory\n *\n * @param c context\n * @param target target directory\n * @param rootAsset root asset name\n * @param path path to asset file\n * @return true if success\n */\n private static boolean extra...
import android.Manifest; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.graphics.Color; import android.net.ConnectivityManager; import android.net.Uri; import android.net.wifi.WifiManager; import andr...
package ru.meefik.linuxdeploy.activity; public class MainActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener { private static final int REQUEST_WRITE_STORAGE = 112; private static TextView output; private static ScrollView scroll; private static Wi...
if (EnvUtils.isLatestVersion(this)) {
0
jiang111/ZhiHu-TopAnswer
app/src/main/java/com/jiang/android/zhihu_topanswer/fragment/CollectionFragment.java
[ "public abstract class BaseAdapter extends RecyclerView.Adapter<BaseViewHolder> {\n\n\n @Override\n public BaseViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n final BaseViewHolder holder = new BaseViewHolder(LayoutInflater.from(parent.getContext()).inflate(viewType, parent, false));\n...
import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AlertDialog; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.Html; ...
package com.jiang.android.zhihu_topanswer.fragment; /** * Created by jiang on 2016/12/28. */ public class CollectionFragment extends BaseFragment { private SwipeRefreshLayout mRefresh; private MultiStateView mStateView; private RecyclerView mRecyclerView; public static CollectionFragment newInst...
Intent intent = new Intent(getActivity(), AnswersActivity.class);
4
Azure/azure-storage-android
microsoft-azure-storage-test/src/com/microsoft/azure/storage/table/TableQueryTests.java
[ "public final class OperationContext {\n\n /**\n * The default log level, or null if disabled. The default can be overridden to turn on logging for an individual\n * operation context instance by using setLoggingEnabled.\n */\n private static Integer defaultLogLevel;\n\n /**\n * Indicates w...
import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.ResponseReceivedEvent; import com.microsoft.azure.storage.ResultSegment; import com.microsoft.azure.storage.StorageEvent; import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.TestRunners.CloudTests...
/** * Copyright Microsoft Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
TableQuery<ComplexEntity> query = TableQuery.from(ComplexEntity.class).select(
6
TheCount/jhilbert
src/main/java/jhilbert/commands/impl/CommandFactory.java
[ "public interface Command {\n\n\t/**\n\t * Executes this command.\n\t *\n\t * @throws CommandException if this command cannot be executed.\n\t */\n\tpublic void execute() throws CommandException;\n\n}", "public class CommandException extends JHilbertException {\n\n\t/**\n\t * Creates a new <code>CommandException<...
import jhilbert.scanners.ScannerException; import jhilbert.scanners.Token; import jhilbert.scanners.TokenFeed; import java.util.HashMap; import java.util.Map; import jhilbert.commands.Command; import jhilbert.commands.CommandException; import jhilbert.data.Module;
/* JHilbert, a verifier for collaborative theorem proving Copyright © 2008, 2009, 2011 The JHilbert Authors See the AUTHORS file for the list of JHilbert authors. See the commit logs ("git log") for a list of individual contributions. This program is free software: you can redistribute it and/...
} catch (ScannerException e) {
3
Fedict/commons-eid
commons-eid-tests/src/test/java/be/bosa/commons/eid/client/tests/integration/BeIDCardsTest.java
[ "public class BeIDCard implements AutoCloseable {\n\n\tprivate static final String UI_MISSING_LOG_MESSAGE = \"No BeIDCardUI set and can't load DefaultBeIDCardUI\";\n\tprivate static final String UI_DEFAULT_REQUIRES_HEAD = \"No BeIDCardUI set and DefaultBeIDCardUI requires a graphical environment\";\n\tprivate stati...
import be.bosa.commons.eid.client.BeIDCard; import be.bosa.commons.eid.client.BeIDCards; import be.bosa.commons.eid.client.CancelledException; import be.bosa.commons.eid.client.FileType; import be.bosa.commons.eid.consumer.Identity; import be.bosa.commons.eid.consumer.tlv.TlvParser; import org.junit.Test; import static...
/* * Commons eID Project. * Copyright (C) 2014 - 2018 BOSA. * * This is free software; you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License version 3.0 as published by * the Free Software Foundation. * * This software is distributed in the hope that it will be usef...
byte[] identityFile = beIDCard.readFile(FileType.Identity);
3
nLight/jruby-http-kit
src/org/httpkit/server/RackHandler.java
[ "public class HeaderMap {\n public boolean isEmpty() {\n return size == 0;\n }\n\n public final int INIT_SIZE = 8;\n\n private int size = 0;\n private Object arrays[] = new Object[INIT_SIZE * 2];\n\n public void put(String key, Object obj) {\n final int total = size << 1;\n if...
import clojure.lang.*; import org.httpkit.HeaderMap; import org.httpkit.HttpUtils; import org.httpkit.PrefixThreadFactory; import java.util.Map; import java.util.Arrays; import java.util.TreeMap; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicReference; import static clojure.lang.Keyword.intern...
package org.httpkit.server; @SuppressWarnings({"rawtypes", "unchecked"}) class Rack { static final Keyword SERVER_PORT = intern("server-port"); static final Keyword SERVER_NAME = intern("server-name"); static final Keyword REMOTE_ADDR = intern("remote-addr"); static final Keyword URI = intern("uri"...
PrefixThreadFactory factory = new PrefixThreadFactory(prefix);
2
indvd00m/java-ascii-render
ascii-render/src/main/java/com/indvd00m/ascii/render/elements/Circle.java
[ "public class Point implements IPoint {\n\n\tprotected int x;\n\tprotected int y;\n\n\tpublic Point(int x, int y) {\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}\n\n\t@Override\n\tpublic int getX() {\n\t\treturn x;\n\t}\n\n\t@Override\n\tpublic int getY() {\n\t\treturn y;\n\t}\n\n\t@Override\n\tpublic int ha...
import com.indvd00m.ascii.render.Point; import com.indvd00m.ascii.render.api.ICanvas; import com.indvd00m.ascii.render.api.IContext; import com.indvd00m.ascii.render.api.IElement; import com.indvd00m.ascii.render.api.IPoint;
package com.indvd00m.ascii.render.elements; /** * Circle of a particular radius. * * @author indvd00m (gotoindvdum[at]gmail[dot]com) * @since 0.9.0 */ public class Circle implements IElement { protected int x; protected int y; protected int radius; public Circle() { super(); this.x = Integer.MIN_VALUE;...
public IPoint draw(ICanvas canvas, IContext context) {
2
SW-Team/java-TelegramBot
src/milk/telegram/method/update/TextEditor.java
[ "public class TelegramBot extends Thread{\n\n public static final String BASE_URL = \"https://api.telegram.org/bot%s/%s\";\n\n private String token = \"\";\n\n private int lastId = 0;\n private int limit = 100;\n private int timeout = 1500;\n\n private User me;\n\n private Handler handler;\n\n ...
import milk.telegram.bot.TelegramBot; import milk.telegram.type.Identifier; import milk.telegram.type.Usernamed; import milk.telegram.type.chat.Channel; import milk.telegram.type.message.Message; import milk.telegram.type.message.TextMessage; import milk.telegram.type.reply.ReplyMarkup; import org.json.JSONObject;
package milk.telegram.method.update; public class TextEditor extends Editor{ public TextEditor(TelegramBot bot){ super(bot); } public String getText(){ return this.optString("text"); } public String getChatId(){ return this.optString("chat_id"); } public long g...
public TextEditor setReplyMarkup(ReplyMarkup reply_markup){
6
EBISPOT/webulous
webulous-mvc/src/main/java/uk/ac/ebi/spot/webulous/LoaderApp.java
[ "public class PopulousDataRestriction {\n\n private String restrictionName;\n private String variableName;\n private int columnIndex;\n private String classExpression;\n private RestrictionType restrictionType;\n private String defaultValue;\n private boolean multivalueField = false;\n priva...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import uk.ac.ebi.spot.webulous.model.PopulousDataRestriction; import uk.ac.ebi.spot.we...
package uk.ac.ebi.spot.webulous; /** * @author Simon Jupp * @date 17/03/2015 * Samples, Phenotypes and Ontologies Team, EMBL-EBI */ @SpringBootApplication public class LoaderApp implements CommandLineRunner { @Autowired private PopulousTemplateRepository templateRepository; @Autowired private D...
private RestrictionRunRepository restrictionRunRepository;
6
dotcool/coolreader
src/com/dotcool/reader/task/RelinkImagesTask.java
[ "public class LNReaderApplication extends FOCApplication {\n\tprivate static final String TAG = LNReaderApplication.class.toString();\n\tprivate static NovelsDao novelsDao = null;\n\tprivate static DownloadListActivity downloadListActivity = null;\n\tprivate static UpdateService service = null;\n\tprivate static LN...
import java.io.File; import java.util.ArrayList; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import android.os.AsyncTask; import android.util.Log; import com.dotcool.reader.LNReaderApplication; import com.dotcool.R; import com.dotcool.reader...
package com.dotcool.reader.task; public class RelinkImagesTask extends AsyncTask<Void, ICallbackEventData, Void> implements ICallbackNotifier { private static final String TAG = RelinkImagesTask.class.toString(); private final String rootPath; private ICallbackNotifier callback; private String source; private...
NovelContentModel content = NovelsDao.getInstance().getNovelContent(new BookModel(), false, callback);
7
ebolwidt/cassowary-java
src/main/java/org/klomp/cassowary/layout/ComponentVars.java
[ "public class CL {\n protected final static boolean fDebugOn = false;\n public static boolean fTraceOn = false; // true;\n protected final static boolean fTraceAdded = false;\n protected final static boolean fGC = false;\n\n protected static void debugprint(String s) {\n System.err.println(s);...
import static org.klomp.cassowary.layout.Attribute.BOTTOM; import static org.klomp.cassowary.layout.Attribute.HEIGHT; import static org.klomp.cassowary.layout.Attribute.LEFT; import static org.klomp.cassowary.layout.Attribute.RIGHT; import static org.klomp.cassowary.layout.Attribute.TOP; import static org.klomp.cassowa...
package org.klomp.cassowary.layout; class ComponentVars { private EnumMap<Attribute, ClVariable> map = new EnumMap<Attribute, ClVariable>(Attribute.class); private Component component; private List<ClConstraint> constraints = new ArrayList<ClConstraint>(); public ComponentVars(Component component...
public void addToSolver(ClSimplexSolver solver) {
2
ProtocolSupport/ProtocolSupportPocketStuff
src/protocolsupportpocketstuff/api/skins/SkinUtils.java
[ "public class ProtocolSupportPocketStuff extends JavaPlugin implements Listener {\n\n\tpublic static final String PREFIX = \"[\" + ChatColor.DARK_PURPLE + \"PSPS\" + ChatColor.RESET + \"] \";\n\n\tprivate static ProtocolSupportPocketStuff INSTANCE;\n\tpublic static ProtocolSupportPocketStuff getInstance() {\n\t\tre...
import org.apache.commons.lang3.Validate; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import protocolsupport.api.utils.ProfileProperty; import protocolsupport.libs.com.google.gson.JsonElement; import protocolsupport.libs.com.google.gson.JsonObject; import protocolsupport.libs.com.google.gson.JsonParser; ...
package protocolsupportpocketstuff.api.skins; public class SkinUtils { /*** * Gets a bufferedimage from ARGB byte array. * @param data * @return */ public static BufferedImage imageFromPEData(byte[] data) { Validate.isTrue((data.length == 8192) || (data.length == 16384) || (data.length == 65536), "Skin...
if (PocketPlayer.isPocketPlayer(onlinePlayer)) {
1
crukci-bioinformatics/MGA
src/main/java/org/cruk/mga/CreateReport.java
[ "public static final int DEFAULT_PLOT_WIDTH = 800;", "public class SummaryPlotter\n{\n private static final int[] INTERVALS = new int[] {5, 10, 25};\n private static final int OPTIMUM_NO_INTERVALS = 6;\n private static final float ROW_HEIGHT_SCALING_FACTOR = 1.5f;\n private static final float ROW_GAP_...
import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.commons.lang3.StringUtils.isEmpty; import static org.cruk.mga.MGAConfig.DEFAULT_PLOT_WIDTH; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader;...
/* * The MIT License (MIT) * * Copyright (c) 2017 Cancer Research UK Cambridge Institute * * 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 limita...
OrderedProperties runProperties = readSampleSheet();
4
weltyc/nboard
src/com/welty/nboard/thor/DatabaseTableModel.java
[ "public enum Align {\n LEFT(SwingConstants.LEFT) {\n @Override public int stringStart(int x, int width, int stringWidth) {\n return x;\n }\n },\n\n CENTER(SwingConstants.CENTER) {\n @Override public int stringStart(int x, int width, int stringWidth) {\n return x +...
import static com.welty.othello.thor.Thor.MatchingPositions; import com.welty.nboard.gui.Align; import com.welty.nboard.gui.GridColumn; import com.welty.nboard.gui.GridTableModel; import com.welty.nboard.gui.SignalListener; import com.welty.nboard.nboard.BoardSource; import com.welty.nboard.nboard.OptionSource; import ...
/* * Copyright (c) 2014 Chris Welty. * * This is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 3, * as published by the Free Software Foundation. * * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; wi...
new GridColumn(120, "Black", Align.LEFT),
0
teivah/TIBreview
src/test/java/com/tibco/exchange/tibreview/processor/resourcerule/CProcessorLDAPConfigurationResourceTest.java
[ "public class TIBResource {\n\tprivate String filePath;\n\tprivate String type;\n\t\n\tprivate static final String REQUEST_GET_TYPE = \"/jndi:namedResource/@type\";\n\t\n\tpublic TIBResource(String filePath) throws Exception {\n\t\tthis.filePath = filePath;\n\t\tthis.type = Util.xpathEval(filePath, Constants.RESOUR...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import org.apache.log4j.Logger; import org.junit.Test; import com.tibco.exchange.tibreview.common.TIBResource; import com.tibco.exchange.tibreview.engine.Context; import com.tibco.exchange.tibreview.mod...
package com.tibco.exchange.tibreview.processor.resourcerule; public class CProcessorLDAPConfigurationResourceTest { private static final Logger LOGGER = Logger.getLogger(CProcessorLDAPConfigurationResourceTest.class); @Test public void testCProcessorLDAPConfigurationResourceTest() { TIBResource fi...
Configuration Configuracion = resource.getRule().get(0).getConfiguration();
3
MPieter/Notification-Analyser
NotificationAnalyser/app/src/main/java/com/tierep/notificationanalyser/ui/HistoryFragment.java
[ "public class BarChart extends BarLineChartBase<BarData> {\n\n /** indicates the angle of the 3d effect */\n private float mSkew = 0.3f;\n\n /** indicates how much the 3d effect goes back */\n private float mDepth = 0.3f;\n\n /** flag the enables or disables 3d bars */\n private boolean m3DEnabled...
import android.app.Fragment; import android.graphics.Color; import android.graphics.Paint; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; import android.widget.AdapterView; import android.widget.ListView; import a...
package com.tierep.notificationanalyser.ui; public abstract class HistoryFragment extends Fragment { private DatabaseHelper databaseHelper = null; private Date currentSelectedDate = null; private int selectedXIndex; private int selectedDataSetIndex; private BarChart chart; protected Paint p...
if (getDatabaseHelper().getApplicationDao().queryForEq(Application.FIELD_IGNORE, false).size() > 0) {
4
ceylon/ceylon-model
src/com/redhat/ceylon/model/typechecker/model/Reference.java
[ "static void checkDepth() {\n if (depth.get()>100) {\n throw new DecidabilityException();\n }\n}", "static void decDepth() {\n depth.set(depth.get()-1);\n}", "static void incDepth() {\n depth.set(depth.get()+1);\n}", "static final Map<TypeParameter, Type> EMPTY_TYPE_ARG_MAP = \n Coll...
import static com.redhat.ceylon.model.typechecker.model.Type.checkDepth; import static com.redhat.ceylon.model.typechecker.model.Type.decDepth; import static com.redhat.ceylon.model.typechecker.model.Type.incDepth; import static com.redhat.ceylon.model.typechecker.model.ModelUtil.EMPTY_TYPE_ARG_MAP; import static com.r...
package com.redhat.ceylon.model.typechecker.model; /** * An applied type or applied reference to a method or * attribute. Packages a declaration, together with type * arguments. * * @author Gavin King */ public abstract class Reference { Reference() {} private Map<TypeParameter, Type> typeArgum...
if (isAbstraction(declaration)) {
5
xzela/jastroblast
jastroblast-core/src/org/doublelong/jastroblast/screen/LoadingScreen.java
[ "public class JastroBlast extends Game\n{\n\tpublic final String WINDOW_TITLE = \"jAstroBlast\";\n\tpublic static final int WINDOW_WIDTH = 800;\n\tpublic static final int WINDOW_HEIGHT = 600;\n\n\tpublic static AssetManager manager = new AssetManager();\n\tpublic static final boolean DEBUG = true;\n\n\t@Override\n\...
import org.doublelong.jastroblast.JastroBlast; import org.doublelong.jastroblast.entity.Screens; import org.doublelong.jastroblast.loaders.FreeTypeFontAssetLoader; import org.doublelong.jastroblast.managers.FontManager; import org.doublelong.jastroblast.managers.ScreenManager; import org.doublelong.jastroblast.managers...
package org.doublelong.jastroblast.screen; public class LoadingScreen extends AbstractScreen { private Stage stage; private Image logo; Runnable onLoadingFinish = new Runnable() { @Override public void run() { // TODO Auto-generated method stub ScreenManager.getInstance().show(Screens.MAIN); } ...
JastroBlast.manager.load(SoundManager.GAME_MUSIC, Music.class);
5
architjn/YAAB
app/src/main/java/com/architjn/audiobook/presenter/OnGoingAudioBookPresenter.java
[ "public class AudioBookAdapter extends RecyclerView.Adapter<AudioBookAdapter.ViewHolder> {\n\n private Context context;\n private List<AudioBook> items;\n private IAdapterItemClick<AudioBook> callback;\n\n public AudioBookAdapter(Context context, ArrayList<AudioBook> items,\n ...
import android.content.Context; import android.content.Intent; import android.support.v7.widget.DividerItemDecoration; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import com.architjn.audiobook.adapter.AudioBookAdapter; import com.architjn.audiobook.adapter.IAdapt...
package com.architjn.audiobook.presenter; /** * Created by HP on 23-07-2017. */ public class OnGoingAudioBookPresenter implements IAdapterItemClick<AudioBook>, IAllAudioBookPresenter { private final PrefUtils pref; private final OnGoingAudioBookInteractor interactor; private IAudioBookView view; ...
Intent intent = new Intent(context, PlayerActivity.class);
6
Nilhcem/devoxxfr-2016
app/src/main/java/com/nilhcem/devoxxfr/ui/speakers/list/SpeakersListFragment.java
[ "@DebugLog\npublic class DevoxxApp extends Application {\n\n private AppComponent component;\n\n public static DevoxxApp get(Context context) {\n return (DevoxxApp) context.getApplicationContext();\n }\n\n @Override\n public void onCreate() {\n super.onCreate();\n AndroidThreeTen...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.Snackbar; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ProgressBar; import com.nilhcem.devoxxfr....
package com.nilhcem.devoxxfr.ui.speakers.list; public class SpeakersListFragment extends BaseFragment<SpeakersListPresenter> implements SpeakersListView { @Inject Picasso picasso;
@Inject DataProvider dataProvider;
1
smartnsoft/droid4me
library/src/test/java/com/smartnsoft/droid4me/cache/test/PersistenceTest.java
[ "public static final class InputAtom\n extends Business.Atom\n{\n\n public final Map<String, List<String>> headers;\n\n public final InputStream inputStream;\n\n public final Serializable context;\n\n public InputAtom(Date timestamp, InputStream inputStream)\n {\n this(timestamp, inputStream, null);\n }...
import com.smartnsoft.droid4me.cache.FilePersistence; import com.smartnsoft.droid4me.cache.Persistence; import com.smartnsoft.droid4me.test.BasisTests; import com.smartnsoft.droid4me.ws.WebServiceCaller; import junit.framework.Assert; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.i...
// The MIT License (MIT) // // Copyright (c) 2017 Smart&Soft // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy...
persistence.writeInputStream(uri1, new InputAtom(timestamp, new ByteArrayInputStream(persistedValue.getBytes())), false);
0
gubatron/SellerTrade
src/com/seller/trade/services/ServiceBroker.java
[ "public final class Configuration {\n\n private static final Logger LOG = Lumberjack.getLogger(Configuration.class);\n\n private static final String ST_CONF_ENV = \"ST_CONF\";\n\n private final Properties properties;\n\n public Configuration(String filename) {\n properties = new Properties();\n\n...
import com.seller.trade.utils.Lumberjack; import java.util.logging.Logger; import com.seller.trade.core.Configuration; import com.seller.trade.core.ConfigurationKeys; import com.seller.trade.services.dht.DHTService; import com.seller.trade.services.dht.DHTServiceImpl;
/** * The MIT License =============== Copyright (C) 2015 SellerTrade Developers 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...
private final Configuration configuration;
0
Chisel-Team/ConnectedTexturesMod
src/main/java/team/chisel/ctm/client/texture/type/TextureTypeSCTM.java
[ "@ParametersAreNonnullByDefault\npublic interface ICTMTexture<T extends ITextureType> {\n\n /**\n * Transforms a quad to conform with this texture\n * \n * @param quad\n * The Quad\n * @param context\n * The Context NULL CONTEXT MEANS INVENTORY\n * @param quadGoa...
import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.state.BlockState; import team.chisel.ctm.api.texture.ICTMTexture; import team.chisel.ctm.api.texture.TextureType; import team.chisel.ctm.api.util.TextureInfo; import team.chisel.ctm.client.texture.ct...
package team.chisel.ctm.client.texture.type; @TextureType("sctm") @TextureType("ctm_simple") public class TextureTypeSCTM extends TextureTypeCTM { @Override
public ICTMTexture<TextureTypeSCTM> makeTexture(TextureInfo info) {
0
ppasupat/web-entity-extractor-ACL2014
src/edu/stanford/nlp/semparse/open/model/feature/FeatureType.java
[ "public class BrownClusterTable {\n public static class Options {\n @Option public String brownClusterFilename = null;\n }\n public static Options opts = new Options();\n\n public static Map<String, String> wordClusterMap;\n public static Map<String, Integer> wordFrequencyMap;\n \n public static void init...
import java.util.*; import edu.stanford.nlp.semparse.open.ling.BrownClusterTable; import edu.stanford.nlp.semparse.open.ling.LingData; import edu.stanford.nlp.semparse.open.ling.LingUtils; import edu.stanford.nlp.semparse.open.model.FeatureVector; import edu.stanford.nlp.semparse.open.model.candidate.Candidate; import ...
package edu.stanford.nlp.semparse.open.model.feature; /** * Base class for all feature types. * * A feature type must extends this class and implement 2 methods: * - extract(CandidateGroup group) : For features that are common to all candidates in the same group * - extract(Candidate candidate) : For other fea...
public abstract void extract(Candidate candidate);
4
chedim/minedriod
src/main/java/com/onkiup/minedroid/gui/drawables/RoundedCornerDrawable.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;
package com.onkiup.minedroid.gui.drawables; /** * Draws a rectangle with rounded corners */ public class RoundedCornerDrawable extends ColorDrawable { /** * Rectangle size */ protected Point size; /** * Corners radius; */ protected int radius; protected final static EllipseD...
this.radius = xmlHelper.getDimenAttr(GuiManager.NS, "radius", 0);
0
gwtproject/gwt-places
processor/src/test/java/org/gwtproject/place/processor/MostToLeastDerivedPlaceTypeComparatorTest.java
[ "public abstract class Place {\n\n /** The null place. */\n public static final Place NOWHERE = new Place() {};\n}", "public class Place1 extends Place {\n public final String content;\n\n public Place1(String token) {\n this.content = token;\n }\n\n /** Tokenizer. */\n @Prefix(Tokenizer.PREFIX)\n publ...
import static com.google.common.truth.Truth.*; import com.google.testing.compile.CompilationRule; import java.util.Arrays; import java.util.List; import javax.lang.model.element.TypeElement; import org.gwtproject.place.shared.Place; import org.gwtproject.place.testplaces.Place1; import org.gwtproject.place.testplaces.P...
/* * Copyright 2017 The GWT Project Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
place2 = compilationRule.getElements().getTypeElement(Place2.class.getCanonicalName());
2
msteiger/jxmapviewer2
jxmapviewer2/src/main/java/org/jxmapviewer/JXMapViewer.java
[ "public class PanMouseInputListener extends MouseInputAdapter\r\n{\r\n private Point prev;\r\n private JXMapViewer viewer;\r\n private Cursor priorCursor;\r\n \r\n /**\r\n * @param viewer the jxmapviewer\r\n */\r\n public PanMouseInputListener(JXMapViewer viewer)\r\n {\r\n this.v...
import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Insets; import java.awt.Rectangle; import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; import java.awt.image.BufferedImage; import java.beans.DesignMode; ...
/* * MapViewer.java * * Created on March 14, 2006, 2:14 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package org.jxmapviewer; /** * A tile oriented map component that can easily be used with tile sources * on the web like Google ...
private TileFactory factory;
3
jwtk/jjwt
extensions/gson/src/main/java/io/jsonwebtoken/gson/io/GsonSerializer.java
[ "public final class Encoders {\n\n public static final Encoder<byte[], String> BASE64 = new ExceptionPropagatingEncoder<>(new Base64Encoder());\n public static final Encoder<byte[], String> BASE64URL = new ExceptionPropagatingEncoder<>(new Base64UrlEncoder());\n\n private Encoders() { //prevent instantiati...
import com.google.gson.Gson; import com.google.gson.GsonBuilder; import io.jsonwebtoken.io.Encoders; import io.jsonwebtoken.io.SerializationException; import io.jsonwebtoken.io.Serializer; import io.jsonwebtoken.lang.Assert; import io.jsonwebtoken.lang.Strings;
/* * Copyright (C) 2014 jsonwebtoken.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
public byte[] serialize(T t) throws SerializationException {
1
pokowaka/android-geom
geom/src/main/java/math/geom2d/circulinear/CirculinearCurves2D.java
[ "public class Point2D implements GeometricObject2D, PointShape2D, Cloneable,\r\n CirculinearShape2D {\r\n\r\n // ===================================================================\r\n // class variables\r\n\r\n /** The x coordinate of this point. */\r\n protected double x;\r\n\r\n /** The y c...
import android.annotation.TargetApi; import android.os.Build; import java.util.ArrayList; import java.util.Collection; import java.util.TreeMap; import java.util.TreeSet; import math.geom2d.Point2D; import math.geom2d.Shape2D; import math.geom2d.Vector2D; import math.geom2d.conic.Circle2D; import math.geom2d....
/** * File: CirculinearCurve2DUtils.java * Project: javaGeom * * Distributed under the LGPL License. * * Created: 16 mai 09 */ package math.geom2d.circulinear; /** * Some utilities for working with circulinear curves. * * @author dlegland * */ @TargetApi(Build.VERSION_CODES.GINGERBREA...
public static Collection<Point2D> findSelfIntersections(
0
NicolaasWeideman/RegexStaticAnalysis
src/main/java/preprocessor/EscapeSequenceExpansionRule.java
[ "static class EscapeFactor extends RegexFactor<String> {\n\t\t\n\tpublic enum EscapeType {\n\t\tCHARACTER, OCTAL, UNICODE, HEX, VERBATIM, CHARACTER_PROPERTY\n\t}\n\t\t\n\tprivate final EscapeType type;\n\tpublic EscapeType getEscapeType() {\n\t\treturn type;\n\t}\n\n\tpublic EscapeFactor(String factorContent, Escap...
import java.util.List; import preprocessor.ParsingPreprocessor.EscapeFactor; import preprocessor.ParsingPreprocessor.GroupFactor; import preprocessor.ParsingPreprocessor.GroupFactor.GroupType; import preprocessor.ParsingPreprocessor.RegexFactor; import preprocessor.ParsingPreprocessor.RegexFactor.FactorType; import pre...
package preprocessor; public class EscapeSequenceExpansionRule implements PreprocessorRule { @Override public String process(List<RegexToken> tokenStream) { StringBuilder regexBuilder = new StringBuilder(); RegexToken tokens[] = new RegexToken[tokenStream.size()]; tokens = tokenStream.toArray(tokens); int...
GroupType type = groupFactorToken.getGroupType();
2
adridadou/eth-contract-api
src/main/java/org/adridadou/ethereum/ethj/privatenetwork/PrivateEthereumFacadeProvider.java
[ "public class EthereumFacade {\n public static final Charset CHARSET = Charsets.UTF_8;\n private final EthereumContractInvocationHandler handler;\n private final OutputTypeHandler outputTypeHandler;\n private final InputTypeHandler inputTypeHandler;\n private final EthereumProxy ethereumProxy;\n p...
import com.typesafe.config.ConfigFactory; import org.adridadou.ethereum.EthereumFacade; import org.adridadou.ethereum.EthereumBackend; import org.adridadou.ethereum.EthereumProxy; import org.adridadou.ethereum.ethj.EthereumJConfigs; import org.adridadou.ethereum.ethj.EthereumReal; import org.adridadou.ethereum.converte...
package org.adridadou.ethereum.ethj.privatenetwork; /** * Created by davidroon on 20.11.16. * This code is released under Apache 2 license */ public class PrivateEthereumFacadeProvider { public static final int MINER_PORT = 55555; private final Logger log = LoggerFactory.getLogger(PrivateEthereumFacadePro...
private final EthAccount mainAccount = AccountProvider.fromSeed("cow");
7
kislayverma/rulette-server
src/main/java/com/github/kislayverma/rulette/rest/ui/EditRuleController.java
[ "@ResponseStatus(value= HttpStatus.INTERNAL_SERVER_ERROR, reason=\"Internal Server Error\")\npublic class BadServerException extends RuntimeException {\n\n public BadServerException(String msg) {\n super(msg);\n }\n\n public BadServerException(Throwable e) {\n super(e);\n }\n\n public B...
import com.github.kislayverma.rulette.RuleSystem; import com.github.kislayverma.rulette.rest.exception.BadServerException; import com.github.kislayverma.rulette.rest.api.rule.RuleDto; import com.github.kislayverma.rulette.rest.api.rule.RuleService; import com.github.kislayverma.rulette.rest.api.rulesystem.RuleSystemSer...
package com.github.kislayverma.rulette.rest.ui; @Controller @RequestMapping("/ui") public class EditRuleController { private static final Logger LOGGER = LoggerFactory.getLogger(EditRuleController.class); @Autowired private RuleSystemService ruleSystemService; @Autowired private RuleService rul...
RuleDto dto = new RuleDto();
1
ervinsae/EZCode
app/src/main/java/com/ervin/litepal/ui/fragment/RetrofitFragment.java
[ "public class GetMoviesApi {\n\n //Retrofit\n public static void request(int start, int count, Callback<MovieEntity> callback){\n\n RestClient restClient = new RestClient(RequestConstants.DOUBANAPI_URL);\n restClient.getApiService().getTopMovie(start,count).enqueue(callback);\n }\n\n //Rxa...
import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util...
initRxData(); } private void initRxData() { GetMoviesApi.request(0,top).subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Subscriber<MovieEntity>() { @Override public void onCompleted() ...
Intent intent = new Intent(getActivity(), RetrofitTest.class);
4
jurihock/voicesmith
voicesmith/src/de/jurihock/voicesmith/activities/DafxActivity.java
[ "public enum DAFX\n{\n\tRobotize,\n\tTranspose,\n\tDetune,\n\tHoarseness;\n\t\n\tprivate static final DAFX[] dafxValues = DAFX.values();\n\n\tpublic static int count()\n\t{\n\t\treturn dafxValues.length;\n\t}\n\n\tpublic static DAFX valueOf(int dafxIndex)\n\t{\n\t\treturn dafxValues[dafxIndex];\n\t}\n}", "public ...
import de.jurihock.voicesmith.Utils; import de.jurihock.voicesmith.services.DafxService; import de.jurihock.voicesmith.services.ServiceFailureReason; import de.jurihock.voicesmith.services.ServiceListener; import de.jurihock.voicesmith.widgets.ColoredToggleButton; import de.jurihock.voicesmith.widgets.DafxPicker; impor...
/* * Voicesmith <http://voicesmith.jurihock.de/> * * Copyright (c) 2011-2014 Juergen Hock * * 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...
OnCheckedChangeListener, ServiceListener
4
treasure-data/td-jdbc
src/main/java/com/treasuredata/jdbc/TDDatabaseMetaData.java
[ "public interface ClientAPI\n{\n public static class ExtUnpacker\n {\n private File file;\n private Unpacker unpacker;\n\n public ExtUnpacker(File file, Unpacker unpacker)\n {\n this.file = file;\n this.unpacker = unpacker;\n }\n\n public File ge...
import com.treasure_data.client.ClientException; import com.treasuredata.jdbc.command.ClientAPI; import com.treasuredata.jdbc.model.TDColumn; import com.treasuredata.jdbc.model.TDDataType; import com.treasuredata.jdbc.model.TDDatabase; import com.treasuredata.jdbc.model.TDImportedKey; import com.treasuredata.jdbc.model...
} catch (Exception e) { throw new SQLException(e); } } public Connection getConnection() throws SQLException { throw new SQLException("Unsupported TDDatabaseMetaData#getConnection()"); } public ResultSet getCrossReference(String primaryCatalo...
return new TDMetaDataResultSet<TDImportedKey>(null, null, null)
4
csm/java-sandbox
src/main/java/net/datenwerke/transloader/reference/DefaultReflecter.java
[ "public final class Assert {\r\n\r\n private Assert() {\r\n }\r\n\r\n /**\r\n * Asserts that the given parameter is not <code>null</code>.\r\n *\r\n * @param parameter the parameter to check\r\n * @return the given <code>parameter</code> (if an <code>Exception</code> was not already thrown ...
import net.datenwerke.transloader.except.Assert; import net.datenwerke.transloader.reference.element.ElementReflecter; import net.datenwerke.transloader.reference.field.FieldReflecter; import net.datenwerke.transloader.reference.field.FieldSetter; import net.datenwerke.transloader.reference.field.NoSetter;
/* * transloader * * This file is part of transloader http://code.google.com/p/transloader/ as part * of the java-sandbox https://sourceforge.net/p/dw-sandbox/ * * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obt...
(AbstractReflecter) new FieldReflecter(subject, setter);
2
lingochamp/FileDownloader
library/src/main/java/com/liulishuo/filedownloader/download/DownloadRunnable.java
[ "@SuppressWarnings(\"EmptyMethod\")\npublic interface FileDownloadConnection {\n int NO_RESPONSE_CODE = 0;\n int RESPONSE_CODE_FROM_OFFSET = 1;\n\n /**\n * Sets the header named {@code name} to {@code value}.\n * <p>\n * The capacity of this method is similar to the\n * {@link URLConnection...
import java.util.List; import android.os.Process; import com.liulishuo.filedownloader.connection.FileDownloadConnection; import com.liulishuo.filedownloader.database.FileDownloadDatabase; import com.liulishuo.filedownloader.exception.FileDownloadGiveUpRetryException; import com.liulishuo.filedownloader.model.Connection...
/* * Copyright (c) 2015 LingoChamp 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 agre...
} catch (IllegalAccessException | IOException | FileDownloadGiveUpRetryException
2
marcosalis/kraken
kraken_lib/src/androidTest/java/com/github/marcosalis/kraken/cache/bitmap/BitmapCacheBuilderTest.java
[ "@Beta\npublic enum CacheSource {\n MEMORY,\n DISK,\n NETWORK;\n}", "public enum ClearMode {\n ALL,\n EVICT_OLD\n}", "@Beta\n@ThreadSafe\npublic class SimpleDiskCache<V> implements SecondLevelCache<String, V> {\n\n /**\n * Minimum expiration that can be set to a disk cache entry before it ...
import com.github.marcosalis.kraken.cache.bitmap.internal.DefaultBitmapDecoder; import com.github.marcosalis.kraken.cache.bitmap.memory.BitmapMemoryCache; import com.github.marcosalis.kraken.cache.keys.SimpleCacheUrlKey; import com.github.marcosalis.kraken.utils.DroidUtils; import com.google.api.client.http.HttpRequest...
/* * Copyright 2013 Marco Salis - fast3r(at)gmail.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
final SimpleCacheUrlKey key = new SimpleCacheUrlKey("http://www.mymockurl.com");
7
recoilme/freemp
app/src/main/java/org/freemp/droid/playlist/ActPlaylist.java
[ "public class ClsTrack implements Serializable {\n\n private static final long serialVersionUID = 1L;\n private String artist;\n private String title;\n private String album;\n private String composer;\n private int year;\n private int track;\n private int duration;\n private String path;...
import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.os.Environment; import android.preference.PreferenceManager; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.supp...
package org.freemp.droid.playlist; /** * Created with IntelliJ IDEA. * User: recoilme * Date: 25/11/13 * Time: 13:46 * To change this template use File | Settings | File Templates. */ public class ActPlaylist extends AppCompatActivity { public int type; private Activity activity; private AQuery ...
private FragmentAlbums albumsFragment = new FragmentAlbums();
3
kdgregory/pathfinder
lib-servlet/src/main/java/com/kdgregory/pathfinder/servlet/ServletInspector.java
[ "public enum HttpMethod\n{\n ALL(\"\"),\n GET(\"GET\"),\n POST(\"POST\"),\n PUT(\"PUT\"),\n DELETE(\"DELETE\");\n\n private String stringValue;\n\n HttpMethod(String stringValue)\n {\n this.stringValue = stringValue;\n }\n\n @Override\n public String toString()\n {\n ...
import org.apache.log4j.Logger; import com.kdgregory.pathfinder.core.HttpMethod; import com.kdgregory.pathfinder.core.Inspector; import com.kdgregory.pathfinder.core.PathRepo; import com.kdgregory.pathfinder.core.WarMachine; import com.kdgregory.pathfinder.core.WarMachine.ServletMapping;
// Copyright (c) Keith D Gregory // // 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 ...
paths.put(filename, HttpMethod.GET, new StaticDestination(filename));
0
davidbecker/taloonerrl
core/src/main/java/de/brainstormsoftworks/taloonerrl/core/engine/SpriteMapper.java
[ "@Getter\npublic class AnimationComponent extends PooledComponent implements ISetAbleComponent<AnimationComponent> {\n\tprivate EEntity entityType = EEntity.NOTHING;\n\tprivate @Setter Animation animation = null;\n\n\t@Override\n\tprotected void reset() {\n\t\tentityType = EEntity.NOTHING;\n\t\tanimation = null;\n\...
import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture.TextureFilter; import com.badlogic.gdx.graphics.Texture.TextureWrap...
mapSpriteShield(type, 1, 0); break; case SHIELD_C: mapSpriteShield(type, 2, 0); break; case SHIELD_D: mapSpriteShield(type, 3, 0); break; case SHIELD_E: mapSpriteShield(type, 4, 0); break; case SHIELD_F: mapSpriteShield(type, 5, 0); break; case SHIELD_G: mapSpriteShield(type, ...
return new TextureRegion(texture, x * Renderer.tileSize, y * Renderer.tileSize, Renderer.tileSize,
5
vector-im/riot-automated-tests
VectorMobileTests/src/test/java/mobilestests_ios/RiotMediaTests.java
[ "public class RiotMediaViewerPageObjects extends TestUtilities{\n\tprivate AppiumDriver<MobileElement> driver;\n\tpublic RiotMediaViewerPageObjects(AppiumDriver<MobileElement> myDriver) {\n\t\tdriver= myDriver;\n\t\tPageFactory.initElements(new AppiumFieldDecorator(driver), this);\n\t\ttry {\n\t\t\tAssert.assertTru...
import java.io.FileNotFoundException; import org.testng.Assert; import org.testng.annotations.BeforeGroups; import org.testng.annotations.Listeners; import org.testng.annotations.Test; import com.esotericsoftware.yamlbeans.YamlException; import pom_ios.RiotMediaViewerPageObjects; import pom_ios.RiotRoomDetailsPageObjec...
package mobilestests_ios; /** * Tests on medias: photo, video, gif. * @author jeangb */ @Listeners({ ScreenshotUtility.class }) public class RiotMediaTests extends RiotParentTest{ private String riotUserDisplayName="riotuser17"; private String roomWithPhoto="attached photos"; /** * 1. Open room roomtest. </...
super.checkIfUserLoggedAndHomeServerSetUpIos(appiumFactory.getiOsDriver1(), riotUserDisplayName, Constant.DEFAULT_USERPWD);
4
asascience-open/ncSOS
src/main/java/com/asascience/ncsos/ds/IoosNetwork10Handler.java
[ "public class ErrorFormatter extends XmlOutputFormatter {\n\n private final static String TEMPLATE = \"templates/exception.xml\";\n\n public ErrorFormatter() {\n super();\n }\n\n @Override\n protected String getTemplateLocation() {\n return TEMPLATE;\n }\n \n public void setExc...
import com.asascience.ncsos.cdmclasses.*; import com.asascience.ncsos.outputformatter.ErrorFormatter; import com.asascience.ncsos.outputformatter.XmlOutputFormatter; import com.asascience.ncsos.outputformatter.ds.IoosNetwork10Formatter; import com.asascience.ncsos.util.ListComprehension; import com.asascience.ncsos.uti...
package com.asascience.ncsos.ds; public class IoosNetwork10Handler extends Ioos10Handler implements BaseDSInterface { private final String procedure; private final String server; private final static org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(IoosNetwork10Handler.class); p...
formatter = new ErrorFormatter();
0