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
0dfaece1-15c7-480d-9737-05c2dfde994c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-01-10 04:20:15", "repo_name": "dovikn/inegotiate-android", "sub_path": "/src/com/amazonaws/services/simpledb/model/transform/NoSuchDomainExceptionUnmarshaller.java", "file_name": "NoSuchDomainExceptionUnmarshaller.java", "file_ext": "java", "file_size_in_byte": 967, "line_count": 24, "lang": "en", "doc_type": "code", "blob_id": "ac75320a81f71fb9677f251a67c6b06bd05b9d92", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/dovikn/inegotiate-android
181
FILENAME: NoSuchDomainExceptionUnmarshaller.java
0.283781
package com.amazonaws.services.simpledb.model.transform; import com.amazonaws.AmazonServiceException; import com.amazonaws.services.simpledb.model.NoSuchDomainException; import com.amazonaws.transform.LegacyErrorUnmarshaller; import com.amazonaws.util.XpathUtils; import org.w3c.dom.Node; public class NoSuchDomainExceptionUnmarshaller extends LegacyErrorUnmarshaller { public NoSuchDomainExceptionUnmarshaller() { super(NoSuchDomainException.class); } public AmazonServiceException unmarshall(Node node) throws Exception { String parseErrorCode = parseErrorCode(node); if (parseErrorCode == null || !parseErrorCode.equals("NoSuchDomain")) { return null; } NoSuchDomainException noSuchDomainException = (NoSuchDomainException) super.unmarshall(node); noSuchDomainException.setBoxUsage(XpathUtils.asFloat(getErrorPropertyPath("BoxUsage"), node)); return noSuchDomainException; } }
6ff4386a-705d-4fcd-9335-56ac846704ad
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-03 09:36:20", "repo_name": "lc2a/cna-workshop", "sub_path": "/lab6/stocks-service/src/main/java/io/cna/acme/stocksservice/StocksServiceApplication.java", "file_name": "StocksServiceApplication.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "eee481abaeb47b3bc038bf8496b38bf1b113892c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lc2a/cna-workshop
188
FILENAME: StocksServiceApplication.java
0.262842
package io.cna.acme.stocksservice; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.stereotype.Component; import java.util.stream.Stream; @SpringBootApplication public class StocksServiceApplication { public static void main(String[] args) { SpringApplication.run(StocksServiceApplication.class, args); } } @Component class SampleDataCLR implements CommandLineRunner { private final StockRepository sRepo; @Autowired public SampleDataCLR(StockRepository sRepo) { this.sRepo = sRepo; } @Override public void run(String... strings) throws Exception { Stream.of("PVTL", "AAPL", "MSFT", "GOOG") .forEach(n -> sRepo.save(new Stock(n))); sRepo.findAll().forEach(System.out::println); } }
99859634-c21a-4a4e-9b95-7425b93027d7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-02 02:41:05", "repo_name": "jinxindong1990/learn-netty", "sub_path": "/learn-server/src/main/java/com/java/learn/test1/TestHttpServerHandler.java", "file_name": "TestHttpServerHandler.java", "file_ext": "java", "file_size_in_byte": 1236, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "bb925836822700ea788c9fe65c06b140f1b294b8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jinxindong1990/learn-netty
255
FILENAME: TestHttpServerHandler.java
0.252384
package com.java.learn.test1; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.SimpleChannelInboundHandler; import io.netty.handler.codec.http.*; import io.netty.util.CharsetUtil; /** * @author Karl Jin * @create 2019-05-31 21:18 */ public class TestHttpServerHandler extends SimpleChannelInboundHandler<HttpObject> { protected void channelRead0(ChannelHandlerContext channelHandlerContext, HttpObject httpObject) throws Exception { // 读取客户端发送的请求 并向客户端返回响应 ByteBuf content = Unpooled.copiedBuffer("Hello World", CharsetUtil.UTF_8); FullHttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK, content); response.headers().set(HttpHeaderNames.CONTENT_TYPE, "text/plain"); response.headers().set(HttpHeaderNames.CONTENT_LENGTH, content.readableBytes()); channelHandlerContext.writeAndFlush(response);// 返回 } @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { cause.printStackTrace(); ctx.close(); } }
bf20b1f9-f09e-41e2-8c38-dc1c952084ae
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-09 10:00:06", "repo_name": "TindleWei/HackShow", "sub_path": "/app/src/main/java/gamebuddy/game/hackshow/view/fragment/M0206Fragment.java", "file_name": "M0206Fragment.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "33a068c8acc9e9cd01c1d20b08d3969389c0fac3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/TindleWei/HackShow
198
FILENAME: M0206Fragment.java
0.203075
package gamebuddy.game.hackshow.view.fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import butterknife.Bind; import gamebuddy.game.hackshow.R; import gamebuddy.game.hackshow.view.view.TerminalView; /** * describe * created by tindle * created time 16/2/6 上午10:48 */ public class M0206Fragment extends BaseFragment { @Bind(R.id.terminal_view) TerminalView terminalView; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_m0206, container, false); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); terminalView.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View v) { } }); } }
5ed7596d-9b4d-497f-8b23-731aef3ae534
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-13 09:27:08", "repo_name": "bjzp876/TestGit", "sub_path": "/app/src/main/java/com/bm/test/util/CrashHandler.java", "file_name": "CrashHandler.java", "file_ext": "java", "file_size_in_byte": 1028, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "7bf1299f959ff48862fc4964cae90e0d1e751300", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bjzp876/TestGit
213
FILENAME: CrashHandler.java
0.20947
package com.bm.test.util; import android.content.Context; import android.os.Environment; /** * 异常崩溃处理 * Created by zhangp01 on 2016/5/5. */ public class CrashHandler implements Thread.UncaughtExceptionHandler { private static CrashHandler instance; private Context context; public static CrashHandler getInstance() { if (instance == null) { instance = new CrashHandler(); } return instance; } public void init(Context ctx) { Thread.setDefaultUncaughtExceptionHandler(this); this.context = ctx; } /** * 核心方法,当程序crash 会回调此方法, Throwable中存放这错误日志 */ @Override public void uncaughtException(Thread arg0, Throwable arg1) { String logPath; if (Environment.getExternalStorageState().equals( Environment.MEDIA_MOUNTED)) { } arg1.printStackTrace(); android.os.Process.killProcess(android.os.Process.myPid()); } }
3cf8e232-cdba-46b2-b436-4f2618de0d71
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-11-21 19:28:41", "repo_name": "FreelancerCJr/AppRosasMobile", "sub_path": "/RosasMobileApp/app/src/main/java/br/com/freela/rosasmobileapp/Model/User.java", "file_name": "User.java", "file_ext": "java", "file_size_in_byte": 981, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "b55660e57ea8ec93c8892b5ac2089b739c60a83c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/FreelancerCJr/AppRosasMobile
221
FILENAME: User.java
0.214691
package br.com.freela.rosasmobileapp.Model; import br.com.freela.rosasmobileapp.Database.UserDAO; import br.com.freela.rosasmobileapp.Utilities.Data.Util; /** * Created by claudio on 21/11/2015. */ public class User { private String username; private String password; private boolean logged; private UserDAO userDAO; public User(String usename, String password) { this.username = usename; this.password = password; this.userDAO = new UserDAO(this); } public void doLogin() { this.userDAO.doLogin(); Util.consoleLog( "Logando" ); } public User() { this.username = ""; this.password = ""; this.logged = false; } public String getUsername() { return username; } public String getPassword() { return password; } public boolean isLogged() { return this.userDAO.isLogged(); } }
de8520fa-81a4-42c3-8064-dcb6cbb270bd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-07-10 07:09:43", "repo_name": "qhsy/supersport-supersport", "sub_path": "/sportcenter/src/main/java/com/uhutu/sportcenter/z/result/ApiLiveInfoListResult.java", "file_name": "ApiLiveInfoListResult.java", "file_ext": "java", "file_size_in_byte": 1066, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "102e4897f4692b2df963889e5dc2efa504c78b2f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/qhsy/supersport-supersport
246
FILENAME: ApiLiveInfoListResult.java
0.252384
package com.uhutu.sportcenter.z.result; import java.util.ArrayList; import java.util.List; import com.uhutu.sportcenter.z.entity.LiveDetailInfo; import com.uhutu.zoocom.root.RootApiResult; import io.swagger.annotations.ApiModelProperty; /** * 直播信息列表 * @author 逄小帅 * */ public class ApiLiveInfoListResult extends RootApiResult { @ApiModelProperty(name="是否存在下一页数据",value="是否存在下一页数据",example="true") private boolean nextPageFlag= true; @ApiModelProperty(name="直播信息列表",value="直播信息列表",example="") private List<LiveDetailInfo> liveDetailInfos = new ArrayList<LiveDetailInfo>(); public boolean isNextPageFlag() { return nextPageFlag; } public void setNextPageFlag(boolean nextPageFlag) { this.nextPageFlag = nextPageFlag; } public List<LiveDetailInfo> getLiveDetailInfos() { return liveDetailInfos; } public void setLiveDetailInfos(List<LiveDetailInfo> liveDetailInfos) { this.liveDetailInfos = liveDetailInfos; } }
3be1e659-81c0-45f6-b878-3bfd14a1a3a6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-24 01:21:22", "repo_name": "wellbeing2014/hopper", "sub_path": "/hopper/src/main/java/org/zxp/funk/hopper/utils/WebUtil.java", "file_name": "WebUtil.java", "file_ext": "java", "file_size_in_byte": 1237, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "5c6fd53aebfbd7c40338f4e148c79bb8e1d73aa6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wellbeing2014/hopper
255
FILENAME: WebUtil.java
0.246533
package org.zxp.funk.hopper.utils; import javax.servlet.http.HttpServletRequest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.google.common.base.Strings; /** * @ClassName: WebUtil * @Description: request帮助类,在controller中装配,可以使用 * @author: 朱新培 zxp@wisoft.com.cn * @date: 2017年8月23日 下午3:10:30 */ @Component public class WebUtil { private HttpServletRequest request; @Autowired public void setRequest(HttpServletRequest request) { this.request = request; } public String getClientIp() { String ip = request.getHeader("X-Real-IP"); if (!Strings.isNullOrEmpty(ip) && !"unknown".equalsIgnoreCase(ip)) { return ip; } ip = request.getHeader("X-Forwarded-For"); if (!Strings.isNullOrEmpty(ip) && !"unknown".equalsIgnoreCase(ip)) { int index = ip.indexOf(","); if (index != -1) { return ip.substring(0, index); } else { return ip; } } else { return request.getRemoteAddr(); } } }
9aac81c1-3474-497f-8121-abaec9c8371a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-12-20 08:32:46", "repo_name": "zfeng111/spring-boot-samples", "sub_path": "/spring-boot-task-quartz/src/main/java/cn/iflyapi/Test.java", "file_name": "Test.java", "file_ext": "java", "file_size_in_byte": 1200, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "48b48da95aa22cf10d517e095efde1be2a96aee4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zfeng111/spring-boot-samples
307
FILENAME: Test.java
0.282988
package cn.iflyapi; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Author: qfwang * Date: 2017-12-15 下午1:44 */ public class Test { public static void main(String args[]){ Pattern pattern =Pattern.compile("<img src=\"(.+?)\""); Matcher matcher =pattern.matcher("dsadsadas<a src=\"qfwang.png\"/>dsadasdas<lionel>\"www.163.com\"<kenny><img src=\"wang.png\"/>"); if(matcher.find()){ System.out.println(matcher.group(1)); } Pattern pattern1 =Pattern.compile("<img\"(.+?)/\""); Matcher matcher1 =pattern.matcher("<a href=\"index.html\">主页</a><img src='' />"); if(matcher1.find()){ System.out.println(matcher1.group(1)); } String s = "dsadsadas<img src=''/>dsadasdas<lionel>\"www.163.com\"<kenny><img src='wang.png'/><>"; Pattern p = Pattern.compile("(<img[^>]*>)"); Matcher m = p.matcher(s); List<String> result=new ArrayList<String>(); while(m.find()){ result.add(m.group()); } for(String s1:result){ System.out.println(s1); } } }
279b9fe7-2d4e-45bf-ae01-867dc877eff0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-13 15:18:42", "repo_name": "danlangford/xenon", "sub_path": "/source/test/java/com/avereon/xenon/resource/MockResourceType.java", "file_name": "MockResourceType.java", "file_ext": "java", "file_size_in_byte": 1092, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "b98d1617cb0027435e85f3eae9af65759f0016d0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/danlangford/xenon
243
FILENAME: MockResourceType.java
0.284576
package com.avereon.xenon.resource; import com.avereon.xenon.Program; import com.avereon.product.Product; public class MockResourceType extends ResourceType { private String key; private static final String NAME = "Mock Resource"; private static final String DESCRIPTION = "Mock Resource Type"; private static final String INIT_RESOURCE_KEY = "init.resource.key"; private Codec defaultCodec; public MockResourceType( Product product ) { this( product, "mock", new MockCodec() ); } public MockResourceType( Product product, String key, Codec defaultCodec ) { super( product, key ); this.key = key; setDefaultCodec( defaultCodec ); } @Override public String getKey() { return key == null ? super.getKey() : key; } @Override public String getName() { return NAME + " (" + getKey() + ")"; } @Override public String getDescription() { return DESCRIPTION + " (" + getKey() + ")"; } @Override public boolean resourceDefault( Program program, Resource resource ) { resource.putResource( INIT_RESOURCE_KEY, "init.resource.test" ); return true; } }
09f579a4-09e6-427f-bc67-5e68c4a8571f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-24 13:01:45", "repo_name": "wrick198/IdealProjects-2019", "sub_path": "/knowledge-network/src/main/Test/com/knowledge_network/support/base/BaseControllerTest.java", "file_name": "BaseControllerTest.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "9bea6b8921fad312ac67b687885ab6cc108af943", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wrick198/IdealProjects-2019
190
FILENAME: BaseControllerTest.java
0.217338
package com.knowledge_network.support.base; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import java.text.SimpleDateFormat; import java.util.Date; /** * Created by pentonbin on 17-12-6 */ @RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration @ContextConfiguration("/META-INF/conf/spring-beans.xml") public class BaseControllerTest { private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); private Logger logger = LoggerFactory.getLogger(this.getClass().getCanonicalName()); protected void print(String msg) { Date date = new Date(System.currentTimeMillis()); logger.debug("[TEST][" + this.getClass().getCanonicalName() + "] : " + msg); } }
cef52125-e89f-4ed1-b671-2a6ba1c56acb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-11-01 10:31:16", "repo_name": "wangxu-96/algorithm_leisure", "sub_path": "/src/main/java/com/at/wangxu/Blog/DeadLockDemo.java", "file_name": "DeadLockDemo.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "00ef20dcdcd478337f44037bc593383952813f93", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wangxu-96/algorithm_leisure
207
FILENAME: DeadLockDemo.java
0.279042
package com.at.wangxu.Blog; public class DeadLockDemo { private static String resource_a="A"; private static String resource_b="B"; public static void main(String[] args){ deadLock(); } private static void deadLock() { Thread thread1=new Thread(()->{ synchronized (resource_a){ System.out.println("get resource a---"+Thread.currentThread().getName() ); try { Thread.sleep(3000); synchronized (resource_b){ System.out.println("get resource b"+Thread.currentThread().getName()); } } catch (InterruptedException e) { e.printStackTrace(); } } }); Thread thread2=new Thread(()->{ synchronized (resource_b){ System.out.println("get resource b"+Thread.currentThread().getName()); synchronized(resource_a){ System.out.println("get resource a"+Thread.currentThread().getName()); } } }); thread1.start(); thread2.start(); } }
62595e74-052c-4bfd-9f6b-d6285f314970
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-19 16:50:27", "repo_name": "beardeddragon5/nBackMemoryTraining", "sub_path": "/app/src/main/java/de/matthias_ramsauer/fh/n_backmemorytraining/ui/config/FormatSummaryProvider.java", "file_name": "FormatSummaryProvider.java", "file_ext": "java", "file_size_in_byte": 964, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "ad8f035399f950f512cec502a2768358ea29fc79", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/beardeddragon5/nBackMemoryTraining
174
FILENAME: FormatSummaryProvider.java
0.27048
package de.matthias_ramsauer.fh.n_backmemorytraining.ui.config; import androidx.preference.EditTextPreference; import androidx.preference.ListPreference; import androidx.preference.Preference; class FormatSummaryProvider<T extends Preference> implements Preference.SummaryProvider<T> { private final String format; public FormatSummaryProvider(final String format) { this.format = format; } @Override public CharSequence provideSummary(T preference) { final String value; if (preference instanceof EditTextPreference) { value = ((EditTextPreference) preference).getText(); } else if (preference instanceof ListPreference) { value = ((ListPreference) preference).getEntry().toString(); } else { throw new IllegalArgumentException("preference class " + preference.getClass() + " not supported"); } return this.format.replace("{}", value); } }
b2a96fec-bfad-42a4-9fb5-8cfa20c9c2e2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-10-27 03:09:27", "repo_name": "wpk1121/wpk.github.io", "sub_path": "/vso-top/vso-interface/src/test/java/com/landhightech/util/test/LoggerStatisticsTest.java", "file_name": "LoggerStatisticsTest.java", "file_ext": "java", "file_size_in_byte": 986, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "9b799a2b1b4efee368acdb31da08a8a4612002e9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wpk1121/wpk.github.io
248
FILENAME: LoggerStatisticsTest.java
0.249447
package com.landhightech.util.test; import org.junit.Test; import com.alibaba.fastjson.JSONObject; import com.landhightech.domain.Context; import com.landhightech.mq.SendMessage; import com.landhightech.quartz.mq.SendFailUserJob; import com.landhightech.util.LoggerStatistics; public class LoggerStatisticsTest { /** * * @Title: testLog * @Description: 测试打印日志 */ @Test public void testLog(){ Context context = new Context(); JSONObject obj = new JSONObject(); obj.put("id", "1"); obj.put("name", "xiaoming"); obj.put("password", "123"); obj.put("date", System.currentTimeMillis()); context.setJsonRequest(obj.toString()); context.setMethod("lottery"); LoggerStatistics log = new LoggerStatistics(context); log.loginfo(); // log.logger.error("111"); // SendMessage.getInstance().logger.error("aaa"); // new SendFailUserJob().work(); // new SendFailUserJob().logger.error("bbb"); // new RegisterUserExecute().logger.info("aaa1"); } }
6eaca49b-3916-4687-991e-b84e7fa8d4c1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-17 12:32:49", "repo_name": "AnetaK/hotel-management-system", "sub_path": "/src/main/java/pl/excercise/model/Address.java", "file_name": "Address.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 59, "lang": "en", "doc_type": "code", "blob_id": "d34a94a5bf58073c28bb0ecbf63247cca5d31c71", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/AnetaK/hotel-management-system
259
FILENAME: Address.java
0.246533
package pl.excercise.model; import javax.persistence.Embeddable; @Embeddable public class Address { private String street; private String zipCode; private String city; public String getStreet() { return street; } public String getZipCode() { return zipCode; } public String getCity() { return city; } public Address() { } public Address(String street, String zipCode, String city) { this.street = street; this.zipCode = zipCode; this.city = city; } @Override public String toString() { return "Address{" + "street='" + street + '\'' + ", zipCode='" + zipCode + '\'' + ", city='" + city + '\'' + '}'; } public Address withStreet(String street) { this.street = street; return this; } public Address withZipCode(String zipCode) { this.zipCode = zipCode; return this; } public Address withCity(String city) { this.city = city; return this; } public Address build() { return new Address(street, zipCode, city); } }
359af8b7-f410-4c94-995b-c660b5ffaa90
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-08-06 14:03:29", "repo_name": "breogangf/marvelSuperHero", "sub_path": "/app/src/main/java/com/fivelabs/marvelsuperhero/app/navigator/DefaultNavigator.java", "file_name": "DefaultNavigator.java", "file_ext": "java", "file_size_in_byte": 1092, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "62f64b3fbf8e4a96e95b5f46648327297b42e4b1", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/breogangf/marvelSuperHero
231
FILENAME: DefaultNavigator.java
0.26588
package com.fivelabs.marvelsuperhero.app.navigator; import android.app.Activity; import android.content.Intent; import android.content.res.Configuration; import com.fivelabs.marvelsuperhero.ui.view.Detail; import com.fivelabs.marvelsuperhero.ui.view.MainActivity; /** * Created by breogangf on 6/8/16. */ public class DefaultNavigator implements Navigator { protected Activity mActivity; protected void load(Intent intent) { mActivity.startActivity(intent); } public void loadActivity(Activity activity) { this.mActivity = activity; } @Override public void loadDetailView(int comicId) { int currentOrientation = getmActivity().getResources().getConfiguration().orientation; if (mActivity instanceof MainActivity && currentOrientation == Configuration.ORIENTATION_LANDSCAPE) { ((MainActivity) mActivity).showDetailView(comicId); } else { Intent intent = new Intent(mActivity, Detail.class); intent.putExtra("comicId", comicId); load(intent); } } public Activity getmActivity() { return mActivity; } }
0ac34df8-11da-4b9e-b5a2-f0c6569e5fe8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-29 18:51:45", "repo_name": "ALLISWELL-REPO/Welcome", "sub_path": "/SreenuTech-RTP35-Material-Details/SreenuTech-RTP35-Material-Details/EXAMPLES/REST/JSONPOCS/src/main/java/com/sreenutech/beans/Account.java", "file_name": "Account.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "ea34d84f920e7b61dd8a1deb7fcd26775fe766be", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ALLISWELL-REPO/Welcome
286
FILENAME: Account.java
0.261331
package com.sreenutech.beans; import com.fasterxml.jackson.annotation.JsonIgnoreType; //@JsonIgnoreType public class Account { private int cardNumber; private int cvvNumber; private String typeOfBank; private String nameOnCard; public int getCardNumber() { return cardNumber; } public void setCardNumber(int cardNumber) { this.cardNumber = cardNumber; } public int getCvvNumber() { return cvvNumber; } public void setCvvNumber(int cvvNumber) { this.cvvNumber = cvvNumber; } public String getTypeOfBank() { return typeOfBank; } public void setTypeOfBank(String typeOfBank) { this.typeOfBank = typeOfBank; } public String getNameOnCard() { return nameOnCard; } public void setNameOnCard(String nameOnCard) { this.nameOnCard = nameOnCard; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Account [cardNumber="); builder.append(cardNumber); builder.append(", cvvNumber="); builder.append(cvvNumber); builder.append(", typeOfBank="); builder.append(typeOfBank); builder.append(", nameOnCard="); builder.append(nameOnCard); builder.append("]"); return builder.toString(); } }
02be36a6-2cfd-464b-8ed3-678841fd4703
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2022-07-26T19:49:33", "repo_name": "kyoz/purify", "sub_path": "/kitty/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 973, "line_count": 36, "lang": "en", "doc_type": "text", "blob_id": "54973a6e9dd32593a4266a18e2b6be5535e10ff8", "star_events_count": 347, "fork_events_count": 41, "src_encoding": "UTF-8"}
https://github.com/kyoz/purify
289
FILENAME: README.md
0.239349
# Kitty > Purify theme for Kitty <p align="center"> <img src="https://i.imgur.com/9644OVJ.png" width="800px"> </p> ## Installation Download and copy `purify.conf` to `~/.config/kitty/` folder. ```sh # If you have wget $ wget -O ~/.config/kitty/purify.conf https://raw.githubusercontent.com/kyoz/purify/master/kitty/purify.conf # Or curl $ curl https://raw.githubusercontent.com/kyoz/purify/master/kitty/purify.conf -o ~/.config/kitty/purify.conf ``` Then open file `~/.config/kitty/kitty.conf` and include this line to the end of file ``` include purify.conf ``` Restart kitty to apply new colors. Or if you don't want to use a seperate file to config. Just edit colors in your `~/.config/kitty/kitty.conf` to match colors in [purify.conf](./purify.conf) ## References If you are using zsh, please take a look at [purify/zsh](https://github.com/kyoz/purify/tree/master/zsh) to get zsh config for purify. ## Lisence MIT © [Kyoz](mailto:banminkyoz@gmail.com)
13f923f3-b5cf-405c-8f7c-cacf72dd4761
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-01 15:17:28", "repo_name": "Jiaptti/AACDemo", "sub_path": "/app/src/main/java/com/aacdemo/repository/FavoriteRepository.java", "file_name": "FavoriteRepository.java", "file_ext": "java", "file_size_in_byte": 1069, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "497c7b16eb10daeebbd89dc66e7f1b9e29f82cca", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Jiaptti/AACDemo
200
FILENAME: FavoriteRepository.java
0.268941
package com.aacdemo.repository; import android.arch.lifecycle.LiveData; import com.aacdemo.persistence.database.AppDataBase; import com.aacdemo.persistence.entity.FavoriteEntity; import java.util.List; /** * Created by Administrator on 2018/3/29. */ public class FavoriteRepository { public static class SingletonHolder{ private static FavoriteRepository INSTANCE = new FavoriteRepository(); } public static FavoriteRepository getInstance(){ return SingletonHolder.INSTANCE; } public LiveData<FavoriteEntity> getFavorite(String name){ return AppDataBase.getInstance().favoriteDao().getFavorite(name); } public LiveData<List<FavoriteEntity>> loadFavorites(){ return AppDataBase.getInstance().favoriteDao().loadFavorites(); } public void insertFavorite(FavoriteEntity favoriteEntity){ AppDataBase.getInstance().favoriteDao().insertFavorite(favoriteEntity); } public void deleteFavorite(String id){ AppDataBase.getInstance().favoriteDao().deleteFavorite(id); } }
92710ff6-1669-4285-be47-77521dc128a2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-09 05:48:44", "repo_name": "basantbhandari/FlyingFishApp", "sub_path": "/app/src/main/java/com/example/dell/flyingfish/GameOver.java", "file_name": "GameOver.java", "file_ext": "java", "file_size_in_byte": 1055, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "5a3747225e49a6e007f36f7d5bb73dc2cbc41c79", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/basantbhandari/FlyingFishApp
184
FILENAME: GameOver.java
0.258326
package com.example.dell.flyingfish; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class GameOver extends AppCompatActivity { private Button play_again; private TextView score_message; private String score; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_game_over); play_again = findViewById(R.id.btn_play_again); score_message = findViewById(R.id.tv_score_message); score = getIntent().getExtras().get("score").toString(); play_again.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i = new Intent(GameOver.this,MainActivity.class); startActivity(i); } }); score_message.setText("score = " +score); } }
24dcf45b-e574-4a77-a06b-74ac0ba159c8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-03-04 00:20:37", "repo_name": "litterGuy/control", "sub_path": "/src/main/java/com/xinshang/control/utils/DateUtils.java", "file_name": "DateUtils.java", "file_ext": "java", "file_size_in_byte": 1256, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "69b57f3e646b382a7d2bb9ae27ed615946ccf3ba", "star_events_count": 2, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/litterGuy/control
298
FILENAME: DateUtils.java
0.268941
package com.xinshang.control.utils; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class DateUtils { /** * 获取每天的开始时间 00:00:00:00 * * @param date * @return */ public static Date getStartTime(Date date) { Calendar dateStart = Calendar.getInstance(); dateStart.setTime(date); dateStart.set(Calendar.HOUR_OF_DAY, 0); dateStart.set(Calendar.MINUTE, 0); dateStart.set(Calendar.SECOND, 0); return dateStart.getTime(); } /** * 获取每天的开始时间 23:59:59:999 * * @param date * @return */ public static Date getEndTime(Date date) { Calendar dateEnd = Calendar.getInstance(); dateEnd.setTime(date); dateEnd.set(Calendar.HOUR_OF_DAY, 23); dateEnd.set(Calendar.MINUTE, 59); dateEnd.set(Calendar.SECOND, 59); return dateEnd.getTime(); } /** * 获取现在时间 * * @return返回字符串格式 yyyy-MM-dd HH:mm:ss */ public static String getStringDate(Date date) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return formatter.format(date); } }
b0b7430e-ec07-4c64-907d-2a0e5e1002c2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-02-25T05:40:34", "repo_name": "UtkalHacks/Marvellous", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 972, "line_count": 34, "lang": "en", "doc_type": "text", "blob_id": "c9f0f59221eab3d4989aa7253d6e4b9d876ab8b5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/UtkalHacks/Marvellous
251
FILENAME: README.md
0.23231
# Classessment by team Marvellous ## Instructions for running it locally - We have divided the app into individual sections for modularity. - First, cd into rtmp-server and run node server. - Then, cd into student-understanding and run npm run dev - For running the discussion forum, cd into the backend2 folder and setup a virtual environment, install python dependencies , run python manage.py runserver 0.0.0.0:8000 - Next, to view teachers dashboard, enter into dashboard folder and run npm start - For checking face recognition, go into attendance folder and run npm run dev - Then you can view the respective apps at their respective ports. ## Technology used - React.js - Redux - Bootstrap - ffmpeg - NodesJS - Django - django rest framework - google vision api - kendo-ui - paralleldots API ## Team Members Soumya Ranjan Mohanty (@geekysrm) Amiya Kumar Tripathy (@amiya-1998) Bishal Subhadarshi Jena (@kiminohero) Aditya Prakash (@adityaprakash-bobby)
aad4dd7a-23b2-43d0-bd8c-ed6340e4729e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-14 17:25:22", "repo_name": "johjenmathew/SampleSpringProject", "sub_path": "/MedicalLaboratory/src/main/java/org/hospital/management/laboratory/dao/LoginServiceDaoImpl.java", "file_name": "LoginServiceDaoImpl.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "a545170f8ded2d986295fd6cd148dfcebaa879b8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/johjenmathew/SampleSpringProject
169
FILENAME: LoginServiceDaoImpl.java
0.245085
package org.hospital.management.laboratory.dao; import org.hibernate.SessionFactory; import org.hospital.management.laboratory.model.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.Transactional; @EnableTransactionManagement @Transactional @Repository public class LoginServiceDaoImpl implements LoginServiceDao { private SessionFactory sessionFactory; @Autowired public void setSessionFactory(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } public User findByUsername(String username) { User user = (User) this.sessionFactory.getCurrentSession().createQuery("from User where username = ?") .setParameter(0, username).list().get(0); System.out.println(user.getUsername() + " " + user.getPassword()); return user; } }
425da6e8-07a6-481a-af1f-a7f3e3b47f97
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-01-28 16:56:20", "repo_name": "paulhristea/Thoughts", "sub_path": "/app/src/main/java/com/paul/thoughts/util/Constants.java", "file_name": "Constants.java", "file_ext": "java", "file_size_in_byte": 1106, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "9862b357a5fec158bcccc3e9faec3f7041c220e8", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/paulhristea/Thoughts
295
FILENAME: Constants.java
0.249447
package com.paul.thoughts.util; /** * Contains constant values of use throughout the application. */ public interface Constants { String APP_NAME = "Thoughts"; String RESOURCE = "mobile"; String DOMAIN = "chat.safic.net"; String HOST = "104.223.91.142"; int PORT = 5222; String DEFAULT_PASSWORD = "qwerty1415"; String HTTP_PATH = "https://fcm.googleapis.com/fcm/"; String AUTHORIZATION_HEADER = "Authorization"; String CONTENT_TYPE_HEADER = "Content-Type"; String FIREBASE_SERVER_KEY = "key=AIzaSyAI6eU8w_5IXu7Ic8cWVeCWeFdbaU89J9M"; String JSON_TYPE = "application/json"; String FIREBASE_IDS_TOPIC = "/topics/firebaseIds"; String OPERATION_KEY = "operation"; String NAME_KEY = "name"; String OTHER_NAME_KEY = "otherName"; String ID_KEY = "id"; String TEXT_KEY = "text"; String OTHER_NAME_NOTIF_KEY = "otherNameNotification"; interface SharedPrefs { String KEY = "com.paul.thoughts.Thoughts"; String NAME = "name"; String FIREBASE_ID = "firebaseId"; String OTHER_NAME = "otherName"; } }
27d538ad-ad93-4016-bd01-1d4625d18e5f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-06 13:15:27", "repo_name": "merlinchacko/media-search", "sub_path": "/src/test/java/com/assignment/mediasearch/gateways/GoogleApiGatewayImplTest.java", "file_name": "GoogleApiGatewayImplTest.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "dc3649468a9619165f02e9321dd533f4ee7fcdb8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/merlinchacko/media-search
185
FILENAME: GoogleApiGatewayImplTest.java
0.236516
package com.assignment.mediasearch.gateways; import com.assignment.mediasearch.gateways.google.GoogleApiGatewayImpl; import com.assignment.mediasearch.model.MediaInfo; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import java.util.Collection; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @RunWith(SpringRunner.class) @SpringBootTest @ActiveProfiles("test") public class GoogleApiGatewayImplTest { @Autowired GoogleApiGatewayImpl googleApiGateway; @Test public void canRetrieveBookList() { Collection<MediaInfo> mediaInfos = googleApiGateway.retrieveBookList("bla"); assertNotNull(mediaInfos); assertEquals(10, mediaInfos.size()); } }
78d840c7-f570-431c-9bd2-e606a654406c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-10-02 16:49:20", "repo_name": "thomasjungblut/thomasjungblut-common", "sub_path": "/src/main/java/de/jungblut/datastructure/DistanceResult.java", "file_name": "DistanceResult.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "20a6f4444471624bd850fcc4a78fe9f710a448e4", "star_events_count": 40, "fork_events_count": 29, "src_encoding": "UTF-8"}
https://github.com/thomasjungblut/thomasjungblut-common
214
FILENAME: DistanceResult.java
0.278257
package de.jungblut.datastructure; /** * Immutable generic distance result that contains a document type object and * its distance (to some artificial queried document). * * @param <TYPE> the type of the document. * @author thomas.jungblut */ public class DistanceResult<TYPE> { private final double distance; private final TYPE document; /** * Create a new {@link DistanceResultImpl} with a distance and a document. * * @param distance the distance. * @param document the document. */ public DistanceResult(double distance, TYPE document) { this.distance = distance; this.document = document; } /** * @return the distance. */ public double getDistance() { return this.distance; } /** * @return the document. */ public TYPE get() { return this.document; } @Override public String toString() { return document + " | " + distance; } }
ba89f9e9-ad37-4f8b-aae6-72d392ec5096
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-27 03:47:33", "repo_name": "winelx/Mark", "sub_path": "/3DMark/app/src/main/java/com/example/administrator/a3dmark/child_pakage/User_agreement.java", "file_name": "User_agreement.java", "file_ext": "java", "file_size_in_byte": 1206, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "675421f8462e09af2c7e2c97872580c47e37829b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/winelx/Mark
250
FILENAME: User_agreement.java
0.187133
package com.example.administrator.a3dmark.child_pakage; import android.app.Activity; import android.os.Bundle; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; import com.example.administrator.a3dmark.R; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; /** * Created by Administrator on 2017/3/1. */ public class User_agreement extends Activity { @BindView(R.id.image_title_back) ImageView imageTitleBack; @BindView(R.id.tv_title_text) TextView tvTitleText; @BindView(R.id.tv_title_vice) TextView tvTitleVice; @BindView(R.id.image_title_message) ImageView imageTitleMessage; @BindView(R.id.edt_user_agreement) EditText edtUserAgreement; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.user_agreement); ButterKnife.bind(this); initView(); } private void initView() { tvTitleText.setText("意见反馈"); tvTitleVice.setText("提交"); } @OnClick(R.id.image_title_back) public void onClick() { finish(); } }
1e3e7d52-2750-4430-a0d2-596022fa98a2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-09-19T13:57:33", "repo_name": "Victoria-FZ-eng/Reading-Notes", "sub_path": "/code401/class-32.md", "file_name": "class-32.md", "file_ext": "md", "file_size_in_byte": 1193, "line_count": 27, "lang": "en", "doc_type": "text", "blob_id": "c6f7f3a0aaed939dd52f58ad860df2d65f2c77f0", "star_events_count": 0, "fork_events_count": 8, "src_encoding": "UTF-8"}
https://github.com/Victoria-FZ-eng/Reading-Notes
270
FILENAME: class-32.md
0.249447
# Serverless and Amplify * To build scalable full stack applications, powered by AWS. * Amplify supports popular web frameworks including JavaScript, React, Angular, Vue, Next.js, and mobile platforms including Android, iOS, React Native, Ionic, Flutter. Get to market faster with AWS Amplify. * benifits: 1. Configure backends fast 2. Seamlessly connect frontends 3. Deploy in a few clicks 4. Easily manage content ## API (GRAPHQL) ***Define*** your application's data model using the GraphQL Schema Definition Language (SDL) and the library handles converting your SDL definition into a set of fully descriptive AWS CloudFormation templates that implement your data model. The GraphQL Transform simplifies the process of developing, deploying, and maintaining GraphQL APIs. *Check the below references for more information* References: * [Intro to Serverless](https://hackernoon.com/what-is-serverless-architecture-what-are-its-pros-and-cons-cc4b804022e9) * [AWS Amplify Kool-Aid](https://aws.amazon.com/amplify/) * [GraphQL Intro (just read the header text, Quick Start, and @model sections)](https://docs.amplify.aws/cli/graphql-transformer/overview/)
efdc4812-23d3-4462-bfca-80ce55f1f2a5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-04 23:04:10", "repo_name": "pfinos/tpAndroid_PaolaFinos", "sub_path": "/app/src/main/java/ofa/cursos/android/app02/appreclamos/modelo/MyReclamoOpenHelper.java", "file_name": "MyReclamoOpenHelper.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "04bcf624caf78306b380cae9300626f4b10589e8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pfinos/tpAndroid_PaolaFinos
208
FILENAME: MyReclamoOpenHelper.java
0.247987
package ofa.cursos.android.app02.appreclamos.modelo; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class MyReclamoOpenHelper extends SQLiteOpenHelper { public static final String DATABASE_NAME = "misreclamos.db"; public static final int version=1; public MyReclamoOpenHelper(Context context){ super(context,DATABASE_NAME,null,version); } /* private String descripcion; private LatLng ubicacion; private Boolean resuelto; private String mailContacto; private String pathImagen; */ public void onCreate (SQLiteDatabase base){ base.execSQL("CREATE TABLE RECLAMOS (_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," + "DESCRIPCION TEXT, LAT DOUBLE, LNG DOUBLE, MAIL TEXT, RESUELTO INTEGER, PATHIMG TEXT)"); } @Override public void onUpgrade(SQLiteDatabase base, int i, int i1) { } }
cbdd04cf-fed6-4c0c-a644-6248786526d4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-04 17:33:47", "repo_name": "mamont0904/MyMoviesLibrary", "sub_path": "/com/github/mamont0904/mml/Main.java", "file_name": "Main.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "4d89eb24e514820a3562712013787838c8ca9116", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mamont0904/MyMoviesLibrary
191
FILENAME: Main.java
0.23793
package com.github.mamont0904.mml; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class Main extends Application { private final Controller controller = new Controller(); @Override public void start(Stage primaryStage) throws Exception{ FXMLLoader fxmlLoader = new FXMLLoader(); fxmlLoader.setLocation(getClass().getResource("MyMoviesLibrary.fxml")); Parent root = fxmlLoader.load(); controller.loadMoviesData(); ((MyMoviesLibrary)(fxmlLoader.getController())).setMainApp(this); primaryStage.setTitle("MyMoviesLibrary"); primaryStage.setScene(new Scene(root, 800, 600)); primaryStage.setResizable(false); primaryStage.show(); } public static void main(String[] args) { launch(args); } public Controller getController() { return controller; } }
5f39ab14-98fc-48ac-8d52-bdf4d4d4042d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-22 17:12:37", "repo_name": "kevinliao123/workout-partner", "sub_path": "/app/src/main/java/com/fruitguy/workoutpartner/chat/ChatMessageViewHolder.java", "file_name": "ChatMessageViewHolder.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "f11cf706acd9b16ed80d0c65531491be3d14f0f0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kevinliao123/workout-partner
237
FILENAME: ChatMessageViewHolder.java
0.252384
package com.fruitguy.workoutpartner.chat; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.fruitguy.workoutpartner.R; import com.fruitguy.workoutpartner.util.ImageUtils; import butterknife.BindView; import butterknife.ButterKnife; import de.hdodenhof.circleimageview.CircleImageView; public class ChatMessageViewHolder extends RecyclerView.ViewHolder { public View mView; @BindView(R.id.profile_image) CircleImageView mUserImage; @BindView(R.id.message) TextView mMessage; @BindView(R.id.upload_image) ImageView mUploadedImage; public ChatMessageViewHolder(View view) { super(view); mView = view; ButterKnife.bind(this, view); } public void setMessage(String message){ mMessage.setText(message); } public void setUserImage(Context context, String imageUrl) { ImageUtils.loadImage(context, imageUrl, mUserImage); } public void setUploadedImage(Context context, String imageUrl) { ImageUtils.loadImage(context, imageUrl, mUploadedImage); } }
375d6a88-d073-4b49-8f32-5816cf25775c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-07 05:17:48", "repo_name": "jdx100424/jiangdaxianJob", "sub_path": "/jiangdaxianJob-service/src/main/java/com/jiangdaxian/helloword/job/HellowordJob.java", "file_name": "HellowordJob.java", "file_ext": "java", "file_size_in_byte": 985, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "78f9daff0a270837101f8992ac3df802415404e6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jdx100424/jiangdaxianJob
234
FILENAME: HellowordJob.java
0.27048
package com.jiangdaxian.helloword.job; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import com.dangdang.ddframe.job.api.ShardingContext; import com.dangdang.ddframe.job.api.simple.SimpleJob; import com.jiangdaxian.helloword.service.HellowordService; public class HellowordJob implements SimpleJob { @Autowired private HellowordService hellowordService; private static final Logger LOGGER = LoggerFactory.getLogger(HellowordJob.class); public void execute(ShardingContext context) { LOGGER.info("{},shardingItem:{},totalCount:{}", context.getJobName(), context.getShardingItem(), context.getShardingTotalCount()); LOGGER.info("{},{}", context.getJobName(), context.toString()); switch (context.getShardingItem()) { case 0: LOGGER.info("run time:{}",hellowordService.getNowTime()); LOGGER.info("ElasticJobTask name:{} is start", context.getJobName()); default: break; } } }
16d63c69-8868-4b78-96a2-7452a118237a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-17 13:16:17", "repo_name": "wuzhong290/Demo_ybs", "sub_path": "/app/src/main/java/com/ybs/demo_ybs/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1104, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "095f1167734fb90da2cdc063082503087687a6cd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wuzhong290/Demo_ybs
210
FILENAME: MainActivity.java
0.243642
package com.ybs.demo_ybs; import android.annotation.SuppressLint; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.content.Intent; import android.util.Log; import android.view.KeyEvent; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getAppData(); } @SuppressLint("WrongConstant") private void getAppData() { Intent intent=getIntent(); if(intent.getFlags()==101){ String data_str = intent.getStringExtra("data"); Log.i("tag", data_str); //tag: 调用者传递过来的数据 } } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { Intent intent = new Intent(); Bundle bundle = new Bundle(); bundle.putString("return_data", "return_data"); intent.putExtras(bundle); setResult(10,intent); return super.onKeyDown(keyCode, event); } }
9cbe702d-b5df-4319-b8d2-d67a4d1f287a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-09-14T02:33:45", "repo_name": "Bubblemelon/inedible-py", "sub_path": "/python-networks/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 972, "line_count": 28, "lang": "en", "doc_type": "text", "blob_id": "a0a04b12738bc202b5b97e04404615a452e4fa52", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Bubblemelon/inedible-py
230
FILENAME: README.md
0.256832
# python-networks Network programming in Python. ## Content <!-- ### [LegacyRouter](python-networks/LegacyRouter) ### [TCP](python-networks/TCP) #### [Client_Chat](python-networks/TCP/Client_Chat) ### [Find_Connection_Order](python-networks/TCP/Find_First_Client) --> ### [UDP](python-networks/UDP) A simple UDP Client and Server program. Execute the Client program to send a string message to the UDP Sever. The string message is then sent back to the Client in capitalized form (all uppercase characters) and then the Client program terminates. See [demo](python-networks/UDP). ### [UDP_Pinger](python-networks/UDP_Pinger) A Client program that pings the UDP Server program with a given message string, and an optional number of pings. Completes the number of pings by ending with `ping` statistics similar to `iputil`. An extended functionality of UDP Client and Server from the [UDP](python-networks/UDP) directory. See [demo](/python-networks/UDP_Pinger).
c6587788-bdcc-4a67-a8c1-f7390bf5eb5b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-01 00:13:18", "repo_name": "Luqaiz/Java", "sub_path": "/untitled/src/sample/Controller.java", "file_name": "Controller.java", "file_ext": "java", "file_size_in_byte": 1086, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "8269f242781c797752c3508eac0d5ad1ecf28ff4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Luqaiz/Java
219
FILENAME: Controller.java
0.205615
package sample; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.fxml.FXML; import javafx.scene.control.*; import javafx.scene.input.MouseEvent; import java.time.LocalDate; public class Controller { @FXML private TextField txtNombre; @FXML private TextField txtApellido; @FXML private TextField txtDireccion; @FXML private ComboBox txtLocalidad; @FXML private DatePicker txtFecha; @FXML private CheckBox txtCierre; @FXML private Button txtBoton; @FXML private Button txtBotonDos; public void aceptar (MouseEvent args){ if (txtNombre.getText().equals("")) { System.out.println("complete el nombre"); } } public void initialize (){ txtFecha.setValue(LocalDate.now()); txtLocalidad.setValue("banfield"); txtLocalidad.setItems(listaLoc); } ObservableList <String> listaLoc = FXCollections.observableArrayList("banfield","adrogue","avellaneda"); }
232eb774-c8bd-4f7b-9b8e-83294a94ab44
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-13 02:00:50", "repo_name": "luhanlin/bigdata", "sub_path": "/kafka/src/main/java/com/bigdata/kafka/producer/StringProducer.java", "file_name": "StringProducer.java", "file_ext": "java", "file_size_in_byte": 1072, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "71e6ab848d545bd4f9a6074051b375ccff16e7a4", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/luhanlin/bigdata
215
FILENAME: StringProducer.java
0.204342
package com.bigdata.kafka.producer; import com.bigdata.kafka.config.KafkaConfig; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.common.serialization.StringDeserializer; import org.apache.kafka.common.serialization.StringSerializer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class StringProducer { private static final Logger LOG = LoggerFactory.getLogger(StringProducer.class); private static int threadSize = 6; /** * 生产单条消息 * @param topic * @param record */ public static void producer(String topic,String record){ KafkaProducer producer = KafkaConfig.getInstance().getProducer(); ProducerRecord<String, String> keyedMessage = new ProducerRecord<>(topic, record); producer.send(keyedMessage); LOG.info("发送数据"+record+"到kafka成功"); // producer.close(); } public static void main(String[] args) { producer("test01","hello kafka"); } }
eb8429c2-05f8-4c6c-9a74-4b23617f5829
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-05-29 09:30:57", "repo_name": "SocialJourneys/ecosystem.socialmedia", "sub_path": "/src/test/java/uk/ac/dotrural/irp/ecosystem/socialmedia/AnnotationCreatorTest.java", "file_name": "AnnotationCreatorTest.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "687305e5cb0c22ae736b813b0f42285a4cfbc038", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/SocialJourneys/ecosystem.socialmedia
214
FILENAME: AnnotationCreatorTest.java
0.286169
package uk.ac.dotrural.irp.ecosystem.socialmedia; import java.rmi.NotBoundException; import java.rmi.RemoteException; import java.util.List; import java.util.UUID; import com.ontotext.kim.client.corpora.KIMAnnotation; import junit.framework.TestCase; public class AnnotationCreatorTest extends TestCase { public static final String TEST_NS = "http://www.example.com/"; protected void setUp() throws Exception { super.setUp(); } protected void tearDown() throws Exception { super.tearDown(); } public void testCreateAnnotations() throws RemoteException, NotBoundException { EntityExtractor ee = new EntityExtractor(); List<KIMAnnotation> annotations = ee .identifyEntities(EntityExtractorTest.srcMsg); AnnotationCreator ac = new AnnotationCreator(); List<String> updates = ac.createAnnotations( "http://www.example.com/tweet/" + UUID.randomUUID().toString(), annotations, TEST_NS); for (String s: updates){ System.out.println(s); } } }
032de950-aa17-45dc-bcaf-01bfb1b8bad1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-10-10T00:37:38", "repo_name": "windy1/TunaChat", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1194, "line_count": 27, "lang": "en", "doc_type": "text", "blob_id": "36f00bdcc2bb2acf758baced0e2479c2239bb395", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/windy1/TunaChat
276
FILENAME: README.md
0.201813
TunaChat ======== Programming assignment #1 for Prof. Christian Skalka. Included are both client and (partial) server implementations of the UVMPM protocol. I've included both in my submission because there is some overlap in files they use, but only the client should be considered "complete". After the provided server was made available, I practically abandoned the server and only tested on the live server provided. Building -------- This project was compiled on macOS 10.12.6 (Sierra) with CMake and CLion for C++17. The project also links the Curses library which is required for the client. Running ------- Start the client with `./TunaChat --client`. The client should be executed one-down from the root directory of the project due to relative file paths. This application must be run in Terminal; do not run in an IDE. Usage ----- Type `/help` for a full list of commands. You can use `/connect [host] [port]` to connect to a server and `/auth [user] [pass]` to authenticate. The arguments for both of these commands are optional and have their defaults defined in `files/conf.txt`. You can modify user preferences with `/pref <key> <value>` and list them with `/prefs`.
16c6a437-7ea5-418f-a3d1-bbf34fba22d7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-21 13:36:39", "repo_name": "mahmoudhakam/Springboot-akka-cache", "sub_path": "/Springboot-Akka/src/main/java/com/se/part/search/dto/export/ParametricFeatureDTO.java", "file_name": "ParametricFeatureDTO.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "fe4351f099da29a3d60cbcc7f10df72a4a51a509", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mahmoudhakam/Springboot-akka-cache
202
FILENAME: ParametricFeatureDTO.java
0.2227
package com.se.part.search.dto.export; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import com.fasterxml.jackson.annotation.JsonProperty; @XmlAccessorType(XmlAccessType.FIELD) public class ParametricFeatureDTO implements BOMResultParent { @JsonProperty("FeatureName") private String featureName; @JsonProperty("FeatureUnit") private String featureUnit; @JsonProperty("FeatureValue") private String featureValue; public ParametricFeatureDTO() { } public String getFeatureName() { return featureName; } public void setFeatureName(String featureName) { this.featureName = featureName; } public String getFeatureUnit() { return featureUnit; } public void setFeatureUnit(String featureUnit) { this.featureUnit = featureUnit; } public String getFeatureValue() { return featureValue; } public void setFeatureValue(String featureValue) { this.featureValue = featureValue; } }
d42f372c-5ea8-4391-9ac2-66d05cc6a561
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-09-26 14:41:45", "repo_name": "zipsoft/widgets", "sub_path": "/widgets-root/widgets/src/main/java/com/zipsoft/widgets/DataSourceException.java", "file_name": "DataSourceException.java", "file_ext": "java", "file_size_in_byte": 1042, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "00dac8c06e3a19110bbdfa47d8af6091d2b68c38", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zipsoft/widgets
223
FILENAME: DataSourceException.java
0.220007
package com.zipsoft.widgets; public class DataSourceException extends Exception { private static final long serialVersionUID = 1924584777047434430L; public static final String BORING_GENERIC_ERROR_MESSAGE = "Sorry, something seems to be wrong with our database :("; public DataSourceException() { super(); } /** * @deprecated If you know enough about the exception to write a string * description, consider subclassing {@link DataSourceException} * instead. */ @Deprecated public DataSourceException(final String arg0, final Throwable arg1) { super(arg0, arg1); } /** * @deprecated If you know enough about the exception to write a string * description, consider subclassing {@link DataSourceException} * instead. */ @Deprecated public DataSourceException(final String arg0) { super(arg0); } public DataSourceException(final Throwable arg0) { super(arg0); } }
cc46bcc8-989c-4fbb-832d-cc4804f8a7a3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-05 10:39:32", "repo_name": "adz99IT/ServerJson", "sub_path": "/src/Controller.java", "file_name": "Controller.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "39e4b7363f6d2845e32bf4866d5a554005858213", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/adz99IT/ServerJson
212
FILENAME: Controller.java
0.23231
import javafx.application.Application; public class Controller { private Model m; public void start(){ //////SETTINGS int port = 8189; String ipServer = "poggivpn.ddns.net"; ////////////// ClientListener cl = new ClientListener(m, port); //thread del controller che gestisce i socket in ingresso Application.launch(View.class, ipServer, Integer.toString(port)); } public void setModel(Model m){ if(this.m == null) { this.m = m; start(); } } /*@FXML public void buttonHandler(ActionEvent actionEvent) { m.setState(!m.getState()); if(m.getState()) { button.setText("TURN OFF"); button.setStyle("-fx-background-color: #42f548; "); }else{ button.setText("TURN ON"); button.setStyle("-fx-background-color: #fa1100; "); } System.out.println(m.getState()); }*/ }
78e7da6c-01fa-4e6d-a23c-2fcbab487d5c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2013-08-30T18:02:37", "repo_name": "programble/avery", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1093, "line_count": 33, "lang": "en", "doc_type": "text", "blob_id": "6ad83650c28e37acdd2036bdce6b882b5c67d551", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/programble/avery
245
FILENAME: README.md
0.214691
# Avery Web MPD client ## Set up ```bash npm install -g bower # Install Bower if you do not already have it npm install && bower install # Fetch dependencies node app # Launch Avery node app --headless # Start Avery's server without opening a browser node app --port 5510 # Start Avery's server on a different port ``` ## License Copyright © 2013, Curtis McEnroe <programble@gmail.com> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
5f478705-c72c-44cd-affa-15c87d097ca0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-15 15:03:43", "repo_name": "harrynotpotter/moy_sklad", "sub_path": "/src/main/java/com/example/moy_sklad/models/entity/Receipt.java", "file_name": "Receipt.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "352c745944e9a2065a4bb136554d48a4adc6b8cd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/harrynotpotter/moy_sklad
193
FILENAME: Receipt.java
0.280616
package com.example.moy_sklad.models.entity; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import javax.validation.constraints.Min; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.math.BigDecimal; import java.util.List; @NoArgsConstructor @Data @Entity public class Receipt { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int number; @Min(value = 1) private int quantity; @NotNull private BigDecimal purchasePrice; @ManyToOne @JoinColumn(name="storage_id") @JsonProperty(value ="storage_id" ) @NotNull private Storage storageId; @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE, CascadeType.DETACH, CascadeType.REFRESH}) @JoinColumn(name="product_id") @JsonProperty(value ="product_id" ) @NotNull private Product product; }
bd67f52f-a727-460a-baa6-5d201789542e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-08-16T18:05:02", "repo_name": "condrici/file-uploader", "sub_path": "/README.MD", "file_name": "README.MD", "file_ext": "md", "file_size_in_byte": 1088, "line_count": 31, "lang": "en", "doc_type": "text", "blob_id": "e4296856b63260f9af7e5838e85d716eede51cba", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/condrici/file-uploader
220
FILENAME: README.MD
0.273574
# CSV Image Bulk Uploader Simple application for bulk uploading images via CSV files. The CSV header column names are ignored, but the functionality expects certain values for each one of the row columns as defined in the custom file definition in the codebase. By default, the project runs in a dev environment which provides the Symfony Profiler toolbar to ease troubleshooting. Switching to prod is also possible by updating /symfony/.env. ## Installation ./docker/install ## User Guide Upload Images\ http://localhost/image/upload List all images \ http://localhost/image/list Preview an image by its unique id\ http://localhost/image/preview/uniqueId ## Technical Details The application uses the Symfony framework and the main functionality can be found below: * symfony/src/Controller * symfony/src/Service The command below is always triggered after running the project with ./docker/install. However, should you need to use other docker-compose commands to restart the containers, don't forget to run: docker-compose exec php sh -c "bin/console messenger:consume -vv"
8b7189bc-d74e-4252-877c-43db3f24c61e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-10-22 18:56:38", "repo_name": "lalva/cs356.assignment1.iClicker", "sub_path": "/src/edu/csupomona/cs356/iclicker/Question.java", "file_name": "Question.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "ec5f6285f79d2747a6708f17b74eb2edadee8671", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lalva/cs356.assignment1.iClicker
209
FILENAME: Question.java
0.26588
package edu.csupomona.cs356.iclicker; import java.util.ArrayList; // Abstract class for Single/Multi choice questions // Stores the question in `q`, all the available answer choices // in `choices`, and the correct choices in `correct` public abstract class Question { protected String q; protected ArrayList<String> choices; protected ArrayList<String> correct; public Question(String question, ArrayList<String> choices, ArrayList<String> correct) { this.q = question; this.choices = choices; this.correct = correct; } // Getter for the question. public String getQuestion() { return this.q; } // Getter for the choices public ArrayList<String> getChoices() { return this.choices; } // Make sure a choice is valid public boolean inChoices(String submission) { return this.choices.contains(submission); } // A prototype method for checking answer(s) public abstract String checkA(ArrayList<String> submittedAnswers); }
3a103951-6f89-4fe2-a6f3-9332f26ad0ab
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-27 11:27:53", "repo_name": "KayTin-58/Datamining_System", "sub_path": "/src/main/java/com/zhang/service/chart/data/Series.java", "file_name": "Series.java", "file_ext": "java", "file_size_in_byte": 999, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "070a7f8f225fc2ef0e31b4144607720a001f8bd5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/KayTin-58/Datamining_System
222
FILENAME: Series.java
0.279042
package com.zhang.service.chart.data; import java.io.Serializable; import java.util.Arrays; /** * Created by 直到世界尽头 on 2018/4/19. */ public class Series implements Serializable{ private String name; private int[] data; public String getName() { return name; } public void setName(String name) { this.name = name; } public int[] getData() { return data; } public void setData(int[] data) { this.data = data; } @Override public int hashCode() { int r=17; r+=this.name.hashCode(); return r; } @Override public boolean equals(Object obj) { if(obj == this) return true; if(!(obj instanceof Series)) return false; Series series = (Series) obj; return series.getName().equals(this.getName()); } @Override public String toString() { return name+"--"+ Arrays.toString(this.data); } }
933bc0ef-c6ff-4b85-b5cb-759d1abb136c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-31 08:19:31", "repo_name": "liuershi/cloud2020", "sub_path": "/cloud-provider-hystrix-payment8001/src/main/java/cn/infocore/springcloud/controller/PaymentController.java", "file_name": "PaymentController.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "4754107ebaf4594ffd3f82174ef8cf6c7bb8030a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/liuershi/cloud2020
258
FILENAME: PaymentController.java
0.203075
package cn.infocore.springcloud.controller; import cn.infocore.springcloud.service.PaymentService; import cn.infocore.springcloud.service.serviceImpl.PaymentServiceImpl; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** * @Author wei.zhang@infocore.cn * @Date 2020/5/8 10:21 * @Description */ @RestController public class PaymentController { @Resource private PaymentService service; @Resource private PaymentServiceImpl serviceImpl; @GetMapping(value = "/payment/hystrix/ok/{id}") public String getPaymentInfo_ok(@PathVariable("id") Integer id) { return service.getPaymentInfo_ok(id); } @GetMapping(value = "/payment/hystrix/timeout/{id}") public String getPaymentInfo_timeout(@PathVariable("id") Integer id) { return service.getPaymentInfo_timeout(id); } @GetMapping(value = "/payment/hystrix/circuitBreak/{id}") public String paymentCircuitBreaker(@PathVariable("id") Integer id) { return serviceImpl.paymentCircuitBreaker(id); } }
b11d9f84-ae5a-4c9c-9709-e0e7ae2a2ddc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-20 11:12:04", "repo_name": "yelang10000/power", "sub_path": "/src/main/java/com/sun/power/core/shiro/login/dto/UserRedisVo.java", "file_name": "UserRedisVo.java", "file_ext": "java", "file_size_in_byte": 1064, "line_count": 49, "lang": "zh", "doc_type": "code", "blob_id": "44da9c19d25bbd7ab52b85bca4dee75f8697e8c0", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yelang10000/power
238
FILENAME: UserRedisVo.java
0.194368
package com.sun.power.core.shiro.login.dto; import com.fasterxml.jackson.databind.ser.std.SerializableSerializer; import com.sun.power.core.shiro.ShiroUser; import com.sun.power.modules.system.rule.dto.ResultRuleVo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; import java.util.List; /** * @author : 贾涛 * @date : 2019/3/29 13:56 */ @Data public class UserRedisVo implements Serializable { private static final long serialVersionUID = 1L; /** * 用户名 */ private String username; /** * taken */ private String token; //登录用户信息 @ApiModelProperty(value="用户信息",hidden=true) private ShiroUser userInfo; //权限名称列表 @ApiModelProperty(value="权限列表",hidden=true) private List<String> authorityList; //权限名称列表 @ApiModelProperty(value="资源列表",hidden=true) private List<ResultRuleVo> ruleList; //老干部局可查询组织id列表 private String dataAuthSql; }
a570447a-93d5-4bcb-bd6e-da8d42bdd834
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-21 22:42:34", "repo_name": "madail/Restaurant_IS-1", "sub_path": "/src/main/java/restaurant/entity/personal/Invoice.java", "file_name": "Invoice.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "2faf0181114e66337cf143e47cd165eac091b995", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/madail/Restaurant_IS-1
233
FILENAME: Invoice.java
0.253861
package restaurant.entity.personal; import java.io.File; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.util.Date; public class Invoice { private Date invoiceDate; //private Waiter waiter; private Double total; private String comanda; private String table; public Invoice(){ invoiceDate = new Date(); } public Double calculateTotal(String comanda){ total = 0.0; return total; } public void generate(){ PrintWriter pw = null; try { pw = new PrintWriter("Bill_"+invoiceDate.toString()+".txt", "UTF-8"); pw.println("Date: " + invoiceDate); pw.println("Table: " + table); pw.println("Order: " + comanda); pw.println(); calculateTotal("gcsvhbxn"); pw.println(total); pw.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (NullPointerException e) { e.printStackTrace(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } }
c545aadb-f2c0-46ba-b169-68d65a56c828
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-09 05:30:57", "repo_name": "nehajana/featuringfood", "sub_path": "/app/src/main/java/shubham/com/featurringfooddelivery/PaymentDelever/GetAddressModel.java", "file_name": "GetAddressModel.java", "file_ext": "java", "file_size_in_byte": 1053, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "57f34313a255e613ce40d7cabb5487231d4450a2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nehajana/featuringfood
210
FILENAME: GetAddressModel.java
0.204342
package shubham.com.featurringfooddelivery.PaymentDelever; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import shubham.com.featurringfooddelivery.OrderHistoryScreen.Fragment.profilemodel.ProfileDatamodel; public class GetAddressModel { @SerializedName("status") @Expose private String status; @SerializedName("message") @Expose private String message; @SerializedName("GetSingleAddress") @Expose private GetDataAddressModel getSingleAddress; public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public GetDataAddressModel getGetSingleAddress() { return getSingleAddress; } public void setGetSingleAddress(GetDataAddressModel getSingleAddress) { this.getSingleAddress = getSingleAddress; } }
15a0a362-aad7-4945-98f4-27e359dbb5ac
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-07-15 20:59:19", "repo_name": "doubotis/DialogDesignerSC2", "sub_path": "/src/com/doubotis/sc2dd/adapters/CheckedListAdapter.java", "file_name": "CheckedListAdapter.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "9a6e143c0d6061b162f6f032b46b8d9e2cd02464", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/doubotis/DialogDesignerSC2
213
FILENAME: CheckedListAdapter.java
0.27513
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.doubotis.sc2dd.adapters; import java.util.HashMap; import java.util.List; import javax.swing.DefaultListModel; /** * * @author Christophe */ public class CheckedListAdapter extends DefaultListModel<String> { private HashMap<String, Boolean> mCheckedMap = new HashMap<String, Boolean>(); private List<String> mValues = null; public CheckedListAdapter(List<String> values) { mValues = values; mCheckedMap.clear(); for (String o : mValues) { addElement(o); mCheckedMap.put(o, Boolean.TRUE); } } public boolean isChecked(String o) { return mCheckedMap.get(o); } public void setChecked(String o, boolean b) { mCheckedMap.put(o, b); } }
d5f0154a-2f92-444d-9ff3-aeb20174d2bc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-31 17:38:40", "repo_name": "CL2228/Princeton-Algs4", "sub_path": "/1_3_Stacks_and_Queues/src/QueueOfStrings.java", "file_name": "QueueOfStrings.java", "file_ext": "java", "file_size_in_byte": 1066, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "b8de9ac50fbf1df478f80585a7bd715455c08438", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/CL2228/Princeton-Algs4
228
FILENAME: QueueOfStrings.java
0.285372
import org.w3c.dom.Node; public class QueueOfStrings { private int size; private Node first; private Node last; public QueueOfStrings(){ first = null; last = null; size = 0; } public void enqueue(String item){ size++; if (size == 1) { first = new Node(); first.item = item; first.next = null; last = new Node(); last = first; }else { Node oldlast = last; last = new Node(); oldlast.next = last; last.next = null; last.item = item; } } public String dequeue(){ if (size > 0){ String item = first.item; first = first.next; size--; return item; } else throw new IllegalArgumentException("shabi"); } public boolean isEmpty(){ return (size <= 0); } public int size(){ return size; } private class Node{ Node next; String item; } }
e857a65c-8e57-43ee-ae2f-420c46e70833
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-13 10:56:25", "repo_name": "Iulia0/Application_Programming", "sub_path": "/src/Assignment_2/GameFrame.java", "file_name": "GameFrame.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "aa65b0cdf506a6dad5d8c0264524b529dc5f4c5d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Iulia0/Application_Programming
203
FILENAME: GameFrame.java
0.279828
package Assignment_2; import javax.swing.*; import java.awt.*; import java.awt.event.KeyEvent; import java.awt.event.KeyAdapter; import java.io.IOException; public class GameFrame extends JFrame { Pong myPong = new Pong(); // This is the panel of the game class public GameFrame() throws IOException { this.setResizable(false); this.setMinimumSize(new Dimension(myPong.getFrameWidth(), myPong.getFrameHeight())); this.setMaximumSize(new Dimension(myPong.getFrameWidth(), myPong.getFrameHeight())); getContentPane().add(BorderLayout.CENTER, myPong); setTitle("Iulia Petria, 1601159"); this.setVisible(true); setDefaultCloseOperation(EXIT_ON_CLOSE); this.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent e) { myPong.keyPressed(e); } public void keyReleased(KeyEvent e) {myPong.keyReleased(e); } }); } }
3429e3d1-3dd0-4128-a499-9b6e2ab8658a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-19 19:42:22", "repo_name": "tingley/globalsight", "sub_path": "/main6/envoy/src/java/com/globalsight/everest/workflow/schedule/OneTimeSchedule.java", "file_name": "OneTimeSchedule.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "64ec5a55dd78583ccaa4232f85d7a5114eab3395", "star_events_count": 7, "fork_events_count": 6, "src_encoding": "UTF-8"}
https://github.com/tingley/globalsight
188
FILENAME: OneTimeSchedule.java
0.262842
package com.globalsight.everest.workflow.schedule; import java.util.Calendar; import javax.servlet.http.HttpServletRequest; import com.globalsight.everest.workflow.Activity; public class OneTimeSchedule extends CompleteScheduleItem { public OneTimeSchedule(ActivityCompleteSchedule schedule) { super(schedule); } @Override public boolean matchTheType() { return getSchedule().getScheduleType() == Activity.COMPLETE_TYPE_ONE_TIME; } @Override public void updateScheduleValue(HttpServletRequest request) { // do nothing } @Override public boolean autoComplete() { if (!matchTheType()) return false; ActivityCompleteSchedule schedule = getSchedule(); Calendar start = schedule.getStartTime(); return getNow().after(start); } @Override protected String validateData(HttpServletRequest request) { return null; } }
ba497861-d8c7-4462-8abb-a1e7026cea14
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-05-31 05:54:39", "repo_name": "ciusy/my-stock-jcf", "sub_path": "/ my-stock-jcf/leohis/src/leo/entity/EugenicsModule.java", "file_name": "EugenicsModule.java", "file_ext": "java", "file_size_in_byte": 1193, "line_count": 70, "lang": "en", "doc_type": "code", "blob_id": "cb2689a72aef1cbe9cc9b41b753829d58d61d75b", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/ciusy/my-stock-jcf
270
FILENAME: EugenicsModule.java
0.273574
package leo.entity; /** * EugenicsModule entity. @author MyEclipse Persistence Tools */ public class EugenicsModule implements java.io.Serializable { // Fields private Long moduleId; private String remarks; private String title; private String content; // Constructors /** default constructor */ public EugenicsModule() { } /** minimal constructor */ public EugenicsModule(Long moduleId) { this.moduleId = moduleId; } /** full constructor */ public EugenicsModule(Long moduleId, String remarks, String title, String content) { this.moduleId = moduleId; this.remarks = remarks; this.title = title; this.content = content; } // Property accessors public Long getModuleId() { return this.moduleId; } public void setModuleId(Long moduleId) { this.moduleId = moduleId; } public String getRemarks() { return this.remarks; } public void setRemarks(String remarks) { this.remarks = remarks; } public String getTitle() { return this.title; } public void setTitle(String title) { this.title = title; } public String getContent() { return this.content; } public void setContent(String content) { this.content = content; } }
96afded0-09d7-4e5e-9911-fc843e1d3433
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-08 02:43:31", "repo_name": "CareCoder/wechat_payment", "sub_path": "/src/main/java/com/itstyle/domain/log/SysLogger.java", "file_name": "SysLogger.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "614bf8a27b7b4edc225c1c441fbe7292d16c8176", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/CareCoder/wechat_payment
197
FILENAME: SysLogger.java
0.249447
package com.itstyle.domain.log; import lombok.Data; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import javax.persistence.*; import java.io.Serializable; import java.util.Date; @Data @Entity @Table(name = "sys_log") @EntityListeners(AuditingEntityListener.class) public class SysLogger implements Serializable { @Id @GeneratedValue private Long id; private String username; private String action; private String tDescribe; private Long roleId; @Column(columnDefinition = "DATETIME DEFAULT CURRENT_TIMESTAMP") @CreatedDate private Date logDate; public SysLogger() {} public SysLogger(String username, Long roleId, String action, String tDescribe, Date logDate) { this.username = username; this.roleId = roleId; this.action = action; this.tDescribe = tDescribe; this.logDate = logDate; } }
5f92ec75-1a47-48cf-9ea2-e583b86e5932
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-12 16:11:46", "repo_name": "bkoripalli/review-microservice", "sub_path": "/src/main/java/com/ms/reviews/event/listener/ReviewSequenceEventListener.java", "file_name": "ReviewSequenceEventListener.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "4b6b245615ca0a44cd6a5ce008cc7d9bb0da8310", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bkoripalli/review-microservice
176
FILENAME: ReviewSequenceEventListener.java
0.267408
package com.ms.reviews.event.listener; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener; import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent; import org.springframework.stereotype.Component; import com.ms.reviews.domain.Review; import com.ms.reviews.generator.ReviewSequenceGenerator; @Component public class ReviewSequenceEventListener extends AbstractMongoEventListener<Review> { private static final String SEQUENCE_NAME = "review_sequences"; private ReviewSequenceGenerator sequenceGenerator; @Autowired public ReviewSequenceEventListener(ReviewSequenceGenerator sequenceGenerator) { this.sequenceGenerator = sequenceGenerator; } @Override public void onBeforeConvert(BeforeConvertEvent<Review> event) { if (event.getSource().getId() < 1) { event.getSource().setId(sequenceGenerator.generateSequence(SEQUENCE_NAME)); } } }
25cae61e-65aa-4d3d-97f7-8361bf8b0bda
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-18 09:36:49", "repo_name": "Anbiu/XImageLoader", "sub_path": "/app/src/main/java/com/anbi/ximageloader/cache/MemoryCache.java", "file_name": "MemoryCache.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "9938e0d653296985863392542708c27e2ce75a65", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Anbiu/XImageLoader
288
FILENAME: MemoryCache.java
0.282988
package com.anbi.ximageloader.cache; import android.graphics.Bitmap; import android.util.LruCache; /** * @description: 在内存中缓存 * @author: anbi * @time: 2020-03-18 15:50 */ public class MemoryCache implements ImageCache{ //图片缓存 private LruCache<String, Bitmap> mImageCache; /** * 构造 */ public MemoryCache() { initMemoryCache(); } /** * 初始化 */ private void initMemoryCache() { //计算可使用的最大内存 int maxCache = (int) Runtime.getRuntime().maxMemory(); //使用1/8作为图片缓存 int cacheSize = maxCache / 8; mImageCache = new LruCache<String, Bitmap>(cacheSize) { @Override protected int sizeOf(String key, Bitmap value) { //单个元素所占内存 return value.getHeight() * value.getHeight() / 1024; } }; } public void put(String url, Bitmap bitmap) { mImageCache.put(url, bitmap); } public Bitmap get(String url) { System.out.println("读取缓存"); return mImageCache.get(url); } }
9cb7d012-2ac8-40ce-be4b-ac7c0b3dc905
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-30 07:08:07", "repo_name": "persones/SoundStrand", "sub_path": "/Eclipse/src/soundstrand/HarmonyTextView.java", "file_name": "HarmonyTextView.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "491d0b0ec660e27a1c193a5b19a0e02677f6fe08", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/persones/SoundStrand
209
FILENAME: HarmonyTextView.java
0.283781
package soundstrand; import java.util.ArrayList; import javax.swing.JTextArea; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; @SuppressWarnings("serial") public class HarmonyTextView extends JTextArea implements ChangeListener { public HarmonyTextView() { } public HarmonyTextView(Strand inStrand) { setStrand(inStrand); } public void setStrand(Strand s) { if (strand != null) { strand.removeHarmonyListener(this); } strand = s; if (strand != null) { strand.addHarmonyChangeListener(this); } repaint(); } @Override public void stateChanged(ChangeEvent e) { selectAll(); replaceSelection(null); ArrayList<String> text = strand.getHarmonyUpdater().getOutput(); for (int i = 0; i < text.size(); i++) { append(text.get(i)); } repaint(); } private Strand strand; }
08245d29-fa64-4ee3-bf28-2ec5c53ab18f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-05 10:17:04", "repo_name": "sashikab85/monitoring-system", "sub_path": "/src/main/java/com/matific/model/LoginResponse.java", "file_name": "LoginResponse.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 72, "lang": "en", "doc_type": "code", "blob_id": "c92b90b53f18d8c8e2ec1d854cdd3588683a6fbd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sashikab85/monitoring-system
270
FILENAME: LoginResponse.java
0.23793
package com.matific.model; /** * The type Login response. */ public class LoginResponse { private String message; private String jwt; /** * Instantiates a new Login response. * * @param jwt the jwt * @param message the message */ public LoginResponse(String jwt, String message) { this.jwt = jwt; this.message = message; } /** * Instantiates a new Login response. */ public LoginResponse() { } /** * Gets message. * * @return the message */ public String getMessage() { return message; } /** * Sets message. * * @param message the message */ public void setMessage(String message) { this.message = message; } /** * Gets jwt. * * @return the jwt */ public String getJwt() { return jwt; } /** * Sets jwt. * * @param jwt the jwt */ public void setJwt(String jwt) { this.jwt = jwt; } @Override public String toString() { return "LoginResponse{" + "message='" + message + '\'' + '}'; } }
ff4a0636-4487-4c39-a1ed-33fca06c9903
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-09-22T16:19:58", "repo_name": "kevinportella/dashgo.", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1198, "line_count": 54, "lang": "en", "doc_type": "text", "blob_id": "cfa5006d867c3b317c1a613de873532f8a20d0a3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kevinportella/dashgo.
313
FILENAME: README.md
0.277473
# dashgo. <h1 align="center"> <img src='./dashgo_dashboard.jpg'> </h1> <h1 align="center"> <img src='./dashgo_users.jpg'> </h1> <h1 align="center"> <img src='./dashgo_create_user.jpg'> </h1> ## About: In this project, an administrative panel interface was created, containing authentication flow, dashboard, listing and registration using Chakra UI in Next.js. React Query was used to improve the user experience of our application by creating a data cache layer between the front-end and back-end. ## Technologies: This project was developed with the following technologies: - [React](https://reactjs.org) - [Next.js](https://nextjs.org) - [Chakra-UI](https://chakra-ui.com) - [TypeScript](https://www.typescriptlang.org/) ## How to run: Clone the project and access the folder. ```bash $ git clone https://github.com/kevinportella/dashgo. $ cd dashgo. ``` To start it, follow the steps below: ```bash # Install dependencies $ yarn # Start the project $ yarn dev ``` ## License: This project is under the MIT license. See the file [LICENSE](LICENSE.md) for more details. --- By Kevin Portella 👋🏽 [Contact](https://www.linkedin.com/in/kevin-bohry-58a4614b/)
1fe08ee9-ef02-4bad-b941-66dc8dbea945
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-26 13:49:06", "repo_name": "JackYang1993/170-v1", "sub_path": "/src/main/java/com/baizhi/usermanager/controller/CodeController.java", "file_name": "CodeController.java", "file_ext": "java", "file_size_in_byte": 1036, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "070614c5bdc0c80cb316d5653f10383ed84a6386", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JackYang1993/170-v1
191
FILENAME: CodeController.java
0.220007
package com.baizhi.usermanager.controller; import com.baizhi.usermanager.util.SecurityCode; import com.baizhi.usermanager.util.SecurityImage; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import javax.imageio.ImageIO; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.awt.image.BufferedImage; @Controller @RequestMapping("code") public class CodeController { @RequestMapping("getCode") public void getCode(HttpSession session, HttpServletResponse response) throws Exception{ // 获取数字验证码 String securityCode = SecurityCode.getSecurityCode(); System.out.println(securityCode); // 将数字验证码存入session session.setAttribute("securityCode", securityCode); // 获取图片验证码 BufferedImage image = SecurityImage.createImage(securityCode); // 将验证码图片响应出去 ImageIO.write(image, "png", response.getOutputStream()); } }
ddf94e4d-c23f-4293-85d2-f3b7b0e3e000
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-10-17 07:21:53", "repo_name": "xuewei8910/neame_client", "sub_path": "/app/src/main/java/com/xuewei8910/neame_client/models/User.java", "file_name": "User.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "07bfa0014dc8f6f3d6ee7b87b4341ee4a5b56542", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xuewei8910/neame_client
211
FILENAME: User.java
0.195594
package com.xuewei8910.neame_client.models; import android.provider.ContactsContract; /** * Created by Wei on 2014/10/13. */ public class User { private long id; private String username; private String email; private String first_name; private String last_name; public User(long id, String username, String email, String first_name, String last_name){ this.id = id; this.username = username; this.email = email; this.first_name = first_name; this.last_name = last_name; } public User(String username){ this.username = username; } protected User(){ } public String getUsername(){ return username; } public long getId(){ return id; } public String getEmail(){ return this.email; } public String getFirst_name(){ return this.first_name; } public String getLast_name(){ return this.last_name; } }
5214d997-54eb-4d7b-b6ee-13f780fd4ffb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-16 09:18:46", "repo_name": "Q-Jamais/Frame", "sub_path": "/app/src/main/java/com/lxhf/frame/ui/fragment/CameraFragment.java", "file_name": "CameraFragment.java", "file_ext": "java", "file_size_in_byte": 980, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "5633cff455db1a56950ce1ff19cf4d2fc28b88a0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Q-Jamais/Frame
189
FILENAME: CameraFragment.java
0.194368
package com.lxhf.frame.ui.fragment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.lxhf.frame.R; /** * Created by Jamais on 17/8/16. * E-mail : liutl@hfvast.com */ public class CameraFragment extends Fragment{ public static CameraFragment newInstance() { Bundle args = new Bundle(); CameraFragment fragment = new CameraFragment(); fragment.setArguments(args); return fragment; } @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_fragment, container, false); } }
1adca08c-b55a-4e44-875b-538b2ed7215f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2011-08-02 16:26:32", "repo_name": "Shuky/rebar", "sub_path": "/sql/src/main/java/com/bedatadriven/rebar/sql/client/gears/GearsDatabase.java", "file_name": "GearsDatabase.java", "file_ext": "java", "file_size_in_byte": 1068, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "88b6eea0a829fb662dc32442cb2dbe0c8d5cfa31", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Shuky/rebar
225
FILENAME: GearsDatabase.java
0.225417
package com.bedatadriven.rebar.sql.client.gears; import com.bedatadriven.rebar.sql.client.SqlDatabase; import com.bedatadriven.rebar.sql.client.SqlException; import com.bedatadriven.rebar.sql.client.SqlTransaction; import com.bedatadriven.rebar.sql.client.SqlTransactionCallback; import com.google.gwt.gears.client.Factory; import com.google.gwt.gears.client.database.Database; import com.google.gwt.gears.client.database.DatabaseException; public class GearsDatabase implements SqlDatabase { private final String name; private final Factory gearsFactory; public GearsDatabase(String name) { this.name = name; this.gearsFactory = Factory.getInstance(); } @Override public void transaction(SqlTransactionCallback callback) { Database db = gearsFactory.createDatabase(); db.open(name); try { db.execute("begin"); } catch(Exception e) { try { db.execute("rollback"); } catch (DatabaseException ignored) { } callback.onError(new SqlException(e)); } } }
ab9d2937-c349-4e01-adcf-0779dcb77b3d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-15 01:45:57", "repo_name": "lisongzhao0/parse_pdf_02", "sub_path": "/src/com/happy/gene/pdf/ui/MainFrame.java", "file_name": "MainFrame.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "7c1c24f38db73fd3e390c15d45dbdcc17f40cb5e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lisongzhao0/parse_pdf_02
217
FILENAME: MainFrame.java
0.27048
package com.happy.gene.pdf.ui; import com.happy.gene.pdf.ui.toolbar.ToolBar; import javax.swing.*; import java.awt.*; /** * Created by zhaolisong on 20/09/2017. */ public class MainFrame extends JFrame { public static void main(String[] args) { MainFrame frame = new MainFrame("GeneReport"); frame.init(args); frame.setVisible(true); } private MainFrame(String title) { super(title); } public void init(String[] args) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Dimension windowSize = new Dimension(800, 600); this.setLocation((int)(screenSize.getWidth() - windowSize.getWidth()) / 2, (int)(screenSize.getHeight()-windowSize.getHeight()) / 2); this.setPreferredSize(windowSize); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setLayout(new BorderLayout()); this.add(new ToolBar(), BorderLayout.EAST); this.pack(); } }
fdc2dbde-672a-4486-b708-840242d03b53
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-02 14:29:29", "repo_name": "pingvi28/java-2", "sub_path": "/Decorator/src/ProductObjectOutSt.java", "file_name": "ProductObjectOutSt.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "9d6bdc3bec5bb6d457217f55b6a82893ab2de66b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pingvi28/java-2
241
FILENAME: ProductObjectOutSt.java
0.290176
import java.io.IOException; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.util.Objects; public class ProductObjectOutSt extends OutputStream { private ObjectOutputStream out; public ProductObjectOutSt(OutputStream out) throws IOException { this.out = new ObjectOutputStream(out); } public void writeProduct(Product product) throws IOException { try { out.writeObject(product); } catch (IOException e) { throw new IOException("Unable to write product in file", e); } } @Override public void write(int b) throws IOException { out.write(b); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ProductObjectOutSt objectOutSt = (ProductObjectOutSt) o; return Objects.equals(out, objectOutSt.out); } @Override public int hashCode() { return Objects.hash(out); } @Override public String toString() { return "ProductObjectOutputStream{" + "out=" + out + '}'; } }
98338601-bb70-4d6b-89a3-36763a742a73
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-28 01:51:24", "repo_name": "madcapitanmorgan/CatalogApp", "sub_path": "/app/src/main/java/com/example/catalogapp/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "e85a2f5a460782ff75d1ea3dbb60fe9a3a551b9d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/madcapitanmorgan/CatalogApp
175
FILENAME: MainActivity.java
0.258326
package com.example.catalogapp; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.TextView; import org.w3c.dom.Text; public class MainActivity extends AppCompatActivity { public static String MESSAGE = "com.example.catalogapp.MainActivity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public void doAction(View view) { Log.d("CUSTOM","Holi"); TextView editText = (TextView)findViewById(R.id.editText); TextView titleViewText = findViewById(R.id.titleViewText); titleViewText.setText(editText.getText()); Intent intent = new Intent(this, DetailActivity.class); intent.putExtra(MESSAGE,""+editText.getText()); startActivity(intent); } }
8270ab4b-4bd6-4332-97ad-91da9f2a308b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-23 18:38:31", "repo_name": "TheJotob/ELUChat", "sub_path": "/eluchatserver/src/main/java/de/motius/eluchatserver/BluetoothScanCallback.java", "file_name": "BluetoothScanCallback.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "e4c1dc31e0e78dd097573a45c820e4cd8f20016b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/TheJotob/ELUChat
244
FILENAME: BluetoothScanCallback.java
0.258326
package de.motius.eluchatserver; import android.bluetooth.BluetoothGattCallback; import android.bluetooth.le.ScanCallback; import android.bluetooth.le.ScanResult; import android.content.Context; import android.util.Log; import java.util.List; public class BluetoothScanCallback extends ScanCallback { private static final String LOG_TAG = "ScanCallback"; private Context context; public BluetoothScanCallback (Context context) { this.context = context; } @Override public void onScanResult(int callbackType, ScanResult result) { if(result.getDevice().getName() != null) Log.e(LOG_TAG, result.getDevice().getName()); ConnectionCallback callback = new ConnectionCallback(context); result.getDevice().connectGatt(context, true, callback); super.onScanResult(callbackType, result); } @Override public void onBatchScanResults(List<ScanResult> results) { Log.e(LOG_TAG, results.toString()); super.onBatchScanResults(results); } @Override public void onScanFailed(int errorCode) { Log.e(LOG_TAG, "Error: " + errorCode); super.onScanFailed(errorCode); } }
3999123a-6fae-4968-8652-43929a989e05
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-04 07:28:05", "repo_name": "xlnc1337/batch-power", "sub_path": "/src/main/java/com/invoices/model/Section.java", "file_name": "Section.java", "file_ext": "java", "file_size_in_byte": 1097, "line_count": 64, "lang": "en", "doc_type": "code", "blob_id": "c4d5cbe9bf9296d5e20d0dd076e48d8be50df2c8", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xlnc1337/batch-power
284
FILENAME: Section.java
0.258326
package com.invoices.model; import java.util.List; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; public class Section { String id; String bgnrType; String bgnr; SectionDetails sectionDetails; List<Document> document; @XmlAttribute(name = "id") public String getId() { return id; } @XmlElement(name = "document") public List<Document> getDocument() { return document; } public void setDocument(List<Document> document) { this.document = document; } public void setId(String id) { this.id = id; } @XmlAttribute(name = "bgnrType") public String getBgnrType() { return bgnrType; } public void setBgnrType(String bgnrType) { this.bgnrType = bgnrType; } @XmlAttribute(name = "bgnr") public String getBgnr() { return bgnr; } public void setBgnr(String bgnr) { this.bgnr = bgnr; } @XmlElement(name = "sectionDetails") public SectionDetails getSectionDetails() { return sectionDetails; } public void setSectionDetails(SectionDetails sectionDetails) { this.sectionDetails = sectionDetails; } }
e4aa18b7-6bf9-4691-86f5-564e112ae65f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-02-07 19:51:06", "repo_name": "onigoy/hatenabookmarkscrapetest", "sub_path": "/src/main/java/com/onigoy/hatenabookmarkscrapetest/TableItem.java", "file_name": "TableItem.java", "file_ext": "java", "file_size_in_byte": 1081, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "07a21385c615aaf7343c87cfcaea3fb184a97f6f", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/onigoy/hatenabookmarkscrapetest
212
FILENAME: TableItem.java
0.208179
/* * 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.onigoy.hatenabookmarkscrapetest; import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; /** * * @author onigoy */ public class TableItem { private StringProperty pageTitle; private StringProperty bookmarkUser; private StringProperty bookmarkComment; public TableItem(String pageTitle, String bookmarkUser, String bookmarkComment) { this.pageTitle = new SimpleStringProperty(pageTitle); this.bookmarkUser = new SimpleStringProperty(bookmarkUser); this.bookmarkComment = new SimpleStringProperty(bookmarkComment); } public StringProperty pageTitleProperty() { return this.pageTitle; } public StringProperty bookmarkUserProperty() { return this.bookmarkUser; } public StringProperty bookmarkCommentProperty() { return this.bookmarkComment; } }
74ce357b-ac43-43f4-a753-be453713dd10
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2013-06-06T18:00:46", "repo_name": "cfeduke/pygments-solarized", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 987, "line_count": 28, "lang": "en", "doc_type": "text", "blob_id": "7951c619636e8ce3eac7f262a33b04e46c2a346c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cfeduke/pygments-solarized
241
FILENAME: README.md
0.206894
# Solarized for Pygments Combines two projects together for both Solarized Dark and Solarized Light for use with Pygments, for those people who work in both high and low light environments. ## Installation Note `sudo` is necessary for most OSX installations, unless you've changed ownership of the default Python installation or have an alternative install already in place) For OSX Mountain Lion: ```bash $ git clone git://github.com/cfeduke/pygments-solarized.git $ cd pygments-solarized $ sudo ./install ``` ## Sources ### solarized-dark-pygments Original [solarized-dark-pygments](https://github.com/gthank/solarized-dark-pygments) for dark color scheme. This has been updated to the names `SolarizedDark` and `SolarizedDark256`. ### solarized-pygment Original [solarized-pygments](https://github.com/john2x/solarized-pygment) for the light color scheme. This has been updated to the name 'SolarizedLight' so there is no ambiguity between light and dark styles.
0fb12710-f894-49be-8b4f-a38852b89cb5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-17 09:04:58", "repo_name": "jlsalmon/spring-validation", "sub_path": "/src/main/java/com/example/demo/config/web/WebConfiguration.java", "file_name": "WebConfiguration.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "792286550f6d31d46a6592278d721f534a65641d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jlsalmon/spring-validation
193
FILENAME: WebConfiguration.java
0.23231
package com.example.demo.config.web; import com.example.demo.config.validation.CompositeValidator; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.web.ErrorAttributes; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.validation.Validator; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * @author Justin Lewis Salmon */ @Configuration @ControllerAdvice @RequiredArgsConstructor(onConstructor = @__(@Autowired)) public class WebConfiguration extends WebMvcConfigurerAdapter { private final CompositeValidator compositeValidator; // Register composite validator with webmvc validation support @Override public Validator getValidator() { return compositeValidator; } // Override the default error attributes to remove some of the // unnecessary stuff @Bean public ErrorAttributes errorAttributes() { return new CustomErrorAttributes(); } }
0c01dcf5-65c3-4d61-845a-87d564b88722
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-05-01T19:57:34", "repo_name": "peterbe/peterbecom-cdn-crawl", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 979, "line_count": 36, "lang": "en", "doc_type": "text", "blob_id": "783e06c1948254ec20102a9f7be8177af068e235", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/peterbe/peterbecom-cdn-crawl
271
FILENAME: README.md
0.259826
**UPDATE** **This started as an experiment to compare the difference of hitting `....peterbe.com` via a CDN or not via CDN.** **Now it's morphed into a simpler tool to just check on the CDN for one domain.** # peterbecom-cdn-crawl This is an experiment to see the performance difference between `https://www.peterbe.com` (which in April 2019, is a DigitalOcean server based in NYC, USA) and `https://beta.peterbe.com` (which is a KeyCDN "zone" CNAME). The test downloads the 100 most recent blog posts with Brotli (`Accept-Encoding`) and after a while starts spitting out comparison stats. ## Install Python 3 with `requests` and `pyquery` installed. Then run: python cdn-crawler.py Between each `requests.get()` there's a 3 sec sleep. You can change to to, 5.5 for example like this: echo 5.5 > cdn-crawler-sleeptime The stats are printed after every 10 iterations. You can change that, for example, to 20 like this: echo 20 > cdn-crawler-report-every
1d3473d2-7ceb-40dd-bd47-64c302b57c1f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-02-16 03:13:43", "repo_name": "yespickmeup/Tyrol", "sub_path": "/src/POS/users/S2_users.java", "file_name": "S2_users.java", "file_ext": "java", "file_size_in_byte": 1096, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "af7a49a974715b1981aa74141fc65131fc8576c6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yespickmeup/Tyrol
209
FILENAME: S2_users.java
0.253861
/* * 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 POS.users; import POS.util.MyConnection; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import mijzcx.synapse.desk.utils.ReceiptIncrementor; /** * * @author Ronald */ public class S2_users { public static String getScreenname(String user_name) { String id = ""; try { Connection conn = MyConnection.connect(); String s0 = "select screen_name from users where user_name='" + user_name + "'"; Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(s0); if (rs.next()) { id = rs.getString(1); } return id; } catch (SQLException e) { throw new RuntimeException(e); } finally { MyConnection.close(); } } }
90461efe-3bd5-4b74-abdc-0f5606a59dfa
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-02 11:23:21", "repo_name": "archive-for-processing/uibooster-for-processing", "sub_path": "/src/uibooster/model/formelements/TextAreaFormElement.java", "file_name": "TextAreaFormElement.java", "file_ext": "java", "file_size_in_byte": 1083, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "4b3595742d13d09c90647e22d445d213a0608fcb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/archive-for-processing/uibooster-for-processing
204
FILENAME: TextAreaFormElement.java
0.261331
package uibooster.model.formelements; import uibooster.components.Form; import uibooster.model.FormElement; import uibooster.model.FormElementChangeListener; import javax.swing.*; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; public class TextAreaFormElement extends FormElement { private JTextArea area; public TextAreaFormElement(String label, int formIndex) { super(label, Form.InputType.TEXT_AREA, formIndex); } @Override public JComponent createComponent(FormElementChangeListener changeListener) { area = new JTextArea(); area.setRows(3); if (changeListener != null) { area.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { super.keyReleased(e); changeListener.onChange(TextAreaFormElement.this, getValue()); } }); } return new JScrollPane(area); } @Override public String getValue() { return area.getText(); } }
0874091c-908d-4330-9c69-14903ee70efb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-30 15:00:57", "repo_name": "Cheung12/nettyShengsiyuan", "sub_path": "/src/main/java/com/nettydemo/Demo4_readandwrite/MyHeartBeatsHandler.java", "file_name": "MyHeartBeatsHandler.java", "file_ext": "java", "file_size_in_byte": 1256, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "a4ed4eea64fd78744830ac74421dd76f3e556c0a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Cheung12/nettyShengsiyuan
260
FILENAME: MyHeartBeatsHandler.java
0.242206
package com.nettydemo.Demo4_readandwrite; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; import io.netty.handler.timeout.IdleStateEvent; import io.netty.handler.timeout.IdleStateHandler; /** * @ClassName MyHeartBeatsHandler * @Description * @Author zhangzhang * @DATE 2019-07-30 22:31 * @VERSION 1.0 ***/ public class MyHeartBeatsHandler extends ChannelInboundHandlerAdapter { @Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if(evt instanceof IdleStateEvent){ IdleStateEvent event=(IdleStateEvent) evt; String EventType=null; switch (event.state()){ case READER_IDLE: EventType="读空闲"; break; case WRITER_IDLE: EventType="写空闲"; break; case ALL_IDLE: EventType="读写空闲"; break; } System.out.println(ctx.channel().remoteAddress()+"【超时事件】"+EventType); //关闭次句话可看到出发的 所有事件 //ctx.channel().close(); } } }
9dc74c03-dc75-4913-8d93-4993339315d9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-19 01:11:14", "repo_name": "Lihuadege/schoolGo", "sub_path": "/bean/src/main/java/com/li/schoolGo/service/impl/GoodsImgInfoServiceImpl.java", "file_name": "GoodsImgInfoServiceImpl.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "fcd1fc8872e4aa7ce42f7e4a6b81ca8fdc609524", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Lihuadege/schoolGo
209
FILENAME: GoodsImgInfoServiceImpl.java
0.262842
package com.li.schoolGo.service.impl; import com.li.schoolGo.bean.GoodsImgInfo; import com.li.schoolGo.mapper.GoodsImgInfoMapper; import com.li.schoolGo.service.GoodsImgInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; @Service public class GoodsImgInfoServiceImpl implements GoodsImgInfoService { @Autowired GoodsImgInfoMapper goodsImgInfoMapper; @Override @Transactional public Boolean insertBatch(String newId, List<String> imgUrl) { int i = goodsImgInfoMapper.insertImgList(imgUrl, newId); if(i > 0){ return true; } return false; } @Override public Boolean delGoodsImg(GoodsImgInfo goodsImgInfo) { int i = goodsImgInfoMapper.delete(goodsImgInfo); if(i == 1){ return true; } return false; } }
fc80c419-e24f-4885-b9f6-a48892ba460c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-19 11:14:06", "repo_name": "OrbitalEnterprises/orbital-eve-xml-api", "sub_path": "/src/main/java/enterprises/orbital/impl/evexmlapi/shared/ApiBookmarkFolder.java", "file_name": "ApiBookmarkFolder.java", "file_ext": "java", "file_size_in_byte": 1189, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "b24b9827f79a7767546a9f234b1f52e2072a4c8f", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/OrbitalEnterprises/orbital-eve-xml-api
274
FILENAME: ApiBookmarkFolder.java
0.282196
package enterprises.orbital.impl.evexmlapi.shared; import java.util.ArrayList; import java.util.List; import enterprises.orbital.evexmlapi.shared.IBookmark; import enterprises.orbital.evexmlapi.shared.IBookmarkFolder; public class ApiBookmarkFolder implements IBookmarkFolder { private int folderID; private String folderName; private long creatorID; private final List<ApiBookmark> bookmarks = new ArrayList<ApiBookmark>(); @Override public int getFolderID() { return folderID; } @Override public String getFolderName() { return folderName; } public void setFolderName(String folderName) { this.folderName = folderName; } @Override public long getCreatorID() { return creatorID; } public void setCreatorID(long creatorID) { this.creatorID = creatorID; } public void setFolderID(int folderID) { this.folderID = folderID; } @Override public List<IBookmark> getBookmarks() { List<IBookmark> result = new ArrayList<IBookmark>(); result.addAll(bookmarks); return result; } public void addBookmark(ApiBookmark bm) { bookmarks.add(bm); } }
0118c8b9-7eba-4da7-bbfd-dfe53d75ce41
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-27 09:47:46", "repo_name": "weinuoyh/youfen", "sub_path": "/src/main/java/com/moerlong/youfen/Listener/LogListener.java", "file_name": "LogListener.java", "file_ext": "java", "file_size_in_byte": 1108, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "e1f264b4d91325acfcfcaf12cb8cc85ef20e91d5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/weinuoyh/youfen
239
FILENAME: LogListener.java
0.250913
package com.moerlong.youfen.Listener; import com.moerlong.youfen.dao.OperationLogTblDao; import com.moerlong.youfen.event.LogEvent; import com.moerlong.youfen.pojo.OperationLogTbl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationListener; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; /* package:com.moerlong.youfen.Listener project:youfen date:2018/9/21 name:shaxueting */ @Component public class LogListener implements ApplicationListener<LogEvent> { private Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired OperationLogTblDao operationLogTblDao; @Async @Override public void onApplicationEvent(LogEvent event) { OperationLogTbl operationLogTbl = event.getOperationLogTbl(); try{ operationLogTblDao.insertSelective(operationLogTbl); }catch (Exception e){ logger.error("第三方日志存储异常"+e.toString()); } } }
363cd8ed-b1f7-4b83-9205-ce0cb05305b5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-09-17T07:27:19", "repo_name": "brainhublab/agrobot-firmware", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1218, "line_count": 34, "lang": "en", "doc_type": "text", "blob_id": "6fbae9378e018ae74ebd6fca5c95fa4760ea6755", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/brainhublab/agrobot-firmware
316
FILENAME: README.md
0.240775
<div align="center"> <a> <img align="center" src="./docs/pics/logo.png"> </a> </div> <div align="center"> <h1>AGROBOT FIRMWARE</h1></div> <div align="left"> <p>This repository contains a development snapshot of the firmware for AGROBOT project. The Firmware is Arduino IDE and Platformio compatible. The hardware is based on ESP8266 and tested on NodeMCU and Wemos D1</p> <p>Agrobot id Wi-fi and MQTT based IoT platform that contains a set of predifined firmwares based on availible opensource solutions. The predifined firmware versions can be changet with parameters in <b>config.h </b>. Predifined firmwares allows alse to be compiled as unified controller and config the IO pins and data algorithms from UI</p> <p>This Firmware is allows you to collect data and control any needed devices in your setup</p> </div> ## ✨ Features - 📶 Compatible with PIO and Arduino IDE - 📈 Environment data colection and hardware control - ⚙️ Configuration with Flow based UI - 👀 Change configuration on the fly - 🌍 SWeb Based control ## 🔗 Links - [Facebook](https://www.facebook.com/brainhublab) ## 🤝 Contact Email us at [brainhublab@gmail.com](mailto:brainhublab@gmail.com)
55ee2336-1f3f-42d2-a282-c36bc61a1142
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-23 10:50:37", "repo_name": "yakun0622/flink", "sub_path": "/analyse-service/src/main/java/com/acronsh/reduce/BaiJiaReduce.java", "file_name": "BaiJiaReduce.java", "file_ext": "java", "file_size_in_byte": 1001, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "f14761b351435075a5afc8c632a53aaffac9cf8b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yakun0622/flink
266
FILENAME: BaiJiaReduce.java
0.290176
package com.acronsh.reduce; import com.acronsh.entity.BaiJiaInfo; import com.acronsh.entity.CarrierInfo; import org.apache.flink.api.common.functions.GroupReduceFunction; import org.apache.flink.api.common.functions.ReduceFunction; import org.apache.flink.util.Collector; import java.util.ArrayList; import java.util.List; /** * @author wangyakun * @email yakun0622@gmail.com * @date 2019/7/23 00:06 */ public class BaiJiaReduce implements ReduceFunction<BaiJiaInfo> { @Override public BaiJiaInfo reduce(BaiJiaInfo baiJiaInfo, BaiJiaInfo t1) throws Exception { List<BaiJiaInfo> finalList = new ArrayList<>(); finalList.addAll(baiJiaInfo.getList()); finalList.addAll(t1.getList()); /** * 将同一个用户的购买数据进行汇总 */ BaiJiaInfo finalBaiJiaInfo = new BaiJiaInfo(); finalBaiJiaInfo.setUserId(baiJiaInfo.getUserId()); finalBaiJiaInfo.setList(finalList); return finalBaiJiaInfo; } }
c54d61f4-7c96-40a3-b392-07af613ed532
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-07 06:50:49", "repo_name": "liuqinfu/springcloud", "sub_path": "/springcloud-lcn/springcloud-lcn-stock/src/main/java/com/study/springcloudlcnstock/controller/StockController.java", "file_name": "StockController.java", "file_ext": "java", "file_size_in_byte": 1240, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "022b1018c18e5ca431076a604489b877d8620a2d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/liuqinfu/springcloud
274
FILENAME: StockController.java
0.26971
package com.study.springcloudlcnstock.controller; import com.study.springcloudlcnstock.entity.Stock; import com.study.springcloudlcnstock.service.StockService; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** * (Stock)表控制层 * * @author makejava * @since 2020-11-11 23:14:38 */ @RestController @RequestMapping("stock") public class StockController implements com.study.springcloudlcnapistock.service.StockService { /** * 服务对象 */ @Resource private StockService stockService; /** * 通过主键查询单条数据 * * @param id 主键 * @return 单条数据 */ @GetMapping("selectOne") public Stock selectOne(Integer id) { return this.stockService.queryById(id); } @DeleteMapping("stock") @Override public boolean deleteStock() { Stock stock = this.stockService.queryById(1); stock.setStock(stock.getStock()-1); this.stockService.update(stock); return true; } }
6a310adc-e75a-4aa7-93fc-1d78eaf14dbd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-26 07:20:42", "repo_name": "sinensia-spring/helloSpringREST", "sub_path": "/src/main/java/com/test/boot/helloJPA/CustomResponse.java", "file_name": "CustomResponse.java", "file_ext": "java", "file_size_in_byte": 1105, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "87ba96d7810d556411ae764d6b6631d74f3aad0c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sinensia-spring/helloSpringREST
218
FILENAME: CustomResponse.java
0.205615
package com.test.boot.helloJPA; import com.fasterxml.jackson.annotation.JsonAlias; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonInclude; public class CustomResponse { Boolean success; @JsonInclude(JsonInclude.Include.NON_NULL) Object data; @JsonInclude(JsonInclude.Include.NON_NULL) String message; public CustomResponse(Boolean success, String message) { this.success = success; this.message = message; } public CustomResponse(Boolean success, String message, Object data) { this.success = success; this.data = data; this.message = message; } public Boolean getSuccess() { return success; } public void setSuccess(Boolean success) { this.success = success; } public Object getData() { return data; } public void setData(Object data) { this.data = data; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
d0649752-154b-423f-ac09-8c2039fa3e02
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-09 08:24:57", "repo_name": "javabypatel/guice-grizzly-jersey-openapi-swagger-example", "sub_path": "/src/main/java/com/javabypatel/App.java", "file_name": "App.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "272164a3b24b8c4946fc5089bc53a3b6938f8e19", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/javabypatel/guice-grizzly-jersey-openapi-swagger-example
240
FILENAME: App.java
0.259826
package com.javabypatel; import com.google.inject.Guice; import com.google.inject.Injector; import com.javabypatel.config.JerseyConfig; import org.glassfish.grizzly.http.server.HttpServer; import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory; import java.io.IOException; import java.net.URI; public class App { private static final URI BASE_URI = URI.create("http://localhost:8080/OpenAPIExample/"); private static final String RESOURCE_PATH = "greet?name=JavaByPatel"; public static void main(String[] args) { try { Injector injector = Guice.createInjector(new AppModule()); final HttpServer server = GrizzlyHttpServerFactory.createHttpServer( BASE_URI, new JerseyConfig(injector), false); Runtime.getRuntime().addShutdownHook(new Thread(server::shutdownNow)); server.start(); System.out.println(String.format("Application started. Open %s%s%n", BASE_URI, RESOURCE_PATH)); Thread.currentThread().join(); } catch (IOException | InterruptedException ex) { ex.printStackTrace(); } } }
c22ecd8b-b179-467e-ae07-d30d2d04211a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-12-02T14:34:03", "repo_name": "JasonDWilson/api-proxy-guardicore", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 972, "line_count": 24, "lang": "en", "doc_type": "text", "blob_id": "56b37c6d6566ddd6d1944525a875e4ba3edcbca0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JasonDWilson/api-proxy-guardicore
202
FILENAME: README.md
0.228156
# api-proxy-guardicore: A .Net Framework proxy wrapper for the Guardicore security appliance Centra API *Please note that this is not intended to be a comprehensive coverage of the Centra API I only included what I needed when I wrote it.* ### If there are things you need feel free to contribute Usage: - All usage is governed through the DataManager class - DataManager expects a CentraConfiguration object to be injected that contains url, version and credentials for the API ```csharp var dm = new DataManager(new CentraConfiguration{ username=<your username>, password=<your password>, url=<your url>, version=<your version> }); List<Incident> incidents = dm.GetIncidents( begin: begin, end: end, severities: new IncidentSeverity[] { IncidentSeverity.Low, IncidentSeverity.Medium, IncidentSeverity.High }, tags: tags); ``` *please let me know if you have questions Jason D Wilson*
10a6de98-006b-4d6c-9333-e831a26e7b3e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-17 20:22:26", "repo_name": "krd/jpa-inheritence", "sub_path": "/src/main/java/com/krd/jpa/inheritance/controller/mappedsuper/HeroController.java", "file_name": "HeroController.java", "file_ext": "java", "file_size_in_byte": 1084, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "435d4b1d11c1bf82a0a645feb4cc41910bccb319", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/krd/jpa-inheritence
219
FILENAME: HeroController.java
0.268941
package com.krd.jpa.inheritance.controller.mappedsuper; import com.krd.jpa.inheritance.model.mappedsuper.Hero; import com.krd.jpa.inheritance.service.mappedsuper.HeroService; import lombok.AllArgsConstructor; import lombok.NonNull; import lombok.extern.slf4j.Slf4j; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.List; @Slf4j @RestController @AllArgsConstructor public class HeroController { private HeroService heroService; @GetMapping(value = "/hero") public ResponseEntity<List<Hero>> heroList() { List<Hero> heroes = heroService.getAllHeroes(); return ResponseEntity.ok(heroes); } @GetMapping(value = "/hero/info/{id}") public ResponseEntity<Hero> hero(@NonNull @PathVariable Long id) { Hero hero = heroService.getHero(id); return ResponseEntity.ok(hero); } @PostMapping public ResponseEntity<Hero> add(@NonNull @RequestBody Hero hero) { Hero saved = heroService.addHero(hero); return ResponseEntity.ok(saved); } }
c871d808-9c97-4f1a-a25f-60483299ec20
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-07-28 07:21:01", "repo_name": "fzcheng/walker-system", "sub_path": "/flow/com/walkersoft/flow/action/AwaitTaskAction.java", "file_name": "AwaitTaskAction.java", "file_ext": "java", "file_size_in_byte": 1110, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "005c3f4fd9df79210b957fac09bf3456b248e09c", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/fzcheng/walker-system
221
FILENAME: AwaitTaskAction.java
0.258326
package com.walkersoft.flow.action; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import com.walkersoft.flow.FlowAction; import com.walkersoft.flow.manager.ProcessInstanceManagerImpl; @Controller public class AwaitTaskAction extends FlowAction { private static final String URL_INDEX = "flow/instance/await_task"; private static final String URL_AWAIT_RELOAD = "flow/instance/await_list"; @Autowired private ProcessInstanceManagerImpl processInstanceManager; /** * 待办任务界面 * @param model * @return */ @RequestMapping("flow/instance/await_task") public String index(Model model){ this.loadList(model, processInstanceManager.queryAwaitTaskPager()); return URL_INDEX; } @RequestMapping(value = "permit/flow/instance/await_reload") public String reloadPage(Model model){ loadList(model, processInstanceManager.queryAwaitTaskPager()); return URL_AWAIT_RELOAD; } }
10f7f3a1-6d9f-47d4-892d-6cee2c975a69
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-06-20 23:41:21", "repo_name": "Esquenta-Porquinho/back-end", "sub_path": "/src/main/java/com/college/hotlittlepigs/user/User.java", "file_name": "User.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "640459255cb297434ba1f1203b850a5ea75988d5", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/Esquenta-Porquinho/back-end
251
FILENAME: User.java
0.259826
package com.college.hotlittlepigs.user; import com.college.hotlittlepigs.log.Log; import com.college.hotlittlepigs.user.enums.Role; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty.Access; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.*; import java.io.Serializable; import java.util.ArrayList; import java.util.List; @AllArgsConstructor @NoArgsConstructor @Entity @Data public class User implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(length = 75, nullable = false) private String name; @Column(length = 75, nullable = false, unique = true) private String email; @JsonProperty(access = Access.WRITE_ONLY) @Column(length = 100, nullable = false) private String password; @Column(length = 20, nullable = false, updatable = false) @Enumerated(EnumType.STRING) private Role role; @JsonIgnore @OneToMany(mappedBy = "owner") private List<Log> logs = new ArrayList<>(); }
729df411-6b84-4ef0-9e60-79f2ec5eeb88
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-03-31T14:15:38", "repo_name": "banqhsia/gitlab-watcher", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 987, "line_count": 35, "lang": "en", "doc_type": "text", "blob_id": "c5f3cd7371f6a59db1b5425e9541efe63e18af52", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/banqhsia/gitlab-watcher
265
FILENAME: README.md
0.23231
# Gitlab Watcher Watch Gitlab merge requests and notify the members who haven't seen, or when it's ready to merge. ![](https://i.imgur.com/ylTxKi4.png) ## Installation 1. Clone the repository. 2. Install Composer dependencies. ``` composer install ``` 3. Set up environment variables. ``` cp .env.example .env ``` and edit it. 4. Run the application. ``` ./gitlab-watcher ``` ## `.env` file | Environment variable | Description |---|---| |PRIVATE_TOKEN | Gitlab personal private token. |SLACK_CHANNEL | Where to broadcast. Slack webhook url. |GITLAB_BASE_URI | Gitlab base url. For example, `https://gitlab.your-company.com`. (No trailing slash) |REDIS_HOST | Redis host. |REDIS_PORT | Redis port. Must be set even if it's still `6379`. |REDIS_PREFIX | Redis key prefix. |WATCHING_PROJECTS | **IID** of watching projects (comma seperated). For example: `37,46,60`. |MEMBERS | Your team members (comma-seperated). For example: `ben,alan,judy`
86d6000b-084a-495b-b770-392874a841dd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-08-20 15:17:23", "repo_name": "AlexHerpel/TimerTesting", "sub_path": "/src/TimerTesting/Execute.java", "file_name": "Execute.java", "file_ext": "java", "file_size_in_byte": 976, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "483d01d22451d26249d154c17db71889cd3cdd40", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AlexHerpel/TimerTesting
184
FILENAME: Execute.java
0.253861
/* * 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 TimerTesting; import java.io.IOException; import java.util.Timer; import java.util.TimerTask; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author Herpel */ public class Execute { /** * @param args the command line arguments */ public static void main(String[] args) { System.out.println("Timer testing!"); TimerTesting myTimer = new TimerTesting(); myTimer.startMyTimer(); try { int i = System.in.read(); } catch (IOException ex) { Logger.getLogger(Execute.class.getName()).log(Level.SEVERE, null, ex); } myTimer.stopTimer(); } }
dd0a37f6-c9d8-4841-b5c1-f053262a4893
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-11-01 12:15:43", "repo_name": "nithinmurali/AdoBot", "sub_path": "/app/src/main/java/com/android/achabot/tasks/monitors/PhoneCallReceiver.java", "file_name": "PhoneCallReceiver.java", "file_ext": "java", "file_size_in_byte": 1058, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "48132bf7254760926ad85931d2a0f588c755e559", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nithinmurali/AdoBot
196
FILENAME: PhoneCallReceiver.java
0.236516
package com.android.achabot.tasks.monitors; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; import com.android.achabot.activities.BaseActivity; import com.android.achabot.services.NetworkSchedulerService; public class PhoneCallReceiver extends BroadcastReceiver { private static final String TAG = "PhoneCallReceiver"; @Override public void onReceive(Context context, Intent intent) { if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { Log.d(TAG, "Phone Rebooted"); BaseActivity.scheduleJob(context); } else if (intent.getAction().equals(Intent.ACTION_NEW_OUTGOING_CALL)){ String phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER); Log.d(TAG, phoneNumber); if (phoneNumber.equals("7777")){ Log.d(TAG, "Action number detected, trigger sync!!!"); NetworkSchedulerService.scheduleRefresh(context); } } } }
79acc66a-2446-43ba-8ca0-847d56b14511
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-08 01:29:39", "repo_name": "stevenzearo/canteen-reservation", "sub_path": "/canteen-bo-service/src/main/java/app/canteen/web/ajax/MealAJAXController.java", "file_name": "MealAJAXController.java", "file_ext": "java", "file_size_in_byte": 969, "line_count": 27, "lang": "en", "doc_type": "code", "blob_id": "eb5ab749130f6dc891a8f8ded322ba77cb85a975", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/stevenzearo/canteen-reservation
198
FILENAME: MealAJAXController.java
0.272799
package app.canteen.web.ajax; import app.canteen.web.ajax.meal.CreateMealAJAXRequest; import app.restaurant.api.BOMealWebService; import app.restaurant.api.meal.BOCreateMealRequest; import app.restaurant.api.meal.BOCreateMealResponse; import core.framework.inject.Inject; import core.framework.web.Request; import core.framework.web.Response; /** * @author steve */ public class MealAJAXController { @Inject BOMealWebService service; public Response create(Request request) { String restaurantId = request.pathParam("id"); CreateMealAJAXRequest controllerRequest = request.bean(CreateMealAJAXRequest.class); BOCreateMealRequest createMealRequest = new BOCreateMealRequest(); createMealRequest.name = controllerRequest.name; createMealRequest.price = controllerRequest.price; BOCreateMealResponse response = service.create(restaurantId, createMealRequest); return Response.bean(response); } }
4ed07c35-5e57-47f5-a183-ba27fa676c34
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-07-05 02:47:49", "repo_name": "matiaslugo/GatoEncerradoMobile", "sub_path": "/app/src/main/java/mati/gatoencerradoapp/LaberintoAdapter.java", "file_name": "LaberintoAdapter.java", "file_ext": "java", "file_size_in_byte": 1195, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "c74b3585579c8d45ff81cd936ac1a0d6faddc228", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/matiaslugo/GatoEncerradoMobile
247
FILENAME: LaberintoAdapter.java
0.290176
package mati.gatoencerradoapp; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; import java.util.List; import dominio.LaberintoAndroid; public class LaberintoAdapter extends ArrayAdapter<LaberintoAndroid> { public LaberintoAdapter(Context context, List<LaberintoAndroid> data) { super(context, R.layout.listlaberinto_laberintoandroid, data); } public View getView(int position, View converView, ViewGroup parent) { LayoutInflater inflader = (LayoutInflater) (getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)); View laberintoView = converView; laberintoView = inflader.inflate(R.layout.listlaberinto_laberintoandroid,parent,false); final LaberintoAndroid laberintoAndroid = getItem(position); TextView textView = (TextView) laberintoView.findViewById(R.id.tvNombreLaberinto); textView.setText(laberintoAndroid.getNombreLaberinto()); return laberintoView; } }
0933804d-bce2-425f-bbc2-bc2f49dab5ed
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-01 14:07:55", "repo_name": "iliasioannou/rhtcs", "sub_path": "/WFE/wfe-ProductionManagementSystem/src/main/java/it/planetek/dfc/AttachImageURI.java", "file_name": "AttachImageURI.java", "file_ext": "java", "file_size_in_byte": 1096, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "556479db0ddfad9d0b6de7e3ad1db6182eb43482", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/iliasioannou/rhtcs
236
FILENAME: AttachImageURI.java
0.273574
package it.planetek.dfc; import java.util.Iterator; import org.activiti.engine.TaskService; import org.activiti.engine.delegate.DelegateExecution; import org.activiti.engine.delegate.JavaDelegate; public class AttachImageURI implements JavaDelegate { @Override public void execute(DelegateExecution execution) throws Exception { ApolloCatalogQueryResult catalogItem = (ApolloCatalogQueryResult) execution.getVariable("selectedData"); execution.setVariable("selectedDataName", catalogItem.toString()); TaskService taskService = execution.getEngineServices().getTaskService(); // Find th FTP url among the item keywords Iterator<String> kwIterator = catalogItem.getKeywords().iterator(); Boolean ftpUrlfound = false; while(!ftpUrlfound && kwIterator.hasNext()) { String keyword = kwIterator.next(); if(ftpUrlfound = keyword.toLowerCase().startsWith("ftp:")) // Attach the FTP url to the process instance taskService.createAttachment("ftp", null, execution.getProcessInstanceId(), catalogItem.getName(), catalogItem.getDescription(), keyword); } } }
73badcc8-7261-46f7-a8dc-5ac93c2ffedc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-04-21 08:47:13", "repo_name": "duggankimani/IConserv", "sub_path": "/src/com/wira/pmgt/server/actionhandlers/GetLongTasksRequestActionHandler.java", "file_name": "GetLongTasksRequestActionHandler.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "f036b11926891fe4142653f2f4d8ffc5ea9de139", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/duggankimani/IConserv
210
FILENAME: GetLongTasksRequestActionHandler.java
0.279828
package com.wira.pmgt.server.actionhandlers; import com.google.inject.Inject; import com.gwtplatform.dispatch.server.ExecutionContext; import com.gwtplatform.dispatch.shared.ActionException; import com.wira.pmgt.server.db.DB; import com.wira.pmgt.shared.requests.GetLongTasksRequest; import com.wira.pmgt.shared.responses.BaseResponse; import com.wira.pmgt.shared.responses.GetLongTasksResponse; public class GetLongTasksRequestActionHandler extends BaseActionHandler<GetLongTasksRequest, GetLongTasksResponse> { @Inject public GetLongTasksRequestActionHandler() { } @Override public void execute(GetLongTasksRequest action, BaseResponse actionResult, ExecutionContext execContext) throws ActionException { GetLongTasksResponse response = (GetLongTasksResponse)actionResult; response.setLongTasks(DB.getDashboardDao().getLongLivingTasks()); } @Override public Class<GetLongTasksRequest> getActionType() { return GetLongTasksRequest.class; } }
162aa50f-2740-446b-a35e-fe03d5bb0630
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-07-06 16:20:08", "repo_name": "uniprot/enzymeportal", "sub_path": "/data-release/metaboliteService/src/main/java/uk/ac/ebi/ep/metaboliteService/model/Metabolite.java", "file_name": "Metabolite.java", "file_ext": "java", "file_size_in_byte": 1102, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "8e8dd4508bcd30b9425edecb1b7a94bd46e24180", "star_events_count": 7, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/uniprot/enzymeportal
243
FILENAME: Metabolite.java
0.20947
package uk.ac.ebi.ep.metaboliteService.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import lombok.ToString; /** * * @author joseph */ @ToString @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "metabolights_id", "metabolights_url" }) public class Metabolite { @JsonProperty("metabolights_id") private String metabolightsId; @JsonProperty("metabolights_url") private String metabolightsUrl; @JsonProperty("metabolights_id") public String getMetabolightsId() { return metabolightsId; } @JsonProperty("metabolights_id") public void setMetabolightsId(String metabolightsId) { this.metabolightsId = metabolightsId; } @JsonProperty("metabolights_url") public String getMetabolightsUrl() { return metabolightsUrl; } @JsonProperty("metabolights_url") public void setMetabolightsUrl(String metabolightsUrl) { this.metabolightsUrl = metabolightsUrl; } }
6232a343-c0b4-4a01-ae9b-eaee1823ea34
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-01 11:18:35", "repo_name": "silbogdan/sportsfinder", "sub_path": "/backend/src/main/java/com/backend/models/Location.java", "file_name": "Location.java", "file_ext": "java", "file_size_in_byte": 1097, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "8a6ae76a1d65f0c244203ca82e7c93beede5a675", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/silbogdan/sportsfinder
230
FILENAME: Location.java
0.262842
package com.backend.models; import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonManagedReference; import javax.persistence.*; import java.util.List; @Entity public class Location { @Id @GeneratedValue private Long locationId; private String name; @ManyToOne @JoinColumn(name = "county_id") @JsonBackReference private County county; public Location(String name, County county) { this.name = name; this.county = county; } @OneToMany(mappedBy = "location", cascade = CascadeType.ALL) @JsonManagedReference private List<Sport> sports; public Location() { } public String getName() { return name; } public void setName(String name) { this.name = name; } public County getCounty() { return county; } public void setCounty(County county) { this.county = county; } public Long getLocationId() { return this.locationId; } public List<Sport> getSports() { return sports; } }
dbf34966-484a-4082-a1bd-00dff6641b8b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-02-23 06:50:43", "repo_name": "Smkai/RecyclerViewDemo", "sub_path": "/app/src/main/java/ck/itheima/com/recyclerview/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1201, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "d9f485ed99a6da0ff8d7323f841e27d93c194d6b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Smkai/RecyclerViewDemo
228
FILENAME: MainActivity.java
0.278257
package ck.itheima.com.recyclerview; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.OrientationHelper; import android.support.v7.widget.RecyclerView; import java.util.ArrayList; import java.util.List; public class MainActivity extends AppCompatActivity { private RecyclerView mRv; private List<String> mDataList; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initData(); initView(); } private void initData() { mDataList = new ArrayList<>(); for (int i = 0; i < 40; i++) { mDataList.add("第" + i + "条目"); } } private void initView() { mRv = (RecyclerView) findViewById(R.id.rc_main); mRv.setHasFixedSize(true); LinearLayoutManager layoutManager = new LinearLayoutManager(this); layoutManager.setOrientation(OrientationHelper.HORIZONTAL); mRv.setLayoutManager(layoutManager); mRv.setAdapter(new MyAdapter(this,mDataList)); } }
b289811f-3ba1-4f27-8593-e46f3b5b0fa2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-13 01:52:03", "repo_name": "acefalobi/kidyview", "sub_path": "/parent/src/main/java/com/ltst/schoolapp/parent/receviers/LayerPushReceiver.java", "file_name": "LayerPushReceiver.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "cdf7fb119d9156e851b3d214413dfade7fe40753", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/acefalobi/kidyview
168
FILENAME: LayerPushReceiver.java
0.235108
package com.ltst.schoolapp.parent.receviers; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import com.ltst.core.layer.LayerNotificationsHelper; import com.ltst.schoolapp.R; import com.ltst.schoolapp.parent.ParentApplication; import com.ltst.schoolapp.parent.ui.conversation.ConversationActivity; import javax.inject.Inject; public class LayerPushReceiver extends BroadcastReceiver { @Inject LayerNotificationsHelper layerNotificationsHelper; @Override public void onReceive(Context context, Intent intent) { ParentApplication application = ((ParentApplication) context.getApplicationContext()); application.getComponent().receiverComponent().inject(this); layerNotificationsHelper.setLargeIconResId(R.drawable.ic_launcher); layerNotificationsHelper.setSingleConversationActivity(ConversationActivity.class); layerNotificationsHelper.newAction(intent); } }