id stringlengths 36 36 | meta stringlengths 429 697 | code_content large_stringlengths 612 1.26k |
|---|---|---|
b284c7a6-9070-4082-b1f6-cc1e788d23f8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-20 21:07:52", "repo_name": "readpj/the-internet", "sub_path": "/the_internet/src/test/java/com.herokuapp.theinternet/domain/builder/TheInternetCredentialsBuilder.java", "file_name": "TheInternetCredentialsBuil... | package com.herokuapp.theinternet.domain.builder;
import com.herokuapp.theinternet.domain.TheInternetCredentials;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class TheInternetCredentia... |
4865af27-5e17-4dee-aa2e-c04e87ac2bb7 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-06-05 03:47:10", "repo_name": "jnadendla/SS-Web-Application_proj2", "sub_path": "/src/helpers/Sales.java", "file_name": "Sales.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 43, "lang": "en", ... | package helpers;
public class Sales {
private String purchaser;//can be a user or state
private double price;
private String product;
/**
* @param purchaser
* @param price
* @param product
*/
public Sales(String purchaser, double price, String product) {
this.purch... |
4322b6f8-d43e-47c0-8819-e829766e517f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-10-14 03:32:41", "repo_name": "EchoTio/Inspection", "sub_path": "/app/src/main/java/com/hmaishop/pms/inspection/util/ActivityCollector.java", "file_name": "ActivityCollector.java", "file_ext": "java", "file_size_... | package com.hmaishop.pms.inspection.util;
import android.app.Activity;
import java.util.ArrayList;
import java.util.List;
/**
* ActivityCollector
* <p>
* Created by Joker_Runner on 7/12 0012.
*/
public class ActivityCollector {
public static List<Activity> activities = new ArrayList<Activity>();
public... |
90ed1c47-aeae-441e-8a3a-afdfa1fd1b5f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-10 17:59:06", "repo_name": "Ilya37/project", "sub_path": "/src/main/java/ru/sbt/mipt/NodeNew.java", "file_name": "NodeNew.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 46, "lang": "en", "d... | package ru.sbt.mipt;
import java.util.concurrent.locks.Lock;
/**
* Created by Ilya on 09.01.2016.
*/
public class NodeNew<T> {
public NodeNew next;
public Lock lock;
public T value;
public int size;
public boolean tryLock() {
return false;
}
public class Node {
int data... |
0fdaad72-f162-4c85-a47b-3f0a05c75af6 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-06-28 19:15:05", "repo_name": "Dalysovich/MyCard", "sub_path": "/tn.edu.espritCs.myCard/src/tn/edu/espritCs/myCard/tests/Main.java", "file_name": "Main.java", "file_ext": "java", "file_size_in_byte": 705, "line_c... | package tn.edu.espritCs.myCard.tests;
import junit.framework.Assert;
import org.junit.Test;
import tn.edu.espritCs.myCard.dao.UserDao;
import tn.edu.espritCs.myCard.domain.Admin;
//import tn.edu.espritCs.funTime.services.LoginService;
import tn.edu.espritCs.myCard.technical.UtilJdbc;
public class Main {
... |
708c89fe-dd33-4c04-a8f4-40697d1e41c6 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-03-05 21:00:14", "repo_name": "qashahin/prototype_webapp", "sub_path": "/src/main/java/servlet/business/LoginBusiness.java", "file_name": "LoginBusiness.java", "file_ext": "java", "file_size_in_byte": 742, "line_... | package servlet.business;
import dao.UserDao;
import dao.entities.User;
import java.util.List;
public class LoginBusiness {
public static boolean validCredentials(String userName, String password) throws Exception {
if (userName.length() >= 1 && password.length() >= 1) {
UserDao userDao = n... |
ab36ff12-509d-4e30-8d01-e0a3bc6fac9b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-11-03 18:52:48", "repo_name": "scastrec/CommNotes-Website", "sub_path": "/app/models/PaymentByUser.java", "file_name": "PaymentByUser.java", "file_ext": "java", "file_size_in_byte": 705, "line_count": 31, "lang":... | package models;
/**
* PaymentByUser : represent what the connected user has to paid to a define user
*/
public class PaymentByUser {
private String _value;
private String _idReceiver;
private String _name;
private String _idUserPayer;
public PaymentByUser(String pValue, String pIdReceiver, String pN... |
bfc11df9-21ed-447b-8df3-a0e8101b736a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-15 02:35:10", "repo_name": "freedDog/OldGameCore", "sub_path": "/src/com/game/cache/ObjsPool.java", "file_name": "ObjsPool.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 30, "lang": "en", "... | package com.game.cache;
public class ObjsPool {
private CacheArray<?>[] objs=null;
public ObjsPool(int arrayCount) {
this.objs=new CacheArray[arrayCount];
}
public void addArray(int index,CacheArray<?> poolArray) {
this.objs[index]=poolArray;
}
public <T> T getObj(int index,Object k) {
CacheArray<?> deque=... |
85f99e94-d79b-4d80-8e87-9c5c8650e809 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-21 21:14:09", "repo_name": "s-osyra/java-DeliverySystem", "sub_path": "/src/main/java/com/so/DeliverySystem/model/LandTransport.java", "file_name": "LandTransport.java", "file_ext": "java", "file_size_in_byte"... | package com.so.DeliverySystem.model;
import javax.persistence.Column;
import javax.persistence.Entity;
@Entity(name = "Land_Transport")
public class LandTransport extends ModeOfTransportation {
@Column (name = "Departure_Place")
private String departurePlace;
@Column (name = "Arrival_Place")
private Str... |
7355b176-88b8-404d-92e8-a763cdfd3030 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-07-23 23:32:55", "repo_name": "marsmxm/snippets", "sub_path": "/Recommenders/Assignment03/uu-assignment/src/main/java/org/lenskit/mooc/uu/Neighbor.java", "file_name": "Neighbor.java", "file_ext": "java", "file_si... | package org.lenskit.mooc.uu;
import it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap;
import java.util.Comparator;
/**
* @author mxm
*/
class Neighbor {
final long user;
final Long2DoubleOpenHashMap normalizedRatings;
final double similarity;
Neighbor(long user, Long2DoubleOpenHashMap ratings, d... |
557d603e-3f75-41e3-9c9f-9b907b5953d3 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-28 01:18:07", "repo_name": "rrmcastro/CursoJavaProfNelioAlves", "sub_path": "/src/com/udemy/javacurso/secao8_68/entities/Student.java", "file_name": "Student.java", "file_ext": "java", "file_size_in_byte": 705... | package com.udemy.javacurso.secao8_68.entities;
public class Student {
private String name;
private double grade1;
private double grade2;
private double grade3;
public Student(String name, double grade1, double grade2, double grade3) {
this.name = name;
this.grade1 = grade1;
this.grade2 = grad... |
b5a51e87-fdbd-47ff-8719-7466bf604964 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-12-15 00:30:28", "repo_name": "confuzedskull/GMLibrary", "sub_path": "/src/GameModel/Things/Items/Key.java", "file_name": "Key.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 46, "lang": "en", ... | package GameModel.Things.Items;
/**
* A key unlocks a lock
*
* @author James Nakano
*/
public class Key extends Item
{
private static int keycount;
public static Key skeleton;
private int code;
/**
* Constructor for objects of class Key
*/
public Key()
{
name="Generic K... |
23942d9b-cae9-4934-834b-564b3e99cd95 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-19 07:18:41", "repo_name": "jsyang-dev/myrecipes-batch", "sub_path": "/src/main/java/link/myrecipes/batch/MyrecipesBatchApplication.java", "file_name": "MyrecipesBatchApplication.java", "file_ext": "java", "fi... | package link.myrecipes.batch;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
@SpringBootApplication
@EnableBatchProcessing
public class Myrecipe... |
59cb5f7d-974f-4201-b2e1-e0a3e16b2fd8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-21 12:53:46", "repo_name": "winhtaikaung/EN-MM-Geology-Dictionary", "sub_path": "/app/src/main/java/com/rangon/en_mmgeologydictionary/model/configrestmodels/ApiConfig.java", "file_name": "ApiConfig.java", "fil... | package com.rangon.en_mmgeologydictionary.model.configrestmodels;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
/**
* Created by win on 9/16/17.
*/
public class ApiConfig {
@SerializedName("page_count")
@Expose
private Integer pageCount;
@SerializedN... |
b9a7144c-1886-46e0-9281-46f5581dd6ec | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-02 11:38:46", "repo_name": "tejassheth/di-demo", "sub_path": "/src/main/java/edu/learn/didemo/controller/SetterInjectedController.java", "file_name": "SetterInjectedController.java", "file_ext": "java", "file_... | package edu.learn.didemo.controller;
import edu.learn.didemo.services.GreetingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
@Controller
public class SetterInjectedController {
... |
77d09287-6606-459e-83f2-23d2fc629abb | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-27 19:51:46", "repo_name": "BlaD200/GeneticAlgorithm", "sub_path": "/src/main/java/ua/univ/vsynytsyn/timetable/csp/filtering/ForwardChecking.java", "file_name": "ForwardChecking.java", "file_ext": "java", "fil... | package ua.univ.vsynytsyn.timetable.csp.filtering;
import ua.univ.vsynytsyn.timetable.csp.graph.CSPGraph;
import java.util.Set;
public class ForwardChecking implements CSPFiltering {
@Override
public void filter(CSPGraph graph, int lastModifiedNode) {
Integer value = graph.getValue(lastModifiedNode)... |
6397bb63-35f4-40c4-8ca5-5f21b8c17536 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-14 15:20:02", "repo_name": "remiGenydumont/rgd-bigcorp", "sub_path": "/src/main/java/com/training/spring/bigcorp/model/FixedCaptor.java", "file_name": "FixedCaptor.java", "file_ext": "java", "file_size_in_byte... | package com.training.spring.bigcorp.model;
import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
@Entity
@DiscriminatorValue("FIXED")
public class FixedCaptor extends Captor {
@Column
private Integer defaultPowerInWatt;
public FixedCaptor(String na... |
6495c4de-9f26-49a5-84c8-c7e49dce458d | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-04 09:00:16", "repo_name": "yjsyang12/redis-springboot", "sub_path": "/src/main/java/com/young/udp/UdpClient.java", "file_name": "UdpClient.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 29... | package com.young.udp;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
/**
* @author Young
* @create 2021/6/4 15:08
*/
public class UdpClient {
public static void main(String[] args) throws IOException {
DatagramSocket datagramSoc... |
1c60d364-e2e7-4bce-8879-4d434b0f522c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-11 19:06:34", "repo_name": "edubernstein/k19-io", "sub_path": "/IO/src/LeituraEEscritaEmArquivo.java", "file_name": "LeituraEEscritaEmArquivo.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": ... | import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;
public class LeituraEEscritaEmArquivo {
public static void main(String[] args) throws IOException {
InputStream arquivoEntrada = new FileIn... |
ddff3dfe-e8c5-464a-9244-ca826bd0affb | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-15 21:21:56", "repo_name": "vincentganneau/SWAPI", "sub_path": "/app/src/main/java/com/vincentganneau/swapi/ui/widget/PlanetViewHolder.java", "file_name": "PlanetViewHolder.java", "file_ext": "java", "file_siz... | package com.vincentganneau.swapi.ui.widget;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.TextView;
/**
* {@link RecyclerView.ViewHolder} that describes a planet item within a {@link RecyclerView} widget.
*/
public class PlanetViewHolder extends RecyclerView.ViewHold... |
7ef2954a-a78b-437c-807a-60bc4efc0d0f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-16 02:47:30", "repo_name": "yuyibing/JAVA-000", "sub_path": "/Week_03/HttpClientDemo/src/main/java/main/NettyServerApplication.java", "file_name": "NettyServerApplication.java", "file_ext": "java", "file_size_... | package main;
import gateway.server.HttpServer;
public class NettyServerApplication {
public static void main(String[] args) {
String backServer = System.getProperty("backServer", "http://localhost:8808/test");
String proxyPort = System.getProperty("proxyPort", "8888");
Integer port = Int... |
2b1ce2b3-85f5-4814-abaa-061d22241d20 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-21 08:51:20", "repo_name": "yuanfengcaichen/project", "sub_path": "/project_jwt_auth/src/test/java/club/codeqi/bean/log4jtest.java", "file_name": "log4jtest.java", "file_ext": "java", "file_size_in_byte": 956,... | package club.codeqi.bean;
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
import org.junit.Test;
public class log4jtest {
@Test
public void testCustomLogger() throws Exception {
BasicConfigurator.configure();
// 创建日志记录器对象
Logger logger = Logger.getLogger(logtest.cla... |
f6700ab2-4086-4d45-9e23-170880be4f2d | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-23T08:01:26", "repo_name": "Ungrimb/Vehicles", "sub_path": "/VehiclesProject/src/com/vehicles/project/Bike.java", "file_name": "Bike.java", "file_ext": "java", "file_size_in_byte": 707, "line_count": 30, "lang... | package com.vehicles.project;
import java.util.List;
public class Bike extends Vehicle {
public Bike(String plate, String brand, String color) {
super(plate, brand, color);
}
public void addTwoWheels(List<Wheel> wheels) throws Exception {
if (wheels.size() != 2)
throw new Exception();
Whe... |
567b8d7b-3ae3-49cf-b47f-4d911521b3a6 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-13 08:23:03", "repo_name": "reparkye/ict_sp_test", "sub_path": "/ict_sp_test/src/main/java/ict/sp/test/ch1/ConsoleGame.java", "file_name": "ConsoleGame.java", "file_ext": "java", "file_size_in_byte": 739, "lin... | package ict.sp.test.ch1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
@Service("cg")
public class ConsoleGame {
private Game game;
public ConsoleGame() {
System.out.println(... |
d5242293-1d85-4db3-94b9-118c5ae28e06 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-02 10:31:27", "repo_name": "ed-rod/aok-stats", "sub_path": "/src/main/java/uk/co/eduardo/aok/GalleryButtonUI.java", "file_name": "GalleryButtonUI.java", "file_ext": "java", "file_size_in_byte": 704, "line_coun... | package uk.co.eduardo.aok;
import java.awt.Color;
import java.awt.Graphics;
import javax.swing.AbstractButton;
import javax.swing.plaf.basic.BasicButtonUI;
/**
* UI for the gallery buttons.
*
* @author Ed
*/
public class GalleryButtonUI extends BasicButtonUI
{
private static final Color SELECT_COLOR = new Col... |
bf47b840-93f7-4185-a463-9352be54325c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-16 12:26:09", "repo_name": "akantor333/Year-2-Project", "sub_path": "/app/models/users/UserPassword2.java", "file_name": "UserPassword2.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 27, "l... | package models.users;
import models.*;
import java.util.*;
public class UserPassword2 extends User {
private String password2;
public UserPassword2(){
}
public UserPassword2(String username, String role, String email,
String name, String password1, Date birthday, String address, Bio bi... |
74470744-4551-4e41-8569-9740669cdfb8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-26 12:05:29", "repo_name": "kaidos85/Invoice_KZ", "sub_path": "/app/src/main/java/com/kaidos85/invoice_kz/model/BankAccount.java", "file_name": "BankAccount.java", "file_ext": "java", "file_size_in_byte": 704,... | package com.kaidos85.invoice_kz.model;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
/**
* Created by Aidos on 25.06.2016.
*/
public class BankAccount extends RealmObject {
@PrimaryKey
private int id;
private Bank Bank;
private String IIK;
public int getId() {
ret... |
6fc5b441-cf55-4f70-892d-4af98a42db79 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-02-02 10:50:48", "repo_name": "ChristianSantamaria/Boletin14-Programacion", "sub_path": "/src/boletin14/ConvensorTemperaturas.java", "file_name": "ConvensorTemperaturas.java", "file_ext": "java", "file_size_in_by... | /*
* 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 boletin14;
/**
*
* @author csantamariacameselle
*/
public class ConvensorTemperaturas {
private final int temperaturami... |
d8b6e33c-6590-4417-92b6-bbe1e36b5f29 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-11-05T15:08:50", "repo_name": "saikiranreddy3/premkumar", "sub_path": "/Questions/interview.md", "file_name": "interview.md", "file_ext": "md", "file_size_in_byte": 706, "line_count": 20, "lang": "en", "doc_t... | ### QUESTIONS FROM INTERVIEWER
1. Why route53( what is dns and it uses)?
```
Every host is identified by the IP address but remembering numbers is very difficult for the people and also the IP addresses are not static therefore a mapping is required to change the domain name to IP address. So DNS is used to convert the... |
781d0bad-fee3-46d2-b278-597dc2ecebcc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-08-17 14:46:41", "repo_name": "paysera/java-lib-wallet-sdk", "sub_path": "/wallet/src/main/java/com/paysera/lib/wallet/entities/WalletApiErrorProperty.java", "file_name": "WalletApiErrorProperty.java", "file_ext"... | package com.paysera.lib.wallet.entities;
public class WalletApiErrorProperty {
private String code;
private String description;
public WalletApiErrorProperty(String code, String description) {
this.code = code;
this.description = description;
}
public String getCode() {
re... |
3aeedf67-4192-4a8d-8d6e-35af1433c67f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-23 01:44:21", "repo_name": "AndresCas123/meli-recruiting-mutants", "sub_path": "/recruiting-mutants-integration-test/src/test/java/com/mercadolibre/challenge/util/RestClient.java", "file_name": "RestClient.jav... | package com.mercadolibre.challenge.util;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;
public class RestClient {
private static final String SERVICE_MUTANT = "/mutant";
private static final String SERVICE_STATS = "/stats";
private String url;
public RestClient() {
url = "htt... |
1b5bc739-d91e-4c99-bd16-66a5086faf4b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-07-16T20:57:11", "repo_name": "sethpuckett/LobLib", "sub_path": "/src/com/game/loblib/utility/GameSettings.java", "file_name": "GameSettings.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 28, ... | package com.game.loblib.utility;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
public class GameSettings {
protected final static StringBuffer _tag = new StringBuffer("GameSettings");
protected SharedPreferences _prefs;
public GameSett... |
42013607-a520-4434-a3d9-ecb0bbbd0a86 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-04-12 10:12:53", "repo_name": "Childe-Chen/goodGoodStudy", "sub_path": "/src/main/java/com/cxd/springUtils/copyUtilTest/CartList.java", "file_name": "CartList.java", "file_ext": "java", "file_size_in_byte": 704, ... | package com.cxd.springUtils.copyUtilTest;
import java.util.List;
/**
* desc
*
* @author fanyin
* @date 2019/5/24 15:05
**/
public class CartList {
private String ads;
private List<Item> items;
private List<Item> invalidItems;
public String getAds() {
return ads;
}
public void... |
432188be-0bd3-4fcb-b818-4ab37a66b8ee | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-22 09:30:43", "repo_name": "caitsithx/computer_algorithm", "sub_path": "/src/main/java/leetcode/topeasy/string/FirstUniqChar.java", "file_name": "FirstUniqChar.java", "file_ext": "java", "file_size_in_byte": 7... | package leetcode.topeasy.string;
import java.util.HashMap;
import java.util.Map;
public class FirstUniqChar {
public int firstUniqChar(String s) {
Map<Character, Boolean> uniques = new HashMap<>();
for (int i = 0; i < s.length(); i++) {
char current = s.charAt(i);
if (uniqu... |
c2760490-54a6-4665-879c-4d2db2167379 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-07 12:18:32", "repo_name": "anstn1993/traveler-public", "sub_path": "/traveler-application/src/main/java/me/moonsoo/travelerapplication/accompany/AccompanyValidator.java", "file_name": "AccompanyValidator.java... | package me.moonsoo.travelerapplication.accompany;
import org.springframework.stereotype.Component;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
@Component
public class AccompanyValidator implements Validator {
@Override
public boolean supports(Class<?> clazz) ... |
3079954a-078f-4f14-bf3a-113feec25a8b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-08-18T03:03:22", "repo_name": "ConnorFitzgerald17/league-bot", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 704, "line_count": 29, "lang": "en", "doc_type": "text... | ## Discord Bot for league of legends
This bot will show you the ranked stats for the given username. Including LP, W/L and most played position/champ
## Requirements
- [Node.js](http://nodejs.org/)
- [Discord](https://discordapp.com/) account
## Installation Steps (if applicable)
1. Clone repo
2. Run `npm install`... |
2b3d6fa5-36ef-4962-8d93-e8d2d361fc14 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-02-13 02:43:12", "repo_name": "shixianjiaoyu/education", "sub_path": "/education-platform/edu-web-framework/src/main/java/cn/sjjy/edu/web/framework/core/Context.java", "file_name": "Context.java", "file_ext": "ja... | package cn.sjjy.edu.web.framework.core;
/**
* @author Captain
* @date 2017年1月22日
*/
public class Context {
private Integer accountId;
private String username;
public Context(Integer accountId, String username) {
this.accountId = accountId;
this.username = username;
}
public Co... |
e5451da5-b466-4289-89f0-40ab4d429abd | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-06-27 16:45:31", "repo_name": "gonzaca/projectgimy", "sub_path": "/src/Modelo/Administrador.java", "file_name": "Administrador.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 37, "lang": "en", ... | package Modelo;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
@DatabaseTable(tableName = "Administradores")
public class Administrador {
@DatabaseField(id = true)
private String userid;
@DatabaseField
private String pass;
public Administrador(){
... |
530a404f-9144-4c1f-b339-d3a435a97070 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-31 14:47:23", "repo_name": "MKaczkow/sokoban_game", "sub_path": "/src/modules/common/src/main/java/elkaproj/CastingIterator.java", "file_name": "CastingIterator.java", "file_ext": "java", "file_size_in_byte": ... | package elkaproj;
import java.util.Iterator;
/**
* Casts a sequence because apparently Java can't.
*
* @param <T> Cast type.
* @param <U> Original type.
*/
public class CastingIterator<T, U extends T> implements Iterator<T> {
private final Iterator<U> originalIterator;
/**
* Creates a new iterator... |
ee04164c-cd06-4a82-aa3c-29d2c39831fc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-24 12:46:36", "repo_name": "xiruitao/Java-IO-Learn", "sub_path": "/src/zh/FrAndFwDemo.java", "file_name": "FrAndFwDemo.java", "file_ext": "java", "file_size_in_byte": 736, "line_count": 23, "lang": "en", "doc_... | package zh;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
public class FrAndFwDemo {
public static void main(String[] args) throws IOException {
//无法设置编码
FileReader fr = new FileReader("D:\\下载\\coreJava\\src\\com\\imooc\\aa.txt");
FileWriter fw = new Fil... |
71b6d22d-27be-4357-aee3-d8c86e007962 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-07-11T01:19:37", "repo_name": "ExploreLearnMake/elm-theme", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 704, "line_count": 20, "lang": "en", "doc_type": "text", ... | # ELM theme
A VS Code theme with the hope of making it easier for new new developers to identify related elements, attributes, tags, etc. between HTML, CSS, and JavaScript files. Also trying to focus on readability and consideration for accessibility contrast.
Current version: 0.0.2
## Future Plans
1. Continue fles... |
ebdf38b6-2efc-4171-ad21-2c1f52c8cc5a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-14 20:33:21", "repo_name": "coasterka/ITTalents", "sub_path": "/28CollectionsHomework/src/banktaskoop/Deposit.java", "file_name": "Deposit.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 26,... | package banktaskoop;
public class Deposit extends BankProduct {
private static final int MAX_PERIOD_FOR_DEPOSIT = 60;
private static final int MIN_PERIOD_FOR_DEPOSIT = 1;
private double montlyPaidAmount;
public Deposit(String name, double interest, int months) throws BankArgumentException {
super(name, intere... |
6da8ae40-2a45-434f-9162-1ee0577fe28c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-27 12:26:27", "repo_name": "vothuckhanhhuyen/object-oriented-programming", "sub_path": "/src/hust/soict/talented/lab06/DigitalVideoDisc.java", "file_name": "DigitalVideoDisc.java", "file_ext": "java", "file_si... | package hust.soict.talented.lab06;
class DigitalVideoDisc extends Media{
private String director;
private int length;
public DigitalVideoDisc() {
}
public DigitalVideoDisc(String title) {
this.title = title;
}
public String getDirector() {
return director;
}
public void setDirector(String directo... |
10cb7163-3d7d-48fd-abd3-02cbc7a74c23 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-09 21:47:07", "repo_name": "retsullivan/AAHackathon", "sub_path": "/src/main/java/com/bootcamp/aa/southworst/client/FlightsClient.java", "file_name": "FlightsClient.java", "file_ext": "java", "file_size_in_byt... | package com.bootcamp.aa.southworst.client;
import com.bootcamp.aa.southworst.models.flight.FlightInfo;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public cla... |
f79e0f57-8bef-4a82-b68a-cf35a8a26801 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-19 03:06:23", "repo_name": "kishorebqsp/Hybridframework", "sub_path": "/src/Scripts/Testcase1.java", "file_name": "Testcase1.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 32, "lang": "en",... | package Scripts;
import org.testng.annotations.Test;
import Design.Basetest;
import Design.Data;
import POM.Homepage;
import POM.Loginpage;
import POM.Wishlistpage;
public class Testcase1 extends Basetest{
@Test
public void Validlogin()
{
String email = Data.excel(Excelpath,"Sheet1",1,0);
Strin... |
50ca5cf8-6559-4538-bd05-ed525b11344b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-09-08T08:44:14", "repo_name": "farhadmpr/AspDataTableServerSide", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 705, "line_count": 17, "lang": "en", "doc_type": "t... | # AspDataTableServerSide
JQuery Datatables.net in ASP.NET Core – Server-Side Processing.
JQuery Datatables is one of the most popular jQuery plugins that help create HTML tables and add a whole lot of interactive events to it.
The Core Features that come along with JQuery Datatables are searching, sorting, paginati... |
8fe63124-8a37-4baa-a171-5887f84597ae | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-20 16:00:24", "repo_name": "brunograssano/GildedRoseKata", "sub_path": "/src/main/java/ar/uba/fi/tdd/exercise/expirations/EdibleState.java", "file_name": "EdibleState.java", "file_ext": "java", "file_size_in_b... | package ar.uba.fi.tdd.exercise.expirations;
import ar.uba.fi.tdd.exercise.Item;
import ar.uba.fi.tdd.exercise.qualities.QualityState;
public class EdibleState extends ExpirationState {
static final int NORMAL_QUALITY_CHANGE = 1;
static final int DEADLINE = 0;
public EdibleState(QualityState qualityState... |
35dd2063-d771-43f1-9578-5b990d6cf5dd | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-05 19:44:05", "repo_name": "madskonradsen/douglas-server", "sub_path": "/src/douglas/testrunner/TestQueue.java", "file_name": "TestQueue.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 31, "... | package douglas.testrunner;
import java.util.LinkedList;
import java.util.List;
public class TestQueue {
// Specifying all the methods as 'synchronized' to cope
// with concurrency memory issues
private List<Queueable> items = new LinkedList<>();
public synchronized boolean isEmpty() {
retur... |
cfea459c-a949-4566-b160-f757cd341677 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-24 20:36:25", "repo_name": "ArttuJanhunen/cipherer", "sub_path": "/cipherer/src/main/java/logic/helpers/Pair.java", "file_name": "Pair.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 41, "la... | /*
* 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 logic.helpers;
/**
*
* @author ajanhune
*/
public class Pair {
private int number;
private char letter;
publ... |
184b0aca-da93-464a-bfd7-96c9deb6796a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-21 04:20:41", "repo_name": "wchb2015/LastCheckAt", "sub_path": "/src/test/java/com/lastcheckat/mapper/LastCheckAtMapperTest.java", "file_name": "LastCheckAtMapperTest.java", "file_ext": "java", "file_size_in_b... | package com.lastcheckat.mapper;
import com.lastcheckat.Application;
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.springframework.test.context.junit4.SpringRunner;
@RunWith(... |
3aa18e05-6c4a-4c36-8011-e8c5e279fd18 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-02-09 06:47:46", "repo_name": "PandaQAQ/PandaMvp", "sub_path": "/sdk_core/src/main/java/com/pandaq/appcore/permission/test/StorageReadTest.java", "file_name": "StorageReadTest.java", "file_ext": "java", "file_siz... |
package com.pandaq.appcore.permission.test;
import android.os.Environment;
import java.io.File;
/**
* Created by huxinyu on 2018/12/20.
* Email : panda.h@foxmail.com
* <p>
* Description :read storage permission tester
*/
public class StorageReadTest extends PermissionTest {
public StorageReadTest() {
... |
1d4c6b12-b55b-4f59-901c-1f29ba82364f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-04-07 01:29:27", "repo_name": "mortenn/MinecartsMod", "sub_path": "/src/me/Kruithne/MinecartsMod/PlayerListener.java", "file_name": "PlayerListener.java", "file_ext": "java", "file_size_in_byte": 703, "line_count... | package me.Kruithne.MinecartsMod;
import org.bukkit.entity.Entity;
import org.bukkit.entity.PoweredMinecart;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEntityEvent;
public class PlayerListener implements Listener {
MinecartPowerGrid powerGri... |
dee1fe09-97ec-4aed-8107-9f2c33e281bf | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-11 08:43:53", "repo_name": "lowchuenleik/jcsuchatbot", "sub_path": "/temp.java", "file_name": "temp.java", "file_ext": "java", "file_size_in_byte": 702, "line_count": 29, "lang": "en", "doc_type": "code", "blo... | public class MultiShape implements Shape {
private List<Shape> shapelist;
private String name;
public MultiShape(String name){
this.name = name;
this.shapelist = new ArrayList<Shape>();
}
public void addShape(Shape shape){
shapelist.add(shape);
}
public void drawShape... |
a554836e-14b2-4c7e-98ac-bfc17b7c6a10 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-23 07:07:29", "repo_name": "kishorekumarsel/weekend", "sub_path": "/WebDriver/src/packone/Sam.java", "file_name": "Sam.java", "file_ext": "java", "file_size_in_byte": 704, "line_count": 27, "lang": "en", "doc_... | package packone;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
public class Sam {
public static void main(String[] args) throws Exception{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnectio... |
a2699de5-a82e-4cf9-96aa-6eae0a16b8c9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-06-30T13:42:33", "repo_name": "danielpendse/auto-initialize-project", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 704, "line_count": 19, "lang": "en", "doc_type"... | Auto Initalize Project automates the start of a new project using a zsh script that creates a folder at the desired path and also creates a GIT repository and does the first commit.
# Installation
- git clone git@github.com:danielpendse/auto-initialize-project.git
- cd auto-initialize-project
- chmod 0500 initialize.... |
1e9e1722-956e-4de9-b6ae-a34c721c8f85 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-10 11:21:45", "repo_name": "nakulmehra677/Zercey", "sub_path": "/app/src/main/java/com/zercey/paint/managers/FirebaseAuthManager.java", "file_name": "FirebaseAuthManager.java", "file_ext": "java", "file_size_i... | package com.zercey.paint.managers;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
public class FirebaseAuthManager {
private FirebaseAuth auth;
private FirebaseUser currentUser;
public FirebaseAuthManager() {
auth = FirebaseAuth.getInstance();
... |
7de73790-e41d-461e-87d0-eb9def16abcf | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-13 01:21:33", "repo_name": "Alyss00/InfoCEP", "sub_path": "/app/src/main/java/com/example/requisieshttp/SaveActivity.java", "file_name": "SaveActivity.java", "file_ext": "java", "file_size_in_byte": 702, "line... | package com.example.requisieshttp;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
public class SaveActivity extends AppCompatActivity {
private ImageButton imageButtonBack;
@Override
p... |
65d8829e-d621-457b-be54-85f2db343bbc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-21 18:03:04", "repo_name": "Aprendendo-programacao/spring-boot-microservices", "sub_path": "/course/src/main/java/me/gabreuw/springbootmicroservices/endpoint/service/CourseService.java", "file_name": "CourseSe... | package me.gabreuw.springbootmicroservices.endpoint.service;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import me.gabreuw.core.model.Course;
import me.gabreuw.core.repository.CourseRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.... |
7863128a-bdc9-4ab2-a0e2-02a03cc8a654 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-12-18 14:25:10", "repo_name": "gaoxinge/bible", "sub_path": "/java/glassfish/1/src/main/java/com/HelloWorldServer.java", "file_name": "HelloWorldServer.java", "file_ext": "java", "file_size_in_byte": 704, "line_c... | package com;
import java.net.URI;
import java.io.IOException;
import org.glassfish.grizzly.http.server.HttpServer;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
public class HelloWorldServer {
public static void main(Str... |
c2972c1c-346a-4263-8b7a-0e4ec7146066 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-05-22T12:15:01", "repo_name": "devzeze/flutter_licenses_demo", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 703, "line_count": 35, "lang": "en", "doc_type": "text... | # Flutter Licenses Demo
A dome app that shows how to present the licenses in the app.
Demo includes 2 modes, with About section and plain Licenses view.
Flutter documentation can be foind here:
- [LicenseRegistry](https://api.flutter.dev/flutter/foundation/LicenseRegistry-class.html)
- [LicensePage](https://api.flu... |
b265aefb-d1c3-403c-9147-8e88a587aa83 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-05-05 05:22:00", "repo_name": "glqdlt/myhome-manager", "sub_path": "/persistence/src/main/java/com/glqdlt/myhome/persistence/book/entity/Author.java", "file_name": "Author.java", "file_ext": "java", "file_size_in... | package com.glqdlt.myhome.persistence.book.entity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import javax.persistence.*;
import java.util.Date;
@NoArgsConstructor
@RequiredArgsConstructor
@Dat... |
83fa9d98-3d4a-4072-82af-6643d56e30b5 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-04 17:14:31", "repo_name": "tomasz-herman/PseudoAssemblerEmulator", "sub_path": "/src/main/java/com/hermant/program/instruction/OutputByteInstruction.java", "file_name": "OutputByteInstruction.java", "file_ext... | package com.hermant.program.instruction;
import com.hermant.machine.Machine;
public class OutputByteInstruction extends Instruction implements MemoryOperation, OutputOperation {
@Override
public final void run(Machine m){
setInstructionPointer(m.getInstructionPointer());
final int ramAddress ... |
7ebb0a34-d41b-4c72-8656-d8a0da66ce2a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-22 03:10:25", "repo_name": "snowwolf10285/PicShow-zhaipin", "sub_path": "/app/src/main/java/com/magic/picshow/app/utils/Utlis.java", "file_name": "Utlis.java", "file_ext": "java", "file_size_in_byte": 739, "li... | package com.magic.picshow.app.utils;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import common.WEApplication;
/**
* Created by snowwolf on 17/2/28.
* 通用工具类
*/
public class Utlis {
/**
* 获取版本号
*
* @return 当前应用的版本号
*/
public static String getVersion(... |
6335fae8-34fb-4c3d-a3da-4c31a1285083 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-07-09T17:06:39", "repo_name": "thealmarques/golang-media-server-provider", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 703, "line_count": 34, "lang": "en", "doc_... | # Go-Media Server
Go-Media Server is a storage service for media files (although it can be used for all files, at this point). Right now it only includes static files, since this project was built to help me in another project ([Netflix-React](https://github.com/thealmarques/netflix-react)).
# Set up
Store your file... |
8dc2d944-ed4a-475d-aaf6-805ab9fd3379 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-28 14:06:16", "repo_name": "scpk-app/backend-server", "sub_path": "/src/main/java/dev/scpk/scpk/exceptions/resolvers/BindingResultExceptionResolver.java", "file_name": "BindingResultExceptionResolver.java", "f... | package dev.scpk.scpk.exceptions.resolvers;
import dev.scpk.scpk.exceptions.BindingResultException;
import dev.scpk.scpk.hateoas.model.full.ErrorModel;
public class BindingResultExceptionResolver extends AbstractExceptionResolver {
@Override
public <T extends Exception> ErrorModel resolve(T exception) {
... |
558fccfb-9d85-4d6d-bdea-1e36a984a61e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-16 09:41:04", "repo_name": "gxl244642529/ecard_realName", "sub_path": "/android/app/src/main/java/com/citywithincity/ecard/activities/AdvActivity.java", "file_name": "AdvActivity.java", "file_ext": "java", "fi... | package com.citywithincity.ecard.activities;
import android.app.Activity;
import android.content.Intent;
import com.citywithincity.ecard.pingan.PinganActivity;
import com.damai.auto.DMWebActivity;
/**
* Created by jzoom on 2018/2/5.
*/
public class AdvActivity extends PinganActivity {
@Override
protected... |
7e32954f-c5e8-4738-b6f5-b4823386b3f2 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-05-20 04:08:57", "repo_name": "qiyuanchen/capstone-project-LIT-Android", "sub_path": "/app/src/main/java/com/android/flamingo/litnyc/Activities/new_account_activity.java", "file_name": "new_account_activity.java"... | package com.android.flamingo.litnyc.Activities;
import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.android.flamingo.litnyc.R;
public class new_account_activity extends AppCompatActivity {
public static void callMe(Act... |
9632da71-9190-4f18-aaa8-a286ad4b9365 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2010-01-11 20:36:21", "repo_name": "davecheney/rev", "sub_path": "/src/main/java/net/cheney/rev/util/Executor.java", "file_name": "Executor.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 28, "lang"... | package net.cheney.rev.util;
import java.util.concurrent.atomic.AtomicInteger;
public class Executor extends Scheduler<Runnable> implements java.util.concurrent.Executor {
private static final AtomicInteger executorCount = new AtomicInteger(-1);
private final AtomicInteger workerCount = new AtomicInteger();
pub... |
0c19446f-5d24-4e88-8092-c62022cd1fbf | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-16 11:49:11", "repo_name": "Preethi3008/CucumberJunit", "sub_path": "/src/test/java/org/stepdef/HooksClass.java", "file_name": "HooksClass.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 29,... | package org.stepdef;
import org.base.BaseClass;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import cucumber.api.Scenario;
import cucumber.api.java.After;
import cucumber.api.java.Before;
public class HooksClass extends BaseClass {
@Before({"@sanity,@smoke,@regression"})
publi... |
2b5c64f1-2038-4204-9e39-eb5ada3962f2 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-05-27 01:12:30", "repo_name": "bright-composite/TotalRPG-Mod", "sub_path": "/main/java/aqua/rpgmod/player/params/AQParameterList.java", "file_name": "AQParameterList.java", "file_ext": "java", "file_size_in_byte"... | package aqua.rpgmod.player.params;
import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
import java.util.Iterator;
public class AQParameterList implements AQReadWritable
{
protected ArrayList<AQPlayerParameter> list = new ArrayList<AQPlayerParameter>();
public void add(AQPlayerParameter parameter)
{
th... |
d9345f46-a77c-45fb-adf6-7d02fa601817 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-11-01 11:42:00", "repo_name": "Uaman/NextBook", "sub_path": "/src/main/java/com/nextbook/services/impl/OrderStateProvider.java", "file_name": "OrderStateProvider.java", "file_ext": "java", "file_size_in_byte": 70... | package com.nextbook.services.impl;
import com.nextbook.dao.IOrderStateDao;
import com.nextbook.domain.pojo.OrderState;
import com.nextbook.services.IOrderStateProvider;
import org.springframework.stereotype.Service;
import javax.inject.Inject;
/**
* Created by Polomani on 31.10.2015.
*/
@Service
public class Orde... |
cf29099d-b471-43f8-90ca-445555c9f9a9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2015-01-21T03:21:40", "repo_name": "nesi/app-org", "sub_path": "/Readme.md", "file_name": "Readme.md", "file_ext": "md", "file_size_in_byte": 704, "line_count": 29, "lang": "en", "doc_type": "text", "blob_id": "06... | # Application organization tools
This repository contains tools and scripts to manage our application repository.
## Application repository structure
Check out the wiki: https://github.com/nesi/app-org/wiki
## app-org.py
A script to auto-generate documentation pages for applications installed on one or more cluste... |
00fd21a0-1da7-49f5-a90f-d6f6511c272e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-10 17:37:51", "repo_name": "severynm/jira2", "sub_path": "/tracker/src/main/java/com/severynm/tracker/task/domain/dto/CommentDto.java", "file_name": "CommentDto.java", "file_ext": "java", "file_size_in_byte": ... | package com.severynm.tracker.task.domain.dto;
import java.time.LocalDateTime;
public class CommentDto extends CreateCommentDto {
private Long commentId;
private LocalDateTime created;
public Long getCommentId() {
return commentId;
}
public void setCommentId(Long commentId) {
thi... |
46aa892b-4cde-40cc-8e60-6674a7214b09 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-12 14:27:15", "repo_name": "robins80/Imperium", "sub_path": "/src/com/game/gui/GameGUI.java", "file_name": "GameGUI.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 34, "lang": "en", "doc_typ... | package com.game.gui;
import javax.swing.JPanel;
import com.game.main.ImperiumGame;
import java.awt.Dimension;
import java.awt.Color;
import java.awt.Rectangle;
public class GameGUI extends JPanel {
/**
*
*/
private static final long serialVersionUID = 7231022443180513672L;
private ImperiumGame ga... |
fef85a8b-2b57-4d60-aefc-8286c9b2a943 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-09-01 20:18:58", "repo_name": "skylot/jadx", "sub_path": "/jadx-core/src/test/java/jadx/tests/integration/others/TestRedundantReturn.java", "file_name": "TestRedundantReturn.java", "file_ext": "java", "file_size_... | package jadx.tests.integration.others;
import org.junit.jupiter.api.Test;
import jadx.core.dex.nodes.ClassNode;
import jadx.tests.api.IntegrationTest;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.MatcherAssert.assertThat;
import stati... |
74a07bcf-8211-4a49-ba79-64e2d5e9a0a3 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-07 07:49:37", "repo_name": "niceyilin/OOD", "sub_path": "/ParkingLot/src/Car.java", "file_name": "Car.java", "file_ext": "java", "file_size_in_byte": 706, "line_count": 25, "lang": "en", "doc_type": "code", "b... | /**
* Created by Yilin on 3/4/2017.
*/
public class Car extends Vehicle {
public Car(String maker, String licenseNum){
super(maker, licenseNum);
spotsNeeded = 1;
size = VehicleSize.Compact;
}
@Override
public boolean canFitInSpot(ParkingSpot spot) {
return ... |
6845bba9-dfed-4045-9273-e9933ae91eb5 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-11-27T12:35:25", "repo_name": "LeejwUniverse/metaRL_PFN_Pytorch", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 704, "line_count": 29, "lang": "en", "doc_type": "t... | # meta-RL from the perspective of Prefrontal Cortex.
## PreFrontal Network(PFN)
I just imitated a network architecture.
The experimental setting is different from the paper.
- - -
#### Paper List
|No.|Name|Ref|
|---|---|---|
|1|Prefrontal Cortex as a Meta-Reinforcement Learning System|https://www.biorxiv.org/conte... |
f179070b-f7be-4060-b6e1-eb43654921a5 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-11-03T21:36:55", "repo_name": "erikgaal/SandboxRPG", "sub_path": "/src/main/java/com/sandboxrpg/client/render/Camera.java", "file_name": "Camera.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": ... | package com.sandboxrpg.client.render;
import com.sandboxrpg.entities.Entity;
import org.lwjgl.opengl.GL11;
import org.lwjgl.util.vector.Vector3f;
public class Camera {
private Vector3f position;
private Vector3f rotation;
public Camera() {
this.position = new Vector3f();
this.rotation = ... |
6fcab0a9-6d91-49a3-90be-72f38b9b78b1 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-05-05 03:24:57", "repo_name": "senghor-song/Naruto-Uzumaki", "sub_path": "/Uzumzki-project/2018/eke/src/main/java/com/xiaoyi/ssm/service/impl/EmpChatServiceImpl.java", "file_name": "EmpChatServiceImpl.java", "fil... | package com.xiaoyi.ssm.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xiaoyi.ssm.dao.EmpChatMapper;
import com.xiaoyi.ssm.model.EmpChat;
import com.xiaoyi.ssm.service.EmpChatService;
/**
* @Description: 商户变更日志
* @author 宋高俊 ... |
2eacf049-bb6a-4e01-b207-4c8e90ad27ff | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-03 09:50:35", "repo_name": "green-fox-academy/lazarsoma", "sub_path": "/week-06/Day-02/springstart/src/main/java/com/greenfoxacademy/springstart/controller/HelloRESTController.java", "file_name": "HelloRESTCon... | package com.greenfoxacademy.springstart.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.concurrent.atomic.AtomicLong;
@RestController
public class Hel... |
297c8794-2ef4-4754-b171-8f211d9219f8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-18 04:58:57", "repo_name": "bnguyen212/CS111C", "sub_path": "/Module 13/HomeworkM13Files/DequeStack.java", "file_name": "DequeStack.java", "file_ext": "java", "file_size_in_byte": 702, "line_count": 39, "lang"... | import java.util.EmptyStackException;
public final class DequeStack<T> implements StackInterface<T> {
private DequeInterface<T> deque;
public DequeStack() {
deque = new LinkedDeque<T>();
}
public void push(T newEntry) {
if (newEntry != null) {
deque.addToFront(newEntry);
}
}
public T p... |
9ea3caa9-3960-42f0-ae4b-4b318c733143 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-25 04:24:57", "repo_name": "indrajithbandara/LearnConcurrentPrograming", "sub_path": "/src/cc/staralloff/bxcxjc/thread/Chapter02/BadLockOnInteger.java", "file_name": "BadLockOnInteger.java", "file_ext": "java"... | package cc.staralloff.bxcxjc.thread.Chapter02;
public class BadLockOnInteger implements Runnable {
public static Integer i=0;
static BadLockOnInteger instance = new BadLockOnInteger();
@Override
public void run() {
synchronized (instance){
for(int j=0;j<10000000;j++){
... |
df8e758a-414c-44c9-b798-264bf50de0e3 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-29 16:20:30", "repo_name": "Sandaru293/Institute", "sub_path": "/Institute/src/entity/Course.java", "file_name": "Course.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 40, "lang": "en", "do... | package entity;
public class Course {
private String couId;
private String couName;
private Double fee;
public Course(){}
public Course(String couId, String couName, Double fee) {
this.couId = couId;
this.couName = couName;
this.fee = fee;
}
public String getCouId... |
878c3c67-de2f-4b83-9210-cdddd44ea597 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-18 14:28:44", "repo_name": "madeinlobby/memoReminder", "sub_path": "/app/src/main/java/ir/madeinlobby/memoreminder/AccountArea.java", "file_name": "AccountArea.java", "file_ext": "java", "file_size_in_byte": 7... | package ir.madeinlobby.memoreminder;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import ir.madeinlobby.memoreminder.utilities.BaseController;
public class AccountArea extends AppCompatActivity {
@Override
protected void... |
520a3379-9692-4d5b-882a-f49130c8c5f2 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-19 09:40:15", "repo_name": "riyaswati04/ins1", "sub_path": "/java/com/ia/util/impl/DigestImpl.java", "file_name": "DigestImpl.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 24, "lang": "en"... | package com.ia.util.impl;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import org.bouncycastle.util.encoders.Hex;
import com.google.inject.Singleton;
import com.ia.util.Digest;
@Singleton
public class DigestImpl implements Digest {
... |
edceaa0f-64e4-448a-9792-be281ef67df0 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-23 14:02:58", "repo_name": "ChangeMaker13/JavaGame_RythmGame", "sub_path": "/src/rythmGame/GImage.java", "file_name": "GImage.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 37, "lang": "en"... | package rythmGame;
import java.awt.Graphics2D;
import java.awt.Image;
import javax.swing.ImageIcon;
public class GImage extends GameObject{
private Image image;
private int xpos;
private int ypos;
public GImage(String fileName, int x, int y) {
super(Type.IMAGE);
image = new ImageIcon
(getClass().getCla... |
303c11f2-9c84-47b5-8f93-93592ebad8d0 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-10-09T16:47:49", "repo_name": "thomas-rager/python-gamepad-keyboard", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 704, "line_count": 25, "lang": "en", "doc_type"... | # python-gamepad-keyboard
# Introduction
You have to install the [corresponding sketch](https://github.com/thomas-rager/serial-arduino-gamepad) on your Arduino UNO or compatible.
The Arduino will send all keypresses over the serial-interface and this script will
emulate a keyboard to make the gamepad usabel under lin... |
26edbbfc-267c-4069-923f-a00ac06a7fd2 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-11 14:06:46", "repo_name": "linsword20/wechatapp", "sub_path": "/src/info/linsword20/weather/bean/WeatherInfo.java", "file_name": "WeatherInfo.java", "file_ext": "java", "file_size_in_byte": 705, "line_count":... | package info.linsword20.weather.bean;
public class WeatherInfo
{
private String date;
private String temp;
private String weather;
private String wind;
public String getDate()
{
return date;
}
public WeatherInfo setDate(String date)
{
this.date = date;
return this;
}
public String getTemp()
... |
d193279d-9e2f-4cfb-95ed-6c272297727a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-08-28T13:29:48", "repo_name": "juliocesarscheidt/s3-file-python-vba", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 703, "line_count": 25, "lang": "en", "doc_type"... | # S3 file download with Python and access with VBA
This simple project is using the following stacks:
- Python
- AWS S3
- VBA/Excel
- A Bitcoin API
With this stacks, we will use the Python script to download a JSON file from
S3 with boto3, and save it locally.
The Excel with VBA will call this Python script to perf... |
218b48d6-6e61-4334-ad16-45253d7d76bb | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-12 01:58:25", "repo_name": "oDebug/sunshine", "sub_path": "/src/main/java/merrymac/sunshinecontacts/dao/entity/PhoneNumber.java", "file_name": "PhoneNumber.java", "file_ext": "java", "file_size_in_byte": 684, ... | package merrymac.sunshinecontacts.dao.entity;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "phone_numbers", schema = "sunshine")
@Data
@NoArgsConstructor
public... |
4b913781-31e0-4b83-bed3-05fac870959f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-01-31 10:29:27", "repo_name": "swaroopvincent/system-monitoring", "sub_path": "/src/main/java/com/swarup/system/monitoring/model/Configuration.java", "file_name": "Configuration.java", "file_ext": "java", "file_s... | package com.swarup.system.monitoring.model;
import java.util.List;
/**
* Created by eswavin on 6/25/16.
*/
public class Configuration {
private Machine machine;
private List<Metric> metrics;
public Machine getMachine() {
return machine;
}
public void setMachine(Machine machine) {
... |
e1b8bcaf-39bb-48c3-9a4e-f345bb2e80fc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-09-03T21:56:11", "repo_name": "pudu87/messager", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 703, "line_count": 14, "lang": "en", "doc_type": "text", "blob_id": ... | ## Messager
_Building a message sending app to familiarize with Action Cable in Rails._
* From The Odin Project's [curriculum](https://www.theodinproject.com/paths/full-stack-ruby-on-rails/courses/ruby-on-rails/lessons/authentication#project-members-only)
* Direct link to the [tutorial](https://github.com/TheOdinProje... |
54c84eeb-05cb-42f8-a2cb-aa3f674cfff0 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-05-21T05:47:11", "repo_name": "terrehbyte/UnityTools", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 702, "line_count": 22, "lang": "en", "doc_type": "text", "blob... | # Unity Tools
This is a collection of utilities and helper scripts for Unity.
## Repository Structure
```
README.md This file! :)
Assets/ Special folder for assets for Unity project.
UnityTools/ Scripts, materials, and other nifty stuff.
Demo/ ... |
9873b195-3f4f-49f0-92d8-185522d13327 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-04 13:10:36", "repo_name": "chenshi91/springMVC2", "sub_path": "/src/main/java/com/quanhu/my/exception/ApplicationException.java", "file_name": "ApplicationException.java", "file_ext": "java", "file_size_in_by... | /**Created by chenshi at 2018年1月3日 下午7:57:07*/
package com.quanhu.my.exception;
/**
* @description: ApplicationException.java
* @packageName: com.quanhu.my.exception
* @projectName: quanhu-springMVC2
* @revision: v1.0.0
* @author: chenshi
*/
public class ApplicationException extends RuntimeExce... |
20c3c3e6-b8dd-4d9f-81a5-398b5cff003e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-10-20T10:17:49", "repo_name": "xyng/yuoshi-backend-adapter", "sub_path": "/packages/backend-adapter/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 704, "line_count": 17, "lang": ... | # yUOShi Backend Adapter Definitions
This repository contains interfaces, abstract classes and some useful helper-methods
required to implement an adapter for [yUOShi](https://github.com/juliandierker/yUOShi) to your arbitrary api.
## Installation
Install this package with any node package manager of your choice (like... |
482e4b5a-87a7-4a1a-85a7-ee17ccd149d6 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-26 07:40:22", "repo_name": "OkuhleNdlebe/Adp3StudentCounsellingSystem", "sub_path": "/src/main/java/za/ac/cput/factory/CounsellingSpecializationFactory.java", "file_name": "CounsellingSpecializationFactory.jav... | package za.ac.cput.factory;
/*
*Author:Okuhle Ndlebe
* Date: 11/06/2021
* Descripation:
*/
import za.ac.cput.Util.GenericHelper;
import za.ac.cput.entity.generic.CounsellorSpecialization;
public class CounsellingSpecializationFactory {
public static CounsellorSpecialization createCounsellingSpecialization(int... |
4cc01d67-7170-4a31-9b8a-81d20001febe | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-19 07:36:42", "repo_name": "dolynhan15/Java-spring-boot", "sub_path": "/Project-new-spring/boost-server-master/boost-server-api/src/main/java/com/qooco/boost/data/enumeration/ApprovalStatus.java", "file_name":... | package com.qooco.boost.data.enumeration;
import com.qooco.boost.data.constants.Constants;
public enum ApprovalStatus {
PENDING(Constants.PENDING_STATUS, Constants.PENDING_STATUS_MESSAGE),
APPROVED(Constants.APPROVED_STATUS, Constants.APPROVED_STATUS_MESSAGE),
DISAPPROVED(Constants.DISAPPROVED_STATUS, Constants.D... |
69fd3710-b27b-4ef1-90b0-4a17f5345933 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-30T18:58:39", "repo_name": "appshakerserbia/itbbootcamp", "sub_path": "/src/base/Test5.java", "file_name": "Test5.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 33, "lang": "en", "doc_type"... | package base;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.Assert;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
public class Test5 {
WebDriver driver;
@BeforeTest
public void setup() {
System.setProperty("webdriver.... |
b5f99655-fb46-477d-a6b3-d2cc4e855f2e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-11-25T21:26:24", "repo_name": "andreiulinici/aaai-project", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 702, "line_count": 22, "lang": "en", "doc_type": "text", ... | # aaai-project
This is a Proof of Concept application for showing a simple [Single Sign-On](https://en.wikipedia.org/wiki/Single_sign-on) authentication solution.
It is a Node.js application that uses [Passport](http://www.passportjs.org/) strategy in order for you to easily and securely authenticate in the app with y... |
48808a49-b877-4b01-9b7e-f5d49bd66cfb | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-04 03:31:58", "repo_name": "GDW1/APCSAsem2_GDW1", "sub_path": "/APCS A CW 415/Cell.java", "file_name": "Cell.java", "file_ext": "java", "file_size_in_byte": 703, "line_count": 32, "lang": "en", "doc_type": "co... |
/**
* Write a description of class Cell here.
*
* @author (your name)
* @version (a version number or a date)
*/
import java.util.*;
public class Cell
{
// instance variables - replace the example below with your own
boolean occupied;
int id;
ArrayList<Cell> neighbors = new ArrayList<Cell>();
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.