text stringlengths 10 2.72M |
|---|
package 删除链表中某一个节点;
class Node{
int val;
Node next;
Node(int val){
this.val = val;
}
}
public class DeleteNode {
public static void main(String[] args) {
Node head = new Node(-1);
Node node1 = new Node(2);
Node node2 = new Node(5);
Node node3 = new Node(8);
... |
package powermocking;
/**
* Created by RCEAZ31 on 9/03/2016.
*/
public class CouldNotCalculate extends Throwable {
}
|
package cars;
public class Wolkswagen extends Car {
public Wolkswagen(){
super();
}
public Wolkswagen(int mileage){
super("Wolkswagen", mileage);
}
}
|
package com.penzias.service.impl;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.penzias.core.BasicServiceImpl;
import com.penzias.core.interfaces.BasicMapper;
import com.penzias.dao.ApoplexyConclusionInfoMapper;
import com.penzias.entity.ApoplexyConclusionInfo;
... |
package lotto.step1;
import java.util.Scanner;
public class Application {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String text = sc.nextLine();
StringAddCalculator stringAddCalculator = new StringAddCalculator(text);
System.out.println(stringAdd... |
package com.urhive.panicbutton.interfaces;
/**
* Created by Chirag Bhatia on 21-04-2017.
*/
public interface OnBackPressListener {
public boolean onBackPressed();
}
|
package ufc.br.so.shell.commandline;
import java.util.Scanner;
import ufc.br.so.exception.CommandNotFoundException;
import ufc.br.so.memory.PageList;
import ufc.br.so.shell.commandline.functions.Function;
public class Shell {
public Shell() {
interFace();
}
@SuppressWarnings("resource")
private void interFac... |
package org.example.broker.core.service.client;
import org.example.broker.api.domain.Client;
public interface ClientService {
void register(Client client);
}
|
package com.livessolution.myservice.fragement;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import com.livessolution.myservice.R;
... |
/**
*
*/
package com.sidexia.core.entities;
import java.io.Serializable;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import... |
/*
* Copyright © 2019 The GWT Project 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
package nowcoder.剑指offer;
/**
* @Author: Mr.M
* @Date: 2019-03-10 11:48
* @Description: 把二叉树打印成多行
**/
public class T60 {
}
|
package HI;
import javax.swing.JFrame;
import javax.swing.JPanel;
import problemDomain.Item;
import problemDomain.Store;
import problemDomain.UPC;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public clas... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package db;
/**
*
* @author Abhishek
*/
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
/**
*
* @author Abhishek
*/
public class... |
package Lab06.Zad2;
public class Truck implements Deliver{
@Override
public void deliver(String stuff) {
System.out.println("Delivering " + stuff + " by a truck");
}
}
|
package com.lfd.day0000_01_tools.test;
import java.util.Arrays;
import android.os.Environment;
import android.test.AndroidTestCase;
import com.lfd.day0000_01_tools.utils.StorageUtils;
public class UtilsTest extends AndroidTestCase{
public void testStorageInfo(){
//File file = null;
//System.out.p... |
package lab3;
/**
*
* Class definition for IntNode. IntNodes link together to form a singly-linked list.
* This solves the problem of inadequate contintuos memory to store an array of values. Instead, each node holds
* one data point and a link to the next node in the linked-list. The nodes need not be stored in... |
package com.java.abs_factory;
public enum Price {
INIDIO,AIRASIA;
}
|
package de.tuebingen.uni.sfs.clarind.reactprojecttemplate.core;
import org.slf4j.LoggerFactory;
public class Splitter {
private static final org.slf4j.Logger log = LoggerFactory.getLogger(Splitter.class);
public String[] split(String input) {
return input.split("\\s");
}
}
|
package com.mediacom.tools;
import java.util.Collection;
import java.util.Hashtable;
import java.util.LinkedHashSet;
import java.util.TreeSet;
import java.util.regex.Pattern;
import javax.naming.NamingException;
import javax.naming.directory.Attribute;
import javax.naming.directory.Attributes;
import javax.naming.dir... |
package FactoryDesign.controller;
public class AddressBookFactory {
}
|
package evm.dmc.api.model.data;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Transient;
import com.fasterxml.jackson.annotation.JsonIgnore;
import evm.dmc... |
package me.lehrner.spotifystreamer;
import android.content.Context;
import android.content.Intent;
public class MusicIntentReceiver extends android.content.BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// pause music if audio suddenly becomes
// noisy (e... |
package Gestion.utils;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Locale;
import com.dropbox.core.DbxAccountInfo;
import com.dropbox.core.DbxAppInfo;
import com.drop... |
package com.example.ducnhan.dulichphuquy;
import java.io.Serializable;
public class PlaceInfo implements Serializable {
String address;
String description;
String fourthimage;
Double lattitude;
Double longitude;
String name;
String phoneno;
String secondimage;
String summary;
... |
package com.example.currency;
import com.example.currency.api.CurrencyService;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import... |
package com.parkinglot.entities;
public class ParkingLot {
}
|
/**
* User related discord objects.
*
* Although webhook technically counts as a bot, it still has a {@link org.alienideology.jcord.handle.user.IWebhook#getUser()}
* as the default user.
*
* @author AlienIdeology
*/
package org.alienideology.jcord.handle.user; |
import java.awt.FlowLayout;
import java.util.ArrayList;
import javax.swing.*;
public class View extends JFrame{
JPanel panel = new JPanel();
JButton pridat = new JButton("Pridaj záznam");
JButton vymaz = new JButton("Vymaž záznam");
JButton updatuj = new JButton("Updatuj záznam");
JButton menu = new JBut... |
package com.thinker.vdongthinker.ui.activity;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;
import a... |
package talaash.ExtraGui;
import java.awt.*;
import java.awt.image.BufferedImage;
import javax.swing.*;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import talaash.Tasveer_Talaash;
public class ListViewer {
public void viewme(String path,int[] returnedlist , String framename... |
package app.popularmoviestage.project;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.... |
package com.hb.javacad.shape;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Shape;
import java.awt.geom.Ellipse2D;
import java.util.ArrayList;
public class Circle extends ShapeSet {
/**
*
*/
private static final long serialVersionUID = -8802... |
package lesson8.phones;
public class Android extends Phone {
// int price;
// double weight;
// String countryProduce;
String androidVersion;
int screenSize;
String secretDeviceCode;
public Android(int price, double weight, String countryProduce, String androidVersion, int screenSize, Strin... |
package com.bin.test;
public class Test {
}
|
package fr.lteconsulting.formations;
import java.io.IOException;
import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@We... |
/**
* Copyright 2013 Cloudera Inc.
*
* 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 agreed to i... |
package net.javango.carcare.util;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
/**
* A collection of executor pools to asynchronously run various tasks.
* Tasks of the same kind are run b... |
package serverTask.service;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import serverTask.domain.GroceryDto;
import java.io.IOExc... |
package Model;
public class Pessoa {
String nome;
String telefone;
String email;
Endereco endereco;
String tipoPessoa; //fisica ou juridica
int idade;
}
|
package com.service.proxy;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import com.pojo.CardRecord;
import com.pojo.Proxy;
import com.service.base.BaseService;
public interface ProxyService extends BaseService<Proxy> {
/**
* 注意要和Employeer.xml的方法名对应
*/
public Proxy findProxyByI... |
package daos;
import org.hibernate.Session;
import pojos.Dept;
import pojos.Emp;
import pojos.Meeting;
import utils.HbUtil;
public class EmpDeptDao {
public Emp getEmp(int empno) {
Session session = HbUtil.getSession();
return session.get(Emp.class, empno);
}
public Dept getDept(int deptno) {
Session sess... |
/*
* Copyright (C) 2021-2023 Hedera Hashgraph, LLC
*
* 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 applicab... |
package com.xxw.service.solo;
import com.xxw.entity.bo.ShopCategory;
import com.xxw.entity.dto.Result;
import java.util.List;
/**
* @author xiongxianwei
* 2020/6/1
*/
public interface ShopCategoryService {
Result<Boolean> addShopCategory(ShopCategory shopCategory);
Result<Boolean> removeShopCategory(int s... |
package gui.left_panel;
import gui.resources.Images;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.image.ImageView;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.scene.te... |
package com.leetcode.easy.array;
/**
* Created by saml on 10/11/2017.
* <p>
* Given a osrted linked list, delete all duplicates such that each element appear only once.
* <p>
* For example,
* Given 1->1->2, return 1->2.
* Given 1->1->2->3->3, return 1->2->3.
*
*/
public class RemoveDuplicatesSortedList {
... |
package android.support.v4.media;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.support.v4.media.MediaBrowserServiceCompat.b;
import android.support.v4.media.MediaBrowserServiceCompat.d;
import android.support.v4.media.MediaBrowserServiceCompat.g;
class MediaBr... |
package com.tencent.mm.plugin.websearch.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import com.tencen... |
package com.yaochen.address.dto.db;
import com.yaochen.address.common.BusiConstants.AddrChangeType;
public class LogQueryForm {
/** 上级节点 **/
private Integer pid;
/** 修改日期开始时间 **/
private String startDate;
/** 修改日期结束时间 **/
private String endDate;
/** 名称,模糊查询 **/
private String addrName;
private Integer addr... |
import java.util.*;
class TreeOne {
public static void main(String args[]) {
TreeSet mytree = new TreeSet();
mytree.add("boy");
mytree.add("zoo");
mytree.add("apple");
mytree.add("girl");
Iterator te = mytree.iterator();
while (te.hasNext())
System.out.println("" + te.next());
}
} |
package com.example.ceo;
import android.support.annotation.Nullable;
import com.android.volley.NetworkResponse;
import com.android.volley.Response;
import com.android.volley.VolleyLog;
import com.android.volley.toolbox.HttpHeaderParser;
import com.android.volley.toolbox.StringRequest;
import java.io.UnsupportedEncod... |
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any la... |
package com.hawk.application.util;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DayBuilderTest {
Logger LOGGER = LoggerFactory.getLogger(DayBuilderTest.class);
@Test
public void test() {
DayBuilder db = new DayBuilder();
LOGGER.info(db.getToday().toString());
... |
package physics;
import java.util.List;
public class World {
public World() {
}
public void addObject(PhysObject o) {
}
public void advance(int millis) {
}
public List<PhysObject> getWorldState() {
return null;
}
}
|
package utils;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xp... |
package rugal.westion.jiefanglu.interceptor;
import java.io.Writer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servl... |
package ru.klepikovec.game.server.controllers;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import ru.klepikovec.game.server.model.Player;
import java.util.ArrayList;
import j... |
package com.bingo.code.example.design.interpreter.elements;
import java.util.*;
import org.w3c.dom.Element;
/**
* ���Ԫ����Ϊ���ս���Ľ��ʹ������
*/
public class ElementsExpression extends ReadXmlExpression{
/**
* ������¼��ϵ�ReadXmlExpressionԪ��
*/
private Collection<ReadXmlExpression> eles = new ArrayList<ReadXml... |
import java.util.Scanner;
public class Parrot_Main
{
/** Main method */
public static void main(String[] args) {
Parrot loudNoise = new Parrot();
loudNoise.setTalking(false);
loudNoise.setHour(4);
boolean parrotNoise = loudNoise.parrotTrouble(loudNoise.isTalking(), loudNoise.getHour());
System.out.print... |
package exer1;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;
import org... |
package com.linroid.weather.provider;
import android.content.ContentProvider;
import android.content.ContentProviderOperation;
import android.content.ContentProviderResult;
import android.content.ContentValues;
import android.content.Context;
import android.content.OperationApplicationException;
import android.content... |
package com.radiant.rpl.testa.ExamSection;
public class CustomAdapter1 {
}
|
package com.tencent.mm.plugin.appbrand.a;
public interface a extends com.tencent.mm.kernel.c.a {
void cs(boolean z);
}
|
package c10.s01.t02;
import java.util.Arrays;
/** p131
* 10.1-2
* @author he
* @email wubuqilai@gmail.com
*/
public class StackDouble {
private int[] elements;
private int count;
private int topA; //point to current element
private int topB;
public StackDouble(int count) {
this.elements=new int[count];
... |
package de.rwth.i9.palm.persistence;
import de.rwth.i9.palm.model.AuthorAlias;
public interface AuthorAliasDAO extends GenericDAO<AuthorAlias>, InstantiableDAO
{
}
|
package com.crivano.swaggerservlet;
public class SwaggerAsyncResponse<T extends ISwaggerResponse> {
private T resp;
private SwaggerException exception;
private Long miliseconds;
public SwaggerAsyncResponse(T resp) {
this.resp = resp;
}
public T getResp() {
return this.resp;
}
public T getRespOrThrowExce... |
import java.util.Scanner;
import java.util.Random;
public class GameDriver2 {
private Random random;
private Scanner input;
public GameDriver2() {
input = new Scanner(System.in);
random = new Random();
}
public static void main(String[] args) {
GameDriver2 game = new GameDriver2();
Player[] players = ... |
package waves.token.walkmiles;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.android.volley.RequestQueue;
... |
import javax.swing.JOptionPane ;
import java.util.Scanner ;
public class highScores {
public static void main(String[] args)
{
System.out.print("please enter how many high scores you wish to maintain");
Scanner scanner = new Scanner (System.in);
int maxHighScores = scanner.nextInt();
scanner.close();
... |
/*
* created 08.05.2005
*
* Copyright 2009, ByteRefinery
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* $I... |
package masking;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Mask mask = new Mask();
Scanner scan = new Scanner(System.in);
String output = "";
System.err.print("input = ");
String input = scan.nextLine();
output = mask.mask(input);
System.err.p... |
package com.cse308.sbuify.image;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
import org.springframework.core.io.UrlResource;
import org.springframework.stereotype.Service;
import org.springframework.util.Base64Utils;
import javax.imageio.ImageIO;
import ... |
package com.test06;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
@Aspect
@Component
public class MyAspect {
@Before("execution(public * *(..))")
public void before() {
System.out.pri... |
package com.example.appBack.Tablas.Student.domain;
import com.example.appBack.Generadores.StringPrefixedSequenceIdGenerator;
import com.example.appBack.Tablas.Nota.domain.NotaJpa;
import com.example.appBack.Tablas.Profesor.domain.ProfesorJpa;
import com.example.appBack.Tablas.Study.domain.StudyJpa;
import com.example.... |
package jteller;
import jteller.stubs.Perro;
import org.junit.Test;
public class TellerAcceptanceTests {
@Test
public void queEmiteInforme() {
System.out.println(new Teller(Perro.class).tell());
}
}
|
package ru.sg_studio.escapegame.bindings.libgdx;
import net.raydeejay.escapegame.Reactor;
public class LibGDXTextureUtilities {
public static void checkLibGDXTexture(Reactor r){
if(!r.getImage().isLoadedBySide()){
LibGDXTextureWrapper wrapper = new LibGDXTextureWrapper(r.getClonedTexture());
r.swapTexture(w... |
package Objetos_Exemplos;
public class ContaEspecialEd extends ContaEd
{
private double valorLimite;
//encapsulamento
public ContaEspecialEd(int numeroConta, double valorLimite) {
super(numeroConta);
this.valorLimite = valorLimite;
}
public double getValorLimite() {
return valorLimite;
}
public voi... |
import java.util.*;
public class Main {
public static void main(String[] args) {
// write your code here
Scanner scanner = new Scanner(System.in);
List<Integer> numbers = new ArrayList<>();
while(scanner.hasNext()){
numbers.add(scanner.nextInt());
}
int... |
/** ****************************************************************************
* Copyright (c) The Spray Project.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
... |
package net.minecraft.block;
import com.google.common.collect.Lists;
import java.util.List;
import java.util.Random;
import javax.annotation.Nullable;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyDirection;
import net.minec... |
package leecode.Array;
//https://github.com/labuladong/fucking-algorithm/blob/master/%E9%AB%98%E9%A2%91%E9%9D%A2%E8%AF%95%E7%B3%BB%E5%88%97/%E7%BC%BA%E5%A4%B1%E5%92%8C%E9%87%8D%E5%A4%8D%E7%9A%84%E5%85%83%E7%B4%A0.md
/*
这种数组问题,关键点在于元素和索引是成对儿出现的,常用的方法是排序、异或、映射。
映射的思路就是我们刚才的分析,将每个索引和元素映射起来,通过正负号记录某个元素是否被映射。
*/
public cla... |
package com.scope.beansDemo;
import org.springframework.context.annotation.*;
import org.springframework.context.annotation.Configuration;
@Configuration
@ComponentScan("com.scope.beansDemo")
public class SportConfig {
}
|
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import jav... |
/*
Copyright (c) 2008-2019. Fundwit All Rights Reserved.
*/
package com.fundwit.sys.shikra.user.service;
import com.fundwit.sys.shikra.exception.EmailSendException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.mail.ja... |
package com.microsilver.mrcard.basicservice.core.filter;
import com.microsilver.mrcard.basicservice.common.Consts;
import com.microsilver.mrcard.basicservice.model.TokenType;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframe... |
package unlinked;
import java.util.Comparator;
public class AutoTripSegmentComparator implements Comparator<AutoTripSegment> {
@Override
public int compare(AutoTripSegment s1, AutoTripSegment s2)
{
long weight1 = Long.parseLong(s1.getPLSAM());
long weight2 = Long.parseLong(s2.getPLSAM());
... |
package com.smxknife.java2.io.input;
import java.io.*;
/**
* @author smxknife
* 2019-01-30
*/
public class FileInputStreamDemo2 {
public static void main(String[] args) {
File path = new File("");
System.out.println(path.getAbsolutePath());
String filePath = path.getAbsolutePath() + "/src/main/java/com/smxk... |
package primary.courseone.selfcode;
// 给定一个数组,求如果排序后,相邻两数的最大差值,要求时间复杂度O(N),且要求不能用非基于比较的排序。
public class MaxGap {
public static void main(String[] args) {
int[] arr = new int[]{12,1,34,5,34,4,2,7,18,22,101};
int max = maxGap(arr);
System.out.println("差值最大为:" + max);
}
public... |
package com.hb.javacad.shape;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Shape;
import java.awt.geom.Ellipse2D;
import java.util.ArrayList;
public class Ellipse extends ShapeSet {
/**
*
*/
private static final long serialVersionUID = 3617518036264802248L;
publi... |
package model.impl;
import java.awt.geom.Point2D;
import java.util.Vector;
import model.AccessPoint;
import model.GridPoint;
import model.Room;
import model.Trajectory;
import model.Wall;
import support.Rn;
public class TrajectoryImpl implements Trajectory {
private Vector<Wall> trajectorywalls;
private boolean l... |
package com.example.photoapp2;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import androidx.fragment.app.... |
package org.dmonix.io;
import java.io.ByteArrayOutputStream;
import org.dmonix.AbstractTestCase;
import org.junit.Before;
/**
* Test the class <code>RemoveLineCommentOutputStream</code>
*
* @author Peter Nerg
*/
public class TestRemoveLineCommentOutputStream extends AbstractTestCase {
private... |
package com.dennistjahyadigotama.soaya.activities.PeopleProfileActivity.adapter;
import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
im... |
package com.tencent.mm.plugin.account.ui;
import android.view.MenuItem;
import com.tencent.mm.plugin.account.a.j;
import com.tencent.mm.sdk.platformtools.w;
import com.tencent.mm.ui.base.n$d;
class LoginUI$26 implements n$d {
final /* synthetic */ LoginUI eSk;
LoginUI$26(LoginUI loginUI) {
this.eSk =... |
package Ex2;
import Ex1.Inheritance.InheritanceNode;
import Ex1.SearchInContext;
import Ex1.SymbolTables.SymbolTable;
import ast.AstType;
import ast.BoolAstType;
import ast.IntArrayAstType;
import ast.IntAstType;
import java.util.HashMap;
import java.util.Map;
public class FieldOffsetsMapBuilder {
SearchInContex... |
package com.tencent.mm.pluginsdk.g.a.a;
import com.tencent.mm.pluginsdk.g.a.c.l;
import com.tencent.mm.pluginsdk.g.a.c.s;
import com.tencent.mm.sdk.platformtools.bi;
final class c extends l {
private final boolean bIJ;
final String bKg;
final long fileSize;
volatile boolean pON;
final long qBG;
... |
package net.razorvine.pyro.serializer;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import net.razorvine.pickle.IObjectPickler;
import net.razorvine.pickle.Opcodes;
import net.razorvine.pickle.PickleException;
import net.razorvine.pickle.Pickler;
import net.... |
package com.sample.jwt;
import org.springframework.boot.context.properties.ConfigurationProperties;
import lombok.Data;
@ConfigurationProperties(prefix="jwt")
@Data
public class JwtProperty {
private String signingKey;
private Integer expirationTime;
private String[] tokenRequireUri;
private String[] tokenIgnore... |
package com.vivekkaushik.datepicker.adapter;
import android.graphics.Color;
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.vivekkaushik.datepick... |
package lambda.methodCall;
/**
* @Author: XuZhiJun
* @Description:
* @Date: Created in 15:38 2019/4/9
*/
public interface Callable {
void call(String s);
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.