text stringlengths 10 2.72M |
|---|
package test.nz.org.take.compiler.scenario0;
import static org.junit.Assert.*;
import java.util.Iterator;
import org.junit.Test;
import test.nz.org.take.compiler.scenario0.generatedclasses.KB;
import test.nz.org.take.compiler.scenario0.generatedclasses.son;
public class Tests {
@Test
public void test1() throws ... |
package frameworksamples;
import graphana.MainControl;
import graphana.script.GraphanaDefaultScriptSystem;
import graphana.script.bindings.GraphanaScriptSystemInterface;
import view.userinterfaces.ConsoleInteraction;
public class ScriptMain {
public static void main(String[] args) {
ConsoleInte... |
package com.tencent.mm.pluginsdk.g.a.a;
import com.tencent.mm.kernel.g;
import com.tencent.mm.sdk.platformtools.bi;
import com.tencent.mm.storage.aa.a;
final class p {
static void atx() {
g.Eh().dpP.a(new m(), 0);
if (g.Eg().Dx()) {
g.Ei().DT().a(a.sRH, Long.valueOf(bi.VE() + 86400));
... |
package lexer;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.nio.charset.Charset;
import errors.EndOfFileException;
import interpretator... |
package com.tencent.mm.plugin.wallet.balance.a.a;
import com.tencent.mm.ab.a$a;
import com.tencent.mm.plugin.report.service.h;
import com.tencent.mm.protocal.c.bdm;
import com.tencent.mm.sdk.platformtools.x;
import com.tencent.mm.vending.c.a;
import com.tencent.mm.vending.g.b;
class m$2 implements a<Void, a$a<bdm>> {... |
package pers.jim.app.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.a... |
package com.smxknife.softmarket.util;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.io.InputStream;
import java.security.MessageDigest;
import java.security.N... |
package com.igitras.codegen.common.next.processors;
import com.igitras.codegen.common.next.CgElement;
import com.igitras.codegen.common.next.ResolveState;
import com.igitras.codegen.common.next.annotations.NotNull;
/**
* Created by mason on 1/5/15.
*/
public interface CgScopeProcessor {
interface Event {
... |
package com.rickyluu.locker;
public class App extends TimerRunner{
boolean running = false;
public App() throws InterruptedException {
System.out.println("Proccess ID " +Kernel32.getProccessID(Kernel32.GetCurrentProcessHandle()));
System.out.println("SET CPU ussage to 1" +Kernel32.setProccessAffinit... |
/**
* Coppyright (C) 2020 Luvina
* MstJapanLogics.java, Nov 17, 2020, BuiTienDung
*/
package Manageruser.logics;
import java.util.List;
import Manageruser.entities.MstJapanEntities;
/**
* @author LA-PM
*
*/
public interface MstJapanLogics {
public List<MstJapanEntities> getAllMstJapan();
}
|
package com.penzias.controller;
import java.io.IOException;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.stereotype.Control... |
package com.sixmac.service;
import com.sixmac.entity.Team;
import com.sixmac.service.common.ICommonService;
import org.springframework.data.domain.Page;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* Created by Administrator on 2016/5/18 0018 上午 9:55.
*/
public in... |
package net.sf.ardengine.sound;
import net.sf.ardengine.renderer.Renderers;
import paulscode.sound.SoundSystem;
import paulscode.sound.SoundSystemConfig;
import paulscode.sound.SoundSystemException;
import paulscode.sound.codecs.CodecIBXM;
import paulscode.sound.codecs.CodecJOgg;
import paulscode.sound.libraries.Libra... |
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the ter... |
import java.time.LocalDateTime;
public class PetDog {
private int HP;//生命值 上限1000
private int hungerValue;//飢餓值 上限100
private int thirstValue;//口渴值 上限100
private LocalDateTime lastUpdateTime;
private boolean isHunger;
private boolean isThirst;
private boolean doReviseHP;
priva... |
package fr.cg95.cvq.business;
/**
* Marker interface for objects interested in automatic historization.
*
* Currently only applies in the context of an home folder modification request but
* can be extended to other usages.
*
* @author bor@zenexity.fr
*
*/
public interface Historizable {
public Long getI... |
package fl.sabal.source.interfacePC.Codes.Event;
import java.awt.Color;
import java.awt.Component;
import javax.swing.JTable;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;
/**
*
* @author FL-AndruAnnohomy
*/
@SuppressWarnings("serial")
public class styl... |
package coreClasses.threadLocal;
import java.util.concurrent.CountDownLatch;
import static coreClasses.threadLocal.BrokenSampleDatabaseConnection.getConnection;
public class DBAppBroken {
public static void main(String[] args) throws InterruptedException {
final CountDownLatch latch1 = new CountDownLatch... |
package com.bat.message.exchange.event;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.messaging.SessionConnectEvent;
import org.springframework.web.... |
/*
* 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 rs_project;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import j... |
package com.example.dto;
public class ProductDto {
private String name;
private String description;
private float price;
private String category_name;
public ProductDto(){}
public ProductDto(String name, String description, float price, String category_name){
this.name=name;
... |
package edu.lab.server.coodinator.communication.requests;
import edu.lab.server.coodinator.communication.Request;
import edu.lab.server.coodinator.communication.RequestCode;
public class UpdateTableRequest extends Request {
public UpdateTableRequest(RequestCode code) {
super(code);
}
@Override
... |
package com.tencent.mm.g.a;
import com.tencent.mm.protocal.c.aqv;
import java.util.LinkedList;
public final class ka extends com.tencent.mm.sdk.b.b {
public a bUo;
public b bUp;
public static final class a {
public String bSr;
public boolean bTN = false;
}
public static final cla... |
/*******************************************************************************
* Copyright 2021 Danny Kunz
*
* 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.... |
package com.tibco.as.io;
import java.util.ArrayList;
import java.util.Collection;
import com.tibco.as.io.transfer.Transfer;
import com.tibco.as.space.FieldDef;
import com.tibco.as.space.SpaceDef;
import com.tibco.as.space.Tuple;
import com.tibco.as.util.convert.ConverterFactory;
public abstract class AbstractDestina... |
package com.ssgl.mapper;
/*
* 功能:
* User: jiajunkang
* email:jiajunkang@outlook.com
* Date: 2018/1/1 0001
* Time: 1:20
*/
import com.ssgl.bean.City;
import com.ssgl.bean.County;
import java.util.List;
public interface CustomerAddressMapper {
List<City> selectCitiesByProvinceId(String provinceid);
List... |
package JavaException;
public class example_uncheckedexception {
public static void main(String[] args) {
try {
System.out.println("1");//1
int a = 5/5; //1st step
System.out.println("2");//2
System.out.println(a);//1
System.out.println("3");//3
System.exit(0);
int b = 5/0;
System.out.print... |
package fr.infologic.vei.audit.migration;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Collections;
import oracle.jdbc.pool.OracleDataSource;
import org.junit.Ignore;
import org.junit.Test;
import fr.infologic.vei.audit.api.AuditIngestTrace;
@Ignore
public class MainTest e... |
package com.example.mvpdemo0602.fragments;
import android.view.View;
import android.widget.Button;
import android.widget.Chronometer;
import android.widget.TextView;
import com.example.mvpdemo0602.R;
import com.example.mvpdemo0602.base.BaseFragment;
import java.util.Timer;
import java.util.TimerTask;
import butterk... |
package com.test.class1;
import java.io.*;
public class HelloClassLoader extends ClassLoader{
public static void main(String[] args) throws IllegalAccessException, InstantiationException, IOException, ClassNotFoundException {
String path = "E:\\极客学习资料\\class1\\Hello.xlass";
ClassLoader helloCla... |
package com.travelportal.domain.rooms;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
impo... |
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.Checkbox;
import java.awt.CheckboxGroup;
import java.awt.Choice;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.GridLayout;
import java.awt.Label;
import java.awt.List;
import java.awt.TextArea;
/**
* F... |
import java.util.Arrays;
public class TwoSumLessThanK_1099 {
public static int twoSumLessThanK(int[] A, int K) {
int i = 0, j = A.length - 1, S = -1;
Arrays.sort(A);
while (i < j) {
int sum = A[i] + A[j];
if (sum < K) {
S = Math.max(S, sum);
... |
package com.google.android.gms.common.api;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import com.google.android.gms.common.api.o.b;
final class o$a extends Handler {
final /* synthetic */ o aLG;
o$a(o oVar, Looper looper) {
this.aLG = oVar;
super(looper);
... |
package com.rile.methotels.services.dao;
import com.rile.methotels.entities.Korisnik;
import org.hibernate.criterion.Projections;
import org.hibernate.criterion.Restrictions;
/**
*
* @author Stefan
*/
public class KorisnikDaoImpl extends GenericDaoImpl<Korisnik> implements KorisnikDao {
... |
package org.kernelab.basis;
/**
* The interface that define the Object which can be accessed as a vector.<br>
* Similar as object in some script languages, objects can be accessed as
* {@code o.id} and also can be accessed {@code o["id"]}.<br>
* Here, object can be accessed as a vector which is indexed by integer.... |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
static int [][] map;
static boolean[][] visit;
static int n;
static int[] dx = {-1, 0, 1, 0};
static int[] dy = {0, 1, 0, -1};
static int result = Integer.MAX_VALUE;
public static void main (... |
package com.qgbase.biz.huodong.repository;
import com.qgbase.biz.huodong.domain.HdHuodong2user;
import org.springframework.data.repository.CrudRepository;
public interface HdHuodong2userRespository extends CrudRepository<HdHuodong2user,String> {
HdHuodong2user getFirstByHuodongIdAndShopIdAndUserId(String huodongI... |
package com.walkerwang.algorithm.bigcompany;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class HuaWei02 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNextLine()) {
String op = in.nextLine();
if (op.length() > 50) {
retu... |
/*
* 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 Forms;
import Clases.Cl_Conectar;
import Clases.Cl_Varios;
import java.awt.Desktop;
import java.awt.event.KeyEvent;
import jav... |
package ds.stack;
public class App {
public static void main(String[] args) {
Stack newStack = new Stack(8);
newStack.push(12);
newStack.push(13);
newStack.push(14);
newStack.push(19);
newStack.pop();
for (int i = 0; i < newStack.newArray.length; i++) {
System.out.println(newStack.newArray[i]);
}
... |
package com.magit.logic.system.tasks;
import com.magit.logic.exceptions.*;
import com.magit.logic.system.MagitEngine;
import com.magit.logic.system.managers.BranchManager;
import com.magit.logic.system.managers.RepositoryManager;
import com.magit.logic.system.managers.RepositoryXmlParser;
import javafx.animation.KeyFr... |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may ... |
package com.smxknife.mybatis.springboot.dao;
import com.smxknife.mybatis.springboot.model.TBString;
import com.smxknife.mybatis.springboot.model.TBStringExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface TBStringM... |
package exercise2;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class AnagramTest {
@Test
public void test1() {
assertEquals(false, StringUtility.areAnagrams("aaa", "a"));
}
@Test
public void test2() {
assertEquals(false, StringUtility.areAnagrams("... |
package com.tyss.capgemini.loanproject.exceptions;
@SuppressWarnings("serial")
public class LoanExcessException extends RuntimeException {
public LoanExcessException(String msg) {
super(msg);
}
}
|
package com.research.configurer;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMv... |
package com.qm.spring.boot.blog.personblog.repository;
import com.qm.spring.boot.blog.personblog.domain.Catalog;
import com.qm.spring.boot.blog.personblog.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;
/**
* 分类管理
*/
public interface CatalogRepository extends JpaRe... |
package org.ubiquity;
import java.util.List;
/**
* This interface defines a Copier, used to copy an object into another,
* or map an object into another one of another class.
*
* @author François LAROCHE
*
* @param <T> the source object class
* @param <U> the destination object class
*/
public interface Copie... |
package com.proofconcept.uploadfile.service;
import android.app.IntentService;
import android.content.ContentValues;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.support.annotation.Nullable;
import android.util.Log;
import com.proofconcept.uploadfile.db.UploadFileOpenHe... |
package cn.chinaunicom.monitor.alarm;
import android.content.ContentValues;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import and... |
/*
* (c) 2014 Samuel Kilada.
* All rights reserved.
*/
package imagestamper;
import java.io.File;
/**
*
* @author Samuel Kilada
*/
public class ImageFilter extends javax.swing.filechooser.FileFilter {
@Override
public boolean accept(File file) {
// Allow only images
... |
package com.spbsu.flamestream.example.benchmark;
import com.spbsu.flamestream.core.Graph;
import com.spbsu.flamestream.runtime.FlameRuntime;
/**
* User: Artem
* Date: 28.12.2017
*/
public class FlameGraphDeployer implements GraphDeployer {
private final FlameRuntime runtime;
private final Graph graph;
privat... |
package com.lavajato.models;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class VeiculoModelTest {
@Test
void getPlaca() {
}
@Test
void setPlaca() {
}
@Test
void getModelo() {
}
@Test
void setModelo() {
}
@Test
void ... |
package Modulos;
import HelperCore.inicializaDriver;
import PageObject.Menu;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.net.MalformedURLException;
public class SeekBar extends inicializaDriver
{
@Before
public void iniciaTeste() throws MalformedURLException {
... |
package com.zzxhdzj.ctsync.api;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.zzxhdzj.ctsync.Callback;
import com.zzxhdzj.ctsync.CtSync;
import com.zzxhdzj.ctsync.api.base.ApiGateway;
import com.zzxhdzj.ctsync.api.base.ApiResponse;
import com.zzxhdzj.ctsync.api.base.ApiResponseCallb... |
package me.lehrner.spotifystreamer;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.Fragment;
import android.os.Bundle;
... |
package com.petersoft.mgl.utility;
public class NumberConstants {
public static final int ATTENTION_DAYS = 60;
public static final int WARNING_DAYS = 30;
private NumberConstants() {
}
public static final int MAINFRAME_WIDTH = 1200;
public static final int MAINFRAME_HEIGHT = 800;
}
|
package com.module.auth;
import com.module.model.auth.User;
import com.module.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
@Service
public class C... |
package mx.com.azaelmorales.yurtaapp;
import android.content.Intent;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Patterns;
import android.view.View;
im... |
package retrogene.discover;
import java.util.Set;
import htsjdk.samtools.util.IntervalTree.Node;
import retrogene.gene.GenesLoader.Exon;
public class Pseudogene {
private int exonPoss;
private Set<Node<Exon>> foundExons;
private int totalSRs;
private int totalDPs;
public Pseudogene (int exonPoss, Set<Node<Ex... |
package com.fleet.fastdfs.util;
import com.github.tobato.fastdfs.domain.fdfs.StorePath;
import com.github.tobato.fastdfs.domain.proto.storage.DownloadByteArray;
import com.github.tobato.fastdfs.service.FastFileStorageClient;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
impor... |
package edu.isi.karma.cleaning.correctness;
import edu.isi.karma.cleaning.DataRecord;
public class FatalErrorInspector implements Inspector {
@Override
public String getName() {
return this.getClass().getName();
}
@Override
public double getActionLabel(DataRecord record) {
if(record.transformed.indexOf("_F... |
package com.mx.profuturo.bolsa.model.service.vacancies.vo;
import com.mx.profuturo.bolsa.model.service.vacancies.base.Persona;
public class CandidatoDatosBasicosVO extends Persona {
private Integer id;
private String tipo;
private String descripcionTipo;
private String telefono;
private String ni... |
package eiti.sag.facebookcrawler.accessor.jsoup.extractor;
import eiti.sag.facebookcrawler.accessor.util.UsernameParser;
import org.jsoup.nodes.Document;
import java.util.List;
import static java.util.stream.Collectors.toList;
public class FriendsIdsExtractor implements DocumentExtractor<List<String>> {
privat... |
package quanye.org.chatapp.domain;
import java.io.Serializable;
public class Message implements Serializable {
private static final long serialVersionUID = 4455065920612636652L;
private String userName;
private String content;
public Message() {
}
public Message(String userName, String cont... |
package com.uptc.prg.maze.model.data.graphlist;
public enum EdgeType {
DIRECTED, UNDIRECTED;
}
|
package com.android.destranger.ui;
import com.android.destranger.data.UserInfo;
import java.util.ArrayList;
/**
* Created by ximing on 2015/5/12.
*/
public interface IHome extends IRoot {
void showStrangers(ArrayList<UserInfo> userInfos);
}
|
package com.ehootu.flow.controller;
import com.ehootu.core.generic.BaseController;
import com.ehootu.core.util.Query;
import com.ehootu.core.util.R;
import com.ehootu.flow.model.RiskAssessmentEntity;
import com.ehootu.flow.service.RiskAssessmentService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
imp... |
package com.designpattern.behaviorpattern.visitor;
public abstract class Element {
abstract void accept(Visitor visitor);
}
|
package br.unesp.rc.scrumboard.dao.impl;
import br.unesp.rc.scrumboard.beans.Project;
import br.unesp.rc.scrumboard.dao.ProjectDAO;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional... |
package model.data_structures;
import java.util.ArrayList;
/**
* 2019-01-23
* Estructura de Datos Arreglo Dinamico de Strings.
* El arreglo al llenarse (llegar a su maxima capacidad) debe aumentar su capacidad.
* @author Fernando De la Rosa
*
*/
public class ListaSencillamenteEncadenada<T> implements IListaSenci... |
import java.util.ArrayList;
//static : 객체 생성 없이 사용 가능 -> 메모리를 만들어 놓고 시작한다
//static안에서 static을 사용하고 싶으면, 사용하고자 하는 함수도 static이어야함
class Apple {
static void func01() {
System.out.println(1);
func02();
}
static void func02() {
System.out.println(2);
}
}
public class StaticEx01 {
// main에서 사용 불가
void func01... |
package com.yunkuent.sdk.compat.v2;
import com.gokuai.base.HttpEngine;
import com.gokuai.base.LogPrint;
import com.gokuai.base.RequestMethod;
import com.gokuai.base.utils.Util;
import com.yunkuent.sdk.*;
import com.yunkuent.sdk.upload.UploadCallBack;
import java.io.File;
import java.io.FileInputStream;
import java.io... |
package com.DoAn.HairStyle.dto;
public class CheckListResponse {
private String time;
private String timeByWords;
private Boolean isFree;
public void setTime(String time) {
this.time = time;
}
public void setTimeByWords(String timeByWords) {
this.timeByWords = timeByWords;
... |
package Varqina;
//Given two arrays a and b write a function comp(a, b) (compSame(a, b) in Clojure) that checks whether the two arrays have the "same" elements, with the same multiplicities. "Same" means, here, that the elements in b are the elements in a squared, regardless of the order.
public class CompareTable {
... |
package com.example.homeprod.assistent_begins;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Text... |
package com.testarea;
import java.time.LocalDateTime;
public class NewMain {
public static void main(String[] args) {
int secs = LocalDateTime.now().getSecond();
System.out.println("00:00:" + secs);
}
}
|
package lesson3.intermediate;
import java.util.Arrays;
/**
* Created by apodushkina on 23.01.2017.
*/
public class Task3 {
public static void main(String[] args) {
Task3 t3 = new Task3();
System.out.println("Reverted array - " + t3.revertArr());
}
int[] arr = {1, 2, 3, 4, 5, 6};
p... |
package task5;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
import java.util.Random;
import static org.junit.Assert.*;
public class ShellSortTest {
@Rule
public Timeout globalTimeout = Timeout.seconds(4000);
@Test
public void sort() {
}
@Test
public vo... |
/*
自定义异常
因为项目中会出现特有问题,而这些问题并未被java所描述并封装对象;
所以对于这些特有问题可以按Java的对问题封装的思想,将特有问题进行自定
义的异常封装。
需求:在本程序中,对于除数是负数也视为是错误的,是无法进行运算的
那么就需要对这个问题进行自定义描述
当在函数内部出现了throw抛异常对象,那么就必须要给对应的处理动作:
1.java虚拟机处理(调用者处理)
2.在内部try catch处理
一般情况下,函数内出现异常,函数上需要声明。
发现打印的结果中只有异常的名称,却没有异常的信息
:因为自定义的异常并未定义信息
如何定义异常信息?
:因为父类中已经把异常信... |
package cn.ehanmy.hospital.mvp.model.entity.store;
import cn.ehanmy.hospital.mvp.model.entity.response.BaseResponse;
public class GetStoreInfoResponse extends BaseResponse {
private StoreBean store;
@Override
public String toString() {
return "GetStoreInfoResponse{" +
"store=" + s... |
package nowcoder.剑指offer;
import java.util.Arrays;
/**
* @Author: Mr.M
* @Date: 2019-03-09 12:43
* @Description: 构建乘积数组
**/
public class T51 {
public int[] multiply(int[] A) {
int[] B = new int[A.length];
for (int i = 0; i < A.length; i++) {
int sum = 1;
for (int j = 0; j < B.length; j++) {
if (j =... |
package org.tinyspring.test.v3;
import org.junit.Test;
import org.tinyspring.beans.BeanDefinition;
import org.tinyspring.beans.ConstructorArgument;
import org.tinyspring.beans.factory.config.RuntimeBeanReference;
import org.tinyspring.beans.factory.config.TypedStringValue;
import org.tinyspring.beans.factory.support.D... |
package com.github.emailtohl.integration.core.user.customer;
import static com.github.emailtohl.integration.core.role.Authority.AUDIT_USER;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import com.github.emailtohl.integration.core.user.entities.Customer;
import com... |
/**
* This package contains the implementation of the clients need for accessing the services
* of the application. It also contains some other classes needed during the development
* of the final version of the client GUI.
*/
package clients;
|
/*
* @Author : fengzhi
* @date : 2019 - 04 - 14 18 : 49
* @Description :
*/
package problem55;
public class Solution {
}
|
package views.grid;
import java.awt.Dimension;
import java.util.Collection;
import javafx.scene.Group;
import javafx.scene.shape.Polygon;
import models.grid.Cell;
import resources.AppResources;
import views.styles.CellStyleGuide;
/**
* A class used to build the Grid View with hexagonal cells
* @author Guhan Murug... |
/**
* TheNewSoftListView.java
* created at:2011-5-20下午03:08:11
*
* Copyright (c) 2011, 北京爱皮科技有限公司
*
* All right reserved
*/
package com.appdear.client;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.List;
import android.graphics.Color;
import android.os.Bundle;
impo... |
package com.bbb.composite.ribbon.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.bbb.core.ribbon.BaseRibbonConfiguration;
import com.netflix.client.config.DefaultClientConfigImpl;
import com.netflix.client.config.IClientConfig;
import... |
package com.rx.mvvm.aop.anno;
import org.greenrobot.greendao.AbstractDao;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Created by wuwei
* 2021/3/22
* 佛祖保佑 永无BUG
*/
@Target(ElementType.M... |
package edu.uci.ics.sdcl.firefly.report.predictive.montecarlo;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.util.HashMap;
import edu.uci.ics.sdcl.firefly.report.predictive.DataPoint;
/**
* Represents a sample of questions and attributes of the sample such
* - How many of the questions wer... |
package com.everis.eCine.model;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToMany;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
impo... |
package xml;
import javax.xml.bind.annotation.*;
@XmlRootElement(name = "TestDoc")
@XmlAccessorType(XmlAccessType.FIELD)
public class XMLObject {
@XmlElement(name = "age")
private int age;
@XmlElement(name = "subject")
private String subject;
@XmlElement(name = "name")
private String name;
... |
package com.projects.houronearth.activities.fragments;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v7.widget.Divid... |
package com.cse308.sbuify.playlist;
import com.cse308.sbuify.album.Album;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* Read-only DAO mapped to the playlist_albums view.
*/
@Entity
@Table(name = "playlist_albums")
@IdClas... |
/**
* @author Amith Gopal
*/
package com.example.demo;
/*
* This class represents the parameters of the request body while adding a job to the Job table to the database.
*/
public class AddJobParameters {
private String skills;
private String location;
private String description;
private String role;
privat... |
package com.bowlong.net.http;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import com.bowlong.bio2.B2InputStream;
import com.bowlong.net.http.urlcon.HttpUrlConEx;
/**
* @author Canyon
* @version createtime:2015年8月17日 下午10:31:15
*/
public class Http... |
package domein;
import java.util.List;
import persistentie.DoelkaartMapper;
import persistentie.GangkaartMapper;
import persistentie.SpelMapper;
import persistentie.SpelerMapper;
class SpelRepository {
private final SpelMapper spelMapper;
private final SpelerMapper spelerMapper;
private final GangkaartMa... |
package ch.epfl.seti.server.custom;
import java.util.concurrent.atomic.AtomicInteger;
import ch.epfl.seti.client.typelib.SInteger;
import ch.epfl.seti.client.typelib.SVoid;
import ch.epfl.seti.server.IInputGenerator;
import ch.epfl.seti.shared.MapTask;
import ch.epfl.seti.shared.Pair;
import ch.epfl.seti.shared.Task;... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.