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
sathipal/lwm2m_over_mqtt
src/com/ibm/lwm2m/client/LwM2MClient.java
[ "public class LwM2MServerObject extends MQTTResource {\n\t\n\tpublic static final String RESOURCE_NAME = \"1\";\n\tObserveSpec observeSpec = new ObserveSpec();\n\tprivate static final AtomicInteger instanceCounter = new AtomicInteger(0); \n\t\n\tpublic LwM2MServerObject(String name, boolean bInstance) {\n\t\tsuper(...
import java.io.IOException; import java.net.InetSocketAddress; import java.util.Collection; import java.util.Iterator; import java.util.Properties; import java.util.Scanner; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.ut...
* resources, * * IPSO Object 3303 * * Temperature sensor: This IPSO object is used over a temperature * sensor to report a remote temperature measurement, It defines * resources for minimum/maximum measured values since the sensor is on * * IPSO Resource - 5700 - SensorValue - Temperature ...
Resource resource = this.mqttClient.getRoot();
6
flixel-gdx/flixel-gdx-box2d
flixel-gdx-box2d-examples/src/org/flxbox2d/examples/TestSensor.java
[ "public class B2FlxB\n{\n\t/** \n\t * The ratio from meters to pixels. \n\t */\n\tpublic static final float RATIO = 32f;\n\t/**\n\t * The world where the object lives.\n\t */\n\tpublic static World world;\n\t/**\n\t * The contact manager.\n\t */\n\tpublic static B2FlxContactManager contact;\n\t/**\n\t * Let the wor...
import org.flxbox2d.B2FlxB; import org.flxbox2d.collision.shapes.B2FlxCircle; import org.flxbox2d.collision.shapes.B2FlxShape; import org.flxbox2d.collision.shapes.B2FlxSprite; import org.flxbox2d.common.math.B2FlxMath; import org.flxbox2d.events.IB2FlxListener; import com.badlogic.gdx.math.Vector2; import com.badlogic...
package org.flxbox2d.examples; /** * * @author Ka Wing Chin */ public class TestSensor extends PlayState { private final short CIRCLE = 0x0002; private final short SENSOR = 0x0004; private B2FlxCircle sensorBody; private Vector2 d; private float strength = 10.0f; private Array<B2FlxCircle> bodies; @Overr...
B2FlxB.contact.onBeginContact(sensorBody, CIRCLE, onContact);
0
Skarafaz/mercury
app/src/main/java/it/skarafaz/mercury/activity/SettingsActivity.java
[ "public class MercuryApplication extends Application {\n private static final String S_HAS_PERMANENT_MENU_KEY = \"sHasPermanentMenuKey\";\n private static final Logger logger = LoggerFactory.getLogger(MercuryApplication.class);\n private static Context context;\n\n public static Context getContext() {\n...
import it.skarafaz.mercury.manager.SshManager; import it.skarafaz.mercury.ssh.SshCommandPubKey; import it.skarafaz.mercury.ssh.SshEventSubscriber; import org.greenrobot.eventbus.EventBus; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.os.AsyncTask; impor...
/* * Mercury-SSH * Copyright (C) 2018 Skarafaz * * This file is part of Mercury-SSH. * * Mercury-SSH is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your opti...
MercuryApplication.showProgressDialog(getSupportFragmentManager(), getString(R.string.exporting_public_key));
0
NymphWeb/nymph
com/nymph/context/WebApplicationInitialization.java
[ "public interface BeansComponent {\n\t/**\n\t * 根据注解类型获取组件Bean\n\t * @param anno\t指定的注解\n\t * @return\t\t对应的bean组件\n\t */\n\tOptional<Object> getComponent(Class<? extends Annotation> anno);\n\n\t/**\n\t * 获取拦截器链\n\t * @return\n\t */\n\tList<Interceptors> getInterceptors();\n\t/**\n\t * 过滤出组件的Bean\n\t * @param bean ...
import com.nymph.bean.BeansComponent; import com.nymph.bean.web.WebApplicationBeansFactory; import com.nymph.config.Configuration; import com.nymph.config.WebConfig; import com.nymph.exception.handle.EnableExceptionHandler; import com.nymph.exception.handle.ExceptionHandler; import com.nymph.exception.impl.DefaultExcep...
package com.nymph.context; /** * 初始化应用上下文的一些配置 * @author NYMPH * @date 2017年10月5日下午8:02:58 */ public abstract class WebApplicationInitialization { /** * 字符编码过滤器 */ protected static final String DEFAULT_ENCODING_FILTER = "com.nymph.filter.EncodingFilter"; /** * 核心调度器 */ protected static final String C...
setExceptionHandler((ExceptionHandler) exceptionComponent.orElseGet(DefaultExceptionHandler :: new));
5
edmcouncil/rdf-toolkit
src/main/java/org/edmcouncil/rdf_toolkit/writer/SortedJsonLdWriter.java
[ "public static List<Value> getCollectionMembers(UnsortedTurtleSubjectPredicateObjectMap unsortedTripleMap,\n BNode bnode,\n Class<Value> collectionClass,\n ComparisonContext comp...
import static org.edmcouncil.rdf_toolkit.comparator.ComparisonUtils.getCollectionMembers; import static org.edmcouncil.rdf_toolkit.comparator.ComparisonUtils.isCollection; import static org.edmcouncil.rdf_toolkit.util.Constants.INDENT; import org.eclipse.rdf4j.model.BNode; import org.eclipse.rdf4j.model.IRI; import org...
/* * The MIT License (MIT) * * Copyright (c) 2015 Enterprise Data Management Council * * 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...
SortedTurtlePredicateObjectMap poMap = sortedTripleMap.get(subject);
4
Frameworkium/frameworkium-core
src/main/java/com/frameworkium/core/ui/UITestLifecycle.java
[ "public class TestIdUtils {\n\n private TestIdUtils() {\n // hide default constructor for this util class\n }\n\n /**\n * Get TMS Link or Issue ID value.\n *\n * @param iMethod the {@link IMethodInstance} to check for test ID annotations.\n * @return Optional of either the {@link TmsLink} or {@link Is...
import static java.time.temporal.ChronoUnit.SECONDS; import com.frameworkium.core.common.properties.Property; import com.frameworkium.core.common.reporting.TestIdUtils; import com.frameworkium.core.common.reporting.allure.AllureProperties; import com.frameworkium.core.ui.browsers.UserAgent; import com.frameworkium.core...
package com.frameworkium.core.ui; /** * Handles all UI test related state and life cycle. * Contains a ThreadLocal instance */ public class UITestLifecycle { private static final Duration DEFAULT_TIMEOUT = Duration.of(10, SECONDS); private static final ThreadLocal<ScreenshotCapture> capture = new ThreadLoca...
Optional<String> testID = TestIdUtils.getIssueOrTmsLinkValue(testMethod);
0
flaxsearch/hackday
ukmp/java/webapp/src/main/java/uk/co/flax/ukmp/services/TermsManagerThread.java
[ "public class SearchResults {\n\n\tprivate final int start;\n\tprivate final long numResults;\n\tprivate final int pageSize;\n\n\tprivate final SearchState searchState;\n\n\tprivate final List<Tweet> tweets;\n\tprivate final String errorMessage;\n\n\tpublic SearchResults(int start, long numResults, int pageSize, Li...
import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.apache.commons.lang3.Stri...
/** * Copyright (c) 2014 Lemur Consulting Ltd. * <p/> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p/> * http://www.apache.org/licenses/LICENSE-2.0 * <p/> * Unless required by ap...
SearchResults results = searchEngine.getTextBatch(batch);
0
rockihack/Stud.IP-FileSync
src/de/uni/hannover/studip/sync/views/RootLayoutController.java
[ "public class Main extends Application {\n\n\t/**\n\t * App name (titlebar).\n\t */\n\tpublic static final String APP_NAME = \"Stud.IP FileSync\";\n\n\t/**\n\t * Views.\n\t */\n\tpublic static final String OVERVIEW = \"Overview\";\n\tpublic static final String NEW_DOCUMENTS = \"NewDocuments\";\n\tpublic static fina...
import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.NoSuchFileException; import java.nio.file.Path; import java.nio.file.Paths; import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.databind.JsonMappingException; import de.uni.hannover.studip.sy...
package de.uni.hannover.studip.sync.views; /** * * @author Lennart Glauer * */ public class RootLayoutController extends AbstractController { @FXML private MenuBar menu; /** * Get menu instance. * * @return */ public MenuBar getMenu() { return menu; } /** * File -> New documents. */ @F...
Export.exportMat(rootDirPath, exportDirPath);
2
hishidama/embulk-parser-poi_excel
src/main/java/org/embulk/parser/poi_excel/visitor/PoiExcelColumnVisitor.java
[ "public enum PoiExcelColumnValueType {\r\n\t/** cell value */\r\n\tCELL_VALUE(true, true),\r\n\t/** cell formula */\r\n\tCELL_FORMULA(true, true),\r\n\t/** cell style */\r\n\tCELL_STYLE(true, false),\r\n\t/** cell font */\r\n\tCELL_FONT(true, false),\r\n\t/** cell comment */\r\n\tCELL_COMMENT(true, false),\r\n\t/**...
import java.text.MessageFormat; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellType; import org.apache.poi.ss.usermodel.Sheet; import org.embulk.parser.poi_excel.PoiExcelColumnValueType; import org.embulk.parser.poi_excel.bean.PoiExcelColumnBean; import org.embulk.parser.poi_excel...
package org.embulk.parser.poi_excel.visitor; public class PoiExcelColumnVisitor implements ColumnVisitor { private final Logger log = Exec.getLogger(getClass()); protected final PoiExcelVisitorValue visitorValue; protected final PageBuilder pageBuilder; protected final PoiExcelVisitorFactory factory; ...
PoiExcelColumnValueType valueType = bean.getValueType();
0
aldebaran/jnaoqi
examples/desktop/HelloDesktop/src/com/aldebaran/demo/ExReactToVoice.java
[ "public interface EventCallback<T> {\n\t/**\n\t * Call when an Event is raised\n\t *\n\t * @param value the value return by the event, you can get the type in aldebaran doc\n\t * */\n\tpublic void onEvent(T value) throws InterruptedException, CallError;\n}", "public class ALMemory extends ALMemoryHelper {\n\n ...
import java.util.ArrayList; import java.util.List; import com.aldebaran.qi.Application; import com.aldebaran.qi.CallError; import com.aldebaran.qi.helper.EventCallback; import com.aldebaran.qi.helper.proxies.ALMemory; import com.aldebaran.qi.helper.proxies.ALMotion; import com.aldebaran.qi.helper.proxies.ALSpeechRecogn...
/** * Copyright (c) 2015 Aldebaran Robotics. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the COPYING file. * Created by epinault on 11/05/2014. */ package com.aldebaran.demo; /** * This example shows how the robot can obey to voice commands: 'wake u...
new EventCallback<List<Object>>() {
0
niteshpatel/ministocks
src/main/java/nitezh/ministock/domain/PortfolioStockRepository.java
[ "public class StorageCache extends Cache {\n\n private static final String JSON_CACHE = \"JsonCache\";\n private static String mCache = \"\";\n private Storage storage = null;\n\n public StorageCache(Storage storage) {\n if (storage != null) {\n this.storage = storage;\n }\n ...
import java.text.NumberFormat; import java.text.ParseException; import java.text.RuleBasedCollator; import java.util.*; import nitezh.ministock.DialogTools; import nitezh.ministock.Storage; import nitezh.ministock.UserData; import nitezh.ministock.utils.CurrencyTools; import nitezh.ministock.utils.NumberTools; import a...
/* The MIT License Copyright (c) 2013 Nitesh Patel http://niteshpatel.github.io/ministocks Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation t...
this.mAppStorage, new StorageCache(this.mAppStorage), this.widgetRepository);
0
paphus/Project-Libre
android/src/com/paphus/sdk/activity/forum/CreateForumPostActivity.java
[ "public class MainActivity extends Activity {\n\tpublic static final boolean DEBUG = false;\n\tpublic static final boolean ADULT = false;\n\t\n\t/**\n\t * Enter your application ID here.\n\t * You can get an application ID from any of the services websites (BOT libre, FORUMS libre, LIVE CHAT libre, Paphus Live Chat...
import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import com.paphus.sdk.activity.MainActivity; import com.paphus.sdk.activity.R; import com.paphus.sdk.activity.actions.HttpAction; import com.paphus.sdk.activity.actions.HttpCreateForumPostAction; import com....
package com.paphus.sdk.activity.forum; /** * Activity for creating a new forum post. */ public class CreateForumPostActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_create_forumpost); ...
HttpAction action = new HttpGetTagsAction(this, "Post");
3
jenkinsci/analysis-core-plugin
src/main/java/hudson/plugins/analysis/views/DetailFactory.java
[ "@ExportedBean\n@SuppressWarnings({\"PMD.TooManyFields\", \"PMD.ExcessiveClassLength\"})\npublic abstract class BuildResult implements ModelObject, Serializable, AnnotationProvider {\n private static final long serialVersionUID = 1110545450292087475L;\n private static final Logger LOGGER = Logger.getLogger(Bu...
import javax.annotation.Nonnull; import java.util.Collection; import java.util.Map; import org.apache.commons.lang.StringUtils; import com.google.common.collect.Maps; import hudson.model.AbstractBuild; import hudson.model.Item; import hudson.model.Run; import hudson.plugins.analysis.Messages; import hudson.plugins.anal...
package hudson.plugins.analysis.views; /** * Creates detail objects for the selected element of a annotation container. * * @author Ulli Hafner */ @SuppressWarnings("deprecation") public class DetailFactory { /** Default detail builder class. */ private static final DetailFactory DEFAULT_DETAIL_BUILDER...
private static Map<Class<? extends ResultAction<? extends BuildResult>>, DetailFactory> factories = Maps.newHashMap();
1
Ecwid/consul-api
src/main/java/com/ecwid/consul/v1/query/QueryConsulClient.java
[ "public class GsonFactory {\n\n\tprivate static final Gson GSON = new Gson();\n\n\tpublic static Gson getGson() {\n\t\treturn GSON;\n\t}\n\n}", "public final class HttpResponse {\n\n\tprivate final int statusCode;\n\tprivate final String statusMessage;\n\n\tprivate final String content;\n\n\tprivate final Long co...
import com.ecwid.consul.json.GsonFactory; import com.ecwid.consul.transport.HttpResponse; import com.ecwid.consul.transport.TLSConfig; import com.ecwid.consul.v1.ConsulRawClient; import com.ecwid.consul.v1.OperationException; import com.ecwid.consul.v1.QueryParams; import com.ecwid.consul.v1.Response; import com.ecwid....
package com.ecwid.consul.v1.query; public final class QueryConsulClient implements QueryClient { private final ConsulRawClient rawClient; public QueryConsulClient(ConsulRawClient rawClient) { this.rawClient = rawClient; } public QueryConsulClient() { this(new ConsulRawClient()); }
public QueryConsulClient(TLSConfig tlsConfig) { this(new ConsulRawClient(tlsConfig)); }
2
cccssw/enigma-vk
src/cuchaz/enigma/analysis/JarIndex.java
[ "public class Constants {\n\tpublic static final String Name = \"Enigma VK\";\n\tpublic static final String Version = \"0.12 beta(VK Fork)\";\n\tpublic static final String Url = \"https://github.com/cccssw/enigma-vk\";\n\tpublic static final int MiB = 1024 * 1024; // 1 mebibyte\n\tpublic static final int KiB = 1024...
import java.lang.reflect.Modifier; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.jar.JarFile; import javassist.CannotCompileException; import javassist.CtBehavior; import javassist.CtClass; import ...
/******************************************************************************* * Copyright (c) 2015 Jeff Martin. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public * License v3.0 which accompanies this distribution, and is avail...
FieldEntry fieldEntry = EntryFactory.getFieldEntry(field);
5
dgrunwald/arden2bytecode
src/arden/compiler/ExpressionCompiler.java
[ "public final class Label {\n\t/** Target position (byte index where the label is pointing to), -1=not yet set */\n\tint markedPosition = -1;\n\t/** Stack size at target position, -1=currently unknown */\n\tint stackSize = -1;\n\t/** Initially true, is set to false by markForwardOnly() to signal that backward jumps...
import java.util.Locale; import arden.codegenerator.Label; import arden.compiler.node.*; import arden.runtime.ArdenBoolean; import arden.runtime.ArdenList; import arden.runtime.ArdenNull; import arden.runtime.ArdenObject; import arden.runtime.ArdenValue; import arden.runtime.BinaryOperator; import arden.runtime.Express...
@Override public void caseAIfromexprfromExprFunction(AIfromexprfromExprFunction node) { // {ifromexprfrom} index_from_func_op expr_factor from expr_function node.getIndexFromFuncOp().apply( new TransformationOperatorCompiler(this, node.getExprFactor(), node.getExprFunction())); } @Override public void cas...
context.writer.loadStaticField(ArdenList.class.getDeclaredField("EMPTY"));
2
JessYanCoding/AndroidAutoSize
autosize/src/main/java/me/jessyan/autosize/AutoSizeConfig.java
[ "public class ExternalAdaptManager {\n private List<String> mCancelAdaptList;\n private Map<String, ExternalAdaptInfo> mExternalAdaptInfos;\n private boolean isRun;\n\n /**\n * 将不需要适配的第三方库 {@link Activity} 添加进来 (但不局限于三方库), 即可让该 {@link Activity} 的适配效果失效\n * <p>\n * 支持链式调用, 如:\n * {@link E...
import me.jessyan.autosize.utils.AutoSizeLog; import me.jessyan.autosize.utils.Preconditions; import me.jessyan.autosize.utils.ScreenUtils; import android.app.Activity; import android.app.Application; import android.content.ComponentCallbacks; import android.content.Context; import android.content.pm.ApplicationInfo; i...
/* * Copyright 2018 JessYan * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
private ExternalAdaptManager mExternalAdaptManager = new ExternalAdaptManager();
0
lkorth/photo-paper
PhotoPaper/src/main/java/com/lukekorth/photo_paper/api/FiveHundredPxClient.java
[ "public class ApiResponse {\n}", "public class GalleryResponse {\n\n @Expose public List<Gallery> galleries;\n\n public class Gallery {\n\n @Expose public String id;\n @Expose public String name;\n }\n}", "public class PhotoGalleryRequest {\n\n @Expose private Add add;\n @Expose pri...
import com.lukekorth.photo_paper.models.ApiResponse; import com.lukekorth.photo_paper.models.GalleryResponse; import com.lukekorth.photo_paper.models.PhotoGalleryRequest; import com.lukekorth.photo_paper.models.PhotoResponse; import com.lukekorth.photo_paper.models.PhotosResponse; import com.lukekorth.photo_paper.model...
package com.lukekorth.photo_paper.api; public interface FiveHundredPxClient { @GET("users") Call<UsersResponse> users(); @GET("photos/{id}") Call<PhotoResponse> photo(@Path("id") String id); @GET("photos/search?image_size=2&rpp=100")
Call<SearchResult> search(@Query("term") String term);
5
6thsolution/EasyMVP
easymvp-compiler/src/main/java/easymvp/compiler/generator/decorator/SupportActivityDecorator.java
[ "public class DelegateClassGenerator extends ClassGenerator {\n private final ClassName viewClass;\n private ClassName presenterClass;\n private ViewType viewType;\n private int resourceID = -1;\n private String presenterFieldNameInView = \"\";\n private String presenterViewQualifiedName;\n pri...
import com.squareup.javapoet.ClassName; import com.squareup.javapoet.MethodSpec; import easymvp.compiler.generator.DelegateClassGenerator; import static easymvp.compiler.generator.AndroidLoaderUtils.getSupportLoader; import static easymvp.compiler.generator.AndroidLoaderUtils.getSupportLoaderCallbacks; import static ea...
package easymvp.compiler.generator.decorator; /** * @author Saeed Masoumi (saeed@6thsolution.com) */ public class SupportActivityDecorator extends ActivityDecorator { public SupportActivityDecorator(DelegateClassGenerator delegateClassGenerator) { super(delegateClassGenerator); } @Override ...
return getSupportLoaderCallbacks();
2
sdwfqin/AndroidSamples
app/src/main/java/com/sdwfqin/sample/MainActivity.java
[ "public class CameraMainActivity extends AppCompatActivity {\n\n @BindView(R.id.list)\n ListView list;\n\n private String[] mTitle = new String[]{\n \"调用系统相机\",\n \"自定义相机\",\n };\n private Class[] mClasses = new Class[]{\n PictureActivity.class,\n CameraAct...
import android.Manifest; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.Toast; import com.sdwfqin.sample.camera.CameraMainActivity; import com.sdwfqin.sample.activitytrans...
package com.sdwfqin.sample; /** * 描述:AndroidSample * 项目地址:https://github.com/sdwfqin/AndroidSamples * * @author zhangqin */ public class MainActivity extends AppCompatActivity implements EasyPermissions.PermissionCallbacks { @BindView(R.id.list) ListView list; private final int RESULT_CODE_1 = 1...
DragMainActivity.class};
3
pentaho/pentaho-cassandra-plugin
core/src/main/java/org/pentaho/di/trans/steps/cassandraoutput/CassandraOutput.java
[ "public class CassandraUtils {\n\n protected static final Class<?> PKG = CassandraUtils.class;\n\n public static class ConnectionOptions {\n public static final String SOCKET_TIMEOUT = \"socketTimeout\"; //$NON-NLS-1$\n public static final String MAX_LENGTH = \"maxLength\"; //$NON-NLS-1$\n public static ...
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.google.common.annotations.VisibleForTesting; import org.pentaho.cassandra.util.CassandraUtils; import org.pentaho.cassandra.ConnectionFactory; import org.pentaho.cassandra.driver.datastax.DriverCQLRowHandler; i...
/******************************************************************************* * * Pentaho Big Data * * Copyright (C) 2002-2020 by Hitachi Vantara : http://www.pentaho.com * ******************************************************************************* * * Licensed under the Apache License, Version 2.0 (the ...
DriverCQLRowHandler handler = (DriverCQLRowHandler) m_cqlHandler;
2
rrauschenbach/mobi-api4java
src/main/java/org/rr/mobi4java/MobiContentIndex.java
[ "public static byte[] getBytes(byte[] buffer, int offset) {\n\tbyte[] b = new byte[buffer.length - offset];\n\tSystem.arraycopy(buffer, offset, b, 0, buffer.length - offset);\n\treturn b;\n}", "public static int getInt(byte[] buffer, int offset, int length) {\n\treturn getInt(getBytes(buffer, offset, length));\n}...
import static org.apache.commons.lang3.BooleanUtils.negate; import static org.rr.mobi4java.ByteUtils.getBytes; import static org.rr.mobi4java.ByteUtils.getInt; import static org.rr.mobi4java.ByteUtils.getString; import static org.rr.mobi4java.ByteUtils.write; import static org.rr.mobi4java.ByteUtils.writeInt; import st...
package org.rr.mobi4java; public class MobiContentIndex extends MobiContent { private static final String IDENTIFIER = "INDX"; public static enum INDEX_TYPE { NORMAL(0), INFLECTION(2); private final int type; private static Map<Integer, INDEX_TYPE> map = new HashMap<Integer, INDEX_TYPE>(); st...
write(unknownIndxHeaderPart, out);
3
horizon-institute/artcodes-android
app/src/main/java/uk/ac/horizon/artcodes/fragment/ExperienceLibraryFragment.java
[ "public final class Analytics\n{\n\tpublic enum Target\n\t{\n\t\tAPP,\n\t\t// Add more trackers here if you need, and update the code in #get(Target) below\n\t}\n\n\tprivate static final String CONTENT_TYPE = \"Experience\";\n\tprivate static final String SCAN_EVENT = \"scan_content\";\n\tprivate static final Strin...
import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import androidx.annotation.ColorInt; import androidx.annotation.DrawableRes; import androidx.annotation.NonNull; import com.google.android.material.floatingactionbutton.FloatingActionButton; impo...
/* * Artcodes recognises a different marker scheme that allows the * creation of aesthetically pleasing, even beautiful, codes. * Copyright (C) 2013-2016 The University of Nottingham * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Pu...
private Account account;
1
eckig/graph-editor
core/src/main/java/de/tesis/dynaware/grapheditor/core/skins/defaults/DefaultConnectionSkin.java
[ "public abstract class GJointSkin extends GSkin<GJoint> {\n\n private final DraggableBox root = new DraggableBox(EditorElement.JOINT)\n {\n\n @Override\n public final void positionMoved()\n {\n super.positionMoved();\n GJointSkin.this.impl_positionMoved();\n }...
import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import de.tesis.dynaware.grapheditor.GJointSkin; import de.tesis.dynaware.grapheditor.GraphEditor; import de.tesis.dynaware.grapheditor.core.connections.RectangularConnections; import de.tesis.dynaware.grapheditor.core.skins.defaults.connec...
/* * Copyright (C) 2005 - 2014 by TESIS DYNAware GmbH */ package de.tesis.dynaware.grapheditor.core.skins.defaults; /** * The default connection skin. * * <p> * Extension of {@link SimpleConnectionSkin} that provides a mechanism for creating and removing joints. * </p> */ public class DefaultConnectionSkin ...
private final JointCleaner jointCleaner;
5
SilenceDut/NBAPlus
app/src/main/java/com/me/silencedut/nbaplus/ui/fragment/DrawerFragment.java
[ "public class AppService {\n private static final AppService NBAPLUS_SERVICE=new AppService();\n private static Gson sGson;\n private static EventBus sBus ;\n private static DBHelper sDBHelper;\n private static NbaplusAPI sNbaplusApi;\n private static NewsDetileAPI sNewsDetileApi;\n private sta...
import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.os.Build; import android.os.Bundle; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; ...
package com.me.silencedut.nbaplus.ui.fragment; /** * Created by SilenceDut on 2015/11/28. */ public class DrawerFragment extends BaseFragment { private static final int DOWNSCALE=8; private static final int BLUR_RADIUS=15; private ActionBarDrawerToggle mDrawerToggle; private DrawerLayout mDrawerL...
DrawerAdapter drawerAdapter = new DrawerAdapter(getActivity());
3
stalk-io/stalk-server
src/main/java/io/stalk/common/oauth/provider/GoogleImpl.java
[ "public class OAuthConfig {\r\n\r\n private final String _consumerKey;\r\n private final String _consumerSecret;\r\n private final String _callbackUrl;\r\n private final String _signatureMethod;\r\n private final String _transportName;\r\n private String id;\r\n private Class<?> providerImplCla...
import io.stalk.common.oauth.OAuthConfig; import io.stalk.common.oauth.Profile; import io.stalk.common.oauth.exception.UserDeniedPermissionException; import io.stalk.common.oauth.strategy.Hybrid; import io.stalk.common.oauth.strategy.OAuthStrategyBase; import io.stalk.common.oauth.strategy.RequestToken; import io...
package io.stalk.common.oauth.provider; public class GoogleImpl extends AbstractProvider implements AuthProvider { private static final String OAUTH_SCOPE = "http://www.google.com/m8/feeds/"; private static final Map<String, String> ENDPOINTS; private OAuthConfig config; private OAuthStra...
ENDPOINTS.put(Constants.OAUTH_REQUEST_TOKEN_URL,
7
Ecwid/consul-api
src/main/java/com/ecwid/consul/v1/event/EventConsulClient.java
[ "public class GsonFactory {\n\n\tprivate static final Gson GSON = new Gson();\n\n\tpublic static Gson getGson() {\n\t\treturn GSON;\n\t}\n\n}", "public final class HttpResponse {\n\n\tprivate final int statusCode;\n\tprivate final String statusMessage;\n\n\tprivate final String content;\n\n\tprivate final Long co...
import com.ecwid.consul.json.GsonFactory; import com.ecwid.consul.transport.HttpResponse; import com.ecwid.consul.transport.TLSConfig; import com.ecwid.consul.v1.ConsulRawClient; import com.ecwid.consul.v1.OperationException; import com.ecwid.consul.v1.QueryParams; import com.ecwid.consul.v1.Response; import com.ecwid....
package com.ecwid.consul.v1.event; /** * @author Vasily Vasilkov (vgv@ecwid.com) */ public final class EventConsulClient implements EventClient { private final ConsulRawClient rawClient; public EventConsulClient(ConsulRawClient rawClient) { this.rawClient = rawClient; } public EventConsulClient() { this...
HttpResponse httpResponse = rawClient.makePutRequest("/v1/event/fire/" + event, payload, eventParams, queryParams);
1
Labs64/NetLicensingClient-java
NetLicensingClient/src/main/java/com/labs64/netlicensing/schema/converter/ItemToCountryConverter.java
[ "public final class Constants {\n\n private Constants() {\n }\n\n // CHECKSTYLE:OFF\n\n public static final String ID = \"id\";\n public static final String ACTIVE = \"active\";\n public static final String NUMBER = \"number\";\n public static final String NAME = \"name\";\n public static fi...
import javax.xml.bind.DatatypeConverter; import com.labs64.netlicensing.domain.Constants; import com.labs64.netlicensing.domain.entity.Country; import com.labs64.netlicensing.domain.entity.impl.CountryImpl; import com.labs64.netlicensing.exception.ConversionException; import com.labs64.netlicensing.schema.SchemaFunctio...
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distribute...
public Country convert(final Item source) throws ConversionException {
3
R2RML-api/R2RML-api
r2rml-api-rdf4j-binding/src/test/java/rdf4jTest/NTriplesSyntax_Test.java
[ "public class RDF4JR2RMLMappingManager extends R2RMLMappingManagerImpl {\n\n private static RDF4JR2RMLMappingManager INSTANCE = new RDF4JR2RMLMappingManager(new RDF4J());\n\n private RDF4JR2RMLMappingManager(RDF4J rdf) {\n super(rdf);\n }\n\n public Collection<TriplesMap> importMappings(Model mod...
import java.io.InputStream; import java.util.Collection; import java.util.Iterator; import eu.optique.r2rml.api.binding.rdf4j.RDF4JR2RMLMappingManager; import eu.optique.r2rml.api.model.impl.SQLBaseTableOrViewImpl; import org.apache.commons.rdf.api.IRI; import org.junit.Assert; import org.junit.Test; import org...
/******************************************************************************* * Copyright 2013, the Optique Consortium * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http...
Collection<TriplesMap> coll = mm.importMappings(m);
8
kunka/CoolAndroidBinding
src/com/kk/binding/register/ConverterRegister.java
[ "public class FalseToVisibleConverter implements IValueConverter {\r\n\r\n /*\r\n * (non-Javadoc)\r\n *\r\n * @see binding.kernel.IConverter#converter(java.lang.Object)\r\n */\r\n @Override\r\n public Object converter(Object source) {\r\n return (!Boolean.parseBoolean(String.valueOf(...
import com.kk.binding.converter.FalseToVisibleConverter; import com.kk.binding.converter.NotNullToVisibleConverter; import com.kk.binding.converter.NullToVisibleConverter; import com.kk.binding.converter.TrueToVisibleConverter; import com.kk.binding.converter.IValueConverter; import com.kk.binding.util.StringUtil; impo...
/* * Copyright (C) 2014 kk-team.com. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
register("FalseToVisibleConverter", FalseToVisibleConverter.class);
0
igniterealtime/jbosh
src/test/java/org/igniterealtime/jbosh/AbstractBOSHTest.java
[ "public abstract class AbstractBody {\n\n ///////////////////////////////////////////////////////////////////////////\n // Constructor:\n\n /**\n * Restrict subclasses to the local package.\n */\n AbstractBody() {\n // Empty\n }\n\n //////////////////////////////////////////////////...
import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; import static org.junit.Assert.*; import java.lang.reflect.Method; import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.Level; import java.util.logging.Logger; import org.igniterealtime.jbosh.AbstractBody; import org.ig...
/* * Copyright 2009 Mike Cumings * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
result.addBOSHClientResponseListener(new BOSHClientResponseListener() {
5
teivah/TIBreview
src/test/java/com/tibco/exchange/tibreview/processor/resourcerule/CProcessorKeyStoreTest.java
[ "public class TIBResource {\n\tprivate String filePath;\n\tprivate String type;\n\t\n\tprivate static final String REQUEST_GET_TYPE = \"/jndi:namedResource/@type\";\n\t\n\tpublic TIBResource(String filePath) throws Exception {\n\t\tthis.filePath = filePath;\n\t\tthis.type = Util.xpathEval(filePath, Constants.RESOUR...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import org.apache.log4j.Logger; import org.junit.Test; import com.tibco.exchange.tibreview.common.TIBResource; import com.tibco.exchange.tibreview.engine.Context; import com.tibco.exchange.tibreview.mod...
package com.tibco.exchange.tibreview.processor.resourcerule; public class CProcessorKeyStoreTest { private static final Logger LOGGER = Logger.getLogger(CProcessorKeyStoreTest.class); @Test public void testCProcessorKeyStoreTest() {
TIBResource fileresource;
0
sdnwiselab/sdn-wise-java
data/src/main/java/com/github/sdnwiselab/sdnwise/mote/standalone/AbstractMote.java
[ "public abstract class AbstractCore {\n /**\n * Lenght of the function subheader.\n */\n private static final int FUNCTION_HEADER = 3;\n /**\n * Max RSSI value.\n */\n public static final int MAX_RSSI = 255;\n /**\n * Queue size.\n */\n protected static final int QUEUE_SIZE...
import com.github.sdnwiselab.sdnwise.mote.core.AbstractCore; import static com.github.sdnwiselab.sdnwise.mote.core.AbstractCore.MAX_RSSI; import com.github.sdnwiselab.sdnwise.mote.core.Pair; import com.github.sdnwiselab.sdnwise.mote.logger.MoteFormatter; import com.github.sdnwiselab.sdnwise.packet.NetworkPacket; i...
/* * Copyright (C) 2015 SDN-WISE * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is d...
+ ".log", new SimplerFormatter(core.getMyAddress().toString()));
6
xcltapestry/XCL-Charts
lib/src/main/java/org/xclcharts/chart/SplineChart.java
[ "public class DrawHelper {\n\t\n\tprivate static DrawHelper instance = null;\n\t\n\tprivate RectF mRectF = null;\n\tprivate Path mPath = null;\n\tprivate Paint mPaint = null;\n\n\tpublic DrawHelper(){}\n\n\tpublic static synchronized DrawHelper getInstance()\n\t{\n\t\tif(instance == null){\n\t\t\tinstance = new Dra...
import org.xclcharts.renderer.line.PlotDot; import org.xclcharts.renderer.line.PlotDotRender; import org.xclcharts.renderer.line.PlotLine; import android.graphics.Canvas; import android.graphics.Paint.Align; import android.graphics.Path; import android.graphics.PointF; import android.util.Log; import java.util.ArrayLis...
* @param customLineDataset * 定制线数据集合 */ public void setCategoryAxisCustomLines(List<CustomLineData> customLineDataset) { if (null == mXAxisCustomLine) mXAxisCustomLine = new PlotCustomLine(); mXAxisCustomLine.setCustomLines(customLineDataset); } /** * 设置标签的显示格式 * @param callBack 回调函数 *...
DrawHelper.getInstance().drawLine(spData.getLineStyle(),
0
markusfisch/ShaderEditor
app/src/main/java/de/markusfisch/android/shadereditor/fragment/EditorFragment.java
[ "public class ShaderEditorApp extends Application {\n\tpublic static final Preferences preferences = new Preferences();\n\tpublic static final Database db = new Database();\n\tpublic static final UndoRedo.EditHistory editHistory =\n\t\t\tnew UndoRedo.EditHistory();\n\n\tprivate static final BatteryLevelReceiver bat...
import android.app.Activity; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androi...
package de.markusfisch.android.shadereditor.fragment; public class EditorFragment extends Fragment { public static final String TAG = "EditorFragment"; private ScrollView scrollView;
private ShaderEditor shaderEditor;
5
kasirgalabs/ETUmulator
src/test/java/com/kasirgalabs/etumulator/visitor/LogicalVisitorTest.java
[ "public class Assembler {\n private final Linker linker;\n private final Loader loader;\n\n /**\n * Constructs an Assembler object with the given {@link Memory}. Generated address space layout\n * and the data will be loaded in the memory.\n *\n * @param memory Memory for the allocated data...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import com.kasirgalabs.etumulator.lang.Assembler; import com.kasirgalabs.etumulator.processor.APSR; import com.kasirgalabs.etumulator.processor.BaseProcessor; import com.kasirgalabs.etumul...
package com.kasirgalabs.etumulator.visitor; public class LogicalVisitorTest { private final Assembler assembler; private final RegisterFile registerFile; private final APSR apsr; private final Processor processor; public LogicalVisitorTest() {
ProcessorUnits processorUnits = new BaseProcessorUnits();
5
fahrgemeinschaft/android-app
src/main/java/de/fahrgemeinschaft/util/Util.java
[ "public class BaseActivity extends SherlockFragmentActivity\n implements ListFragmentCallback,\n OnPageChangeListener, ServiceCallback<String>,\n ServiceConnection, OnBackStackChangedListener {\n\n public static final String TAG = \"Fahrgemeinschaft\";\n public static final int MYRIDES = 1;\...
import java.util.ArrayList; import java.util.Calendar; import java.util.List; import org.json.JSONException; import org.json.JSONObject; import org.teleportr.ConnectorService; import org.teleportr.Place; import org.teleportr.Ride; import org.teleportr.RidesProvider; import org.teleportr.Ride.COLUMNS; import android.con...
package de.fahrgemeinschaft.util; public class Util { private static final String MAILTO = "mailto:"; private static final String SMS = "sms:"; private static final String TEL = "tel:"; public static final String TRIP_DETAIL_URL = "https://www.fahrgemeinschaft.de/tripdetails.php?trip="; publ...
((BaseActivity) ctx).finish();
0
VisuFlow/visuflow-plugin
src/de/unipaderborn/visuflow/ui/view/UnitView.java
[ "public class NavigationHandler extends AbstractHandler {\n\n\t/* (non-Javadoc)\n\t * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)\n\t */\n\t@Override\n\tpublic Object execute(ExecutionEvent event) throws ExecutionException {\n\n\t\t//Get the editor part object\n\t\tIEdi...
import java.awt.Color; import java.util.ArrayList; import java.util.Dictionary; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import javax.swing.JDialog; import javax.swing.JPanel; import org.eclipse.jface.v...
package de.unipaderborn.visuflow.ui.view; public class UnitView extends ViewPart implements EventHandler { static DataModel dataModel; static Tree tree; static Combo classCombo, methodCombo; Button checkBox; static JDialog dialog; static JPanel panelColor; String classSelection, methodSelecti...
ServiceUtil.registerService(EventHandler.class, this, properties);
7
yuqirong/Koku
app/src/main/java/com/yuqirong/koku/fragment/DrawerLayoutFragment.java
[ "public class UserDetailsActivity extends SwipeBackActivity {\n\n private Toolbar mToolbar;\n private ViewPager mViewPager;\n private ImageView iv_cover;\n private CircleImageView civ_avatar;\n private TextView tv_screen_name;\n private TextView tv_location;\n private TextView tv_follower_num;\...
import android.graphics.Bitmap; import android.os.Bundle; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.android.volley.Response; import com.android.volley.VolleyError...
package com.yuqirong.koku.fragment; /** * 侧拉抽屉 * Created by Anyway on 2015/8/30. */ public class DrawerLayoutFragment extends BaseFragment { private CircleImageView civ_avatar; //用户头像 private TextView tv_screen_name; //用户昵称 private ImageView iv_cover; //用户封面图 private User user; //用户 private I...
user = JsonUtils.getBeanFromJson(stringResult, User.class);
3
Wackymax/CPOrm
CPOrm/src/main/java/za/co/cporm/model/TransactionHelper.java
[ "public class TableDetails {\n\n public static ColumnNameConverter COLUMN_NAME_CONVERTER = new DefaultColumnNameConverter();\n\n private final String tableName;\n private final String authority;\n private final Class tableClass;\n private final boolean serializable;\n private final Constructor tab...
import android.content.ContentProviderOperation; import android.content.ContentProviderResult; import android.content.ContentUris; import android.content.ContentValues; import android.content.Context; import android.content.OperationApplicationException; import android.net.Uri; import android.os.RemoteException; import...
package za.co.cporm.model; /** * Created by hennie.brink on 2016/06/12. */ public class TransactionHelper { public static void saveInTransaction(Context context, List<? extends CPDefaultRecord> records) throws RemoteException, OperationApplicationException { List<ContentProviderOperation> operations...
TableDetails tableDetails = CPOrm.findTableDetails(context, cpDefaultRecord.getClass());
0
underhilllabs/dccsched
src/com/underhilllabs/dccsched/ui/SessionsActivity.java
[ "public static Spannable buildStyledSnippet(String snippet) {\n final SpannableStringBuilder builder = new SpannableStringBuilder(snippet);\n\n // Walk through string, inserting bold snippet spans\n int startIndex = -1, endIndex = -1, delta = 0;\n while ((startIndex = snippet.indexOf('{', endIndex)) != ...
import static com.underhilllabs.dccsched.util.UIUtils.buildStyledSnippet; import static com.underhilllabs.dccsched.util.UIUtils.formatSessionSubtitle; import com.underhilllabs.dccsched.R; import com.underhilllabs.dccsched.provider.ScheduleContract.Blocks; import com.underhilllabs.dccsched.provider.ScheduleContract.Room...
/* * Copyright 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
if (!Sessions.isSearchUri(sessionsUri)) {
4
RojerAlone/shop
src/main/java/cn/cie/controller/CommonController.java
[ "public class User {\n\n /**\n * 未验证,需要邮箱验证\n */\n public static final Byte STAT_NOT_VALIDATE = 0;\n /**\n * 正常\n */\n public static final Byte STAT_OK = 1;\n /**\n * 受限\n */\n public static final Byte STAT_RESTRICT = 2;\n /**\n * 已删除\n */\n public static fina...
import cn.cie.entity.User; import cn.cie.services.GameService; import cn.cie.services.UserService; import cn.cie.utils.MsgCenter; import cn.cie.utils.Result; import cn.cie.utils.UserHolder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.spring...
package cn.cie.controller; /** * Created by RojerAlone on 2017/6/9. */ @CrossOrigin @Controller public class CommonController extends AbstractController { @Autowired private UserHolder userHolder; @Autowired
private UserService userService;
2
rec-framework/rec-core
src/main/java/net/kimleo/rec/v2/model/impl/CSVFileSource.java
[ "public class Accessor<T> {\n\n private final Map<String, Integer> fieldMap;\n private final Integer leastCapacity;\n\n public Accessor(String[] fields) {\n Pair<Map<String, Integer>, Integer> fieldMapPair = Lexer.buildFieldMapPair(fields);\n fieldMap = fieldMapPair.getFirst();\n least...
import net.kimleo.rec.v2.accessor.Accessor; import net.kimleo.rec.common.concept.Mapped; import net.kimleo.rec.sepval.parser.ParseConfig; import net.kimleo.rec.sepval.parser.SimpleParser; import net.kimleo.rec.common.exception.ResourceAccessException; import net.kimleo.rec.v2.model.Source; import java.io.File; import j...
package net.kimleo.rec.v2.model.impl; public class CSVFileSource implements Source<Mapped<String>> { private final Stream<String> lines;
private final Accessor<String> accessor;
0
dkzwm/SmoothRefreshLayout
app/src/main/java/me/dkzwm/widget/srl/sample/ui/TestBaseRecyclerViewAdapterActivity.java
[ "public abstract class RefreshingListenerAdapter implements SmoothRefreshLayout.OnRefreshListener {\n @Override\n public void onRefreshing() {}\n\n @Override\n public void onLoadingMore() {}\n}", "public class SmoothRefreshLayout extends ViewGroup\n implements NestedScrollingParent3, NestedScro...
import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.view.MenuItem; import android.view.View; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.R...
package me.dkzwm.widget.srl.sample.ui; /** * Created by dkzwm on 2017/8/8. * * @author dkzwm */ public class TestBaseRecyclerViewAdapterActivity extends AppCompatActivity { private SmoothRefreshLayout mRefreshLayout; private RecyclerView mRecyclerView; private BaseQuickAdapter<String, BaseViewHolder> ...
List<String> list = DataUtil.createList(mCount, 20);
4
jinkg/UAFClient
fidoclient/src/main/java/com/yalin/fidoclient/ui/UAFClientActivity.java
[ "public interface UAFClientError {\n short NO_ERROR = 0x0;\n short WAIT_USER_ACTION = 0x1;\n short INSECURE_TRANSPORT = 0x2;\n short USER_CANCELLED = 0x3;\n short UNSUPPORTED_VERSION = 0x4;\n short NO_SUITABLE_AUTHENTICATOR = 0x5;\n short PROTOCOL_ERROR = 0x6;\n short UNTRUSTED_FACET_ID = 0x...
import com.yalin.fidoclient.msg.AsmInfo; import com.yalin.fidoclient.ui.fragment.AsmListFragment; import com.yalin.fidoclient.ui.fragment.AuthenticatorListFragment; import com.yalin.fidoclient.utils.StatLog; import java.util.List; import android.app.Activity; import android.content.Context; import android.content.Inten...
/* * Copyright 2016 YaLin Jin * * 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 ...
StatLog.printLog(TAG, "onCreate intentType:" + intentType + " message:" + message + " channelBinding:" + channelBinding);
6
twothe/DaVincing
src/main/java/two/davincing/item/CanvasItem.java
[ "@Mod(modid = DaVincing.MOD_ID, name = DaVincing.MOD_NAME, version = DaVincing.MOD_VERSION)\npublic class DaVincing {\n\n /* Global logger that uses string format type logging */\n public static final Logger log = LogManager.getLogger(DaVincing.class.getSimpleName(), new StringFormatterMessageFactory());\n /* Ta...
import java.awt.image.BufferedImage; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import two.davincing.DaVincin...
package two.davincing.item; public class CanvasItem extends ItemBase { public CanvasItem() { super(); this.setFull3D(); this.setUnlocalizedName("canvas"); this.setTextureName("minepainter:canvas"); } @Override public boolean getShareTag() { return true; } @Override public boolean ...
DaVincing.log.warn("[CanvasItem.onItemUse] failed: expected PaintingEntity at %d, %d, %d, but got %s", x, y, z, Utils.getClassName(tileEntity));
4
cdancy/artifactory-rest
src/main/java/com/cdancy/artifactory/rest/features/StorageApi.java
[ "@Singleton\npublic class BindListPropertiesToPath implements Binder {\n @SuppressWarnings(\"unchecked\")\n @Override\n public <R extends HttpRequest> R bindToRequest(final R request, final Object properties) {\n\n checkArgument(properties instanceof List, \"binder is only valid for List\");\n List<...
import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import com.cdancy.artifactory.rest.binders.BindListPropertiesToPath;...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may ...
Artifact fileInfo(@PathParam("repoKey") String repoKey,
2
afpdev/alpheusafpparser
src/main/java/com/mgz/afp/modca/IOB_IncludeObject.java
[ "public abstract class StructuredFieldBaseName extends StructuredField implements IHasName {\n @AFPField(maxSize = 8)\n protected String name;\n\n @Override\n public void decodeAFP(byte[] sfData, int offset, int length, AFPParserConfiguration config) throws AFPParserException {\n int actualLength = getActual...
import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import com.mgz.afp.base.StructuredFieldBaseName; import com.mgz.afp.enums.AFPObjectType; import com.mgz.afp.enums.AFPOrientation; import com.mgz.afp.exceptions.AFPParserException; import com.mgz.afp.parser.AFPPar...
/* Copyright 2015 Rudolf Fiala This file is part of Alpheus AFP Parser. Alpheus AFP Parser is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
public void decodeAFP(byte[] sfData, int offset, int length, AFPParserConfiguration config) throws AFPParserException {
1
msoute/vertx-deploy-tools
vertx-deploy-agent/src/main/java/nl/jpoint/vertx/deploy/agent/service/AwsService.java
[ "public class DeployConfig {\n\n private static final Logger LOG = LoggerFactory.getLogger(AwsDeployApplication.class);\n\n private static final String MAVEN_CENTRAL = \"https://repo1.maven.org/maven/\";\n private static final String DEFAULT_SERVICE_CONFIG_LOCATION = \"/etc/default/\";\n\n private stati...
import io.vertx.core.Vertx; import nl.jpoint.vertx.deploy.agent.DeployConfig; import nl.jpoint.vertx.deploy.agent.aws.state.AwsAsDeRegisterInstance; import nl.jpoint.vertx.deploy.agent.aws.state.AwsAsRegisterInstance; import nl.jpoint.vertx.deploy.agent.aws.state.AwsElbDeRegisterInstance; import nl.jpoint.vertx.deploy....
package nl.jpoint.vertx.deploy.agent.service; public class AwsService { private static final Logger LOG = LoggerFactory.getLogger(AwsService.class); private final Vertx vertx; private final DeployConfig config; private final Map<String, DeployRequest> runningRequests = new HashMap<>(); public Aw...
AwsAsRegisterInstance register = new AwsAsRegisterInstance(vertx, config, config.getAwsMaxRegistrationDuration());
2
spring-cloud/spring-cloud-connectors
spring-cloud-core/src/test/java/org/springframework/cloud/CloudTest.java
[ "static public class StubApplicationInstanceInfo implements ApplicationInstanceInfo {\n\tprivate String instanceId;\n\tprivate String appId;\n\tprivate Map<String, Object> properties;\n\n\tpublic StubApplicationInstanceInfo(String instanceId, String appId, Map<String, Object> properties) {\n\t\tthis.instanceId = in...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Properties; import org.junit.Before; import org.junit.Test; import org...
package org.springframework.cloud; /** * * @author Ramnivas Laddad * */ public class CloudTest { private List<ServiceConnectorCreator<?, ? extends ServiceInfo>> serviceConnectorCreators; @Before public void setup() { serviceConnectorCreators = new ArrayList<>(); } @Test public void appProps() { ...
StubCloudConnector stubCloudConnector =
1
TU-Berlin-SNET/JCPABE
src/main/java/cpabe/CpabeExperimental.java
[ "public class Bsw07 {\n\n private static final String ATTRIBUTE_NOT_FOUND = \"an attribute was not found in the source private key\";\n private static final String ATTRIBUTES_DONT_SATISFY = \"decryption failed: attributes in key do not satisfy policy\";\n\n /**\n * Generate a secret master key. The pub...
import cpabe.bsw07.Bsw07; import cpabe.bsw07.Bsw07Cipher; import cpabe.bsw07.Bsw07CipherAndKey; import cpabe.bsw07.Bsw07PrivateKeyComponent; import cpabe.bsw07.policy.Bsw07PolicyAbstractNode; import cpabe.policy.AttributeParser; import cpabe.policyparser.ParseException; import it.unisa.dia.gas.jpbc.Element; import java...
package cpabe; public class CpabeExperimental { /** * This is an experimental feature. It is recommended to not use it. * * @throws ParseException */ public static ArrayList<Bsw07PrivateKeyComponent> generateAdditionalAttributes(AbeSecretMasterKey msk, Element prv_d, String attributes) t...
Bsw07Cipher abeEncryptedSecret = cipherAndKey.getCipher();
1
berict/Tapad
app/src/main/java/com/bedrock/padder/activity/ColorActivity.java
[ "public class ColorAdapter extends RecyclerView.Adapter<ColorAdapter.DetailViewHolder> {\n private ItemColor itemColor;\n private int rowLayout;\n private Preferences preferences;\n private Activity activity;\n\n static class DetailViewHolder extends RecyclerView.ViewHolder {\n RelativeLayout ...
import android.app.Activity; import android.content.res.Resources; import android.os.Bundle; import android.support.annotation.ColorInt; import android.support.annotation.NonNull; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.Recy...
package com.bedrock.padder.activity; public class ColorActivity extends AppCompatActivity implements ColorChooserDialog.ColorCallback { private WindowHelper w = new WindowHelper(); private FabHelper fab = new FabHelper(); private ToolbarHelper toolbar = new ToolbarHelper(); private Activity activ...
getBlendColor(
6
turoDog/KTalk
app/src/main/java/com/turo/ktalk/controller/fragment/ContactListFragment.java
[ "public class ChatActivity extends FragmentActivity {\n\n private String mHxid;\n private EaseChatFragment easeChatFragment;\n private LocalBroadcastManager mLocalBroadcastManager;\n private int mChatType;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate...
import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.support.v4.content.LocalBroadcastManager; import android.view.ContextMenu; import android.view.MenuItem; import android.view.View; import android.widget.AdapterVie...
package com.turo.ktalk.controller.fragment; /** * Created by YQ950209 on 2017/4/24. */ //联系人列表界面 public class ContactListFragment extends EaseContactListFragment { private ImageView iv_contact_red; private LocalBroadcastManager mLocalBroadcastManager; private LinearLayout ll_contact_invite; priva...
Model.getInstance().getGlobalThreadPool().execute(new Runnable() {
4
wavever/GankLock
app/src/main/java/me/wavever/ganklock/ui/activity/LockActivity.java
[ "public class LockPresenter extends BasePresenter<ILockView> {\n}", "public class SwipeUnLockLayout extends FrameLayout {\n\n private static final int MIN_FLING_VELOCITY = 200;\n\n //TODO 只能够移动他的直接子View\n private View mTimeLayout;\n private View mArrow;\n\n private int mLastInterceptX;\n\n priva...
import android.graphics.Bitmap; import android.os.Build.VERSION; import android.os.Build.VERSION_CODES; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.view.WindowManager.LayoutParams; import android.widget.ImageView; import android.widget.TextView; import android...
package me.wavever.ganklock.ui.activity; /** * Created by wavever on 2016/10/14. */ public class LockActivity extends BaseMvpActivity<ILockView,LockPresenter> implements ILockView,SwipeUnLockLayout.OnSwipeListener { private static final String TAG = "LockActivity-->"; private ViewSwitcher mViewSwitcher;...
final String lockDateText = DateUtil.getLockDateText();
2
liuling07/QiQuYing
app/src/main/java/com/lling/qiqu/activitys/FeedbackActivity.java
[ "public class Constants {\n\t\n\tpublic static final boolean DEBUG = false;\n\n\t//SplashActivity\n\tpublic static final String FIRST_USE = \"firstUse\";\n\tpublic static final String IS_RECEIVE_PUSH = \"isReceivePush\";\n\tpublic static final String IS_LOAD_IMG = \"isLoadImg\";\n\t\n\t//http请求超时时间\n\tpublic static...
import java.lang.ref.WeakReference; import android.content.DialogInterface; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.view.View; import android.widget.EditText; import com.lidroid.xutils.ViewUtils; import com.lidroid.xutils.view.annotation.ContentView; import com.lid...
package com.lling.qiqu.activitys; /** * @ClassName: FeedbackActivity * @Description: 意见反馈activity * @author lling * @date 2015年7月10日 */ @ContentView(R.layout.activity_feedback) public class FeedbackActivity extends BaseActivity { @ViewInject(R.id.feedback_content) private EditText mContentET; @ViewInject(...
ProgressDialogUtils.showProgressDialog(this, "提交反馈中...");
4
vestrel00/android-dagger-butterknife-mvp
app/src/main/java/com/vestrel00/daggerbutterknifemvp/ui/main/MainActivityModule.java
[ "@Module\npublic abstract class BaseActivityModule {\n\n static final String ACTIVITY_FRAGMENT_MANAGER = \"BaseActivityModule.activityFragmentManager\";\n\n @Binds\n @PerActivity\n /*\n * PerActivity annotation isn't necessary since Activity instance is unique but is here for\n * convention. In ...
import dagger.Module; import dagger.android.ContributesAndroidInjector; import android.app.Activity; import com.vestrel00.daggerbutterknifemvp.inject.PerActivity; import com.vestrel00.daggerbutterknifemvp.inject.PerFragment; import com.vestrel00.daggerbutterknifemvp.ui.common.BaseActivityModule; import com.vestrel00.da...
/* * Copyright 2018 Vandolf Estrellado * * 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 ...
@ContributesAndroidInjector(modules = MainFragmentModule.class)
7
OpenNTF/DomSQL
domsql/eclipse/plugins/com.ibm.domino.domsql.sqlite/src/com/ibm/domino/domsql/remote/server/ServerDomSQLDriver.java
[ "public class DomSQLDriver implements Driver {\r\n\t\r\n\tpublic interface LocalDriver {\r\n\t public Connection connectLocal(String url, Properties info) throws SQLException;\r\n\t}\r\n\tprotected static LocalDriver localDriver;\r\n\tpublic static void initLocalDriver(LocalDriver driver) {\r\n\t\tlocalDriver = ...
import java.rmi.RemoteException; import java.sql.SQLException; import java.util.Properties; import com.ibm.commons.util.StringUtil; import com.ibm.domino.domsql.DomSQLDriver; import com.ibm.domino.domsql.remote.transport.IConnection; import com.ibm.domino.domsql.remote.transport.IDomSQLDriver; import com.ibm.dom...
/* * © Copyright IBM Corp. 2010 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law o...
throw DomSQLException.create(null, "User '{0}' cannot open the database {1}", userid, dbPath );
4
carrotsearch/smartsprites
src/test/java/org/carrot2/labs/smartsprites/SpriteReferenceDirectiveTest.java
[ "public static MessageAssertion assertThat(Message actual)\n{\n return new MessageAssertion(actual);\n}", "public enum Ie6Mode\n{\n /** No IE6-friendly image will be created for this sprite, even if needed */\n NONE,\n\n /** IE6-friendly image will be generated for this sprite if needed */\n AUTO;\...
import static org.carrot2.labs.test.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.awt.Color; import java.util.Map; import org.carrot2.labs.smartsprites.SpriteImageDirective.Ie6Mode; import org.carr...
package org.carrot2.labs.smartsprites; /** * Test cases for {@link SpriteReferenceDirective} */ public class SpriteReferenceDirectiveTest extends TestWithMemoryMessageSink { private static final SpriteImageDirective VERTICAL_SPRITE_IMAGE_DIRECTIVE = new SpriteImageDirective(
"vsprite", "sprite.png", SpriteImageLayout.VERTICAL, SpriteImageFormat.PNG,
2
OlgaKuklina/GitJourney
app/src/main/java/com/oklab/gitjourney/fragments/LocationsReadyCallback.java
[ "public class FollowersLoader extends AsyncTaskLoader<List<GitHubUsersDataEntry>> {\n private static final String TAG = FollowersLoader.class.getSimpleName();\n private final int page;\n\n public FollowersLoader(Context context, int page) {\n super(context);\n this.page = page;\n }\n\n ...
import android.content.Intent; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.Handler; import android.os.ResultReceiver; import android.support.v4.app.LoaderManager; import android.support.v4.content.Loader; import android.support.v7.app.AppCompatA...
package com.oklab.gitjourney.fragments; /** * Created by olgakuklina on 2017-03-25. */ public class LocationsReadyCallback implements OnMapReadyCallback, UserProfileAsyncTask.OnProfilesLoadedListener<GitHubUserLocationDataEntry> { private static final String TAG = LocationsReadyCallback.class.getSimpleName()...
intent.putParcelableArrayListExtra(LocationConstants.LOCATION_DATA_EXTRA, locationsDataList);
3
vangj/jbayes
src/test/java/com/github/vangj/jbayes/inf/exact/graph/pptc/traversal/DistributeEvidenceTest.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 static org.junit.Assert.assertTrue; 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.pptc.Clique; import com.github.vangj.jbayes.inf.exact.graph.pptc.HuangExample; imp...
package com.github.vangj.jbayes.inf.exact.graph.pptc.traversal; public class DistributeEvidenceTest extends HuangExample { @Test public void testTraversal() { Dag dag = getDag(); Ug m = Moralize.moralize(dag); List<Clique> cliques = Triangulate.triangulate(m); JoinTree joinTree = Transform.trans...
Initialization.initialization(joinTree);
5
trezor/trezor-android
trezor-app/src/main/java/com/satoshilabs/trezor/app/activity/CreateBackupRecoverySeedV2Activity.java
[ "public static class NotImplementedException extends RuntimeException {\n public NotImplementedException() {}\n\n}", "public interface ITask {\n public static String PROCESS_BUNDLE_FILE_SIZE = \"PROCESS_BUNDLE_FILE_SIZE\"; // Pouzito pri stahovani...\n\n String getId();\n ITaskParam getParam();\n ...
import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.WindowManager; import com.circlegate.liban.base.Exceptions.NotImplementedException; import com.circlegate.liban.task.TaskInterfaces.ITask; import com.satoshilabs.trezor.app.R; import com.satoshilabs.trezor.app.a...
package com.satoshilabs.trezor.app.activity; public class CreateBackupRecoverySeedV2Activity extends BaseSetupActivity { private static final String TASK_BACKUP_DEVICE = "TASK_BACKUP_DEVICE"; public static Intent createIntent(Context context) { return setupIntent(new Intent(context, CreateBackupReco...
onTrezorError(TrezorError.ERR_UNEXPECTED_RESPONSE);
3
Lzw2016/fastdfs-java-client
src/main/java/org/cleverframe/fastdfs/protocol/storage/request/SetMetadataRequest.java
[ "public final class CmdConstants {\n /**\n * 客户端关闭连接命令\n */\n public static final byte FDFS_PROTO_CMD_QUIT = 82;\n /**\n * 连接状态检查命令\n */\n public static final byte FDFS_PROTO_CMD_ACTIVE_TEST = 111;\n /**\n * 服务端正确返回报文状态\n */\n public static final byte FDFS_PROTO_CMD_RESP = ...
import org.cleverframe.fastdfs.constant.CmdConstants; import org.cleverframe.fastdfs.constant.OtherConstants; import org.cleverframe.fastdfs.model.MateData; import org.cleverframe.fastdfs.protocol.BaseRequest; import org.cleverframe.fastdfs.protocol.ProtocolHead; import org.cleverframe.fastdfs.mapper.DynamicFieldType; ...
package org.cleverframe.fastdfs.protocol.storage.request; /** * 作者:LiZW <br/> * 创建时间:2016/11/20 18:46 <br/> */ public class SetMetadataRequest extends BaseRequest { /** * 文件名byte长度 */ @FastDFSColumn(index = 0) private int fileNameByteLength; /** * 元数据byte长度 */ @FastDFSColu...
@FastDFSColumn(index = 3, max = OtherConstants.FDFS_GROUP_NAME_MAX_LEN)
1
dannormington/appengine-cqrs
src/main/java/com/cqrs/appengine/sample/AttendeeApi.java
[ "public class AggregateNotFoundException extends AggregateException {\n\n\tprivate static final String ERROR_TEXT = \"The aggregate you requested cannot be found.\";\n\t\n\tprivate static final long serialVersionUID = 1L;\n\n\t/**\n\t * Constructor\n\t * \n\t * @param aggregateId\n\t */\n\tpublic AggregateNotFoundE...
import com.cqrs.appengine.core.exceptions.AggregateNotFoundException; import com.cqrs.appengine.core.exceptions.EventCollisionException; import com.cqrs.appengine.core.exceptions.HydrationException; import com.cqrs.appengine.core.messaging.Command; import com.cqrs.appengine.core.messaging.SimpleMessageBus; import com.c...
package com.cqrs.appengine.sample; @Api( name="thatconference", version = "v1", description = "That Conference Sample API", clientIds = {com.google.api.server.spi.Constant.API_EXPLORER_CLIENT_ID} ) public class AttendeeApi { @ApiMethod( httpMethod = "POST", ...
public void register(RegisterAttendee command) throws ConflictException, NotFoundException, BadRequestException {
8
8enet/AppOpsX
opsxpro/src/main/java/com/zzzmode/appopsx/ApiSupporter.java
[ "public class UserInfo {\n public int id;\n public int serialNumber;\n public String name;\n public String iconPath;\n public int flags;\n\n\n public boolean isPrimary() {\n return false;\n }\n\n public boolean isAdmin() {\n return false;\n }\n\n public boolean isManagedProfile() {\n return false...
import android.content.Context; import android.content.pm.PackageInfo; import android.content.pm.UserInfo; import android.os.Bundle; import android.util.Log; import com.zzzmode.appopsx.common.CallerResult; import com.zzzmode.appopsx.common.ClassCaller; import com.zzzmode.appopsx.common.SystemServiceCaller; import com.z...
package com.zzzmode.appopsx; public class ApiSupporter { private static final String TAG = "ApiSupporter"; private LocalServerManager localServerManager; ApiSupporter(LocalServerManager localServerManager) { this.localServerManager = localServerManager; } private void checkConnection() throws Except...
ClassCaller classCaller = new ClassCaller(context.getPackageName(), RestartHandler.class.getName(),new Bundle());
4
liuling07/QiQuYingServer
src/com/lling/qiqu/controllers/GifController.java
[ "@Entity\n@Table(name = \"t_joke\")\npublic class Joke implements Serializable{\n\n\tprivate static final long serialVersionUID = 4646260119535165219L;\n\n\t//type标记\n\tpublic static final int TYPE_QUSHI = 1;\n\tpublic static final int TYPE_QUTU = 2;\n\tpublic static final int TYPE_MEITU = 3;\n\tpublic static final...
import java.util.Date; import java.util.List; import javax.annotation.Resource; import org.apache.log4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMeth...
package com.lling.qiqu.controllers; /** * @ClassName: GifController * @Description: gif控制器 * @author lling * @date 2015-5-30 */ @Controller @RequestMapping("/gif") public class GifController { @Resource private IJokeService jokeService; @Resource private IUserService userServie; private Logger logg...
PageResult<Joke> page = jokeService.getJokes(limit, Joke.TYPE_GIF, newOrHotFlag);
3
dubreuia/intellij-plugin-save-actions
src/main/java/com/dubreuia/ui/Configuration.java
[ "public enum Action {\n\n // Activation\n\n activate(\"Activate save actions on save (before saving each file, performs the configured actions below)\",\n activation, true),\n\n activateOnShortcut(\"Activate save actions on shortcut (default \\\"CTRL + SHIFT + S\\\")\",\n activation, ...
import com.dubreuia.model.Action; import com.dubreuia.model.Storage; import com.dubreuia.model.java.EpfStorage; import com.dubreuia.ui.java.IdeSupportPanel; import com.dubreuia.ui.java.InspectionPanel; import com.intellij.openapi.options.Configurable; import com.intellij.openapi.project.Project; import org.jetbrains.an...
/* * The MIT License (MIT) * * Copyright (c) 2020 Alexandre DuBreuil * * 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 * t...
private InspectionPanel inspectionPanel;
4
xnickmx/google-play-client
google-play-client/src/main/java/com/faceture/google/play/PlayClientBuilder.java
[ "public class GoogleUtil {\n\n public String createAuthHeaderValue(String authToken) {\n if (null == authToken || authToken.isEmpty()) {\n throw new IllegalArgumentException(\"authToken is null or empty\");\n }\n\n return GoogleConst.AUTH_HEADER_START + authToken;\n }\n\n pu...
import com.faceture.google.GoogleUtil; import com.faceture.google.gson.GsonWrapper; import com.faceture.google.play.domain.PlayDomainFactory; import com.faceture.http.HttpClientFactory; import com.faceture.http.HttpUtil; import com.faceture.rest.RestClient; import com.faceture.rest.RestClientUtil; import com.faceture.r...
/* * Copyright (c) 2012. Faceture Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program...
GoogleUtil googleUtil = new GoogleUtil();
0
BottleRocketStudios/Android-GroundControl
GroundControl/groundcontrol/src/main/java/com/bottlerocketstudios/groundcontrol/convenience/StandardExecutionBuilder.java
[ "public class AgentExecutor implements InactivityCleanupListener {\n\n private static final String TAG = AgentExecutor.class.getSimpleName();\n\n public static final String DEFAULT_AGENT_EXECUTOR_ID = \"<def>\";\n\n private static final ConcurrentHashMap<String, AgentExecutor> sAgentExecutorMap = new Concu...
import android.text.TextUtils; import android.util.Log; import com.bottlerocketstudios.groundcontrol.AgentExecutor; import com.bottlerocketstudios.groundcontrol.agent.Agent; import com.bottlerocketstudios.groundcontrol.executor.JobPriority; import com.bottlerocketstudios.groundcontrol.listener.AgentListener; import com...
/* * Copyright (c) 2016. Bottle Rocket LLC * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ...
private AgentPolicy mAgentPolicy;
5
PeteGoo/tcSlackBuildNotifier
tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/SlackNotificationListener.java
[ "public interface SlackNotification {\n\n\tpublic abstract void setProxy(SlackNotificationProxyConfig proxyConfig);\n\n\tpublic abstract void setProxy(String proxyHost, Integer proxyPort, Credentials credentials);\n\n\tpublic abstract void post() throws FileNotFoundException, IOException;\n\n\tpublic abstract Integ...
import jetbrains.buildServer.responsibility.ResponsibilityEntry; import jetbrains.buildServer.responsibility.TestNameResponsibilityEntry; import jetbrains.buildServer.serverSide.*; import jetbrains.buildServer.serverSide.settings.ProjectSettingsManager; import jetbrains.buildServer.tests.TestName; import jetbrains.buil...
package slacknotifications.teamcity; /** * SlackNotificationListner * Listens for Server events and then triggers the execution of slacknotifications if configured. */ public class SlackNotificationListener extends BuildServerAdapter { private static final String SLACKNOTIFICATIONS_SETTINGS_ATTRIBUTE_NA...
slackNotification.setShowFailureReason(myMainSettings.getShowFailureReason() == null ? SlackNotificationContentConfig.DEFAULT_SHOW_FAILURE_REASON : myMainSettings.getShowFailureReason());
3
ktisha/Crucible4IDEA
src/com/jetbrains/crucible/ui/toolWindow/details/CommentForm.java
[ "@State(name = \"CrucibleSettings\",\n storages = {\n @Storage(file = \"$APP_CONFIG$\" + \"/crucibleConnector.xml\")\n }\n)\npublic class CrucibleSettings implements PersistentStateComponent<CrucibleSettings> {\n public String SERVER_URL = \"\";\n public String USERNAME = \"\";\n\n @Override\...
import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.SpellCheckingEditorCustomizationProvider; import com.intellij.openapi.fileTypes.PlainTextLanguage; import com.intellij.openapi.project.Project...
package com.jetbrains.crucible.ui.toolWindow.details; /** * User: ktisha */ public class CommentForm extends JPanel { private static final int ourBalloonWidth = 350; private static final int ourBalloonHeight = 200; private final EditorTextField myReviewTextField; private JBPopup myBalloon; private Edit...
private Comment myParentComment;
2
loklak/loklak_server
src/org/loklak/DumpProcessConversation.java
[ "public class JSONObject {\n /**\n * JSONObject.NULL is equivalent to the value that JavaScript calls null,\n * whilst Java's null is equivalent to the value that JavaScript calls\n * undefined.\n */\n private static final class Null {\n\n /**\n * There is only intended to be a ...
import java.util.concurrent.atomic.AtomicLong; import org.json.JSONObject; import org.loklak.data.DAO; import org.loklak.harvester.TwitterScraper.TwitterTweet; import org.loklak.tools.storage.JsonFactory; import org.loklak.tools.storage.JsonReader; import org.loklak.tools.storage.JsonStreamReader; import java.io.File; ...
/** * DumpProcessConversation * Copyright 18.04.2018 by Michael Peter Christen, @0rb1t3r * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License...
Map<String, Map<Long, TwitterTweet>> usertweets = new ConcurrentHashMap<>();
2
daileyet/openlibs.easywebframework
src/main/java/com/openthinks/easyweb/monitor/WebProcessMonitor.java
[ "public final class WebStatic {\r\n\r\n\tpublic static final String WEB_ROOT = \"EasyWeb_Container\";\r\n\tpublic static final String WEB_CONFIGURE = \"EasyWeb_Configure\";\r\n\tpublic static final String WEB_CONTROLLER = \"EasyWeb_Controller\";\r\n\tpublic static final String WEB_FILTER = \"EasyWeb_Filter\";\r\n\t...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.InetAddress; import java.net.UnknownHostException; import java.util.Properties; import java.util.Set; import javax.servlet.ServletException; import javax.servlet.http.HttpSer...
.getAttribute(WebStatic.WEB_MONITOR_INIT_PARAM_ENABLE_REMOTE); if (remoteEnable_ == null) {//secondly, check this servlet init parameter remoteEnable_ = remoteEnable; //write back to application attribute WebContexts.getServletContext().setAttribute(WebStatic.WEB_MONITOR_INIT_PARAM_ENABLE_REMOTE, rem...
RequestSuffix requestSuffix = WebContexts.get().getWebConfigure().getRequestSuffix();
7
marcusschiesser/my-aktion
my-aktion/src/main/java/de/dpunkt/myaktion/services/SpendeServiceBean.java
[ "@NamedQueries({\r\n\t@NamedQuery(name=Aktion.findByOrganisator,query=\"SELECT a FROM Aktion a WHERE a.organisator = :organisator ORDER BY a.name\"),\r\n\t@NamedQuery(name=Aktion.findAll,query=\"SELECT a FROM Aktion a ORDER BY a.name\"),\r\n\t@NamedQuery(name=Aktion.getBisherGespendet,query=\"SELECT SUM(s.betrag) F...
import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.security.PermitAll; import javax.annotation.security.RolesAllowed; import javax.ejb.Stateless; import javax.inject.Inject; import javax.persistence.EntityManager; import j...
package de.dpunkt.myaktion.services; @Stateless public class SpendeServiceBean implements SpendeService { @Inject EntityManager entityManager; @Inject private Logger logger; @RolesAllowed("Organisator") public List<Spende> getSpendeList(Long aktionId) { Aktion managedAktion = entityMana...
public List<Spende> getSpendeListPublic(Long aktionId) throws ObjectNotFoundException {
4
jeasonlzy/okhttp-OkGo
okserver/src/main/java/com/lzy/okserver/OkDownload.java
[ "public class DownloadManager extends BaseDao<Progress> {\n\n private DownloadManager() {\n super(new DBHelper());\n }\n\n public static DownloadManager getInstance() {\n return DownloadManagerHolder.instance;\n }\n\n private static class DownloadManagerHolder {\n private static ...
import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import android.os.Environment; import com.lzy.okgo.db.DownloadManager; import com.lzy.okgo.model.Progress; import com.lzy.okgo.request.base.Request; import com.lzy.okgo.utils.IOUtils; import com.lzy.okgo.utils.OkLogger; import com.lzy.okserver.downloa...
/* * Copyright 2016 jeasonlzy(廖子尧) * * 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...
List<Progress> taskList = DownloadManager.getInstance().getDownloading();
0
PerficientDigital/AEM-DataLayer
weretail-reference/src/main/java/com/perficient/aem/weretail/datalayer/DefaultPageDataElement.java
[ "public class Category extends BaseDataObject {\n\n\tpublic Category(Map<String,Object> map){\n\t\tsuper(map);\n\t}\n\tpublic Category(){\n\t\tsuper();\n\t}\n\n\tpublic static final String DATA_KEY_PRIMARY_CATEGORY = \"primaryCategory\";\n\n\tpublic String getPrimaryCategory() {\n\t\treturn get(DATA_KEY_PRIMARY_CAT...
import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.commons.lang.StringUtils; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ValueMap; import org.apache.sling.models...
/* * Copyright 2017 - Perficient * * 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...
EventInfo event = new EventInfo();
3
tl-nguyen/RadarApp
RadarApp/app/src/main/java/bg/mentormate/academy/radarapp/views/RoomItem.java
[ "public class Constants {\n\n public final static String INACTIVE_STATE = \"INACTIVE\";\n\n public final static String CATEGORY = \"CATEGORY\";\n public final static String FOLLOWER = \"FOLLOWER\";\n public final static String FOLLOWING = \"FOLLOWING\";\n public final static String SEARCH = \"SEARCH\...
import android.annotation.TargetApi; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Build; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.Butto...
package bg.mentormate.academy.radarapp.views; /** * Created by tl on 18.02.15. */ public class RoomItem extends LinearLayout implements View.OnClickListener { private static final String USER_ID = "USER_ID"; private TextView mTvRoomName; private TextView mTvUsername; private ParseImageView mPivA...
private User mCurrentUser;
4
opensciencemap/vtm-app
src/org/oscim/app/RouteSearch.java
[ "public class GeocoderNominatim {\n\n\tfinal static Logger log = LoggerFactory.getLogger(GeocoderNominatim.class);\n\n\tpublic static final String NOMINATIM_SERVICE_URL = \"http://nominatim.openstreetmap.org/\";\n\tpublic static final String MAPQUEST_SERVICE_URL = \"http://open.mapquestapi.com/nominatim/v1/\";\n\n\...
import java.io.IOException; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.List; import org.oscim.android.canvas.AndroidGraphics; import org.oscim.core.GeoPoint; import org.oscim.layers.PathLayer; import org.oscim.layers.marker.MarkerItem.HotspotPlace; import org.oscim.layers.marker.Marker...
/* * Copyright 2012 osmdroid: M.Kergall * Copyright 2012 Hannes Janetzek * * This program is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any l...
private final ItemizedOverlayWithBubble<ExtendedMarkerItem> mItineraryMarkers;
2
killbill/killbill-client-java
src/main/java/org/killbill/billing/client/api/gen/AdminApi.java
[ "public class AdminPayment {\n\n private String lastSuccessPaymentState = null;\n\n private String currentPaymentStateName = null;\n\n private String transactionStatus = null;\n\n\n public AdminPayment() {\n }\n\n public AdminPayment(final String lastSuccessPaymentState,\n fina...
import org.killbill.billing.client.Converter; import org.killbill.billing.client.KillBillClientException; import org.killbill.billing.client.KillBillHttpClient; import org.killbill.billing.client.RequestOptions; import org.killbill.billing.client.RequestOptions.RequestOptionsBuilder; import org.killbill.billing.client....
/* * Copyright 2010-2014 Ning, Inc. * Copyright 2014-2020 Groupon, Inc * Copyright 2020-2021 Equinix, Inc * Copyright 2014-2021 The Billing Project, LLC * * The Billing Project licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with t...
public int getQueueEntries(final UUID accountId, final String queueName, final String serviceName, final String minDate, final String maxDate, final OutputStream outputStream, final RequestOptions inputOptions) throws KillBillClientException {
4
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/events/ihe/QueryEvent.java
[ "public abstract class DICOMEventIdCodes extends CodedValueType\n{\n\t\n\tprotected DICOMEventIdCodes(String value, String meaning)\n\t{\n\t\tsetCodeSystemName(\"DCM\");\n\t\tsetCode(value);\n\t\tsetOriginalText(meaning);\n\t}\n\t\n\t/**\n\t * \"DCM\",\"110100\",\"Application Activity\"\n\t * \n\t *\n\t * @since E...
import java.util.LinkedList; import java.util.List; import org.openhealthtools.ihe.atna.auditor.codes.dicom.DICOMEventIdCodes; import org.openhealthtools.ihe.atna.auditor.codes.ihe.IHETransactionEventTypeCodes; import org.openhealthtools.ihe.atna.auditor.codes.rfc3881.RFC3881EventCodes; import org.openhealthtools.ihe.a...
/******************************************************************************* * Copyright (c) 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is a...
List<TypeValuePairType> tvp = new LinkedList<>();
7
aNNiMON/HotaruFX
app/src/main/java/com/annimon/hotarufx/visual/objects/RectangleNode.java
[ "public final class PropertyBindings extends HashMap<String, Property> {\n\n public PropertyBindings add(String key, PropertyType type, Supplier<PropertyTimeline<?>> property) {\n super.put(key, new Property(type, property));\n return this;\n }\n\n public PropertyBindings merge(PropertyBindin...
import com.annimon.hotarufx.visual.PropertyBindings; import com.annimon.hotarufx.visual.PropertyTimeline; import com.annimon.hotarufx.visual.PropertyTimelineHolder; import com.annimon.hotarufx.visual.TimeLine; import com.annimon.hotarufx.visual.visitors.NodeVisitor; import javafx.scene.shape.Rectangle; import static co...
package com.annimon.hotarufx.visual.objects; public class RectangleNode extends ShapeNode { public final Rectangle rectangle; private PropertyTimelineHolder<Number> x, y, width, height, arcWidth, arcHeight; public RectangleNode() { this(new Rectangle()); } private RectangleNode(Rectang...
public void buildTimeline(TimeLine timeline) {
3
google/physical-web
android/PhysicalWeb/app/src/main/java/org/physical_web/physicalweb/UrlDeviceDiscoveryService.java
[ "public class PhysicalWebCollection {\n private static final int SCHEMA_VERSION = 1;\n private static final String SCHEMA_VERSION_KEY = \"schema\";\n private static final String DEVICES_KEY = \"devices\";\n private static final String METADATA_KEY = \"metadata\";\n private static final String ICON_MAP_KEY = \"...
import org.physical_web.collection.PhysicalWebCollection; import org.physical_web.collection.PhysicalWebCollectionException; import org.physical_web.collection.PwPair; import org.physical_web.collection.PwsResult; import org.physical_web.collection.PwsResultCallback; import org.physical_web.collection.PwsResultIconCall...
mCanUpdateNotifications = false; } private void restoreCache() { // Make sure we are trying to load the right version of the cache SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); int prefsVersion = prefs.getInt(PREFS_VERSION_KEY, 0); long now = new Date().getTime(...
mPwCollection.addMetadata(new PwsResult.Builder(urlDevice.getUrl(), urlDevice.getUrl())
2
RCasatta/EternityWallAndroid
src/main/java/it/eternitywall/eternitywall/activity/HiddenActivity.java
[ "public class EWApplication extends MultiDexApplication {\n private static final String TAG = \"EWApplication\";\n private EWWalletService ewWalletService;\n private WalletObservable walletObservable;\n private WalletObserver walletObserver;\n private final int SHUTDOWN_AFTER = 30 * 60 * 1000;\n\n ...
import android.app.AlertDialog; import android.app.DatePickerDialog; import android.content.DialogInterface; import android.content.SharedPreferences; import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v7.app.AppCompatActivity; import android.text....
cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH)); datePicker.setCancelable(false); datePicker.setTitle("Hidden until"); datePicker.show(); } }); ...
final PinAlertDialogFragment pinAlertDialogFragment = PinAlertDialogFragment.newInstance(R.string.confirm_pin);
4
corehunter/corehunter3
corehunter-services/corehunter-services-simple/src/main/java/org/corehunter/services/simple/FileBasedDatasetServices.java
[ "public class CoreHunterData extends DataPojo implements IntegerIdentifiedData {\n \n /**\n * \n */\n private static final long serialVersionUID = 1L;\n private static final List<CoreHunterMeasure> NO_MEASURES = new LinkedList<>() ;\n private final FrequencyGenotypeData genotypicData; \n p...
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.UUID; imp...
writeDatasets(); } return datasetUpdated; } @Override public SimpleEntity[] getHeaders(String datasetId) throws DatasetException { CoreHunterData data = getCoreHunterData(datasetId); if (data == null) { throw new DatasetException("No data associate...
GenotypeDataFormat genotypeDataFormat = getGenotypeDataFormat(options);
3
sct/HexxitGear
src/sct/hexxitgear/HexxitGear.java
[ "public class BlockHexbiscus extends BlockFlower {\n\n public BlockHexbiscus(int id) {\n super(id);\n setCreativeTab(HGCreativeTab.tab);\n setUnlocalizedName(\"hexxitgear.flora.hexbiscus\");\n }\n\n @Override\n public void registerIcons(IconRegister ir) {\n blockIcon = ir.reg...
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mo...
/* * HexxitGear * Copyright (C) 2013 Ryan Cohen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This pro...
HexxitGearRegistry.init();
1
sbt-compiler-maven-plugin/sbt-compiler-maven-plugin
sbt-compiler-maven-plugin/src/main/java/com/google/code/sbt/compiler/plugin/AbstractSBTCompileMojo.java
[ "public interface Compiler\n{\n /**\n * Returns default Scala version for the compiler.\n * \n * This default value is used when none of the below options is true:\n * <ul>\n * <li>plugin's {@code scalaVersion} configuration parameter is defined,</li>\n * <li>project's {@code scala.versio...
import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Servi...
try { internalExecute(); } finally { long te = System.currentTimeMillis(); getLog().debug( String.format( "Mojo execution time: %d ms", te - ts ) ); } } } /** * Performs compilat...
SourcePositionMapper sourcePositionMapper = null;
4
PaNaVTEC/Clean-Contacts
app/src/main/java/me/panavtec/cleancontacts/di/BddModule.java
[ "public class ListCachingStrategy<T> implements CachingStrategy<List<T>> {\n\n private final CachingStrategy<T> cachingStrategy;\n\n public ListCachingStrategy(CachingStrategy<T> cachingStrategy) {\n this.cachingStrategy = cachingStrategy;\n }\n\n @Override public boolean isValid(List<T> data) {\n if (dat...
import android.app.Application; import dagger.Module; import dagger.Provides; import java.util.concurrent.TimeUnit; import javax.inject.Singleton; import me.panavtec.cleancontacts.BuildConfig; import me.panavtec.cleancontacts.data.DatabaseHelper; import me.panavtec.cleancontacts.data.DatabaseName; import me.panavtec.cl...
package me.panavtec.cleancontacts.di; @Module( complete = false, library = true) public class BddModule { @Provides @Singleton CachingStrategy<BddContact> provideContactCachingStrategy() { return new NotNullCachingStrategy<>(); }
@Provides @Singleton ListCachingStrategy<BddContact> provideListContactCachingStrategy() {
0
DDoS/JICI
src/main/java/ca/sapon/jici/evaluator/member/ArrayLengthVariable.java
[ "public class LiteralReferenceType extends SingleReferenceType implements LiteralType, TypeArgument {\n public static final LiteralReferenceType THE_STRING = LiteralReferenceType.of(String.class);\n public static final LiteralReferenceType THE_OBJECT = LiteralReferenceType.of(Object.class);\n public static...
import java.lang.reflect.Array; import ca.sapon.jici.evaluator.type.LiteralReferenceType; import ca.sapon.jici.evaluator.type.PrimitiveType; import ca.sapon.jici.evaluator.type.Type; import ca.sapon.jici.evaluator.value.IntValue; import ca.sapon.jici.evaluator.value.Value;
/* * This file is part of JICI, licensed under the MIT License (MIT). * * Copyright (c) 2015-2016 Aleksi Sapon <http://sapon.ca/jici/> * * 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...
public Type getType() {
2
andriydruk/RxDNSSD
rxdnssd/src/test/java/com/github/druk/rxdnssd/RxDnssdTest.java
[ "public interface BrowseListener extends BaseListener {\n\t/** Called to report discovered services.<P>\n\n\t\t@param\tbrowser\n\t\t\t\t\tThe active browse service.\n\t\t<P>\n\t\t@param\tflags\n\t\t\t\t\tPossible values are DNSSD.MORE_COMING.\n\t\t<P>\n\t\t@param\tifIndex\n\t\t\t\t\tThe interface on which the servi...
import com.github.druk.dnssd.BrowseListener; import com.github.druk.dnssd.DNSSD; import com.github.druk.dnssd.DNSSDException; import com.github.druk.dnssd.DNSSDService; import com.github.druk.dnssd.NSType; import com.github.druk.dnssd.QueryListener; import com.github.druk.dnssd.ResolveListener; import org.junit.After; ...
/* * Copyright (C) 2016 Andriy Druk * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
DNSSD mockDNSSD;
1
rundeck-plugins/salt-step
src/main/java/org/rundeck/plugin/salt/SaltApiNodeStepPlugin.java
[ "public static void checkNotEmpty(String propertyName, String propertyValue, FailureReason reason, INodeEntry entry)\n throws SaltStepValidationException {\n if (StringUtils.isEmpty(propertyValue)) {\n throw new SaltStepValidationException(propertyName, String.format(\"%s is a required property.\",...
import static org.rundeck.plugin.salt.validation.Validators.checkNotEmpty; import java.io.IOException; import java.lang.reflect.Type; import java.util.List; import java.util.Map; import java.util.Set; import javax.annotation.concurrent.NotThreadSafe; import org.apache.commons.lang.StringUtils; import org.apache.commons...
/** * Copyright (c) 2013, salesforce.com, inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided * that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of con...
protected SaltReturnHandlerRegistry returnHandlerRegistry;
3
micmiu/micmiu-web-sh
src/main/java/com/micmiu/framework/web/v1/system/action/MenuAction.java
[ "public class MenuPermUtil {\r\n\r\n\t/**\r\n\t * 转化用户菜单为HTML格式\r\n\t * \r\n\t * @param allMenus\r\n\t * @param userMenus\r\n\t * @param ids\r\n\t * @param contextPath\r\n\t */\r\n\tpublic static void parseUserMenu(List<Menu> allMenus,\r\n\t\t\tList<TreeNode> userMenus, Set<Long> ids, String contextPath,\r\n\t\t\tM...
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.servlet.http.HttpServletRequest; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.spri...
package com.micmiu.framework.web.v1.system.action; /** * * @author <a href="http://www.micmiu.com">Michael Sun</a> */ @Controller @RequestMapping(value = "/system/menu.do") public class MenuAction { @Autowired private UserService userService; @Autowired private MenuService menuService; ...
User currUser = userService.getUserByLoginName(loginName);
4
MobClub/ShareSDK-for-Android
SampleFresh/app/src/main/java/cn/sharesdk/demo/platform/yixin/moments/YixinMomentsShare.java
[ "public class ResourcesManager {\n\n\tprivate static ResourcesManager instance;\n\tprivate Context context;\n\tpublic static String testImage;\n\tpublic static String testVideo;\n\tpublic static String testImageUrl;\n\tpublic static HashMap<Integer, String> testText;\n\n\tprivate String filePath ;\n\tprivate String...
import com.mob.MobSDK; import cn.sharesdk.demo.entity.ResourcesManager; import cn.sharesdk.demo.utils.DemoUtils; import cn.sharesdk.framework.Platform; import cn.sharesdk.framework.PlatformActionListener; import cn.sharesdk.framework.ShareSDK; import cn.sharesdk.yixin.moments.YixinMoments; import static cn.sharesdk.dem...
package cn.sharesdk.demo.platform.yixin.moments; /** * Created by yjin on 2017/6/25. */ public class YixinMomentsShare { private PlatformActionListener platformActionListener; public YixinMomentsShare(PlatformActionListener platformActionListener){ this.platformActionListener = platformActionListener;
DemoUtils.isValidClient("im.yixin");
1
zetbaitsu/CodePolitan
app/src/main/java/id/zelory/codepolitan/controller/FollowController.java
[ "public abstract class BenihController<P extends BenihController.Presenter>\n{\n protected P presenter;\n\n public BenihController(P presenter)\n {\n this.presenter = presenter;\n Timber.tag(getClass().getSimpleName());\n }\n\n public abstract void saveState(Bundle bundle);\n\n publi...
import android.os.Bundle; import java.util.List; import id.zelory.benih.controller.BenihController; import id.zelory.benih.util.BenihScheduler; import id.zelory.codepolitan.R; import id.zelory.codepolitan.controller.event.ErrorEvent; import id.zelory.codepolitan.data.model.Category; import id.zelory.codepolitan.data.Lo...
/* * Copyright (c) 2015 Zelory. * * 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...
presenter.showError(new Throwable(ErrorEvent.LOAD_FOLLOWED_CATEGORIES));
2
otale/tale
src/main/java/com/tale/controller/admin/SystemController.java
[ "public class TaleConst {\n\n public static final String CLASSPATH = new File(AdminApiController.class.getResource(\"/\").getPath()).getPath() + File.separatorChar;\n\n public static final String REMEMBER_IN_COOKIE = \"remember_me\";\n public static final String LOGIN_ERROR_COUNT = \"login_error...
import com.blade.ioc.annotation.Inject; import com.blade.kit.EncryptKit; import com.blade.kit.StringKit; import com.blade.mvc.annotation.Param; import com.blade.mvc.annotation.Path; import com.blade.mvc.annotation.PostRoute; import com.blade.mvc.ui.RestResponse; import com.tale.annotation.SysLog; import com.tale.bootst...
package com.tale.controller.admin; /** * 后台控制器 * Created by biezhi on 2017/2/21. */ @Slf4j @Path(value = "admin", restful = true)
public class SystemController extends BaseController {
1
osglworks/java-tool
src/main/java/org/osgl/storage/impl/SObject.java
[ "public class Lang implements Serializable {\n\n public static final Version VERSION = Version.get();\n\n public static final Lang INSTANCE = $.INSTANCE;\n\n protected Lang() {\n }\n\n private Object readResolve() throws ObjectStreamException {\n return INSTANCE;\n }\n\n @Override\n p...
import org.osgl.$; import org.osgl.Lang; import org.osgl.OsglConfig; import org.osgl.exception.AccessDeniedException; import org.osgl.exception.NotAppliedException; import org.osgl.exception.ResourceNotFoundException; import org.osgl.exception.UnexpectedIOException; import org.osgl.storage.ISObject; import org.osgl.sto...
} @Override public String getFilename() { assertValid(); return getAttribute(ATTR_FILE_NAME); } @Override public String getContentType() { assertValid(); return getAttribute(ATTR_CONTENT_TYPE); } @Override public void setFilename(String filename) { ...
boolean isBinary = OsglConfig.binaryDataProbe().apply($.convert(is).to(Reader.class));
1
OpenWatch/OpenWatch-Android
app/OpenWatch/src/org/ale/openwatch/model/OWPhoto.java
[ "public class Constants {\n\n public static final String SUPPORT_EMAIL = \"team@openwatch.net\";\n public static final String GOOGLE_STORE_URL = \"https://play.google.com/store/apps/details?id=org.ale.openwatch\";\n public static final String APPLE_STORE_URL = \"https://itunes.apple.com/us/app/openwatch-so...
import android.content.Context; import android.database.Cursor; import android.util.Log; import com.orm.androrm.DatabaseAdapter; import com.orm.androrm.Model; import com.orm.androrm.QuerySet; import com.orm.androrm.field.BooleanField; import com.orm.androrm.field.CharField; import com.orm.androrm.field.DoubleField; imp...
return media_object.get(c).getTags(c); } @Override public Integer getViews(Context c) { return media_object.get(c).getViews(c); } @Override public Integer getActions(Context c) { return media_object.get(c).getActions(c); } @Override public Integer getServerId(Context c) { return media_object.get(c...
DeviceLocation.setOWServerObjectLocation(c, photo.media_object.get(c).getId(), false);
4
groupon/vertx-memcache
src/test/java/com/groupon/vertx/memcache/stream/MemcacheInputStreamTest.java
[ "public enum JsendStatus {\n success,\n error,\n fail;\n}", "public final class DeleteCommandResponse extends MemcacheCommandResponse {\n private final String data;\n\n private DeleteCommandResponse(Builder builder) {\n super(builder);\n data = builder.data;\n }\n\n public Strin...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import java.io.ByteArrayOutputStream; import java.lang.reflect.Field; import java.util.Collections; import java.util.Map; import java.util.con...
buff.appendString("SERVER ERROR message\r\n"); input.processBuffer(buff); assertEquals("Invalid buffer position", 0, ((ByteArrayOutputStream) buffer.get(input)).size()); } catch (Exception ex) { assertNull("Unexpected exception: " + ex.getMessage(), ex); ...
((RetrieveCommandResponse) response).getData());
3
algohub/judge-engine
src/test/java/org/algohub/engine/codegenerator/CppCodeGeneratorTest.java
[ "public class CppJudge implements JudgeInterface {\n /**\n * {@inheritDoc}.\n */\n public JudgeResult judge(final Function function, final Problem.TestCase[] testCases,\n final String userCode) {\n return JudgeInterface.judge(function, testCases, userCode, LanguageType.CPLUSPLUS,\n CppJudge::cr...
import com.fasterxml.jackson.databind.ObjectMapper; import org.algohub.engine.judge.CppJudge; import org.algohub.engine.bo.StatusCode; import org.algohub.engine.pojo.Function; import org.algohub.engine.pojo.Problem; import org.algohub.engine.pojo.JudgeResult; import org.algohub.engine.type.TypeNode; import org.algohub....
package org.algohub.engine.codegenerator; @SuppressWarnings({"PMD.CommentRequired"}) public class CppCodeGeneratorTest { private static final ObjectMapper OBJECT_MAPPER = ObjectMapperInstance.INSTANCE; private static void testSerde(final String typeStr, final String oneTestCase) { final TypeNode type = T...
final CppJudge judge = new CppJudge();
0
alabeduarte/mypodcasts-android
app/src/test/java/com/mypodcasts/episodes/EpisodeFeedsActivityTest.java
[ "public class UserFeedsRepository {\n\n private final HttpClient httpClient;\n\n @Inject\n public UserFeedsRepository(HttpClient httpClient) {\n this.httpClient = httpClient;\n }\n\n public List<Feed> getFeeds() {\n return httpClient.getApi().getUserFeeds();\n }\n\n public Feed getFeed(String id) {\n ...
import android.app.ProgressDialog; import android.content.Intent; import android.widget.ListView; import android.widget.TextView; import com.android.volley.toolbox.NetworkImageView; import com.google.inject.AbstractModule; import com.mypodcasts.BuildConfig; import com.mypodcasts.R; import com.mypodcasts.repositories.Us...
package com.mypodcasts.episodes; @RunWith(RobolectricTestRunner.class) @Config(constants = BuildConfig.class) public class EpisodeFeedsActivityTest { EpisodeFeedsActivity activity; UserLatestEpisodesRepository userLatestEpisodesRepositoryMock = mock(UserLatestEpisodesRepository.class);
UserFeedsRepository userFeedsRepositoryMock = mock(UserFeedsRepository.class);
0
wrey75/WaveCleaner
src/main/java/com/oxande/xmlswing/components/JLabelUI.java
[ "public class AttributeDefinition {\r\n\t\r\n\tpublic final static Map<String, String> ALIGNS = new HashMap<String, String>();\r\n\tpublic final static Map<String, String> CLOSE_OPERATIONS = new HashMap<String, String>();\r\n\tpublic final static Map<String, String> CURSORS = new HashMap<String, String>();\r\n\tpub...
import org.w3c.dom.Element; import com.oxande.xmlswing.AttributeDefinition; import com.oxande.xmlswing.AttributeDefinition.ClassType; import com.oxande.xmlswing.AttributesController; import com.oxande.xmlswing.Parser; import com.oxande.xmlswing.UnexpectedTag; import com.oxande.xmlswing.jcode.JavaClass; import co...
package com.oxande.xmlswing.components; public class JLabelUI extends JComponentUI { public static final AttributeDefinition[] PROPERTIES = { new AttributeDefinition( "autoscrolls", "setAutoscrolls", ClassType.BOOLEAN ), new AttributeDefinition( "valign", "setVerticalAlignment", ClassType.ALIGNM...
public String parse(JavaClass jclass, JavaMethod initMethod, Element root ) throws UnexpectedTag{
6
emsouza/beanlib
hibernate/src/test/java/net/sf/beanlib/hibernate5/DateTest.java
[ "public class PropertyInfo {\n\n private final String propertyName;\n\n private final Object fromBean;\n\n private final Object toBean;\n\n public PropertyInfo(String propertyName, Object fromBean, Object toBean) {\n this.propertyName = propertyName;\n this.fromBean = fromBean;\n th...
import net.sf.beanlib.hibernate5.Hibernate5BeanReplicator; import net.sf.beanlib.spi.BeanTransformerSpi; import net.sf.beanlib.spi.CustomBeanTransformerSpi; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertSame; import static org.junit.Asser...
/* * Copyright 2007 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License") * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
public boolean isTransformable(Object from, Class<?> toClass, PropertyInfo propertyInfo) {
0