text
stringlengths
10
2.72M
import java.util.*; public class Hangover { public static void main(String [] args) { double[] m = new double[277]; m[0] = .5; int k =1; while(m[k-1] <5.2) m[k++] = m[k-1] +(1.0/(k+2)); double c; Scanner sc = new Scanner(System.in); c=Double.parseDouble(sc.next()); while(c>0) { if(c==0.00) ...
/** */ package iotwearable.model.iotw; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>CDS</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link iotwearable.model.iotw.CDS#getPinGND <em>Pin GND</em>}</li> * <li>{@link ...
package people; import rooms.Room; import java.util.Scanner; public class Person { private String firstName; private String[] inventory; private int scaredMeter; private String costume; public int[] location = new int[2]; public Person(String firstName, int[] location) { this.firstName...
package javaprg04; import java.util.Scanner; public class Power1 { public static void main(String[] args) { Scanner s=new Scanner(System.in); int b,p; System.out.println("Enter base no:"); b=s.nextInt(); System.out.println("Enter power of the no:"); p=s.n...
package de.scads.gradoop_service.server.helper.clustering; import org.apache.flink.api.common.functions.MapFunction; import org.apache.flink.api.java.operators.MapOperator; import org.codehaus.jettison.json.JSONObject; import org.gradoop.common.model.impl.pojo.Edge; import org.gradoop.famer.clustering.clustering; impo...
package com.trump.auction.account.api.impl; import com.alibaba.dubbo.common.utils.StringUtils; import com.alibaba.dubbo.config.annotation.Service; import com.alibaba.fastjson.JSONObject; import com.cf.common.utils.ServiceResult; import com.google.common.collect.Lists; import com.trump.auction.account.api.AccountInfoSt...
package mx.redts.adendas.managebean; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.faces.application.FacesMessage; import javax.faces.bean.ManagedBean; import javax.faces.bean.ManagedProperty; import javax.faces.bean.ViewScoped; import javax.faces.component.UIO...
package com.miyatu.tianshixiaobai.entity; public class LimitedTimeSpikeEntity { private int photo; private String serviceName; private int currentPrice; private int originalPrice; private int soldNumber; private String time; private String state; private int isSelected; //是否被选中,0被选...
package com.revature.superhuman; import java.sql.SQLException; import java.util.List; import com.revature.dao.SuperhumanDAO; import com.revature.dao.SuperhumanDAOPostgres; import com.revature.pojo.Superhuman; public class SuperhumanService { private static SuperhumanDAO superDAO; public SuperhumanService() thr...
package com.gaoshin.amazon; import java.util.Calendar; import java.util.TimeZone; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import common.util.ref...
package com.leyton.flow.gateway; import org.springframework.integration.annotation.Gateway; import org.springframework.integration.annotation.MessagingGateway; @MessagingGateway( name = "microserviceOneGateway") public interface MicroserviceOneGateway { @Gateway( requestChannel = "httpReques...
package com.sirma.itt.javacourse.collections.task4.LRUcache; import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import java.util.Queue; import org.apache.log4j.Logger; /** * LRU implementation class. * * @param <K> * the key value for the objects...
package com.example.apprunner; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.cardview.widget.Ca...
package com.zzping.fix.mapper; import java.util.List; import com.zzping.fix.entity.FixCampus; import com.zzping.fix.entity.FixCampusCriteria; import com.zzping.fix.model.FixCampusModel; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.springframework.web.bind.annotat...
package kr.co.people_gram.app; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.text.Html; import android.util.Log; import android.view.KeyEvent; import android.view.View; import android.widget.ImageView; import ...
/** * This class is generated by jOOQ */ package schema.tables.records; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Record1; import org.jooq.Record4; import org.jooq.Row4; import org.jooq.impl.UpdatableRecordImpl; import schema.tables.StudentPendingnamechange; /** * This class is ...
package kr.co.magiclms.domain; public class Login { private String memberID; private String pass; private int studentNo; private int professorNo; public String getMemberID() { return memberID; } public void setMemberID(String memberID) { this.memberID = memberID; } public String getPass() { return pas...
package com.gxtc.huchuan.ui.deal.liuliang.publicAccount.UserAnalyse; /** * Created by Steven on 17/2/27. */ public class UserRisePresenter implements UserContract.RisePresenter{ @Override public void start() { } @Override public void destroy() { } }
package images; public class TwoColorImage extends BaseImage { private TwoDFunc func; private RGB zero,one; public TwoColorImage(int width, int height, RGB zero, RGB one, TwoDFunc func) { super(width, height); this.zero = zero; this.one = one; this.func = func; // TODO Auto-generated constructor stub ...
package com.zhaoyan.ladderball.domain.match.http; import com.zhaoyan.ladderball.domain.common.http.Response; /** * 分配比赛给记录员 */ public class MatchAsignResponse extends Response{ }
package DP; /* 343. Integer Break Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get. Example 1: Input: 2 Output: 1 Explanation: 2 = 1 + 1, 1 × 1 = 1. Example 2: Input: 10 Output: 36 Explanation: 10 =...
package com.yifengcom.yfpos.service; import android.os.Parcel; import android.os.Parcelable; public class WorkKey implements Parcelable { // TDK private byte tdkIndex = 0x00; private byte[] tdk; private byte[] tdkCheckValue; // MAK private byte makIndex = 0x00; private byte[] mak; private byte[] makCheckVal...
package engine; /** * Comparator pela data do Post * */ import java.util.Comparator; import java.time.LocalDate; public class ComparatorPostScore implements Comparator<Post>{ public int compare(Post p1, Post p2){ int s1, s2; s1 = p1.getPostScore(); s2 = p2.getPostScore(); if(s...
import java.util.Map; /** * No-repeat Substring (hard) * Given a string, find the length of the longest substring which has no repeating characters. * * 解决问题: * 从数组中查询一个连续子串 * * 窗口限制条件: * 无重复字符 * * 如何满足条件: * 窗口右移一位,如果重复,则移动windowStart移除重复项 * windowStart = Math.max(preSameCharIdnex+1, windowStart) * 如果 ...
package com.gxtc.huchuan.ui.live.hostpage.newhostpage; import com.gxtc.commlibrary.utils.ToastUtil; import com.gxtc.huchuan.MyApplication; import com.gxtc.huchuan.bean.ChatInfosBean; import com.gxtc.huchuan.http.ApiCallBack; import java.util.List; /** * Created by zzg on 2017/12/18. */ public class ClassAndSerise...
package com.tpg.brks.ms.expenses.service.converters; import com.tpg.brks.ms.expenses.domain.Expense; import com.tpg.brks.ms.expenses.persistence.entities.ExpenseEntity; import com.tpg.brks.ms.expenses.utils.DateFormatting; import org.modelmapper.Converter; import org.modelmapper.TypeMap; import java.util.Date; publi...
package com.soft1841.timer; import javax.swing.*; import java.awt.*; import java.util.Random; import java.util.Timer; import java.util.TimerTask; public class DrawCircleThread implements Runnable { private JFrame jFrame; public void setjFrame(JFrame jFrame) { this.jFrame = jFrame; } @Override ...
package com.oodles.mapping; public class URLMapping { public static final String ACCOUNTS_API_V1 ="/v1"; //USER public static final String ADD_USER = ACCOUNTS_API_V1 +"/add_user"; public static final String GET_USER = ACCOUNTS_API_V1 +"/get_user"; public static final String UPDATE_USER=ACCOUNTS_API_V1+"/updat...
/* Ara - capture species and specimen data * * Copyright (C) 2009 INBio (Instituto Nacional de Biodiversidad) * * 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 Lic...
package com.db.server; import com.db.persistence.wsSoap.ObjectCrudSvcRemote; import com.db.persistence.wsSoap.QuerySvcRemote; import com.db.persistence.wsSoap.SessionsSvcRemote; import com.plugins_manager.Plugins; import org.apache.log4j.Logger; import org.springframework.boot.CommandLineRunner; import org.springframe...
package com.zxt.compplatform.acegi.util; import java.sql.ResultSet; import java.sql.SQLException; import java.util.LinkedHashMap; import java.util.List; import javax.sql.DataSource; import org.springframework.beans.factory.FactoryBean; import org.springframework.jdbc.core.support.JdbcDaoSupport; import org.springfram...
package ru.aplana.autotests.definitions; /** * Created by User on 23.04.2015. */ public class ElementDefinition { private String parent; private String name; private String aliases; private String type; private String customType; private String target; private String description; pri...
package com.demo.bluemine.mapper; import org.springframework.stereotype.Repository; @Repository("com.demo.bluemine.mapper.RootMapper") public interface RootMapper { //test public String test(); }
package com.techboon.web.rest.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; /** * Utility class for HTTP headers creation. */ public final class HeaderUtil { private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class); private s...
package com.example.moviedb.reponsitory; import com.example.moviedb.api.WebService; import io.reactivex.Observable; import retrofit2.Retrofit; import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; import retrofit2.converter.gson.GsonConverterFactory; public class Repository { private WebService service; ...
package com.lenovohit.ssm.app.community.model; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import org.hibernate.annotations.NotFound; import org.hibernate.annotations.NotFoundAction; import com.lenovohit.core.model.BaseIdMo...
package br.com.transactions.filter; public class JPAFilterBeanFactory { public JPAFilter getInstance() { return new JPADefaultFilter(); } }
package model.DAO; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import model.DBConnection.DBConnection; import model.object.Language; import model.object.Type; public class TypeDAO { public static List<Type> getListT...
package io.breen.socrates.test; import io.breen.socrates.criteria.Criteria; import io.breen.socrates.file.File; import io.breen.socrates.submission.Submission; import io.breen.socrates.submission.SubmittedFile; import javax.swing.text.Document; /** * An interface implemented by any test whose running can be automat...
package com.cbs.edu.eshop.service; import com.cbs.edu.eshop.dto.request.UserCreationRequestDto; import com.cbs.edu.eshop.entity.Role; import com.cbs.edu.eshop.entity.User; import com.cbs.edu.eshop.repository.IRoleRepository; import com.cbs.edu.eshop.repository.IUserRepository; import org.springframework.beans.factory....
package paketmalimslovima; import java.util.Scanner; //a) Napisati program koji ce sabrati brojeve od 1 do 5. Program treba da ispise zbir. //b) Napisati program koji ce sabrati sve brojeve od 1 do n (n uneti preko konzole). Program treba da ispise zbir. //c) Napisati program sabrati sve brojeve od k do n (k i...
/** * Sencha GXT 1.0.0-SNAPSHOT - Sencha for GWT * Copyright (c) 2006-2018, Sencha Inc. * * licensing@sencha.com * http://www.sencha.com/products/gxt/license/ * * ================================================================================ * Commercial License * ============================================...
package com.zantong.mobilecttx.user.bean; import java.util.List; /** * Created by zhengyingbing on 16/6/1. * 消息类别返回实体对象 */ public class MessageBean { private List<Meg> messageDetailList; public void setMessageDetailList(List<Meg> messageDetailList) { this.messageDetailList = messageDetailList; ...
import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int m = sc.nextInt(); sc.nextLine(); String[] path = new String[n]; String[] name = new String[n]; for (i...
package com.atguigu.exer2; /* 冒泡排序 : 必须会手写 */ public class BubbleSort { public static void main(String[] args) { int[] numbers = {10,2,89,39,16}; //外层循环控制比较几轮 for (int i = 0; i < numbers.length - 1; i++) { //内层循环控制每轮的次数 for (int j = 0; j < numbers.length - i - 1; j++) { //比较 if(...
package test.java.cardprefixlist; import org.junit.Test; import test.java.cardprefixlist.exceptions.CrossingRangeException; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import static org.junit.Assert.*; public class RangeTest { @Test public void test...
package com.seven.contract.manage.service.impl; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.seven.contract.manage.common.PageResult; import com.seven.contract.manage.dao.MessageDao; import com.seven.contract.manage.model.Message; import com.seven.contract.manage.service.Messa...
package Controllers; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView; ...
package com.mqld.dao.impl; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.List; import javax.sql.DataSource; import org.apache.log4j.Logger; import org...
/* * 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.alexander.mainstuff.entities; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persi...
/* * Created by Angel Leon (@gubatron), Alden Torres (aldenml) * Copyright (c) 2011-2014, FrostWire(R). All rights reserved. * * 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 versio...
package com.darg.NLPOperations.sentimentalAnalysis.test; import static org.junit.Assert.*; import org.junit.Test; import java.util.ArrayList; import org.junit.BeforeClass; import com.darg.NLPOperations.dictionary.SentiWordNetDictionary; import com.darg.NLPOperations.dictionary.WordNetDictionary; import com.darg.NL...
import DataStorageLayer.DAOAccount; import DataStorageLayer.DatabaseConnection; import org.junit.jupiter.api.Test; import java.sql.ResultSet; import java.sql.SQLException; import static DataStorageLayer.DAOAccount.ACCOUNT_ID; import static org.junit.jupiter.api.Assertions.assertTrue; public class DAO_Account_Test { ...
package com.mercadolibre.bootcampmelifrescos.exceptions.api; import org.springframework.http.HttpStatus; public class NotFoundApiException extends ApiException { private final static String CODE = "NOT_FOUND"; private final static Integer STATUS_CODE = HttpStatus.NOT_FOUND.value(); public NotFoundApiExc...
package com.android.albumslist; import com.android.albumslist.adapter.AlbumsAdapter; import com.android.albumslist.api.Api; import com.android.albumslist.api.Client; import com.android.albumslist.model.Album; import com.android.albumslist.view.AlbumsListActivity; import org.junit.Before; import org.junit.Test; import...
package com.mobile.mobilehardware.simcard; import android.Manifest; import android.annotation.SuppressLint; import android.content.Context; import android.content.pm.PackageManager; import android.support.v4.content.ContextCompat; import android.telephony.SubscriptionInfo; import android.telephony.SubscriptionManager;...
package de.julianpadawan.timelog.insight; import de.julianpadawan.timelog.model.Goal; import de.julianpadawan.timelog.model.LogEntry; import java.time.DayOfWeek; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.temporal.TemporalAdjusters; public final class WeekStreakCalculator extends Du...
package edu.westga.gradeunt; public interface GradeCategorySummary extends Summarizable { /** * Specifies the format of data returned by a GradeSummary. Effectively the same information as the * corresponding GradeItem, except: * <ol> * <li>description is the name of the test if the corresponding GradeItem's...
package be.openclinic.statistics; import be.mxs.common.util.db.MedwanQuery; import be.mxs.common.util.system.ScreenHelper; import be.mxs.common.util.system.StatFunctions; import be.openclinic.common.KeyValue; import be.openclinic.statistics.DepartmentIncome.Income; import java.text.SimpleDateFormat; import java.util.C...
package com.nit.action; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; impo...
/* * Written by Erhan Sezerer * Contact <erhansezerer@iyte.edu.tr> for comments and bug reports * * Copyright (C) 2014 Erhan Sezerer * 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, ...
package de.refugium.meta.extraUtils.utilities; import java.io.File; import java.io.IOException; import java.util.HashMap; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.command.Command; import org.bukkit.command.CommandSender...
/* * 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 Filme.dao; import Filme.model.Filme; import cliente.dao.DataBaseConnection; import java.sql.Connection; import java.sql.Prepar...
/* * Copyright 2002-2022 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...
package com.example.hahademo; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.webkit.WebView; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import co...
package network.nerve.dex.util; import io.nuls.base.basic.AddressTool; import io.nuls.base.data.CoinData; import io.nuls.base.data.CoinFrom; import io.nuls.base.data.CoinTo; import io.nuls.base.data.NulsHash; import io.nuls.core.crypto.HexUtil; import io.nuls.core.exception.NulsRuntimeException; import io.nuls.core.ro...
package dwz.common.util.ip; /** * @Author: LCF * @Date: 2020/1/8 15:35 * @Package: dwz.common.util.ip */ public class IpRangeUtils { private static final String REGX_IP = "((25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)\\.){3}(25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)"; private static final String REGX_IPB = REG...
package com.mountblue.kbrshoppingsite.model; import org.hibernate.annotations.Formula; import javax.persistence.*; @Entity @Table(name = "stocks") public class Stock { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "stock_id") private long id; @OneToOne(targetEntity = Pro...
package packageclass; public class Bai5 { public static void main(String[] args) { int a=2; System.out.println("Bảng Cửu Chương 2"); for (int i=1; i<=10 ; i++) { System.out.println(a + " x " + i + " = " + a*i); if (i==10) { a++; i=0; if (a==11) { break; } System.out.println("Bảng...
package Teatrus.model; import java.io.Serializable; public class Pozitie implements Serializable { private int rand,coloana; public Pozitie(int rand, int coloana) { this.rand = rand; this.coloana = coloana; } public int getRand() { return rand; } public void setRand(...
//---------------------------------------------------- // The following code was generated by CUP v0.11b 20160615 (GIT 4ac7450) //---------------------------------------------------- /** CUP generated class containing symbol constants. */ public class sym { /* terminals */ public static final int _new = 13; pub...
package com.lifeix.football.games.module.competition.service; import java.util.List; import com.lifeix.football.games.model.MatchTeam; public interface MatchTeamService { public List<MatchTeam> findMatchTeams(Long competitionId, Long teamId); public MatchTeam findMatchTeam(Long matchTeamId); }
package by.orion.onlinertasks.data.datasource.profiles.local; import android.support.annotation.NonNull; import com.pushtorefresh.storio.sqlite.StorIOSQLite; import javax.inject.Inject; import by.orion.onlinertasks.data.datasource.profiles.ProfilesDataSource; import by.orion.onlinertasks.data.models.common.requests...
package com.game; public class Player { private String name; private Disc[] discs; private int playId = 0; private boolean isMyTurn = true; public Player(int count, String color) { discs = new Disc[count]; for (int i = 0; i < count; i++) { discs[i] = new Disc(color); } } public boolean play(boolean...
package com.vincent.algorithm.misc; import java.util.concurrent.atomic.AtomicInteger; /** * 交替打印0和1 ,美团面试题 */ public class PrintOneAndZero { public static void main(String[] args) { method1(); } /** * 思路: * 1.要交替打印,那么肯定是死循环 * 2.线程1要输出1后,线程2才能输出0.那意味着线程之间肯定有线程同步,需要使用一个共享变量去判断 ...
package com.baby.babygrowthrecord.user; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.TextView; import com.baby.babygrowthrecord.R; /** * Created by think on 2016/11/22. */ public class UserSetting extends Activity { priva...
package app; import core.framework.module.App; import core.framework.module.SystemModule; /** * @author neo */ public class DemoServiceApp extends App { @Override protected void initialize() { http().httpsPort(8443); load(new SystemModule("sys.properties")); http().httpPort(8081); ...
package DataStructures.string; public class Atoi { /** * Input: "2147483648" Output: -2147483648 Expected: 2147483647 " 010" --> 10 */ public int atoi(String str) { if (str == null || str.length() < 1) return 0; str = str.trim(); double r...
package com.sims.bo.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.sims.bo.PatientBillPaymentBo; import com.sims.dao.PatientBillPaymentDao; import com.sims.model.Pat...
package f.star.iota.milk.ui.mm8mm88.mm8mm; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.ViewGroup; import f.star.iota.milk.R; import f.star.iota.milk.base.BaseAdapter; public class MM8MMAdapter extends BaseAdapter<MM8MMViewHolder, MM8MMBean> { @Override...
package com.lyj.test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** * @author yingjie.lu * @version 1.0 * @date 2020/1/6 3:56 下午 */ @Component public class IndexBean { @Autowired UserBean userBean; }
/** * Created by becky on 9/5/17. */ public class longestPalindrom { public static String longestPalindrome(String s) { if(s == null || s.length() < 2) return s; char[] chars = s.toCharArray(); int len = s.length(); while (len >= 0) { for (int i = 0; i + len - 1 < char...
package decisao; import javax.swing.JOptionPane; public class DecisaoSimples { public static void main(String[] args) { // TODO Auto-generated method stub String materia = JOptionPane.showInputDialog("Materia"); float nota1 = Float.parseFloat(JOptionPane.showInputDialog("nota1")); float nota2 = Float...
package cn.android.support.v7.lib.sin.crown.widget; import android.content.Context; import android.graphics.Rect; import android.support.annotation.NonNull; import android.support.v4.widget.NestedScrollView; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view...
package view; import controller.Features; import image.Image; /** * Represents the operations that a multi-layer image processing GUI view has such as being able * to add features from the Feature interface to the view. */ public interface ImageProcessingGUIView { /** * Adds all the features in the given fea...
package Validators; import javax.swing.JOptionPane; public class DateValidator implements Validator<String> { public void validate(String date) { if (!date.matches("^[0-9]{4}\\-[0-9]{2}\\-[0-9]{2}$")) { // match numbers String message = "Wrong date format"; JOptionPane.showMessageDialog(null,...
package com.edasaki.rpg.commands.owner; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import com.edasaki.core.utils.RMessages; import com.edasaki.core.utils.RScheduler; import com.edasaki.core.utils.RTicks; import com.edasaki.rpg.Playe...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class bj1003 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int T = Integer.parseInt(br.readLine()); ...
package za.ac.ngosa.domain; import javax.persistence.Entity; import java.io.Serializable; /** * Created by User on 2015/08/10. */ @Entity public class TVShow extends Showing implements Serializable{ private String episode; private String season; private TVShow(){} public String getEpisode() {...
package com.bestseller.controller; 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.http.converter.json.MappingJacksonValue; import org.springframework.stereotype.Controller;...
package by.academy.homework.homework6.Task3; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.List; public class Application { public static void main(String[] args) { List<User> arrayList = n...
package com.accolite.au.mappers; import com.accolite.au.dto.TrainerDTO; import com.accolite.au.models.Trainer; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import java.util.List; import java.util.Set; @Mapper(componentModel = "spring") public interface TrainerMapper { @Mapping(source = "traine...
package com.pjb.springbootjjwt.service; import com.auth0.jwt.JWT; import com.auth0.jwt.algorithms.Algorithm; import com.pjb.springbootjjwt.entity.Device; import com.pjb.springbootjjwt.entity.User; import org.springframework.stereotype.Service; /** * @author jinbin * @date 2018-07-08 21:04 */ @Service("TokenServic...
package com.psl.training; import java.util.Scanner; public class CalculatePayback { static Scanner scan = new Scanner (System.in); static double calPayback(double amount) { double pb; if(amount<=500){ pb=(amount/100)*0.25; } else{ pb=(500/100)*0.25; amount=amount-500; if(amount<=1000){ pb=pb...
package com.duanc.web.controller; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; ...
package com.zimu.ao.state; import org.newdawn.slick.AppGameContainer; import org.newdawn.slick.GameContainer; import org.newdawn.slick.SlickException; import org.newdawn.slick.state.StateBasedGame; import com.zimu.ao.controller.GameProcessController; import com.zimu.ao.enums.GameState; /** * 游戏主类,初始化每个游戏地图的窗口 * @a...
import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.rmi.Naming; import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.rmi.server.UnicastRemoteObject; import java.securit...
package homework1; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class ToBinaryStringTest { Home1_7 obj = new Home1_7(); @Test public void toBinaryStringTest(){ Assertions.assertEquals("00001111", obj.toBinaryString((byte) 15)); Asser...
package cz.muni.fi.pa165.monsterslayers.service; import cz.muni.fi.pa165.monsterslayers.dao.ClientRequestRepository; import cz.muni.fi.pa165.monsterslayers.entities.ClientRequest; import cz.muni.fi.pa165.monsterslayers.entities.User; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.j...
/* * 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 test; import javax.swing.*; import java.awt.*; import java.awt.event.*; import javax.swing.text.*; /** * * @author hugo */ p...