answer
stringlengths
17
10.2M
package cn.momia.mapi.api.v1; import cn.momia.mapi.common.config.Configuration; import cn.momia.mapi.common.http.MomiaHttpParamBuilder; import cn.momia.mapi.common.http.MomiaHttpRequest; import cn.momia.mapi.common.http.MomiaHttpResponseCollector; import cn.momia.mapi.web.response.ResponseMessage; import com.alibaba.fa...
package com.amihaiemil.eoyaml; import com.amihaiemil.eoyaml.exceptions.YamlReadingException; public interface YamlNode extends Comparable<YamlNode> { /** * Comment referring to this Node. * * @return Comment. If there is no comment, it will return * an "empty" comment (an instance of Comment wit...
package com.amihaiemil.eoyaml; import com.amihaiemil.eoyaml.exceptions.YamlReadingException; public interface YamlNode extends Comparable<YamlNode> { /** * Comment referring to this Node. * * @return Comment. If there is no comment, it will return * an "empty" comment (an instance of Comment wit...
package com.artemis.utils; public interface ImmutableBag<E> { E get( int index ); int size(); boolean isEmpty(); boolean contains( E e ); }
package com.continuuity; import com.continuuity.app.guice.BigMamaModule; import com.continuuity.common.conf.CConfiguration; import com.continuuity.common.conf.Constants; import com.continuuity.common.service.ServerException; import com.continuuity.common.utils.Copyright; import com.continuuity.common.utils.PortDetector...
package com.detrav.proxies; public class ServerProxy extends CommonProxy { @Override public void onPostLoad() { super.onPostLoad(); } @Override public void onLoad() { super.onLoad(); } @Override public void onPreInit() { super.onPreInit(); } }
package com.epam.reportportal.ui; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer; import org.springframework.boot.context.embedded.EmbeddedServletContainerCustom...
package com.fishercoder.solutions; import java.util.HashMap; import java.util.Map; /**219. Contains Duplicate II Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the difference between i and j is at most k. */ public cl...
package com.fishercoder.solutions; public class _312 { public static class Solution1 { public int maxCoins(int[] iNums) { int[] nums = new int[iNums.length + 2]; int n = 1; for (int x : iNums) { if (x > 0) { nums[n++] = x; ...
package com.fishercoder.solutions; import java.util.HashSet; import java.util.Set; public class _686 { public static class Solution1 { public int repeatedStringMatch(String A, String B) { Set<Character> set = new HashSet<>(); for (char c : A.toCharArray()) { set.add(c...
package com.fishercoder.solutions; /** * 724. Find Pivot Index * * Given an array of integers nums, write a method that returns the "pivot" index of this array. * We define the pivot index as the index where the sum of the numbers to the left of the index is equal * to the sum of the numbers to the right of the in...
package com.frederikam.fred.moe; import org.apache.tika.config.TikaConfig; import org.apache.tika.exception.TikaException; import org.apache.tika.io.TikaInputStream; import org.apache.tika.metadata.Metadata; import org.apache.tika.mime.MediaType; import org.json.JSONArray; import org.json.JSONObject; import org.slf4j.L...
package com.github.fakemongo.impl; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.bson.LazyBSONObject; import org.bson.LazyDBList; import com.mongodb.Bas...
package com.github.pagehelper; import java.util.Collection; import java.util.Collections; import java.util.List; @SuppressWarnings({"rawtypes", "unchecked"}) public class PageInfo<T> extends PageSerializable<T> { public static final int DEFAULT_NAVIGATE_PAGES = 8; public static final PageInfo EMPTY = new PageIn...
package com.google.sps.servlets; import java.io.IOException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/sign-out") public class Logout exte...
package com.laxture.lib; import android.app.Application; import android.content.ContentResolver; import android.content.SharedPreferences; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.res.Resources; import android.os.E...
package com.ociweb.gl.impl; import java.util.ArrayList; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantLock; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.ociweb.gl.api.Behavior; import com.ociweb.gl.api.Builder; import com.ociweb.gl.api.GreenCommandChannel; impor...
package com.ociweb.gl.impl; import com.ociweb.gl.api.*; import com.ociweb.gl.api.transducer.HTTPResponseListenerTransducer; import com.ociweb.gl.api.transducer.PubSubListenerTransducer; import com.ociweb.gl.api.transducer.RestListenerTransducer; import com.ociweb.gl.api.transducer.StateChangeListenerTransducer; import ...
package com.pelucky.spider.util; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; import org.apache.http.HttpEntity; import org.apache.http....
package com.sematext.in; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.sun.mail.imap.IMAPMessage; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.HelpFo...
package com.sister.kelompok5; import java.awt.image.BufferedImage; import java.io.ByteArrayOutputStream; import java.io.File; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import javax.imageio.ImageIO; public class RMIClient { private void sendMessage(){ try { /* ...
package com.sourcepulp.treespy; import java.io.File; import java.io.IOException; public interface TreeSpy { public void watch(File directory, TreeSpyListener callback) throws IOException; public void watch(File directory, TreeSpyListener callback, boolean recurse) throws IOException; public void start(); ...
package com.uchicom.http; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.net.SocketAddress; import java.nio.file.FileSystem; import java.nio.file.Path; import java.nio.file.StandardWatchEventKinds; import java.nio.fil...
package connection; /** Manages a connection to an eyetracker. * * @author Luca Fuelbier */ public interface ETConnectionManager { /** Connects to a server that manages an eyetracker. * * @param sendIp IP on which messages will be send to the server * @param sendPort Port on which messages will...
package de.thberger.cinevote; import lombok.Getter; import lombok.Setter; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Configuration; import java.util.List; @Configuration @ConfigurationProperties( prefix = "cinevote") @Getter @Setter public c...
package dk.itu.kelvin.thread; // General utilities import java.util.Map; import java.util.Queue; // Concurrency utilities import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.ConcurrentHashMap; // JavaFX concurrency utilities import javafx.concurrent.Task; /** * Task queue class. * * @versi...
package edu.berkeley.path.beats; import org.apache.log4j.Logger; import edu.berkeley.path.beats.simulator.SiriusErrorLog; /** * Implements "Sirius: Concept of Operations" */ public class Runner { private static Logger logger = Logger.getLogger(Runner.class); /** * @param args command-line arguments ...
package edu.hm.hafner; /** * Useless class - only for test-cases. * * @author Christian M&ouml;stl */ public class MutableException extends Exception { private static final long serialVersionUID = 1L; private String two; /** * Creates a new instance of {@link MutableException}. * * @param...
package ezvcard.io; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import ezvcard.Ezvcard; import ezvcard.VCard; import ezvcard.VCardVersion; import ezvcard.io.scribe.ScribeIndex; import ezvcard.io.scribe.VCardPropertyScribe; import ezvcard.parameter.AddressType; impo...
package fi.csc.chipster.rest; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.StringReader; import java.io.StringWriter; import java.io.UnsupportedEncodingException; import java.net.InetAddress; import java.net.URI; import java.net.UnknownHostException; import java.nio.charse...
package gr.ntua.vision.monitoring; import java.io.IOException; import java.net.SocketTimeoutException; /** * The entry point to the monitoring instance. */ public class Main { /** * List of available commands understood by the server. They match standard UNIX init.d commands. */ private enum Command...
package ie.omk.smpp.util; import ie.omk.smpp.BadCommandIDException; import ie.omk.smpp.SMPPRuntimeException; import ie.omk.smpp.message.AlertNotification; import ie.omk.smpp.message.BindReceiver; import ie.omk.smpp.message.BindReceiverResp; import ie.omk.smpp.message.BindTransceiver; import ie.omk.smpp.message.BindTran...
package io.github.classgraph; import java.io.File; import java.lang.annotation.Inherited; import java.lang.annotation.Repeatable; import java.lang.reflect.Modifier; import java.net.MalformedURLException; import java.net.URL; import java.util.AbstractMap.SimpleEntry; import java.util.ArrayList; import java.util.Collecti...
package listener; import main.Main; import sx.blah.discord.api.events.IListener; import sx.blah.discord.util.audio.events.TrackFinishEvent; public class TrackFinishedListener implements IListener<TrackFinishEvent> { @Override public void handle(TrackFinishEvent event) { // Leave current channel after audio fini...
package mho.wheels.math; import mho.wheels.misc.BigDecimalUtils; import mho.wheels.misc.FloatingPointUtils; import mho.wheels.misc.Readers; import mho.wheels.ordering.Ordering; import mho.wheels.structures.Pair; import org.jetbrains.annotations.NotNull; import java.math.BigDecimal; import java.math.BigInteger; import j...
package mkremins.fanciful; import java.io.StringWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import net.amoebaman.util.Reflection; import org.bukkit.Achievement; import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.Statistic; import org.bukkit.Statistic.Type;...
package nuclibooktest.models; import com.j256.ormlite.dao.Dao; import com.j256.ormlite.dao.DaoManager; import com.j256.ormlite.support.ConnectionSource; import nuclibook.models.CannotHashPasswordException; import nuclibook.models.Staff; import nuclibook.models.Tracer; import nuclibooktest.test_utils.TestSqlServerConnec...
package org.archive.format.cdx; public class CDXLine extends FieldSplitLine implements CDXFieldConstants { public CDXLine(String line, FieldSplitFormat names) { super(line, ' ', names); } public CDXLine(CDXLine line, FieldSplitFormat selectNames) { super(line.selectValues(selectNames), s...
package org.ardverk.io; import java.io.IOException; import java.io.OutputStream; public class DataOutputUtils { private DataOutputUtils() {} public static void writeShortBE(OutputStream out, int value) throws IOException { out.write(value >>> 8); out.write(value ); } public static...
package org.cojen.tupl.io; import java.nio.Buffer; import java.nio.ByteBuffer; /** * Backdoor access to DirectByteBuffer. * * @author Brian S O'Neill */ public class DirectAccess { private static final sun.misc.Unsafe UNSAFE = UnsafeAccess.tryObtain(); private static final Class<?> cDirectByteBufferClass; ...
package org.drpowell.xlifyvcf; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.Reader; import java.ne...
package org.jtrfp.trcl; import java.awt.Color; import java.util.ArrayList; import java.util.List; import org.apache.commons.math3.geometry.euclidean.threed.Vector3D; import org.jtrfp.trcl.core.TR; import org.jtrfp.trcl.core.TextureDescription; import org.jtrfp.trcl.file.LVLFile; import org.jtrfp.trcl.file.TDFFile; impo...
package org.jtrfp.trcl.snd; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.nio.BufferUnderflowException; import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap...
package helper; import java.net.URL; import java.util.HashMap; import java.util.Map; import org.eclipse.rdf4j.model.Literal; import org.eclipse.rdf4j.model.Value; import org.eclipse.rdf4j.query.BindingSet; import org.eclipse.rdf4j.query.QueryLanguage; import org.eclipse.rdf4j.query.TupleQuery; import org.eclipse.rdf4j....
package org.kohsuke.youdebug; import com.sun.jdi.Bootstrap; import com.sun.jdi.VirtualMachineManager; import com.sun.jdi.connect.AttachingConnector; import com.sun.jdi.connect.Connector.Argument; import com.sun.jdi.connect.IllegalConnectorArgumentsException; import java.io.IOException; import java.util.Map; /** * Conn...
package org.pentaho.di.repositoryexplorer; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.exception.KettleSecurityException; import org.pentaho.di.repository.Directory; import org.pentaho.di.repository.ProfileMeta; import org.pentaho.di...
package org.lantern; import org.apache.commons.lang.StringUtils; import org.jivesoftware.smack.RosterEntry; import org.jivesoftware.smack.packet.Presence; import org.jivesoftware.smack.packet.RosterPacket.Item; import org.jivesoftware.smack.packet.RosterPacket.ItemStatus; import org.jivesoftware.smackx.packet.VCard; im...
package org.lantern.browser; import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Opens the lantern ui in a browser on OSX. */ public class OsxBrowser implements LanternBrowser { private final Logger log = LoggerFactory.getLogger(getClass()); public Process open(final Str...
package org.lightmare.jndi; import java.io.IOException; import java.util.Properties; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.naming.spi.InitialContextFactor...
package org.myrobotlab.service; import java.io.File; import java.io.IOException; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.apache.commons.io.FilenameUtils; import org.myrobotlab.framework.Platform; import org.myrobotlab.framew...
package org.util.concurrent; /** * Represents a complete continuation. * * @param <T> The value type. */ public abstract class OnComplete<T> implements Continuation<T, T> { /** * Handles the success continuation. * * @param value The value. * @throws Exception */ protected void onSu...
package org.vietabroader.view; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.vietabroader.GoogleAPIUtils; import org.vietabroader.controller.AuthenticationController; import org.vietabroader.controller.SpreadsheetConnectController; import org.vietabroader.model.GlobalState; import org.vietabroader...
package org.wltea.analyzer.dic; import java.io.IOException; import org.apache.http.client.config.RequestConfig; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpHead; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClie...
package redis.embedded.util; import redis.embedded.exceptions.OsDetectionException; import java.io.BufferedReader; import java.io.InputStreamReader; /** * Two utilities methods to find the underlying OS and Architecture */ abstract class OSDetector { private static Runtime runtime = Runtime.getRuntime(); stat...
package romelo333.rflux.setup; import mcjty.lib.network.PacketHandler; import mcjty.lib.setup.DefaultModSetup; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent...
package se.kth.hopsworks.util; import java.io.File; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import javax.annotation.PostConstruct; import javax.ejb.ConcurrencyManagement; import javax.ejb.ConcurrencyManagementType; import javax.ejb.Singleton; import javax.persistence.EntityManager; im...
package seedu.address.ui; import java.util.logging.Logger; import javafx.application.Platform; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.scene.control.ListCell; import javafx.scene.control.ListView; import javafx.scene.control.SplitPane; import javafx.scene.layout.AnchorPane; impo...
package seedu.unburden.model.task; import java.util.Objects; import seedu.unburden.commons.exceptions.IllegalValueException; import seedu.unburden.commons.util.CollectionUtil; import seedu.unburden.model.tag.UniqueTagList; /** * Represents a Task in the address book. * Guarantees: details are present and not null, fi...
package src.train.client.gui; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.Entity; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.Item; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL...
package tutorial.action; import java.io.IOException; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import org.seasar.framework.exception.IORuntimeException; import org.seasar.struts.annotation.Execute; import org.seasar.struts.util.ResponseUtil; public class DownloadAction { @Reso...
package view.settings; import controller.settings.MiscSettingsController; import handler.ConfigHandler; import javafx.beans.value.ChangeListener; import javafx.beans.value.ObservableValue; import javafx.geometry.Pos; import javafx.scene.control.*; import javafx.scene.layout.HBox; import javafx.scene.layout.Priority; im...
// modification, are permitted provided that the following conditions are met: // documentation and/or other materials provided with the distribution. // * Neither the name of the <organization> nor the // names of its contributors may be used to endorse or promote products // ANY EXPRESS OR IMPLIED WARRAN...
package ie.omk.smpp.message; import java.io.*; import java.net.SocketException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import ie.omk.smpp.Address; import ie.omk.smpp.SMPPException; import ie.omk.smpp.InvalidMessageIDException; import ie.omk.smpp.StringTooLongException; import ie.omk....
package com.mikosik.jsolid; import static com.mikosik.jsolid.d2.Vector2.vector2; import static com.mikosik.jsolid.d3.Vector3.vector3; import static eu.mihosoft.vrl.v3d.ext.quickhull3d.HullUtil.hullPolygons; import static java.util.Arrays.asList; import java.util.List; import com.mikosik.jsolid.d1.Range; import com.miko...
package com.mikosik.jsolid; import static com.mikosik.jsolid.d2.Vector2.vector2; import static com.mikosik.jsolid.d3.Vector3.vector3; import static eu.mihosoft.vrl.v3d.ext.quickhull3d.HullUtil.hullPolygons; import static java.util.Arrays.asList; import java.util.List; import com.mikosik.jsolid.d1.Range; import com.miko...
package jfmi.control; import java.io.File; import java.sql.SQLException; import java.util.Collection; import java.util.List; import java.util.TreeSet; import java.util.Vector; import jfmi.dao.TaggedFileDAO; import jfmi.gui.GUIUtil; import jfmi.gui.JFMIFrame; import jfmi.gui.TaggedFileHandlerGUI; import jfmi.gui.TaggedF...
package jmetest.input; import java.awt.BorderLayout; import java.awt.Canvas; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.Toolkit; import java.awt.event.ComponentAdapter; import jav...
package ktak.functionaljava; import ktak.functionaljava.AATree.Leaf; import ktak.functionaljava.AATree.Node; class AATreeSize<T> implements AATree.Visitor<Long,T> { @Override public Long visitLeaf(Leaf<T> leaf) { return 0L; } @Override public Long visitNode(Node<T> node) { return 1 +...
package com.gildedrose; import com.gildedrose.handler.FactoryHandler; import com.gildedrose.handler.ItemHandler; import static com.gildedrose.ItemOperations.decreaseSellin; class GildedRose { public static final int MAX_QUALITY = 50; Item[] items; public GildedRose(Item[] items) { this.items = items...
package com.coveros; import com.coveros.exception.MalformedGlueCode; import com.coveros.exception.MalformedMethod; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; public class GlueCode { private ...
package com.jajja.jorm; import java.util.Arrays; import java.util.Collection; import java.util.LinkedList; import java.util.List; import java.util.Map; /** * The implementation for generating SQL statements and mapping parameters to statements for records and transactions. * * <h3>Grammar</h3> * <p> * Processes an...
package com.jdbcquery; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; /** * Represents an SQL update statement. * * @author Troy Histed */ public class Update extends Statement { private static final NamedStatementParserStrategy STATEMENT_PARSE...
package com.peak.salut; import android.annotation.TargetApi; import android.content.BroadcastReceiver; import android.content.Context; import android.content.IntentFilter; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; import android.net.wifi.p2p.WifiP2pConfig; import android.net.wifi.p2p.WifiP2...
package com.stripe.net; import com.stripe.Stripe; import com.stripe.exception.AuthenticationException; import com.stripe.exception.InvalidRequestException; import com.stripe.exception.StripeException; import com.stripe.model.oauth.DeauthorizedAccount; import com.stripe.model.oauth.TokenResponse; import java.util.HashMa...
package common; import java.io.File; import java.io.IOException; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.util.logging.Level; import org.apache.commons.io.FileUtils; import org.jdom2.Document; import org.jdom2.JDOMException; import org.jdom2.input.SAXBuilder; im...
package deathcap.junket; import org.bukkit.command.SimpleCommandMap; import org.bukkit.plugin.Plugin; import org.bukkit.plugin.SimplePluginManager; import org.bukkit.plugin.java.JavaPluginLoader; import java.io.File; public class Main { public static void main(String[] args) { Server server = new Server(); ...
package graxxia; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.Arrays; import org.apache.commons.math3.stat.descriptive.SummaryStatistics; import groovy.transform.CompileStatic; /** * An efficient method to calculate percentile...
package group7.anemone; import java.awt.geom.Point2D; import java.util.ArrayList; import processing.core.PApplet; public class Agent extends SimulationObject{ PApplet parent; private Point2D.Double speed = new Point2D.Double(0, 0); private Point2D.Double thrust = new Point2D.Double(0, 0); private Point2...
package gui; import javafx.scene.paint.Paint; import java.awt.Color; import java.io.File; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Queue; import java.util.ResourceBundle; import javafx.beans.value.ChangeListener; impo...
package hackerrank; import java.util.Arrays; import java.util.Scanner; public class TwoArrays { private static String twoArrays(Integer[] a, Integer[] b, int k) { Arrays.sort(a); Arrays.sort(b, (x, y) -> Integer.compare(y, x)); for (int i = 0; i < a.length; i++) { if (a[i] + b[i]...
package hangman; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.List; import java.util.Set; /** TODO * * This assumes HangmanGame returns Character as upper case, as part * of the software contract...
package hudson.ivy; import hudson.CopyOnWrite; import hudson.Functions; import hudson.Util; import hudson.model.AbstractProject; import hudson.model.Cause.UpstreamCause; import hudson.model.Action; import hudson.model.DependencyGraph; import hudson.model.DependencyGraph.Dependency; import hudson.model.Descriptor; impor...
package jalf.predicate; import jalf.AttrName; import jalf.Predicate; import jalf.Tuple; import static jalf.util.CollectionUtils.parallelStreamOf; public class Among extends Predicate { private AttrName attrName; private Iterable<?> vals; public Among(AttrName attrName, Iterable<?> vals) { this.attrN...
package leetcode; public class Problem1039 { public int minScoreTriangulation(int[] A) { Integer[][] memo = new Integer[A.length][A.length]; return minScoreTriangulation(A, 0, A.length - 1, memo); } private static int minScoreTriangulation(int[] array, int i, int j, Integer[][] memo) { ...
package leetcode; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Objects; import java.util.Queue; import java.util.Set; public class Problem1129 { public int[] shortestAlternatingPaths(int n, int[][] red_edges, int[...
package leetcode; import java.util.TreeSet; public class Problem1385 { public int findTheDistanceValue(int[] arr1, int[] arr2, int d) { TreeSet<Integer> set = new TreeSet<>(); for (int a : arr2) { set.add(a); } int answer = 0; for (int n : arr1) { Inte...
package mirror; import java.io.IOException; import java.util.logging.FileHandler; import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.SimpleFormatter; class LoggingConfig { static { System.setProperty("java.util.logging.SimpleFormatter.format...
package nz.co.paulo; import com.google.gson.Gson; import spark.Request; import spark.Response; import spark.ResponseTransformer; import spark.template.mustache.MustacheTemplateEngine; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.uti...
package oracle; import oracle.markov.MarkovChain; import oracle.markov.MarkovQueue; import processing.core.PApplet; import java.io.*; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.stream.Collectors;...
package org.arachb.api; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRespon...
/* * IGV.java * * Represents an IGV instance. * * Note: Currently, only one instance is allowed per JVM. * */ package org.broad.igv.ui; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.jidesoft.swing.JideSplitPane; import htsjdk.samtools.seekablestream.SeekableFileS...
package util; import static util.DebugUtils.LOGGER; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.Collection; import java.util.HashSet; import java.util.Set; import java.util.logging.L...
package com.sometrik.framework; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List; import com.android.trivialdrivesample.util.IabHelper; import com.android.trivialdrivesample.util.IabHelper.IabAsyncInProgressException; import com.android.trivialdrivesample.util.IabResult; import com.and...
package com.sometrik.framework; import java.util.Timer; import java.util.TimerTask; import android.view.SurfaceView; import android.view.View; public class NativeSurface extends SurfaceView implements NativeCommandHandler { private FrameWork framework; private Timer timer; private DrawTimer drawTimer; //draw an...
package org.eclipse.persistence.internal.queries; import java.util.*; import org.eclipse.persistence.internal.helper.*; import org.eclipse.persistence.internal.sessions.AbstractRecord; import org.eclipse.persistence.internal.sessions.AbstractSession; import org.eclipse.persistence.internal.databaseaccess.*; import org....
package uk.ac.ebi.spot.goci.curation.service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import uk.ac.ebi.spot.goci.curation.model.As...
package com.ecyrd.jspwiki.providers; import junit.framework.*; import java.io.*; import java.util.*; import org.apache.log4j.*; import com.ecyrd.jspwiki.*; public class FileSystemProviderTest extends TestCase { FileSystemProvider m_provider; FileSystemProvider m_providerUTF8; String m_pagedir; ...
package com.oracle.truffle.dsl.processor.typesystem; import static com.oracle.truffle.dsl.processor.Utils.*; import java.lang.annotation.*; import java.util.*; import javax.lang.model.element.*; import javax.lang.model.type.*; import javax.lang.model.util.*; import com.oracle.truffle.api.dsl.*; import com.oracle.truffl...
package org.jgroups.tests; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.Semaphore; i...
package org.jfree.chart.block.junit; import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import junit.fram...