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
miurahr/tmpotter
src/main/java/org/tmpotter/filters/tmx/TmxFilter.java
[ "@SuppressWarnings(\"serial\")\npublic class Document {\n\n private final ArrayList<String> documentSegments;\n\n public Document() {\n documentSegments = new ArrayList<>();\n }\n\n public Document(List<String> sentences) {\n documentSegments = new ArrayList<>(sentences);\n }\n\n pub...
import org.tmpotter.util.TmxWriter2; import java.io.File; import java.util.HashMap; import java.util.Map; import org.tmpotter.core.Document; import org.tmpotter.core.TmxEntry; import org.tmpotter.filters.FilterContext; import org.tmpotter.filters.IFilter; import org.tmpotter.filters.IParseCallback; import org.tmpotter....
/* ************************************************************************* * * TMPotter - Bi-text Aligner/TMX Editor * * Copyright (C) 2016 Hiroshi Miura * * This file is part of TMPotter. * * TMPotter is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public...
public boolean isFileSupported(File inFile, Map<String, String> config, FilterContext context) {
2
gentoku/pinnacle-api-client
src/examples/PlaceSpecialBet.java
[ "public class Parameter extends ParameterCore {\n\n\t/**\n\t * Constructor.\n\t */\n\tprivate Parameter () {\n\t\tsuper();\n\t}\n\t\n\t/**\n\t * Factory\n\t * \n\t * @return\n\t */\n\tpublic static Parameter newInstance() {\n\t\treturn new Parameter();\n\t}\n\n\n\t/**\n\t * ID of the target sports.\n\t * \n\t * @pa...
import pinnacle.api.Parameter; import pinnacle.api.PinnacleAPI; import pinnacle.api.PinnacleException; import pinnacle.api.dataobjects.PlacedSpecialBet; import pinnacle.api.enums.ODDS_FORMAT; import pinnacle.api.enums.WIN_RISK_TYPE;
package examples; public class PlaceSpecialBet { public static void main(String[] args) throws PinnacleException { // settings String username = "yourUserName"; String password = "yourPassword";
PinnacleAPI api = PinnacleAPI.open(username, password);
1
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...
if (!isAvailable(i)) { AlertDialog d = new AlertDialog.Builder(DetailActivity.this) .setTitle(getString(R.string.app_name)) .setMessage("There are no bitcoin wallet app installed, do you want to install GreenBits?") .setNegativeButton("No, ...
Bitmap bitmap = IdenticonGenerator.generate(message.getAlias());
2
mangstadt/vinnie
src/test/java/com/github/mangstadt/vinnie/io/VObjectReaderTest.java
[ "public class DebugDataListener implements VObjectDataListener {\n\tpublic void onComponentBegin(String name, Context context) {\n\t\tSystem.out.println(\"onComponentBegin(\\\"\" + name + \"\\\", \" + context + \")\");\n\t}\n\n\tpublic void onComponentEnd(String name, Context context) {\n\t\tSystem.out.println(\"on...
import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Matchers.isNull; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.spy; import static org.mockito.Mockit...
* Asserts that it can unfold folded lines. */ @Test public void folded_lines() throws Exception { //@formatter:off String string = "PROP:fo\r\n" + " lded\r\n" + "PROP:fo\r\n" + "\tlded\r\n" + "PROP:fo\r\n" + " \r\n" + //empty folded line " lded\r\n" + "PROP:fo\r\n" + " \tlded\r\n" + "PROP:...
inorder.verify(listener).onWarning(eq(Warning.QUOTED_PRINTABLE_ERROR), eq(errorDecoding), any(DecoderException.class), any(Context.class));
3
simonpercic/AirCycle
aircycle-compiler/src/main/java/com/github/simonpercic/aircycle/manager/ClassGenerator.java
[ "public final class AirCycleConfig {\n\n private final boolean passIntentBundleOnCreate;\n @Nullable private final Set<Integer> ignoredLifecycleCallbacks;\n\n private AirCycleConfig(boolean passIntentBundleOnCreate, @Nullable Set<Integer> ignoredLifecycleCallbacks) {\n this.passIntentBundleOnCreate ...
import com.github.simonpercic.aircycle.AirCycle; import com.github.simonpercic.aircycle.AirCycleConfig; import com.github.simonpercic.aircycle.BaseAirCycle; import com.github.simonpercic.aircycle.model.FieldListenerMethods; import com.github.simonpercic.aircycle.model.ListenerMethod; import com.github.simonpercic.aircy...
package com.github.simonpercic.aircycle.manager; /** * AirCycle listener class type spec generator. * * @author Simon Percic <a href="https://github.com/simonpercic">https://github.com/simonpercic</a> */ @Singleton public class ClassGenerator { private static final String CLASS_SUFFIX = AirCycle.class.getS...
Map<ActivityLifecycleType, List<FieldListenerMethods>> methods) {
2
onesocialweb/osw-lib-gwt
src/org/onesocialweb/gwt/service/imp/GwtInbox.java
[ "public class GwtActivityDomReader extends ActivityDomReader {\n\n\t@Override\n\tprotected AclDomReader getAclDomReader() {\n\t\treturn new GwtAclDomReader();\n\t}\n\n\t@Override\n\tprotected ActivityFactory getActivityFactory() {\n\t\treturn new DefaultActivityFactory();\n\t}\n\n\t@Override\n\tprotected AtomDomRea...
import java.util.ArrayList; import java.util.List; import org.onesocialweb.gwt.model.GwtActivityDomReader; import org.onesocialweb.gwt.service.RequestCallback; import org.onesocialweb.gwt.service.Stream; import org.onesocialweb.gwt.service.StreamEvent; import org.onesocialweb.gwt.service.StreamEvent.Type; import org.on...
/* * Copyright 2010 Vodafone Group Services 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 appli...
ActivityDomReader reader = new GwtActivityDomReader();
0
Plinz/Hive_Game
src/main/java/engine/Emulator.java
[ "public class Board implements Cloneable{\n\n\tprivate ArrayList<Column> columns;\n\tprivate int nbPieceOnTheBoard;\n\n\tpublic Board() {\n\t\tinit();\n\t\tnbPieceOnTheBoard = 0;\n\t}\n\n\tpublic Board(Board b) {\n\t\tcolumns = new ArrayList<Column>();\n\t\tfor (Column column : b.getBoard()) {\n\t\t\tColumn newColu...
import java.util.Collection; import java.util.List; import main.java.model.Board; import main.java.model.HelpMove; import main.java.model.Piece; import main.java.model.Player; import main.java.model.Tile; import main.java.utils.Consts; import main.java.utils.CoordGene;
package main.java.engine; public class Emulator{ Core core;
Board board;
0
romainmoreau/e-paper
e-paper-client-api/src/main/java/fr/romainmoreau/epaper/client/api/table/CellContentDrawer.java
[ "public enum Color {\n\tBLACK, DARK_GRAY, LIGHT_GRAY, WHITE;\n}", "public class EPaperException extends Exception {\n\tprivate static final long serialVersionUID = 1L;\n\n\tpublic EPaperException() {\n\t\tsuper();\n\t}\n\n\tpublic EPaperException(String message, Throwable cause, boolean enableSuppression, boolean...
import java.io.IOException; import fr.romainmoreau.epaper.client.api.Color; import fr.romainmoreau.epaper.client.api.EPaperException; import fr.romainmoreau.epaper.client.api.FontSize; import fr.romainmoreau.epaper.client.api.HorizontalAlignment; import fr.romainmoreau.epaper.client.api.VerticalAlignment;
package fr.romainmoreau.epaper.client.api.table; public interface CellContentDrawer { void drawPadded(int x0, int y0, int x1, int y1, int leftPadding, int rightPadding, int topPadding, int bottomPadding, CellContent cellContent) throws IOException, EPaperException;
void drawText(int x0, int y0, int x1, int y1, Color textColor, Color backgroundColor, FontSize fontSize,
2
sqrlserverjava/sqrl-server-base
src/test/java/com/github/sqrlserverjava/backchannel/SqrlCommandProcessorClientOptsTest.java
[ "@XmlRootElement\npublic class SqrlConfig {\n\t// @formatter:off\n\t/* *********************************************************************************************/\n\t/* *************************************** REQUIRED ********************************************/\n\t/* *******************************************...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import org.junit.After; import org.junit.Before; import org.junit.Test; import com.github.sqrlserverjava.SqrlConfig; import com.github.sqrlserverjava.SqrlPersistence; import com.github.sqrlserverjava.TestCaseUtil; import com.github....
package com.github.sqrlserverjava.backchannel; public class SqrlCommandProcessorClientOptsTest { final String correlator = "abc"; private SqrlConfig config; private SqrlPersistence sqrlPersistence; @Before public void setUp() throws Exception { sqrlPersistence = TestCaseUtil.createEmptySqrlPersiste...
assertTrue(sqrlPersistence.fetchSqrlFlagForIdentity(idk, SqrlIdentityFlag.SQRL_AUTH_ENABLED));
3
JavaMoney/javamoney-shelter
retired/regions/src/main/java/org/javamoney/regions/internal/data/ICURegionTreeProvider.java
[ "public interface Region {\n\n\t/**\n\t * Get the region's type.\n\t * \n\t * @return the region's type, never {@code null}.\n\t */\n\tpublic RegionType getRegionType();\n\n\t/**\n\t * Access the region's code. The code is unique in combination with the\n\t * region type.\n\t * \n\t * @return the region's type, nev...
import java.util.Map; import javax.inject.Singleton; import org.javamoney.regions.Region; import org.javamoney.regions.RegionTreeNode; import org.javamoney.regions.RegionType; import org.javamoney.regions.spi.BuildableRegionNode; import org.javamoney.regions.spi.RegionProviderSpi; import org.javamoney.regions.spi.Regio...
/* * Copyright (c) 2012, 2013, Credit Suisse (Anatole Tresch), Werner Keil. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unle...
private BuildableRegionNode regionTree;
3
Mitchellbrine/DiseaseCraft-2.0
src/main/java/mc/Mitchellbrine/diseaseCraft/modules/med/util/MedUtils.java
[ "public class Disease {\n\n\tprivate String identifier;\n\tprivate String domain;\n\tprivate String lore;\n\n\tprivate List<String> waysToContract;\n\tprivate Map<String,Object[]> contractParameters;\n\n\tpublic List<Integer> effects;\n\n\tpublic int level;\n\tprivate int deathRate = -1;\n\n\tprivate double minimum...
import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.registry.GameData; import cpw.mods.fml.relauncher.FMLInjectionData; import mc.Mitchellbrine.diseaseCraft.api.Disease; import mc.Mitchellb...
package mc.Mitchellbrine.diseaseCraft.modules.med.util; /** * Created by Mitchellbrine on 2015. */ public class MedUtils { public static DamageSource medication = new DamageSource("medication").setDamageBypassesArmor(); private static List<String> medConfigs; public static boolean areMedsActive(EntityLivingBa...
for (String diseaseId : MedicationRecipes.diseaseRemoval.values()) {
5
brmson/blanqa
src/main/java/cz/brmlab/brmson/takepig/basephase/AbstractAnswerGenerator.java
[ "public enum TPLogEntry implements LogEntry {\n\t ANS_TYPE, KEYTERM, PASSAGE, IE, ANS\n}", "public class AnswerJCasManipulator {\n\tpublic static List<Answer> loadAnswers(JCas candidateView, List<String> featureLabels) {\n\t\tList<Answer> result = new ArrayList<Answer>();\n\t\tIterator<?> it = candidateView.getJ...
import java.util.LinkedList; import java.util.List; import org.apache.uima.analysis_engine.AnalysisEngineProcessException; import org.apache.uima.jcas.JCas; import org.oaqa.model.Answer; import edu.cmu.lti.oaqa.ecd.log.AbstractLoggedComponent; import edu.cmu.lti.oaqa.framework.BaseJCasHelper; import edu.cmu.lti.oaqa.fr...
package cz.brmlab.brmson.takepig.basephase; public abstract class AbstractAnswerGenerator extends AbstractLoggedComponent { protected JCas jcas; public abstract List<Answer> generateFinalAnswers( String answerType, List<String> keyterms, List<Answer> answerCandidates); @Override public void process(JCas...
String answerType = AnswerTypeJCasManipulator
2
TritonHo/supportsmallshop-android
src/com/marspotato/supportsmallshop/UpdateShopActivity.java
[ "public class Shop implements Serializable {\r\n\tprivate static final long serialVersionUID = 1L;\r\n\t\r\n\t@Expose\r\n\tpublic String id;\r\n\t@Expose\r\n\tpublic String name;\r\n\t@Expose\r\n\tpublic String shortDescription;\r\n\t@Expose\r\n\tpublic String fullDescription;\r\n\t@Expose\r\n\tpublic String search...
import java.io.UnsupportedEncodingException; import java.math.BigDecimal; import java.math.RoundingMode; import java.net.URLEncoder; import org.joda.time.DateTime; import com.android.volley.DefaultRetryPolicy; import com.android.volley.NetworkError; import com.android.volley.NoConnectionError; import com.androi...
try { String longitude = getValueFromEditTextView(R.id.new_longitude, 20); String latitude = getValueFromEditTextView(R.id.new_latitude, 20); if (longitude.isEmpty() == false && latitude.isEmpty() == false) { BigDecimal lng = new BigDecimal(longitude); BigDecimal lat = new B...
RequestManager.getInstance().getRequestQueue().add(request);
7
etheriau/jatetoolkit
src/main/java/uk/ac/shef/dcs/oak/jate/core/algorithm/NCValueAlgorithm.java
[ "public class JATEException extends Exception {\r\n\tprivate static final long serialVersionUID = -4511571544868986419L;\r\n\r\n\tpublic JATEException(String exception){\r\n\t\tsuper(exception);\r\n\t}\r\n\r\n\tpublic JATEException(Exception e){\r\n\t\tsuper(e);\r\n\t}\r\n\r\n\tpublic JATEException(String exception...
import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import org.apache.log4j.Logger; import uk.ac.shef.dcs.oak.jate.JATEException; import uk.ac.shef.dcs.oak.jate.JATEPro...
package uk.ac.shef.dcs.oak.jate.core.algorithm; /** * An implementation of the NCValue term recognition algorithm. See Frantzi et. al 2000, <i> * Automatic recognition of multi-word terms:. the C-value/NC-value method</i> */ public class NCValueAlgorithm implements Algorithm{ private static final Logger _logger = ...
private final IStopList stoplist;
5
cookpad/puree-android
puree/src/androidTest/java/com/cookpad/puree/outputs/PureeBufferedOutputTest.java
[ "@ParametersAreNonnullByDefault\npublic class PureeConfiguration {\n\n private final Context context;\n\n private final PureeSerializer pureeSerializer;\n\n private final Map<Class<?>, List<PureeOutput>> sourceOutputMap;\n\n private final PureeStorage storage;\n\n private final ScheduledExecutorServi...
import com.cookpad.puree.PureeConfiguration; import com.cookpad.puree.PureeFilter; import com.cookpad.puree.PureeLogger; import com.cookpad.puree.PureeSerializer; import com.cookpad.puree.async.AsyncResult; import com.cookpad.puree.storage.PureeSQLiteStorage; import com.cookpad.puree.storage.PureeStorage; import com.co...
package com.cookpad.puree.outputs; @RunWith(AndroidJUnit4.class) public class PureeBufferedOutputTest { private PureeSerializer pureeSerializer = new PureeSerializer() { @Override public String serialize(Object log) { PvLog pvLog = (PvLog) log; return "{\"name\":\""+...
public Records select(String type, int logsPerRequest) {
7
Ghosts/Maus
src/main/java/GUI/Views/ClientBuilderView.java
[ "public class BottomBar implements Repository {\n private static Label connectionsLabel = null;\n\n public static Label getConnectionsLabel() {\n return connectionsLabel;\n }\n\n public HBox getBottomBar() {\n HBox hBox = new HBox();\n HBox.setHgrow(hBox, Priority.ALWAYS);\n ...
import GUI.Components.BottomBar; import GUI.Components.TopBar; import GUI.Styler; import Logger.Level; import Logger.Logger; import Maus.ClientBuilder; import Maus.Maus; import Server.Data.PseudoBase; import Server.MausSettings; import javafx.geometry.Insets; import javafx.scene.control.Button; import javafx.scene.cont...
package GUI.Views; class ClientBuilderView { private CheckBox persistent; private CheckBox autoSpread; BorderPane getClientBuilderView() { BorderPane borderPane = new BorderPane(); borderPane.getStylesheets().add(getClass().getResource("/css/global.css").toExternalForm()); bord...
HBox hBox = Styler.hContainer(20);
2
signalfx/signalfx-java
signalfx-java/src/main/java/com/signalfx/signalflow/Computation.java
[ "@JsonTypeName(\"CHANNEL_ABORT\")\npublic static class ChannelAbortMessage extends ControlMessage {\n\n protected LinkedHashMap<String, String> abortInfo;\n\n public ChannelAbortMessage() {\n this.channelMessageType = Type.CHANNEL_ABORT;\n }\n\n /**\n * @return Information about the computati...
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; import com.signalfx.signalflow.ChannelMessage.ChannelAbortMess...
/* * Copyright (C) 2016 SignalFx, Inc. All rights reserved. */ package com.signalfx.signalflow; /** * A live handle to a running SignalFlow computation. * * @author dgriff */ public class Computation implements Iterable<ChannelMessage>, Iterator<ChannelMessage> { /** * Enumeration of computation stat...
private DataMessage currentBatchMessage;
1
mszubert/2048
src/main/java/put/ci/cevo/games/game2048/NTuplePlayer2048.java
[ "public class NTuples implements Iterable<NTuple>, Serializable, RealFunction {\n\n\t/** A class helping in building NTuples object */\n\tpublic static class Builder {\n\t\tprivate final List<NTuple> tuples = new ArrayList<NTuple>();\n\n\t\tprivate final SymmetryExpander expander;\n\n\t\tpublic Builder(SymmetryExpa...
import java.io.File; import java.util.List; import net.sourceforge.argparse4j.ArgumentParsers; import net.sourceforge.argparse4j.inf.ArgumentParser; import net.sourceforge.argparse4j.inf.ArgumentParserException; import net.sourceforge.argparse4j.inf.Namespace; import org.apache.commons.math3.random.RandomDataGenerator;...
package put.ci.cevo.games.game2048; public class NTuplePlayer2048 implements Player2048 { @SuppressWarnings("unchecked") private final static SerializationManager serializer = SerializationManagerFactory.create(Lists.newArrayList( new NTuplesSerializer(), new NTupleSerializer(), new IdentitySymmetryExpanderS...
new StandardSymmetryExpanderSerializer()));
4
zhangxx0/WOTPlus
app/src/main/java/com/xinxin/wotplus/fragment/BadgeRecordFragment.java
[ "public class BaseFragment extends Fragment {\n\n protected Subscription subscription;\n\n // 这个好像没啥用唉?\n // 只在一处起了作用?\n protected Activity mActivity;\n\n @Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n mActivi...
import android.content.DialogInterface; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.design.widget.Snackbar; import android.support.v7.app.AlertDialog; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; import android.view.View; im...
package com.xinxin.wotplus.fragment; /** * Created by xinxin on 2016/4/4. * 徽章与战绩Fragment */ public class BadgeRecordFragment extends BaseFragment implements View.OnClickListener { private Statistics statistics; private DeathWheelProgressDialog deathWheelProgressDialog; private ImageView class_ace...
String woterId = PreferenceUtils.getCustomPrefString(getActivity(), "woterId", "woterId", "");
3
wso2-extensions/identity-outbound-auth-samlsso
components/org.wso2.carbon.identity.application.authenticator.samlsso/src/main/java/org/wso2/carbon/identity/application/authenticator/samlsso/logout/util/SAMLLogoutUtil.java
[ "public class SAMLSSOException extends ServletException {\n\n private String errorCode;\n\n public SAMLSSOException(String message) {\n\n super(message);\n }\n\n public SAMLSSOException(String code, String message) {\n\n super(message);\n this.errorCode = code;\n }\n\n public ...
import net.shibboleth.utilities.java.support.security.RandomIdentifierGenerationStrategy; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.joda.time.DateTime; import org.open...
/* * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/li...
} catch (SAMLSSOException e) {
0
TalkingData/Myna
Android/demo_myna/src/main/java/com/talkingdata/myna/demo/TrainActivity.java
[ "public class LSTMClassifier implements ClassifierInterface {\n static {\n System.loadLibrary(\"tensorflow_inference\");\n }\n\n private TensorFlowInferenceInterface inferenceInterface;\n private static final String MODEL_FILE = \"file:///android_asset/optimized_frozen_lstm.pb\";\n private sta...
import android.os.Handler; import android.os.HandlerThread; import android.os.Message; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.talkingdata.myna.LSTMClassifier; i...
package com.talkingdata.myna.demo; public class TrainActivity extends AppCompatActivity { private HashMap<String, Integer> totalActNum = new HashMap<>(); private HashMap<String, Integer> succeededActNumRDT = new HashMap<>(); private String detailedLogStr = null; Handler handler; private final i...
MynaApi.train(new MyTrainTestImpl(), getApplicationContext());
1
shixinzhang/GardenOfFeeling
app/src/main/java/sxkeji/net/dailydiary/http/HttpClient.java
[ "public class Article implements Serializable{\n\n private Long id;\n /** Not-null value. */\n private String date;\n private String address;\n private String weather;\n /** Not-null value. */\n private String title;\n /** Not-null value. */\n private String content;\n private Integer ...
import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.text.TextUtils; import android.util.Log; import android.view.View; import com.avos.avoscloud.AVCloudQueryResult; ...
package sxkeji.net.dailydiary.http; /** * 网络请求 * Created by tiansj on 15/2/27. */ public class HttpClient { static volatile HttpClient singleton = null; private static final MediaType MEDIA_TYPE_PNG = MediaType.parse("image/png"); private String UTF_8 = "UTF-8"; private MediaType MEDIA_TYPE = Me...
if (NetWorkUtils.isNetworkAvailable(context)) {
6
Techjar/VivecraftForgeExtensions_110
src/main/java/com/techjar/vivecraftforge/core/asm/handler/ASMHandlerIncreaseReachDistance.java
[ "public class ObfNames {\n\tpublic static final String ENTITYAICREEPERSWELL = \"ut\";\n\tpublic static final String ENTITYLIVINGBASE = \"sf\";\n\tpublic static final String ENTITYENDERMAN = \"yq\";\n\tpublic static final String ENTITYPLAYER = \"zs\";\n\tpublic static final String VEC3D = \"bcb\";\n\tpublic static f...
import com.techjar.vivecraftforge.core.asm.ObfNames; import net.minecraftforge.fml.relauncher.FMLLaunchHandler; import net.minecraftforge.fml.relauncher.Side; import org.objectweb.asm.Opcodes; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.FieldIns...
package com.techjar.vivecraftforge.core.asm.handler; public class ASMHandlerIncreaseReachDistance extends ASMClassHandler { @Override public ClassTuple getDesiredClass() { return new ClassTuple("net.minecraft.network.NetHandlerPlayServer", ObfNames.NETHANDLERPLAYSERVER); } @Override public ASMMethodHandler[]...
VivecraftForgeLog.debug("Inserted delegate method call.");
5
epfl-labos/eagle
src/main/java/ch/epfl/eagle/daemon/scheduler/SchedulerThrift.java
[ "public class EagleConf {\n // Values: \"debug\", \"info\", \"warn\", \"error\", \"fatal\"\n public final static String LOG_LEVEL = \"log_level\";\n\n public final static String SCHEDULER_THRIFT_PORT = \"scheduler.thrift.port\";\n public final static String SCHEDULER_THRIFT_THREADS =\n \"scheduler.thrift.t...
import ch.epfl.eagle.daemon.util.TServers; import ch.epfl.eagle.thrift.SchedulerService; import ch.epfl.eagle.thrift.GetTaskService; import ch.epfl.eagle.thrift.TFullTaskId; import ch.epfl.eagle.thrift.THostPort; import ch.epfl.eagle.thrift.TSchedulingRequest; import ch.epfl.eagle.thrift.TTaskLaunchSpec; import java.io...
/* * EAGLE * * Copyright 2016 Operating Systems Laboratory EPFL * * Modified from Sparrow - University of California, Berkeley * * 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 * ...
TServers.launchThreadedThriftServer(port, threads, processor);
2
heroku/heroku.jar
heroku-api/src/main/java/com/heroku/api/request/domain/DomainList.java
[ "public class Domain implements Serializable {\n\n private static final long serialVersionUID = 1L;\n\n String created_at;\n String updated_at;\n String hostname;\n String id;\n String kind;\n String status;\n String cname;\n\n public String getCreatedAt() {\n return created_at;\n ...
import com.heroku.api.Domain; import com.heroku.api.exception.RequestFailedException; import com.heroku.api.http.Http; import com.heroku.api.request.Request; import com.heroku.api.request.RequestConfig; import java.util.Collections; import java.util.List; import java.util.Map; import static com.heroku.api.Heroku.Resour...
package com.heroku.api.request.domain; /** * TODO: Javadoc * * @author Naaman Newbold */ public class DomainList implements Request<List<Domain>> { private final RequestConfig config; public DomainList(String appName) { this(new RequestConfig().app(appName)); } public DomainList(Reques...
throw new RequestFailedException("Unable to list domains.", status, bytes);
1
mauriciogracia/DGuitarSoftware
DGuitar/src/dguitar/codecs/guitarPro/version3/GP3InputStream.java
[ "public class GPBend {\n /**\n * A list of points the bend is constitued of.\n */\n private List<GPBendPoint> _points;\n\n /**\n * The bend type (bend, bend and release,...).\n * \n * @see GPBendType\n */\n private GPBendType _type;\n\n /**\n * The bend height\n */\n ...
import java.io.IOException; import java.io.InputStream; import java.util.List; import dguitar.codecs.guitarPro.GPBend; import dguitar.codecs.guitarPro.GPBendPoint; import dguitar.codecs.guitarPro.GPBendType; import dguitar.codecs.guitarPro.GPChordDiagram; import dguitar.codecs.guitarPro.GPChordNote; import dguitar.code...
// Notes int nbNotes = readInt(); String note = ""; for (int i = 0; i < nbNotes; i++) { note += readStringIntegerPlusOne(); note += "\n"; } piece.setNote(note); // Triplet Feel piece.tripletFeel = readBoolean(); // Lyrics ...
GPDuration duration = GPDuration.valueOf(readByte());
1
awvalenti/bauhinia
nitida/src/main/java/com/github/awvalenti/bauhinia/nitida/view/window/guicomponents/panels/LogPanel.java
[ "public class CoronataException extends Exception {\n\n\tprivate static final long serialVersionUID = 1L;\n\n\tCoronataException(Throwable cause, String detailMessage) {\n\t\tsuper(detailMessage, cause);\n\t}\n\n}", "public interface CoronataWiiRemote {\n\n\tint LED_0 = 0x10, LED_1 = 0x20, LED_2 = 0x40, LED_3 = 0...
import java.awt.BorderLayout; import javax.swing.BorderFactory; import javax.swing.JPanel; import com.github.awvalenti.bauhinia.coronata.CoronataException; import com.github.awvalenti.bauhinia.coronata.CoronataWiiRemote; import com.github.awvalenti.bauhinia.coronata.observers.CoronataLifecycleEventsObserver; import com...
package com.github.awvalenti.bauhinia.nitida.view.window.guicomponents.panels; public class LogPanel extends JPanel implements CoronataLifecycleEventsObserver { private static final long serialVersionUID = 1L;
private final Messages messages;
3
IPEldorado/RemoteResources
src/com/eldorado/remoteresources/ui/HostsContainer.java
[ "public class ClientConnectionManager {\n\n\tpublic static final String LOCALHOST = IConnectionConstants.LOCALHOST;\n\n\tpublic static final int LOCALPORT = RemoteResourcesConfiguration\n\t\t\t.getInstance().getServerPort();\n\n\tprivate static ClientConnectionManager instance;\n\n\tprivate final Map<String, Client...
import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import com.eldorado.remoteresources.android.client.connection.ClientConnectionManager; import com.eldorado.remoteresources.ui.model.Device; import com.eld...
/* * (C) Copyright 2014 Instituto de Pesquisas Eldorado (http://www.eldorado.org.br/). * * This file is part of the software Remote Resources * * All rights reserved. This file and the accompanying materials * are made available under the terms of the GNU Lesser General Public License * (LGPL) version 3.0 which ...
public void deviceAdded(Device device) {
1
jmimo/netty-icap
src/main/java/ch/mimo/netty/example/icap/squidechoserver/SquidEchoHandler.java
[ "public class DefaultIcapResponse extends AbstractIcapMessage implements IcapResponse {\n\n\tprivate IcapResponseStatus status;\n\tprivate ChannelBuffer optionsContent;\n\t\n\t/**\n\t * Will create an instance of IcapResponse.\n\t * \n\t * @param version the version of the response.\n\t * @param status the Status c...
import org.jboss.netty.channel.ChannelHandlerContext; import org.jboss.netty.channel.ExceptionEvent; import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.channel.SimpleChannelUpstreamHandler; import ch.mimo.netty.handler.codec.icap.DefaultIcapResponse; import ch.mimo.netty.handler.codec.icap.IcapHeaders;...
/******************************************************************************* * Copyright 2012 Michael Mimo Moratti * * 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://ww...
response = new DefaultIcapResponse(IcapVersion.ICAP_1_0,IcapResponseStatus.OK);
6
JanWiemer/jacis
src/main/java/org/jacis/store/TrackedViewRegistry.java
[ "@JacisApi\npublic class JacisContainer {\n\n /** {@link JacisTransactionAdapter} to bind the Jacis Store to externally managed transactions. */\n private final JacisTransactionAdapter txAdapter;\n /** Map assigning the stores (values of type {@link JacisStoreImpl}) to the store identifiers (keys of type {@link ...
import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Supplier; import org.jacis.JacisApi; import org.jacis.container.JacisContainer; import org.jacis.co...
/* * Copyright (c) 2017. Jan Wiemer */ package org.jacis.store; /** * Registry where tracked views can be registered for an object store. * * @param <K> Key type of the store entry * @param <TV> Value type of the store entry * @author Jan Wiemer */ @JacisApi public class TrackedViewRegistry<K, TV> implement...
JacisTrackedViewModificationException toThrow = null;
2
MaLeLabTs/RegexGenerator
Random Regex Turtle/src/it/units/inginf/male/objective/performance/PerformacesObjective.java
[ "public class Configuration {\n\n private static final Logger LOG = Logger.getLogger(Configuration.class.getName()); \n \n /**\n * Initializes with default values, parameters and operators.\n */\n public Configuration() {\n this.evolutionParameters = new EvolutionParameters();\n t...
import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import it.units.inginf.male.configuration.Configuration; import it.units.inginf.male.utils.BasicStats; import it.units.inginf.male.evaluators.TreeEvaluationException; import it.units.in...
/* * Copyright (C) 2015 Machine Learning Lab - University of Trieste, * Italy (http://machinelearning.inginf.units.it/) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version ...
public static void populateFinalSolutionPerformances(Context.EvaluationPhases phase, Configuration configuration, FinalSolution finalSolution, boolean isFlagging) {
0
chedim/minedriod
src/main/java/com/onkiup/minedroid/exprop/ExPropServerSync.java
[ "public interface Context {\n /**\n * @return Context id\n */\n int contextId();\n\n}", "public abstract class Modification implements Context {\n\n protected TickHandler tickHandler;\n protected static HashMap<Integer, Modification> mods = new HashMap<Integer, Modification>();\n protected ...
import com.onkiup.minedroid.Context; import com.onkiup.minedroid.Modification; import com.onkiup.minedroid.net.ExPropDeltaPacket; import com.onkiup.minedroid.net.ExPropDeltaRequestPacket; import com.onkiup.minedroid.timer.Task; import net.minecraft.entity.Entity; import net.minecraftforge.fml.common.network.NetworkRegi...
package com.onkiup.minedroid.exprop; /** * Created by chedim on 8/13/15. */ public class ExPropServerSync implements Task.Server { @Override public void execute(Context ctx) { List<WeakReference<ExProps>> syncronizables = ExProps.getSyncronizables(); if (syncronizables == null || syncroniz...
ExPropDeltaPacket packet = new ExPropDeltaPacket(props, true);
2
hamadmarri/Biscuit
main/java/com/biscuit/commands/planner/ShowPlanDetails.java
[ "public class ColorCodes {\n\n\t// with normal background\n\tpublic static final String RESET = \"\\u001B[0m\";\n\tpublic static final String BLACK = \"\\u001B[30;1m\";\n\tpublic static final String RED = \"\\u001B[31;1m\";\n\tpublic static final String GREEN = \"\\u001B[32;1m\";\n\tpublic static final String YELLO...
import java.io.IOException; import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; import com.biscuit.ColorCodes; import com.biscuit.commands.Command; import com.biscuit.models.Project; import com.biscuit.models.Release; import com.biscuit.models.Sprint; import com.biscuit.models.UserSt...
package com.biscuit.commands.planner; public class ShowPlanDetails implements Command { Project project; public ShowPlanDetails(Project project) { super(); this.project = project; } @Override public boolean execute() throws IOException { printPlanned(); System.out.println(); printUnplanned(); ...
at.addRow(null, null, null, r.name, r.description, r.state, DateService.getDateAsString(r.startDate), DateService.getDateAsString(r.dueDate),
6
projectodd/wunderboss
wildfly/caching/src/main/java/org/projectodd/wunderboss/as/caching/ASCaching.java
[ "public class Options<T> extends HashMap<T, Object> {\n\n public Options() {\n this(null);\n }\n\n public Options(Map<T, Object> options) {\n if (options != null) {\n putAll(options);\n }\n }\n\n /**\n * Looks up key in the options.\n *\n * If key is an Opt...
import org.projectodd.wunderboss.codecs.Codec; import java.util.Map; import org.infinispan.Cache; import org.infinispan.configuration.global.GlobalConfiguration; import org.infinispan.configuration.global.GlobalConfigurationBuilder; import org.infinispan.manager.EmbeddedCacheManager; import org.jboss.msc.service.Servic...
/* * Copyright 2014-2016 Red Hat, Inc, and individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required...
Cache c = ASUtils.containerIsEAP6() ? new KeyEquivalenceCache(cache) : cache;
6
noboomu/proteus
proteus-core/src/main/java/io/sinistral/proteus/modules/ApplicationModule.java
[ "public class Extractors {\n\n private static Logger log = LoggerFactory.getLogger(Extractors.class.getCanonicalName());\n\n private final static Pattern XML_PATTERN = Pattern.compile(\"^(application/(xml|xhtml\\\\+xml)|text/xml)(;.*)?$\", Pattern.CASE_INSENSITIVE);\n private final static Pattern JSON_PATT...
import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import com.fasterxml.jackson.dataformat.xml.ser.ToXmlGenerator; import com.google.inject.AbstractModule; import com.google.inject.Singleton; import com.google.inject.TypeLiteral; import com.google.inject...
package io.sinistral.proteus.modules; /** * @author jbauer */ @Singleton public class ApplicationModule extends AbstractModule { private static Logger log = LoggerFactory.getLogger(ApplicationModule.class.getCanonicalName()); protected Set<EndpointInfo> registeredEndpoints = new TreeSet<>(); protected...
this.requestStaticInjection(JsonViewWrapper.class);
4
gazbert/bxbot-ui-server
bxbot-ui-server-services/src/main/java/com/gazbert/bxbot/ui/server/services/config/impl/StrategyConfigServiceImpl.java
[ "public class BotConfig {\n\n private String id;\n private String alias;\n private String baseUrl;\n private String username;\n private String password;\n\n // required for Jackson\n public BotConfig() {\n }\n\n public BotConfig(BotConfig other) {\n this.id = other.id;\n thi...
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.ComponentScan; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; import com.gazbert.bxbot.ui.serve...
/* * The MIT License (MIT) * * Copyright (c) 2017 Gareth Jon Lynch * * 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 * ...
final BotConfig botConfig = botConfigRepository.findById(botId);
0
shyampurk/bluemix-todo-app
Android-Client/app/src/main/java/vitymobi/com/todobluemix/ActivityAddressBook.java
[ "public class AddressBookAdapter extends BaseAdapter {\n\n private Context parentContext;\n private LayoutInflater mInflater;\n private ArrayList<ContactTemplate> contactsList= new ArrayList<>();\n\n\n public AddressBookAdapter(Context parentReference, ArrayList<ContactTemplate> contacts){\n this...
import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.location.Address; import android.os.Bundle; import andro...
package vitymobi.com.todobluemix; /** * Created by manishautomatic on 28/03/16. */ public class ActivityAddressBook extends AppCompatActivity { private Gson gson = new Gson(); private ListView mLstVwAddressBook;
private AddressBookAdapter mAddressBookAdapter;
0
longkai/catnut
src/org/catnut/adapter/DraftsAdapter.java
[ "public class Draft implements CatnutMetadata<Draft, ContentValues>, Parcelable {\n\n\tpublic static final String DRAFT = \"Draft\";\n\tpublic static final String TABLE = \"drafts\";\n\tpublic static final String SINGLE = \"draft\";\n\tpublic static final String MULTIPLE = \"drafts\";\n\n\tpublic static final Strin...
import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.text.TextUtils; import android.text.format.DateUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CursorAdapter; import android.widget.ImageView; ...
/* * The MIT License (MIT) * Copyright (c) 2014 longkai * The software shall be used for good, not evil. */ package org.catnut.adapter; /** * 草稿适配器 * * @author longkai */ public class DraftsAdapter extends CursorAdapter { private LayoutInflater mInflater; private TweetImageSpan mTweetImageSpan; private in...
.resize(mScreenWidth, (int) (mScreenWidth * Constants.GOLDEN_RATIO))
4
serialx/kkma
src/Example.java
[ "public class Keyword\n\textends Morpheme\n{\n\tint\t\tid\t\t= 0;\n\tString\tvocTag\t= \"S\";\n\tint\t\tcnt\t\t= 1;\t// number of occurrence\n\tdouble\tfreq\t= 1;\t// frequency = cnt/docLen\n\n\n\tpublic Keyword()\n\t{\n\t\tsuper();\n\t}\n\n\n\tpublic Keyword(Morpheme mp)\n\t{\n\t\tsuper(mp);\n\t}\n\n\n\t/**\n\t * ...
import java.util.List; import org.snu.ids.ha.index.Keyword; import org.snu.ids.ha.index.KeywordExtractor; import org.snu.ids.ha.index.KeywordList; import org.snu.ids.ha.ma.MExpression; import org.snu.ids.ha.ma.MorphemeAnalyzer; import org.snu.ids.ha.ma.Sentence; import org.snu.ids.ha.util.Timer;
public class Example { public static void main(String[] args) { maTest(); //keTest(); } public static void maTest() { String string = "저는 대학생이구요. 소프트웨어 관련학과 입니다. DB는 수업을 한번 들은 적이 있으며, 수학은 대학에서 통계학, 선형대수학, 이산수학, 대학수학 등을 배웠지만... 자주 사용을 안하다보니 모두 까먹은 상태입니다."; string = "그러면 조개가 쏘옥 올라온다"; System.setPr...
Timer timer = new Timer();
6
CodeNMore/New-Beginner-Java-Game-Programming-Src
Episode 34/TileGame/src/dev/codenmore/tilegame/entities/creatures/Player.java
[ "public class Handler {\n\t\n\tprivate Game game;\n\tprivate World world;\n\t\n\tpublic Handler(Game game){\n\t\tthis.game = game;\n\t}\n\t\n\tpublic GameCamera getGameCamera(){\n\t\treturn game.getGameCamera();\n\t}\n\t\n\tpublic KeyManager getKeyManager(){\n\t\treturn game.getKeyManager();\n\t}\n\t\n\tpublic Mous...
import java.awt.Graphics; import java.awt.Rectangle; import java.awt.image.BufferedImage; import dev.codenmore.tilegame.Handler; import dev.codenmore.tilegame.entities.Entity; import dev.codenmore.tilegame.gfx.Animation; import dev.codenmore.tilegame.gfx.Assets; import dev.codenmore.tilegame.inventory.Inventory;
package dev.codenmore.tilegame.entities.creatures; public class Player extends Creature { //Animations private Animation animDown, animUp, animLeft, animRight; // Attack timer private long lastAttackTimer, attackCooldown = 800, attackTimer = attackCooldown; // Inventory private Inventory inventory; public...
for(Entity e : handler.getWorld().getEntityManager().getEntities()){
1
sagemath/android
src/org/sagemath/droid/views/OutputWebView.java
[ "public class StringConstants {\n\n //--BASE URLS--\n public static final String BASE_SERVER_URL = \"sagecell.sagemath.org\";\n\n //--PATHS--\n public static final String PATH_KERNEL = \"kernel\";\n public static final String PATH_IOPUB = \"iopub\";\n public static final String PATH_SHELL = \"shel...
import android.content.Context; import android.graphics.Bitmap; import android.text.TextUtils; import android.util.Log; import android.webkit.WebView; import android.webkit.WebViewClient; import org.sagemath.droid.constants.StringConstants; import org.sagemath.droid.database.SageSQLiteOpenHelper; import org.sagemath.dr...
//Having Stream Log.i(TAG, "Adding Stream Reply"); addDivStreamReply((StreamReply) reply); } else if (reply instanceof StatusReply) { //Only Idle or Dead Status Reply is possible here, hence simply load URL Log.i(TAG, "Got Idle Status, Loading URL"); ...
BusProvider.getInstance().post(new ProgressEvent(StringConstants.ARG_PROGRESS_START));
2
Ekryd/sortpom
sorter/src/test/java/sortpom/parameter/EncodingParameterTest.java
[ "public class XmlOutputGenerator {\n private String encoding;\n private String indentCharacters;\n private boolean expandEmptyElements;\n private boolean indentBlankLines;\n private boolean indentSchemaLocation;\n private final WriterFactory writerFactory = new WriterFactory();\n\n /**\n * ...
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.function.Executable; import sortpom.XmlOutputGenerator; import sortpom.exception.FailureException; import sortpom.util.FileUtil; import sortpom.util.SortPomImplUtil; import java.io.File; import java.io.IOException; import static org.hamcrest.MatcherAssert....
package sortpom.parameter; class EncodingParameterTest { @Test void illegalEncodingWhenGettingPomFileShouldNotWork() {
final Executable testMethod = () -> SortPomImplUtil.create()
3
Kaysoro/KaellyBot
src/main/java/exceptions/BadUseCommandDiscordException.java
[ "public abstract class AbstractCommand implements Command {\n\n private final static Logger LOG = LoggerFactory.getLogger(AbstractCommand.class);\n\n protected String name;\n protected String pattern;\n protected DiscordException badUse;\n private boolean isPublic;\n private boolean isUsableInMP;\...
import commands.model.AbstractCommand; import commands.model.Command; import commands.classic.HelpCommand; import discord4j.core.object.entity.Message; import enums.Language; import util.Translator; import java.util.regex.Matcher;
package exceptions; /** * Created by steve on 14/11/2016. */ public class BadUseCommandDiscordException implements DiscordException { @Override
public void throwException(Message message, Command command, Language lg, Object... arguments) {
1
markkolich/havalo-kvs
src/main/java/com/kolich/havalo/components/RepositoryManagerComponent.java
[ "public final class HavaloUUID implements Comparable<HavaloUUID> {\n\t\t\n\tprivate final UUID id_;\n\t\n\tpublic HavaloUUID(final UUID id) {\n\t\tid_ = checkNotNull(id, \"ID cannot be null.\");\n\t}\n\t\n\tpublic HavaloUUID(final String id) {\n\t\tid_ = UUID.fromString(id);\n\t}\n\t\n\t// For GSON\n\tpublic Havalo...
import com.kolich.havalo.entities.types.UserRole; import com.kolich.havalo.exceptions.BootstrapException; import com.kolich.havalo.exceptions.repositories.RepositoryCreationException; import com.kolich.havalo.io.managers.RepositoryManager; import com.typesafe.config.Config; import org.slf4j.Logger; import javax.servlet...
/** * Copyright (c) 2015 Mark S. Kolich * http://mark.koli.ch * * 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, ...
} catch (RepositoryCreationException e) {
4
eckig/graph-editor
core/src/main/java/de/tesis/dynaware/grapheditor/core/model/ModelLayoutUpdater.java
[ "public enum EditorElement\r\n{\r\n CONNECTOR,\r\n NODE,\r\n JOINT;\r\n}\r", "public abstract class GJointSkin extends GSkin<GJoint> {\n\n private final DraggableBox root = new DraggableBox(EditorElement.JOINT)\n {\n\n @Override\n public final void positionMoved()\n {\n ...
import de.tesis.dynaware.grapheditor.EditorElement; import de.tesis.dynaware.grapheditor.GJointSkin; import de.tesis.dynaware.grapheditor.GNodeSkin; import de.tesis.dynaware.grapheditor.SkinLookup; import de.tesis.dynaware.grapheditor.core.ModelEditingManager; import de.tesis.dynaware.grapheditor.model.GJoint; import d...
/* * Copyright (C) 2005 - 2014 by TESIS DYNAware GmbH */ package de.tesis.dynaware.grapheditor.core.model; /** * Responsible for updating the {@link GModel}'s layout values at the end of * each mouse gesture. */ public class ModelLayoutUpdater { private final SkinLookup skinLookup; private final ModelE...
final GJointSkin jointSkin = skinLookup.lookupJoint(joint);
1
ceefour/webdav-servlet
src/test/java/net/sf/webdav/methods/DoLockTest.java
[ "public interface ITransaction {\n\n Principal getPrincipal();\n\n}", "public interface IWebdavStore {\n\n /**\n * Life cycle method, called by WebdavServlet's destroy() method. Should be used to clean up resources.\n */\n void destroy();\n\n /**\n * Indicates that a new request or transac...
import java.io.ByteArrayInputStream; import java.io.PrintWriter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.webdav.ITransaction; import net.sf.webdav.IWebdavStore; import net.sf.webdav.StoredObject; import net.sf.webdav.WebdavStatus; import net.sf.webdav.l...
package net.sf.webdav.methods; public class DoLockTest extends MockTest { static IWebdavStore mockStore; static HttpServletRequest mockReq; static HttpServletResponse mockRes; static ITransaction mockTransaction; static IResourceLocks mockResourceLocks; static boolean exclusive = true; ...
LockedObject lo = resLocks.getLockedObjectByPath(mockTransaction,
5
jasondevj/hotpotato
src/main/java/com/biasedbit/hotpotato/session/handler/ResponseCodeHandler.java
[ "public interface HttpRequestFuture<T> {\n\n /**\n * Error cause for interrupted requests via {@code Thread.interrupt()}.\n */\n static final Throwable INTERRUPTED = new Throwable(\"Interrupted\");\n /**\n * Error cause for cancelled requests via {@code future.cancel()}.\n */\n static fi...
import com.biasedbit.hotpotato.request.HttpRequestFuture; import com.biasedbit.hotpotato.response.HttpResponseProcessor; import com.biasedbit.hotpotato.session.HandlerSessionFacade; import com.biasedbit.hotpotato.session.HttpSession; import com.biasedbit.hotpotato.session.RecursiveAwareHttpRequest; import com.biasedbit...
/* * Copyright 2010 Bruno de Carvalho * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agre...
<T> void handleResponse(HandlerSessionFacade session, HttpRequestFuture<T> originalFuture,
0
loomchild/segment
segment/src/main/java/net/loomchild/segment/srx/legacy/AccurateSrxTextIterator.java
[ "public abstract class AbstractTextIterator implements TextIterator {\n\n\t/**\n\t * {@inheritDoc}\n\t */\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\"Remove is not supported by TextIterator.\");\n\t}\n\n\tpublic String toString(List<LanguageRule> languageRuleList) {\n\t\tStrin...
import java.util.Iterator; import java.util.LinkedList; import java.util.List; import net.loomchild.segment.AbstractTextIterator; import net.loomchild.segment.srx.LanguageRule; import net.loomchild.segment.srx.RuleMatcher; import net.loomchild.segment.srx.SrxDocument; import net.loomchild.segment.srx.Rule;
package net.loomchild.segment.srx.legacy; /** * Reprezentuje splitter dzielący na podstawie reguł zawartych w pliku srx. * * @author loomchild */ public class AccurateSrxTextIterator extends AbstractTextIterator { private List<LanguageRule> languageRuleList; private CharSequence text; private String seg...
private List<RuleMatcher> ruleMatcherList;
2
tticoin/JointER
src/jp/tti_coin/main/java/data/nlp/relation/RelationFeatureGenerator.java
[ "public class HashToInt {\n\tprivate final HashFunction murmur3;\n\tprivate static final Charset UTF8 = Charset.forName(\"UTF-8\");\n\tprivate final int filter;\n\t\n\tpublic HashToInt(Parameters params){\n\t\tthis.murmur3 = Hashing.murmur3_32();\n\t\tthis.filter = params.fvSize() - 1;\n\t}\n\t\n\tpublic int mapToI...
import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; import utils.HashToInt; import model.FeatureGenerator; import model.SparseFeatureVector; import model.StringSparseVector; import config.Parameters; import data.Instance; import data.Label; import data.LabelUnit; import data....
package data.nlp.relation; public class RelationFeatureGenerator extends FeatureGenerator { private HashToInt h2i; //pre-calc values private Map<String, Integer> typeKeys; private final int GLOBAL_KEY; private final int PARA_KEY; //private final int PROJ_KEY;
public RelationFeatureGenerator(Parameters params) {
4
ReplayMod/jGui
src/main/java/de/johni0702/minecraft/gui/element/advanced/AbstractGuiTimeline.java
[ "public interface GuiRenderer {\n\n ReadablePoint getOpenGlOffset();\n\n MatrixStack getMatrixStack();\n\n ReadableDimension getSize();\n\n void setDrawingArea(int x, int y, int width, int height);\n\n void bindTexture(Identifier location);\n\n void bindTexture(int glId);\n\n void drawTexturedR...
import de.johni0702.minecraft.gui.utils.Colors; import de.johni0702.minecraft.gui.utils.Utils; import de.johni0702.minecraft.gui.utils.lwjgl.Dimension; import de.johni0702.minecraft.gui.utils.lwjgl.Point; import de.johni0702.minecraft.gui.utils.lwjgl.ReadableColor; import de.johni0702.minecraft.gui.utils.lwjgl.Readable...
/* * This file is part of jGui API, licensed under the MIT License (MIT). * * Copyright (c) 2016 johni0702 <https://github.com/johni0702> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Softw...
public void draw(GuiRenderer renderer, ReadableDimension size, RenderInfo renderInfo) {
1
citysearch/web-widgets
src/main/java/com/citysearch/webwidget/facade/helper/SearchHelper.java
[ "public class SearchLocation {\n\tprivate String name;\n\tprivate String rating;\n\tprivate String reviewCount;\n\tprivate String latitude;\n\tprivate String longitude;\n\tprivate String distance;\n\tprivate String category;\n\tprivate String listingId;\n\tprivate String adDisplayUrl;\n\tprivate String imageUrl;\n\...
import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Properties; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import com.citysearch.webwidget.api.bean.SearchLocation; import com.citysearch.webwidget.api.bean.SearchResponse; import com.citysearch...
package com.citysearch.webwidget.facade.helper; public class SearchHelper { private Logger log = Logger.getLogger(getClass()); private String rootPath; private Integer displaySize; public SearchHelper(String rootPath, Integer displaySize) { this.rootPath = rootPath; this.displaySize...
nameLengthProp.append(CommonConstants.NAME_LENGTH);
6
peshkira/c3po
c3po-core/src/main/java/com/petpet/c3po/analysis/ProfileGenerator.java
[ "public interface PersistenceLayer {\n\n /**\n * Clears the current cache of the application. This includes the\n * {@link Cache}, but also any other cached information that the backend\n * provider might have stored (e.g. cached statistics and aggregations).\n */\n void clearCache();\n\n /**\n * This ...
import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.UUID; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.DocumentHelper; import org.dom4j.Element; impo...
/******************************************************************************* * Copyright 2013 Petar Petrov <me@petarpetrov.org> * * 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 * ...
final PropertyType type = PropertyType.valueOf( p.getType() );
7
milenkovicm/netty-kafka-producer
src/main/java/com/github/milenkovicm/kafka/connection/DataKafkaBroker.java
[ "public class ProducerProperties {\n\n public static final ProducerProperty<String> PRODUCER_ID = new ProducerProperty<>(\"default\");\n public static final ProducerProperty<Integer> TIMEOUT = new ProducerProperty<>(1000);\n public static final ProducerProperty<Partitioner> PARTITIONER = new ProducerProper...
import com.github.milenkovicm.kafka.ProducerProperties; import com.github.milenkovicm.kafka.handler.CompositeProducerHandler; import com.github.milenkovicm.kafka.handler.CopyProducerHandler; import com.github.milenkovicm.kafka.handler.MetricHandler; import com.github.milenkovicm.kafka.handler.TerminalHandler; import co...
/* * Copyright 2015 Marko Milenkovic (http://github.com/milenkovicm) * * 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 requir...
pipeline.addLast(new CompositeProducerHandler(topicName, properties));
1
centro/monitoring-center
src/test/java/net/centro/rtb/monitoringcenter/util/GraphiteMetricFormatterTest.java
[ "public interface MetricCollector {\n /**\n * Retrieves a counter, creating it if one does not exist. This method is thread-safe. The actual name of the\n * counter registered with the MonitoringCenter will be prefixed with MetricCollector's namespace and, possibly,\n * postfixed with the type of the...
import com.codahale.metrics.*; import net.centro.rtb.monitoringcenter.MetricCollector; import net.centro.rtb.monitoringcenter.MonitoringCenter; import net.centro.rtb.monitoringcenter.MonitoringCenterTest; import net.centro.rtb.monitoringcenter.SeparateClassloaderTestRunner; import net.centro.rtb.monitoringcenter.config...
package net.centro.rtb.monitoringcenter.util; @RunWith(SeparateClassloaderTestRunner.class) public class GraphiteMetricFormatterTest { @Test public void format() throws Exception { MonitoringCenterConfig monitoringCenterConfig = Configurator.noConfigFile() .applicationName("applicatio...
MonitoringCenter.configure(monitoringCenterConfig);
1
mklemm/jaxb2-rich-contract-plugin
src/main/java/com/kscs/util/plugins/xjc/BuilderGenerator.java
[ "public class ClassName {\n\tprivate final String interfaceName;\n\tprivate final String className;\n\n\tpublic ClassName(final String interfaceName, final String className) {\n\t\tthis.interfaceName = interfaceName;\n\t\tthis.className = className;\n\t}\n\n\tpublic String getInterfaceName() {\n\t\treturn this.inte...
import com.kscs.util.jaxb.Buildable; import com.kscs.util.jaxb.PropertyTree; import com.kscs.util.plugins.xjc.codemodel.ClassName; import com.kscs.util.plugins.xjc.codemodel.GenerifiedClass; import com.kscs.util.plugins.xjc.outline.DefinedInterfaceOutline; import com.kscs.util.plugins.xjc.outline.DefinedPropertyOutline...
private final boolean implement; private final BuilderGeneratorSettings settings; private final ResourceBundle resources; BuilderGenerator(final PluginContext pluginContext, final Map<String, BuilderOutline> builderOutlines, final BuilderOutline builderOutline, final BuilderGeneratorSettings settings) { this.plu...
nullSafe(param, JExpr._new(builderFieldElementType).arg(JExpr._this()).arg(param).arg(JExpr.FALSE)));
5
Kroger-Technology/Snow-Globe
src/integration/java/com/kroger/oss/snowGlobe/integration/tests/ReloadTest.java
[ "public class AppServiceCluster {\n\n private final String clusterName;\n private final boolean useHttps;\n private int httpResponseCode = 200;\n private String matchingPaths = \"*\";\n private Map<String, String> responseHeaders = new HashMap<>();\n private int port;\n\n /**\n * The constr...
import com.kroger.oss.snowGlobe.AppServiceCluster; import com.kroger.oss.snowGlobe.NginxRpBuilder; import org.junit.Before; import org.junit.Test; import static com.kroger.oss.snowGlobe.AppServiceCluster.makeHttpsWebService; import static com.kroger.oss.snowGlobe.NginxRpBuilder.runNginxWithUpstreams; import static com....
/* * Snow-Globe * * Copyright 2017 The Kroger Co. * * 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 l...
public AppServiceCluster loginUpstreamApp = makeHttpsWebService("Login_Cluster");
0
SERG-Delft/jpacman-framework
src/main/java/nl/tudelft/jpacman/npc/ghost/Clyde.java
[ "public enum Direction {\n\n /**\n * North, or up.\n */\n NORTH(0, -1),\n\n /**\n * South, or down.\n */\n SOUTH(0, 1),\n\n /**\n * West, or left.\n */\n WEST(-1, 0),\n\n /**\n * East, or right.\n */\n EAST(1, 0);\n\n /**\n * The delta x (width differen...
import java.util.EnumMap; import java.util.List; import java.util.Map; import java.util.Optional; import nl.tudelft.jpacman.board.Direction; import nl.tudelft.jpacman.board.Square; import nl.tudelft.jpacman.board.Unit; import nl.tudelft.jpacman.level.Player; import nl.tudelft.jpacman.npc.Ghost; import nl.tudelft.jpacma...
package nl.tudelft.jpacman.npc.ghost; /** * <p> * An implementation of the classic Pac-Man ghost Clyde. * </p> * <p> * Pokey needs a new nickname because out of all the ghosts, * Clyde is the least likely to "C'lyde" with Pac-Man. Clyde is always the last * ghost out of the regenerator, and the loner of the g...
public Clyde(Map<Direction, Sprite> spriteMap) {
5
ceaseless-prayer/CeaselessAndroid
app/src/main/java/org/theotech/ceaselessandroid/note/NoteManagerImpl.java
[ "public interface PersonManager {\n\n RealmList<Person> getPersonFromPersonPOJO(List<PersonPOJO> people);\n\n void setRealm(Realm realm);\n\n List<PersonPOJO> getNextPeopleToPrayFor(int n) throws AlreadyPrayedForAllContactsException;\n\n List<PersonPOJO> getActivePeople();\n\n List<PersonPOJO> getFav...
import android.app.Activity; import android.content.ContentResolver; import org.theotech.ceaselessandroid.person.PersonManager; import org.theotech.ceaselessandroid.person.PersonManagerImpl; import org.theotech.ceaselessandroid.realm.Note; import org.theotech.ceaselessandroid.realm.Person; import org.theotech.ceaseless...
package org.theotech.ceaselessandroid.note; /** * Created by chrislim on 11/3/15. */ public class NoteManagerImpl implements NoteManager { private static final String TAG = NoteManagerImpl.class.getSimpleName(); private static NoteManager instance; private Activity activity; private Realm realm; ...
List<NotePOJO> notes = RealmUtils.toNotePOJOs(realm.where(Note.class)
6
Kaysoro/KaellyBot
src/main/java/commands/config/CommandCommand.java
[ "public class CommandManager {\n\n private static CommandManager instance;\n\n private List<Command> commands;\n private Map<String, Command> mapCommands;\n\n private CommandManager(){\n super();\n mapCommands = new ConcurrentHashMap<>();\n commands = new CopyOnWriteArrayList<>();\n...
import commands.CommandManager; import commands.model.AbstractCommand; import commands.model.Command; import data.CommandForbidden; import data.Guild; import discord4j.core.event.domain.message.MessageCreateEvent; import discord4j.core.object.entity.Message; import enums.Language; import exceptions.*; import util.Trans...
package commands.config; /** * Created by steve on 14/07/2016. */ public class CommandCommand extends AbstractCommand { private DiscordException tooMuchCmds; private DiscordException notFoundCmd; public CommandCommand(){ super("cmd","\\s+([\\w|-]+)\\s+(on|off|0|1|true|false)"); setUsa...
public void request(MessageCreateEvent event, Message message, Matcher m, Language lg) {
5
DataSketches/experimental
src/main/java/com/yahoo/sketches/frequencies/FrequentItemsAbstractHash.java
[ "public abstract class HashMap {\n\n // The load factor is decided upon by the abstract class.\n // This cannot be modified by inheriting classes!\n final public double LOAD_FACTOR = 0.75;\n\n protected int capacity;\n protected int length;\n protected int arrayMask;\n protected int size = 0;\n protected lo...
import com.yahoo.sketches.hashmaps.HashMap; import com.yahoo.sketches.hashmaps.HashMapDoubleHashingWithRebuilds; import com.yahoo.sketches.hashmaps.HashMapLinearProbingWithRebuilds; import com.yahoo.sketches.hashmaps.HashMapReverseEfficient; import com.yahoo.sketches.hashmaps.HashMapRobinHood; import com.yahoo.sketches...
@Override public long getMaxError() { return offset + mergeError; } @Override public void update(final long key) { update(key, 1); } @Override public void update(final long key, final long increment) { this.streamLength += increment; counters.adjust(key, increment); final int size ...
counters = new HashMapReverseEfficient(this.K);
3
serialx/kkma
src/org/snu/ids/ha/ma/MCandidate.java
[ "public class Condition\n\textends Hangul\n{\n\tpublic static final String[] COND_ARR = { \n\t\t\t\"ㅣ겹\", \t\t// 01 ㅣ겹모음 'ㅑ,ㅕ,ㅛ,ㅠ,ㅒ,ㅖ'\n\t\t\t\"모음\", \t\t// 02 마지막 음절이 종성을 가지지 않음\n\t\t\t\"자음\", \t\t// 03 마지막 음절이 종성을 가짐\n\t\t\t\"양성\", \t\t// 04 마지막 음절이 양성 모음\n\t\t\t\"음성\", \t\t// 05 마지막 음절이 음성 모음\n\t\t\t\"사오\", \t\t...
import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.snu.ids.ha.constants.Condition; import org.snu.ids.ha.constants.POSTag; import org.snu.ids.ha.dic.Dictionary; import org.snu.ids.ha.dic.PDDictionary; import org.snu.ids.ha.dic.SpacingPDDictionary; import org.snu.ids.ha.util....
} public boolean isAutoExtd() { return autoExtd; } public void setAutoExtd(boolean autoExtd) { this.autoExtd = autoExtd; } /** * <pre> * 자모 조건을 생성해준다. * </pre> * @author therocks * @since 2007. 6. 4 */ public void initConds(String string) { // atlEnc: 품사별 기본 접속 가능 품사 초기화 addApndblTa...
Hangul lastHg = Hangul.split(lastCh);
5
tsenger/animamea
animamea/src/de/tsenger/animamea/Operator.java
[ "public class DomainParameter {\n\t\n\tprivate DHParameters dhParameters = null;\n\tprivate ECParameterSpec ecSpec = null;\n\t\n\t/**\n\t * Extrahiert aus dem AlogorithmIdentifier standardisierte Parameter für DH oder ECDH.\n\t * @param Referenz auf Standardized Domain Parameters\n\t */\n\tpublic DomainParameter(in...
import java.io.IOException; import java.security.KeyPair; import java.security.PublicKey; import java.security.cert.CertificateException; import javax.smartcardio.CardException; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; import org.bouncycastle.asn1.ASN1Sequence; import org.bouncycast...
/** * Copyright 2011-2017, Tobias Senger * * This file is part of animamea. * * Animamea 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) a...
SecureMessaging sm2 = cop.performCA();
3
Erudika/scoold
src/main/java/com/erudika/scoold/controllers/SigninController.java
[ "@Component\n@Named\npublic class ScooldConfig extends Config {\n\n\tprivate static final Logger logger = LoggerFactory.getLogger(ScooldConfig.class);\n\n\t@Override\n\tpublic com.typesafe.config.Config getFallbackConfig() {\n\t\treturn Para.getConfig().getConfig(); // fall back to para.* config\n\t}\n\n\t@Override...
import com.erudika.para.client.ParaClient; import com.erudika.para.core.Sysprop; import com.erudika.para.core.User; import com.erudika.para.core.annotations.Email; import com.erudika.para.core.utils.Config; import com.erudika.para.core.utils.Utils; import com.erudika.scoold.ScooldConfig; import static com.erudika.scool...
/* * Copyright 2013-2022 Erudika. https://erudika.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by appli...
return "redirect:" + (StringUtils.startsWithIgnoreCase(returnto, SIGNINLINK) ? HOMEPAGE : getBackToUrl(req));
4
100rabhkr/DownZLibrary
downzlibrary/src/main/java/com/example/downzlibrary/DataTypes/JsonObject.java
[ "public class DownZ {\n private static DownZ instance = null;\n private Context context;\n private String url;\n private Method method;\n private ArrayList<RequestParams> params = new ArrayList<>();\n private ArrayList<HeaderParams> headers = new ArrayList<>();\n\n /**\n * Constructor\n ...
import com.example.downzlibrary.DownZ; import com.example.downzlibrary.ListnerInterface.HttpListener; import com.example.downzlibrary.Parameters.HeaderParams; import com.example.downzlibrary.Parameters.RequestParams; import com.example.downzlibrary.RequestTasks.JsonObjectTask; import com.example.downzlibrary.Utilities....
package com.example.downzlibrary.DataTypes; /** * Created by saurabhkumar on 06/08/17. */ public class JsonObject extends Type<JSONObject> { private String url; private HttpListener<JSONObject> mListener; private DownZ.Method method; private ArrayList<RequestParams> params;
private ArrayList<HeaderParams> headers;
2
gdi-by/downloadclient
src/main/java/de/bayern/gdi/gui/DataBean.java
[ "@XmlRootElement(name = \"DownloadSchritt\")\n@XmlAccessorType(XmlAccessType.FIELD)\npublic class DownloadStep {\n\n @XmlElement(name = \"ServiceTyp\")\n private String serviceType;\n\n @XmlElement(name = \"URL\")\n private String serviceURL;\n\n @XmlElement(name = \"DownloadPfad\")\n private Stri...
import de.bayern.gdi.model.DownloadStep; import de.bayern.gdi.model.Parameter; import de.bayern.gdi.model.ProcessingStep; import de.bayern.gdi.services.Atom; import de.bayern.gdi.services.CatalogService; import de.bayern.gdi.services.Service; import de.bayern.gdi.services.ServiceType; import de.bayern.gdi.services.WFSM...
* Get the WFS service. * @return the service */ public WFSMeta getWFSService() { return wfsService; } /** * sets the webservice. * @param webService webservice */ public void setAtomService(Atom webService) { this.atomService = webService; } /** ...
public DownloadStep convertToDownloadStep(String savePath) {
0
idega/is.idega.idegaweb.egov.course
src/java/is/idega/idegaweb/egov/course/business/CourseWriter.java
[ "public class CourseConstants {\n\n\tpublic static final String CASE_CODE_KEY = \"COURSEA\";\n\n\tpublic static final String IW_BUNDLE_IDENTIFIER = \"is.idega.idegaweb.egov.course\";\n\n\tpublic static final String ADMINISTRATOR_ROLE_KEY = \"afterSchoolCareAdministrator\";\n\tpublic static final String SUPER_ADMINI...
import is.idega.idegaweb.egov.course.CourseConstants; import is.idega.idegaweb.egov.course.data.Course; import is.idega.idegaweb.egov.course.data.CoursePrice; import is.idega.idegaweb.egov.course.data.CourseType; import is.idega.idegaweb.egov.course.presentation.CourseBlock; import java.io.ByteArrayOutputStream; import...
/* * $Id$ Created on Mar 28, 2007 * * Copyright (C) 2007 Idega Software hf. All Rights Reserved. * * This software is the proprietary information of Idega hf. Use is subject to license terms. */ package is.idega.idegaweb.egov.course.business; public class CourseWriter extends DownloadWriter implements Med...
cell.setCellValue(this.iwrb.getLocalizedString("course", "Course"));
1
witwall/sfntly-java
src/main/java/com/google/typography/font/tools/sfnttool/GlyphCoverage.java
[ "public class Font {\n\n private static final Logger logger =\n Logger.getLogger(Font.class.getCanonicalName());\n\n /**\n * Offsets to specific elements in the underlying data. These offsets are relative to the\n * start of the table or the start of sub-blocks within the table.\n */\n private enum Offs...
import java.util.List; import java.util.Set; import com.google.typography.font.sfntly.Font; import com.google.typography.font.sfntly.Tag; import com.google.typography.font.sfntly.table.core.CMap; import com.google.typography.font.sfntly.table.core.CMap.CMapFormat; import com.google.typography.font.sfntly.table.core.CMa...
/* * Copyright 2011 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 applicable ...
CMapTable cmapTable = font.getTable(Tag.cmap);
1
idega/is.idega.idegaweb.msi
src/java/is/idega/idegaweb/msi/MSIViewManager.java
[ "public class EventEditor extends RaceBlock {\n\t\n\tprivate static final String PARAMETER_ACTION = \"msi_prm_action\";\n\tprivate static final String PARAMETER_EVENT = \"prm_event\";\n\n\tprivate static final int ACTION_VIEW = 1;\n\tprivate static final int ACTION_NEW = 2;\n\tprivate static final int ACTION_SAVE =...
import is.idega.idegaweb.msi.presentation.EventEditor; import is.idega.idegaweb.msi.presentation.RaceEditor; import is.idega.idegaweb.msi.presentation.RaceNumberEditor; import is.idega.idegaweb.msi.presentation.RaceReport; import is.idega.idegaweb.msi.presentation.SeasonEditor; import java.util.ArrayList; import java.u...
package is.idega.idegaweb.msi; public class MSIViewManager { private ViewNode msiViewNode; private IWMainApplication iwma; public static MSIViewManager getInstance(IWMainApplication iwma) { MSIViewManager instance = (MSIViewManager) iwma .getAttribute("msiviewmanager"); if (instance == null) { insta...
raceNumbers.setComponentClass(RaceNumberEditor.class);
2
srcdeps/srcdeps-core
srcdeps-core-config-yaml/src/test/java/org/srcdeps/config/yaml/writer/YamlWriterVisitorTest.java
[ "public class YamlConfigurationReader implements ConfigurationReader {\n\n @Override\n public Configuration.Builder read(Reader in) throws ConfigurationException {\n Yaml yaml = new Yaml(new SrcdepsConstructor());\n Configuration.Builder builder = yaml.loadAs(in, Configuration.Builder.class);\n ...
import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import java.io.UnsupportedEncodingException; import org.junit.Assert; import org.junit.Test; import org.srcdeps.config.yaml.YamlConfigurationReader; import org.srcdeps.core.conf...
/** * 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...
public void writeComments() throws ConfigurationException, UnsupportedEncodingException, IOException {
2
google/android-classyshark
ClassySharkWS/src/com/google/classyshark/silverghost/SilverGhostFacade.java
[ "public class ContentReader {\n\n /**\n * components that are part of jar & apk\n */\n public enum ARCHIVE_COMPONENT {\n ANDROID_MANIFEST, NATIVE_LIBRARY\n }\n\n public static class Component {\n\n public Component(String name, ARCHIVE_COMPONENT component) {\n this.name ...
import java.util.LinkedList; import java.util.List; import com.google.classyshark.silverghost.contentreader.ContentReader; import com.google.classyshark.silverghost.exporter.Exporter; import com.google.classyshark.silverghost.exporter.FlatMethodCountExporter; import com.google.classyshark.silverghost.exporter.MethodCou...
/* * Copyright 2016 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to i...
RootBuilder rootBuilder = new RootBuilder();
3
sooola/V2EX-Android
app/src/main/java/com/sola/v2ex_android/ui/NewestTopicsFragment.java
[ "public class Topics implements Serializable {\n\n public int id;\n public String title;\n public String nodeTitle;\n public String url;\n public String content;\n public String content_rendered;\n public int replies;\n public MemberEntity member;\n public NodeEntity node;\n public lon...
import android.view.View; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.sola.v2ex_android.R; import com.sola.v2ex_android.model.Topics; import com.sola.v2ex_android.model.TopicsData; import com.sola.v2ex_android.network.V2exService; import com.sola...
package com.sola.v2ex_android.ui; /** * 主页 - 话题 * Created by wei on 2016/10/18. */ public class NewestTopicsFragment extends BaseSwipeRefreshFragment { @BindView(R.id.recycleview) RecyclerView mRecycleview; private TopicsAdapter mAdapter; public static NewestTopicsFragment newInstance() { ...
Observer<TopicsData> observer = new Observer<TopicsData>() {
1
srinathwarrier/BrandstoreApp
app/src/main/java/com/brandstore1/activities/SplashScreenActivity.java
[ "public class BrandstoreApplication extends Application {\r\n // model\r\n private static int numUnreadMessages;\r\n private static NotificationCompat.InboxStyle inboxStyle;\r\n\r\n private static BrandstoreApplication mInstance;\r\n\r\n private static NotificationStatus notificationStatus = Notifica...
import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.os.Handler; import android.support.v7.app.ActionBarActivity; import android.util.Log; import com.brandstore1.Brandstore...
package com.brandstore1.activities; public class SplashScreenActivity extends ActionBarActivity implements UpdateSuggestionsAsyncResponse{ private static final String TAG = SplashScreenActivity.class.getSimpleName(); Context mContext; SQLiteDatabase sqLiteDatabase; @Override prot...
Tracker t = ((BrandstoreApplication) getApplication()).getTracker(BrandstoreApplication.TrackerName.APP_TRACKER);
0
zhenglu1989/web-sso
ki4so-core/src/main/java/com/github/ebnew/ki4so/core/authentication/KnightDefaultAuthenticationPostHandler.java
[ "public class KnightApp implements Serializable {\n\n private static final long serialVersionUID = -1850808070447330706L;\n\n\n /**\n * 应用id\n */\n private String appId;\n\n /**\n * 应用名称\n */\n\n private String appName;\n\n /***\n * 应用所在的主机地址\n */\n\n private String host...
import com.github.ebnew.ki4so.core.app.KnightApp; import com.github.ebnew.ki4so.core.app.KnightAppService; import com.github.ebnew.ki4so.core.authentication.status.KnightUserLoggedStatusStore; import com.github.ebnew.ki4so.core.authentication.status.KnightUserLoginStatus; import com.github.ebnew.ki4so.core.key.KnightKe...
package com.github.ebnew.ki4so.core.authentication; /** * 默认的后置处理器,提供抽象的方法由具体的子类实现 * @author zhenglu * @since 15/4/23 */ public class KnightDefaultAuthenticationPostHandler implements KnightAuthenticationPostHandler{ private static final Logger logger = Logger.getLogger(KnightDefaultAuthenticationPostHandle...
if(authentication != null && abstractParameter != null && abstractParameter.getParameterValue(WebConstants.SERVICE_PARAM_NAME)!=null){
7
andrewoma/dexx
collection/src/test/java/com/github/andrewoma/dexx/collection/mutable/MutableTreeMap.java
[ "public interface Builder<E, R> {\n @NotNull\n Builder<E, R> add(E element);\n\n @NotNull\n Builder<E, R> addAll(@NotNull Traversable<E> elements);\n\n @NotNull\n Builder<E, R> addAll(@NotNull java.lang.Iterable<E> elements);\n\n @NotNull\n Builder<E, R> addAll(@NotNull Iterator<E> iterator)...
import org.jetbrains.annotations.Nullable; import java.util.Comparator; import java.util.Iterator; import java.util.TreeMap; import com.github.andrewoma.dexx.collection.Builder; import com.github.andrewoma.dexx.collection.BuilderFactory; import com.github.andrewoma.dexx.collection.Map; import com.github.andrewoma.dexx....
/* * Copyright (c) 2014 Andrew O'Malley * * 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, pub...
public static <K, V> BuilderFactory<Pair<K, V>, Map<K, V>> factory() {
3
ArVdC/TimeManager
src/net/vdcraft/arvdc/timemanager/cmdadmin/TmNow.java
[ "public class MainTM extends JavaPlugin {\r\n\r\n\t/*****************\r\n\t *** VARIABLES ***\r\n\t *****************/\r\n\r\n\t// Main class\r\n\tprotected static MainTM instanceMainClass;\r\n\r\n\t// Plugin version\r\n\tprotected static String versionTM() {\r\n\t\treturn instanceMainClass.getDescription().getVers...
import java.util.ArrayList; import java.util.List; import org.bukkit.Bukkit; import org.bukkit.block.CommandBlock; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import net.vdcraft.arvdc.timemanager.MainTM; import net.vdcraft.arvdc.timemanager.cmdplayer.PlayerLangHandler; import net.v...
package net.vdcraft.arvdc.timemanager.cmdadmin; public class TmNow extends MainTM { /** * CMD /tm now [msg|title|actionbar] [player|all|world] */ public static void cmdNow(CommandSender sender, String display, String target) { // #1. Don't launch the command if there is no players (empty ser...
msg = PlaceholdersHandler.replaceAllPlaceholders(msg, world, lang, p);
4
danirod/rectball
app/src/main/java/es/danirod/rectball/screens/MainMenuScreen.java
[ "public class RectballGame extends StateBasedGame {\n\n /** The Android activity that is currently displaying this game instance. */\n private final AndroidLauncher context;\n\n /** The game state is used during a game in order to pause and serialize it. */\n private final GameState currentGame;\n\n ...
import android.content.SharedPreferences; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.InputAdapter; import com.badlogic.gdx.InputMultiplexer; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.ui.Image; i...
/* * This file is part of Rectball. * Copyright (C) 2015-2017 Dani Rodríguez. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any ...
game.player.playSound(SoundPlayer.SoundCode.SELECT);
1
ocpsoft/prettytime
core/src/main/java/org/ocpsoft/prettytime/i18n/Resources_sk.java
[ "public interface TimeFormat\n{\n /**\n * Given a populated {@link Duration} object. Apply formatting (with rounding) and output the result.\n * \n * @param The original {@link Duration} instance from which the time string should be decorated.\n */\n public abstract String format(final Duration dura...
import org.ocpsoft.prettytime.units.Minute; import org.ocpsoft.prettytime.units.Month; import org.ocpsoft.prettytime.units.Week; import org.ocpsoft.prettytime.units.Year; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.ListResourceBundle; im...
{ "WeekPluralName", "týždne" }, { "YearPattern", "%n %u" }, { "YearFuturePrefix", "o " }, { "YearFutureSuffix", "" }, { "YearPastPrefix", "pred " }, { "YearPastSuffix", "" }, { "YearSingularName", "rok" }, { "YearPluralName...
private static class CsTimeFormat extends SimpleTimeFormat
1
huandu/spritemapper
src/dk/cego/spritemapper/guillotine/OptimalGuillotineLayouter.java
[ "public interface FreeSpaceChooser {\n public int choose(Rectangle space1, Rectangle space2, Sprite sprite);\n}", "public class BestFitChooser implements FreeSpaceChooser {\n public int choose(Rectangle space1, Rectangle space2, Sprite sprite) {\n return space1.area() - space2.area();\n }\n}", "...
import dk.cego.spritemapper.util.FreeSpaceChooser; import dk.cego.spritemapper.util.BestFitChooser; import dk.cego.spritemapper.util.BestShortSideChooser; import dk.cego.spritemapper.util.BestLongSideChooser; import dk.cego.spritemapper.util.TopLeftChooser; import dk.cego.spritemapper.OptimalLayouter;
/** * Copyright (C) 2011 CEGO ApS * Written by Robert Larsen <robert@komogvind.dk> for CEGO ApS * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at...
new BestFitChooser(),
1
Akshansh986/Webkiosk
Webkiosk/src/main/java/com/blackMonster/webkiosk/crawler/dateSheet/FetchDateSheet.java
[ "public class M {\n\tprivate static final boolean showLog = true;\n\tpublic static void log(String TAG, String text) {\n\t\tif (showLog) Log.d(TAG, text);\n\n\t/*\tFile logFile = new File(\"sdcard/log.txt\");\n\t\tif (!logFile.exists()) {\n\t\t\ttry {\n\t\t\t\tlogFile.createNewFile();\n\t\t\t} catch (IOException e)...
import android.content.Context; import android.net.Uri; import com.blackMonster.webkiosk.utils.M; import com.blackMonster.webkiosk.SharedPrefs.MainPrefs; import com.blackMonster.webkiosk.crawler.BadHtmlSourceException; import com.blackMonster.webkiosk.crawler.CrawlerUtils; import com.blackMonster.webkiosk.crawler.Webki...
package com.blackMonster.webkiosk.crawler.dateSheet; class FetchDateSheet { private static final int MAX_X = 4; private static final int MAX_Y = 20; private static HttpClient siteConnection; private static Context context; static List<DateSheetRow> getData(HttpClient cn, String colg, Context...
String initialURL = WebkioskWebsite.getSiteUrl(colg)
4
xm-online/xm-lep
xm-lep-groovy/src/main/java/com/icthh/xm/lep/groovy/LepResourceKeyURLConnection.java
[ "public interface ContextsHolder {\n\n /**\n * Return context instance by scope name.\n *\n * @param scope context scope name, this name is unique across all\n * scopes in one {@link ContextsHolder} instance\n * @return context instance\n * @see ContextScopes\n */\n Sc...
import com.icthh.xm.lep.api.ContextsHolder; import com.icthh.xm.lep.api.LepResource; import com.icthh.xm.lep.api.LepResourceDescriptor; import com.icthh.xm.lep.api.LepResourceService; import com.icthh.xm.lep.api.commons.UrlLepResourceKey; import com.icthh.xm.lep.script.ScriptLepResource; import java.io.IOException; imp...
package com.icthh.xm.lep.groovy; /** * The {@link LepResourceKeyURLConnection} class implements lazy data loading for {@link ScriptLepResource}. */ @SuppressWarnings("checkstyle:abbreviationaswordinname") public class LepResourceKeyURLConnection extends URLConnection { private final UrlLepResourceKey resource...
private ScriptLepResource resource;
5
CycloneAxe/phphub-android
app/src/main/java/org/estgroup/phphub/ui/view/RecommendedFragment.java
[ "public class Topic {\n protected int id;\n\n protected String title;\n\n protected String body;\n\n @SerializedName(\"excerpt\")\n protected String excerpt;\n\n @SerializedName(\"user_id\")\n protected int userId;\n\n @SerializedName(\"last_reply_user_id\")\n protected int lastReplyUserI...
import android.accounts.AccountManager; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar.OnMenuItemClickListener; import android.view.LayoutInflater; import ...
package org.estgroup.phphub.ui.view; @RequiresPresenter(RecommendedPresenter.class) public class RecommendedFragment extends LazyFragment<RecommendedPresenter> implements ViewEventListener<Topic>{ private boolean isPrepared; RecyclerMultiAdapter adapter; @Bind(R.id.multiStateView) Multi...
User userInfo = topic.getUser().getData();
1
yushiwo/Universal-Image-Selector
android-imageselector-lib/src/main/java/com/netease/imageSelector/adapter/ImageListAdapter.java
[ "public class ImageSelectorProxy implements IProxy{\n\n private static final String ERROR_NOT_INIT = \"ImageSelector must be init with configuration before using\";\n\n private static ImageSelectorProxy sInstance;\n\n ImageSelectorConfiguration configuration;\n\n public static ImageSelectorProxy getInst...
import android.annotation.SuppressLint; import android.content.Context; import android.graphics.PorterDuff; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.Toast; import com...
package com.netease.imageSelector.adapter; /** * Created by dee on 15/11/19. */ public class ImageListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { public static final int TYPE_CAMERA = 1; public static final int TYPE_PICTURE = 2; private Context context; private boolean showCa...
if (selectMode == MODE_SINGLE) {
4
mobile-cloud-computing/ScalingMobileCodeOffloading
Framework/Manager/CodeOffload/src/main/java/cs/mc/ut/ee/manager/CodeOffloadManager.java
[ "public class Surrogate {\n\tString jarFile; //code to reconstruct the request in each component of the system\n\t\n\tLinkedList<String> apkPool; //ports in which the app is listening\n\t\n\tString ipAddress; //surrogate address\n\t\n\t/*\n\t *String accelerationType; //other attributes about the server ca...
import java.io.InputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.io.IOException; import java.net.Socket; import java.util.Map; import cs.mc.ut.ee.allocation.Surrogate; import cs.mc.ut.ee.utilities.RemoteCommandActivation; import edu.ut.mobile.network.NetInfo; import edu.ut.mobile....
/* * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * Please send inquiries to huber AT ut DOT ee */ package cs.mc.ut...
Surrogate surrogate = null;;
0
pivotal-cf/spring-cloud-services-connector
spring-cloud-services-spring-connector/src/test/java/io/pivotal/spring/cloud/service/hystrix/HystrixStreamServiceConnectorIntegrationMultiUriTest.java
[ "public class MockCloudConnector implements CloudConnector {\n\n\tpublic static final CloudConnector instance = Mockito.mock(CloudConnector.class);\n\n\tpublic static void reset() {\n\t\tMockito.reset(instance);\n\t}\n\n\tpublic boolean isInMatchingCloud() {\n\t\treturn instance.isInMatchingCloud();\n\t}\n\n\tpubli...
import java.io.IOException; import java.util.Arrays; import java.util.List; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.junit.runner.RunWith; import io.pivotal.spring.cloud.MockCloudConnector; import io.pivotal.spring.cloud.service.common.EurekaServiceInfo; import io.piv...
/* * Copyright 2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applic...
assertPropertyEquals("hystrix", SPRING_CLOUD_STREAM_BINDINGS_HYSTRIXSTREAMOUTPUT + "binder");
6
thwegene/OCT
src/oct/octree/OctNode.java
[ "public enum OCT_EDGE implements OCT_ENUM {\r\n\r\n\t/**\r\n\t * BACK DOWN, Direction X,Y,Z: 0, -1, -1\r\n\t */\r\n\tBD(0, -1, -1, OCT_VERTEX.LBD, OCT_VERTEX.RBD), // 0\r\n\t/**\r\n\t * RIGHT DOWN, Direction X,Y,Z: 1, 0, -1\r\n\t */\r\n\tRD(1, 0, -1, OCT_VERTEX.RBD, OCT_VERTEX.RFD), // 1\r\n\t/**\r\n\t * FRONT DOWN...
import java.util.ArrayList; import oct.enums.OCT_EDGE; import oct.enums.OCT_ENUM; import oct.enums.OCT_FACE; import oct.enums.OCT_OCTANT; import oct.enums.OCT_VERTEX; import oct.utils.OctTables; import processing.core.PApplet; import processing.core.PConstants; import processing.core.PVector;
public short getCodeS() { return codeS; } public void setCodeS(short _codeS) { this.codeS = _codeS; } public short getCodeT() { return codeT; } public void setCodeT(short _codeT) { this.codeT = _codeT; } public void setCode(short _codeR, short _codeS, short _codeT) { this.codeR = _codeR; this....
public OctRST getEdgeCenter(OCT_EDGE _e) {
0
gp15237125756/PoiExcelExport2.0
extention/XSSFFontStyleLib.java
[ "public class FontStyleConvert implements IFontStyleConvert {\n\n\t@Override\n\tpublic void convert(FontStyle style, IFontFactory fac,XSSFFontStyleLib lib) {\n\t\tXSSFFontStyleRule rule=new XSSFFontStyleRuleImpl();\n\t\trule.registerStyleRule(style, fac.create(),lib);\n\t}\n\n}", "public interface IFontStyleConve...
import java.util.LinkedHashMap; import java.util.Map; import org.apache.poi.xssf.usermodel.XSSFFont; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import com.ld.datacenter.poi.convert.FontStyleConvert; import com.ld.datacenter.poi.convert.IFontStyleConvert; import com.ld.datacenter.poi.exception.FontStyleNotFoundE...
package com.ld.datacenter.poi.extention; <<<<<<< HEAD import com.ld.datacenter.poi.font.TitleCellFontImpl; ======= >>>>>>> fe2012a7f8558d8df36b789847bdc41c788d6eaf import com.ld.datacenter.poi.helper.FontStyle; public class XSSFFontStyleLib { /** 樣式緩存*/ private final Map<FontStyle,XSSFFont> FONT_STYLE_MAP=new L...
convert.convert(FontStyle.COLOR, new ColorCellFontImpl(wb),this);
3
cluelessjoe/jooq-flyway-typesafe-migration
migrator/src/main/generated-sources/org/jooq/example/migrator/model/v3/Keys.java
[ "@Generated(\n value = {\n \"http://www.jooq.org\",\n \"jOOQ version:3.9.2\",\n \"schema version:FLYWAY_TEST_2\"\n },\n date = \"2017-05-16T21:33:40.682Z\",\n comments = \"This class is generated by jOOQ\"\n)\n@SuppressWarnings({ \"all\", \"unchecked\", \"rawtypes\" })\npublic class...
import javax.annotation.Generated; import org.jooq.ForeignKey; import org.jooq.UniqueKey; import org.jooq.example.migrator.model.v3.tables.records.v3_AuthorRecord; import org.jooq.example.migrator.model.v3.tables.records.v3_BookRecord; import org.jooq.example.migrator.model.v3.tables.records.v3_SchemaVersionRecord; imp...
/* * This file is generated by jOOQ. */ package org.jooq.example.migrator.model.v3; /** * A class modelling foreign key relationships between tables of the <code>FLYWAY_TEST</code> * schema */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.9.2", "schema version:FLYWAY...
public static final UniqueKey<v3_AuthorRecord> v3_PK_T_AUTHOR = createUniqueKey(v3_Author.v3_AUTHOR, "PK_T_AUTHOR", v3_Author.v3_AUTHOR.v3_ID);
3
cloudera/flume
flume-core/src/main/java/com/cloudera/flume/handlers/text/TailSource.java
[ "public class Context {\n Map<String, Object> table = new HashMap<String, Object>();\n final Context parent;\n\n final public static Context EMPTY = new Context(null);\n\n public Context(Context parent) {\n this.parent = parent;\n }\n\n /**\n * This should only be used rarely. You probably want\n * Log...
import com.cloudera.flume.core.Event; import com.cloudera.flume.core.EventSource; import com.cloudera.flume.handlers.text.CustomDelimCursor.DelimMode; import com.cloudera.util.Clock; import com.cloudera.util.Pair; import com.google.common.base.Preconditions; import java.io.File; import java.io.IOException; import java....
/** * Licensed to Cloudera, Inc. under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Cloudera, Inc. licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use th...
String regex, DelimMode dm) {
4
killbill/killbill-meter-plugin
src/test/java/org/killbill/billing/plugin/meter/timeline/aggregator/TestTimelineAggregator.java
[ "public interface MeterConfig {\n\n @Config(\"org.killbill.billing.plugin.meter.timelines.length\")\n @Description(\"How long to buffer data in memory before flushing it to the database\")\n @Default(\"60m\")\n TimeSpan getTimelineLength();\n\n // This is used to predict the number of samples between...
import java.io.IOException; import java.util.Map; import java.util.Properties; import java.util.UUID; import java.util.concurrent.atomic.AtomicLong; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.killbill.billing.plugin.meter.MeterConfig; import org.killbill.billing.plugin.meter.MeterTestS...
/* * Copyright 2010-2014 Ning, Inc. * Copyright 2014 The Billing Project, LLC * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/lice...
final MeterConfig config = new ConfigurationObjectFactory(properties).build(MeterConfig.class);
0
YiuChoi/MicroReader
app/src/main/java/name/caiyao/microreader/ui/fragment/ItHomeFragment.java
[ "@Root(name = \"item\")\npublic class ItHomeItem implements Parcelable {\n @Attribute(name = \"t\",required = false)\n private String t;\n @Element(name = \"newsid\")\n private String newsid;\n @Element(name = \"title\")\n private String title;\n @Element(name = \"c\", required = false)\n pr...
import android.os.Bundle; 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 android.view.LayoutInflater; import androi...
package name.caiyao.microreader.ui.fragment; /** * Created by 蔡小木 on 2016/3/24 0024. */ public class ItHomeFragment extends BaseFragment implements SwipeRefreshLayout.OnRefreshListener, IItHomeFragment { @BindView(R.id.progressBar) ProgressBar progressBar; @BindView(R.id.swipe_target) RecyclerVi...
mItHomePresenter = new ItHomePresenterImpl(this, getActivity());
2
850759383/ZhihuDailyNews
app/src/main/java/com/yininghuang/zhihudailynews/SplashActivity.java
[ "public class MainActivity extends BaseActivity implements NavAdapter.OnNavItemClickListener {\n\n private static final int LIGHT_THEME = R.style.AppTheme_NoActionBar_TranslucentStatusBar;\n private static final int DARK_THEME = R.style.AppThemeDark_NoActionBar_TranslucentStatusBar;\n\n private Toolbar too...
import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.load.resource.drawable.GlideDrawable; import com.bumptech.glide.request.RequestListener; import com.bumptech.glide.request....
package com.yininghuang.zhihudailynews; /** * Created by Yining Huang on 2016/10/17. */ public class SplashActivity extends AppCompatActivity { ImageView mStartupImage; TextView mImageDescribe; private SubscriptionList subscriptions = new SubscriptionList(); @Override public void onCreate...
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
0
KayLerch/alexa-morse-coder
skill/src/main/java/io/klerch/alexa/morse/skill/intents/exercise/ExerciseOnCorrect.java
[ "public class AbstractHandler implements AlexaIntentHandler {\n private static final Logger log = Logger.getLogger(ExerciseOnNew.class);\n\n protected MorseSession morseSession;\n protected AlexaStateHandler sessionHandler;\n protected AWSDynamoStateHandler dynamoHandler;\n\n /**\n * Sends out a ...
import com.amazon.speech.ui.Card; import io.klerch.alexa.morse.skill.intents.AbstractHandler; import io.klerch.alexa.morse.skill.model.MorseExercise; import io.klerch.alexa.morse.skill.model.MorseRecord; import io.klerch.alexa.morse.skill.model.MorseUser; import io.klerch.alexa.morse.skill.SkillConfig; import io.klerch...
package io.klerch.alexa.morse.skill.intents.exercise; @AlexaIntentListener(customIntents = "Exercise") public class ExerciseOnCorrect extends AbstractHandler implements AlexaIntentHandler { private static final Logger log = Logger.getLogger(ExerciseOnCorrect.class);
private MorseExercise exercise;
1
hazelcast/spring-data-hazelcast
src/test/java/org/springframework/data/hazelcast/repository/query/QueryIT.java
[ "public class TestConstants {\n\n public static final String CLIENT_INSTANCE_NAME = \"hazelcast-instance-client\";\n public static final String SERVER_INSTANCE_NAME = \"hazelcast-instance-server\";\n\n public static final String SPRING_TEST_PROFILE_CLIENT_SERVER = \"client-server\";\n public static fina...
import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Slice; import org.springframework.data.domain.S...
/* * Copyright (c) 2008-2018, Hazelcast, 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 ...
private PersonRepository personRepository;
5
bhatti/PlexRBAC
src/main/java/com/plexobject/rbac/service/impl/AuthorizationServiceImpl.java
[ "public class ServiceFactory {\n private static RepositoryFactory REPOSITORY_FACTORY = new RepositoryFactoryImpl();\n private static PermissionManager PERMISSION_MANAGER = new PermissionManagerImpl(\n REPOSITORY_FACTORY, new JavascriptEvaluator());\n\n public static RepositoryFactory getDefaultF...
import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.c...
package com.plexobject.rbac.service.impl; @Path("/authorize") @Component("authorizationService") @Scope("singleton") public class AuthorizationServiceImpl implements AuthorizationService, InitializingBean { private static final Logger LOGGER = Logger .getLogger(AuthorizationServiceImpl.clas...
CurrentRequest.getSubjectName(), operation, target,
7
ushahidi/SMSSync
smssync/src/main/java/org/addhen/smssync/presentation/di/component/AppServiceComponent.java
[ "@Module\npublic class ServiceModule {\n\n private final Service mService;\n\n public ServiceModule(Service service) {\n mService = service;\n }\n\n /**\n * Expose the activity to dependents in the graph.\n */\n @Provides\n @ServiceScope\n Service service() {\n return mSer...
import org.addhen.smssync.presentation.service.MessageResultsService; import org.addhen.smssync.presentation.service.SmsReceiverService; import org.addhen.smssync.presentation.service.SyncPendingMessagesService; import org.addhen.smssync.presentation.service.UpdateMessageService; import dagger.Component; import org.add...
/* * Copyright (c) 2010 - 2015 Ushahidi Inc * All rights reserved * Contact: team@ushahidi.com * Website: http://www.ushahidi.com * GNU Lesser General Public License Usage * This file may be used under the terms of the GNU Lesser * General Public License version 3 as published by the Free Software * Foundation ...
void inject(SyncPendingMessagesService syncPendingMessagesService);
5
RapidProjectH2020/offloading-framework-android
Rapid-DemoApp/src/eu/project/rapid/demo/StartExecution.java
[ "public class DFE {\n\n private static final String TAG = \"DFE\";\n\n public static boolean CONNECT_TO_PREVIOUS_VM = false;\n\n private Configuration config;\n public static final int SDK_INT = Build.VERSION.SDK_INT;\n\n private static int mRegime;\n public static final int REGIME_CLIENT = 1;\n public stati...
import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Random; import android.app.Activity; import android.app.ProgressDialog; import android.graphics.Color; import android.os.AsyncTask; imp...
/******************************************************************************* * Copyright (C) 2015, 2016 RAPID EU Project * * This library is free software; you can redistribute it and/or modify it under the terms of the * GNU Lesser General Public License as published by the Free Software Foundation; either ver...
VirusScanning virusScanner = new VirusScanning(getApplicationContext(), dfe, nrClones);
6
tvbarthel/SimpleWeatherForecast
SimpleWeatherForecast/src/main/java/fr/tvbarthel/apps/billing/SupportActivity.java
[ "public class IabHelper {\n // Is debug logging enabled?\n boolean mDebugLog = false;\n String mDebugTag = \"IabHelper\";\n\n // Is setup done?\n boolean mSetupDone = false;\n\n // Has this object been disposed of? (If so, we should ignore callbacks, etc)\n boolean mDisposed = false;\n\n // ...
import android.app.Activity; import android.app.AlertDialog; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.view.LayoutInflater; import android.view.View; import android.widget.AdapterView; import android.wid...
package fr.tvbarthel.apps.billing; public class SupportActivity extends Activity { /** * dev purpose */ private static final String TAG = SupportActivity.class.getName(); /** * helper for in app billing */ private IabHelper mIabHelper; /** * used to manage Toast ...
SupportUtils.REQUEST_CODE_SUPPORT_DEV,
4
waynedgrant/android-appwidget-cirrus
app/src/test/java/com/waynedgrant/cirrus/clientraw/TestClientRaw.java
[ "public class BigDecimalEquals {\n public void assertEquals(BigDecimal expected, BigDecimal actual) {\n assertTrue(expected.compareTo(actual) == 0);\n }\n}", "public enum Conditions {\n SUNNY_1(0, \"Sunny\"),\n CLEAR_NIGHT(1, \"Clear Night\"),\n CLOUDY_1(2, \"Cloudy\"),\n CLOUDY_2(3, \"Cl...
import com.waynedgrant.cirrus.BigDecimalEquals; import com.waynedgrant.cirrus.measures.Conditions; import com.waynedgrant.cirrus.measures.Trend; import com.waynedgrant.cirrus.units.PressureUnit; import com.waynedgrant.cirrus.units.RainfallUnit; import com.waynedgrant.cirrus.units.TemperatureUnit; import com.wayne...
public void GIVEN_humidex_field_populated_WHEN_accessed_THEN_returns_correct_value() throws IOException { InputStream is = createClientRawWithFields(new ClientRawStringGenerator.Field(ClientRaw.HUMIDEX_CELSIUS, "15.5")); testee = ClientRaw.getInstance(is); new BigDecimalEquals().assertEqu...
assertEquals(Trend.RISING, testee.getSurfacePressureTrend());
2
brutusin/wava
wava-core/src/main/java/org/brutusin/wava/utils/LinuxCommands.java
[ "public class Config {\r\n\r\n private final File tempFolder;\r\n private static volatile Config instance;\r\n private final ConfigImpl impl;\r\n\r\n private Config() {\r\n try {\r\n File cfgFile = new File(WavaHome.getInstance().getFile(), \"cfg/wava.json\");\r\n if (!cfgFi...
import org.brutusin.wava.core.stats.MemoryStats; import org.brutusin.wava.env.WavaHome; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Scanner; ...
} catch (Exception ex) { throw new RuntimeException(ex); } } private static void createGroupIOCgroup(String groupName) { try { File f = new File(BLKIO_CGROUP_ROOT, groupName); String[] cmd = {"mkdir", f.getAbsolutePath()}; Process...
public static IOStats getCgroupIOStats(String groupName, Integer jobId) {
2
ArcBees/gwtquery-draggable-plugin
sample/src/main/java/gwtquery/plugins/draggable/client/GWTIntegrationSample.java
[ "public class DragEvent extends\n AbstractDraggableEvent<DragEvent.DragEventHandler> {\n\n public interface DragEventHandler extends EventHandler {\n public void onDrag(DragEvent event);\n }\n\n public static Type<DragEventHandler> TYPE = new Type<DragEventHandler>();\n\n\n public DragEvent(DragContext dr...
import com.google.gwt.core.client.EntryPoint; import com.google.gwt.core.client.GWT; import com.google.gwt.event.logical.shared.OpenEvent; import com.google.gwt.event.logical.shared.OpenHandler; import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.event.logical.shared.ValueChangeHandler; i...
/* * Copyright 2010 The gwtquery plugins team. * * 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...
public <T extends Widget> DraggableWidget<T> makeDraggable(T widget,
4