text stringlengths 10 2.72M |
|---|
package evolutionYoutube;
import java.util.List;
import com.vaadin.ui.Button;
import com.vaadin.ui.UI;
import database.BD_general;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Grid;
public class Lista_Categoria extends Lista_Categoria_ventana {
/**
*
*/
private static final long serialVersion... |
package by.htp.train04.main;
public class StationLogic {
public Train[] sortNumTrain(Station station) {
Train[] trains = station.getTrains();
int index = 0;
Train minTrain;
for (int i = 0; i < trains.length - 1; i++) {
minTrain = trains[i];
index = i;
for (int j = i + 1; j < tra... |
@Stateless
public class gestionReservation implements gestionResaLocal{
}
|
package th.ku.emailtemplate;
import java.util.HashMap;
import java.util.Map;
public class Template {
private String variableData;
private String templateText;
private Map<String,String> variables;
public Template(String templateText){
this.templateText = templateText;
this.variables... |
package io.t99.philesd;
import io.t99.philesd.util.NumberBaseConverter;
import io.t99.philesd.websocket.WebSocket;
public class Philesd {
public static void main(String[] args) {
// for (byte b: "Hello".getBytes()) {
//
// System.out.println(b);
//
// }
//WebSocket ws = new WebSocket(1200);
//ws.e... |
/*
* FilterGenotypeTable
*/
package net.maizegenetics.dna.snp;
import net.maizegenetics.dna.map.Chromosome;
import net.maizegenetics.dna.map.PositionList;
import net.maizegenetics.dna.map.PositionListBuilder;
import net.maizegenetics.dna.snp.bit.BitStorage;
import net.maizegenetics.dna.snp.bit.DynamicBitSto... |
package com.example.stoom.model;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
public class AddressRequest {
@Size(max= 100)
@NotBlank(message = "Nome da rua obrigatório")
pri... |
// PSEUDOCODE
/*
* This class class will have 4 buttons each a different direction.
* It will also have a circle shape that will respond to the button presses
* by going in that specific direction.
*/
package application;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.geom... |
package org.os.dbkernel.fdb.fdbtracemerger;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.Instant;
import java.time.ZoneId;
import java.util.ArrayList;
import java.util.A... |
class Solution {
public int subarraySum(int[] nums, int k) {
HashMap<Integer, Integer> arrSums = new HashMap();
arrSums.put(0, 1);
int sum = 0, result = 0;
for (int i = 0; i < nums.length; i++) {
sum += nums[i];
//if (arrSums.containsKey(su... |
public class Manager extends Common
{
public void DeleteClerck()
{
}
public void Permission()
{
}
}
|
package com.ipincloud.iotbj.srv.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Time;
import java.sql.Date;
import java.sql.Timestamp;
import com.alibaba.fastjson.annotation.JSONField;
//(Algorithmalarm)报警记录
//generate by redcloud,2020-07-24 19:59:20
public class Algorithmalarm imple... |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Stack;
import java.util.StringTokenizer;
public class bj1260 {
static int grahp[][];
static StringBuilder sbDfs = new StringBuilder();
static St... |
package basic.第三章;
import java.util.Scanner;
/**
* 循环小数(Repeating Decimals)
* 题目:
* 输出a/b的循环小数表示以及循环节长度
* Created by Administrator on 2018/4/12.
* <p>
* 第一步:先算出 a/b 的 商
* 第二步:算出 a%b 的余数
* 第三步:循环计算 (余数远远小于除数,所以需要将余数扩大10倍,然后再被除数相除,然后循环)
*
* @author 丹丘生
*/
public class RepeatingDecimals {
static int[] a... |
/*
* ============================================================================
* = COPYRIGHT
* PAX TECHNOLOGY, Inc. PROPRIETARY INFORMATION
* This software is supplied under the terms of a license agreement or
* nondisclosure agreement with PAX Technology, Inc. and may not be copied
* or d... |
/*
* ################################################################
*
* ProActive Parallel Suite(TM): The Java(TM) library for
* Parallel, Distributed, Multi-Core Computing for
* Enterprise Grids & Clouds
*
* Copyright (C) 1997-2011 INRIA/University of
* Nice-Sophia Antipolis/ActiveEon
... |
import java.util.Objects;
public class OutputPair {
private int output1;
private int output2;
OutputPair() {
}
OutputPair(int output1, int output2) {
this.output1 = output1;
this.output2 = output2;
}
@Override
public boolean equals(Object o) {
if (this == o) ... |
package Supermercado;
import java.util.ArrayList;
import java.util.Collection;
public class Venda {
private final int idVenda;
private static int totalIDVenda;
private final Collection produtosCompra = new ArrayList();
private float valorTotal = 0;
private float troco;
private String formaPag... |
package lollypop_tips.saulmm.lollipoptips;
import android.app.ActivityOptions;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Outline;
import android.app.Activity;
import android.content.Intent;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import a... |
/**
* MIT License
* <p>
* Copyright (c) 2019-2022 nerve.network
* <p>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to... |
package other;
import java.util.Scanner;
/**
* 河内塔
*
* @author danqiusheng
* @since 2019-03-10
*/
public class TowersOfHanoi {
static int count = 0;
public static void main(String[] args) {
Scanner read = new Scanner(System.in);
int n = read.nextInt();
hanoi(n, 'A', 'B', 'C'); //... |
package gov.nih.nci.ctrp.importtrials.util;
import com.google.common.io.Resources;
import gov.nih.nci.ctrp.importtrials.dto.*;
import gov.nih.nci.ctrp.importtrials.dto.ctgov.ClinicalStudy;
import gov.nih.nci.ctrp.importtrials.studyprotocolenum.StudyStatusCode;
import org.apache.commons.lang3.time.DateUtils;
import o... |
package com.example.isvirin.storeclient.data.entity.daoconverter;
public enum BrandType {
TEXT, LIST, PICTURE
}
|
package com.inheritance;
public class OverloadingDemo {
public static void main(String[] args) {
Shape s=new Shape();
System.out.println("Area of square "+s.area(20));
System.out.println("Area of Rectangle "+s.area(10,20));
}
}
|
package com.demo.decorator.ComputerMeal;
/**
* @author: Maniac Wen
* @create: 2020/3/30
* @update: 10:02
* @version: V1.0
* @detail:
**/
public abstract class Computer {
//获得商品信息
protected abstract String getMsg();
//获得商品价格
protected abstract int getPrice();
}
|
package com.java8.files;
import java.io.FileWriter;
import java.io.IOException;
/**
* @author Neeraj Kumar
*
* ARM can reduce the verbosity in the previous example
* FileWriterExample.java. Rather than using both the try and finally
* blocks, we can use a special form of the try block wi... |
package YouTubeTutorial;
public class LessonThree {
public static void main(String[] args) {
int randomNumber = (int)(Math.random() * 50);
System.out.println(randomNumber);
if (randomNumber < 25) {
System.out.println("Random number is less than 25");
} else if (random... |
package com.project.database;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import com.project.model.Party;
import com.project.model.Post;
public class DatabaseAccess {
private Connection currentCon = null;
publi... |
package com.yjn.haoba.domain;
import java.util.Date;
public class User {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database column user_tb.userId
*
* @mbggenerated Fri Mar 08 20:51:11 CST 2013
*/
private String userid;
/**
* This fi... |
package com.trump.auction.trade.model;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class ProductPic implements Serializable{
private static final long serialVersionUID = -7315438062272532712L;
/**
* 主键,不为空
*/
private Integer id;
/**
* 图片路径
... |
package be.openclinic.datacenter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Vector;
import webcab.lib.statistics.pdistributions.Norm... |
package com.karya.bean;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.NotEmpty;
public class PurItemsOrderReceiveBean {
private int poitrecId;
@NotNull
@NotEmpty(message = "Please enter the purchase order")
private String puOrder;
@NotNull
@NotEmpty(message = "Pl... |
package com.ut.database.entity;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.NonNull;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/**
* author : chenjiajun
* time ... |
package org.apache.hadoop.hdfs.server.blockmanagement;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.Random;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.F... |
package com.zantong.mobilecttx.widght;
import android.content.Context;
import android.content.res.TypedArray;
import android.text.InputFilter;
import android.text.InputType;
import android.text.TextUtils;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.wid... |
package sr.hakrinbank.intranet.api.controller;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.an... |
package me.kpali.wolfflow.core.model;
/**
* 任务流上下文
*
* @author kpali
*/
public class TaskFlowContextKey {
public static final String TASK_FLOW_ID = "taskFlowId";
public static final String IS_ROLLBACK = "isRollback";
public static final String FROM_TASK_ID = "fromTaskId";
public static final String... |
package redisOperation;
import org.junit.Before;
import org.junit.Test;
import redis.clients.jedis.Jedis;
import java.util.*;
import static java.lang.System.*;
public class RedisOps {
Jedis jedis;
@Before
public void setup (){
jedis = new Jedis("localhost");
}
/**
* redis存储初级的字符串
... |
package se.fam_karlsson.system.recipes.services;
import org.jboss.logging.Logger;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.ws.rs.HEAD;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
@Stateless
@Path("status")
public class S... |
package com.atguigu.springcloud.config;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Configuration;
/**
* @author Yue_
* @create 2020-12-01-17:23
*/
@Configuration
@MapperScan({"com.atguigu.springcloud.dao"})
public class MyBatisConfig {
} |
import java.util.HashMap;
import java.util.Map;
public class CourseWithNumber {
private Map<String,Double> courseAndNumberList = new HashMap<>();
public CourseWithNumber(Map<String,Double> courseAndNumberList) {
this.courseAndNumberList = courseAndNumberList;
}
public Map<String, Double> get... |
package plugins.fmp.fmpTools;
import java.awt.Point;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.file.attribute.FileTime;
import java.util.ArrayList;
import org.apache.poi.ss.util.CellReference;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.xssf.u... |
package scolarite;
public class NbEtudiantsException extends Exception{
private int nbErr;
public NbEtudiantsException(int nbErr) {
this.nbErr = nbErr;
}
public String toString() {
return "Nb etudiants erroné : "+nbErr;
}
}
|
import java.util.Scanner;
public class unique {
public static void main(String[] args) {
int n;int s=0;
Scanner sc=new Scanner(System.in);
n=sc.nextInt();
int arr[]=new int[n];
for(int i=0;i<n;i++)
{
arr[i]=sc.nextInt();
}
for(int j=0;j<n;j++)
{
if(frequency(arr,arr[j])==false)
{
s... |
package io.snice.buffer;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
import java.util.function.Consumer;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.fail;
public abstract class AbstractReadWritableBufferTest extends Ab... |
package ru.avokin.swing.codeviewer.model;
import ru.avokin.highlighting.HighlightedCodeBlock;
import ru.avokin.utils.StringUtils;
import javax.swing.text.BadLocationException;
import javax.swing.text.PlainDocument;
import java.util.Collections;
import java.util.List;
/**
* User: Andrey Vokin
* Date: 29.09.2010
*/... |
package com.example.teeshirt.add;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.TextView;
im... |
package com.shangdao.phoenix.entity.pictureturn;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.shangdao.phoenix.entity.entityManager.EntityManager;
import com.shangdao.phoenix.entity.interfaces.ILogEntity;
import com.shangdao.phoenix.entity.state.State;
import com.shangdao.phoenix.entity.user.User;
im... |
package Datos;
import java.util.List;
import Negocio.Socio;
public interface SociosManager {
public List<Socio> getAllSocios();
public void addSocio(Socio newSocio);
public void editSocio(int idSocio, Socio modifiedSocio) throws Exception;
public void deleteSocio(int idSocio);
public List<Str... |
package com.niksoftware.snapseed.core.filterparameters;
import android.content.Context;
public class CropAndRotateFilterParameter extends FilterParameter {
private static final int[] FILTER_PARAMETERS = new int[]{42, 41, 40, 43, 44, 45, 46};
public int getFilterType() {
return 20;
}
protecte... |
package com.zym.blog.model.example;
import java.util.ArrayList;
import java.util.List;
public class RightExample {
protected String pk_name = "right_id";
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public RightExample() {
oredCrite... |
package com.training.utils;
import java.sql.SQLException;
import java.util.List;
import com.training.entity.Donor;
public interface DAO {
public int add(Donor donor) throws SQLException;
public List<Donor> getAllDonors() throws SQLException;
public List<Donor> searchDonorByLocationAndGroup(String l... |
public class StringS{
public static void main(String[] args){
String s = args[0];
int count = 0;
while(!StdIn.isEmpty()){
String read = StdIn.readString();
for(int i = 0; i < read.length(); i++){
if(read.equals(s)){
count++;
}
}
}
System.out.println(count/3);
}
} |
package com.uchain.networkmanager.message;
public enum MessageType {
Version(0), BlockProduced(1), GetBlocks(2), Block(3), Blocks(4), Inventory(5),Getdata(6), Transactions(7), RPCCommand(8);
private int value;
private MessageType(int value) {
this.value = value;
}
public static int getMessageTypeByT... |
package hackerrankq;
public class StringMerger {
public static String stringMerger(String s1, String s2) {
StringBuilder mergedString = new StringBuilder();
int len1 = s1.length();
int len2 = s2.length();
for (int i = 0; i < len1 || i < len2; i++) {
if (i < len1) {... |
package seedu.project.storage;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static seedu.project.testutil.TypicalTasks.FEEDBACK;
import static seedu.project.testutil.TypicalTasks.LECTURE;
import static seedu.project.testutil.TypicalTasks.TUTORIAL;
import static seedu.... |
package com.androidsample.wearableapp;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import com.google.android.gms.wearable.DataEvent;
import com.google.android.gms.wearable.DataEventBuffer;
import com.google.android.gms.wearable.DataMap;
import com.g... |
/*
* ID: nareddyt
* LANG: JAVA
* TASK: mirrors
*/
import java.awt.Point;
import java.io.*;
import java.util.*;
public class P1_Mirrors
{
public static void main(String[] args) throws IOException
{
BufferedReader f = new BufferedReader(new FileReader("mirrors.in"));
PrintWriter out = new Print... |
package pro.likada.service.serviceImpl;
import org.primefaces.model.TreeNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pro.likada.dao.ProductGroupDAO;
import pro.likada.model.ProductGroup;
import pro.likada.service.ProductGroupService;
import pro.likada.util.TreeNodeUtil;
import javax.inject.In... |
package org.digdata.swustoj.hibernate.template;
import org.digdata.swustoj.base.BaseTemplate;
import org.digdata.swustoj.hibernate.entiy.UserRole;
public interface UserRoleTemplate extends BaseTemplate<UserRole> {
}
|
package com.stk123.task.strategy;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import com.stk123.model.Ene;
import com.stk123.model.Index;
import com.stk123.model.K;
import com.stk123.common.util.EmailUtils;
import com.stk123... |
package edu.asu.commons.event;
/**
* $Id$
*
* Marks all classes capable of generating Events and dispatching them to
* interested subscribers.
*
* @author alllee
* @version $Revision$
*/
public interface EventGenerator {
/**
* Subscribes the given EventHandler to this EventGenerator, signifying
... |
import org.codehaus.jackson.map.ObjectMapper;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationC... |
public class Human {
protected String name = "";
protected int strength = 50;
protected int stealth =3;
protected int health =100;
protected int intelligence =3;
public Human() {
}
public Human(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(Str... |
/*
* Copyright 2017 Goldman Sachs.
* 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 in... |
/**
*/
package com.akgundemirbas.mdd.gui.tests;
import com.akgundemirbas.mdd.gui.GuiFactory;
import com.akgundemirbas.mdd.gui.VerticalLayout;
import junit.textui.TestRunner;
/**
* <!-- begin-user-doc -->
* A test case for the model object '<em><b>Vertical Layout</b></em>'.
* <!-- end-user-doc -->
* @generated
... |
package com.test.thread;
/**
* Created with IntelliJ IDEA.
* User: wuzbin
* Date: 13-4-18
* Time: 下午5:21
* To change this template use File | Settings | File Templates.
*/
public class InterruptTest {
public static Thread t1 = new Thread(new Runnable() {
@Override
public void run() {
... |
package com.base.spring.security;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
pu... |
package com.generic.core.services.service;
public interface UserInterestsServiceI {
}
|
/*
* 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 unt.herrera.prog2.tp5;
import java.time.LocalDate;
/**
*
* @author jonas
*/
public class GestorRolEnTrabajo i... |
/**
* Copyright (c) 2012, Institute of Telematics, Institute of Information Systems (Dennis Pfisterer, Sven Groppe, Andreas Haller, Thomas Kiencke, Sebastian Walther, Mario David), University of Luebeck
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, ar... |
package forms;
import core.ActionManager;
import core.ActionNote;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.CheckBox;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;
import storage.DatabaseManage... |
package com.platform.web.rest;
import com.platform.Application;
import com.platform.domain.Presencestatus;
import com.platform.repository.PresencestatusRepository;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.hamcrest.Matchers.hasItem;
import org.mockito.MockitoAn... |
package io.qtechdigital.onlineTutoring.mapper.user.impl;
import io.qtechdigital.onlineTutoring.mapper.user.UserMapper;
import io.qtechdigital.onlineTutoring.dto.auth.AuthenticatedUserDto;
import io.qtechdigital.onlineTutoring.dto.security.RoleShortDto;
import io.qtechdigital.onlineTutoring.dto.user.response.UserShortD... |
package com.soy.seckill.dao.cache;
import com.soy.seckill.dao.SeckillDao;
import com.soy.seckill.entity.Seckill;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframewor... |
package com.gr.cinema.domain;
public class Show {
private String showId;
private String movieId;
private String theaterId;
private String showStartTimes;
public String getMovieId() {
return movieId;
}
public void setMovieId(String movieId) {
this.movieId = movieId;
}
public String getTheaterId() {
re... |
package com.example.android.addmusic;
/**
* {@link Song} represents a song that the user wants to listen.
* It contains the name of the song, the interpreter, the url for the youtube video clip and an image for that word.
*/
public class Song {
/** Name of the song */
private String mName;
/** Sin... |
package org.mini2Dx.libgdx;
import com.badlogic.gdx.Gdx;
import org.mini2Dx.core.JvmPlatformUtils;
public abstract class LibgdxPlatformUtils extends JvmPlatformUtils {
@Override
public void exit(boolean ignorePlatformRestrictions) {
Gdx.app.exit();
}
}
|
/*
* 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 latihanjavafx;
/**
*
* @author Fifi Agustina
*/
public class FrameIdealTubuh extends javax.swing.JFrame {
/**
* C... |
package com.dungkk.gasorder.fragment;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.... |
package com.wangcheng.base;
public class HashCodeTest {
public static void main(StringTest[] args) {
String s = new String("ab");
System.out.println(s);
System.out.println(s.hashCode());
}
@Override
protected Object clone() throws CloneNotSupportedException {
return su... |
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2017.06.17 at 11:12:4... |
/*
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
package com.stack;
import java.util.Stack;
/* 逆序栈
* 要求:使用递归思想和栈操作实现
*/
public class ReverseStack<E> {
protected Stack<E> s;
public ReverseStack(Stack<E> s) {
this.s=s;
}
public void reverse() {
if(s.isEmpty()) {
return;
}
E temp = getBottomElement();
reverse();
s.push(temp);
}
private E ... |
/*
* Copyright 2014-2023 JKOOL, 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 agreed to... |
public class ATM {
private BankNetwork network;
private Keyboard keyboard;
private NFCReader nfcReader;
private CardReader cardReader;
private Printer printer;
private CashDispenser cashDispenser;
private Screen screen;
public ATM() {
ne... |
public class BattleSystem {
public BattleSystem(){
}
public int dealtDamage(UserChar u, Enemy e, int t){
int str = 0, def = 0, dmg;
if(t == 0){ // enemy's turn
str = e.returnStr();
def = u.returnDef();
}
else if(t == 1){ // player's turn
str = u.returnStr();
def = e.returnDe... |
package kr.or.ddit.riskboard.controller;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import kr.or.ddit.profile_file.service.IProfileFileServi... |
package com.lipnus.gleam.etc;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import com.android.volley.AuthFailureError;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.and... |
package redempt.crunch.exceptions;
public class ExpressionEvaluationException extends RuntimeException {
public ExpressionEvaluationException(String message) {
super(message);
}
}
|
package edu.mit.cameraCulture.vblocks.predefined;
import java.util.Random;
import java.util.Vector;
import org.opencv.android.Utils;
import org.opencv.core.Mat;
import org.opencv.core.Point;
import org.opencv.imgproc.Imgproc;
import android.content.Context;
import android.content.Intent;
import android.g... |
package service;
import com.sparsity.sparksee.algorithms.SinglePairShortestPathDijkstra;
import com.sparsity.sparksee.gdb.*;
/**
* Created by qiaoruixiang on 14/06/2017.
*/
public class RouteGenerator {
//private Context mContext;
public RouteGenerator() {
}
/*
public RouteGenerator(Context... |
package org.bookmanagement.service;
import org.bookmanagement.entity.UserEntity;
import org.bookmanagement.repository.UserRepository;
import org.bookmanagement.request.UserLoginRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ... |
package com.fwo.hp.fwo.app.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* Created by ana.j.saragossa on 10/24/17.
*/
public class Extract {
@SerializedName("translation")
@Expose
private String translation;
@Seriali... |
import java.util.Scanner;
public class MyStringMethods
{
//class variable declarations
private String myStr="";
/**************************************
* Prompts the user to input a string.*
**************************************/
public void readString()
{
Scanner Keyboard ... |
package com.esum.framework.core.component.rule.processor;
import com.esum.framework.core.component.ComponentException;
/**
* RuleProcessing.
*
* 수신한 메시지에 대한 Header Parsing Rule을 적용할 수 있으며, 각각의 컴포넌트에서
* Rule파싱을 사용할 수 있도록 정의할 수 있다.
*/
public interface IRuleProcessor {
public <T> T preProcess(Object[] params) t... |
package com.clc.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpS... |
package DataStructures.arrays;
/**
You are given an n x n square 2D matrix that represents the pixels of an image.
Rotate it by 90 degrees in the clockwise direction.
Example:
Input Matrix:
1 0
0 1
Output:
0 1
1 0
*/
public class RotateMatrix {
public static void rotateMatrix90(int a[][]) {
if(... |
package _DAO;
import java.io.File;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import _DTO.Book;
import _DTO.BuyList;
import _DTO.CartList;
import _DTO.Review;
public class BookDAO {
private BookDAO() {}
... |
package com.ConfigPoste.RecetteCuisine.RecetteCuisine.services;
public class UploadFileResponse {
private int id;
private String fileName;
private String uri;
private String contentType;
private long size;
public UploadFileResponse(int idFile,String name, String fileDownloadUri, String conte... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.