text stringlengths 10 2.72M |
|---|
package strategydemo;
import static org.junit.Assert.*;
import org.junit.Test;
public class TestFlatRateDiscountStrategy {
@Test
public void testFlatRateDiscount1() {
Order order = new Order("John", 200.24f);
float discount = 10;
FlatRateDiscountStrategy strategy = new FlatRateDiscountStrategy(discount);
... |
package br.com.mixfiscal.prodspedxnfe.dao.questor;
import br.com.mixfiscal.prodspedxnfe.dao.EDirecaoOrdenacao;
import br.com.mixfiscal.prodspedxnfe.dao.SuperDAO;
import br.com.mixfiscal.prodspedxnfe.dao.util.ConstroyerHibernateUtil;
import br.com.mixfiscal.prodspedxnfe.dao.util.QuestorHibernateUtil;
import br.com.mixf... |
import java.util.Scanner;
public class three {
public static void main(String[] args) {
//3. 세 수(정수형)를 입력 받아 가장 큰 수를 출력하는 프로그램을 작성하시오.
int a, b, c;
System.out.println("3번 문제");
Scanner input = new Scanner(System.in);//다음에 설명
System.out.print("첫번째 정수를 입력하세요: ");
a = input.nextInt();//키보드에서 숫자 입력
System... |
package designpattern.factory.factory_method;
/**
* 客户类:提出需求,要两种型号的宝马车
*/
public class Customer {
public static void main(String[] args) {
FactoryBMW320 factoryBMW320 = new FactoryBMW320();//创建具体的对象
//BMW bmw320 = factoryBMW320.createBMW();
factoryBMW320.createBMW();
FactoryBMW5... |
package com.bakan.simplesocial;
import twitter4j.Twitter;
import twitter4j.TwitterFactory;
import twitter4j.auth.AccessToken;
import twitter4j.conf.ConfigurationBuilder;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.text.TextUtils;... |
package alien4cloud.tosca.parser.mapping.generator;
import javax.annotation.Resource;
import javax.validation.Validator;
import org.springframework.stereotype.Component;
import org.yaml.snakeyaml.nodes.MappingNode;
import org.yaml.snakeyaml.nodes.NodeTuple;
import alien4cloud.tosca.parser.MappingTarget;
import alien... |
package io.github.ihongs.cmdlet.serv;
import io.github.ihongs.Core;
import io.github.ihongs.CoreLogger;
import io.github.ihongs.HongsException;
import io.github.ihongs.HongsExemption;
import io.github.ihongs.cmdlet.CmdletHelper;
import io.github.ihongs.cmdlet.CmdletRunner;
import io.github.ihongs.cmdlet.anno.Cmdlet;
i... |
package com.scp.controller;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import com.scp.bean.User;
import com.scp.dao.UserDaoImpl... |
/*
* Copyright (c) 2013-2014, Neuro4j.org
*
* 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.jiayifan.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jiayifan.service.BookService;
import com.jiayi... |
package me.jcomo.slimtwitter.utils;
import android.support.annotation.NonNull;
import android.text.Spannable;
import android.text.TextPaint;
import android.text.style.URLSpan;
public class StringUtils {
public static void removeUnderlines(CharSequence text) {
if (text instanceof Spannable) {
... |
package abstractfactory2;
public class MainClass {
public static void main(String[] args) {
GreekSalataInstructiuniClient c = new GreekSalataInstructiuniClient(new TaiereGreekSalataInstructiuniFactory());
c.printGreekSalataInstructiuni();
}
}
|
package dayTwo;
/**
* Created by student on 8/23/2016.
*/
public enum BloodType {
A, B, AB, O, RHESUS_NEG
}
|
package com.cuzofu.ddapi.properties;
import lombok.Data;
@Data
public class CorpProperties {
private String appKey;
private String appSecret;
}
|
package com.ctg.itrdc.janus.common.extensionloader.ext9_noadaptive;
import com.ctg.itrdc.janus.common.URL;
import com.ctg.itrdc.janus.common.extension.SPI;
/**
* 简单扩展点。 没有Wrapper。
*
* @author Administrator
*/
@SPI("impl1")
public interface Ext9 {
// 无@Adaptive !
String echo(URL url, int i);
} |
/*
* Copyright 2002-2019 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... |
/*
* 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 mandelbrot.rendering.threading;
import mandelbrot.rendering.GenerationMatrix;
/**
*
* @author Gregoire
*/
public class Pre... |
import java.lang.Thread;
import java.util.concurrent.Semaphore;
public class Airport {
private static int numOfRunways = 1;
private static int numOfStudents = 2;
private static int numOfPlanes = 1;
private static int numOfInstructors = 1;
public static void main(String[] args) {
Student.s... |
package five.io.file;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
/**
* @author Tedikova O.
* @version 1.0
*/
public class FileTricks {
public static void main(String[] args) throws IOException {
//Creating of File object.
File file = new File("file.txt");
... |
package agh.musicapplication.mappview;
import agh.musicapplication.mappmodel.MGenre;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.inject.Named;
import org.springframework.context.annotation.Scope;
import ... |
/**
* Write a description of Part1 here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Part2 {
public String findSimpleGene(String dna,String start_codon, String stop_codon)
{
String result = "";
int startIndex = dna.indexOf(start_codon);
... |
package com.zxt.framework.common.message;
public abstract interface IMessageHandler
{
public abstract Message getMessage(String paramString);
} |
package com.wepay.app;
import com.wepay.resource.AccountsResource;
import com.wepay.resource.LegalEntitiesResource;
import com.wepay.resource.PaymentsEndpoint;
import com.wepay.resource.PingPongEndpoint;
import com.wepay.resource.WebHooks;
import io.dropwizard.websockets.WebsocketBundle;
import org.slf4j.Logger;
impor... |
package DataStructures.arrays;
public class BasicSorting {
//5,3,1,4,6,0
static int[] insertionSort(int[] A) {
for (int i = 1; i < A.length; i++) {
int j = i;
while (j > 0 && A[j - 1] > A[j]) {
int t = A[j - 1];
A[j - 1] = A[j];
A[... |
package com.daydvr.store.presenter.login;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Message;
import com.daydvr.store.util.LoaderHandler;
import com.daydvr.store.util.Logger;
import static com.daydvr.store.base.BaseApplication.MultiThreadPoo... |
package stormedpanda.simplyjetpacks.util;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.Style;
import net.minecraft.util.text.TranslationTextComponent;
import stormedpanda.simplyjetpacks.SimplyJetpa... |
package org.yxm.modules.gank.db;
import android.arch.persistence.room.Database;
import android.arch.persistence.room.Room;
import android.arch.persistence.room.RoomDatabase;
import android.arch.persistence.room.TypeConverters;
import android.content.Context;
import org.yxm.modules.base.conversion.DateConversionFactory... |
package com.example.shoji.bakingapp;
import android.support.test.espresso.IdlingRegistry;
import android.support.test.espresso.IdlingResource;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import com.example.shoji.bakingapp.tests.MainActivityTestUtils;
import com... |
package com.andrew.iak.iakfinalproject.adapter;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import com.andrew.iak.iakfinalproject.R;
import com.andrew.iak.ia... |
package com.mpowa.android.powapos.apps.powatools.common;
import com.mpowa.android.sdk.powapos.common.base.PowaEnums;
import com.mpowa.android.sdk.powapos.core.PowaPOSEnums;
import com.mpowa.android.sdk.powapos.core.dataobjects.PowaFirmwareInfo;
import com.mpowa.android.sdk.powapos.core.dataobjects.PowaUSBDeviceInfo;
... |
package org.framestudy.spring_mybatis.relationmag.service.impl;
import java.util.List;
import javax.annotation.Resource;
import org.framestudy.spring_mybatis.relationmag.beans.Game;
import org.framestudy.spring_mybatis.relationmag.dao.IGameDao;
import org.framestudy.spring_mybatis.relationmag.service.IGameSe... |
package com.example.sample.usertribe.FCM;
import com.example.sample.usertribe.Model.Token;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.fire... |
package com.mabaya.test.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import javax.sql.DataSource;
@Configuration
@EnableJpaRepositories("com.mabaya.test.repository")
public class DatabaseConfiguration {
}
|
package com.github.ofofs.jca.unit.log;
import com.github.ofofs.jca.handler.LogHandler;
import com.github.ofofs.jca.unit.annotation.CLog;
/**
* <p> 日志测试 </p>
*
* <pre> Created: 2018-06-29 14:23 </pre>
* <pre> Project: jca </pre>
*
* @author houbinbin
* @version 1.0
* @since 1.0
*/
public class LogTest {
... |
package io.ceph.rgw.client.model;
/**
* A response of an <a href="https://docs.ceph.com/docs/master/radosgw/s3/objectops/">object operation</a>.
*
* @author zhuangshuo
* Created by zhuangshuo on 2020/3/16.
* @see ObjectRequest
* @see io.ceph.rgw.client.ObjectClient
*/
public interface ObjectResponse e... |
package com.programapprentice.app;
/**
* User: program-apprentice
* Date: 8/19/15
* Time: 4:51 PM
*/
public class SpiralMatrixII_59 {
public int[][] generateMatrix(int n) {
int[][] matrix = new int[n][n];
int numSteps = n /2;
int val = 1;
for(int i = 0; i < numSteps; i++) {
... |
package exemplos.aula10.lsp.correto;
/**
* Exemplo retirado do artigo do Baeldung.
* https://www.baeldung.com/solid-principles
*/
public class ElectricCar implements Car {
public void accelerate() {
//this acceleration is crazy!
}
}
|
package contenedor01;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Rectangle;
import javax.swing.JFrame;
public class MarcoDos {
public static void main(String[] args) {
JFrame ventanuca = new JFrame("Mi Segunda Ventana");
int y = 400;
int x = 100;
int alto = 300;
int ancho = 100;
... |
package vnfoss2010.smartshop.serverside.services.test;
import java.util.ArrayList;
import java.util.Map;
import vnfoss2010.smartshop.serverside.database.CategoryServiceImpl;
import vnfoss2010.smartshop.serverside.database.entity.Category;
import vnfoss2010.smartshop.serverside.services.BaseRestfulService;
imp... |
package com.beta.controller;
import com.beta.dto.ReplyMessage;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.spr... |
package br.com.posgraduacao.revendacarros.models;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persis... |
/**
* This class is part of the "World of Zuul" application.
* "World of Zuul" is a very simple, text based adventure game.
*
* This class holds information about a command that was issued by the user.
* A command currently consists of two parts: a CommandWord and a string
* (for example, if the command was "t... |
/*******************************************************************************
**
** Advanced Distributed Learning Co-Laboratory (ADL Co-Lab) grants you
** ("Licensee") a non-exclusive, royalty free, license to use, modify and
** redistribute this software in source and binary code form, provided that
** i) this c... |
package dogs;
public abstract class DogDecorator implements DogCharacteristics{
protected DogCharacteristics decoratedDoggo;
public DogDecorator(DogCharacteristics vDecoratedDoggo) {
super();
this.decoratedDoggo = vDecoratedDoggo;
}
}
|
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.sql.SQLException;
@WebSe... |
package com.threadpool.executor;
public class ThreadExecutorDemo {
public static void main(String[] args) {
}
}
|
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import java.sql.ResultSet;
public class InterfaceGrafica extends JFrame {
//objetos da tela
private JLabel lblCodigo;
private JLabel lblNome;... |
package cn.jhkj.springboot_mysql.service;
import cn.jhkj.springboot_mysql.domain.User;
public interface BusinessService {
/**
* 用户注册
* @param user
*/
void registerUser(User user);
/**
* 用户登录
* @param username
* @param password
* @return
*/
User loginUser(Stri... |
package com.example.gbyers.petprotector;
import android.Manifest;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
import android.provi... |
package com.example;
import com.example.dto.TbEmp;
import com.example.dao.mapper.TbEmpMapper;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springfra... |
module proghf {
requires javafx.controls;
requires javafx.fxml;
requires com.fasterxml.jackson.databind;
requires junit;
opens proghf.model to javafx.fxml, com.fasterxml.jackson.databind, junit;
opens proghf.controller to javafx.fxml;
opens proghf.view to javafx.fxml;
exports proghf;
... |
package Interview;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.ArrayList;
import java.util.Vector;
import org.junit.Test;
public class Diff_ArrayList_Vector {
///和ArrayList和Vector一样,同样的类似关系的类还有HashMap和HashTable,StringBuilder和StringBuffer,后者是前者线程安全版本的实现。
@Test
pub... |
package io.core9.plugin.widgets.datahandler;
public class DataHandlerGlobal<T> {
private boolean isGlobal;
private T value;
/**
* @return the isGlobal
*/
public boolean isGlobal() {
return isGlobal;
}
/**
* @param isGlobal the isGlobal to set
*/
public void setGlobal(boolean isGlobal) {
this.is... |
package com.eussi._01_jca_jce.securitypkg;
import java.security.*;
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.Arrays;
/**
* Created by wangxueming on 2019/4/1.
*/
public class _09_KeyFactory {//主要用来通过密钥规范还原密钥
public static void main(String[] args) {
//实例化
try {... |
package org.crazyit.ui;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.LinearLayout;
public class CustomViewActivity extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceSt... |
package unae.lp3.notas.controller;
import java.util.LinkedList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframe... |
import javax.swing.JOptionPane;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
public class escribiendo{
Scanner l=new Scanner(System.in);
String a;
String b;
String y="no";
public void setA(String a){
this.a=a;
}
public void setB(String b){
this.b=b;
}
String ruta="archivos/archivo... |
package com.example.android.smartstreet;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.Me... |
package de.tetet.fof7.usfl;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.mongodb.BasicDBObject;
import com.mongodb.DB;
import com.mongodb.DBObject;
import de.tetet.fof7.config.Config;
import de.tetet.fof7.config.ConfigFactory;
import de.tetet.mongodb.MongoDBConn;
... |
package com.pshc.cmg.service;
import java.security.Principal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pag... |
package com.egakat.io.conciliaciones.transformation.service.impl;
import static com.egakat.io.conciliaciones.domain.SaldoInventario.BODEGA_CODIGO_ALTERNO;
import static com.egakat.io.conciliaciones.domain.SaldoInventario.CLIENTE_CODIGO;
import static com.egakat.io.conciliaciones.domain.SaldoInventario.ESTADO_CONCILIAC... |
package com.ufc.br.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import com.ufc.br.service.CarrinhoService;
@Controller
public class CarrinhoController {
@Autowired
CarrinhoService cS;
//CarrinhoRepository cR;
@Autowired
PessoaCont... |
package com.dungkk.gasorder.fragment;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import ... |
package be.mxs.common.util.pdf.general;
import be.mxs.common.util.pdf.official.PDFOfficialBasic;
import be.mxs.common.util.system.ScreenHelper;
import be.mxs.common.util.db.MedwanQuery;
import be.openclinic.adt.Encounter;
import be.openclinic.common.KeyValue;
import com.itextpdf.text.pdf.*;
import com.itextpdf.text.*... |
package project.prototype;
import java.util.ArrayList;
import android.view.View;
public class Story {
private ArrayList<Page> Pages;
private String storyName;
private String creator;//username of the creator
private View coverPage;//coverPage to be shown on the gallery
public Story(){
Pages = new ArrayList... |
package redington.week3.project;
public class RangeReverseTest {
public static void main(String[] args) {
// TODO Auto-generated method stub
RangeReverse a1=new RangeReverse();
a1.getInput();
a1.result();
}
}
|
package com.ringoram;
import java.io.Serializable;
public class Bucket implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
int id;//bucket id in the tree, root is 0
byte[] bucket_data;//all block data in the bucket
BucketMetadata bucket_meta;//bucket meta data
public Buc... |
/*
* 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 nl.fontys.pts61a.vps.model;
import static com.vividsolutions.jts.triangulate.DelaunayTriangulationBuilder.unique;
import java.... |
package com.example.aizat.alarmclock.screen.main.first;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.SwitchCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CompoundBut... |
package com.fubang.wanghong.model.impl;
import com.fubang.wanghong.entities.FollowEntity;
import com.fubang.wanghong.model.BaseModel;
import com.fubang.wanghong.model.FollowModel;
import retrofit2.Callback;
/**
* ┏┓ ┏┓
* ┏┛┻━━━┛┻┓
* ┃ ┃
* ┃ ━ ┃
* ┃ > < ┃
* ... |
package geoquest;
import java.io.PrintWriter;
import java.util.Map;
import java.util.TreeMap;
public class Equipment implements Card, Comparable<Equipment>
{
public static final String COLOR = "#93F3FF";
static final Map<String, Equipment> EQUIPMENT = new TreeMap<String, Equipment>();
static {... |
package com.esum.framework.security.xml;
import com.esum.framework.core.exception.SystemException;
public class XMLDSIGException extends SystemException {
private static final long serialVersionUID = 1L;
public XMLDSIGException(String location, String message) {
super(location, message);
}
}
|
package kr.co.flyingturtle.edu.admin.dictionary.controller;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframew... |
package m_nny.Server;
import java.net.Socket;
import java.util.List;
import java.util.Map;
public class ClientHandler implements Runnable {
private Session currentClient;
private Group currentGroup;
private final List<Session> allClients;
private Map<String, Group> allGroups;
ClientHandler(Socket... |
package com.bofsoft.sdk.pay;
public final class PayProtos {
public static final class PayInfoBuf {
private String sign;
private String prepayId;
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
... |
package buttley.nyc.esteban.magicbeans.main;
import android.graphics.Bitmap;
import android.graphics.Matrix;
/**
* Created by Tara on 1/27/2015.
*/
public class BitmapScaler {
private Matrix matrix;
private Bitmap bitmap;
public BitmapScaler(){
matrix = new Matrix();
}
public Bitmap... |
package com.sepnotican.stargame.screen;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.sepnotican.stargame.base.Base2DScreen;
import com.sepnotican.stargame.base.ResourceSupplier;
import com.sepnotican.stargame.base.SimpleButton;
import com.sepnotican.stargame.base.Sprite;
import static com.sep... |
package com.map;
import com.avltree.AVLTree;
/*
* 集合Map:映射(字典):key:value键值对
*/
public class AVLMap<K extends Comparable<K>,V> implements Map<K, V> {
//底层是平衡二叉树实现,完全 复刻平衡二叉搜索树的方法
private AVLTree<K, V> avltree;
public AVLMap() {
avltree = new AVLTree<>();
}
@Override
public int size() {
return avltree.s... |
package com.example.davidkim.theporcelaintimes;
import java.util.ArrayList;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.CheckBox;
public class MainActivity extends AppCompatActivity {
private Linear... |
package com.marketplace.repository;
import com.marketplace.model.Company;
import org.springframework.stereotype.Repository;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import java.util.List;
@Repository
public class CompanyRepositoryImpl implements CompanyRepositoryCustom {
... |
package edu.neu.ccs.cs5010;
import java.util.ArrayList;
import java.util.List;
/**
* Created by bikegcy on 10/23/17.
*/
public class fortest {
public static void main(String[] args) {
String fruit = "apple, pear, banana, orange";
String apple = "apple";
if (fruit.contains(apple)) {
... |
public class Test {
public static void main(String[] args) {
GrandFa gf = new GrandFa();
}
}
|
package creational.singleton.bookcode.threadunsafe;
public class SingleTread {
public static void main(String[] args) {
Singleton s1 = Singleton.getInstance("Bar");
Singleton s2 = Singleton.getInstance("Foo");
System.out.println(s1 == s2); // true
}
}
|
public class MyClass {
public static void main(String args[]) {
System.out.println("Banking Program!");
Account myAccount = new CheckingAccount("Tung", 100);
System.out.println(myAccount.getOwner() + " has " + myAccount.getBalance() + " in the bank!");
myAccount.withdraw... |
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.neuron.mytelkom.fragment;
import android.app.ActionBar;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
im... |
package by.herzhot.constants;
/**
* @author Herzhot
* @version 1.0
* 10.08.2016
*/
public class Parameters {
public static final String LOCALE = "locale";
public static final String COMMAND = "command";
public static final String CATEGORY = "category";
public static final String SELECTED_... |
package Scripts;
import java.io.IOException;
import org.testng.annotations.Test;
import Base.SuperClass;
import Helpers.LoginPage;
public class EndToEndProccess extends SuperClass {
@Test
public void endToEndProccess() throws IOException, InterruptedException
{
LoginPage loginpage=new LoginPage(driver);
logi... |
package com.twj.gfx;
import java.util.ArrayList;
import java.util.List;
public class BSPTree {
private final BSPNode root;
public BSPTree(List<Polygon> polygons) {
root = buildNodeFromPolygon(polygons.get(0));
for (Polygon polygon : polygons) {
addPolygon(root, polygo... |
package com.practice;
//package com.selenium;
import java.util.List;
import java.util.concurrent.ThreadLocalRandom;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.Expec... |
package com.gaoshin.onsalelocal.osl.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import common.db.entity.DbEntity;
@Entity
@Table
@XmlR... |
package com.pooyaco.gazelle.web.bundle;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.ListResourceBundle;
/**
* GazelleResourceBundle ... |
package com.example.testproject.setting;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.TextView;
im... |
package com.zxq.spring.dao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.math.BigDecimal;
@Repository
@Mapper
public interface AccountMapper {
void deCreate(@Param("userId") Long userId,@Param("money") BigD... |
package com.example.daikiiriguchi.trainingday;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import io.realm.Realm;
/**
* Created by daikiiriguchi on 1/24/16.
*/
public class BaseActivity extends AppCompatActivity {
protected Realm mRealm;
protected boolean isFirstLaunch = fals... |
package com.amundi.tech.onsite.xlsx;
import com.amundi.tech.onsite.db.model.UserRole;
import com.amundi.tech.onsite.db.model.WorkingDay;
import com.amundi.tech.onsite.model.Parking;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.FillPatternType;
imp... |
/*
* 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 jc.fog.presentation;
/**
*
* @author Jespe
*/
public class Colors {
public static final String POST_BLUE = "#... |
package hiring.dto;
import java.io.Serializable;
import java.util.Objects;
public class ErrorDto implements Serializable{
private String error;
public ErrorDto() {
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
... |
package br.com.vr.emissor;
import static springfox.documentation.builders.PathSelectors.regex;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Impor... |
package com.rakesh.jdbc;
public interface Constants {
int ORACLE_PORT = 8080;
int MYSQL_PORT = 3306;
String ORACLE_DB = "";
String MYSQL_DB = "employees";
String ORACLE_DRIVER="oracle.jdbc.driver.OracleDriver";
String ORACLE_DATABASE_URL = "jdbc:oracle:thin:@localhost:1521:xe";
String ORACLE_USERNAME = "s... |
/*
* 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 pl.rpolak.generator.credentials;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.juni... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.