text stringlengths 10 2.72M |
|---|
/*
* Lesson 9 Coding Activity Question 2
*
* Write the code to print a random integer from -20 to 20 inclusive using Math.random().
*
*/
import java.lang.Math;
class Lesson_9_Activity_Two {
public static void main(String[] args)
{
System.out.println((int) (Math.random() * (41)) - 20);
}
} |
package com.next.api;
import com.next.api.controller.interceptor.UserTokenInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.co... |
package org.gtbank.rw.mvisa.handler;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.TimeZone;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.gtbank.rw.mvisa.domain.MVisaUser;
import org.gtbank.rw.mvisa.domain.Transaction;
import org.gtbank... |
package com.metoo.foundation.dao;
import org.springframework.stereotype.Repository;
import com.metoo.core.base.GenericDAO;
import com.metoo.foundation.domain.Document;
@Repository("documentDAO")
public class DocumentDAO extends GenericDAO<Document> {
} |
package com.cheese.radio.inject.component;
import com.cheese.radio.inject.module.FragmentModule;
import com.cheese.radio.inject.scope.FragmentScope;
import com.cheese.radio.ui.demo.coordinatorLayout.fragment.DemoFragment;
import com.cheese.radio.ui.home.circle.CircleFragment;
import com.cheese.radio.ui.home.clock.Cloc... |
package behavioral.strategy;
public interface IStrategy {
public void doA();
}
|
package exam.iz0_803;
public class Exam_114 {
}
/*
Given:
class MarksOutOfBoundsException extends IndexOutOfBoundsException {}
public class GradingProcess {
void verify(int marks) throws IndexOutOfBoundsException {
if (marks > 100) {
throw new MarksOutOfBoundsException();
}
if ... |
package pl.basistam.dataAccess.entities;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import pl.basistam.dataAccess.common.Role;
import javax.persistence.*;
import java.io.Serializable;
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Tab... |
package com.test.screens;
import com.test.Configurations.FlickrAPISearch;
import com.test.Configurations.Hooks;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.IOSElement;
import io.appium.java_client.pa... |
package com.nantian.foo.web.util;
public class BaseConst
{
public static long MIDDLE_NODE=0;
public static long AUTHORITY_LEAF=3;
public static int RESPONSE_ERR=555;
public static int SESSION_INVALID_ERR=556;
public static long CORE_AUTHORITY_LIMIT=500;
public static long NORMAL_AUTHORITY_LIMIT=10... |
package water.eluosifangkuai.ui;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import water.eluosifangkuai.config.FrameConfig;
import water.eluosifangkuai.config.GameConfig;
import water.eluosifangkuai.dto.GameDto;
/**
* 绘制窗口
* @author Lenovo
*
*/
public abstract... |
/**************************** Zhong Yang *********************************/
// This class is for implement "Load iRods" item in Data menu.
package net.maizegenetics.analysis.data;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.Frame;
import java.... |
package Inputs;
import Actions.Open;
import Attributes.URLAtt;
import Attributes.WebpageTag;
import java.util.ArrayList;
public class SEOpen extends SE{
public ArrayList<String> inputs = new ArrayList<>();
public SEOpen() {
super(new Open());
inputs.add(new URLAtt().toString());
inpu... |
package com.codingchili.realmregistry.model;
import com.codingchili.common.RegisteredRealm;
import com.codingchili.core.configuration.Attributes;
/**
* @author Robin Duda
*
* Contains realm metadata used in the realm-list.
*/
public class RealmMetaData extends Attributes {
private long updated;
... |
package com.cinema.biz.model;
import com.cinema.biz.model.base.TSimRepair;
public class SimRepair extends TSimRepair {
} |
package model;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class Local {
private StringProperty id_Local;
private StringProperty nombre, direccion;
public Local(String id_Local, String nombre, String direccion) {
super();
this.id_Local = new SimpleSt... |
package rubrica;
public class Contatto {
String name;
String surname;
String tel;
String key;
public Contatto(){
name = "";
surname = "";
tel = "";
key = "";
}
public Contatto(String name_){
name = name_;
surn... |
package com.example.springboottest.smalldemo.vo;
import com.fasterxml.jackson.annotation.*;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @JsonIgnoreProperties:使用在类声明处,和@JsonIgnore的区别是可以对多个属性作用
* 直接在value属性后面使用大括号逗号隔开, 属性ignoreUnknow为true表示忽略未定义的属性
* @Auther: WangHuidong
* @Date: 2018/12/25
... |
package gameData.Boards;
import com.fasterxml.jackson.annotation.JsonProperty;
import gameData.Battleships.Battleship;
import gameData.Utils.CoordinatesUtil;
import gameData.enums.Orientation;
import gameData.GameCommon;
import gameData.enums.TileState;
/**
* Created by paul.moon on 1/28/16.
*/
public abstract cla... |
package comp303.fivehundred.util;
/**
* @author Stephanie Pataracchia 260407002
*/
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import comp303.fivehundred.util.TestComparators;
@RunWith(Suite.class)
@Suite.SuiteClasses({
TestBySuitComparator.class,
TestByRankComparator.class,
T... |
package co.bucketstargram.common;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class Trace {
public static void init() {
Calendar calendar = Calendar.getInstance();
StackTraceElement[] trace = new Throwable().getStackTrace();
Date date = ... |
package com.limefriends.molde.menu_map.cache_manager;
import android.util.Log;
public class FileCacheNotFoundException extends Throwable {
public FileCacheNotFoundException(String format) {
Log.e("CacheNotFoundE", format);
}
}
|
/*
* 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 Clases.empleados;
import java.io.FileInputStream;
import java.util.Date;
/**
*
* @author jluis
*/
public cla... |
package com.goldsand.collaboration.connection;
interface MessageSendListener {
public void onDataSendDone(int id, boolean success);
}
|
package pl.edu.pw.elka.blocks.domain;
import pl.edu.pw.elka.blocks.dto.BlockDetailsDto;
public class BlockFacade {
private final BlockchainConnector blockchainConnector;
public BlockFacade(BlockchainConnector blockchainConnector) {
this.blockchainConnector = blockchainConnector;
}
public Bl... |
package com.legado.grupo.controller;
//librerias
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.legado.grupo.dom.Asignatura;
import com.legado.grupo.dom.Carrera;
import com.legado.grupo.dom.Facultad;
import com.legado.grupo.dom.Grupo;... |
package kamyshevat.task3.controlStructures;
public class TestArray {
static int count0 = 0, count1 = 0, count2 = 0, count3 = 0, count4 = 0, count5 = 0, count6 = 0, count7 = 0, count8 = 0, count9 = 0, count10 = 0;
public static void main(String[] args) {
int[] array = new int[50];
for (int i =... |
package com.wickvood.albumsearch.mvp.presenter;
import android.util.Log;
import com.arellomobile.mvp.InjectViewState;
import com.arellomobile.mvp.MvpPresenter;
import com.wickvood.albumsearch.App;
import com.wickvood.albumsearch.NetworkService;
import com.wickvood.albumsearch.mvp.model.SongResultModel;
import com.wic... |
package Reader;
import parameters.*;
import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
import java.util.Set;
public class ReadWit... |
package com.example.PollingApplication.dto;
import java.util.Collection;
public class VoteResult {
private int totalVotes;
private Collection<ChoiceCount> results;
public int getTotalVotes() {
return totalVotes;
}
public void setTotalVotes(int totalVotes) {
this.totalVotes = tot... |
package com.icanit.app_v2.ui;
import android.app.Dialog;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.view.LayoutInflater;
import android.view.View;
import and... |
package Lector13.Task5;
import com.sun.org.apache.xpath.internal.objects.XBoolean;
public class WordCount {
public static void wordCount (String str){
int count = 0;
String[] strArr = str.split(" +");
for (int i = 0; i < strArr.length; i ++){
count++;
}
System.o... |
package diplomski.autoceste.services;
import diplomski.autoceste.forms.VehicleDto;
import diplomski.autoceste.forms.VehicleParameterDto;
import diplomski.autoceste.models.PrivateUser;
import diplomski.autoceste.models.Vehicle;
import diplomski.autoceste.models.VehicleCategory;
import diplomski.autoceste.repositories.P... |
package com.gfkl.adventofcode;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.junit.jupiter.api.Assertions.*;
public class PasswordCheckerTest
{
@Test
public void shouldFindTwoValidPasswords() throws IOException {
assertEquals(2, PasswordChecker.checkRangePassword... |
package chapter7;
public class Employee {
private String firstName;
private String lastName;
private static int minWage;
private Date birthDate;
private Date hireDate;
public Employee() {
this(null,null);
}
public Employee(String fName, String lName) {
firstName = fName;
lastName = lName;
}
... |
package com.sh.offer.tree;
import com.sh.leetcode.structure.TreeNode;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
/**
* @Auther: bjshaohang
* @Date: 2019/2/2
*/
public class PrintFromTopToButtom {
public static void main(String[] args) {
int[] array = {0,1,2,3,4,5... |
package com.tsuro.tile;
import com.tsuro.board.Token;
import java.awt.Graphics;
import javax.swing.JComponent;
import javax.swing.plaf.LayerUI;
import lombok.NonNull;
/**
* A {@link LayerUI} for {@link TileComponent}s, where this Layer draws the token on a Tile.
*/
public class TokenLayer extends LayerUI<JComponent... |
package msip.go.kr.memo.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import msip.go.kr.common.entity.Item;
@SuppressWarnings("serial")
@Entity
@Table(name="memo")
public class Memo extends Item {
@Column(name="content", columnDefinition="VA... |
/*
* Copyright (C) 2015 Adrien Guille <adrien.guille@univ-lyon2.fr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later vers... |
package br.com.rafagonc.tjdata.models;
import br.com.rafagonc.tjdata.repositories.CookieRepository;
import br.com.rafagonc.tjdata.repositories.ESAJCaptchaRepository;
public class ESAJCaptchaRepositoryKit {
private ESAJCaptchaRepository captchaRepository;
private CookieRepository cookieRepository;
public... |
package info.datacluster.crawler.mapper;
import info.datacluster.crawler.entity.CrawlerTask;
public interface CrawlerTaskMapper {
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table crawler_task
*
* @mbg.generated Sun Aug 25 22:01:54 CST 2019
... |
/*-----------------------------------------------------------------------------
CS 211
01/20/2015
Kathryn Brusewitz
Class: ItemOrder
Super Class: Object
Implements: None
ItemOrder represents a shoppers order for a given Item in a given quantity.
Public Interface ------------------------------------... |
/*
* 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.citibank.ods.entity.pl.valueobject;
import java.math.BigInteger;
import java.util.Date;
import com.citibank.ods.common.entity.valueobject.BaseEntityVO;
/**
* @author m.nakamura
*
* Representação da tabela de Memória de Risco.
*/
public class BaseTplMrDocPrvtEntityVO extends BaseEntityVO
... |
package si.vei.pedram.builditbigger;
import android.test.AndroidTestCase;
import java.util.concurrent.TimeUnit;
/**
* Created by pedram on 20/12/15.
*/
public class EndpointsAsyncTaskTest extends AndroidTestCase {
public void testJokeIsReturned() {
try {
EndpointsAsyncTask jokeTask = new End... |
package com.nematjon.edd_client_season_two.services;
import android.Manifest;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
imp... |
package net.lshift.lee.jaxb.xml;
import javax.xml.bind.annotation.XmlAttribute;
public class GrandchildElement {
@XmlAttribute(name = "grandchild-name")
private String grandchildName;
public GrandchildElement() {}
public String getGrandchildName() {
return grandchildName;
}
}
|
package behavioral.visitor;
/**
* @author Renat Kaitmazov
*/
public final class Phone implements Visitable {
/*--------------------------------------------------------*/
/* Instance variables
/*--------------------------------------------------------*/
private double price;
/*----------------... |
package Eventos;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import Interfce_Grafica.Menu;
public class EventoAlteraResposta implements ActionListener{
private Menu menu;
public EventoAlteraResposta(Menu menu){
this.menu = menu;
}
public void actionPerformed(ActionEvent e) {
... |
package com.lxj.leaf;
import java.awt.Point;
import java.awt.geom.Line2D;
import java.util.Vector;
import javax.media.j3d.Appearance;
import javax.media.j3d.LineAttributes;
import javax.media.j3d.Material;
import javax.media.j3d.PolygonAttributes;
import javax.media.j3d.Shape3D;
import javax.media.j3d.Transform3D;
im... |
package com.intel.realsense.librealsense;
public class Pipeline extends LrsClass{
public Pipeline(){
RsContext ctx = new RsContext();
mHandle = nCreate(ctx.getHandle());
}
public void start() throws Exception{
PipelineProfile rv = new PipelineProfile(nStart(mHandle));
rv.... |
package mx.com.otss.c3.acceso;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import and... |
package com.miyatu.tianshixiaobai.http.service;
import com.miyatu.tianshixiaobai.http.api.BaseInformationApi;
import com.miyatu.tianshixiaobai.http.api.ServiceApi;
import java.util.Map;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import rx.Observable;
public int... |
package it.polito.tdp.metrodeparis;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.ResourceBundle;
import it.polito.tdp.metrodeparis.model.*;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.ComboBox;
im... |
package com.orsegrups.splingvendas.dao;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import com.orsegrups.splingvendas.model.Cliente;
import com.orsegrups.splingvendas.model.Pedido;
import com.orsegrups.splingvendas.model.PedidoProduto;
import com.orsegrups.splingvendas.model.Produto... |
package com.qst.chapter02;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
public class MainActivity extends AppCompatActivity {
private MyApplication app;
@Override
protected void onStart() {
super.onStart();
}
@Override
protected ... |
package com.myvodafone.android.model.service.fixed;
import com.myvodafone.android.model.service.CommonFAQ;
import java.util.ArrayList;
import java.util.List;
/**
* Created by kakaso on 8/7/2015.
*/
public class FixedFAQCategory {
private int orderId;
private String greekName;
private String englishN... |
package ir.madreseplus.ui.view.practice;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import java.util.List;
import ir.madreseplus.data.DataManager;
import ir.madreseplus.data.model.req.Practice;
import ir.madreseplus.data.model.req.Task;
import ir.madreseplus.ui.base.BaseViewModel;... |
package com.news.demo.Utils;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;
public class OrderCodeFactoryUtils {
private static final String ORDER_CODE = "A";//置顶新闻类
private static final String RETURN_ORDER = "B";//推荐新闻类
private static fi... |
public class Office extends MeetingPlace {
private final Manager manager;
public Office(int numberOfAttendees, Manager manager) {
super(numberOfAttendees);
this.manager = manager;
}
@Override
public void conductMeeting() {
System.out.println("Manager's office meeting has begun.");
try {
Thread.sleep... |
package com.fiume.billingmechine.activity;
import android.app.Activity;
import android.content.DialogInterface;
import android.database.Cursor;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.view.WindowManager;
import android.widget.... |
/*
* Copyright © 2020-2022 ForgeRock AS (obst@forgerock.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... |
package org.vincent.taskexecutor;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
/**
* @author PengRong
* @package org.vincent.taskexecutor
* @ClassName MainTaskExecutor.java
* @date 2019/6/16 -... |
package com.esum.web.ims.ebms.vo;
public class EbmsInfo {
// primary key
private String interfaceId;
// fields
private String inboundCpaId;
private String inboundFromPartyId;
private String inboundService;
private String inboundAction;
private String outboundAuthInfoId;
private String outboundCpaId;
priv... |
package com.revolut.moneytransfer.dao.impl;
import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.dbutils.DbUtils;
import org.slf4j.Logger;
import org.sl... |
package ChessGame;
/**
* The NullSpot class extends the ChessPiece class.
*
* Created by Brandon on 11/29/2016.
*/
public class NullSpot extends ChessPiece {
/**
* constructor: Null Spot "piece"
*
* @param name
* @param c
* @param pic
*/
public NullSpot(String name, int c, String pic) {
... |
public class FibonacciSeries {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int n1=1;
int n2 =1;
int n3;
// int temp = 1;
// System.out.print(n1 + " ");
// System.out.print(n2 + " ");
// for(int i = 1; i <15-2; i++){
// n2 = temp+n2;
// Syste... |
import java.io.*;
import java.util.Scanner;
public class GridAreaCounter {
public static void read(String fileName, char[][] grid) {
int i = 0;
try {
Scanner read = new Scanner(new File(fileName));
do {
String line = read.nextLine();
for (int j = 0; j < 8; j++) {
grid[i + 1][j + 1] = line.char... |
package com.camila.web.dominio.models;
public enum StatusVenda {
ANDAMENTO,CANCELADA,CONCLUIDA
}
|
/*
* How to transfer a method as argument
*
*
*/
package TransferAMethod;
/**
*
* @author YNZ
*/
interface Perform {
public void driving();
}
class Sporter implements Perform {
@Override
public void driving() {
System.out.println("Im an engineer driving on the track!");
... |
package com.nps.hellow;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.PagerTitleStrip;
import android.support.v4.view.ViewPager;
import android.view.LayoutInflater;
impo... |
// Definitions for sprite sheet menu.png
// Created with TexturePacker www.codeandweb.com/texturepacker
// $TexturePacker:SmartUpdate:44b697823d8a7f1f9ccc00bc8feff79e:1/1$
package com.karachevtsevuu.mayaghosts;
public interface tp_menu
{
public static final int MENU_QUIT_ID = 0;
public static final int MENU_RESET_... |
package com.admin.flink.day09;
import com.admin.flink.bean.WaterSensor;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator... |
package com.cs.administration.bonus;
import javax.annotation.Nonnull;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import java.math.BigDecimal;
import static javax.xml.bind.annotation.XmlA... |
package view;
import app.Principal;
import entidades.Fornecedor;
import entidades.Periodo;
import entidades.Produto;
import entidades.Promocao;
import java.util.List;
import javax.persistence.EntityManager;
import javax.swing.table.AbstractTableModel;
public class FrmListaPromocao extends AbstractTableModel {
pr... |
/*
* 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.proquest.interview.phonebook;
public class Person {
public String name;
public String phoneNumber;
public String address;
@Override
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("\nFirst name: ").append(name);
stringBuilder.append("\nPhone nu... |
package com.penglai.haima.utils;
import android.text.TextUtils;
import android.widget.TextView;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 作者:flyjiang
* 说明: 用于字符串的处理
*/
public class StringUtil {
/**
* 转换全角到半角
*
* @par... |
package controller.registrar.curriculum;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletException;
import javax.servle... |
package ceui.lisa.adapters;
import android.content.Context;
import android.graphics.Bitmap;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.ProgressBar;
import androidx.annotation.NonNull;
import androidx.annotation.Nu... |
package com.psing.professional_streaming.service.serviceimpl;
import com.psing.professional_streaming.dataobject.User;
import lombok.extern.slf4j.Slf4j;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframe... |
package gm;
/**
*
* @author Angelos Trigkas
*
* Class Board implements the board that the game is played on.
*/
public class Board {
private final static int PLAYER_ONE = 1;
private final static int PLAYER_TWO = -1;
private final static int EMPTY = 0;
private Point[][] board; // The game ... |
package pl.coderslab.service;
public class TransferService {
private String text;
public TransferService(String text) {
this.text = text;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
}
|
/*
* 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 DAO;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
i... |
package CircleOverlap;
public class Circle {
// Fields
public double[] Center;
public double radius;
public Circle(double[] center, double radius) {
Center = center;
this.radius = radius;
}
// Getters, x, y, and radius
public double getX() {
return this.Center[0]... |
package com.acewill.ordermachine.adapter;
import android.content.Context;
import android.support.v4.app.FragmentManager;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.acewill.ordermachine.R;
import co... |
/* Ara - capture species and specimen data
*
* Copyright (C) 2009 INBio (Instituto Naciona de Biodiversidad)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the Lice... |
import java.util.Scanner;
public class sumarray {
public static void main(String[] args) {
int n;int m;int max=0;int min=0;
Scanner sc=new Scanner(System.in);
m=sc.nextInt();n=sc.nextInt();
int arr[]=new int[m];
for(int i=0;i<m;i++)
{
arr[i]=sc.nextInt();
}
int brr[]=new int[n];
for(int i=0;i<n;i... |
package dao.mapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import logic.SNSFile;
public interface FileMapper {
@Select("select ifnull(max(fno), 0)+1 fno from file")
SNSFile maxfno();
@Insert("insert into file (fno, wno, wno2, wno3, fwhere, name, f... |
package testingData;
public class TestData {
public static String HomeTitle="JCPenny";
public static int numberOfElement=1;
public static String zipCode="11373";
public static String productname="shoe";
public static String numberOfProductinTheCart="2";
public static String ViewCartandCheckOutButtonName="View Ca... |
package com.cg.demo;
import java.util.Scanner;
public class CheckNumber {
public static void main(String[] args) {
System.out.println("Check if a number is an increasing number ");
boolean flag = false;
Scanner sc = new Scanner (System.in);
System.out.println("Enter a number:");
int num = sc.nextInt();
... |
/*
* Welcome to use the TableGo Tools.
*
* http://vipbooks.iteye.com
* http://blog.csdn.net/vipbooks
* http://www.cnblogs.com/vipbooks
*
* Author:bianj
* Email:edinsker@163.com
* Version:5.8.0
*/
package com.lenovohit.hwe.mobile.core.model;
import javax.persistence.Entity;
import javax.persistence.Table;
... |
import java.io.IOException;
/**
* Created by fur1k on 26.05.2017.
*/
public class Main {
public static void main(String[] args) throws IOException, CloneNotSupportedException {
Worker worker1, worker2, worker3;
Detail detailLol;
detailLol = new Detail("China", "Bolt");
... |
package com.xinbang.bwacl.api;
import moxie.cloud.service.client.ClientFactory;
import moxie.cloud.service.client.auth.AuthorizationProvider;
/**
* Created by sxm on 17/2/10.
*/
public class BWaclCenterClientFactory extends ClientFactory {
protected BWaclCenterClientFactory(Builder builder) {
super(buil... |
package com.state.light;
/**
* Created by Valentine on 2018/5/10.
*/
public class LightManager {
public LightState state;
public LightManager(LightState state){
this.state = state;
}
public void pressButton(){
state.switchs(this);
}
}
|
package lab6;
public abstract class BreakFastTemplate {
public final void MakeBreakFast(int numOfEggs) {
crackingEggs(numOfEggs);
prepareEggs();
cook();
serve();
if(hook()) System.out.println("ajouter du sel et du poivre");;
}
abstract public void crackingEggs(int numOfEggs);
abstract public void pr... |
package com.psing.professional_streaming.repository;
import com.psing.professional_streaming.dataobject.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface UserRepository extends JpaRepository<User,String> {
User findBy... |
package com.scripbox.service;
import java.util.List;
import com.scripbox.model.Challenge;
import com.scripbox.model.Employee;
import com.scripbox.model.GenericResponse;
public interface EmployeeChallengeService {
GenericResponse saveChallenges(List<Challenge> challenges, String userName);
GenericResponse upVoteC... |
package com.example.submissionempat.ui.detail;
import android.content.ContentValues;
import android.content.DialogInterface;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import android.media.Image;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import... |
package sop.reports.vo;
/**
* @Author: LCF
* @Date: 2020/1/9 10:20
* @Package: sop.reports.vo
*/
public class OffListItem {
private String off_sh_no_pfix;
private String off_sh_no;
private String it_no;
private String off2_it_name;
private String off2_curr_code;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.