text
stringlengths
10
2.72M
package com.test.shortest; import java.util.List; class HeapUtils { /** * .从下至上,堆化 * .默认堆化到第一个 * @param dataList 数组 * @param lastIndex 不满足堆化的index[开始的index] * @param isMinTop true(小顶堆),false(大顶堆) */ static <T extends Comparable<T>> void heapifyUp(List<T> dataList, int lastIndex, ...
public class Blob extends File { private String m_Content; /*stam comment*\ @Override public String MakeSH1() { return GetSH1FromContent(m_Content); } }
package pl.morecraft.dev.datagrammer.commands; import pl.morecraft.dev.datagrammer.engine.Command; import pl.morecraft.dev.datagrammer.misc.Consoler; import java.net.DatagramSocket; import java.net.InetAddress; import java.net.SocketException; import java.net.UnknownHostException; import java.util.Objects; public cl...
//good job! //using a complete sum minus a real sum is the missing number public class Solution { public int missingNumber(int[] nums) { int sum = ((nums.length + 1) * nums.length) >> 1; int realSum = 0; for (int i = 0; i < nums.length; i++) { realSum += nums[i]; ...
package edu.ncsu.csc.itrust2.apitest; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static or...
package javaBasics; public class arrayConcept { public static void main(String[] arg) { // Array: to store similar data type values in a Array // int Array // Size is Fixed - Static Array - To over come this - we use Collections - ArrayList, HashTable, Dynamic Array int i[] = new int[4]; // S...
//Author: Ayrton Pereira //Date: 22/04/2020 //Objective: Use aritmetric operation package cap5aritmetric; public class Aritmetric_class { public static void main(String[] args) { int a = 20, b = 30, c = 2, d = 6; float z = 30.9f, y = 5.5f, x = 6.6f; System.out.println("--- Values ---"); System.out.println(...
package com.baway.fuzhiyan.fuzhiyan20170728; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ListView; import android.widget.Toast; import com.google.gson.Gson; import org.xutils.common.Callback;...
import java.util.ArrayList; import java.util.Arrays; import java.util.Deque; /* * @lc app=leetcode.cn id=113 lang=java * * [113] 路径总和 II */ import java.util.List; // @lc code=start /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * ...
import fenestra.Palette; import javax.swing.*; import java.awt.*; /** * zamma on 3/31/18. */ public class MessageBox extends JPanel { public MessageBox(String nickName, String date, String message, boolean isItself) { JPanel jpnlNickDate = new JPanel(new BorderLayout()); JLabel jlblNick = new JL...
/* 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 heylichen.divideconquer; import org.junit.Test; public class LinearMaxSubarrayTest { @Test public void name() { LinearMaxSubarray maxSubarray = new LinearMaxSubarray(createDailyPrices()); MaxSubarraySolution solution = maxSubarray.calculate(); System.out.println(solution); ...
/* * Copyright 2019 The Android Open Source 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 * * Unless required by applica...
/** * Copyright 2009 The European Bioinformatics Institute, and others. * * 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 ...
package exceptionprograms; public class ErrorTest { public static void main( String[] args ) { try{ System.out.println("Error test"); throw new Error("imtiaz"); /* because errors are unchecked*/ }catch( Error e){ { System.out.println(e.ge...
package Problem_10699; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; public class Main { public static void main(String[] args) { LocalDateTime utcDateTime = LocalDateTime.now(ZoneId.of("UTC+00:00")); Zoned...
package org.giddap.dreamfactory.codeforces; import java.io.PrintWriter; import java.util.Scanner; /** * Implementing 'ceiling of a / b' by using '(a + b - 1) / b' */ public class P001aTheatreSquare implements Runnable { public static void main(String[] args) { new Thread(new P001aTheatreSquare()).start...
package com.example.Backend.Dao; import com.example.Backend.Model.Comment; import com.example.Backend.Model.User; import java.util.List; import java.util.Optional; import java.util.UUID; public interface UserDao { int insertUser(UUID id, User user); default int insertUser(User user){ UUID id = UUID...
package kr.co.shop.constant; import kr.co.shop.common.util.UtilsText; public interface MappersPayment { // 교환 매출 처리(30분마다) String OC_PAYMENT_DAO = "kr.co.shop.batch.payment.repository.master.OcOrderPaymentDao"; String OC_PAYMENT_DAO_SELECT_OCCART_COUNT = UtilsText.concat(OC_PAYMENT_DAO, ".", "selectNewCha...
package com.sunrj.application.System.Service.impl.Department; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.sunrj.application.System.Service.Department.SysDepartmentService; import com.sunrj.application.System.dao.Depar...
import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import java.util.ArrayList; import java.util.List; import static java.util.Arrays.asList; /** * Created by Daniel on 12-Jan-17. */ public class SpiralMatrixTest { private static SpiralMatrix sut; @BeforeClass public static...
package com.marijannovak.littletanks; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.math.Intersector; import java.util.ArrayList; /** * Created by marij on 30.3.2017.. */ class Enemy extends MovingUnit { public Enemy(Texture texture) { super(texture); } public int isShot(...
package Level1; import java.util.Scanner; public class Test15 { /* * 문제 두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오. 입력 첫째 줄에 테스트 케이스의 개수 T가 주어진다. 각 테스트 케이스는 한 줄로 이루어져 있으며, 각 줄에 A와 B가 주어진다. (0 < A, B < 10) 출력 각 테스트 케이스마다 "Case #x: "를 출력한 다음, A+B를 출력한다. 테스트 케이스 번호는 1부터 시작한다. */ public stati...
package io.chark.food.app.moderate.thread; import io.chark.food.app.account.AccountService; import io.chark.food.app.administrate.audit.AuditService; import io.chark.food.app.thread.ThreadService; import io.chark.food.domain.thread.Thread; import io.chark.food.domain.thread.ThreadRepository; import io.chark.food.util....
package collections; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import java.util.SortedSet; import java.util.TreeSet; public class Test_HashSet { public static void main...
/** * This Problem Set focused on manipulating Arrays and ArrayLists, in addition * to practicing more complex algorithms. Through this lab, I not only learned * the basic commands with ArrayLists, but I also learned how to use them effectively, * as they can a changeable capacity. There were also many problems related...
package ua.training.constant; /** * Description: This is list of regular expressions * * @author Zakusylo Pavlo */ public interface RegexExpress { String LANG_PAGE = "/swft/[A-Za-z]{2,}"; String REDIRECT_PAGE = ".*/swft/"; String USER_NAME_US = "^[A-Z][a-z]+$"; String USER_NAME_US2 = "^[A-Z][a-z]+...
package wc; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; /** * The Class ProcessRawTwitter. */ public class ProcessRawTwitter { /** * The main method. * * @param args the arguments * @throws IOException Signals that ...
package com.badawy.carservice.adapters; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.badawy.carservice.R; im...
package com.metoo.manage.admin.action; import java.io.IOException; import java.io.PrintWriter; import java.lang.reflect.Field; import java.text.ParseException; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; ...
package test.innerclass; import java.util.ArrayList; import java.util.Arrays; public class test1 { public static void main(String[] args) { // OutClass outClass = new OutClass(); // OutClass2 outClass2 = new OutClass2(); // // OutClass.InnerClass innerClass = outClass.new InnerClass(); // /...
package edu.uab.cvc.huntingwords.screens.fragments; import android.app.Fragment; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import androi...
package org.giddap.dreamfactory.leetcode.onlinejudge.implementations; import org.giddap.dreamfactory.leetcode.commons.ListNode; import org.giddap.dreamfactory.leetcode.onlinejudge.MergeTwoSortedLists; public class MergeTwoSortedListsIterativeImpl implements MergeTwoSortedLists { @Override public ListNode merg...
package view.insuranceSystemView.rewardView.lawyer; import java.awt.Color; import java.awt.event.ActionListener; import model.data.employeeData.rewardEmployeeData.LawyerData; import model.data.rewardData.AccidentData; import model.data.rewardData.AccidentInvestigationData; import model.data.rewardData.LossCheckData; ...
package tasks; import java.io.File; import java.util.List; import org.apache.commons.cli.BasicParser; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; import queue.Queue; import queue.TextQ...
package model; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Klasse für die Verwaltung der importi...
package com.example.devansh.personalhealthcarechatbot; import android.content.Context; import android.content.SharedPreferences; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.TextView; public class LogIn extends AppC...
package com.lenovohit.ssm.base.model; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; import com.lenovohit.core.model.BaseIdModel; /** * 出库明细 * @author wang * */ @Entity @Table(name="SSM_MATERIAL_DETAIL_OUT") public class M...
package dproxy; /** * Created by whatisjava on 17-9-15. */ public class AdminServiceImpl implements AdminService { public void addAdmin() { System.out.println("add admin action..."); } }
package coffeshop.business.concretes; import coffeshop.business.abstracts.CustomerService; import coffeshop.entities.concretes.Customer; public class BaseCustomerManager implements CustomerService { public void register(Customer customer) { System.out.println("Müşteri kaydedildi: " + customer.getCustomerFirstNa...
package slimeknights.tconstruct.library.capability.piggyback; import net.minecraft.nbt.NBTBase; import net.minecraft.util.EnumFacing; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityInject; import net.minecraftforge.common.capabilities.CapabilityManager...
package com.example.microgram.service; import com.example.microgram.dto.UserDTO; import com.example.microgram.exception.ResourceNotFoundException; import com.example.microgram.model.Publication; import com.example.microgram.model.User; import com.example.microgram.repository.PublicationRepository; import com.example.m...
package blog.dreamland.com.dao; import blog.dreamland.com.entity.LoginLog; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Result; import org.apache.ibatis.annotations.Results; import org.apache.ibatis.annotations.Select; import tk.mybatis.mapper.common.Mapper; public interface LoginL...
/* * Copyright 2002-2020 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 TestCity; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import City.City; import City.Inhabitant; import Content.TextContent; import Letters.Letter; import Letters.SimpleLetter; /** * Tests for Inhabitant * * @author Alex Dalencourt * @author Sellenia Chikhoune * ...
package com.gsccs.sme.plat.shop.model; import java.util.Date; public class OrderitemT { private String id; private Long orderid; private Long productid; private Long goodsid; private Integer num; private Float price; private Float totalfee; private String buyerid; private String sellerid; private Date addti...
package com.example.onemap; import java.util.Locale; public class Layer { private String id; private String layerName; private int layerSize; private String lDesc; private String display; private String createAt; public Layer() { } public Layer(String layerName, int layerSize,String desciption, String d...
package co.company.spring.controller; import lombok.Data; @Data public class SlipVO { String slipAmount; String salDt; String customer; String bankAcct; }
package com.xinyuf.activity; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import andro...
package com.wangzhu.jms; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.TextMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MyMessageListener implements MessageListener { private static final Logger logger = LoggerFactory ...
package com.angular.angular.entity; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import javax.persistence.*; import java.io.Serializable; import java.util.UUID; @Setter @Getter @NoArgsConstructor @Entity(name = "ProductEntity") @Table(name = "products") public class ProductEntity impl...
package com.yc.education.mapper.stock; import com.yc.education.model.stock.StockOutSale; import com.yc.education.util.MyMapper; import org.apache.ibatis.annotations.Param; import java.util.List; public interface StockOutSaleMapper extends MyMapper<StockOutSale> { /** * @Author BlueSky * @Description...
package com.zantong.mobilecttx.card.activity; import android.content.Context; import android.content.Intent; import android.text.Html; import android.text.TextUtils; import android.view.View; import android.view.Window; import android.widget.Button; import android.widget.CompoundButton; import android.widget.EditText;...
package com.shawnsrecords.demo.controllers; import com.shawnsrecords.demo.entities.Album; import com.shawnsrecords.demo.storage.AlbumStorage; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestContro...
package com.java.method; public class Boy { static Boy obj = new Boy(); public static void main(String[] args) { Human.walk(); obj.talking(); } public void talking() { System.out.println("Boy is talking"); } }
package com.grandsea.ticketvendingapplication.view; import android.content.Context; import android.os.Handler; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.LinearLayout; import android.widget.TextView; import com.gran...
package interpreter.exceptions; public class UndefinedIdentifierException extends Throwable { }
package es.unileon.xijoja.hospital.login; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.io.IOException; import java.sql.SQLException; import javax.swing...
package com.sirma.itt.javacourse.test.intro.task5.arrayReverse; import static org.junit.Assert.assertEquals; import java.util.ArrayList; import java.util.Arrays; import org.junit.Test; import com.sirma.itt.javacourse.intro.task5.arrayReverse.ReverseArray; /** * Unit test class for ReverseArray. * * @author sim...
import java.util.Arrays; public class fifth { public static void find_common_elements(char[] arr1,char[] arr2){ char[] result_arr; if(arr1.length<arr2.length) { result_arr=new char[arr1.length]; } else{ result_arr=new char[arr2.length]; } ...
package com.wen.test.controller; import com.wen.test.model.Users; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import java.util.ArrayList; import java.util....
public class BuyingTshirts { public int meet(int T, int[] Q, int[] P) { int count = 0; int qMoney = 0; int pMoney = 0; for(int i = 0; i < Q.length; ++i) { qMoney += Q[i]; pMoney += P[i]; if(T <= qMoney) { qMoney -= T; ...
package com.codigo.smartstore.sdk.core.metrics.mass; import com.codigo.smartstore.sdk.core.metrics.IMetricDimension; import com.codigo.smartstore.sdk.core.metrics.IMetricUnit; public class MetricUnitMass implements IMetricUnit { /** * Gets the metric unit. * * @return the metric unit */ @Override public ...
package cshekhar.springboot.Rules; import cshekhar.springboot.DAO.AlertDao; import cshekhar.springboot.model.Alert; import cshekhar.springboot.model.Metric; import org.easyrules.annotation.Rule; import org.easyrules.annotation.Action; import org.easyrules.annotation.Condition; import org.springframework.beans.factory....
import org.junit.Test; import static org.junit.Assert.*; public class OdcinekTest { @Test public void OdcinekTest() { Punkt punkt1 = new Punkt(1.0, 1.0); Odcinek odcinek = new Odcinek(punkt1, 3.0, 1.0); assertEquals(odcinek.getPunkt2().getX(), 3.0, 0.001 ); } @Test public ...
package com.sshfortress.service.init; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import com.sshfortress.dao.system.mapper.SysConfigMapper; public class SysConfig { Logger log=Log...
package com.jpa.study.project.dto; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; /** * Created by yongyeonkim on 2017. 2. 19.. */ @Data @AllArgsConstructor @NoArgsConstructor public class MemberListDTO { private Long number; private String userId; private String ...
package edu.uiowa.icts.util; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.StringWriter; import java.util.ArrayList; import java.util.Arrays; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.Ostermiller.util.ExcelCSVPrinter; ...
package com.nepshop.controller; import com.nepshop.dao.OrderDAO; import com.nepshop.model.Order; import com.nepshop.model.OrderedProduct; import com.nepshop.model.Customer; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.h...
package com.itheima.day_02.homework.feeder; public interface Swimming { public abstract void swim(); }
import java.util.*; import java.io.*; class Main { public static void main (String[] args) { Scanner sc=new Scanner(System.in); while(sc.hasNext()) { int k=sc.nextInt(),c=0; for(int i=k+1;i<=2*k;i++) { if((i*k)%(i-k)==0) c++; } System.out.println(c); ...
package com.bs.guestbook.Controller; import javax.servlet.http.HttpServletRequest; import com.bs.guestbook.dao.Factory; import com.bs.guestbook.entity.Customer; import com.bs.guestbook.jsonview.Views; import com.bs.guestbook.model.AjaxResponseBody; import com.bs.guestbook.model.SearchCriteria; import com.fasterxml.ja...
/* * 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 Codigo1Calculadora; import javafx.application.Application; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.TextFiel...
package com.adi.ho.jackie.versa_news.Youtube; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.AdapterView; ...
package com.slavyanin.example.less3_floatingactionbutton; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.ArrayAdapter; import android.widget.ListView; import com.melnykov.fab.FloatingActionButton; public class MainActivity extends AppCompatActivity { @Override ...
package com.hardcoded.plugin.tracer; import java.util.ArrayList; import java.util.List; import com.hardcoded.plugin.ScrapMechanicPlugin; import com.hardcoded.plugin.utils.DataUtils; import ghidra.program.model.address.Address; import ghidra.program.model.listing.Program; import ghidra.program.model.mem.Mem...
import java.util. Scanner; public class Question{ public static void main(String[] args){ Scanner input = new Scanner(System.in); System.out.println("Enter first number"); int firstNumber = input.nextInt(); System.out.println("Enter the second number"); int secondNumber = input.nextInt(); System.out.prin...
/*Problem Statement: Write a program to create a rectangular array containing a multiplication table from 1*1 up to 12*12. Output the table as 13 columns with the numeric values right-aligned in columns. (The first line of output will be the column headings, the first column with no heading, then the numbers 1 to 12 fo...
package com.hfjy.framework.database.base; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.Driver; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import java.util.Iterator; import java.util.Queue; import java.util.concurrent.ConcurrentLink...
package gameView; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import gameController.ObservedGame; public class RollDieHandler implements ActionListener { ObservedGame gc; public RollDieHandler(ObservedGame game) { gc = game; } public void actionPerformed(ActionEvent arg0) ...
package org.testing.testScript; // Login - Video Play- Comment Post 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; public class TC_7 { ...
package com.adt.guakebao.server.business; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.StringWriter; import java.util.List; import org.dom4j.Document; import org.dom4j.DocumentHelper; import org.dom4j.Element; import org.dom4j.io.OutputFormat; import org.dom4j.io.XMLWrite...
package test.unit.org.testinfected.molecule.middlewares; import org.jmock.Expectations; import org.jmock.Mockery; import org.jmock.integration.junit4.JMock; import org.jmock.integration.junit4.JUnit4Mockery; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.testinfected.molecu...
package com.mingrisoft.generic; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.List; import org.apache.commons.dbutils.DbUtils; import org.apache.commons.dbutils.QueryRunner; import org.apache.commons.dbutils.handlers.BeanListHandler; public class GenericQuer...
package businesslogic.promotionbl.HotelPromotion; import util.HotelPromotionType; import vo.HotelPromotionVO.HotelMultiRoomsPromotionVO; import vo.OrderVO; /** * Created by Qin Liu on 2016/12/10. */ public class HotelMultiRoomsPromotion extends HotelPromotion { private OrderVO orderVO; private HotelMultiR...
package People; public class Family { private Person[] ourFamily; private int numberOfFamily = 0; Family(int size) { ourFamily = new Person[size]; } void addPerson(Person p) { System.out.println("Attempting to add " + p); if(numberOfFamily >= ourFamily.length) { System.out.println("Family is ...
package com.gome.manager.service.impl; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.gome.manager...
package com.metoo.foundation.service.impl; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.metoo.core.dao.IGenericDAO; import com.metoo.core.query.Gene...
package Example2; /** * 生产者——消费者 * @author yudong * @create 2019-11-07 19:22 */ public class ProducerConsumerSolution { public static void main(String[] args) { Product product = new Product(); Thread producer = new Thread(new Producer(product)); Thread consumer = new Thread(new Consu...
package com.stk123.service.task; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; @Getter @Setter @AllArgsConstructor public class TaskBuilder { private Class task; private String[] args; public static TaskBuilder of(Class cls, String... args){ return new TaskBuilder...
package org.example; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; public class CuentaCorrienteTest { CuentaCorriente cc1;...
package io.github.seregaslm.jsonapi.simple.response; import io.github.seregaslm.jsonapi.simple.annotation.RequestJsonApiFieldSet; import io.github.seregaslm.jsonapi.simple.request.FieldSet; import io.github.seregaslm.jsonapi.simple.resolver.JsonApiSpreadFieldSetArgumentResolver; import lombok.NonNull; import org.junit...
public class Solution { public List<List<Integer>> allTriples(int[] array, int target) { List<List<Integer>> list = new ArrayList<>(); if (array == null) { return list; } Arrays.sort(array); for (int i = 0; i < array.length - 2; i++) { if (i > 0 && array[i] == array[i - 1]) { c...
package com.kwik.repositories.product.dao; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.Query; import br.com.caelum.vraptor.ioc.Component; import com.kwik.models.Product; import com.kwik.repositories.product.ProductRepository; @Component public class ProductDao implements...
/** * Copyright 2015 www.codereligion.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 applicable law or agre...
package com.lsm.springboot.service.impl; import com.lsm.springboot.BaseTest; import com.lsm.springboot.config.RabbitMQConfig; import com.lsm.springboot.service.ISenderService; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import java.util.Date; import java.util.HashMap; import ...
package com.myxh.developernews.ui.activity; import android.content.Intent; import android.os.Bundle; import android.provider.Settings; import android.support.v7.app.AlertDialog; import android.view.animation.Animation; import android.view.animation.ScaleAnimation; import android.widget.ImageView; import com.myxh.deve...
package com.uav.rof.activity; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ImageView; import android.widget.ListView; import android.widget.Toast; import com.rof.uav.adpater....
package com.example.derrick.p03_classjournal; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import java.util.ArrayList; public c...