text stringlengths 10 2.72M |
|---|
package models.rules;
import java.util.Map;
import models.grid.Cell;
import models.grid.CellState;
import models.grid.GridModel;
/**
* The class that defines the rules for the Game of Life simulation
* @author Weston
*
*/
public class RuleLife extends Rule {
public RuleLife(Map<String, Integer> aStateIdsMap)
... |
package br.com.zup.zupacademy.daniel.mercadolivre.categoria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.s... |
package models;
import java.util.Collection;
import java.util.Comparator;
import java.util.PriorityQueue;
import exceptions.ElementNotAllowedException;
import exceptions.ListSizeOverflownException;
@SuppressWarnings("serial")
public class ListaOrdenada<E> extends PriorityQueue<E> {
private final byte MAX... |
package ru.job4j.array;
import org.junit.Test;
import static org.junit.Assert.assertThat;
import static org.hamcrest.core.Is.is;
public class UpArrayTest {
@Test
public void testOne() {
int[] a = {5, 10, 15, 20, 50};
int[] b = {6, 7, 8, 18, 19, 23, 48, 63};
UpArray upArray = new UpAr... |
/**
* 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... |
package JZOF;
/**
* Created by yang on 2017/3/22.
*/
/*
输入一个整数数组,实现一个函数来调整该数组中数字的顺序,
使得所有的奇数位于数组的前半部分,所有的偶数位于位于数组的后半部分
,并保证奇数和奇数,偶数和偶数之间的相对位置不变。
*/
public class OddAheadEven {
public void reOrderArrayCantStaySeq(int[] array) {
if (array == null) {
return;
}
int... |
package com.bbb.composite.product.details;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.math.BigDecimal;
import java.time.Duration;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Collections;
import... |
/* 异常-处理语句的其他格式
格式1
try{
}catch(){
}finally{
}
格式2
try{
}catch(){
}
格式3
try{
}finally{
}
注意:
catch 是用于处理异常的。如果没有catch就代表异常没有被处理过,
如果该异常是编译时异常。那么必须被声明
*/
class Demo{
public void method(){ // 不用throws, 问题在内部被解决,程序可以编译通过
try{
throw new Exception();
}catch(Exception e){
// 只要问题被解决... |
package com.mundo.core.support;
import org.junit.Test;
/**
* StackPointerTest
*
* @author maodh
* @since 04/02/2018
*/
public class StackPointerTest {
@Test
public void printStackTrace() {
StackPointer.printStackTrace("hello stack");
}
} |
package com.zhouyi.business.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @author 李秸康
* @ClassNmae: SysUnitDto
* @Description: TODO
* @date 2019/6/21 18:01
* @Version 1.0
**/
@ApiModel(value = "部门分页条件对象模型")
public class SysUnitDt... |
public class salException extends Exception{
public void salError(){
System.out.println("Salário tem que ser maior que R$ 950,00");
}
} |
package com.zpjr.cunguan.action.impl.setting;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.zpjr.cunguan.action.action.setting.ISmsSubscribeAction;
import com.zpjr.cunguan.common.base.BaseAction;
import com.zpjr.cunguan.common.retrofit.MyCallBack;
import com.zpjr.cunguan.common.retrof... |
package cn.droidlover.xdroid.demo;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.graphics.Bitmap;
import android.util.Log;
import android.widget.ImageVi... |
import static java.lang.System.exit;
import java.util.Scanner;
import javax.swing.JOptionPane;
import java.util.InputMismatchException;
public class MainPerfectHash
{ public static void main(String[] args)
{
PerfectHash TicketDataBase = new PerfectHash();
int choice;///maybe chnage this`
Scanner s... |
package com.days.moment.qna.controller;
import com.days.moment.common.dto.PageMaker;
import com.days.moment.common.dto.PageRequestDTO;
import com.days.moment.common.dto.PageResponseDTO;
import com.days.moment.miniboard.dto.MiniDTO;
import com.days.moment.qna.dto.QnaDTO;
import com.days.moment.qna.service.QnaService;
i... |
package br.com.treinarminas.academico.Exercicios;
// Exercicio de controle if{} else
public class ImprimirPorExtenso {
public static void main(String[] args) {
int numero = 2;
if (numero == 1) {
System.out.println("Numero é = " + numero + "(um)");
} else if (numero == 2) {
System.out.println("Num... |
package cn.edu.tju.http;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
public class URLsDecoder {
/**
*
* @param s a String representing an URL
* @return encoded URL
*/
public static String encodeURL(String s) {
try {
return URLEncoder.encode(s, ... |
package com.uwetrottmann.trakt5.entities;
import org.threeten.bp.OffsetDateTime;
public class Comment {
public Integer id;
public Integer parent_id;
public OffsetDateTime created_at;
public OffsetDateTime updated_at;
public String comment;
public Boolean spoiler;
public Boolean review;
... |
package com.example.recyclerview.data;
public class SummaryData {
String value;
String meaning;
public SummaryData(String value, String meaning) {
this.value = value;
this.meaning = meaning;
}
public String getValue() {
return value;
}
public void setValue(String ... |
package com.ld.baselibrary.base;
import androidx.annotation.NonNull;
/**
* Description:RecycleView多布局ItemViewModel是封装
*/
public class MultiItemViewModel<VM extends BaseViewModel> extends ItemViewModel<VM> {
// 多布局类型
protected Object multiType;
// 多布局数据
protected Object sourcesData;
public Mul... |
package Archiver;
/**
* Created by wiewiogr on 08.06.17.
*/
public class Weather {
String main;
String description;
String icon;
int temperature;
int humidity;
int visibilty;
int pressure;
double windSpeed;
int windDegree;
int clouds;
}
|
/* 1: */ package com.kaldin.setting.importdata.dto;
/* 2: */
/* 3: */ public class ImportDataDTO
/* 4: */ {
/* 5: */ private String connctionURL;
/* 6: */ private String password;
/* 7: */ private String dbName;
/* 8: */ private String driver;
/* 9: */ private String userNa... |
package de.fhg.iais.roberta.visitor.hardware;
import de.fhg.iais.roberta.syntax.neuralnetwork.NeuralNetworkAddRawData;
import de.fhg.iais.roberta.syntax.neuralnetwork.NeuralNetworkAddTrainingsData;
import de.fhg.iais.roberta.syntax.neuralnetwork.NeuralNetworkClassify;
import de.fhg.iais.roberta.syntax.neuralnetwork.Ne... |
package com.dragon.system.quartz.utils;
import com.dragon.common.exception.BadRequestException;
import com.dragon.system.quartz.model.QuartzJobModel;
import org.quartz.*;
import org.quartz.impl.triggers.CronTriggerImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.a... |
/*
Primes calculation : need optimization tecnique, the complexity (and the time too)
grow in an exponential way; it O(e^n)
e^2000000
*/
import java.util.*;
public class SumPrimesMin2Mln{
public static void main(String args[]){
boolean isPrime=false;
long sumPrime=0;
for(int p=1; p<2000000; ++p){
... |
/*
* Copyright (C) 2011 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 app... |
package org.alienideology.jcord.event.channel.group.user;
import org.alienideology.jcord.handle.user.IUser;
import org.alienideology.jcord.internal.object.IdentityImpl;
import org.alienideology.jcord.internal.object.channel.Channel;
/**
* @author AlienIdeology
*/
public class GroupUserLeaveEvent extends GroupUserEv... |
/*
* Copyright 2016 Google Inc. All Rights Reserved.
*
* 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 tw.org.iii.java;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import tw.org.iii.myclass.Scooter;
public class Brad68 {
public static void main(String[] args) {
Student s1 = new Student(90, 70, 50);
System.out.prin... |
package com.example.demo.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.Date;
@Data
@AllArgsConstructor
public class UserEntity {
private String name;
private String address;
private Date date;
}
|
/*
* 文 件 名: Image.java
* 描 述: Image.java
* 时 间: 2013-6-17
*/
package com.babyshow.image.bean;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* <一句话功能简述> <功能详细描述>
*
* @author ztc
* @version [BABYSHO... |
package com.example.bhuva.store_buddy_group_31;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import andr... |
package sellwin.domain;
import java.util.*;
import java.io.*;
// SellWin http://sourceforge.net/projects/sellwincrm
//Contact support@open-app.com for commercial help with SellWin
//This software is provided "AS IS", without a warranty of any kind.
/**
* This class contains data about a product that will
* be use... |
package cn.canlnac.onlinecourse.presentation.internal.di.modules;
import cn.canlnac.onlinecourse.domain.executor.PostExecutionThread;
import cn.canlnac.onlinecourse.domain.executor.ThreadExecutor;
import cn.canlnac.onlinecourse.domain.interactor.GetCommentsInChatUseCase;
import cn.canlnac.onlinecourse.domain.interacto... |
package android.support.v4.app;
import android.app.Notification.Action;
import android.app.Notification.Builder;
import android.app.RemoteInput;
final class aa {
public static void a(Builder builder, ac$a ac_a) {
Action.Builder builder2 = new Action.Builder(ac_a.getIcon(), ac_a.getTitle(), ac_a.getActionI... |
package org.training.dao.impl;
import org.apache.log4j.Logger;
import org.training.dao.ItemDAO;
import org.training.dao.exception.DAOException;
import org.training.model.entities.Item;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.u... |
package de.zarncke.lib.util;
import java.util.Arrays;
import java.util.HashSet;
import junit.framework.TestSuite;
import de.zarncke.lib.coll.HierarchicalMap;
import de.zarncke.lib.err.GuardedTest;
import de.zarncke.lib.struct.Lattice;
import de.zarncke.lib.struct.PartialOrder;
/**
* Tests lattice related classes o... |
package com.vilio.pcfs.glob;
public enum GlobDict {
//是否首次登录
first_login("1","首次登录"),
un_first_login("0","非首次登录"),
//是否锁定
hash_lock("0","用户锁定"),
//短信业务类型
sms_login_type("00","登录短信验证码"),
sms_borrow_type("01","借款短信验证码"),
sms_login_pwd_type("02","忘记密码"),
sms_trans_pwd_type("03","修改交易密码"),
sms_authentication("... |
package com.rofour.baseball.service.wallet;
public interface WalletExceptionService {
}
|
package com.example.fy.blog.util;
/**
* Created by fy on 2016/3/27.
*/
public class Contasts {
public static final String BASE_URL = "http://git.oschina.net/api/v3/session";
public static final String URL_LOGIN = "account/login";
public static final String URL_REGISTER = "";
public static final Stri... |
public class Euclidean implements DistanceMeasure {
public double calculateDistance(Unit unit1, Unit unit2){
int numOfVariables = unit1.getNumOfVariables();
double sum = 0;
double unit1_var = 0;
double unit2_var = 0;
for (int i = 0; i < numOfVariables; i++){
unit1_var = unit1.getValue(i);
unit2_v... |
package switch2019.project.domain.domainEntities.person;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import switch2019.project.domain.domainEntities.shared.Denomination;
import static org.junit.jupiter.api.Assertions.*;
class PersonNameTest {
@Test
void getPersonNameComplete... |
//**************** Oct 8*****************
package JavaSessions;
public class Car {// Car is a template
//class variables or global variables
String name;
String model;
int price;
String color;
public static void main(String[] args) {
Car c1=new Car();
//c1 is the name/reference of the object
//new Car... |
package TextStark;
import java.util.Stack;
public class TextStark {
public static void main(String[] args) {
Stack<String> stack = new Stack<>();
stack.push("Java");
stack.push("C++");
stack.push("PHP");
System.out.println("栈中元素个数:" + stack.size());
System.out.print... |
package com.fab.devportal.service;
import java.util.List;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fab.devportal.dao.ApiDescTbl;
import com.fab.devportal.repo.APIDetailsRepository;
@Service
public class APIDet... |
package com.rsm.yuri.projecttaxilivredriver.historicchatslist;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.rsm.yuri.projecttaxilivredriver.domain.FirebaseAPI;
import com.rsm.yuri.projecttaxilivredriver.domain.FirebaseEventListenerCallback;
import com.... |
package at.xirado.bean.translation;
import at.xirado.bean.data.LinkedDataObject;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.interactions.DiscordLocale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStr... |
package ladder.DynamicProgrammingII;
/**
* Given an integer array, adjust each integers so that the difference of every adjacent
* integers are not greater than a given number target.
* If the array before adjustment is A, the array after adjustment is B,
* you should minimize the sum of |A[i]-B[i]|
*/
import ja... |
package model.data_structures;
public interface IListaSencillamenteEncadenada<T> {
/**
* Retornar el numero de elementos presentes en el arreglo
* @return
*/
int darTamano( );
/**
* Agregar un dato de forma compacta (en la primera casilla disponible)
* Caso Especial: Si el arreglo esta lleno debe aumen... |
package com.a1tSign.techBoom.controller;
import com.a1tSign.techBoom.data.dto.security.AuthResDTO;
import com.a1tSign.techBoom.data.dto.security.LoginUserDTO;
import com.a1tSign.techBoom.data.dto.security.RegisterUserDTO;
import com.a1tSign.techBoom.security.JwtProvider;
import com.a1tSign.techBoom.service.user.UserSe... |
/*
* 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.renu.controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
*
* @author Atif Aslam
*/
@org.spr... |
package com.marshalchen.ultimaterecyclerview.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import in.srain.cube.views.ptr.PtrFrameLayout;
/**
* Created by cym on 15/3/21.
*/
public class CustomPtr extends PtrFrameLayout {
public CustomPtr(Context context... |
public class Farmer{
public Farmer(){
}
} |
package com.bluewise.testJava;
/**
* Created by wangshunchu on 15/12/28.
*/
public interface Istudent extends Iperson {
public void sayClass();
}
|
/**********************************************************************************************
* Distributed computing spring 2014 group 4 //Alex Ryder//Nick Champagne//Hue Moua//
* //Daniel Gedge//Corey Jones//
* Project 2 Peer2Peer client/server
***********************... |
package eu.libal.cpptoolkit.gametheory;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.*;
public class CondorcetMethodTest {
private Con... |
/*
* Copyright (C) 2011 Make Ramen, 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 applicable law or a... |
package com.littlecheesecake.redis.demo.controller;
import com.littlecheesecake.redis.demo.annotation.RateLimiter;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
@RestController
publ... |
/**
Jake
Written and maintained by Matthias Pueski
Copyright (c) 2009 Matthias Pueski
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 2
of the License, or (at you... |
package com.google.android.exoplayer2.d;
public final class b {
public static boolean DEBUG = true;
private static a apo = null;
public static void a(a aVar) {
apo = aVar;
}
public static void i(String str, String str2, Object... objArr) {
if (apo != null) {
apo.i(str,... |
package immersive.android.assembly.general.toolbarsandmenuslab;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.LinearLayout;
import android.widge... |
package com.framework.dao;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.framework.model.ActReModel;
public interface ActReModelMapper extends BaseMapper<ActReModel> {
int deleteByPrimaryKey(String id);
... |
package com.keithsmyth.testdealdetailsharness.map;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import com.keithsmyth.testdealdetailsharness.BaseFeatureController;
import com.keithsmyth.testdealdetailsharness.R;
import com.keithsmyth.testdealdetailsharness.model.Deal;
import java.util.List;
impo... |
package com.elanelango.apps.twitterjoy.home;
import android.content.Context;
import android.content.Intent;
import android.media.Image;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import and... |
package org.havryliuk.javaweb.model.exception;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class MissingRequestParameterExceptionTest {
@Test
public void testMissingRequestParameterException() {
String fieldName = "firstName";
MissingRequestParameterException e... |
package me.crafter.mc.multikillw;
import java.util.List;
import java.util.Map;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
public class KillListener implements Listener {
@EventHandler
public v... |
package com.allinpay.its.boss.framework.filter;
import java.io.IOException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.Serv... |
package exer;
public class Test1 {
public static void main(String[] args) {
Test1 StringAsParamOfMethodDemo = new Test1();
StringAsParamOfMethodDemo.testA();
}
private void testA() {
String originalStr = "original";
System.out.println("Test A Begin:");
System.out.println("The outer S... |
package com.qimou.sb.web.service;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.qimou.sb.web.entity.CustApplicationMan;
import com.q... |
package proyecto4;
import java.io.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.*;
public class graficador extends JFrame{
private int x;
private int y;
private int armonicos=1;
private double cx;
private double cy;
private JPanel contentPane;
public graficador(){
... |
package ru.android.messenger.view.interfaces;
import ru.android.messenger.model.dto.response.FriendStatus;
public interface UserInfoView extends ViewWithAlerts {
void setFriendStatus(FriendStatus friendStatus);
void setBlockStatus(boolean value);
}
|
public class ReverseInteger {
public int reverse(int x) {
int res = 0;
boolean isNegtive = x < 0 ? true : false;
// leave last number to check overflow
while (x/10 != 0) {
res = 10 * res + x % 10;
x /= 10;
}
int m = x % 10;
// check ove... |
package com.tencent.mm.plugin.chatroom;
import com.tencent.mm.g.a.jv;
import com.tencent.mm.g.a.jw;
import com.tencent.mm.g.a.jx;
import com.tencent.mm.g.a.jy;
import com.tencent.mm.g.a.kc;
import com.tencent.mm.g.a.rg;
import com.tencent.mm.sdk.b.b;
import com.tencent.mm.sdk.b.c;
class d$6 extends c<rg> {
final ... |
package misc;
import java.io.Externalizable;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStre... |
package com.api.controller;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.SimpleDateForma... |
package cs455.scaling.server;
import java.util.concurrent.atomic.AtomicLong;
public class ServerStatus {
private final AtomicLong clientsConnected = new AtomicLong();
private final AtomicLong packetsServed = new AtomicLong();
private final AtomicLong lastPacketCount = new AtomicLong();
private final A... |
package converter.Dto2Entity;
import dao.CategoryDao;
import dao.CategoryI18nDao;
import dao.LocaleDao;
import dto.CategoryDto;
import entity.Category;
import entity.CategoryI18n;
import entity.Locale;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframe... |
package isden.mois.magellanlauncher.models;
import android.support.v4.app.Fragment;
public interface KeyDownListener {
void onKeyDown(int keyCode);
}
|
package com.example.jinliyu.shoppingapp_1.activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;... |
/******************************************************************************
Write a program that Reverse an array using swaps (Page 17) given the Array Below;
A={1,2,3,4,5,6,7,8,9} to B={9,8,7,6,5,4,3,2,1}
*******************************************************************************/
public class ReverseArray... |
import java.util.Locale;
import java.util.Random;
import java.util.Scanner;
public class Dice {
private final int MAX_VALUE = 6;
private int rollValue;
private boolean isDouble;
private boolean isSecondDouble;
public Dice() { // does this class need a constructor - should we do the thing we did in SDP for only a... |
package com.smxknife.java2.bloom.test;
import com.smxknife.java2.bloom.BloomHash;
import com.smxknife.java2.bloom.JavaBitSetBloomFilter;
/**
* @author smxknife
* 2021/4/13
*/
public class JavaBitSetBloomFilterTest {
public static void main(String[] args) {
JavaBitSetBloomFilter filter = new JavaBitSetBloomFilte... |
package views;
import controllers.Constant;
import static controllers.Constant.COLOR_BACKGROUND_BUTTON;
import static controllers.Constant.REGISTOR_FONT;
import controllers.Events;
import java.awt.Color;
import java.awt.GridLayout;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import java... |
package com.example.behavioral.memento;
/**
* Copyright (C), 2020
* FileName: MementoPatternDemo
*
* @author: xieyufeng
* @date: 2020/11/20 21:01
* @description:
*/
public class MementoPatternDemo {
public static void main(String[] args) {
CareTaker careTaker = new CareTaker();
Originator ... |
package com.milano.architecture.dao;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.sql.rowset.CachedRowSet;
import javax.sql.rowse... |
package com.zihui.cwoa.system.pojo;
import java.util.List;
public class sys_role {
private Integer roleId;
private String roleName;
private Integer roleLevel;
private String roleCode;
private Integer roleParentId;
private sys_role parentRole;
private List<sys_users> ... |
package com.tencent.mm.plugin.appbrand.report.a;
import com.tencent.mm.plugin.appbrand.page.p;
public interface g extends f {
public static final g grq = new 1();
a amJ();
a g(p pVar);
boolean vr(String str);
}
|
package com.qgil.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qgil.common.pojo.DatatablesView;
import com.qgil.mapper.QgilUs... |
package LessonsJavaCore_14.Task_1;
import java.util.*;
import static MyClassesToWork.Print.print;
public class main {
public static void main(String[] args){
print("--------------\n" +
" HashSet \n" +
"--------------\n" +
"");
Set<lessons14> less... |
package edu.iit.cs445.StateParking.Objects;
import java.util.*;
public class ReportOfAdmission extends Report {
public ArrayList<ParkAdmDetail> admission_by_park = new ArrayList<ParkAdmDetail>();
public ReportOfAdmission() {
this.id = 907;
this.name = "Admission report";
this.StartDate = " ";
this.EndDate =... |
import java.util.LinkedList;
public class UnitTest {
private static Store store = new Store();
public static void unitTest() {
addItemsTest();
printItemsTest();
printItemsSortedTest();
searchItemSortedTest();
addCustomerTestTest();
printCustomersTest();... |
package arrays;
/**
* Leetcode 41.
*/
public class FirstMissingPositive {
public static void main(String[] args) {
}
}
|
package com.eratoiklio.neighborscar.ride;
import org.springframework.data.jpa.repository.JpaRepository;
public interface RideRepository extends JpaRepository<Ride, Long>, RideRepositoryCustom {
}
|
package br.edu.ifam.saf.relatorios;
import android.util.Log;
import br.edu.ifam.saf.SAFService;
import br.edu.ifam.saf.api.data.ItemRelatorioResponse;
import br.edu.ifam.saf.api.data.MensagemErroResponse;
import br.edu.ifam.saf.util.ApiCallback;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Sch... |
package com.appdear.client.model;
import java.io.Serializable;
/**
* 访问权限列表
* @author zqm
*
*/
public class PermissionListInfo implements Serializable {
/**
* 权限编码
*/
public String permcode = "";
/**
* 权限中文描述
*/
public String permdescch = "";
/**
* 权限英文描述
*/
public String permdescen = "";
... |
package main;
import net.egork.utils.io.InputReader;
import net.egork.utils.io.OutputWriter;
public class TaskC {
long h1, a1, x1, y1, x, p1;
long h2, a2, x2, y2, y, p2;
int m;
int count;
long calk_x(long h){
count++;
if(count>m+21)return Integer.MAX_VALUE;
if(h==a1)r... |
package example.payroll;
import java.util.Optional;
import java.util.UUID;
public interface PersonRepository {
// ...
Optional<Person> findByUuid(UUID uuid);
// ...
}
|
package cn.hrmzone.table;
import cn.hrmzone.util.FileNameParser;
import com.baidu.aip.ocr.AipOcr;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.HashMap;
public class TableOcr {
private AipOcr client;
private String imgPath;
ExcelUtil excelUtil;
String sheetName,fileName;
... |
package top.wangruns.nowcoder.sword2offer;
/**
*
* 题目描述
统计一个数字在排序数组中出现的次数
*
* 分析
看看到了排序的数组中查找某一个值很自然的就想到了二分查找,这里可以先查找第一次和最后一次出现的位置
*/
public class P37_数字在排序数组中出现的次数 {
public int GetNumberOfK(int [] array , int k) {
int l=0,r=array.length-1,firstIndex=1,lastIndex=0;
//获取第一次出现的下标
while(l<=r) {
int mid=... |
package Deck;
public enum Rank {
ACE("ace", 11), TWO("two", 2), THREE("three", 3), FOUR("four", 4), FIVE("five", 5), SIX("six", 6), SEVEN("seven", 7),
EIGHT("eight", 8), NINE("nine", 9), TEN("ten", 10), JACK("jack", 10), QUEEN("queen", 10), KING("king", 10);
// variables
protected final String rankName;
protec... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.