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
4dcce9a8-17b0-4ba7-9b16-446b1731ed69
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-08 15:32:39", "repo_name": "znhaha8/coffee-house-system", "sub_path": "/coffee-house-common/src/main/java/com/wyz/coffee/http/bean/dto/Response.java", "file_name": "Response.java", "file_ext": "java", "file_size_in_byte": 1196, "line_count": 64, "lang": "en", "doc_type": "code", "blob_id": "c176895fa8199323867cb5523eef7e0bd7efa344", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/znhaha8/coffee-house-system
279
FILENAME: Response.java
0.291787
package com.wyz.coffee.http.bean.dto; import com.wyz.coffee.http.exception.ResponseException; public class Response<T> { private String code; private String msg; private T data; public Response<T> check() { if (!"100".equals(this.code)) { throw new ResponseException(this); } return this; } public Response() { } public Response(String code, String msg) { this.code = code; this.msg = msg; } public Response(String code, String msg, T data) { this.code = code; this.msg = msg; this.data = data; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public T getData() { return data; } public void setData(T data) { this.data = data; } public static <T> Response<T> success() { return success(null); } public static <T> Response<T> success(T data) { return new Response<>("100", "成功", data); } }
4aa8b46c-68c4-4ec7-ae44-a023a495b579
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-12 20:43:26", "repo_name": "dogganidhal/arava-backend", "sub_path": "/core/src/main/java/com/arava/server/jwt/UserPrincipalDetailsService.java", "file_name": "UserPrincipalDetailsService.java", "file_ext": "java", "file_size_in_byte": 968, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "9dd4fdb0af9c2bf4c0c347dc94c3d5fe410f1da4", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/dogganidhal/arava-backend
175
FILENAME: UserPrincipalDetailsService.java
0.217338
package com.arava.server.jwt; import com.arava.persistence.entity.User; import com.arava.persistence.repository.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; /** * Created by Nidhal Dogga * Date : 15/01/2020 06:37 * All rights reserved. */ @Service public class UserPrincipalDetailsService implements UserDetailsService { @Autowired private UserRepository userRepository; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { User user = userRepository.findByEmail(username); if (user == null) { throw new UsernameNotFoundException(username); } return new UserPrincipal(user); } }
20d34203-1dde-4ecd-b6df-9e93bd6cbbce
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-14 19:25:13", "repo_name": "SimonTheTree/beadando", "sub_path": "/MapCreator/src/view/MainWindow.java", "file_name": "MainWindow.java", "file_ext": "java", "file_size_in_byte": 1109, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "786e29e901ab3ce127c25334c570ebd763a8b018", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/SimonTheTree/beadando
188
FILENAME: MainWindow.java
0.277473
package view; import javax.swing.JFrame; import gameTools.state.State; import gameTools.state.StateManager; public class MainWindow extends JFrame{ //--------------------------------------------------------------// // STATE ID-s //--------------------------------------------------------------// public static final String STATE_CREATOR = "creator"; private StateManager sm = new StateManager(this); private State creator = new view.states.CreatorState(); // forum public MainWindow(){ this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setSize(Settings.MAIN_WINDOW_WIDTH, Settings.MAIN_WINDOW_HEIGHT); this.setTitle(Labels.MAIN_WINDOW_TITLE); this.setResizable(false); this.setLocationRelativeTo(null); sm.addState(creator); sm.setCurrentState(STATE_CREATOR); sm.startCurrentState(); this.setVisible(true); } public void setState(String s){ sm.stopCurrentState(); sm.setCurrentState(s); sm.startCurrentState(); } }
e986f316-8657-4c69-88b4-36d88a6e3299
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-11-04 09:49:55", "repo_name": "Cibelyfreire/MeuCliente", "sub_path": "/MeuCliente/MeuCliente/src/main/java/br/unifor/MeuCliente/dao/ConnectionFactory.java", "file_name": "ConnectionFactory.java", "file_ext": "java", "file_size_in_byte": 1109, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "f8a3c64a6a243c82ea9a3c048eab27edf591c08d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Cibelyfreire/MeuCliente
253
FILENAME: ConnectionFactory.java
0.26971
package br.unifor.MeuCliente.dao; import java.sql.Connection; import java.sql.SQLException; import com.jolbox.bonecp.BoneCP; import com.jolbox.bonecp.BoneCPConfig; public class ConnectionFactory { private static BoneCP pool; private static final ConnectionFactory CONNECTION = new ConnectionFactory(); private ConnectionFactory() { BoneCPConfig config = new BoneCPConfig(); config.setJdbcUrl("jdbc:postgresql://localhost:5432/aulabd"); //Precisa alterar a URl do jdbc. config.setUser("postgres"); config.setPassword("postgres"); config.setMinConnectionsPerPartition(3); config.setMaxConnectionsPerPartition(50); config.setPartitionCount(1); try { pool = new BoneCP(config); } catch (SQLException e) { System.out.println("Nãoo foi possível conectar!"); System.exit(0); } } public static Connection getConnection() throws SQLException { return pool.getConnection(); } public static BoneCP getPool() { return pool; } public static Integer getTotalConexoes(){ return pool.getTotalCreatedConnections(); } }
4a5e5b12-0ad5-4a78-b83d-41ea6579c47d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-23 16:40:44", "repo_name": "ewangshi/wsapps", "sub_path": "/java/wsapps_sys/src/test/java/cc/wsapps/demo/App.java", "file_name": "App.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "57559204b543c71922ab51fc4fe120d2322cdccc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ewangshi/wsapps
207
FILENAME: App.java
0.239349
package cc.wsapps.demo; import java.io.File; import java.util.ArrayList; import java.util.List; import org.mybatis.generator.api.MyBatisGenerator; import org.mybatis.generator.config.Configuration; import org.mybatis.generator.config.xml.ConfigurationParser; import org.mybatis.generator.internal.DefaultShellCallback; /** * Hello world! * */ public class App { public static void main(String[] args) throws Exception { List<String> warnings = new ArrayList<String>(); ConfigurationParser cp = new ConfigurationParser(warnings); Configuration config = cp.parseConfiguration(new File("C:\\ewangshi\\work\\dr\\demo\\springboot_vue\\java\\wsapps_sys\\src\\test\\java\\cc\\wsapps\\demo\\generatorSysConfig.xml")); MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, new DefaultShellCallback(true), warnings); myBatisGenerator.generate(null); for (String warning : warnings) { System.out.println(warning); } } }
8a461315-0329-404e-8637-813d9b8a3c02
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-10 10:55:49", "repo_name": "ChristinaBartholomaeussen/Eksamen2021Projekt", "sub_path": "/src/main/java/com/example/eksamen2021/restcontroller/ParishRestController.java", "file_name": "ParishRestController.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "541c2b8a074d9e247a17c1494d347a62312b6d9b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ChristinaBartholomaeussen/Eksamen2021Projekt
242
FILENAME: ParishRestController.java
0.272025
package com.example.eksamen2021.restcontroller; import com.example.eksamen2021.model.Parish; import com.example.eksamen2021.service.ParishService; import lombok.AllArgsConstructor; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController @AllArgsConstructor @RequestMapping("api/parish") public class ParishRestController { private final ParishService parishService; @GetMapping( "/all-parishes") @ResponseStatus(HttpStatus.OK) public List<Parish> getAllParishes(){ return parishService.getAllParishes(); } @PostMapping("/create-parish") @ResponseStatus(HttpStatus.CREATED) public Parish createParish(@RequestBody Parish parish){ return parishService.saveParish(parish); } @DeleteMapping("/delete-parish/{parishCode}") @ResponseStatus(HttpStatus.OK) public void deleteParish(@PathVariable Long parishCode){ parishService.deleteParish(parishCode); } @PutMapping("/update-parish") @ResponseStatus(HttpStatus.CREATED) public void updateParish(@RequestBody Parish parish){ parishService.updateParish(parish); } }
51c4703a-519f-4aca-9ab4-d0ad82019864
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-31 12:33:57", "repo_name": "ZhangPeng123456aabb/Itheima_JavaWeb", "sub_path": "/ZhangPeng/src/main/java/com/baizhi/spring/jdkproxy/Test.java", "file_name": "Test.java", "file_ext": "java", "file_size_in_byte": 1329, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "6539398caddd62651adbce95be9d07e099e1db31", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ZhangPeng123456aabb/Itheima_JavaWeb
262
FILENAME: Test.java
0.283781
package com.baizhi.spring.jdkproxy; import com.baizhi.spring.service.UserService; import com.baizhi.spring.service.impl.UserServiceImpl; import org.apache.log4j.helpers.Loader; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; //jdk动态代理 public class Test { public static void main(String[] args) { //目标 final UserService userService = new UserServiceImpl(); //增强处理 InvocationHandler h = new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { System.out.println("前置增强"); Object obj = method.invoke(userService, args); System.out.println("后置增强"); return obj; } }; //有jdk生成一个UserService这个对象的代理对象 //面向接口编程,spring就会调用动态代理 /** * spring有两种代理机制 * 1.jdk动态代理 * 2.CGLIB动态代理 * SpringAop的实现原理 */ UserService service = (UserService) (Proxy.newProxyInstance(Test.class.getClassLoader(),userService.getClass().getInterfaces(),h)); service.reg("a"); } }
b96a9e9a-eaeb-4a64-9f09-a2335b8b53c8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-03 07:45:11", "repo_name": "Saifil/AndroidStudioProjects", "sub_path": "/KoffeeShop/app/src/main/java/com/example/saifil/koffeeshop/DrinkActivity.java", "file_name": "DrinkActivity.java", "file_ext": "java", "file_size_in_byte": 1087, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "3f23ff99828808b1fffcbe07c3a116ea4913423b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Saifil/AndroidStudioProjects
210
FILENAME: DrinkActivity.java
0.247987
package com.example.saifil.koffeeshop; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ImageView; import android.widget.TextView; public class DrinkActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_drink); Bundle myData = getIntent().getExtras(); // get the passed data into myData if (myData == null) { // checks if myData is Null (return if null) return; } int value = myData.getInt("index_no"); Drinks drinks = new Drinks(); String name = drinks.getName(value); String desc = drinks.getDesc(value); int imgID = drinks.getImgID(value); TextView title = findViewById(R.id.txt_title_id); TextView body = findViewById(R.id.txt_body_id); ImageView img = findViewById(R.id.my_img_id); title.setText(name); body.setText(desc); img.setImageResource(imgID); } }
599cbdf3-e84d-4d29-97fe-398c1beabc7f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-11 16:25:11", "repo_name": "luhaobang2019/ssm_test", "sub_path": "/src/main/java/com/bang/controller/UserController.java", "file_name": "UserController.java", "file_ext": "java", "file_size_in_byte": 990, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "823234d9a168754f8604effc9722531a1a492a83", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/luhaobang2019/ssm_test
203
FILENAME: UserController.java
0.243642
package com.bang.controller; import com.bang.entity.User; import com.bang.service.IUserService; import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; @RestController @Slf4j @RequestMapping("/user") public class UserController { @Resource private IUserService service; @RequestMapping(value = "/add" ,method = RequestMethod.GET,produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public String addUser(User user) { log.debug("进来咯"); Integer i = service.addUser(user); log.debug("获得id"+i); return "ok"; } @RequestMapping(value = "/select",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public User getUserById(@RequestBody User user){ log.debug("即将查询"); List<User> list = service.getUserById(user); return list.get(0); } }
218a233b-d860-4710-b0cf-d1c0b00d8d13
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-10 15:08:20", "repo_name": "humanheima/ijkplayer-example", "sub_path": "/ijkplayer-example/src/main/java/tv/danmaku/ijk/media/example/activities/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1078, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "a51557d2348c592ff4c40f9baf3cfbdd8abbf2bf", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/humanheima/ijkplayer-example
188
FILENAME: MainActivity.java
0.201813
package tv.danmaku.ijk.media.example.activities; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import tv.danmaku.ijk.media.example.R; public class MainActivity extends AppCompatActivity { private Button btnTest; private Button btnFileExplorer; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); btnTest = (Button) findViewById(R.id.btn_test); btnFileExplorer = (Button) findViewById(R.id.btn_file_explorer); btnTest.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { TestActivity.launch(MainActivity.this); } }); btnFileExplorer.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { FileExplorerActivity.launch(MainActivity.this); } }); } }
59455ced-1028-4ec5-a3b6-984b403b71d8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-27 02:24:54", "repo_name": "peterso05168/hku", "sub_path": "/hku-admin/src/main/java/com/accentrix/hku/web/common/RefCdBean.java", "file_name": "RefCdBean.java", "file_ext": "java", "file_size_in_byte": 1219, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "fcdfc914d2e25e7a78927bcb6b712686bccb6c8c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/peterso05168/hku
276
FILENAME: RefCdBean.java
0.264358
package com.accentrix.hku.web.common; import java.io.Serializable; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Configurable; import com.accentrix.hku.service.general.RefCdService; import com.accentrix.hku.vo.general.RefCdVo; /** * @author 作者lance.mao * @Email lance.mao@accentrix.com * @date 创建时间:2018年2月9日 下午5:41:33 */ @ManagedBean @ViewScoped @Configurable(preConstruction = true) public class RefCdBean implements Serializable { private static final long serialVersionUID = 1L; private static final Logger LOG = LoggerFactory.getLogger(RefCdBean.class); @Autowired private RefCdService refCdService; public RefCdBean() { LOG.info("init..."); } public String findRefCdValueByTypeAndCode(String type, String code) { if (StringUtils.isNotBlank(code)) { RefCdVo vo = refCdService.getByTypeAndCd(type, code); return vo.getValue(); } return ""; } }
4a27b89a-be54-4f83-a0b0-e1e20c5ce8e3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-18 15:44:47", "repo_name": "BoopathyRaja/PhoneNumberUtil", "sub_path": "/phonenumberutil/src/main/java/com/br/phonenumberutil/data/EmailType.java", "file_name": "EmailType.java", "file_ext": "java", "file_size_in_byte": 981, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "4202d0577cbc59c372fb7cf8ceb245a47b231bae", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/BoopathyRaja/PhoneNumberUtil
205
FILENAME: EmailType.java
0.287768
package com.br.phonenumberutil.data; import com.br.commonutils.validator.Validator; import java.util.HashMap; import java.util.Map; public enum EmailType { GMAIL("@gmail.com"), YAHOO("@yahoo.com"), HOTMAIL("@hotmail.com"), OUTLOOK("@outlook.com"), LIVE("@live.com"), OTHERS(""); private static final Map<String, EmailType> VALUES = new HashMap<>(); private String emailType; EmailType(String emailType) { this.emailType = emailType; } public static EmailType to(String emailAddress) { EmailType retVal = null; if (Validator.isValid(emailAddress)) { String domain = emailAddress.substring(emailAddress.indexOf("@")); EmailType result = VALUES.get(domain); retVal = Validator.isValid(result) ? result : EmailType.OTHERS; } return retVal; } static { for (EmailType type : values()) VALUES.put(type.emailType, type); } }
1b87ac5f-59b7-4e85-8fa0-3f8f2364bae7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-06 12:16:58", "repo_name": "paulsterpu/assignment5", "sub_path": "/src/EventGenerator.java", "file_name": "EventGenerator.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "567da56a6971d63d8b7375d678b067e402cbf0ef", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/paulsterpu/assignment5
228
FILENAME: EventGenerator.java
0.285372
import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.concurrent.ThreadPoolExecutor; public class EventGenerator extends Thread{ int i; String file; public EventGenerator(int i , String file) { this.i= i; this.file = file; } synchronized public void run(){ BufferedReader buffer = null; try { String line; String[] tokens; buffer = new BufferedReader(new FileReader(file)); while ((line = buffer.readLine()) != null) { tokens = line.split(","); try { wait(Integer.parseInt(tokens[0])); } catch (NumberFormatException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } Main.executor.execute(((new Event(tokens[1],Integer.parseInt(tokens[2]))))); } } catch (IOException e) { e.printStackTrace(); } finally { try { if (buffer != null)buffer.close(); } catch (IOException ex) { ex.printStackTrace(); } } } }
20a1897f-d678-46bd-881f-b9b5b8e610f6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-12 01:00:39", "repo_name": "irwanafandi24/foodrient", "sub_path": "/app/src/main/java/com/example/miafandi/foody/Bahan/DetailResepActivity.java", "file_name": "DetailResepActivity.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "602fa006929bff9b9c2b1f43369f08800861f3f4", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/irwanafandi24/foodrient
212
FILENAME: DetailResepActivity.java
0.213377
package com.example.miafandi.foody.Bahan; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.ImageView; import android.widget.TextView; import com.example.miafandi.foody.R; public class DetailResepActivity extends AppCompatActivity { private ImageView imageView; private TextView txtbahan, txtJudul, txtLankgah; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_detail_resep); imageView = (ImageView) findViewById(R.id.imageDetail); txtbahan = (TextView) findViewById(R.id.txtBahanan); txtJudul = (TextView) findViewById(R.id.txtJudulResep); Intent i = getIntent(); txtJudul.setText(i.getStringExtra("Judul")); txtbahan.setText(i.getStringExtra("detailResep")); // imageView.setImageResource(Integer.parseInt(i.getStringExtra("image"))); imageView.setImageResource(i.getIntExtra("image",R.drawable.grid6)); } }
6e930d0e-75db-43f7-aba4-7a995e0fd015
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-15 00:56:06", "repo_name": "HackerTheWorld/flink_read_kafka", "sub_path": "/src/main/java/flinksummary/vo/KeyVo.java", "file_name": "KeyVo.java", "file_ext": "java", "file_size_in_byte": 996, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "8636329668c45930ab50150b6128bda60cfb9348", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/HackerTheWorld/flink_read_kafka
249
FILENAME: KeyVo.java
0.259826
package flinksummary.vo; public class KeyVo { public String jsonId; public String mouldNoSys; public String getJsonId() { return jsonId; } public void setJsonId(String jsonId) { this.jsonId = jsonId; } public String getMouldNoSys() { return mouldNoSys; } public void setMouldNoSys(String mouldNoSys) { this.mouldNoSys = mouldNoSys; } /** * 将自定义类作为keby需要重定义hashcode和equals */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((mouldNoSys == null) ? 0 : mouldNoSys.hashCode()); return result; } @Override public boolean equals(Object obj) { KeyVo other = null; if(obj instanceof KeyVo){ other = (KeyVo) obj; }else{ return false; } return other.getMouldNoSys().equals(mouldNoSys); } }
5088c4f9-4ec7-4ac8-9c3b-4974f7a46b4e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-13 01:03:38", "repo_name": "gobiiproject/GOBii-System", "sub_path": "/gobiiproject/gobii-model/src/main/java/org/gobiiproject/gobiimodel/headerlesscontainer/LoaderInstructionFilesDTO.java", "file_name": "LoaderInstructionFilesDTO.java", "file_ext": "java", "file_size_in_byte": 1073, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "d9858c358f7b0e1abfd2cf5fd0e3534647b0568c", "star_events_count": 4, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/gobiiproject/GOBii-System
266
FILENAME: LoaderInstructionFilesDTO.java
0.264358
package org.gobiiproject.gobiimodel.headerlesscontainer; import org.gobiiproject.gobiimodel.tobemovedtoapimodel.Header; import org.gobiiproject.gobiimodel.dto.instructions.loader.GobiiLoaderInstruction; import org.gobiiproject.gobiimodel.types.GobiiProcessType; import java.util.ArrayList; import java.util.List; /** * Created by Phil on 4/8/2016. */ public class LoaderInstructionFilesDTO extends DTOBase { private List<GobiiLoaderInstruction> gobiiLoaderInstructions = new ArrayList<>(); private String instructionFileName = null; @Override public Integer getId() { return 1; } @Override public void setId(Integer id) { ; } public List<GobiiLoaderInstruction> getGobiiLoaderInstructions() { return gobiiLoaderInstructions; } public void setGobiiLoaderInstructions(List<GobiiLoaderInstruction> gobiiLoaderInstructions) { this.gobiiLoaderInstructions = gobiiLoaderInstructions; } public String getInstructionFileName() { return instructionFileName; } public void setInstructionFileName(String instructionFileName) { this.instructionFileName = instructionFileName; } }
27987f14-280d-4f38-afeb-a4efb7bd7cca
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2014-09-09T22:30:47", "repo_name": "empiredata/empire-ruby-client", "sub_path": "/CHANGELOG.md", "file_name": "CHANGELOG.md", "file_ext": "md", "file_size_in_byte": 973, "line_count": 49, "lang": "en", "doc_type": "text", "blob_id": "a21b82d361df50139ce22dba7f29997cef61b47c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/empiredata/empire-ruby-client
267
FILENAME: CHANGELOG.md
0.239349
## 0.3.4 Breaking changes: - Renamed `empire-client.gemspec` to `empire.gemspec`. ## 0.3.3 Breaking changes: - RubyGem package is now called `empire`. ## 0.3.2 Fixes: - Fixed `connect` when secrets are provided via YAML - Correctly demonstrating materialized views in `walkthrough` ## 0.3.1 Breaking changes: - RubyGem package is now called `empire-client`. The module is still called `empire`. - `end_user` optional parameter renamed to `enduser`. Improvements: - More detailed error handling ## 0.3 Initial port from Python client. Features: - `connect` - `describe` - `query` - `insert` - `walkthrough` - `materialize_view`, `drop_view`, and `view_ready?` - Optional string parameter `enduser`, when creating an Empire instance. This parameter is mandatory for performing materialized view operations. - `empire.view_materialized_at("viewname")` returns a `Date` object with the time the view was last materialized.
e699b707-6eb8-465a-8d44-fe826557bdca
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2015-03-13T05:27:34", "repo_name": "sunteya/jekyll-quickstart", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 979, "line_count": 33, "lang": "en", "doc_type": "text", "blob_id": "0313a51ec8e0204873988d804e354e5b7edb3444", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sunteya/jekyll-quickstart
260
FILENAME: README.md
0.278257
# Jekyll::Quickstart [![Build Status](https://travis-ci.org/sunteya/jekyll-quickstart.svg?branch=master)](https://travis-ci.org/sunteya/jekyll-quickstart) integrate jekyll-assets, compass, bower_rails and some useful helper to jekyll project. ## Installation Add this line to your application's Gemfile: gem 'jekyll-quickstart' ## Usage 1. Add the following content to the jekyll `_plugins` directory, name `_quickstart.rb` ~~~~ruby Bundler.require Jekyll::Quickstart.boot ~~~~ 2. If you want to use ruby style config file, you need to add `_config.extra.rb` to the root directory. it must return a *Hash* object. 3. For more details, see the spec directory ## Contributing 1. Fork it ( https://github.com/sunteya/jekyll-quickstart/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request
32d632e5-53bb-4a08-9fad-e04492b03f41
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-07-10 17:34:32", "repo_name": "mahieddine-ichir/spring.io", "sub_path": "/file-upload/src/main/java/com/michir/projects/springresttemplate/UploadBackendService.java", "file_name": "UploadBackendService.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "cb405366f1ae3ec7ed97d50311b21286b90f226a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mahieddine-ichir/spring.io
214
FILENAME: UploadBackendService.java
0.240775
package com.michir.projects.springresttemplate; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import org.apache.tomcat.util.http.fileupload.util.Streams; import org.slf4j.Logger; import org.springframework.stereotype.Service; @Service public class UploadBackendService { @Log private Logger logger; public byte[] doSomthing(InputStream is, String name) { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); Streams.copy(is, bos, true); return bos.toByteArray(); } catch (IOException e) { logger.error("Error processing data "+name, e); throw new RuntimeException(e); } } public byte[] content(InputStream is, String name) { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); Streams.copy(is, bos, true); return bos.toByteArray(); } catch (IOException e) { logger.error("Error processing data "+name, e); throw new RuntimeException(e); } } }
8f246278-82c8-4ae0-b52b-55d0753100d8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-07-29T16:08:06", "repo_name": "keymanapp/lexical-models", "sub_path": "/release/nrc/nrc.str.sencoten/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1079, "line_count": 33, "lang": "en", "doc_type": "text", "blob_id": "492d447aa1f402db89bd713b673481fe044451ab", "star_events_count": 10, "fork_events_count": 36, "src_encoding": "UTF-8"}
https://github.com/keymanapp/lexical-models
308
FILENAME: README.md
0.201813
SENĆOŦEN Lexical Model ---------------------- This is a simple predictive text model for SENĆOŦEN, or the Saanich dialect (BCP47: str-Latn). Credits ------- The word list was compiled by Dr. Timothy Montler (<montler@unt.edu>). Find more here: > 2018\. Montler, Timothy. SENĆOŦEN: A Dictionary of the Saanich Language. Seattle: University of Washington Press > > 2015\. Montler, Timothy. SENĆOŦEN Classified Word List. > <http://saanich.montler.net/WordList/index.htm> Data provided under permission by the [W̱SÁNEĆ School Board][WSANEC] This model is maintained by Eddie Antonio Santos ([@eddieantonio][]) of the [National Research Council Canada (NRC)][NRC]. [WSANEC]: https://wsanecschoolboard.ca/administration/wsb-policies/au-welew-tribal-school [@eddieantonio]: https://github.com/eddieantonio [NRC]: https://nrc.canada.ca/en/node/1378 Extending from sources ---------------------- If you have access to the original sources (`SaanichWordFreq.txt`) as provided by Dr. Montler, the word list can be updated using the scripts and Makefile in `./extras/`.
33830c96-463e-42ab-aaeb-286c31095255
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-04 12:10:38", "repo_name": "along101/contract-center", "sub_path": "/contract-backend/src/main/java/com/along101/contract/entity/BaseEntity.java", "file_name": "BaseEntity.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "1636520d1bb52850b5adb80704646b18d93157ba", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/along101/contract-center
252
FILENAME: BaseEntity.java
0.262842
package com.along101.contract.entity; import lombok.Data; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistence.*; import java.io.Serializable; import java.util.Date; @Data @EntityListeners(AuditingEntityListener.class) @MappedSuperclass public class BaseEntity implements Serializable { @Temporal(TemporalType.TIMESTAMP) @Column(name = "insert_time", insertable = false, updatable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") protected Date insertTime; @Temporal(TemporalType.TIMESTAMP) @Column(name = "update_time", insertable = false, updatable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") protected Date updateTime; @CreatedBy @Column(name = "insert_by", length = 45) protected String insertBy; @LastModifiedBy @Column(name = "update_by", length = 45) protected String updateBy; @Column(name = "is_active", nullable = false, columnDefinition = "TINYINT(1)") protected boolean isActive = true; }
1c84eeb7-9edc-4b89-b6b8-2a23fbe27c0f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-03-21 12:55:37", "repo_name": "lany192/BlurDialog", "sub_path": "/app/src/main/java/com/github/lany192/blurdialog/sample/SampleBottomDialogFragment.java", "file_name": "SampleBottomDialogFragment.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "87cf1c43f70708a3cef42c2ab9f8847752fb0681", "star_events_count": 24, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/lany192/BlurDialog
245
FILENAME: SampleBottomDialogFragment.java
0.27048
package com.github.lany192.blurdialog.sample; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; import com.github.lany192.blurdialog.BlurBottomDialogFragment; public class SampleBottomDialogFragment extends BlurBottomDialogFragment { public static SampleBottomDialogFragment newInstance() { return new SampleBottomDialogFragment(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE); getDialog().setCancelable(true); getDialog().setCanceledOnTouchOutside(true); View view = inflater.inflate(R.layout.bottom_dialog_layout, container, false); return view; } @Override protected boolean isDimmingEnable() { return true; } @Override protected boolean isActionBarBlurred() { return true; } // // @Override // protected float getDownScaleFactor() { // return 8; // } // // @Override // protected int getBlurRadius() { // return 2; // } }
65f529ee-6a7e-45dd-8679-7cb817a66d7c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-02 03:20:25", "repo_name": "2660075057/supermarket", "sub_path": "/src/main/java/com/grape/supermarket/common/interceptor/InitSystem.java", "file_name": "InitSystem.java", "file_ext": "java", "file_size_in_byte": 1115, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "e0cf9e634e5d6a5ca3265faf4df4ad5b6791daaf", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/2660075057/supermarket
228
FILENAME: InitSystem.java
0.224055
package com.grape.supermarket.common.interceptor; import com.grape.supermarket.common.util.PropertiesLoader; import com.grape.supermarket.wechat.service.WechatService; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.web.context.ServletContextAware; import javax.servlet.ServletContext; /** * 启动服务的时候调用的方法 * * <p> * 2016年3月22日 下午5:32:10 * * @author hjc * */ public class InitSystem implements InitializingBean, ServletContextAware { @Autowired private WechatService wechatService; @Autowired @Qualifier("wechatProperties") private PropertiesLoader pl; @Override public void afterPropertiesSet() throws Exception { boolean pushMenu = pl.getBoolean("pushMenu",false); if(pushMenu) { wechatService.setWechatMenu(); } } @Override public void setServletContext(ServletContext servletContext) { } }
31ccacd1-77f6-45ac-8a33-a4137e3e1bb9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-07-19 16:55:51", "repo_name": "sahilaggarwal67/cdr", "sub_path": "/src/main/java/com/transform/cdr/model/Type2ShipModel.java", "file_name": "Type2ShipModel.java", "file_ext": "java", "file_size_in_byte": 1023, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "e190d3aa55d923a386a05b3de0037dc9b06afe44", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sahilaggarwal67/cdr
254
FILENAME: Type2ShipModel.java
0.275909
package com.transform.cdr.model; import java.io.Serializable; import java.util.List; public class Type2ShipModel implements Serializable { private Ship ship; /*private double voiceRebate; private double dataRebate;*/ private List<ManualFields> manualFields; public Type2ShipModel() { super(); } public Type2ShipModel(Ship ship, List<ManualFields> manualFields) { super(); this.ship = ship; this.manualFields = manualFields; } public Ship getShip() { return ship; } public void setShip(Ship ship) { this.ship = ship; } public List<ManualFields> getManualFields() { return manualFields; } public void setManualFields(List<ManualFields> manualFields) { this.manualFields = manualFields; } /*public double getVoiceRebate() { return voiceRebate; } public void setVoiceRebate(double voiceRebate) { this.voiceRebate = voiceRebate; } public double getDataRebate() { return dataRebate; } public void setDataRebate(double dataRebate) { this.dataRebate = dataRebate; }*/ }
3c8a1068-c2b6-400b-9ba2-09b56d4585e9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-05-11 13:20:28", "repo_name": "OndrejPittl/BillsTracker", "sub_path": "/app/src/main/java/cz/ondrejpittl/semestralka/layout/CustomImageButton.java", "file_name": "CustomImageButton.java", "file_ext": "java", "file_size_in_byte": 976, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "182f10b9a7d4a868102ff5161a18017e2aef0b4d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/OndrejPittl/BillsTracker
204
FILENAME: CustomImageButton.java
0.23092
package cz.ondrejpittl.semestralka.layout; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.widget.ImageButton; /** * Created by OndrejPittl on 29.04.16. */ public class CustomImageButton extends ImageButton { /** * A flag indicating whether was a button clicked or not. */ private boolean clicked; /** * A constructor. Basics initialization. * @param context an activity context reference */ public CustomImageButton(Context context) { super(context); this.init(); } /** * A constructor. Basics initialization. * @param context an activity context reference * @param attrs attributes */ public CustomImageButton(Context context, AttributeSet attrs) { super(context, attrs); this.init(); } /** * Initialization. */ private void init(){ this.clicked = false; } }
e985188b-3d01-4fda-8054-c5c16271a344
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-05 04:07:55", "repo_name": "albertoruvel/shakepoint-rest-api", "sub_path": "/src/main/java/com/shakepoint/web/api/data/entity/PromoCodeRedeem.java", "file_name": "PromoCodeRedeem.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 60, "lang": "en", "doc_type": "code", "blob_id": "96542b45a5b277f336c3956c351e582d234eb971", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/albertoruvel/shakepoint-rest-api
277
FILENAME: PromoCodeRedeem.java
0.26588
package com.shakepoint.web.api.data.entity; import javax.persistence.*; import java.util.UUID; @Entity(name = "PromoRedeem") @Table(name = "promocode_user") public class PromoCodeRedeem { @Id private String id; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "promocode_id") private PromoCode promoCode; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "user_id") private User user; @Column(name = "redemption_date") private String redemptionDate; public PromoCodeRedeem() { this.id = UUID.randomUUID().toString(); } public String getId() { return id; } public void setId(String id) { this.id = id; } public PromoCode getPromoCode() { return promoCode; } public void setPromoCode(PromoCode promoCode) { this.promoCode = promoCode; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public String getRedemptionDate() { return redemptionDate; } public void setRedemptionDate(String redemptionDate) { this.redemptionDate = redemptionDate; } }
be9a6041-4bcd-4b02-ae27-b6ddd14fcd51
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-10 04:23:25", "repo_name": "EasySocHacks/ITMO-Web-Homeworks", "sub_path": "/lab5/A+B+C+D+E+F+G+H/src/main/java/ru/itmo/wp/model/service/TalkService.java", "file_name": "TalkService.java", "file_ext": "java", "file_size_in_byte": 969, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "109c66f686cfbce50123faed14e62d09a853d6d6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/EasySocHacks/ITMO-Web-Homeworks
198
FILENAME: TalkService.java
0.279042
package ru.itmo.wp.model.service; import com.google.common.base.Strings; import ru.itmo.wp.model.domain.Talk; import ru.itmo.wp.model.exception.ValidationException; import ru.itmo.wp.model.repository.TalkRepository; import ru.itmo.wp.model.repository.impl.TalkRepositoryImpl; import java.util.List; public class TalkService { private final TalkRepository talkRepository = new TalkRepositoryImpl(); public void validateMessage(String text) throws ValidationException { if (Strings.isNullOrEmpty(text)) { throw new ValidationException("Text field mustn't be empty"); } if (text.length() > Talk.MAX_TEXT_LENGTH) { throw new ValidationException("Text length must be not greater than " + Talk.MAX_TEXT_LENGTH + " characters"); } } public void save(Talk talk) { talkRepository.save(talk); } public List<Talk> findAll(long id) { return talkRepository.findAll(id); } }
b421eb8d-bffd-4d82-8be8-34ef2f8b64ab
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-05-01 00:49:22", "repo_name": "albertoruvel/pull-up", "sub_path": "/src/main/java/com/pullup/app/resource/EnterpriseResource.java", "file_name": "EnterpriseResource.java", "file_ext": "java", "file_size_in_byte": 1193, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "b5b3c5a31076295c883df19cd07d08759bd7bfc7", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/albertoruvel/pull-up
248
FILENAME: EnterpriseResource.java
0.285372
/* * 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 com.pullup.app.resource; import com.pullup.app.delegate.EnterpriseDelegate; import com.pullup.app.dto.request.CreateEnterpriseRequest; import com.pullup.app.dto.request.CreatePullupPlanRequest; import javax.inject.Inject; import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Response; /** * * @author MACARENA */ @Path("enterprise") public class EnterpriseResource { @Inject private EnterpriseDelegate delegate; @Path("registerEnterprise") @POST @Consumes("application/json") @Produces("application/json") public Response registerEnterprise(CreateEnterpriseRequest request){ return delegate.registerEnterprise(request); } @Path("registerPlan") @POST @Consumes("application/json") @Produces("application/json") public Response createPullupPlan(CreatePullupPlanRequest request){ return delegate.registerPullupPlan(request); } }
25b6f753-f7e6-472b-8986-6bba4f21c975
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-03 13:05:07", "repo_name": "fxzzq/AIRUI", "sub_path": "/GroupManage/src/main/java/glory/util/ResponseJson.java", "file_name": "ResponseJson.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "7d462727ec22adb31efcee2000fdb9ecd15b95e7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/fxzzq/AIRUI
212
FILENAME: ResponseJson.java
0.214691
package glory.util; import org.codehaus.jackson.map.ObjectMapper; import java.io.IOException; /** * Created by Monster on 2017/11/18. */ public class ResponseJson { private int code; private Object data; private String msg; public int getCode() { return code; } public ResponseJson(int code, Object data, String msg) { this.code = code; this.msg = msg; ObjectMapper mapper = new ObjectMapper(); try { this.data= mapper.writeValueAsString(data); } catch (IOException e) { this.data="Json转换失败"; e.printStackTrace(); } } public void setCode(int code) { this.code = code; } public Object getData() { return data; } public void setData(Object data) { this.data = data; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } }
e06f84de-6fd7-40fe-b6df-708b436fb549
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-10 00:34:43", "repo_name": "fast1997/Waste-Your-time", "sub_path": "/app/src/main/java/com/sp18/ssu370/WasteYourTime/model/Album.java", "file_name": "Album.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "1b6df1f94f70796510692d86319817f042638380", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/fast1997/Waste-Your-time
200
FILENAME: Album.java
0.226784
package com.sp18.ssu370.WasteYourTime.model; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.SerializedName; public class Album implements Parcelable { @SerializedName("data") private Memes singleData; @SuppressWarnings("unchecked") private Album(Parcel in) { singleData = in.readParcelable(Memes.class.getClassLoader()); } public Memes getSingleData() { return singleData; } @Override public int describeContents() { return 0; } public static final Parcelable.Creator<Album> CREATOR = new Parcelable.Creator<Album>() { public Album createFromParcel(Parcel in) { return new Album(in); } public Album[] newArray(int size) { return new Album[size]; } }; @Override public void writeToParcel(Parcel dest, int flags) { dest.writeParcelable(singleData,flags); } }
cd773bbf-5845-4224-b1c8-4e545dc9c8ce
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-31 23:41:21", "repo_name": "Gatimelo/PJS4-2", "sub_path": "/src/main/java/com/example/PJS4_2/DetailDemandeServlet.java", "file_name": "DetailDemandeServlet.java", "file_ext": "java", "file_size_in_byte": 979, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "fdef1fb8b2b44721d600c9a9fa194943d68858d7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Gatimelo/PJS4-2
172
FILENAME: DetailDemandeServlet.java
0.249447
package com.example.PJS4_2; import lib.Article; import lib.Mission; import persistant.Data; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.annotation.*; import java.io.IOException; @WebServlet(name = "DetailDemandeServlet", value = "/mission/*") public class DetailDemandeServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.getServletContext().getRequestDispatcher("/WEB-INF/mission.jsp").forward(request,response); response.setContentType("text/html"); String missionId = request.getPathInfo(); int id = Integer.parseInt(missionId); Mission mission = Data.getInstance().getMission(id); request.setAttribute("mission", mission); } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } }
024e2079-102e-4ffb-8b5a-1e2fdf2869b9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-13 19:04:20", "repo_name": "kphillisjr/MaterialButtonDrawableBug", "sub_path": "/app/src/main/java/com/example/Main2Activity.java", "file_name": "Main2Activity.java", "file_ext": "java", "file_size_in_byte": 968, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "5238fb213e96b43ad52517f3babefca16e2ceae3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kphillisjr/MaterialButtonDrawableBug
155
FILENAME: Main2Activity.java
0.213377
package com.example; import android.content.Intent; import android.os.Bundle; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.snackbar.Snackbar; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import android.view.View; import android.widget.Button; public class Main2Activity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main2); ActionBar myBar = getSupportActionBar(); if(myBar!=null) { myBar.setSubtitle("Vector Drawable on material Buttons"); } Button switchView = findViewById(R.id.ChangeActivity); switchView.setOnClickListener((view) -> { finish(); }); } }
8a66d7f4-adc8-4990-879f-c27ecbe72613
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-09-15T16:59:10", "repo_name": "nzukie-b/snarl", "sub_path": "/A4/inbox/traveller-integration-report.md", "file_name": "traveller-integration-report.md", "file_ext": "md", "file_size_in_byte": 1194, "line_count": 21, "lang": "en", "doc_type": "text", "blob_id": "63013617528097d3d57ac4be6aede9e4f2a0027d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nzukie-b/snarl
241
FILENAME: traveller-integration-report.md
0.256832
Memorandum - DATE: February 4th, 2021 TO: Manager FROM: Brandon Nzukie, Blake Hatch SUBJECT: "Traveller Server Specification Implementation" 1. The other team implemented our specification almost fully truthfully, with the exception of some minor differences in what the functions take in. However, I think given that they preserved the same functions and kept the data structure design identical, that the minor differences do not detract from how precisely they followed our specification. 2. As the data and function design are practically identical between our specification and their implementation, it would be extremely easy to integrate with our client module. The main work would be changing from a class structure in our client to a functional one where the graph is accessible by our client either through storing it there or exporting from the received file. 3. If our specification implied a class structure instead of functional and the team implemented as truthfully as they did with our current specification, we could have plugged it into our client with almost no effort, it would just entail changing one or two inputs that the interface methods expected.
982576a4-c4b6-4012-84f5-72a5afe8e850
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-08-09 09:10:40", "repo_name": "lindsey2015/bx", "sub_path": "/src/main/java/cn/edu/xmut/modules/catagory/bean/Catagory.java", "file_name": "Catagory.java", "file_ext": "java", "file_size_in_byte": 1020, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "04c1fb9ced63edfc470c62a577316c35e4651ebc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lindsey2015/bx
242
FILENAME: Catagory.java
0.273574
package cn.edu.xmut.modules.catagory.bean; import javax.persistence.Entity; import javax.persistence.Table; import javax.validation.constraints.Size; import org.hibernate.validator.constraints.NotEmpty; import cn.edu.xmut.core.entity.IdEntity; @Entity @Table(name="tb_catagory") public class Catagory extends IdEntity{ // 自动生成区域开始 public static enum FieldOfCatagory { ID, NAME, NAME_E, USEFUL, } // 自动生成区域结束 private static final long serialVersionUID = 1L; @NotEmpty @Size(max =25) private String name; @NotEmpty @Size(max =25) private String nameE; private boolean useful; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getNameE() { return nameE; } public void setNameE(String nameE) { this.nameE = nameE; } public boolean isUseful() { return useful; } public void setUseful(boolean useful) { this.useful = useful; } }
41a4f7df-3c49-4474-af3b-bef0ceb70045
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-15 12:24:46", "repo_name": "avshabavsha/rabbitmqplainjava", "sub_path": "/src/main/java/com/rabbitmq/tutorial/Publisher.java", "file_name": "Publisher.java", "file_ext": "java", "file_size_in_byte": 968, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "927fb531b8e95a6f78d47425be0280c2fcb85015", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/avshabavsha/rabbitmqplainjava
181
FILENAME: Publisher.java
0.235108
package com.rabbitmq.tutorial; import com.rabbitmq.client.Channel; import java.io.IOException; import java.net.URISyntaxException; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.util.concurrent.TimeoutException; import static com.rabbitmq.tutorial.ExampleConstants.QUEUE_NAME; public class Publisher { public static void main(String[] args) throws NoSuchAlgorithmException, KeyManagementException, URISyntaxException, IOException, TimeoutException, InterruptedException { Channel channel = RabbitHelper.initRabbitMqClient(); int count = 0; System.out.println("Producer starts"); while(count < 5000){ String message = "Message number " + count; channel.basicPublish("", QUEUE_NAME, null, message.getBytes()); count++; System.out.println("Published message: " + message); Thread.sleep(5000); } } }
fdb5b847-f9a5-43e1-b55a-49adb201d0ba
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-07 08:59:19", "repo_name": "cgq1314520/how2l_blog", "sub_path": "/src/main/java/top/how2l/servlet/person/personShowServlet.java", "file_name": "personShowServlet.java", "file_ext": "java", "file_size_in_byte": 1233, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "54ea6906f00aad210bbe9825dca2acb27c41c285", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cgq1314520/how2l_blog
225
FILENAME: personShowServlet.java
0.250913
package top.how2l.servlet.person; import top.how2l.pojo.user; import top.how2l.service.person.personInfoShowService.personInfoSearchService; import top.how2l.service.person.personInfoShowService.personShowServiceImpl; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * 个人中心的信息展示界面跳转以及信息的得到 */ public class personShowServlet extends HttpServlet { @Override protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { /*得到用户的id*/ Long userid = Long.valueOf(req.getParameter("userid")); /*通过用户的id进行查询用户的主体信息,包括用户的个人信息详细版,其他部分都通过异步请求进行得到*/ personInfoSearchService personInfoSearchService = new personShowServiceImpl(); user userDetailInfo = personInfoSearchService.getUserDetailInfo(userid); req.setAttribute("userDetailInfo", userDetailInfo); req.getRequestDispatcher("person/personInfo.jsp").forward(req, resp); } }
d8a14daa-0746-49d8-b1ed-518fb8be6430
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-12T21:00:09", "repo_name": "MrBurnsa/axon-algorithms", "sub_path": "/src/main/java/axon/data/collections/queue/DoubleStackQueue.java", "file_name": "DoubleStackQueue.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "913db5f3db3cb14f41a5f07c8ae766e3b545be73", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MrBurnsa/axon-algorithms
206
FILENAME: DoubleStackQueue.java
0.295027
package axon.data.collections.queue; import java.util.ArrayDeque; import java.util.Deque; public final class DoubleStackQueue<T> implements Queue<T> { private Deque<T> inbound = new ArrayDeque<>(); private Deque<T> outbound = new ArrayDeque<>(); public void push(T value) { inbound.push(value); } @Override public T pop() { if (!outbound.isEmpty()) { return outbound.pop(); } if (inbound.isEmpty()) return null; reload(); return pop(); } @Override public T peek() { if (!outbound.isEmpty()) { return outbound.peek(); } if (inbound.isEmpty()) return null; reload(); return peek(); } private void reload() { while (!inbound.isEmpty()) { outbound.push(inbound.pop()); } } @Override public boolean isEmpty() { return outbound.isEmpty() && inbound.isEmpty(); } }
b094b7b5-baf6-4f6f-a84e-f5a4673ecb94
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-06 20:23:30", "repo_name": "Plotnikov-AS/lab9", "sub_path": "/src/main/java/ru/pis/lab9/dao/EmployeeDao.java", "file_name": "EmployeeDao.java", "file_ext": "java", "file_size_in_byte": 1069, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "f8743976c1ea8259d8b7ba456095d81b5471981e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Plotnikov-AS/lab9
184
FILENAME: EmployeeDao.java
0.27513
package ru.pis.lab9.dao; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; import ru.pis.lab9.model.Employee; import ru.pis.lab9.repo.EmployeeRepo; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.transaction.Transactional; import java.util.List; import static java.util.Objects.isNull; @Repository @Transactional @RequiredArgsConstructor public class EmployeeDao { private final EmployeeRepo employeeRepo; @PersistenceContext private final EntityManager entityManager; public List<Employee> getAllEmployees() { return employeeRepo.getAllEmployees(); } public Employee getById(Long id) { if (isNull(id)) { throw new IllegalArgumentException("Empty id"); } return employeeRepo.getById(id); } public void updateEmployee(Employee employee) { if (isNull(employee)) { throw new IllegalArgumentException("Empty employee"); } entityManager.persist(employee); } }
a23ba66f-154c-46c0-ab9b-3d1bd4e27073
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-06 08:05:19", "repo_name": "davidsowerby/krail-tutorial", "sub_path": "/src/main/java/com/example/tutorial/pages/ContactDetailView.java", "file_name": "ContactDetailView.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "2f7a6bb1146329549a2b80d63f15f554bfa852a4", "star_events_count": 1, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/davidsowerby/krail-tutorial
250
FILENAME: ContactDetailView.java
0.264358
package com.example.tutorial.pages; import com.google.inject.Inject; import com.vaadin.ui.FormLayout; import com.vaadin.ui.Label; import uk.q3c.krail.core.i18n.Translate; import uk.q3c.krail.core.view.Grid3x3ViewBase; import uk.q3c.krail.core.view.component.AfterViewChangeBusMessage; import uk.q3c.krail.core.view.component.ViewChangeBusMessage; public class ContactDetailView extends Grid3x3ViewBase { private Label idLabel; private Label nameLabel; @Inject protected ContactDetailView(Translate translate) { super(translate); } @Override protected void doBuild(ViewChangeBusMessage busMessage) { super.doBuild(busMessage); idLabel = new Label(); idLabel.setCaption("id"); nameLabel = new Label(); nameLabel.setCaption("name"); setCentreCell(new FormLayout(idLabel, nameLabel)); } @Override protected void loadData(AfterViewChangeBusMessage busMessage) { idLabel.setValue(busMessage.getToState() .getParameterValue("id")); nameLabel.setValue(busMessage.getToState() .getParameterValue("name")); } }
dabb0cbc-67b5-4049-8b82-a2b75d78b10a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-04-26T12:06:26", "repo_name": "uncinimichel/liveshifting", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 986, "line_count": 46, "lang": "en", "doc_type": "text", "blob_id": "f9f61581a02dd8460f0b24235550c5d45c51ec09", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/uncinimichel/liveshifting
234
FILENAME: README.md
0.23231
# LiveShifting Be able to see who has triggered your Raspberry Pi's PIR motion sensors. # To Discuss * Pictures Or Videos? Think about in terms of how much space needed locally or on the cloud. Plus what it is going to be better if I am going to use a Object Detections model? * Local Storage * Pictures size and quality * Configurations * Plug and play I would like to have a solutions where I have hardware. Plug somewhere start working * How to send * Data science model Local or on the Cloud? * Notifications * live feed * PIR Sensitivity Potentiometer Vs time potentiometer * First Delivery If PIR detect something I would like to see the camera starting taking pictures (Or video). This recording should be accessible on AWS S3. ## Links * https://projects.raspberrypi.org/en/projects/parent*detector * https://gpiozero.readthedocs.io/en/stable/ * https://picamera.readthedocs.io/en/latest/install.html * https://www.raspberrypi.org/documentation/
a03aa8a9-98a0-4853-846d-13d8fb842ab5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-20 01:08:25", "repo_name": "13548899356/p2p_L", "sub_path": "/src/main/java/com/zking/ssm/util/ThreeIdentity.java", "file_name": "ThreeIdentity.java", "file_ext": "java", "file_size_in_byte": 1205, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "a682248467f178c35e65537a6652f9a3e524b812", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/13548899356/p2p_L
245
FILENAME: ThreeIdentity.java
0.282196
package com.zking.ssm.util; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import java.io.IOException; import java.util.Iterator; import java.util.Map; public class ThreeIdentity { public static Object get(String appCode, String url, Map<String, String> params) throws IOException { url = url + buildRequestUrl(params); OkHttpClient client = new OkHttpClient.Builder().build(); Request request = new Request.Builder().url(url).addHeader("Authorization", "APPCODE " + appCode).build(); Response response = client.newCall(request).execute(); System.out.println("返回状态码" + response.code() + ",message:" + response.message()); String result = response.body().toString(); return response.code(); } public static String buildRequestUrl(Map<String, String> params) { StringBuilder url = new StringBuilder("?"); Iterator<String> it = params.keySet().iterator(); while (it.hasNext()) { String key = it.next(); url.append(key).append("=").append(params.get(key)).append("&"); } return url.toString().substring(0, url.length() - 1); } }
de9f59c4-2aa6-4040-a714-94375f25087b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-21 12:42:21", "repo_name": "LewisWatson/demo-spring-data-couchbase-app", "sub_path": "/src/main/java/com/example/demospringdatacouchbaseapp/model/Car.java", "file_name": "Car.java", "file_ext": "java", "file_size_in_byte": 1078, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "b8957d42be3e61d5cc3b26f481a53d0358a83dbb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/LewisWatson/demo-spring-data-couchbase-app
227
FILENAME: Car.java
0.225417
package com.example.demospringdatacouchbaseapp.model; import static org.springframework.data.couchbase.core.mapping.id.GenerationStrategy.USE_ATTRIBUTES; import org.springframework.data.couchbase.core.mapping.Document; import org.springframework.data.couchbase.core.mapping.id.GeneratedValue; import org.springframework.data.couchbase.core.mapping.id.IdAttribute; import com.couchbase.client.java.repository.annotation.Field; import com.couchbase.client.java.repository.annotation.Id; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.Value; import lombok.experimental.Wither; @Data @AllArgsConstructor @Builder(toBuilder=true) @Document public class Car { public static final String ID_DELIMITER = "::"; @Id @GeneratedValue(strategy = USE_ATTRIBUTES, delimiter = ID_DELIMITER) @Wither private String id; @Field @IdAttribute(order=0) private String manufacturer; @Field @IdAttribute(order=1) private String model; @Field @IdAttribute(order=2) private String spec; @Field private String colour; }
18478618-38b2-447a-812f-3cc7bc2c5d74
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-30 13:57:37", "repo_name": "chelsea710/teach", "sub_path": "/xc-service-manage-cms/src/main/java/com/xuecheng/manage_cms/service/TemplateService.java", "file_name": "TemplateService.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "56c0031fb7a45e03d573d7db81a69191b0724bdb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/chelsea710/teach
231
FILENAME: TemplateService.java
0.281406
package com.xuecheng.manage_cms.service; import com.xuecheng.framework.domain.cms.CmsTemplate; import com.xuecheng.framework.model.response.CommonCode; import com.xuecheng.framework.model.response.QueryResponseResult; import com.xuecheng.framework.model.response.QueryResult; import com.xuecheng.manage_cms.dao.CmsTemplateRepository; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class TemplateService { @Autowired private CmsTemplateRepository cmsTemplateRepository; public QueryResponseResult findTemplateBySiteId(String siteId){ if(StringUtils.isNotEmpty(siteId)) { List<CmsTemplate> cmsTemplateList = cmsTemplateRepository.findCmsTemplateBySiteId(siteId); QueryResult queryResult = new QueryResult(); queryResult.setList(cmsTemplateList); queryResult.setTotal(cmsTemplateList.size()); return new QueryResponseResult(CommonCode.SUCCESS, queryResult); }else { return new QueryResponseResult(CommonCode.CHOOSESITR,null); } } }
11eccd1f-6e71-466d-9376-9aef2a2a77e3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-08-21T16:04:44", "repo_name": "preignition/program-user-guide", "sub_path": "/guidance-notes/survey-app/form-editor/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1103, "line_count": 26, "lang": "en", "doc_type": "text", "blob_id": "5d334c463735cc5158a3502443db824f0813da75", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/preignition/program-user-guide
275
FILENAME: README.md
0.177811
--- description: This section covers everything you need to know about creating, editing and publishing forms --- # Form Editor Available how-to guide for forms: * [Creating a new form](creating-a-new-form.md) * [Adding questions to a form](how-to-add-a-question-to-a-form/) * [Text based questions](how-to-add-a-question-to-a-form/text-based-questions.md) * [Choice based questions](how-to-add-a-question-to-a-form/choice-based-questions.md) * [Media based questions](how-to-add-a-question-to-a-form/media-based-questions.md) * [Introduction to free text fields](how-to-add-a-question-to-a-form/free-text-feilds.md) * [Testing a form](testing-a-form.md) * [Publishing a form](publishing-a-form.md) * [Introduction to form logic](introduction-to-form-logic.md) * [Using tooltips](using-tooltips.md) * [Introduction to markdown](introduction-to-markdown.md) * [Form behaviour](form-behaviour.md) * [Image library](image-library.md) * [Easy Read](easy-read.md) * [Sign Language](sign-language.md) * [Translate forms](translate-forms.md) * [Access rights for forms](access-rights-for-forms.md)
caff4461-b86a-486c-8076-64ab5b33f475
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-12-21T08:00:09", "repo_name": "SrinivasaRaoMakkena/DICKsSportingGoodsAndroidCodingTest", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 967, "line_count": 27, "lang": "en", "doc_type": "text", "blob_id": "e40f3c12d4c91eeeeeec5224acc8366d4e2c2c85", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/SrinivasaRaoMakkena/DICKsSportingGoodsAndroidCodingTest
277
FILENAME: README.md
0.245085
# DICKsSportingGoodsAndroidCodingTest Android Basic Application with communicationg server and by using 3rd party libraries like Butterknife for view injection, Dagger2.0 for Dependency Injection, Rx-Java and Retrofit for network communication and GSON for image loading form the server etc. Used 3rd Party Libraries --------------- 1. Butterknife 2. Retrofit 3. Dagger2.0 4. Rx-Java 5. MVP (Model-View-Presenter) 6. GSON 7. GLIDE 8. RecyclerView and CardView (Material Design) etc. Screens: ------- 1. ![List of Venue Locations](https://github.com/SrinivasaRaoMakkena/DICKsSportingGoodsAndroidCodingTest/blob/master/app/Screenshot_1513840826.png) 2. ![Venue Details](https://github.com/SrinivasaRaoMakkena/DICKsSportingGoodsAndroidCodingTest/blob/master/app/Screenshot_1513840661.png) 3. ![Website of DSG](https://github.com/SrinivasaRaoMakkena/DICKsSportingGoodsAndroidCodingTest/blob/master/app/Screenshot_1513840752.png) Thanks for giving this exercise!
7b39cb52-c75c-41f9-9165-4c77497fc56f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-15 11:09:53", "repo_name": "dbeod2/hello-spring", "sub_path": "/src/main/java/hello/hellospring/controller/MemberController.java", "file_name": "MemberController.java", "file_ext": "java", "file_size_in_byte": 1105, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "2a28f914b34ceea7e0455bb897b2b4575f2b370b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dbeod2/hello-spring
211
FILENAME: MemberController.java
0.245085
package hello.hellospring.controller; import hello.hellospring.domain.Member; import hello.hellospring.model.MemberForm; import hello.hellospring.service.MemberService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @Controller public class MemberController { private final MemberService memberService; @Autowired public MemberController(MemberService memberService) { this.memberService = memberService; } @GetMapping("/members") public String getAll(Model model) { model.addAttribute("members", memberService.getAll()); return "members/memberList"; } @GetMapping("/members/new") public String createForm() { return "members/createMemberForm"; } @PostMapping("/members/new") public String save(MemberForm memberForm) { Member member = Member.of(memberForm.getName()); memberService.join(member); return "redirect:/"; } }
972663fd-036e-4abe-9076-ff185803814b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-04 22:51:55", "repo_name": "ashryanbeats/CSDKBase", "sub_path": "/app/src/main/java/com/adobe/csdkbase/MainApplication.java", "file_name": "MainApplication.java", "file_ext": "java", "file_size_in_byte": 1079, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "68135751bd4a3eb2bd77b22ed3a82a944b874e56", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ashryanbeats/CSDKBase
232
FILENAME: MainApplication.java
0.239349
package com.adobe.csdkbase; import android.app.Application; import com.adobe.creativesdk.foundation.AdobeCSDKFoundation; import com.adobe.creativesdk.foundation.auth.IAdobeAuthClientCredentials; import com.adobe.creativesdk.foundation.internal.auth.AdobeAuthIMSEnvironment; /** * Created by ash on 12/16/15. */ public class MainApplication extends Application implements IAdobeAuthClientCredentials { /* Be sure to fill in the two strings below. */ private static final String CREATIVE_SDK_CLIENT_ID = Keys.CSDK_CLIENT_ID; private static final String CREATIVE_SDK_CLIENT_SECRET = Keys.CSDK_CLIENT_SECRET; @Override public void onCreate() { super.onCreate(); AdobeCSDKFoundation.initializeCSDKFoundation( getApplicationContext(), AdobeAuthIMSEnvironment.AdobeAuthIMSEnvironmentProductionUS ); } @Override public String getClientID() { return CREATIVE_SDK_CLIENT_ID; } @Override public String getClientSecret() { return CREATIVE_SDK_CLIENT_SECRET; } }
0e6a66eb-2902-433a-91c0-bc7495aecf05
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-22 03:35:16", "repo_name": "sayid0924/jzr", "sub_path": "/app/src/main/java/com/jzr/bedside/ui/apadter/DoctorAdviceApadter.java", "file_name": "DoctorAdviceApadter.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "060a318dfc15f2cafd32a0e82267b8caae051027", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sayid0924/jzr
265
FILENAME: DoctorAdviceApadter.java
0.293404
package com.jzr.bedside.ui.apadter; import android.content.Context; import android.graphics.Color; import android.widget.TextView; import com.jzr.bedside.R; import com.jzr.bedside.bean.BedInfoBean; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import java.util.List; public class DoctorAdviceApadter extends BaseQuickAdapter<BedInfoBean.DataBean.CareLabelListBean, BaseViewHolder> { private Context mContext; private List<BedInfoBean.DataBean.CareLabelListBean> data; public DoctorAdviceApadter(List<BedInfoBean.DataBean.CareLabelListBean> data, Context mContext) { super(R.layout.item_doctor_advice, data); this.mContext = mContext; this.data = data; } @Override protected void convert(final BaseViewHolder helper, final BedInfoBean.DataBean.CareLabelListBean item) { helper.setText(R.id.tv_carelable, item.getLabelName()); TextView tvName = helper.getView(R.id.tv_carelable); tvName.setTextColor(Color.parseColor(item.getFontColor())); helper.getView(R.id.item_doctor_advice).setBackgroundColor(Color.parseColor(item.getBgColor())); } }
b8fa79b4-cb6d-4c2b-9b51-29e124032f25
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-14 20:06:32", "repo_name": "emilwidengren/RadioInfo", "sub_path": "/src/main/java/Interface.java", "file_name": "Interface.java", "file_ext": "java", "file_size_in_byte": 967, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "d970e4ef2b72f1eb590a8cdf5e71f141b34e52e1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/emilwidengren/RadioInfo
202
FILENAME: Interface.java
0.210766
import javax.swing.*; public class Interface { private JFrame mainWindow; private JMenuBar menuBar; private JMenu menu; private JMenu menu2; private JMenuItem menuItem; public Interface(){ /* -- INITIALIZE COMPONENTS -- */ mainWindow = new JFrame(); menuBar = new JMenuBar(); menu = new JMenu("Save"); menu2 = new JMenu("File"); menuItem = new JMenuItem("Testing"); menu.add(menuItem); /* -- MANAGE COMPONENTS -- */ menuBar.add(menu); menuBar.add(menu2); mainWindow.setJMenuBar(menuBar); /* -- INITIALIZE PANELS -- */ /* -- MANAGE PANELS -- */ /* -- MANAGE FRAME -- */ mainWindow.setSize(800, 800); mainWindow.setTitle("RadioInfo v1.0"); mainWindow.setLocationRelativeTo(null); mainWindow.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); mainWindow.setVisible(true); } }
ed19463c-f9d8-485d-ac52-2630bb7fd4e7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-19 23:30:53", "repo_name": "Ranock/camaraoLocal", "sub_path": "/src/main/java/programa/model/Telefone.java", "file_name": "Telefone.java", "file_ext": "java", "file_size_in_byte": 1044, "line_count": 60, "lang": "en", "doc_type": "code", "blob_id": "71b30bcf926d75959a8c2499b22993ffbab85b6e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Ranock/camaraoLocal
297
FILENAME: Telefone.java
0.245085
package programa.model; public class Telefone { private Long id; private String ddd; private String number; private String ddi; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDdd() { return ddd; } public void setDdd(String ddd) { this.ddd = ddd; } public String getNumber() { return number; } public void setNumber(String number) { this.number = number; } public String getDdi() { return ddi; } public void setDdi(String ddi) { this.ddi = ddi; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Telefone other = (Telefone) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } }
0353e8c6-afcc-4a99-84c2-55b3e15516da
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-07 17:32:50", "repo_name": "quangIT210199/CuoiKiLTM", "sub_path": "/GiaiDeLTM/src/Q701/Cau4_Server.java", "file_name": "Cau4_Server.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "549bac1b97204b6c34a80d045779a4007d93e559", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/quangIT210199/CuoiKiLTM
254
FILENAME: Cau4_Server.java
0.289372
/* * 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 tcp; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author DELL */ public class Cau4_Server { public static void main(String[] args) { try { ServerSocket server=new ServerSocket(1106); while(true){ Socket socket=server.accept(); String s="1,3,9,19,33,20"; byte b[]=new byte[1000]; InputStream in=socket.getInputStream(); in.read(b); System.out.println(new String (b)); OutputStream out=socket.getOutputStream(); out.write(s.getBytes()); byte c[]=new byte[1000]; in.read(c); System.out.println(new String(c)); } } catch (IOException ex) { Logger.getLogger(Cau4_Server.class.getName()).log(Level.SEVERE, null, ex); } } }
a4f7a43d-fb7f-4f11-8432-d455bd4583c9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-19 05:26:39", "repo_name": "dhirajbadu/spring-boot-setup", "sub_path": "/src/main/java/com/setup/setup/SetupApplication.java", "file_name": "SetupApplication.java", "file_ext": "java", "file_size_in_byte": 978, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "a3c2ec5cd5a5c21db26c58ae279eddd462d8fe04", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dhirajbadu/spring-boot-setup
192
FILENAME: SetupApplication.java
0.250913
package com.setup.setup; import com.setup.setup.service.contact.ContactInfo; import com.setup.setup.service.contact.ContactInfoRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; import javax.annotation.PostConstruct; @ComponentScan({"com.setup.setup.service" , "com.setup.setup.controller"}) @SpringBootApplication public class SetupApplication { @Autowired private ContactInfoRepository contactInfoRepository; public static void main(String[] args) { SpringApplication.run(SetupApplication.class, args); } @PostConstruct private void createContact(){ contactInfoRepository.save(new ContactInfo("Dhiraj" , "12345")); contactInfoRepository.save(new ContactInfo("Benis" , "12345")); contactInfoRepository.save(new ContactInfo("Kailas" , "12345")); } }
109447e4-4b96-407f-9744-199397702456
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-20 19:59:03", "repo_name": "JoakimAnder/webbshop", "sub_path": "/src/main/java/se/iths/webbshop/utilities/Search.java", "file_name": "Search.java", "file_ext": "java", "file_size_in_byte": 1134, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "3a15cf22e87ca610dd57539cc000cc5d819597bf", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JoakimAnder/webbshop
241
FILENAME: Search.java
0.229535
package se.iths.webbshop.utilities; public class Search { private String category; private String query; private String tags; public Search() { this.category = "orders"; this.query = ""; this.tags = ""; } public Search(String category, String query, String tags) { this.category = category; this.query = query; this.tags = tags; } public String getCategory() { return category == null ? "" : category; } public void setCategory(String category) { this.category = category; } public String getQuery() { return query == null ? "" : query; } public void setQuery(String query) { this.query = query; } public String getTags() { return tags == null ? "" : tags; } public void setTags(String tags) { this.tags = tags; } @Override public String toString() { return "Search{" + "category='" + category + '\'' + ", query='" + query + '\'' + ", tags='" + tags + '\'' + '}'; } }
30555f42-1d5b-48af-9edc-abcdfd643dc9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-29 07:36:30", "repo_name": "lahmenev/HibernateProjects", "sub_path": "/FetchStrategy/src/main/java/com/hibernate/entity/Department.java", "file_name": "Department.java", "file_ext": "java", "file_size_in_byte": 1157, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "dbec8a19979b12d5a8400e79650c4dc6d51a87a1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lahmenev/HibernateProjects
258
FILENAME: Department.java
0.262842
package com.hibernate.entity; import org.hibernate.annotations.BatchSize; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; import javax.persistence.*; import java.util.ArrayList; import java.util.List; /** * email : s.lakhmenev@andersenlab.com * * @author Lakhmenev Sergey * @version 1.1 */ @Entity public class Department { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; @Column(name = "dept_name") private String deptName; @BatchSize(size = 10) //@Fetch(value = FetchMode.SUBSELECT) @OneToMany(mappedBy = "department", cascade = CascadeType.PERSIST) private List<Employee> employees = new ArrayList<>(); public int getId() { return id; } public void setId(int id) { this.id = id; } public String getDeptName() { return deptName; } public void setDeptName(String deptName) { this.deptName = deptName; } public List<Employee> getEmployees() { return employees; } public void setEmployees(List<Employee> employees) { this.employees = employees; } }
24c14b86-520c-4fe1-a483-37850bfe6bfc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-09 00:32:26", "repo_name": "dym3093/dolphin", "sub_path": "/src/main/java/com/dayton/dolphin/threadCore/test/MyExecutor.java", "file_name": "MyExecutor.java", "file_ext": "java", "file_size_in_byte": 1082, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "548c627e319708049f1ddd1903db8a20c610dd48", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dym3093/dolphin
231
FILENAME: MyExecutor.java
0.27048
package com.dayton.dolphin.threadCore.test; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * * Created by bruce on 17-5-21. */ public class MyExecutor extends Thread{ private int index; public MyExecutor(int index){ setIndex(index); } public static void main(String[] args){ ExecutorService executorService = Executors.newFixedThreadPool(5); for (int i=0; i<10; i++){ executorService.execute(new MyExecutor(i)); } System.out.println("submit finish"); executorService.shutdown(); } public void run(){ System.out.println("["+getIndex()+"] start ..."); try { Thread.sleep((long) (Math.random()*1000)); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("["+getIndex()+"] stop ..."); } public int getIndex() { return index; } public void setIndex(int index) { this.index = index; } }
0ebb397a-5696-43a9-809e-d7a40b6ec182
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-18 01:49:10", "repo_name": "wallacehenriquesilva/Golden-Raspberry-Awards-Api", "sub_path": "/src/main/java/br/com/wallace/worstmovie/data/entities/ProducerEntity.java", "file_name": "ProducerEntity.java", "file_ext": "java", "file_size_in_byte": 1181, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "9ff58bc0bef51f9c0d8f686ee33a24dfdd66614e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wallacehenriquesilva/Golden-Raspberry-Awards-Api
252
FILENAME: ProducerEntity.java
0.264358
package br.com.wallace.worstmovie.data.entities; import com.fasterxml.jackson.annotation.JsonIgnore; import com.wallace.javapow.annotations.Csv; import com.wallace.javapow.annotations.CsvColumn; import lombok.*; import javax.persistence.*; import java.io.Serializable; import java.util.HashSet; import java.util.Set; @Csv @Getter @Setter @Entity @Builder @EqualsAndHashCode @Table(name = "producers", indexes = {@Index( name = "producer_name_uk", columnList = "producer_name" )}) @NoArgsConstructor @AllArgsConstructor public class ProducerEntity implements Serializable { private static final long serialVersionUID = 1L; @Id @SequenceGenerator( name = "producers_sequence", sequenceName = "producers_sequence", allocationSize = 1 ) @GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "producers_sequence" ) private Long id; @CsvColumn(name = "producers") @Column(name = "producer_name", nullable = false, unique = true, length = 100) private String name; @JsonIgnore @ManyToMany private Set<MovieEntity> movies = new HashSet<>(); }
4e58773e-ff66-4ec1-ae09-119c1cc96836
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-16 14:54:04", "repo_name": "youniforever/spring-data-elasticsearch", "sub_path": "/src/main/java/com/valueupsys/search/jobs/CollectPropertyTradesJob.java", "file_name": "CollectPropertyTradesJob.java", "file_ext": "java", "file_size_in_byte": 1131, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "f5de055a1d0ce967fe7dfeeba5d5677fbcc1c7b3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/youniforever/spring-data-elasticsearch
203
FILENAME: CollectPropertyTradesJob.java
0.250913
package com.valueupsys.search.jobs; import com.valueupsys.search.listener.DefaultJobListener; import org.springframework.batch.core.Job; import org.springframework.batch.core.Step; import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration public class CollectPropertyTradesJob { private final String JOB_NAME = "COLLECT-PROPERTY-TRADES"; private final JobBuilderFactory jobBuilderFactory; public CollectPropertyTradesJob(JobBuilderFactory jobBuilderFactory) { this.jobBuilderFactory = jobBuilderFactory; } @Bean public Job collectPropertyTrades( @Qualifier("c.p.t.Listener") DefaultJobListener defaultJobListener, @Qualifier("c.p.t.Step") Step collectPropertyTradesStep ) { return jobBuilderFactory.get(JOB_NAME) .listener(defaultJobListener) .start(collectPropertyTradesStep) .build(); } }
664baf44-bf48-45ce-b7d7-a3063f598bca
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-26 08:48:53", "repo_name": "ricman-mo/demomybatistest", "sub_path": "/src/test/java/com/example/demo/testZookeeper.java", "file_name": "testZookeeper.java", "file_ext": "java", "file_size_in_byte": 1066, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "2fd8cba3c9d2d771b42dfa9087a439ecd730f225", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ricman-mo/demomybatistest
238
FILENAME: testZookeeper.java
0.236516
package com.example.demo; import org.apache.zookeeper.WatchedEvent; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.ZooKeeper; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringRunner; import java.io.IOException; /** * Created by M93349 on 2020/8/26. */ @ExtendWith(SpringExtension.class) @SpringBootTest public class testZookeeper { @Test @DisplayName(" Test positive integer Addition") public void testData() { try { ZooKeeper client= new ZooKeeper("10.169.42.200", 2000, new Watcher() { @Override public void process(WatchedEvent watchedEvent) { System.out.println("Watch"); } }); } catch (IOException e) { e.printStackTrace(); } } }
5555b26f-2b22-4aec-8088-b1148095732c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-02-16 09:46:03", "repo_name": "hikingDX/SocketDemo1", "sub_path": "/src/TCPDemo/Server.java", "file_name": "Server.java", "file_ext": "java", "file_size_in_byte": 1395, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "e5d71317262f63758c0d6f07119f76fdc45ccaa0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hikingDX/SocketDemo1
247
FILENAME: Server.java
0.286968
package TCPDemo; import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; /** * Created by Administrator on 2017/2/7. */ //多线程 public class Server { private static final int PORT = 7788; public void listen() throws Exception{ //创建ServerSocket对象,监听指定的端口 ServerSocket serverSocket = new ServerSocket(PORT); //使用while循环不停的接收客户端发送的请求 while(true){ //调用ServerSocket的accept()方法与客户端建立连接 final Socket client = serverSocket.accept(); //开启一个新线程 new Thread(){ @Override public void run() { OutputStream os;//定义一个输出流对象 try{ os = client.getOutputStream(); System.out.println("开始和客户端进行交互数据"); os.write(("庖丁计划").getBytes()); Thread.sleep(5000); System.out.println("结束和客户端进行交互数据"); os.close(); client.close(); }catch (Exception e){ e.printStackTrace(); } } }.start(); } } }
99612a29-0f87-4fdf-ab2f-2028f510c46a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-09-07 15:39:19", "repo_name": "OnlyJCash/Eureka", "sub_path": "/eureka-cms/eureka-cms-rs-service/src/main/java/com/eureka/cms/rs/adapter/bean/cfg/ProjectBean.java", "file_name": "ProjectBean.java", "file_ext": "java", "file_size_in_byte": 1133, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "09a972e7b28aef839a90728352de5cafb6a13b90", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/OnlyJCash/Eureka
268
FILENAME: ProjectBean.java
0.252384
/** * */ package com.eureka.cms.rs.adapter.bean.cfg; import java.util.List; /** * @author mmazzilli * */ public class ProjectBean extends BasicInfoBean { private static final long serialVersionUID = 919155995953407419L; private String footerDescription; private Boolean localized; private List<LocaleBean> localeAllowed; /** * @return the footerDescription */ public String getFooterDescription() { return footerDescription; } /** * @param footerDescription the footerDescription to set */ public void setFooterDescription(String footerDescription) { this.footerDescription = footerDescription; } /** * @return the localized */ public Boolean getLocalized() { return localized; } /** * @param localized the localized to set */ public void setLocalized(Boolean localized) { this.localized = localized; } /** * @return the localeAllowed */ public List<LocaleBean> getLocaleAllowed() { return localeAllowed; } /** * @param localeAllowed the localeAllowed to set */ public void setLocaleAllowed(List<LocaleBean> localeAllowed) { this.localeAllowed = localeAllowed; } }
dfc8090b-a5cf-41a9-aeb4-5c8dc2e10b56
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-05-30 22:01:08", "repo_name": "BeloglazovKirill/TicTacToe", "sub_path": "/app/src/main/java/com/beloglazov/example/tictactoe/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1072, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "be210009be508ecdb36069c10b9688d58d09bf52", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/BeloglazovKirill/TicTacToe
175
FILENAME: MainActivity.java
0.228156
package com.beloglazov.example.tictactoe; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button buttonNewGame = (Button) findViewById(R.id.buttonNewGame); Button buttonAbout = (Button) findViewById(R.id.buttonAbout); buttonNewGame.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(getApplicationContext(), GameActivity.class)); } }); buttonAbout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(getApplicationContext(), AboutActivity.class)); } }); } }
b23dd8a1-a67e-4e9c-854b-4a0bc7b5a598
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-18 14:24:55", "repo_name": "cryinggiraffe/JavaEE", "sub_path": "/network/src/com/company/ui/HomePage.java", "file_name": "HomePage.java", "file_ext": "java", "file_size_in_byte": 1197, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "1389ca1e505041c71ed9d57c3b9c9254049086de", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cryinggiraffe/JavaEE
239
FILENAME: HomePage.java
0.274351
package com.company.ui; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class HomePage { public void placeMeuu(JFrame jFrame, JPanel jPanel){ JMenuBar jMenuBar = new JMenuBar(); JMenu config_menu = new JMenu("获取配置"); JMenuItem ip_mac = new JMenuItem("获取IP及MAC"); JMenuItem exit = new JMenuItem("退出"); config_menu.add(ip_mac); config_menu.add(exit); JMenu network = new JMenu("网络测试"); JMenuItem connention = new JMenuItem("测试网络连通性"); network.add(connention); jMenuBar.add(config_menu); jMenuBar.add(network); jFrame.setJMenuBar(jMenuBar); ConfigPage configPage = new ConfigPage(); ip_mac.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { configPage.placeComponents(jPanel); } }); } public void placeComponents(JPanel jPanel){ JLabel userLabel = new JLabel("Hello World!"); userLabel.setBounds(10,20,80,25); jPanel.add(userLabel); } }
64d286ea-cddb-4ec4-b50a-77f9556ca8d4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-27 16:27:44", "repo_name": "knowledge-ai/kgai-java-raw", "sub_path": "/src/main/java/ai/knowledge/raw/reference/kafka/consumer/TrConsumer.java", "file_name": "TrConsumer.java", "file_ext": "java", "file_size_in_byte": 1181, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "beb892edf9e414c9a7cdb7a46ef14db7733edce7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/knowledge-ai/kgai-java-raw
238
FILENAME: TrConsumer.java
0.268941
package ai.knowledge.raw.reference.kafka.consumer; import lombok.extern.apachecommons.CommonsLog; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.kafka.annotation.KafkaListener; import org.springframework.kafka.config.KafkaListenerEndpointRegistry; import org.springframework.stereotype.Service; @Service @CommonsLog(topic = "TR Consumer Logger") public class TrConsumer<T> { @Autowired private KafkaListenerEndpointRegistry registry; @KafkaListener(id = "TrConsumer", topics = "${topic.name}", autoStartup = "false") public void consume(ConsumerRecord<String, Class<T>> record) { log.info(String.format("Consumed message -> %s", record.value())); } // delay start, read: https://docs.spring.io/spring-kafka/reference/html/#kafkalistener-lifecycle // delay till object creation as then the class<T> will be known public void startConsumer() { this.registry.getListenerContainer("TrConsumer").start(); } public void stopConsumer() { this.registry.getListenerContainer("TrConsumer").stop(); } }
a8b0496e-4ae0-4c63-89a3-aaabf82ff2b9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-28 07:14:19", "repo_name": "hardiktandel/RailYatri", "sub_path": "/app/src/main/java/com/example/railyatri/Model/FoodCategoryModel.java", "file_name": "FoodCategoryModel.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "c064fd079d925257cbf1c06be88f0e6ede63bae9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hardiktandel/RailYatri
212
FILENAME: FoodCategoryModel.java
0.206894
package com.example.railyatri.Model; import com.google.gson.annotations.SerializedName; import java.util.List; public class FoodCategoryModel { @SerializedName("data") List<FoodCategoryDataModel> data; public List<FoodCategoryDataModel> getData() { return data; } public void setData(List<FoodCategoryDataModel> data) { this.data = data; } public class FoodCategoryDataModel { @SerializedName("name") private String name; @SerializedName("id") private String id; @SerializedName("photo") private String photo; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getPhoto() { return photo; } public void setPhoto(String photo) { this.photo = photo; } } }
13af5ba6-921b-4293-b976-3571830e82f0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-13 02:25:48", "repo_name": "biantaiwuzui/netx", "sub_path": "/trunk/netx-ucenter/src/main/java/com/netx/ucenter/vo/request/UpdatePasswordRequestDto.java", "file_name": "UpdatePasswordRequestDto.java", "file_ext": "java", "file_size_in_byte": 1310, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "d619311e99e504c14264ce802c3671e112eb20d7", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/biantaiwuzui/netx
284
FILENAME: UpdatePasswordRequestDto.java
0.23231
package com.netx.ucenter.vo.request; import io.swagger.annotations.ApiModelProperty; import org.hibernate.validator.constraints.NotBlank; import javax.validation.constraints.Pattern; public class UpdatePasswordRequestDto { @ApiModelProperty("用户名") @NotBlank(message = "用户名不能为空") private String userName; @ApiModelProperty("旧密码") @NotBlank(message = "旧密码不能为空") @Pattern(regexp = "^[a-zA-Z0-9_-]{6,16}$", message = "旧密码至少6位,由大小写字母和数字,-,_组成") private String oldPassword; @ApiModelProperty("新密码") @NotBlank(message = "新密码不能为空") @Pattern(regexp = "^[a-zA-Z0-9_-]{6,16}$", message = "新密码至少6位,由大小写字母和数字,-,_组成") private String newPassword; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getOldPassword() { return oldPassword; } public void setOldPassword(String oldPassword) { this.oldPassword = oldPassword; } public String getNewPassword() { return newPassword; } public void setNewPassword(String newPassword) { this.newPassword = newPassword; } }
1d090762-6d7e-468c-a918-725702b23acc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-15 17:50:10", "repo_name": "Struti/thesis_CD", "sub_path": "/program/modules/domain/src/main/java/com/me/thesis/holiday/domain/holidayhistory/domain/YearHistory.java", "file_name": "YearHistory.java", "file_ext": "java", "file_size_in_byte": 1105, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "f795f40a22deca4dfc18a8a942dd157ad878b5eb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Struti/thesis_CD
218
FILENAME: YearHistory.java
0.286169
package com.me.thesis.holiday.domain.holidayhistory.domain; import java.math.BigDecimal; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Value; /** * The type Year history. */ @Value @Builder(builderClassName = "YearHistoryBuilder", access = AccessLevel.PUBLIC) @JsonDeserialize(builder = YearHistory.YearHistoryBuilder.class) @AllArgsConstructor(access = AccessLevel.PRIVATE) public class YearHistory { @JsonProperty("year") int year; @JsonProperty("fixHolidaysForTheYear") BigDecimal fixHolidaysForTheYear; @JsonProperty("eventRelatedHolidays") List<EventRelatedHoliday> eventRelatedHolidays; @JsonProperty("holidayEvent") List<HolidayEvent> holidayEvents; /** * The type Year history builder. */ @JsonPOJOBuilder(withPrefix = "") public static class YearHistoryBuilder { } }
f0aba9bc-f049-4c3d-871a-a4a735e8069c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-14 06:04:43", "repo_name": "avmurrie/CalculadoraPromedios", "sub_path": "/CalculadoraEspol/app/src/main/java/fiec/espol/edu/ec/calculadoraespol/Parsing.java", "file_name": "Parsing.java", "file_ext": "java", "file_size_in_byte": 1157, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "05800a04c195aa5fd37b9528e54fc35ceedce666", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/avmurrie/CalculadoraPromedios
221
FILENAME: Parsing.java
0.26971
package fiec.espol.edu.ec.calculadoraespol; import android.os.AsyncTask; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; import java.io.IOException; import java.util.List; public class Parsing extends AsyncTask<String, Void, Modelo> { private InterfaceParsing parserResponseInterface; public Parsing(InterfaceParsing parserResponseInterface){ this.parserResponseInterface = parserResponseInterface; } @Override protected Modelo doInBackground(String... params) { String url = params[0]; Modelo articleModel = null; Document doc; try { doc = Jsoup.connect(url).get(); Elements estudiantes = doc.select("td >p"); // a with href articleModel = new Modelo("Estudiantes destacados de FEC", estudiantes.text()); } catch (IOException e) { e.printStackTrace(); } return articleModel; } @Override protected void onPostExecute(Modelo articleModel) { super.onPostExecute(articleModel); parserResponseInterface.onParsingDone(articleModel); } }
27e44ae2-d79a-4371-a4d5-629424f3c2d2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-10 17:24:00", "repo_name": "MohitMude/Poshan", "sub_path": "/app/src/main/java/com/iitism/poshan/Admin/MTCCentersModel.java", "file_name": "MTCCentersModel.java", "file_ext": "java", "file_size_in_byte": 1217, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "cfdb3e0bf3a87b5fc88a5e0f230aba81ea67e12f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MohitMude/Poshan
283
FILENAME: MTCCentersModel.java
0.256832
package com.iitism.poshan.Admin; public class MTCCentersModel { String MTCName,Incharge,Address,Email,Password, mobile; int beds; public MTCCentersModel(String MTCName, String incharge, String address, String email, String password, String mobile) { this.MTCName = MTCName; Incharge = incharge; Address = address; Email = email; Password = password; this.mobile = mobile; } public MTCCentersModel(String MTCName, String incharge, String address, String email, String password, String mobile, int beds) { this.MTCName = MTCName; Incharge = incharge; Address = address; Email = email; Password = password; this.mobile = mobile; this.beds = beds; } public String getMTCName() { return MTCName; } public String getIncharge() { return Incharge; } public String getAddress() { return Address; } public String getEmail() { return Email; } public String getPassword() { return Password; } public String getMobile() { return mobile; } public int getBeds() { return beds; } }
7fce5410-9af5-4b1d-8ca6-4af25450ec2b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-23 10:33:16", "repo_name": "PashaEagle/kafka-javafx-learn", "sub_path": "/javafx-kafka-client/src/sample/handler/UpdateHandler.java", "file_name": "UpdateHandler.java", "file_ext": "java", "file_size_in_byte": 1133, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "16ed3649e868220d154555b7c34631df69e205ca", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/PashaEagle/kafka-javafx-learn
204
FILENAME: UpdateHandler.java
0.288569
package sample.handler; import com.fasterxml.jackson.core.type.TypeReference; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import sample.data.Context; import sample.dto.Message; import java.io.*; import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; import java.util.stream.Collectors; public class UpdateHandler implements HttpHandler { private final Context context = Context.getInstance(); @Override public void handle(HttpExchange t) throws IOException { String response = "{}"; t.sendResponseHeaders(200, response.length()); InputStream inputStream = t.getRequestBody(); String body = new BufferedReader( new InputStreamReader(inputStream, StandardCharsets.UTF_8)) .lines() .collect(Collectors.joining("\n")); context.usernameToMessagesMap = context.mapper.readValue(body, new TypeReference<Map<String, List<Message>>>() { }); OutputStream os = t.getResponseBody(); os.write(response.getBytes()); os.close(); } }
cc011869-e18f-48ce-b92c-6b211b9637b4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-16 09:36:42", "repo_name": "filipednb/skills", "sub_path": "/src/test/java/br/com/skills/admin/resources/UsersResourceTests.java", "file_name": "UsersResourceTests.java", "file_ext": "java", "file_size_in_byte": 1115, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "031ddc44163fc82ecd84800f98a05c327cad45e7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/filipednb/skills
215
FILENAME: UsersResourceTests.java
0.279828
package br.com.skills.admin.resources; import br.com.skills.admin.entities.UserEntity; import br.com.skills.admin.repositories.UsersRepository; import org.assertj.core.api.Assertions; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @DataJpaTest public class UsersResourceTests { @Autowired UsersRepository usersRepository; @Test public void shouldCreateUserAndPersist() { UserEntity sebastiao = new UserEntity(); sebastiao.setName("Sebastião"); usersRepository.save(sebastiao); UserEntity sebastiaoPersistido = usersRepository.findById(sebastiao.getId()).orElseThrow(); Assertions.assertThat(sebastiaoPersistido.getId()).isNotNull(); Assertions.assertThat(sebastiaoPersistido.getName()).isEqualTo("Sebastião"); Assertions.assertThat(sebastiaoPersistido.getName()).isNotEqualTo("Juvêncio"); } }
f54c02e0-c441-44b8-ba75-7f62a68c0b7f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-06-01T10:58:46", "repo_name": "bethwelkip/e-learn", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1184, "line_count": 42, "lang": "en", "doc_type": "text", "blob_id": "ba8340b3ff5cb86a84a916795a9d687c4010e107", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/bethwelkip/e-learn
374
FILENAME: README.md
0.23231
# Title ## TUSOME e-learning # Authors * Paulyne Wambui * Bethwel Kiplimo * Ronald Kiprotich * Daisy Jesang * Dorcas Cherono # Description This is an amazing application ment to educate students of different grades study. You need to sign in in the application. Select your grade, select the subject you want to do the questions. after completion you send your answers and in return get the correct answers. # Setup/Installation Requirements First clone the repo $ git clone https://github.com/bethwelkip/e-learn.git After cloning, navigate to the project:$ cd e-learn Then install all the requirements through pip: $ pip install -r requirements.txt Make the file executable: $ chmod +x start.sh Run the application: $ ./start.sh Now navigate to your browser at: localhost://127.0.0.15000/ # Figma design This is the link to the figma design https://www.figma.com/proto/9O8yKO8jWSkOXWGd17SLLY/e-learning?node-id=1%3A2&viewport=409%2C173%2C0.2896341383457184&scaling=scale-down # Screenshot ![learn](https://user-images.githubusercontent.com/69419673/98296901-af4c5b00-1fc4-11eb-9224-d5224789a589.png) # Technologies Used * Python * HTML * css * bootstrap * Twilio
9a92d853-613e-412b-bfc3-30cccec5d441
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-08-11 04:55:18", "repo_name": "CloudSlang/cs-actions", "sub_path": "/cs-abbyy/src/main/java/io/cloudslang/content/abbyy/entities/others/ExportFormat.java", "file_name": "ExportFormat.java", "file_ext": "java", "file_size_in_byte": 528, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "5753bc846a8ac2f4d6af246d24584c086e6a25bd", "star_events_count": 18, "fork_events_count": 37, "src_encoding": "UTF-8"}
https://github.com/CloudSlang/cs-actions
247
FILENAME: ExportFormat.java
0.268941
/* * Copyright 2020-2023 Open Text * This program and the accompanying materials * are made available under the terms of the Apache License v2.0 which accompany this distribution. * * The Apache License is available at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.cloudslang.content.abbyy.entities.others; public enum ExportFormat { TXT("txt", "txt"), PDF_SEARCHABLE("pdfSearchable", "pdf"), XML("xml", "xml"); private final String str; private final String fileExtension; ExportFormat(String str, String fileExtension) { this.str = str; this.fileExtension = fileExtension; } public String getFileExtension() { return fileExtension; } @Override public String toString() { return this.str; } }
d384c807-a59f-4d20-955b-9ff815da955f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-05 22:44:07", "repo_name": "unsupo/Base-Android-Firebase-App", "sub_path": "/app/src/main/java/com/jarndt/tournament_app/utilities/Network.java", "file_name": "Network.java", "file_ext": "java", "file_size_in_byte": 1219, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "72ed2db0d12e74133a56d65064fb53ba268b988e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/unsupo/Base-Android-Firebase-App
205
FILENAME: Network.java
0.26971
package com.jarndt.tournament_app.utilities; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class Network { public static boolean isNetworkAvailable(Context context) { ConnectivityManager connectivityManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); return activeNetworkInfo != null && activeNetworkInfo.isConnected(); } public static boolean isNetworkConnected(Context context) { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); if (activeNetwork != null) { // connected to the internet if (activeNetwork.getType() == ConnectivityManager.TYPE_WIFI) { // connected to wifi return true; } else if (activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE) { // connected to mobile data return true; } } return false; } }
c87b496b-c302-4c62-8060-b4a27e021314
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-01-10 04:59:08", "repo_name": "kanathips/Friends-Trip", "sub_path": "/app/src/main/java/com/tinyandfriend/project/friendstrip/view/MainViewPager.java", "file_name": "MainViewPager.java", "file_ext": "java", "file_size_in_byte": 1079, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "12f7290d702ffb9a340d2a2d793e47327a518b85", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kanathips/Friends-Trip
207
FILENAME: MainViewPager.java
0.261331
package com.tinyandfriend.project.friendstrip.view; import android.content.Context; import android.support.v4.view.ViewPager; import android.support.v7.app.AppCompatActivity; import android.util.AttributeSet; import com.tinyandfriend.project.friendstrip.adapter.ContentFragmentPagerAdapter; /** * Created by StandAlone on 4/12/2559. */ public class MainViewPager extends ViewPager { private AppCompatActivity activity; private boolean checkJoined; public MainViewPager(Context context) { super(context); activity = (AppCompatActivity) context; } public MainViewPager(Context context, AttributeSet attrs) { super(context, attrs); activity = (AppCompatActivity) context; } public void setStatusJoined(boolean checkJoined){ this.checkJoined = checkJoined; } @Override protected void onPageScrolled(int position, float offset, int offsetPixels) { super.onPageScrolled(position, offset, offsetPixels); activity.setTitle(ContentFragmentPagerAdapter.tabTitles[position]); } }
bc4f708c-b6fe-449f-8888-2ae4844c5f80
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-14 08:27:13", "repo_name": "luoxianjiao/SpringBoot-Cloud", "sub_path": "/sleuth-trace-2/src/main/java/com/example/SleuthTrace2Application.java", "file_name": "SleuthTrace2Application.java", "file_ext": "java", "file_size_in_byte": 1158, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "5a08e3ca80c2fd8c450caffd0a6b33a3bbc5d354", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/luoxianjiao/SpringBoot-Cloud
211
FILENAME: SleuthTrace2Application.java
0.242206
package com.example; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; @RestController @EnableDiscoveryClient @SpringBootApplication public class SleuthTrace2Application { private static Logger logger= LoggerFactory.getLogger(SleuthTrace2Application.class); @RequestMapping(value = "/trace-2",method = RequestMethod.GET) public String trace(HttpServletRequest request) throws Exception{ // Thread.sleep(3000); logger.info("call sleuth-trace-2, TraceId={}, SpanId={}", request.getHeader("X-B3-TraceId"), request.getHeader("X-B3-SpanId")); return "Trace"; } public static void main(String[] args) { SpringApplication.run(SleuthTrace2Application.class, args); } }
d65356e9-68ff-4596-8485-2dce1dbec0ec
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-11 04:42:06", "repo_name": "rwz657026189/mvvmframe", "sub_path": "/basemodule/src/main/java/com/rwz/basemodule/entity/area/CityEntity.java", "file_name": "CityEntity.java", "file_ext": "java", "file_size_in_byte": 1116, "line_count": 66, "lang": "en", "doc_type": "code", "blob_id": "1453912a6368d56752da495a5528ba27b6f2ee39", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rwz657026189/mvvmframe
284
FILENAME: CityEntity.java
0.23092
package com.rwz.basemodule.entity.area; import com.rwz.ui.IPickerEntity; import java.util.List; /** * Created by rwz on 2017/8/3. * 市 */ public class CityEntity implements IPickerEntity { /** * code : 110100 * name : 北京市 */ private String code; private String name; private List<AreaEntity> des; public CityEntity() { } public CityEntity(String name) { this.name = name; // -1 表示不限 code = "-1"; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<AreaEntity> getDes() { return des; } public void setDes(List<AreaEntity> des) { this.des = des; } @Override public String getText() { return name; } @Override public String toString() { return "CityEntity{" + "name='" + name + '\'' + '}'; } }
1ec3303a-613a-4e00-81dd-90a94d1192e8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-20 06:24:48", "repo_name": "ssooumyyaa/NCE-The-App", "sub_path": "/app/src/main/java/com/example/soumyasharma/nce_theapp/SplashScreen.java", "file_name": "SplashScreen.java", "file_ext": "java", "file_size_in_byte": 1026, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "d1f35e3c3b135fd6cab033e1498bdd3abc1cf797", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ssooumyyaa/NCE-The-App
167
FILENAME: SplashScreen.java
0.213377
package com.example.soumyasharma.nce_theapp; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Window; import android.view.WindowManager; public class SplashScreen extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash_screen); Thread th=new Thread(){ @Override public void run() { try{ sleep(2000); } catch(Exception e){ e.printStackTrace(); } finally { Intent obj = new Intent(SplashScreen.this,MainActivity.class); startActivity(obj); } } }; th.start(); } @Override protected void onPause() { super.onPause(); finish(); } }
69cde6e1-848c-4273-ba97-0c6ad6e00a3b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-24 12:55:45", "repo_name": "gauravrathore716/Audience-App", "sub_path": "/app/src/main/java/com/b2c/audience/model/CategoryListResponse.java", "file_name": "CategoryListResponse.java", "file_ext": "java", "file_size_in_byte": 1112, "line_count": 58, "lang": "en", "doc_type": "code", "blob_id": "119cb34d5009335904707c3e74f9e0c38a3b9159", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/gauravrathore716/Audience-App
222
FILENAME: CategoryListResponse.java
0.2227
package com.b2c.audience.model; import com.google.gson.annotations.SerializedName; import java.util.List; public class CategoryListResponse { @SerializedName("status") private boolean status; @SerializedName("message") private String message; @SerializedName("active") private boolean active; @SerializedName("data") private List<CategoryListInfo> categoryListInfo; { active = true; } public boolean isStatus() { return status; } public void setStatus(boolean status) { this.status = status; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public boolean isActive() { return active; } public void setActive(boolean active) { this.active = active; } public List<CategoryListInfo> getCategoryListInfo() { return categoryListInfo; } public void setCategoryListInfo(List<CategoryListInfo> categoryListInfo) { this.categoryListInfo = categoryListInfo; } }
2076f045-7411-4087-b202-6a959bd8db64
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-02 15:46:04", "repo_name": "kouris-h/RoomDuplicator", "sub_path": "/src/main/java/exportable/Exportable.java", "file_name": "Exportable.java", "file_ext": "java", "file_size_in_byte": 1037, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "ab3ef102447de4752b1ea7f4fbcc2058c1bc3e16", "star_events_count": 1, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/kouris-h/RoomDuplicator
194
FILENAME: Exportable.java
0.292595
package exportable; import org.json.JSONObject; import parsers.Inventory; import utils.Executor; import java.lang.reflect.Field; import java.util.List; import java.util.Map; public abstract class Exportable { public Object export(ProgressListener progressListener) { JSONObject jsonObject = new JSONObject(); Field[] params = this.getClass().getDeclaredFields(); for(int i = 0; i < params.length; i++) { try { jsonObject.put(params[i].getName(), String.valueOf(params[i].get(this))); progressListener.setProgress((double) (i + 1) / params.length); } catch (IllegalAccessException e) { e.printStackTrace(); } } return jsonObject; } public abstract void doImport(Executor executor, List<Exportable> importingStates, Map<String, Exportable> currentStates, Inventory inventory, ProgressListener progressListener); public interface ProgressListener { void setProgress(double p); } }
cce326d9-31b6-4cd5-8e60-c25475c2eb6d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-07-06 13:00:08", "repo_name": "asilvadelpozo/Guikuki", "sub_path": "/guikuki-web/src/main/java/com/guikuki/controller/PhotoController.java", "file_name": "PhotoController.java", "file_ext": "java", "file_size_in_byte": 1117, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "2ffa06db43882bed6f4e650dc42d3969a59ccbd0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/asilvadelpozo/Guikuki
210
FILENAME: PhotoController.java
0.239349
package com.guikuki.controller; import com.guikuki.persistence.exception.PhotoNotFoundException; import com.guikuki.persistence.model.Photo; import com.guikuki.service.PhotoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; /** * Controller for Photo resources. * Created by antoniosilvadelpozo on 01/04/14. */ @Controller @RequestMapping(value = "/photo") public class PhotoController { private static final String JPEG_EXTENSION = ".jpg"; @Autowired private PhotoService photoService; @RequestMapping(value = "/{filename}/content", method = RequestMethod.GET, produces = MediaType.IMAGE_JPEG_VALUE) @ResponseStatus(HttpStatus.OK) public @ResponseBody byte[] findPhotoContentByFileName(@PathVariable String filename) throws PhotoNotFoundException { Photo photo = photoService.findPhotoByFileName(filename + JPEG_EXTENSION); return photo.getContent(); } }
5d366030-a7fd-40e4-b288-68d92a81e1c7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-07-19T15:39:21", "repo_name": "SparkPost/support-docs", "sub_path": "/content/docs/integrations/send-blaster.md", "file_name": "send-blaster.md", "file_ext": "md", "file_size_in_byte": 1136, "line_count": 22, "lang": "en", "doc_type": "text", "blob_id": "84a282506e02b4f66571147962654f331727c84d", "star_events_count": 13, "fork_events_count": 46, "src_encoding": "UTF-8"}
https://github.com/SparkPost/support-docs
267
FILENAME: send-blaster.md
0.198064
--- lastUpdated: "02/08/2020" title: "Using SparkPost with SendBlaster" description: "To use Spark Post as your SMTP Relay with Send Blaster click Send under the Messages Menu on the left hand navigation to bring up a dialogue box and follow these steps Set up your Sender e mail address to be an address from one of your Spark Post verified..." --- To use SparkPost as your SMTP Relay with [SendBlaster](http://sendblaster.com), click 'Send' under the Messages Menu on the left-hand navigation to bring up a dialogue box and follow these steps: * Set up your 'Sender e-mail address' to be an address from one of your SparkPost verified sending domains * Click 'Use SMTP Server' * Set the SMTP server to be smtp.sparkpostmail.com * Set the port to 587 * Enable SSL * Enable the 'Authentication Required' checkbox * Set the Username to SMTP_Injection and the password to a valid API key you've created through your SparkPost account with at least the 'Send via SMTP' permission enabled Test the connection with the 'Connection Test' button and you should be good to go! ![](media/send-blaster/IRA_Dev_original.jpg) Happy Sending!
0d09ccbd-e205-4b7a-b28f-1bbed5b603bd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-10 19:13:34", "repo_name": "worldsmp/Survival", "sub_path": "/src/main/java/com/theworldsmp/survival/events/SleepEvent.java", "file_name": "SleepEvent.java", "file_ext": "java", "file_size_in_byte": 1038, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "ba6480050b18eeca76cbb6b274302229b0722fb9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/worldsmp/Survival
247
FILENAME: SleepEvent.java
0.26588
package com.theworldsmp.survival.events; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.World; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerBedEnterEvent; import org.bukkit.scheduler.BukkitRunnable; import com.theworldsmp.survival.Survival; import com.theworldsmp.survival.utils.IsDay; public class SleepEvent implements Listener { private final Survival plugin; public SleepEvent(Survival plugin) { this.plugin = plugin; } @EventHandler public void onSleep(PlayerBedEnterEvent event) { new BukkitRunnable() { @Override public void run() { if (IsDay.Day() == false) { for(final Player p : Bukkit.getOnlinePlayers()) { if (p.isSleeping()) { Bukkit.broadcastMessage(ChatColor.AQUA + "Someone is sleeping, skipping night..."); final World world = event.getPlayer().getWorld(); world.setTime(1000L); } } } } }.runTaskLater(plugin, 5); } }
606afbde-4407-4166-accd-590fe9273b9a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-03 09:09:00", "repo_name": "Elad73/Android-Udemy-Tutorials", "sub_path": "/AndroidAppDevForBeginners/app/src/main/java/com/example/eladron/androidappdevforbeginners/App55_LandscapeUI.java", "file_name": "App55_LandscapeUI.java", "file_ext": "java", "file_size_in_byte": 1071, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "20131226fc9b4255e3502c9494b75866e4dd1baf", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/Elad73/Android-Udemy-Tutorials
200
FILENAME: App55_LandscapeUI.java
0.250913
package com.example.eladron.androidappdevforbeginners; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.CheckBox; import android.widget.TextView; public class App55_LandscapeUI extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.app55_landscape_ui); final TextView txtInclude = (TextView) findViewById(R.id.txtInclude_app55); Button btnInclude = (Button) findViewById(R.id.btnInclude_app55); final CheckBox chxInclude = (CheckBox) findViewById(R.id.chxInclude_app55); btnInclude.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { txtInclude.setText("The Text is Changed"); chxInclude.setChecked(true); chxInclude.setText("The Value of This checkBox is True"); } }); } }
ebaa1b8b-ea2c-4a0c-a04e-28a981317c0e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-25 08:41:25", "repo_name": "xiaoXcn/xiaoXcn", "sub_path": "/xiaoxcn/src/com/nebula/test/MyHttpServlet.java", "file_name": "MyHttpServlet.java", "file_ext": "java", "file_size_in_byte": 1106, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "64315a16c4efdc4dfeccd6c12a0cd8b474395159", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xiaoXcn/xiaoXcn
200
FILENAME: MyHttpServlet.java
0.272025
package com.nebula.test; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public abstract class MyHttpServlet extends MyGenericServlet{ @Override public void service(ServletRequest arg0, ServletResponse arg1) throws ServletException, IOException { HttpServletRequest request = null; HttpServletResponse response = null; try{ request = (HttpServletRequest)arg0; response = (HttpServletResponse)arg1; String method = request.getMethod(); if("GET".equalsIgnoreCase(method)){ doGet(request,response); }else if("POST".equalsIgnoreCase(method)){ doPost(request,response); } }catch(Exception e){ e.printStackTrace(); } } public abstract void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException; public abstract void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException; }
5e078328-718e-4ca7-b637-a443b495678e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-14 01:10:26", "repo_name": "mario-plus/SpringCloud-alibaba", "sub_path": "/cloud-provide-hystrixPayment8007/src/main/java/com/mario/cloud/controller/HystrixPaymentController.java", "file_name": "HystrixPaymentController.java", "file_ext": "java", "file_size_in_byte": 1118, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "b1b6c1606d663678887e0a211087eb0504b44fc4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mario-plus/SpringCloud-alibaba
223
FILENAME: HystrixPaymentController.java
0.204342
package com.mario.cloud.controller; import com.mario.cloud.service.PaymentService; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /* * @author:ZXZ * @version 2020/3/10 */ @RestController @RequestMapping("hystrix") public class HystrixPaymentController { @Autowired private PaymentService paymentService; @GetMapping("/payment/ok") public String paymentInfo_Ok(){ return paymentService.paymentInfo_Ok(); } @GetMapping("/payment/timeout") public String paymentInfo_timeOut(){ return paymentService.paymentInfo_timeOut(); } //=======服务熔断 @GetMapping("/payment/circuit/{id}") public String paymentCircuitBreaker(@PathVariable("id") Integer id){ return paymentService.paymentCircuitBreaker(id); } }
f35e0f02-f5c0-4734-971a-a1f3b2386fb9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-03-14T12:27:38", "repo_name": "akerigan/staxer", "sub_path": "/staxer-util/src/main/java/org/staxer/util/http/response/AbstractHttpResponse.java", "file_name": "AbstractHttpResponse.java", "file_ext": "java", "file_size_in_byte": 1183, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "c1e99b35b04fb2957041f76ddf4eedfb9d03c73a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/akerigan/staxer
241
FILENAME: AbstractHttpResponse.java
0.291787
package org.staxer.util.http.response; import org.staxer.util.http.helper.HttpHelper; import javax.servlet.ServletException; import java.io.IOException; /** * User: Vlad Vinichenko (akerigan@gmail.com) * Date: 23.10.2009 * Time: 11:09:20 */ public abstract class AbstractHttpResponse implements HttpResponse { protected HttpResponseContentType contentType = HttpResponseContentType.HTML; protected int expireSeconds; public HttpResponseContentType getContentType() { return contentType; } public void setContentType(HttpResponseContentType contentType) { this.contentType = contentType; } public int getExpireSeconds() { return expireSeconds; } public void setExpireSeconds(int expireSeconds) { this.expireSeconds = expireSeconds; } public void respond(HttpHelper httpHelper) throws IOException, ServletException { httpHelper.setResponseContentType(contentType); if (expireSeconds == 0) { httpHelper.setResponseNoCache(); } else { httpHelper.setDateResponseHeader("Expires", System.currentTimeMillis() + expireSeconds * 1000); } } }
2c3f1885-e28d-4760-90c9-716453d6230f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-24 20:12:49", "repo_name": "jamesmwangi55/demo-news-api-android", "sub_path": "/app/src/main/java/com/demonews/demo_news_api_android/data/sources/SourcesRepository.java", "file_name": "SourcesRepository.java", "file_ext": "java", "file_size_in_byte": 1095, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "5b708953bd42f2eca81c4c3e821432ddb6b2ce87", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jamesmwangi55/demo-news-api-android
210
FILENAME: SourcesRepository.java
0.27048
package com.demonews.demo_news_api_android.data.sources; import android.support.annotation.NonNull; import com.demonews.demo_news_api_android.data.Remote; import com.demonews.demo_news_api_android.data.sources.models.Source; import java.util.List; import javax.inject.Inject; import javax.inject.Singleton; /** * Created by james on 4/22/2017. */ @Singleton public class SourcesRepository implements SourcesDataSource{ private final SourcesDataSource mSourcesRemoteDataSource; @Inject SourcesRepository(@Remote SourcesDataSource sourcesRemoteDataSource){ mSourcesRemoteDataSource = sourcesRemoteDataSource; } @Override public void getSources(@NonNull final LoadSourcesCallback callback) { mSourcesRemoteDataSource.getSources(new LoadSourcesCallback() { @Override public void onSourcesLoaded(List<Source> sources) { callback.onSourcesLoaded(sources); } @Override public void onSourcesNotLoaded() { callback.onSourcesNotLoaded(); } }); } }
25afe6fc-4ef8-4d90-853c-7a32e8e44a07
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-14 16:54:54", "repo_name": "LatifY/HRMS", "sub_path": "/src/main/java/latifyilmaz/hrms/entities/concretes/School.java", "file_name": "School.java", "file_ext": "java", "file_size_in_byte": 1219, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "51918622c7aa5808e64f7563e9ccd92d8736014e", "star_events_count": 23, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/LatifY/HRMS
252
FILENAME: School.java
0.290981
package latifyilmaz.hrms.entities.concretes; import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; @Data @Entity @Table(name="schools") @AllArgsConstructor @NoArgsConstructor public class School { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name="id", nullable = false, unique = true) private int id; @ManyToOne(targetEntity = Resume.class, fetch = FetchType.EAGER) @JoinColumn(name = "resume_id") @JsonIgnore private Resume resume; @Column(name = "school_name", nullable = false) private String schoolName; @Column(name = "school_department", nullable = false) private String schoolDepartment; @Column(name = "start_year", nullable = false) private int startYear; @Column(name = "end_year") private int endYear; public School(Resume resume, String schoolName, String schoolDepartment, int startYear, int endYear){ this.resume = resume; this.schoolName = schoolName; this.schoolDepartment = schoolDepartment; this.startYear = startYear; this.endYear = endYear; } }
96c3efef-8fa8-413c-b11b-7a701758294d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-21 03:42:15", "repo_name": "zjximfg/jn-imes-back-V2", "sub_path": "/imes_common/src/main/java/cn/jianing/imes/common/config/FeignTokenInterceptor.java", "file_name": "FeignTokenInterceptor.java", "file_ext": "java", "file_size_in_byte": 1074, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "d35b0996b3a9c4c7d1fc7b258bc68572ab4c578b", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/zjximfg/jn-imes-back-V2
175
FILENAME: FeignTokenInterceptor.java
0.203075
package cn.jianing.imes.common.config; import feign.RequestInterceptor; import feign.RequestTemplate; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import javax.servlet.http.HttpServletRequest; import java.util.Enumeration; public class FeignTokenInterceptor implements RequestInterceptor { @Override public void apply(RequestTemplate template) { ServletRequestAttributes requestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes(); if (requestAttributes == null) return; HttpServletRequest request = requestAttributes.getRequest(); //获取头 Enumeration<String> headerNames = request.getHeaderNames(); while (headerNames.hasMoreElements()) { String headerName = headerNames.nextElement(); String headerValue = request.getHeader(headerName); template.header(headerName, headerValue); } System.out.println(template.headers()); } }
410c0b16-6c94-49dd-8e1a-0007b4b27f15
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-25 12:52:25", "repo_name": "ghaniasim/tourguide", "sub_path": "/app/src/main/java/com/example/android/tourguide/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1157, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "811f5580182917b48132c9e53b4ec296dd2c37cc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ghaniasim/tourguide
198
FILENAME: MainActivity.java
0.239349
package com.example.android.tourguide; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import static com.example.android.tourguide.R.id.tour_button; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Find the View that shows the content category Button tour = (Button) findViewById(tour_button); // Set a click listener on that View tour.setOnClickListener(new View.OnClickListener() { // The code in this method will be executed when the tour button is clicked on. @Override public void onClick(View view) { // Create a new intent to open the {@link ContentActivity} Intent contentIntent = new Intent(MainActivity.this, ContentActivity.class); // Start the new activity startActivity(contentIntent); } }); } }
f9569e5c-f378-4586-9029-dfa3895315da
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-04-16 08:53:16", "repo_name": "marschall/threeten-jpa", "sub_path": "/threeten-jpa-oracle-hibernate/src/main/java/com/github/marschall/threeten/jpa/oracle/hibernate/OracleOffsetDateTimeType.java", "file_name": "OracleOffsetDateTimeType.java", "file_ext": "java", "file_size_in_byte": 1102, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "765e9302f994236b54f9304ee1ea97c82f80a1cf", "star_events_count": 49, "fork_events_count": 8, "src_encoding": "UTF-8"}
https://github.com/marschall/threeten-jpa
288
FILENAME: OracleOffsetDateTimeType.java
0.274351
package com.github.marschall.threeten.jpa.oracle.hibernate; import java.time.OffsetDateTime; import org.hibernate.usertype.UserType; import com.github.marschall.threeten.jpa.oracle.impl.TimestamptzConverter; import oracle.sql.TIMESTAMPTZ; /** * Type mapping from {@link OffsetDateTime} to {@code TIMESTAMPTZ}. * * @deprecated use ojdbc8 12.2.0.1 and Jdbc42OffsetDateTimeType from threeten-jpa-jdbc42-hibernate */ @Deprecated public class OracleOffsetDateTimeType extends AbstractTimestamptzType { /** * Singleton access. */ public static final UserType INSTANCE = new OracleOffsetDateTimeType(); /** * Name of the type. */ public static final String NAME = "OracleOffsetDateTimeType"; @Override public Class<?> returnedClass() { return OffsetDateTime.class; } @Override Object convertToThreeTen(TIMESTAMPTZ timestamptz) { return TimestamptzConverter.timestamptzToOffsetDateTime(timestamptz); } @Override TIMESTAMPTZ convertFromThreeTen(Object value) { return TimestamptzConverter.offsetDateTimeToTimestamptz((OffsetDateTime) value); } }
41898a38-1be7-4c57-8f85-f323b88dd2b3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-12 23:13:30", "repo_name": "iaslabs/boilerplate-java-project", "sub_path": "/src/main/java/com/example/demo/infrastructure/serialization/sql/model/AfiliacionSqlDTO.java", "file_name": "AfiliacionSqlDTO.java", "file_ext": "java", "file_size_in_byte": 1093, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "f388715a78cfee29b303b21ce63853f588841cfe", "star_events_count": 4, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/iaslabs/boilerplate-java-project
241
FILENAME: AfiliacionSqlDTO.java
0.235108
package com.example.demo.infrastructure.serialization.sql.model; import com.example.demo.application.domain.NumeroPoliza; import javax.persistence.Entity; import javax.persistence.Id; import java.time.Instant; @Entity public class AfiliacionSqlDTO { @Id private NumeroPoliza number; private Instant createdAt; private Instant validoHasta; public AfiliacionSqlDTO(NumeroPoliza number, Instant createdAt, Instant validoHasta) { this.number = number; this.createdAt = createdAt; this.validoHasta = validoHasta; } public AfiliacionSqlDTO() { } public NumeroPoliza getNumber() { return number; } public void setNumber(NumeroPoliza number) { this.number = number; } public Instant getCreatedAt() { return createdAt; } public void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; } public Instant getValidoHasta() { return validoHasta; } public void setValidoHasta(Instant validoHasta) { this.validoHasta = validoHasta; } }
cadddec1-f2af-43b9-b3d3-22a99d5d6b0d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-18 15:14:50", "repo_name": "ihorkozar/behance_mvp", "sub_path": "/app/src/main/java/i/kozar/behance_mvp/data/model/project/Cover.java", "file_name": "Cover.java", "file_ext": "java", "file_size_in_byte": 1134, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "5300af7068c9eb977ee53e3253adcbac0f0fc243", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ihorkozar/behance_mvp
242
FILENAME: Cover.java
0.239349
package i.kozar.behance_mvp.data.model.project; import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.ForeignKey; import androidx.room.PrimaryKey; import com.google.gson.annotations.SerializedName; import java.io.Serializable; @Entity(foreignKeys = @ForeignKey( entity = Project.class, parentColumns = "id", childColumns = "project_id" )) public class Cover implements Serializable { @PrimaryKey @ColumnInfo(name = "id") private int id; @ColumnInfo(name = "photo_url") @SerializedName("202") private String photoUrl; @ColumnInfo(name = "project_id") private int projectId; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getPhotoUrl() { return photoUrl; } public void setPhotoUrl(@NonNull String photoUrl) { this.photoUrl = photoUrl; } public int getProjectId() { return projectId; } public void setProjectId(int projectId) { this.projectId = projectId; } }
e148b519-35a1-4123-aa5e-788ded5658e6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-12-03T08:09:00", "repo_name": "AshlandWest/SugarHelper", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1183, "line_count": 17, "lang": "en", "doc_type": "text", "blob_id": "49b173a927e43fb5b715de483ac164e446e2df0f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AshlandWest/SugarHelper
277
FILENAME: README.md
0.225417
# Sugar Helper Plugin This is a Google Chrome extension to make life a little easier for PBHS's employees when copying email addresses from Sugar, especially if done in large batches. It will add a copy button next to each email address on the page. This is helpful because the standard 'copy link' function does not work, requiring precise mouse movement over small text to copy the email without extraneous spaces or missing characters.This can become cumbersome when copying large numbers of email addresses for bulk mailing. ## How to use - [Enable developer mode and install the plugin](https://developer.chrome.com/extensions/faq#:~:text=You%20can%20start%20by%20turning,a%20packaged%20extension%2C%20and%20more.) - I am stll deciding if I want to have a packed extention in this repo, but at the very least, you will be able to load it as an un-packed extention as-is. - That's it! Login to a Sugar account and check it out! <hr> _Sugar Helper is purely a passion project, created to satisfy my creative urges while automating a task I found monotonous and time-consuming during my time employed at PBHS. This project is in no way sponsored or endorsed by PBHS, Inc._
a75ec317-cac1-477d-aed9-9599490c3a4c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-07 09:09:45", "repo_name": "yangwx1402/young-examples", "sub_path": "/druid-example/druid-datasource-example/src/main/java/com/young/java/examples/druid/DruidDataSourceExample.java", "file_name": "DruidDataSourceExample.java", "file_ext": "java", "file_size_in_byte": 1156, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "ab1c926a1e120611b34d864fe80978484ae8a1f0", "star_events_count": 27, "fork_events_count": 11, "src_encoding": "UTF-8"}
https://github.com/yangwx1402/young-examples
208
FILENAME: DruidDataSourceExample.java
0.252384
package com.young.java.examples.druid; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import javax.sql.DataSource; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; /** * Created by dell on 2016/5/18. */ public class DruidDataSourceExample { public void test() throws SQLException { ApplicationContext ac = new ClassPathXmlApplicationContext("/spring/druid-spring.xml"); DataSource dataSource = (DataSource) ac.getBean("dataSource"); Connection connection = dataSource.getConnection(); Statement stmt = connection.createStatement(); String sql = "select * from bigdata_file_details"; ResultSet rs = stmt.executeQuery(sql); while(rs.next()){ System.out.println(rs.getString(1)); } rs.close(); stmt.close(); connection.close(); } public static void main(String[] args) throws SQLException { DruidDataSourceExample example = new DruidDataSourceExample(); example.test(); } }
221a0046-3054-422f-81ea-b164afd451c3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-07 03:05:46", "repo_name": "zjwab118/games", "sub_path": "/code/service/wm_start/src/main/java/com/wm/boot/game/GameCongtroller.java", "file_name": "GameCongtroller.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "01187a05aee4b5030073d624cb9872bfa8b05ad9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zjwab118/games
225
FILENAME: GameCongtroller.java
0.220007
package com.wm.boot.game; import com.wm.boot.core.Result; import com.wm.boot.game.service.IMatchService; import com.wm.boot.game.vo.MatchVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import java.time.Duration; /** * @author wilson * @title MatchController * @description 比赛控制器 * @date 2021.02.06 14:24 */ @RestController @RequestMapping("/match") public class GameCongtroller { @Autowired IMatchService service; public Mono<MatchVo> getAll(){ return service.getAllMatch(); } @GetMapping(value = "/",produces = MediaType.APPLICATION_STREAM_JSON_VALUE) public Flux<Result<?>> test(){ return Flux.interval(Duration.ofSeconds(5)).map(i->{ return Result.success(i); }); } }
05d2f4e7-0200-4e5f-8390-ad1fa6723155
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-30 18:41:09", "repo_name": "sanjeevsharmabj/MyJavaProgrammes", "sub_path": "/jpa-hibernate-demo3/src/main/java/com/wellsfargo/jpahd/entity/Address.java", "file_name": "Address.java", "file_ext": "java", "file_size_in_byte": 1097, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "ff4f613d1657af26984c225175ab87c13eaf0013", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sanjeevsharmabj/MyJavaProgrammes
241
FILENAME: Address.java
0.256832
package com.wellsfargo.jpahd.entity; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Embeddable; @Embeddable public class Address implements Serializable{ @Column(name="dno",nullable = false) private String doorNumber; @Column(name="street",nullable = false) private String street; @Column(name="city",nullable=false) private String city; public Address() { //left unimplemented } public Address(String doorNumber, String street, String city) { super(); this.doorNumber = doorNumber; this.street = street; this.city = city; } public String getDoorNumber() { return doorNumber; } public void setDoorNumber(String doorNumber) { this.doorNumber = doorNumber; } public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } }
5512dcfa-24d1-4c6d-afa3-fe9171e99a98
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-04-10T20:03:00", "repo_name": "RenatoBrittoAraujo/WEB-EXTREME", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1182, "line_count": 53, "lang": "en", "doc_type": "text", "blob_id": "f55fdf64f6aec21597e0d16596910e6d8f7104e0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RenatoBrittoAraujo/WEB-EXTREME
299
FILENAME: README.md
0.262842
# WEB EXTREME ### A quarantine challenge for web developers Creating a CRUD using only HTML and C++. Only allowed libs? The ones that come with standard Ubuntu. Also, you must parse and create HTTP requests and responses. Your CRUD must be of a resource such as a blog post, with more than 1 field. For example: Blog post has title, body, id and poster (all simple strings). Your resources have to be persistent. When you create a post, it should be there next time even if you shut down the server. Bonus points: port foward your IP on your router and make it accessible by anyone. Bonus points: implement authentication with a cryptography algorithm of your choosing. ## This is my take on the challenge Index page: ![Index page](https://i.imgur.com/Vthe2su.png) Show page: ![Show page](https://i.imgur.com/uuC9LCS.png) Create page: ![Create page](https://i.imgur.com/PdYm3Gi.png) Before compiling for the first time, run setup: ``` make setup ``` Compiling: ``` make ``` Running: ``` make run HOST=[PORT NUMBER such as 8080] ``` Dealing with the database: ``` make run FLAGS=-db ``` Using: Go to web browser, insert 0.0.0.0:[PORT NUMBER] and there you have it!
73ed325b-256b-4761-9cb2-a901d95dbaa5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-28 10:19:28", "repo_name": "lidebao513/Java", "sub_path": "/HttpApiTest/src/test/java/apis/Params.java", "file_name": "Params.java", "file_ext": "java", "file_size_in_byte": 1096, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "160a1e0ab20b7c0f68458169a020e06b2d14edb7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lidebao513/Java
250
FILENAME: Params.java
0.267408
package apis; import com.jayway.restassured.RestAssured; import com.jayway.restassured.response.Response; import org.testng.annotations.Test; import static com.jayway.restassured.RestAssured.given; /** * Created by Chuckie on 2017/11/18. */ public class Params { @Test public void restfulParamsTest(){ RestAssured.baseURI = "http://localhost:4567"; RestAssured.basePath = "/users/admin"; Response response = given() .when().log().all().get(); int responseCode = response.statusCode(); response.getBody().print(); System.out.println("响应状态码:"+String.valueOf(responseCode)); } @Test public void kvParamsTest(){ RestAssured.baseURI = "http://localhost:4567"; RestAssured.basePath = "/users"; Response response = given() .param("name","admin") .when().log().all().get(); int responseCode = response.statusCode(); response.getBody().print(); System.out.println("响应状态码:"+String.valueOf(responseCode)); } }
0b242c07-1678-4277-989f-1b4ec0fca582
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-08-26 14:40:31", "repo_name": "Allenary/sytossCinemaTraining", "sub_path": "/cinemaBom/src/main/java/com/sytoss/training/cinema/bom/Movie.java", "file_name": "Movie.java", "file_ext": "java", "file_size_in_byte": 1219, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "f174f5666fabeb8bcaf14ca1b839f765a7d7c357", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Allenary/sytossCinemaTraining
259
FILENAME: Movie.java
0.253861
package com.sytoss.training.cinema.bom; import org.apache.commons.lang.StringUtils; public class Movie { private String name; private String description; private int duration; public Movie(String name) { setName(name); } public String getName() { return name; } public void setName(String name) { if (StringUtils.isEmpty(name)) { throw new IllegalArgumentException("Name shouldn't be NULL or empty."); } this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { if (description == null) { throw new IllegalArgumentException("Description shouldn't be NULL."); } this.description = description; } public int getDuration() { return duration; } public void setDuration(int duration) { if (duration <= 0) { throw new IllegalArgumentException("Duration should be bigger than zero."); } this.duration = duration; } @Override public boolean equals(Object other) { if (other == null) return false; if (other == this) return true; Movie otherMovie = (Movie) other; return this.name.equals(otherMovie.name); } }