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
simo415/spc
src/com/sijobe/spc/command/SetSpawn.java
[ "public enum FontColour {\n \n BLACK(\"\\2470\"),\n DARK_BLUE(\"\\2471\"),\n DARK_GREEN(\"\\2472\"),\n DARK_AQUA(\"\\2473\"),\n DARK_RED(\"\\2474\"),\n PURPLE(\"\\2475\"),\n ORANGE(\"\\2476\"),\n GREY(\"\\2477\"),\n DARK_GREY(\"\\2478\"),\n BLUE(\"\\2479\"),\n GREEN(\"\\247a\"),\n AQUA(\"\...
import com.sijobe.spc.util.FontColour; import com.sijobe.spc.validation.Parameter; import com.sijobe.spc.validation.ParameterInteger; import com.sijobe.spc.validation.Parameters; import com.sijobe.spc.wrapper.CommandException; import com.sijobe.spc.wrapper.CommandSender; import com.sijobe.spc.wrapper.Coordinate; import...
package com.sijobe.spc.command; /** * Sets the players spawn based on the player position or the arguments * provided * * @author simo_415 * @version 1.0 */ @Command ( name = "setspawn", description = "Sets the spawn point of the world the player is in", videoURL = "http://www.youtube.com/watch?v=2Z...
public void execute(CommandSender sender, List<?> params) throws CommandException {
5
FedUni/caliko
caliko-demo/src/main/java/au/edu/federation/caliko/demo2d/MultipleConnectedChainsLocalRelativeBaseBoneConstraints.java
[ "public enum BoneConnectionPoint { START, END }", "public class FabrikBone2D implements FabrikBone<Vec2f,FabrikJoint2D>\r\n{\r\n\t/**\r\n\t * mJoint\tThe joint attached to this FabrikBone2D.\r\n\t * <p>\r\n\t * Each bone has a single FabrikJoint2D which controls the angle to which the bone is\r\n\t * constrained ...
import au.edu.federation.caliko.BoneConnectionPoint; import au.edu.federation.caliko.FabrikBone2D; import au.edu.federation.caliko.FabrikChain2D; import au.edu.federation.caliko.FabrikChain2D.BaseboneConstraintType2D; import au.edu.federation.caliko.FabrikStructure2D; import au.edu.federation.utils.Mat4f; import au.edu...
package au.edu.federation.caliko.demo2d; /** * @author jsalvo */ public class MultipleConnectedChainsLocalRelativeBaseBoneConstraints extends CalikoDemoStructure2D { @Override public void setup() { // Instantiate our FabrikStructure2D this.structure = new FabrikStructure2D("Demo 5 - Multiple connected chains...
FabrikBone2D basebone = new FabrikBone2D( new Vec2f(0.0f, -100.0f), UP, boneLength);
1
KostyaSha/github-integration-plugin
github-pullrequest-plugin/src/main/java/org/jenkinsci/plugins/github/pullrequest/events/impl/GitHubPRLabelRemovedEvent.java
[ "public class GitHubPRDecisionContext extends GitHubDecisionContext<GitHubPREvent, GitHubPRCause> {\n private final GHPullRequest remotePR;\n private final GitHubPRPullRequest localPR;\n private final GitHubPRUserRestriction prUserRestriction;\n private final GitHubPRRepository localRepo;\n\n protect...
import com.github.kostyasha.github.integration.generic.GitHubPRDecisionContext; import hudson.Extension; import hudson.model.TaskListener; import org.jenkinsci.Symbol; import org.jenkinsci.plugins.github.pullrequest.GitHubPRCause; import org.jenkinsci.plugins.github.pullrequest.GitHubPRLabel; import org.jenkinsci.plugi...
package org.jenkinsci.plugins.github.pullrequest.events.impl; /** * When label is removed from GitHub issue(== pull request). Set of labels is considered removed only when * at least one label of set was newly removed (was saved in local PR previously) * AND every label of set was already removed from remote PR....
GitHubPRPullRequest localPR = prDecisionContext.getLocalPR();
3
treeleafj/xDoc
xDoc-core/src/main/java/org/treeleafj/xdoc/resolver/javaparser/JavaParserDocTagResolver.java
[ "public interface Framework {\n\n /**\n * 扩展API数据\n *\n * @param apiModules 原始基本的Api数据\n * @return 扩展后的api数据\n */\n List<ApiModule> extend(List<ApiModule> apiModules);\n\n /**\n * 判断该类是否适合该框架\n *\n * @param classz 扫描到的类\n * @return 是支持\n */\n boolean support(Class...
import com.github.javaparser.JavaParser; import com.github.javaparser.ParseResult; import com.github.javaparser.ast.CompilationUnit; import com.github.javaparser.ast.body.MethodDeclaration; import com.github.javaparser.ast.body.Parameter; import com.github.javaparser.ast.body.TypeDeclaration; import com.github.javapars...
package org.treeleafj.xdoc.resolver.javaparser; /** * 基于开源JavaParser实现的解析 * <p> * * @author leaf * @date 2017/4/1 0001 */ public class JavaParserDocTagResolver implements DocTagResolver { private Logger log = LoggerFactory.getLogger(JavaParserDocTagResolver.class); private JavaParser javaParser = new...
ApiAction apiAction = new ApiAction();
1
hanhailong/VCL-Android
vlc-android/src/org/videolan/vlc/gui/MainActivity.java
[ "public final class BuildConfig {\n public static final boolean DEBUG = Boolean.parseBoolean(\"true\");\n public static final String APPLICATION_ID = \"org.videolan.vlc.debug\";\n public static final String BUILD_TYPE = \"debug\";\n public static final String FLAVOR = \"chromeARMv5\";\n public static final int...
import android.annotation.TargetApi; import android.app.SearchManager; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.database.Cursor; import android.net.Uri; import android.os.Build; import android...
/***************************************************************************** * MainActivity.java ***************************************************************************** * Copyright © 2011-2014 VLC authors and VideoLAN * * This program is free software; you can redistribute it and/or modify * it under the ...
mVersionNumber = BuildConfig.VERSION_CODE;
0
cytomine/Cytomine-java-client
src/main/java/be/cytomine/client/sample/AnnotationExample.java
[ "public class Cytomine {\n\n private static final Logger log = LogManager.getLogger(Cytomine.class);\n static Cytomine CYTOMINE;\n\n CytomineConnection defaultCytomineConnection;\n private String host;\n private String login;\n private String pass;\n private String publicKey;\n private Strin...
import be.cytomine.client.Cytomine; import be.cytomine.client.CytomineException; import be.cytomine.client.collections.AnnotationCollection; import be.cytomine.client.models.Annotation; import be.cytomine.client.models.AnnotationTerm; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; i...
package be.cytomine.client.sample; /* * Copyright (c) 2009-2020. Authors: see NOTICE file. * * 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/LICEN...
} catch (CytomineException e) {
1
iconmaster5326/Source
src/com/iconmaster/source/link/Platform.java
[ "public abstract class AssembledOutput {\n\tpublic ArrayList<SourceException> errs = new ArrayList<>();\n\t\n\tpublic void saveToFile(SourceOptions opts) {\n\t\ttry {\n\t\t\t(new FileWriter(opts.outputFile)).append(getOutputString()).close();\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(AssembledOutput.c...
import com.iconmaster.source.assemble.AssembledOutput; import com.iconmaster.source.compile.CompileUtils.CodeTransformer; import com.iconmaster.source.prototype.Field; import com.iconmaster.source.prototype.Function; import com.iconmaster.source.prototype.SourcePackage; import com.iconmaster.source.util.Directives; imp...
package com.iconmaster.source.link; /** * * @author iconmaster */ public abstract class Platform { public String name; public HashMap<String,SourcePackage> pkgs = new HashMap<>();
public ArrayList<CodeTransformer> transforms = new ArrayList<>();
1
erlymon/erlymon-monitor-android
erlymon-monitor-app/src/main/java/org/erlymon/monitor/mvp/MainService.java
[ "public class Utils {\n public static <T> Observable.Transformer<T, T> applySchedulers() {\n return observable -> observable.subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread());\n }\n}", "public class Command implements Parcelable {\n @Expose\n private Long ...
import android.database.Cursor; import android.support.v4.util.Pair; import com.appunite.websocket.rx.object.RxObjectWebSockets; import com.fernandocejas.frodo.annotation.RxLogObservable; import org.erlymon.monitor.mvp.common.Utils; import org.erlymon.monitor.mvp.model.Command; import org.erlymon.monitor.mvp.model.Devi...
/* * Copyright (c) 2016, Sergey Penkovsky <sergey.penkovsky@gmail.com> * * This file is part of Erlymon Monitor. * * Erlymon Monitor 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 t...
public Observable<Server> getServer() {
6
sweer/hex-image-compress
src/test/filter/H2OTest.java
[ "public static final double DELTA = 0.00000001;", "public class DoubleLattice extends Lattice {\r\n\t/**\r\n\t * @uml.property name=\"data\"\r\n\t */\r\n\tprivate final double[][] data;\r\n\tpublic DoubleLattice(double[][] data, int ox, int oy) {\r\n\t\tsuper(ox,oy);\r\n\t\tthis.data = data;\r\n\t}\r\n\t\r\n ...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static test.TestUtils.DELTA; import lattice.DoubleLattice; import lattice.Lattice; import org.junit.Ignore; import org.junit.Test; import util.ArrayUtils; import filter.H2O; import filter.H2O.Direction; import filter.H2O.H2OR...
package test.filter; public class H2OTest { private int expectedOX; private int expectedOY; @Test public final void testSetGetData() { // @formatter:off final double[][] source = { { 1, 2, 3, 4 }, { 5, 6, 7, 8 }, { 9, 10, 11, 12 ...
H2ORunner H2ORunner = new H2ORunner(SincRepeater.getFactory());
8
graphql-java/java-dataloader
src/test/java/org/dataloader/DataLoaderValueCacheTest.java
[ "public class CaffeineValueCache implements ValueCache<String, Object> {\n\n public final Cache<String, Object> cache;\n\n public CaffeineValueCache(Cache<String, Object> cache) {\n this.cache = cache;\n }\n\n @Override\n public CompletableFuture<Object> get(String key) {\n Object value...
import com.github.benmanes.caffeine.cache.Cache; import com.github.benmanes.caffeine.cache.Caffeine; import org.dataloader.fixtures.CaffeineValueCache; import org.dataloader.fixtures.CustomValueCache; import org.dataloader.impl.DataLoaderAssertionException; import org.junit.Test; import java.util.ArrayList; import java...
CompletableFuture<Void> fC = new CompletableFuture<>(); identityLoader.clear("b", (v, e) -> fC.complete(v)); await().until(fC::isDone); assertArrayEquals(customValueCache.store.keySet().toArray(), asList("a", "c").toArray()); // Supports clear all CompletableFuture<Voi...
snooze(1000);
5
packetpirate/Generic-Zombie-Shooter
GenericZombieShooter/src/genericzombieshooter/structures/weapons/Shotgun.java
[ "public class Player extends Rectangle2D.Double {\r\n // Final variables.\r\n public static final int DEFAULT_HEALTH = 150;\r\n public static final long INVINCIBILITY_LENGTH = 3000;\r\n private static final double MOVE_SPEED = 2; // How many pixels per tick the player moves.\r\n public static final d...
import genericzombieshooter.actors.Player; import genericzombieshooter.actors.Zombie; import genericzombieshooter.misc.Globals; import genericzombieshooter.misc.Sounds; import genericzombieshooter.structures.Particle; import genericzombieshooter.structures.items.UnlimitedAmmo; import java.awt.Color; import java....
/** This file is part of Generic Zombie Shooter. Generic Zombie Shooter 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 ver...
public void fire(double theta, Point2D.Double pos, Player player) {
0
hageldave/ImagingKit
ImagingKit_Core/src/test/java/hageldave/imagingkit/core/io/IOTest.java
[ "public class Img implements ImgBase<Pixel> {\n\n\t/** boundary mode that will return 0 for out of bounds positions.\n\t * @see #getValue(int, int, int)\n\t * @since 1.0\n\t */\n\tpublic static final int boundary_mode_zero = 0;\n\n\t/** boundary mode that will repeat the edge of of an Img for out of\n\t * bounds po...
import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.nio.file.FileVisitResult; import java.nio.file.FileVisitor; import java.nio.file.Files; import java.nio.file...
package hageldave.imagingkit.core.io; public class IOTest { static File testDir = new File("testdir"); static void deleteDir(File dir){ if(dir.exists()){ Path start = dir.toPath(); FileVisitor<Path> deletor = new SimpleFileVisitor<Path>() { @Override public FileVisitResult visitFile(Path file,...
Img loaded = Img.createRemoteImg(ImageLoader.loadImage(testFile, BufferedImage.TYPE_INT_ARGB));
3
timboudreau/nb-nodejs
node-projects/src/main/java/org/netbeans/modules/nodejs/NodeJSUtilsImpl.java
[ "public abstract class NodeJSPlatformProvider {\n public abstract NodeJSExecutable get ();\n\n public static NodeJSExecutable get ( Project project ) {\n NodeJSPlatformProvider prov = project == null ? null : project.getLookup().lookup( NodeJSPlatformProvider.class );\n if (prov == null) {\n ...
import org.openide.filesystems.FileSystem; import org.openide.filesystems.FileUtil; import org.openide.util.Lookup; import org.openide.util.lookup.ServiceProvider; import org.netbeans.modules.nodejs.api.NodeJSPlatformProvider; import org.netbeans.modules.nodejs.api.NodeJSExecutable; import java.io.File; import java.io....
/* Copyright (C) 2012 Tim Boudreau Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distrib...
List<ProjectNodeKey> all = f.libraries();
5
simonpercic/WaterfallCache
waterfallcache/src/main/java/com/github/simonpercic/waterfallcache/WaterfallCache.java
[ "public class BucketCache implements RxCache {\n\n // Bucket disk cache\n private final Bucket bucket;\n\n /**\n * Bucket disk cache.\n *\n * @param context context\n * @param maxSizeBytes max size of cache in bytes\n * @throws IOException\n */\n public BucketCache(Context contex...
import android.content.Context; import android.util.Log; import android.util.LruCache; import com.github.simonpercic.waterfallcache.cache.BucketCache; import com.github.simonpercic.waterfallcache.cache.Cache; import com.github.simonpercic.waterfallcache.cache.RxCache; import com.github.simonpercic.waterfallcache.callba...
package com.github.simonpercic.waterfallcache; /** * Waterfall cache. * Composed of cache levels, if level N does not contain a value, tries to get it from level N+1. * Writes cache value from level N+1 to level N, if N does not contain it. * Writes and deletes values from all levels on {#put} and {#remove}. ...
public void putAsync(String key, Object object, WaterfallCallback callback) {
3
mikkeliamk/osa
src/fi/mamk/osa/stripes/RoleAction.java
[ "public class AccessRight implements Serializable {\n\t\n private static final long serialVersionUID = -8302724810061640050L;\n\n public static final int ACCESSRIGHTLEVEL_DENY_META = -1;\n public static final int ACCESSRIGHTLEVEL_READ_META = 10;\n public static final int ACCESSRIGHTLEVEL...
import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Vector; import fi.mamk.osa.auth.AccessRight; import fi.mamk.osa.auth.LdapManager; import fi.mamk.osa.auth.Role; import fi.m...
package fi.mamk.osa.stripes; /** * Role Action */ @UrlBinding("/Role.action") public class RoleAction extends OsaBaseActionBean { private static final Logger logger = Logger.getLogger(RoleAction.class); private String roleName; private String roleOrganization; private String messageAddSuccess; ...
Collections.sort(roleList, new RoleComparator(RoleComparator.NAME, false));
6
eviltester/testtoolhub
src/main/java/uk/co/compendiumdev/javafortesters/gui/javafx/stages/HTTPLinkCheckerGridStage.java
[ "public class LinkChecker {\n private final LinkQueue links;\n private int currentLinkToCheck;\n\n public LinkChecker(LinkQueue links) {\n this.links = links;\n currentLinkToCheck = 0;\n }\n\n public boolean hasLinksToCheck() {\n return (currentLinkToCheck<links.numberInQueue());...
import javafx.beans.binding.When; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.concurrent.Service; import javafx.concurrent.Task; import javafx.concurrent.Worker; import javafx.event.ActionEvent; import javafx.event.Event; import javafx.event.EventHandler; import java...
package uk.co.compendiumdev.javafortesters.gui.javafx.stages; public class HTTPLinkCheckerGridStage extends Stage { private static HTTPLinkCheckerGridStage urlLauncherGridSingletonStage=null; private static Service<ObservableList<String>> service; LinkQueue defaultLinks; LinkChecker linksToCheck; ...
final ObservableList<LinkToCheck> urlsToCheck = FXCollections.observableArrayList();
3
domoinc/domo-java-sdk
domo-java-sdk-all/src/test/java/com/domo/sdk/streams/ExecutionRetrieveExample.java
[ "public class ExampleBase {\n\n protected DomoClient client;\n\n @Before\n public void setup() {\n Config config = Config.with()\n .clientId(\"MY_CLIENT_ID\")\n .clientSecret(\"MY_CLIENT_SECRET\")\n .apiHost(\"api.domo.com\")\n .useHttps(true)\n .scope(US...
import com.domo.sdk.ExampleBase; import com.domo.sdk.datasets.model.Column; import com.domo.sdk.datasets.model.CreateDataSetRequest; import com.domo.sdk.datasets.model.Schema; import com.domo.sdk.streams.model.Execution; import com.domo.sdk.streams.model.Stream; import com.domo.sdk.streams.model.StreamRequest; import c...
package com.domo.sdk.streams; public class ExecutionRetrieveExample extends ExampleBase { @Test public void streamClient_smokeTest() throws IOException { StreamClient sdsClient = client.streamClient(); //Build DataSet to populate the create stream request CreateDataSetRequest ds = new CreateData...
sdsRequest.setUpdateMethod(UpdateMethod.APPEND);
7
suewonjp/civilizer
src/test/java/com/civilizer/test/helper/TestUtil.java
[ "public final class AppOptions {\n\n\tpublic static final String OPTION_FILE_NAME = \"app-options.properties\";\n\t\n\t// options for production usages\n\tpublic static final String PRIVATE_HOME_PATH = \"civilizer.private_home_path\";\n\tpublic static final String DB_FILE_PREFIX ...
import static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.net.URL; import java.util.*; import org.apache.commons.io.FileUtils; import org.apache.log4j.PropertyConfigurator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.civilizer.config.AppOptions; import com.ci...
package com.civilizer.test.helper; public final class TestUtil { private static final Logger logger = newLogger(); private static final Random random = newRandomGenerator(); private static Logger newLogger() { String log4jPropName = "log4j-test.properties"; URL url = ClassLoader.getSyst...
List<FileEntity> fileEntitiesFromDB = fileEntityDao.findAll();
3
OnlyInAmerica/BLEMeshChat
app/src/main/java/pro/dbro/ble/ChatPeerFlow.java
[ "public abstract class DataStore {\n\n protected Context mContext;\n\n public DataStore(@NonNull Context context) {\n mContext = context.getApplicationContext();\n }\n\n public abstract void markMessageDeliveredToPeer(@NonNull MessagePacket message, @NonNull IdentityPacket recipient);\n\n publ...
import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.List; import pro.dbro.airshare.session.Peer; import pro.dbro.ble.data.DataStore; import pro.dbro.ble.data.model.DataUtil; import pro.dbro.ble.data.model.Messag...
package pro.dbro.ble; /** * This class orchestrates the flow between two ChatApp Peers, handing network requests and * updating the {@link pro.dbro.ble.data.DataStore}. The client of this class may use * {@link ChatPeerFlow.Callback} to update their UI or in-memory application state. * * The general gist of th...
case NoDataPacket.TYPE:
6
amao12580/BookmarkHelper
app/src/main/java/pro/kisscat/www/bookmarkhelper/converter/support/impl/chrome/impl/YandexBrowser.java
[ "public final class R {\n public static final class anim {\n public static final int abc_fade_in=0x7f050000;\n public static final int abc_fade_out=0x7f050001;\n public static final int abc_grow_fade_in_from_bottom=0x7f050002;\n public static final int abc_popup_enter=0x7f050003;\n ...
import android.content.Context; import android.support.v4.content.ContextCompat; import java.util.LinkedList; import java.util.List; import pro.kisscat.www.bookmarkhelper.R; import pro.kisscat.www.bookmarkhelper.converter.support.impl.chrome.ChromeBrowserAble; import pro.kisscat.www.bookmarkhelper.entry.app.Bookmark; i...
package pro.kisscat.www.bookmarkhelper.converter.support.impl.chrome.impl; /** * Created with Android Studio. * Project:BookmarkHelper * User:ChengLiang * Mail:stevenchengmask@gmail.com * Date:2016/12/1 * Time:17:28 */ public class YandexBrowser extends ChromeBrowserAble { private static final String pa...
throw new ConverterException(ContextUtil.buildReadBookmarksErrorMessage(this.getName()));
5
pgroth/hbase-rdf
src/main/java/nl/vu/datalayer/hbase/test/HBaseLocalPrefixMatchTest.java
[ "public class HBaseClientSolution {\r\n\tpublic IHBaseSchema schema;\r\n\tpublic IHBaseOperationManager opsManager;\r\n\t\r\n\tpublic HBaseClientSolution(IHBaseSchema schema, IHBaseOperationManager opsManager) {\r\n\t\tsuper();\r\n\t\tthis.schema = schema;\r\n\t\tthis.opsManager = opsManager;\r\n\t}\r\n}\r", "pub...
import java.io.IOException; import java.util.ArrayList; import nl.vu.datalayer.hbase.HBaseClientSolution; import nl.vu.datalayer.hbase.HBaseFactory; import nl.vu.datalayer.hbase.connection.HBaseConnection; import nl.vu.datalayer.hbase.operations.IHBaseOperationManager; import nl.vu.datalayer.hbase.schema.HBPrefixMatchS...
package nl.vu.datalayer.hbase.test; public class HBaseLocalPrefixMatchTest { public static void main(String[] args) { try { /*String outputPath = "./"; HBaseConnection con = new HBaseConnection(); HBPrefixMatchSchema.createCounterTable(con.getAdmin()); Path resourceIds = new Path(outputPath+Tri...
HBaseClientSolution sol = HBaseFactory.getHBaseSolution(HBPrefixMatchSchema.SCHEMA_NAME, con, null);
1
sih4sing5hong5/han3_ji7_tsoo1_kian3
src/main/java/cc/char_indexingtool/SimplePieceSetter.java
[ "public class ChineseCharacterMovableTypeTzu extends ChineseCharacterMovableType\n{\n\n\t/**\n\t * 底下的各個活字\n\t */\n\tprotected ChineseCharCompositeMoveabletype[] children;\n\n\t/**\n\t * 以<code>ChineseCharacter</code>部件結構建立字活字結構\n\t * \n\t * @param parent\n\t * 上一層的活字結構。若上層為樹狀的樹根,傳入null\n\t * @param chin...
import java.awt.BasicStroke; import java.awt.Font; import java.awt.font.FontRenderContext; import java.awt.font.GlyphVector; import java.awt.geom.Area; import cc.movabletype.ChineseCharacterMovableTypeTzu; import cc.movabletype.PieceMovableTypeWen; import cc.movabletype.SeprateMovabletype; import idsrend.charcomponent....
package cc.char_indexingtool; /** * 物件活字設定工具。將部件結構(<code>ChineseCharacter</code>)轉換成活字結構( * <code>PieceMovableType</code>)。把活字的資訊全部集中在同一個物件上(<code>Piece</code>, * <code>RectangularArea</code>型態 ),方便函式傳遞與使用,而且物件上也有相對應操縱的函式。 * <p> * <code>SimplePiece</code>是在設定時兩兩配對後定框,調整時更改部件大小,但無法物件難實作距離貼近或拉開。 * * @author Ih...
NonFinalCharComponent chineseCharacterWen)
4
wso2-extensions/identity-outbound-auth-samlsso
components/org.wso2.carbon.identity.application.authenticator.samlsso/src/main/java/org/wso2/carbon/identity/application/authenticator/samlsso/logout/validators/LogoutRequestValidator.java
[ "public class SAMLMessageContext<T1 extends Serializable, T2 extends Serializable> extends IdentityMessageContext {\n\n private String acsUrl;\n private String response;\n private String sessionID;\n private String idpSessionID;\n private String tenantDomain;\n private Boolean validStatus;\n pr...
import java.util.List; import java.util.function.Consumer; import static org.wso2.carbon.identity.application.authenticator.samlsso.util.SSOConstants.ISSUER_FORMAT; import static org.wso2.carbon.identity.application.common.util.IdentityApplicationConstants.Authenticator. SAML2SSO.IS_LOGOUT_REQ_SIGNED; import or...
/* * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
String errorResponse = SAMLLogoutUtil.buildErrorResponse(samlMessageContext, logoutRequest.getID(),
3
sarveshchavan7/Trivia-Knowledge
app/src/main/java/sarveshchavan777/inrerface2/Tab/HomeScreen/HomePlayTab.java
[ "public class Category extends Activity implements ComponentCallbacks2 {\n ImageView imageView;\n TextView tv, tvPersonality, tvSports, tvGeography, tvScience, tvArts, tvEntertainment;\n ImageView imageView1, imageView2, imageView3, imageView4, imageView5, imageView6;\n DemoHelperClass demoHelperClass;\...
import android.content.Intent; import android.graphics.Typeface; import android.media.MediaPlayer; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.view.LayoutInflater; import android.view.View...
package sarveshchavan777.inrerface2.Tab.HomeScreen; public class HomePlayTab extends Fragment implements BaseSliderView.OnSliderClickListener { private static final java.lang.String LEADERBOARD_ID = "CgkItYPd68IBEAIQBw"; private static final int REQUEST_LEADERBOARD = 100; private SliderLayout mDemo...
MyBounceInterpolator interpolator = new MyBounceInterpolator(0.25, 20);
2
tfiskgul/mux2fs
core/src/main/java/se/tfiskgul/mux2fs/fs/mirror/MirrorFs.java
[ "public static final int FILE_HANDLE_START_NO = 32;", "public static final int SUCCESS = 0;", "public static final int THREAD_BUF_SIZE = (int) (128 * KILOBYTE);", "@Immutable\npublic interface ExceptionTranslator<T, E extends Throwable> {\n\n\tpublic static <T, E extends Throwable> ExceptionTranslator<T, E> o...
import static se.tfiskgul.mux2fs.Constants.FILE_HANDLE_START_NO; import static se.tfiskgul.mux2fs.Constants.SUCCESS; import static se.tfiskgul.mux2fs.Constants.THREAD_BUF_SIZE; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.nio.file.AccessDeniedException; impor...
/* MIT License Copyright (c) 2017 Carl-Frederik Hallberg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, ...
return SUCCESS;
1
paspiz85/nanobot
src/main/java/it/paspiz85/nanobot/ui/MainController.java
[ "public abstract class Attack {\n\n private static AttackScreen attackScreenParser = Screen.getInstance(AttackScreen.class);\n\n private static List<Attack> attacks;\n\n protected static final Point BOTTOM_LEFT = new Point(300, 536);\n\n protected static final Point BOTTOM_RIGHT = new Point(537, 538);\n...
import it.paspiz85.nanobot.attack.Attack; import it.paspiz85.nanobot.game.Troop; import it.paspiz85.nanobot.platform.Platform; import it.paspiz85.nanobot.scripting.ScriptManager; import it.paspiz85.nanobot.util.BuildInfo; import it.paspiz85.nanobot.util.Settings; import java.util.Optional; import java.util.logging.Leve...
} @FXML public void handleCancelButtonAction() { showSettings(false); } @FXML public void handleSaveButtonAction() { model.saveSettings((settings) -> { if (!goldField.getText().isEmpty()) { settings.setGoldThreshold(Integer.parseInt(goldField.getText...
ScriptManager.instance().setAlert((str) -> alert(str));
3
headwirecom/aemdc
src/main/java/com/headwire/aemdc/runner/DynamicRunner.java
[ "public class CommandMenu {\r\n\r\n private static final Logger LOG = LoggerFactory.getLogger(CommandMenu.class);\r\n\r\n SortedMap<Integer, Command> menuItems = new TreeMap<Integer, Command>();\r\n\r\n public void setCommand(final Integer operationNumber, final Command cmd) {\r\n menuItems.put(operationNumbe...
import java.io.IOException; import java.util.Properties; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.headwire.aemdc.command.CommandMenu; import com.headwire.aemdc.companion.Config; import com.headwire.aemdc.companion.Constants; import com.head...
package com.headwire.aemdc.runner; /** * Dynamic Runner for most of types. * */ public class DynamicRunner extends BasisRunner { private static final Logger LOG = LoggerFactory.getLogger(DynamicRunner.class); private static final String HELP_FOLDER = "help"; /** * Invoker */ pr...
private final Config config;
1
jboss-logging/jboss-logmanager
core/src/main/java/org/jboss/logmanager/handlers/DelayedHandler.java
[ "public abstract class ExtHandler extends Handler implements AutoCloseable, Flushable {\n\n private static final ErrorManager DEFAULT_ERROR_MANAGER = new OnlyOnceErrorManager();\n private static final Permission CONTROL_PERMISSION = new LoggingPermission(\"control\", null);\n\n private volatile boolean aut...
import java.util.ArrayDeque; import java.util.Deque; import java.util.logging.Formatter; import java.util.logging.Handler; import org.jboss.logmanager.ExtHandler; import org.jboss.logmanager.ExtLogRecord; import org.jboss.logmanager.LogContext; import org.jboss.logmanager.StandardOutputStreams; import org.jboss.logmana...
/* * JBoss, Home of Professional Open Source. * * Copyright 2017 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the Li...
StandardOutputStreams.printError("The DelayedHandler was closed before any children handlers were " +
3
FIRST-Team-2557-The-SOTABots/FRC_Robot
Robot/src/main/java/org/usfirst/frc/team2557/robot/commands/autonomous/Auto_LowbarCenter.java
[ "public class MoveArmToAngleCommand extends Command {\n\n private PIDController _controller;\n\n private double _value;\n\n public MoveArmToAngleCommand(double potentiometerValue) {\n this._value = potentiometerValue;\n requires(Robot.arm);\n\n this._controller = new PIDController(0.3,...
import edu.wpi.first.wpilibj.command.CommandGroup; import org.usfirst.frc.team2557.robot.commands.arm.MoveArmToAngleCommand; import org.usfirst.frc.team2557.robot.commands.automation.Auto_LoadBall; import org.usfirst.frc.team2557.robot.commands.catapult.CatapultRetractCommand; import org.usfirst.frc.team2557.robot.comm...
package org.usfirst.frc.team2557.robot.commands.autonomous; public class Auto_LowbarCenter extends Auto_Lowbar { public Auto_LowbarCenter() { this.addParallel(new Auto_LoadBall()); this.addSequential(new TurnByAngleCommand(60)); this.addSequential(new EncoderPosDriveCommand(18508, 1));...
this.addSequential(new MoveArmToAngleCommand(Arm.ARM_BOTTOM));
0
TomGrill/gdx-dialogs
desktop/src/de/tomgrill/gdxdialogs/desktop/DesktopGDXDialogs.java
[ "public abstract class GDXDialogs {\n\n\tprotected ArrayMap<String, String> registeredDialogs = new ArrayMap<String, String>();\n\n\tpublic <T> T newDialog(Class<T> cls) {\n\t\tString className = cls.getName();\n\t\tif (registeredDialogs.containsKey(className)) {\n\n\t\t\ttry {\n\t\t\t\tfinal Class<T> dialogClazz =...
import de.tomgrill.gdxdialogs.core.GDXDialogs; import de.tomgrill.gdxdialogs.core.dialogs.GDXButtonDialog; import de.tomgrill.gdxdialogs.core.dialogs.GDXProgressDialog; import de.tomgrill.gdxdialogs.core.dialogs.GDXTextPrompt; import de.tomgrill.gdxdialogs.desktop.dialogs.DesktopGDXButtonDialog; import de.tomgrill.gdxd...
/******************************************************************************* * Copyright 2015 See AUTHORS file. * * 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.apach...
registerDialog(GDXTextPrompt.class.getName(), DesktopGDXTextPrompt.class.getName());
6
matrixcloud/SimpleReader
src/com/dreamteam/app/adapter/GridAdapter.java
[ "@SuppressWarnings(\"deprecation\")\npublic class AppContext\n{\n\t\n\tpublic static boolean isNetworkAvailable(Context context)\n\t{\n\t\tConnectivityManager connMgr = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); \n\t\tNetworkInfo networkInfo = connMgr.getActiveNetworkInfo();\n\t\t...
import java.util.ArrayList; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.ImageView; import android.widget.Text...
package com.dreamteam.app.adapter; public class GridAdapter extends BaseAdapter { private Context context;
private ArrayList<Section> sections;
4
RestComm/sctp
sctp-impl/src/test/java/org/mobicents/protocols/sctp/multihome/SctpMultiHomeTransferTest.java
[ "public interface Association {\n\n\t/**\n\t * Return the Association channel type TCP or SCTP\n\t * \n\t * @return\n\t */\n\tpublic IpChannelType getIpChannelType();\n\n\t/**\n\t * Return the type of Association CLIENT or SERVER\n\t * \n\t * @return\n\t */\n\tpublic AssociationType getAssociationType();\n\n\t/**\n...
import org.mobicents.protocols.sctp.ManagementImpl; import org.mobicents.protocols.sctp.SctpTransferTest; import org.mobicents.protocols.sctp.ServerImpl; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import static org.junit.Assert.assertTrue; im...
/* * TeleStax, Open Source Cloud Communications * Copyright 2011-2014, Telestax Inc and individual contributors * by the @authors tag. * * This program is free software: you can redistribute it and/or modify * under the terms of the GNU Affero General Public License as * published by the Free Software Foundation...
private ManagementImpl management = null;
5
grum/Ashley
ashley/src/main/java/com/badlogic/ashley/core/Engine.java
[ "public interface Listener<T> {\n /**\n * @param signal The Signal that triggered event\n * @param object The object passed on dispatch\n */\n public void receive(Signal<T> signal, T object);\n}", "public class Signal<T> {\n private SnapshotArray<Listener<T>> listeners;\n\n public Signal()...
import com.badlogic.ashley.signals.Listener; import com.badlogic.ashley.signals.Signal; import com.badlogic.ashley.utils.ImmutableArray; import com.badlogic.gdx.utils.Array; import com.badlogic.gdx.utils.ObjectMap; import com.badlogic.gdx.utils.ObjectMap.Entry; import com.badlogic.gdx.utils.Pool; import com.badlogic.gd...
/******************************************************************************* * Copyright 2014 See AUTHORS file. * * 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.apa...
public void receive(Signal<Entity> signal, Entity object) {
1
jonghough/ArtisteX
app/src/main/java/jgh/artistex/engine/Layers/Bitmaps/TextLayer.java
[ "public interface ILayer {\n\n\n\n\n /**\n * Signals the <code>ILayer</code> implementation to start being manipulated by the user\n * This indicates the lyaer has been set as the currently manipulated layer.\n */\n void setStart();\n\n\n /**\n * Signals the <code>ILayer</code> implementati...
import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Typeface; import android.view.MotionEvent; import jgh.artistex.engine.ILayer; import jgh.artistex.engine.visitors.ILayerVisitor; import jgh.artistex.engine.IUndo; import jgh.artistex.engine.LayerType; ...
package jgh.artistex.engine.Layers.Bitmaps; /** * An implementation of <code>ILayer</code> for displaying * text on the canvas. */ public class TextLayer implements ILayer { /** * Unique name of this <code>ILayer</code>. */ protected String mName; private BitmapLayer mBitmapLayer; pri...
+ 70 + ";" + "fill : #" + DataUtils.getRGBHex(this.mColor) + ";"
4
leonardoanalista/java2word
java2word/src/test/java/word/w2004/TableFactoryMethodTest.java
[ "public class TableCol implements ITableItemStrategy{\n\t\n\tpublic String getTop() {\n\t\treturn \"\\n\t\t<w:tr wsp:rsidR=\\\"00505659\\\" wsp:rsidRPr=\\\"00505659\\\">\";\n\t}\n\n\tpublic String getMiddle() {\n\t\tString td =\n\t\t\t\" <w:tc> \"\n\t\t\t+\"\\n <w:tcPr> \"\n\t\t\t+...
import junit.framework.Assert; import org.junit.Test; import word.w2004.elements.tableElements.TableCol; import word.w2004.elements.tableElements.TableDefinition; import word.w2004.elements.tableElements.TableEle; import word.w2004.elements.tableElements.TableFactoryMethod; import word.w2004.elements.tableElements.Tabl...
package word.w2004; public class TableFactoryMethodTest extends Assert{ @Test public void testGetInstance(){
TableFactoryMethod instance = TableFactoryMethod.getInstance();
3
Spedge/hangar
hangar-api/src/test/java/com/spedge/hangar/testutils/IndexUtils.java
[ "public abstract class IndexArtifact implements Serializable\n{\n private static final long serialVersionUID = -5720959937441417671L;\n private String location;\n\n public IndexArtifact(String location)\n {\n this.location = location;\n }\n\n public String getLocation()\n {\n retu...
import com.spedge.hangar.index.IndexArtifact; import com.spedge.hangar.index.IndexKey; import com.spedge.hangar.repo.RepositoryType; import com.spedge.hangar.repo.java.JavaIndexArtifact; import com.spedge.hangar.repo.java.base.JavaGroup; import com.spedge.hangar.repo.java.index.JavaIndexKey;
package com.spedge.hangar.testutils; public enum IndexUtils {
TEST1(new JavaIndexKey(RepositoryType.RELEASE_JAVA, JavaGroup.dotDelimited("com.spedge.test"), "test-artifact", "0.1.2.3"),
4
AURIN/online-whatif
src/test/java/au/org/aurin/wif/svc/suitability/SuitabilityScenarioServiceIT.java
[ "@ResponseStatus(value = HttpStatus.NOT_FOUND)\npublic class InvalidEntityIdException extends WifInvalidInputException {\n\n /** The Constant serialVersionUID. */\n private static final long serialVersionUID = 24265676271144835L;\n\n /**\n * Instantiates a new wif invalid input exception.\n */\n public Inva...
import java.io.File; import java.io.FileInputStream; import java.io.FileReader; import java.net.URL; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import javax.annotation.Resource; import org.apache.poi.hssf.usermodel.HSSFCell; import org.ap...
/** * * marcosnr * 28/02/2012 */ package au.org.aurin.wif.svc.suitability; /** * The Class SuitabilityScenarioServiceIT. */ @ContextConfiguration(locations = { "/test-integration-context.xml" }) public class SuitabilityScenarioServiceIT extends AbstractTestNGSpringContextTests { private static final Logge...
InvalidEntityIdException.class, BadSqlGrammarException.class })
0
gustav9797/PowerfulPerms
PowerfulPerms/src/main/java/com/github/gustav9797/PowerfulPerms/common/PermissionPlayerBase.java
[ "public class CachedGroup {\n private int id;\n private int groupId;\n private boolean negated;\n private Date expires;\n private int expireTaskId = -1;\n\n public CachedGroup(int id, int groupId, boolean negated, Date expires) {\n this.id = id;\n this.groupId = groupId;\n thi...
import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map.Entry; import java.util.TreeMap; import java.util.concurrent.locks.ReentrantLock; import com.github.gustav9797.PowerfulPermsAPI.CachedGroup; import com.github.gustav9797.PowerfulPermsAPI.Gr...
package com.github.gustav9797.PowerfulPerms.common; public class PermissionPlayerBase extends PermissionContainer implements PermissionPlayer { protected LinkedHashMap<String, List<CachedGroup>> groups = new LinkedHashMap<>(); // Contains -all- groups for this player. protected List<Group> currentGroups = ...
protected static PowerfulPermsPlugin plugin;
4
cdelmas/microservices-comparison
dropwizard/src/main/java/io/github/cdelmas/spike/dropwizard/infrastructure/DropwizardApplication.java
[ "public class User {\n\n private final String id;\n\n private final String name;\n private String token;\n\n public User(String id, String name) {\n this.id = id;\n this.name = name;\n }\n\n public String getId() {\n return id;\n }\n\n public String getName() {\n ...
import io.github.cdelmas.spike.dropwizard.infrastructure.auth.FacebookTokenAuthenticator; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.hubspot.dropwizard.guice.GuiceBundle; import io.dropwizard.Application; import io.dropwizard.auth.AuthFac...
/* Copyright 2015 Cyril Delmas 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 wr...
.addModule(new CarModule())
1
lenis0012/LoginSecurity-2
src/main/java/com/lenis0012/bukkit/loginsecurity/session/AuthAction.java
[ "public class LoginSecurity extends PluginHolder {\n private static final ExecutorService executorService = Executors.newCachedThreadPool();\n\n /**\n * Get the executor LoginSecurity uses for async processing.\n *\n * @return Executor service.\n */\n public static ExecutorService getExecut...
import com.lenis0012.bukkit.loginsecurity.LoginSecurity; import com.lenis0012.bukkit.loginsecurity.session.action.ActionResponse; import com.lenis0012.bukkit.loginsecurity.storage.PlayerInventory; import com.lenis0012.bukkit.loginsecurity.storage.PlayerLocation; import com.lenis0012.bukkit.loginsecurity.storage.PlayerP...
package com.lenis0012.bukkit.loginsecurity.session; public abstract class AuthAction { private final AuthActionType type; private final AuthService service; private final Object serviceProvider; public <T> AuthAction(AuthActionType type, AuthService<T> service, T serviceProvider) { this.type...
final PlayerInventory serializedInventory = LoginSecurity.getDatastore().getInventoryRepository()
2
maker56/UltimateSurvivalGames
UltimateSurvivalGames/src/me/maker56/survivalgames/game/phases/VotingPhase.java
[ "public class SurvivalGames extends JavaPlugin {\r\n\t\r\n\tpublic static SurvivalGames instance;\r\n\tpublic static FileConfiguration messages, database, signs, reset, chestloot, scoreboard, kits;\r\n\t\r\n\tpublic static ArenaManager arenaManager;\r\n\tpublic static GameManager gameManager;\r\n\tpublic static Che...
import java.util.ArrayList; import java.util.Collections; import java.util.List; import me.maker56.survivalgames.SurvivalGames; import me.maker56.survivalgames.Util; import me.maker56.survivalgames.arena.Arena; import me.maker56.survivalgames.commands.messages.MessageHandler; import me.maker56.survivalgames.comm...
package me.maker56.survivalgames.game.phases; public class VotingPhase { // STATIC VARIABLES private static ItemStack voteItem, arenaItem; private static String title; public static ItemStack getVotingOpenItemStack() { return voteItem; } public static String getVotingInventoryTitle() { ...
public ArrayList<Arena> voteArenas = new ArrayList<Arena>();
2
setial/intellij-javadocs
src/main/java/com/github/setial/intellijjavadocs/generator/impl/AbstractJavaDocGenerator.java
[ "public interface JavaDocConfiguration {\n\n\n /**\n * The constant COMPONENT_NAME.\n */\n String COMPONENT_NAME = \"JavaDocConfiguration\";\n\n /**\n * The constant COMPONENT_VERSION.\n */\n String COMPONENT_CONFIG_VERSION = \"4.0.1\";\n\n /**\n * The constant COMPONENT_CONFIG_PA...
import com.github.setial.intellijjavadocs.configuration.JavaDocConfiguration; import com.github.setial.intellijjavadocs.generator.JavaDocGenerator; import com.github.setial.intellijjavadocs.model.JavaDoc; import com.github.setial.intellijjavadocs.model.settings.JavaDocSettings; import com.github.setial.intellijjavadocs...
package com.github.setial.intellijjavadocs.generator.impl; /** * The type Abstract java doc generator. * * @param <T> the type parameter * @author Sergey Timofiychuk */ public abstract class AbstractJavaDocGenerator<T extends PsiElement> implements JavaDocGenerator<T> { private DocTemplateManager docTempla...
JavaDocSettings configuration = settings.getConfiguration();
3
mini2Dx/miniscript
kotlin/src/main/java/org/mini2Dx/miniscript/kotlin/KotlinEmbeddedScriptInvoker.java
[ "public abstract class EmbeddedScriptInvoker {\n\tprotected final GameScriptingEngine gameScriptingEngine;\n\n\tprotected int parentScriptId;\n\tprotected ScriptBindings scriptBindings;\n\n\tpublic EmbeddedScriptInvoker(GameScriptingEngine gameScriptingEngine) {\n\t\tthis.gameScriptingEngine = gameScriptingEngine;\...
import org.jetbrains.kotlin.cli.common.repl.KotlinJsr223JvmScriptEngineBase.CompiledKotlinScript; import org.mini2Dx.miniscript.core.EmbeddedScriptInvoker; import org.mini2Dx.miniscript.core.GameScript; import org.mini2Dx.miniscript.core.GameScriptingEngine; import org.mini2Dx.miniscript.core.exception.NoSuchScriptExce...
/** * The MIT License (MIT) * * Copyright (c) 2020 Thomas Cashman * * 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 u...
final GameScript<CompiledKotlinScript> script = kotlinScriptExecutorPool.getScript(scriptId);
1
konifar/annict-android
app/src/main/java/com/konifar/annict/view/fragment/MyWorksFragment.java
[ "public enum Status {\n\n WANNA_WATCH(R.string.status_wanna_watch),\n WATCHING(R.string.status_watching),\n WATCHED(R.string.status_watched),\n ON_HOLD(R.string.status_on_hold),\n STOP_WATCHING(R.string.status_stop_watching),\n NO_SELECT(R.string.status_no_select);\n\n @StringRes\n public in...
import com.annimon.stream.Stream; import com.konifar.annict.R; import com.konifar.annict.databinding.FragmentMyWorksBinding; import com.konifar.annict.databinding.ItemWorkBinding; import com.konifar.annict.model.Status; import com.konifar.annict.pref.DefaultPrefs; import com.konifar.annict.view.widget.ArrayRecyclerAdap...
package com.konifar.annict.view.fragment; public class MyWorksFragment extends BaseFragment implements TabPage { private static final String TAG = MyWorksFragment.class.getSimpleName(); @Inject MyWorksViewModel viewModel; @Inject CompositeSubscription compositeSubscription; private Stri...
public static MyWorksFragment newInstance(@NonNull String authCode, Status status) {
0
indvd00m/java-ascii-render
ascii-render/src/main/java/com/indvd00m/ascii/render/elements/Dot.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; /** * Single dot ('*' symbol). * * @author indvd00m (gotoindvdum[at]gmail[dot]com) * @since 1.0.0 */ public class Dot implements IElement { protected int x; protected int y; public Dot() { super(); this.x = Integer.MIN_VALUE; this.y = Integer.MIN_VALUE; } ...
return new Point(x, y);
0
idealo/mongodb-slow-operations-profiler
src/main/java/de/idealo/mongodb/slowops/grapher/Grapher.java
[ "public class CollectorServerDto {\n\n private ServerAddress[] hosts;\n private String db;\n private String collection;\n private String adminUser;\n private String adminPw;\n private boolean ssl;\n\n public CollectorServerDto(@JsonProperty(\"hosts\") ServerAddress[] hosts,\n ...
import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import com.mongodb.DB; import com.mongodb.MongoException; import de.idealo.mongodb.slowops.dto.CollectorServerDto; import de.idealo.mongodb.slowops.dto.SlowOpsDto; import de.idealo.mongodb.slowops.monitor.MongoDbAccessor; import de.idea...
/* * Copyright (c) 2013 idealo internet GmbH -- all rights reserved. */ package de.idealo.mongodb.slowops.grapher; /** * * * @author kay.agahd * @since 04.03.2013 * @version $Id: $ * @copyright idealo internet GmbH */ public class Grapher { private static final Logger LOG = LoggerFactory.getLogger...
public SlowOpsDto aggregateSlowQueries(StringBuffer filter, Object[] params, StringBuffer groupExp, StringBuffer groupTime) {
1
trello/RxLifecycle
rxlifecycle-components/src/main/java/com/trello/rxlifecycle4/components/support/RxFragmentActivity.java
[ "public interface LifecycleProvider<E> {\n /**\n * @return a sequence of lifecycle events\n */\n @Nonnull\n @CheckReturnValue\n Observable<E> lifecycle();\n\n /**\n * Binds a source until a specific event occurs.\n *\n * @param event the event that triggers unsubscription\n * ...
import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.subjects.BehaviorSubject; import android.os.Bundle; import androidx.annotation.CallSuper; import androidx.annotation.CheckResult; import androidx.annotation.ContentView; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; imp...
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed u...
return RxLifecycle.bindUntilEvent(lifecycleSubject, event);
2
teozfrank/DuelMe
Plugin/src/main/java/com/github/teozfrank/duelme/events/PlayerDeath.java
[ "public class DuelMe extends JavaPlugin {\n\n /**\n * duelmanager class\n */\n private DuelManager duelManager;\n\n /**\n * filemanager class\n */\n private FileManager fileManager;\n\n /**\n * item manager class\n */\n private ItemManager itemManager;\n\n /**\n * me...
import com.github.teozfrank.duelme.main.DuelMe; import com.github.teozfrank.duelme.mysql.FieldName; import com.github.teozfrank.duelme.util.DuelManager; import com.github.teozfrank.duelme.util.FileManager; import com.github.teozfrank.duelme.util.MessageManager; import com.github.teozfrank.duelme.util.SendConsoleMessage...
package com.github.teozfrank.duelme.events; /** * Created by Frank on 04/05/2015. */ public class PlayerDeath implements Listener { private DuelMe plugin; public PlayerDeath(DuelMe plugin) { this.plugin = plugin; plugin.getServer().getPluginManager().registerEvents(this, plugin); } ...
MessageManager mm = plugin.getMessageManager();
4
jotorren/microservices-transactions-tcc
rahub-forum-service/src/main/java/net/jotorren/microservices/forum/service/ForumService.java
[ "public final class ThreadLocalContext {\n\n\tprivate static final Logger LOG = LoggerFactory.getLogger(ThreadLocalContext.class);\n\n\t/** Initial size of the map */\n\tprivate static final int HT_SIZE = 5;\n\n\t/** Thread local map variable to store any shared object */\n\tprivate static final ThreadLocal<Map<Str...
import java.util.List; import java.util.UUID; import net.jotorren.microservices.context.ThreadLocalContext; import net.jotorren.microservices.forum.dao.ForumDao; import net.jotorren.microservices.forum.dao.ForumTransactionAwareDao; import net.jotorren.microservices.forum.domain.Forum; import net.jotorren.microservices....
package net.jotorren.microservices.forum.service; @Service public class ForumService extends CompositeTransactionParticipantService { private static final Logger LOG = LoggerFactory.getLogger(ForumService.class); @Autowired private ApplicationContext context; @Autowired private ForumDao dao; public ...
List<EntityCommand<?>> transactionOperations = getCompositeTransactionManager().fetch(txId);
6
yariplus/minecraft-nodebb-integration
forge/src/main/java/com/radiofreederp/nodebbintegration/NodeBBIntegrationForge.java
[ "public class CommandNodeBBForge extends CommandBase {\r\n\tprivate CommandNodeBB command;\r\n\r\n\tpublic CommandNodeBBForge(NodeBBIntegrationForge plugin) {\r\n\t\tthis.command = new CommandNodeBB();\r\n\t}\r\n\r\n\t@Override\r\n\tpublic String getCommandName() {\r\n\t\treturn \"nodebb\";\r\n\t}\r\n\r\n\t@Overrid...
import com.radiofreederp.nodebbintegration.forge.commands.CommandNodeBBForge; import com.radiofreederp.nodebbintegration.forge.commands.CommandRegisterForge; import com.radiofreederp.nodebbintegration.forge.configuration.PluginConfigForge; import com.radiofreederp.nodebbintegration.socketio.SocketIOClient; import com.r...
package com.radiofreederp.nodebbintegration; @Mod(modid = NBBPlugin.ID, name = NBBPlugin.NAME, version = NBBPlugin.VERSION, acceptableRemoteVersions = "*") public class NodeBBIntegrationForge implements NodeBBIntegrationPlugin { private static NodeBBIntegrationPlugin plugin; public static NodeBBIntegrationPlugin...
Logger.init(this);
6
PuffOpenSource/Puff-Android
app/src/main/java/sun/bob/leela/services/NotificationService.java
[ "public class MainActivity extends AppCompatActivity\n implements NavigationView.OnNavigationItemSelectedListener {\n\n private AcctListFragment acctListFragment;\n private AcctListFragment currentFragment;\n private Toolbar toolbar;\n private HashMap<Long, AcctListFragment> fragments;\n priva...
import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Intent; import android.os.Handler; import android.os.IBinder; import android.support.v7.app.NotificationCompat; import android.view.View; import android.widget.Re...
package sun.bob.leela.services; public class NotificationService extends Service { private String name, account, password, additional, icon; private RemoteViews remoteViews; private Notification notification; private NotificationManager notificationmanager; private Handler handler; private ...
if (StringUtil.isNullOrEmpty(name, account, password, additional))
4
google/mug
mug-protobuf/src/test/java/com/google/mu/protobuf/util/StructBuilderTest.java
[ "public static <E> ImmutableList<E> list() {\n return ImmutableList.of();\n}", "public static <K, V> ImmutableMap<K, V> map() {\n return ImmutableMap.of();\n}", "public static <R, C, V> ImmutableTable<R, C, V> table() {\n return ImmutableTable.of();\n}", "public static Struct struct(String name, boolean va...
import static com.google.common.truth.Truth.assertThat; import static com.google.mu.collect.Immutables.list; import static com.google.mu.collect.Immutables.map; import static com.google.mu.collect.Immutables.table; import static com.google.mu.protobuf.util.MoreStructs.struct; import static com.google.mu.protobuf.util.M...
package com.google.mu.protobuf.util; @RunWith(JUnit4.class) public class StructBuilderTest { @Test public void testAdd_boolean() { assertThat(new StructBuilder().add("k", true).build()) .isEqualTo(Structs.of("k", Values.of(true))); assertThat(new StructBuilder().add("k", false).build()) .i...
.isEqualTo(struct("one", 1));
3
cvbrandoe/REDEN
src/fr/lip6/reden/ldextractor/AppAdhoc.java
[ "public class QueryPlaceDBpedia extends QuerySource implements QuerySourceInterface {\n\n\tprivate static Logger logger = Logger.getLogger(QueryPlaceDBpedia.class);\n\t\n\t/**\n\t * Mandatory fields\n\t */\n\tpublic String SPARQL_END_POINT = \"http://fr.dbpedia.org/sparql\";\n\t\n\tpublic Integer TIMEOUT = 200000;\...
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import java.util.Properties; import org.apache.log4j.L...
package fr.lip6.reden.ldextractor; /** * Main class to launch the Linked Data crawler for handling domain-adaptation during named-entity linking. * @author Brando & Frontini */ public class AppAdhoc { private static Logger logger = Logger.getLogger(AppAdhoc.class); /** * Main method. * @param args */...
QueryPlaceDBpedia dbp = new QueryPlaceDBpedia();
0
airlift/airlift
security/src/main/java/io/airlift/security/pem/PemReader.java
[ "public static List<byte[]> decodeSequence(byte[] sequence)\n{\n int index = 0;\n\n // check tag\n checkArgument(sequence[0] == SEQUENCE_TAG, \"Expected sequence tag\");\n index++;\n\n // read length\n int sequenceDataLength = decodeLength(sequence, index);\n index += encodedLengthSize(sequence...
import com.google.common.collect.ImmutableSet; import javax.crypto.Cipher; import javax.crypto.EncryptedPrivateKeyInfo; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec; import javax.security.auth.x500.X500Principal; import java.io.ByteArrayInputStream; import jav...
return keyStore; } public static List<X509Certificate> readCertificateChain(File certificateChainFile) throws IOException, GeneralSecurityException { String contents = asCharSource(certificateChainFile, US_ASCII).read(); return readCertificateChain(contents); } ...
return encodeSequence(VERSION_0_ENCODED, keyIdentifier, encodeOctetString(pkcs1));
3
gstreamer-java/gst1-java-core
src/org/freedesktop/gstreamer/Gst.java
[ "@HasSubtype\npublic class Message extends MiniObject {\n\n public static final String GTYPE_NAME = \"GstMessage\";\n\n private static final Map<MessageType, Function<Initializer, Message>> TYPE_MAP\n = new EnumMap<>(MessageType.class);\n\n static {\n TYPE_MAP.put(MessageType.EOS, EOSMess...
import org.freedesktop.gstreamer.query.Query; import org.freedesktop.gstreamer.message.Message; import org.freedesktop.gstreamer.event.Event; import org.freedesktop.gstreamer.glib.GError; import static org.freedesktop.gstreamer.lowlevel.GstAPI.GST_API; import java.util.ArrayList; import java.util.Collections; import ja...
* application as the resources will automatically be freed when the program * terminates. This function is therefore mostly used by testsuites and * other memory profiling tools.</b> * * After this call GStreamer (including this method) should not be used * anymore. */ public stat...
new Video.Types())
2
michelinus/nfsw-server
src/main/java/br/com/soapboxrace/jpa/CustomCarEntity.java
[ "@XmlAccessorType(XmlAccessType.FIELD)\n@XmlType(name = \"PaintsType\", propOrder = { \"customPaintTrans\" })\n@XmlRootElement(name = \"Paints\")\npublic class PaintsType {\n\t\n\t@XmlAccessorType(XmlAccessType.FIELD)\n\t@XmlType(propOrder = { \"Slot\", \"Sat\", \"Hue\", \"Var\", \"Group\" })\n\t@XmlRootElement(nam...
import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Convert; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne...
package br.com.soapboxrace.jpa; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CustomCarType", propOrder = { "baseCarId", "carClassHash", "isPreset", "level", "name", "apiId", "paints", "performanceParts", "physicsProfileHash", "rating", "resalePrice", "skillModParts", "skillModSlotCount", "vinyls", "visua...
@Convert(converter = SkillModPartsConverter.class)
5
release-engineering/buildmetadata-maven-plugin
src/main/java/com/redhat/rcm/maven/plugin/buildmetadata/BuildMetaDataMojo.java
[ "public final class Constant\n{\n // ********************************* Fields *********************************\n\n // --- constants ------------------------------------------------------------\n\n // ... sections .............................................................\n\n /**\n * The name of the SCM se...
import java.io.File; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import java.util.Locale; import java.util.Properties; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.scm...
private void createBuildProperties(final BuildPropertiesFileHelper helper, final Properties projectProperties, final Properties buildMetaDataProperties) throws MojoExecutionException, MojoFailureException { final Date buildDate = session.getStartTime(); provideBuildUser(projectProperties, b...
final ScmControl scmControl =
1
IPEldorado/RemoteResources
src/com/eldorado/remoteresources/ui/wizard/AddHostPage.java
[ "public class Client {\n\n\tprivate static final String DEFAULT_LOGCAT_PATH = RemoteResourcesConfiguration\n\t\t\t.getRemoteResourcesDir() != null ? RemoteResourcesConfiguration\n\t\t\t.getRemoteResourcesDir() + File.separator + \"logs\" : System\n\t\t\t.getProperty(\"user.home\");\n\n\tprivate File logFilePath;\n\...
import java.awt.Color; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.io.IOException; import java.net.UnknownHostException; ...
/* * (C) Copyright 2014 Instituto de Pesquisas Eldorado (http://www.eldorado.org.br/). * * This file is part of the software Remote Resources * * All rights reserved. This file and the accompanying materials * are made available under the terms of the GNU Lesser General Public License * (LGPL) version 3.0 which ...
setDescription(RemoteResourcesLocalization
2
Netflix/netflix-graph
src/main/java/com/netflix/nfgraph/serializer/NFCompressedGraphPointersDeserializer.java
[ "public class NFCompressedGraphIntPointers implements NFCompressedGraphPointers {\n\n private final Map<String, int[]>pointersByOrdinal;\n\n public NFCompressedGraphIntPointers() {\n this.pointersByOrdinal = new HashMap<String, int[]>();\n }\n\n /**\n * @return the offset into the {@link NFCo...
import com.netflix.nfgraph.compressed.NFCompressedGraphIntPointers; import com.netflix.nfgraph.compressed.NFCompressedGraphLongPointers; import com.netflix.nfgraph.compressed.NFCompressedGraphPointers; import com.netflix.nfgraph.util.ByteArrayReader; import com.netflix.nfgraph.util.SimpleByteArray; import java.io.DataI...
/* * Copyright 2014 Netflix, 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 appli...
private NFCompressedGraphIntPointers deserializeIntPointers(DataInputStream dis, int numTypes) throws IOException {
0
FedUni/caliko
caliko/src/main/java/au/edu/federation/caliko/FabrikBone3D.java
[ "public enum JointType\r\n{\r\n\tBALL,\r\n\tGLOBAL_HINGE,\r\n\tLOCAL_HINGE\r\n}\r", "public class Colour4f implements Serializable\n{\n\tprivate static final long serialVersionUID = 1L;\n\n\t// ---------- Properties ----------\n\n\t/** The minimum valid value of any colour component. */\n\tprivate static final fl...
import java.io.Serializable; import au.edu.federation.caliko.FabrikJoint3D.JointType; import au.edu.federation.utils.Colour4f; import au.edu.federation.utils.Mat4f; import au.edu.federation.utils.Utils; import au.edu.federation.utils.Vec3f;
package au.edu.federation.caliko; /** * A class to represent a FabrikBone3D object. * <p> * A FabrikBone3D consists of a start location, an end location and a FabrikJoint3D which can constrain * the rotation of the bone with regard to a previous bone in an IK chain either as a ball joint or as * a hing...
public void setName(String name) { mName = Utils.getValidatedName(name); }
3
Kaljurand/K6nele
app/src/main/java/ee/ioc/phon/android/speak/service/HttpRecognitionService.java
[ "public class ChunkedWebRecSession implements RecSession {\n\n public static final String CONF_BASE_URL = \"base_url\";\n\n public static final String CONTENT_TYPE = \"audio/x-raw-int;rate=16000;channels=1;signed=true;endianness=1234;depth=16;width=16\";\n\n // Parameter keys\n public static final Strin...
import android.app.PendingIntent; import android.app.PendingIntent.CanceledException; import android.app.SearchManager; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; import android.os.Process; import android.speech.Recogniz...
} @Override protected int getAutoStopAfterMillis() { //return 1000 * PreferenceUtils.getPrefInt(getSharedPreferences(), getResources(), // R.string.keyAutoStopAfterTime, R.string.defaultAutoStopAfterTime); return 1000 * Integer.parseInt( getSharedPreferences()...
List<Linearization> hypLins = hyp.getLinearizations();
2
goshippo/shippo-java-client
src/test/java/com/shippo/model/AddressTest.java
[ "public class APIConnectionException extends ShippoException {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic APIConnectionException(String message) {\n\t\tsuper(message);\n\t}\n\n\tpublic APIConnectionException(String message, Throwable e) {\n\t\tsuper(message, e);\n\t}\n\n}", "public class AP...
import static org.junit.Assert.*; import java.util.HashMap; import java.util.Map; import org.junit.Test; import com.shippo.exception.APIConnectionException; import com.shippo.exception.APIException; import com.shippo.exception.AuthenticationException; import com.shippo.exception.InvalidRequestException; import com.ship...
package com.shippo.model; public class AddressTest extends ShippoTest { @Test public void testValidCreate() { Address testObject = (Address) getDefaultObject(); assertTrue(testObject.getIsComplete()); } @Test(expected = InvalidRequestException.class)
public void testInvalidCreate() throws AuthenticationException, InvalidRequestException, APIConnectionException,
0
paphus/Project-Libre
android/src/com/paphus/sdk/activity/livechat/ChannelBrowseActivity.java
[ "public class BrowseActivity extends Activity {\n\n\t@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_browse);\n\n\t\tCheckBox checkbox = (CheckBox)findViewById(R.id.ima...
import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.RadioButton; import android.widget.Spinner; import com.paphus.sdk.activity.R; import com.paphus.sdk.activi...
package com.paphus.sdk.activity.livechat; /** * Browse activity for searching for a channel. */ public class ChannelBrowseActivity extends BrowseActivity { @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public void onCreate(Bundle savedInstanceState) { super.superOnCreate(savedInstanceState); set...
ChannelConfig config = new ChannelConfig();
6
vangj/jbayes
src/test/java/com/github/vangj/jbayes/inf/exact/graph/pptc/blocks/PropagationTest.java
[ "public class Dag extends Graph {\n\n protected Map<String, List<Node>> parents;\n protected Map<String, List<Node>> children;\n\n public Dag() {\n parents = new HashMap<>();\n children = new HashMap<>();\n }\n\n /**\n * Initializes the potential for each node.\n *\n * @return Dag.\n */\n public...
import static org.junit.Assert.assertEquals; import com.github.vangj.jbayes.inf.exact.graph.Dag; import com.github.vangj.jbayes.inf.exact.graph.Ug; import com.github.vangj.jbayes.inf.exact.graph.lpd.PotentialEntry; import com.github.vangj.jbayes.inf.exact.graph.pptc.Clique; import com.github.vangj.jbayes.inf.exact.grap...
package com.github.vangj.jbayes.inf.exact.graph.pptc.blocks; public class PropagationTest extends HuangExample { @Test public void testPropagation() { Dag dag = getDag(); Ug m = Moralize.moralize(dag); List<Clique> cliques = Triangulate.triangulate(m); JoinTree joinTree = Transform.transform(cli...
for (PotentialEntry entry : potential.entries()) {
2
palominolabs/benchpress
examples/multi-db/cassandra/src/main/java/com/palominolabs/benchpress/example/multidb/cassandra/CassandraJobTypePlugin.java
[ "public final class KeyGeneratorFactoryFactoryRegistry extends IdRegistry<KeyGeneratorFactoryFactory> {\n\n @Inject\n KeyGeneratorFactoryFactoryRegistry(Set<KeyGeneratorFactoryFactory> instances) {\n super(instances);\n }\n}", "public final class ValueGeneratorFactoryFactoryRegistry extends IdRegi...
import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectReader; import com.google.inject.Inject; import com.palominolabs.benchpress.example.multidb.key.KeyGeneratorFactoryFactoryRegistry; import com.palominolabs.benchpress.example.multidb.value.ValueGeneratorFactoryFactoryRegistry; i...
package com.palominolabs.benchpress.example.multidb.cassandra; final class CassandraJobTypePlugin implements JobTypePlugin { static final String TASK_TYPE = "CASSANDRA"; private final KeyGeneratorFactoryFactoryRegistry keyGeneratorFactoryFactoryRegistry; private final ValueGeneratorFactoryFactoryRegistry...
public JobSlicer getJobSlicer() {
4
wordpress-mobile/WordCamp-Android
app/src/main/java/org/wordcamp/android/BaseActivity.java
[ "public abstract class CacheFragmentStatePagerAdapter extends FragmentStatePagerAdapter {\n\n private static final String STATE_SUPER_STATE = \"superState\";\n private static final String STATE_PAGES = \"pages\";\n private static final String STATE_PAGE_INDEX_PREFIX = \"pageIndex:\";\n private static fi...
import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.view.MenuItemCompat; import android.support.v4.view.ViewCompat; import...
startActivity(feedbackIntent); break; default: break; } return true; } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_base_act, menu); MenuItem searchItem = menu.fin...
WordCampNew[] wordCampNews = (WordCampNew[]) o;
5
ni3po42/traction.mvc
traction/src/main/java/traction/mvc/implementations/ViewFactory.java
[ "public class UIHandler extends Handler\n{\n\tprivate Thread uiThread;\n\tpublic UIHandler()\n\t{\n\t\t//save an instance of the current thread, where it was created.\n\t\tuiThread = Thread.currentThread();\n\t}\n\n\tpublic void tryPostImmediatelyToUIThread(Runnable action)\n\t{\n\t\t//if the current thread is same...
import android.view.View; import org.json.JSONException; import org.json.JSONObject; import traction.mvc.observables.ScopeBuilder; import java.lang.reflect.Constructor; import traction.mvc.R; import traction.mvc.implementations.ui.UIHandler; import traction.mvc.interfaces.IProxyViewBinding; import traction.mvc.interfac...
@SuppressLint("DefaultLocale") @Override public View onCreateView(View parent, String name, Context context, AttributeSet attrs) { //no name, no view if (name == null) return null; //figure out full name of view to inflate String viewFullName = "android.widget." + name; if (n...
Object scope = ScopeBuilder.CreateScope(modelClassInstance);
6
maxpower47/DeliciousDroid
src/com/deliciousdroid/syncadapter/ContactSyncAdapter.java
[ "public class Constants {\n\n /**\n * Account type string.\n */\n public static final String ACCOUNT_TYPE = \"com.deliciousdroid\";\n \n public static final Uri CONTENT_URI_BASE = Uri.parse(\"content://com.deliciousdroid\");\n \n public static final String CONTENT_SCHEME = \"content\";\n ...
import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.AuthenticatorException; import android.accounts.OperationCanceledException; import android.content.AbstractThreadedSyncAdapter; import android.content.ContentProviderClient; import android.content.Context; import android.co...
/* * DeliciousDroid - http://code.google.com/p/DeliciousDroid/ * * Copyright (C) 2010 Matt Schmidt * * DeliciousDroid is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 3 of the License, * ...
} catch (final FeedForbiddenException e) {
2
FRC2832/Robot_2016
src/org/usfirst/frc2832/Robot_2016/commands/GoToPosition.java
[ "public class Aimer extends Subsystem {\n\tpublic static int currentLevel = 0;\n\tpublic static boolean sentinel = false; //if true the TALON should be disabled\n\tpublic static final int TOLERANCE = 100; //in encoder counts\n\tpublic static enum Levels {\n\t\tSTART (0), \n\t\tHIGH (-240), \n\t\tLOW (-1700), \n\t\t...
import org.usfirst.frc2832.Robot_2016.Aimer; import org.usfirst.frc2832.Robot_2016.DeltaPID; import org.usfirst.frc2832.Robot_2016.RobotMap; import org.usfirst.frc2832.Robot_2016.Aimer.Levels; import org.usfirst.frc2832.Robot_2016.TrajectoryController; import edu.wpi.first.wpilibj.command.Command;
package org.usfirst.frc2832.Robot_2016.commands; //Will set Lenny to a position or fixed level. public class GoToPosition extends Command { int setPoint, initPoint; int isUp; //is 1 if we are going up, is -1 if we are going down double kminLowSpeed = 0.8, //constants to multiply by when setting up m...
Aimer.loadPreferences();
0
thom-nic/openfire-jboss-clustering
src/main/java/com/enernoc/rnd/openfire/cluster/cache/ClusteredCacheFactory.java
[ "public class ClusterException extends RuntimeException {\n\n\tpublic ClusterException(String arg0, Throwable arg1) {\n\t\tsuper(arg0, arg1);\n\t}\n\n\tpublic ClusterException(String arg0) {\n\t\tsuper(arg0);\n\t}\n\n\tpublic ClusterException(Throwable arg0) {\n\t\tsuper(arg0);\n\t}\n\n\tprivate static final long s...
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.net.URL; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Vector; import java.ut...
/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * dist...
for ( JGroupsClusterNodeInfo node : masterWatcher.getNodes().values() ) {
4
sherlok/sherlok
src/test/java/org/sherlok/config/ConfigVariableManagerTest.java
[ "public static final String FILE_CONTENT_MASTER = \"MASTER\\n\";", "public static final String TEST_URL = \"https://github.com/sherlok/sherlok_dependency_test.git\";", "public static <E> ArrayList<E> list() {\n return new ArrayList<E>();\n}", "public static <K, V> HashMap<K, V> map() {\n return new Hash...
import org.sherlok.utils.ops.FileOps; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.sherlok.config.GitConfigVariableTest.FILE_CONTENT_MASTER; import static org.sherlok.config.GitConfigVariableTest.TEST_URL; import static org.sherlok.utils.Create.list; import s...
/** * Copyright (C) 2014-2015 Renaud Richardet * * 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 applicabl...
FileBased.RUTA_RESOURCES_PATH, output.get(0)));
4
magnifikus/modPLC
src/minecraft/de/squig/plc/network/PacketControllerData.java
[ "public abstract class Circuit implements Serializable, ITickNotified {\n\tprotected List<CircuitObject> objects;\n\n\tprotected CircuitMap map;\n\n\tprotected TileController controller;\n\tprotected CircuitSimulator simulator;\n\n\tprotected List<CircuitElement> simulationList = null;\n\tprotected List<Object> com...
import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.util.List; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.network.INetworkManager; i...
package de.squig.plc.network; public class PacketControllerData extends PLCPacket { private static enum FLAGS {NAME,STATE, ELEMENTS, ELEMENTSALL, OBJECTS, OBJECTSALL, POWERED}; public int x, y, z; private List<CircuitObjectNetworkData> inObjects = null; private List<CircuitElementNetworkData> inElements = nu...
private Circuit circuit = null;
0
adiyoss/StructED
tutorials-code/ocr/FeatureFunctionsOCR.java
[ "public class Char2Idx {\n final static public HashMap<Character, Integer> char2id = new HashMap<Character, Integer>(){\n {put('$', 0);}{put('a', 1);}{put('b', 2);}{put('c', 3);}{put('d', 4);}{put('e', 5);}\n {put('f', 6);}{put('g', 7);}{put('h', 8);}{put('i', 9);}{put('j', 10);}{put('k', 11);}\n ...
import com.structed.data.entities.Vector; import com.structed.models.kernels.IKernel; import com.sun.xml.internal.xsom.impl.Const; import com.structed.constants.Char2Idx; import com.structed.constants.Consts; import com.structed.data.Factory; import com.structed.data.entities.Example;
/* * The MIT License (MIT) * * StructED - Machine Learning Package for Structured Prediction * * Copyright (c) 2015 Yossi Adi, E-Mail: yossiadidrum@gmail.com * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), t...
Vector tmpVector = new Vector();
4
shevek/tftp4j
tftp-protocol/src/main/java/org/anarres/tftp/protocol/codec/TftpPacketDecoder.java
[ "public class TftpAckPacket extends TftpPacket {\n\n /** Cheat for an unsigned 2-byte value. */\n private char blockNumber;\n\n @Override\n public TftpOpcode getOpcode() {\n return TftpOpcode.ACK;\n }\n\n /**\n * @param blockNumber The block number, indexed from 1.\n */\n public ...
import java.net.SocketAddress; import java.nio.ByteBuffer; import javax.annotation.Nonnull; import org.anarres.tftp.protocol.packet.TftpAckPacket; import org.anarres.tftp.protocol.packet.TftpDataPacket; import org.anarres.tftp.protocol.packet.TftpErrorPacket; import org.anarres.tftp.protocol.packet.TftpOpcode; import o...
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.anarres.tftp.protocol.codec; /** * * @author shevek */ public class TftpPacketDecoder { private static final Logger LOG = LoggerFactory.getLogger(TftpPacketDecoder.class); @Nonnull public T...
TftpOpcode opcode = TftpOpcode.forCode(buf.getShort());
3
SilentChaos512/ScalingHealth
src/main/java/net/silentchaos512/scalinghealth/item/PowerCrystal.java
[ "@Mod.EventBusSubscriber(modid = ScalingHealth.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)\npublic enum ModParticles {\n HEART_CRYSTAL(\"heart_crystal\", Color.FIREBRICK, 0.08, 0.05),\n POWER_CRYSTAL(\"power_crystal\", Color.ROYALBLUE, 0.08, 0.05),\n CURSED_HEART(\"cursed_heart\", Color.REBECCAPURPLE, 0....
import net.minecraft.entity.player.PlayerEntity; import net.silentchaos512.scalinghealth.client.particles.ModParticles; import net.silentchaos512.scalinghealth.init.ModSounds; import net.silentchaos512.scalinghealth.utils.EnabledFeatures; import net.silentchaos512.scalinghealth.utils.SHItems; import net.silentchaos512....
package net.silentchaos512.scalinghealth.item; public class PowerCrystal extends StatBoosterItem { @Override int getLevelCost(PlayerEntity player) { return SHItems.levelCostToUsePowerCrystal(player); } @Override boolean isStatIncreaseAllowed(PlayerEntity player) {
return EnabledFeatures.powerCrystalEnabled() &&
2
grahamedgecombe/android-ssl
analysis/src/main/java/uk/ac/cam/gpe21/droidssl/analysis/trans/DefaultHostnameVerifierAnalyser.java
[ "public final class Vulnerability {\n\tprivate final SootClass clazz;\n\tprivate final SootMethod method;\n\tprivate final VulnerabilityType type;\n\tprivate final VulnerabilityState state;\n\n\tpublic Vulnerability(SootClass clazz, VulnerabilityType type, VulnerabilityState state) {\n\t\tthis.clazz = clazz;\n\t\tt...
import soot.*; import soot.jimple.AbstractStmtSwitch; import soot.jimple.InvokeExpr; import soot.jimple.InvokeStmt; import uk.ac.cam.gpe21.droidssl.analysis.Vulnerability; import uk.ac.cam.gpe21.droidssl.analysis.VulnerabilityState; import uk.ac.cam.gpe21.droidssl.analysis.VulnerabilityType; import uk.ac.cam.gpe21.droi...
/* * Copyright 2013-2014 Graham Edgecombe * * 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 ...
VulnerabilityState state = VulnerabilityState.UNKNOWN;
1
cheremin/scalarization
lab/src/main/java/ru/cheremin/scalarization/lab/tricky/GetHashCodeScenario.java
[ "public abstract class AllocationScenario implements Scenario{\n\tpublic static final String SIZE_KEY = \"scenario.size\";\n\n\tpublic static final int SIZE = Integer.getInteger( SIZE_KEY, 16 );\n\n\tpublic abstract long run();\n\n\tprotected String additionalInfo() {\n\t\treturn \"\";\n\t}\n\n\n\t@Override\n\tpubl...
import java.util.*; import ru.cheremin.scalarization.AllocationScenario; import ru.cheremin.scalarization.ScenarioRun; import ru.cheremin.scalarization.infra.ScenarioRunArgs; import ru.cheremin.scalarization.lab.Utils.Pool; import static ru.cheremin.scalarization.ScenarioRun.withoutSpecificParameters; import static ru....
package ru.cheremin.scalarization.lab.tricky; /** * .hashCode() is very like something "identity-like" (object-y), so I've tried to * check is calling .hashCode() prevents scalarization. Looks like it is not, * overwritten .hashCode() behaves as any other method in relate to scalarization: * String2Key allocati...
return withoutSpecificParameters();
3
idega/is.idega.idegaweb.msi
src/java/is/idega/idegaweb/msi/MSIViewManager.java
[ "public class EventEditor extends RaceBlock {\n\t\n\tprivate static final String PARAMETER_ACTION = \"msi_prm_action\";\n\tprivate static final String PARAMETER_EVENT = \"prm_event\";\n\n\tprivate static final int ACTION_VIEW = 1;\n\tprivate static final int ACTION_NEW = 2;\n\tprivate static final int ACTION_SAVE =...
import is.idega.idegaweb.msi.presentation.EventEditor; import is.idega.idegaweb.msi.presentation.RaceEditor; import is.idega.idegaweb.msi.presentation.RaceNumberEditor; import is.idega.idegaweb.msi.presentation.RaceReport; import is.idega.idegaweb.msi.presentation.SeasonEditor; import java.util.ArrayList; import java.u...
package is.idega.idegaweb.msi; public class MSIViewManager { private ViewNode msiViewNode; private IWMainApplication iwma; public static MSIViewManager getInstance(IWMainApplication iwma) { MSIViewManager instance = (MSIViewManager) iwma .getAttribute("msiviewmanager"); if (instance == null) { insta...
report.setComponentClass(RaceReport.class);
3
hitanshu-dhawan/PopCorn
app/src/main/java/com/hitanshudhawan/popcorn/activities/ViewAllTVShowsActivity.java
[ "public class TVShowBriefsSmallAdapter extends RecyclerView.Adapter<TVShowBriefsSmallAdapter.TVShowViewHolder> {\n\n private Context mContext;\n private List<TVShowBrief> mTVShows;\n\n public TVShowBriefsSmallAdapter(Context context, List<TVShowBrief> tvShows) {\n mContext = context;\n mTVSho...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import com.hitanshudhawan.popcorn.R; import...
package com.hitanshudhawan.popcorn.activities; //import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; public class ViewAllTVShowsActivity extends AppCompatActivity { // private SmoothProgressBar mSmoothProgressBar; private RecyclerView mRecyclerView;
private List<TVShowBrief> mTVShows;
6
gentoku/pinnacle-api-client
src/examples/GetParlayLines.java
[ "public class Parameter extends ParameterCore {\n\n\t/**\n\t * Constructor.\n\t */\n\tprivate Parameter () {\n\t\tsuper();\n\t}\n\t\n\t/**\n\t * Factory\n\t * \n\t * @return\n\t */\n\tpublic static Parameter newInstance() {\n\t\treturn new Parameter();\n\t}\n\n\n\t/**\n\t * ID of the target sports.\n\t * \n\t * @pa...
import java.math.BigDecimal; import pinnacle.api.Parameter; import pinnacle.api.PinnacleAPI; import pinnacle.api.PinnacleException; import pinnacle.api.dataobjects.ParlayLines; import pinnacle.api.enums.LEG_BET_TYPE; import pinnacle.api.enums.ODDS_FORMAT; import pinnacle.api.enums.PERIOD; import pinnacle.api.enums.TEAM...
package examples; public class GetParlayLines { public static void main(String[] args) throws PinnacleException { // settings String username = "yourUserName"; String password = "yourPassword"; PinnacleAPI api = PinnacleAPI.open(username, password); // parameter Parameter leg1 = Parameter.newInstanc...
leg1.team(TEAM_TYPE.TEAM_1);
7
Bernardo-MG/repository-pattern-java
src/test/java/com/wandrell/pattern/test/integration/repository/access/hsqldb/eclipselink/ITModifyHsqldbEclipselinkJpaRepository.java
[ "public class PersistenceContextPaths {\n\n /**\n * Eclipselink JPA persistence.\n */\n public static final String ECLIPSELINK = \"classpath:context/persistence/jpa-eclipselink.xml\";\n\n /**\n * Hibernate JPA persistence.\n */\n public static final String HIBERNATE = \"classpath:context...
import com.wandrell.pattern.test.util.config.properties.DatabaseScriptsPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.JdbcPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.JpaPropertiesPaths; import com.wandrell.pattern.test.util.config.properties.PersistenceProviderProp...
/** * The MIT License (MIT) * <p> * Copyright (c) 2015 the original author or authors. * <p> * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limi...
JdbcPropertiesPaths.HSQLDB, JpaPropertiesPaths.HSQLDB }, properties = {
3
camunda/camunda-connect
core/src/main/java/org/camunda/connect/Connectors.java
[ "public class ConnectCoreLogger extends ConnectLogger {\n\n public void closingResponse(CloseableConnectorResponse response) {\n logDebug(\"001\", \"Closing closeable connector response '{}'\", response);\n }\n\n public void successfullyClosedResponse(CloseableConnectorResponse response) {\n logDebug(\"002...
import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.ServiceLoader; import java.util.Set; import org.camunda.connect.impl.ConnectCoreLogger; import org.camunda.connect.impl.ConnectLogger; import org.camunda.connect.spi.Connector; import org.camunda.connect.spi.ConnectorConfigurator...
/* * Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH * under one or more contributor license agreements. See the NOTICE file * distributed with this work for additional information regarding copyright * ownership. Camunda licenses this file to you under the Apache License, * Version 2.0; y...
ServiceLoader<ConnectorProvider> providers = ServiceLoader.load(ConnectorProvider.class, classLoader);
4
yuqirong/Koku
app/src/main/java/com/yuqirong/koku/activity/MainActivity.java
[ "public class FragmentAdapter extends FragmentPagerAdapter {\n\n private final List<Fragment> mFragments = new ArrayList<>();\n private final List<String> mFragmentTitles = new ArrayList<>();\n\n public FragmentAdapter(FragmentManager fm) {\n super(fm);\n }\n\n public void addFragment(Fragment...
import android.content.Intent; import android.content.IntentFilter; import android.graphics.Color; import android.os.*; import android.support.design.widget.CoordinatorLayout; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.NavigationView; import android.support.design.wi...
}; //把toggle和ActionBar同步状态 mDrawerLayout.setDrawerListener(toggle); toggle.syncState(); } @Override protected void initView() { setContentView(R.layout.activity_main); mDrawerLayout = (DrawerLayout) findViewById(R.id.mDrawerLayout); mToolbar = (Toolb...
adapter.addFragment(FragmentFactory.newInstance(AppConstant.HOME_TIMELINE_URL), getResources().getString(R.string.all_weibo));
2
MingweiSamuel/Zyra
src/test/java/com/mingweisamuel/zyra/test/ApiLeagueV4Test.java
[ "public class Queue {\n private Queue() {}\n\n\n public static final String RANKED_SOLO_5x5 = \"RANKED_SOLO_5x5\";\n public static final String RANKED_TEAM_3x3 = \"RANKED_TEAM_3x3\";\n public static final String RANKED_TEAM_5x5 = \"RANKED_TEAM_5x5\";\n public static final String RANKED_PREMADE_5x5 = ...
import com.mingweisamuel.zyra.enums.Queue; import com.mingweisamuel.zyra.enums.Region; import com.mingweisamuel.zyra.enums.Tier; import com.mingweisamuel.zyra.leagueV4.LeagueItem; import com.mingweisamuel.zyra.leagueV4.LeaguePosition; import com.mingweisamuel.zyra.leagueV4.LeagueList; import org.junit.Ignore; import or...
package com.mingweisamuel.zyra.test; /** * Integration tests for {@link com.mingweisamuel.zyra.LeagueV4Endpoints}. */ public class ApiLeagueV4Test extends ApiTest { @Test public void getLeaguePositions() { checkGetLeaguePositions(api.leaguesV4.getAllLeaguePositionsForSummoner(Region.NA, SUMMONER_...
if (Queue.RANKED_SOLO_5x5.equals(league.queueType)) {
0
lukas-krecan/future-converter
spring-java8/src/test/java/net/javacrumbs/futureconverter/springjava/ToListenableFutureConverterTest.java
[ "public abstract class AbstractConverterHelperBasedTest<F extends Future<String>, T extends Future<String>>\n extends AbstractConverterTest<F, T> {\n private final OriginalFutureTestHelper<F> originalFutureTestHelper;\n private final ConvertedFutureTestHelper<T> convertedFutureTestHelper;\n\n protec...
import net.javacrumbs.futureconverter.common.test.AbstractConverterHelperBasedTest; import net.javacrumbs.futureconverter.common.test.java8.Java8OriginalFutureTestHelper; import net.javacrumbs.futureconverter.common.test.spring.SpringConvertedFutureTestHelper; import org.junit.Ignore; import org.junit.Test; import org....
/* * Copyright © 2014-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
return toCompletableFuture(converted);
3
flapdoodle-oss/de.flapdoodle.embed.process
src/test/java/de/flapdoodle/embed/process/extract/AbstractExtractorTest.java
[ "@Value.Immutable\npublic interface DownloadConfig {\n\t\n\tDistributionDownloadPath getDownloadPath();\n\t\n\tProgressListener getProgressListener();\n\n\tDirectory getArtifactStorePath();\n\t\n\tTempNaming getFileNaming();\n\n\tString getDownloadPrefix();\n\n\tString getUserAgent();\n\n\tOptional<String> getAutho...
import de.flapdoodle.embed.process.config.store.DownloadConfig; import de.flapdoodle.embed.process.config.store.FileSet; import de.flapdoodle.embed.process.config.store.FileType; import de.flapdoodle.embed.process.config.store.PackageResolver; import de.flapdoodle.embed.process.io.directories.Directory; import de.flapd...
/** * Copyright (C) 2011 * Michael Mosmann <michael@mosmann.de> * Martin Jöhren <m.joehren@googlemail.com> * * with contributions from * konstantin-ba@github, Archimedes Trajano (trajano@github), Kevin D. Keck (kdkeck@github), Ben McCann (benmccann@github) * * Licensed under the Apache License, Version ...
FileSet fileSet = FileSet.builder()
1
binarybird/Redress-Disassembler
src/main/java/redress/abi/generic/AbstractText.java
[ "public class Capstone {\n\n protected static abstract class OpInfo {};\n protected static abstract class UnionOpInfo extends Structure {};\n\n public static class UnionArch extends Union {\n public static class ByValue extends UnionArch implements Union.ByValue {};\n\n public Arm.UnionOpInfo arm;\n pub...
import capstone.Capstone; import redress.abi.generic.visitors.AbstractContainerVisitor; import redress.abi.generic.visitors.AbstractStructureVisitor; import redress.memory.address.AbstractAddress; import redress.memory.data.AbstractData; import redress.memory.data.QWord; import redress.util.B; import java.nio.ByteOrder...
package redress.abi.generic; /** * Created by jamesrichardson on 2/23/16. */ public abstract class AbstractText implements IContainer { protected final LinkedList<IStructure> children = new LinkedList<>(); protected final IStructure parent; protected IContainer previousSibling; protected IContaine...
B.add(this, in);
6
krHasan/Money-Manager
src/controller/SignInController.java
[ "public class SignInModel extends DateAndClock{\n\t\n\tpublic static String getOwnerName() {\n\t\tif (checkUserPresence()) {\n\t\t\treturn userFullName() + \"'s\";\n\t\t} else {\n\t\t\treturn \"Your\";\n\t\t}\n\t}\n\t\n\t\n\tpublic static boolean openingDateUpdate() {\n\t\t\treturn dateChecker();\n\t}\n\t\n\t\n\tpu...
import java.io.IOException; import java.util.Optional; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.Alert; import javafx.scene.control.Alert.AlertType; import javafx.scene.control.Button; import javafx.scene.control.ButtonType; import javafx.scene.control.ComboBox; import javafx...
package controller; public class SignInController extends SignInModel { @FXML private Label lblUserFullName; @FXML private Label lblApplicationName; @FXML private Label lblOutdateMsg; @FXML private Label lblWrongAuthentication; @FXML private Label lblForgetPassword; @FXML private Label lblNewUser; @FXML...
(new GoToRegistration()).goToReRegistration(SignInStage);
3
gizwits/GizOpenSource_AppKit_Android
src/com/gizwits/opensource/appkit/sharingdevice/SharedDeviceManagerActivity.java
[ "public class GosBaseActivity extends FragmentActivity {\n\n\t/** 设备热点默认密码 */\n\tpublic static String SoftAP_PSW = \"123456789\";\n\n\t/** 设备热点默认前缀 */\n\tpublic static String SoftAP_Start = \"XPG-GAgent\";\n\n\t/** 存储器默认名称 */\n\tpublic static final String SPF_Name = \"set\";\n\n\t/** Toast time */\n\tpublic int toa...
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import com.gizwits.gizwifisdk.api.GizDeviceSharing; import com.gizwits.gizwifisdk.api.GizDeviceSharingInfo; import com.gizwits.gizwifisdk.api.GizUserInfo; import com.gizwits.gizwifisdk.enumration.GizDeviceShari...
package com.gizwits.opensource.appkit.sharingdevice; public class SharedDeviceManagerActivity extends GosBaseActivity { private List<String> tabList; private String productname; private String deviceid; private List<Fragment> myfragmentlist; private int viewPagerSelected = 0; private boolean isgetsharing; ...
String updatedAt = DateUtil.utc2Local(arg0.getUpdatedAt());
4
lijunyandev/MeetMusic
app/src/main/java/com/lijunyan/blackmusic/activity/HomeActivity.java
[ "public class HomeListViewAdapter extends BaseAdapter {\n\n private List<PlayListInfo> dataList;\n private Activity activity;\n private DBManager dbManager;\n\n public HomeListViewAdapter(List<PlayListInfo> dataList, Activity activity, DBManager dbManager) {\n this.dataList = dataList;\n t...
import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.NavigationView; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBar; import android.support.v7.app.AlertD...
package com.lijunyan.blackmusic.activity; public class HomeActivity extends PlayBarBaseActivity { private static final String TAG = HomeActivity.class.getName(); private DBManager dbManager; private DrawerLayout mDrawerLayout; private NavigationView navView; private ImageView navHeadIv; pr...
private HomeListViewAdapter adapter;
0
PeterCxy/BlackLight
src/us/shandian/blacklight/api/friendships/FriendsApi.java
[ "public abstract class BaseApi\n{\n\tprivate static final String TAG = BaseApi.class.getSimpleName();\n\t\n\t// Http Methods\n\tprotected static final String HTTP_GET = HttpUtility.GET;\n\tprotected static final String HTTP_POST = HttpUtility.POST;\n\t\n\t// Access Token\n\tprivate static String mAccessToken;\n\t\n...
import android.util.Log; import com.google.gson.Gson; import org.json.JSONObject; import us.shandian.blacklight.api.BaseApi; import us.shandian.blacklight.api.Constants; import us.shandian.blacklight.model.UserModel; import us.shandian.blacklight.model.UserListModel; import us.shandian.blacklight.support.http.WeiboPara...
/* * Copyright (C) 2014 Peter Cai * * This file is part of BlackLight * * BlackLight 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 ve...
UserModel user = new Gson().fromJson(json.toString(), UserModel.class);
2
alexcojocaru/elasticsearch-maven-plugin
src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/step/RemovePluginsStep.java
[ "public class VersionUtil {\n \n public static boolean isUnder_5_0_0(String version)\n {\n return version.matches(\"[0-4]\\\\..*\");\n }\n\n public static boolean isBetween_6_3_0_and_7_10_x(String version)\n {\n return version.matches(\"6\\\\.([3-9]|(\\\\d){2,})\\\\..*\")\n ...
import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import com.github.alexcojocaru.mojo.elasticsearch.v2.util.VersionUtil; import org.apache.commons.exec.CommandLine; import org.apache.commons.lang3.StringUtils; import org.apache.maven....
package com.github.alexcojocaru.mojo.elasticsearch.v2.step; /** * Remove the plugins directory from the current Elasticsearch instance, if any. * That prevents the plugin installation from failing when the ES directory is not cleaned up. * (https://github.com/alexcojocaru/elasticsearch-maven-plugin/issues/41). ...
if (VersionUtil.isEqualOrGreater_6_4_0(config.getClusterConfiguration().getVersion()))
0
turn/sorcerer
src/main/java/com/turn/sorcerer/injector/SorcererInjector.java
[ "public class SorcererAbstractModule extends AbstractModule {\n\n\tprivate Map<String, TaskType> tasks = Maps.newHashMap();\n\tprivate Map<String, Class<? extends Task>> taskClasses = Maps.newHashMap();\n\tprivate Map<String, PipelineType> pipelines = Maps.newHashMap();\n\tprivate Map<String, Class<? extends Pipeli...
import com.turn.sorcerer.config.impl.SorcererAbstractModule; import com.turn.sorcerer.module.ModuleType; import com.turn.sorcerer.pipeline.Pipeline; import com.turn.sorcerer.pipeline.type.PipelineType; import com.turn.sorcerer.status.StatusStorage; import com.turn.sorcerer.task.Task; import com.turn.sorcerer.task.type....
/* * Copyright (c) 2015, Turn Inc. All Rights Reserved. * Use of this source code is governed by a BSD-style license that can be found * in the LICENSE file. */ package com.turn.sorcerer.injector; /** * Wrapper around Guice injector * * @author tshiou */ public class SorcererInjector { private static fina...
public StatusStorage getStorageInstance() {
4
ajitsing/Sherlock
sherlock/src/test/java/com/singhajit/sherlock/crashes/CrashPresenterTest.java
[ "public class SherlockDatabaseHelper extends SQLiteOpenHelper {\n private static final int VERSION = 2;\n private static final String DB_NAME = \"Sherlock\";\n\n public SherlockDatabaseHelper(Context context) {\n super(context, DB_NAME, null, VERSION);\n }\n\n @Override\n public void onCreate(SQLiteDatabas...
import com.singhajit.sherlock.core.database.SherlockDatabaseHelper; import com.singhajit.sherlock.core.investigation.AppInfo; import com.singhajit.sherlock.core.investigation.Crash; import com.singhajit.sherlock.core.investigation.CrashViewModel; import com.singhajit.sherlock.crashes.action.CrashActions; import com.sin...
package com.singhajit.sherlock.crashes; public class CrashPresenterTest { @Test public void shouldInitializeCrashView() throws Exception { SherlockDatabaseHelper database = mock(SherlockDatabaseHelper.class); Crash crash = mock(Crash.class); when(crash.getId()).thenReturn(1); AppInfo appInfo = m...
verify(actions).render(argThat(new CustomTypeSafeMatcher<CrashViewModel>("") {
3
edouardhue/comeon
src/main/java/comeon/ui/add/AddModel.java
[ "public final class CsvMetadataSource implements ExternalMetadataSource<Object> {\n private static final Logger LOGGER = LoggerFactory.getLogger(CsvMetadataSource.class);\n\n private final HashMap<String, Object> metadata;\n\n private final Path metadataFile;\n\n private final String mediaExpression;\n\...
import au.com.bytecode.opencsv.CSVParser; import com.google.common.base.Charsets; import comeon.core.extmetadata.CsvMetadataSource; import comeon.core.extmetadata.ExternalMetadataSource; import comeon.core.extmetadata.KeyTransformer; import comeon.core.extmetadata.NullMetadataSource; import comeon.model.Template; impor...
package comeon.ui.add; public class AddModel { private final PropertyChangeSupport pcs; private File[] mediaFiles;
private Template template;
4
TonnyL/Espresso
app/src/main/java/io/github/marktony/espresso/data/source/remote/PackagesRemoteDataSource.java
[ "public class Package extends RealmObject {\n\n public static final int STATUS_FAILED = 2, STATUS_NORMAL = 0,\n STATUS_ON_THE_WAY = 5, STATUS_DELIVERED = 3,\n STATUS_RETURNED = 4, STATUS_RETURNING = 6,\n STATUS_OTHER = 1;\n\n @Ex...
import io.reactivex.schedulers.Schedulers; import io.realm.Realm; import io.realm.RealmConfiguration; import static io.github.marktony.espresso.realm.RealmHelper.DATABASE_NAME; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.util.List; import io.github.marktony.espress...
/* * Copyright(c) 2017 lizhaotailang * * 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...
.create(RetrofitService.class)
3
R2RML-api/R2RML-api
r2rml-api-jena-binding/src/test/java/jenaTest/RDFSyntax2_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 eu.optique.r2rml.api.model.RefObjectMap; import eu.optique.r2rml.api.model.SubjectMap; import eu.optique.r2rml.api.model.Template; import eu.optique.r2rml.api.model.TriplesMap; import java.io.InputStream; import java.util.Collection; import java.util.Iterator; import eu.optique.r2rml.api.binding.jena.Jena...
/******************************************************************************* * 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...
Template t=s.getTemplate();
4
tliron/jygments
components/jygments/source/com/threecrickets/jygments/grammar/def/IncludeDef.java
[ "public abstract class Def<C>\n{\n\t//\n\t// Attributes\n\t//\n\n\tpublic boolean isResolved()\n\t{\n\t\treturn resolved;\n\t}\n\n\tpublic Def<C> getCause( C container )\n\t{\n\t\treturn null;\n\t}\n\n\t//\n\t// Operations\n\t//\n\n\tpublic boolean resolve( C container ) throws ResolutionException\n\t{\n\t\treturn ...
import com.threecrickets.jygments.Def; import com.threecrickets.jygments.ResolutionException; import com.threecrickets.jygments.grammar.Grammar; import com.threecrickets.jygments.grammar.Rule; import com.threecrickets.jygments.grammar.State;
/** * Copyright 2010-2016 Three Crickets LLC. * <p> * The contents of this file are subject to the terms of a BSD license. See * attached license.txt. * <p> * Alternatively, you can obtain a royalty free commercial license with less * limitations, transferable or non-transferable, directly from Three Crickets *...
public boolean resolve( Grammar grammar ) throws ResolutionException
2
dbuschman7/mongoFS
src/main/java/me/lightspeed7/mongofs/gridfs/GridFSInputFile.java
[ "public class BufferedChunksOutputStream extends FilterOutputStream {\n\n /**\n * The internal buffer where the chunk data is stored.\n */\n private byte[] myBuffer;\n\n /**\n * The number of valid bytes in the buffer. This value is always in the range <tt>0</tt> through <tt>buf.length</tt>; el...
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Date; import me.lightspeed7.mongofs.BufferedChunksOutputStream; import me.lightspeed7.mongofs.FileChunksOutputStreamSink; import me.lightspeed7.mongofs.InputFile; import me.lightspeed7.mongofs.MongoFileConstants; impor...
/* * Copyright (c) 2008-2014 MongoDB, 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 agr...
new BytesCopier(inputStream, this.outputStream, this.closeStreamOnPersist).transfer(false);
4
AlexanderMisel/gnubridge
src/main/java/org/gnubridge/core/bidding/rules/RebidJacobyTransfer.java
[ "public class Hand {\n\tList<Card> cards;\n\n\t/**\n\t * Caching optimization for pruning played cards\n\t * and perhaps others\n\t */\n\tList<Card> orderedCards;\n\tSuit color;\n\tList<Card> colorInOrder;\n\n\tpublic Hand() {\n\t\tthis.cards = new ArrayList<Card>();\n\t}\n\n\tpublic Hand(Card... cards) {\n\t\tthis...
import org.gnubridge.core.Hand; import org.gnubridge.core.bidding.Auctioneer; import org.gnubridge.core.bidding.Bid; import org.gnubridge.core.bidding.PointCalculator; import org.gnubridge.core.deck.Diamonds; import org.gnubridge.core.deck.Hearts; import org.gnubridge.core.deck.NoTrump; import org.gnubridge.core.deck.S...
package org.gnubridge.core.bidding.rules; public class RebidJacobyTransfer extends PRebidNoTrump { public RebidJacobyTransfer(Auctioneer a, Hand h) { super(a, h); } @Override protected boolean applies() { return super.applies() && response.getValue() == level + 1 && (response.getTrump().equals(Diamonds...
return new Bid(3, NoTrump.i());
5