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
nloko/SyncMyPix
src/com/nloko/android/syncmypix/MainActivity.java
[ "public class PhotoStore {\n\n private final String TAG = PhotoStore.class.getSimpleName();\n\n // Directory name under the root directory for photo storage.\n private final String DIRECTORY = \"photos\";\n\n /** Map of keys to entries in the directory. */\n private final Map<Long, Entry> mEntries;\n...
import java.io.IOException; import java.lang.ref.WeakReference; import java.lang.reflect.Method; import java.net.MalformedURLException; import com.android.providers.contacts.PhotoStore; import com.facebook.android.DialogError; import com.facebook.android.Facebook; import com.facebook.android.Facebook.DialogListener; im...
// // MainActivity.java is part of SyncMyPix // // Authors: // Neil Loknath <neil.loknath@gmail.com> // // Copyright (c) 2009 Neil Loknath // // SyncMyPix 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 ...
fbClient.authorize(self, new DialogListener() {
2
excella-core/excella-reports
src/test/java/org/bbreak/excella/reports/AllTestSuite.java
[ "@RunWith(Suite.class)\n@SuiteClasses({\n ExcelExporterTest.class,\n ReportBookExporterTest.class,\n XLSExporterTest.class,\n XLSXExporterTest.class,\n ExcelOutputStreamExporterTest.class,\n})\npublic class ExporterTestSuite {\n\n}", "@RunWith(Suite.class)\n@SuiteClasses({\n RemoveAdapterTest.cl...
import org.bbreak.excella.reports.exporter.ExporterTestSuite; import org.bbreak.excella.reports.listener.ListenerTestSuite; import org.bbreak.excella.reports.model.ModelTestSuite; import org.bbreak.excella.reports.others.OthersTestSuite; import org.bbreak.excella.reports.processor.ProcessorTestSuite; import org.bbreak....
/*- * #%L * excella-reports * %% * Copyright (C) 2009 - 2019 bBreak Systems and 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/licen...
OthersTestSuite.class
3
open-erp-systems/erp-backend
erp-server/src/main/java/com/jukusoft/erp/server/gateway/DefaultApiGateway.java
[ "public interface ApiGateway {\n\n /**\n * handle request\n *\n * @param request request\n * @param handler response handler\n */\n public void handleRequestAsync (ApiRequest request, ResponseHandler handler);\n\n}", "public interface ResponseHandler {\n\n public void handleResponse (Ap...
import com.jukusoft.erp.lib.gateway.ApiGateway; import com.jukusoft.erp.lib.gateway.ResponseHandler; import com.jukusoft.erp.lib.logging.ILogging; import com.jukusoft.erp.lib.message.request.ApiRequest; import com.jukusoft.erp.lib.message.request.ApiRequestCodec; import com.jukusoft.erp.lib.message.response.ApiResponse...
package com.jukusoft.erp.server.gateway; public class DefaultApiGateway implements ApiGateway { //instance of vert.x protected Vertx vertx = null; //clusered vert.x eventbus protected EventBus eventBus = null; //logger protected ILogging logger = null; protected DeliveryOptions deliver...
eventBus.registerDefaultCodec(ApiResponse.class, new ApiResponseCodec());
6
yandex-disk/yandex-disk-restapi-java
disk-restapi-sdk/src/main/java/com/yandex/disk/rest/retrofit/CloudApi.java
[ "public class ServerIOException extends ServerException {\n\n public ServerIOException() {\n super();\n }\n\n public ServerIOException(String message) {\n super(message);\n }\n\n public ServerIOException(Throwable e) {\n super(e);\n }\n}", "public class ApiVersion {\n\n @...
import com.yandex.disk.rest.exceptions.ServerIOException; import com.yandex.disk.rest.json.ApiVersion; import com.yandex.disk.rest.json.DiskInfo; import com.yandex.disk.rest.json.Link; import com.yandex.disk.rest.json.Operation; import com.yandex.disk.rest.json.Resource; import com.yandex.disk.rest.json.ResourceList; i...
/* * (C) 2015 Yandex LLC (https://yandex.com/) * * The source code of Java SDK for Yandex.Disk REST API * is available to use under terms of Apache License, * Version 2.0. See the file LICENSE for the details. */ package com.yandex.disk.rest.retrofit; public interface CloudApi { @GET("/") ApiVersion getAp...
throws IOException, ServerIOException;
0
sdcuike/spring-boot-oauth2-demo
spring-boot-oauth-authorization-server/src/main/java/com/sdcuike/practice/controller/CityController.java
[ "@Data\n@NoArgsConstructor\npublic class City extends AbstractAuditingEntity implements Serializable {\n private static final long serialVersionUID = 1L;\n \n /**\n * 城市id\n */\n private Long id;\n\n private String name;\n\n private String state;\n}", "...
import com.doctor.beaver.domain.result.ModelResult; import com.sdcuike.practice.domain.City; import com.sdcuike.practice.domain.dto.CityDtoMapper; import com.sdcuike.practice.domain.dto.InsertCityRequestDto; import com.sdcuike.practice.domain.dto.UpdateCityRequestDto; import com.sdcuike.practice.mapper.CityMapper; impo...
package com.sdcuike.practice.controller; /** * Created by beaver on 2017/4/25. */ @RestController @RequestMapping(path = "/city", produces = MediaType.APPLICATION_JSON_VALUE) @Slf4j public class CityController { @Autowired private CityMapper cityMapper; @Autowired private CityDtoMapper cityDtoMapper...
public ModelResult<City> update(@Validated @RequestBody UpdateCityRequestDto updateCityRequestDto) {
3
albertogiunta/justintrain-client-android
app/src/main/java/com/jaus/albertogiunta/justintrain_oraritreni/trainDetails/TrainDetailsContract.java
[ "public interface BasePresenter {\n\n /**\n * Should be called in the onDestroy method.\n * Sets the view to null\n */\n void unsubscribe();\n\n /**\n * Should be called in the onrResume method.\n * It receives a bundle and sets the state of the presenter to it if any interesting value ...
import com.jaus.albertogiunta.justintrain_oraritreni.BasePresenter; import com.jaus.albertogiunta.justintrain_oraritreni.BaseView; import com.jaus.albertogiunta.justintrain_oraritreni.data.Journey; import com.jaus.albertogiunta.justintrain_oraritreni.data.News; import com.jaus.albertogiunta.justintrain_oraritreni.data....
package com.jaus.albertogiunta.justintrain_oraritreni.trainDetails; public interface TrainDetailsContract { interface Presenter extends BasePresenter { void updateRequested(); void refreshRequested(); void onFavouriteButtonClick(); void onDoubleAdditionConfirmation(); ...
void showErrorMessage(String tvMessage, String btnMessage, ENUM_ERROR_BTN_STATUS intent);
5
ToxicBakery/Screenshot-Redaction
app/src/main/java/com/ToxicBakery/app/screenshot_redaction/ScreenshotApplication.java
[ "public class CopyToSdCard {\n\n public void copy(@NonNull ICopyConfiguration copy) {\n Observable.just(copy)\n .observeOn(Schedulers.io())\n .subscribeOn(Schedulers.io())\n .subscribe(new CopyAction());\n }\n\n public interface ICopyConfiguration {\n\n ...
import android.Manifest; import android.app.Application; import android.util.Log; import com.ToxicBakery.android.version.Is; import com.ToxicBakery.app.screenshot_redaction.copy.CopyToSdCard; import com.ToxicBakery.app.screenshot_redaction.copy.TessDataRawResourceCopyConfiguration; import com.ToxicBakery.app.screenshot...
package com.ToxicBakery.app.screenshot_redaction; public class ScreenshotApplication extends Application { private static final String[] PERMISSIONS = { Manifest.permission.READ_EXTERNAL_STORAGE }; private static final String TAG = "ScreenshotApplication"; private static final String...
ScreenshotService.startScreenshotService(getApplicationContext());
5
Kaysoro/KaellyBot
src/main/java/data/SetDofus.java
[ "public enum Language {\n\n FR(\"Français\", \"FR\"), EN(\"English\", \"EN\"), ES(\"Español\", \"ES\");\n\n private String name;\n private String abrev;\n\n Language(String name, String abrev){\n this.name = name;\n this.abrev = abrev;\n }\n\n public String getName() {\n retur...
import discord4j.core.object.Embed; import discord4j.core.spec.EmbedCreateSpec; import enums.Language; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import util.EmojiManager; import util.JSoupManager; import util.Translator; import util.URLManager; import java.awt.*;...
package data; /** * Created by steve on 14/07/2016. */ public class SetDofus implements Embedded { private String name; private String level; private String skinURL; private String url; private List<String> bonusTotal; private String composition; private String[] bonusPano; private...
public EmbedCreateSpec decorateEmbedObject(Language lg) {
0
cjwizard/cjwizard
cjwizard-demo/src/main/java/com/github/cjwizard/demo/WizardTestNavBar.java
[ "public abstract class AbstractPageFactory implements PageFactory {\n\n /*\n * (non-Javadoc)\n * @see com.github.cjwizard.PageFactory#isTransient(java.util.List, com.github.cjwizard.WizardSettings)\n */\n @Override\n public boolean isTransient(List<WizardPage> path, WizardSettings settings) {\n ...
import javax.swing.JTextField; import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE; import com.github.cjwizard.AbstractPageFactory; import com.github.cjwizard.StackWizardSettings; import com.github.cjwizard.WizardContainer; import com.github.cjwizard.WizardListener; import com.github.cjwizard.WizardPage; import ...
/* * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distr...
public void onCanceled(List<WizardPage> path, WizardSettings settings) {
4
katjas/PDFrenderer
src/com/sun/pdfview/font/PDFFont.java
[ "public abstract class BaseWatchable implements Watchable, Runnable {\r\n\r\n /** the current status, from the list in Watchable */\r\n private int status = Watchable.UNKNOWN;\r\n /** a lock for status-related operations */\r\n private final Object statusLock = new Object();\r\n /** a lock for parsin...
import com.sun.pdfview.PDFDebugger; import com.sun.pdfview.PDFObject; import com.sun.pdfview.PDFParseException; import com.sun.pdfview.PDFRenderer; import com.sun.pdfview.font.cid.PDFCMap; import com.sun.pdfview.font.cid.ToUnicodeMap; import com.sun.pdfview.font.ttf.TrueTypeFont; import java.io.File; import jav...
font = new Type0Font(baseFont, obj, descriptor); } else if (subType.equals("Type1")) { // load a type1 font if (descriptor.getFontFile() != null) { // it's a Type1 font, included. font = new Type1Font(baseFont, obj, descriptor); if...
BaseWatchable.getErrorHandler().publishException(t);
0
redsolution/bst
bst/src/main/java/ru/redsolution/bst/ui/ChooseActivity.java
[ "public class BST extends Application {\n\n\tprivate static final String HOST_URL = \"https://online.moysklad.ru\";\n\tprivate static final String IMPORT_URL = HOST_URL\n\t\t\t+ \"/exchange/rest/ms/xml/%s/list?start=%d&count=%d\";\n\tprivate static final String INVENTORY_URL = HOST_URL\n\t\t\t+ \"/exchange/rest/ms/...
import ru.redsolution.bst.R; import ru.redsolution.bst.data.BST; import ru.redsolution.bst.data.table.BaseDatabaseException; import ru.redsolution.bst.data.table.BaseGoodTable; import ru.redsolution.bst.data.table.CustomGoodTable; import ru.redsolution.bst.data.table.GoodFolderTable; import ru.redsolution.bst.data.tabl...
/** * Copyright (c) 2013, Redsolution LTD. All rights reserved. * * This file is part of Barcode Scanner Terminal project; * you can redistribute it and/or modify it under the terms of * * Barcode Scanner Terminal is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the imp...
if (tableName.equals(GoodTable.getInstance().getTableName())) {
5
EvidentSolutions/dalesbred
dalesbred/src/main/java/org/dalesbred/internal/instantiation/SqlArrayConversion.java
[ "public class DatabaseSQLException extends DatabaseException {\n\n public DatabaseSQLException(@NotNull String message, @NotNull SQLException cause) {\n super(message, cause);\n }\n\n public DatabaseSQLException(@NotNull SQLException cause) {\n super(cause);\n }\n\n @Override\n publi...
import java.sql.Array; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import java.util.function.Function; import org.dalesbred.DatabaseSQLException; import org.dalesbred.internal.jdbc.ResultSetUtils; import org.dalesbred.internal.jdbc.SqlUtils; import org.dal...
/* * Copyright (c) 2017 Evident Solutions Oy * * 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...
NamedTypeList types = NamedTypeList.builder(1).add("value", ResultSetUtils.getColumnType(resultSet.getMetaData(), 2)).build();
1
gopaycommunity/gopay-java-api
common/src/main/java/cz/gopay/api/v3/model/payment/BasePaymentBuilder.java
[ "@XmlRootElement\npublic class Callback {\n\n @XmlElement(name = \"return_url\")\n private String returnUrl;\n\n @XmlElement(name = \"notification_url\")\n private String notificationUrl;\n\n public String getReturnUrl() {\n return returnUrl;\n }\n\n public void setReturnUrl(String retur...
import cz.gopay.api.v3.model.payment.support.Callback; import cz.gopay.api.v3.model.payment.support.Payer; import cz.gopay.api.v3.model.payment.support.PayerContact; import cz.gopay.api.v3.model.payment.support.PayerPaymentCard; import cz.gopay.api.v3.model.payment.support.PaymentInstrument; import cz.gopay.api.v3.mode...
package cz.gopay.api.v3.model.payment; /** * * @author František Sichinger */ public class BasePaymentBuilder extends AbstractPaymentBuilder<BasePayment,BasePaymentBuilder> { private String lang; private Callback callback; private Boolean preauth; private Recurrence recurrence; private Payer ...
public BasePaymentBuilder withPaymentInstrument(PaymentInstrument paymentInstrument) {
4
dariober/ASCIIGenome
src/test/java/tracks/TrackWigglesTest.java
[ "public class Config {\n\t\n\t// C O N S T R U C T O R \n\t\n\tprivate static final Map<ConfigKey, String> config= new HashMap<ConfigKey, String>();\n\n\tpublic Config(String source) throws IOException, InvalidConfigException {\n\t\t\n\t\tnew Xterm256();\n\t\t\n\t\tString RawConfigFile= Config.getConfigFileAsString...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.io.IOException; import java.security.NoSuchAlgorithmException; import java.sql.SQLException; import org.broad.igv.bbfile.BBFileReader; import org.broad.igv.bbfile.BigWigIterator; import org.junit.Before; import org.junit...
package tracks; public class TrackWigglesTest { @Before public void prepareConfig() throws IOException, InvalidConfigException{ new Config(null); } @Test public void canCloseReaders() throws ClassNotFoundException, IOException, InvalidRecordException, InvalidGenomicCoordsException, SQLException{
GenomicCoords gc= new GenomicCoords("chr7:5540000-5570000", 80, null, null);
5
cjburkey01/ClaimChunk
src/main/java/com/cjburkey/claimchunk/api/IClaimChunkPlugin.java
[ "public class ClaimChunkConfig {\n\n private final FileConfiguration config;\n\n /* Basic */\n\n @Getter private boolean checkForUpdates;\n @Getter private boolean disablePermissions;\n\n /* Colors */\n\n @Getter private ChatColor infoColor;\n\n /* Chunks */\n\n @Getter private boolean parti...
import com.cjburkey.claimchunk.ClaimChunkConfig; import com.cjburkey.claimchunk.chunk.ChunkHandler; import com.cjburkey.claimchunk.config.ClaimChunkWorldProfileHandler; import com.cjburkey.claimchunk.i18n.V2JsonMessages; import com.cjburkey.claimchunk.layer.PrereqsInitLayer; import com.cjburkey.claimchunk.player.AdminO...
package com.cjburkey.claimchunk.api; public interface IClaimChunkPlugin { /* Info */ /** * Get an instance of the Bukkit server class. * * @return Get the server */ Server getServer(); /** * The version for ClaimChunk. * * @return The version for this installati...
V2JsonMessages getMessages();
3
igoticecream/Snorlax
app/src/main/java/com/icecream/snorlax/module/feature/rename/RenameFormat.java
[ "@SuppressWarnings({\"unused\", \"FieldCanBeLocal\", \"WeakerAccess\"})\npublic final class Decimals {\n\n\tpublic static String format(float value, int minIntegerDigits, int maxIntegerDigits, int minFractionDigits, int maxFractionDigits) {\n\t\treturn getDecimalFormat(minIntegerDigits, maxIntegerDigits, minFractio...
import static POGOProtos.Data.PokemonDataOuterClass.PokemonData; import static java.lang.Integer.parseInt; import java.util.Locale; import javax.inject.Inject; import javax.inject.Singleton; import android.support.annotation.Nullable; import com.icecream.snorlax.common.Decimals; import com.icecream.snorlax.common.Strin...
/* * Copyright (c) 2016. Pedro Diaz <igoticecream@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by...
private final PokemonFactory mPokemonFactory;
3
eltrueno/TruenoNPC
src/es/eltrueno/npc/nms/TruenoNPC_v1_11_r1.java
[ "public interface TruenoNPC {\n\n /**\n *\n *\n * @author el_trueno\n *\n *\n **/\n\n void delete();\n Location getLocation();\n int getEntityID(Player p);\n boolean isDeleted();\n int getNpcID();\n TruenoNPCSkin getSkin();\n}", "public class TruenoNPCApi {\n\n /**\...
import com.google.common.collect.Lists; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.mojang.authlib.GameProfile; import com.mojang.authlib.properties.Property; import es.eltrueno.npc.TruenoNPC; import es.eltrueno.n...
package es.eltrueno.npc.nms; public class TruenoNPC_v1_11_r1 implements TruenoNPC { /** * * * @author el_trueno * * **/ private static List<TruenoNPC_v1_11_r1> npcs = new ArrayList<TruenoNPC_v1_11_r1>(); private static int id = 0; private static boolean taskstarted = f...
if(TruenoNPCApi.getCache() && this.skin.getSkinType()!= SkinType.PLAYER) {
1
Outurnate/WarpBook
src/main/java/com/panicnot42/warpbook/core/WarpDrive.java
[ "@Mod(modid = Properties.modid, name = Properties.name, version = Properties.version)\npublic class WarpBookMod {\n\t@Mod.Instance(value = Properties.modid)\n\tpublic static WarpBookMod instance;\n\t\n\tpublic static final Logger logger = LogManager.getLogger(Properties.modid);\n\tpublic static final SimpleNetworkW...
import java.math.RoundingMode; import java.util.Arrays; import java.util.Iterator; import com.panicnot42.warpbook.WarpBookMod; import com.panicnot42.warpbook.net.packet.PacketEffect; import com.panicnot42.warpbook.util.CommandUtils; import com.panicnot42.warpbook.util.MathUtils; import com.panicnot42.warpbook.util.Wayp...
package com.panicnot42.warpbook.core; public class WarpDrive { public void handleWarp(EntityPlayer player, ItemStack warpItem) { if (warpItem.getItem() instanceof IDeclareWarp && !player.world.isRemote) { Waypoint wp = ((IDeclareWarp)warpItem.getItem()).getWaypoint(player, warpItem); if (wp == null) {//...
PacketEffect oldDim = new PacketEffect(true, MathUtils.round(player.posX, RoundingMode.DOWN), MathUtils.round(player.posY, RoundingMode.DOWN), MathUtils.round(player.posZ, RoundingMode.DOWN));
3
xwang1024/SIF-Resource-Explorer
src/main/java/me/xwang1024/sifResExplorer/service/AssetService.java
[ "public class SIFConfig {\r\n\tprivate static final Logger logger = LoggerFactory\r\n\t\t\t.getLogger(SIFConfig.class);\r\n\r\n\tpublic static SIFConfig instance;\r\n\tprivate String filePath = \"sif.xml\";\r\n\tprivate Map<String, String> conf = Collections\r\n\t\t\t.synchronizedMap(new HashMap<String, String>());...
import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import me.xwang1024.sifResExplorer.config.SIFConfig; import me.xwang1024.sifResExplorer.config.SIFConfi...
package me.xwang1024.sifResExplorer.service; public class AssetService { private static AssetService instance; private ImagDao imageDao = new ImagDaoImpl(); private List<AssetItem> assetList; private PathNode root; private AssetService() { } public static AssetService getInstance() { if (i...
String absRoot = SIFConfig.getInstance().get(ConfigName.assetsPath);
1
JAYAndroid/whiteboard
client/src/com/yems/painter/handler/MyClientHandler.java
[ "public class Commons\n{\n\t/** ·þÎñÆ÷IPµØÖ· */\n\tpublic static String SERVER_IP_ADDRESS = \"\";\n\t/** ¶Ë¿ÚºÅ */\n\tpublic static int SERVER_PORT = 8080;\n\t/** Ï̳߳شóС£¬Ä¬ÈÏΪ10¸ö */\n\tpublic static final int THREAD_COUNT = 10;\n\t/** ĬÈÏ»­±Ê´óС */\n\tpublic static final float DEFAULT_BRUSH_SIZE = 2;\n\t/*...
import java.net.InetSocketAddress; import java.util.List; import org.jboss.netty.channel.ChannelHandlerContext; import org.jboss.netty.channel.ChannelStateEvent; import org.jboss.netty.channel.ExceptionEvent; import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.channel.SimpleChannelHandler; import androi...
package com.yems.painter.handler; /** * @ClassName: ClientHandler * @Description: ×Ô¶¨Òå¿Í»§¶Ë´¦ÀíÆ÷£¨ÓÃÓÚ´¦ÀíͨµÀÖÐÏûÏ¢µÄÊÕ·¢µÈ£© * @author yems * @date 2015-3-6 ÏÂÎç01:37:47 * */ public class MyClientHandler extends SimpleChannelHandler { private String TAG = "ClientHandler"; /** ×Ô¶¨ÒåµÄ»­²¼¶ÔÏó */ p...
ShapeRepositories.getInstance().getUndoCaches().addAll(paths);
5
mosscode/ach
src/main/java/com/moss/ach/file/AchFileWriter.java
[ "public abstract class AchEntryDetailFormat {\n\n}", "public class AchFileFormat {\n\n\tpublic AchFileHeaderFormat header;\n\t\n\tpublic List<AchBatchFormat> batches;\n\t\n\tpublic AchFileControlFormat control;\n}", "@SuppressWarnings(\"serial\")\npublic class AchFileFormatException extends Exception {\n\n\tpub...
import java.io.IOException; import java.io.Writer; import java.util.ArrayList; import com.moss.ach.file.format.AchBatchControlFormat; import com.moss.ach.file.format.AchBatchFormat; import com.moss.ach.file.format.AchBatchHeaderFormat; import com.moss.ach.file.format.AchEntryDetailFormat; import com.moss.ach.file.forma...
/** * Copyright (C) 2013, Moss Computing Inc. * * This file is part of ach. * * ach is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * ach ...
AchFileFormat format = new AchFileFormat();
1
jchampemont/WTFDYUM
src/main/java/com/jeanchampemont/wtfdyum/service/impl/CronServiceImpl.java
[ "public class Event {\n\n public Event() {\n // left deliberately empty\n }\n\n public Event(final EventType type, final String additionalData) {\n this.type = type;\n this.additionalData = additionalData;\n }\n\n private EventType type;\n\n private String additionalData;\n\n ...
import org.springframework.util.StopWatch; import java.util.HashSet; import java.util.Set; import com.jeanchampemont.wtfdyum.dto.Event; import com.jeanchampemont.wtfdyum.dto.Feature; import com.jeanchampemont.wtfdyum.dto.Principal; import com.jeanchampemont.wtfdyum.dto.type.EventType; import com.jeanchampemont.wtfdyum....
/* * Copyright (C) 2015, 2016 WTFDYUM * * This file is part of the WTFDYUM project. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *...
if (WTFDYUMExceptionType.GET_FOLLOWERS_RATE_LIMIT_EXCEEDED.equals(e.getType())) {
6
wrey75/WaveCleaner
src/main/java/com/oxande/xmlswing/components/JTextAreaUI.java
[ "public class AttributeDefinition {\r\n\t\r\n\tpublic final static Map<String, String> ALIGNS = new HashMap<String, String>();\r\n\tpublic final static Map<String, String> CLOSE_OPERATIONS = new HashMap<String, String>();\r\n\tpublic final static Map<String, String> CURSORS = new HashMap<String, String>();\r\n\tpub...
import javax.swing.JTextArea; import org.w3c.dom.Element; import com.oxande.xmlswing.AttributeDefinition; import com.oxande.xmlswing.AttributesController; import com.oxande.xmlswing.Parser; import com.oxande.xmlswing.AttributeDefinition.ClassType; import com.oxande.xmlswing.UnexpectedTag; import com.oxande.xmlsw...
package com.oxande.xmlswing.components; /** * The JTextArea implementation. * * @author wrey75 * @version $Rev: 47 $ * */ public class JTextAreaUI extends JTextComponentUI { public static final AttributeDefinition[] PROPERTIES = { new AttributeDefinition( "cols", "setColumns", ClassType.IN...
varName = Parser.addDeclaration( jclass, root, JTextArea.class );
2
teivah/TIBreview
src/main/java/com/tibco/exchange/tibreview/processor/processrule/java/PRCycleCheck.java
[ "public class TIBProcess {\n\tprivate String filePath;\n\tprivate String fullProcessName;\n\tprivate String processName;\n\tprivate String packageName;\n\tprivate List<PartnerLinkModel> partners;\n\tprivate static final String PROCESSES_PACKAGE = \"Processes\";\n\tprivate static final String PROCESS_EXTENSION = \"....
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import com.tibco.exchange.tibreview.common.TIBProcess; import com.tibco.exchange.tibreview.common.TIBProcessManager; import com.tibco.exchange.tibreview.common.Util; import com.tibco.exchan...
package com.tibco.exchange.tibreview.processor.processrule.java; public class PRCycleCheck extends PRJava { private static final Logger LOGGER = Logger.getLogger(PRJava.class); @Override
public List<Violation> process(Context context, List<TIBProcess> processes, Rule rule, Object impl)
5
upenn-libraries/xmlaminar
core/src/main/java/edu/upenn/library/xmlaminar/dbxml/SQLXMLReader.java
[ "public class BoundedXMLFilterBuffer extends XMLFilterLexicalHandlerImpl {\n\n private static final int MAX_STRING_ARGS_PER_EVENT = 3;\n private static final int MAX_INT_ARGS_PER_EVENT = 2;\n private static final int CHAR_BUFFER_INIT_FACTOR = 6;\n public static final int DEFAULT_BUFFER_SIZE = 2000;\n ...
import edu.upenn.library.xmlaminar.BoundedXMLFilterBuffer; import edu.upenn.library.xmlaminar.SAXFeatures; import edu.upenn.library.xmlaminar.SAXProperties; import edu.upenn.library.xmlaminar.UnboundedContentHandlerBuffer; import edu.upenn.library.xmlaminar.VolatileXMLFilterImpl; import java.io.ByteArrayInputStream; im...
/* * Copyright 2011-2015 The Trustees of the University of Pennsylvania * * 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...
unmodifiableFeaturesAbs.put(SAXFeatures.NAMESPACES, true);
1
dkzwm/SmoothRefreshLayout
core/src/main/java/me/dkzwm/widget/srl/manager/VScaleLayoutManager.java
[ "public class SmoothRefreshLayout extends ViewGroup\n implements NestedScrollingParent3, NestedScrollingChild3 {\n // status\n public static final byte SR_STATUS_INIT = 1;\n public static final byte SR_STATUS_PREPARE = 2;\n public static final byte SR_STATUS_REFRESHING = 3;\n public static fin...
import me.dkzwm.widget.srl.SmoothRefreshLayout; import me.dkzwm.widget.srl.annotation.Orientation; import me.dkzwm.widget.srl.config.Constants; import me.dkzwm.widget.srl.extra.IRefreshView; import me.dkzwm.widget.srl.indicator.IIndicator; import me.dkzwm.widget.srl.util.ScrollCompat; import me.dkzwm.widget.srl.util.Vi...
/* * MIT License * * Copyright (c) 2017 dkzwm * Copyright (c) 2015 liaohuqiu.net * * 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 th...
if (ViewCatcherUtil.isViewPager(parentView)) {
5
mchro/RejsekortReader
code/android/RejsekortReader/src/info/rejsekort/reader/MainActivity.java
[ "public class MockRKFCard extends RKFCard {\n\n\tprivate byte[] mCardData = new byte[4096];\n\n\tpublic MockRKFCard(String cardData) throws IOException {\n\t\tsuper();\n\t\tassert(cardData.length() == 8192);\n\t\t\n\t\tfor (int i = 0; i < 4096; i++) {\n\t\t\tmCardData[i] = (byte) Integer.parseInt(cardData.substring...
import info.rejsekort.reader.rkf.MockRKFCard; import info.rejsekort.reader.rkf.RKFCard; import info.rejsekort.reader.rkf.TCELBlock_; import info.rejsekort.reader.rkf.TCSTBlock; import info.rejsekort.reader.rkf.blocks.TCSTv4Block; import info.rejsekort.reader.rkf.blocks.TCSTv5Block; import java.io.IOException; import ja...
package info.rejsekort.reader; public class MainActivity extends Activity { private NfcAdapter mAdapter; private PendingIntent mPendingIntent; private IntentFilter[] mFilters; private String[][] mTechLists;
public RKFCard mRKFCard;
1
tticoin/JointER
src/jp/tti_coin/main/java/model/DCDSSVMModel.java
[ "public class State implements Comparable<State> {\n\tprotected Parameters params;\n\tprotected Instance instance;\n\tprotected Label label;\n\tprotected double score;\n\tprotected int index;\n\tprotected double margin;\n\tprotected boolean correct;\n\tprotected boolean test;\n\tprotected SparseFeatureVector diffFv...
import inference.State; import java.util.Collections; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Random; import java.util.TreeMap; import java.util.Vector; import utils.MersenneTwister; import config.Parameters; import data.Data; import data.Instance; import data.Label;
package model; // This is a naive implementation of the following TACL paper // Chang, Ming-Wei, and Wen-tau Yih. // Dual Coordinate Descent Algorithms for Efficient Large Margin Structured Prediction. public class DCDSSVMModel extends Model { protected final double cParam; protected final double delta = 1.0e-1...
rand = new MersenneTwister(0);
1
BorjaSanchidrian/DarkOrbitServer
src/com/darkorbit/objects/Player.java
[ "public class LaserSystem extends AttackController {\n\tprivate Socket playerSocket, targetSocket;\n\tprivate Player target;\n\tprivate int minDamage, maxDamage;\n\t\n\tpublic LaserSystem(int playerID) {\n\t\tsuper(playerID);\n\t\t\n\t\tplayerSocket = super.getPlayerCM().getSocket();\n\t}\n\n\t@Override\n\tpublic v...
import java.net.Socket; import java.util.List; import com.darkorbit.attack.LaserSystem; import com.darkorbit.movement.PlayerMovement; import com.darkorbit.mysql.QueryManager; import com.darkorbit.net.GameManager; import com.darkorbit.net.Global; import com.darkorbit.utils.Extra; import com.darkorbit.utils.Vector;
package com.darkorbit.objects; /** * Player class * @author BoBn * */ public class Player { private int playerID, health, level, rank, rings, clanID, configNum, targetID, selectedAmmo; private String userName; private short shipID, factionID, mapID; private Vector position; private boolean moving, isPremiu...
private LaserSystem laserSystem;
0
Kaysoro/KaellyBot
src/main/java/data/Monster.java
[ "public enum Language {\n\n FR(\"Français\", \"FR\"), EN(\"English\", \"EN\"), ES(\"Español\", \"ES\");\n\n private String name;\n private String abrev;\n\n Language(String name, String abrev){\n this.name = name;\n this.abrev = abrev;\n }\n\n public String getName() {\n retur...
import discord4j.core.object.Embed; import discord4j.core.spec.EmbedCreateSpec; import enums.Language; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import util.EmojiManager; import util.JSoupManager; import util.Translator; import util.URLManager; import java.awt.*;...
package data; /** * Created by steve on 14/07/2016. */ public class Monster implements Embedded { private String name; private String family; private String level; private String skinURL; private String url; private String caracteristics; private String resistances; private String z...
Document doc = JSoupManager.getDocument(url);
2
portablejim/VeinMiner
src/main/java/portablejim/veinminer/core/CoreEvents.java
[ "@Mod(modid = ModInfo.MODID, acceptedMinecraftVersions = \"[1.9,1.11)\",\n canBeDeactivated = true, guiFactory = \"portablejim.veinminer.configuration.client.ConfigGuiFactory\")\npublic class VeinMiner {\n\n @Mod.Instance(ModInfo.MODID)\n public static VeinMiner instance;\n\n @SidedProxy(clientSide ...
import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.fml.common.eventhandler.EventPriority; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; impor...
package portablejim.veinminer.core; /** * Created by james on 27/05/16. */ public class CoreEvents { @SubscribeEvent(priority = EventPriority.LOWEST) public void blockBreakEvent(BlockEvent.BreakEvent event) { if(event.getWorld().isRemote) { // I am officially lost. // I am a ...
MinerServer server = VeinMiner.instance.minerServer;
0
sylvainhalle/Bullwinkle
Source/Parsing/src/ca/uqac/lif/bullwinkle/BullwinkleCli.java
[ "public static class InvalidGrammarException extends EmptyException\n{\n\t/**\n\t * Dummy UID\n\t */\n\tprivate static final transient long serialVersionUID = 1L;\n\n\tpublic InvalidGrammarException(final String message)\n\t{\n\t\tsuper(message);\n\t}\n\t\t\n\tpublic InvalidGrammarException(Throwable t)\n\t{\n\t\ts...
import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; import java.util.List; import java.util.Scanner; import ca.uqac.lif.bullwinkle.BnfParser.InvalidGrammarException; import ca.uqac.lif.bullwinkle.P...
ArgumentMap c_line = setupCommandLine(cli_parser, args); if (c_line == null) { // oops, something went wrong stderr.println("Error parsing command-line arguments"); return ERR_ARGUMENTS; } assert c_line != null; if (c_line.hasOption(P_VERBOSITY)) { verbosity = Integer.parseInt(c_line.getOption...
out_vis = new XmlVisitor();
5
kermitt2/grobid-ner
src/main/java/org/grobid/trainer/NEREvaluation.java
[ "public class NEREnParser extends AbstractParser implements NERParser {\n\n private static Logger LOGGER = LoggerFactory.getLogger(NEREnParser.class);\n private final NERParserCommon nerParserCommon;\n\n protected Lexicon lexicon = Lexicon.getInstance();\n //protected SenseTagger senseTagger = null;\n\n...
import org.apache.commons.io.IOUtils; import org.grobid.core.GrobidModels; import org.grobid.core.engines.NEREnParser; import org.grobid.core.engines.NERParsers; import org.grobid.core.exceptions.GrobidException; import org.grobid.core.exceptions.GrobidResourceException; import org.grobid.core.utilities.GrobidNerConfig...
package org.grobid.trainer; /** * Additional NER specific evaluation. * * @author Patrice Lopez */ public class NEREvaluation { private static Logger LOGGER = LoggerFactory.getLogger(NEREvaluation.class); private Lexicon lexicon = Lexicon.getInstance(); private NERLexicon nerLexicon = NERLexicon.g...
NERParsers parsers = new NERParsers();
1
googlearchive/abelana
Android/app/src/main/java/com/examples/abelanav2/ui/PicturesFragment.java
[ "public class AbelanaClient {\n /**\n * The actual OkHttp channel implementation.\n */\n private ChannelImpl mChannelImpl;\n /**\n * The gRPC stub used to make calls to the server.\n */\n private AbelanaGrpc.AbelanaBlockingStub mBlockingStub;\n /**\n * The header client intercepto...
import android.app.AlertDialog; import android.app.WallpaperManager; import android.content.DialogInterface; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.support.v7.widget.CardView; import android.support...
/* * Copyright 2015 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applica...
mPhotoAdapter = new PhotoAdapter(new ArrayList<PhotoInfo>(),
2
lcxl/lcxl-net-loader
loader/web/netloader-web/src/main/java/com/lcxbox/netloader/host/controller/HostController.java
[ "public class CookieHelper {\n\tpublic static HostInfo getHostInfo(Cookie[] cookies) {\n\t\tHostInfo info = new HostInfo();\n\t\tfor (Cookie cookie: cookies) {\n\t\t\tif (cookie.getName().equals(\"host\")) {\n\t\t\t\tinfo.setHost(cookie.getValue());\n\t\t\t} else if (cookie.getName().equals(\"port\")) {\n\t\t\t\ti...
import java.io.IOException; import java.net.UnknownHostException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.R...
package com.lcxbox.netloader.host.controller; /** * 主机控制类 * @author lcxl * */ @Controller @RequestMapping(value = "/netloader") public class HostController { /** * 主机服务接口 */ @Autowired private IHostService hostService; /** * 获取模块列表 * @return * @throws IOException * @throws UnknownHostExce...
Server server = new Server();
4
liuyes/ssopay-qywx
ssopay-qywx-admin/src/main/java/com/ssopay/qywx/user/web/UserController.java
[ "public class Constants {\r\n\tpublic static final ResourceBundle bundle = ResourceBundle.getBundle(\"application\");\r\n\tpublic static final String HASH_ALGORITHM = \"SHA-1\";\r\n\tpublic static final int HASH_INTERATIONS = 1024;\r\n\tpublic static final int SALT_SIZE = 8;\r\n\t/**\r\n\t * 是否需要发送email\r\n\t */\r\...
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.anno...
package com.ssopay.qywx.user.web; /** * <p> * 用户表 前端控制器 * </p> * * @author ssopay * @since 2017-07-20 */ @Controller @RequestMapping("/user") public class UserController { private Result result = new Result(); @Autowired private UserService userService; @Autowired private GroupSer...
public PageModel json(UserDto dto) {
6
danielflower/app-runner
src/test/java/e2e/Python2Test.java
[ "public class App {\n public static final Logger log = LoggerFactory.getLogger(App.class);\n\n private final Config config;\n private WebServer webServer;\n private AppEstate estate;\n private final AtomicBoolean startupComplete = new AtomicBoolean(false);\n private BackupService backupService;\n\...
import com.danielflower.apprunner.App; import com.danielflower.apprunner.Config; import com.danielflower.apprunner.mgmt.AppManager; import com.danielflower.apprunner.runners.PythonRunnerTest; import org.junit.After; import org.junit.Before; import org.junit.Test; import scaffolding.AppRepo; import scaffolding.RestClien...
package e2e; public class Python2Test { private final String port = String.valueOf(AppManager.getAFreePort()); private final String appRunnerUrl = "http://localhost:" + port; private final RestClient restClient = RestClient.create(appRunnerUrl); private final String appId = "python2"; private fi...
assertThat(restClient.homepage(appId), is(equalTo(200, containsString("Python 2 in AppRunner"))));
7
CPPAlien/DaVinci
davinci/src/main/java/cn/hadcn/davinci/http/base/StringRequest.java
[ "@SuppressWarnings(\"serial\")\npublic class AuthFailureError extends VolleyError {\n /** An intent that can be used to resolve this exception. (Brings up the password dialog.) */\n private Intent mResolutionIntent;\n\n public AuthFailureError() { }\n\n public AuthFailureError(Intent intent) {\n ...
import java.io.UnsupportedEncodingException; import java.util.Map; import cn.hadcn.davinci.log.VinciLog; import cn.hadcn.davinci.volley.AuthFailureError; import cn.hadcn.davinci.volley.NetworkResponse; import cn.hadcn.davinci.volley.ParseError; import cn.hadcn.davinci.volley.Request; import cn.hadcn.davinci.volley.Resp...
package cn.hadcn.davinci.http.base; /** * A request for retrieving a T type response body at a given URL that also * optionally sends along a JSON body in the request specified. */ public abstract class StringRequest extends Request<String> { protected static final String PROTOCOL_CHARSET = "utf-8"; pri...
protected Response<String> parseNetworkResponse(NetworkResponse response) {
1
rainu/alexa-skill
cloud/src/test/java/de/rainu/alexa/cloud/calendar/service/CalendarServiceTest.java
[ "public class CalendarCLIAdapter {\n private static final Logger log = LoggerFactory.getLogger(CalendarCLIAdapter.class);\n\n private final String caldavURL;\n private final String caldavUser;\n private final String caldavPassword;\n private final String calendarURL;\n private final TimeZone calendarTimeZone;...
import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.mockito.Matchers.any; import static org.mockito.Matchers.eq; import static org.mockito.Matchers.same; import static org.mockito.Mockito.doReturn; import static org...
package de.rainu.alexa.cloud.calendar.service; @RunWith(MockitoJUnitRunner.class) public class CalendarServiceTest { @Mock ICalendarParser parser; @Spy EventMapper mapper; CalendarService toTest; @Before public void setup(){ toTest = new CalendarService(); ReflectionTestUtils.setField(toTes...
public void createEvent_defaultCalendar() throws CalendarWriteException, IOException {
4
goerlitz/rdffederator
src/de/uni_koblenz/west/evaluation/SourceSelectionEval.java
[ "public class FederationSail extends SailBase {\n\t\n\tprivate static final Logger LOGGER = LoggerFactory.getLogger(FederationSail.class);\n\t\n\tprivate List<Repository> members;\n\tprivate SourceSelector selector;\n\tprivate QueryOptimizer optimizer;\n\tprivate EvaluationStrategy evalStrategy;\n\n\tprivate boolea...
import java.io.IOException; import java.io.PrintStream; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.openrdf.query.MalformedQueryException; import org.openrdf.query.algebra.TupleExpr; import org.openrdf.query.algebra.helpers.StatementPatternCollector; impo...
package de.uni_koblenz.west.evaluation; /** * Evaluation of the source selection. * * @author goerlitz@uni-koblenz.de */ public class SourceSelectionEval { private static final Logger LOGGER = LoggerFactory.getLogger(SourceSelectionEval.class); private static final String CONFIG_FILE = "setup/fed-test.pr...
public SourceSelectionEval(Configuration config) throws ConfigurationException {
7
cattaka/AdapterToolbox
example/src/androidTest/java/net/cattaka/android/adaptertoolbox/example/NestedScrambleAdapterExampleActivityTest.java
[ "public class ScrambleAdapter<T> extends AbsScrambleAdapter<\n ScrambleAdapter<T>,\n ScrambleAdapter<?>,\n RecyclerView.ViewHolder,\n ForwardingListener<ScrambleAdapter<?>, RecyclerView.ViewHolder>,\n T\n > {\n private Context mContext;\n private List<T> mItems;\n\n ...
import android.content.res.Resources; import android.support.test.espresso.action.ViewActions; import android.support.test.rule.ActivityTestRule; import android.view.View; import net.cattaka.android.adaptertoolbox.adapter.ScrambleAdapter; import net.cattaka.android.adaptertoolbox.example.data.NestedScrambleInfo; import...
package net.cattaka.android.adaptertoolbox.example; /** * Created by cattaka on 16/06/05. */ public class NestedScrambleAdapterExampleActivityTest { @Rule public ActivityTestRule<NestedScrambleAdapterExampleActivity> mActivityTestRule = new ActivityTestRule<>(NestedScrambleAdapterExampleActivity.class, f...
NestedScrambleInfo parentItem = (NestedScrambleInfo) mAdapter.getItemAt(parentPosition);
1
AChep/HeadsUp
project/app/src/main/java/com/achep/base/ui/fragments/PreferenceFragment.java
[ "@SuppressWarnings(\"ConstantConditions\")\npublic abstract class ConfigBase implements\n ISubscriptable<ConfigBase.OnConfigChangedListener>,\n IOnLowMemory {\n\n private static final String TAG = \"Config\";\n\n protected static final String PREFERENCES_FILE_NAME = \"config\";\n\n private So...
import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.MultiSelectListPreference; import android.preference.Preference; import android.preference.PreferenceScreen; import and...
/* * Copyright (C) 2015 AChep@xda <artemchep@gmail.com> * * 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 2 * of the License, or (at your option) any later version. * * Th...
ActivityBase activity = (ActivityBase) getActivity();
2
hypfvieh/bluez-dbus
bluez-dbus/src/main/java/com/github/hypfvieh/bluetooth/wrapper/ProfileManager.java
[ "public final class DbusHelper {\n\n private static final Logger LOGGER = LoggerFactory.getLogger(DbusHelper.class);\n\n private DbusHelper() {\n\n }\n\n /**\n * Find all &lt;node&gt;-Elements in DBUS Introspection XML and extracts the value of the 'name' attribute.\n * @param _connection the db...
import com.github.hypfvieh.DbusHelper; import org.bluez.ProfileManager1; import org.bluez.exceptions.BluezAlreadyExistsException; import org.bluez.exceptions.BluezDoesNotExistException; import org.bluez.exceptions.BluezInvalidArgumentsException; import org.freedesktop.dbus.DBusPath; import org.freedesktop.dbus.connecti...
package com.github.hypfvieh.bluetooth.wrapper; public class ProfileManager extends AbstractBluetoothObject { private final Logger logger = LoggerFactory.getLogger(getClass()); private final ProfileManager1 rawProfileManager; public ProfileManager(DBusConnection _dbusConnection) { super(Bluetoot...
} catch (BluezInvalidArgumentsException e) {
4
yholkamp/jadmin
src/test/java/integrationtests/GenericSQLDAOTest.java
[ "public class ColumnDefinition {\n\n /**\n * Column name, case sensitive\n */\n private String name;\n /**\n * JAdmin-type of this column.\n */\n private ColumnType type;\n\n /**\n * True if this column is part of the key identifying a row of the datasource containing this column.\n */\n private b...
import com.ninja_squad.dbsetup.DbSetup; import com.ninja_squad.dbsetup.destination.DataSourceDestination; import com.ninja_squad.dbsetup.operation.Operation; import net.nextpulse.jadmin.ColumnDefinition; import net.nextpulse.jadmin.ColumnType; import net.nextpulse.jadmin.FormPostEntry; import net.nextpulse.jadmin.dao.D...
package integrationtests; /** * @author yholkamp */ public class GenericSQLDAOTest extends DatabaseTest { private GenericSQLDAO dao; private ColumnDefinition idColumn = new ColumnDefinition("id", ColumnType.integer); private ColumnDefinition nameColumn = new ColumnDefinition("name", ColumnType.string); p...
Optional<DatabaseEntry> newEntry = dao.selectOne(new Object[]{"3"});
3
shillner/unleash-maven-plugin
plugin/src/main/java/com/itemis/maven/plugins/unleash/util/DevVersionUtil.java
[ "@Singleton\npublic class ReleaseMetadata {\n private static final String PROPERTIES_KEY_REL_ARTIFACT = \"release.artifact.\";\n private static final String PROPERTIES_KEY_REL_REPO_URL = \"release.deploymentRepository.url\";\n private static final String PROPERTIES_KEY_REL_REPO_ID = \"release.deploymentRepositor...
import java.util.List; import javax.annotation.PostConstruct; import javax.inject.Inject; import javax.inject.Named; import org.apache.commons.lang3.StringUtils; import org.apache.maven.model.Scm; import org.apache.maven.project.MavenProject; import org.w3c.dom.Document; import org.w3c.dom.Node; import com.google.commo...
package com.itemis.maven.plugins.unleash.util; /** * Provides some utility methods for the processing steps that update the projects with the new development versions. * * @author <a href="mailto:stanley.hillner@itemis.de">Stanley Hillner</a> * @since 1.1.0 */ public class DevVersionUtil { @Inject private...
private ScmProvider scmProvider;
1
bonigarcia/dualsub
src/test/java/io/github/bonigarcia/dualsub/test/TestTranslation.java
[ "public class DualSub {\n\n\tprivate static final Logger log = LoggerFactory.getLogger(DualSub.class);\n\n\t// Preferences and Properties\n\tprivate Preferences preferences;\n\tprivate Properties properties;\n\n\t// UI Elements\n\tprivate JFrame frame;\n\tprivate JList<File> leftSubtitles;\n\tprivate JList<File> ri...
import io.github.bonigarcia.dualsub.srt.Srt; import io.github.bonigarcia.dualsub.srt.SrtUtils; import io.github.bonigarcia.dualsub.translate.Language; import io.github.bonigarcia.dualsub.translate.Translator; import io.github.bonigarcia.dualsub.util.Charset; import java.io.File; import java.io.IOException; import java....
/* * (C) Copyright 2014 Boni Garcia (http://bonigarcia.github.io/) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later versi...
Merger merger = new Merger(".", true, 1000, true, properties,
2
kstateome/lti-attendance
src/main/java/edu/ksu/canvas/attendance/controller/RosterController.java
[ "@Entity\n@Table(name = \"attendance_section\")\npublic class AttendanceSection implements Serializable {\n\n private static final long serialVersionUID = 1L;\n\n @Id\n @GeneratedValue(strategy = GenerationType.AUTO)\n @Column(name = \"section_id\")\n private Long sectionId; //attendance project's lo...
import edu.ksu.canvas.attendance.entity.AttendanceSection; import edu.ksu.canvas.attendance.form.RosterForm; import edu.ksu.canvas.attendance.form.RosterFormValidator; import edu.ksu.canvas.attendance.model.SectionModelFactory; import edu.ksu.canvas.attendance.services.AttendanceCourseService; import edu.ksu.canvas.att...
package edu.ksu.canvas.attendance.controller; @Controller @Scope("session") @SessionAttributes("rosterForm") @RequestMapping("/roster") public class RosterController extends AttendanceBaseController { private static final Logger LOG = LogManager.getLogger(RosterController.class); @Autowired private Se...
private AttendanceCourseService courseService;
4
ThreeTen/threetenbp
src/main/java/org/threeten/bp/Instant.java
[ "public final class DateTimeFormatter {\n\n //-----------------------------------------------------------------------\n /**\n * Returns the ISO date formatter that prints/parses a date without an offset,\n * such as '2011-12-03'.\n * <p>\n * This returns an immutable formatter capable of print...
import static org.threeten.bp.LocalTime.SECONDS_PER_DAY; import static org.threeten.bp.LocalTime.SECONDS_PER_HOUR; import static org.threeten.bp.LocalTime.SECONDS_PER_MINUTE; import static org.threeten.bp.temporal.ChronoField.INSTANT_SECONDS; import static org.threeten.bp.temporal.ChronoField.MICRO_OF_SECOND; import st...
/* * Copyright (c) 2007-present, Stephen Colebourne & Michael Nascimento Santos * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the abov...
if (unit instanceof ChronoUnit) {
3
einsteinsci/betterbeginnings
src/main/java/net/einsteinsci/betterbeginnings/config/json/BrickOvenConfig.java
[ "public class JsonBrickOvenRecipeHandler\n{\n\tprivate List<JsonBrickOvenShapedRecipe> shaped = new ArrayList<>();\n\tprivate List<JsonBrickOvenShapelessRecipe> shapeless = new ArrayList<>();\n\n\tprivate List<String> includes = new ArrayList<>();\n\tprivate List<String> modDependencies = new ArrayList<>();\n\n\t//...
import net.einsteinsci.betterbeginnings.config.json.recipe.JsonBrickOvenRecipeHandler; import net.einsteinsci.betterbeginnings.config.json.recipe.JsonBrickOvenShapedRecipe; import net.einsteinsci.betterbeginnings.config.json.recipe.JsonBrickOvenShapelessRecipe; import net.einsteinsci.betterbeginnings.register.recipe.Br...
package net.einsteinsci.betterbeginnings.config.json; public class BrickOvenConfig implements IJsonConfig { public static final BrickOvenConfig INSTANCE = new BrickOvenConfig(); public static final List<ItemStack> AFFECTED_OUTPUTS = new ArrayList<>(); private static JsonBrickOvenRecipeHandler initialRecipes = n...
initialRecipes.getShaped().add(new JsonBrickOvenShapedRecipe(output, args));
1
AwaisKing/Linked-Words
app/src/main/java/awais/backworddictionary/adapters/DictionaryWordsAdapter.java
[ "public final class WordItem {\n private int position = RecyclerView.NO_POSITION;\n private final String word;\n private final String[][] defs;\n private final String parsedTags;\n private boolean expanded;\n\n public WordItem(final String word, final int numSyllables, final String[] tags, final S...
import android.content.Context; import android.content.res.Resources; import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.Filter; import android.widget.Filterable; import android.widget.ImageView; import android.widget.Toast; i...
package awais.backworddictionary.adapters; public final class DictionaryWordsAdapter extends RecyclerView.Adapter<WordItemViewHolder> implements Filterable { private final LayoutInflater layoutInflater;
private final AdapterClickListener wordItemClickListener;
7
Spade-Editor/Spade
src/heroesgrave/spade/image/change/edit/FillMaskChange.java
[ "public final class RawImage\n{\n\tprivate static int[] TMP;\n\t\n\tpublic static enum MaskMode\n\t{\n\t\tREP, ADD, SUB, XOR, AND;\n\t\t\n\t\tpublic boolean transform(boolean bool)\n\t\t{\n\t\t\tswitch(this)\n\t\t\t{\n\t\t\t\tcase REP:\n\t\t\t\tcase ADD:\n\t\t\t\t\treturn true;\n\t\t\t\tcase SUB:\n\t\t\t\t\treturn ...
import heroesgrave.spade.image.RawImage; import heroesgrave.spade.image.RawImage.MaskMode; import heroesgrave.spade.image.change.IEditChange; import heroesgrave.spade.image.change.IMaskChange; import heroesgrave.spade.io.Serialised; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOExcep...
// {LICENSE} /* * Copyright 2013-2015 HeroesGrave and other Spade developers. * * This file is part of Spade * * Spade 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, ...
private MaskMode mode;
1
TreeCmp/TreeCmp
src/treecmp/command/RunSCommand.java
[ "public class AlignWriter {\n\n public final static String TREE = \"Tree: \";\n public final static String TREE1 = \"Tree1: \";\n public final static String TREE2 = \"Tree2: \";\n public final static String REF_TREE = \"Referenced tree\";\n public final static String S_SPACE = \" \";\n public fina...
import pal.tree.TreeParseException; import treecmp.common.AlignWriter; import treecmp.common.ProgressIndicator; import treecmp.common.ReportUtils; import treecmp.common.StatCalculator; import treecmp.common.SummaryStatCalculator; import treecmp.common.TreeCmpException; import treecmp.io.ResultWriter; import treecmp.io....
/** This file is part of TreeCmp, a tool for comparing phylogenetic trees using the Matching Split distance and other metrics. Copyright (C) 2011, Damian Bogdanowicz This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published b...
ProgressIndicator progress=new ProgressIndicator();
1
Azure/azure-storage-android
microsoft-azure-storage-test/src/com/microsoft/azure/storage/StorageAccountTests.java
[ "public interface CloudTests {\n}", "public interface DevFabricTests {\n}", "public interface DevStoreTests {\n}", "public final class CloudBlobContainer {\n\n /**\n * Converts the ACL string to a BlobContainerPermissions object.\n * \n * @param aclString\n * A <code>String</code...
import com.microsoft.azure.storage.TestRunners.CloudTests; import com.microsoft.azure.storage.TestRunners.DevFabricTests; import com.microsoft.azure.storage.TestRunners.DevStoreTests; import com.microsoft.azure.storage.blob.CloudBlobClient; import com.microsoft.azure.storage.blob.CloudBlobContainer; import com.microsof...
try { CloudStorageAccount.parse(accountStringSasNoDefaultProtocolPrimarySecondary); // no exception expected } catch (Exception e) { fail("Unexpected exception"); } // SAS without AccountName String accountStringSasNoNameNoEnd...
CloudTable table = tableClient.getTableReference("table1");
7
mucaho/jnetrobust
jnetrobust-core/src/main/java/com/github/mucaho/jnetrobust/controller/ProcessingController.java
[ "public final class ProtocolConfig {\n public enum AutoRetransmitMode {\n ALWAYS,\n NEVER,\n NEWEST\n }\n\n /**\n * The constant MAX_PACKET_QUEUE_LIMIT.\n */\n public static final int MAX_PACKET_QUEUE_LIMIT = Packet.MAX_DATAS_PER_PACKET;\n /**\n * The constant MAX_PAC...
import com.github.mucaho.jnetrobust.ProtocolConfig; import com.github.mucaho.jnetrobust.ProtocolListener; import com.github.mucaho.jnetrobust.control.*; import com.github.mucaho.jnetrobust.util.IdComparator; import com.github.mucaho.jnetrobust.util.RTTHandler; import com.github.mucaho.jnetrobust.util.SystemClock; impor...
/* * Copyright (c) 2014 mucaho (https://github.com/mucaho). * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package com.github.mucaho.jnetrobust.controller; ...
public ProcessingController(ProtocolListener listener, ProtocolConfig config) {
1
idega/com.idega.documentmanager
src/java/com/idega/documentmanager/component/impl/FormComponentButtonAreaImpl.java
[ "public interface Button extends Component {\n\n\tpublic abstract PropertiesButton getProperties();\n}", "public interface ButtonArea extends Container {\n\n\tpublic abstract Button getButton(ConstButtonType button_type);\n\t\n\tpublic abstract Button addButton(ConstButtonType button_type, String component_after_...
import java.util.HashMap; import java.util.Map; import com.idega.documentmanager.business.component.Button; import com.idega.documentmanager.business.component.ButtonArea; import com.idega.documentmanager.business.component.ConstButtonType; import com.idega.documentmanager.component.FormComponentButton; import com.ideg...
package com.idega.documentmanager.component.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2008/10/26 16:47:10 $ by $Author: anton $ */ public class FormComponentButtonAreaImpl extends FormComponentContainerImpl implements Butto...
((FormComponentPage)parent).setButtonAreaComponentId(getId());
5
Avarel/Kaiper
Kaiper-Runtime-Lib/src/main/java/xyz/avarel/kaiper/runtime/collections/Dictionary.java
[ "public enum Null implements Obj {\n VALUE;\n\n public static final Type<Null> TYPE = new Type<>(\"Null\");\n public static final Module MODULE = new NativeModule() {{\n declare(\"TYPE\", Null.TYPE);\n }};\n\n @Override\n public String toString() {\n return \"null\";\n }\n\n @O...
import xyz.avarel.kaiper.runtime.Null; import xyz.avarel.kaiper.runtime.Obj; import xyz.avarel.kaiper.runtime.functions.NativeFunc; import xyz.avarel.kaiper.runtime.modules.Module; import xyz.avarel.kaiper.runtime.modules.NativeModule; import xyz.avarel.kaiper.runtime.numbers.Int; import xyz.avarel.kaiper.runtime.types...
/* * Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distribu...
public static final Module MODULE = new NativeModule() {{
3
bekce/oauthly
app/controllers/MeController.java
[ "@JsonInclude(JsonInclude.Include.NON_NULL)\npublic class MeDto {\n private String id;\n private String name;\n private String email;\n private Map<String, Tuple2<String, Token>> socialLinks;\n\n public MeDto() {\n }\n\n public MeDto(String id, String name, String email) {\n this.id = id...
import config.ResourceServerSecure; import dtos.MeDto; import models.Grant; import models.ProviderLink; import models.User; import play.libs.Json; import play.mvc.Controller; import play.mvc.Result; import repositories.ProviderLinkRepository; import repositories.UserRepository; import scala.Tuple2; import javax.inject....
package controllers; public class MeController extends Controller { @Inject private UserRepository userRepository; @Inject
private ProviderLinkRepository providerLinkRepository;
4
bingyulei007/bingexcel
excel/src/main/java/com/bing/excel/reader/sax/DefaultXSSFSaxHandler.java
[ "public class BingSaxReadStopException extends SAXException {\n\n\t/**\n\t * \n\t */\n\tprivate static final long serialVersionUID = 1L;\n\n\t@Override\n\tpublic String getMessage() {\n\t\treturn super.getMessage();\n\t}\n\n\t@Override\n\tpublic String toString() {\n\t\treturn super.toString();\n\t}\n\n\tpublic Bi...
import java.io.File; import java.io.IOException; import java.io.InputStream; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.OpenXML4JException; import org.apache.poi.openxml4j.opc.OPCPackage; import org.apache.poi.openxml4j.opc.PackageAccess; import org.apa...
package com.bing.excel.reader.sax; /** * @author shizhongtao * * date 2016-2-2 Description: * 读取07excel的sax方法,解析器默认使用org.apache.xerces.parsers.SAXParser * 。可以痛痛set方法手动设置 */ public class DefaultXSSFSaxHandler implements ReadHandler { private OPCPackage pkg; private XMLReader parser;
private ExcelReadListener excelReadListener;
1
richardtynan/thornsec
src/core/Main.java
[ "public class OrgsecData extends AData {\n\n\tprivate HashMap<String, NetworkData> networks;\n\n\tpublic OrgsecData() {\n\t\tsuper(\"orgsec\");\n\t}\n\t\n\tpublic void read(JSONObject nets) {\n\t\tnetworks = new HashMap<String, NetworkData>();\n\t\tIterator<?> iter = nets.keySet().iterator();\n\t\twhile (iter.hasNe...
import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import core.data.OrgsecData; import core.model.OrgsecModel; import core.view.BlockingFrame; import core.view.FullFrame; import core.view.SimpleFrame;
package core; public class Main { public static void main(String[] args) throws Exception { String text = new String(Files.readAllBytes(Paths.get(args[0])), StandardCharsets.UTF_8);
OrgsecData data = new OrgsecData();
0
socrata/datasync
src/main/java/com/socrata/datasync/publishers/FTPDropbox2Publisher.java
[ "public class HttpUtility {\n\n private CloseableHttpClient httpClient = null;\n private RequestConfig proxyConfig = null;\n private String authHeader;\n private String appToken;\n private boolean authRequired = false;\n private final int maxRetries;\n private final double retryDelayFactor;\n\n...
import com.socrata.datasync.HttpUtility; import com.socrata.datasync.VersionProvider; import com.socrata.datasync.job.JobStatus; import com.socrata.datasync.SocrataConnectionInfo; import com.socrata.datasync.Utils; import com.socrata.datasync.config.userpreferences.UserPreferences; import org.apache.commons.io.IOUtils;...
package com.socrata.datasync.publishers; /** * @author Adrian Laurenzi * * A utility class for operations that make use of FTP */ public class FTPDropbox2Publisher { private static final String FTP_HOST_SUFFIX = ".ftp.socrata.net"; private static final int FTP_HOST_PORT = 22222; private static final ...
SocrataConnectionInfo connectionInfo = userPrefs.getConnectionInfo();
3
quaap/LaunchTime
app/src/main/java/com/quaap/launchtime/db/DB.java
[ "public class AppLauncher implements Comparable<AppLauncher> {\n\n\n private static final Map<ComponentName,AppLauncher> mAppLaunchers = Collections.synchronizedMap(new HashMap<ComponentName,AppLauncher>());\n private static final String LINK_SEP = \":IS_APP_LINK:\";\n public static final String ACTION_PAC...
import android.annotation.SuppressLint; import android.content.ComponentName; import android.content.ContentValues; import android.content.Context; import android.content.SharedPreferences; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteException; imp...
} } finally { cursor.close(); } return catid; } private void loadCategories(SQLiteDatabase db, boolean isactivity, int set, int level) { Log.d("LaunchDB", "loadCategories " + level + " " + set); InputStream inputStream = mContext.getResources()....
List<File> files = SpecialIconStore.getAllIcons(mContext);
3
isel-leic-mpd/mpd-2017-i41d
aula33-weather-async/src/main/java/weather/WeatherService.java
[ "public class HttpRequest implements IRequest {\n @Override\n public Iterable<String> getContent(String path) {\n List<String> res = new ArrayList<>();\n try (InputStream in = new URL(path).openStream()) {\n /*\n * Consumir o Inputstream e adicionar dados ao res\n ...
import util.HttpRequest; import weather.data.WeatherWebApi; import weather.data.dto.LocationDto; import weather.data.dto.WeatherInfoDto; import weather.model.Location; import weather.model.WeatherInfo; import java.time.LocalDate; import java.util.concurrent.CompletableFuture; import java.util.stream.Stream; import stat...
/* * Copyright (c) 2017, Miguel Gamboa * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is dis...
public CompletableFuture<Stream<Location>> search(String query) {
4
YiuChoi/MicroReader
app/src/main/java/name/caiyao/microreader/presenter/impl/ItHomePresenterImpl.java
[ "public class ItHomeRequest {\n\n private ItHomeRequest() {}\n\n private static final Interceptor REWRITE_CACHE_CONTROL_INTERCEPTOR = new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Response originalResponse = chain.proceed(chain.request...
import android.content.Context; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import java.util.ArrayList; import java.util.Iterator; import name.caiyao.microreader.api.itHome.ItHomeRequest; import name.caiyao.microreader.bean.itHome.ItHomeItem; import name.caiyao.microreader.bean.itHome.ItHomeR...
package name.caiyao.microreader.presenter.impl; /** * Created by 蔡小木 on 2016/4/23 0023. */ public class ItHomePresenterImpl extends BasePresenterImpl implements IItHomePresenter { private Gson gson = new Gson(); private IItHomeFragment mItHomeFragment; private CacheUtil mCacheUtil; public ItH...
.map(new Func1<ItHomeResponse, ArrayList<ItHomeItem>>() {
2
kciray8/IronBrain
IBServer/src/test/java/com/springapp/mvc/AppTests.java
[ "@Component\npublic class IB {\n @Autowired\n private ServletContext context;\n\n //For testing purpose\n private static long msOffset = 0;\n\n public static Random rand() {\n return random;\n }\n\n public static void setRandom(Random random) {\n IB.random = random;\n }\n\n ...
import com.google.common.base.Joiner; import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomUtils; import org.apache.commons.lang3.tuple.Pair; import org.ironbrain.IB; import org.ironbrain.MainController; import org.ironbrain.Result; import org.ironbrain.SessionData; import org.ironbr...
package com.springapp.mvc; @RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration @ContextConfiguration("file:src/main/webapp/WEB-INF/mvc-dispatcher-servlet.xml") public class AppTests extends AllDao { private MockMvc mockMvc; @Autowired protected SessionData data; @Autowired
MainController api;
1
manuelsc/Raven-Messenger
Raven App/src/main/java/at/flack/receiver/EMailReceiver.java
[ "public class MainActivity extends AppCompatActivity {\n\tprivate DrawerLayout mDrawerLayout;\n\tprivate ListView mDrawerList;\n\tprivate ActionBarDrawerToggle mDrawerToggle;\n\n\tprivate CharSequence mTitle;\n\tprivate final String VERSION = \"16.01.30.1\";\n\n\tprivate static int current_fragment = -1;\n\tprivate...
import android.app.Activity; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Resources;...
led_color = sharedPrefs.getInt("notification_light", -16776961); boolean all = sharedPrefs.getBoolean("all_mail", true); if (notify == false) return; NotificationCompat.Builder mBuilder = null; boolean use_profile_picture = false; Bitmap profile_picture = null; String origin_name = b...
canvas.drawColor(ContactAdapter.colors[Math.abs(ContactAdapter.betterHashCode(name))
1
nextgis/nextgislogger
app/src/main/java/com/nextgis/logger/UI/activity/ProgressBarActivity.java
[ "public class LoggerService extends Service implements ArduinoEngine.ConnectionListener {\n private static final int ID_MEASURING = 1;\n\n private ArduinoEngine mArduinoEngine;\n private SensorEngine mSensorEngine;\n private CellEngine mGsmEngine;\n private Thread mThread = null;\n private Notific...
import android.Manifest; import android.accounts.Account; import android.app.ActionBar; import android.app.Activity; import android.app.ActivityManager; import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Dia...
/* * ***************************************************************************** * Project: NextGIS Logger * Purpose: Productive data logger for Android * Authors: Stanislav Petriakov, becomeglory@gmail.com * ***************************************************************************** * Copyright © 2015-2017 N...
Intent infoActivity = new Intent(this, InfoActivity.class);
1
Gocnak/Botnak
src/main/java/face/Icons.java
[ "public class ChatPane implements DocumentListener {\n\n private JFrame poppedOutPane = null;\n\n // The timestamp of when we decided to wait to scroll back down\n private long scrollbarTimestamp = -1;\n\n public void setPoppedOutPane(JFrame pane) {\n poppedOutPane = pane;\n }\n\n public JF...
import gui.ChatPane; import gui.forms.GUIMain; import lib.scalr.Scalr; import util.AnimatedGifEncoder; import util.GifDecoder; import util.Utils; import util.settings.Settings; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.FileOutputStream; ...
package face; /** * A class which specifies special chat icons, or 'badges'. * This allows for easier creation of custom icons, and * should be easily adaptable to create custom donation * levels. * * @author Joseph Blackman * @version 4/10/2015 */ public class Icons { /** * For a specified icon, ...
img = Scalr.resize(img, Scalr.Method.ULTRA_QUALITY, size, size);
2
davidmoten/rtree
src/test/java/com/github/davidmoten/rtree/fbs/SerializerFlatBuffersTest.java
[ "public interface Entry<T, S extends Geometry> extends HasGeometry {\n\n T value();\n\n @Override\n S geometry();\n\n}", "public class GreekEarthquakes {\n\n public static Observable<Entry<Object, Point>> entries(final Precision precision) {\n Observable<String> source = Observable.using(new Fu...
import static org.junit.Assert.assertEquals; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import org.junit.Test; import com.github.davidmoten.rtree.Entry; import com.github.davidmoten.rt...
package com.github.davidmoten.rtree.fbs; public class SerializerFlatBuffersTest { private static final byte[] EMPTY = new byte[] {}; @Test public void testSerializeRoundTripToFlatBuffersSingleArray() throws Exception { roundTrip(InternalStructure.SINGLE_ARRAY, false); } @Test pu...
RTree<Object, Point> tree = RTree.star().maxChildren(10).create();
4
teivah/TIBreview
src/test/java/com/tibco/exchange/tibreview/processor/resourcerule/CProcessorIdentifyProviderTest.java
[ "public class TIBResource {\n\tprivate String filePath;\n\tprivate String type;\n\t\n\tprivate static final String REQUEST_GET_TYPE = \"/jndi:namedResource/@type\";\n\t\n\tpublic TIBResource(String filePath) throws Exception {\n\t\tthis.filePath = filePath;\n\t\tthis.type = Util.xpathEval(filePath, Constants.RESOUR...
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import org.apache.log4j.Logger; import org.junit.Test; import com.tibco.exchange.tibreview.common.TIBResource; import com.tibco.exchange.tibreview.engine.Context; import com.tibco.exchange.tibreview.mod...
package com.tibco.exchange.tibreview.processor.resourcerule; public class CProcessorIdentifyProviderTest { private static final Logger LOGGER = Logger.getLogger(CProcessorIdentifyProviderTest.class); @Test public void testCProcessorIdentifyProviderTest() { TIBResource fileresource; try { ...
Configuration Configuracion = resource.getRule().get(0).getConfiguration();
3
WindFromFarEast/SmartButler
app/src/main/java/com/studio/smartbutler/fragment/ButlerFragment.java
[ "public class ChattingAdapter extends BaseAdapter\r\n{\r\n //数据源\r\n private List<ChattingText> mList;\r\n\r\n //适配器构造方法\r\n public ChattingAdapter(List<ChattingText> mList)\r\n {\r\n this.mList=mList;\r\n }\r\n\r\n @Override\r\n public int getCount()\r\n {\r\n return mList....
import android.os.Bundle; import android.support.v4.app.Fragment; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; import android.widget.Toast...
package com.studio.smartbutler.fragment; /** * project name: SmartButler * package name: com.studio.smartbutler.fragment * file name: ButlerFragment * creator: WindFromFarEast * created time: 2017/7/11 11:51 * description: 智能管家页面 */ public class ButlerFragment extends Fragment implements Vie...
private ChattingAdapter adapter;
0
pippokill/lesk-wsd-dsm
src/di/uniba/it/wsd/RevisedLesk.java
[ "public class ExecuteStatistics {\n\n private int noGloss = 0;\n\n private int missSV = 0;\n\n private int totalSVhit = 0;\n\n private int totalGloss = 0;\n\n /**\n *\n * @return\n */\n public int getNoGloss() {\n return noGloss;\n }\n\n /**\n *\n * @param noGloss\...
import di.uniba.it.wsd.data.ExecuteStatistics; import di.uniba.it.wsd.data.POSenum; import di.uniba.it.wsd.data.RelatedSynset; import di.uniba.it.wsd.data.SynsetOut; import di.uniba.it.wsd.data.Token; import di.uniba.it.wsd.dsm.ObjectVector; import di.uniba.it.wsd.dsm.VectorStore; import di.uniba.it.wsd.dsm.VectorUtils...
} /* if (senses == null || senses.isEmpty()) { senses = babelNet.getSenses(language, lemma); } if (senses == null || senses.isEmpty()) { senses = babelNet.getSenses(language, lemma.replace(" ", "_")); } */ if (senses == null || sense...
token.getSynsetList().add(new SynsetOut(senses.get(j).getSynset().getId(), sim));
3
thehiflyer/Fettle
src/test/java/se/fearless/fettle/builder/StateMachineBuilderTest.java
[ "public interface Action<S, E, C> {\n\t/**\n\t * Called when a transition occurs\n\t * @param from the state the machine was in before the transition\n\t * @param to the state the machine is in after the transition\n\t * @param causedBy the event that triggered the transition\n\t * @param context the context in whi...
import com.google.common.collect.Lists; import com.googlecode.gentyref.TypeToken; import org.junit.Test; import se.fearless.fettle.Action; import se.fearless.fettle.Arguments; import se.fearless.fettle.Condition; import se.fearless.fettle.StateMachine; import se.fearless.fettle.StateMachineTemplate; import se.fearless....
package se.fearless.fettle.builder; public class StateMachineBuilderTest { private static final TypeToken<Action<States, String, Void>> ACTION_TYPE_TOKEN = new TypeToken<Action<States, String, Void>>() { }; @Test @SuppressWarnings("unchecked") public void testBuilder() { StateMachineBuilder<States, String,...
StateMachine<States, String, Void> machine = stateMachineTemplate.newStateMachine(States.INITIAL);
3
occi4java/occi4java
http/src/main/java/occi/http/OcciRestStorage.java
[ "public class OcciConfig extends XMLConfiguration {\n\tprivate static final long serialVersionUID = 1L;\n\tprivate static final Logger LOGGER = LoggerFactory\n\t\t\t.getLogger(OcciConfig.class);\n\t/**\n\t * Instance of OcciConfig\n\t */\n\tprivate static OcciConfig instance = null;\n\tprivate static ConfigurationF...
import java.util.HashMap; import java.util.HashSet; import java.util.Set; import java.util.StringTokenizer; import java.util.UUID; import occi.config.OcciConfig; import occi.core.Kind; import occi.core.Mixin; import occi.http.check.OcciCheck; import occi.infrastructure.Storage; import occi.infrastructure.Storage.State;...
/** * Copyright (C) 2010-2011 Sebastian Heckmann, Sebastian Laag * * Contact Email: <sebastian.heckmann@udo.edu>, <sebastian.laag@udo.edu> * * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a c...
for (Kind kind : Kind.getKinds()) {
1
geoparser/geolocator
geo-locator/src/edu/cmu/geoparser/Disambiguation/Tweetdisamb.java
[ "public class GetReader {\n\n public static BufferedReader getUTF8FileReader(String filename) throws FileNotFoundException,\n UnsupportedEncodingException {\n File file = new File(filename);\n BufferedReader bin = new BufferedReader(new InputStreamReader(new FileInputStream(file),\n \"utf...
import edu.cmu.geoparser.io.GetReader; import edu.cmu.geoparser.model.CandidateAndFeature; import edu.cmu.geoparser.model.LocEntity; import edu.cmu.geoparser.model.Sentence; import edu.cmu.geoparser.model.Tweet; import edu.cmu.geoparser.model.TweetExample; import edu.cmu.geoparser.model.LocGroupFeatures; import edu.cmu...
String tweet = part[0]; Tweet t = new Tweet(tweet); EuroLangTwokenizer.tokenize(t.getSentence()); String locs = part[1]; String lat = part[2]; String lon = part[3]; String userLoc = part[4].trim(); String timezone = part[5].trim(); String userDsc = part[6].trim(); ...
LocGroupFeatures feature = new LocGroupFeatures(examples.get(i)).toFeatures();
6
54cgt/weixin
微信/src/net/cgt/weixin/activity/MainActivity.java
[ "public interface Constants {\r\n\r\n\t/** SharedPreferences 文件名 **/\r\n\tString SHARED_PREFERENCE_NAME = \"client_preferences\";\r\n\r\n\t/********************************** 用户登陆管理 ***************************************************************************************************/\r\n\r\n\t/** 用户最后登陆时间 **/\r\n\tSt...
import java.lang.reflect.Field; import java.lang.reflect.Method; import net.cgt.weixin.Constants; import net.cgt.weixin.GlobalParams; import net.cgt.weixin.R; import net.cgt.weixin.factory.FragmentFactory; import net.cgt.weixin.utils.AppToast; import net.cgt.weixin.utils.L; import net.cgt.weixin.utils.LogUtil; ...
package net.cgt.weixin.activity; /** * 主控制界面 * * @author lijian * */ @SuppressLint("NewApi") public class MainActivity extends Activity implements OnCheckedChangeListener { private static final String LOGTAG = LogUtil.makeLogTag(MainActivity.class); private FragmentManager mFragmentManager;...
private SpUtil sp;
6
jbarr21/gopro-remote
wear/src/main/java/com/github/jbarr21/goproremote/data/WearMessageListenerService.java
[ "public class Constants {\n\n public static final String SCHEME_WEAR = \"wear\";\n\n // Message and Data paths\n public static final String COMMAND_REQUEST_PATH = \"/command/request\";\n public static final String COMMAND_RESPONSE_PATH = \"/command/response\";\n public static final String CONFIG_PATH...
import com.github.jbarr21.goproremote.common.data.Constants; import com.github.jbarr21.goproremote.common.data.GoProCommandResponse; import com.github.jbarr21.goproremote.common.utils.Parser; import com.github.jbarr21.goproremote.common.utils.RxEventBus; import com.github.jbarr21.goproremote.common.utils.RxEventBus.Bus...
package com.github.jbarr21.goproremote.data; public class WearMessageListenerService extends WearableListenerService { private Moshi moshi; private Bus bus; @Override public void onCreate() { super.onCreate(); moshi = Parser.getMoshi(); bus = RxEventBus.get(); } @O...
bus.post(new GoProCommandResponseEvent(commandResponse));
5
RestComm/sctp
sctp-impl/src/test/java/org/mobicents/protocols/sctp/AnonymousConnectionTest.java
[ "public interface Association {\n\n\t/**\n\t * Return the Association channel type TCP or SCTP\n\t * \n\t * @return\n\t */\n\tpublic IpChannelType getIpChannelType();\n\n\t/**\n\t * Return the type of Association CLIENT or SERVER\n\t * \n\t * @return\n\t */\n\tpublic AssociationType getAssociationType();\n\n\t/**\n...
import org.mobicents.protocols.api.Association; import org.mobicents.protocols.api.AssociationListener; import org.mobicents.protocols.api.IpChannelType; import org.mobicents.protocols.api.PayloadData; import org.mobicents.protocols.api.Server; import org.mobicents.protocols.api.ServerListener; import org.testng.annota...
/* * TeleStax, Open Source Cloud Communications Copyright 2012. * and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser ...
public void setUp(IpChannelType ipChannelType) throws Exception {
2
gambitproject/gte
lib-algo/src/lse/math/games/lrs/Dictionary.java
[ "public static boolean greater(BigInteger left, BigInteger right) {\r\n\treturn left.compareTo(right) > 0;\r\n}\r", "public static boolean negative(BigInteger a) {\r\n\treturn a.compareTo(BigInteger.ZERO) < 0;\r\n}\r", "public static boolean one(BigInteger a) {\r\n\treturn a.compareTo(BigInteger.ONE) == 0;\r\n}...
import static lse.math.games.BigIntegerUtils.greater; import static lse.math.games.BigIntegerUtils.negative; import static lse.math.games.BigIntegerUtils.one; import static lse.math.games.BigIntegerUtils.positive; import static lse.math.games.BigIntegerUtils.zero; import static java.math.BigInteger.*; import lse....
} if (greater(_gcd[i], ONE) || greater(_lcm[i], ONE)) { for (int j = 0; j <= d; j++) { BigInteger tmp = A[i][j].divide(_gcd[i]); /*reduce numerators by Gcd */ tmp = tmp.multiply(_lcm[i]); /*remove denominators */ A[i][j] = tmp.divide(A[0][j]); /*reduce by...
if ((positive(Ars) && negative(_det)) || (negative(Ars) && positive(_det))) {
3
dlcs/the-mathmos-server
the-mathmos-server/src/main/java/com/digirati/themathmos/web/controller/W3CTextSearchController.java
[ "public class AnnotationSearchConstants {\n\n public static final String FIELD_MOTIVATIONS = \"motivations\";\n\n public static final String PARAM_FIELD_MOTIVATION = \"motivation\";\n\n public static final String PARAM_FIELD_DATE = \"date\";\n public static final String PARAM_FIELD_USER = \"user\";\n\n ...
import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.Cross...
package com.digirati.themathmos.web.controller; @RestController(W3CTextSearchController.CONTROLLER_NAME) public class W3CTextSearchController { public static final String CONTROLLER_NAME = "w3CTextSearchController"; private TextSearchService textSearchService; private AnnotationAutocompleteService annotationA...
Map<String, Object> emptyMap = textUtils.returnEmptyResultSet(queryString, true, new PageParameters(),
5
pakoito/SongkickInterview
app/src/main/java/com/pacoworks/dereference/screens/songkickdetails/SongkickDetailsActivity.java
[ "@Singleton\n@Component(modules = {\n ApplicationModule.class, SerializationModule.class, NetworkModule.class\n})\npublic interface ApplicationInjectionComponent extends DependencyDescription {\n final class Initializer {\n /* 10 MiB */\n private static final long CACHE_SIZE = 10 * 1024 * 10...
import java.util.List; import rx.Observable; import rx.functions.Action1; import android.app.Activity; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.To...
/* * Copyright (c) pakoito 2015 * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distribute...
artistRecyclerView.setAdapter(new RelatedArtistListAdapter());
4
tassioauad/GameCheck
app/src/androidTest/java/com/tassioauad/gamecheck/model/api/asynctask/impl/GameSearchByPlatformAsyncTaskTest.java
[ "public class PlatformBuilder {\n\n public static final Long DEFAULT_ID = 94l;\n\n public static final Long WRONG_ID = 999999999999999L;\n\n public static final String DEFAULT_NAME = \"Commodore\";\n\n public static final String WRONG_NAME = \"hooyah\";\n\n private Long id;\n\n private String name...
import android.test.AndroidTestCase; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.tassioauad.gamecheck.R; import com.tassioauad.gamecheck.entity.PlatformBuilder; import com.tassioauad.gamecheck.model.api.ItemTypeAdapterFactory; import com.tassioauad.gamecheck.model.api.asynctask.ApiResult...
package com.tassioauad.gamecheck.model.api.asynctask.impl; public class GameSearchByPlatformAsyncTaskTest extends AndroidTestCase { GameResource gameResource; @Override protected void setUp() throws Exception { super.setUp(); Gson gson = new GsonBuilder()
.registerTypeAdapterFactory(new ItemTypeAdapterFactory())
1
mindwind/craft-armor
src/main/java/io/craft/armor/DefaultArmorInvoker.java
[ "public class ArmorExecutionException extends RuntimeException {\n\n\t\n\tprivate static final long serialVersionUID = -3156599947974023180L;\n\n\tpublic ArmorExecutionException() {}\n\n\tpublic ArmorExecutionException(String message, Throwable cause) {\n\t\tsuper(message, cause);\n\t}\n\n\tpublic ArmorExecutionExc...
import io.craft.armor.api.ArmorExecutionException; import io.craft.armor.api.ArmorTimeoutException; import io.craft.armor.spi.ArmorFilterChain; import io.craft.armor.spi.ArmorInvocation; import io.craft.armor.spi.ArmorListener; import io.craft.atom.util.Assert; import java.lang.reflect.InvocationTargetException; import...
package io.craft.armor; /** * @author mindwind * @version 1.0, Dec 23, 2014 */ public class DefaultArmorInvoker implements ArmorInvoker { private ArmorContext context; public DefaultArmorInvoker(ArmorContext context) { this.context = context; } @Override public Object invoke(ArmorInvocation inv...
throw new ArmorTimeoutException(e);
1
michal-michaluk/ddd-wro-warehouse
warehouse-model/src/main/java/warehouse/picklist/Fifo.java
[ "@Value\npublic class PaletteLabel {\n private final String id;\n private final String refNo;\n\n @Override\n public String toString() {\n return id;\n }\n}", "@Value\npublic class Location {\n private final String location;\n\n public static Location production() {\n return new...
import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import warehouse.PaletteLabel; import warehouse.locations.Location; import warehouse.products.Delivered; import warehouse.products.Registered; import warehouse.quality.Destroyed; import warehouse.quality.Locked; import warehouse.qual...
package warehouse.picklist; /** * Created by michal on 15.07.2016. */ @AllArgsConstructor public class Fifo { public interface PaletteLocations { Location locationOf(PaletteLabel paletteLabel); } public interface Products { PerProduct product(String refNo); } private final Pa...
protected void apply(Registered event) {
3
wotateam/wota
src/wota/ai/pwahs05/HillAI.java
[ "public class Sugar implements Snapshot {\n\tpublic final int amount;\n\tpublic final double radius;\n\tpublic final Vector position;\n\tfinal SugarObject sugarObject;\n\tpublic final int ticksUntilNextPickUp;\n\t\n\tSugar(SugarObject sugarObject) {\n\t\tthis.sugarObject = sugarObject;\n\t\tamount = sugarObject.get...
import java.util.LinkedList; import java.util.List; import wota.gameobjects.Sugar; import wota.gamemaster.AIInformation; import wota.gameobjects.Ant; import wota.gameobjects.Caste; import wota.gameobjects.Message; import wota.gameobjects.Snapshot;
} break; case HillAI.HILL: HillAI.add_if_not_contained(hills.get(HillAI.HILL_IND),m.contentHill); break; } //System.out.printf("%d: %d\n", self.id, m.content); } public void listen(){ for(Message m: audibleAntMessages){ interpret(m); } } public void shout(){ do{ nr_hill = (nr_hill +...
public static boolean contained(Snapshot shot, List<Sugar> list){
0
edsilfer/marvel-characters
user-intf/src/main/java/br/com/hole19/marvel/ui/commons/adapter/AdapterCharacter.java
[ "public class Character implements Serializable {\n\n private long id;\n private String name;\n private String description;\n private String modified;\n private Thumbnail thumbnail;\n private String resourceURI;\n private Collection comics;\n private Collection series;\n private Collectio...
import android.os.Environment; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.widget.ImageView; impo...
package br.com.hole19.marvel.ui.commons.adapter; /** * Created by edgar on 29-Apr-16. */ public class AdapterCharacter extends RecyclerView.Adapter<RecyclerView.ViewHolder> implements Publisher { private static final String TAG = "AdapterCharacter"; private List<Character> mDataset; private List<Su...
private LayoutType mViewType;
1
rapidpro/surveyor
app/src/main/java/io/rapidpro/surveyor/activity/CaptureVideoActivity.java
[ "public class Logger {\n\n private static final String TAG = \"Surveyor\";\n\n public static void e(String message, Throwable t) {\n Log.e(TAG, message, t);\n }\n\n public static void w(String message) {\n Log.w(TAG, message);\n }\n\n public static void d(String message) {\n L...
import android.Manifest; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.hardware.Camera; import android.hardware.Camera.CameraInfo; import android.media.CamcorderProfile; import android.media.MediaRecorder; import andr...
} } @Override public void onRationaleRequested(Permiso.IOnRationaleProvided callback, String... permissions) { CaptureVideoActivity.this.showRationaleDialog(R.string.permission_camera, callback); } }, Manifest.permission.CAMERA, Ma...
mediaRecorder.setOrientationHint(CameraUtil.getRotationDegrees(this, cameraId, false));
3
millecker/senti-storm
src/at/illecker/sentistorm/commons/featurevector/CombinedFeatureVectorGenerator.java
[ "public class Configuration {\n private static final Logger LOG = LoggerFactory\n .getLogger(Configuration.class);\n\n public static final boolean RUNNING_WITHIN_JAR = Configuration.class\n .getResource(\"Configuration.class\").toString().startsWith(\"jar:\");\n\n public static final String WORKING_DIR...
import cmu.arktweetnlp.Tagger.TaggedToken; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.illecker.sentistorm.commons.Configuration; import at.illecker.sentistorm.commons.Tweet; import at.illecker.sentistorm.commons.tfidf.TfIdfNormalization; import at.ill...
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may...
Preprocessor preprocessor = Preprocessor.getInstance();
6
KeithYokoma/LGTMCamera
app/src/main/java/jp/yokomark/lgtm/app/home/ui/helper/MainActivityModule.java
[ "public class TakePicState {\n public static final String TAG = TakePicState.class.getSimpleName();\n private static final String STATE_PREPARED_URI = BundleUtils.buildKey(TakePicState.class, \"STATE_PREPARED_URI\");\n private String mPreparedUri;\n\n public void setPreparedUri(String preparedUri) {\n ...
import android.content.Context; import com.amalgam.os.HandlerUtils; import com.anprosit.android.dagger.annotation.ForActivity; import javax.inject.Singleton; import dagger.Module; import dagger.Provides; import jp.mixi.compatibility.android.provider.MediaStoreCompat; import jp.yokomark.lgtm.app.home.model.TakePicState;...
package jp.yokomark.lgtm.app.home.ui.helper; /** * @author yokomakukeishin * @version 1.0.0 * @since 1.0.0 */ @Module( injects = { MainActivity.class, TakePictureEventHandler.class, SelectPictureEventHandler.class, ShowPictureEventHandler....
TakePictureResultHandler.class,
6
WolfgangFahl/Mediawiki-Japi
src/test/java/com/bitplan/mediawiki/japi/TestAPI_Login.java
[ "class TokenResult {\n String tokenName;\n String token;\n TokenMode tokenMode;\n\n /**\n * default constructor\n */\n public TokenResult() {\n this.tokenMode = TokenMode.token1_24;\n this.tokenName = \"token\";\n }\n\n /**\n * set my token - remove trailing backslash or +\\ if necessary\n * \n...
import com.bitplan.mediawiki.japi.Mediawiki.TokenResult; import com.bitplan.mediawiki.japi.api.Api; import com.bitplan.mediawiki.japi.api.Login; import com.bitplan.mediawiki.japi.jaxb.JaxbFactory; import com.bitplan.mediawiki.japi.user.WikiUser; import static org.junit.Assert.assertEquals; import static org.junit.Asser...
/** * * This file is part of the https://github.com/WolfgangFahl/Mediawiki-Japi open source project * * Copyright 2015-2021 BITPlan GmbH https://github.com/BITPlan * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * You may...
Login login = ltWiki.login(wuser.getUsername(), wuser.getPassword());
2
RepreZen/KaiZen-OpenAPI-Editor
com.reprezen.swagedit.openapi3/src/com/reprezen/swagedit/openapi3/preferences/OpenApi3ValidationPreferences.java
[ "public static final String VALIDATION_PREFERENCE_PAGE = \"com.reprezen.swagedit.preferences.validation\";", "public enum Version {\n SWAGGER, OPENAPI;\n}", "public interface PreferenceProvider {\n\n public static final String ID = \"com.reprezen.swagedit.preferences\";\n\n /**\n * Returns a list o...
import static com.reprezen.swagedit.core.preferences.KaizenPreferencePage.VALIDATION_PREFERENCE_PAGE; import static com.reprezen.swagedit.openapi3.preferences.OpenApi3PreferenceConstants.ADVANCED_VALIDATION; import java.util.Set; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.layout.GridLayou...
/******************************************************************************* * Copyright (c) 2016 ModelSolv, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is a...
Set<PreferenceProvider> providers = ExtensionUtils.getPreferenceProviders(VALIDATION_PREFERENCE_PAGE);
0
taoneill/war
war/src/main/java/com/tommytony/war/ui/EditLoadoutUI.java
[ "public class Team {\n\tprivate final Warzone warzone;\n\tRandom teamSpawnRandomizer = new Random();\n\tprivate List<Player> players = new ArrayList<Player>();\n\tprivate List<Player> teamChatPlayers = new ArrayList<Player>();\n\tprivate List<Location> teamSpawns;\n\tprivate Location teamFlag = null;\n\tprivate Str...
import com.tommytony.war.Team; import com.tommytony.war.Warzone; import com.tommytony.war.config.TeamConfigBag; import com.tommytony.war.config.WarzoneConfigBag; import com.tommytony.war.utility.Loadout; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventor...
package com.tommytony.war.ui; /** * Created by Connor on 7/29/2017. */ class EditLoadoutUI extends ChestUI { private final Loadout loadout;
private final Warzone zone;
1
zak0/AppTycoon
app/src/main/java/jaakko/jaaska/apptycoon/engine/Company.java
[ "public interface Asset {\n\n String getName();\n String getDescription();\n\n long getCount();\n\n long getAcquisitionCost();\n double getCostPerSecond();\n}", "public class PremisesAsset extends Unlockable implements Asset {\n\n private static final String TAG = \"PremisesAsset\";\n\n publi...
import android.util.Log; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import jaakko.jaaska.apptycoon.engine.asset.Asset; import jaakko.jaaska.apptycoon.engine.asset.PremisesAsset; import jaakko.jaaska.apptycoon.engine.people.EmployeeType; import jaakko.jaaska.apptycoon.engine.product.Pr...
package jaakko.jaaska.apptycoon.engine; /** * Class representing a player company. */ public class Company { private static final String TAG = "Company"; private String mName; private int mReputation; private long mValue; private long mFunds; /** All the assets that the company has, i...
private List<Product> mProducts;
3
idega/com.idega.xformsmanager
src/java/com/idega/xformsmanager/manager/impl/HtmlManagerImpl.java
[ "public interface FormComponent {\n\t\n\t/**\n\t * loads xforms component from components template. This should be called BEFORE create().\n\t */\n\tpublic abstract void loadFromTemplate();\n\t\n\t/**\n\t * adds templated component to the xform document. This method should be called AFTER\n\t * loadFromTemplate(). ...
import java.util.Locale; import java.util.Map; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.w3c.dom.Document; import org.w3c.dom.Element; import com.idega.xformsmanager.component.FormComponent; import com.idega.xformsmanager.component.FormDocument; impor...
package com.idega.xformsmanager.manager.impl; /** * @author <a href="mailto:civilis@idega.com">Vytautas Čivilis</a> * @version $Revision: 1.4 $ * * Last modified: $Date: 2009/06/05 08:11:03 $ by $Author: valdas $ */ @Service @Scope("singleton")
public class HtmlManagerImpl implements HtmlManager {
3
tsauvine/omr
src/omr/gui/structure/StructurePanel.java
[ "public class Project implements Observer {\n /**\n * Thresholding modes.\n * PER_SHEET: thresholds are set to each sheet independently \n * GLOBAL: all sheets have same thresholds\n */\n public enum ThresholdingStrategy {PER_SHEET, GLOBAL};\n \n private SheetsContainer answerSheets;\n ...
import java.awt.BorderLayout; import java.util.AbstractList; import javax.swing.BoxLayout; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JToolBar; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import omr.Project; import omr.gui.RegistrationComponent; impo...
package omr.gui.structure; /** * A panel for editing answer sheet structure. This is one of the top level tabs. * @author Tapio Auvinen */ public class StructurePanel extends JPanel implements ChangeListener { private static final long serialVersionUID = 1L; private SheetStructureEditor sheetEditor...
public StructurePanel(Gui gui) {
2
monkeyk/oauth2-shiro
authz/src/main/java/com/monkeyk/os/oauth/authorize/CodeAuthorizeHandler.java
[ "public class ClientDetails extends BasicClientInfo {\n\n\n /**\n * 客户端所拥有的资源ID(resource-id), 至少有一个,\n * 多个ID时使用逗号(,)分隔, 如: os,mobile\n */\n private String resourceIds;\n\n private String scope;\n\n /**\n * 客户端所支持的授权模式(grant_type),\n * 至少一个, 多个值时使用逗号(,)分隔, 如: password,refresh_token\...
import com.monkeyk.os.domain.oauth.ClientDetails; import com.monkeyk.os.web.WebUtils; import com.monkeyk.os.oauth.OAuthAuthxRequest; import com.monkeyk.os.oauth.validator.AbstractClientDetailsValidator; import com.monkeyk.os.oauth.validator.CodeClientDetailsValidator; import org.apache.oltu.oauth2.as.response.OAuthASRe...
package com.monkeyk.os.oauth.authorize; /** * 2015/6/25 * <p/> * Handle response_type = 'code' * * @author Shengzhao Li */ public class CodeAuthorizeHandler extends AbstractAuthorizeHandler { private static final Logger LOG = LoggerFactory.getLogger(CodeAuthorizeHandler.class);
public CodeAuthorizeHandler(OAuthAuthxRequest oauthRequest, HttpServletResponse response) {
2
ming-soft/MCMS
src/main/java/net/mingsoft/cms/action/web/ContentAction.java
[ "public class ContentBean extends ContentEntity {\n\n// /**\n// * 静态化地址\n// */\n// private String staticUrl;\n\n /**\n * 开始时间\n */\n private String beginTime;\n\n /**\n * 结束时间\n */\n private String endTime;\n\n /**\n * 属性标记\n */\n private String flag;\n\n /...
import cn.hutool.core.util.ObjectUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import net.mingsoft.base.entity.ResultData; import net.mingsoft.basic.bean.EUListBean; import net.mingsof...
/** * The MIT License (MIT) * Copyright (c) 2012-2022 铭软科技(mingsoft.net) * 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 ...
private IHistoryLogBiz historyLogBiz;
2
be-hase/relumin
src/test/java/com/behase/relumin/controller/RedisTribApiControllerTest.java
[ "public class InvalidParameterException extends ApiException {\n private static final long serialVersionUID = -6416726302671334601L;\n\n public InvalidParameterException(String message) {\n super(Constants.ERR_CODE_INVALID_PARAMETER, String.format(\"Invalid parameter. %s\", message), HttpStatus.BAD_REQ...
import com.behase.relumin.exception.InvalidParameterException; import com.behase.relumin.model.Cluster; import com.behase.relumin.model.ClusterNode; import com.behase.relumin.model.param.CreateClusterParam; import com.behase.relumin.service.ClusterService; import com.behase.relumin.service.LoggingOperationService; impo...
package com.behase.relumin.controller; @Slf4j @RunWith(MockitoJUnitRunner.class) public class RedisTribApiControllerTest { @InjectMocks @Spy private RedisTribApiController controller = new RedisTribApiController(); @Mock private RedisTribService redisTibService; @Mock private ClusterSe...
expectedEx.expect(InvalidParameterException.class);
0
tsy12321/LeanoteAndroid
app/src/main/java/com/tsy/leanote/MyApplication.java
[ "@Entity\npublic class UserInfo {\n @Id\n private Long id;\n @Unique\n private String uid;\n private String username;\n private String email;\n private String logo;\n private String token;\n private boolean verified; //邮箱是否认证\n private int last_usn; //上次同步usn\n\n @Genera...
import android.app.Application; import android.content.Context; import android.text.TextUtils; import com.kingja.loadsir.core.LoadSir; import com.squareup.leakcanary.LeakCanary; import com.tsy.leanote.feature.user.bean.UserInfo; import com.tsy.leanote.greendao.DBHelper; import com.tsy.leanote.greendao.DaoMaster; import...
package com.tsy.leanote; /** * Created by tsy on 2016/12/13. */ public class MyApplication extends Application { private static MyApplication mMyApplication; private Context mContext; protected MyOkHttp mMyOkHttp; private DaoSession mDaoSession; private UserInfo mUserInfo; //当前用户 ...
.addCallback(new LoadingCallback())
6
habo/stickes
src/main/java/de/xonibo/stickes/examples/CreateExamples.java
[ "public class DragonCurve extends Turtle {\n\n private double step = 10;\n private int dim = 17;\n\n public DragonCurve() {\n run(dim, -1);\n }\n\n public DragonCurve(int x, int y, int dimension, double step) {\n this.dim = dimension;\n this.step = step;\n run(dim, -1);\n ...
import de.xonibo.stickes.StichData; import de.xonibo.stickes.assemble.DragonCurve; import de.xonibo.stickes.assemble.Knaeuel; import de.xonibo.stickes.assemble.KochSnowFlake; import de.xonibo.stickes.assemble.SierpinskiTriangle; import de.xonibo.stickes.gui.ExamplesMenu; import de.xonibo.stickes.format.ImagePNG; import...
package de.xonibo.stickes.examples; public class CreateExamples { public static void saveDstAndPNG(String s, StichData sd) throws Exception { final String path = "target/output/examples";
final Tajima t = new Tajima();
4
naskarlab/fluent-query
src/test/java/com/naskar/fluentquery/NativeMappingUpdateTest.java
[ "public class MappingConvention implements Convention {\r\n\t\r\n\tprivate Map<Class<?>, Mapping<?>> maps;\r\n\t\r\n\tpublic MappingConvention() {\r\n\t\tthis.maps = new HashMap<Class<?>, Mapping<?>>();\r\n\t}\r\n\t\r\n\tpublic <T> void add(Mapping<T> map) {\r\n\t\tmaps.put(map.getClazz(), map);\r\n\t}\r\n\t\r\n\t@...
import org.junit.Assert; import org.junit.Before; import org.junit.Test; import com.naskar.fluentquery.conventions.MappingConvention; import com.naskar.fluentquery.converters.NativeSQLResult; import com.naskar.fluentquery.converters.NativeSQLUpdate; import com.naskar.fluentquery.domain.Customer; import com.naska...
package com.naskar.fluentquery; public class NativeMappingUpdateTest { private MappingConvention mc; @Before public void setup() { mc = new MappingFactory().create(); } @Test public void testUpdate() { String expected = "update TB_CUSTOMER e0 set e0.DS_NAME = :p0, e0.VL_MIN_BALANCE = :...
.entity(Customer.class)
3