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
46d73028-3b3e-4616-8359-a27058e97de8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-10-11 08:50:57", "repo_name": "qixubin/leetcode", "sub_path": "/HttpTest.java", "file_name": "HttpTest.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "dd5bd6a445ba23486711215233014dbe53ff81a4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/qixubin/leetcode
200
FILENAME: HttpTest.java
0.204342
import com.sun.deploy.net.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.HttpClientBuilder; /** * Created by qixubin on 2016/5/19. */ public class HttpTest { public static void main(String[] argc){ HttpClient httpClient = HttpClientBuilder.create().build(); //Use this instead try { // HttpPost request = new HttpPost("http://yoururl"); // StringEntity params =new StringEntity("details={\"name\":\"myname\",\"age\":\"20\"} "); // request.addHeader("content-type", "application/x-www-form-urlencoded"); // request.setEntity(paramss); // HttpResponse response = httpClient.execute(request); // handle response here... }catch (Exception ex) { // handle exception here } finally { httpClient.getConnectionManager().shutdown(); //Deprecated } } }
2b0d1a9b-41c5-4326-b735-3be74112ebb7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-18 05:01:40", "repo_name": "IngMarFlo/MyLibrary", "sub_path": "/marflolibrary/src/main/java/mx/com/marflo/marflolibrary/FragmentsPageAdapter.java", "file_name": "FragmentsPageAdapter.java", "file_ext": "java", "file_size_in_byte": 1092, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "6a6269129179d4aa5a809f22fd0e0fea6ba9f5e1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/IngMarFlo/MyLibrary
223
FILENAME: FragmentsPageAdapter.java
0.245085
package mx.com.marflo.marflolibrary; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import java.util.ArrayList; /** * @author : Ing Alejandro Martínez Flores * @since : 10/01/2018 * @version : 1 */ public class FragmentsPageAdapter extends FragmentPagerAdapter { private final ArrayList<Fragment> fragments; private FragmentsAdapterCallback callback; public FragmentsPageAdapter(FragmentManager fm, ArrayList<Fragment> fragments, FragmentsAdapterCallback callback) { super(fm); this.fragments = fragments; this.callback = callback; } @Override public Fragment getItem(int position) { return fragments.get(position); } @Override public int getCount() { return fragments.size(); } @Override public CharSequence getPageTitle(int position) { return callback.pageTitle(position); } public interface FragmentsAdapterCallback{ String pageTitle(int position); } }
9a091a91-1a3c-4bfb-8a2b-4f7bb627d21b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-03-20 22:34:02", "repo_name": "bewhyyou/Sprint-One", "sub_path": "/Sprint One/src/edu/byu/isys413/rtyler1/ConceptualRental.java", "file_name": "ConceptualRental.java", "file_ext": "java", "file_size_in_byte": 979, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "f5f14f387afec58cdf17e7ff1803118e3fb94ff6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bewhyyou/Sprint-One
227
FILENAME: ConceptualRental.java
0.259826
package edu.byu.isys413.rtyler1; public class ConceptualRental extends ConceptualProduct{ @BusinessObjectField private double pricePerDay = 0.0; @BusinessObjectField private double replacementPrice = 0.0; /** Creates the Business Object instance of this object*/ public ConceptualRental(String id) { super(id); } /** Gets the pricePerDay for the ConceptualRental Object*/ public double getPricePerDay() { return pricePerDay; } /** Sets the pricePerDay for the ConceptualRental Object*/ public void setPricePerDay(double pricePerDay) { this.pricePerDay = pricePerDay; setDirty(); } /** Gets the replacementPrice for the ConceptualRental Object*/ public double getReplacementPrice() { return replacementPrice; } /** Sets the replacementPrice for the ConceptualRental Object*/ public void setReplacementPrice(double replacementPrice) { this.replacementPrice = replacementPrice; setDirty(); } }
59b8493c-a47f-4f65-a39f-5c8f11ee64fd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-25 14:47:55", "repo_name": "amirparvaneh/open-banking", "sub_path": "/restdata/src/main/java/com/server/rest/restdata/service/CardServiceImp.java", "file_name": "CardServiceImp.java", "file_ext": "java", "file_size_in_byte": 1063, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "ddc086e74d0224d6eb17546109f9ce8ee5b80b2c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/amirparvaneh/open-banking
225
FILENAME: CardServiceImp.java
0.291787
package com.server.rest.restdata.service; import com.server.rest.restdata.dao.CardRepo; import com.server.rest.restdata.entity.Card; import org.springframework.beans.factory.annotation.Autowired; import java.util.List; import java.util.Optional; public class CardServiceImp implements CardService { @Autowired private CardRepo cardRepo; @Autowired public CardServiceImp(CardRepo thecardRep){ cardRepo = thecardRep; } @Override public List<Card> findAll() { return cardRepo.findAll(); } @Override public Card findByDes(String dest) { Optional<Card> result = cardRepo.findById(dest); Card theCard = null; if (result.isPresent()) { theCard = result.get(); } else { throw new RuntimeException("Did not find card" +dest); } return theCard; } @Override public void save(Card card) { cardRepo.save(card); } @Override public void deleteByDes(String dest) { cardRepo.deleteById(dest); } }
3b34fcc0-9799-4a10-b68c-7dd2cced2afe
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-27 19:31:08", "repo_name": "explorer1680/rivermeadowDemo", "sub_path": "/src/main/java/com/rivermeadow/migration/model/Credentials.java", "file_name": "Credentials.java", "file_ext": "java", "file_size_in_byte": 968, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "7ac536f05168b7e2e6a64f2675e31b2161ce2a0a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/explorer1680/rivermeadowDemo
199
FILENAME: Credentials.java
0.193147
package com.rivermeadow.migration.model; import java.io.Serializable; import javax.persistence.Embeddable; import javax.validation.constraints.NotNull; @Embeddable public class Credentials implements Serializable { private static final long serialVersionUID = 1L; @NotNull(message = "username can not be null") private String username; @NotNull(message = "password can not be null") private String password; private String domain; public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getDomain() { return domain; } public void setDomain(String domain) { this.domain = domain; } @Override public String toString() { return "Credentials [username=" + username + ", password=" + password + ", domain=" + domain + "]"; } }
9f56223d-f6b3-4fc9-a844-2d0c7752e4c7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-10 00:00:19", "repo_name": "eduardossampaio/tarefas", "sub_path": "/tarefas2/app/src/main/java/com/apps/esampaio/legacy/view/notifications/Notification.java", "file_name": "Notification.java", "file_ext": "java", "file_size_in_byte": 1085, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "652336f1cc8af95324e754283a70f98071de2de7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/eduardossampaio/tarefas
207
FILENAME: Notification.java
0.262842
package com.apps.esampaio.legacy.view.notifications; import android.app.NotificationManager; import android.content.Context; import androidx.core.app.NotificationCompat; import com.apps.esampaio.R; import com.apps.esampaio.legacy.core.Settings; /** * Created by eduardo on 03/08/2016. */ public class Notification { protected int id; protected Context context; protected NotificationCompat.Builder notificationBuilder; protected NotificationManager mNotificationManager; public Notification(Context context){ this.context = context; Settings settings = Settings.getInstance(context); notificationBuilder = new NotificationCompat.Builder(context); mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); notificationBuilder.setSmallIcon(R.mipmap.launcher_icon); if(settings.vibrate()) notificationBuilder.setVibrate(new long[]{1000,400,1000}); } public void show(){ mNotificationManager.notify(id, notificationBuilder.build()); } }
6ba5a9f8-a0ab-4923-9991-f8a77b3e1c85
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-29 16:21:03", "repo_name": "hotire/spring-boot-base", "sub_path": "/src/main/java/com/googlecode/hotire/base/filter/BaseFilter.java", "file_name": "BaseFilter.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "726333305f28069548d2b856933884a603ef82b8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hotire/spring-boot-base
180
FILENAME: BaseFilter.java
0.236516
package com.googlecode.hotire.base.filter; import com.googlecode.hotire.base.domain.RequestWrapper; import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import lombok.extern.slf4j.Slf4j; /** * logging request body */ @Slf4j public class BaseFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { RequestWrapper requestWrapper = new RequestWrapper((HttpServletRequest)request); chain.doFilter(requestWrapper,response); log.info(requestWrapper.getBody()); } @Override public void destroy() { } }
fc4e0e2e-b708-4081-a8dc-8c03fc0b402b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-05 21:52:22", "repo_name": "ozairjr/thrust", "sub_path": "/tpm/src/main/java/br/com/softbox/tpm/action/AbstractCommandAction.java", "file_name": "AbstractCommandAction.java", "file_ext": "java", "file_size_in_byte": 1072, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "ba9989b8895ff3d6342de9f65f0760360cc35d93", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ozairjr/thrust
218
FILENAME: AbstractCommandAction.java
0.279828
package br.com.softbox.tpm.action; import java.util.List; import java.util.Optional; public abstract class AbstractCommandAction extends AbstractAction { protected final CommandLineParser commandLineParser; protected AbstractCommandAction(String commandName, CommandLineParser commandLineParser) { super(commandName); this.commandLineParser = commandLineParser; } protected boolean isArgumentPresent(String arg) { return commandLineParser.hasValue(arg); } protected Optional<String> getArgument(String arg) { return this.commandLineParser.getArgument(arg); } protected Optional<String> getDefaultArgument() { return this.commandLineParser.getDefaultArgument(); } protected Optional<String> getPathArgument() { return this.commandLineParser.getParameterPath(); } @Override public void process(List<String> args) { this.commandLineParser.parse(args); if (commandLineParser.hasHelp()) { processHelp(); } else { processAction(); } } protected abstract void processHelp(); protected abstract void processAction(); }
e991e10c-8659-4d12-8bc8-daf5d0a57339
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-20 05:51:59", "repo_name": "weeniearms/graffiti", "sub_path": "/src/main/java/com/github/weeniearms/graffiti/GraphService.java", "file_name": "GraphService.java", "file_ext": "java", "file_size_in_byte": 1097, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "0c52539fdf3687e6f139fc79533c3db2a19533d3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/weeniearms/graffiti
193
FILENAME: GraphService.java
0.278257
package com.github.weeniearms.graffiti; import com.github.weeniearms.graffiti.config.CacheConfiguration; import com.github.weeniearms.graffiti.generator.GraphGenerator; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import java.io.IOException; import java.util.Arrays; @Service public class GraphService { private final GraphGenerator[] generators; @Autowired public GraphService(GraphGenerator[] generators) { this.generators = generators; } @Cacheable(CacheConfiguration.GRAPH) public byte[] generateGraph(String source, GraphGenerator.OutputFormat format) throws IOException { GraphGenerator generator = Arrays.stream(generators) .filter(g -> g.isSourceSupported(source)) .findFirst() .orElseThrow(() -> new IllegalArgumentException("No matching generator found for source")); return generator.generateGraph(source, format); } }
3138fa8d-ea60-4f4e-aa79-1252e81f432a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-05-07 16:34:10", "repo_name": "joonamussalo/Bankapp", "sub_path": "/app/src/main/java/com/example/pankkiapp/Tili.java", "file_name": "Tili.java", "file_ext": "java", "file_size_in_byte": 1074, "line_count": 58, "lang": "en", "doc_type": "code", "blob_id": "c46dfc7157599eb64c819658172514f51ebb391a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/joonamussalo/Bankapp
239
FILENAME: Tili.java
0.250913
package com.example.pankkiapp; public class Tili { String accountname; String accountnumber; double money; int id; public Tili(int id, String accountname, String accountnumber) { this.accountname = accountname; this.money=0; this.accountnumber = accountnumber; this.id=id; } public Tili() { this.accountname=null; this.accountnumber=null; this.money=0; this.id=0; } public String getAccountname() { return accountname; } public String getAccountnumber() { return accountnumber; } public double getMoney() { return money; } public int getId() { return id; } public void setAccountname(String accountname) { this.accountname = accountname; } public void setAccountnumber(String accountnumber) { this.accountnumber = accountnumber; } public void setMoney(double money) { this.money = money; } public void setId(int id) { this.id = id; } }
ede64bf8-fc80-4d3e-b1b1-4b9665d487a2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-20 21:27:41", "repo_name": "AixNPanes/genealogy", "sub_path": "/Ftm2Html/src/ws/daley/genealogy/gedcom/attribute/GcWhereWithinSourceAttribute.java", "file_name": "GcWhereWithinSourceAttribute.java", "file_ext": "java", "file_size_in_byte": 991, "line_count": 27, "lang": "en", "doc_type": "code", "blob_id": "9faa827cb606600882a0efdb5609d57716b4558f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AixNPanes/genealogy
225
FILENAME: GcWhereWithinSourceAttribute.java
0.26971
package ws.daley.genealogy.gedcom.attribute; /** * WHERE_WITHIN_SOURCE:= {Size=1:248} * * Specific location with in the information referenced. For a published work, * this could include the volume of a multi-volume work and the page number(s). * For a periodical, it could include volume, issue, and page numbers. For a * newspaper, it could include a column number and page number. For an * unpublished source, this could be a sheet number, page number, frame number, * etc. A census record might have a line number or dwelling and family numbers * in addition to the page number. */ public class GcWhereWithinSourceAttribute extends Gc_Attribute { @SuppressWarnings("unused") private static AttributeDescriptorMap map = new AttributeDescriptorMap(); static{ map = AttributeDescriptorMap.newFromArray(new AttributeDescriptor[]{ new AttributeDescriptor("WHERE_WITHIN_SOURCE", 1, 248, GcWhereWithinSourceAttribute.class), }); } }
244c930c-1ef3-4226-b6c6-e86be238e968
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-09-11T00:25:39", "repo_name": "psminion/PVSDiskCleanup", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1066, "line_count": 11, "lang": "en", "doc_type": "text", "blob_id": "681d4760f102871c454d7f8c83cbc85410252a9b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/psminion/PVSDiskCleanup
231
FILENAME: README.md
0.27513
# PVSDiskCleanup This module can be used to make offline updates to a Citrix Provisioning Services VHD file based on entries contained in CSV file. The module will prompt the user for the vDisk to be used, mount the VHD and then, as required, load the SYSTEM and/or SOFTWARE registry hives and perform the updates specified in the separate CSV file. Before mounting the VHD file the module will use the Citrix McliPSSnapin to determine the PVS farm DB and will subsequently query the DB to determine the vDisk mode (standard or private), the number of devices assignments, and whether or not any PVS devices are actively streaming the vDisk. A summary of the vDisk status is presented to the user and the user is given the option of continuing with the cleanup process, or not. An example CSV can be found in /PVSDiskCleanup/CSV folder (coming soon) Note: This is very much a work in progress. In my use the module behaves exactly as expected - but the coding/logic could nevertheless use quite a bit of improvement. Many improvements should be coming soon ...
de88acb8-e531-44eb-888b-714cee0f1f8d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-08T01:23:33", "repo_name": "ANGELOS-TSILAFAKIS/NavigationDrawerPublic", "sub_path": "/app/src/main/java/info/android_angel/navigationdrawer/model_movie_id_get_credits/MovieGetCredits.java", "file_name": "MovieGetCredits.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "1cc8785c49e04781f90e035c9e50b13d50dd90a1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ANGELOS-TSILAFAKIS/NavigationDrawerPublic
227
FILENAME: MovieGetCredits.java
0.246533
package info.android_angel.navigationdrawer.model_movie_id_get_credits; /** * Created by ANGELOS on 2017. */ import java.util.List; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class MovieGetCredits { @SerializedName("id") @Expose private Integer id; @SerializedName("cast") @Expose private List<MovieGetCredits_cast> cast = null; @SerializedName("crew") @Expose private List<MovieGetCredits_crew> crew = null; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public List<MovieGetCredits_cast> getCast() { return cast; } public void setCast(List<MovieGetCredits_cast> cast) { this.cast = cast; } public List<MovieGetCredits_crew> getCrew() { return crew; } public void setCrew(List<MovieGetCredits_crew> crew) { this.crew = crew; } }
770d2b4f-282e-4279-8ea3-a49602221c78
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2014-08-13T23:24:19", "repo_name": "dansilivestru/BootCamp", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 991, "line_count": 45, "lang": "en", "doc_type": "text", "blob_id": "66d29e89c4d38b9ed30de3475045df4764d00eec", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dansilivestru/BootCamp
250
FILENAME: README.md
0.184768
Startup Live & Lessons Learned ======== Women Entrepreneur Summer Bootcamp Summer 2014 ## Presented by: Pj Lowe-Silivestru Dan Silivestru ## Introduction An introduction to Pj and Dan, past experience and how we got here. ## Myths about startup life - Being your own boss is easy - You get to make your own hours - You make all of your own decisions - It's not all video games and ping-pong - Husband and wife teams always fail - ... ## Setting up for success - Do it full time - Get an amzing team - You can't do it alone - A ~~great~~ good idea - Be passionate - Build your startup on a strong foundation ## The pracital - Execution - Hiring great tallent - Don't over engineer - Don't be afraid to pivot - Get to market early - product market fit - Work life balance is very important ## The intangible - Embrace the community - Find mentors - Go to events / Start an event - Open source can help you (and you them) ## In closing - Three things to remember
af8e0ff0-675d-4ca2-9e50-240cddfe1da6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-19 10:26:46", "repo_name": "thanhbuigithub/QUANLYTHUVIEN", "sub_path": "/src/main/java/model/dto/SachTacGia.java", "file_name": "SachTacGia.java", "file_ext": "java", "file_size_in_byte": 1006, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "16345c48b4cbc6004810efc6adb4dcf85edf99f0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/thanhbuigithub/QUANLYTHUVIEN
290
FILENAME: SachTacGia.java
0.284576
package model.dto; import javax.persistence.*; import java.util.Objects; @Entity @Table(name = "sach_tac_gia", schema = "quanlythuvien", catalog = "") @IdClass(SachTacGiaPK.class) public class SachTacGia { private int sachId; private int tacGiaId; @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SachTacGia that = (SachTacGia) o; return sachId == that.sachId && tacGiaId == that.tacGiaId; } @Override public int hashCode() { return Objects.hash(sachId, tacGiaId); } @Id @Column(name = "sach_id") public int getSachId() { return sachId; } public void setSachId(int sachId) { this.sachId = sachId; } @Id @Column(name = "tac_gia_id") public int getTacGiaId() { return tacGiaId; } public void setTacGiaId(int tacGiaId) { this.tacGiaId = tacGiaId; } }
89f45f6f-287f-4c17-9885-9284e7baab47
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-21 02:08:37", "repo_name": "paulohenry/nossobancodigitalapi", "sub_path": "/src/main/java/com/paulohenry/zup/nbdigital/utils/UpDataService.java", "file_name": "UpDataService.java", "file_ext": "java", "file_size_in_byte": 1075, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "8578d22e1737d0cf5f49f4d12e8c430eb84ca6ae", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/paulohenry/nossobancodigitalapi
216
FILENAME: UpDataService.java
0.272799
package com.paulohenry.zup.nbdigital.utils; import java.io.IOException; import java.util.stream.Stream; import com.paulohenry.zup.nbdigital.entities.LocalRegisterEntity3; import com.paulohenry.zup.nbdigital.repositories.LocalRegisterRepository3; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import org.springframework.web.multipart.MultipartFile; @Service public class UpDataService { @Autowired private LocalRegisterRepository3 storage3; public LocalRegisterEntity3 store(MultipartFile file, String cpf) throws IOException { String fileName = StringUtils.cleanPath(file.getOriginalFilename()); LocalRegisterEntity3 FileDB = new LocalRegisterEntity3(fileName, file.getContentType(), file.getBytes(), cpf ); return storage3.save(FileDB); } public LocalRegisterEntity3 getFile(String id) { return storage3.findById(id).get(); } public Stream<LocalRegisterEntity3> getAllFiles() { return storage3.findAll().stream(); } }
d4d4fe82-198f-4c40-8134-270ba991203c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-04-09T01:25:08", "repo_name": "ahmadtc1/library-app", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1019, "line_count": 22, "lang": "en", "doc_type": "text", "blob_id": "2cb1421fa4364738e52f366c7860cd5be0006a9f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ahmadtc1/library-app
206
FILENAME: README.md
0.208179
# library-app 📚 A library web app for storing books and their information ### Purpose This web applications allows users to store the information for all their favorite books in one place! Gone are the days of struggling to remember good reads lost in memory throughout time. With this library-app, users can simply create their account and add books to their library, which are then stored for their account. ## Technical Details ### Server This web application was created using a NodeJS backend server, and EJS as a templating engine for the front end. ### Databases MongoDB was used as the database for this application, as it allows for scaling and its allowance of dynamic forms of data formatting acts as an asset. ### API The [Goodreads API](https://www.goodreads.com/api) was used to obtain information about each book in the library ### Users User authentication was implemented in the application using [passport](http://www.passportjs.org), limiting library viewing access to registered users only
58427d7e-435a-4585-ae32-05bd0387d6a0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-06-29 05:17:23", "repo_name": "Amlet86/algorithms", "sub_path": "/src/ru/amlet/LeetCode/LongestCommonPrefix.java", "file_name": "LongestCommonPrefix.java", "file_ext": "java", "file_size_in_byte": 1093, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "d61c890b1a65ab8ff1cd05108b14a734e31df5ac", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Amlet86/algorithms
224
FILENAME: LongestCommonPrefix.java
0.279828
package ru.amlet.LeetCode; public class LongestCommonPrefix { public static void main(String[] args) { String result = longestCommonPrefix(new String[]{"dog","racecar","car"}); System.out.println(result); } private static String longestCommonPrefix(String[] strs) { String commonPrefix = ""; for (String wordFromStrs : strs) { if (!commonPrefix.equals("") || !wordFromStrs.equals(strs[0])) { char[] lettersFromPrefix = commonPrefix.toCharArray(); for (int i = 0; i < lettersFromPrefix.length; i++) { if (wordFromStrs.toCharArray().length <= i || wordFromStrs.toCharArray()[i] != lettersFromPrefix[i]) { char[] tmp = new char[i]; System.arraycopy(lettersFromPrefix, 0, tmp, 0, i); commonPrefix = new String(tmp); break; } } } else { commonPrefix = wordFromStrs; } } return commonPrefix; } }
a3efcc18-a222-47b4-bd7a-f6fc0d3f55b1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-12 12:12:04", "repo_name": "257ramanrb/Employee-Task-FollowUp-Tracker", "sub_path": "/src/sample/controllerFiles/EmployeeDashBoard/EmployeeDashBoardController.java", "file_name": "EmployeeDashBoardController.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "9a9303a56cc4df77d47aeaa703ba6fa3b17074ef", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/257ramanrb/Employee-Task-FollowUp-Tracker
185
FILENAME: EmployeeDashBoardController.java
0.239349
package sample.controllerFiles.EmployeeDashBoard; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; import java.io.IOException; public class EmployeeDashBoardController { @FXML private Button employeeLogOut; public void loadFxmlLoginPage (ActionEvent event) throws IOException { try { Parent root1 = FXMLLoader.load(getClass().getResource("/sample/fxmlFiles/LoginPage.fxml")); Stage stageLogin=(Stage)employeeLogOut.getScene().getWindow(); Stage stage=new Stage(); stage.setTitle("Follow-Up Tracker"); stage.setScene(new Scene(root1, 1350, 680)); stage.setResizable(false); stage.show(); stageLogin.close(); } catch(Exception e) { e.printStackTrace(); } } }
3187158e-ef80-48ca-9f6f-d30f98513bd1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-28 12:33:24", "repo_name": "vinodkrishnabhat/PlivoSMS", "sub_path": "/src/test/java/com/vkb/plivosms/dao/mock/MockAccountDao.java", "file_name": "MockAccountDao.java", "file_ext": "java", "file_size_in_byte": 1006, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "b98f7edb5bc6f5d0082eed337d284c3485551fb0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/vinodkrishnabhat/PlivoSMS
215
FILENAME: MockAccountDao.java
0.282988
package com.vkb.plivosms.dao.mock; import com.vkb.plivosms.dao.IAccountDao; import com.vkb.plivosms.exception.PlivoException; import com.vkb.plivosms.objects.AccountEntity; import java.util.LinkedList; import java.util.List; public class MockAccountDao implements IAccountDao{ private static List<AccountEntity> data; private static MockAccountDao ourInstance = new MockAccountDao(); public static MockAccountDao getInstance() { return ourInstance; } private MockAccountDao() { data = new LinkedList<AccountEntity>(); AccountEntity account = new AccountEntity(1, "20S0KPNOIM", "plivo1" ); data.add(account); } public AccountEntity searchAccountEntity(String username, String authId) throws PlivoException { for(AccountEntity entity: data) { if(entity.getUserName().equals(username) && entity.getAuthId().equals(authId)) { return entity; } } return null; } }
2fcbcc4c-9b75-4b94-a27e-43b9b067b034
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-24 09:58:35", "repo_name": "gaowei0115/plate-cloud-system", "sub_path": "/cloud-system/ribbon-system/feign-consumer/src/main/java/com/mmc/cloud/feign/controller/FeignController.java", "file_name": "FeignController.java", "file_ext": "java", "file_size_in_byte": 978, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "f5612fca961e771a01ba7791df20b960c2f65a52", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/gaowei0115/plate-cloud-system
239
FILENAME: FeignController.java
0.245085
package com.mmc.cloud.feign.controller; import com.mmc.cloud.feign.service.IFeignService; import com.mmc.cloud.feign.vo.CutPayRequest; import com.mmc.cloud.feign.vo.CutPayResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Random; /** * @packageName:com.mmc.cloud.feign.controller * @desrciption: * @author: GW * @date: 2020-08-03 14:02 * @history: (version) author date desc */ @RestController public class FeignController { @Autowired private IFeignService feignService; @RequestMapping(value = "/feign-consumer", method = RequestMethod.GET) public String tradeFeign() { return feignService.trade(new Random().nextInt(1000) + ""); } @RequestMapping(value = "/cutPay", method = RequestMethod.POST) public @ResponseBody CutPayResponse cutPay(@RequestBody CutPayRequest request) { return feignService.cutPay(request); } }
b1534b72-4836-4556-9b44-88f820488236
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-24 02:56:30", "repo_name": "PhoenixForceRobotics/freshie2019", "sub_path": "/src/org/usfirst/frc/team2097/robot/utility/opCont.java", "file_name": "opCont.java", "file_ext": "java", "file_size_in_byte": 1059, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "2949412454ff33a379b5f06794ad9460fdc14d97", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/PhoenixForceRobotics/freshie2019
297
FILENAME: opCont.java
0.258326
import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.JoystickButton; import edu.wpi.first.wpilibj.GenericHID; public class opCont{ public Joystick joyLeft = new Joystick(0); public Joystick joyRight = new Joystick(1); public Button OpA = new JoyStickButton(1); public Button OpB = new JoyStickButton(2); public Button OpX = new JoyStickButton(3); public Button OpY = new JoyStickButton (4); public Button OpLB = new JoyStickButton (5); public Button OpRB = new JoyStickButton(6); boolean valRB, valLB, valA, valB, valY , valX; double joyLeftValX, joyRightValX,joyLeftValY,joyRightValY; public opCont(){ double joyLeftValX = joyLeft.get.getX(); double joyRightValX = joyRight.getX(); double joyLeftValY = joyRight.getY(); double joyRightValY = joyRight.getY(); boolean valRB = RB.getTop(); boolean valLB = LB.getTop(); boolean valA = A.getTop(); boolean valB = B.getTop(); boolean valX = Y.getTop(); boolean valY = X.getTop(); } }
cd6120b1-6a1f-4f6f-b4a7-5a1f7182445f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-01-16T05:50:17", "repo_name": "RebafC/php-smoke-lib", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 970, "line_count": 49, "lang": "en", "doc_type": "text", "blob_id": "37757b641070a2001119be6f92e9be62869ef394", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RebafC/php-smoke-lib
236
FILENAME: README.md
0.204342
# PHP Smoke Lib ### Description This library allows to run simple smoke tests in php ### Instal git clone https://github.com:RebafC/php-smoke-lib.git composer update ### Usage ```php <?php use Smoke\Smoke\Smoke; use GuzzleHttp\Client; require 'vendor/autoload.php'; $addresses = [ [ 'request' => [ 'method' => 'GET', 'uti' => 'http://www.google.com', 'options' => [], ], 'expectedResponse' => [ 'statusCode' => 200, 'inBody' => 'Google' ] ], ]; $result = []; $check = new Smoke(new Client()); foreach ($addresses as $address) { $result[] = $check->checkAddress( $address['request']['method'], $address['request']['uri'], $address['expectedResponse']['statusCode'], $address['request']['options'], $address['expectedResponse']['inBody'] ); } ``` ### Not sure It gets hung up somewhere and I haven't solved it yet.
ea79f1e7-1190-4480-b987-628908f58dff
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-18 08:59:43", "repo_name": "dc6273632/LGame", "sub_path": "/Java/Loon-Neo/src/loon/component/skin/ControlSkin.java", "file_name": "ControlSkin.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "1bd811f247587e4e9a4dd44465ccd332856ad1a1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dc6273632/LGame
230
FILENAME: ControlSkin.java
0.280616
package loon.component.skin; import loon.LSystem; import loon.LTexture; import loon.LTextures; public class ControlSkin { private LTexture controlBaseTexture; private LTexture controlDotTexture; public static ControlSkin def(){ return new ControlSkin(); } public ControlSkin() { this(LTextures.loadTexture(LSystem.FRAMEWORK_IMG_NAME + "control_base.png"), LTextures .loadTexture(LSystem.FRAMEWORK_IMG_NAME + "control_dot.png")); } public ControlSkin(LTexture basetex, LTexture dottex) { this.controlBaseTexture = basetex; this.controlDotTexture = dottex; } public LTexture getControlBaseTexture() { return controlBaseTexture; } public void setControlBaseTexture(LTexture controlBaseTexture) { this.controlBaseTexture = controlBaseTexture; } public LTexture getControlDotTexture() { return controlDotTexture; } public void setControlDotTexture(LTexture controlDotTexture) { this.controlDotTexture = controlDotTexture; } }
cf938c60-dff6-45f0-8f0e-7eb796503001
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-05 08:06:52", "repo_name": "daolei/zuo", "sub_path": "/src/main/java/champter1/zkTest/jsonTest.java", "file_name": "jsonTest.java", "file_ext": "java", "file_size_in_byte": 1078, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "6ef70791d1546d29042ea490e7681bf7b85f1147", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/daolei/zuo
230
FILENAME: jsonTest.java
0.196826
package champter1.zkTest; import org.codehaus.jackson.map.ObjectMapper; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; /** * Created by daolei.su on 2018/11/30 */ public class jsonTest { /** * 在使用该类转json时,发现默认情况下 json文件中可以少key,但是不能多key * @param args */ public static void main(String[] args) { String a = "fdsaf"; System.out.println(String.format("fdsfasf%s", "aa")); ObjectMapper mapper = new ObjectMapper(); try { BufferedReader bf = new BufferedReader(new FileReader("/Users/sudaolei/IdeaProjects/MRC/zuo/tmp/a.json")); StringBuilder content = new StringBuilder(); String line; while ((line = bf.readLine()) != null) { content.append(line.trim()); } a a1 = mapper.readValue(content.toString(), a.class); System.out.println(a1.getC()); } catch (IOException e) { e.printStackTrace(); } } }
73b145cb-a286-4566-a317-9de08fee77ae
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-07-28 12:32:33", "repo_name": "mrjbee/runit", "sub_path": "/sources/app/src/main/java/org/monroe/team/runit/app/uc/RemoveUninstalledApplications.java", "file_name": "RemoveUninstalledApplications.java", "file_ext": "java", "file_size_in_byte": 1025, "line_count": 26, "lang": "en", "doc_type": "code", "blob_id": "e6dc2195f0937b2efeeb736d183103072b167998", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mrjbee/runit
202
FILENAME: RemoveUninstalledApplications.java
0.290981
package org.monroe.team.runit.app.uc; import org.monroe.team.android.box.services.AndroidServiceRegistry; import org.monroe.team.android.box.db.TransactionUserCase; import org.monroe.team.corebox.services.ServiceRegistry; import org.monroe.team.runit.app.db.Dao; import org.monroe.team.runit.app.service.ApplicationRegistry; import org.monroe.team.runit.app.uc.entity.ApplicationData; import java.util.List; public class RemoveUninstalledApplications extends TransactionUserCase<Void,Void,Dao> { public RemoveUninstalledApplications(ServiceRegistry serviceRegistry) { super(serviceRegistry); } @Override protected Void transactionalExecute(Void request, Dao dao) { using(ApplicationRegistry.class).refreshApplicationsWithLauncherActivityList(); List<ApplicationData> appsData = using(ApplicationRegistry.class).getApplicationsWithLauncherActivity(); if (appsData.isEmpty()) return null; int result = dao.removeAppsNotInList(appsData); return null; } }
0afbe4b4-7fb5-4483-aa88-9ba577071266
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-02-08 13:51:41", "repo_name": "evbox/station-simulator", "sub_path": "/simulator-core/src/main/java/com/evbox/everon/ocpp/simulator/station/component/variable/attribute/AttributeType.java", "file_name": "AttributeType.java", "file_ext": "java", "file_size_in_byte": 1100, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "ca37725f165a0b7bf4a6cf81befafe2968f2f184", "star_events_count": 35, "fork_events_count": 12, "src_encoding": "UTF-8"}
https://github.com/evbox/station-simulator
226
FILENAME: AttributeType.java
0.26971
package com.evbox.everon.ocpp.simulator.station.component.variable.attribute; import com.evbox.everon.ocpp.simulator.station.component.exception.IllegalAttributeTypeException; import com.evbox.everon.ocpp.v201.message.centralserver.Attribute; import java.util.Optional; import java.util.stream.Stream; /** * Internal type to map from SetVariableDatum.AttributeType and GetVariableDatum.AttributeType */ public enum AttributeType { ACTUAL("Actual"), TARGET("Target"), MIN_SET("MinSet"), MAX_SET("MaxSet"); private final String type; AttributeType(String type) { this.type = type; } public static AttributeType from(Attribute attributeType) { return from(attributeType.value()).orElseThrow(() -> new IllegalAttributeTypeException("Unknown attribute type: " + attributeType.value())); } public static Optional<AttributeType> from(String type) { return Stream.of(values()) .filter(value -> value.getName().equals(type)) .findAny(); } public String getName() { return type; } }
fabd4b48-de6d-4a92-a9d3-25119be32605
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-01-10T10:16:16", "repo_name": "virtimus/tinyHomeServer", "sub_path": "/features/hass.md", "file_name": "hass.md", "file_ext": "md", "file_size_in_byte": 1031, "line_count": 52, "lang": "en", "doc_type": "text", "blob_id": "6bf4bc63b51247d28bfaf2b490908f0162bda7a1", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/virtimus/tinyHomeServer
309
FILENAME: hass.md
0.26971
<!-- #@bashMarkupScript:0.0.1 #@depends:bs,python3.7(opt),cert(opt) #@refs:https://www.home-assistant.io/docs/installation/virtualenv/ #@ https://data.home-assistant.io/ #@ https://github.com/home-assistant/home-assistant-notebooks --> ## Features - TinyHomeServer - F3 Home Assistant https://www.youtube.com/watch?v=QeBshrCm0Bs Connect to ths (ssh ths -p 2022) & run setup script: ``` tfsetup s features/hass ``` Successful init should end with: **\[tfsetup\] END.** Wait till Hass is avalilable at http://ths:8123 and preconfigure it. First start of HA can be long (half an hour or so) - trace with bellow commmand: ``` tail -f /var/log/hass.log ``` Then You can install mobile app from Android side 'Home Assistant' <!-- - go to Configuration -> Integrations -> + -> Search -> "mobile" -> (failed) ``` !TODO! autostart config (to be done after tauto(start) For now - manual - add line ``` su - {thsUserName} -c 'thass' ``` to /support/autostart.sh file Next steps: - [AIS dom - ais-dom.md](ais-dom.md) -->
84f92cf1-f5ee-45bc-b3ea-8b738129c7e1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-10-17T12:54:48", "repo_name": "OmerHai/Planet-Block-Breaker", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 978, "line_count": 28, "lang": "en", "doc_type": "text", "blob_id": "95e7e0fe54bc3c5b6cf59b5a36114fb5db8b307b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/OmerHai/Planet-Block-Breaker
254
FILENAME: README.md
0.291787
# Planet-Block-Breaker A game of breaking blocks, built with Unity, C#. ## Project Screen Shots ### Level example ![Shop](https://i.ibb.co/bbQGsYs/Level-Example.jpg) ### Break example ![Shop](https://i.ibb.co/Y7K0M9f/Break-Example.jpg) ### Start menu ![Shop](https://i.ibb.co/xh6bRCt/Start-Menu.jpg) ## To Visit App: https://simmer.io/@Omer_Haimovich/planet-block-breaker ## Reflection The goal of the project was to deeply understand Unity and C#. I wanted to make a game where people could play the ancient brick-breaking game that existed when I was a kid, a game that includes unbricks, breakable bricks with one or more hits. One of the challenges was to make sure the ball flew properly when it hit the brick or the walls on one side or up,another challenge was to plan the design and gameplay of the game, to make sure that the players enjoyed as much as possible. At the end of the day, the technologies implemented in this project are Unity, C#.
24ae44b4-90a8-4d2b-a1db-dad5fbdf816f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-07 17:47:03", "repo_name": "MithunRoyThadi/ProjectDetails", "sub_path": "/MFT-Database-Services/src/main/java/com/miracle/mft/dbUtils/DatabaseUtills.java", "file_name": "DatabaseUtills.java", "file_ext": "java", "file_size_in_byte": 999, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "7745710beeb320760e979ad61edd5345128aa23c", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/MithunRoyThadi/ProjectDetails
185
FILENAME: DatabaseUtills.java
0.23092
package com.miracle.mft.dbUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DriverManagerDataSource; @Configuration public class DatabaseUtills { @Value("${spring.datasource.url}") private String url; @Value("${spring.datasource.password}") private String dbPassword; @Value("${spring.datasource.username}") private String dbUserName; @Value("${spring.datasource.driver.name}") private String driverNmae; @Bean public JdbcTemplate getJdbcTemplate() throws ClassNotFoundException { DriverManagerDataSource dataSource = new DriverManagerDataSource(url, dbUserName, dbPassword); // Class.forName("com.ibm.db2.jcc.DB2Driver"); dataSource.setDriverClassName(driverNmae); JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); return jdbcTemplate; } }
b913615d-5235-45ef-aa1b-c16e7add21c1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-15 11:29:33", "repo_name": "tsundberg/venice", "sub_path": "/src/main/java/se/arbetsformedlingen/venice/log/LatestLogs.java", "file_name": "LatestLogs.java", "file_ext": "java", "file_size_in_byte": 1036, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "44d1911bb0bfc670d570f18ccd96470256a52493", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/tsundberg/venice
208
FILENAME: LatestLogs.java
0.27048
package se.arbetsformedlingen.venice.log; import se.arbetsformedlingen.venice.model.Application; import se.arbetsformedlingen.venice.model.LogType; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; class LatestLogs { private static ConcurrentMap<String, LogResponse> logResponse = new ConcurrentHashMap<>(); void addLog(LogResponse value) { String key = generateKey(value.getApplication(), value.getLogType()); logResponse.put(key, value); } LogResponse getLog(Application application, LogType logType) { String key = generateKey(application, logType); if (logResponse.containsKey(key)) { return logResponse.get(key); } else { return new LogResponse(application, logType); } } private String generateKey(Application application, LogType logType) { return application + "->" + logType; } static void clearRepository() { logResponse = new ConcurrentHashMap<>(); } }
569a8313-090b-4366-baec-16f826be02f9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-19 10:28:27", "repo_name": "YagoYmbern/NaturalComputingProject", "sub_path": "/NaturalComputing/src/nc/solution/chromosome/generator/ChromosomeGeneratorAbstract.java", "file_name": "ChromosomeGeneratorAbstract.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "23f9b7367cabcdda18558381bcf443d860856fca", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/YagoYmbern/NaturalComputingProject
198
FILENAME: ChromosomeGeneratorAbstract.java
0.286169
/* * 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 nc.solution.chromosome.generator; import nc.solution.Chromosome; import nc.variable.initialize.Generator_Variable; /** * * @author Oscar Lao * @param <C> */ public abstract class ChromosomeGeneratorAbstract<C extends Chromosome> { protected final Generator_Variable init; public ChromosomeGeneratorAbstract(Generator_Variable init) { this.init = init; } // // /** // * Generate the chromosome // * @param size the number of variables of this chromosome // * @return // */ // public abstract C generateChromosome(int size); /** * Get the generator of a new variable * @return */ public Generator_Variable getInit() { return init; } }
3fe4ad56-4d0f-4399-8d2e-0d3cabe27255
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-19 18:54:59", "repo_name": "morosanag/OCPP-Project", "sub_path": "/OCPP_Interface_Websocket_REST/src/java/com/offnet/ocpp/controllerS/GetLocalListVersionController.java", "file_name": "GetLocalListVersionController.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "f90f4bd1b6a5583ce9b6902bf7d2a6e5f9e952a5", "star_events_count": 9, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/morosanag/OCPP-Project
204
FILENAME: GetLocalListVersionController.java
0.282196
/* * 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.offnet.ocpp.controllerS; import com.offnet.ocpp.client.Client; import com.offnet.ocpp.request.GetLocalListVersionRequest; import java.util.List; /** * * @author gabi */ public class GetLocalListVersionController extends ControllerS { public GetLocalListVersionController(List<String> array, String session_id) { super(array, session_id); super.setProcedureName("GetLocalListVersion"); } @Override public String processRequest() { GetLocalListVersionRequest getLocalListVersionRequest = new GetLocalListVersionRequest(super.content); getLocalListVersionRequest.setCallID(callID); Client resetClient = new Client(); resetClient.sendRequest(getLocalListVersionRequest); return null; } }
1de045a3-cfe9-4384-90d4-01a77924d289
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-05-01 11:46:20", "repo_name": "NavidEsfahani/Logmatter", "sub_path": "/src/main/java/com/logmatter/services/UserService.java", "file_name": "UserService.java", "file_ext": "java", "file_size_in_byte": 1098, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "86ef8f04eb819b2465acf721623960e02696b4f6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/NavidEsfahani/Logmatter
212
FILENAME: UserService.java
0.246533
package com.logmatter.services; import com.google.inject.Singleton; import com.logmatter.business.UserLogic; import com.logmatter.guice.GuiceModule; import com.logmatter.guice.ServerContextListner; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.node.BooleanNode; import org.codehaus.jackson.node.ObjectNode; import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; @Path("userService") public class UserService { UserLogic userLogic; public UserService (){ userLogic = ServerContextListner.injector.getInstance(UserLogic.class); } @Path("/usernameIsAvailable") @GET @Produces("application/json") public String usernameIsAvailable() throws Exception { ObjectMapper mapper = new ObjectMapper(); ObjectNode jsonObject = mapper.createObjectNode(); userLogic.isUsernameValid("navid"); BooleanNode booleanNode = jsonObject.booleanNode(true); jsonObject.put("isValid",booleanNode); return mapper.writeValueAsString(jsonObject); } }
d8705f76-aabb-4e5a-b62e-f33a92156cfb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-10 16:39:26", "repo_name": "shash222/IntroToCS_Assignments", "sub_path": "/Compress.java", "file_name": "Compress.java", "file_ext": "java", "file_size_in_byte": 1233, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "0570d2512d882139a8d73ce43ab45a714a7dec6f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/shash222/IntroToCS_Assignments
227
FILENAME: Compress.java
0.283781
import java.io.*; public class Compress{ public static String compress(String original){ int length=original.length(); String compressed=""; int count=1; char letter=original.charAt(0); int letternumber=1; do{ while(original.charAt(letternumber)==original.charAt(letternumber-1)){ count++; if (letternumber<(length-1)){ letternumber++; } else if (letternumber==(length-1)){ break; } } if (count==1){ compressed=compressed+letter; } else{ compressed=compressed+count+letter; } letter=original.charAt(letternumber); count=1; letternumber++; }while(letternumber<length); if (count==1&&original.charAt(length-1)!=original.charAt(length-2)){ compressed=compressed+letter; } return compressed; } public static void main(String[] args){ String original=IO.readString(); String compressed=compress(original); System.out.println(compressed); } }
012724f5-cc50-43af-a21d-3c05e7b07737
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-31 10:35:05", "repo_name": "nvduong97/CarGara", "sub_path": "/src/com/ptit/model/DetailBill.java", "file_name": "DetailBill.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "8b9554967cf53dbf5b339fdc0c109177a98e8a02", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/nvduong97/CarGara
226
FILENAME: DetailBill.java
0.236516
/* * 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.ptit.model; /** * * @author DUONGNV */ public class DetailBill { private int billID; private String DetailBill; private int amount; public DetailBill() { } public DetailBill(int billID, String DetailBill, int amount) { this.billID = billID; this.DetailBill = DetailBill; this.amount = amount; } public int getBillID() { return billID; } public void setBillID(int billID) { this.billID = billID; } public String getDetailBill() { return DetailBill; } public void setDetailBill(String DetailBill) { this.DetailBill = DetailBill; } public int getAmount() { return amount; } public void setAmount(int amount) { this.amount = amount; } }
8a508798-0fa0-4cdd-854a-9b7c36f4e026
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-08 23:23:43", "repo_name": "gui-freire/Noctua", "sub_path": "/app/src/main/java/com/example/gui_f/Percentage/Presenter/PercentageActivity.java", "file_name": "PercentageActivity.java", "file_ext": "java", "file_size_in_byte": 1085, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "81e910bae30030a240ed2eb6c67f483e17ec813f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/gui-freire/Noctua
188
FILENAME: PercentageActivity.java
0.268941
package com.example.gui_f.Percentage.Presenter; import android.app.FragmentManager; import android.app.FragmentTransaction; import android.os.Bundle; import android.app.Activity; import com.example.gui_f.noctua.R; import com.example.gui_f.Percentage.Presenter.Fragment.PercentageFragment; public class PercentageActivity extends Activity { private PercentageFragment percentageFragment; private int percentage = 60; private int max = 150; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_percentage); createFragment(); } @Override protected void onStart() { super.onStart(); } private void createFragment(){ FragmentManager fragmentManager = getFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); percentageFragment = PercentageFragment.newInstance(percentage, max, 0); fragmentTransaction.add(R.id.frgPercentage, percentageFragment); } }
d1668dd5-843e-44a2-88ff-6d01c8079efc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-07-10 13:04:07", "repo_name": "paulovictorv/ckan-api-wrapper", "sub_path": "/app/plugin/CKAN.java", "file_name": "CKAN.java", "file_ext": "java", "file_size_in_byte": 983, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "dca18c4d6b4c48cb8e1addf192bd7b757b0d4aa3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/paulovictorv/ckan-api-wrapper
221
FILENAME: CKAN.java
0.256832
package plugin; import br.wrapper.ckanclient.CKANClient; import play.Application; import play.Logger; import play.Plugin; import java.net.URISyntaxException; /** * Created by Paulo on 08/06/14. */ public class CKAN extends Plugin { public static CKANClient client; private Application app; public CKAN(Application application){ app = application; } public CKAN() { super(); } @Override public void onStart() { String ckanURL = app.configuration().getString("ckan.url"); try { client = new CKANClient(ckanURL); Logger.info("CKANClient initialized"); } catch (URISyntaxException e) { Logger.error("Error while initiliazing CKAN client: ", e); } super.onStart(); } @Override public void onStop() { super.onStop(); } @Override public boolean enabled() { return true; } public void $init$() { } }
c07d3381-5c18-49da-bbee-45a9a20ce62a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-07 03:15:37", "repo_name": "AntonDesilvaProjects/FileStashServices", "sub_path": "/src/main/java/com/filestash/mapper/ContentMapper.java", "file_name": "ContentMapper.java", "file_ext": "java", "file_size_in_byte": 968, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "7bbbb04398de60c524fd4ef8e3f2b625152d8763", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AntonDesilvaProjects/FileStashServices
183
FILENAME: ContentMapper.java
0.233706
package com.filestash.mapper; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.jdbc.core.RowMapper; import com.filestash.domain.Content; public class ContentMapper implements RowMapper<Content> { @Override public Content mapRow(ResultSet result, int rowNum) throws SQLException { Content content = new Content(); content.setId(result.getInt("content_id")); content.setOwner(result.getInt("user_id")); content.setName(result.getString("content_name")); content.setAuthor(result.getString("content_author")); content.setPath(result.getString("content_path")); content.setType(result.getString("content_type")); content.setSize(result.getLong("content_size")); content.setUploadTime(result.getTimestamp("content_upload_time").toLocalDateTime()); content.setLastModified(result.getTimestamp("content_last_mod").toLocalDateTime()); content.setImage(result.getString("content_image")); return content; } }
f10c7fd6-affd-43be-83e1-e3f0c343c2e2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-05 03:48:32", "repo_name": "y723109056/mx", "sub_path": "/src/main/java/com/mx/enums/ResponseCodeEnum.java", "file_name": "ResponseCodeEnum.java", "file_ext": "java", "file_size_in_byte": 1145, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "1e5de92210ca2437a30bfbbfb96202c79a9540d2", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/y723109056/mx
337
FILENAME: ResponseCodeEnum.java
0.278257
package com.mx.enums; /** * @author 小米线儿 * @time 2019/2/27 0027 * @QQ 723109056 * @blog https://blog.csdn.net/qq_31407255 */ public enum ResponseCodeEnum { CODE_ERROR(999, "自定义错误提示"), CODE_97(97,"登入用户为空"), CODE_99(99,"没有权限"), CODE_100(100,"成功"), CODE_101(101,"系统异常"), CODE_102(102,"参数为空"), CODE_103(103,"您的帐号已被禁用,请联系管理员!"), CODE_104(104,"用户名或密码不正确!"), CODE_105(105,"接收参数解析异常!"), ; //响应码 private final Integer code; //响应消息 private final String msg; public Integer getCode() { return code; } public String getMsg() { return msg; } private ResponseCodeEnum(Integer code, String msg) { this.code = code; this.msg = msg; } public static ResponseCodeEnum valueOf(Integer code){ for(ResponseCodeEnum codeEnum : ResponseCodeEnum.values()){ if(codeEnum.code.equals(code)){ return codeEnum; } } return null; } }
3373b291-39b1-4fb2-b08d-6bdc7063b2ba
{"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/data/SSize.java", "file_name": "SSize.java", "file_ext": "java", "file_size_in_byte": 985, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "032db44fa6986c98567f2f155d1d5842d3374b51", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/doubotis/DialogDesignerSC2
227
FILENAME: SSize.java
0.277473
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.doubotis.sc2dd.data; import java.util.HashMap; /** * * @author Christophe */ public class SSize implements IProperty { public int width; public int height; public SSize(int width, int height) { this.width = width; this.height = height; } @Override public String toString() { return "[" + width + "," + height + "]"; } @Override public HashMap<String, Object> loadProperties() { HashMap<String, Object> map = new HashMap<>(); map.put("width", width); map.put("height", height); return map; } @Override public void saveProperties(HashMap<String, Object> map) { width = (int)map.get("width"); height = (int)map.get("height"); } }
f64766c8-c2f6-4016-9a4f-2e2291c64294
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-08-27T00:07:52", "repo_name": "samtron1412/docs", "sub_path": "/tech/it/sec/u2f.md", "file_name": "u2f.md", "file_ext": "md", "file_size_in_byte": 1065, "line_count": 32, "lang": "en", "doc_type": "text", "blob_id": "738c7aa7029aa289c763cdcb690cdd1e66f23366", "star_events_count": 2, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/samtron1412/docs
272
FILENAME: u2f.md
0.235108
# Overview Universal 2nd Factor (U2F) is an open authentication standard that strengthens and simplifies two-factor authentication using specialized USB or NFC devices based on similar security technology found in smart cards. - It covers the entire authentication stack: + Hardware + Browsers/clients + Network + Servers + Cross-realm trust + Registration + Mobile devices # Resources - Wikipedia - Universal 2nd Factor + https://en.wikipedia.org/wiki/Universal_2nd_Factor - Homepage - FIDO Alliance + https://fidoalliance.org/ "FIDO Alliance" - U2F Google's reference implementations + https://github.com/google/u2f-ref-code "U2F Reference Implementations" - U2F USB token optimized for physical security + https://github.com/conorpp/u2f-zero "U2F USB token optimized for physical security" - https://www.yubico.com/authentication-standards/fido-u2f/ - https://en.wikipedia.org/wiki/Universal_2nd_Factor - https://developers.yubico.com/U2F/ - https://fidoalliance.org/specs/u2f-specs-master/fido-u2f-overview.html
2605339f-0c67-401a-85e8-0ee058b131b1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-06 10:41:55", "repo_name": "radu1122/POO", "sub_path": "/tema1/src/video/Movie.java", "file_name": "Movie.java", "file_ext": "java", "file_size_in_byte": 1050, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "2905245bd13176d514c9fbec4d1236c6190771e0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/radu1122/POO
241
FILENAME: Movie.java
0.278257
package video; import java.util.ArrayList; public final class Movie extends Video { private final int duration; private double rating = 0; private int ratingCount = 0; @Override public int getDuration() { return duration; } public double getRating() { return rating; } public void setRating(final double rating) { this.rating = rating; } @Override public void addRating(final double rating, final int season) { if (this.rating == 0) { this.rating = rating; this.ratingCount++; } else { this.rating = this.rating * (double) ratingCount; this.rating = this.rating + rating; this.ratingCount++; this.rating = this.rating / (double) ratingCount; } } public Movie(final String title, final ArrayList<String> cast, final ArrayList<String> genres, final int year, final int duration) { super(title, year, cast, genres); this.duration = duration; } @Override public String getMovieType() { return "movies"; } }
73f56622-df29-4d62-b6a1-5e6d3d57ae1b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-10-19 19:39:23", "repo_name": "stepin2it/sept2014", "sub_path": "/MobileClient/app/src/main/java/com/stepin2it/mobile/mobileclient/SplashScreenActivity.java", "file_name": "SplashScreenActivity.java", "file_ext": "java", "file_size_in_byte": 1117, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "357c9b7938dad668a98fec3a977197abe913a7fd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/stepin2it/sept2014
210
FILENAME: SplashScreenActivity.java
0.225417
package com.stepin2it.mobile.mobileclient; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; /** * Created by coder on 10/4/14. */ public class SplashScreenActivity { private static final String TAG = "SplashScreenActivity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_splash_screen); Button button1 = (Button) findViewById(R.id.button1); ImageView imageView1 = (ImageView) findViewById(R.id.imageView1); ImageView imageView2 = (ImageView) findViewById(R.id.imageView2); TextView textView1 = (TextView) findViewById(R.id.textView1); final TextView textView2 = (TextView) findViewById(R.id.textView2); button1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { textView2.setText("This is a demo of setting text on a TextView object"); } }); } }
8d026432-c37f-4228-90b4-165323ee328c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-05T05:37:17", "repo_name": "Khaos-Labs/cosmostation-mobile", "sub_path": "/Cosmos-Android/app/src/main/java/wannabit/io/cosmostaion/model/Delegation_V1.java", "file_name": "Delegation_V1.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "71ce75ccc074c34327edbc5a9e075d53db832049", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Khaos-Labs/cosmostation-mobile
188
FILENAME: Delegation_V1.java
0.268941
package wannabit.io.cosmostaion.model; import android.text.TextUtils; import com.google.gson.annotations.SerializedName; import java.math.BigDecimal; import java.util.ArrayList; import wannabit.io.cosmostaion.base.BaseData; import wannabit.io.cosmostaion.model.type.Coin; public class Delegation_V1 { @SerializedName("delegation") public DelegationDetail_V1 delegation; @SerializedName("balance") public Coin balance; public class DelegationDetail_V1 { @SerializedName("delegator_address") public String delegator_address; @SerializedName("validator_address") public String validator_address; @SerializedName("shares") public String shares; } public BigDecimal getDelegation() { BigDecimal result = BigDecimal.ZERO; if (balance != null && !TextUtils.isEmpty(balance.amount)) { result = new BigDecimal(balance.amount); } return result; } }
2bc5c460-5741-4bdc-a2ac-b63c12cc024b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-04-06 06:53:29", "repo_name": "WEIOKING/my-cloud", "sub_path": "/web-server/src/main/java/cn/ply/cloud/webserver/springBean/TestParentBean.java", "file_name": "TestParentBean.java", "file_ext": "java", "file_size_in_byte": 1023, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "36fd482428358148ccd98cbcf5578b0c023ce552", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/WEIOKING/my-cloud
208
FILENAME: TestParentBean.java
0.225417
package cn.ply.cloud.webserver.springBean; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; /** * @Author ply * @Description * @Date created in 2022/3/27 * @ModifiedBy */ @Component public class TestParentBean { private static Logger logger = LoggerFactory.getLogger(TestBean.class); // @Autowired // private TestBean testBean; public TestParentBean(){ logger.info("-------------------------------------调用TestParentBean构造器实例化"); } // public TestBean getTestBean() { // return testBean; // } // // public void setTestBean(TestBean testBean) { // logger.info("-------------------------------------注入testBean属性值"); // this.testBean = testBean; // } public void test(){ logger.info("-------------------------------------调用test方法"); } }
487fca9d-1d1b-4836-879b-49b52e8e40ea
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-08-06 16:53:59", "repo_name": "AncientMariner/Gson-Example", "sub_path": "/workingWithGson/src/main/java/org/gnomes/gson/serialize/DwarfSerializer.java", "file_name": "DwarfSerializer.java", "file_ext": "java", "file_size_in_byte": 1086, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "201af91d9a174afb194178102b6b25ce8dd09440", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AncientMariner/Gson-Example
205
FILENAME: DwarfSerializer.java
0.287768
package org.gnomes.gson.serialize; import com.google.gson.*; import org.gnomes.model.Dwarf; import org.gnomes.model.UniqueWeapon; import org.gnomes.model.Weapon; import java.lang.reflect.Type; public class DwarfSerializer implements JsonSerializer<Dwarf> { @Override public JsonElement serialize(Dwarf src, Type typeOfSrc, JsonSerializationContext context) { JsonObject result = new JsonObject(); result.addProperty("name", src.getName()); result.addProperty("age", src.getDwarfAge()); // context knows for sure about registered serializers, so it will use FacialHairSerializer result.add("facialHair", context.serialize(src.getFacialHair())); JsonArray weapons = new JsonArray(); result.add("weapons", weapons); for (Weapon weapon : src.getWeapons()) { weapons.add( weapon instanceof UniqueWeapon ? context.serialize(weapon) : new JsonPrimitive(weapon.getType()) ); } return result; } }
222825fd-d952-4648-88b3-e1ba39c978bc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-10 13:32:15", "repo_name": "Reangsi/BbcDime2", "sub_path": "/app/src/main/java/bbcag/ch/dime/db/ImageDatabaseHelper.java", "file_name": "ImageDatabaseHelper.java", "file_ext": "java", "file_size_in_byte": 1013, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "aa3a6db38d1402c0d15d679fa6730ab92120052c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Reangsi/BbcDime2
189
FILENAME: ImageDatabaseHelper.java
0.253861
package bbcag.ch.dime.db; import android.content.Context; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class ImageDatabaseHelper extends SQLiteOpenHelper { private static ImageDatabaseHelper instance; private static final String DATABASE_NAME = "DimeDatabase3"; private static final int DATABASE_VERSION = 2; private ImageDatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } public static synchronized ImageDatabaseHelper getInstance(Context context) { if (instance == null) { instance = new ImageDatabaseHelper(context.getApplicationContext()); } return instance; } @Override public void onCreate(SQLiteDatabase db) { db.execSQL(ImageSqlTable.getSqlQueryForCreateTable()); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } }
a43ba052-19a9-41aa-b8fc-0414fac21dab
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-13 12:01:35", "repo_name": "breys94/Projet-Web-5A", "sub_path": "/breys-equestre/src/main/java/com/breys/breysequestre/affiliation/Affiliation.java", "file_name": "Affiliation.java", "file_ext": "java", "file_size_in_byte": 1096, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "64cc92d0e6cc3969b58f35fe7c13d867129f8824", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/breys94/Projet-Web-5A
267
FILENAME: Affiliation.java
0.250913
package com.breys.breysequestre.affiliation; import javax.persistence.*; @Entity @Table(name = "AFFILIATION") public class Affiliation { private Integer id; private Integer idHorse; private String emailUser; private Integer idReprise; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "AFFILIATION_ID") public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(name = "USER_EMAIL", nullable = false) public String getEmailUser() { return emailUser; } public void setEmailUser(String emailUser) { this.emailUser = emailUser; } @Column(name = "REPRISE_ID", nullable = false) public Integer getIdReprise() { return idReprise; } public void setIdReprise(Integer idReprise) { this.idReprise = idReprise; } @Column(name = "HORSE_ID", nullable = true) public Integer getIdHorse() { return idHorse; } public void setIdHorse(Integer idHorse) { this.idHorse = idHorse; } }
fa7cd409-2c94-48ee-a27a-18ad3efeb85e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-04-20T02:14:04", "repo_name": "Amitdedhia6/BlazePose", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1028, "line_count": 11, "lang": "en", "doc_type": "text", "blob_id": "a6a7c457bb775758f6cb09de6d3a65c436b8003c", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Amitdedhia6/BlazePose
207
FILENAME: README.md
0.243642
# BlazePose My experiementation with BlazePose deep learning algorithm This is the work I did as part of my engagement with Aerobi Inc as Machine Learning Developer. We are trying to implement a fast pose estimation algorithm that can run on an edge device such as mobile phone. The work done is part of MVP product. The BlazePose deep pipeline has two portions. One portion is heatmap generation and second portion is regression pipeline to accurately predict key points. I was still working on improving accuracy of heatmaps to be generated. Once we have fairly accurate heatmaps, then move on to the regression pipeline. Due to dynamic nature of start up environment, the goal changed and the project needed to be stopped in between. I did lot of experimentation and hyper parameter tuning to reach closer to getting accurate heatmaps. I did get some limited success as well. Also wrote few custom loss functions as well as part of experimentation. Some early results are available to see in Results 20210226.zip file.
ec354e15-ca4e-4f1d-ae7c-49ae9a8cf7c5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-09T07:00:57", "repo_name": "barsukNastya/videocatalog", "sub_path": "/src/main/java/com/melenteva/model/Video.java", "file_name": "Video.java", "file_ext": "java", "file_size_in_byte": 1115, "line_count": 60, "lang": "en", "doc_type": "code", "blob_id": "bd15b712d07824df3a3d56e1b1c84da18f6c1137", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/barsukNastya/videocatalog
258
FILENAME: Video.java
0.221351
package com.melenteva.model; /** * Created by User on 18.02.2017. */ public class Video { private int Id; private String videoName; private String videoAuthor; private String videoURL; public Video() { this.videoName = ""; this.videoAuthor = ""; this.videoURL = ""; } public Video(String videoName,String videoAuthor, String videoURL) { this.videoName = videoName; this.videoAuthor = videoAuthor; this.videoURL = videoURL; } public int getId() { return Id; } public void setId(int id) { Id = id; } public String getVideoName() { return videoName; } public void setVideoName(String videoName) { this.videoName = videoName; } public String getVideoAuthor() { return videoAuthor; } public void setVideoAuthor(String videoAuthor) { this.videoAuthor = videoAuthor; } public String getVideoURL() { return videoURL; } public void setVideoURL(String videoURL) { this.videoURL = videoURL; } }
8d92328b-afab-405f-8678-12da9aa39a62
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2015-08-27T21:29:33", "repo_name": "zheryu/LoomyNarty", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 999, "line_count": 18, "lang": "en", "doc_type": "text", "blob_id": "2504000f5afcf362b3fce6d8b3eabf8371f114b9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zheryu/LoomyNarty
255
FILENAME: README.md
0.23793
# LoomyNarty A simple console-based program that encodes a line of text into an existing image and extracts the text from the image. Can encode any text ## Encoding 1. Type 'encode' when prompted. 2. Insert your desired message in the next line. The message can be anything from 'message' to '好复杂!这个程序也可以编码中文!' 3. Type the file path of your input image. Index it from the C directory. e.g. 'C:\Users\my_user\image.png' 4. Type the file path of where you want to save the output image. e.g. 'C:\Users\my_user\output.png' ## Decoding 1. Type 'decode' when prompted. 2. Type the file path of your input image. Index it from the C directory. e.g. 'C:\Users\my_user\image.png' 3. View your text in the console ## Notes - You might have to change your IDE's file encoding format settings to utf-8 to get this to work with all kinds of text. - If the input image is not big enough, this program might not work correctly. Keep in mind, the current version is a prototype.
37d6ef32-8c6d-430d-9d1a-b49e95be32a6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-10-05T14:40:27", "repo_name": "cardososamantha/superheromarket", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 989, "line_count": 29, "lang": "en", "doc_type": "text", "blob_id": "9f1fe96f96beeaf3405d83853ac86556117fd2c2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cardososamantha/superheromarket
277
FILENAME: README.md
0.233706
## Steps to step To run this project locally, you must follow this steps: ### 0: `Install the CORS Unblock extention` This is required due to how browsers deal with different domains requests.\ Without this, the connection with the Super Hero API won't be possible.\ Install the extension here -> https://chrome.google.com/webstore/detail/cors-unblock/lfhmikememgdcahcdlaciloancbhjino ### 1: `yarn server-mock` Starts the JSON Server Mock to allow data persistence. ### 2: `yarn start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. ### 3 `Enable CORS Unblock` <img src="https://media.discordapp.net/attachments/783481131969806368/894945956297060432/unknown.png"> Activate the extension previously installed on the [STEP 0] Click on the extension, on the Tab of your browser where the app is running, and it's done!
1c9c1523-dc4d-4be5-8585-1fff8fa456f1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-09-01T03:28:01", "repo_name": "arjunpunnam/aws-lambda-coldstart-optimised", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1011, "line_count": 37, "lang": "en", "doc_type": "text", "blob_id": "d68d5aa362bde8ba04cf34432d409aed7725521a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/arjunpunnam/aws-lambda-coldstart-optimised
236
FILENAME: README.md
0.291787
# aws-lambda-coldstart-optimised An example module to demonstarte the cold start optimization of aws-lambda in Java. Create a new serverless Java project using serverless template `sls create --template aws-java-maven` A new serverless project is created in your working directory,update the default configurations in pom.xml and serverless.yml and run mvn clean install sls deploy Once the function code is built and deployed to your aws environment , invoke function using below command sls invoke --function {function_name} If everything goes fine , we should receive the following response { "statusCode": 200, "body": "{\"message\":\"Go Serverless v1.x! Your function executed successfully!\",\"input\":{}}", "headers": { "X-Powered-By": "AWS Lambda & serverless" }, "isBase64Encoded": false } Now lets go and check the logs serverless logs --function {function_name} ![Getting Started](./images/initialcoldstart.jpg) to be continued...
01a940d3-9ed5-4866-ba81-43efb16d25c0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-05 11:43:04", "repo_name": "zxc321zxchb/ssm", "sub_path": "/springmvcmybatis/src/com/itheima/springmvc/service/impl/ItemServiceImpl.java", "file_name": "ItemServiceImpl.java", "file_ext": "java", "file_size_in_byte": 997, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "aa567270ad76074a0753e5b61438d835c43f022a", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zxc321zxchb/ssm
208
FILENAME: ItemServiceImpl.java
0.2227
package com.itheima.springmvc.service.impl; import com.itheima.springmvc.mapper.ItemsMapper; import com.itheima.springmvc.po.Items; import com.itheima.springmvc.po.QueryVo; import com.itheima.springmvc.service.ItemService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class ItemServiceImpl implements ItemService { @Autowired private ItemsMapper itemsMapper; @Override public List<Items> getItemsList() { List<Items> itemList = itemsMapper.getItemList(); return itemList; } //根据id查询 @Override public Items getItemsById(Integer id) { Items items = itemsMapper.selectByPrimaryKey(id); return items; } @Override public void updateItem(Items items) { itemsMapper.updateByPrimaryKeySelective(items); } @Override public QueryVo queryItem(Items items) { return null; } }
e86c6a37-7716-4b59-a7c9-5562c6de72cd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-29 05:18:55", "repo_name": "arpit209/LearningProject", "sub_path": "/SikuliConcept/src/main/java/ChromeHeadlessBrowser.java", "file_name": "ChromeHeadlessBrowser.java", "file_ext": "java", "file_size_in_byte": 1065, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "bd688178fd7362472566a3d287fe58aec20e2c5a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/arpit209/LearningProject
232
FILENAME: ChromeHeadlessBrowser.java
0.277473
import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; public class ChromeHeadlessBrowser { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:\\Users\\arpit\\Downloads\\movies\\Compressed\\ChromeDriver\\chromedriver.exe"); ChromeOptions options = new ChromeOptions(); options.addArguments("window-size=1400,800"); options.addArguments("headless"); WebDriver driver = new ChromeDriver(options); driver.get("https://facebook.com"); System.out.println("title before login ===" +driver.getTitle()); driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); driver.findElement(By.id("email")).sendKeys("ranirk9@gmail.com"); driver.findElement(By.id("pass")).sendKeys("ranirk9"); driver.findElement(By.id("u_0_8")).click(); System.out.println("title after login ===" +driver.getTitle()); } }
5a2f0b2b-e45d-4c9c-bb94-2d8fa517d18d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-14 21:29:05", "repo_name": "pullagujju79/HBMS", "sub_path": "/HBMS/src/com/igate/hbms/dao/HotelRowMapper1.java", "file_name": "HotelRowMapper1.java", "file_ext": "java", "file_size_in_byte": 1052, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "5e9486824ad6ebcbd4d7a515febfbb5b426453d1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pullagujju79/HBMS
189
FILENAME: HotelRowMapper1.java
0.286968
/** * */ package com.igate.hbms.dao; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.jdbc.core.RowMapper; import com.igate.hbms.bean.HotelBean; /** * @author Hbms_team4 * */ /********************************************************************************************************************************************* *Class Name:HotelRowMapper *@author Hbms_team4 *Description:hotel RowMapper layer class which implements the RowMapper and perform the database access operations as per the user selected operation. *Date:12/3/2014 **********************************************************************************************************************************************/ public class HotelRowMapper1 implements RowMapper<HotelBean> { public HotelBean mapRow(ResultSet rst,int rowNum) throws SQLException { HotelResultSetExtractor hotelResultSetExtractor=new HotelResultSetExtractor(); HotelBean hotelBean=(HotelBean)hotelResultSetExtractor.extractData(rst); return hotelBean; } }
5c662a80-fd76-4b63-a92f-3a147d69cd3c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-07-25 11:21:53", "repo_name": "sumy7/DoorAccessControlSystem", "sub_path": "/src/com/sumy/dooraccesscontrolsystem/activity/WelcomeActivity.java", "file_name": "WelcomeActivity.java", "file_ext": "java", "file_size_in_byte": 1073, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "f072bac78c40c9a47dcb497acce7f76fa0d7bf2b", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sumy7/DoorAccessControlSystem
229
FILENAME: WelcomeActivity.java
0.240775
package com.sumy.dooraccesscontrolsystem.activity; import android.os.Handler; import com.sumy.dooraccesscontrolsystem.R; /** * 欢迎界面 * * @author sumy * */ public class WelcomeActivity extends BaseActivity { private Handler handler; private Class toGotoActivity; @Override protected int getLayoutResID() { return R.layout.activity_welcome; } @Override protected void initView() { // 判断是否第一次启动 if (isFirst()) { // 第一次启动,转到引导界面 toGotoActivity = ActivitySplash.class; } else { // 不是第一次启动,转到主界面 toGotoActivity = MainMenuActivity.class; } handler = new Handler(); // 创建handler,3秒后跳过欢迎界面 handler = new Handler(); handler.postDelayed(new Runnable() { @Override public void run() { startActivity(toGotoActivity); finish(); } }, 2000); } }
e21f1b13-e6be-417e-af6d-e4bf5ae35299
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-22 19:03:47", "repo_name": "Caceresenzo/jeldwen", "sub_path": "/backend/backend-glial/src/main/java/jeldwen/backend/glial/convertor/TimeConverter.java", "file_name": "TimeConverter.java", "file_ext": "java", "file_size_in_byte": 985, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "fdfeba5f0db57f760419ceec20807a2b6f56dbb0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Caceresenzo/jeldwen
213
FILENAME: TimeConverter.java
0.281406
package jeldwen.backend.glial.convertor; import java.time.LocalTime; import java.time.format.DateTimeFormatter; import javax.persistence.AttributeConverter; import javax.persistence.Converter; import org.springframework.stereotype.Component; /** * {@link LocalTime} convertor for persistence.<br> * Allowing Hibernete to understand the shitty HH:mm:ss time format. * * @author Enzo CACERES */ @Converter @Component public class TimeConverter implements AttributeConverter<LocalTime, String> { /* Constants */ public static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("HH:mm:ss"); @Override public String convertToDatabaseColumn(LocalTime time) { if (time == null) { return null; } return FORMATTER.format(time); } @Override public LocalTime convertToEntityAttribute(String raw) { if (raw == null || raw.isEmpty()) { return null; } return LocalTime.parse(raw, FORMATTER); } }
7e594153-fa46-4e56-aae5-67f3410d4e1a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-07-18 07:58:59", "repo_name": "zhengqingya/java-workspace", "sub_path": "/SpringCloud系列/02-Sentinel 1.8.4 规则持久化到Nacos/sentinel-dashboard-1.8.4-nacos/src/main/java/com/alibaba/csp/sentinel/dashboard/rule/nacos/flow/FlowRuleNacosProvider.java", "file_name": "FlowRuleNacosProvider.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "e3f3a29afa3f654aa0b2eedd525099973200d0e3", "star_events_count": 30, "fork_events_count": 24, "src_encoding": "UTF-8"}
https://github.com/zhengqingya/java-workspace
187
FILENAME: FlowRuleNacosProvider.java
0.243642
package com.alibaba.csp.sentinel.dashboard.rule.nacos.flow; import com.alibaba.csp.sentinel.dashboard.datasource.entity.rule.FlowRuleEntity; import com.alibaba.csp.sentinel.dashboard.rule.DynamicRuleProvider; import com.alibaba.csp.sentinel.dashboard.rule.nacos.NacosConfigUtil; import com.alibaba.nacos.api.config.ConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.List; @Component("flowRuleNacosProvider") public class FlowRuleNacosProvider implements DynamicRuleProvider<List<FlowRuleEntity>> { @Autowired private ConfigService configService; @Override public List<FlowRuleEntity> getRules(String appName) throws Exception { return NacosConfigUtil.getRuleEntitiesFromNacos( this.configService, appName, NacosConfigUtil.FLOW_DATA_ID_POSTFIX, FlowRuleEntity.class ); } }
617172b4-a904-406f-911d-42420fb86c7c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-02-10 15:40:58", "repo_name": "MohebMak/server-client-chat", "sub_path": "/src/client.java", "file_name": "client.java", "file_ext": "java", "file_size_in_byte": 1052, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "955ce86e4e4e16d0ad8d9af5f29ef9be382eedde", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MohebMak/server-client-chat
192
FILENAME: client.java
0.272025
import java.io.*; import java.net.*; class client { public static void main(String args[]) throws Exception { InetAddress ipAddress = InetAddress.getByName("localhost"); Socket clientSocket = new Socket(ipAddress, 6789); DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream()); DataInputStream inFromServer = new DataInputStream(clientSocket.getInputStream()); while(true) { String sentence; BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in)); System.out.println(inFromServer.readUTF()); sentence = inFromUser.readLine(); outToServer.writeUTF(sentence); if(sentence.equalsIgnoreCase("BYE")) { clientSocket.close(); inFromServer.close(); outToServer.close(); break; } } } }
77491d47-4880-4449-94e0-416d62efae7e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-21 11:35:25", "repo_name": "KamilS123/JSP_SKLEP", "sub_path": "/src/main/java/com/kamil/jsp_sklep/servlets/ProductsServlets.java", "file_name": "ProductsServlets.java", "file_ext": "java", "file_size_in_byte": 973, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "d8f27475307ff2f30bcfd0157ed920898885de7f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/KamilS123/JSP_SKLEP
179
FILENAME: ProductsServlets.java
0.285372
package com.kamil.jsp_sklep.servlets; import com.kamil.jsp_sklep.dao.impl.ProductJsonDaoImpl; import com.kamil.jsp_sklep.dao.spec.ProductDao; import com.kamil.jsp_sklep.models.Product; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; @WebServlet("/Products") public class ProductsServlets extends HttpServlet { private ProductDao productDao = new ProductJsonDaoImpl(); @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { List<Product> products = productDao.findAll(); req.setAttribute("productList",products); RequestDispatcher rd = req.getRequestDispatcher("in.jsp"); rd.forward(req,resp); } }
1a68ae32-9986-4fed-a4f8-f10bb915d03b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-13 06:15:52", "repo_name": "sardorsamadov926611/DABAWS", "sub_path": "/src/main/java/uz/daba/gateway/transports/nalog/BaseNalogResult.java", "file_name": "BaseNalogResult.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "0e08a7e730767e6ccefa5cc361b50821d2a31828", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sardorsamadov926611/DABAWS
199
FILENAME: BaseNalogResult.java
0.224055
package uz.daba.gateway.transports.nalog; import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; public class BaseNalogResult implements Serializable { @JsonProperty("code") private Integer result_code; @JsonProperty("text") private String result_message; public BaseNalogResult() { this.result_code = 2; this.result_message = "Malumotlarni qabul qilishda xatolik"; } public BaseNalogResult(Integer result_code, String result_message) { this.result_code = result_code; this.result_message = result_message; } public Integer getResult_code() { return result_code; } public void setResult_code(Integer result_code) { this.result_code = result_code; } public String getResult_message() { return result_message; } public void setResult_message(String result_message) { this.result_message = result_message; } }
1d2e7262-6e91-4a92-99eb-574eca9e55fc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-05-28 03:26:27", "repo_name": "wocommunity/wonder", "sub_path": "/Frameworks/PlugIns/EROraclePlugIn/Sources/com/webobjects/jdbcadaptor/EROracleExpressionDelegate.java", "file_name": "EROracleExpressionDelegate.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 26, "lang": "en", "doc_type": "code", "blob_id": "7912a9ce438af5189855a48e07cd4f6aa07dc162", "star_events_count": 89, "fork_events_count": 85, "src_encoding": "UTF-8"}
https://github.com/wocommunity/wonder
194
FILENAME: EROracleExpressionDelegate.java
0.271252
package com.webobjects.jdbcadaptor; import com.webobjects.eoaccess.EOEntity; import com.webobjects.eoaccess.EORelationship; import com.webobjects.foundation.NSArray; import com.webobjects.foundation._NSStringUtilities; import com.webobjects.jdbcadaptor.EROracleExpression.Delegate; public class EROracleExpressionDelegate implements Delegate { protected String constraintName(String tableName, String relationshipName) { String constraintName = _NSStringUtilities.concat(tableName, "_", relationshipName, "_FK"); return constraintName; } public String constraintStatementForRelationship(EORelationship relationship, NSArray sourceColumns, NSArray destinationColumns) { EOEntity entity = relationship.entity(); String tableName = entity.externalName(); int lastDot = tableName.lastIndexOf('.'); if (lastDot >= 0) { tableName = tableName.substring(lastDot + 1); } return constraintName(tableName, relationship.name()); } }
ac8cdee7-64c0-4017-bdbf-ae055019c0e2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-08-28 03:44:47", "repo_name": "TangGuangChuan/SendEmail", "sub_path": "/src/test/java/com/example/email/service/ServiceTest.java", "file_name": "ServiceTest.java", "file_ext": "java", "file_size_in_byte": 1165, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "8c17c042f47d6b2b7d6b7e7b0ca07f233e3152dd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/TangGuangChuan/SendEmail
262
FILENAME: ServiceTest.java
0.243642
package com.example.email.service; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import javax.annotation.Resource; import javax.mail.MessagingException; @RunWith(SpringRunner.class) @SpringBootTest public class ServiceTest { @Resource MailService mailService; @Test public void sendSimpleMailTest(){ mailService.sendSimpleMail("616934150@qq.com","测试","这是一个测试邮件"); } @Test public void sendHtmlMailTest() throws MessagingException { String content="<html>\n"+ "<body>\n"+ "<h3>hello world , 这是一封邮件!!!</h3>\n"+ "</body>\n"+ "</html>"; mailService.sendHtmlMail("616934150@qq.com","html测试",content); } @Test public void sendAttachmentMailTest() throws MessagingException { String filePath = "/home/tgc/IdeaProjects/SendEmail/pom.xml"; mailService.sendAttachmentsMail("616934150@qq.com","附件测试","这是一封带附件的邮件",filePath); } }
2a87416a-63aa-48ea-9afd-dc8ac5407827
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-14 09:55:25", "repo_name": "q6527127/ssm-mysql", "sub_path": "/src/main/java/com/example/config/FilterConfig.java", "file_name": "FilterConfig.java", "file_ext": "java", "file_size_in_byte": 1014, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "aff894c0a2829b1539321336e551c1599ea93328", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/q6527127/ssm-mysql
184
FILENAME: FilterConfig.java
0.250913
package com.example.config; import java.util.ArrayList; import java.util.List; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.example.filter.CustomFilter; import com.example.service.TestBeanService; @Configuration public class FilterConfig { //过滤器 @Bean public FilterRegistrationBean filterRegistrationBean(){ FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(); List<String> urlPatterns = new ArrayList<String>(); CustomFilter testFilter = new CustomFilter(); //new过滤器 urlPatterns.add("/*"); //指定需要过滤的url filterRegistrationBean.setFilter(testFilter); //set filterRegistrationBean.setUrlPatterns(urlPatterns); //set filterRegistrationBean.setOrder(Integer.MAX_VALUE);//过滤器顺序 return filterRegistrationBean; } }
843a616b-99fb-4958-a4fb-86f46187baa8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-23 10:47:56", "repo_name": "wolvesleader/interview", "sub_path": "/base_java/src/main/java/com/quincy/java/netty/transportcustomobject/handler/AccountMessageEncoder.java", "file_name": "AccountMessageEncoder.java", "file_ext": "java", "file_size_in_byte": 1056, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "36307d415bb77354fa37e5d4d8365110f6cfb604", "star_events_count": 34, "fork_events_count": 8, "src_encoding": "UTF-8"}
https://github.com/wolvesleader/interview
193
FILENAME: AccountMessageEncoder.java
0.261331
package com.quincy.java.netty.transportcustomobject.handler; import com.quincy.java.netty.transportcustomobject.domain.Account; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToByteEncoder; import java.io.ByteArrayOutputStream; import java.io.ObjectOutputStream; /** * author:quincy * Date:2019-05-26 * 把一个对象转换为ByteBuf * 对象编码器 */ public class AccountMessageEncoder extends MessageToByteEncoder<Account> { @Override protected void encode(ChannelHandlerContext channelHandlerContext, Account account, ByteBuf byteBuf) throws Exception { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteArrayOutputStream); objectOutputStream.writeObject(account); byte[] bytes = byteArrayOutputStream.toByteArray(); int dataLength = bytes.length; byteBuf.writeInt(dataLength); byteBuf.writeBytes(bytes); } }
84228dd3-bd48-4787-8dba-68579ff704aa
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-07 08:51:19", "repo_name": "fangkun202303/quartz", "sub_path": "/bootquartz/src/main/java/com/multimodule/bootquartz/task/MyCustomTask.java", "file_name": "MyCustomTask.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "2762158c1c789c626c599253af3bbcbe10170791", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/fangkun202303/quartz
263
FILENAME: MyCustomTask.java
0.262842
package com.multimodule.bootquartz.task; import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.text.SimpleDateFormat; import java.util.Date; /** * @ClassName: MyCustomTask * @Description: 使用boot自带的 * @Author: FangKun * @Date: Created in 2019/4/3 17:05 * @Version: 1.0 */ //@Component public class MyCustomTask implements Job { public String timeString="*/1 * * * * ?"; // @Scheduled(cron="0/1 * * * * ?") public void run() { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); System.out.println("此时的时间为:"+df.format(new Date())+",毫秒数为:"+System.currentTimeMillis()); } @Override public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException { SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); System.out.println("MyCustomTask此时的时间为:"+df.format(new Date())+",毫秒数为:"+System.currentTimeMillis()); } }
db5f6bab-b4fa-4b0e-9867-96a479fbdba0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-04 03:13:04", "repo_name": "yueyakun/my-demo", "sub_path": "/aop-learning/src/main/java/com/fxg/controller/TestAopController.java", "file_name": "TestAopController.java", "file_ext": "java", "file_size_in_byte": 1132, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "c47113189dfc42d3dec8f66fd242fd2e18d281a8", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yueyakun/my-demo
224
FILENAME: TestAopController.java
0.218669
package com.fxg.controller; import com.fxg.annotation.ApiLog; import com.fxg.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * test aop */ @RestController @RequestMapping("/test") public class TestAopController { @Autowired private UserService userService; @ApiLog @PostMapping("/test1") public String test1() { System.out.println("代理public方法:test1"); System.out.println(userService); System.out.println(this); this.privateMethod(); return "ok"; } private void privateMethod() { System.out.println("私有方法方法:privateMethod"); System.out.println(userService); System.out.println(this); } @ApiLog @GetMapping("/test2") private void test2() { System.out.println("代理private方法:test2"); System.out.println(this.userService); System.out.println(this); this.privateMethod(); } }
e7166333-6691-4dca-af93-02712fe06bb2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-18 07:47:46", "repo_name": "pmarkotan/startmedsol-prototype", "sub_path": "/src/main/java/hu/paninform/startmedsol/service/mapper/PphMedicineQualifiedNameMapper.java", "file_name": "PphMedicineQualifiedNameMapper.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "8d104a22a8c0989f4c09f557b8cf290761c35f9b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pmarkotan/startmedsol-prototype
218
FILENAME: PphMedicineQualifiedNameMapper.java
0.26588
package hu.paninform.startmedsol.service.mapper; import hu.paninform.startmedsol.domain.*; import hu.paninform.startmedsol.service.dto.PphMedicineQualifiedNameDTO; import org.mapstruct.*; /** * Mapper for the entity {@link PphMedicineQualifiedName} and its DTO {@link PphMedicineQualifiedNameDTO}. */ @Mapper(componentModel = "spring", uses = {}) public interface PphMedicineQualifiedNameMapper extends EntityMapper<PphMedicineQualifiedNameDTO, PphMedicineQualifiedName> { @Mapping(target = "medicines", ignore = true) @Mapping(target = "removeMedicine", ignore = true) PphMedicineQualifiedName toEntity(PphMedicineQualifiedNameDTO pphMedicineQualifiedNameDTO); default PphMedicineQualifiedName fromId(Long id) { if (id == null) { return null; } PphMedicineQualifiedName pphMedicineQualifiedName = new PphMedicineQualifiedName(); pphMedicineQualifiedName.setId(id); return pphMedicineQualifiedName; } }
b9c4b869-ce92-40fb-94f0-a1561ab7a97b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-08 06:10:14", "repo_name": "18201597650/LxSuprise", "sub_path": "/module_suprise/src/main/java/com/example/module_suprise/SupriseActivity.java", "file_name": "SupriseActivity.java", "file_ext": "java", "file_size_in_byte": 1082, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "47baf43cf743ce0e0c6252cbf857a50d7b183b39", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/18201597650/LxSuprise
185
FILENAME: SupriseActivity.java
0.217338
package com.example.module_suprise; import android.os.Bundle; import android.view.View; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.android.arouter.launcher.ARouter; import com.example.export_suprise.router.SupriseRouterTable; @Route(path = "/suprise/SupriseActivity") public class SupriseActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_suprise); FragmentManager manager = getSupportFragmentManager(); FragmentTransaction transaction= manager.beginTransaction(); Fragment userFragment = (Fragment) ARouter.getInstance().build(SupriseRouterTable.PATH_FRAGMENT_SUPRISE).navigation(); transaction.add(R.id.fl_test_fragment, userFragment, "tag"); transaction.commit(); } }
f3c58fa8-e417-4ff3-bb60-5e4cb681128a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-05 15:20:58", "repo_name": "ZayPhyo01/MSimple", "sub_path": "/app/src/main/java/com/example/msimple/data/model/CategoryModel.java", "file_name": "CategoryModel.java", "file_ext": "java", "file_size_in_byte": 1015, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "b09d991e1d820eb4540bc6aa0f73143d4adeecb0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ZayPhyo01/MSimple
190
FILENAME: CategoryModel.java
0.283781
package com.example.msimple.data.model; import com.example.msimple.Delegate.CategoryDelegate; import com.example.msimple.data.vos.CategoryVO; import com.example.msimple.utils.AppConstants; import java.util.List; public class CategoryModel extends BaseModel implements ICategoryModel { private static CategoryModel mCategoryModel; private CategoryModel() { } public static CategoryModel getInstance() { if (mCategoryModel == null) { mCategoryModel = new CategoryModel(); } return mCategoryModel; } @Override public void getCategory(final Response response) { mRetrofit.loadCategory(AppConstants.ACCESS_TOKEN, "1", new CategoryDelegate() { @Override public void onSuccess(List<CategoryVO> categoryVO) { response.onSuccess(categoryVO); } @Override public void fail(String message) { response.onFail(message); } }); } }
f1fad10a-34b9-4a96-a545-91c22439d53c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-07-27 13:37:12", "repo_name": "Chuckame/dofus-protocol", "sub_path": "/src/main/java/org/chuckame/dofus2/protocol/messages/game/alliance/AllianceModificationNameAndTagValidMessage.java", "file_name": "AllianceModificationNameAndTagValidMessage.java", "file_ext": "java", "file_size_in_byte": 1063, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "8aebf81ec103cc1fe7761db760205fbe7aec8924", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Chuckame/dofus-protocol
249
FILENAME: AllianceModificationNameAndTagValidMessage.java
0.295027
package org.chuckame.dofus2.protocol.messages.game.alliance; import org.chuckame.dofus2.common.io.IDataReader; import org.chuckame.dofus2.common.io.IDataWriter; import org.chuckame.dofus2.common.io.INetworkMessage; import lombok.Data; import lombok.ToString; import lombok.EqualsAndHashCode; @Data @ToString @EqualsAndHashCode public class AllianceModificationNameAndTagValidMessage implements INetworkMessage { public static final int MESSAGE_ID = 6449; private String allianceName; private String allianceTag; public AllianceModificationNameAndTagValidMessage() { } public AllianceModificationNameAndTagValidMessage(String allianceName, String allianceTag) { this.allianceName = allianceName; this.allianceTag = allianceTag; } public int getProtocolId() { return MESSAGE_ID; } public void deserialize(IDataReader reader) { this.allianceName = reader.readUTF(); this.allianceTag = reader.readUTF(); } public void serialize(IDataWriter writer) { writer.writeUTF(this.allianceName); writer.writeUTF(this.allianceTag); } }
59b88584-32a5-4899-8f19-3113fa3f6890
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-12-06 07:16:45", "repo_name": "331264105/Cloth", "sub_path": "/Cloth-manager/Cloth-manager-serviceImpl/src/main/java/com/didu/serviceImpl/AddressServiceImpl.java", "file_name": "AddressServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1144, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "519a1d9a562cbbe9bc787308e89b9125858668c8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/331264105/Cloth
233
FILENAME: AddressServiceImpl.java
0.27513
package com.didu.serviceImpl; import com.didu.dao.AddressDao; import com.didu.domain.Address; import com.didu.service.AddressService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * Created by Administrator on 2017/11/27. */ @Service @Transactional public class AddressServiceImpl implements AddressService { @Autowired private AddressDao addressDao; @Override public boolean addAddress(Address address) { return addressDao.addAddress(address)>0?true:false; } @Override public List<Address> queryAddress(Address address) { return addressDao.queryAddress(address); } @Override public boolean deAddress(int id) { return addressDao.deAddress(id)>0?true:false; } @Override public boolean updateAddress(Address address) { return addressDao.updateAddress(address)>0?true:false; } @Override public boolean updateSelected() { return addressDao.updateSelected()>0?true:false; } }
022b5556-bcf2-419d-85d9-e1f4dce32573
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-02-25 07:24:16", "repo_name": "raktotpal/MyInternal", "sub_path": "/src/main/java/com/kogentix/internal/kafka/test/KafkaProducer.java", "file_name": "KafkaProducer.java", "file_ext": "java", "file_size_in_byte": 1204, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "5f9ecae8bfbaff82d0277ce7cadd751d126ce292", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/raktotpal/MyInternal
286
FILENAME: KafkaProducer.java
0.279042
package com.kogentix.internal.kafka.test; import java.util.Properties; import kafka.javaapi.producer.Producer; import kafka.producer.KeyedMessage; import kafka.producer.ProducerConfig; public class KafkaProducer { public static void main(String[] args) throws InterruptedException { Properties props = new Properties(); props.put("metadata.broker.list", "localhost:9092"); props.put("serializer.class", "kafka.serializer.StringEncoder"); props.put("partitioner.class", "com.kogentix.internal.kafka.test.KafkaPartitioner"); props.put("request.required.acks", "1"); ProducerConfig config = new ProducerConfig(props); Producer<String, String> producer = new Producer<String, String>(config); // String msg = "Hi I am Raktotpal"; // KeyedMessage<String, String> data = new KeyedMessage<String, String>( // "rpal-01", msg); // producer.send(data); int i = 0; while (true) { String msg = "Hi I am Raktotpal"; KeyedMessage<String, String> data = new KeyedMessage<String, String>("rpal-multi-part", msg + " ::: " + i); producer.send(data); i++; Thread.sleep(1000); } } }
41d6a771-98c2-43f1-8f30-e18fec5af7b6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-24 11:43:21", "repo_name": "zhouzhutou/tszh", "sub_path": "/src/main/java/com/tszh/vo/responseVO/ResAddressVO.java", "file_name": "ResAddressVO.java", "file_ext": "java", "file_size_in_byte": 1143, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "1e252b5154184a9d96ea167530ceb3bb5921ea0f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zhouzhutou/tszh
253
FILENAME: ResAddressVO.java
0.213377
package com.tszh.vo.responseVO; import com.fasterxml.jackson.annotation.JsonInclude; /** * Created by Administrator on 2018/5/30 0030. */ @JsonInclude(JsonInclude.Include.NON_NULL) public class ResAddressVO { private String province; private String city; private String county; private String street; public ResAddressVO() { } public ResAddressVO(String province, String city, String county, String street) { this.province = province; this.city = city; this.county = county; this.street = street; } public String getProvince() { return province; } public void setProvince(String province) { this.province = province; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getCounty() { return county; } public void setCounty(String county) { this.county = county; } public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } }
b39d11c7-aaec-4cdd-971b-d68a89cdfc8d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-07-02T04:35:51", "repo_name": "blahah/nala-stream", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1034, "line_count": 35, "lang": "en", "doc_type": "text", "blob_id": "fb15c8f7ff472ebc7fd74bdf97cea74a1f5cb8ef", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/blahah/nala-stream
290
FILENAME: README.md
0.229535
--- <div align="center"> <h1>nala-stream</h1> <h2>WIP - very simple opinionated streaming natural language processing</h2> <p> <a href="https://npmjs.com/packages/nala-stream" alt="npm package"> <img src="https://img.shields.io/npm/v/nala-stream.svg?style=flat-square"> </a> <a href="https://github.com/blahah/nala-stream/blob/master/LICENSE" alt="CC0 public domain"> <img src="https://img.shields.io/badge/license-CC0-ff69b4.svg?style=flat-square"> </a> </p> </div> --- ## Install ``` npm install nala-stream ``` ## Usage ``` js var nala = require('nala-stream') ``` ## License To the extent possible by law, we transfer any rights we have in this code to the public domain. Specifically, we do so using the [CC0 1.0 Universal Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/). You can do whatever you want with this code. No need to credit us, link to us, include any license, or anything else. But if you want to do those things, you're free to do that too.
c2d4b380-9b4f-40d5-a710-18adb85c30c9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-16 18:36:54", "repo_name": "drmitchell85/Udacity-News-App-Stage-2", "sub_path": "/app/src/main/java/com/example/android/newsappstage1/Article.java", "file_name": "Article.java", "file_ext": "java", "file_size_in_byte": 1142, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "c5a2c653e14b07ddbabfcbae9174c9b6a0f22eed", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/drmitchell85/Udacity-News-App-Stage-2
237
FILENAME: Article.java
0.218669
package com.example.android.newsappstage1; public class Article { private String mArticleName; private String mArticleUrl; private String mArticleType; private String mArticleSubject; private String mArticleDate; private String mArticleAuthor; public Article(String articleName, String articleUrl, String articleType, String articleSubject, String articleDate, String articleAuthor) { this.mArticleName = articleName; this.mArticleUrl = articleUrl; this.mArticleType = articleType; this.mArticleSubject = articleSubject; this.mArticleDate = articleDate; this.mArticleAuthor = articleAuthor; } public String getArticleName() { return mArticleName; } public String getArticleUrl() { return mArticleUrl; } public String getArticleType() { return mArticleType; } public String getArticleSubject() { return mArticleSubject; } public String getArticleDate() { return mArticleDate; } public String getArticleAuthor() { return mArticleAuthor; } }
fb91d66a-83fc-4e80-80f2-c21e3dab147e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-09-01 20:18:58", "repo_name": "skylot/jadx", "sub_path": "/jadx-core/src/main/java/jadx/api/plugins/JadxPluginInfo.java", "file_name": "JadxPluginInfo.java", "file_ext": "java", "file_size_in_byte": 1203, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "3e897656e359b80f887ddd2b3da3ba550aeeea77", "star_events_count": 37693, "fork_events_count": 4938, "src_encoding": "UTF-8"}
https://github.com/skylot/jadx
271
FILENAME: JadxPluginInfo.java
0.264358
package jadx.api.plugins; public class JadxPluginInfo { private final String pluginId; private final String name; private final String description; private final String homepage; /** * Conflicting plugins should have the same 'provides' property; only one will be loaded */ private final String provides; public JadxPluginInfo(String id, String name, String description) { this(id, name, description, "", id); } public JadxPluginInfo(String pluginId, String name, String description, String provides) { this(pluginId, name, description, "", provides); } public JadxPluginInfo(String pluginId, String name, String description, String homepage, String provides) { this.pluginId = pluginId; this.name = name; this.description = description; this.homepage = homepage; this.provides = provides; } public String getPluginId() { return pluginId; } public String getName() { return name; } public String getDescription() { return description; } public String getHomepage() { return homepage; } public String getProvides() { return provides; } @Override public String toString() { return pluginId + ": " + name + " - '" + description + '\''; } }
373e0e56-4141-4a9e-a3f2-0294e217bdc2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-15 09:09:58", "repo_name": "iamshijun/cas-client-spring-support-parent", "sub_path": "/cas-client-spring-support/src/main/java/com/github/iamshijun/passport/cas/filter/VirtualFilterChain.java", "file_name": "VirtualFilterChain.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "ad27eec273b2356892b54d37aefb0157ba591122", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/iamshijun/cas-client-spring-support-parent
224
FILENAME: VirtualFilterChain.java
0.287768
package com.github.iamshijun.passport.cas.filter; import java.io.IOException; import java.util.List; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; //spring也有同名(作用一样)的类,和CompositeFilter /** * @author aimysaber@gmail.com * */ public class VirtualFilterChain implements FilterChain { private final List<? extends Filter> filters; private final FilterChain originalChain; private int currentPosition; VirtualFilterChain(List<? extends Filter> filters, FilterChain originalChain) { this.filters = filters; this.originalChain = originalChain; } @Override public void doFilter(ServletRequest request, ServletResponse response) throws IOException, ServletException { if (currentPosition == filters.size()) { originalChain.doFilter(request, response); } else { currentPosition++; Filter nextFilter = filters.get(currentPosition - 1); nextFilter.doFilter(request, response, this); } } }
c06319a7-be58-49ba-8606-c91476c3d8e8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-09 10:02:25", "repo_name": "jinhm007/fkbookapp", "sub_path": "/fkbookapp/src/main/java/com/example/fkbookapp/controller/BookController.java", "file_name": "BookController.java", "file_ext": "java", "file_size_in_byte": 1158, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "162cdc43794a51088362bdecac94073b0b868f07", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jinhm007/fkbookapp
240
FILENAME: BookController.java
0.262842
package com.example.fkbookapp.controller; import com.example.fkbookapp.model.Book; import com.example.fkbookapp.service.BookService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController public class BookController { @Autowired private BookService bookService; @RequestMapping(value ="/main",method = RequestMethod.GET) public List<Book> main(){ List<Book> list =bookService.getAll(); return list; } @RequestMapping(value ="/addBook",method = RequestMethod.GET) public String addBook(){ Book book =new Book(); book.setAuthor("jinhm"); book.setImage("liuyilin.jpg"); book.setName("jinhm007"); book.setPrice(23.33); book.setPublication("清华出版社"); book.setPublicationdate("2017-1-1"); book.setRemark("随便"); bookService.insert(book); return ("success"+book.toString()); } }
15b6db7d-f198-49cd-b35c-b125c4bcee4c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-24 22:30:19", "repo_name": "LuceroRosadio/NavigationViewAndroid", "sub_path": "/app/src/main/java/com/amcor/opcion/createOrder/ContainerFragment.java", "file_name": "ContainerFragment.java", "file_ext": "java", "file_size_in_byte": 1206, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "bc5e2a0ced9e47498b61bf885177ebe9263580b8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/LuceroRosadio/NavigationViewAndroid
202
FILENAME: ContainerFragment.java
0.243642
package com.amcor.opcion.createOrder; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.amcor.R; /** * A simple {@link Fragment} subclass. */ public class ContainerFragment extends Fragment { public ContainerFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_container, container, false); CreateOrderFragment createOrderFragment = new CreateOrderFragment(); FragmentManager manager = getFragmentManager(); FragmentTransaction transaction = manager.beginTransaction(); transaction.replace(R.id.frameContainer, createOrderFragment) //.addToBackStack(null) .commit(); //manager.executePendingTransactions(); return view; } }
3a917da4-bd4e-486b-9d22-62f64ba72ffc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-25 15:29:51", "repo_name": "Fazlul69/OnlineShop", "sub_path": "/app/src/main/java/com/example/onlineshop/adapter/TabViewPagerAdapter.java", "file_name": "TabViewPagerAdapter.java", "file_ext": "java", "file_size_in_byte": 1055, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "5268977495b922a8d6677f91d5a1e919f9623134", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Fazlul69/OnlineShop
193
FILENAME: TabViewPagerAdapter.java
0.246533
package com.example.onlineshop.adapter; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentPagerAdapter; import com.example.onlineshop.fragment.BrandsFragment; import com.example.onlineshop.fragment.CategoriesFragment; import com.example.onlineshop.fragment.ShopsFragment; public class TabViewPagerAdapter extends FragmentPagerAdapter { private int numOfTabs; public TabViewPagerAdapter(@NonNull FragmentManager fm, int numOfTabs) { super(fm); this.numOfTabs = numOfTabs; } @NonNull @Override public Fragment getItem(int position) { switch (position){ case 0: return new CategoriesFragment(); case 1: return new BrandsFragment(); case 2: return new ShopsFragment(); default: return null; } } @Override public int getCount() { return numOfTabs; } }
47cabce9-c076-4b73-afd7-2d9bd79b41b2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-12 14:42:18", "repo_name": "sathya27works/reflect-middle-quiz", "sub_path": "/reflect/src/main/java/com/future/works/reflect/controller/BlindQuizController.java", "file_name": "BlindQuizController.java", "file_ext": "java", "file_size_in_byte": 1144, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "7180c4cbed9b5f322ee74d20c526ee1eaf1aa907", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sathya27works/reflect-middle-quiz
220
FILENAME: BlindQuizController.java
0.267408
package com.future.works.reflect.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; import com.future.works.reflect.service.BlindQuizServiceImpl; @RestController @CrossOrigin(maxAge = 3600) public class BlindQuizController { private static final Logger logger = LoggerFactory.getLogger(BlindQuizController.class); @Autowired private BlindQuizServiceImpl quizServiceImpl; @GetMapping("/submitBlindSpot/{uniqueId}/{selectedList}/{userId}") public String submitBlindSpot(@PathVariable("uniqueId") String uniqueId, @PathVariable("selectedList") String selectedList, @PathVariable("userId") String userId) { logger.info("submitBlindSpot details received uniqueId{}, selectedList{}, userId{}",uniqueId, selectedList, userId); return quizServiceImpl.saveBlindSpotQuiz(uniqueId, selectedList, userId); } }
9016a1db-56b6-473a-9063-2cefaf89b268
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-02-02T09:30:48", "repo_name": "apache/servicecomb-docs", "sub_path": "/java-chassis-reference/en_US/docs/start/architecture.md", "file_name": "architecture.md", "file_ext": "md", "file_size_in_byte": 1145, "line_count": 15, "lang": "en", "doc_type": "text", "blob_id": "e0dbc8ada223b5cf070a1220987eb1abaa14f00c", "star_events_count": 568, "fork_events_count": 74, "src_encoding": "UTF-8"}
https://github.com/apache/servicecomb-docs
205
FILENAME: architecture.md
0.226784
# Java Chassis Architecture ## Basic Framework ![ServiceComb Model](../assets/images/servicecomb_mode_en.png) ## Purpose 1.To decouple the programming model and communication model, so that a programming model can be combined with any communication models as needed. Application developers only need to focus on APIs during development and can flexibly switch communication models during deployment. Services can also be switched over to a legacy system. The developers simply need to modify the configuration file(or annotation) released by the service. Currently, applications can be developed in Spring MVC, JAX-RS, or transparent RPC mode. 2. Built-in API-first support. Through contract standardize micro-service development, realizing cross-language communication, and supporting software toolchain (contract generation code, code generation contract, etc.) development, to construct a complete development ecology. 3.To define common microservice running model, encapsulating fault tolerance methods to process which from service discovery to interaction process of microservices, The running model can be customized or extended.
2397cec8-cb38-4ff6-bae4-4ca638ca6794
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-06-21 22:00:46", "repo_name": "jdbermeol/FTSI2", "sub_path": "/samples/EMDecouplingSample/src/main/java/com/mlg/acciones/service/ServiceBuilder.java", "file_name": "ServiceBuilder.java", "file_ext": "java", "file_size_in_byte": 1206, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "f01e550c6c9c6b11dfba0a2e528f64df7c920f34", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jdbermeol/FTSI2
232
FILENAME: ServiceBuilder.java
0.282196
package com.mlg.acciones.service; /** * * @author josebermeo */ public class ServiceBuilder { private CompanyService companyService; private DateService dateService; private MarketService marketService; private QuoteService quoteService; private StockService stockService; public CompanyService getCompanyService(){ if(companyService == null){ companyService = new CompanyService(null); } return companyService; } public DateService getDateService(){ if(dateService == null){ dateService = new DateService(null); } return dateService; } public MarketService getMarketService(){ if(marketService == null){ marketService = new MarketService(null); } return marketService; } public QuoteService getQuoteService(){ if(quoteService == null){ quoteService = new QuoteService(null); } return quoteService; } public StockService getStockService(){ if(stockService == null){ stockService = new StockService(null); } return stockService; } }
f6a5fb95-0864-4db0-ac2b-ec91a2e0b33f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-11-04 18:04:45", "repo_name": "mugo367/SIMPLEFMS", "sub_path": "/src/main/java/simple/fms/ui/FarmerAddEquipmentUI.java", "file_name": "FarmerAddEquipmentUI.java", "file_ext": "java", "file_size_in_byte": 1204, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "ab8e2802e2a4c7a23a1376feaf72d599efa66180", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mugo367/SIMPLEFMS
199
FILENAME: FarmerAddEquipmentUI.java
0.246533
package simple.fms.ui; import simple.fms.model.Equipment; import java.text.ParseException; import java.util.Scanner; public class FarmerAddEquipmentUI { public static Equipment getEquipment(){ Equipment equipment = new Equipment(); Scanner scanner = new Scanner(System.in); System.out.println("Enter the following details:"); System.out.println("Enter the equipment label"); equipment.setEquipmentLabel(scanner.nextLine()); System.out.println("Enter the equipment name"); equipment.setCondition(scanner.nextLine()); System.out.println("Enter the equipment condition"); equipment.setCondition(scanner.nextLine()); System.out.println("Enter the equipment quantity"); equipment.setQuantity(scanner.nextInt()); scanner.nextLine(); return equipment; } public static Equipment getEquipmentLabel() throws ParseException { Equipment equipment = new Equipment(); Scanner scanner = new Scanner(System.in); System.out.println("Enter the equipment label you want to delete"); equipment.setEquipmentLabel(scanner.nextLine()); return equipment; } }
33580dfd-b871-489f-86f4-c99860ea785b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-26 14:26:25", "repo_name": "Erickype/Compra-Articulos", "sub_path": "/ProyectoCompraArticulos/src/ClasesArticulos/Articulo.java", "file_name": "Articulo.java", "file_ext": "java", "file_size_in_byte": 1053, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "e23aae88464b15e388afda2945d5ab5ad2d0a5da", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Erickype/Compra-Articulos
241
FILENAME: Articulo.java
0.26971
/* * 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 ClasesArticulos; import java.util.Objects; /** * * @author Erick */ public class Articulo { String desc; double precio; public Articulo(String desc, double precio) { this.desc = desc; this.precio = precio; } @Override public boolean equals(Object obj) { if (obj instanceof Articulo) { Articulo otro = (Articulo) obj; return (this.desc == null ? otro.desc == null : this.desc.equals(otro.desc)) && this.precio == otro.precio; } return false; } @Override public int hashCode() { int hash = 3; hash = 37 * hash + Objects.hashCode(this.desc); hash = 37 * hash + (int) (Double.doubleToLongBits(this.precio) ^ (Double.doubleToLongBits(this.precio) >>> 32)); return hash; } }
2473833a-f2f9-4d94-896d-b32c645cf850
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-25 08:22:24", "repo_name": "s18625/zdaj.SeApp", "sub_path": "/back/src/main/java/pjatk/mas/imp/models/Post.java", "file_name": "Post.java", "file_ext": "java", "file_size_in_byte": 1012, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "3fb19bea717933ed907a6a17351c2bbcb4611bf0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/s18625/zdaj.SeApp
220
FILENAME: Post.java
0.243642
package pjatk.mas.imp.models; import javax.persistence.*; import java.util.List; @Entity @Table(name = "Post") @Inheritance(strategy = InheritanceType.JOINED) public abstract class Post { public Post() { } @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String tittle; private String contents; @OneToMany(mappedBy = "post") private List<Comment> comments; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTittle() { return tittle; } public void setTittle(String tittle) { this.tittle = tittle; } public String getContents() { return contents; } public void setContents(String contents) { this.contents = contents; } public List<Comment> getComments() { return comments; } public void setComments(List<Comment> comments) { this.comments = comments; } }
292c6692-cab0-4d31-9e3f-5025ddd941b0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-09 18:53:42", "repo_name": "GMousouris/Projects_preview", "sub_path": "/Java/Dictionary/MyButton2.java", "file_name": "MyButton2.java", "file_ext": "java", "file_size_in_byte": 1143, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "14b6cd262a19e5f5d571e5980c645549fdf991ee", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/GMousouris/Projects_preview
268
FILENAME: MyButton2.java
0.285372
import javax.swing.JButton; import java.awt.*; import javax.swing.*; public class MyButton2 extends JButton{ private boolean focus = false; private int id; private word wordd; public MyButton2(){ super(); } public MyButton2(String name,word wordd){ super(name); //this.setBackground(new Color(188,176,155)); //this.setForeground(Color.darkGray); this.setBorder(null); this.setBackground(Color.white); this.setForeground(Color.darkGray); this.setFocusPainted(false); //this.setBorderPainted(false); this.wordd = wordd; this.setPreferredSize(new Dimension(200,22)); this.setFont(new Font("Arial", Font.PLAIN, 16)); //this.setFont(new Font(this.getFont().getName(),Font.BOLD,this.getFont().getSize())); //this.setPreferredSize(new Dimension(200,50)); } public int get_id(){ return this.id; } public word get_word(){ return this.wordd; } public boolean isFocused(){ return focus; } public void setFocus(boolean state){ focus = state; } }
52c5c3e1-9b85-4cf4-be24-295bce8bcc54
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-13 02:25:48", "repo_name": "biantaiwuzui/netx", "sub_path": "/trunk/netx-shopping-mall/src/main/java/com/netx/shopping/biz/business/RedpacketRecordAction.java", "file_name": "RedpacketRecordAction.java", "file_ext": "java", "file_size_in_byte": 1205, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "1347a99e119ce06b81e68fec280bc8fea02b2371", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/biantaiwuzui/netx
230
FILENAME: RedpacketRecordAction.java
0.290176
package com.netx.shopping.biz.business; import com.netx.common.user.model.UserSynopsisData; import com.netx.common.vo.business.RedpacketRecordDto; import com.netx.shopping.service.business.RedpacketRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; /** * */ @Transactional @Service("oldRedpacketRecordAction") public class RedpacketRecordAction{ @Autowired RedpacketRecordService redpacketRecordService; public RedpacketRecordDto setUserInfo(RedpacketRecordDto redpacketRecordDto,UserSynopsisData userSynopsisData){ redpacketRecordDto.setAge(userSynopsisData.getAge()); redpacketRecordDto.setHeadImgUrl(userSynopsisData.getHeadImgUrl()); redpacketRecordDto.setLv(userSynopsisData.getAge()); redpacketRecordDto.setSex(userSynopsisData.getSex()); redpacketRecordDto.setNickname(userSynopsisData.getNickName()); return redpacketRecordDto; } public BigDecimal seeWalletRedpacket(String userId){ return redpacketRecordService.getAmount(userId); } }
a1db0c97-65be-4fc3-ba43-4b32f8e2351a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-30 10:23:22", "repo_name": "szewa-91/sauron", "sub_path": "/server/src/main/java/com/sauron/view/UserView.java", "file_name": "UserView.java", "file_ext": "java", "file_size_in_byte": 1141, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "35e3bc570f3faab29a152b27b5a8c7a7fd474af0", "star_events_count": 1, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/szewa-91/sauron
245
FILENAME: UserView.java
0.259826
package com.sauron.view; import java.io.Serializable; import java.util.Collection; public class UserView implements Serializable { private static final long serialVersionUID = 1L; private Long id; private String username; private String email; private Collection<BankAccountView> banks; public UserView() { } public UserView(Long id, String username, String email, Collection<BankAccountView> banks) { this.id = id; this.username = username; this.email = email; this.banks = banks; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Collection<BankAccountView> getBanks() { return banks; } public void setBanks(Collection<BankAccountView> banks) { this.banks = banks; } }
a5e4bbf8-8ec9-43c2-8847-f94e836d061d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-23 13:50:17", "repo_name": "developeramit3/OnlineMaklarna", "sub_path": "/app/src/main/java/Fragments/Fragment_Photos.java", "file_name": "Fragment_Photos.java", "file_ext": "java", "file_size_in_byte": 1205, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "3a5144f30b11920c1073b4c2e39f149311f5f495", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/developeramit3/OnlineMaklarna
203
FILENAME: Fragment_Photos.java
0.233706
package Fragments; import android.os.Bundle; import androidx.fragment.app.Fragment; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.example.onlinemaklarna.R; import Adapters.Adapter_photos; /** * A simple {@link Fragment} subclass. */ public class Fragment_Photos extends Fragment { public Fragment_Photos() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_photos,container,false); init(view); return view ; } private void init(View view) { RecyclerView rv = view.findViewById(R.id.rv_photos); Adapter_photos adapter = new Adapter_photos(getActivity()); rv.setLayoutManager(new GridLayoutManager(getActivity() , 2)); rv.setAdapter(adapter); } }
26641ec9-e379-442d-8245-c9653f3e7fec
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-19 00:27:37", "repo_name": "uttam028/healthvault", "sub_path": "/hvr/src/cse/mlab/hvr/client/Concussion.java", "file_name": "Concussion.java", "file_ext": "java", "file_size_in_byte": 1053, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "2974d5e13d6822cf3c2e5499b749355c4e7781ee", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/uttam028/healthvault
248
FILENAME: Concussion.java
0.255344
package cse.mlab.hvr.client; import org.gwtbootstrap3.client.ui.Anchor; import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiHandler; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.Widget; public class Concussion extends Composite { @UiField Anchor buttonStartConcussionTest; Hvr application; private static ConcussionUiBinder uiBinder = GWT .create(ConcussionUiBinder.class); interface ConcussionUiBinder extends UiBinder<Widget, Concussion> { } public Concussion(Hvr application) { initWidget(uiBinder.createAndBindUi(this)); this.application = application; } public Concussion(String firstName) { initWidget(uiBinder.createAndBindUi(this)); } @UiHandler("buttonStartConcussionTest") void userClickedToStartConcussionTest(ClickEvent event){ // this.application.mainPage.loadVoicePage("concussion");; } }
dbccf602-8feb-41df-890e-4ccbc53391d2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-19 02:00:31", "repo_name": "jordansimsmith/feedr", "sub_path": "/server/src/main/java/com/feeder/server/provider/hackernews/HackerNewsFeedProvider.java", "file_name": "HackerNewsFeedProvider.java", "file_ext": "java", "file_size_in_byte": 1019, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "4d7272b5b3fcc801cf08c736f3428aa44508bfec", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jordansimsmith/feedr
216
FILENAME: HackerNewsFeedProvider.java
0.27048
package com.feeder.server.provider.hackernews; import com.feeder.server.model.HackerNewsData; import com.feeder.server.provider.FeedProvider; import org.springframework.stereotype.Service; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Flux; @Service public class HackerNewsFeedProvider implements FeedProvider<HackerNewsData> { private WebClient client = WebClient.create(); @Override public Flux<HackerNewsData> getFeed() { return client .get() .uri("https://hacker-news.firebaseio.com/v0/askstories.json?print=pretty") .retrieve() .bodyToFlux(Integer.class) .flatMap( id -> client .get() .uri("https://hacker-news.firebaseio.com/v0/item/" + id + ".json") .retrieve() .bodyToFlux(HackerNewsData.class)); } /** For testing only. */ void setClient(WebClient client) { this.client = client; } }
0efb6ae2-84ba-4957-b689-08080927b93e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-02-16 21:43:00", "repo_name": "andrewrlee/konduti-view", "sub_path": "/src/main/java/uk/co/optimisticpanda/utils/Functions.java", "file_name": "Functions.java", "file_ext": "java", "file_size_in_byte": 1059, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "de1d58db6903ebc7ce6629fb1536bd347ff03ab3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/andrewrlee/konduti-view
239
FILENAME: Functions.java
0.278257
package uk.co.optimisticpanda.utils; import static com.google.common.base.CaseFormat.LOWER_UNDERSCORE; import static com.google.common.base.CaseFormat.UPPER_CAMEL; import static com.google.common.base.CharMatcher.BREAKING_WHITESPACE; import com.google.common.base.Function; import com.google.common.base.Predicate; public class Functions { public static class LowerAndReplaceWhitespaceWithUnderscores implements Function<String, String> { @Override public String apply(String input) { String noWhiteSpace = BREAKING_WHITESPACE.removeFrom(input); return UPPER_CAMEL.to(LOWER_UNDERSCORE, noWhiteSpace); } } public static class With { public static Predicate<Named> name(final String name) { return new Predicate<Named>() { public boolean apply(Named named) { return named.getName().equals(name); } }; } } public static class ToName implements Function<Named, String> { @Override public String apply(Named input) { return input.getName(); } } public static interface Named { String getName(); } }
63eaa219-cdef-4bd0-a791-6fae94eea646
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-08-16 10:48:32", "repo_name": "alibaba/Sentinel", "sub_path": "/sentinel-transport/sentinel-transport-netty-http/src/main/java/com/alibaba/csp/sentinel/transport/heartbeat/client/HttpClientsFactory.java", "file_name": "HttpClientsFactory.java", "file_ext": "java", "file_size_in_byte": 1023, "line_count": 24, "lang": "en", "doc_type": "code", "blob_id": "0c8ebacf691010553ec7002248ad3a9853519438", "star_events_count": 22318, "fork_events_count": 8447, "src_encoding": "UTF-8"}
https://github.com/alibaba/Sentinel
194
FILENAME: HttpClientsFactory.java
0.235108
package com.alibaba.csp.sentinel.transport.heartbeat.client; import com.alibaba.csp.sentinel.transport.endpoint.Protocol; import com.alibaba.csp.sentinel.transport.ssl.SslFactory; import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; /** * @author Leo Li */ public class HttpClientsFactory { private static class SslConnectionSocketFactoryInstance { private static final SSLConnectionSocketFactory SSL_CONNECTION_SOCKET_FACTORY = new SSLConnectionSocketFactory(SslFactory.getSslConnectionSocketFactory(), NoopHostnameVerifier.INSTANCE); } public static CloseableHttpClient getHttpClientsByProtocol(Protocol protocol) { return protocol == Protocol.HTTP ? HttpClients.createDefault() : HttpClients.custom(). setSSLSocketFactory(SslConnectionSocketFactoryInstance.SSL_CONNECTION_SOCKET_FACTORY).build(); } }
eb7d3e86-b55d-43bf-b410-fef31bbc90fe
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-01 08:15:40", "repo_name": "Halarious/Evolaris-SmartTourism", "sub_path": "/c_location/src/main/java/hr/evolaris/air/foi/evolaris_smarttourism/c_location/Location.java", "file_name": "Location.java", "file_ext": "java", "file_size_in_byte": 1144, "line_count": 59, "lang": "en", "doc_type": "code", "blob_id": "55fae207416def7691bc302180c9e53d080c58f3", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/Halarious/Evolaris-SmartTourism
249
FILENAME: Location.java
0.214691
package hr.evolaris.air.foi.evolaris_smarttourism.c_location; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.ArrayList; import java.util.List; public class Location { @SerializedName("geometry") @Expose public Geometry geometry; @SerializedName("icon") @Expose public String icon; @SerializedName("id") @Expose public String id; @SerializedName("name") @Expose public String name; @SerializedName("place_id") @Expose public String place_id; @SerializedName("rating") @Expose public Double rating; @SerializedName("reference") @Expose public String reference; @SerializedName("scope") @Expose public String scope; @SerializedName("types") @Expose public List<String> types = new ArrayList<String>(); @SerializedName("vicinity") @Expose public String vicinity; @SerializedName("opening_hours") @Expose public OpeningHours openingHours; @SerializedName("photos") @Expose public List<Photo> photos = new ArrayList<Photo>(); }
7728a037-09e6-49c5-9ca6-3d1e1a115305
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-23 10:07:59", "repo_name": "AndyZhuWei/shiro-demo", "sub_path": "/src/main/java/com/andy/shiro/chapter2/MyRealm1.java", "file_name": "MyRealm1.java", "file_ext": "java", "file_size_in_byte": 1290, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "04217e55f0b6b067fb6b75cf93670f460b9f5d33", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AndyZhuWei/shiro-demo
237
FILENAME: MyRealm1.java
0.258326
package com.andy.shiro.chapter2; import org.apache.shiro.authc.*; import org.apache.shiro.realm.Realm; public class MyRealm1 implements Realm { public String getName() { return "myrealm1"; } public boolean supports(AuthenticationToken authenticationToken) { /** * 仅支持UsernamePasswordToken类型Token */ return authenticationToken instanceof UsernamePasswordToken; } public AuthenticationInfo getAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { /** * 得到用户名 */ String username = (String)token.getPrincipal(); /** * 得到密码 */ String password = new String((char[])token.getCredentials()); if(!"zhang".equals(username)) { /** * 如果用户名错误 */ throw new UnknownAccountException(); } if(!"123".equals(password)) { /** * 如果密码错误 */ throw new IncorrectCredentialsException(); } /** * 如果身份认证成功,返回一个AuthenticationInfo实现 */ return new SimpleAuthenticationInfo(username,password,getName()); } }
f1f153b3-fa29-47d5-a96f-0646fc343e42
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-19 01:32:58", "repo_name": "thuanrua88/BartendingDrink", "sub_path": "/app/src/main/java/com/example/bartending_drink_app/model/object_backend/login/ResponseLogin.java", "file_name": "ResponseLogin.java", "file_ext": "java", "file_size_in_byte": 1032, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "2a1465500c446c1321d800c7b3d5ff5a5b460087", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/thuanrua88/BartendingDrink
225
FILENAME: ResponseLogin.java
0.200558
package com.example.bartending_drink_app.model.object_backend.login; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class ResponseLogin { @SerializedName("Infor") @Expose private Infor infor; @SerializedName("Token") @Expose private String token; @SerializedName("Success") @Expose private Boolean success; @SerializedName("Errors") @Expose private Object errors; public Infor getInfor() { return infor; } public void setInfor(Infor infor) { this.infor = infor; } public String getToken() { return token; } public void setToken(String token) { this.token = token; } public Boolean getSuccess() { return success; } public void setSuccess(Boolean success) { this.success = success; } public Object getErrors() { return errors; } public void setErrors(Object errors) { this.errors = errors; } }