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
curtisullerich/attendance
src/test/java/edu/iastate/music/marching/attendance/test/util/ValidationUtilTest.java
[ "public class DataTrain {\n\n\tprivate static class CacheKey implements Serializable {\n\n\t\t/**\n\t\t * \n\t\t */\n\t\tprivate static final long serialVersionUID = -8879640511900898415L;\n\n\t\t@SuppressWarnings(\"unused\")\n\t\tpublic String clazz;\n\n\t\t@SuppressWarnings(\"unused\")\n\t\tpublic int id;\n\n\t\t...
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; import edu.iastate.music.marching.attendance.model.interact.DataTrain; import edu.iastate.music.marching.attendance.testlib.AbstractDatastoreTest; import edu.iastate.music.marching.attendance.testlib.Config; im...
package edu.iastate.music.marching.attendance.test.util; public class ValidationUtilTest extends AbstractDatastoreTest { @Test public void testValidGoogleUsers() {
DataTrain train = getDataTrain();
0
WANdisco/s3hdfs
src/main/java/com/wandisco/s3hdfs/command/PostCommand.java
[ "public class S3HdfsPath {\n private final String rootDir;\n private final String userName;\n private final String bucketName;\n private final String objectName;\n private final String partNumber;\n\n private String version;\n\n public S3HdfsPath() throws UnsupportedEncodingException {\n this(null, null, ...
import com.wandisco.s3hdfs.path.S3HdfsPath; import com.wandisco.s3hdfs.rewrite.redirect.MultiPartFileRedirect; import com.wandisco.s3hdfs.rewrite.wrapper.S3HdfsRequestWrapper; import com.wandisco.s3hdfs.rewrite.wrapper.S3HdfsResponseWrapper; import com.wandisco.s3hdfs.rewrite.wrapper.WebHdfsRequestWrapper; import com.w...
/* * 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 ...
final S3HdfsResponseWrapper response,
3
jochen777/jFormchecker
src/main/java/de/jformchecker/elements/DateInputSelectCompound.java
[ "public interface FormCheckerElement {\n\n\t// RFE: check, if some methods can be protected\n\n\t// get internal name of this input-element\n\tpublic String getName();\n\t\n\t// set internal name\n\tpublic void setName(String name);\n\n\n\t// get the value that the user entered\n\tpublic String getValue();\n\n\t// ...
import java.time.DateTimeException; import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; import java.util.Map; import de.jformchecker.FormCheckerElement; import de.jformchecker.StringUtils; import de.jformchecker.TagAttributes; import de.jformchecker.criteria.ValidationResult; import de.jformchec...
package de.jformchecker.elements; // DateInput Compound Element offering the date-inputs as select-boxes // TODO: allow individual order (for internationalisation) public class DateInputSelectCompound extends AbstractInput<DateInputSelectCompound> implements FormCheckerElement { SelectInput day; SelectInput ...
TagAttributes tagAttributes = new TagAttributes(attributes);
2
johndavidbustard/RoughWorld
src/website/views/EditObjectInstance.java
[ "@XmlRootElement\npublic class ObjectLanguageInstance implements Serializable \n{\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic String uniqueID;\n\tpublic String name;\n\tpublic String type;\n\n\t//Objects can be added with the least amount of information possible\n\t//The ultimate goal is that a ...
import java.io.OutputStream; import java.io.PrintWriter; import ai.knowledge_representation.state_instance.ObjectLanguageInstance; import ai.knowledge_representation.state_instance.ObjectPhysicalInstance; import tools.visualisation.state_visualisation.ToSVG.StateToSVG; import utils.ArrayUtils; import utils.FileStoreInt...
package website.views; public class EditObjectInstance extends DynamicWebPage { public EditObjectInstance(FileStoreInterface fs) { super(fs); } public boolean process(WebRequest toProcess) { if(toProcess.path.startsWith("EditObjectInstance.html")) { return true; } else...
ObjectLanguageInstance o = ObjectLanguageInstance.loadObject(fs, datapath);
0
Open-I-Beam/swift-storlets
StorletSamples/TestMetadataStorlet/src/com/ibm/storlet/testmetadatastorlet/MetadataStorlet.java
[ "public interface IStorlet \n{\n public void invoke(ArrayList<StorletInputStream> inStreams, \n\t ArrayList<StorletOutputStream> outStreams, \n\t Map<String,String> parameters, \n\t StorletLogger logger) \n\t ...
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.io.InputStream; import java.io.OutputStream; import com.ibm.storlet.common.IStorlet; import com.ibm.storlet.common.StorletException; import com.ibm.storlet.common.StorletInputSt...
/*---------------------------------------------------------------------------- * Copyright IBM Corp. 2015, 2015 All Rights Reserved * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * htt...
StorletLogger log )
3
flexgp/flexgp
mrgp-flexgp/src/evogpj/test/FuseRGPModels.java
[ "public class CSVDataJava extends ScaledData {\n\t/**\n\t * Parse given csvfile into set of input and target values.\n\t * \n\t * @param csvfile file of comma-separated values, last value in each line is\n\t * the target value\n\t */\n\tpublic CSVDataJava(String csvfile) {\n\t\tsuper(DataSizeRetreiver.num_fi...
import java.io.IOException; import java.io.PrintWriter; import java.util.Scanner; import evogpj.evaluation.java.CSVDataJava; import evogpj.evaluation.java.DataJava; import evogpj.genotype.Tree; import evogpj.genotype.TreeGenerator; import evogpj.gp.Individual; import evogpj.gp.Population; import java.util.ArrayList; im...
/** * Copyright (c) 2011-2014 Evolutionary Design and Optimization Group * * Licensed under the MIT License. * * See the "LICENSE" file for a copy of the license. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHAN...
private final DataJava data;
1
dhemery/runtime-suite
examples/example/suites/SuiteThatFiltersOutAllClassesButOne.java
[ "public interface ClassFilter {\n\t/**\n\t * Indicates whether a class satisfies this filter's criteria.\n\t * @param candidateClass the class to evaluate against this filter's criteria.\n\t * @return {@code true} only if {@code candidateClass} satisfies this filter's criteria.\n\t */\n\tboolean passes(Class<?> can...
import org.junit.runner.RunWith; import com.dhemery.runtimesuite.ClassFilter; import com.dhemery.runtimesuite.ClassFinder; import com.dhemery.runtimesuite.Filter; import com.dhemery.runtimesuite.Finder; import com.dhemery.runtimesuite.RuntimeSuite; import com.dhemery.runtimesuite.filters.ExcludeClasses; import com.dhem...
package example.suites; @RunWith(RuntimeSuite.class) public class SuiteThatFiltersOutAllClassesButOne {
@Finder public ClassFinder classFinder1 = new ListedClasses(Runnable1.class, Runnable2.class, Runnable3.class);
7
oosthuizenr/Livingstone
app/src/main/java/com/livingstoneapp/interactors/PackageInteractorImpl.java
[ "public class SettingsHelper {\n private static SharedPreferences prefs;\n private static final String SP_NAME = \"SettingsHelper\";\n private static final String SP_KEY_INCLUDE_UNINSTALLED_APPS = \"IncludeUninstalledApps\";\n private static final String SP_KEY_EXCLUDE_SYSTEM_APPS = \"ExcludeSystemApps\...
import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.Signature; import android.os.Build; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.uti...
package com.livingstoneapp.interactors; /** * Created by renier on 2/2/2016. */ public class PackageInteractorImpl implements IPackageInteractor { private Context mContext; private ArrayList<InstalledPackageHeader> mApps; public PackageInteractorImpl(Context context) { mContext = context; ...
GeneralInfo gi = new GeneralInfo(
4
ReadyTalk/swt-bling
src/main/java/com/readytalk/swt/widgets/notifications/Bubble.java
[ "public class TextPainter {\n \n private Color boundaryColor;\n private Color textColor;\n private Color hyperlinkColor;\n \n private Cursor handCursor;\n \n private Font boldAndItalicFont;\n private Font boldFont;\n private Font font;\n private Font headerFont;\n private Font italicFont;\n private Fon...
import com.readytalk.swt.text.painter.TextPainter; import com.readytalk.swt.text.tokenizer.TextTokenizerFactory; import com.readytalk.swt.text.tokenizer.TextTokenizerType; import com.readytalk.swt.util.ColorFactory; import com.readytalk.swt.widgets.CustomElementDataProvider; import com.readytalk.swt.widgets.notificatio...
package com.readytalk.swt.widgets.notifications; /** * Instances of this class represent contextual information about a UI element.<br/> * <br/> * Bubble will attempt to always be visible on screen.<br/> * If the default Bubble would appear off-screen, we will calculate a suitable location to appear.<br/> * <br...
.setTokenizer(TextTokenizerFactory.createTextTokenizer(TextTokenizerType.FORMATTED))
2
WassimBenltaief/ReactiveFB
app/src/main/java/com/beltaief/reactivefbexample/views/AlbumsActivity.java
[ "public class ReactiveFB {\n\n private static ReactiveFB mInstance = null;\n private static SimpleFacebookConfiguration mConfiguration =\n new SimpleFacebookConfiguration.Builder().build();\n private static SessionManager mSessionManager = null;\n\n public static void sdkInitialize(Context co...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.Toast; imp...
package com.beltaief.reactivefbexample.views; public class AlbumsActivity extends AppCompatActivity implements RecyclerViewClickListener { private static final String TAG = AlbumsActivity.class.getSimpleName(); private AlbumsAdapter mAdapter;
private List<Photo> photos = new ArrayList<>();
5
PPiMapBuilder/PPiMapBuilder
src/main/java/ch/picard/ppimapbuilder/PMBActivator.java
[ "public class PMBSettingSaveTaskFactory extends AbstractTaskFactory {\n\t\n\t@Override\n\tpublic TaskIterator createTaskIterator() {\n\t\treturn new TaskIterator(\n\t\t\tnew AbstractTask() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run(TaskMonitor taskMonitor) throws Exception {\n\t\t\t\t\tPMBSettings.save();\n\t\t\...
import ch.picard.ppimapbuilder.data.settings.PMBSettingSaveTaskFactory; import ch.picard.ppimapbuilder.data.settings.PMBSettings; import ch.picard.ppimapbuilder.layout.PMBGOSlimLayoutTaskFactory; import ch.picard.ppimapbuilder.networkbuilder.PMBInteractionNetworkBuildTaskFactory; import ch.picard.ppimapbuilder.style.PM...
/* * This file is part of PPiMapBuilder. * * PPiMapBuilder 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. * * PPiMapBuilder...
PMBSettingSaveTaskFactory saveSettingFactory;
0
engswee/equalize-xpi-modules
com.equalize.xpi.af.modules.ejb/ejbModule/com/equalize/xpi/af/modules/json/JSON2XMLConverter.java
[ "public abstract class AbstractModuleConverter {\n\tprotected final Message msg;\n\tprotected final XMLPayload payload;\n\tprotected final AuditLogHelper audit;\n\tprotected final ParameterHelper param;\n\tprotected final DynamicConfigurationHelper dyncfg;\n\tprotected final boolean debug;\n\t\n\tpublic AbstractMod...
import java.io.ByteArrayOutputStream; import java.util.ArrayList; import com.equalize.xpi.af.modules.util.AbstractModuleConverter; import com.equalize.xpi.af.modules.util.AuditLogHelper; import com.equalize.xpi.af.modules.util.DynamicConfigurationHelper; import com.equalize.xpi.af.modules.util.ParameterHelper; import c...
package com.equalize.xpi.af.modules.json; public class JSON2XMLConverter extends AbstractModuleConverter { private ConversionJSONInput jsonIn; private ConversionDOMOutput domOut; private String documentName; private String documentNamespace; private int indentFactor; private boolean escapeInvalidNameStartChar; ...
public JSON2XMLConverter(Message msg, ParameterHelper param, AuditLogHelper audit, DynamicConfigurationHelper dyncfg, Boolean debug) {
3
k3b/ToGoZip
app/src/main/java/de/k3b/android/toGoZip/SettingsActivity.java
[ "public class FileManagerUtil {\n private static Intent getIntentShowInFilemanager(Activity context, String path) {\n if ((path != null) && (path.length() > 0)) {\n final Uri pathUri = (path.indexOf(':') > 0)\n ? Uri.parse(path)\n : Uri.fromFile(new File(pa...
import android.annotation.TargetApi; import android.app.Activity; import android.app.AlertDialog; import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import androi...
| Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION | Intent.FLAG_GRANT_PREFIX_URI_PERMISSION); startActivityForResult(intent, folderpickerCode); } return true; } private void onFolderPickResult(String folderLocation) { if (Global.debugEnab...
FileManagerUtil.hasShowInFilemanager(this, getZipFolder(storage)));
0
citysearch/web-widgets
src/main/java/com/citysearch/webwidget/action/OffersAction.java
[ "public class HouseAd {\n private String title;\n private String tagLine;\n private String destinationUrl;\n private String imageURL;\n private String trackingUrl;\n private String displayUrl;\n\n public String getTrackingUrl() {\n return trackingUrl;\n }\n\n public void setTrackin...
import java.util.List; import org.apache.log4j.Logger; import com.citysearch.webwidget.bean.HouseAd; import com.citysearch.webwidget.bean.Offer; import com.citysearch.webwidget.bean.RequestBean; import com.citysearch.webwidget.exception.CitysearchException; import com.citysearch.webwidget.exception.InvalidRequestParame...
package com.citysearch.webwidget.action; public class OffersAction extends AbstractCitySearchAction implements ModelDriven<RequestBean> { private Logger log = Logger.getLogger(getClass()); private static final Integer DEFAULT_DISPLAY_SIZE = 2; private static final String AD_UNIT_NAME = "offer"; private Reques...
private List<Offer> offers;
1
guillaume-alvarez/ShapeOfThingsThatWere
core/src/com/galvarez/ttw/screens/CustomizeGameMenuScreen.java
[ "public class ThingsThatWereGame extends Game {\n\n public int windowWidth;\n\n public int windowHeight;\n\n public Assets assets;\n\n private World world;\n\n private SpriteBatch batch;\n\n private CustomizeGameMenuScreen customScreen;\n\n private MainMenuScreen menuScreen;\n\n private SessionSettings sett...
import com.artemis.World; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Pixmap; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.Stage; ...
package com.galvarez.ttw.screens; /** * This screen presents the user with a menu to launch the game. * * @author Guillaume Alvarez */ public final class CustomizeGameMenuScreen extends AbstractScreen { private final Stage stage; private final SessionSettings settings; private final FramedMenu map; ...
SelectBox<Culture> sb = new SelectBox<>(skin.get(SelectBoxStyle.class));
1
HumBuch/HumBuch
src/main/java/de/dhbw/humbuch/viewmodel/SettingsViewModel.java
[ "public class MessageEvent {\r\n\r\n\tpublic final String caption;\r\n\tpublic final String message;\r\n\tpublic final Type type;\r\n\r\n\tpublic enum Type {\r\n\t\tINFO, TRAYINFO, WARNING, ERROR;\r\n\t}\r\n\r\n\t/**\r\n\t * Creates an event with the specified caption and {@link Type}.INFO as\r\n\t * standard type\...
import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import java.util.ArrayList; import java.util.Collection; import org.hibernate.criterion.Restrictions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.eventbus.EventBus; import com.google.i...
package de.dhbw.humbuch.viewmodel; /** * Provides {@link State}s and methods for inserting and updateing {@link SchoolYear}s and {@link Category}s. * * @author David Vitt * */ public class SettingsViewModel { private final static Logger LOG = LoggerFactory.getLogger(SettingsViewModel.class); public inte...
private State<User> currentUser;
6
be-hase/relumin
src/test/java/com/behase/relumin/e2e/ClusterApiTest.java
[ "@Slf4j\n@Configuration\n@EnableAutoConfiguration\n@EnableScheduling\n@EnableWebSecurity\n@ComponentScan\npublic class Application extends WebMvcConfigurerAdapter {\n private static final String CONFIG_LOCATION = \"config\";\n\n public static void main(String[] args) throws IOException {\n log.info(\"S...
import com.behase.relumin.Application; import com.behase.relumin.TestHelper; import com.behase.relumin.model.Cluster; import com.behase.relumin.model.Notice; import com.behase.relumin.scheduler.NodeScheduler; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import org.junit.Before; ...
package com.behase.relumin.e2e; /** * Check integration of success behavior */ @Slf4j @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = Application.class) @WebIntegrationTest public class ClusterApiTest { @Value("${test.redis.host}") private String testRedisHost; @Autow...
Cluster cluster;
2
googleapis/java-trace
google-cloud-trace/src/test/java/com/google/cloud/trace/v2/TraceServiceClientTest.java
[ "public final class BatchWriteSpansRequest extends com.google.protobuf.GeneratedMessageV3\n implements\n // @@protoc_insertion_point(message_implements:google.devtools.cloudtrace.v2.BatchWriteSpansRequest)\n BatchWriteSpansRequestOrBuilder {\n private static final long serialVersionUID = 0L;\n // Use Bat...
import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GaxGrpcProperties; import com.google.api.gax.grpc.testing.LocalChannelProvider; import com.google.api.gax.grpc.testing.MockGrpcService; import com.google.api.gax.grpc.testing.MockServiceHelper; import com.google.api.gax.rpc.ApiClientHe...
/* * Copyright 2021 Google 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
ProjectName name = ProjectName.of("[PROJECT]");
1
dantetam/civgame
src/menugame/EconomicTutorial.java
[ "public class Civilization {\n\n\tpublic String name;\n\tpublic int id;\n\tpublic float r,g,b; //primary colors\n\tpublic float primaryBrickColor; //for reference only when coloring\n\tpublic float sR,sG,sB; //secondary colors\n\n\tpublic ArrayList<City> cities;\n\tpublic City capital;\n\tpublic ArrayList<GameEntit...
import game.Civilization; import game.GameEntity; import game.Tech; import game.Tile; import render.Game; import units.City; import units.Worker;
//5 -> 6 path.add(empty()); cond.add("researchAgriculture"); path.add(empty()); cond.add("firstCityFourPop"); path.add(empty()); cond.add("workerOnTile"); path.add(empty()); cond.add("buildImprovement"); //last -> end tutorial path.add(list(200)); //not a "key" } public void execu...
City city = p.cities.get(0);
5
TooTallNate/Java-WebSocket
src/test/java/org/java_websocket/issues/Issue661Test.java
[ "public interface WebSocket {\n\n /**\n * sends the closing handshake. may be send in response to an other handshake.\n *\n * @param code the closing code\n * @param message the closing message\n */\n void close(int code, String message);\n\n /**\n * sends the closing handshake. may be send in res...
import java.net.InetSocketAddress; import java.util.concurrent.CountDownLatch; import org.java_websocket.WebSocket; import org.java_websocket.handshake.ClientHandshake; import org.java_websocket.server.WebSocketServer; import org.java_websocket.util.SocketUtil; import org.java_websocket.util.ThreadCheck; import org.jun...
/* * Copyright (c) 2010-2020 Nathan Rajlich * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify...
public void onOpen(WebSocket conn, ClientHandshake handshake) {
0
treasure-lau/CSipSimple
app/src/main/java/com/csipsimple/ui/calllog/CallLogListFragment.java
[ "public abstract class ActionMode {\r\n private Object mTag;\r\n\r\n /**\r\n * Set a tag object associated with this ActionMode.\r\n *\r\n * <p>Like the tag available to views, this allows applications to associate arbitrary\r\n * data with an ActionMode for later reference.\r\n *\r\n ...
import android.annotation.SuppressLint; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.database.Cursor; import android.os.Bundle; import android.provider.CallLog; import android.provider.CallLog.Calls; import android.support.v4.app.FragmentTransacti...
/** * Copyright (C) 2010-2012 Regis Montoya (aka r3gis - www.r3gis.fr) * This file is part of CSipSimple. * * CSipSimple 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...
delMenu.setOnMenuItemClickListener(new OnMenuItemClickListener() {
2
deshi-basara/susurrus-android-app
Susurrus/app/src/main/java/rocks/susurrus/susurrus/services/WifiDirectService.java
[ "public class CreateActivity extends ActionBarActivity {\n private static final String LOG_TAG = \"CreateActivity\";\n\n /**\n * Networking\n */\n private WifiDirectService wifiDirectService;\n private Intent wifiServiceIntent;\n private boolean isWifiDirectServiceBound;\n\n /**\n * Vi...
import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.wifi.SupplicantState; import android....
package rocks.susurrus.susurrus.services; /** * Created by simon on 04.06.15. */ public class WifiDirectService extends Service { final static String LOG_TAG = "WifiDirectService"; /** * Constants */ public static final int SERVICE_PORT = 4040; public static final int SERVICE_AUTH_PORT ...
private WifiDirectBroadcastReceiver wifiDirectReceiver;
4
RCasatta/EternityWallAndroid
src/main/java/it/eternitywall/eternitywall/activity/DetailActivity.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.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.graphics.Bitmap; import android.net.Uri; import android.os.AsyncTask; import android.os.B...
package it.eternitywall.eternitywall.activity; public class DetailActivity extends ActionBarActivity { private static final Integer MAX_LENGTH = 72; private static final String TAG = "WriteActivity"; private static final int REQ_CODE = 100; private ProgressBar progress; private String hash ...
private List<Message> replies= new ArrayList<Message>();
3
EinsamHauer/disthene
src/main/java/net/iponweb/disthene/service/aggregate/RollupService.java
[ "public class Metric {\r\n\r\n private MetricKey key;\r\n private double value;\r\n\r\n public Metric(String input, Rollup rollup) {\r\n String[] splitInput = input.split(\"\\\\s\");\r\n // We were interning tenant and path here - we are going to store them all (or almost so) constantly anyho...
import com.google.common.util.concurrent.AtomicDouble; import com.google.common.util.concurrent.RateLimiter; import net.engio.mbassy.bus.MBassador; import net.engio.mbassy.listener.Handler; import net.engio.mbassy.listener.Listener; import net.engio.mbassy.listener.References; import net.iponweb.disthene.bean.Metric; i...
package net.iponweb.disthene.service.aggregate; /** * @author Andrei Ivanov */ @Listener(references= References.Strong) public class RollupService { private static final String SCHEDULER_NAME = "distheneRollupAggregatorFlusher"; private static final int RATE = 60; private volatile boolean shuttingDown ...
private final ConcurrentNavigableMap<Long, ConcurrentMap<MetricKey, AverageRecord>> accumulator = new ConcurrentSkipListMap<>();
1
AgNO3/jcifs-ng
src/main/java/jcifs/smb/SmbFile.java
[ "public class SecurityDescriptor implements SecurityInfo {\n\n /**\n * Descriptor type\n */\n private int type;\n\n /**\n * ACEs\n */\n private ACE[] aces;\n private SID ownerUserSid, ownerGroupSid;\n\n\n /**\n * \n */\n public SecurityDescriptor () {}\n\n\n /**\n ...
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.net.UnknownHostException; import java.util.Objects; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import jcifs.CIFSContex...
public InputStream getInputStream () throws IOException { return new SmbFileInputStream(this); } @Override public SmbFileInputStream openInputStream () throws SmbException { return new SmbFileInputStream(this); } @Override public SmbFileInputStream openInputStream ( int s...
req.setInfoType(Smb2Constants.SMB2_0_INFO_SECURITY);
3
roybailey/research-graphql
research-graphql-order-service/src/test/java/me/roybailey/springboot/mapper/OrderMapperTest.java
[ "@JsonInclude(JsonInclude.Include.NON_NULL)\n@JsonPropertyOrder({\n \"id\",\n \"userId\",\n \"items\",\n \"status\"\n})\n@lombok.Builder\n@lombok.NoArgsConstructor\n@lombok.AllArgsConstructor\npublic class OrderDto {\n\n @JsonProperty(\"id\")\n private String id;\n /**\n * \n * (Require...
import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; import lombok.extern.slf4j.Slf4j; import me.roybailey.data.schema.OrderDto; import me.roybailey.data.schema.OrderItemDto; import me.roybailey.springboot.AbstractTestCase; import me.roybailey.springboot.domain.OrderForm; ...
package me.roybailey.springboot.mapper; @Slf4j public class OrderMapperTest extends AbstractTestCase { OrderMapper mapper = new OrderMapper(); @Test public void testEmptyOrderDto() { OrderDto orderDto = OrderDto.builder() .id("order-1") .userId("user-1") ...
OrderItemDto.builder()
1
oSoc14/Artoria
app/src/main/java/be/artoria/belfortapp/fragments/MapFragment.java
[ "public class MapActivity extends BaseActivity {\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_map);\n\n if (savedInstanceState == null) {\n getSupportFragmentManager().beginTransact...
import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.location.Criteria; import android.location.Location; import android.location.LocationManager; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.AsyncTask; impo...
package be.artoria.belfortapp.fragments; /** * A simple {@link Fragment} subclass. * Use the {@link MapFragment#newInstance} factory method to * create an instance of this fragment. * */ public class MapFragment extends android.support.v4.app.Fragment { public static final int DEFAULT_ZOOM = 17; pri...
final ArtoriaOverlayItem overlayItem = new ArtoriaOverlayItem(poi);
2
tavianator/sangria
sangria-listbinder/src/main/java/com/tavianator/sangria/listbinder/ListBinder.java
[ "public abstract class PotentialAnnotation {\n /**\n * A visitor interface to examine a {@link PotentialAnnotation}'s annotation, if it exists.\n *\n * @param <T> The type to return.\n * @author Tavian Barnes (tavianator@tavianator.com)\n * @version 1.1\n * @since 1.1\n */\n public...
import java.lang.annotation.Annotation; import java.util.*; import javax.inject.Inject; import javax.inject.Provider; import com.google.common.base.Function; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.FluentIterable; import com.google.common.collect.ListMultimap; import com.goo...
/**************************************************************************** * Sangria * * Copyright (C) 2014 Tavian Barnes <tavianator@tavianator.com> * * * * Licen...
Message duplicateBindersError = new Message(PrettyTypes.format("Duplicate %s", listBinder));
1
WonderBeat/vasilich
alice-src/bitoflife/chatterbean/Context.java
[ "public class BeanshellInterpreter implements Interpreter\n{\n /*\n Attribute Section\n */\n \n /** Beanshell interpreter. */\n private final bsh.Interpreter interpreter = new bsh.Interpreter();\n\n /*\n Method Section\n */\n \n public Object evaluate(String script) throws InterpretingException\n {\n ...
import java.beans.PropertyChangeEvent; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.uti...
/* Copyleft (C) 2005 Hio Perroni Filho xperroni@yahoo.com ICQ: 2490863 This file is part of ChatterBean. ChatterBean 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 o...
private Transformations transformations;
4
oskopek/StudyGuide
src/main/java/com/oskopek/studyguide/controller/SemesterController.java
[ "public class BrokenCourseEnrollmentConstraintEvent extends StringMessageEvent {\n\n private final CourseEnrollment enrollment;\n\n /**\n * Default constructor.\n *\n * @param messages the resource bundle used for resolving messages to their localized versions\n * @param message the message to...
import com.google.common.eventbus.Subscribe; import com.oskopek.studyguide.constraint.event.BrokenCourseEnrollmentConstraintEvent; import com.oskopek.studyguide.constraint.event.FixedConstraintEvent; import com.oskopek.studyguide.model.*; import com.oskopek.studyguide.model.courses.Course; import com.oskopek.studyguide...
* @see SISHtmlScraper#scrapeCourse(com.oskopek.studyguide.model.courses.CourseRegistry, String) */ @FXML private void handleAddCourseFrom() { StudyPlan studyPlan = studyGuideApplication.getStudyPlan(); if (studyPlan == null) { AlertCreator.showAlert(Alert.AlertType.ERROR, m...
public void onFixedConstraint(FixedConstraintEvent event) {
1
kanjielu/jeeves
src/main/java/com/cherry/jeeves/service/SyncServie.java
[ "@JsonIgnoreProperties(ignoreUnknown = true)\npublic class SyncCheckResponse {\n @JsonProperty\n private int retcode;\n @JsonProperty\n private int selector;\n\n public int getRetcode() {\n return retcode;\n }\n\n public void setRetcode(int retcode) {\n this.retcode = retcode;\n ...
import com.cherry.jeeves.domain.response.SyncCheckResponse; import com.cherry.jeeves.domain.response.SyncResponse; import com.cherry.jeeves.domain.response.VerifyUserResponse; import com.cherry.jeeves.domain.shared.*; import com.cherry.jeeves.enums.MessageType; import com.cherry.jeeves.enums.RetCode; import com.cherry....
package com.cherry.jeeves.service; @Component public class SyncServie { private static final Logger logger = LoggerFactory.getLogger(SyncServie.class); @Autowired private CacheService cacheService; @Autowired private WechatHttpServiceInternal wechatHttpService; @Autowired(required = false) ...
SyncCheckResponse syncCheckResponse = wechatHttpService.syncCheck(
0
jcgay/send-notification
send-notification/src/test/java/SlackExample.java
[ "@AutoValue\npublic abstract class Application {\n\n /**\n * Uniquely identify an application. <br>\n * In order to ensure your application's signature is unique, the recommendation is to follow the Internet Media\n * type (also known as MIME content type) format as defined in IETF <a href=\"http://t...
import fr.jcgay.notification.Application; import fr.jcgay.notification.Icon; import fr.jcgay.notification.Notification; import fr.jcgay.notification.Notifier; import fr.jcgay.notification.SendNotification; import java.net.URL;
class SlackExample { public static void main(String[] args) { URL icon = SlackExample.class.getResource("/image/dialog-clean.png"); Application application = Application.builder() .id("slack-example") .name("Slack Example") .icon(Icon.create(icon, "app")) ...
Notification notification = Notification.builder()
2
RepreZen/KaiZen-OpenAPI-Editor
com.reprezen.swagedit.core/src/com/reprezen/swagedit/core/assist/JsonProposalProvider.java
[ "public abstract class AbstractNode {\n\n private final Model model;\n private final JsonPointer pointer;\n private final AbstractNode parent;\n\n private String property;\n private TypeDefinition type;\n private Location start;\n private Location end;\n\n AbstractNode(Model model, AbstractN...
import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashSet; import java.util.List; import java.util.Objects; import org.apache.commons.lang3.math.NumberUtils; import com.fasterxml.jackson.core.JsonPointer; import com.fasterxml.jackson.da...
/******************************************************************************* * Copyright (c) 2016 ModelSolv, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is a...
if (StringUtils.emptyToNull(prefix) != null && property.startsWith(prefix)) {
8
850759383/ZhihuDailyNews
app/src/main/java/com/yininghuang/zhihudailynews/home/ZhihuThemeFragment.java
[ "abstract public class BaseActivity extends AppCompatActivity {\n\n public static final int DARK_THEME = 0;\n public static final int LIGHT_THEME = 1;\n\n @Override\n protected void onResume() {\n super.onResume();\n if ((getThemeId() == DARK_THEME && !UserSettingConstants.DARK_THEME) || (...
import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.design.widget.Snackbar; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import...
package com.yininghuang.zhihudailynews.home; /** * Created by Yining Huang on 2016/10/31. */ public class ZhihuThemeFragment extends BaseFragment implements ZhihuThemeContract.View { private AutoLoadRecyclerView mContentRec; private SwipeRefreshLayout mSwipeLayout; private ZhihuThemeAdapter mAdapte...
if (((BaseActivity) getActivity()).getThemeId() == BaseActivity.DARK_THEME)
0
betroy/xifan
app/src/main/java/com/troy/xifan/util/PatternUtils.java
[ "public class App extends Application {\n public static final String TAG = \"Xifan\";\n private static App sInstance;\n\n private UserRes user;\n\n private List<Activity> mActivityList = new ArrayList<>();\n\n public App() {\n sInstance = this;\n }\n\n @Override\n public void onCreate...
import android.content.Context; import android.graphics.drawable.Drawable; import android.text.Html; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.Spanned; import android.text.style.URLSpan; import android.text.util.Linkify; import android.widget.TextView; import com.tro...
package com.troy.xifan.util; /** * Created by chenlongfei on 2016/11/25. */ public final class PatternUtils { // #话题# public static final String REGEX_TOPIC = "#[\\p{Print}\\p{InCJKUnifiedIdeographs}&&[^#]]+#"; // [表情] public static final String REGEX_EMOTION = "\\[(\\S+?)\\]"; // url publ...
textView.setMovementMethod(ClickLinkMovementMethod.getInstance());
2
liuyes/ssopay-qywx
ssopay-qywx-admin/src/main/java/com/ssopay/qywx/shiro/service/impl/ShiroDbRealmImpl.java
[ "public class Constants {\r\n\tpublic static final ResourceBundle bundle = ResourceBundle.getBundle(\"application\");\r\n\tpublic static final String HASH_ALGORITHM = \"SHA-1\";\r\n\tpublic static final int HASH_INTERATIONS = 1024;\r\n\tpublic static final int SALT_SIZE = 8;\r\n\t/**\r\n\t * 是否需要发送email\r\n\t */\r\...
import java.io.Serializable; import java.util.List; import javax.annotation.PostConstruct; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache.shiro.authc.SimpleAuthenticationInfo; import org.apache...
package com.ssopay.qywx.shiro.service.impl; /** * 自实现用户与权限查询. * 演示关系,密码用明文存储,因此使用默认 的SimpleCredentialsMatcher. */ public class ShiroDbRealmImpl extends AuthorizingRealm implements ShiroDbRealm { @Autowired
private UserService userService;
3
pktczwd/tcc-transaction
tcc-transaction-tutorial-sample/tcc-transaction-sample/tcc-transaction-redpacket/src/main/java/org/pankai/tcctransaction/sample/redpacket/service/RedPacketTradeOrderService.java
[ "public class TransactionContext implements Serializable{\n\n private TransactionXid xid;\n private int status;\n\n private Map<String,String> attachments = new ConcurrentHashMap<>();\n\n public TransactionContext(){\n\n }\n\n public TransactionContext(TransactionXid xid,int status){\n this...
import org.pankai.tcctransaction.Compensable; import org.pankai.tcctransaction.api.TransactionContext; import org.pankai.tcctransaction.sample.external.dto.RedPacketTradeOrderDto; import org.pankai.tcctransaction.sample.redpacket.domain.entity.RedPacketAccount; import org.pankai.tcctransaction.sample.redpacket.domain.e...
package org.pankai.tcctransaction.sample.redpacket.service; /** * Created by pktczwd on 2016/12/26. */ @Service public class RedPacketTradeOrderService { @Autowired private RedPacketAccountRepository redPacketAccountRepository; @Autowired
private TradeOrderRepository tradeOrderRepository;
5
dhbw-horb/forgetIT
forgetIT/src/forgetit/gui/MainWindow.java
[ "@javax.persistence.Entity\npublic class Entity implements Serializable {\n\n\tprivate int id;\n\tprivate String title;\n\tprivate String description;\n\n\tprivate Status status;\n\n\tprivate Function priority;\n\n\tprivate Date startDate;\n\n\tprivate Date endDate;\n\n\tprivate List<Tag> tags;\n\n\tprivate List<En...
import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Butt...
/* * Copyright 2011 DHBW Stuttgart Campus Horb * * 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 la...
controller.addEntitiesView(new ViewCalendar(comCal));
2
iChun/Sync
src/main/java/me/ichun/mods/sync/common/packet/PacketSyncRequest.java
[ "public class SyncStartEvent extends PlayerEvent \n{\n\n /**\n *\n * Event is triggered when a sync is started.\n * Fields:\n * prevPlayerTag - Equivalent to player.writeToNBT(NBTTagCompound); This will be read next time. Changing entityPlayer's information will not affect information in this NBT...
import com.google.common.collect.ImmutableList; import io.netty.buffer.ByteBuf; import me.ichun.mods.ichunutil.common.core.network.AbstractPacket; import me.ichun.mods.sync.api.SyncStartEvent; import me.ichun.mods.sync.common.Sync; import me.ichun.mods.sync.common.shell.ShellHandler; import me.ichun.mods.sync.common.ti...
package me.ichun.mods.sync.common.packet; public class PacketSyncRequest extends AbstractPacket { private static final List<String> CAP_NBT_BLACKLIST = ImmutableList.of("baubles:container"); public BlockPos pos; public int dimID; public BlockPos shellPos; public int shellDimID; public Packe...
if(targetShell instanceof TileEntityShellStorage)
5
komamitsu/fluency
fluency-treasuredata/src/main/java/org/komamitsu/fluency/treasuredata/FluencyBuilderForTreasureData.java
[ "public class Fluency\n implements Flushable, Closeable\n{\n private static final Logger LOG = LoggerFactory.getLogger(Fluency.class);\n private final Buffer buffer;\n private final Flusher flusher;\n private final Emitter emitter = new Emitter();\n\n // Fluency has this public constructor, bu...
import org.komamitsu.fluency.Fluency; import org.komamitsu.fluency.ingester.Ingester; import org.komamitsu.fluency.recordformat.RecordFormatter; import org.komamitsu.fluency.treasuredata.ingester.TreasureDataIngester; import org.komamitsu.fluency.treasuredata.ingester.sender.TreasureDataSender; import org.komamitsu.flu...
/* * Copyright 2019 Mitsunori Komatsu (komamitsu) * * 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...
private Ingester buildIngester(TreasureDataSender.Config senderConfig)
1
srcdeps/srcdeps-core
srcdeps-core/src/test/java/org/srcdeps/core/impl/scm/JGitScmTest.java
[ "public class BuildRequest {\n /**\n *\n * A builder for {@link BuildRequest}s.\n *\n */\n public static class BuildRequestBuilder {\n\n private boolean addDefaultBuildArguments = true;\n private boolean addDefaultBuildEnvironment = true;\n private List<String> buildArgume...
import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.ResetCommand.ResetType; import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.er...
/** * Copyright 2015-2019 Maven Source Dependencies * Plugin contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
.output(LineConsumer::dummy) //
5
stardogventures/stardao
stardao-mongodb/src/main/java/io/stardog/stardao/mongodb/mapper/jackson/JacksonDocumentMapper.java
[ "@AutoValue\npublic abstract class Field {\n public abstract String getName();\n public abstract String getStorageName();\n public abstract boolean isOptional();\n public abstract boolean isCreatable();\n public abstract boolean isUpdatable();\n\n public abstract Field.Builder toBuilder();\n pu...
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; import com.fasterxml.jackson.dat...
package io.stardog.stardao.mongodb.mapper.jackson; public class JacksonDocumentMapper<M> implements DocumentMapper<M> { private final Class<M> modelClass; private final ObjectMapper objectMapper; private final ObjectMapper extendedJsonMapper; private final Map<String,String> objectToDocumentFieldRena...
for (Field field : fieldData.getMap().values()) {
0
GoogleCloudPlatform/appengine-java-vm-runtime
appengine-jetty-managed-runtime/src/main/java/com/google/apphosting/vmruntime/jetty9/VmRuntimeWebAppContext.java
[ "public class DatastoreSessionStore implements SessionStore {\n\n private static final Logger logger = Logger.getLogger(DatastoreSessionStore.class.getName());\n\n static final String SESSION_ENTITY_TYPE = \"_ah_SESSION\";\n static final String EXPIRES_PROP = \"_expires\";\n static final String VALUES_PROP = \"...
import com.google.appengine.api.memcache.MemcacheSerialization; import com.google.appengine.spi.ServiceFactoryFactory; import com.google.apphosting.api.ApiProxy; import com.google.apphosting.api.ApiProxy.LogRecord; import com.google.apphosting.runtime.DatastoreSessionStore; import com.google.apphosting.runtime.Deferred...
/** * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ap...
protected static final int MAX_RESPONSE_SIZE = CommitDelayingOutputStream.MAX_RESPONSE_SIZE_BYTES;
4
zugaldia/android-robocar
mobile/app/src/main/java/com/zugaldia/robocar/mobile/debug/DebugActivity.java
[ "public class IntentRouter {\n\n private Activity mActivity;\n private int mFromId;\n\n public IntentRouter(Activity activity){\n mActivity= activity;\n }\n\n public IntentRouter navigateFrom(int id){\n mFromId = id;\n return this;\n }\n\n public void to(int toId) {\n\n ...
import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.NavigationView; import android.support.design.widget.Snackbar; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import andr...
package com.zugaldia.robocar.mobile.debug; public class DebugActivity extends AppCompatActivity implements NavigationView.OnNavigationItemSelectedListener, HTTPRequestListener { @BindView(R.id.button_left) Button buttonLeft; @BindView(R.id.button_right) Button buttonRight; @BindView(R.id.button_up...
client.postMove(new RobocarMove(Nes30Manager.BUTTON_LEFT_CODE), callback);
5
taoneill/war
war/src/main/java/com/tommytony/war/ui/JoinTeamUI.java
[ "public class Team {\n\tprivate final Warzone warzone;\n\tRandom teamSpawnRandomizer = new Random();\n\tprivate List<Player> players = new ArrayList<Player>();\n\tprivate List<Player> teamChatPlayers = new ArrayList<Player>();\n\tprivate List<Location> teamSpawns;\n\tprivate Location teamFlag = null;\n\tprivate Str...
import com.google.common.collect.ImmutableList; import com.tommytony.war.Team; import com.tommytony.war.War; import com.tommytony.war.Warzone; import com.tommytony.war.config.TeamConfig; import com.tommytony.war.config.TeamKind; import com.tommytony.war.config.WarzoneConfig; import org.bukkit.ChatColor; import org.bukk...
package com.tommytony.war.ui; /** * Created by Connor on 7/25/2017. */ public class JoinTeamUI extends ChestUI { private final Warzone warzone; public JoinTeamUI(Warzone warzone) { super(); this.warzone = warzone; } @Override public void build(final Player player, Inventory inv) { UIFormatter formatte...
Team team = warzone.getTeamByKind(kind);
0
vector-im/riot-automated-tests
VectorMobileTests/src/test/java/mobilestests_android/RiotAdminAndModerationTests.java
[ "public class RiotMemberDetailsPageObjects extends TestUtilities{\n\tprivate AndroidDriver<MobileElement> driver;\n\tpublic RiotMemberDetailsPageObjects(AppiumDriver<MobileElement> myDriver) throws InterruptedException{\n\t\tPageFactory.initElements(new AppiumFieldDecorator(myDriver), this);\n\t\tdriver=(AndroidDri...
import java.io.FileNotFoundException; import java.io.IOException; import java.lang.reflect.Method; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeGroups; import org.testng.annotations.Listeners; import org.testng.annotations.Test; import com.esotericsoftware.yam...
roomPageB.roomNameTextView.click(); roomPageB.activeMembersTextView.click(); RiotRoomDetailsPageObjects roomDetailsB = new RiotRoomDetailsPageObjects(appiumFactory.getAndroidDriver2()); roomDetailsB.getMemberByName(riotUserCDisplayName).click(); RiotMemberDetailsPageObjects memberPageUserC=new RiotMemberDetai...
riotUserAAccessToken=HttpsRequestsToMatrix.login(riotUserADisplayName, Constant.DEFAULT_USERPWD);
5
xdtianyu/Gallery
app/src/main/java/org/xdty/gallery/activity/ViewerActivity.java
[ "public class Application extends android.app.Application {\n\n private static AppComponent sAppComponent;\n\n @Inject\n protected Setting mSetting;\n\n public static AppComponent getAppComponent() {\n return sAppComponent;\n }\n\n @Override\n public void onCreate() {\n super.onCr...
import android.content.Intent; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import androidx.annotation.Nullable; import com.google.android.material.snackbar.Snackbar; import andro...
package org.xdty.gallery.activity; public class ViewerActivity extends AppCompatActivity implements ViewPager.OnPageChangeListener, ViewerContact.View { public static final String TAG = ViewerActivity.class.getSimpleName(); private static final int AUTO_HIDE_DELAY_MILLIS = 3000; @Inject ...
.appModule(new AppModule((Application) getApplication()))
2
hawkular/hawkular-android-client
mobile/src/main/java/org/hawkular/client/android/fragment/MetricCounterFragment.java
[ "public final class HawkularApplication extends Application {\n\n public static Retrofit retrofit;\n private RefWatcher refWatcher;\n\n @Override\n public void onCreate() {\n super.onCreate();\n\n setUpLogging();\n setUpDetections();\n setUpPush();\n setUpLeakCanary();...
import android.os.Bundle; import android.support.annotation.IdRes; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.widget.SwipeRefreshLayout; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInfla...
/* * Copyright 2015-2017 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://w...
private Metric getMetric() {
2
koendeschacht/count-db
src/main/java/be/bagofwords/db/remote/RemoteDatabaseInterfaceFactory.java
[ "public interface DataInterface<T extends Object> extends DataIterable<KeyValue<T>> {\n\n T read(long key);\n\n default long readCount(long key) {\n Long result = (Long) read(key);\n if (result == null)\n return 0;\n else\n return result;\n }\n\n default T read...
import be.bagofwords.db.DataInterface; import be.bagofwords.db.impl.BaseDataInterfaceFactory; import be.bagofwords.db.impl.BaseDataInterface; import be.bagofwords.db.combinator.Combinator; import be.bagofwords.db.methods.ObjectSerializer; import be.bagofwords.minidepi.ApplicationContext;
package be.bagofwords.db.remote; public class RemoteDatabaseInterfaceFactory extends BaseDataInterfaceFactory { private final String host; private final int port; public RemoteDatabaseInterfaceFactory(ApplicationContext context) { super(context); this.host = context.getProperty("socket.h...
protected synchronized <T extends Object> BaseDataInterface<T> createBaseDataInterface(String name, Class<T> objectClass, Combinator<T> combinator, ObjectSerializer<T> objectSerializer, boolean isTemporaryDataInterface) {
4
PeterisP/morphology
src/tools/java/lv/semti/Vardnicas/VardadienuImport.java
[ "public class Analyzer extends Lexicon {\r\n\r\n\tpublic boolean enablePrefixes = true;\r\n\tpublic boolean meklētsalikteņus = false;\r\n\tpublic boolean enableGuessing = false;\r\n\tpublic boolean enableDiminutive = true;\r\n\tpublic boolean enableDerivedNouns = true; // FIXME - šim vajag saprast korektu terminu\r...
import lv.semti.morphology.attributes.AttributeValues; import lv.semti.morphology.lexicon.Lexeme; import lv.semti.morphology.lexicon.Paradigm; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.io.PrintWriter; import java.util.HashSet...
/******************************************************************************* * Copyright 2012, 2014 Institute of Mathematics and Computer Science, University of Latvia * Author: Pēteris Paikens * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Gen...
Set<Lexeme> deletables = new HashSet<Lexeme>();
5
adamin1990/MaterialWpp
wpp/app/src/main/java/adamin90/com/wpp/Activity/SearchActivity.java
[ "public class Constant {\n public static final String BASEURL=\"http://client.pic.hiapk.com/\";\n}", "public class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.MyHolder> {\n\n private List<Datum> list;\n\n public SearchAdapter(List<Datum> list) {\n this.list = list;\n }\n\n @Ov...
import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar...
package adamin90.com.wpp.Activity; public class SearchActivity extends AppCompatActivity implements OnMoreListener { @Bind(R.id.toolbar) Toolbar toolbar; @Bind(R.id.recyclerview) SuperRecyclerView recyclerView; private String keyword; private int page=1; private int limit=24; private i...
.baseUrl(Constant.BASEURL)
0
webpagebytes/demo-cms-app
src/main/java/com/webpagebytes/wpbsample/controllers/PerformTransactionController.java
[ "public class Account {\r\n\tprivate int user_id;\r\n\tprivate long balance;\r\n\t\r\n\tpublic int getUser_id() {\r\n\t\treturn user_id;\r\n\t}\r\n\tpublic void setUser_id(int user_id) {\r\n\t\tthis.user_id = user_id;\r\n\t}\r\n\tpublic long getBalance() {\r\n\t\treturn balance;\r\n\t}\r\n\tpublic void setBalance(l...
import com.webpagebytes.cms.exception.WPBException; import com.webpagebytes.wpbsample.data.Account; import com.webpagebytes.wpbsample.data.Session; import com.webpagebytes.wpbsample.data.Transaction; import com.webpagebytes.wpbsample.data.User; import com.webpagebytes.wpbsample.utility.HashService; import java.io...
/* * Copyright 2015 Webpagebytes * * 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 ...
Transaction transaction = database.createTransaction(user_id, destination_user_id, amount);
2
CagataySonmez/EdgeCloudSim
src/edu/boun/edgecloudsim/applications/sample_app3/SampleEdgeOrchestrator.java
[ "public class SimManager extends SimEntity {\r\n\tprivate static final int CREATE_TASK = 0;\r\n\tprivate static final int CHECK_ALL_VM = 1;\r\n\tprivate static final int GET_LOAD_LOG = 2;\r\n\tprivate static final int PRINT_PROGRESS = 3;\r\n\tprivate static final int STOP_SIMULATION = 4;\r\n\t\r\n\tprivate String s...
import java.util.List; import org.cloudbus.cloudsim.Vm; import org.cloudbus.cloudsim.core.CloudSim; import org.cloudbus.cloudsim.core.SimEvent; import edu.boun.edgecloudsim.core.SimManager; import edu.boun.edgecloudsim.core.SimSettings; import edu.boun.edgecloudsim.edge_orchestrator.EdgeOrchestrator; import edu.boun.ed...
/* * Title: EdgeCloudSim - Edge Orchestrator * * Description: * SampleEdgeOrchestrator offloads tasks to proper server * In this scenario mobile devices can also execute tasks * * Licence: GPL - http://www.gnu.org/copyleft/gpl.html * Copyright (c) 2017, Bogazici University, Istanbul, Turkey */ ...
numberOfHost=SimSettings.getInstance().getNumOfEdgeHosts();
1
Nilhcem/frcndict-android
src/com/nilhcem/frcndict/search/SearchAsync.java
[ "public final class Log {\n\n\tprivate static final boolean LOG_ERROR = Config.LOGLEVEL > 0;\n\tprivate static final boolean LOG_WARN = Config.LOGLEVEL > 1;\n\tprivate static final boolean LOG_INFO = Config.LOGLEVEL > 2;\n\tprivate static final boolean LOG_DEBUG = Config.LOGLEVEL > 3;\n\n\tprivate Log() {\n\t\tthro...
import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Locale; import android.database.Cursor; import android.os.AsyncTask; import com.nilhcem.frcndict.core.Log; import com.nilhcem.frcndict.core.list.AbstractSearchService; import com.nilhcem.frc...
package com.nilhcem.frcndict.search; public final class SearchAsync extends AsyncTask<String, String, List<Entry>> { private final ListAdapter mRefAdapter;
private final DictDbHelper mDatabase;
3
AstroGypsophila/TryGank
TryGank/app/src/main/java/com/gypsophila/trygank/business/RemoteService.java
[ "public abstract class BaseActivity extends AppCompatActivity {\n\n protected RequestManager requestManager = null;\n private Context mContext;\n\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n mContext = this;\n requestManager = new RequestManager();\n super....
import android.content.Context; import com.gypsophila.commonlib.activity.BaseActivity; import com.gypsophila.commonlib.net.DefaultThreadPool; import com.gypsophila.commonlib.net.HttpRequest; import com.gypsophila.commonlib.net.RequestCallback; import com.gypsophila.commonlib.net.RequestParameter; import java.util.List;
package com.gypsophila.trygank.business; public class RemoteService { private static RemoteService service = null; private RemoteService() { } public static synchronized RemoteService getInstance() { if (RemoteService.service == null) { RemoteService.service = new RemoteServi...
public void invoke(final BaseActivity activity,
0
ccrama/Slide-RSS
app/src/main/java/me/ccrama/rssslide/Adapters/FeedAdapter.java
[ "public class ReaderMode extends BaseActivityAnim {\n\n public static final String EXTRA_URL = \"url\";\n public static String html;\n SpoilerRobotoTextView v;\n String url;\n\n\n @Override\n public void onCreate(Bundle savedInstanceState) {\n overrideSwipeFromAnywhere();\n super.onC...
import android.app.Activity; import android.app.NotificationManager; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Handler; import android.support.v4.app.NotificationManagerCompat; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.w...
package me.ccrama.rssslide.Adapters; /** * Created by ccrama on 3/22/2015. */ public class FeedAdapter extends RealmRecyclerViewAdapter<Article, RecyclerView.ViewHolder> { private final RecyclerView listView; private final SwipeRefreshLayout refreshLayout; public Activity context; public DataSet...
Intent i = new Intent(context, ReaderMode.class);
0
shillner/unleash-maven-plugin
plugin/src/main/java/com/itemis/maven/plugins/unleash/steps/checks/CheckPluginVersions.java
[ "public class ArtifactCoordinates {\n private String groupId;\n private String artifactId;\n private String version;\n private String type;\n private String classifier;\n\n public ArtifactCoordinates(String groupId, String artifactId, String version) {\n this(groupId, artifactId, version, null, null);\n }...
import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; import java.util.Set; import javax.inject.Inject; import javax.inject.Named; import org.apache.maven.model.Build; import org.apache....
package com.itemis.maven.plugins.unleash.steps.checks; /** * Checks that none of the project modules references SNAPSHOT plugins since this would potentially lead to * non-reproducible release artifacts. * * @author <a href="mailto:stanley.hillner@itemis.de">Stanley Hillner</a> * @since 1.0.0 */ @ProcessingS...
return Sets.newHashSet(Collections2.transform(snapshots, PluginToCoordinates.INSTANCE));
3
campaignmonitor/createsend-java
src/com/createsend/Segments.java
[ "public class PagedResult<T> {\r\n public T[] Results;\r\n public String ResultsOrderedBy;\r\n public String OrderDirection;\r\n public int PageNumber;\r\n public int PageSize;\r\n public int RecordsOnThisPage;\r\n public int TotalNumberOfRecords;\r\n public int NumberOfPages;\r\n \r\n ...
import com.createsend.util.exceptions.CreateSendException; import com.createsend.util.jersey.JsonProvider; import com.sun.jersey.core.util.MultivaluedMapImpl; import javax.ws.rs.core.MultivaluedMap; import java.util.Date; import com.createsend.models.PagedResult; import com.createsend.models.segments.ClauseResult...
/** * Copyright (c) 2011 Toby Brain * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, mer...
new ErrorDeserialiser<RuleCreationFailureDetails>(), "segments", listID + ".json");
1
FIXTradingCommunity/timpani
src/main/java/org/fixtrading/timpani/websockets/SecurityDefSocket.java
[ "public class JsonCodec {\n\n private class DateDeserializer implements JsonDeserializer<LocalDate> {\n public LocalDate deserialize(JsonElement json, Type typeOfT,\n JsonDeserializationContext context) throws JsonParseException {\n return LocalDate.parse(json.getAsJsonPrimitive().getAsString());\n ...
import java.io.IOException; import java.util.function.Consumer; import org.eclipse.jetty.util.log.Log; import org.eclipse.jetty.util.log.Logger; import org.eclipse.jetty.websocket.api.CloseStatus; import org.eclipse.jetty.websocket.api.Session; import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage; impo...
/** * Copyright 2016 FIX Protocol Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
return codec.decode(message, SecurityDefinitionRequestImpl.class);
5
nextgis/android_maplib
src/main/java/com/nextgis/maplib/map/TMSLayer.java
[ "public interface IJSONStore\n{\n /**\n * Store object in json\n * @return json object with stored data\n * @throws JSONException\n */\n JSONObject toJSON()\n throws JSONException;\n\n /**\n * Restore object from json\n * @param jsonObject where the stored data are\n ...
import android.content.Context; import android.graphics.Bitmap; import android.net.Uri; import android.util.Log; import com.nextgis.maplib.R; import com.nextgis.maplib.api.IJSONStore; import com.nextgis.maplib.api.IProgressor; import com.nextgis.maplib.datasource.TileItem; import com.nextgis.maplib.display.TMSRenderer;...
} } return null; } public void clearCache() { if (mBitmapCache != null) mBitmapCache.clear(); } @Override public JSONObject toJSON() throws JSONException { JSONObject rootConfig = super.toJSON(); rootConfig.put(JSON_TM...
protected void fillFromZipInt(Uri uri, IProgressor progressor) throws IOException, NGException, RuntimeException {
6
psidnell/ofexport2
src/test/java/org/psidnell/omnifocus/integrationtest/IntegrationTest.java
[ "public class ApplicationContextFactory {\n\n public static final String CONFIG_XML = \"/config.xml\";\n private static final String CONFIG_PROPERTIES = \"/config.properties\";\n\n public static ApplicationContext getContext() {\n return new ClassPathXmlApplicationContext(CONFIG_XML);\n }\n\n ...
import org.psidnell.omnifocus.sqlite.SQLiteDAO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; import static org.junit.Assert.*; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.LinkedList; import java.util.functi...
/* * Copyright 2015 Paul Sidnell * * 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...
ApplicationContext appContext = ApplicationContextFactory.getContext();
0
de-luxe/burstcoin-observer
src/main/java/burstcoin/observer/service/PoolService.java
[ "public class ObserverProperties\n{\n private static final Logger LOG = LoggerFactory.getLogger(ObserverProperties.class);\n private static final String STRING_LIST_PROPERTY_DELIMITER = \",\";\n private static final Properties PROPS = new Properties();\n\n static\n {\n try\n {\n PROPS.load(new FileI...
import burstcoin.observer.ObserverProperties; import burstcoin.observer.bean.PoolBean; import burstcoin.observer.event.PoolUpdateEvent; import burstcoin.observer.service.model.Account; import burstcoin.observer.service.model.AccountIds; import burstcoin.observer.service.model.Block; import burstcoin.observer.service.mo...
/* * The MIT License (MIT) * * Copyright (c) 2017 by luxe - https://github.com/de-luxe - BURST-LUXE-RED2-G6JW-H4HG5 * * 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, ...
}, 200, ObserverProperties.getPoolRefreshInterval());
0
KorAP/Koral
src/main/java/de/ids_mannheim/korap/query/serialize/MapBuilder.java
[ "public class KoralGroup implements KoralObject {\n\n private static final KoralType type = KoralType.GROUP;\n\n private KoralOperation operation;\n\n private boolean inOrder = false;\n private List<KoralObject> operands;\n private List<KoralDistance> distances;\n private List<KoralFrame> frames;\...
import java.util.Map; import de.ids_mannheim.korap.query.object.KoralGroup; import de.ids_mannheim.korap.query.object.KoralObject; import de.ids_mannheim.korap.query.object.KoralSpan; import de.ids_mannheim.korap.query.object.KoralTerm; import de.ids_mannheim.korap.query.object.KoralTermGroup; import de.ids_mannheim.ko...
package de.ids_mannheim.korap.query.serialize; /** * @author margaretha * */ public class MapBuilder { /** Builds a query map containing JSON-LD serialization parts of the given KoralObject. * @param o * @return a map */ public static Map<String, Object> buildQueryMap(KoralObject o) { ...
else if (o instanceof KoralSpan){
2
Androguide/Pimp_my_Z1
PimpMyZ1/src/com/androguide/honamicontrol/cards/CardSeekBarVibrator.java
[ "public final class CMDProcessor {\r\n private static final String TAG = \"CMDProcessor\";\r\n\r\n public CMDProcessor() {\r\n\r\n }\r\n\r\n /* Run a system command with full redirection */\r\n public static ChildProcess startSysCmd(String[] cmdarray, String childStdin) {\r\n return new ChildP...
import android.annotation.TargetApi; import android.content.Context; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.LightingColorFilter; import android.graphics.drawable.Drawable; import android.graphics.drawable.LayerDrawable; import android.os.Build; import android.os...
/** Copyright (C) 2013 Louis Teboul (a.k.a Androguide) * * admin@pimpmyrom.org || louisteboul@gmail.com * http://pimpmyrom.org || http://androguide.fr * 71 quai Clémenceau, 69300 Caluire-et-Cuire, FRANCE. * * This program is free software; you can redistribute it and/or modify * it under the...
CMDProcessor.runSuCommand("busybox echo " + prog + " > " + MiscInterface.VIBRATOR_SYSFS);
0
AndyGu/ShanBay
src/com/shanbay/words/review/experience/ExpDataTransferHelper.java
[ "public class Example extends Model\n{\n public String annotation;\n public String first;\n public long id;\n public String last;\n public int likes;\n public String mid;\n public String nickname;\n public String translation;\n public int unlikes;\n public long userid;\n public String username;\n public...
import com.shanbay.words.model.Example; import com.shanbay.words.model.ExampleContent; import com.shanbay.words.model.ExampleData; import com.shanbay.words.model.ExpReview; import com.shanbay.words.model.Roots; import com.shanbay.words.model.RootsContent; import com.shanbay.words.model.RootsData; import com.shanbay.wor...
package com.shanbay.words.review.experience; public class ExpDataTransferHelper { public ExampleData getExampleData(ExpReview paramExpReview) { ExampleData localExampleData = new ExampleData(); ArrayList<ExampleContent> list = new ArrayList<ExampleContent>();
Iterator<Example> localIterator = paramExpReview.sysExamples.iterator();
0
socialsensor/storm-focused-crawler
src/main/java/eu/socialsensor/focused/crawler/WikirateCrawler.java
[ "public class MediaTextIndexerBolt extends BaseRichBolt {\n\n\t/**\n\t * \n\t */\n\tprivate static final long serialVersionUID = -7500656732029697927L;\n\t\n\tprivate Logger logger;\n\t\n\tprivate String service;\n\n\tprivate SolrMediaItemHandler _solrMediaHandler;\n\n\tprivate ArrayBlockingQueue<MediaItem> queue;\...
import java.net.UnknownHostException; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.XMLConfiguration; import org.apache.log4j.Logger; import eu.socialsensor.focused.crawler.bolts.media.MediaTextIndexerBolt; import eu.socialsensor.focused.crawler.bolts.media.Medi...
package eu.socialsensor.focused.crawler; public class WikirateCrawler { private static Logger logger = Logger.getLogger(WikirateCrawler.class); public static void main(String[] args) throws UnknownHostException { XMLConfiguration config; try { if(args.length == 1) config = new XMLConfiguration(...
wpDeserializer = new WebPageDeserializationBolt(webPagesChannel);
6
acromusashi/acromusashi-stream-ml
src/test/java/acromusashi/stream/ml/clustering/kmeans/KmeansCalculatorTest.java
[ "public class CentroidMapping\n{\n /** ベース中心点のインデックス */\n private int baseIndex;\n\n /** マージ対象中心点のインデックス */\n private int targetIndex;\n\n /** ユークリッド距離 */\n private double euclideanDistance;\n\n /**\n * パラメータを指定せずにインスタンスを生成する。\n */\n public CentroidMapping()\n {}\n\n /**\...
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; import java.io.File; import java.io.IOException; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.Stri...
/** * Copyright (c) Acroquest Technology Co, Ltd. All Rights Reserved. * Please read the associated COPYRIGHTS file for more details. * * THE SOFTWARE IS PROVIDED BY Acroquest Technolog Co., Ltd., * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FIT...
KmeansDataSet actual = KmeansCalculator.createDataModel(pointList, 3, 100, 0.5d);
2
DDoS/JICI
src/main/java/ca/sapon/jici/lexer/literal/number/IntLiteral.java
[ "public class Environment {\n // TODO make me thread safe\n private static final Map<String, Class<?>> DEFAULT_CLASSES = new HashMap<>();\n private final Map<String, Class<?>> classes = new LinkedHashMap<>(DEFAULT_CLASSES);\n private final Map<String, Variable> variables = new LinkedHashMap<>();\n\n ...
import ca.sapon.jici.lexer.TokenID; import ca.sapon.jici.util.StringUtil; import ca.sapon.jici.evaluator.Environment; import ca.sapon.jici.evaluator.EvaluatorException; import ca.sapon.jici.evaluator.type.PrimitiveType; import ca.sapon.jici.evaluator.type.Type; import ca.sapon.jici.evaluator.value.Value; import ca.sapo...
/* * 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...
return PrimitiveType.THE_INT;
2
messaginghub/pooled-jms
pooled-jms/src/main/java/org/messaginghub/pooled/jms/pool/PooledSessionHolder.java
[ "public class JmsPoolMessageProducer implements MessageProducer, AutoCloseable {\n\n private final JmsPoolSession session;\n private final MessageProducer messageProducer;\n private final Destination destination;\n\n private final AtomicInteger refCount;\n private final boolean anonymousProducer;\n ...
import org.messaginghub.pooled.jms.JmsPoolMessageProducer; import org.messaginghub.pooled.jms.JmsPoolQueueSender; import org.messaginghub.pooled.jms.JmsPoolSession; import org.messaginghub.pooled.jms.JmsPoolTopicPublisher; import org.messaginghub.pooled.jms.util.LRUCache; import java.util.Map; import java.util.concurre...
/* * 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 ...
private final ProducerLRUCache<JmsPoolQueueSender> cachedSenders;
1
maizi0122/Ripened
ripened/src/main/java/org/studio/maizi/ripened/impl/Ripened.java
[ "public interface IPlugin {\n\n /**\n * get the name of this plugin.\n *\n * @return the name of this plugin.\n */\n String getName();\n\n /**\n * the plugin's action\n *\n * @param params the params of action\n */\n void action(ActionParams params);\n\n}", "public inte...
import android.view.View; import android.widget.Adapter; import org.studio.maizi.ripened.IPlugin; import org.studio.maizi.ripened.IRipened; import org.studio.maizi.ripened.VIContext; import org.studio.maizi.ripened.anno.ResId; import org.studio.maizi.ripened.dto.ActionParams; import org.studio.maizi.ripened.exception.V...
/* * $HomePage: https://github.com/maizi0122/ $ * $Revision: 000001 $ * $Date: 2015-10-18 09:05:31 -0000 (Sun, 18 Oct 2015) $ * * ==================================================================== * Copyright (C) 2015 The Maizi-Studio Open Source Project * * Licensed under the Apache License, Version 2....
Type type = null;
6
ethlo/itu
src/main/java/com/ethlo/time/internal/EthloITU.java
[ "public static int indexOfNonDigit(final char[] text, int offset)\n{\n for (int i = offset; i < text.length; i++)\n {\n if (isNotDigit(text[i]))\n {\n return i;\n }\n }\n return -1;\n}", "public static int parsePositiveInt(final char[] strNum, int startInclusive, int en...
import java.util.Arrays; import com.ethlo.time.DateTime; import com.ethlo.time.Field; import com.ethlo.time.LeapSecondException; import com.ethlo.time.TimezoneOffset; import static com.ethlo.time.internal.LeapSecondHandler.LEAP_SECOND_SECONDS; import static com.ethlo.time.internal.LimitedCharArrayIntegerUtil.indexOfNon...
package com.ethlo.time.internal; /*- * #%L * Internet Time Utility * %% * Copyright (C) 2017 Morten Haraldsen (ethlo) * %% * 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 * * ht...
return parsePositiveInt(chars, 11, 13);
1
aqfaridi/Code-Online-Judge
src/java/submitaction.java
[ "public class Ranking implements Serializable {\n \n String userid;\n String contestid;\n \n double Ascore;\n long Atime;\n int Apanalty;\n \n double Bscore;\n long Btime;\n int Bpanalty;\n \n double Cscore;\n long Ctime;\n int Cpanalty;\n \n double Dscore;\n lo...
import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import pojo.Ranking; import pojo.Submissions; import java.util.Date; import pojo.Problems; im...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author faridi */ public class submitaction extends HttpServlet { HttpSession session=null; /** * Processes r...
SessionFactory factory = new ConnectionProvider().getSessionFactory();
5
sqrlserverjava/sqrl-server-base
src/test/java/com/github/sqrlserverjava/backchannel/SqrlCommandProcessorOptsIgnoredForQueryTest.java
[ "@XmlRootElement\npublic class SqrlConfig {\n\t// @formatter:off\n\t/* *********************************************************************************************/\n\t/* *************************************** REQUIRED ********************************************/\n\t/* *******************************************...
import static junit.framework.TestCase.assertTrue; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.junit.After; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; import com.github....
package com.github.sqrlserverjava.backchannel; /** * Some opts are to be <b>ignored</b> on a query command, test it * * @author Dave Badia * */ @RunWith(Parameterized.class) public class SqrlCommandProcessorOptsIgnoredForQueryTest { @Parameters(name = "{index}: SqrlClientOpt=({0})") public static Collecti...
for(final SqrlRequestOpt opt : SqrlRequestOpt.values()) {
6
Azure/azure-storage-android
microsoft-azure-storage-test/src/com/microsoft/azure/storage/table/TableClientTests.java
[ "public final class OperationContext {\n\n /**\n * The default log level, or null if disabled. The default can be overridden to turn on logging for an individual\n * operation context instance by using setLoggingEnabled.\n */\n private static Integer defaultLogLevel;\n\n /**\n * Indicates w...
import com.microsoft.azure.storage.LocationMode; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.RequestResult; import com.microsoft.azure.storage.ResultSegment; import com.microsoft.azure.storage.RetryContext; import com.microsoft.azure.storage.RetryExponentialRetry; import com....
/** * Copyright Microsoft Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
@Category({ DevFabricTests.class, DevStoreTests.class, CloudTests.class })
2
ameba-proteus/triton-server
src/main/java/com/amebame/triton/service/cassandra/method/TritonCassandraColumnMethods.java
[ "public static ConsistencyLevel consistency(Consistency consistency) {\n\tif (consistency == Consistency.all) {\n\t\treturn ConsistencyLevel.ALL;\n\t} else if (consistency == Consistency.any) {\n\t\treturn ConsistencyLevel.ANY;\n\t} else if (consistency == Consistency.each_quorum) {\n\t\treturn ConsistencyLevel.EAC...
import static com.amebame.triton.service.cassandra.CassandraConverter.consistency; import static com.amebame.triton.service.cassandra.CassandraConverter.toObject; import static com.amebame.triton.service.cassandra.CassandraConverter.toObjectArray; import static com.datastax.driver.core.querybuilder.QueryBuilder.batch; ...
package com.amebame.triton.service.cassandra.method; public class TritonCassandraColumnMethods { private static final String KEY_NAME = "id"; private static final String COLUMN_NAME = "column"; private static final String VALUE_NAME = "value";
private TritonCassandraClient client;
4
scarletsky/Bangumi-Android
app/src/main/java/io/github/scarletsky/bangumi/ui/fragments/EpsFragment.java
[ "public class EpAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {\n\n private static final String TAG = EpAdapter.class.getSimpleName();\n private SessionManager session = BangumiApplication.getInstance().getSession();\n private Context ctx;\n private List<Ep> data;\n\n public EpAdapter...
import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.View...
package io.github.scarletsky.bangumi.ui.fragments; /** * Created by scarlex on 15-7-9. */ public class EpsFragment extends Fragment { private static final String TAG = EpsFragment.class.getSimpleName();
private List<Ep> data = new ArrayList<>();
1
tim-savage/SavageDeathChest
src/main/java/com/winterhavenmc/deathchest/listeners/BlockEventListener.java
[ "public final class PluginMain extends JavaPlugin {\n\n\tpublic MessageBuilder<MessageId, Macro> messageBuilder;\n\tpublic WorldManager worldManager;\n\tpublic SoundConfiguration soundConfig;\n\tpublic ChestManager chestManager;\n\tpublic CommandManager commandManager;\n\tpublic ProtectionPluginRegistry protectionP...
import com.winterhavenmc.deathchest.PluginMain; import com.winterhavenmc.deathchest.permissions.BreakChestAction; import com.winterhavenmc.deathchest.permissions.PermissionCheck; import com.winterhavenmc.deathchest.permissions.ResultAction; import com.winterhavenmc.deathchest.chests.DeathChest; import com.winterhavenmc...
/* * Copyright (c) 2022 Tim Savage. * * 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, version 3. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WAR...
private final PermissionCheck permissionCheck;
2
struberg/juel
modules/impl/src/main/java/de/odysseus/el/tree/impl/Builder.java
[ "public abstract class ELContext {\r\n\tprivate final Map<Class<?>, Object> context = new HashMap<Class<?>, Object>();\r\n\r\n\tprivate Locale locale;\r\n\tprivate boolean resolved;\r\n\r\n\t/**\r\n\t * Returns the context object associated with the given key. The ELContext maintains a\r\n\t * collection of context...
import de.odysseus.el.tree.impl.Scanner.ScanException; import java.io.PrintWriter; import java.util.EnumSet; import javax.el.ELContext; import javax.el.ELException; import javax.el.ELResolver; import javax.el.FunctionMapper; import javax.el.VariableMapper; import de.odysseus.el.tree.Bindings; import de.odysseu...
/* * Copyright 2006-2009 Odysseus Software GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
public Tree build(String expression) throws TreeBuilderException {
3
8Yards/Nebula_Android
src/org/nebula/activities/Register.java
[ "public class RESTProfileManager extends Resource {\r\n\r\n\tpublic RESTProfileManager() {\r\n\t\tsuper(\"RESTProfiles\");\r\n\t}\r\n\r\n\tpublic Status register(Profile p) throws ClientProtocolException,\r\n\t\t\tIOException, JSONException {\r\n\t\tHashMap<String, Object> h = new HashMap<String, Object>();\r\n\t\t...
import org.nebula.R; import org.nebula.client.rest.RESTProfileManager; import org.nebula.main.NebulaApplication; import org.nebula.models.MyIdentity; import org.nebula.models.Profile; import org.nebula.models.Status; import android.app.Activity; import android.os.Bundle; import android.view.View; import androi...
/* * author: saad ali * rearchitecture and programming: saad ali, prajwol * validation: sharique */ package org.nebula.activities; public class Register extends Activity { public static final int REGISTER_SUCCESSFULL = 11; public static final int REGISTER_FAILURE = 10; private EditText fullName;...
Profile newProfile = new Profile(0, userName.getText().toString(),
3
albfernandez/javadbf
src/test/java/com/linuxense/javadbf/bug95memory/Bug95BigFilesTest.java
[ "public enum DBFDataType {\n\t/**\n\t * Default unknown type\n\t */\n\tUNKNOWN ((byte) 0),\n\t/**\n\t * Character data, padded with whitespaces.\n\t */\n\tCHARACTER ('C', 1, 254, 0, true),\n\t/**\n\t * Character data, not padded\n\t */\n\tVARCHAR ('V', 1, 254, 0, false),\n\t/**\n\t * Binary...
import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; import org.junit.Ignore; import org.junit.Test; import com.linuxense.javadbf.DBFDataType; import com.linuxense.javadbf.DBFField; import c...
package com.linuxense.javadbf.bug95memory; public class Bug95BigFilesTest { public Bug95BigFilesTest() { super(); } @Test @Ignore public void testBigFile() throws IOException { File f = Files.createTempFile("bigfile", ".dbf").toFile(); System.out.println("creating file: " + f.getAbsolutePath()); cr...
DBFWriter writer = null;
4
fstab/promagent
promagent-framework/promagent-internal/src/test/java/io/promagent/internal/instrumentationtests/LifecycleTest.java
[ "public class ClassLoaderCache {\n\n private static ClassLoaderCache instance;\n\n // TODO: The cache does not free class loaders when applications are undeployed. Maybe use WeakHashMap?\n private final Map<ClassLoader, PerDeploymentClassLoader> cache = new HashMap<>();\n private final URLClassLoader sh...
import io.promagent.agent.ClassLoaderCache; import io.promagent.hookcontext.MetricsStore; import io.promagent.internal.Delegator; import io.promagent.internal.HookMetadata; import io.promagent.internal.instrumentationtests.classes.Fruit; import io.promagent.internal.instrumentationtests.classes.IParameterTypesExample; ...
// Copyright 2017 The Promagent Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
ClassLoaderCache classLoaderCache = Util.mockClassLoaderCache();
0
advantageous/ddp-client-java
examples/java-fx/src/main/java/io/advantageous/ddp/example/SampleApplication.java
[ "public class ConnectedMessage {\n\n private String session;\n\n public String getSession() {\n return session;\n }\n\n public void setSession(String session) {\n this.session = session;\n }\n}", "public interface DDPMessageEndpoint {\n void disconnect() throws IOException;\n\n ...
import javax.inject.Inject; import java.io.IOException; import com.google.inject.Guice; import io.advantageous.ddp.ConnectedMessage; import io.advantageous.ddp.DDPMessageEndpoint; import io.advantageous.ddp.ErrorMessage; import io.advantageous.ddp.subscription.Subscription; import io.advantageous.ddp.subscription.Subsc...
/* * Copyright (C) 2014. Geoffrey Chandler. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
endpoint.registerHandler(ErrorMessage.class, message -> LOGGER.error(message.getReason()));
2
XiaoMi/misound
src/com/xiaomi/mitv/soundbarapp/fragment/PanelFragment.java
[ "public class DefaultMisoundDevice implements IMiSoundDevice{\n private IMiSoundDevice mAgent;\n\n public DefaultMisoundDevice(Context context){\n mAgent = SoundBarServiceNative.getInstance(context);\n }\n\n /**\n * register a callback to listen the mibar status,\n * @param callback the c...
import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.*; import com.xiaomi.mitv.soundbar.DefaultMisoundDevice; import com.xiaomi.mitv.soundbar.IMiSoundDevice; import com.xiaomi....
@Override public void onSeekChanged(RoundSeekBar bar, int vol, boolean fromUser) { showVol(vol); if(vol==0){ mVolumeProgressTextView.setVisibility(View.GONE); ((View)findViewById(R.id.main_panel_vol_val_title)).setVisibility(View.GONE); ...
final EQStyleResource res = manager.getResourceById(styleId);
4
Leaking/WeGit
app/src/main/java/com/quinn/githubknife/interactor/UserInfoInteractorImpl.java
[ "public class GitHubAccount {\n\n\n private static final String TAG = \"GitHubAccount\";\n\n public static final String ACCOUNT_TYPE = \"com.githubknife\";\n\n private final Account account;\n\n private final AccountManager manager;\n\n private volatile static GitHubAccount instance;\n\n private C...
import android.content.Context; import android.os.Handler; import android.os.Message; import android.text.TextUtils; import com.quinn.githubknife.R; import com.quinn.githubknife.account.GitHubAccount; import com.quinn.githubknife.listener.OnLoadUserInfoListener; import com.quinn.githubknife.model.GithubService; import ...
package com.quinn.githubknife.interactor; /** * Created by Quinn on 7/22/15. */ public class UserInfoInteractorImpl implements UserInfoInteractor { private final static String TAG = UserInfoInteractorImpl.class.getSimpleName(); private final static int USER_MSG = 1; private final static int FOLLOW_S...
User user = (User) msg.obj;
7
gruter/cloumon-oozie
src/main/java/org/cloumon/gruter/oozie/web/WorkflowController.java
[ "@Controller\npublic class BaseController{\n\tprotected static final Logger logger = LoggerFactory.getLogger(BaseController.class);\n\n\t@Autowired\n\tprivate WebApplicationContext ctx;\n\tprotected MappingJacksonHttpMessageConverter jsonConverter = new MappingJacksonHttpMessageConverter();\n\n\tprotected WebAppli...
import java.io.IOException; import java.util.HashMap; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import org.cloumon.gruter.common.BaseController; import org.cloumon.gruter.oozie.model.OozieApp; import org.cloumon.gruter.oozie.model.OozieJob; import org.cloumon.gruter.oozie.service....
package org.cloumon.gruter.oozie.web; @Controller public class WorkflowController extends BaseController{ @Resource(type=WorkflowService.class) private IWorkflowService workflowService; @RequestMapping(value = "workflow/workflow.do") protected ModelAndView getWorkflowView() throws Exception { return new ...
OozieApp app = new OozieApp();
1
jawher/immanix
src/main/java/immanix/matchers/Succ5Matcher.java
[ "public interface EventReader {\n\n boolean hasNext();\n\n XMLEvent next() throws XMLStreamException;\n\n EventReader unwrap();\n\n}", "public final class MatcherResult<T> {\n public final T data;\n public final EventReader reader;\n public final List<XMLEvent> consumedEvents;\n\n private fin...
import immanix.EventReader; import immanix.MatcherResult; import immanix.StaxMatcher; import immanix.tuples.Tuple2; import immanix.tuples.Tuple4; import immanix.tuples.Tuple5; import javax.xml.stream.XMLStreamException;
package immanix.matchers; public class Succ5Matcher<T1, T2, T3, T4, T5> extends StaxMatcher<Tuple5<T1, T2, T3, T4, T5>> { private SuccMatcher<Tuple4<T1, T2, T3, T4>, T5> m; private final String str; public Succ5Matcher(StaxMatcher<T1> m1, StaxMatcher<T2> m2, StaxMatcher<T3> m3, StaxMatcher<T4> m4, StaxM...
MatcherResult<Tuple2<Tuple4<T1, T2, T3, T4>, T5>> res = m.match(reader);
3
PuffOpenSource/Puff-Android
app/src/main/java/sun/bob/leela/ui/activities/AddTypeDialogActivity.java
[ "public class App extends Application {\n @Override\n public void onCreate(){\n super.onCreate();\n AccountHelper.getInstance(getApplicationContext());\n CategoryHelper categoryHelper = CategoryHelper.getInstance(getApplicationContext());\n TypeHelper typeHelper = TypeHelper.getIns...
import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.support.v4.view.ViewCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; impo...
package sun.bob.leela.ui.activities; public class AddTypeDialogActivity extends AppCompatActivity { private AppCompatButton buttonOK, buttonCancel; private AppCompatSpinner categorySpinner; private AppCompatImageView imageView; private String imgPath; private EditText etName; @Override ...
Picasso.with(this).load(ResUtil.getInstance(null).getBmpUri(imgPath))
7
RutledgePaulV/q-builders
src/test/java/com/github/rutledgepaulv/qbuilders/visitors/PredicateVisitorTest.java
[ "@SuppressWarnings(\"unchecked\")\npublic class QBuilder<T extends QBuilder<T>> implements Partial<T> {\n\n protected LogicalNode root;\n protected LogicalNode current;\n\n public QBuilder() {\n root = current = new OrNode();\n }\n\n public final <S extends Enum<S>> EnumProperty<T,S> enumerati...
import com.github.rutledgepaulv.qbuilders.builders.QBuilder; import com.github.rutledgepaulv.qbuilders.conditions.Condition; import com.github.rutledgepaulv.qbuilders.properties.concrete.ConditionProperty; import com.github.rutledgepaulv.qbuilders.properties.concrete.EnumProperty; import com.github.rutledgepaulv.qbuild...
public void doesNotExist() { compare(myString().doesNotExist(), BAA, ABB); } @Test public void testDoesNotExistListField() { compare(myListOfStrings().doesNotExist()); } @Test public void inNonListField() { compare(myString().in("testing6", "testing5"), BAB, BBA); ...
public class UserQuery extends QBuilder<UserQuery> {
0
jclawson/hazeltask
hazeltask-core/src/main/java/com/hazeltask/executor/DistributedExecutorServiceImpl.java
[ "public class HazeltaskServiceListener<T extends ServiceListenable<T>> {\n public void onBeginStart(T svc){};\n public void onEndStart(T svc){};\n public void onBeginShutdown(T svc){};\n public void onEndShutdown(T svc){};\n}", "public class HazeltaskTopology<GROUP extends Serializable> {\n private...
import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.UUID; import java.util.concurrent.Callable; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutionException; import java.util.concu...
package com.hazeltask.executor; /** * @author jclawson * */ @Slf4j public class DistributedExecutorServiceImpl<GROUP extends Serializable> implements DistributedExecutorService<GROUP> { private ExecutorConfig<GROUP> executorConfig;
private final HazeltaskTopology<GROUP> topology;
1
schibsted/triathlon
src/test/java/com/schibsted/triathlon/operators/ClusterOperatorTest.java
[ "public class ConstraintModel {\n static List<String> VALID_OPERATORS = new ArrayList<String>() {{\n add(\"UNIQUE\");\n add(\"CLUSTER\");\n add(\"GROUP_BY\");\n add(\"LIKE\");\n add(\"UNLIKE\");\n }};\n\n public String getField() {\n return field;\n }\n\n pub...
import com.netflix.eureka2.interests.ChangeNotification; import com.netflix.eureka2.registry.datacenter.BasicDataCenterInfo; import com.netflix.eureka2.registry.datacenter.DataCenterInfo; import com.netflix.eureka2.registry.instance.InstanceInfo; import com.netflix.eureka2.registry.instance.NetworkAddress; import com.n...
/* * Copyright (c) 2015 Schibsted Products and Technology * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
ConstraintModel constraintModel = ConstraintModel.createConstraintModel(constraint);
0
BlochsTech/BitcoinCardTerminal
src/com/blochstech/bitcoincardterminal/View/PinPage.java
[ "public final class R {\n public static final class attr {\n }\n public static final class color {\n public static final int ThinBlue=0x7f050002;\n public static final int ThinRed=0x7f050001;\n public static final int WhiteNothing=0x7f050000;\n /** Scanner \n */\n ...
import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.TextView; import com.blochstech.bitcoincardterminal.R; import com.b...
if(PageManager.Instance().isInitialized(PageManager.ViewModelTags.PIN_PAGE_VM)){ myVM = SyntacticSugar.<PinPageVM>castAs(PageManager.Instance().getVM(PageManager.ViewModelTags.PIN_PAGE_VM)); } if(myVM == null){ myVM = new PinPageVM(); PageManager.Instance().setVM(PageManager.ViewModelTa...
MessageManager.Instance().AddMessage(ex.toString(), true);
6
wangjiegulu/RapidRouter
app/src/main/java/com/wangjie/rapidrouter/example/activity/MainActivity.java
[ "public class RapidRouter {\n private static OnRapidRouterListener onRapidRouterListener;\n\n public static void setOnRapidRouterListener(OnRapidRouterListener onRapidRouterListener) {\n RapidRouter.onRapidRouterListener = onRapidRouterListener;\n }\n\n private static final String TAG = RapidRout...
import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Toast; import com.wangjie.rapidrouter.core.RapidRouter; import com.wangjie.rapidrouter.core.RouterStuff; import com.wangjie.rapidrouter.core.listener.RouterGoAfterCallback; import com.wangjie.rapidrouter.core.listener.Rou...
package com.wangjie.rapidrouter.example.activity; public class MainActivity extends BaseActivity implements View.OnClickListener { private static final String TAG = MainActivity.class.getSimpleName(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceSta...
.goAfter(new RouterGoAfterCallback() {
2
kinnla/eniac
src/eniac/window/OVPanel.java
[ "public class Configuration extends ParentData {\n\n\tprivate IDManager _idManager = new IDManager();\n\n\t// ============================ lifecycle\n\t// ===================================\n\n\tpublic Configuration() {\n\t\t// empty\n\t}\n\n\tpublic void dispose() {\n\t\tsuper.dispose();\n\t\t_idManager.dispose()...
import java.awt.AWTEvent; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Image; import java.awt.Point; import java.awt.Rectangle; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import java.awt.event.MouseEvent; import java.awt.image.BufferedIma...
/******************************************************************************* * Copyright (c) 2003-2005, 2013 Till Zoppke. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0 * which accompanies this distribution, and is available...
Descriptor d = EType.XOR_IMAGE.getDescriptor(lod);
1
OHDSI/WhiteRabbit
whiterabbit/src/main/java/org/ohdsi/whiteRabbit/scan/SourceDataScan.java
[ "public class DbType {\r\n\tpublic static DbType\tMYSQL\t\t= new DbType(\"mysql\");\r\n\tpublic static DbType\tMSSQL\t\t= new DbType(\"mssql\");\r\n\tpublic static DbType\tPDW\t\t\t= new DbType(\"pdw\");\r\n\tpublic static DbType\tORACLE\t\t= new DbType(\"oracle\");\r\n\tpublic static DbType\tPOSTGRESQL\t= new DbTy...
import java.io.*; import java.sql.ResultSet; import java.sql.SQLException; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; import com.epam.parso.Column; import com.epam.parso.SasFileProperties; import com.epam.parso.SasFileReader; import com....
public boolean isFreeText = false; public boolean tooManyValues = false; public UniformSamplingReservoir samplingReservoir; public Object average; public Object stdev; public Object minimum; public Object maximum; public Object q1; public Object q2; public Object q3; public FieldInfo(S...
.sorted(Comparator.<Map.Entry<String, Count>>comparingInt(e -> e.getValue().count).reversed())
5
mit-dig/punya
appinventor/components/src/com/google/appinventor/components/runtime/LinkedDataForm.java
[ "public enum PropertyCategory {\n // TODO(user): i18n category names\n BEHAVIOR(\"Behavior\"),\n APPEARANCE(\"Appearance\"),\n LINKED_DATA(\"Linked Data\"),\n DEPRECATED(\"Deprecated\"),\n UNSET(\"Unspecified\");\n\n private String name;\n\n PropertyCategory(String categoryName) {\n name = categoryName;\...
import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.UUID; import com.google.appinventor.components.annotations.DesignerComponent; import com.google.appinventor.components.annotations.DesignerProperty; import com.google.appinventor.components.annotations.PropertyCategory; impor...
package com.google.appinventor.components.runtime; /** * Linked Data Form provides a layout in which contained form elements will be * used to generate structured data. This form is used in conjunction with * the LinkedData component. * * @see LinkedData * @see LinkedDataStore * @author Evan W. Patton <ewpa...
@SimpleProperty(category = PropertyCategory.LINKED_DATA,
0
nyholku/purejavacomm
src/jtermios/solaris/JTermiosImpl.java
[ "public class JTermios {\n\n\t// Note About the read/write methods and the buffers\n\t//\n\t// This library provides read/write(byte[] buffer,int length) without an offset\n\t// to the buffer. This is because it appears that there is a bug in JNA's use of\n\t// ByteBuffer.wrap(byte[] buffer,int offset,int length) i...
import com.sun.jna.ptr.IntByReference; import java.io.File; import java.util.*; import java.util.regex.Pattern; import jtermios.JTermios; import jtermios.Pollfd; import jtermios.Termios; import jtermios.TimeVal; import static jtermios.JTermios.*; import static jtermios.JTermios.JTermiosLogging.log; import com.sun.jna.*...
public void perror(String msg); public int tcsendbreak(int fd, int duration); } public interface NonDirectCLib extends com.sun.jna.Library { public int select(int n, fd_set read, fd_set write, fd_set error, timeval timeout); public int poll(pollfd.ByReference pfds, int nfds,...
public termios(jtermios.Termios t) {
2
optimatika/ojAlgo-finance
src/main/java/org/ojalgo/finance/data/DataSource.java
[ "public class AlphaVantageFetcher implements DataFetcher {\n\n private final CalendarDateUnit myResolution;\n private final ResourceLocator myResourceLocator;\n private final String mySymbol;\n\n public AlphaVantageFetcher(final String symbol, final CalendarDateUnit resolution, final String apiKey, bool...
import java.time.LocalDate; import java.time.LocalTime; import java.time.ZoneId; import java.time.ZoneOffset; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.function.Supplier; import org.ojalgo.array.DenseArray; import org.ojalgo.array.Primitive64Array; import org.ojal...
/* * Copyright 1997-2022 Optimatika * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish...
IEXTradingParser parser = new IEXTradingParser();
5
CalebKussmaul/GIFKR
src/gui/Animation.java
[ "public abstract class ImageFilter implements Comparable<ImageFilter> {\n\n\t@ControlOverride(max = \"360\")\n\tpublic double angle = 0;\n\t@ControlOverride(animationControl = ControlType.STATIC)\n\tpublic static boolean rotateCorrection;\n\t@ControlOverride(animationControl = ControlType.STATIC)\n\tpublic boolean ...
import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.image.BufferedImage; import java.io.File; import java.io.FilenameFilter; import java.io.IOException; import javax.imageio.ImageIO; import javax.imageio.stream.FileImageOutputStream; import javax.imageio.stream.ImageOutputStream; im...
package gui; public class Animation { private ImageFilter filter; private int frames;
private ImageSequence sequence;
5
chudooder/FEMultiplayer
src/net/fe/lobbystage/ClientLobbyStage.java
[ "public class FEMultiplayer extends Game{\n\tprivate static Stage currentStage;\n\tprivate static Client client;\n\tprivate static Player localPlayer;\n\t\n\tpublic static Player turn;\n\tpublic static ClientOverworldStage map;\n\tpublic static ClientLobbyStage lobby;\n\tpublic static ConnectStage connect;\n\t\n\t/...
import java.util.List; import net.fe.FEMultiplayer; import net.fe.FEResources; import net.fe.Party; import net.fe.Player; import net.fe.Session; import net.fe.modifier.Modifier; import net.fe.network.Message; import net.fe.network.message.ReadyMessage; import net.fe.network.message.StartPicking; import org.newdawn.slic...
package net.fe.lobbystage; /** * Lobby where the players wait before the game. * @author Shawn * */ public class ClientLobbyStage extends LobbyStage { public static final Color BORDER_DARK = new Color(0x483828); public static final Color BORDER_LIGHT = new Color(0xf8f0c8); public static final Color NEUTRA...
Renderer.drawBorderedRectangle(x, y, x+26, y+28, renderDepth, Party.TEAM_BLUE.brighter(), BORDER_LIGHT, BORDER_DARK);
6
ktisha/Crucible4IDEA
src/com/jetbrains/crucible/ui/toolWindow/details/DetailsPanel.java
[ "@SuppressWarnings(\"ComponentNotRegistered\")\npublic class AddCommentAction extends AnActionButton implements DumbAware {\n\n private final Editor myEditor;\n private final Review myReview;\n private final boolean myIsReply;\n @Nullable private final FilePath myFilePath;\n\n public AddCommentAction(@NotNull ...
import com.intellij.icons.AllIcons; import com.intellij.ide.BrowserUtil; import com.intellij.ide.impl.TypeSafeDataProviderAdapter; import com.intellij.ide.util.PropertiesComponent; import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.SimpleToolWindowPan...
package com.jetbrains.crucible.ui.toolWindow.details; /** * User: ktisha * <p/> * Show changes and general comments for review */ public class DetailsPanel extends SimpleToolWindowPanel { private static final String GENERAL_COMMENTS_VISIBILITY_PROPERTY = "CodeReview.GeneralComments.Visible"; private static ...
private final CrucibleSettings myCrucibleSettings = CrucibleSettings.getInstance();
2