text stringlengths 10 2.72M |
|---|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package clases;
import java.io.IOException;
import java.io.ObjectOutputStream;
/**
*
* @author Wdavid
*/
public class MedidasdeHom... |
package ru.otus.sua.L03;
import java.util.*;
//Написать свою реализацию ArrayList на основе массива.
// class MyArrayList<E> implements List<E>{...}
//
//Проверить, что на ней работают методы
// addAll(Collection<? super T> c, T... elements)
// static <E> void copy(List<? super T> dest, List<? extends T> src)
// stat... |
package be.kdg.fastrada.integratie;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDr... |
package com.yummy.util;
import sun.misc.BASE64Encoder;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
public class PictureUtil {
/**
* 图片转base64字符串
* @param imagePath 图片存储的路径
* @return base64字符串
*/
public static String imageChangeBase64(String ima... |
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/**
* @Author: Asher Huang
* @Date: 2019-10-05
* @Description: PACKAGE_NAME
* @Version:1.0
*/
public class HashSetDemo {
public static void main(String[] args) {
// 向HashSet中添加元素:Red,Blue,Yellow,Pink,White,并遍历打印输出
Set set... |
package aufgabe1.dictionary;
import java.util.ArrayList;
import java.util.List;
/**
* SortedArrayDictionary implementiert ein Dictionary mit einem Feld, in dem die Datensätze
* lückenlos und sortiert gespeichert werden. Für die Suche wird binäre Suche eingesetzt.
*/
public class SortedArrayDictionary<K extends... |
package sample;
import javafx.beans.property.*;
import java.time.LocalDate;
public class Occupancy {
private SimpleIntegerProperty occupancyNumber;
private SimpleIntegerProperty employeeNumber;
private SimpleIntegerProperty customerNumber;
private SimpleIntegerProperty roomNumber;
private SimpleD... |
package jp.w3ch.examples;
import com.typesafe.config.*;
public class MyApp1 {
public static void main(String[] args) {
Config config = ConfigFactory.load("myapp1/hello");
System.out.println("Hello " + config.getString("app.message") + "!");
}
}
|
package StepDefinition;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.interactions.Actions;
... |
/*
* Copyright (c) TIKI Inc.
* MIT license. See LICENSE file in root directory.
*/
package com.mytiki.blockchain.features.latest.block;
import com.mytiki.common.ApiConstants;
import com.mytiki.common.reply.ApiReplyAO;
import com.mytiki.common.reply.ApiReplyAOFactory;
import org.springframework.web.bind.annotation.... |
package com.redsun.platf.web.interceptor;
import com.redsun.platf.entity.account.UserAccount;
import com.redsun.platf.entity.sys.SystemLanguage;
import com.redsun.platf.entity.sys.SystemTheme;
import com.redsun.platf.service.account.AccountManager;
import com.redsun.platf.service.sys.ConfigLoaderService;
import com.re... |
package cn.tree.ergodic;
import lombok.Data;
/**
* @Author: xiaoni
* @Date: 2020/3/17 19:58
*/
@Data
public class TreeNode {
int data;
TreeNode leftChild;
TreeNode rightChild;
public TreeNode(int data) {
this.data = data;
}
}
|
package biotools.biotoolsCompose.poc.sib;
import de.metaframe.jabc.framework.sib.annotation.SIBClass;
@SIBClass("biotoolsCompose/demo-sibs/ShowPng")
public class ShowPng extends AbstractBiotoolsComposeSIB {
}
|
/**
* NOTE: This class is auto generated by the swagger code generator program (2.4.19).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
package com.techtest.mobilab.services.api;
import com.techtest.mobilab.services.model.ModelApiResponse;
import com.techtest.mobilab.services... |
import javax.xml.bind.annotation.XmlIDREF;
public interface Action {
int getMaxDistance();
int getMaxHeightJump();
String getName();
public default void jump() {
System.out.println(getName() + " прыгает");
}
public default void run() {
System.out.println(getName() + " бегает");
}
}
|
package am.bizis.cds.dpfdp4;
/**
* <p>Označení druhu příjmů podle § 10 odst. 1 zákona<br />
* A – příležitostná činnost<br />
* B - prodej nemovitostí<br />
* C - prodej movitých věcí<br />
* D - prodej cenných papírů<br />
* E - příjmy z převodu podle § 10 odst. 1, písm. c) zákona<br />
* F - jiné ostatní příj... |
package com.bnade.wow.config;
import com.bnade.wow.interceptor.CORSInterceptor;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.KeyGenerator;
impo... |
package pobj.tme4;
import java.io.*;
import java.util.List;
import pobj.util.Chrono;
public class WordCount {
public void main() {
Chrono chronoHMS = new Chrono();
wordcount(new HashMultiSet<String>());
chronoHMS.stop();
Chrono chronoNMS = new Chrono();
wordcount(new NaiveMultiSet<St... |
package com.wrathOfLoD.GameLaunching.Vendors;
import com.wrathOfLoD.Controllers.NPCControllers.FlyingNPCController;
import com.wrathOfLoD.Controllers.NPCControllers.NPCController;
import com.wrathOfLoD.Controllers.NPCControllers.NotFlyingNPCController;
import com.wrathOfLoD.Controllers.NPCControllers.PetController;
im... |
// SPDX-License-Identifier: BSD-3-Clause
// Copyright (c) 1999-2004 Brian Wellington (bwelling@xbill.org)
package org.xbill.DNS;
import java.io.IOException;
import java.time.Duration;
import java.time.Instant;
import java.util.Date;
import org.xbill.DNS.utils.base64;
/**
* Transaction Signature - this record is aut... |
package gui.form.valid;
import gui.form.ValueChangeEvent;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* This class provides an adapter for data validators. This was
* designed for use with FormItem objects, but any source can ... |
package com.su.subike.bike.entity;
import lombok.Data;
/**
* @ClassName BikeLocation
* @Description TODO
* @Author 434945072@qq.com
* Data 2019/3/16 14:06
* Version 1.0
**/
@Data
public class BikeLocation {
private String id;
private Long bikeNumber;
private int status;
private Double[] coor... |
package com.exceptions;
public class MyQueueException extends Exception{
@Override
public String getMessage() {
return "Invalide date for Queue";
}
}
|
package com.lenovohit.hcp.pharmacy.web.rest;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable... |
package com.company;
import ru.ifmo.se.pokemon.*;
public class Staraptor extends Stravia {
public Staraptor() {
this("Staraptor",1);
}
public Staraptor(String name,int level){
super(name,level);
this.setType(Type.NORMAL,Type.FLYING);
this.setStats(85,120,70,50,... |
package Sekcja5.Exercises;
public class Exercise25LargestPrime {
public static int getLargestPrime(int number){
if (number < 2){
return -1;
}
for (int i = 2; i < number; i++) {
if (number % i == 0){
number /= i;
i--;
}
... |
package gov.nih.mipav.view.renderer.WildMagic.Poisson.Octree;
import java.util.Arrays;
import java.util.Comparator;
/**
* Quick and merge sort implementations that create no garbage, unlike {@link
* Arrays#sort}. The merge sort is stable, the quick sort is not.
*/
public class SortUtil
{
/**
* Quick sort... |
package com.model.service;
import java.util.List;
import com.model.data.ModelType;
import com.model.data.Vendor;
public interface VendorService {
public void save(Vendor obj);
public List<Vendor> finds();
public Vendor get(Vendor obj);
public Vendor get(String id);
}
|
package viewGraphic;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.TextField;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.BorderPane;
import javafx.sc... |
package at.fhv.teama.easyticket.server.address;
import at.fhv.teama.easyticket.dto.AddressDto;
import at.fhv.teama.easyticket.server.mapping.MapperContext;
import org.mapstruct.Context;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
@Mapper(componentModel = "spring", nullValueCheckStrategy ... |
/*
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
import java.util.Scanner;
public class MenuProgram {
/*
* @author: Aaron Lack, alack
* Last edited: 2/7/20
* Pseudocode:
* The user must input either A,B,C, or E to view a specific pattern
* Write a bunch of if statements that take the user character value to display appropriate pattern
* Look up how to make a... |
package com.mingrisoft;
import java.sql.*;
/**
* @author Administrator
*/
public class SubjoinDate {
String url = "jdbc:jtds:sqlserver://localhost:1433;DatabaseName=master";
String username = "sa";
String password = "";
private Connection con = null;
private Statement stmt = null;
private ResultSet rs = null;... |
package cuc.edu.cn.hynnsapp02.ui.fragments;
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup... |
package net.awesomekorean.podo.lesson.lessonVideo;
import androidx.appcompat.app.AppCompatActivity;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.view.WindowManager;
import android.widget.MediaController;
import android.widget.Toast;
import android.widget.VideoView... |
package socialnetwork.repository.database;
import socialnetwork.domain.Message;
import socialnetwork.domain.Prietenie;
import socialnetwork.domain.Tuple;
import socialnetwork.domain.Utilizator;
import socialnetwork.domain.validators.MessageValidator;
import socialnetwork.domain.validators.Validator;
import socialnetwo... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.fastHotel.modelo;
import java.util.ArrayList;
/**
*
* @author rudolf
*/
public class Frigobar {
... |
package xtrus.ex.cms.message;
import java.io.ByteArrayInputStream;
import java.io.UnsupportedEncodingException;
import org.apache.commons.io.IOUtils;
import com.esum.framework.net.socket.PacketUtils;
import xtrus.ex.cms.CmsCode;
import xtrus.ex.cms.CmsConfig;
import xtrus.ex.cms.CmsException;
public class Cms0620 ... |
package com.proxiad.games.extranet.controller;
import javax.persistence.EntityNotFoundException;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.messaging.simp.S... |
package lsinf1225.uclove;
import android.content.Context;
/**
* Created by Guillaume on 29/04/16.
*/
public class Score {
private String loginGive;
private String loginGet;
private int quotation;
// Constructeur
public Score(String loginGive, String loginGet, int quotation) {
... |
/* ------------------------------------------------------------------------------
* 软件名称:美播手机版
* 公司名称:多宝科技
* 开发作者:Yongchao.Yang
* 开发时间:2014年10月14日/2014
* All Rights Reserved 2012-2015
* ----------------------------------------------------... |
package com.mitobit.camel.component.nexmo;
import java.util.Map;
import org.apache.camel.Endpoint;
import org.apache.camel.impl.DefaultComponent;
import org.apache.camel.spi.UriEndpoint;
/**
* Represents the component that manages {@link NexmoEndpoint}.
*/
@UriEndpoint(title = "Nexmo", scheme = "nexmo", consumerCl... |
package com.comyou.qrscandemo;
import android.app.Activity;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.RelativeLayout;
import android.widget.Toast;
import android.widget.RelativeLayout.LayoutPa... |
package com.example.giftishare.data.model;
import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;
import java.util.Date;
import java.util.UUID;
/**
* Created by KS-KIM on 19/02/04.
*/
... |
package codingexercises;
// Coding Exercise 19: Last Digit Checker
public class LastDigitChecker {
public static void main(String[] args) {
System.out.println(hasSameLastDigit(41, 22, 71));
System.out.println(hasSameLastDigit(23, 32, 42));
System.out.println(hasSameLastDigit(9, 99, 999));
System.out.pri... |
package com.miyatu.tianshixiaobai.adapter;
import android.text.Html;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import an... |
package com.dungnguyen.small.twitter.model;
/**
* Created by Admin on 3/5/2016.
*/
public class Tweet {
public long id;
public String content;
public String author;
public String [] images;
/**
* Data in each tweet
* @param id
* @param content
* @param author
* @param im... |
package Services.Orchestration.Requests;
public class OrchestrationRequest {
public int id;
public int ownerID;
public int startJobID;
}
|
import java.util.Scanner;
public class BMI{
public static void main(String[] args){
Scanner value = new Scanner(System.in);
double height;
double weight;
double BMI;
System.out.print("Enter your height in meters: ");
height = value.nextDouble();
System.out.print("Enter your weight in kg: ");
weight... |
package com.tyj.venus.entity;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@Data
@Entity
@Table(name = "t_user")
public class UserInfo implements Serializable {
@Id
@Column(name = "user_id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
pri... |
package kr.co.flyingturtle.repository.vo;
import java.util.Date;
import java.util.List;
import org.springframework.web.multipart.MultipartFile;
public class Canvas extends Page {
private int canNo;
private int ssbjNo;
private String ssbjName;
private String sysName;
private String oriName;
private String p... |
package db;
import java.io.File;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import utils.DbUtils;
public class SmallProvidDbCreator {
public static void cre... |
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
public class TowersOfHanoiTest {
private static TowersOfHanoi th;static int n;
@BeforeClass
public static void setUpBeforeClass() throws ... |
// Generated by Dagger (https://google.github.io/dagger).
package org.drulabs.bankbuddy.di;
import dagger.internal.Factory;
import dagger.internal.Preconditions;
import javax.inject.Provider;
import org.drulabs.bankbuddy.local.database.BankBuddyDB;
import org.drulabs.bankbuddy.local.database.UserInfoDAO;
public final... |
package com.linkedlist.problems;
public class JoinFirstLast {
public static void main(String args[]){
System.out.println("HelloWorld");
}
}
|
package com.android_dev.tatenuufrn.domain;
import com.android_dev.tatenuufrn.databases.TatenUFRNDatabase;
import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.ModelContainer;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.anno... |
import java.util.ArrayList;
import java.util.Scanner;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Grullon
*/
public class Tournament {
private Scanner re... |
package com.wangyang.basic.dao;
import com.wangyang.model.Course;
import com.wangyang.util.IBaseDao;
import java.util.List;
public interface ICourseDao extends IBaseDao<Course> {
List<Course> findByGradeId(int gradeId);
}
|
import Exercice.*;
import AlgoClassic.*;
import javax.swing.plaf.synth.SynthLabelUI;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.locks.StampedLock;
public class test {
public static void main (String[] args){
int[] tmp;
//int[] arr1={4,5,8};
//int[] arr2={... |
package ru.job4j.search;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.function.Predicate;
public class Search {
public static void main(String[] args) throws Exception {
Path startDir = Paths.get("/home/alex/project/job4j/io");
searc... |
package com.route_category_note.model;
public class Route_Category_NoteVO implements java.io.Serializable{
private String route_no;
private String route_cate_no;
public String getRoute_no() {
return route_no;
}
public void setRoute_no(String route_no) {
this.route_no = route_no;
}
public String getRoute_cat... |
package com.snxy.pay.config.wx;
public enum WxBillCodeEnum {
SYSTEMERROR("SYSTEMERROR","接口返回错误"),
INVALID_TRANSACTIONID("INVALID_TRANSACTIONID","无效 transaction_id"),
PARAM_ERROR("PARAM_ERROR","参数错误");
private String errCode ;
private String msg;
WxBillCodeEnum(String errCode, String msg) {
... |
package com.homework.pattern.factorymethod;
/**
* @author lq
* @version 1.0
* @desc
* @date 2019/3/18 23:50
**/
public class EnglishBookFactory implements IBookFactory {
@Override
public IBook create() {
return new EnglishBook();
}
}
|
package it.sevenbits.codecorrector.formatter.javaformatter.handle;
import it.sevenbits.codecorrector.formatter.javaformatter.JavaConverterConfig;
import it.sevenbits.codecorrector.formatter.javaformatter.State;
/**
* Created by remmele on 05.07.16.
*/
public class AddSpaceInBuffer implements IHandler {
public S... |
package com.evpa.spring.redis.cass.controller;
import com.evpa.spring.redis.cass.dao.Stb;
import com.evpa.spring.redis.cass.service.StbService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.... |
package com.uniinfo.cloudplat.vo;
import com.uniinfo.common.base.RespInfo;
public class AccessTokenRespVO extends RespInfo {
private String access_token;// string 用于调用access_token,接口获取授权后的access token。
private long expires_in;// string access_token的生命周期,单位是秒数。
private String uid;// string 当前授权用户的UID。
... |
package com.example.usuario.recyclerview;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class Bienvenida extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstance... |
package com.alibaba.druid.bvt.pool.profile;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import junit.framework.TestCase;
public class ProfileEnableTest extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
... |
package FlowProccessor.model.impl;
import FlowProccessor.model.IBotFlowModel;
import org.telegram.telegrambots.api.interfaces.BotApiObject;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Optional;
import java.util.stream.Stream;
public abstract class BotBaseMod... |
package uy.edu.um.adt.linkedlist;
import java.util.Iterator;
public class MyListIterator<T> implements Iterator<T> {
private Node<T> data;
public MyListIterator(Node<T> first) {
data = first;
}
@Override
public boolean hasNext() {
return data != null;
}
@Override
pu... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package pertemuan7;
/**
*
* @author Angga
*/
public class StringBuilderCapLen {
public static void main(String[] ar... |
/*
* © Copyright 2016 CERN. This software is distributed under the terms of the Apache License Version 2.0, copied
* verbatim in the file “COPYING“. In applying this licence, CERN does not waive the privileges and immunities granted
* to it by virtue of its status as an Intergovernmental Organization or submit itsel... |
package org.usfirst.frc.team178.robot.commands;
import edu.wpi.first.wpilibj.command.Command;
import org.usfirst.frc.team178.robot.Robot;
import org.usfirst.frc.team178.robot.subsystems.Intake;
/**
*
*/
public class CorrectIntake extends Command {
Intake intake;
public CorrectIntake() {
requires(Robot.i... |
package org.jphototagger.program.module.imagecollections;
import java.awt.Container;
import java.awt.event.MouseEvent;
import javax.swing.ListModel;
import org.jphototagger.lib.swing.Dialog;
import org.jphototagger.lib.swing.util.MnemonicUtil;
import org.jphototagger.lib.util.Bundle;
import org.jphototagger.pr... |
package com.hhdb.csadmin.plugin.tree.ui.rightMenu.action;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextFi... |
import java.io.*;
import java.util.*;
class Productos implements Serializable{
private static final long serialVersionUID = 1L;
protected String ID;
protected String nombreProducto;
protected String unidades;
protected int cantidad;
protected String descripcion;
protected int precioCompra;
protected int precioV... |
package servlet;
import java.io.IOException;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import agregadores... |
package utn.sau.hp.com.modelo;
// Generated 04/12/2014 23:31:51 by Hibernate Tools 3.6.0
import java.util.HashSet;
import java.util.Set;
/**
* Areas generated by hbm2java
*/
public class Areas implements java.io.Serializable {
private Integer id;
private Carreras carreras;
private String areaDe... |
package com.uchain.core.datastore;
public class DataStoreConstant {
public static final byte[] HeaderPrefix = new byte[] { (byte) StoreType.getStoreType(StoreType.Data),
(byte) DataType.getDataType(DataType.BlockHeader) };
public static final byte[] TxPrefix = new byte[] { (byte) StoreType.getStoreType(Sto... |
/**
* Instead of using implicit locking via the synchronized keyword the
* Concurrency API supports various explicit locks specified by the Lock
* interface. Locks support various methods for finer grained lock control
* thus are more expressive than implicit monitors
**/
public class Locks {
/**
* A lock is acquire... |
package com.krish.array;
import java.util.PriorityQueue;
public class TopNValuesInArray {
public static void main(String[] args) {
int[] arr = { 6, 2, 1, 7, 9, 8, 3, 4, 5};
topN(arr, 3);
}
private static void topN(int[] arr, int n) {
PriorityQueue<Integer> pq = new PriorityQueu... |
package com.projectseyupo.receivers;
import android.app.ActivityManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.facebook.react.HeadlessJsTaskService;
import com.projectseyupo.MainActivity;
import com.projectseyupo.services.ServiceLock;
impo... |
package app.interfaces;
import app.Dimension;
import app.Goal;
public class GoalCreator extends Interface {
private final Dimension dimension;
public GoalCreator(Dimension dimension) {
this.dimension = dimension;
continueInput = false;
}
@Override
public boolean takeAction() {
... |
package dataMapper;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import com.mysql.jdbc.Connection;
import com.mysql.jdbc.PreparedStatement;
import domain.Customer;
import domain.DomainObject;
import utils.DBConnection;
import utils.IdentityMap;
public class CustomerMapper extends Da... |
package dakrory.a7med.cargomarine.CustomViews;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.util.Log;
import android.view.LayoutInflater;
impo... |
package com.transport.action;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;
import org.apache.struts.action.Action;
im... |
package com.github.xiaomi007.annotations.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* //TODO: Javadoc on com.github.xiaomi007.annotations.annotations.Table
*
* @author Damien
* @v... |
package abstractInterface;
/**
* 简述:
*
* @author WangLipeng 1243027794@qq.com
* @version 1.0
* @since 2020/1/13 11:12
*/
public interface TestInterface {
public static final Integer a =1;
default void print(){
System.out.println();
}
}
|
package za.co.openwindow.ninemensmorris.game;
/**
* Created by student on 2017/10/17.
*/
public enum Token {
PLAYER_1, PLAYER_2, NO_PLAYER, OFFBOARD;
}
|
/*
MinMaxIntPair -- a class within the Cellular Automaton Explorer.
Copyright (C) 2006 David B. Bahr (http://academic.regis.edu/dbahr/)
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; ei... |
//
// Decompiled by Procyon v0.5.36
//
package com.davivienda.sara.tablas.zona.servicio;
import com.davivienda.sara.base.exception.EntityServicioExcepcion;
import javax.persistence.EntityManager;
import com.davivienda.sara.entitys.Zona;
import com.davivienda.sara.base.BaseEntityServicio;
public class ZonaServicio ... |
package DesignPatterns.Mediator;
import DesignPatternCodeGenerator.CodeGenerator;
import org.eclipse.jdt.core.dom.*;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
public class MediatorClass extends CodeGenerator {
String mediatorInterface, colleagueInterface, colleag... |
package be.openclinic.finance;
import be.openclinic.common.OC_Object;
import be.mxs.common.util.db.MedwanQuery;
import be.mxs.common.util.system.Debug;
import be.mxs.common.util.system.ScreenHelper;
import java.util.Date;
import java.util.Vector;
import java.sql.Connection;
import java.sql.PreparedStatement;
... |
package com.pointwest.training.main;
import java.util.List;
import com.pointwest.training.bean.AnimalBean;
import com.pointwest.training.manager.AnimalShelterMgr;
import com.pointwest.training.ui.HomePageUI;
public class AnimalShelterMain {
public static void main(String[] args) {
// TODO Auto-generated method... |
package com.heyskill.element;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.ActionBar;
import com.hc.element_ec.main.EcBottomFragment;
import com.hc.element_ec.main.index.IndexFragment;
import com.hc.element_ec.sign.SignInFragment;
import com.hc.element_ec.sign.S... |
package com.byraphaelmedeiros.samples.solid.srp.good;
/**
* @author Raphael Medeiros (raphael.medeiros@gmail.com)
* @since 05/06/2020
*/
public class ValidateInvoiceNumberService {
public boolean validateInvoiceNumber(long number, Object invoice) {
return false;
}
}
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package JDBC;
/**
*
* @author Utilisateur
*/
public class ManufacturerEntity {
private int id;
private String ... |
import java.util.LinkedList;
/** NIfth.java
*
* Author: Greg Choice c9311718@uon.edu.au
*
* Created:
* Updated: 28/09/2018
*
* Description:
* STNode sub-class for NIFTH rule
*
*/
public class NIfth extends STNode
{
public NIfth(LinkedList<Token> tokenList, SymbolTable table)
{
... |
package com.citi.yourbank.vo;
import io.swagger.annotations.ApiModel;
import lombok.Data;
@ApiModel("AccountSummary")
@Data
public class AccountSummaryVO {
private AccountVO account;
private String associationType;
private CustomerProfileVO ownerDetail;
private String accountDescription;
... |
package ru.otus.sua.L11.dbservice.database;
import org.hibernate.cfg.Configuration;
import ru.otus.sua.L11.entity.*;
public class HibernateConfiguration {
public static Configuration getConfig() {
Configuration configuration = new Configuration();
configuration.addAnnotatedClass(DataSet.class);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.