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
0d9c0dcb-18bd-4ed3-8f32-166033f4c074
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-12 09:55:06", "repo_name": "class101-edu-vn/SpringGenerateComponentHelper", "sub_path": "/source_model/User.java", "file_name": "User.java", "file_ext": "java", "file_size_in_byte": 1088, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "6dfb483cbddf25a9b164d7249e13a3f3afd1a51f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/class101-edu-vn/SpringGenerateComponentHelper
195
FILENAME: User.java
0.20947
package com.lyquyduong2; import java.math.BigDecimal; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Table; import lombok.Data; @Data @Entity @Table(name="") public class User implements java.io.Serializable { /** * */ private static final long serialVersionUID = 1L; private BigDecimal userId; private String userLastName; private String userFirstName; private String userFamilyNameKana; private String userGivenNameKana; private String phoneNumber; private String faxNumber; private String corporateNumber; private String email; private String password; private String passwordExpiredDate; private boolean temporaryPasswordFlag; private BigDecimal invalidPasswordUseCount; private BigDecimal lockFlag; private boolean temporaryRegisterationFlag; private Date temporaryRegisterationExpiredDate; private BigDecimal pushNotificationPermit; private BigDecimal mailNotificationPermit; private Date createdDate; private String createdBy; private Date updatedDate; private String updatedBy; private boolean removalFlag; }
85969061-5800-458f-b217-5d2339979eba
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-29 01:58:59", "repo_name": "xiaolan-bit/MultimodalTransport", "sub_path": "/sports后端/src/main/java/com/sport/sports/controller/EvaluateController.java", "file_name": "EvaluateController.java", "file_ext": "java", "file_size_in_byte": 1197, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "4430458c34b28beca2431a4cf581e11d2247d3cb", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xiaolan-bit/MultimodalTransport
231
FILENAME: EvaluateController.java
0.288569
package com.sport.sports.controller; import com.alibaba.fastjson.JSON; import com.sport.sports.Bean.Evaluate; import com.sport.sports.Bean.Order; import com.sport.sports.dao.EvaluateDao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.HashMap; import java.util.List; @RestController public class EvaluateController { @Autowired private EvaluateDao edao; @CrossOrigin @RequestMapping("/addevaluate") public String addevaluate(@RequestBody Evaluate evaluate){ int i = edao.addevaluate(evaluate); return i >0?"success":"error"; } @RequestMapping("/getbestorder") public String getbestorder(){ List<Evaluate> evaluates = edao.getbestorder(); HashMap<String ,Object> res = new HashMap<>(); res.put("data",evaluates); String res_string = JSON.toJSONString(res); System.out.println(res_string); return res_string; } }
21921686-1317-4fe2-bd02-531642e5a762
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-01 13:18:03", "repo_name": "LehongShan/saw", "sub_path": "/saw-auth/src/main/java/cn/shan/saw/auth/service/impl/SysMenuServiceImpl.java", "file_name": "SysMenuServiceImpl.java", "file_ext": "java", "file_size_in_byte": 999, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "fe1e04d83fa84875d223d5205a7e800ccc8551c4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/LehongShan/saw
235
FILENAME: SysMenuServiceImpl.java
0.245085
package cn.shan.saw.auth.service.impl; import cn.shan.saw.auth.model.entity.SysMenu; import cn.shan.saw.auth.mapper.SysMenuMapper; import cn.shan.saw.auth.service.SysMenuService; import cn.shan.saw.common.exception.SAWException; import com.baomidou.mybatisplus.mapper.Condition; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * <p> * 菜单管理 服务实现类 * </p> * * @author shanlehong * @since 2018-03-07 */ @Service public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> implements SysMenuService { @Autowired private SysMenuMapper sysMenuMapper; @Override public List<SysMenu> queryAll() throws SAWException{ List<SysMenu> sysMenuList = sysMenuMapper.selectList(Condition.create().and("1=1")); return sysMenuList; } }
1727a1ce-b38e-4fe9-bfd6-2329ab7664c3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-14 01:16:25", "repo_name": "yannsilveira/AprendendoSelenium", "sub_path": "/src/main/java/TestaCadastroFacebook.java", "file_name": "TestaCadastroFacebook.java", "file_ext": "java", "file_size_in_byte": 1038, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "64b2b626d705047388cb2a294f34fcb21a104742", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yannsilveira/AprendendoSelenium
235
FILENAME: TestaCadastroFacebook.java
0.205615
import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class TestaCadastroFacebook { private static CadastroFacebookPage facebook; private static WebDriver driver; @BeforeClass public static void preCondicao() { System.setProperty("webdriver.chrome.driver", "C:/Users/yanns/Downloads/chromedriver.exe"); driver = new ChromeDriver(); driver.get("https://pt-br.facebook.com/r.php/"); driver.manage().window().maximize(); facebook = new CadastroFacebookPage(driver); } @Test public void preencheCampos() { facebook.preenchenome("yann") .preencheSobreNome("Silveira"); } @Test public void efetuarLoginCompleto() { facebook.acessarRota(); facebook.logarComo("yannsilveira@hotmail.com", "minecraft"); } @AfterClass public static void sairFace() { facebook.sairPagina(); } }
a7b782fd-137b-4733-ab40-77b3e19c82c0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-06-16 20:00:19", "repo_name": "ChrisOwen101/MoonlightEmbeddedController", "sub_path": "/app/src/main/java/com/marche/moonlightembeddedcontroller/POJO/OriginalGameRating.java", "file_name": "OriginalGameRating.java", "file_ext": "java", "file_size_in_byte": 1090, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "4cc0b84c13a51633ea8644925ccb94138a0f8789", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ChrisOwen101/MoonlightEmbeddedController
266
FILENAME: OriginalGameRating.java
0.2227
package com.marche.moonlightembeddedcontroller.POJO; /** * Created by Chris.Owen on 01/06/2015. */ import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class OriginalGameRating { @SerializedName("api_detail_url") @Expose private String apiDetailUrl; @Expose private Integer id; @Expose private String name; /** * @return The apiDetailUrl */ public String getApiDetailUrl() { return apiDetailUrl; } /** * @param apiDetailUrl The api_detail_url */ public void setApiDetailUrl(String apiDetailUrl) { this.apiDetailUrl = apiDetailUrl; } /** * @return The id */ public Integer getId() { return id; } /** * @param id The id */ public void setId(Integer id) { this.id = id; } /** * @return The name */ public String getName() { return name; } /** * @param name The name */ public void setName(String name) { this.name = name; } }
eece482a-5dcb-4a1d-b178-2a6e33193ff4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-04-17T23:57:59", "repo_name": "crossdock/crossdock", "sub_path": "/docs/publish-test-client.md", "file_name": "publish-test-client.md", "file_ext": "md", "file_size_in_byte": 1142, "line_count": 40, "lang": "en", "doc_type": "text", "blob_id": "81b9f59d1aea894367ed9a06ea77b010436721d6", "star_events_count": 50, "fork_events_count": 8, "src_encoding": "UTF-8"}
https://github.com/crossdock/crossdock
338
FILENAME: publish-test-client.md
0.275909
[← Run Crossdock](run-crossdock.md) # Publish the Test Client Now that we have a Test Client working locally, we need to publish it so that it's available for other repos to run. We suggest pushing the Test Client to the [Docker Hub](https://hub.docker.com/) every time your build succeeds. If you're using Travis, the following guide will assist in pushing a container for every git commit that passes your tests: [Using Travis.ci to build Docker images](https://sebest.github.io/post/using-travis-ci-to-build-docker-images/) Don't forget to Enable Docker Support in your `.travis.yml`: ```yml sudo: required language: go go: 1.5 services: docker after_success: - export REPO=myorg/client # ... ``` You can test that the container was published by pulling it down locally like so: ``` $ docker pull myorg/client Using default tag: latest latest: Pulling from myorg/client 2704b7bed4fd: Pull complete 5baf16abbb79: Pull complete Digest: sha256:6925c040d80bd102a8c8d3de1031641384cc372c303a6be04a8e67ae932b6e82 Status: Downloaded newer image for myorg/client:latest ``` [Integrate Other Repos →](integrate-other-repos.md)
5768bead-92ba-4c49-bbe7-5eee60e15bda
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-05-13 21:36:30", "repo_name": "michel05/ControleFuncionarios", "sub_path": "/src/control/RemoveFuncionario.java", "file_name": "RemoveFuncionario.java", "file_ext": "java", "file_size_in_byte": 975, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "dfaa75d6bfb888be5ee52206330cebeee1e5c1aa", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/michel05/ControleFuncionarios
169
FILENAME: RemoveFuncionario.java
0.29584
package control; import java.io.IOException; import java.io.PrintWriter; 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 dao.FuncionarioDao; import model.Funcionario; @WebServlet("/removefuncionario") public class RemoveFuncionario extends HttpServlet { @Override protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); Funcionario funcionario = new Funcionario(); FuncionarioDao dao = new FuncionarioDao(); funcionario.setId((long) Integer.parseInt(request.getParameter("id"))); dao.remove(funcionario); RequestDispatcher rd = request.getRequestDispatcher("/listaadmin.jsp"); rd.forward(request,response); } }
558fd4b9-415a-4092-8fe9-85e4fa283bdc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-11 20:51:38", "repo_name": "valtterin/otm-harjoitustyo", "sub_path": "/Muistipeli/src/main/java/muistipeli/database/Database.java", "file_name": "Database.java", "file_ext": "java", "file_size_in_byte": 1087, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "87d0e78d3831d6e684083eb244f610601cde36fb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/valtterin/otm-harjoitustyo
191
FILENAME: Database.java
0.26588
package muistipeli.database; import java.sql.*; public class Database { private String databaseAddress; public Database(String address) throws ClassNotFoundException { this.databaseAddress = address; this.init(); } public Connection getConnection() throws SQLException { return DriverManager.getConnection(databaseAddress); } public void init() { try (Connection conn = getConnection()) { Statement statement = conn.createStatement(); statement.executeUpdate("CREATE TABLE IF NOT EXISTS Scores(id integer PRIMARY KEY, nickname varchar(200), score integer(20), gamemode varchar(200))"); } catch (Throwable t) { System.out.println("Virhe: " + t.getMessage()); } } public void deleteAll() throws SQLException { Connection connection = this.getConnection(); PreparedStatement statement = connection.prepareStatement("DROP TABLE scores"); statement.executeUpdate(); connection.close(); this.init(); } }
4ac7a062-7b48-4bef-b527-fabff0efe506
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-04-22T09:49:05", "repo_name": "yotamMoshe7/Developers-Social-Network", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 997, "line_count": 30, "lang": "en", "doc_type": "text", "blob_id": "fd0648ddfb95f71db4da9f69dbd4b3e27399a47d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yotamMoshe7/Developers-Social-Network
357
FILENAME: README.md
0.27048
## Developers-Social-network # Link to app https://shielded-stream-00926.herokuapp.com/login#! Build and deploy social network with Node.js, Express, React, Redux, Postman and MongoDB. # Sign In Page Functionality: • User registration.</br> • User log in. ![‏‏לכידה](https://user-images.githubusercontent.com/57434735/115693272-73396680-a368-11eb-834e-ea16e8472773.PNG) # Main Page Functionality: • Profile page for each user with links for other social networks. • Edit profile, add experience, add education, delete account. • Edit profile, add\delete: experience, education. • Add\delete a post, like to a post. • Add comment to post. ![image](https://user-images.githubusercontent.com/57434735/115693492-a7148c00-a368-11eb-92c7-11ed5961518b.png) ![image](https://user-images.githubusercontent.com/57434735/115693938-11c5c780-a369-11eb-9e66-243e0122f062.png) # Start Project Instructions Type in terminal: 1. npm start. 2. npm install.
92a2c378-fff3-4e14-8ed0-a3aac737239b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-28 04:49:21", "repo_name": "yangdongpo418/pwc", "sub_path": "/app/src/main/java/com/pwc/sdc/recruit/manager/AccountManager.java", "file_name": "AccountManager.java", "file_ext": "java", "file_size_in_byte": 1075, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "00a0777cb327f23eb17480187f1ab3835f89874e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yangdongpo418/pwc
244
FILENAME: AccountManager.java
0.258326
package com.pwc.sdc.recruit.manager; import com.pwc.sdc.recruit.PwcApplication; import com.pwc.sdc.recruit.constants.Constants; import com.pwc.sdc.recruit.data.model.User; /** * @author * @created */ public class AccountManager { private static AccountManager mInstance = new AccountManager(); private User mUser; private AccountManager() {} /** * 单一实例 */ public static AccountManager getAccountManager() { return mInstance; } /** * 获取当前用户 * @return */ public User getUser(){ return mUser; } /** * 登入 * @param user */ public void login(User user){ mUser = user; PwcApplication.getInstance().sendBroadCast(Constants.ACTION_LOGIN,Constants.CATEGORY_DEFAULT); } /** * 登出 */ public void logout(){ mUser = null; PwcApplication.getInstance().sendBroadCast(Constants.ACTION_LOGOUT, Constants.CATEGORY_DEFAULT); } public boolean isLogin(){ return mUser == null; } }
c08095bd-aab9-4ce3-b863-d72adee450b2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-08-04T03:30:24", "repo_name": "AirmanKolberg/fishingTracker", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1203, "line_count": 25, "lang": "en", "doc_type": "text", "blob_id": "85b185863ef67013cdd8b2392435377ef767c979", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AirmanKolberg/fishingTracker
467
FILENAME: README.md
0.275909
# fishingTracker A Bash Script I made a while back to help me quantitatively discover the best method by which to fish, to compile over decades. I have no direct interest in writing a book over these discoveries to come, but I was merely interested. I haven't worked on it much since I wrote it many, many months ago, but it functions as it should! Still, there may be updates to give. I also started an iPhone App equivalent in XCode, so if I ever finish that, I will share it as well! Thank you all for reading! ## Update, 6Jan2021 This application is now available as a Python script. Cheers, everybody! 🎉 --- ### Donations! Consider donating, though of course not necessary! 🙂 | Donation Asset | Donation Address| | :---------------- | :-------------: | | Cardano (ADA) | addr1q9jxsfd87g4f9rcl7x43lwxnkmklek279yw0fhwrsm3pjjal23me7f9yesnhs2fhpf05xd0deta3csgn4z433rze7yjsav8ejn| | BitCoin (BTC) | 33XbUGgEGx3oQ8wZEsdWBtZ6jncTPWoNtq| | Ethereum (ETH) | 0x68D8928631f697820cf2bd9B275e5b39D6Cba020| | Dogecoin (DOGE) | DNJoCDAwwVcpRMH3wCeeCwRMpzUHW6uvbH| | Ripple (XRP) | rahunjARy7sb2AEc75xdzqSRuMeUPqXxF2| | VeChain (VET) | 0xeD36284Fb479F15620f5c8Af0996A723c6b5dc43|
280fe9cd-5167-4f0c-a69d-4909f6803af0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-02-04 13:00:50", "repo_name": "buzheng1949/Kuzma", "sub_path": "/src/main/java/com/buzheng/me/proxy/dynamic/DynamicProxyHandler.java", "file_name": "DynamicProxyHandler.java", "file_ext": "java", "file_size_in_byte": 1002, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "a68adfc943907056f86c98dda569db02e91e63de", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/buzheng1949/Kuzma
213
FILENAME: DynamicProxyHandler.java
0.242206
package com.buzheng.me.proxy.dynamic; import com.buzheng.me.proxy.staticproxy.ProxySubject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** * Created by buzheng on 18/1/13. * 通用的动态代理类 */ public class DynamicProxyHandler implements InvocationHandler { private Logger logger = LoggerFactory.getLogger(DynamicProxyHandler.class); private Object target; public DynamicProxyHandler(Object target) { this.target = target; } public <T> T getProxy() { return (T)Proxy.newProxyInstance(target.getClass().getClassLoader(), target.getClass().getInterfaces(), this); } @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { logger.error("proxy dynamic start"); method.invoke(target, args); logger.error("proxy dynamic end"); return null; } }
43cb85f8-2448-4a10-b9a3-3336910fdd04
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-06 22:44:27", "repo_name": "lyuben-todorov/primavera", "sub_path": "/src/main/java/com/lyuben/primavera/service/ProductServiceImpl.java", "file_name": "ProductServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "c74fa05204a4a880ed8f2193f85c37d2d521cb6a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lyuben-todorov/primavera
215
FILENAME: ProductServiceImpl.java
0.258326
package com.lyuben.primavera.service; import com.lyuben.primavera.domain.product.Product; import com.lyuben.primavera.repository.ProductRepository; import com.lyuben.primavera.service.base.ProductService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; @Service public class ProductServiceImpl implements ProductService { @Autowired ProductRepository productRepository; @Override public Product findById(Long Id) { Optional<Product> product = productRepository.findById(Id); if (product.isPresent()) { return productRepository.findById(Id).get(); } else { //fix this asap return null; } } @Override public List<Product> findByCategoryId(Long Id) { return productRepository.findByCategoryId(Id); } @Override public List<Product> findAll() { return productRepository.findAll(); } @Override public Product save(Product product) { return productRepository.save(product); } }
7056f066-df78-4e2d-8877-245926610f3c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-13 19:27:52", "repo_name": "ajitsing/RubyGemsAndroidApp", "sub_path": "/app/src/main/java/com/singhajit/rubygems/gemlist/viewmodel/GemListViewModel.java", "file_name": "GemListViewModel.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "ef00f33beee979c35fe7e72e7f62b285438a5da1", "star_events_count": 3, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/ajitsing/RubyGemsAndroidApp
226
FILENAME: GemListViewModel.java
0.282988
package com.singhajit.rubygems.gemlist.viewmodel; import android.databinding.BaseObservable; import android.databinding.Bindable; import android.support.annotation.NonNull; import com.singhajit.rubygems.core.StringResolver; import com.singhajit.rubygems.recent.model.Gem; import java.util.ArrayList; import java.util.List; public class GemListViewModel extends BaseObservable { private List<GemViewModel> gemViewModels = new ArrayList<>(); public GemListViewModel(List<Gem> gems, StringResolver stringResolver) { gemViewModels = toGemViewModels(gems, stringResolver); } @Bindable public List<GemViewModel> getGemViewModels() { return gemViewModels; } @NonNull private ArrayList<GemViewModel> toGemViewModels(List<Gem> gems, StringResolver stringResolver) { ArrayList<GemViewModel> viewModels = new ArrayList<>(); for (Gem gem : gems) { viewModels.add(new GemViewModel(gem, stringResolver)); } return viewModels; } }
fcdc27ac-8313-4472-8449-beaa1113886a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-24 19:33:23", "repo_name": "FredLoney/diagram", "sub_path": "/src/main/java/org/reactome/web/diagram/client/visualisers/ehld/events/SVGPanZoomEvent.java", "file_name": "SVGPanZoomEvent.java", "file_ext": "java", "file_size_in_byte": 1196, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "37afb3cea66e180b44aa31a62f6b031aeb5917ed", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/FredLoney/diagram
322
FILENAME: SVGPanZoomEvent.java
0.293404
package org.reactome.web.diagram.client.visualisers.ehld.events; import com.google.gwt.event.shared.GwtEvent; import org.reactome.web.diagram.client.visualisers.ehld.handlers.SVGPanZoomHandler; import org.vectomatic.dom.svg.OMSVGPoint; /** * @author Kostas Sidiropoulos <ksidiro@ebi.ac.uk> */ @Deprecated public class SVGPanZoomEvent extends GwtEvent<SVGPanZoomHandler> { public static Type<SVGPanZoomHandler> TYPE = new Type<>(); private OMSVGPoint from; private OMSVGPoint to; public SVGPanZoomEvent(OMSVGPoint from, OMSVGPoint to) { this.from = from; this.to = to; } @Override public Type<SVGPanZoomHandler> getAssociatedType() { return TYPE; } @Override protected void dispatch(SVGPanZoomHandler handler) { handler.onSVGPanZoom(this); } public OMSVGPoint getFrom() { return from; } public OMSVGPoint getTo() { return to; } @Override public String toString() { return "SVGPanZoomEvent{" + "from:{x:" + from.getX() + ", y:" + from.getY() + "}" + ", to:{x:" + to.getX() + ", y:" + to.getY() + "}" + '}'; } }
705f22fd-6106-44ec-9113-787f8dc9b429
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-31 01:24:32", "repo_name": "hand13/idealuascript", "sub_path": "/src/com/hand13/action/MySingleAction.java", "file_name": "MySingleAction.java", "file_ext": "java", "file_size_in_byte": 1101, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "2dafd23a4a62e6d56a95a80ed7cf21ea52a79200", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hand13/idealuascript
211
FILENAME: MySingleAction.java
0.224055
package com.hand13.action; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import org.jetbrains.annotations.NotNull; /** * @author $Author$ * @version $Revision$ $Date$ */ public class MySingleAction extends AnAction { private static final Logger LOG = Logger.getInstance(MySingleAction.class); @Override public void actionPerformed(@NotNull AnActionEvent anActionEvent) { if (anActionEvent.getProject() != null) { Project project = anActionEvent.getProject(); if (project.getWorkspaceFile() != null) { LOG.info(project.getWorkspaceFile().getExtension()); } LOG.info(anActionEvent.getProject().getBasePath()); String contextPath = anActionEvent.getProject().getBasePath(); String filePath = contextPath + "/main.lua"; LuaUtils.runScript(filePath,null); } else { LOG.info("no message"); } } }
18508eb7-bf1f-42bd-975c-7f1a59640cda
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-10-26T10:10:11", "repo_name": "PCextreme/cloudstack-php", "sub_path": "/CONTRIBUTING.md", "file_name": "CONTRIBUTING.md", "file_ext": "md", "file_size_in_byte": 1134, "line_count": 22, "lang": "en", "doc_type": "text", "blob_id": "96e00034d1214f0857868baa1d32bdde08c57d97", "star_events_count": 11, "fork_events_count": 12, "src_encoding": "UTF-8"}
https://github.com/PCextreme/cloudstack-php
281
FILENAME: CONTRIBUTING.md
0.236516
# How to contribute Contributions are always welcome. Here are a few guidelines to be aware of: * Include unit tests for new behaviours introduced by PRs. * Fixed bugs MUST be covered by test(s) to avoid regression. * All code must follow the `PSR-2` coding standard. Please see [PSR-2](https://www.php-fig.org/psr/psr-2/) for more details. To make this as easy as possible, we use PHP_Codesniffer. Using two simple make commands: `make cs-check` and `make cs-fix`. * Before implementing a new big feature, consider creating a new Issue on Github. It will save your time when the core team is not going to accept it or has good recommendations about how to proceed. ## Tests The following commands can be ran to test on your local environment * `make analyze` to run PHP_Codesniffer and PHPStan. * `make test` will run all types of tests. * `make test-unit` will run all unit tests. * `make test-infection` will run all infection. Of course, you can use `make all` or just `make` to run both the analysis and tests. In order to run the test suite, you need to have `xdebug` or `phpdbg` enabled in your development environment.
a505e8f7-6d97-4192-b61b-687c90ec92f4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-08-23T17:47:50", "repo_name": "netpiemaker/PieSonoffSC", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 986, "line_count": 30, "lang": "en", "doc_type": "text", "blob_id": "347264d3fdd78696d83b76db8e921241fe2791f3", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/netpiemaker/PieSonoffSC
375
FILENAME: README.md
0.190724
# PieSonoffSC Example IoT device with NETPIE (https://netpie.io) NETPIE - Blog (https://blog.netpie.io/archives/2437) Project reference http://tinkerman.cat/sonoff-sc-with-mqtt-and-domoticz-support ### Hardware Sonoff SC - https://www.itead.cc/smart-home/sonoff-sc.html USB to UART (CP2102) with DTR/CTS pinout - https://www.amazon.co.uk/UART-CP2102-Module-Serial-Converter/dp/B00AFRXKFU 24 WS2812 LED ring - https://th.aliexpress.com/item/High-Quality-New-Arrival-24-Bits-LED-Ring-16-x-WS2812-5050-RGB-LED-with-Integrated/32457767869.html?aff_platform=product&cpt=1503486767018&sk=qby7eqR&aff_trace_key=d0eaa092a8c54b24b21acfedf7cb3115-1503486767018-02145-qby7eqR ### Required library for Arduino IDE - ESP8266 Microgear by Chavee Issariyapat - Adafruit NeoPixel by Adafruit - DHT sensor library by Adafruit - Adafruit Unified Sensor by Adafruit - WiFiManager by tzapu ### USB Driver https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
08a9e984-1762-4e55-8e64-ff5945190866
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-11 12:31:22", "repo_name": "vivekkrdixit/Project", "sub_path": "/object-create/src/main/java/com/javaxplore/objectcreation/NewInstanceExample.java", "file_name": "NewInstanceExample.java", "file_ext": "java", "file_size_in_byte": 1011, "line_count": 27, "lang": "en", "doc_type": "code", "blob_id": "45d117c5981e7b87ab878d03c3f6e6dc7ff009c7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/vivekkrdixit/Project
207
FILENAME: NewInstanceExample.java
0.294215
package com.javaxplore.objectcreation; public class NewInstanceExample { @SuppressWarnings("rawtypes") public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException { /** * This way of object creation is deprecated since java 9 due to below given * reason. * * The method newInstance() propagates any exception thrown by the nullary * constructor, including a checked exception. Use of this method effectively * bypasses the compile-time exception checking that would otherwise be * performed by the compiler. The * {@link java.lang.reflect.Constructor#newInstance(java.lang.Object...) * Constructor.newInstance} method avoids this problem by wrapping any exception * thrown by the constructor in a (checked) * {@link java.lang.reflect.InvocationTargetException}. */ Class cls = Class.forName("com.javaxplored.Employee"); Employee object = (Employee) cls.newInstance(); System.out.println(object); } }
ce7fc558-c319-4130-ba4e-35505189276f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-07-24T05:38:50", "repo_name": "VZIKL/vimrc", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1199, "line_count": 51, "lang": "en", "doc_type": "text", "blob_id": "dc1346b1011588f7e483a9b4980f263d3b5be00c", "star_events_count": 12, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/VZIKL/vimrc
335
FILENAME: README.md
0.225417
# Vim Config ## Install > wget https://raw.githubusercontent.com/VZIKL/vimrc/master/install.sh | sh -c ### Update Plugin > cd ~/.vim && git submodule update --remote ### Key Bindings --- | Keybinds | Description | | ---------- | --------------------------- | | kj | ESC | | F3 | Open NerdTree | | F5 | compile file | | H | To beginning of the line | | L | To ending of the line | | U | Redo | | gb | Next Buffer | | gB | Last Buffer | | C-j | AleNext(next error) | | C-k | AlePrevious(before error) | | , | Leader | | , j/k/h/l | easymotion j/k/h/l | | s + (word) | easymotion | | C-e | Snippets list (insert mode) | ### Plugin List 1. YouCompletetMe 2. supertab 3. auto-pairs 4. molokai 5. nerdcommenter 6. rainbow_parentheses.vim 7. tlib_vim 8. ultisnips 9. ale 10. LeaderF 11. vim-easymotion 12. vim-easy-align 13. vim-multiple-cursors 14. vim-snipmate 15. vim-snippets 16. vim-surround 17. ….
84975fc9-0a4d-4a19-924a-883d1678fc74
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-21 06:30:36", "repo_name": "ksyzz/springboot-dubbo-shiro", "sub_path": "/client/src/main/java/com/example/demo/manager/BaseManager.java", "file_name": "BaseManager.java", "file_ext": "java", "file_size_in_byte": 1182, "line_count": 65, "lang": "zh", "doc_type": "code", "blob_id": "e06abbf38f9443eb7999a8de9bc6045140602e15", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/ksyzz/springboot-dubbo-shiro
289
FILENAME: BaseManager.java
0.261331
package com.example.demo.manager; import com.example.common.domain.model.BaseModel; import com.example.demo.repository.BaseRepository; import org.springframework.stereotype.Component; import java.util.Optional; /** * @author fengqian * @since <pre>2018/12/19</pre> */ @Component public abstract class BaseManager<T extends BaseModel> { /** * 获取repository * @return */ public abstract BaseRepository getRepository(); /** * 添加一个实体 * @param t */ public void saveOne(T t){ getRepository().save(t); } /** * 根据id查找 * @param id */ public T getOne(Long id){ Optional<T> result = getRepository().findById(id); return result.orElse(null); } /** * 更新 * @param t * @return */ public void updateOne(T t){ getRepository().save(t); } /** * 标记删除 * @param t */ public void deleteOne(T t){ t.setDeleted(true); getRepository().save(t); } /** * 永久删除 * @param t */ public void deleteForever(T t){ getRepository().delete(t); } }
c01adb22-2cb0-4fdf-8c13-d418083607c9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-09 09:15:51", "repo_name": "wuweishuo/myrpc", "sub_path": "/myrpc-server/src/test/java/com/wws/myrpc/service/impl/UserServiceImpl.java", "file_name": "UserServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1090, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "2291deab5bc15364511833337677532e6f8fe373", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wuweishuo/myrpc
246
FILENAME: UserServiceImpl.java
0.247987
package com.wws.myrpc.service.impl; import com.wws.myrpc.domain.User; import com.wws.myrpc.service.UserService; import java.util.Collections; import java.util.List; public class UserServiceImpl implements UserService { @Override public User echo(User user) { return user; } @Override public void save(User user) { return; } @Override public List<User> list() { User user = new User(); user.setId(1L); user.setName("list"); return Collections.singletonList(user); } @Override public User[] array() { User user = new User(); user.setId(1L); user.setName("list"); return new User[]{user}; } @Override public void saveArr(User[] users) { return; } @Override public void exception() throws Exception { throw new Exception("test....."); } @Override public User multiParam(long id, String name) { User user = new User(); user.setName(name); user.setId(id); return user; } }
f34c9ff7-9373-4199-99a7-04f490378c8f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-05-18T12:45:07", "repo_name": "BillMux/log-parser-ruby", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1137, "line_count": 46, "lang": "en", "doc_type": "text", "blob_id": "e64c4249e81c5ec95c756385259235e2ab7e4606", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/BillMux/log-parser-ruby
290
FILENAME: README.md
0.290176
# Parse information from a .log file Using this repo, you can view full details of a browsing log, and return them as: - A list of pages ordered from most to least views - A list of pages ordered from most to least unique views ## Getting started 1. Clone repo 2. Install dependencies: `bundle install` ## Using the app 1. Open `irb` 2. Load up the file: `load 'lib/parser.rb'` 3. Declare a new instance of `Parser`, passing in the log file: `p = Parser.new('src/webserver.log')` 4. Call the `parse` method: `p.parse` You should now be able to see a list of urls and ip addresses separately by calling `p.urls` or `p.ips` You can also see how these strings are pairing by calling `p.url_ip_pairs` To see a hash of pages ordered by views: `p.show_visits` To see a hash of pages ordered by unique views: `p.show_unique_visits` When calling the two method above, you should also see a formatted list in stdout ## Running the tests Run: `rspec` You should see a coverage report from SimpleCov The specs are using a test .log file, containing only the first ten lines of the original .log file ## Linting Run: `rubocop`
10f9f3ba-2dc3-4a52-9605-652c4ea8c6a6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-05 00:15:18", "repo_name": "9iceCream/blogs", "sub_path": "/src/main/java/com/monolog7/blogs/controller/BlogsOwnerController.java", "file_name": "BlogsOwnerController.java", "file_ext": "java", "file_size_in_byte": 1229, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "5221d058483ced6fa116f7ee49ccb8085e42a51e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/9iceCream/blogs
250
FILENAME: BlogsOwnerController.java
0.233706
package com.monolog7.blogs.controller; import com.monolog7.blogs.dao.BlogsOwnerDao; import com.monolog7.blogs.dao.RolePermissionDao; import com.monolog7.blogs.entity.DictionaryConst; import com.monolog7.blogs.service.BlogsOwnerService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpSession; @Api(description = "博主信息") @RestController public class BlogsOwnerController { @Autowired private BlogsOwnerService blogsOwnerService; @ApiOperation(value = "查询博主信息") @CrossOrigin @RequestMapping(value = "/blogs/owner",method = RequestMethod.GET) public String getBlogsOwner(){ String response = blogsOwnerService.queryBlogsOwner(0); return response; } @ApiOperation(value = "查询账户信息") @CrossOrigin(allowCredentials = "true") @RequestMapping(value = "/blogs/myInfo",method = RequestMethod.GET) public String getMyInfo(HttpSession session){ String response = blogsOwnerService.getMyInfo(session,DictionaryConst.USER_OPER_1); return response; } }
21fab91c-5788-484d-ae80-318df82ce965
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-17 13:10:40", "repo_name": "bluemiv/spring_boot_study", "sub_path": "/old/4_jpa/src/main/java/com/example/demo/controller/MemberController.java", "file_name": "MemberController.java", "file_ext": "java", "file_size_in_byte": 1067, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "9a2cf3cb2e645dc2515fce79bc56f5e4970a5234", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bluemiv/spring_boot_study
204
FILENAME: MemberController.java
0.217338
package com.example.demo.controller; import com.example.demo.entity.MemberEntity; import com.example.demo.repo.MemberRepository; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController // JSON 형태 결과값을 반환해줌 (@ResponseBody가 필요없음) @RequiredArgsConstructor // final 객체를 Constructor Injection 해줌. (Autowired 역할) @RequestMapping("/v1") // version1의 API public class MemberController { private final MemberRepository memberRepository; /** * 멤버 조회 * @return */ @GetMapping("member") public List<MemberEntity> findAllMember() { return memberRepository.findAll(); } /** * 회원가입 * @return */ @PostMapping("member") public MemberEntity signUp() { final MemberEntity member = MemberEntity.builder() .username("test_user@gmail.com") .name("test user") .build(); return memberRepository.save(member); } }
2c901a80-8677-4fda-af19-3f92b860a93d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-21 08:04:25", "repo_name": "felix-zailskas/MagicStone", "sub_path": "/src/main/java/nl/rug/oop/cardgame/model/card/DrawSpell.java", "file_name": "DrawSpell.java", "file_ext": "java", "file_size_in_byte": 1041, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "ffddc5450ffd585ae0d7a74b0a6d8ea79f61c44c", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/felix-zailskas/MagicStone
256
FILENAME: DrawSpell.java
0.288569
package nl.rug.oop.cardgame.model.card; import lombok.Data; import lombok.EqualsAndHashCode; import nl.rug.oop.cardgame.model.Battlefield; import nl.rug.oop.cardgame.model.hero.Hero; /** * Spell to draw cards */ @EqualsAndHashCode(callSuper = true) @Data public class DrawSpell extends SpellCard { /** * Create Draw Spell * @param enumCard EnumCard */ public DrawSpell(EnumCard enumCard) { super(enumCard); } /** * Draw two cards * @param battlefield Battlefield * @param hero Hero * @param pos Position * @return Success of spell */ @Override public boolean play(Battlefield battlefield, int hero, int pos) { Hero h = (hero == 0 ? battlefield.getPlayer() : battlefield.getAi()); for (int i = 0; i < 2; i++) { Card card = h.getDeck().drawCard(); if (card != null) { h.getDeckHand().addCard(h.getDiscardDeck(), card); } } return super.play(battlefield, hero, pos); } }
67fc70e9-df0c-484a-b10d-984e8dd79105
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-01-20T23:10:34", "repo_name": "MitchPierias/Treehouse-FSJS-Project-04", "sub_path": "/js/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 985, "line_count": 24, "lang": "en", "doc_type": "text", "blob_id": "3748867c8e53cc2aa39d8684afcf8128875067be", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/MitchPierias/Treehouse-FSJS-Project-04
234
FILENAME: README.md
0.26971
# Treehouse Fullstack Javascript Tech Degree ## Project 4 - OOP Game Show App #### Project Instructions 1. Phrase Class - Manages a `phrase` property. - Adds the `phrase` to the gameboard. - Checks if a letter is in the `phrase`. - Reveals the letter(s) on the board that matches the player's selection. 2. Game Class Construtor - Manages a `missed`, `phrases` and `activePhrase` property. - Initialize a new game on start. - Randomly retreives one phrase. - Handle user selection and keyboard interactions, managing coresponding display elements. - Checks if the player has won. - Manages player lives. - Displays a Game over screen when the player has won or exhausted all lives. - Reset the gameboard when finished. 3. Main (app.js) - Create a new game when user selects 'start game'. - Handle selection of on screen elements and keyboard input. - Ignore interactions with other elements. 4. Styles - Personalized CSS
9d38a75d-da25-4523-873c-4e4ccdea16d8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-10-18 07:14:03", "repo_name": "WDH861642192/DiDitest", "sub_path": "/app/src/main/java/com/example/wangdonghai/Layout/CheckableLinearLayout.java", "file_name": "CheckableLinearLayout.java", "file_ext": "java", "file_size_in_byte": 1150, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "15b5d4bf1a5fe88680359d9b2acffdd08f6fe85e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/WDH861642192/DiDitest
244
FILENAME: CheckableLinearLayout.java
0.255344
package com.example.wangdonghai.Layout; import android.content.Context; import android.util.AttributeSet; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.Checkable; import com.example.wangdonghai.didiactivity.R; /** * Created by wangdonghai on 16/10/16. */ public class CheckableLinearLayout extends LinearLayout implements Checkable { private ImageView CheckImage; private boolean mCheck = false; public CheckableLinearLayout(Context context, AttributeSet attrs) { super(context, attrs); } @Override public void setChecked(boolean checked) { } @Override public boolean isChecked() { return mCheck; } @Override public void toggle() { mCheck = !mCheck; // 获取到该item中的imageview CheckImage = (ImageView) ((LinearLayout) ((LinearLayout) getChildAt(1)).getChildAt(1)).getChildAt(0); if (CheckImage != null) CheckImage.setImageResource(mCheck ? R.mipmap.is_check : R.mipmap.no_check); } public void ImageView(ImageView imageView) { CheckImage = imageView; } }
770f536f-1b0f-4a5e-b5a8-658fcef80d9b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-07-16 14:17:40", "repo_name": "spqa/swing1", "sub_path": "/src/Swing7/Student.java", "file_name": "Student.java", "file_ext": "java", "file_size_in_byte": 1198, "line_count": 58, "lang": "en", "doc_type": "code", "blob_id": "57b334077125a1b45d9fde84929bd4a2d24965fa", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/spqa/swing1
272
FILENAME: Student.java
0.26588
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the /* * 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 Swing7; /** * * @author c1409l3544 */ public class Student { private String ID; private String name; private String yob; public Student() { } public Student(String ID, String name, String yob) { this.ID = ID; this.name = name; this.yob = yob; } public String getID() { return ID; } public void setID(String ID) { this.ID = ID; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getYob() { return yob; } public void setYob(String yob) { this.yob = yob; } public String[] getStringArr(){ String[] arr={this.ID,this.name,this.yob}; return arr; } }
cc617903-9185-41f3-87a8-b02a3fbbae30
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-26 14:32:50", "repo_name": "2863416607/cloud-parent", "sub_path": "/api-gateway/src/main/java/com/cym/cloud/filter/AddResposeFilter.java", "file_name": "AddResposeFilter.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "1f92edce2f49e832ae40ae3dc92daf78d13ad0ab", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/2863416607/cloud-parent
228
FILENAME: AddResposeFilter.java
0.206894
package com.cym.cloud.filter; import com.netflix.zuul.ZuulFilter; import com.netflix.zuul.context.RequestContext; import org.springframework.stereotype.Component; import javax.servlet.http.HttpServletResponse; import static org.springframework.cloud.netflix.zuul.filters.support.FilterConstants.POST_TYPE; import static org.springframework.cloud.netflix.zuul.filters.support.FilterConstants.SEND_RESPONSE_FILTER_ORDER; /** * @Auther: 陈远明 * @Date: 2020/8/18 23 : 49 * @Description: */ @Component public class AddResposeFilter extends ZuulFilter { @Override public String filterType() { return POST_TYPE; } @Override public int filterOrder() { return SEND_RESPONSE_FILTER_ORDER-1; } @Override public boolean shouldFilter() { return true; } @Override public Object run() { RequestContext currentContext = RequestContext.getCurrentContext(); HttpServletResponse response = currentContext.getResponse(); response.setHeader("zuul","postzuul"); return null; } }
c787b35b-feaa-40a8-93cc-ee8f9e73a2ae
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-10T15:18:49", "repo_name": "startshineye/spring-security", "sub_path": "/spring-security-core/src/main/java/com/yxm/security/core/validate/ValidateCode.java", "file_name": "ValidateCode.java", "file_ext": "java", "file_size_in_byte": 1178, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "6462ef092bdec3fb9a0b22462d4516370e1c6a37", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/startshineye/spring-security
256
FILENAME: ValidateCode.java
0.274351
package com.yxm.security.core.validate; import java.io.Serializable; import java.time.LocalDateTime; /**短信验证码 * @author yexinming * @date 2020/2/24 **/ public class ValidateCode implements Serializable { private String code; /** * 过期时间 */ private LocalDateTime expireTime; public ValidateCode(String code, int expireIn){ this.code=code; /** * 过期时间传递的参数应该是一个秒数:根据这个秒数去计算过期时间 */ this.expireTime = LocalDateTime.now().plusSeconds(expireIn); } public ValidateCode(String code, LocalDateTime expireTime){ this.code=code; this.expireTime=expireTime; } public boolean isExpried() { return LocalDateTime.now().isAfter(expireTime); } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public LocalDateTime getExpireTime() { return expireTime; } public void setExpireTime(LocalDateTime expireTime) { this.expireTime = expireTime; } }
70d2566e-ba3b-48f7-b8a6-9c20aca9a5ff
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-22 19:04:44", "repo_name": "Victoria441/CucumberBDD", "sub_path": "/src/test/java/step_definitions/CommonPageTest.java", "file_name": "CommonPageTest.java", "file_ext": "java", "file_size_in_byte": 965, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "6a73f7b62917853d9210355cf9214ca484f67a85", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Victoria441/CucumberBDD
194
FILENAME: CommonPageTest.java
0.26588
package step_definitions; import io.cucumber.java.en.When; import pages.UserMgtPage; import step_implementation.CommonPageImpl; import utils.Driver; import utils.SeleniumUtils; public class CommonPageTest extends CommonPageImpl { @When("I click a button {string}") public void i_click_a_button(String buttonName) { UserMgtPage userMgtPage = new UserMgtPage(); String mainWindowID = Driver.getDriver().getWindowHandle(); switch (buttonName.toLowerCase()){ case "submit": SeleniumUtils.click(userMgtPage.submitBtn); break; case "login": SeleniumUtils.click(userMgtPage.logInBtn); switchToWindow(mainWindowID); break; case "access db": SeleniumUtils.click(userMgtPage.accessDbBtn); switchToWindow(mainWindowID); break; default: System.out.println("Invalid button name"); } } }
7aecd4d4-73ea-4697-9079-568d3b73d57b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-12 14:49:42", "repo_name": "lirf2018/store-back", "sub_path": "/src/main/java/com/yufan/aop/ResourceAop.java", "file_name": "ResourceAop.java", "file_ext": "java", "file_size_in_byte": 1085, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "bf5ea27db2bd5eb0108b0ce9958bd664e19030f5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lirf2018/store-back
264
FILENAME: ResourceAop.java
0.27513
package com.yufan.aop; import org.aspectj.lang.annotation.Aspect; import java.util.HashMap; import java.util.Map; /** * @description: 资源aop * @author: lirf * @time: 2021/7/10 */ @Aspect public class ResourceAop { // @Before() // public public static void main(String[] args) { Map<String, Object> classMap = new HashMap<>(); String name = "aa"; String v = "bb"; classMap.put(name, v); // Map<String, String> map = new HashMap<>(); map.put("name", "value"); map.put("name2", "value2"); classMap.put("methodResource", map); // for (Map.Entry<String, Object> mm : classMap.entrySet()) { String key = mm.getKey(); Object value = mm.getValue(); if (value instanceof Map) { Map<String, String> m2 = (Map<String, String>) value; for (Map.Entry<String, String> mmm : m2.entrySet()) { System.out.println(mmm.getKey()+"==="+mmm.getValue()); } } } } }
cc221a48-040a-4cdb-9e2a-20fef3059879
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-18 18:20:04", "repo_name": "MukhtarA/Java-Spring-Assignment4", "sub_path": "/src/main/java/com/example/demo/service/EmployeeService.java", "file_name": "EmployeeService.java", "file_ext": "java", "file_size_in_byte": 1109, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "9e1fe7f65bcb203e7906c4c49c49f51198c446d1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MukhtarA/Java-Spring-Assignment4
203
FILENAME: EmployeeService.java
0.279042
package com.example.demo.service; import com.example.demo.dao.EmployeeDao; import com.example.demo.model.Employee; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; import java.util.UUID; @Service public class EmployeeService { private final EmployeeDao employeeDao; @Autowired public EmployeeService(@Qualifier("dataBaseAccess") EmployeeDao employeeDao) { this.employeeDao = employeeDao; } public void addEmployee(Employee employee){ employeeDao.insertEmployee(employee); } public List<Employee> getAll(){ return employeeDao.selectAll(); } public Optional<Employee> getEmployeeById(int id){ return employeeDao.selectEmployee(id); } public int deleteEmployee(int id) { return employeeDao.deleteEmployee(id); } public int updateEmployee(int id, Employee newEmployee){ return employeeDao.updateEmployee(id, newEmployee); } }
37d139b9-7d5d-451d-acde-4590655f1a33
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-13 10:22:42", "repo_name": "dimitar1997/OOP-EXAMS", "sub_path": "/src/bakery/repositories/interfaces/FoodRepositoryImpl.java", "file_name": "FoodRepositoryImpl.java", "file_ext": "java", "file_size_in_byte": 975, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "b11ddd2a1fa8d4bf32fe165f538d3aa51a1d92d9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dimitar1997/OOP-EXAMS
208
FILENAME: FoodRepositoryImpl.java
0.294215
package bakery.repositories.interfaces; import bakery.entities.bakedFoods.interfaces.BakedFood; import bakery.entities.bakedFoods.interfaces.BaseFood; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; public class FoodRepositoryImpl<F extends BaseFood> implements FoodRepository<BakedFood>{ private Collection<BakedFood> bakedFoods; public FoodRepositoryImpl(){ bakedFoods = new ArrayList<>(); } @Override public BakedFood getByName(String name) { BakedFood nameFood = null; for (BakedFood bakedFood : bakedFoods) { if (bakedFood.getName().equals(name)){ nameFood = bakedFood; } } return nameFood; } @Override public Collection<BakedFood> getAll() { return Collections.unmodifiableCollection(bakedFoods); } @Override public void add(BakedFood bakedFood) { bakedFoods.add(bakedFood); } }
a2bf7e29-3ef6-4e83-970a-b5ebd987614b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-11 12:47:42", "repo_name": "joyghosh/sift", "sub_path": "/src/main/java/com/sift/utilities/Seed.java", "file_name": "Seed.java", "file_ext": "java", "file_size_in_byte": 1039, "line_count": 72, "lang": "en", "doc_type": "code", "blob_id": "e2b25afac3451cf070bf40529656660926246a80", "star_events_count": 3, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/joyghosh/sift
281
FILENAME: Seed.java
0.275909
package com.sift.utilities; import java.io.File; /** * Custom Seed object for initializing and classifier training. * @author Joy Ghosh. * @version 1.0 * @since 1.0 */ public class Seed{ private File file; private String text; private String category; private boolean isText; /** * For file type objects. * @param file * @param category */ public Seed(File file, String category){ this.file = file; this.category = category; this.isText = false; } /** * For string type objects. * @param text * @param category */ public Seed(String text, String category){ this.text = text; this.category = category; this.isText = true; } /** * File object. * @return */ public File getFile() { return file; } /** * Content of text. * @return */ public String getText() { return text; } /** * Get category. * @return */ public String getCategory() { return category; } /** * Check if text or file. * @return */ public boolean isText(){ return isText; } }
f8bf258a-e0f0-4244-9422-230fd341f4cd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-10-18T00:38:21", "repo_name": "osmanelaldi/NewsMVVM", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1197, "line_count": 20, "lang": "en", "doc_type": "text", "blob_id": "433792b8a02b8aed1f53819ad5c9dc0d060f937e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/osmanelaldi/NewsMVVM
343
FILENAME: README.md
0.279828
# NewsMVVM ## Android News App Using Kotlin, Android Jetpack Libraries #### App emits The Guardian API and shows latest, searched, category based news on Webview. User may save news to read later. > ### App Features > MVVM, Room DB, Retrofit, Flow API, Live Data, Paging 3 Library, Repository Pattern, Error Handling ![download](https://user-images.githubusercontent.com/52549784/96355865-9c461980-10ef-11eb-8fe6-2d835c815e51.png) > ### Architecture of data emit using Paging 3 Library > - **PagingSource** object defines a source of data and how to retrieve data from that source. > - **The Pager** component provides a public API for constructing instances of PagingData that are exposed in reactive streams, based on a PagingSource object and a **PagingConfig** configuration object. > - **PagingData** object is a container for a snapshot of paginated data. It queries a **PagingSource** object and stores the result. > - The primary Paging library component in the UI layer is **PagingDataAdapter**, a **RecyclerView** adapter that handles paginated data. ### App Preview ![news](https://user-images.githubusercontent.com/52549784/96355404-0956b080-10ea-11eb-9648-d7b62e90b3ce.jpg)
14b57b9b-97bb-4021-b5e8-6bf2b6bfec94
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-26 07:01:38", "repo_name": "PiotrTomaszewski92/aop", "sub_path": "/src/main/java/AroundHandleExceptionDemoApp.java", "file_name": "AroundHandleExceptionDemoApp.java", "file_ext": "java", "file_size_in_byte": 1097, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "7ccc7ea4310c0bd3d4568b59276c875e3dd4bfbc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/PiotrTomaszewski92/aop
227
FILENAME: AroundHandleExceptionDemoApp.java
0.286968
import config.DemoConfig; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import service.TrafficFortuneService; public class AroundHandleExceptionDemoApp { public static void main(String[] args) { //read spring config java class AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(DemoConfig.class); TrafficFortuneService theFortuneService = context.getBean("trafficFortuneService",TrafficFortuneService.class); System.out.println("+~+~+~+~+ Main program: Around Handle Exception Demo App"); System.out.println("+~+~+~+~+ Calling getFortune"); String data = null; try { boolean tripWire = true; data = theFortuneService.getFortune(tripWire); }catch(RuntimeException e){ System.out.println("Exception in main program: "+e.getMessage()); } System.out.println("+~+~+~+~+ My fortune is: "+data); System.out.println("+~+~+~+~+ Finished"); context.close(); } }
d71ac8b0-20b3-42e5-9c7b-1eabe9f2d538
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-13 16:28:40", "repo_name": "AnJaeSeongS2/sonan-framework", "sub_path": "/sonan-web/src/main/java/org/sonan/framework/web/PathVariableModel.java", "file_name": "PathVariableModel.java", "file_ext": "java", "file_size_in_byte": 1148, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "350bb30859813f9779857e01c6553f2c404cd95b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AnJaeSeongS2/sonan-framework
249
FILENAME: PathVariableModel.java
0.242206
package org.sonan.framework.web; import java.lang.reflect.Method; /** * PathVariable 에 대한 정의 * * Created by Jaeseong on 2021/04/07 * Git Hub : https://github.com/AnJaeSeongS2 */ public class PathVariableModel { private Integer parameterIndex; private Method method; private String variableName; private Class<?> variableClass; private Integer variableIndexOnUrl; public PathVariableModel(Integer parameterIndex, Method method, String variableName, Class<?> variableClass, Integer variableIndexOnUrl) { this.parameterIndex = parameterIndex; this.method = method; this.variableName = variableName; this.variableClass = variableClass; this.variableIndexOnUrl = variableIndexOnUrl; } public Integer getParameterIndex() { return parameterIndex; } public Method getMethod() { return method; } public String getVariableName() { return variableName; } public Class<?> getVariableClass() { return variableClass; } public Integer getVariableIndexOnUrl() { return variableIndexOnUrl; } }
7ca0c179-ffe5-46f4-95f7-1f06f9437564
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-22 21:53:25", "repo_name": "colinmcdonald22/ArenaDuels", "sub_path": "/src/main/java/net/hcfactions/duels/listeners/DuelQuitListener.java", "file_name": "DuelQuitListener.java", "file_ext": "java", "file_size_in_byte": 978, "line_count": 27, "lang": "en", "doc_type": "code", "blob_id": "2ad80a8f0442928e58c2178b94df0d2d70e149e8", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/colinmcdonald22/ArenaDuels
205
FILENAME: DuelQuitListener.java
0.249447
package net.hcfactions.duels.listeners; import net.hcfactions.duels.Duel; import net.hcfactions.duels.DuelManager; import org.bukkit.Bukkit; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.player.PlayerQuitEvent; public class DuelQuitListener implements Listener { private DuelManager duelManager; public DuelQuitListener(DuelManager duelManager) { this.duelManager = duelManager; } @EventHandler public void onPlayerQuit(PlayerQuitEvent event) { if (duelManager.getDuel(event.getPlayer().getUniqueId()) != null) { Duel activeDuel = duelManager.getDuel(event.getPlayer().getUniqueId()); // This line could probably be cleaned up a little bit, but I'd rather this than another endDuel method which would do this. duelManager.endDuel(activeDuel, Bukkit.getServer().getPlayer(activeDuel.getOtherPlayer(event.getPlayer().getUniqueId()))); } } }
8ab2583d-12dc-41ff-ac9c-2fa34d188282
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-27 06:40:55", "repo_name": "ZXAXKL/backServer", "sub_path": "/server-device/src/main/java/com/graduation/device/mqtt/MqttDto.java", "file_name": "MqttDto.java", "file_ext": "java", "file_size_in_byte": 1366, "line_count": 55, "lang": "zh", "doc_type": "code", "blob_id": "66307f83eb2a2be9d46527263ed16728e7ea0fd9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ZXAXKL/backServer
324
FILENAME: MqttDto.java
0.293404
package com.graduation.device.mqtt; import lombok.Data; import java.util.HashMap; import java.util.Map; @Data public class MqttDto { //类型 private String type; //操作 private String cmd; //参数 可能为map集合也可以为单个数值 private Object args; //构造函数 private MqttDto(String type, String cmd, Object args){ this.type = type; this.cmd = cmd; this.args = args; } //构造函数,不传参数则认为args为一个集合 private MqttDto(String type, String cmd){ this.type = type; this.cmd = cmd; this.args = new HashMap<>(); } //生成一个空参数的传输对象 public static MqttDto makeEmptyMqttDto(String type, String cmd){ return new MqttDto(type, cmd, ""); } //生成一个单参数传输对象 public static MqttDto makeSigArgMqttDto(String type, String cmd, Object args){ return new MqttDto(type, cmd, args); } //生成一个多参数的传输对象 public static MqttDto makeMulArgMqttDto(String type, String cmd){ return new MqttDto(type, cmd); } //往参数集合里添加参数 @SuppressWarnings("unchecked") public void put(String key, Object value){ if(args instanceof Map){ ((Map) args).put(key, value); } } }
989d48d9-d3f2-4556-b808-7c522d35aa89
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-19 08:14:12", "repo_name": "iamiranjbar/JobOonJa", "sub_path": "/src/main/java/ir/ac/ut/models/Bid/BidDTO.java", "file_name": "BidDTO.java", "file_ext": "java", "file_size_in_byte": 1100, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "f6da2dd6fff2f7b4ff3abdc9594154a0e816e8a7", "star_events_count": 10, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/iamiranjbar/JobOonJa
234
FILENAME: BidDTO.java
0.247987
package ir.ac.ut.models.Bid; import com.jsoniter.annotation.JsonObject; import com.jsoniter.annotation.JsonProperty; @JsonObject(asExtraForUnknownProperties = true) public class BidDTO { @JsonProperty(required = true) private String biddingUser; @JsonProperty(required = true) private String projectTitle; @JsonProperty(required = true) private int bidAmount; public BidDTO(){ } public BidDTO(String userId, String projectId, int amount) { this.biddingUser = userId; this.projectTitle = projectId; this.bidAmount = amount; } public String getBiddingUser() { return biddingUser; } public String getProjectTitle() { return projectTitle; } public int getBidAmount() { return bidAmount; } public void setBiddingUser(String biddingUser) { this.biddingUser = biddingUser; } public void setBidAmount(int bidAmount) { this.bidAmount = bidAmount; } public void setProjectTitle(String projectTitle) { this.projectTitle = projectTitle; } }
0b2e2491-5916-49e9-8ecb-84fe96bd181e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-14 08:48:26", "repo_name": "StaceyBaytalyuk/radio_station", "sub_path": "/src/main/java/com/baitaliuk/radiostation/domain/broadcast/EmployedPresenterOfBroadcast.java", "file_name": "EmployedPresenterOfBroadcast.java", "file_ext": "java", "file_size_in_byte": 1197, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "2255d9fe0ce2a732be8f7c9b46614d59f3673bf9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/StaceyBaytalyuk/radio_station
244
FILENAME: EmployedPresenterOfBroadcast.java
0.275909
package com.baitaliuk.radiostation.domain.broadcast; import com.baitaliuk.radiostation.domain.presenters.*; import javax.persistence.*; @Entity @Table(name = "EmployedPresenterOfBroadcast") public class EmployedPresenterOfBroadcast { @Id @GeneratedValue(strategy= GenerationType.AUTO) private Integer id; @ManyToOne @JoinColumn(name = "broadcast_id") private Broadcast broadcast = null; @ManyToOne @JoinColumn(name = "presenter_id") private EmployedPresenter presenter = null; public EmployedPresenterOfBroadcast() {} public EmployedPresenterOfBroadcast(EmployedPresenter presenter, Broadcast broadcast) { this.broadcast = broadcast; this.presenter = presenter; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Broadcast getBroadcast() { return broadcast; } public void setBroadcast(Broadcast broadcast) { this.broadcast = broadcast; } public Presenter getPresenter() { return presenter; } public void setPresenter(EmployedPresenter presenter) { this.presenter = presenter; } }
61e155b6-6bd5-4bf2-ad59-bbc38415a680
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-14 16:09:59", "repo_name": "anhtuta/AndroidTutorial", "sub_path": "/AsyncTask2/src/main/java/anhtu/bkhn/asynctask2/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1055, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "b2cc845557090ea9e6ca0b02204d4b794b08a647", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/anhtuta/AndroidTutorial
188
FILENAME: MainActivity.java
0.247987
package anhtu.bkhn.asynctask2; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ProgressBar; public class MainActivity extends AppCompatActivity { Button btStart; ProgressBar rotatePrb; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); rotatePrb = (ProgressBar) findViewById(R.id.rotateProgressBar); rotatePrb.setVisibility(View.INVISIBLE); btStart = (Button) findViewById(R.id.btnStart); btStart.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { //rotatePrb.setEnabled(true); rotatePrb.setVisibility(View.VISIBLE); new MyAsyncTask(MainActivity.this, rotatePrb).execute(); } }); } }
092c03f9-7ac7-4ab9-b66d-ecd9a611c377
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-03 13:08:46", "repo_name": "ravinakapila55/CraigApp", "sub_path": "/app/src/main/java/com/helper/Helper2Go/google_place_search/GeoLocation.java", "file_name": "GeoLocation.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "9624b43389b80248feccd0327c3fcd34cb3ee25c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ravinakapila55/CraigApp
218
FILENAME: GeoLocation.java
0.27048
package com.helper.Helper2Go.google_place_search; import android.content.Context; import android.location.Address; import android.location.Geocoder; import android.widget.Toast; import com.helper.Helper2Go.R; import java.io.IOException; import java.util.List; import java.util.Locale; public class GeoLocation { public static String getAddress(Context context, double lat, double lng) { Geocoder geocoder; String address=""; String cId=""; List<Address> addresses; geocoder = new Geocoder(context, Locale.getDefault()); try { addresses = geocoder.getFromLocation(lat,lng, 1); if (addresses.size()>0) { address = addresses.get(0).getAddressLine(0); cId = addresses.get(0).getCountryCode(); } else { address=""; cId=""; Toast.makeText(context, R.string.location_not_found, Toast.LENGTH_SHORT).show(); } } catch (IOException e) { e.printStackTrace(); } return address; } }
497b2458-aaa7-41f6-a9ee-159d5d0cb7f7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-17 02:56:28", "repo_name": "JoeRoc13/GetFit", "sub_path": "/final/WorkoutApplication/app/src/main/java/com/example/atouf/workoutapplication/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1024, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "97b5ef505660c88af065d0d17572d101c862f347", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JoeRoc13/GetFit
168
FILENAME: MainActivity.java
0.205615
package com.example.atouf.workoutapplication; import android.graphics.Color; import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.view.ViewPager; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); getSupportActionBar().setCustomView(R.layout.abs_layout); ViewPager viewPager = findViewById(R.id.viewpager); CategoryAdapter adapter = new CategoryAdapter(this, getSupportFragmentManager()); viewPager.setAdapter(adapter); TabLayout tabLayout = findViewById(R.id.tabs); tabLayout.setBackgroundColor(Color.parseColor("#eff0f1")); tabLayout.setupWithViewPager(viewPager); } }
88ca3b32-198d-4b8e-b080-dc5f5c62e68e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-09 16:42:15", "repo_name": "brandonthecraig/design-patterns", "sub_path": "/Structural Design Patterns/Section 18 - Proxy/Static Proxy/udemy-design-patterns-handson/src/com/coffeepoweredcrew/proxy/ImageProxy.java", "file_name": "ImageProxy.java", "file_ext": "java", "file_size_in_byte": 1038, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "821e9678b6c32aa6296bafc56becadce3933494e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/brandonthecraig/design-patterns
212
FILENAME: ImageProxy.java
0.278257
package com.coffeepoweredcrew.proxy; import javafx.geometry.Point2D; import java.util.Objects; //Proxy class. public class ImageProxy implements Image { private BitmapImage image; private String fileName; private Point2D location; public ImageProxy(String name) { this.fileName = name; } @Override public void setLocation(Point2D point2d) { if (Objects.nonNull(image)) { image.setLocation(point2d); } else { location = point2d; } } @Override public Point2D getLocation() { if (Objects.nonNull(image)) { return image.getLocation(); } else { return location; } } @Override public void render() { if (Objects.nonNull(image)) { image.render(); } else { image = new BitmapImage(fileName); if (Objects.nonNull(location)) { image.setLocation(location); } image.render(); } } }
1878f30c-1b5c-440c-9ac6-12f27ce8387f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-09-05 17:59:01", "repo_name": "dimagi/formplayer", "sub_path": "/src/main/java/org/commcare/formplayer/beans/SessionResponseBean.java", "file_name": "SessionResponseBean.java", "file_ext": "java", "file_size_in_byte": 1198, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "df8ffe74ec7a4a5c7036e0138febb3a1d22b787f", "star_events_count": 7, "fork_events_count": 9, "src_encoding": "UTF-8"}
https://github.com/dimagi/formplayer
263
FILENAME: SessionResponseBean.java
0.245085
package org.commcare.formplayer.beans; import com.fasterxml.jackson.annotation.JsonGetter; import com.fasterxml.jackson.annotation.JsonSetter; import org.commcare.formplayer.beans.menus.BaseResponseBean; /** * Created by willpride on 2/8/16. */ public class SessionResponseBean extends BaseResponseBean { String sessionId; int sequenceId; protected InstanceXmlBean instanceXml; @JsonGetter(value = "session_id") public String getSessionId() { return sessionId; } @JsonSetter(value = "session_id") public void setSessionId(String sessionId) { this.sessionId = sessionId; } @JsonGetter(value = "seq_id") public int getSequenceId() { return sequenceId; } @JsonSetter(value = "seq_id") public void setSequenceId(int sequenceId) { this.sequenceId = sequenceId; } @Override public String toString() { return "SessionResponseBean [sessionId=" + sessionId + ", seqId=" + sequenceId + "]"; } public InstanceXmlBean getInstanceXml() { return instanceXml; } public void setInstanceXml(InstanceXmlBean instanceXml) { this.instanceXml = instanceXml; } }
61254aab-e5cc-490a-b5c8-58003e3ad3b3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-06-16 20:55:37", "repo_name": "tyran53red/personal-assistant", "sub_path": "/src/com/personalassistant/model/LessonImpl.java", "file_name": "LessonImpl.java", "file_ext": "java", "file_size_in_byte": 1137, "line_count": 72, "lang": "en", "doc_type": "code", "blob_id": "c102666b6491eb04a7873a517263db8dc4dd8328", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/tyran53red/personal-assistant
288
FILENAME: LessonImpl.java
0.262842
package com.personalassistant.model; public class LessonImpl implements Lesson { private String name = null; private LessonType type = null; private int corp = -1; private int auditory = -1; private String middle = null; public LessonImpl() { } public LessonImpl(String name, LessonType type, int corp, int auditory, String middle) { setName(name); setLessonType(type); setCorp(corp); setAuditory(auditory); setMiddle(middle); } @Override public String getName() { return name; } @Override public void setName(String name) { this.name = name; } @Override public LessonType getType() { return type; } @Override public void setLessonType(LessonType type) { this.type = type; } @Override public int getCorp() { return corp; } @Override public void setCorp(int corp) { this.corp = corp; } @Override public int getAuditory() { return auditory; } @Override public void setAuditory(int auditory) { this.auditory = auditory; } @Override public String getMiddle() { return middle; } @Override public void setMiddle(String middle) { this.middle = middle; } }
063dc933-e720-41ca-89f7-3a3c3fb439dc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-06-08 13:09:31", "repo_name": "RyanTech/yueji", "sub_path": "/web.common/src/main/java/com/yue/app/web/validation/validator/StringLength.java", "file_name": "StringLength.java", "file_ext": "java", "file_size_in_byte": 1094, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "5480901aff94845e213e6293e663cc072e400466", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RyanTech/yueji
255
FILENAME: StringLength.java
0.291787
package com.yue.app.web.validation.validator; /** * StringLength只能校验字符串长度,且min和max都是闭合区间 * * @author wanghai 2011-9-8 上午10:54:53 */ public class StringLength extends AbstarctValidator { private int max; private int min; public boolean validate(Object value) { if (value instanceof String) { String strValue = (String) value; return strValue.length() >= min && strValue.length() <= max; } else { throw new RuntimeException("StringLength只能校验字符串长度"); } } public int getMax() { return max; } public void setMax(int max) { this.max = max; } public int getMin() { return min; } public void setMin(int min) { this.min = min; } public static void main(String[] args) { StringLength sl = new StringLength(); sl.setMax(2); sl.setMin(1); sl.setErrorMessage("test${max},${min},${displayName}"); System.out.println(sl.getErrorMessage("Email")); } }
6dfb807d-2d89-412f-92f2-25070175cdf0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-22 15:28:52", "repo_name": "ramanamca04/codingchallangeAPI", "sub_path": "/src/main/java/com/gogoair/requests/RestAssuredConfiguration.java", "file_name": "RestAssuredConfiguration.java", "file_ext": "java", "file_size_in_byte": 1074, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "f45d65c334af6c72550f815f255a5070db714bbd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ramanamca04/codingchallangeAPI
221
FILENAME: RestAssuredConfiguration.java
0.285372
package com.gogoair.requests; import org.testng.annotations.BeforeSuite; import org.testng.annotations.Parameters; import io.restassured.RestAssured; import io.restassured.http.ContentType; import io.restassured.specification.RequestSpecification; public class RestAssuredConfiguration { public UserDetails userDetails; @BeforeSuite(alwaysRun = true) @Parameters({"email", "first_name", "last_name", "gender", "authorization"}) public void configure(String email, String firstName, String lastName, String gender, String authorization){ //public void configure(){ RestAssured.baseURI = "https://gorest.co.in"; RestAssured.basePath="/public-api"; //this.token = user01_token; userDetails = new UserDetails(email, firstName, lastName, gender, authorization); } public RequestSpecification getRequestSpecification() { RequestSpecification httpRequest = RestAssured.given(); httpRequest.header("Content-Type", "application/json"); httpRequest.header("Authorization", userDetails.getAuthorization()); return httpRequest; } }
55f8a6ee-ee14-41f0-8148-aa16d0b1134d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-02 09:32:54", "repo_name": "BulutKAYA/ToDoList", "sub_path": "/src/main/java/com/bulut/todolist/service/UserServiceImpl.java", "file_name": "UserServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1041, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "a499b69bda359fea2d03bc90f3aa019c6c4e041e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/BulutKAYA/ToDoList
185
FILENAME: UserServiceImpl.java
0.218669
package com.bulut.todolist.service; import com.bulut.todolist.model.User; import com.bulut.todolist.repository.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Optional; @Service public class UserServiceImpl implements UserService { @Autowired private UserRepository userRepository; public User saveOrUpdateUser(User user){ return userRepository.save(user); } @Override public User findUserByEmailAndPassword(String email, String password) { return userRepository.findUserByEmailAndPassword(email, password); } @Override public User findByUsername(String username) { return userRepository.findByUsername(username); } @Override public Boolean existsByUsername(String username) { return userRepository.existsByUsername(username); } @Override public Boolean existsByEmail(String email) { return userRepository.existsByEmail(email); } }
51497705-494c-4f50-acef-2e449a9a1568
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-25 09:32:29", "repo_name": "2021-DEV1-079/tictactoe", "sub_path": "/src/main/java/com/example/tictactoe/domain/model/GameState.java", "file_name": "GameState.java", "file_ext": "java", "file_size_in_byte": 1078, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "b637780d9ab3d8a5ed5e71e2d06710a438fba088", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/2021-DEV1-079/tictactoe
214
FILENAME: GameState.java
0.27513
package com.example.tictactoe.domain.model; import java.util.List; import java.util.UUID; public class GameState { private UUID nextPlayer; private GameStatus status; private List<String> boardRepresentation; public GameState(Game game, List<String> boardRepresentation) { this.status = game.getStatus(); this.boardRepresentation = boardRepresentation; if (game.getStatus() == GameStatus.running) { if(game.getMovesHistory().isEmpty()){ nextPlayer = game.getPlayerOneId(); }else { UUID lastMovePlayerID = game.getMovesHistory().get(game.getMovesHistory().size() - 1).getAssociatedPlayerId(); nextPlayer = game.getPlayerOneId().equals(lastMovePlayerID) ? game.getPlayerTwoId() : game.getPlayerOneId(); } } } public List<String> getBoardRepresentation() { return boardRepresentation; } public UUID getNextPlayer() { return nextPlayer; } public GameStatus getStatus() { return status; } }
73a4890b-791a-4eda-9ca9-0649ea1242a6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-18 03:21:15", "repo_name": "piziyang12138/wukongwenda", "sub_path": "/src/main/java/com/neusoft/controller/SearchController.java", "file_name": "SearchController.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "663b7cf8fd830f2566e84d7d8cd2fdee1ba2c921", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/piziyang12138/wukongwenda
203
FILENAME: SearchController.java
0.249447
package com.neusoft.controller; import com.alibaba.fastjson.JSON; import com.neusoft.bean.UserInfo; import com.neusoft.service.IArticleService; import com.neusoft.util.ArticlesWarp; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @Controller @RequestMapping("search") public class SearchController { @Autowired IArticleService articleService; @RequestMapping("getmore") public void getmore(String keyword,int aid, Model model, HttpServletRequest request, HttpServletResponse response){ UserInfo user = (UserInfo) request.getSession().getAttribute("user"); ArticlesWarp articlesWarp = articleService.askQuestions(keyword,user,aid-1,8,request); try { response.getWriter().print(JSON.toJSONString(articlesWarp)); } catch (IOException e) { e.printStackTrace(); } } }
2c95cb6b-9d30-474f-9c65-56740dbd1228
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-12-27 18:42:29", "repo_name": "jsilvamarques/AcervoDoLeitorWS", "sub_path": "/src/main/java/br/com/acervodoleitorws/event/listener/ResourceCreatedListener.java", "file_name": "ResourceCreatedListener.java", "file_ext": "java", "file_size_in_byte": 1089, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "96b87e3a5a67fc68a613fcd5ebf7e8d56fe00c83", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jsilvamarques/AcervoDoLeitorWS
205
FILENAME: ResourceCreatedListener.java
0.289372
package br.com.acervodoleitorws.event.listener; import java.net.URI; import javax.servlet.http.HttpServletResponse; import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import br.com.acervodoleitorws.event.ResourceCreatedEvent; @Component public class ResourceCreatedListener implements ApplicationListener<ResourceCreatedEvent>{ @Override public void onApplicationEvent(ResourceCreatedEvent resourceCreatedEvent) { HttpServletResponse response = resourceCreatedEvent.getResponse(); Long uid = resourceCreatedEvent.getUid(); String isbn = resourceCreatedEvent.getIsbn(); String resource = uid != null ? uid.toString() : isbn; addHeaderLocation(response, resource); } private void addHeaderLocation(HttpServletResponse response, Object resource) { URI uri = ServletUriComponentsBuilder.fromCurrentRequestUri().path("/{uid}") .buildAndExpand(resource.toString()).toUri(); response.setHeader("Location", uri.toASCIIString()); } }
b74eb1eb-7146-4a04-89f3-45b4583ff0a7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-11 14:22:51", "repo_name": "Max-Pochepets/jv-dao-task3-taxi-service", "sub_path": "/src/main/java/model/Manufacturer.java", "file_name": "Manufacturer.java", "file_ext": "java", "file_size_in_byte": 1198, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "e4d1c2582afef83b5162545b9ac7415aa7e87891", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Max-Pochepets/jv-dao-task3-taxi-service
253
FILENAME: Manufacturer.java
0.278257
package model; import java.util.Objects; public class Manufacturer { private Long id; private String name; private String country; public Manufacturer(String name, String country) { this.name = name; this.country = country; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Manufacturer that = (Manufacturer) o; return Objects.equals(id, that.id) && Objects.equals(name, that.name) && Objects.equals(country, that.country); } @Override public int hashCode() { return Objects.hash(id, name, country); } }
d2a5cb7b-603a-4fa9-856f-70475b197944
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-11-25T14:07:15", "repo_name": "dpdexter/expressionengine-docker", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1054, "line_count": 27, "lang": "en", "doc_type": "text", "blob_id": "a1b4ffc5d68ed31a3f57f4e53441ed8cc8c405dc", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dpdexter/expressionengine-docker
258
FILENAME: README.md
0.228156
# ExpressionEngine with Docker A script to setup an ExpressionEngine site with Docker and Docker Compose. I wrote and tested this on my MacBook.... ## Pre-requisites * [Docker](https://docs.docker.com/docker-for-mac/) * Docker Compose * Mysql client * Not a requirement for setup since MySQL is running in a container, but the startup and dump scripts rely on mysql and mysqldump locally. * I use [brew](https://brew.sh/) for all things Mac related. ## Usage * clone repo * To setup the inital project from terminal run: * `./init.sh` * To download the database: * `./data/dbdump.sh ` * To inport the downloaded database on startup * `./data/startup.sh ` ## IMPORTANT Because we are using docker to communicate between containers you must use the MySQL Host name output at the end of the script to configure ExpressionEngine. ## Goodies to clean up during testing * Clean up containers * `docker rm -f $(docker container ls -qa)` * Clean up files * `rm -rf downloads/ data/ public/ system/ build/docker-compose.yml`
8603dfcb-992f-4318-8bd8-07576faa273c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-11-07 18:31:51", "repo_name": "natanaelsilva/autoestudo", "sub_path": "/fj26-notas-fiscais-jsf/src/br/com/caelum/notasfiscais/dao/JPAUtil.java", "file_name": "JPAUtil.java", "file_ext": "java", "file_size_in_byte": 1112, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "72278b40b945a77db2cc7ed78efa5c1fc65aef6d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/natanaelsilva/autoestudo
252
FILENAME: JPAUtil.java
0.290981
package br.com.caelum.notasfiscais.dao; import javax.enterprise.context.RequestScoped; import javax.enterprise.inject.Any; import javax.enterprise.inject.Default; import javax.enterprise.inject.Disposes; import javax.enterprise.inject.Produces; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import br.com.caelum.notasfiscais.qualificadores.BaseNotasFiscais; public class JPAUtil { private static EntityManagerFactory emf = Persistence.createEntityManagerFactory("notas"); //private static EntityManagerFactory emfSeguranca = Persistence.createEntityManagerFactory("seguranca"); @Produces @RequestScoped @BaseNotasFiscais @Default public EntityManager getEntityManager() { return emf.createEntityManager(); } // @Produces // @RequestScoped // @BaseSeguranca // public EntityManager getEntityManagerSeguranca() { // return emfSeguranca.createEntityManager(); // } public void close(@Disposes @Any EntityManager em){ System.out.println("Fechando a entity manager " + em); if(em.isOpen()) em.close(); } }
1eedab9d-2b1e-43db-b005-d56477db6cf5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-28 01:34:36", "repo_name": "zhaozhiqiang8090/spring-boot", "sub_path": "/spring-boot-core/src/main/java/com/zzq/core/service/impl/SpringRetryServiceImpl.java", "file_name": "SpringRetryServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1097, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "ee2229f99026389414c50119de46c9d7addd5fe4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zhaozhiqiang8090/spring-boot
222
FILENAME: SpringRetryServiceImpl.java
0.250913
package com.zzq.core.service.impl; import com.zzq.core.service.SpringRetryService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.retry.annotation.Backoff; import org.springframework.retry.annotation.Recover; import org.springframework.retry.annotation.Retryable; import org.springframework.stereotype.Service; @Service public class SpringRetryServiceImpl implements SpringRetryService { private static final Logger logger = LoggerFactory.getLogger(SpringRetryServiceImpl.class); private int time = 0; @Retryable(value= {RuntimeException.class},maxAttempts = 3,backoff = @Backoff(delay = 5000l,multiplier = 2)) public void call() throws RuntimeException { // if (time < 2) { if (time < 3) { time ++; logger.info("do something..."); throw new RuntimeException("RPC调用异常"); } } @Recover @SuppressWarnings("unused") public void recover(RuntimeException e) { logger.info(" --------------------------- "); logger.info(e.getMessage()); } }
4c6ed317-4f5c-4a03-8d67-994bf41674c7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-05-05T15:21:54", "repo_name": "Skai-2012/Roblox-fly-hack", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 983, "line_count": 30, "lang": "en", "doc_type": "text", "blob_id": "c11bc2c7938122f73be0d8c4a5f9526f038eb536", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/Skai-2012/Roblox-fly-hack
300
FILENAME: README.md
0.167763
# Roblox-fly-hack Copy everything in the fly file enjoy! I honestly never hacked and never will i just made this for some people who are looking to hack You can also download this repository and then just click the fly file and copy everything from it DISCLAIMER: THE FLY SCRIPT DOESNT WORK IF YOU DONT HAVE A EXECUTOR IF YOU DONT HAVE ONE TRY FINDING ONW AND DOWNLOADING IT BUT MAKE SURE ITS NOT A VIRUS DO NOT COPY ANYTHING FROM THE FLY HACK IN GITHUB LANGUAGE OR ELSE IF YOU PASTE IN IN THE EXECUTOR IT WONT WORK The A7D3453C-DCFC-4FDB-A758-42209DA937B8.webp file is just a picture of a troll face facing foward nothing important lol the langauge file is just a list of langauges j <a href="https://discord.gg/xjvT7Y6rcp"> <img src="https://img.shields.io/badge/discord-server-blue.svg" alt="Discord" /> </a> <a href="https://web.roblox.com/users/1156880273/profile"> <img src="https://img.shields.io/badge/roblox-profile-red.svg" alt="Discord" /> </a> </div>
5061671b-93b1-49ee-896f-d16203554107
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-04 06:55:59", "repo_name": "wwnana/shopping", "sub_path": "/src/shopping/admin/web/servlet/AdminServlet.java", "file_name": "AdminServlet.java", "file_ext": "java", "file_size_in_byte": 1092, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "290b5398cf76b3dc7bd4f17d8db85ed2066b8c49", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/wwnana/shopping
202
FILENAME: AdminServlet.java
0.256832
package shopping.admin.web.servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import shopping.admin.domain.Admin; import shopping.admin.service.AdminService; import cn.itcast.commons.CommonUtils; import cn.itcast.servlet.BaseServlet; @WebServlet("/AdminServlet") public class AdminServlet extends BaseServlet { private static final long serialVersionUID = 1L; private AdminService adminService = new AdminService(); //登录后台 public String login(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Admin form = CommonUtils.toBean(request.getParameterMap(), Admin.class); Admin admin = adminService.login(form); if(admin == null){ request.setAttribute("msg", "用户名或者密码错误!"); return "f:/adminjsps/login.jsp"; } request.getSession().setAttribute("admin", admin); return "r:/adminjsps/admin/index.jsp"; } }
00b92e35-a944-4029-af92-8ad5edfb235b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-13 21:54:46", "repo_name": "ddevic1/VapourwareBackend", "sub_path": "/VapourwareBE/src/main/java/com/example/VapourwareBE/Entities/TechnologyType.java", "file_name": "TechnologyType.java", "file_ext": "java", "file_size_in_byte": 968, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "e1e734f5e55b1f7e8b638fd539db2b67cca601af", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ddevic1/VapourwareBackend
186
FILENAME: TechnologyType.java
0.199308
package com.example.VapourwareBE.Entities; import javax.persistence.*; import java.io.Serializable; @Entity @Table(name="technology_type") public class TechnologyType implements Serializable { @Id @GeneratedValue(strategy= GenerationType.IDENTITY) private Long technologyTypeId; private String name; public TechnologyType() { } public TechnologyType(String name) { this.name = name; } public Long gettechnologyTypeId() { return technologyTypeId; } public void settechnologyTypeId(Long technologyTypeId) { this.technologyTypeId = technologyTypeId; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { return "TechnologyType{" + "technologyTypeId=" + technologyTypeId + ", name='" + name + '\'' + '}'; } }
d61aa3fa-59aa-4675-b5d8-2189438c67b3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-07-14 04:28:41", "repo_name": "abhidesikan/Interview-prep", "sub_path": "/src/main/java/com/abhidesikan/interviewprep/careercup/RemoveSortedValues.java", "file_name": "RemoveSortedValues.java", "file_ext": "java", "file_size_in_byte": 986, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "110c9dd7f39f3d3835745336b22e6b9acd28220f", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/abhidesikan/Interview-prep
251
FILENAME: RemoveSortedValues.java
0.274351
package com.abhidesikan.interviewprep.careercup; import java.util.Arrays; /** * Created by abhidesikan on 4/25/17. */ public class RemoveSortedValues { public static void removeValue(int arr[], int m) { int size = arr.length; int cur = 0; int cur_ele = -1; int count = 0; for(int i=0; i<size; i++) { System.out.println(cur_ele + " cur_ele " + i); if(cur_ele != arr[i]) { cur_ele = arr[i]; count = 0; } if(cur_ele == arr[i] && count < Math.min(m, 2)) { System.out.println(" in here"); count++; arr[cur] = arr[i]; cur++; } } for(int i=cur; i<size; i++) { arr[i] = 0; } System.out.println(Arrays.toString(arr)); } public static void main(String args[]) { int [] arr = {2,2,2,2,3}; removeValue(arr, 2); } }
07033932-6c52-4e06-95d3-1c7b148db81e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-06 03:48:30", "repo_name": "17610713916/myRepository", "sub_path": "/src/main/java/com/mozat/jsonTojava/FileUtils.java", "file_name": "FileUtils.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "ce1e69ded422ba2c3e9ce6bf5badaf7d0783fdfb", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/17610713916/myRepository
191
FILENAME: FileUtils.java
0.255344
package com.mozat.jsonTojava; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; public class FileUtils { public static List<String> ReadFile(String Path){ BufferedReader reader = null; List<String> laststr = new ArrayList<String>(); try{ FileInputStream fileInputStream = new FileInputStream(Path); InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8"); reader = new BufferedReader(inputStreamReader); String tempString = null; while((tempString = reader.readLine()) != null){ laststr.add(tempString); } reader.close(); }catch(IOException e){ e.printStackTrace(); }finally{ if(reader != null){ try { reader.close(); } catch (IOException e) { e.printStackTrace(); } } } return laststr; } }
7a890eff-6c5e-4214-8266-2138b9bb3ade
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-01-13 07:43:19", "repo_name": "xy7/report-web", "sub_path": "/src/test/java/com/seasun/report/controller/TableControllerTest.java", "file_name": "TableControllerTest.java", "file_ext": "java", "file_size_in_byte": 1010, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "2d437a13afa61a6d1363ef6d86cb1a4697d8ce26", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xy7/report-web
197
FILENAME: TableControllerTest.java
0.255344
package com.seasun.report.controller; import static org.junit.Assert.fail; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.seasun.report.ReportWebApp; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = ReportWebApp.class) public class TableControllerTest { @Autowired private JdbcTemplate jdbc; //@Test public void test() { System.out.println(jdbc.queryForList("select * from test")); System.out.println(jdbc.queryForList("select COLUMN_NAME, COLUMN_COMMENT from information_schema.columns where table_name='test'") ); System.out.println(jdbc.queryForList("select TABLE_NAME, TABLE_COMMENT from information_schema.tables where table_type = 'BASE TABLE' and TABLE_SCHEMA='test'") ); } }
36ec8a7f-8ea2-4609-9b7a-ab14b1e65c18
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-08-19 17:50:27", "repo_name": "Sewill/Hibernate", "sub_path": "/src/main.java", "file_name": "main.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "74fdb04ff6ca295cbbad8c9e3ca8f2087b6df543", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Sewill/Hibernate
217
FILENAME: main.java
0.264358
import ManyToOne.HibernateUtil.HibernateUtil; import org.hibernate.Session; /** * Created by savva on 07.07.2015. */ public class main { public static void main(String[] args) { Session session = HibernateUtil.getSession(); // Phone phone = (Phone) session.createCriteria(Phone.class).add(Restrictions.eq("id", 1)).uniqueResult(); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } // Hibernate.initialize(phone.getPeople()); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } // People people = new People(); // people.setFirstName("Иванов"); // people.setLastName("Иван"); // people.setMiddleName("Иванович"); // people.setYear(21); // // SQLStore.create(people); // SQLStore.delete(4); System.exit(-1); } }
47dc2f86-da37-4c52-8045-d725754e3802
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-12-11T02:14:59", "repo_name": "Aleshsparrow/Portfolio-Assignment", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1198, "line_count": 32, "lang": "en", "doc_type": "text", "blob_id": "c530e6d5e8d8c0fe6aed5e75e65e4d7f50275b03", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Aleshsparrow/Portfolio-Assignment
271
FILENAME: README.md
0.229535
# Portfolio-Assignment ## About the project. * This project is aimed at giving a glimpse of my web-development abilities to potential employers and/or clients. I made the design on this project very simple and concise but yet compelling anyone that sees it to want to see more of my projects. I started out by sketching my intended design on a notepad and adding all the major components and the correct tags to use. I wrote the codes for my index.html file first then wrote the code for the style.css after. Since all three pages have the same layout, I used my index.html code as basis for the other two html files (portfolio.html and contact.html) and used the same style sheet for all three html files. Link to the live website can be found in the contact section. ## Built with * VScode ## Getting stared * All you need to view this project is a web browser. ## Usage * To share my contact information with potential clients and/or empoyers. ## Contact * Segun Alesinloye * segunalesh@gmail.com * Project link: https://aleshsparrow.github.io/Portfolio-Assignment/ * Github repo link: https://github.com/Aleshsparrow ## Acknowledgement * Google fonts * Reset CSS
e57967ae-7326-4d91-a59d-bc8fa2ea09fc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-24 05:39:13", "repo_name": "mochenyu/Accounting", "sub_path": "/app/src/main/java/com/example/lenovo/accounting/AccountInItem.java", "file_name": "AccountInItem.java", "file_ext": "java", "file_size_in_byte": 1003, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "a3f656df93aabab093b186f31db491d01daec1b8", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/mochenyu/Accounting
245
FILENAME: AccountInItem.java
0.261331
package com.example.lenovo.accounting; public class AccountInItem { private int id; private String curMark; private String curIn; private String curDate; public AccountInItem() { this.curMark = ""; this.curIn = ""; this.curDate = ""; } public AccountInItem(String curMark, String curIn, String curDate) { this.curMark = curMark; this.curIn =curIn; this.curDate = curDate; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getCurMark() { return curMark; } public void setCurMark(String curMark) { this.curMark = curMark; } public String getCurIn() { return curIn; } public void setCurIn(String curIn) { this.curIn = curIn; } public String getCurDate() { return curDate; } public void setCurDate(String curDate) { this.curDate = curDate; } }
55704fc6-5dca-4928-9a56-4a44cc49904e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-03 06:59:35", "repo_name": "itdfq/cotton", "sub_path": "/src/dfq/web/servlet/FindCotton_NewsServlet.java", "file_name": "FindCotton_NewsServlet.java", "file_ext": "java", "file_size_in_byte": 1140, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "6b84d7e89f315aec46315804cf6f09ef7af36481", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/itdfq/cotton
203
FILENAME: FindCotton_NewsServlet.java
0.261331
package dfq.web.servlet; import dfq.daomain.Cotton_News; import dfq.service.Cotton_NewService; import dfq.service.impl.Cotton_NewServiceImpl; 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; @WebServlet("/findCotton_NewsServlet") public class FindCotton_NewsServlet extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //获取id String id =request.getParameter("id"); Cotton_NewService service2 = new Cotton_NewServiceImpl(); Cotton_News cn = service2.findCotton_NewsById(id); request.setAttribute("cn",cn); System.out.println(cn); request.getRequestDispatcher("/updateCotton_News.jsp").forward(request,response); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doPost(request, response); } }
670321ea-9506-41ef-984f-05e23af75f15
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-01-13T04:11:53", "repo_name": "JweyTan/test5", "sub_path": "/readme.md", "file_name": "readme.md", "file_ext": "md", "file_size_in_byte": 1056, "line_count": 42, "lang": "en", "doc_type": "text", "blob_id": "b029d1b7e8e8edd7aafa7c1ce24ad485da445ca7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JweyTan/test5
250
FILENAME: readme.md
0.2227
# MSIG Webpack Build This is a webpack front-end build system with babel, twig and less. It comes with auto-reload for development and postcss for production builds. ### Installation This requires [Node.js](https://nodejs.org/) to run. The version should be greater than 10. Install all the dependencies. ```sh $ npm install ``` To run a development server ```sh $ npm run dev ``` To build for production ```sh $ npm run build ``` To deploy to the hosting ```sh $ npm run build $ firebase deploy --only hosting ``` Note: Firebase needs `firebase tools` to be installed. Please install and login with your GrowthOps email. Once the the site is deployed to firebase, it will provide you the link to view it. ### What the Production build does - It bundles all the JS and CSS into their one file, respectively. - It minifies the CSS and JS. This can be turned off if needed by configuring `webpack.prod.js`. - It builds the twig templates into HTML - It also builds the SVG icon sprite map for all the icons placed in the icons folder"# test2"
8f948d8b-d67a-4acf-b46d-5e9520b3e65b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-27 07:40:34", "repo_name": "zhangliangLeon/AndroidLearning", "sub_path": "/app/src/main/java/com/example/myapplication/FragmentLearning_new/FragmentMainActivity.java", "file_name": "FragmentMainActivity.java", "file_ext": "java", "file_size_in_byte": 1194, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "aab858b30565b3c46e9721f697ab7d58835c479a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zhangliangLeon/AndroidLearning
185
FILENAME: FragmentMainActivity.java
0.242206
package com.example.myapplication.FragmentLearning_new; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.FragmentManager; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import com.example.myapplication.R; public class FragmentMainActivity extends AppCompatActivity { Button button; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_fragment_main); FragmentManager manager = getSupportFragmentManager(); manager.beginTransaction().add(R.id.LeftFragmentArea,new FragmentLeft()).commit(); } @Override protected void onPostResume() { super.onPostResume(); button = findViewById(R.id.FragmentLeftButton); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { FragmentManager manager = getSupportFragmentManager(); manager.beginTransaction().add(R.id.DetailFragmentArea,new FragmentRight()).commit(); } }); } }
6e9e83e5-1147-4e1e-807d-3c09db97176f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-24 11:14:41", "repo_name": "blinkingso/MySimpleRpc", "sub_path": "/src/main/java/pojo/RequestData.java", "file_name": "RequestData.java", "file_ext": "java", "file_size_in_byte": 1026, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "49901eface5860a83d15055c32f8a94759508c8a", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/blinkingso/MySimpleRpc
212
FILENAME: RequestData.java
0.200558
package pojo; import java.io.Serializable; /** * 接口基础参数 * * @author andrew * @date 2019/03/24 */ public class RequestData implements Serializable { private String interfaceName; private String methodName; private Class<?>[] parameterTypes; private Object[] parameters; public String getInterfaceName() { return interfaceName; } public void setInterfaceName(String interfaceName) { this.interfaceName = interfaceName; } public String getMethodName() { return methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } public Class<?>[] getParameterTypes() { return parameterTypes; } public void setParameterTypes(Class<?>[] parameterTypes) { this.parameterTypes = parameterTypes; } public Object[] getParameters() { return parameters; } public void setParameters(Object[] parameters) { this.parameters = parameters; } }
29c911ee-5a88-4889-857e-3ac5b8e8e6a2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-31 10:31:50", "repo_name": "LateralView/android-base-project", "sub_path": "/app/src/main/java/co/lateralview/myapp/infraestructure/manager/SocialManager.java", "file_name": "SocialManager.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "41fa4be870dd4e470aa1fce1377d922ea4fe3dcc", "star_events_count": 30, "fork_events_count": 12, "src_encoding": "UTF-8"}
https://github.com/LateralView/android-base-project
212
FILENAME: SocialManager.java
0.250913
package co.lateralview.myapp.infraestructure.manager; import android.app.Activity; import android.content.Intent; import android.graphics.Bitmap; import android.net.Uri; import android.support.v4.app.ShareCompat; import co.lateralview.myapp.infraestructure.manager.implementation.FileManagerImpl; public class SocialManager { private FileManagerImpl mFileManager; public SocialManager(FileManagerImpl fileManager) { mFileManager = fileManager; } public void shareData(Activity activity, String text) { Intent shareIntent = ShareCompat.IntentBuilder.from(activity) .setType("text/plain") .setText(text) .getIntent(); activity.startActivity(shareIntent); } public void shareData(Activity activity, String text, Bitmap image) { Intent shareIntent = ShareCompat.IntentBuilder.from(activity) .setType("image/jpeg") .setText(text) .setStream(Uri.parse(mFileManager.savePhotoToInternalStorage(image))) .getIntent(); activity.startActivity(shareIntent); } }
a0f9c620-46ee-433c-9b88-fc393f829fe4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-08 03:04:57", "repo_name": "ngocbichtran0296/MediaPlayerDemo", "sub_path": "/app/src/main/java/com/ngocbich/mediaplayerdemo/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1198, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "94df030efe477e9e98fe2a4b591b0a6b878c801e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ngocbichtran0296/MediaPlayerDemo
194
FILENAME: MainActivity.java
0.199308
package com.ngocbich.mediaplayerdemo; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class MainActivity extends AppCompatActivity { Button btSignIn,btSignUp; TextView slogan; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); btSignIn=findViewById(R.id.btSignIn); btSignUp=findViewById(R.id.btSignUp); slogan=findViewById(R.id.slogan); btSignUp.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent=new Intent(getApplicationContext(),SignUp.class); startActivity(intent); } }); btSignIn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent=new Intent(getApplicationContext(),SignIn.class); startActivity(intent); } }); } }
9ec59ee9-528d-44c9-9848-55fc8768a85a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-09-15 03:57:05", "repo_name": "Smileyes/CodeLearning", "sub_path": "/JavaSE/TestSwing/src/TestMenu.java", "file_name": "TestMenu.java", "file_ext": "java", "file_size_in_byte": 1008, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "248f15325ed3d6ff40e4569bc954e0409002a6a8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "GB18030"}
https://github.com/Smileyes/CodeLearning
243
FILENAME: TestMenu.java
0.256832
import javax.swing.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class TestMenu { private static JFrame frame = new JFrame("记事本"); private static FileDialog fd = new FileDialog(frame, "请打开文件", FileDialog.LOAD); public static void main(String[] args) { JScrollPane jsPanel = new JScrollPane(); JTextArea text = new JTextArea(15,15); text.setLineWrap(true); JMenuBar bar = new JMenuBar(); frame.add(bar, BorderLayout.NORTH); JMenu fileMenu = new JMenu("打开"); JMenu test = new JMenu("测试"); JMenuItem openMenu = new JMenuItem("打开文件"); openMenu.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { fd.setVisible(true); } }); bar.add(fileMenu); fileMenu.add(openMenu); fileMenu.add(test); JMenuItem ok = new JMenuItem("复合菜单"); test.add(ok); frame.setVisible(true); jsPanel.add(text); /* frame.add(text);*/ frame.add(jsPanel); frame.pack(); } }
d1445bd2-74eb-4ac3-830a-3b93a9b4806e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-06-24T10:11:54", "repo_name": "GrimLink/magento2-icon-packs", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1137, "line_count": 38, "lang": "en", "doc_type": "text", "blob_id": "a9dacd406f14b74b9f23cc5b7be80bf4d7baab7d", "star_events_count": 11, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/GrimLink/magento2-icon-packs
307
FILENAME: README.md
0.208179
# Magento2 icon packs Replace the default Magento2 Blank or Luma icons with any other popular icon frameworks. ![Material icon pack preview](./preview.png) ## How to use Copy your icon pack of choice to your theme in the `web/fonts`. And change/add the following variables to load your new icons instead. ```less @icons__font-path: "@{baseDir}fonts/M2-Luma-Material/M2-Luma-Material"; @icons__font-name: "M2-Luma-Material"; ``` _Example of M2-Luma-Material import_ Also [see the wiki](https://github.com/GrimLink/magento2-icon-packs/wiki) for; - How to use the extra 4 icons (bag, phone, sort up and sort down) - How to replace it with your own icon pack. ## Icon packs The following icon packs are available in this repo - The default Magento 2 icons - [Material Icons](https://github.com/google/material-design-icons) - [Bootstrap 5 Icons](https://github.com/twbs/icons) - [Feather Icons](https://github.com/feathericons/feather) (Luma only) - [Ikonate](https://github.com/mikolajdobrucki/ikonate) (Luma only) The following icon packs are planned to be added - [FontAwesome 5](https://github.com/FortAwesome/Font-Awesome)
74d11719-b9ae-4a37-9c90-95605bd3f3b2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-11-01 09:24:53", "repo_name": "keitsi/maven-springmvc-hibernate-mysql-demo", "sub_path": "/src/main/java/com/demo/service/UserInfoServiceImpl.java", "file_name": "UserInfoServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1197, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "62d9a9e5c4fc9dd677339d2cfa0a1900816060dc", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/keitsi/maven-springmvc-hibernate-mysql-demo
241
FILENAME: UserInfoServiceImpl.java
0.292595
package com.demo.service; /** * Created by keitsi on 16-10-21. */ import com.demo.dao.UserInfoDao; import com.demo.entity.UserInfoEntity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; @Service public class UserInfoServiceImpl implements UserInfoService { private UserInfoDao userInfoDao; public void setUserInfoDao(UserInfoDao userInfoDao) { this.userInfoDao = userInfoDao; } @Transactional public void add(UserInfoEntity user) { this.userInfoDao.add(user); } @Transactional public void update(UserInfoEntity user) { this.userInfoDao.update(user); } @Transactional public void remove(int id) { this.userInfoDao.remove(id); } @Transactional public List<UserInfoEntity> getAll() { return this.userInfoDao.getAll(); } @Transactional public UserInfoEntity getById(int id) { return this.userInfoDao.getById(id); } @Transactional public UserInfoEntity getByName(String name) { return this.userInfoDao.getByName(name); } }
2e0249d4-ba52-43bd-8e94-988d22fcbf8b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-16 12:56:29", "repo_name": "Bnzakir/Calc", "sub_path": "/Kuhn/app/src/main/java/com/example/zakirbaghirov/kuhn/Player.java", "file_name": "Player.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "76f67f685aac84c3db2b175ec5d4dc1d03b7a974", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Bnzakir/Calc
238
FILENAME: Player.java
0.27513
package com.example.zakirbaghirov.kuhn; /** * Created by zakirbaghirov on 25/02/2016. */ public class Player { int playerNumber; int cards; String action; // double regret; double payoff=0; String history; public Player(int playerNumber, int cards){ this.playerNumber = playerNumber; this.cards = cards; //this.history = history; } // public void setAction(String action) // { // this.action = action; // } // // public void setRegret(double regret) // { // this.regret = regret; // } public void setHistory(String history) { if (this.history==null) this.history = history; else this.history += history; } // public String getHistory(){ // return history; // } // // public int getPlayerNumber() // { // return playerNumber; // } // // public String getAction() // { // return action; // } }
41579d1f-fe02-41a0-bdb9-5b2ce8bd5a70
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-05-15 14:48:42", "repo_name": "sthgreat/java_learn", "sub_path": "/base/jdbc_account/jdbcUtils.java", "file_name": "jdbcUtils.java", "file_ext": "java", "file_size_in_byte": 1274, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "fe132506355ce4bd8690e5adc72988e174ed931a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sthgreat/java_learn
272
FILENAME: jdbcUtils.java
0.290981
package Jdbc_connection; import java.sql.Connection; import java.sql.SQLException; import javax.sql.DataSource; import org.junit.Test; import com.mchange.v2.c3p0.ComboPooledDataSource; public class jdbcUtils { private static ComboPooledDataSource dataSource = new ComboPooledDataSource(); private static Connection con = null; //事务专用连接 public static DataSource getDataSource() { return dataSource; } public static Connection getConnection() throws SQLException { if(con!=null) { return con;//已经开启了begintransaction } return dataSource.getConnection(); } public static void BeginTransaction() throws SQLException { /* * 开启事务 */ if(con!=null) throw new SQLException("事务已经开始,请勿重复开启"); con = getConnection(); con.setAutoCommit(false); } public static void commitTransaction() throws SQLException { if(con==null) throw new SQLException("事务并未开启,不能提交"); con.commit(); con.close(); con=null; //事务结束,杀掉连接 } public static void rollbackTransaction() throws SQLException { if(con==null) throw new SQLException("事务并未开启,不能回滚"); con.rollback(); con.close(); con=null; //事务结束,杀掉连接 } }
2b35f17f-d3de-4c79-abec-50222572cf12
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-05-05 08:42:33", "repo_name": "xjw634912817/maple", "sub_path": "/springboot-mybatis/src/main/java/com/maple/springboot/mybatis/controller/ShopController.java", "file_name": "ShopController.java", "file_ext": "java", "file_size_in_byte": 1064, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "692b0d45b130e81445b088f42685a32dc9315a2e", "star_events_count": 3, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xjw634912817/maple
195
FILENAME: ShopController.java
0.261331
package com.maple.springboot.mybatis.controller; import com.google.common.collect.Lists; import com.maple.springboot.mybatis.domain.Shop; import com.maple.springboot.mybatis.domain.XmlPerson; import com.maple.springboot.mybatis.service.IShopService; import com.maple.springboot.mybatis.service.IXmlPersonService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController @RequestMapping("/shop") public class ShopController { @Autowired private IShopService shopService; @RequestMapping("/insert") public int insert(@RequestParam Integer id) { Shop shop = new Shop(); shop.setId(id); shop.setRange(Lists.newArrayList(1,3,5)); return shopService.insert(shop); } @RequestMapping("/findAll") public List<Shop> findAll() { return shopService.selectAll(); } }
b50c7af0-fa73-43c0-8c19-8e7fb5dd79d4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-10 11:43:01", "repo_name": "hzf007/AndroidBaseLib", "sub_path": "/app/src/main/java/com/aspsine/mobi/androidbaselib/adapter/HistoryAdaper.java", "file_name": "HistoryAdaper.java", "file_ext": "java", "file_size_in_byte": 1202, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "d69181ab85500ae24d92d7b1ba2b6372869d4ed9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hzf007/AndroidBaseLib
268
FILENAME: HistoryAdaper.java
0.281406
package com.aspsine.mobi.androidbaselib.adapter; import android.view.View; import com.aspsine.mobi.androidbaselib.R; import com.aspsine.mobi.androidbaselib.entity.SearchM; import com.aspsine.mobi.androidbaselib.presenter.GankSearchPresenter; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import java.util.List; /** * Created by hzf 2017/3/8 0008 on 下午 7:02. * description : */ public class HistoryAdaper extends BaseQuickAdapter<SearchM, BaseViewHolder> { private final GankSearchPresenter mgankSearchPresenter1; public HistoryAdaper(List<SearchM> items, GankSearchPresenter mgankSearchPresenter) { super(R.layout.history_item, items); mgankSearchPresenter1 = mgankSearchPresenter; } @Override protected void convert(BaseViewHolder viewHolder, final SearchM item) { viewHolder.setText(R.id.title, item.getKeyName()); viewHolder.getView(R.id.title).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mgankSearchPresenter1.findContentForGank(item.getKeyName()); } }); } }
1a7556e8-2e6a-49d4-a60f-77d66725d056
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-15 08:51:44", "repo_name": "lassemaatta/temporaljooq", "sub_path": "/src/main/java/fi/lassemaatta/temporaljooq/config/LiquibaseConfig.java", "file_name": "LiquibaseConfig.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 26, "lang": "en", "doc_type": "code", "blob_id": "7dd4c25417d326c4a86663043c1e06cad5d6656b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lassemaatta/temporaljooq
174
FILENAME: LiquibaseConfig.java
0.226784
package fi.lassemaatta.temporaljooq.config; import liquibase.integration.spring.SpringLiquibase; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ResourceLoader; import javax.annotation.Nonnull; import javax.sql.DataSource; @Configuration public class LiquibaseConfig { private static final String CHANGELOG_LOCATION = "classpath:migrations/db.changelog.xml"; @Bean public SpringLiquibase liquibase(@Nonnull @Qualifier("dataSource") final DataSource dataSource, @Nonnull final ResourceLoader resourceLoader) { final SpringLiquibase liquibase = new SpringLiquibase(); liquibase.setChangeLog(CHANGELOG_LOCATION); liquibase.setResourceLoader(resourceLoader); liquibase.setDataSource(dataSource); return liquibase; } }
b401aef2-8591-4e02-b000-9c6b722d59b5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-03-19 08:09:47", "repo_name": "lfeagan/LET", "sub_path": "/net.vectorcomputing.ui/src/net/vectorcomputing/ui/ProjectUtils.java", "file_name": "ProjectUtils.java", "file_ext": "java", "file_size_in_byte": 1013, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "3eae9a5e5ad3983d51cef96294022a2dcea61418", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lfeagan/LET
232
FILENAME: ProjectUtils.java
0.26971
package net.vectorcomputing.ui; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.viewers.IStructuredSelection; public class ProjectUtils { public static IProject getContainingProject(IStructuredSelection selection) { if (selection != null && !selection.isEmpty()) { Object selectedElement = selection.getFirstElement(); if (selectedElement instanceof IAdaptable) { IAdaptable adaptable = (IAdaptable) selectedElement; IResource resource = (IResource) adaptable.getAdapter(IResource.class); return getContainingProject(resource); } } return null; } public static IProject getContainingProject(IResource resource) { if (resource != null && resource.getType() != IResource.ROOT) { while (resource.getType() != IResource.PROJECT) { resource = resource.getParent(); } if (resource != null) { return (IProject) resource; } } return null; } }
ac716664-523b-4481-a752-839a43002ee0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-01-06 10:07:26", "repo_name": "tchooParabot/IKrabKiller", "sub_path": "/Combat/src/Eat.java", "file_name": "Eat.java", "file_ext": "java", "file_size_in_byte": 1019, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "f5e1ea9bfe7cd78bca7014b1a6875df758e6bcd6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/tchooParabot/IKrabKiller
277
FILENAME: Eat.java
0.286169
import org.parabot.environment.api.utils.Time; import org.parabot.environment.scripts.framework.SleepCondition; import org.parabot.environment.scripts.framework.Strategy; import org.rev317.min.api.methods.Inventory; import org.rev317.min.api.methods.Menu; import org.rev317.min.api.methods.Players; import org.rev317.min.api.methods.Skill; public class Eat implements Strategy { final int Food = 386; int hp = Skill.HITPOINTS.getLevel(); int halfLife = hp/2; public boolean activate() { return Inventory.getCount(Food) != 0 && Players.getMyPlayer().getHealth() < halfLife; } public void execute() { for (int i = 0; i < Inventory.getItems(Food).length && Players.getMyPlayer().getHealth() < 50; i++) { Menu.sendAction(74, 385, Inventory.getItems(Food)[i].getSlot(), 3214); Time.sleep(new SleepCondition() { @Override public boolean isValid() { return Players.getMyPlayer().getHealth() > halfLife; } }, 2000); } } }
7e8350a3-73bf-4380-9117-b94b379942f3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-03 19:13:16", "repo_name": "nvcompsci/breakoutGame", "sub_path": "/src/march/madness/bracket/picker/Team.java", "file_name": "Team.java", "file_ext": "java", "file_size_in_byte": 1057, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "2a35c1aed1ed62044232c322a7d3aa95cd880821", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nvcompsci/breakoutGame
225
FILENAME: Team.java
0.233706
/* * 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 march.madness.bracket.picker; /** * * @author jword */ public class Team { //Fields private String name; private int seed; private String region; //Constructors public Team(String name, int seed, String region) { this.name = name; this.seed = seed; this.region = region; System.out.println(name + " created"); } //Getters and Setters public String getName() { return name; } public void setName(String name) { this.name = name; } public int getSeed() { return seed; } public void setSeed(int seed) { this.seed = seed; } public String getRegion() { return region; } public void setRegion(String region) { this.region = region; } //Methods }
6e9485ba-0d63-4946-9fb0-6437ec70b7a4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-01-15 15:02:12", "repo_name": "RicardoVarzim/ArmazemServer", "sub_path": "/src/server/noteHandler.java", "file_name": "noteHandler.java", "file_ext": "java", "file_size_in_byte": 1101, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "81c544cd92e9b71eef2381b931de81eb5368a9e7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RicardoVarzim/ArmazemServer
215
FILENAME: noteHandler.java
0.292595
/* * 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 server; import BusinessLayer.Facade; import java.util.ArrayList; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author Ricardo */ public class noteHandler implements Runnable { private Facade facade; private ArrayList<ClientWorker> clientes; public noteHandler(Facade f){ this.facade = f; this.clientes = new ArrayList<ClientWorker>(); } public void addClient(ClientWorker client){ clientes.add(client); } @Override public void run() { ArrayList<String> notes; while(true){ try { Thread.sleep(2000); notes = facade.listar_notificacoes(); for(ClientWorker cw :clientes) cw.sendNotification(notes); } catch (InterruptedException ex) { } } } }
44af6a00-8c1c-46a3-9f3a-c73d9d904fbe
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-30 10:09:01", "repo_name": "Kadphol/basic-java-test", "sub_path": "/Potter/src/main/java/com/example/potter/book/BookController.java", "file_name": "BookController.java", "file_ext": "java", "file_size_in_byte": 1056, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "e7ad7d53be335c06387826aaf468feb2507ea666", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Kadphol/basic-java-test
206
FILENAME: BookController.java
0.283781
package com.example.potter.book; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController public class BookController { @Autowired private BookService bookService; @GetMapping("/books/{id}") public BookResponse getBookByID(@PathVariable String id) throws BookNotFoundException { int _id; try { _id = Integer.parseInt(id); } catch (NumberFormatException e) { throw new NumberFormatException("Invalid id: " + id); } return bookService.getBook(_id); } @GetMapping("/books") public List<BookResponse> getAllBooks() throws BookNotFoundException { return bookService.getAllBook(); } @PostMapping("/book") public Book addBook(@RequestBody Book book) { return bookService.addBook(book); } @PostMapping("/order") public double orderBook(@RequestBody List<BookRequest> order) { return bookService.orderBook(order); } }
e012800f-4eb5-4782-a6b2-d73343b10911
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-09-21T18:07:22", "repo_name": "MyPureCloud/platform-client-sdk-ruby", "sub_path": "/build/docs/MessageInfo.md", "file_name": "MessageInfo.md", "file_ext": "md", "file_size_in_byte": 1140, "line_count": 25, "lang": "en", "doc_type": "text", "blob_id": "643e8ceb2c30b34118300460ac2a812e528ce49c", "star_events_count": 1, "fork_events_count": 7, "src_encoding": "UTF-8"}
https://github.com/MyPureCloud/platform-client-sdk-ruby
281
FILENAME: MessageInfo.md
0.293404
--- title: MessageInfo --- :::error **The Ruby SDK is deprecated as of 9/16/2020** The Genesys Cloud Ruby SDK (v96.0.0) will be frozen at its current version level. Any new enhancements to our API or bug fixes will not be backported. If you do need to take advantage of new features or bug fixes outside the Genesys Cloud Ruby SDK, you will need to use the Genesys Cloud REST endpoints directly. More information can be found in the [Official Announcement](https://developer.mypurecloud.com/forum/t/announcement-genesys-cloud-ruby-sdk-end-of-life/8850). ::: ## PureCloud::MessageInfo ## Properties |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| | **localizable_message_code** | **String** | Key that can be used to localize the message. | [optional] | | **message** | **String** | Description of the message. | [optional] | | **message_with_params** | **String** | Message with template fields for variable replacement. | [optional] | | **message_params** | **Hash&lt;String, String&gt;** | Map with fields for variable replacement. | [optional] | {: class="table table-striped"}
1270e1df-59c5-4712-9523-8171216424ac
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-12-13 09:44:26", "repo_name": "yehuijifeng/YehuiUtils", "sub_path": "/YehuiUtils(outdate)/app/src/main/java/com/yehui/utils/fragment/ViewPagerFive.java", "file_name": "ViewPagerFive.java", "file_ext": "java", "file_size_in_byte": 1007, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "36649be98cc4255162b97ce1e067e6b10a12e12f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yehuijifeng/YehuiUtils
213
FILENAME: ViewPagerFive.java
0.206894
package com.yehui.utils.fragment; import android.view.View; import android.widget.Button; import android.widget.Toast; import com.yehui.utils.R; import com.yehui.utils.fragment.base.BaseFragment; /** * Created by yehuijifeng * on 2015/12/3. * 测试fragment */ public class ViewPagerFive extends BaseFragment { private Button button_text; @Override protected int setFragmentLayoutId() { return R.layout.layout_test; } @Override protected String setTitleText() { return "baseFragment应用"; } @Override protected void initView(View parentView) { button_text = (Button) parentView.findViewById(R.id.button_text); button_text.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Toast.makeText(getActivity(), "fragment中的点击事件", Toast.LENGTH_LONG).show(); } }); } @Override protected void initData() { } }
569a630e-d018-4d07-ad67-ea7ca0eb277b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-25 13:30:52", "repo_name": "kamilSzelc/projekt2", "sub_path": "/src/pl/sdacademy/tree/Node.java", "file_name": "Node.java", "file_ext": "java", "file_size_in_byte": 1079, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "1f9a13f941150345e4e98872eeeb352f7e2cd84f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kamilSzelc/projekt2
218
FILENAME: Node.java
0.250913
package pl.sdacademy.tree; public class Node { private Node parent; private Node left; private Node right; private Integer value; public Node(Integer value, Node parent) { this.value = value; this.parent = parent; } public Integer getValue() { return value; } public void add(Node node) { Node actual = this; Node parent = null; while (actual != null) { parent = actual; if(actual.value > node.getValue()) { actual = actual.left; } else { actual = actual.right; } } if (parent.value > node.getValue()) { parent.left = node; parent.left.parent = parent; } else { parent.right = node; parent.right.parent = parent; } } @Override public String toString() { return String.valueOf(value); } public Node getLeft() { return left; } public Node getRight() { return right; } }
84633fc2-16ae-444c-b05f-33e9931ffc22
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-19 09:12:18", "repo_name": "dsfgis/MyRepository", "sub_path": "/src/main/java/dsf/online_class/controller/VideoController.java", "file_name": "VideoController.java", "file_ext": "java", "file_size_in_byte": 1198, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "c10a49175c47900d607cdaf653e23a9ece86f03b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dsfgis/MyRepository
232
FILENAME: VideoController.java
0.282988
package dsf.online_class.controller; import dsf.online_class.model.entity.Video; import dsf.online_class.model.entity.VideoBanner; import dsf.online_class.service.VideoService; import dsf.online_class.utils.JsonData; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController @RequestMapping(value = "api/v1/pub/video") public class VideoController { @Autowired private VideoService videoService; @RequestMapping(value = "listvideo") public JsonData listVideo(){ List<Video> lstVideo = videoService.listVideo(); return JsonData.buildSuccess(lstVideo); } @RequestMapping(value = "listvideobanner") public JsonData listVideoBanner(){ List<VideoBanner> lstVideoBanner = videoService.listVideoBanner(); return JsonData.buildSuccess(lstVideoBanner); } @RequestMapping(value = "findVideoById") public JsonData findVideoById(int video_id){ Video video = videoService.findDetailById(video_id); return JsonData.buildSuccess(video); } }
cfe5d4df-37ba-4f56-82e0-fe360e826068
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-07 19:06:03", "repo_name": "Bedelo/GestiBank", "sub_path": "/app/src/main/java/com/sip/gestibank/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 999, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "13fb9f37bd756b5737382e63812ef288450c3567", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Bedelo/GestiBank
172
FILENAME: MainActivity.java
0.212069
package com.sip.gestibank; import androidx.appcompat.app.AppCompatActivity; import android.content.Context; import android.content.Intent; import android.view.View; import android.os.Bundle; import com.sip.gestibank.model.User; public class MainActivity extends AppCompatActivity { public static User logger = new User(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } public void callConversionPage(View view){ Intent i = new Intent(getApplicationContext(), Conversion.class); startActivity(i); } public void callCreationPage(View view){ Intent i = new Intent(getApplicationContext(), CreationCompte.class); startActivity(i); } public void callConnexionPage(View view){ Intent i = new Intent(getApplicationContext(), ConnexionCompte.class); startActivity(i); } }
dc23dbee-f521-46d8-bdc3-a57b607eb163
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-24T10:27:18", "repo_name": "daiwei-dave/SSM", "sub_path": "/src/test/java/org/seckill/service/ItemsServiceImplTest.java", "file_name": "ItemsServiceImplTest.java", "file_ext": "java", "file_size_in_byte": 1111, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "9c77994f20b7ea862ef2011bbae1785d460dff59", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/daiwei-dave/SSM
236
FILENAME: ItemsServiceImplTest.java
0.275909
package org.seckill.service; import org.junit.Test; import org.junit.runner.RunWith; import org.seckill.entity.Items; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.util.List; import java.util.Set; import static org.junit.Assert.*; /** * Created by daiwei on 2017/5/14. */ @RunWith(SpringJUnit4ClassRunner.class) // 加载spring容器 @ContextConfiguration({ "classpath:spring/spring-dao.xml", "classpath:spring/spring-service.xml" }) public class ItemsServiceImplTest { // 定义logger变量 private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired private ItemsService itemsService; @Test public void getItemsByCart() throws Exception { System.out.println("hah"); Set<Items> items = itemsService.getItemsByCart(1); for (Items i:items) { System.out.println(i.toString()); } } }
44f65a78-285f-458b-955a-a3e544381077
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-14 16:36:51", "repo_name": "miguelhbrito/zupclitest", "sub_path": "/src/main/java/com/ZupChallengeCovid/CLIApp.java", "file_name": "CLIApp.java", "file_ext": "java", "file_size_in_byte": 1040, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "6027f50786531e2ccbd66f8a9139de03c3190276", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/miguelhbrito/zupclitest
214
FILENAME: CLIApp.java
0.272799
package com.ZupChallengeCovid; public class CLIApp { public final String HELP_MESSAGE = "To use the CLI program type \"covid19 country {country name}\""; ArgsParameters argsParameters = new ArgsParameters(); CovidInfo covidInfo = new CovidInfo(); public String runCLI(String[] args) { String country; if (args.length > 0) { if ("help".equals(args[0])) { return HELP_MESSAGE; } if ("country".equals(args[0])) { country = argsParameters.processPassedArgs(args); if (country != null && country.length() > 0) { return covidInfo.getInfoAboutCovidByCountry(country); } } return HELP_MESSAGE; } return HELP_MESSAGE; } protected void setArgsParameters(ArgsParameters argsParameters) { this.argsParameters = argsParameters; } protected void setCovidInfo(CovidInfo covidInfo) { this.covidInfo = covidInfo; } }
2accb6ef-2416-4d34-b088-ecf16f5d1be0
{"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/AttributePath.java", "file_name": "AttributePath.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "e23ae61ed93381363357c7549e9795c7c7c50e25", "star_events_count": 35, "fork_events_count": 12, "src_encoding": "UTF-8"}
https://github.com/evbox/station-simulator
234
FILENAME: AttributePath.java
0.268941
package com.evbox.everon.ocpp.simulator.station.component.variable.attribute; import com.evbox.everon.ocpp.v201.message.centralserver.Attribute; import com.evbox.everon.ocpp.v201.message.centralserver.Component; import com.evbox.everon.ocpp.v201.message.centralserver.Variable; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Value; /** * Contains all data necessary to access arbitrary variable's attribute of the station */ @Value @Builder @AllArgsConstructor public class AttributePath { /** * Contains name of component, component's instance name, EVSE ID, Connector ID */ private Component component; /** * Contains name of variable, variable's instance name */ private Variable variable; /** * Contains type of variable's attribute, such as Actual, MinSet, MaxSet, Target */ private AttributeType attributeType; public AttributePath(Component component, Variable variable, Attribute attributeType) { this.component = component; this.variable = variable; this.attributeType = AttributeType.from(attributeType); } }
f3d3ea67-c6c9-4e11-8886-e5639f421062
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-18 16:02:37", "repo_name": "SergDerbst/tmt-backend", "sub_path": "/tmt-parent/tmt-parent/tmt-web/src/main/java/com/toomanythoughts/tmt/web/logic/content/article/ArticleSection.java", "file_name": "ArticleSection.java", "file_ext": "java", "file_size_in_byte": 1012, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "29ddbbeef2eceaf854182cc8fe91c4649362ec8d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/SergDerbst/tmt-backend
219
FILENAME: ArticleSection.java
0.235108
package com.toomanythoughts.tmt.web.logic.content.article; import java.util.LinkedList; import java.util.List; import com.toomanythoughts.tmt.commons.layers.logic.model.EpicPojo; /** * A section represents a set of paragraphs with a header as subheading within a chapter. * It serves to further structure an article's chapter. Any change in its header or structure * of paragraphs, that is their number or order, will cause a minor version update of the * article. A minor version update will only be published to followers. * * @author Sergio Weigel * */ public class ArticleSection extends EpicPojo { private final List<ArticleParagraph> paragraphs = new LinkedList<>(); private String subheading; public ArticleSection(final String header) { this.subheading = header; } public List<ArticleParagraph> getParagraphs() { return this.paragraphs; } public String getSubheading() { return this.subheading; } public void setSubheading(String header) { this.subheading = header; } }
355cd627-4063-4331-8f6e-0511a5083a56
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-08-05T23:00:47", "repo_name": "eenfeeneet/webnovels-rss-reader", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1197, "line_count": 28, "lang": "en", "doc_type": "text", "blob_id": "a1889fbc21e046517192c65825a3f935c3e64043", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/eenfeeneet/webnovels-rss-reader
285
FILENAME: README.md
0.252384
# WebNoSSer A web novel rss reader. Webnovels are novels/stories that are published on the web. There are many ways to publish a web novel and also a variety of websites that gives authors the platform to post their stories. For e.g Royal Road, Webnovels and Wattpad. Some choose to post their stories on their personal sites. Typically web novels are uploaded in chapters, that can range from 500 to 7000 words long. And chapter uploads depend on the author themselves. Some upload a chapter daily, some every 2 days while some do it monthly. Webnosser is a place where user can sign up for an account and add a novels ress feed to the list. That way novel readers can check on updates on their favorite novels all in one place. ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. ### Prerequisites Clone into your local ``` npm init npm install ``` ## Built With * [Node.js] ## Authors * **M Hafiz** - *Initial work* - [Eenfeeneet](https://github.com/eenfeeneet) ## Acknowledgments * Inspiration - RoyalRoad, Feedly
acd949c3-83fa-4d44-85de-93c6cd45518a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-31 08:49:32", "repo_name": "EnderQIU/bcinvest", "sub_path": "/src/main/java/cn/enderqiu/bcinvestrebuild/app/schedule/ScheduleController.java", "file_name": "ScheduleController.java", "file_ext": "java", "file_size_in_byte": 1017, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "da7f3fb9e8130cb5ff002086baf6bbfdd7e6a353", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/EnderQIU/bcinvest
189
FILENAME: ScheduleController.java
0.210766
package cn.enderqiu.bcinvestrebuild.app.schedule; import cn.enderqiu.bcinvestrebuild.app.schedule.response.ScheduleResultResponse; import io.swagger.annotations.ApiOperation; 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; @RestController @RequestMapping("/api/schedule") public class ScheduleController { @Autowired private ScheduleView view; @RequestMapping(value = "/credit", method = RequestMethod.GET) @ApiOperation("执行检查信用链定时任务") public ScheduleResultResponse checkCreditChain(){ return view.checkCreditChain(); } @RequestMapping(value = "/guaranty", method = RequestMethod.GET) @ApiOperation("执行检查抵押物链定时任务") public ScheduleResultResponse checkGuarantyChain(){ return view.checkGuarantyChain(); } }
6403a183-2835-42ed-82b0-f6884e87d914
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-30 02:39:23", "repo_name": "huangxinqi/JobskyApp", "sub_path": "/program/web/jobsky/src/edu/csu/service/AdminService.java", "file_name": "AdminService.java", "file_ext": "java", "file_size_in_byte": 1137, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "e291a09fd2b025fa3622841a93602efb2ce70e60", "star_events_count": 3, "fork_events_count": 4, "src_encoding": "UTF-8"}
https://github.com/huangxinqi/JobskyApp
227
FILENAME: AdminService.java
0.284576
package edu.csu.service; import edu.csu.bean.AdminBean; import edu.csu.dao.AdminDAO; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import java.util.ArrayList; /** * Created by huangxinqi on 2016/1/17. */ public class AdminService { private AdminDAO adminDAO; public void setAdminDAO(AdminDAO adminDAO) { this.adminDAO = adminDAO; } public void getAdmins(){ for (AdminBean adminBean:(ArrayList<AdminBean>)adminDAO.getAdmins()){ System.out.println(adminBean.getAdminId()); System.out.println(adminBean.getAdminName()); System.out.println(adminBean.getAdminAccount()); System.out.println(adminBean.getAdminPwd()); } } public static void main(String[] args) { ApplicationContext applicationContext=new ClassPathXmlApplicationContext("applicationContext.xml"); System.out.println(applicationContext); AdminService adminService= (AdminService) applicationContext.getBean("adminService"); adminService.getAdmins(); } }
5fdcc389-ba16-4ffe-bf12-ed3295498070
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-08-23T19:32:17", "repo_name": "eudaemonic-one/Lifelong-Learning", "sub_path": "/Golang/Go-go-to-Guide/language-basics/bits-and-pieces/generics.md", "file_name": "generics.md", "file_ext": "md", "file_size_in_byte": 1198, "line_count": 26, "lang": "en", "doc_type": "text", "blob_id": "2ccaf4a17a3f1d88daa53d701dc7050292ff0386", "star_events_count": 43, "fork_events_count": 5, "src_encoding": "UTF-8"}
https://github.com/eudaemonic-one/Lifelong-Learning
257
FILENAME: generics.md
0.290176
# Generics (Alternatives and Workarounds) * Go has some built-in generic data types, such as slices and maps, and some generic functions, such as `append` and `copy` * However, there is **no** mechanism for writing your own ## Find a Well-fitting Interface * Describe the generic behaviour of your data with an interface * The `io.Reader` interface, which represents the read end of a stream of data, is a good example: * many functions take an `io.Reader` as input, * and many data types, including files, network connections, and ciphers, implement this interface ## Use Multiple Functions * If you only need to support a few data types, consider offering a separate function for each type * As an example, the two packages strings and bytes come with pretty much the same set of functions * If this leads to an unmanageable amount of copy and paste, consider using a code generation tool ## Use the Empty Interface * If little is known about the data, consider using the empty interface `interface{}` in combination with type assertions, and possibly also reflection ## Write an Experience Report * If none of these solutions are effective, consider submitting an experience report