id
stringlengths
36
36
meta
stringlengths
429
697
url
stringlengths
27
109
tokens
int64
137
584
domain_prefix
stringlengths
16
106
score
float64
0.16
0.3
code_content
stringlengths
960
1.25k
cd4e047a-6b1d-44d4-bdb0-d43c376afce7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-24 14:53:51", "repo_name": "clementzentz/Todoc", "sub_path": "/app/src/main/java/com/cleanup/todoc/viewModel/TaskViewModel.java", "file_name": "TaskViewModel.java", "file_ext": "java", "file_size_in_byte": 1058, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "9ca04afd854acc669852a86f747dc85b361e2fcd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/clementzentz/Todoc
202
FILENAME: TaskViewModel.java
0.281406
package com.cleanup.todoc.viewModel; import android.app.Application; import androidx.annotation.NonNull; import androidx.lifecycle.AndroidViewModel; import androidx.lifecycle.LiveData; import com.cleanup.todoc.model.Task; import com.cleanup.todoc.model.TaskAndProject; import com.cleanup.todoc.repository.TaskRepository; import java.util.List; public class TaskViewModel extends AndroidViewModel { private TaskRepository mTaskRepository; private LiveData<List<TaskAndProject>> mAllTasks; public TaskViewModel(@NonNull Application application) { super(application); mTaskRepository = new TaskRepository(application); mAllTasks = mTaskRepository.getTasksWithProject(); } public LiveData<List<TaskAndProject>> getAllTasks(){ return mAllTasks; } public void insert(Task task){ mTaskRepository.insert(task); } public void delete(Task task){ mTaskRepository.deleteTask(task); } public void update(Task task){ mTaskRepository.updateTask(task); } }
565468e0-747e-4c2d-8836-4ce36b2e95ae
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-15 17:28:52", "repo_name": "YUHAO-ZX/Magazine", "sub_path": "/persistence/src/main/java/com/woom/magazine/persistence/hbase/schema/Field.java", "file_name": "Field.java", "file_ext": "java", "file_size_in_byte": 1105, "line_count": 58, "lang": "en", "doc_type": "code", "blob_id": "5cfa3e64edaa5d83491d4ac2615e783d7bd410df", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/YUHAO-ZX/Magazine
304
FILENAME: Field.java
0.272025
/** * Alipay.com Inc. * Copyright (c) 2004-2018 All Rights Reserved. */ package com.woom.magazine.persistence.hbase.schema; /** * 字段 * * @author yuhao.zx * @version $Id: Field.java, v 0.1 2018年10月30日 11:06 PM yuhao.zx Exp $ */ public class Field { private Type type; private String fieldName; /** * Getter method for property <tt>fieldName</tt>. * * @return property value of fieldName */ public String getFieldName() { return fieldName; } /** * Setter method for property <tt>fieldName</tt>. * * @param fieldName value to be assigned to property fieldName */ public void setFieldName(String fieldName) { this.fieldName = fieldName; } /** * Getter method for property <tt>type</tt>. * * @return property value of type */ public Type getType() { return type; } /** * Setter method for property <tt>type</tt>. * * @param type value to be assigned to property type */ public void setType(Type type) { this.type = type; } public enum Type { INT, STRING } }
c4838a31-e43a-469a-b835-90cedea32abb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-24 21:17:12", "repo_name": "magisto16/TugasBesarPBOITERA", "sub_path": "/src/VendingMachineItera/Connect.java", "file_name": "Connect.java", "file_ext": "java", "file_size_in_byte": 1011, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "490015c73ae08d572daf60af69fc2d1d0e78c99b", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/magisto16/TugasBesarPBOITERA
189
FILENAME: Connect.java
0.224055
/* * 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 VendingMachineItera; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author User */ public class Connect { Connection koneksi; public Connection getConnection() { try { koneksi= DriverManager.getConnection("jdbc:mysql://localhost/vending_machine","root",""); } catch(SQLException ex) { System.out.println("Tidak dapat menyambungkan database"); } return koneksi; } void close(Connection Connect) { try { Connect.close(); } catch (SQLException ex) { Logger.getLogger(Connect.class.getName()).log(Level.SEVERE,null,ex); } } }
5d20d0b7-2a1f-4f10-87d2-d2219bd546ad
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2014-04-01T12:10:11", "repo_name": "xsteadfastx/MusicCodes", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1023, "line_count": 34, "lang": "en", "doc_type": "text", "blob_id": "2555dfb52744681f487f478f3bfc72a64b5af05d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xsteadfastx/MusicCodes
225
FILENAME: README.md
0.239349
MusicCodes ========== A webapp for generating and managing download codes and serving the files. ![screenshot](screenshot.jpg) ## Usage ## ``` Usage: MusicCodes.py run MusicCodes.py create <number> MusicCodes.py add <number> MusicCodes.py show MusicCodes.py voucher --all MusicCodes.py voucher <from> <to> MusicCodes.py reset <code> MusicCodes.py -h | --help Options: -h --help Show this screen. run Starts MusicCodes Web. create <number> Creates DB with number of codes. add <number> Adds number of codes to existing DB. show Show all DB entries. voucher --all Creates a voucher PDF with all codes. voucher <from> <to> Creates a voucher PDF with a range of codes. reset <code> Resets the USED counter for a specific code. ``` ### voucher ### For using the voucher option you need to have latex installed. Needs `latexpdf`.
5c413353-2410-4d6f-9904-5d0d3f865933
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-04-04T18:03:17", "repo_name": "PyAmsterdam/py-meetups", "sub_path": "/events/2019-05-16-crunchr/talk2.md", "file_name": "talk2.md", "file_ext": "md", "file_size_in_byte": 1124, "line_count": 24, "lang": "en", "doc_type": "text", "blob_id": "a8903062527273f8d737ceb2ceec4a358061d4a6", "star_events_count": 12, "fork_events_count": 13, "src_encoding": "UTF-8"}
https://github.com/PyAmsterdam/py-meetups
226
FILENAME: talk2.md
0.183594
Talk2: Writing Custom Kubernetes Resource Controllers with Python ================================================================= by [Jan van der Vegt](https://github.com/janvdvegt) Jan is a data scientist that worked at KLM for 3.5 years before starting Cubonacci, a machine learning life cycle management platform. Abstract ------------ Kubernetes allows you to orchestrate microservices and batchjobs in a declerative way. The base Kubernetes resources like Pods, Deployments, Services and Jobs can get you far but there are benefits to creating project specific abstractions on top of those. Kubernetes gives you the option to easily define custom resources that can be managed via the Kubernetes API. Of course, what actually needs to happen when you create, patch or delete these components needs to be coded. Metacontroller is a project that makes it easy to manage these custom resources via your custom rolled API. In this talk I will show you what the benefits of custom resources are, how metacontroller works and how to use a framework like Flask to implement the business logic for your custom resources.
212d29f4-debe-4eb1-bdab-6a69ad41aa0f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-02-11 11:02:26", "repo_name": "sanjeeva/TechnologyShowCase", "sub_path": "/src/main/java/com/sample/core/utilities/lang/ReflectionUtilities.java", "file_name": "ReflectionUtilities.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "3cd445b0ff39b3a68c7c5982ac2a7229a73d6bd7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sanjeeva/TechnologyShowCase
217
FILENAME: ReflectionUtilities.java
0.290176
package com.sample.core.utilities.lang; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public final class ReflectionUtilities { private ReflectionUtilities() { throw new UnsupportedOperationException("Utility modules should not be instantiated"); } public static <T> T instantiate(Class<? extends T> clazz, Object... ctorArgs) { Class<?>[] argTypes = new Class<?>[ctorArgs.length]; T instantiatedObj = null; for (int i = 0; i < ctorArgs.length; i++) { argTypes[i] = ctorArgs[i].getClass(); } try { Constructor<?> instantiableCtor = clazz.getConstructor(argTypes); instantiatedObj = clazz.cast(instantiableCtor.newInstance(ctorArgs)); } catch (NoSuchMethodException e) { } catch (IllegalArgumentException e) { } catch (InstantiationException e) { } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { throw new RuntimeException(e.getTargetException()); } return instantiatedObj; } }
7caa5a54-b558-4f42-a29f-cae83f51c7ed
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-07-10T09:05:48", "repo_name": "AmsterdamUMC/AmsterdamUMCdb", "sub_path": "/concepts/lifesupport/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1172, "line_count": 18, "lang": "en", "doc_type": "text", "blob_id": "e8404da77cefc09863cfdcead5cf842909312fbb", "star_events_count": 122, "fork_events_count": 45, "src_encoding": "UTF-8"}
https://github.com/AmsterdamUMC/AmsterdamUMCdb
272
FILENAME: README.md
0.249447
<img src="../../img/logo_amds.png" alt="Logo" height="128px"/> # AmsterdamUMCdb - Freely Accessible ICU Database version 1.0.2 March 2020 Copyright &copy; 2003-2020 Amsterdam UMC - Amsterdam Medical Data Science # Life Support This folder contains code to extract the life support a patient has received. # Mechanical ventilation Shows the modes or types of mechanical ventilation (artificial respiration), if any, a patient received. Includes common ventilation parameters: ventilation mode, peak airway pressure, PEEP, respiratory rate, tidal volume, minute volume/ventilation, end tidal CO2. # Vasopressors and inotropes Shows medication for artificially increasing blood pressure (vasopressors) or stimulating heart function (inotropes), if any, a patient received. # Renal replacement therapy Shows the mode or types of renal replacement therapy (artificial kidney), if any, a patient received. Includes common renal replacement therapy (RRT) parameters: RRT mode, blood flow rate, substitution fluid, substitution flow rate, net, ultrafiltration rate, filter session time and circuit pressures (arterial, venous, pre-filter, ultrafiltration, transmembrane).
440820ce-21ab-4059-81b3-f396ed4bd735
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-20 11:10:07", "repo_name": "ZhendeLiang/realHeart", "sub_path": "/src/main/java/com/liangzd/realHeart/VO/SuccJson.java", "file_name": "SuccJson.java", "file_ext": "java", "file_size_in_byte": 1127, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "859414f6d1b938178827cb78508c8e3103902370", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ZhendeLiang/realHeart
306
FILENAME: SuccJson.java
0.246533
package com.liangzd.realHeart.VO; /** * * @Description: 返回正确的消息数据,用于需要页面跳转 * @author liangzd * @date 2018年6月20日 下午4:00:33 */ public class SuccJson { private Integer setTime;//时间 private String msg;//返回消息 private String url;//返回准备跳转地址 private boolean jump;//是否跳转 public Integer getSetTime() { return setTime; } public void setSetTime(Integer setTime) { this.setTime = setTime; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public boolean isJump() { return jump; } public void setJump(boolean jump) { this.jump = jump; } public SuccJson(Integer setTime, String msg, String url, boolean jump) { super(); this.setTime = setTime; this.msg = msg; this.url = url; this.jump = jump; } public SuccJson() { super(); } @Override public String toString() { return "SuccJson [setTime=" + setTime + ", msg=" + msg + ", url=" + url + ", jump=" + jump + "]"; } }
a8fa4238-5655-456f-8063-bd6446d67793
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-28 21:08:30", "repo_name": "kineks0-0/Get-CoolApk-s-Fans", "sub_path": "/CoolApkFans/src/io/FileWrite.java", "file_name": "FileWrite.java", "file_ext": "java", "file_size_in_byte": 1101, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "018af223261f19e8cf8d570c9af771631b66d349", "star_events_count": 5, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kineks0-0/Get-CoolApk-s-Fans
209
FILENAME: FileWrite.java
0.287768
package io; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; public class FileWrite { public static void write2File(String FileName, String str) { File file = new File(FileName); if (!file.exists()) { try { file.createNewFile(); // 如果文件不存在则创建文件 } catch (IOException e) { e.printStackTrace(); } } writeInFile(file, str); // 写入文件 } private static void writeInFile(File file, String content) { Writer writer = null; StringBuilder outputString = new StringBuilder(); try { outputString.append(content); writer = new FileWriter(file, false); // true表示追加 writer.write(outputString.toString()); } catch (IOException e) { e.printStackTrace(); } finally { try { writer.close(); } catch (IOException e2) { e2.printStackTrace(); } } } }
cd3bf158-d8ab-446c-8615-eeb92a4ac7b1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-07 06:49:36", "repo_name": "youlookbetteronline/MessagesApplication", "sub_path": "/app/src/main/java/com/example/gav/messagesapplication/viewholders/OtherMessageViewHolder.java", "file_name": "OtherMessageViewHolder.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "b3c63561f120a1357409b47df4adf8933155f3ab", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/youlookbetteronline/MessagesApplication
215
FILENAME: OtherMessageViewHolder.java
0.252384
package com.example.gav.messagesapplication.viewholders; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.bumptech.glide.request.RequestOptions; import com.example.gav.messagesapplication.R; import com.example.gav.messagesapplication.model.MyMessage; import com.example.gav.messagesapplication.model.OtherMessage; public class OtherMessageViewHolder extends BaseViewHolder<OtherMessage>{ private ImageView ivIcon; private TextView tvMessage; private TextView tvDate; public OtherMessageViewHolder(View itemView) { super(itemView); ivIcon = itemView.findViewById(R.id.ivIconOthermessage); tvMessage = itemView.findViewById(R.id.tvMessageOthermessage); tvDate = itemView.findViewById(R.id.tvDateOthermessage); } @Override public void bind(OtherMessage object) { tvMessage.setText(object.getMessage()); tvDate.setText(object.getDate()); Glide.with(ivIcon) .load(object.getIconURL()) .apply(RequestOptions.circleCropTransform()) .into(ivIcon); } }
c2aa1f0b-3053-4645-a488-da2baa531d90
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-04-07T05:59:54", "repo_name": "danieljungdong/travelapp", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1125, "line_count": 38, "lang": "en", "doc_type": "text", "blob_id": "0d174cc59357ef9118fcfbfd9930dab523831887", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/danieljungdong/travelapp
263
FILENAME: README.md
0.210766
# travelapp This is a project requirement for Udacity's front end nanodegree program. ## Learning goals My goals for this course is to learn the following - Use webpack to manage the front end and back end code and enable faster testing - Gain more experience directly developing and styling a webpage with display:grid and display:flex. - Gain some experience using test frameworks in javascript (jest) - Review some concepts that I've learned while hacking my own side projects. ## Extend Options - Remove trip functionality when a trip is showing - Adding multi day forecast (day 7-14) when trip is not within the next 7 days ## How to run the project To run in dev mode, input in command line: ``` npm run buil-dev ``` To build a distribution file, input in command line: ``` npm run buil-prod ``` To serve the distribution file, input in command line: ``` npm run start ``` To check on the tests, input in command line: ``` npm run test ``` ## Dependencies Check out package.json in the root directory for more details. To download all dependencies, run ``` npm install ``` at the root directory of this project.
42066eaa-7761-41bd-af0d-4137386bcaf5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-20 07:54:47", "repo_name": "Luomingbear/likeMosaic", "sub_path": "/android/app/src/main/java/cn/bearever/likemosaic/MosaiApplication.java", "file_name": "MosaiApplication.java", "file_ext": "java", "file_size_in_byte": 1178, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "d1ed2efff9ba879bee8b7fd2410acf50ee3bfa15", "star_events_count": 6, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/Luomingbear/likeMosaic
258
FILENAME: MosaiApplication.java
0.259826
package cn.bearever.likemosaic; import android.util.Log; import cn.bearever.mingbase.app.BaseApplication; import io.agora.rtc.RtcEngine; /** * @author luoming * @date 2020/4/16 */ public class MosaiApplication extends BaseApplication { private AgoraEventHandler mHandler; private RtcEngine mRtcEngine; static { System.loadLibrary("apm-mosaic"); } @Override public void onCreate() { super.onCreate(); try { mHandler = new AgoraEventHandler(); mRtcEngine = RtcEngine.create(getApplicationContext(), getString(R.string.agora_app_id), mHandler); Log.e("执行1", "----------"); } catch (Exception e) { e.printStackTrace(); Log.e("错误", e.toString()); } } public void registerHandler(EventHandler handler){ mHandler.addHandler(handler); } public void unregisterHandler(EventHandler handler){ mHandler.removeHandler(handler); } public RtcEngine rtcEngine() { return mRtcEngine; } @Override public void onTerminate() { super.onTerminate(); RtcEngine.destroy(); } }
ac5646dd-f1a7-4441-9fdd-9c3838eed264
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-21 22:15:52", "repo_name": "haadbaig/medic", "sub_path": "/app/src/main/java/com/example/project/models/Doctor.java", "file_name": "Doctor.java", "file_ext": "java", "file_size_in_byte": 1029, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "aa1bbe62f7024d7f36e4842cf1d85128606ed33f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/haadbaig/medic
212
FILENAME: Doctor.java
0.220007
package com.example.project.models; import java.io.Serializable; import java.util.ArrayList; public class Doctor implements Serializable { String name; ArrayList<String> comments; int rating; String desc; String specialization; public Doctor(){}; public Doctor(String n, ArrayList<String> comm, int rat, String de, String spec ){ name = n; comments =comm; rating = rat; desc = de; specialization = spec; } public void setter(String n, ArrayList<String> comm, int rat, String de, String spec ){ name = n; comments =comm; rating = rat; desc = de; specialization = spec; } public String getName() { return name; } public ArrayList<String> getComments() { return comments; } public int getRating() { return rating; } public String getDesc() { return desc; } public String getSpecialization() { return specialization; } }
ccbfc07b-8e1a-4809-858c-ce37e6e7542e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-18 12:04:24", "repo_name": "skywtchr/MessengerProject", "sub_path": "/Server/src/Client/ServiceHandlersWithKSoap/AuthenticationHandler.java", "file_name": "AuthenticationHandler.java", "file_ext": "java", "file_size_in_byte": 1098, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "7434013bb52ab6228096a84d50b99153ba9aa5ae", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/skywtchr/MessengerProject
192
FILENAME: AuthenticationHandler.java
0.26971
package Client.ServiceHandlersWithKSoap; import Contract.DTO.Credentials; import org.ksoap2.serialization.SoapPrimitive; public class AuthenticationHandler extends ServiceBaseHandler { public AuthenticationHandler() { super(Configuration.AUTHENTICATION_MODULE_NAME); } public void registerUser(Credentials credentials) throws Exception { callMethodWithParametersAndGetSoapResponse( Configuration.REGISTER_USER_METHOD_NAME, credentials); } public boolean logInAndGetToken(Credentials credentials) throws Exception { SoapPrimitive tokenResult = (SoapPrimitive) callMethodWithParametersAndGetSoapResponse( Configuration.LOGIN_AND_GET_TOKEN_METHOD_NAME, credentials); String token = tokenResult.getValue().toString(); sharedToken.set(token); System.out.println("--> Token is: " + token); return true; } public boolean logOut() throws Exception { callMethodWithParametersAndGetSoapResponse("logOut", null); return true; } }
267abafd-638a-4386-bee3-da75d48740e2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-14 13:47:10", "repo_name": "oopalinska/bank-project", "sub_path": "/src/main/java/org/kaczucha/service/TransactionService.java", "file_name": "TransactionService.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "af739db8109d7ff9f881234ae7907e90e0d0650b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/oopalinska/bank-project
173
FILENAME: TransactionService.java
0.291787
package org.kaczucha.service; import lombok.RequiredArgsConstructor; import org.kaczucha.controller.dto.TransactionRequest; import org.kaczucha.repository.TransactionRepository; import org.kaczucha.repository.entity.TransactionEntity; import org.springframework.stereotype.Service; import java.time.OffsetDateTime; @Service @RequiredArgsConstructor public class TransactionService { private final TransactionRepository repository; private final AccountService accountService; public void createTransaction(TransactionRequest request) { accountService.transfer( request.getFromAccountId(), request.getToAccountId(), request.getCurrency(), request.getAmount()); repository.save( TransactionEntity.builder() .amount(request.getAmount()) .currency(request.getCurrency()) .fromAccountId(request.getFromAccountId()) .toAccountId(request.getToAccountId()) .transactionDate(OffsetDateTime.now()) .build() ); } }
811194b5-ea11-4da9-879d-8b8b63f9e996
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-08 08:44:42", "repo_name": "mrdaddy/XMLGate", "sub_path": "/src/main/java/by/iba/railway/eticket/xml/objs/request/express/ScheduleStationG19Request.java", "file_name": "ScheduleStationG19Request.java", "file_ext": "java", "file_size_in_byte": 1038, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "9e67f59b484c06c0b8c2887492a21041e07bb012", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mrdaddy/XMLGate
231
FILENAME: ScheduleStationG19Request.java
0.259826
package by.iba.railway.eticket.xml.objs.request.express; import by.iba.railway.eticket.xml.objs.request.BaseRequest; import javax.xml.bind.annotation.*; @XmlRootElement(name = "GtExpress_Request") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "GtExpress_RequestType", propOrder = { "station", "date" }) public class ScheduleStationG19Request extends BaseRequest{ @XmlElement(name = "Station", required = true) protected String station; @XmlElement(name = "Date", required = true) protected String date; public ScheduleStationG19Request(){ this.type="ScheduleStation"; } public ScheduleStationG19Request(String station, String date) { this(); this.station = station; this.date = date; } public String getStation() { return station; } public void setStation(String value) { this.station = value; } public String getDate() { return date; } public void setDate(String value) { this.date = value; } }
52958ad8-503c-4051-8e8d-11e650b90d22
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-07-26 14:39:30", "repo_name": "AnnieOmsk/it-conference", "sub_path": "/src/main/java/org/happydev/core/model/event/HallEventType.java", "file_name": "HallEventType.java", "file_ext": "java", "file_size_in_byte": 1058, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "4849ce9a8fb2f2ae0a815bc20d8e116ca98e0291", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AnnieOmsk/it-conference
224
FILENAME: HallEventType.java
0.272799
package org.happydev.core.model.event; import org.happydev.core.model.NamedType; import org.happydev.core.model.WrongTypeNameException; /** * A type of the Hall event */ public class HallEventType extends NamedType { /** * A type for conferences */ public static final String CONFERENCE_TYPE_NAME = "Conference"; /** * A type for hackathons */ public static final String HACKATHON_TYPE_NAME = "Hackathon"; /** * Default constructor by name * @param name a type name */ public HallEventType(final String name) { super(name); } @Override public HallEventType getTypeByName(final String name) throws WrongTypeNameException { if (name == null) { throw new WrongTypeNameException("Type name is empty"); } switch (name) { case CONFERENCE_TYPE_NAME: case HACKATHON_TYPE_NAME: return new HallEventType(name); default: throw new WrongTypeNameException("Type name is wrong"); } } }
e9011c62-86db-4f3c-9295-fd671e11cab2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-17 18:44:17", "repo_name": "EleC0TroN/AS", "sub_path": "/src/main/java/com/electron/alloyssmelter/blocks/SmelterRecipe.java", "file_name": "SmelterRecipe.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "832097ae7d4ec1356e77aec22bf81cf86f88fa73", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/EleC0TroN/AS
261
FILENAME: SmelterRecipe.java
0.294215
package com.electron.alloyssmelter.blocks; import com.electron.alloyssmelter.ModBlocks; import com.electron.alloyssmelter.ModRecipes; import net.minecraft.block.Blocks; import net.minecraft.client.gui.screen.inventory.SmithingTableScreen; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.*; import net.minecraft.util.ResourceLocation; public class SmelterRecipe extends AbstractSmelterRecipe { public SmelterRecipe(ResourceLocation idIn, String groupIn, Ingredient ingredientIn_0, Ingredient ingredientIn_1, ItemStack resultIn, float experienceIn, int cookTimeIn) { super(ALLOY_RECIPE, idIn, groupIn, ingredientIn_0, ingredientIn_1, resultIn, experienceIn, cookTimeIn); } public static final IRecipeType<SmelterRecipe> ALLOY_RECIPE = new IRecipeType<SmelterRecipe>() { @Override public String toString() { return "alloyssmelter:alloying"; } }; public ItemStack getIcon() { return new ItemStack(ModBlocks.ALLOYS_SMELTER.get()); } public IRecipeSerializer<?> getSerializer() { return ModRecipes.SMELTER; } }
0e7126b7-6c59-4b6f-b3be-bd998772604c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-10 17:03:00", "repo_name": "georgefox6/FootballLeague", "sub_path": "/src/main/java/FootballLeague/FootballLeagueFrontend/AlertBox.java", "file_name": "AlertBox.java", "file_ext": "java", "file_size_in_byte": 1058, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "e4e57fd240f10e25d41079cbd00e9d3ec20b5f87", "star_events_count": 4, "fork_events_count": 5, "src_encoding": "UTF-8"}
https://github.com/georgefox6/FootballLeague
205
FILENAME: AlertBox.java
0.253861
package FootballLeague.FootballLeagueFrontend; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.control.Button; import javafx.scene.layout.*; import javafx.stage.Modality; import javafx.stage.Stage; public class AlertBox { public static void display(String title, String message) { Stage window = new Stage(); window.setTitle(title); window.setMaxWidth(200); //Makes it so you have to deal with the alert box before you can interact with the rest of the program window.initModality(Modality.APPLICATION_MODAL); //Creates the labels and button on the alert box Label label = new Label(message); Button okButton = new Button("OK"); okButton.setOnAction(e -> window.close()); VBox layout = new VBox(10); layout.getChildren().addAll(label, okButton); layout.setAlignment(Pos.CENTER); Scene scene = new Scene(layout); window.setScene(scene); window.showAndWait(); } }
91bcc1b4-39ed-4060-bd7b-1a3d5d98ab5e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-19 17:21:10", "repo_name": "KristinLee1997/Gaea", "sub_path": "/gaea-server/src/test/java/com/aries/user/gaea/server/service/CompanyServiceTest.java", "file_name": "CompanyServiceTest.java", "file_ext": "java", "file_size_in_byte": 1027, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "46737be0f8824d2a8a6374329fe4467c46c48dd7", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/KristinLee1997/Gaea
227
FILENAME: CompanyServiceTest.java
0.224055
package com.aries.user.gaea.server.service; import com.aries.user.gaea.server.model.po.Company; import com.aries.user.gaea.server.service.impl.CompanyServiceImpl; import com.aries.user.gaea.server.utils.UUIDUtils; import org.apache.commons.codec.binary.Base64; import org.junit.Test; public class CompanyServiceTest { @Test public void registerTest() { Company company = new Company() {{ setName("aries"); setPassword("123123"); }}; final String registerno = new CompanyServiceImpl().register(company); System.out.println(registerno); } @Test public void encodeTest() { String str = "aries1qa2ws"; String before = new String(Base64.encodeBase64(str.getBytes(), true)); System.out.println("加密:" + before); String after = new String(Base64.decodeBase64(before)); System.out.println("解密:" + after); } @Test public void test() { System.out.println(UUIDUtils.getUUID()); } }
07ab70d8-e37e-4185-b95e-6a4b8f51946d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-27 22:44:19", "repo_name": "rafibr/oopProject-UAS", "sub_path": "/src/trntravel/koneksi.java", "file_name": "koneksi.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "e1fada84921eabf5e77109fbe8d46ac14d44840c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rafibr/oopProject-UAS
223
FILENAME: koneksi.java
0.267408
/* * 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 trntravel; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; import javax.swing.JOptionPane; /** * * @author ACER */ public class koneksi { String SQL; Connection connection; Statement statement; private static Connection koneksi; public static Statement stm; public static Connection getKoneksi(){ if (koneksi==null){ try { String url = "jdbc:mysql://localhost:3306/db_trn"; String user = "admin"; String password = "admin"; DriverManager.registerDriver(new com.mysql.jdbc.Driver()); koneksi = DriverManager.getConnection(url, user, password); JOptionPane.showMessageDialog(null,"Berhasil Koneksi"); } catch (SQLException t){ JOptionPane.showMessageDialog(null,"Error Membuat Koneksi"); } } return koneksi; } }
52b02b53-adab-4a03-8b70-b59361732650
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-13 12:00:43", "repo_name": "kacperski195605/PKMHAIJR", "sub_path": "/src/main/java/pkmhaijr/model/dbEntities/CreditCard.java", "file_name": "CreditCard.java", "file_ext": "java", "file_size_in_byte": 1058, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "a8f4d773f5c6683624e5af843ee34067f13e9716", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kacperski195605/PKMHAIJR
295
FILENAME: CreditCard.java
0.258326
package pkmhaijr.model.dbEntities; import lombok.Data; import javax.persistence.*; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; /** * Created by patry on 23/04/17. */ @Data @Entity @Table(name = "CREDIT_CARDS") public class CreditCard { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id; @NotNull @Column @Size(min = 1, max = 20) private String number; @NotNull @Column @Size(min = 1, max = 80) private String owner; //Trzeba cos wymyslic z datami // @NonNull // @Column // @Size(min = 1, max = 80) // private String expirationDate; //Nie wiem czy trzymanie tego w bazie jest dobrym pomyslem, czy nie lepiej prosic uzytkownika za kazdym razem o wpisanie // @NonNull // @Column // @Size(min = 1, max = 80) // private String safeCode; public CreditCard() { this("", ""); } public CreditCard(String number, String owner) { this.number = number; this.owner = owner; } }
b97e37ea-5421-492f-ba0b-7c991523f85b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-04-23 06:23:25", "repo_name": "nuzla/Projtact-Management-System-Java", "sub_path": "/src/Model/LargeProject.java", "file_name": "LargeProject.java", "file_ext": "java", "file_size_in_byte": 1071, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "6d8e21028ec9d5e550104dbdd032b3235df6c1aa", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nuzla/Projtact-Management-System-Java
218
FILENAME: LargeProject.java
0.27513
/* * 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 Model; /** * * @author Nuzla */ public class LargeProject extends Project{ private int time; private String leader; public LargeProject(){ } public LargeProject(String projectName, String projectId, String desc, String platform,int time,String leader){ super(projectName,projectId,desc,platform); this.time=time; this.leader=leader; } public int getTime() { return time; } public void setTime(int time) { this.time = time; } public String getLeader() { return leader; } public void setLeader(String leader) { this.leader = leader; } @Override public String toString() { return "Large Project{" + "time=" + time + ", leader=" + leader + '}'; } }
7224d0a6-7c70-408c-882b-e9b246c701db
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-26 20:34:43", "repo_name": "deonisij-tyrov/asset-accounting", "sub_path": "/src/main/java/com/maks/assetaccounting/controller/SecurityController.java", "file_name": "SecurityController.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "e0f7eee5dae3dab03947ff6ae0d45aeb608214db", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/deonisij-tyrov/asset-accounting
203
FILENAME: SecurityController.java
0.253861
package com.maks.assetaccounting.controller; import com.maks.assetaccounting.dto.UserDto; import com.maks.assetaccounting.entity.User; import com.maks.assetaccounting.service.user.UserService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; @RestController @Slf4j public class SecurityController { private final UserService userService; @Autowired public SecurityController(final UserService userService) { this.userService = userService; } @PostMapping("/registration") public UserDto addUser(@RequestBody final UserDto userDto) { log.info("registration {}", userDto); final User userFromDb = userService.getByName(userDto.getUsername()); if (userFromDb != null) { throw new IllegalArgumentException(userService.get(userFromDb.getId()) + " already exists"); } return userService.create(userDto); } }
5bd5985f-59a4-4adb-ba74-0fee79983d5c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-05-27T11:23:02", "repo_name": "cltl/DutchFrameNetAnnotation", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1171, "line_count": 59, "lang": "en", "doc_type": "text", "blob_id": "a91422f851a19e79c8657ceebb7003d9f2a97de5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cltl/DutchFrameNetAnnotation
293
FILENAME: README.md
0.23231
# Dutch FrameNet Annotation The goal of this tool is to enable annotation for Dutch FrameNet. ## Install npm Please install [npm](https://www.npmjs.com/get-npm). ## Install node.js Please install node.js On Mac, one possibility is to run: ```bash npm install node@13.10.1 ``` On Ubuntu, [this](https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/) is an option: ``` sudo apt-get install nodejs ``` Please check your version. ```bash node -v ``` Make sure you have at least major version 8. ## Install packages ``` npm install ``` This should install the packages from *package.json*. ## Download resources ``` bash install.sh ``` ## How to use Run ``` node server.js v2 ``` Point your Google Chrome browser towards *http://localhost:8080/*. The application has not been validated on other browsers. For example, the images do not show correctly using Firefox. When you've completed the annotation process, i.e., an image of **the end** is shown. ### What if I make a mistake The command line shows the made annotation. Please write down the identifier and the correct annotation values. ## Output The output is found in **data/v1/annotations.json**.
a9bd5ce4-9891-4ad0-b02d-8c45ef380393
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-09 10:39:12", "repo_name": "kjp0907/BowlingKing", "sub_path": "/app/src/main/java/com/example/tacademy/bowlingkingproject/TabPager/model/BowlingInfo.java", "file_name": "BowlingInfo.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 65, "lang": "en", "doc_type": "code", "blob_id": "a788e8eb9b08ca4e55a41bb927cc22740bd11beb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kjp0907/BowlingKing
253
FILENAME: BowlingInfo.java
0.278257
package com.example.tacademy.bowlingkingproject.TabPager.model; import java.util.HashMap; import java.util.Map; /** * Created by Tacademy on 2017-02-09. */ public class BowlingInfo { String location; String score; Map<String,Boolean> needs = new HashMap<>(); public BowlingInfo(String location, String score) { this.location = location; this.score = score; } public BowlingInfo() { } public Map<String, Object> toInfoMap(){ Map<String,Object> map = new HashMap<>(); map.put("location",location); map.put("score",score); map.put("needs",needs); return map; } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public String getScore() { return score; } public void setScore(String score) { this.score = score; } public Map<String, Boolean> getneeds() { return needs; } public void setneeds(Map<String, Boolean> stars) { this.needs = stars; } }
6165e242-46d7-467e-9839-9740e900c334
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-12-01 10:06:38", "repo_name": "SheenGitHub/testfirstjava", "sub_path": "/src/main/java/network/GetURL.java", "file_name": "GetURL.java", "file_ext": "java", "file_size_in_byte": 1173, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "5cb253775c9de5f2222f1d525a01d11dda82aaa3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/SheenGitHub/testfirstjava
247
FILENAME: GetURL.java
0.259826
package network; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; /** * Created by Administrator on 2016/4/6. */ public class GetURL { public static String curl = "http://115.28.194.148"; public static void getURL(String u) { URL url; InputStreamReader isr; InputStream is; BufferedReader r; String str; try { System.out.println("Reading URL: " + u); url = new URL(u); is = url.openStream(); isr = new InputStreamReader(is); r = new BufferedReader(isr); do { str = r.readLine(); if (str != null) { System.out.println(str); } } while (str != null); } catch (MalformedURLException e) { System.out.println("Must enter a valid URL"); } catch (IOException e) { System.out.println("Can't connect"); } } public static void main(String[] args) { getURL(curl); } }
d2622d06-c1f6-444b-a959-3c1b6cd37158
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-13 07:04:01", "repo_name": "hsjiang/DataBinding", "sub_path": "/app/src/main/java/com/morly/driver/base/BaseNavFragment.java", "file_name": "BaseNavFragment.java", "file_ext": "java", "file_size_in_byte": 1062, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "de54151ce6c94e4e4074d4b3bb02b99b7bd5ae31", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hsjiang/DataBinding
229
FILENAME: BaseNavFragment.java
0.246533
package com.morly.driver.base; import android.databinding.ViewDataBinding; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import com.common.library.viewModel.BaseViewModel; import com.morly.driver.R; import com.morly.driver.widget.AppNavigationBar; import butterknife.BindView; /** * Created by riven_chris on 2017/3/26. */ public abstract class BaseNavFragment<V extends BaseViewModel, D extends ViewDataBinding> extends BaseFragment<V, D> implements AppNavigationBar.OnNavClickListener { @BindView(R.id.navigation_bar) protected AppNavigationBar nav; @Override protected void onViewCreatedFinish(View view, @Nullable Bundle savedInstanceState) { nav.setOnNavClickListener(this); } @Override public void onTitleClick() { } @Override public void onLeftTitleClick() { } @Override public void onLeftIconClick() { } @Override public void onRightTitleClick() { } @Override public void onRightIconClick() { } }
9845c0b1-6a7b-4c63-8586-b349689dd520
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-21 10:46:29", "repo_name": "Silentdoer/demos", "sub_path": "/Demo.SpringBoot进阶三/commonsjarusage/src/main/java/me/silentdoer/commonsjarusage/BeanCopierEntrance.java", "file_name": "BeanCopierEntrance.java", "file_ext": "java", "file_size_in_byte": 1203, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "7f7e7db0ca6ca59ae67c4970e7df0e4132af8a3a", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Silentdoer/demos
258
FILENAME: BeanCopierEntrance.java
0.256832
package me.silentdoer.commonsjarusage; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import net.sf.cglib.beans.BeanCopier; /** * @author liqi.wang * @version 1.0.0 */ public class BeanCopierEntrance { public static void main(String[] args) { Student student = Student.builder().fId(3L).fName("时候").fGender('m').build(); Student student1 = new Student(); System.out.println(student.toString()); User user = User.builder().build(); // false对应后面的null,注意,这两个对象都必须是初始化过的,不是说user为null copy方法内部会自动创建 BeanCopier.create(Student.class, User.class, false).copy(student, user, null); System.out.println(user.toString()); } @Data @AllArgsConstructor @NoArgsConstructor @Builder public static class Student { private Long fId; private String fName; private Character fGender; } @Data @AllArgsConstructor @NoArgsConstructor @Builder public static class User { private String fName; } }
52a408fe-b494-47f3-b5e3-07169aea5367
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-06 02:20:05", "repo_name": "sndpoffcl/Upstac-App", "sub_path": "/Upstac-Master/src/main/java/com/upstac/TestLab/entity/BookingDO.java", "file_name": "BookingDO.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "2ee50f1a8ad99820401bc1935fe7ec1748dbf4dc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sndpoffcl/Upstac-App
233
FILENAME: BookingDO.java
0.255344
package com.upstac.TestLab.entity; import com.fasterxml.jackson.annotation.JsonBackReference; import lombok.Data; import org.hibernate.annotations.GenericGenerator; import javax.persistence.*; @Data @Entity @Table(name = "BOOKING") public class BookingDO extends BaseDO{ @Id @GeneratedValue(generator = "sequence-generator") @GenericGenerator( name = "sequence-generator", strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator", parameters = { @org.hibernate.annotations.Parameter(name = "sequence_name", value = "booking_sequence"), @org.hibernate.annotations.Parameter(name = "initial_value", value = "1000"), @org.hibernate.annotations.Parameter(name = "increment_size", value = "1") } ) private int id; @Column(unique = true) private String trackingNo; private int cost; private String testResult; private String feedBack; private String status; private boolean medicineReq; @ManyToOne @JsonBackReference("user_booking") private UserDO userDO; @OneToOne private TestDO testDO; }
89b65fab-291b-4397-bf48-12f75e16813b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-29T09:06:20", "repo_name": "pologood/inno72-front", "sub_path": "/inno72-alarm-service/src/main/java/com/inno72/service/impl/AlarmDetailLogServiceImpl.java", "file_name": "AlarmDetailLogServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1096, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "19911c96ccea2d5fc4a3678f28d965552c05513c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pologood/inno72-front
238
FILENAME: AlarmDetailLogServiceImpl.java
0.29584
package com.inno72.service.impl; import java.util.List; import javax.annotation.Resource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.inno72.common.AbstractService; import com.inno72.mapper.AlarmDetailLogMapper; import com.inno72.model.AlarmDetailLog; import com.inno72.service.AlarmDetailLogService; /** * Created by CodeGenerator on 2018/08/13. */ @Service @Transactional public class AlarmDetailLogServiceImpl extends AbstractService<AlarmDetailLog> implements AlarmDetailLogService { private static final Logger LOGGER = LoggerFactory.getLogger(AlarmDetailLogServiceImpl.class); @Resource private AlarmDetailLogMapper alarmDetailLogMapper; @Override public List<AlarmDetailLog> queryForPage(String logId) { LOGGER.info("查询列表参数 logid => {}", logId); return alarmDetailLogMapper.queryForPage(logId); } @Override public AlarmDetailLog findById(String id){ return alarmDetailLogMapper.selectByPrimaryKey(id); } }
3b4a9ec2-6b0b-4727-9dd1-d1adc9c82709
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-11-03 13:48:55", "repo_name": "wayne06/em-sys", "sub_path": "/em/src/main/java/xyz/qzpx/em/service/impl/RecordServiceImpl.java", "file_name": "RecordServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1075, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "77fabe3933be1b3747601344ffdd4ba255717cb6", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wayne06/em-sys
225
FILENAME: RecordServiceImpl.java
0.275909
package xyz.qzpx.em.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import xyz.qzpx.em.dao.RecordDOMapper; import xyz.qzpx.em.dataObject.RecordDO; import xyz.qzpx.em.service.RecordService; import java.util.Date; import java.util.List; @Service public class RecordServiceImpl implements RecordService { @Autowired private RecordDOMapper recordDOMapper; @Override public List<RecordDO> getByCourseId(Integer courseId) { return recordDOMapper.selectByCourseId(courseId); } @Override public void update(RecordDO recordDO) { recordDO.setUpdatedAt(new Date()); recordDOMapper.updateByPrimaryKeySelective(recordDO); } @Override public void delete(RecordDO recordDO) { recordDOMapper.deleteByPrimaryKey(recordDO.getId()); } @Override public void add(RecordDO recordDO) { recordDO.setCreatedAt(new Date()); recordDO.setUpdatedAt(new Date()); recordDOMapper.insertSelective(recordDO); } }
bc6595c7-240d-49a7-af95-f132f77537f1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-11 03:15:57", "repo_name": "ambuj-mehra/cosmos-checkout", "sub_path": "/checkout/src/main/java/com/cosmos/controller/OmsController.java", "file_name": "OmsController.java", "file_ext": "java", "file_size_in_byte": 1106, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "dc2f5ec920816824182a837684a8067ec13fb869", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ambuj-mehra/cosmos-checkout
236
FILENAME: OmsController.java
0.284576
package com.cosmos.controller; import com.cosmos.checkout.dto.*; import com.cosmos.service.IomsService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** * The type Oms controller. * * @author ambujmehra */ @RestController @RequestMapping("/oms") public class OmsController { private static final Logger LOGGER = LoggerFactory.getLogger(OmsController.class); @Autowired private IomsService omsService; /** * Update order status oms response. * * @param omsRequest the oms request * @return the oms response */ @RequestMapping(value = "/updatestatus", method = RequestMethod.POST) public OmsResponse updateOrderStatus(@RequestBody OmsRequest omsRequest) { LOGGER.info("received request to update order :: {}", omsRequest.toString()); OmsResponse omsResponse = omsService.updateOrderStatus(omsRequest); LOGGER.info("OMS response is :: {}", omsResponse.toString()); return omsResponse; } }
3c52ae10-aa68-4a58-bfd2-c7fe65781b93
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-25 08:01:21", "repo_name": "q1113225201/java-learn", "sub_path": "/src/main/java/com/sjl/learn/interceptor/AccessTokenInterceptor.java", "file_name": "AccessTokenInterceptor.java", "file_ext": "java", "file_size_in_byte": 1021, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "0d32cdd7f739d7664c0215035a9ab13562728bc5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/q1113225201/java-learn
173
FILENAME: AccessTokenInterceptor.java
0.210766
package com.sjl.learn.interceptor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @Component public class AccessTokenInterceptor extends HandlerInterceptorAdapter { private static final Logger logger = LoggerFactory.getLogger(AccessTokenInterceptor.class.getName()); @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { logger.info("preHandler:" + request.getRequestURI()); String accessToken = request.getHeader("token"); logger.info(accessToken); /*if ("123".equals(accessToken)) { return super.preHandle(request, response, handler); } else { return false; }*/ return super.preHandle(request, response, handler); } }
964b2c94-e4f9-4470-9c58-97f8f53ce8a3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-05-04 04:07:08", "repo_name": "zanghongtu2006/alphabeta", "sub_path": "/service/src/main/java/com/caiguantianxia/service/exception/BaseException.java", "file_name": "BaseException.java", "file_ext": "java", "file_size_in_byte": 1176, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "854918dafb2d5b60af3d95daa4b8450db2e52d65", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zanghongtu2006/alphabeta
231
FILENAME: BaseException.java
0.23231
package com.caiguantianxia.service.exception; import com.caiguantianxia.service.dto.BaseErrorCode; import lombok.Data; /** * @author : Hongtu Zang * @date : Created in 下午6:34 19-4-24 */ @Data public class BaseException extends RuntimeException { private Integer errorCode; public BaseException(BaseErrorCode errorCode) { super(errorCode.getMessage()); this.errorCode = errorCode.getCode(); } public BaseException(String message) { super(message); this.errorCode = BaseErrorCode.ERROR.getCode(); } public BaseException(BaseErrorCode errorCode, String message) { super(message); this.errorCode = errorCode.getCode(); } public BaseException(BaseErrorCode errorCode, String message, Throwable throwable) { super(message, throwable); this.errorCode = errorCode.getCode(); } public BaseException(Integer errorCode, String message) { super(message); this.errorCode = errorCode; } public BaseException(Integer errorCode, String message, Throwable throwable) { super(message, throwable); this.errorCode = errorCode; } }
21781325-7499-428e-9489-e41145df925c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-10-19 06:32:32", "repo_name": "GHlicm/springboot-component", "sub_path": "/src/main/java/com/li/utils/ThymelafUtils.java", "file_name": "ThymelafUtils.java", "file_ext": "java", "file_size_in_byte": 1257, "line_count": 40, "lang": "zh", "doc_type": "code", "blob_id": "4a5cd5a03da0914477fe8be06b162cda128b0c85", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/GHlicm/springboot-component
273
FILENAME: ThymelafUtils.java
0.259826
package com.li.utils; import org.thymeleaf.TemplateEngine; import org.thymeleaf.context.Context; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.util.Map; public class ThymelafUtils { /** * 生成页面的方法 * @param variables 传入参数 * @param dirPath 文件目录地址 * @param filePath 文件地址路径 * @param templatePage 模板页面 * @param templateEngine 模板引擎 */ public static void createHtmlPage(Map variables, String dirPath, String filePath, String templatePage, TemplateEngine templateEngine){ Context context = new Context(); context.setVariables(variables); if (!new File(dirPath).exists()){ new File(dirPath).mkdirs(); } // 创建输出流,关联到一个临时文件 File temp = new File(filePath); try (PrintWriter writer = new PrintWriter(temp, "UTF-8")) { // 利用thymeleaf模板引擎生成 静态页面 templateEngine.process(templatePage, context, writer); } catch (IOException e) { System.out.println("页面静态化出错:{}" + e.getMessage()); } } }
3fd62b81-f974-43bf-967c-556937e63323
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-23 20:21:01", "repo_name": "JoeBurnside/CamraMobileApp", "sub_path": "/app/src/main/java/com/example/n0451564/nottinghamcamra/Events.java", "file_name": "Events.java", "file_ext": "java", "file_size_in_byte": 1058, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "9ee5fd0191877e6d3b58689425cb4c067b2fc2b1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JoeBurnside/CamraMobileApp
185
FILENAME: Events.java
0.199308
package com.example.n0451564.nottinghamcamra; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class Events extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_events); Button buttonWeekly = (Button) this.findViewById(R.id.buttonByName); Button buttonByThisweek = (Button) this.findViewById(R.id.buttonThisweek); buttonWeekly.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(Events.this, Weekly.class)); } }); buttonByThisweek.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(Events.this, ThisWeek.class)); } }); } }
0bd7040d-aa7d-4c5a-b4c4-58497ddcd1e2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-15 03:12:21", "repo_name": "onlywin7788/zenca-integration-platform", "sub_path": "/example/mi-api-manager/src/main/java/com/mocomsys/mi/manager/entity/product/ProductEntity.java", "file_name": "ProductEntity.java", "file_ext": "java", "file_size_in_byte": 1171, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "7a96ef1e0e154c1f02187dfe42e6002cc9207796", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/onlywin7788/zenca-integration-platform
231
FILENAME: ProductEntity.java
0.264358
package com.mocomsys.mi.manager.entity.product; import com.mocomsys.mi.manager.entity.common.CommonDateEntity; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import javax.persistence.*; import java.io.Serializable; @Entity @Table(name = "product") @Getter @Setter @NoArgsConstructor public class ProductEntity extends CommonDateEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long productId; @Column(name ="catalog_id") private Long catalogId; @Column(length = 64) private String productName; @Column(length = 1048576) private String description; @Builder public ProductEntity(String productName, Long catalogId, String description) { this.productName = productName; this.catalogId = catalogId; this.description = description; } public void update(String productName, Long catalogId, String description) { this.productName = productName; this.catalogId = catalogId; this.description = description; } }
a025fa54-801b-4310-960d-b86869de4de5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-28 10:15:01", "repo_name": "Jagerfield/Mobile-Contacts-Library", "sub_path": "/MobileContactsLib/src/main/java/jagerfield/mobilecontactslibrary/ContactFields/EmailField.java", "file_name": "EmailField.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "b97b8b89f9e5cba2f5a84de6904b81bbb915922d", "star_events_count": 23, "fork_events_count": 10, "src_encoding": "UTF-8"}
https://github.com/Jagerfield/Mobile-Contacts-Library
220
FILENAME: EmailField.java
0.27513
package jagerfield.mobilecontactslibrary.ContactFields; import android.database.Cursor; import android.provider.ContactsContract; import jagerfield.mobilecontactslibrary.Abstracts.FieldParent; import jagerfield.mobilecontactslibrary.ElementContainers.EmailContainer; import com.google.gson.annotations.Expose; import java.util.LinkedList; import java.util.Set; public class EmailField extends FieldParent { public final String fieldMime = ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE; @Expose private LinkedList<EmailContainer> emails = new LinkedList<>(); public EmailField() { } @Override public void execute(String mime, Cursor cursor) { if (mime.equals(fieldMime)) { emails.add(new EmailContainer(cursor)); } } @Override public Set<String> registerElementsColumns() { return EmailContainer.getFieldColumns(); } public LinkedList<EmailContainer> getEmails() { return emails; } public interface IEmailField { public LinkedList<EmailContainer> getEmails(); } }
1cd22cb3-44ea-4bdb-9c5c-7beaaa177d18
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-09 14:25:42", "repo_name": "iggydv/Kalaha", "sub_path": "/kalaha-model/src/main/java/com/ignatius/data/objects/Pit.java", "file_name": "Pit.java", "file_ext": "java", "file_size_in_byte": 1168, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "3c2bfd91f5fcc52129c7b79507d10087fa842cba", "star_events_count": 4, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/iggydv/Kalaha
289
FILENAME: Pit.java
0.282988
package com.ignatius.data.objects; /** * @author Ignatius de Villiers * @since 12 December 2018 */ public class Pit { private int stones; /** * A @{@link Board} Object consists of multiple Pit objects, which are editable by the @{@link Player} associated * with that side * * @param stones The initial amount of stones in the pit */ public Pit(int stones) { this.stones = stones; } /** * Sets the amount of stones in the pit to zero */ public int emptyPit() { int stonesInHand = getStones(); stones = 0; return stonesInHand; } /** * Allows a pit to receive a certain amount of stones * @param amountStones The amount of stones to be added to the specific pit */ public void receiveStones(int amountStones) { stones += amountStones; } /** * @return The amount of stones allocated to a pit */ public int getStones() { return stones; } /** * @param stones Hard set the amount of stones to a certain amount */ public void setStones(int stones) { this.stones = stones; } }
d3fd0710-01d7-44f5-8424-c3d8322ce3e2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-02 14:03:28", "repo_name": "heyisuifeng/spring-in-action-test", "sub_path": "/src/main/java/com/ace/entity/UserRole.java", "file_name": "UserRole.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "ed87a5709ae7c3406a7ebe41d678fb2a222307a3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/heyisuifeng/spring-in-action-test
271
FILENAME: UserRole.java
0.288569
package com.ace.entity; import javax.persistence.*; /** * Created by leaf.ye on 2016/10/17. */ @Entity @Table(name = "t_user_role", schema = "shiro_test", catalog = "") @IdClass(UserRolePK.class) public class UserRole { private int userId; private int roleId; @Id @Column(name = "user_id") public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } @Id @Column(name = "role_id") public int getRoleId() { return roleId; } public void setRoleId(int roleId) { this.roleId = roleId; } @Override public int hashCode() { int result = userId; result = 31 * result + roleId; return result; } @Override public boolean equals(Object object) { if (this == object) return true; if (object == null || getClass() != object.getClass()) return false; UserRole tUserRole = (UserRole) object; if (userId != tUserRole.userId) return false; if (roleId != tUserRole.roleId) return false; return true; } }
d150b3f9-078f-4976-bb87-69a6b40517f4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-18 01:23:18", "repo_name": "jameszkw/demo", "sub_path": "/src/main/java/com/zkw/concurrent/java_Multithread_programmingbook/C5/c5_1_2/Run4.java", "file_name": "Run4.java", "file_ext": "java", "file_size_in_byte": 1210, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "8c86e827bbbb7f268a22ff74bcef442442aac403", "star_events_count": 4, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jameszkw/demo
250
FILENAME: Run4.java
0.249447
package com.zkw.concurrent.java_Multithread_programmingbook.C5.c5_1_2; import java.util.Calendar; import java.util.Date; import java.util.Timer; import java.util.TimerTask; /** * Timer类中的cancel()方法有时并不一定停止执行计划任务,而是正常执行。(这个我没有测出来!!!) * */ public class Run4 { static int i=0; static public class MyTask extends TimerTask{ public void run() { System.out.println("正常执行了"+i); } } public static void main(String[] args) { while (true){ i++; Timer timer=new Timer(); MyTask myTask=new MyTask(); Calendar rightNow = Calendar.getInstance(); rightNow.setTime(new Date()); rightNow.add(Calendar.SECOND,10); Date dt1=rightNow.getTime(); System.out.println("字符串时间:"+dt1.toLocaleString()+" 当前时间:"+new Date().toLocaleString()); timer.schedule(myTask,dt1); timer.cancel(); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } } } }
fa10e186-ef66-4764-b788-83f6d8f2735c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-25 03:05:29", "repo_name": "tahmidMahmud/CraftDemo", "sub_path": "/pet-clinic-svcs/src/main/java/com/tahmid/petclinicsvcs/service/VetService.java", "file_name": "VetService.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "b58c94e85b2c1e34c1355d8412ace0742295ef39", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/tahmidMahmud/CraftDemo
249
FILENAME: VetService.java
0.281406
package com.tahmid.petclinicsvcs.service; import com.tahmid.petclinicsvcs.model.Vet; import com.tahmid.petclinicsvcs.repository.VetRepository; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; @Service public class VetService { private final VetRepository repository; public VetService(VetRepository repository) { this.repository = repository; } public List<Vet> getAllVets() { return repository.findAll(); } public Optional<Vet> getVetByID(Long id) { return this.repository.findById(id); } public Vet createVet(Vet newVet) { return this.repository.save(newVet); } public Optional<Vet> modifyVet(Long id, Vet newVet) { return this.repository.findById(id) .map(vet -> { vet.setFirstName(newVet.getFirstName()); vet.setLastName(newVet.getLastName()); vet.setSpecialties(newVet.getSpecialties()); return this.repository.save(vet); }); } public void deleteVet(Long id) { this.repository.deleteById(id); } }
8397f41f-c5ba-4b5e-b4a5-52309b63237b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-02 19:05:42", "repo_name": "marcsabate7/MiniActv-3-ANDROID-part2", "sub_path": "/app/src/main/java/com/marc/miniactivity3_part2/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "d216d7f868ef235f5163f3bed1d96bc483edb5a5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/marcsabate7/MiniActv-3-ANDROID-part2
193
FILENAME: MainActivity.java
0.224055
package com.marc.miniactivity3_part2; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class MainActivity extends AppCompatActivity { Button third; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView text = findViewById(R.id.textrebut); third = (Button) findViewById(R.id.button3); Intent intent = getIntent(); String text_compartit = intent.getStringExtra(Intent.EXTRA_TEXT); text.setText(text_compartit); // To view the third section that is called by the other aplication with ACTION_PICK to pick the text third.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(MainActivity.this,ThirdActivity.class); startActivity(intent); } }); } }
cabc9c2c-0add-4a9c-ba9e-067a95b09547
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-02 09:31:03", "repo_name": "leowang-long/study", "sub_path": "/JDBDao/src/main/java/com/leowang/dao/jdbdao/model/Table.java", "file_name": "Table.java", "file_ext": "java", "file_size_in_byte": 1297, "line_count": 59, "lang": "zh", "doc_type": "code", "blob_id": "0b2cf461cf3316171c1372f9bfd8c9d27641c92e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/leowang-long/study
333
FILENAME: Table.java
0.262842
package com.leowang.dao.jdbdao.model; import java.util.List; /** * @ClassName: Table * @Description: 数据表结构 * @author: 王龙(leowang) * @date: 2019年6月3日 下午8:01:08 * * 注意:本内容仅限于个人学习使用,禁止外泄以及用于其他的商业目地 */ public class Table { //表表名 private String name; //主键 private List<String> PK; //不可为空字段 private List<Column> notNullColumns; //可为空字段 private List<Column> nullColumns; //表描述 private String comments; public String getName() { return name; } public void setName(String name) { this.name = name; } public List<String> getPK() { return PK; } public void setPK(List<String> pK) { PK = pK; } public List<Column> getNotNullColumns() { return notNullColumns; } public void setNotNullColumns(List<Column> notNullColumns) { this.notNullColumns = notNullColumns; } public List<Column> getNullColumns() { return nullColumns; } public void setNullColumns(List<Column> nullColumns) { this.nullColumns = nullColumns; } public String getComments() { return comments; } public void setComments(String comments) { this.comments = comments; } }
c4b39416-c183-486f-bb46-d2b91795d6c6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-08 22:27:40", "repo_name": "mrtbyram/wefox", "sub_path": "/src/main/java/com/muratbayram/wefox/adapter/PaymentKafkaReader.java", "file_name": "PaymentKafkaReader.java", "file_ext": "java", "file_size_in_byte": 1107, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "f413bfcf7d77ce308e8812cf27101f48238b017e", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mrtbyram/wefox
207
FILENAME: PaymentKafkaReader.java
0.255344
package com.muratbayram.wefox.adapter; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.muratbayram.wefox.core.model.PaymentDTO; import com.muratbayram.wefox.core.service.PaymentManager; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.stereotype.Component; @Component public class PaymentKafkaReader { private ObjectMapper mapper = new ObjectMapper(); private PaymentManager paymentManager; public PaymentKafkaReader(PaymentManager paymentManager) { this.paymentManager = paymentManager; } @KafkaListener(topics = {"offline", "online"}) public void receivePayment(String paymentData){ PaymentDTO paymentDTO = readPayment(paymentData); paymentManager.handle(paymentDTO); } private PaymentDTO readPayment(String data){ try { return mapper.readValue(data, PaymentDTO.class); } catch (JsonProcessingException e) { e.printStackTrace(); throw new RuntimeException(e); } } }
c7657772-705e-4d9e-b115-f8dc0204067c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-07-16 19:45:08", "repo_name": "Blondas/planner2", "sub_path": "/AghPlanner/src/main/java/pl/edu/agh/planner/domain/BuildingEntity.java", "file_name": "BuildingEntity.java", "file_ext": "java", "file_size_in_byte": 1024, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "8470e574188201c9c31ca4ebec643ba22f84703f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Blondas/planner2
226
FILENAME: BuildingEntity.java
0.255344
package pl.edu.agh.planner.domain; import javax.persistence.*; import java.util.Set; @Entity(name = "building") public class BuildingEntity { @Id @SequenceGenerator(name="building_id_seq", sequenceName="building_id_seq", allocationSize=1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator="building_id_seq") @Column(name = "b_id") private Long id; @Column(name = "b_name") private String name; @OneToMany(mappedBy = "building", fetch = FetchType.EAGER) private Set<ClassroomEntity> classrooms; public BuildingEntity() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Set<ClassroomEntity> getClassrooms() { return classrooms; } public void setClassrooms(Set<ClassroomEntity> classrooms) { this.classrooms = classrooms; } }
d5253732-e993-4acf-993e-1008bd5caa89
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-09-06 14:00:51", "repo_name": "jackanderson11/NetBeansProjects", "sub_path": "/Human/src/human/Main.java", "file_name": "Main.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "05ab4fa740fbfb12c539d41b550e79927c327aea", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jackanderson11/NetBeansProjects
292
FILENAME: Main.java
0.274351
package human; import java.util.Scanner; public class Main { public static void main(String []args){ System.out.println("Hello World! Here are some facts about me..."); Human Jack = new Human("Jack", "Blue", 16, 11, 69, "Kathryn Anderson", "Michael Anderson"); Human Bo = new Human("Bo", "Brown", 14, 9, 64, "Kathryn Anderson", "Michael Anderson"); Human Max = new Human("Max", "Brown", 17, 12, 68, "Kathryn Anderson", "Michael Anderson"); System.out.println(Jack.getmessage()+"\n"+"Here is my younger brother..."+"\n"+Bo.getmessage()+"\n"+ "Here is my older brother..."+"\n"+Max.getmessage()); System.out.println("What is your name?"); Scanner userinput = new Scanner(System.in); System.out.println("\n"+userinput.nextLine()+" is an awesome name!"); System.out.println("It is very nice to meet you!"); } } // Human Josh = new Human("Joshua", "Brown", 16, 11, 68, "Gretchen Luther", "Jarrett Luther"); // +"\n"+"Here is my best friend..."+"\n"+Josh.getmessage()
f53df0cd-f8d1-41fa-a030-b0e4fef257bd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-19 12:41:01", "repo_name": "tomasperezmolina/lfg", "sub_path": "/src/main/java/persistence/entity/GameInPlatformEntityPK.java", "file_name": "GameInPlatformEntityPK.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "ca607343c31eafdff94b035fd8acb12b5a34aff7", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/tomasperezmolina/lfg
264
FILENAME: GameInPlatformEntityPK.java
0.290981
package persistence.entity; import javax.persistence.Column; import javax.persistence.Id; import java.io.Serializable; import java.util.Objects; /** * @author Tomas Perez Molina */ public class GameInPlatformEntityPK implements Serializable { private int gamePlatformId; private int gameId; @Column(name = "GAME_PLATFORM_ID", nullable = false) @Id public int getGamePlatformId() { return gamePlatformId; } public void setGamePlatformId(int gamePlatformId) { this.gamePlatformId = gamePlatformId; } @Column(name = "GAME_ID", nullable = false) @Id public int getGameId() { return gameId; } public void setGameId(int gameId) { this.gameId = gameId; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; GameInPlatformEntityPK that = (GameInPlatformEntityPK) o; return gamePlatformId == that.gamePlatformId && gameId == that.gameId; } @Override public int hashCode() { return Objects.hash(gamePlatformId, gameId); } }
e8168f83-0edf-4044-93b0-0cf82f964c3b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-10 10:22:10", "repo_name": "yichengjie/netty-study2", "sub_path": "/hello-world/src/main/java/com/yicj/chapter11/HttpXmlClientHandler.java", "file_name": "HttpXmlClientHandler.java", "file_ext": "java", "file_size_in_byte": 1098, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "85fb2e27a5c86fff0764335b6e59a64662410e2c", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yichengjie/netty-study2
239
FILENAME: HttpXmlClientHandler.java
0.278257
package com.yicj.chapter11; import com.yicj.chapter11.codec.entity.OrderFacoty; import com.yicj.chapter11.codec.entity.HttpXmlRequest; import com.yicj.chapter11.codec.entity.HttpXmlResponse; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import lombok.extern.slf4j.Slf4j; @Slf4j public class HttpXmlClientHandler extends SimpleChannelInboundHandler<HttpXmlResponse> { @Override public void channelActive(ChannelHandlerContext ctx) throws Exception { HttpXmlRequest request = new HttpXmlRequest(null, OrderFacoty.create(123)) ; ctx.writeAndFlush(request) ; } @Override protected void channelRead0(ChannelHandlerContext ctx, HttpXmlResponse msg) throws Exception { log.info("The common receive response of http header is : {}", msg.getResponse().headers().names()); log.info("The common receive response of http body is : {}", msg.getResult()); } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { ctx.close() ; } }
f38b0aac-c6b2-4702-93b4-8925f6ad7135
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-09-10T01:28:04", "repo_name": "nn1ks/rwarden", "sub_path": "/rwarden_crypto/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1069, "line_count": 24, "lang": "en", "doc_type": "text", "blob_id": "fa3785e3991a29c485bc2577db05256c899a599f", "star_events_count": 5, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nn1ks/rwarden
287
FILENAME: README.md
0.205615
# rwarden_crypto [![Crate](https://img.shields.io/crates/v/rwarden_crypto)](https://crates.io/crates/rwarden_crypto) [![Docs](https://img.shields.io/static/v1?label=docs&message=latest&color=yellow)](https://docs.rs/rwarden_crypto) [![License](https://img.shields.io/crates/l/rwarden_crypto)](https://github.com/nn1ks/rwarden/tree/master/rwarden_crypto#license) A Bitwarden API client for Rust (crypto crate). This project is not associated with the [Bitwarden](https://bitwarden.com) project nor 8bit Solutions LLC. ## [Documentation](https://docs.rs/rwarden_crypto) ## License Licensed under either of [Apache License, Version 2.0] or [MIT License] at your option. [Apache License, Version 2.0]: https://github.com/nn1ks/rwarden/blob/master/LICENSE-APACHE [MIT License]: https://github.com/nn1ks/rwarden/blob/master/LICENSE-MIT Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
05a353be-a390-4042-a0ed-579b80d8fc32
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-09-29 21:53:44", "repo_name": "yashkhandelwal/logAggregator", "sub_path": "/src/main/java/com/log/aggregator/consumer/FileWriterConsumer.java", "file_name": "FileWriterConsumer.java", "file_ext": "java", "file_size_in_byte": 1063, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "c37a42dad3fca31886a0d709bdbc45702d67d4fd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yashkhandelwal/logAggregator
202
FILENAME: FileWriterConsumer.java
0.239349
package com.log.aggregator.consumer; import com.google.gson.Gson; import com.log.aggregator.utils.LogThreadState; import com.log.aggregator.utils.QDestination; import com.log.aggregator.utils.QObject; /** * Created by yashkhandelwal */ public class FileWriterConsumer extends AbstractConsumingThread { public FileWriterConsumer(LogConsumer logConsumer) { super(logConsumer); } @Override protected void doRun() { Gson gson = new Gson(); do { QDestination qDestination = QDestination.getDestinationOrNull(logConsumer.getName()); System.out.println("FileWriteConsumer: Reading Message From Queue"); QObject qObject = logConsumer.getMessage(qDestination); if (qObject != null) { String data = gson.toJson(qObject.getData()); System.out.println("FileWriteConsumer: Sending Message to LogConsumer"); logConsumer.process(data); } } while (logConsumer.getState() == LogThreadState.RUNNING.getValue()); } }
6f1ccfc4-4247-4d81-bac1-fcc314af7d9b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-23 01:12:09", "repo_name": "phuongtn2/TramHuong", "sub_path": "/src/main/java/com/tramhuong/services/impl/StaticServiceImpl.java", "file_name": "StaticServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1068, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "8b1d7f18c31389d91e323b5c4e0be2702a6e848d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/phuongtn2/TramHuong
224
FILENAME: StaticServiceImpl.java
0.255344
package com.tramhuong.services.impl; import com.tramhuong.dto.StaticDto; import com.tramhuong.dto.TermDto; import com.tramhuong.mapper.StaticMapper; import com.tramhuong.services.StaticService; import com.tramhuong.services.error.ServiceException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * Created by PhuongTN1 on 11/4/2016. */ @Service public class StaticServiceImpl implements StaticService { @Autowired private StaticMapper staticMapper; @Override public int add(StaticDto staticDto) throws ServiceException { return staticMapper.add(staticDto); } @Override public void update(StaticDto staticDto) throws ServiceException { staticMapper.update(staticDto); } @Override public StaticDto find(int type) throws ServiceException { return staticMapper.findByType(type); } @Override public List<StaticDto> findAll() throws ServiceException { return staticMapper.findAll(); } }
1c5cfe47-37ea-4a21-95c5-3d54a8287c95
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-24 12:15:52", "repo_name": "Asadrao125/Xpendings", "sub_path": "/app/src/main/java/com/gexton/xpendings/adapters/ViewpagerAdapterVisiblistyCategories.java", "file_name": "ViewpagerAdapterVisiblistyCategories.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "b621130e67e35f86194fdc87643eec6c6359cd91", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Asadrao125/Xpendings
245
FILENAME: ViewpagerAdapterVisiblistyCategories.java
0.288569
package com.gexton.xpendings.adapters; import com.gexton.xpendings.fragments.VisiblistyExpenseFragment; import com.gexton.xpendings.fragments.VisiblistyIncomeFragment; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; public class ViewpagerAdapterVisiblistyCategories extends FragmentPagerAdapter { public ViewpagerAdapterVisiblistyCategories(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int position) { Fragment fragment = null; if (position == 0) { fragment = new VisiblistyExpenseFragment(); } else if (position == 1) { fragment = new VisiblistyIncomeFragment(); } return fragment; } @Override public int getCount() { return 2; } @Override public CharSequence getPageTitle(int position) { String title = null; if (position == 0) { title = "Expence"; } else if (position == 1) { title = "Income"; } return title; } }
736933a5-8f60-425b-9043-df2418eeb167
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-21 13:36:39", "repo_name": "mahmoudhakam/Springboot-akka-cache", "sub_path": "/Sprinboot-googleCache/src/main/java/com/se/onprem/dto/ws/PartSearchResponse.java", "file_name": "PartSearchResponse.java", "file_ext": "java", "file_size_in_byte": 1110, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "4e5bf7fc0cd97e05b2ed3c73abf3eb19f207dd42", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mahmoudhakam/Springboot-akka-cache
220
FILENAME: PartSearchResponse.java
0.250913
package com.se.onprem.dto.ws; import java.util.List; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.se.onprem.messages.PartSearchStatus; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @Getter @Setter @NoArgsConstructor @JsonPropertyOrder({ "status", "totalItems", "serviceTime", "partList" }) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonIgnoreProperties(ignoreUnknown = true) public class PartSearchResponse { @JsonProperty("Status") private PartSearchStatus status; /* * @JsonProperty("TotalItems") private Long totalItems; */ // @JsonProperty("ServiceTime") @JsonIgnore private String serviceTime; @JsonProperty("PartResult") private List<PartSearchResult> partList; @JsonProperty("Steps") private List<PartSearchStep> steps; public PartSearchResponse(PartSearchStatus status) { this.status = status; } }
24c0e225-34a2-4b80-aa79-f012a52a4d16
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-03 09:10:55", "repo_name": "yb-hub/springcloud", "sub_path": "/cloud-provider-payment-hystrix8003/src/main/java/com/yb/demo/service/PaymentGlobalService.java", "file_name": "PaymentGlobalService.java", "file_ext": "java", "file_size_in_byte": 1176, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "3330c5d59acf5fdd4d406ef7c5c85e48a681b5d8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yb-hub/springcloud
268
FILENAME: PaymentGlobalService.java
0.259826
package com.yb.demo.service; import com.netflix.hystrix.contrib.javanica.annotation.DefaultProperties; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty; import org.springframework.stereotype.Service; import sun.awt.SunHints; import java.util.concurrent.TimeUnit; /** * @author yb * @description * @data 2020/4/2 */ @Service //@DefaultProperties(defaultFallback = "defaultFallback") public class PaymentGlobalService { public String success(Integer id) { return "success:"+id; } //@HystrixCommand(fallbackMethod = "defaultFallback") public String fail(Integer id) { //int i =10/0; try { TimeUnit.SECONDS.sleep(2); } catch (InterruptedException e) { e.printStackTrace(); } return "paymentGlobalService:"+id; } //@HystrixCommand(fallbackMethod = "defaultFallback") public String fail2(Integer id){ int i = 10/0; return "paymentGlobalService:"+id; } public String defaultFallback(Integer id){ return "/(ㄒoㄒ)/~~"+"defaultFallback:"+id; } }
5d48d523-48dc-4b55-8551-7711205b2b10
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-10 08:55:38", "repo_name": "chaoyueLin/jetpackDemo", "sub_path": "/lifecycledemo/app/src/main/java/com/example/lifecycledemo/BasePresenter.java", "file_name": "BasePresenter.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "6520ad0e2d82dedcf5ac2d906b49c4d05bd15b30", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/chaoyueLin/jetpackDemo
242
FILENAME: BasePresenter.java
0.288569
package com.example.lifecycledemo; import android.util.Log; import androidx.annotation.NonNull; import androidx.lifecycle.Lifecycle; import androidx.lifecycle.LifecycleOwner; /***************************************************************** * * File: - BasePresenter * * Description: * * Version: 1.0 * * Date : 2020/9/8 * * Author: linchaoyue * * * * ---------------------- Revision History:---------------------- * * <author> <date> <version> <desc> * * linchaoyue 2020/9/8 1.0 create ******************************************************************/ public class BasePresenter implements IPresenter { private static final String TAG = BasePresenter.class.getSimpleName(); @Override public void onCreate(@NonNull LifecycleOwner owner) { Log.d(TAG, "onCreate=" + this.getClass().toString()); } @Override public void onDestroy(@NonNull LifecycleOwner owner) { Log.d(TAG, "onDestroy=" + this.getClass().toString()); } @Override public void onLifecycleChanged(@NonNull LifecycleOwner owner, @NonNull Lifecycle.Event event) { } }
0ddc600f-c803-4ca7-a260-c91a1c8622e9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-15 07:47:24", "repo_name": "Kishidle/Work-Practice", "sub_path": "/AMSPractice/src/amspractice/Controller/SQLConnection.java", "file_name": "SQLConnection.java", "file_ext": "java", "file_size_in_byte": 1087, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "47e5edbd7b350a6d15f4cf4b387f1b3d53217e67", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Kishidle/Work-Practice
211
FILENAME: SQLConnection.java
0.229535
/* * 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 amspractice.Controller; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; /** * * @author ramon */ public class SQLConnection extends DatabaseFactory{ private String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; private String url = "jdbc:sqlserver://RAMON-PC\\SQLEXPRESS:49364;databaseName=testArca;integratedSecurity=true"; public SQLConnection(){ } @Override public Connection getConnection(){ try{ Class.forName(driver); } catch(ClassNotFoundException cnfe){ } try{ System.out.println("test"); Connection conn = DriverManager.getConnection(url); return conn; } catch(SQLException sqle){ } return null; } }
417051cd-f49b-4045-9541-64aa034da0b1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-07 05:42:03", "repo_name": "playthesong/song-request-backend", "sub_path": "/src/main/java/live/playthesong/songrequest/domain/letter/request/inner/SongRequest.java", "file_name": "SongRequest.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "4dc29dcbdd0def6c3bd71f252a85c89bbb50af24", "star_events_count": 3, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/playthesong/song-request-backend
211
FILENAME: SongRequest.java
0.233706
package live.playthesong.songrequest.domain.letter.request.inner; import live.playthesong.songrequest.global.constant.ValidationCondition; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.Size; @NoArgsConstructor(access = AccessLevel.PRIVATE) @Getter public class SongRequest { @NotEmpty(message = ValidationCondition.NOT_EMPTY_MESSAGE) @Size(min = ValidationCondition.TITLE_MIN, max = ValidationCondition.TITLE_MAX, message = ValidationCondition.TITLE_MESSAGE) private String title; @NotEmpty(message = ValidationCondition.NOT_EMPTY_MESSAGE) @Size(min = ValidationCondition.ARTIST_MIN, max = ValidationCondition.ARTIST_MAX, message = ValidationCondition.ARTIST_MESSAGE) private String artist; @Size(max = ValidationCondition.IMAGE_MAX, message = ValidationCondition.IMAGE_MESSAGE) private String imageUrl; SongRequest(String title, String artist, String imageUrl) { this.title = title; this.artist = artist; this.imageUrl = imageUrl; } }
e32774c0-c03f-488f-b3ae-0a4676da323e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-05-20 12:01:23", "repo_name": "ZHYzhy-github/Android_job", "sub_path": "/ListView2/app/src/main/java/com/example/android/mytwolistview/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1079, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "a2a3688a47d9d214a2ebfe279814c7f7a6d726cf", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ZHYzhy-github/Android_job
178
FILENAME: MainActivity.java
0.239349
package com.example.android.mytwolistview; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ListView; import android.widget.TextView; import static com.example.android.mytwolistview.R.id.findlist; public class MainActivity extends AppCompatActivity { private TextView textView; private ListView listView; private String[] findlist; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView = findViewById(R.id.texe_textview); listView = findViewById(R.id.findlist); findlist = getResources().getStringArray(R.array.findlist); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { textView.setText(findlist[position]); } }); } }
8ba6efcd-fe83-4d48-a001-89d7149bb3f7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-06 10:58:23", "repo_name": "rickkim90/spring_web-practice", "sub_path": "/src/main/java/com/jojoldu/webservice/service/PostsService.java", "file_name": "PostsService.java", "file_ext": "java", "file_size_in_byte": 1054, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "c6150191da9798f150858a030df1e69c8660f6f4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rickkim90/spring_web-practice
233
FILENAME: PostsService.java
0.287768
package com.rickkim90.webservice.service; import com.rickkim90.webservice.domain.posts.PostsRepository; import com.rickkim90.webservice.dto.posts.PostsMainResponseDto; import com.rickkim90.webservice.dto.posts.PostsSaveRequestDto; import lombok.AllArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.stream.Collectors; /** * Created by rickkim90@gmail.com on 2017. 12. 27. * Blog : http://rickkim90.tistory.com * Github : https://github.com/rickkim90 */ @AllArgsConstructor @Service public class PostsService { private PostsRepository postsRepository; @Transactional public Long save(PostsSaveRequestDto dto){ return postsRepository.save(dto.toEntity()).getId(); } @Transactional(readOnly = true) public List<PostsMainResponseDto> findAllDesc() { return postsRepository.findAllDesc() .map(PostsMainResponseDto::new) .collect(Collectors.toList()); } }
dd8e7fd5-18fb-4b8c-a098-a423fcce0360
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-06-07T04:34:57", "repo_name": "issmirnov/soteria", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1171, "line_count": 28, "lang": "en", "doc_type": "text", "blob_id": "43aec553ba02c148ca455f1ec81130e3bf0d9f46", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/issmirnov/soteria
332
FILENAME: README.md
0.255344
# Soteria A simple bot that sends files to a user. ## Usage 1. Create a bot by talking to https://telegram.me/BotFather. Copy down the TOKEN. 2. compile and run this binary, passing the token as a flag (`--token` or environment variable (`TOKEN=xxx`)). This will start up the bot in echo mode. Start a chat with your bot and make note of the chatID printed in the logs. 3. Now you have everything you need. Call the bot with the token and chatID set, and a path to a file: `./soteria --token=xxx --chatID=123 --file=tests/hello_world` ``` Usage of ./soteria: --chatid int [env: `CHATID`] Telegram chatID for your bot + user. -f, --file string [env: `FILE`] path for file to send -t, --token string [env: `TOKEN`] Telegram bot token. ``` ## What's in a name? [Soteria](https://en.wikipedia.org/wiki/Soteria_(mythology)) is the Greek Godess of Deliverance. Naming this bot TGFU (TeleGram File Uploader) just didn't have the same ring to it. Hence, Soteria lives again in the modern age. ## Contributing Clone this repo. Run `make init` to get all the tools and deps. `make build` will create a [upx](https://upx.github.io/) minified binary.
2859cafd-bd27-4796-a9d8-b2eac2c24436
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-31 10:54:00", "repo_name": "poolborges/com-poolborges-example", "sub_path": "/com.poolborges.example.springframework/com.poolborges.example.spring/src/main/java/com/poolborges/example/spring/model/Book.java", "file_name": "Book.java", "file_ext": "java", "file_size_in_byte": 1050, "line_count": 58, "lang": "en", "doc_type": "code", "blob_id": "bc7da9a28ac910b3ceda8f44ecffa392c9b4c2f9", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/poolborges/com-poolborges-example
234
FILENAME: Book.java
0.208179
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.poolborges.example.spring.model; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; /** * * @author PauloBorges */ @XmlRootElement(name = "book") public class Book { private String author; private String ISBN; private String title; public Book() { } public Book(String author, String ISBN, String title) { this.author = author; this.ISBN = ISBN; this.title = title; } @XmlElement public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } @XmlElement public String getISBN() { return ISBN; } public void setISBN(String ISBN) { this.ISBN = ISBN; } @XmlAttribute public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
ba1adb31-c889-4d0a-ae29-79868c09ba21
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-04 08:14:31", "repo_name": "Catfeeds/myWorkspace", "sub_path": "/hlj_android_customer/src/me/suncloud/marrymemo/model/ThirdBind.java", "file_name": "ThirdBind.java", "file_ext": "java", "file_size_in_byte": 1182, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "b433f3e3e57c01660eefa2d377ed843218649c46", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Catfeeds/myWorkspace
273
FILENAME: ThirdBind.java
0.26588
package me.suncloud.marrymemo.model; import android.os.Parcel; import android.os.Parcelable; /** * 第三方绑定Model * Created by jinxin on 2017/1/7 0007. */ public class ThirdBind implements Parcelable { long id; String type;//qq,sina,weixin public long getId() { return id; } public void setId(long id) { this.id = id; } public String getType() { return type; } public void setType(String type) { this.type = type; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeLong(this.id); dest.writeString(this.type); } public ThirdBind() {} protected ThirdBind(Parcel in) { this.id = in.readLong(); this.type = in.readString(); } public static final Parcelable.Creator<ThirdBind> CREATOR = new Parcelable.Creator<ThirdBind> () { @Override public ThirdBind createFromParcel(Parcel source) {return new ThirdBind(source);} @Override public ThirdBind[] newArray(int size) {return new ThirdBind[size];} }; }
40a002da-ce07-4549-8293-c6ffd0285e55
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-12-23 06:53:00", "repo_name": "Qtrain/Java", "sub_path": "/src/Networking/Client.java", "file_name": "Client.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "555e407cfea3a1584c64b42cd4149504e70a93e4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Qtrain/Java
209
FILENAME: Client.java
0.275909
package Networking; import java.io.*; import java.net.Socket; import java.net.UnknownHostException; public class Client { public static void main(String[] args) throws UnknownHostException { String serverName = "localhost"; int port = 2988; try { //establish connection System.out.println("Connecting to" + serverName + "on port: " + port); Socket client = new Socket(serverName, port); System.out.println("Just connected to " + client.getRemoteSocketAddress()); //output stream part OutputStream outToServer = client.getOutputStream(); DataOutputStream out = new DataOutputStream(outToServer); out.writeUTF("hello from" + client.getRemoteSocketAddress()); //in from server InputStream inFromServer = client.getInputStream(); DataInputStream in = new DataInputStream(inFromServer); System.out.println("Server says " + in.readUTF()); client.close(); } catch (IOException e) { e.printStackTrace(); } } }
946dbd03-072e-4a69-8898-53382c27f498
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-06-20 20:22:23", "repo_name": "AZHARDEEN/cloudsystems", "sub_path": "/cloudsystems/SystemJpa/src/main/java/br/com/mcampos/jpa/system/EMail.java", "file_name": "EMail.java", "file_ext": "java", "file_size_in_byte": 1171, "line_count": 60, "lang": "en", "doc_type": "code", "blob_id": "66cae6a45ad75abb3d1de934993753ec7e219330", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AZHARDEEN/cloudsystems
264
FILENAME: EMail.java
0.292595
package br.com.mcampos.jpa.system; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import br.com.mcampos.jpa.SimpleTable; /** * The persistent class for the e_mail database table. * */ @Entity @Table( name = "e_mail", schema = "public" ) public class EMail extends SimpleTable<EMail> { private static final long serialVersionUID = 1L; public static final Integer templateValidationEmail = 1; public static final Integer templateEmailValidated = 2; public static final Integer templateNewPassword = 3; public static final Integer templatePasswordChanged = 4; @Id @Column( name = "eml_id_in" ) private Integer id; @Column( name = "eml_description_ch" ) private String description; public EMail( ) { } @Override public Integer getId( ) { return id; } @Override public void setId( Integer emlIdIn ) { id = emlIdIn; } @Override public String getDescription( ) { return description; } @Override public void setDescription( String emlDescriptionCh ) { description = emlDescriptionCh; } }
f2b73c06-e414-4767-9c17-1ee8a2676aa1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-30 22:45:31", "repo_name": "danielbernalo/workshop-reactive", "sub_path": "/vertx/src/main/java/com/nexllence/workshops/reactive/architecture/vertx/ServerHttpVerticle.java", "file_name": "ServerHttpVerticle.java", "file_ext": "java", "file_size_in_byte": 1111, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "7927bfc58594af9b534c44485b8695c2a27a430b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/danielbernalo/workshop-reactive
250
FILENAME: ServerHttpVerticle.java
0.255344
package com.nexllence.workshops.reactive.architecture.vertx; import io.vertx.core.AbstractVerticle; import io.vertx.core.AsyncResult; import io.vertx.ext.web.Router; import io.vertx.ext.web.RoutingContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ServerHttpVerticle extends AbstractVerticle { private final Logger logger = LoggerFactory.getLogger(ServerHttpVerticle.class); @Override public void start() throws Exception { Router router = Router.router(vertx); router.get("/hello").handler(this::greetingHandler); vertx.createHttpServer() .requestHandler(router) .listen(8080); } private void greetingHandler(RoutingContext context) { vertx.executeBlocking(future -> { future.complete(greeting()); }, false, response -> handlerAsyncResponse(response, context)); } private void handlerAsyncResponse(AsyncResult<Object> response, RoutingContext context) { if (response.succeeded()) { context.end(response.result().toString()); } else { context.fail(response.cause()); } } private String greeting() { return "Hello World!"; } }
af1588ac-552e-457d-9339-bc4a2043cb3e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-17 09:01:30", "repo_name": "ChrisJun0731/publishCenter", "sub_path": "/src/main/java/com/demo/publishCenter/models/Config.java", "file_name": "Config.java", "file_ext": "java", "file_size_in_byte": 1086, "line_count": 60, "lang": "en", "doc_type": "code", "blob_id": "86bdc9078e3dbb44fc27bb7de9ab0262cbdd621d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ChrisJun0731/publishCenter
254
FILENAME: Config.java
0.261331
package com.demo.publishCenter.models; import java.util.ArrayList; import java.util.List; /** * Created by Administrator on 2017/9/5. */ public class Config { private List<IPC> commands; private List<Resource> resources; public Config(){ this.commands = new ArrayList(); this.resources = new ArrayList<Resource>(); } public void addIPC(IPC ipc){ commands.add(ipc); } public void removeIPC(String ip){ for(IPC ipc: commands){ if (ip.equals(ipc.getIp())) { commands.remove(ipc); return; } } } public void addResource(Resource resource){ resources.add(resource); } public void removeResource(String filename){ for(Resource resource: resources){ if (filename.equals(resource.getFilename())) { resources.remove(resource); return; } } } public List<IPC> getCommands() { return commands; } public void setCommands(List<IPC> commands) { this.commands = commands; } public List<Resource> getResources() { return resources; } public void setResources(List<Resource> resources) { this.resources = resources; } }
156944a5-7d73-4448-afe9-ca4a48e8245d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-09 08:09:10", "repo_name": "nikstarlord/AutomationRepo", "sub_path": "/SelTestDem/src/Demo/Refresh.java", "file_name": "Refresh.java", "file_ext": "java", "file_size_in_byte": 1103, "line_count": 26, "lang": "en", "doc_type": "code", "blob_id": "07fade5c07bea4114622eac9bd7c3eb20a8e536d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nikstarlord/AutomationRepo
209
FILENAME: Refresh.java
0.262842
package Demo; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class Refresh { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "/home/nikhil/Downloads/chromedriver_linux64/chromedriver"); WebDriver driver = new ChromeDriver(); driver.get("http://demo.automationtesting.in/Register.html"); // driver.findElement(By.id("username")).sendKeys("Nikhil"); //driver.navigate().refresh(); //System.out.println(driver.findElement(By.xpath("//*[contains(text(),'Automation Demo Site')]")).getText()); //String header = new String(driver.findElement(By.xpath("//*[contains(text(),'Automation Demo Test')]")).getText()); String header=driver.findElement(By.xpath("//*[contains(text(),'Automation Demo Site')]")).getText(); if(header.equals("Automation Demo Site")){ System.out.println("Passed...."); } else{ System.out.println("Failed...."); } driver.close(); } }
1c67f76c-ff8a-45fc-8bb1-c2818978d087
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-15 20:00:38", "repo_name": "araut1/q-csma", "sub_path": "/Code/Qcsma/src/qcsma/filesend.java", "file_name": "filesend.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "359591ea648b0308e8d9b8c37e71a7c8a7966831", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/araut1/q-csma
237
FILENAME: filesend.java
0.29584
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package qcsma; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.Socket; /** * * @author Administrator */ public class filesend { public void sendData(){ try{ int i=0; byte[] buffer = new byte[1024]; File file=PacketGen.fle; Socket soc = new Socket("localhost", 1689); FileInputStream fileIn = new FileInputStream(file); DataOutputStream fileOut = new DataOutputStream(soc.getOutputStream()); int parts= (int) Math.ceil((double) (file.length() / (double)1024)); int readFile; while ((readFile = fileIn.read(buffer)) != -1) { i++; fileOut.write(buffer, 0, readFile); fileOut.flush(); } soc.close(); }catch(Exception e){ System.err.println(e); } } }
3f1895eb-eba2-40c3-91fe-982077d604df
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-09-08 14:24:12", "repo_name": "EsfingeFramework/querybuilder", "sub_path": "/QueryBuilder_MongoDB/src/net/sf/esfinge/querybuilder/mongodb/MongoDBQueryRepresentation.java", "file_name": "MongoDBQueryRepresentation.java", "file_ext": "java", "file_size_in_byte": 1098, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "39bd2dd712734a1e03aae30c78ab832153441169", "star_events_count": 5, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/EsfingeFramework/querybuilder
215
FILENAME: MongoDBQueryRepresentation.java
0.280616
package net.sf.esfinge.querybuilder.mongodb; import java.util.Map; import java.util.Set; import org.mongodb.morphia.query.Query; import net.sf.esfinge.querybuilder.methodparser.QueryRepresentation; @SuppressWarnings("rawtypes") public class MongoDBQueryRepresentation implements QueryRepresentation{ private Query mongoQuery; private boolean dynamic; private Map<String, Object> fixParameters; public MongoDBQueryRepresentation(Query mongoQuery, boolean dynamic, Map<String, Object> fixParameters) { this.mongoQuery = mongoQuery; this.dynamic = dynamic; this.fixParameters = fixParameters; } @Override public boolean isDynamic() { return dynamic; } @Override public Object getQuery() { return mongoQuery; } @Override public Object getQuery(Map<String, Object> params) { throw new UnsupportedOperationException(); } @Override public Set<String> getFixParameters() { return fixParameters.keySet(); } @Override public Object getFixParameterValue(String param) { return fixParameters.get(param); } }
28d09864-6016-4118-960b-26648088839d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-06-28 20:13:48", "repo_name": "smartapps08/addteqtutorials", "sub_path": "/Media Player Service/src/com/myorg/mediaservice/MediaPlayerServiceActivity.java", "file_name": "MediaPlayerServiceActivity.java", "file_ext": "java", "file_size_in_byte": 1171, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "d9b3b6f2a08a509496da6e4addaca03a7c94f7c2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/smartapps08/addteqtutorials
231
FILENAME: MediaPlayerServiceActivity.java
0.281406
package com.myorg.mediaservice; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class MediaPlayerServiceActivity extends Activity { Button btnPlay, btnStop; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); btnPlay=(Button)findViewById(R.id.btnPlay); btnStop=(Button)findViewById(R.id.btnStop); btnPlay.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent i=new Intent(MediaPlayerServiceActivity.this, FakePlayerService.class); i.putExtra(FakePlayerService.EXTRA_PLAYLIST, "main playlist"); i.putExtra(FakePlayerService.EXTRA_SHUFFLE, true); startService(i); } }); btnStop.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Intent i=new Intent(MediaPlayerServiceActivity.this, FakePlayerService.class); stopService(i); } }); } }
9b25c66a-3155-481e-892b-9bc44b1689cc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-31 05:21:59", "repo_name": "Soybeany/CipherMavenPlugin", "sub_path": "/src/main/java/cipher/output/CipherPropertyLoader.java", "file_name": "CipherPropertyLoader.java", "file_ext": "java", "file_size_in_byte": 1143, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "2f4edf1ab7bc8122cbb032c4677033b141ad48cc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Soybeany/CipherMavenPlugin
214
FILENAME: CipherPropertyLoader.java
0.284576
package cipher.output; import cipher.core.CipherPropertyUtils; import cipher.core.CipherUtils; import cipher.core.UserInfo; import java.io.IOException; import java.util.Properties; /** * <br>Created by Soybeany on 2019/12/25. */ public class CipherPropertyLoader { public static Properties load(String resourceName) throws IOException { return CipherPropertyUtils.read(Singleton.INSTANCE.get(), resourceName); } public static void load(Properties properties) { CipherPropertyUtils.read(Singleton.INSTANCE.get(), properties); } private enum Singleton { INSTANCE; private UserInfo mUserInfo; Singleton() { try { Properties properties = CipherPropertyUtils.read(CipherUtils.DEFAULT_INFO, CipherPropertyUtils.CIPHER_INFO_PROPERTIES); mUserInfo = UserInfo.fromString((String) properties.get(CipherUtils.CIPHER_INFO_KEY)); } catch (Exception e) { throw new RuntimeException("初始化用户信息失败", e); } } UserInfo get() { return mUserInfo; } } }
2ebe44dc-6f7d-4881-bf93-7a6a3ef3ba9b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-18 03:09:15", "repo_name": "OneofWolvesBilly/online-demo", "sub_path": "/online-demo/src/main/java/io/github/oneofwolvesbilly/onlinedemo/request/body/UpdateCurrencyRequest.java", "file_name": "UpdateCurrencyRequest.java", "file_ext": "java", "file_size_in_byte": 1052, "line_count": 62, "lang": "en", "doc_type": "code", "blob_id": "0a36aec0ad04ea2e3cd9b6690d332bad8e8fbdd9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/OneofWolvesBilly/online-demo
250
FILENAME: UpdateCurrencyRequest.java
0.228156
package io.github.oneofwolvesbilly.onlinedemo.request.body; /** * 更新幣別請求Body * * @author BillyChen * */ public class UpdateCurrencyRequest { /** * 流水號 */ private Integer seqId; /** * 彆別縮寫 */ private String currencyCode; /** * 幣別中文 */ private String currencyName; public UpdateCurrencyRequest() { } public UpdateCurrencyRequest(Integer seqId, String currencyCode, String currencyName) { super(); this.seqId = seqId; this.currencyCode = currencyCode; this.currencyName = currencyName; } public Integer getSeqId() { return seqId; } public void setSeqId(Integer seqId) { this.seqId = seqId; } public String getCurrencyCode() { return currencyCode; } public void setCurrencyCode(String currencyCode) { this.currencyCode = currencyCode; } public String getCurrencyName() { return currencyName; } public void setCurrencyName(String currencyName) { this.currencyName = currencyName; } }
29c760e2-ea7c-43e9-ab55-293b9b7c30bf
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-21 01:51:30", "repo_name": "bestelapp/api", "sub_path": "/src/main/java/com/fontys/backend/entities/Group.java", "file_name": "Group.java", "file_ext": "java", "file_size_in_byte": 1062, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "3fb677547189af79830632d33c9a90e8dddaa41b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bestelapp/api
215
FILENAME: Group.java
0.272799
package com.fontys.backend.entities; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.util.ArrayList; import java.util.List; @Data @Entity @NoArgsConstructor @AllArgsConstructor @Table(name = "groups") public class Group { @GeneratedValue(strategy = GenerationType.IDENTITY) @Id @Column private int id; @Column(unique = true) private String name; @ManyToOne private User owner; @OneToMany private List<Order> orders; @ManyToMany private List<User> users; public Group(int id) { this.id = id; this.orders = new ArrayList<>(); this.users = new ArrayList<>(); } public Group(String name) { this.name = name; this.orders = new ArrayList<>(); this.users = new ArrayList<>(); } public Group(String name, User owner, List<User> users) { this.name = name; this.owner = owner; this.users = users; this.orders = new ArrayList<>(); } }
3206e71b-f65a-4675-8777-552845032934
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-23 16:29:46", "repo_name": "shailuhari04/FederalBrandsLtdTest", "sub_path": "/app/src/main/java/com/federalbrandsltdtest/remote/RetrofitClient.java", "file_name": "RetrofitClient.java", "file_ext": "java", "file_size_in_byte": 1062, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "9af8b181c3ef81bc3207748cc654b5c1f2cb1547", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/shailuhari04/FederalBrandsLtdTest
200
FILENAME: RetrofitClient.java
0.255344
package com.federalbrandsltdtest.remote; import io.reactivex.schedulers.Schedulers; import okhttp3.OkHttpClient; import retrofit2.Retrofit; import retrofit2.adapter.rxjava2.RxJava2CallAdapterFactory; import retrofit2.converter.gson.GsonConverterFactory; import java.util.concurrent.TimeUnit; public class RetrofitClient { //https://jsonplaceholder.typicode.com/photos private static final String WEB_API_BASE_URL = "https://jsonplaceholder.typicode.com"; private static OkHttpClient okHttpClient = new OkHttpClient.Builder() .readTimeout(1000, TimeUnit.SECONDS) .connectTimeout(1000, TimeUnit.SECONDS) .build(); public static ApiService getAPIService() { return new Retrofit.Builder().baseUrl(WEB_API_BASE_URL) .client(okHttpClient) .addCallAdapterFactory(RxJava2CallAdapterFactory.createWithScheduler(Schedulers.io())) .addConverterFactory(GsonConverterFactory.create()) .build() .create(ApiService.class); } }
ae1d7295-c72b-4919-bc60-76701481a4b4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-09-17 21:24:37", "repo_name": "Demitriy/MyForum", "sub_path": "/src/main/java/com/myforum/service/UserServiceImpl.java", "file_name": "UserServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1171, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "3643d8506dca422c5a948b7514da822ffa5a8bb4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Demitriy/MyForum
239
FILENAME: UserServiceImpl.java
0.293404
package com.myforum.service; import com.myforum.dao.UserDAO; import com.myforum.database.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.xml.ws.ServiceMode; /** * Created by Dima on 19.03.2017. */ @Service public class UserServiceImpl implements UserService { @Autowired private UserDAO userDAO; public boolean addUser(User user) { user.setLogin(user.getLogin().toUpperCase().trim()); user.setEmail(user.getEmail().toUpperCase().trim()); user.setPassword(user.getPassword().trim()); user.setName(user.getName() != null ? user.getName().trim() : null); return userDAO.addUser(user); } public boolean existLoginOrEmail(String value) { return userDAO.getUserByLoginOrEmail(value.toUpperCase().trim()) != null ? true : false; } public User getAuthUser(String login, String password) { User user = userDAO.getUserByLoginOrEmail(login); if (user != null) { if (user.getPassword().equals(password)) { return user; } } return null; } }
7c4ca336-97bc-447b-ba46-b775005de99e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-16 16:02:21", "repo_name": "holi-java/api-tests", "sub_path": "/jdk/src/test/java/test/concurrent/CountDownLatchTest.java", "file_name": "CountDownLatchTest.java", "file_ext": "java", "file_size_in_byte": 1005, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "542e0145dddb0568309e4bbeeaab8e19ef514ea3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/holi-java/api-tests
186
FILENAME: CountDownLatchTest.java
0.29584
package test.concurrent; import org.hamcrest.matchers.ExceptionMatchers.ExceptionExpectation; import org.junit.Test; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Future; import java.util.concurrent.TimeoutException; import static com.holi.utils.Task.spawn; import static com.holi.utils.Task.task; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.hamcrest.matchers.ExceptionMatchers.throwing; import static org.junit.Assert.assertThat; public class CountDownLatchTest { @Test public void waitsUtilTheCountReachesToZero() throws Throwable { CountDownLatch counter = new CountDownLatch(2); Future<?> task = spawn(task(counter::await)); ExceptionExpectation action = () -> task.get(100, MILLISECONDS); assertThat(action, throwing(TimeoutException.class)); counter.countDown(); assertThat(action, throwing(TimeoutException.class)); counter.countDown(); action.run(); } }
c8254331-e011-4e67-904f-dc93e8390065
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-05-06 15:45:33", "repo_name": "sullivt03/Android-Bike-Guidance", "sub_path": "/app/src/main/java/com/example/tommy_2/bikeguidence/About_Screen.java", "file_name": "About_Screen.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "c7d5d657cc51cb9275cb2bc181ef4c8a2079a7b2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sullivt03/Android-Bike-Guidance
220
FILENAME: About_Screen.java
0.243642
package com.example.tommy_2.bikeguidence; /** * Created by tommy_2 on 4/6/2015. */ //import android.support.v7.app.ActionBarActivity; import android.app.Activity; import android.os.Bundle; import android.content.Intent; import android.view.View; import android.widget.Button; import android.view.animation.Animation; import android.view.animation.AlphaAnimation; import android.view.animation.Animation.AnimationListener; import android.widget.TextView; public class About_Screen extends Activity implements View.OnClickListener { private String aboutInfoText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about__screen); TextView textViewToChange = (TextView) findViewById(R.id.aboutInformation); setAboutInfoText("About Information Text Place Holder"); textViewToChange.setText(aboutInfoText); } @Override public void onClick(View v) { } public void setAboutInfoText(String aboutInfoText) { this.aboutInfoText = aboutInfoText; } }
5570b127-ce61-4ea5-8a1c-1dce23da7956
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-19 15:48:37", "repo_name": "hans0811/Java__SpringCloud-Finchley", "sub_path": "/product/server/src/test/java/com/hans/product/repository/ProductInfoRepositoryTest.java", "file_name": "ProductInfoRepositoryTest.java", "file_ext": "java", "file_size_in_byte": 1007, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "00419e218ea3293d30adb7cb1823863c509a6e23", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hans0811/Java__SpringCloud-Finchley
220
FILENAME: ProductInfoRepositoryTest.java
0.290176
package com.hans.product.repository; import com.hans.product.dataobject.ProductInfo; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.junit.jupiter.api.Assertions; import org.springframework.boot.test.context.SpringBootTest; import java.util.Arrays; import java.util.List; import static org.junit.jupiter.api.Assertions.*; /** * @author hans */ @SpringBootTest class ProductInfoRepositoryTest { @Autowired private ProductInfoRepository productInfoRepository; @Test public void findByProductStatus() throws Exception{ List<ProductInfo> list = productInfoRepository.findByProductStatus(0); Assertions.assertTrue( list.size() > 0); } @Test public void findByProductIdIn() throws Exception { List<ProductInfo> list = productInfoRepository.findByProductIdIn(Arrays.asList("157875196366160022", "157875227953464068")); Assertions.assertTrue( list.size() > 0); } }
85930e55-c147-4b74-9201-ee7d66514913
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-24 08:55:47", "repo_name": "HyeonJung/FMRTE_backend", "sub_path": "/src/main/java/com/hj/fmrtebackend/model/Video.java", "file_name": "Video.java", "file_ext": "java", "file_size_in_byte": 1063, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "8b67d5d4598273d9f0410201a3aaa8f946ef1094", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/HyeonJung/FMRTE_backend
240
FILENAME: Video.java
0.255344
package com.hj.fmrtebackend.model; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import com.hj.fmrtebackend.common.BaseModel; import lombok.Getter; import lombok.Setter; @Entity @Getter @Setter public class Video extends BaseModel { /** * */ private static final long serialVersionUID = 1L; @Column private String videoId; @Column private Date publishedAT; @Column private String title; @Column private String description; @Column private String thumbnail; @Column private String userDescription; public Video() { super(); } public Video(VideoDto videoDto) { this.videoId = videoDto.getVideoId(); this.title = videoDto.getTitle(); this.description = videoDto.getDescription(); this.thumbnail = videoDto.getThumbnail(); } @Override public String toString() { return "Video [videoId=" + videoId + ", publishedAT=" + publishedAT + ", title=" + title + ", description=" + description + ", thumbnail=" + thumbnail + ", userDescription=" + userDescription + "]"; } }
55a5530e-afdc-47fc-8d7a-7fa443d5ce8f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-29 14:14:14", "repo_name": "lucijamatulin/SGLab-SCADA-simulator", "sub_path": "/src/main/java/hr/fer/zvne/scada/simulator/config/MachineModel.java", "file_name": "MachineModel.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "b54bb58af1c55400d17bc3b4bea1ce65f3f03cac", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lucijamatulin/SGLab-SCADA-simulator
246
FILENAME: MachineModel.java
0.245085
package hr.fer.zvne.scada.simulator.config; import java.util.Map; public class MachineModel { private int id; private Map<String, String> data; private Map<String, MachineProperties> measurements; private Map<String, CommandProperties> commands; public int getId() { return id; } public void setId(int id) { this.id = id; } public Map<String, String> getData() { return data; } public void setData(Map<String, String> data) { this.data = data; } public Map<String, MachineProperties> getMeasurements() { return measurements; } public void setMeasurements(Map<String, MachineProperties> measurements) { this.measurements = measurements; } public Map<String, CommandProperties> getCommands() { return commands; } public void setCommands(Map<String, CommandProperties> commands) { this.commands = commands; } @Override public String toString() { return "\nid=" + id + ", data=" + data + ", measurements=" + measurements + ", commands=" + commands; } }
18bf3aa5-ec04-4da9-89eb-9b889a612d75
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-30 17:01:35", "repo_name": "ferrveciana/BanyolesMamut", "sub_path": "/Backtraking/Activitat.java", "file_name": "Activitat.java", "file_ext": "java", "file_size_in_byte": 1049, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "7a81aaf5d512885ce8fb2961830c82ac25b1e9f4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ferrveciana/BanyolesMamut
238
FILENAME: Activitat.java
0.277473
/* * 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 proactiva; import java.time.LocalDateTime; import java.util.List; /** * * @author narcisbustins */ public abstract class Activitat { private int durada; private float preu; private LocalDateTime hinici; private LocalDateTime hfinal; Activitat(int _durada,float _preu){ durada = _durada; preu = _preu; } public int durada(){ return durada; } public float preu(){ return preu; } public void setInici(LocalDateTime _inici){ hinici=_inici; } public void setFinal(LocalDateTime _final){ hfinal=_final; } abstract public PuntInteres piActual(); abstract int satisfaccio(List<String> preferenciesClients); abstract LocalDateTime hPropera(LocalDateTime hora); }
6ca082c6-3bd8-4ce3-be46-4a17f60fdc2d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-04-21T14:31:12", "repo_name": "Tatibara/frauenloop-personal-website", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1178, "line_count": 30, "lang": "en", "doc_type": "text", "blob_id": "f0bbdcc469adf648431406ca977241b504b7e557", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Tatibara/frauenloop-personal-website
406
FILENAME: README.md
0.217338
## Goal Start new “real world like” project from scratch. Introduce the building blocks around React: - Routing - State Management - Project Structure - Linting - Styling React Components - Introduction to Unit Testing This project can be extended individually. For example, it can be a starting point for a personal website. ## Questions / Feedback Please take a moment and write your feedback for each session to me: - What did you like in the session? - What is your suggestion to make it better? Let’s keep our learning sessions valuable for everybody! I appreciate it very much! ## Summaries * [Week 8](https://docs.google.com/presentation/d/1lYu9RJhnCm5BnK4LYHckIjkKL34Sf6VTfJRDWVxUw40/edit?usp=sharing) * [Week 9](https://docs.google.com/presentation/d/1dflaBXnhJH0HveM4wxehFc1OgMQrPd4JwFS7yznHwEA/edit?usp=sharing) * [Week 10](https://docs.google.com/presentation/d/1ScCb4pEUQxva_w-w3AmzW9TjYLZ301GlmuhbXBE0Vxg/edit?usp=sharing) * [Week 11](https://docs.google.com/presentation/d/1VhvmgXz1QdYwpHZYs-1oGrBTPV3jiOgYIWO_gAZPvsk/edit?usp=sharing) * [Week 12](https://docs.google.com/presentation/d/1XMfjP56hi2FAUmQyfL_aO-8A3KMulHabVzy2Y3DoEzw/edit?usp=sharing)
c78e4679-9e34-414b-8235-b21a9b9aa02d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-26 18:23:24", "repo_name": "rubenaml/MobilePOS_", "sub_path": "/app/src/main/java/net/tecgurus/mobilepos/models/entities/ClienteEntity.java", "file_name": "ClienteEntity.java", "file_ext": "java", "file_size_in_byte": 1124, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "e98e333c52a3448790b029496b7f506ab2b59457", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rubenaml/MobilePOS_
238
FILENAME: ClienteEntity.java
0.20947
package net.tecgurus.mobilepos.models.entities; import android.arch.persistence.room.ColumnInfo; import android.arch.persistence.room.Entity; import android.arch.persistence.room.PrimaryKey; import android.arch.persistence.room.Relation; import android.support.annotation.NonNull; @Entity(tableName = "clientes") public class ClienteEntity { @PrimaryKey(autoGenerate = true) private int id; @ColumnInfo(name = "nombre") @NonNull private String nombre; private int vendedorId; @ColumnInfo(name = "region") private String region; public int getVendedorId() { return vendedorId; } public void setVendedorId(int vendedorId) { this.vendedorId = vendedorId; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getNombre() { return nombre; } public void setNombre(String nombre) { this.nombre = nombre; } public String getRegion() { return region; } public void setRegion(String region) { this.region = region; } }
761e454c-a341-4938-992b-91102e1199dc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-21 07:39:35", "repo_name": "kiranreddy123/RestJunit", "sub_path": "/springboot-unit-example/src/test/java/RestResourceTest.java", "file_name": "RestResourceTest.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "98f30e2577b7e658a327d3fff62a5ab271c92d0e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kiranreddy123/RestJunit
234
FILENAME: RestResourceTest.java
0.283781
import org.junit.Before; import org.junit.Test; import org.mockito.InjectMocks; import org.mockito.Matchers; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import org.springframework.test.web.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; public class RestResourceTest { private MockMvc mockMvc; @InjectMocks private RestResource restResource; @Before public void before() { mockMvc = MockMvcBuilders.standaloneSetup(restResource).build(); } @Test public void testRestR() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/hello")).andExpect(MockMvcResultMatchers.status().isOk()) .andExpect(MockMvcResultMatchers.content().string("Hello Rest")); } @Test public void testJson() throws Exception { mockMvc.perform(MockMvcRequestBuilders.get("/json")).andExpect(MockMvcResultMatchers.status().isOk()) .andExpect(MockMvcResultMatchers.jsonPath("$.name", org.hamcrest.Matchers.is("kiran"))) .andExpect(MockMvcResultMatchers.jsonPath("$.greet", org.hamcrest.Matchers.is("Hello"))); } }
bff6f776-adb7-410d-9a07-acded603770a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-11 04:37:48", "repo_name": "Ramhardik88/Javabrains.io", "sub_path": "/src/example/matixtrue.java", "file_name": "matixtrue.java", "file_ext": "java", "file_size_in_byte": 1024, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "cb0b60aa9a5d59e99fed5374667a9eecc8459752", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Ramhardik88/Javabrains.io
241
FILENAME: matixtrue.java
0.279042
package example; import java.util.Scanner; public class matixtrue { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.print("enter the size of row"); int row = scan.nextInt(); System.out.print("enter the size of colmun"); int col = scan.nextInt(); char array[][] = new char[row][col]; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { array[i][j] = scan.next().charAt(0); } } // // //change the value // for(int i=0;i<array.length;i++) { for(int j=0;j<array.length;j++) { if(array[i][j]=='t') { } } } // print the array for(int i=0;i<row;i++) { for (int j=0;j<col;j++) { System.out.print(array[i][j]+" "); } System.out.println(); } } }
c1976cf0-fe80-4674-90d4-60595650c256
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-08-20 23:58:31", "repo_name": "NicolasPecot/TestCanvasApplication", "sub_path": "/app/src/main/java/com/tpandroid/nicolas/testcanvasapplication/DragNDropActivity.java", "file_name": "DragNDropActivity.java", "file_ext": "java", "file_size_in_byte": 1078, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "f9ca0a487adb67148435fddf79aa6ac7722d7bb5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/NicolasPecot/TestCanvasApplication
202
FILENAME: DragNDropActivity.java
0.214691
package com.tpandroid.nicolas.testcanvasapplication; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; public class DragNDropActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_drag_ndrop); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.drag_ndrop, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.menu_draw){ // Créer une nouvelle activité pour le drag & drop Intent intent = new Intent(DragNDropActivity.this, DessinActivity.class); startActivity(intent); } return item.getItemId() != R.id.menu_dragdrop || super.onOptionsItemSelected(item); } }
27f62347-861a-456c-831c-27efdc007804
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-01-26 20:26:41", "repo_name": "it-open/SimpleREST", "sub_path": "/src/main/java/at/itopen/simplerest/conversion/Cookie.java", "file_name": "Cookie.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 66, "lang": "en", "doc_type": "code", "blob_id": "f19b20039ee3c9d1700705276ef13a56c2f8d532", "star_events_count": 4, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/it-open/SimpleREST
266
FILENAME: Cookie.java
0.242206
/* * 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 at.itopen.simplerest.conversion; /** * * @author roland */ public class Cookie { private final String name; private final String value; private int maxseconds; /** * * @param name * @param value */ public Cookie(String name, String value) { this.name = name; this.value = value; this.maxseconds = 5 * 60; } /** * * @param name * @param value * @param maxseconds */ public Cookie(String name, String value, int maxseconds) { this.name = name; this.value = value; this.maxseconds = maxseconds; } /** * * @return */ public String getName() { return name; } /** * * @return */ public String getValue() { return value; } /** * * @return */ public int getMaxseconds() { return maxseconds; } }
b5d6644b-9dcf-4056-8231-e048c8ef138f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-16 16:25:19", "repo_name": "ilshatG/Spring", "sub_path": "/spring_hibernate_cars/src/main/java/ru/job4j/models/CarModel.java", "file_name": "CarModel.java", "file_ext": "java", "file_size_in_byte": 1111, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "d451ca6b24642daa0046aad721881f5c6825fbba", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ilshatG/Spring
268
FILENAME: CarModel.java
0.293404
package ru.job4j.models; import java.util.Objects; /** * Vehicle model. Corolla, Camry, Prado etc. */ public class CarModel { private long id; private String name; // private Set<Brand> brands = new HashSet<>(0); /* public Set<Brand> getBrands() { return brands; } public void setBrands(Set<Brand> brands) { this.brands = brands; } */ public CarModel() { } public CarModel(String name) { this.name = name; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CarModel carModel = (CarModel) o; return id == carModel.id && Objects.equals(name, carModel.name); } @Override public int hashCode() { return Objects.hash(id, name); } }
54127034-5733-426f-8580-b42a8fff3df3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-04-30 05:28:38", "repo_name": "imzdong/study", "sub_path": "/stone/src/main/java/org/imzdong/study/stone/netty/simple/NettyClient.java", "file_name": "NettyClient.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "1cde5bc8c041dea648dcd93fa6b77b767df30237", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/imzdong/study
248
FILENAME: NettyClient.java
0.252384
package org.imzdong.study.stone.netty.simple; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelInitializer; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.handler.codec.string.StringEncoder; /** * @description: * @author: Winter * @time: 2020/1/18 */ public class NettyClient { public static void main(String[] args) throws Exception{ Bootstrap bootstrap = new Bootstrap(); NioEventLoopGroup work = new NioEventLoopGroup(); bootstrap.group(work) .channel(NioSocketChannel.class) .handler(new ChannelInitializer<Channel>() { @Override protected void initChannel(Channel channel) throws Exception { channel.pipeline().addLast(new StringEncoder()); } }); Channel channel = bootstrap.connect("127.0.0.1",8000).channel(); int num=0; while (num<200) { channel.writeAndFlush(num++ + ": hello world!"); Thread.sleep(2000); } } }
4b4d9ba7-8cbb-4a72-867a-1130234ebee7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-12-05 08:31:47", "repo_name": "thrilion/MarvelsHeroSearcher", "sub_path": "/app/src/main/java/com/example/thrilion/marvelsherosearcher/Activities/SplashActivity.java", "file_name": "SplashActivity.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "fd4dce1080ec3e560146adb258842f73a7e54e92", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/thrilion/MarvelsHeroSearcher
220
FILENAME: SplashActivity.java
0.2227
package com.example.thrilion.marvelsherosearcher.Activities; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Window; import com.example.thrilion.marvelsherosearcher.Adapters.SuperheroListAdapter; import com.example.thrilion.marvelsherosearcher.R; import java.util.Timer; import java.util.TimerTask; public class SplashActivity extends AppCompatActivity { private static final long SPLASH_DELAY = 2000; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_splash); TimerTask task = new TimerTask() { @Override public void run() { Intent intent = new Intent().setClass(SplashActivity.this, MainActivity.class); startActivity(intent); finish(); } }; // Hacemos la espera de 2 segudnos Timer timer = new Timer(); timer.schedule(task, SPLASH_DELAY); } }
5ff450e8-8dc2-4886-a68e-907746cf58ea
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-13 02:09:25", "repo_name": "msu-cis-19/roadrunners-app", "sub_path": "/app/src/main/java/edu/msudenver/roadrunners/db/InventoryDB.java", "file_name": "InventoryDB.java", "file_ext": "java", "file_size_in_byte": 1040, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "1fad31eb7e05a376bd2cddcd72ebfced544a8a5e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/msu-cis-19/roadrunners-app
182
FILENAME: InventoryDB.java
0.253861
package edu.msudenver.roadrunners.db; import android.arch.persistence.room.Database; import android.arch.persistence.room.Room; import android.arch.persistence.room.RoomDatabase; import android.content.Context; import edu.msudenver.roadrunners.inventory.InventoryItem; @Database(entities = {InventoryItem.class}, version = 2) public abstract class InventoryDB extends RoomDatabase { private static final String DBNAME = "item_db"; private static volatile InventoryDB INSTANCE; public static InventoryDB getInstance(final Context context) { if (INSTANCE == null) { synchronized (InventoryDB.class) { if (INSTANCE == null) { INSTANCE = Room.databaseBuilder(context.getApplicationContext(), InventoryDB.class, DBNAME) .fallbackToDestructiveMigration() .build(); } } } return INSTANCE; } public abstract InventoryItemDAO itemDAO(); }
2ee5a628-5f35-4ac2-987e-183caf882eb7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-30 12:23:01", "repo_name": "MarselAhmetov/Conferences", "sub_path": "/Conferences/src/main/java/team404/conference/general/exception/RestControllerExceptionHandler.java", "file_name": "RestControllerExceptionHandler.java", "file_ext": "java", "file_size_in_byte": 1125, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "93d70b125995969b2a97cd811f232c22365b3743", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MarselAhmetov/Conferences
175
FILENAME: RestControllerExceptionHandler.java
0.250913
package team404.conference.general.exception; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; import java.sql.Timestamp; @ControllerAdvice public class RestControllerExceptionHandler extends ResponseEntityExceptionHandler { @ExceptionHandler(ApiException.class) public ResponseEntity<ErrorRecord> handle(ApiException e) { return createResponse(e.getStatusCode(), e.getMessage(), e.getError()); } public static ResponseEntity<ErrorRecord> createResponse(StatusCode statusCode, String message, String error) { final ErrorRecord errorRecord = ErrorRecord.builder() .error(error) .message(message) .statusName(statusCode.getErrorCode()) .timestamp(new Timestamp(System.currentTimeMillis())) .build(); return ResponseEntity.status(statusCode.getStatus()).body(errorRecord); } }
ba0674df-ee5e-412f-99df-591784235acc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-12 01:54:57", "repo_name": "haxdds/Solar-Panel-Evolution", "sub_path": "/Rahul/src/Gene.java", "file_name": "Gene.java", "file_ext": "java", "file_size_in_byte": 1038, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "4f0b0e400011e5287466c897ca94d43bcfd7feaa", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/haxdds/Solar-Panel-Evolution
247
FILENAME: Gene.java
0.294215
import java.util.ArrayList; import java.util.Arrays; /** * Created by Rahul on 7/19/2018. */ public class Gene { /** * */ private int[] gene; public static final int length = 8; public Gene(int[] gene){ if(gene.length != getLength()) throw new IllegalArgumentException("GENE LENGTH ERROR 1"); this.gene = gene; } public static Gene generateRandomGene(){ int[] randomGene = new int[getLength()]; for(int k = 0; k < getLength(); k++){ if(Math.random() < 0.5){ randomGene[k] = 0; }else{ randomGene[k] = 1; } } return new Gene(randomGene); } public static int getLength(){return length;} public int getBit(int index){ return gene[index]; } public void setBit(int index, int value){ gene[index] = value; } public String toString(){ String s = ""; for(int k: gene){ s += k; } return s; } }
b941b82a-92ff-41ba-962e-a9e5187416a7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-20 14:12:05", "repo_name": "Oops-w/netty-demo", "sub_path": "/src/main/java/com/wsy/server/handler/ChatRequestMessageHandler.java", "file_name": "ChatRequestMessageHandler.java", "file_ext": "java", "file_size_in_byte": 1176, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "0e44721fb8eb8f53bd61d57910cebfae99f7f4a1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Oops-w/netty-demo
239
FILENAME: ChatRequestMessageHandler.java
0.259826
package com.wsy.server.handler; import com.wsy.message.ChatRequestMessage; import com.wsy.message.ChatResponseMessage; import com.wsy.server.session.SessionFactory; import io.netty.channel.Channel; import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; /** * @author wsy * @date 2021/9/19 7:40 下午 * @Description */ @ChannelHandler.Sharable public class ChatRequestMessageHandler extends SimpleChannelInboundHandler<ChatRequestMessage> { @Override protected void channelRead0(ChannelHandlerContext channelHandlerContext, ChatRequestMessage chatRequestMessage) throws Exception { String to = chatRequestMessage.getTo(); Channel channel = SessionFactory.getSession().getChannel(to); if (channel == null) { // send to sender channelHandlerContext.channel().writeAndFlush(new ChatResponseMessage(false, "receiver not online or not exist")); } else { //send to receiver channel.writeAndFlush(new ChatResponseMessage(chatRequestMessage.getFrom(), chatRequestMessage.getContent())); } } }
137f3c19-d9a6-4756-9090-94ae3b0fbaaf
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-04-30T20:17:41", "repo_name": "alesaudate/camel-s3-kinesis-example", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1027, "line_count": 12, "lang": "en", "doc_type": "text", "blob_id": "3d3abbcb76eb44fd671e86bd91d23ea69e0fe3e3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/alesaudate/camel-s3-kinesis-example
255
FILENAME: README.md
0.278257
# Camel example: S3 -> Kinesis -> Back to Camel This project shows how to wire S3 and Kinesis by reading a CSV file from some S3 bucket, reading every line and then sending a corresponding JSON to Kinesis. ## How to run it ``` ./gradlew bootRun -Pargs=--aws.access-key=<AWS ACCESS KEY> --aws.secret-key=<AWS SECRET KEY> --aws.region=<AWS REGION> --s3.bucket=<AWS SOURCE BUCKET NAME> --kinesis.stream=<AWS KINESIS STREAM NAME> ``` Once the project starts up, if the credentials are correct and the bucket exists, Apache Camel will be waiting for a file on the bucket. This code has been written expecting a CSV file like the one contained in (src/main/resources/csv)[src/main/resources/csv]. Should you want to update it to your own needs (and you will surely want to), you will need to change the class [Record](src/main/java/com/github/alesaudate/camelexamples/Record.java) and the function `toJSON` that is contained in the bottom of the file [Routes.kt](src/main/kotlin/com/github/alesaudate/camelexamples/Routes.kt).
bdd0f880-410f-44e8-b503-57d57ab88648
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-14 15:29:33", "repo_name": "black-ant/expengine", "sub_path": "/engine-datacenter/src/main/java/com/gang/etl/datacenter/entity/SyncSetting.java", "file_name": "SyncSetting.java", "file_ext": "java", "file_size_in_byte": 1142, "line_count": 73, "lang": "en", "doc_type": "code", "blob_id": "64f67239f5924748a4d51a22dc4e4193c39b538b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/black-ant/expengine
264
FILENAME: SyncSetting.java
0.201813
package com.gang.etl.datacenter.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.gang.common.lib.to.AbstractEntity; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.time.LocalDateTime; import java.util.Date; /** * <p> * * </p> * * @author ant-black * @since 2020-01-31 */ @Data @EqualsAndHashCode(callSuper = true) @Accessors(chain = true) public class SyncSetting extends AbstractEntity { private static final long serialVersionUID = 1L; @TableId(type = IdType.ASSIGN_ID) private String id; /** * */ private String settingCode; /** * 配置体 */ private String settingBody; /** * 配置名称 */ private String settingName; /** * 配置类型 */ private String settingType; /** * */ private String settingAppCode; /** * 配置控制 */ private String settingControl; /** * 配置策略 */ private String settingPolicy; private Date createDate; }
1661f7eb-97fb-4241-a50f-fd8557a76b0e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-04 19:39:17", "repo_name": "lustigepepe/Public", "sub_path": "/MailClient/fsnavigation/src/fsnavigation/handlers/SetBaseDirectory.java", "file_name": "SetBaseDirectory.java", "file_ext": "java", "file_size_in_byte": 1172, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "d9fd8b803f6dd41e0ab20effbaec6d5159f3d75b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lustigepepe/Public
223
FILENAME: SetBaseDirectory.java
0.280616
package fsnavigation.handlers; import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.swt.widgets.DirectoryDialog; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.handlers.HandlerUtil; import fsnavigation.ObservableChooseDirectory; /** * Our sample handler extends AbstractHandler, an IHandler base class. * * @see org.eclipse.core.commands.IHandler * @see org.eclipse.core.commands.AbstractHandler */ public class SetBaseDirectory extends AbstractHandler { /** * The constructor. */ public SetBaseDirectory() { } /** * the command has been executed, so extract extract the needed information * from the application context. */ @Override public Object execute(ExecutionEvent event) throws ExecutionException { IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event); DirectoryDialog directorychooser = new DirectoryDialog(window.getShell()); String path = directorychooser.open(); ObservableChooseDirectory.getInstance().chooseDirectory(path); return null; } }
1891cf7f-ea86-439e-9282-815eac3b87b0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-17 03:37:32", "repo_name": "HadLuo/java_store", "sub_path": "/hadluo-framework/src/main/java/com/uc/framework/thread/ThreadPools.java", "file_name": "ThreadPools.java", "file_ext": "java", "file_size_in_byte": 1193, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "b0859470c377359f60bd10040e9e926e796b071e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/HadLuo/java_store
272
FILENAME: ThreadPools.java
0.282988
package com.uc.framework.thread; import java.util.concurrent.Executor; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import com.uc.framework.App; /*** * 线程池工具,优先获取spring配置的线程池 * * @author HadLuo * @since JDK1.7 * @history 2020年2月20日 新建 */ public class ThreadPools { private static volatile Executor EXECUTOR = null; private static Executor fromSpringPools() { try { return App.getBean(ThreadPoolTaskExecutor.class); } catch (Throwable e) { return null; } } public synchronized static Executor getThreadPools() { Executor executor = fromSpringPools(); if (executor != null) { return executor; } if (EXECUTOR == null) { // 构造一个核心为100 最大为100的线程池 EXECUTOR = new ThreadPoolExecutor(100, 100, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(1000)); } return EXECUTOR; } }