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
510e54c6-3812-4fdc-a0b7-6067a50aa445
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-03-26T18:11:21", "repo_name": "atersakyan/Data-Science-Projects", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 984, "line_count": 17, "lang": "en", "doc_type": "text", "blob_id": "27d0ae50f25f3a22dbe3f41e4552c21d0c609689", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/atersakyan/Data-Science-Projects
227
FILENAME: README.md
0.284576
# Repository of Personal Projects - Project blogs can be found on my [Medium](https://medium.com/@atersakyan) - [My LinkedIn Profile](https://www.linkedin.com/in/atersakyan/) ## [AirBnb Price Predictions](https://github.com/atersakyan/Projects/tree/master/MetisProject2) **Examined predictors of AirBnb prices in NYC.** ## [Classification of Marketing Campaign Success](https://github.com/atersakyan/Projects/tree/master/MetisProject3) **Used various classification models to determine whether a customer would respond to a marketing campaign.** ## [Wine Recommendation System](https://github.com/atersakyan/Projects/tree/master/MetisProject4) **Employed NLP topic modeling on wine reviews and created a content-based recommendation system that finds similar, but cheaper wines.** ## [Customer Segmentation with RFM](https://github.com/atersakyan/Projects/tree/master/MetisProject5) **Used RFM analysis, clustering, and time series to segment customers and forecast revenue.**
adcadce0-1acc-4b35-ae0d-0a751db15c39
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-19 09:40:33", "repo_name": "TechnoElf/JDungeons", "sub_path": "/src/com/jhjava/jdungeons/engine/components/GameObjectManager.java", "file_name": "GameObjectManager.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "468cee41f796af4024bd7c6e2e89e724a1e71dd8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/TechnoElf/JDungeons
239
FILENAME: GameObjectManager.java
0.282196
package com.jhjava.jdungeons.engine.components; import com.jhjava.jdungeons.engine.GameContainer; import com.jhjava.jdungeons.engine.render.Renderer; import java.util.ArrayList; public class GameObjectManager { private ArrayList<GameObject> objects = new ArrayList<>(); public void updateObjects(GameContainer gc, float delta) { for(int i = 0; i < objects.size(); i++) { objects.get(i).update(gc, delta); if(!objects.get(i).isEnabled()) { objects.remove(i); } } } public void renderObjects(GameContainer gc, Renderer renderer) { for(int i = 0; i < objects.size(); i++) { objects.get(i).render(gc, renderer); } } public void addObject(GameObject object) { objects.add(object); } public GameObject findObject(String tag) { for(GameObject object : objects) { if(object.getTag().equals(tag)) { return object; } } return null; } public void disposeObjects() { for(GameObject object : objects) { object.dispose(); } } }
c1c6329f-5a93-4832-aa54-ed69245e5838
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-24 10:55:44", "repo_name": "xuedie12369/ordermealsys", "sub_path": "/src/main/java/zsc/ordermealsys/pojo/StorePicWithBLOBs.java", "file_name": "StorePicWithBLOBs.java", "file_ext": "java", "file_size_in_byte": 979, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "c5700ece0c8377a9a0453758dbd4807ab88806a5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xuedie12369/ordermealsys
203
FILENAME: StorePicWithBLOBs.java
0.253861
package zsc.ordermealsys.pojo; import java.util.Date; public class StorePicWithBLOBs extends StorePic { private String environmentPic; private String licensePic; public StorePicWithBLOBs(Integer id, String sellerName, Date createTime, Date updateTime, String environmentPic, String licensePic) { super(id, sellerName, createTime, updateTime); this.environmentPic = environmentPic; this.licensePic = licensePic; } public StorePicWithBLOBs() { super(); } public String getEnvironmentPic() { return environmentPic; } public void setEnvironmentPic(String environmentPic) { this.environmentPic = environmentPic == null ? null : environmentPic.trim(); } public String getLicensePic() { return licensePic; } public void setLicensePic(String licensePic) { this.licensePic = licensePic == null ? null : licensePic.trim(); } }
dc336e5f-fa09-405e-bbf6-c66528c39938
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-10-02T00:22:52", "repo_name": "patondev/empirica-guide", "sub_path": "/WSL/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 971, "line_count": 33, "lang": "en", "doc_type": "text", "blob_id": "ff693e3206ad42f55029a1028c4fce944c6d96b2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/patondev/empirica-guide
238
FILENAME: README.md
0.261331
# Installation * Please refer to this guide to install WSL2. https://docs.microsoft.com/en-us/windows/wsl/install-win10. Don't forget to turn on `Virtual Machine Platform` and `Windows Subsystem for Linux`. ![Turn on feature](screenshots/1.png) * After WSL installation is done, go to App Store, search for Ubuntu 20.04, and install it. ![Ubuntu Installation](screenshots/2.png) * Then, you can launch terminal from there, do some setup. ![Setup](screenshots/3.png) * Install NVM using script. Please refer to this guide: https://tecadmin.net/install-nodejs-with-nvm/ ![NVM Installation](screenshots/4.png) * Continue to meteor installation ![Meteor Installation](screenshots/5.png) * After all installation are done and successful, as stated on https://empirica.ly/docs/quick-start.html. You can issue commands ``` npx create-empirica-app my-experiment cd my-experiment meteor ``` ![Empirica is running](screenshots/6.png)
19288151-ee1f-4388-9c6f-412d7d797c89
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-09-28 16:32:18", "repo_name": "imrana559/travel-planner", "sub_path": "/app/src/main/java/ba/unsa/pmf/planerputovanja/PutovanjeActivity.java", "file_name": "PutovanjeActivity.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "c1243bc53e06f05da64df05b8f81dd2aeb260f22", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/imrana559/travel-planner
216
FILENAME: PutovanjeActivity.java
0.262842
package ba.unsa.pmf.planerputovanja; import android.content.Context; import android.content.Intent; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import java.util.UUID; public class PutovanjeActivity extends SingleFragmentActivity { private static final String EXTRA_PUTOVANJE_ID = "com.bignerdranch.android.planerputovanja.putovanje_id"; public static Intent newIntent(Context packageContext, UUID putovanjeId) { Intent intent = new Intent(packageContext, PutovanjeActivity.class); intent.putExtra(EXTRA_PUTOVANJE_ID, putovanjeId); return intent; } @Override protected Fragment createFragment() { /*return new PutovanjeFragment();*/ UUID putovanjeId = (UUID) getIntent() .getSerializableExtra(EXTRA_PUTOVANJE_ID); return PutovanjeFragment.newInstance(putovanjeId); } }
33eb9418-67d9-4bfd-9daf-05ec824517ce
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-06-10 02:09:59", "repo_name": "zhp8341/flink-streaming-platform-web", "sub_path": "/flink-streaming-web/src/main/java/com/flink/streaming/web/controller/api/ApiController.java", "file_name": "ApiController.java", "file_ext": "java", "file_size_in_byte": 985, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "dc4135b6dade207b3845672ce94cbf37c4c46c9b", "star_events_count": 1734, "fork_events_count": 656, "src_encoding": "UTF-8"}
https://github.com/zhp8341/flink-streaming-platform-web
216
FILENAME: ApiController.java
0.184768
package com.flink.streaming.web.controller.api; import com.flink.streaming.web.ao.JobServerAO; import com.flink.streaming.web.common.RestResult; import com.flink.streaming.web.controller.web.BaseController; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @author zhuhuipei * @Description: * @date 2020-07-07 * @time 22:00 */ @RestController @Slf4j public class ApiController extends BaseController { @Autowired private JobServerAO jobYarnServerAO; @RequestMapping("/ok") public RestResult ok() { return RestResult.success(); } @RequestMapping("/alarmCallback") public RestResult alarmCallback(String appId, String jobName, String deployMode) { log.info("测试回调 appId={} jobName={} deployMode={}", appId, jobName, deployMode); return RestResult.success(); } }
24098a9a-f04e-46d6-b9a2-fad2ee95643b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-10-08 03:57:06", "repo_name": "nuttt/Pong", "sub_path": "/Item.java", "file_name": "Item.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "892e24d302d5098311924977b3feaeb2dd10bd14", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/nuttt/Pong
249
FILENAME: Item.java
0.29584
import java.awt.Image; public abstract class Item { private double x,y; private double radius; public final static double DEFAULT_ITEM_REDIUS = 20; public final static double ITEM_BOUND_X = 150; public final static double ITEM_BOUND_Y = 50; Image icon; public Item() { x = (Math.random()*(Game.GUI_WIDTH-2*ITEM_BOUND_X))+ITEM_BOUND_X; y = (Math.random()*(Game.GUI_HEIGHT-2*ITEM_BOUND_Y))+ITEM_BOUND_Y; radius = DEFAULT_ITEM_REDIUS; } public synchronized double getX() { return x; } public synchronized void setX(double x) { this.x = x; } public synchronized double getY() { return y; } public synchronized void setY(double y) { this.y = y; } public synchronized Image getIcon() { return icon; } public synchronized void setIcon(Image icon) { this.icon = icon; } public double getRadius() { return radius; } public abstract Item clone(); public abstract String getName(); public abstract void makeEffect(Game gui, Ball b); }
861506a8-c958-459f-8f8a-e85600e0ec9d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-27 08:46:02", "repo_name": "sajadrajabi90213072/Golestan-Final", "sub_path": "/spring-boot-sample-data-jpa-h2-master/src/main/java/de/michlb/sample/service/PreServiceImpl.java", "file_name": "PreServiceImpl.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "a50f41921bb60fa6dfd15c512ecb93e83329b83a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sajadrajabi90213072/Golestan-Final
226
FILENAME: PreServiceImpl.java
0.253861
package de.michlb.sample.service; import de.michlb.sample.domain.Course; import de.michlb.sample.domain.Pre; import de.michlb.sample.repositories.PreRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.transaction.Transactional; /** * Created by Sam on 5/9/2017. */ @Service @Transactional public class PreServiceImpl implements PreService { @Autowired private PreRepository PR ; @Override public Pre FindOne(Integer id) { return PR.findOne(id ); } @Override public Pre Save(Pre C) { return PR.save(C ); } @Override public Iterable<Pre> FindAll() { return PR.findAll() ; } @Override public void Delete(Pre C) { PR.delete( C ); } @Override public void Delete(Integer id) { PR.delete( id ); } @Override public Course Update(Pre c1, Pre c2) { return null; } }
5425ddd1-e086-423b-863b-26b29155872a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-10-03 14:44:28", "repo_name": "alsiExp/sandbox", "sub_path": "/spring/jdbc/annotations_h2/src/main/java/ru/alsi/spring/annotations_h2/sql/SelectTopicByName.java", "file_name": "SelectTopicByName.java", "file_ext": "java", "file_size_in_byte": 989, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "a43ca24bb343220bdc4420ef9432ea5b07bde41f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/alsiExp/sandbox
198
FILENAME: SelectTopicByName.java
0.274351
package ru.alsi.spring.annotations_h2.sql; import org.springframework.jdbc.core.SqlParameter; import org.springframework.jdbc.object.MappingSqlQuery; import ru.alsi.spring.annotations_h2.Topic; import javax.sql.DataSource; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; public class SelectTopicByName extends MappingSqlQuery<Topic> { private static final String SQL_FIND_BY_NAME = "SELECT id, name, creation_time from topics WHERE name = :name"; public SelectTopicByName(DataSource dataSource) { super(dataSource, SQL_FIND_BY_NAME); super.declareParameter(new SqlParameter("name", Types.VARCHAR)); } @Override protected Topic mapRow(ResultSet rs, int rowNum) throws SQLException { Topic topic = new Topic(); topic.setId(rs.getLong("id")); topic.setName(rs.getString("name")); topic.setCreationTime(rs.getTimestamp("creation_time").toLocalDateTime()); return topic; } }
b3e83fbc-1584-42f5-81f4-748d910c23b0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-06-16 03:13:18", "repo_name": "zhuchenGitHub/SOAWork", "sub_path": "/SOAWork/src/Assignment2/Department.java", "file_name": "Department.java", "file_ext": "java", "file_size_in_byte": 1008, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "19ea567997613dad3c937ab65610d26775e657b0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "GB18030"}
https://github.com/zhuchenGitHub/SOAWork
209
FILENAME: Department.java
0.278257
package Assignment2; enum DepartmentType { A("党组织"), B("学生会"), C("行政部门"), D("物业部门"), E("直属部门"), F("院系"); private String typeName; private DepartmentType(String typeName) { this.typeName = typeName; } public String getTypeName() { return typeName; } } public class Department { private int departmentId; private String departmentName; private DepartmentType departmentType; private String departmentDescription; public Department(int departmentId, String departmentName, DepartmentType departmentType, String departmentDescription) { this.departmentId = departmentId; this.departmentName = departmentName; this.departmentType = departmentType; this.departmentDescription = departmentDescription; } public int getDepId() { return departmentId; } public String getDepName() { return departmentName; } public String getDepType() { return departmentType.getTypeName(); } public String getDepDescription() { return departmentDescription; } }
1c4ad7b7-4702-465d-8175-94a1d24c1501
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-06 06:53:26", "repo_name": "Hamedamz/AP_3", "sub_path": "/src/viewers/oldViewers/BasicViewer.java", "file_name": "BasicViewer.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "a207bfd5867b680d9d7cad91010d34c6bf7c62cb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Hamedamz/AP_3
191
FILENAME: BasicViewer.java
0.267408
package viewers.oldViewers; import controllers.Exceptions.InvalidInputException; import java.util.Scanner; public class BasicViewer { protected Scanner scanner = new Scanner(System.in); public void printErrorMessage(String error) { System.err.println(error); } public void printInformation(String info) { System.out.println(info); } public void printPropertyValue(String property, Object value) { System.out.format("%s: %s\n", property, value); } public String getInput() { return scanner.nextLine(); } public void requestForInput(String request) { System.out.println(request); } public boolean getConfirmation() throws InvalidInputException { String input = getInput(); if (input.matches("[yY]")) { return true; } else if (input.matches("[nN]")) { return false; } throw new InvalidInputException("invalid input"); } }
98d69b0b-0b55-4fa2-8ca3-7dccfeff67e0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-01-03 22:51:09", "repo_name": "vanackerb/Vaadin", "sub_path": "/IntegrationExercises/IE2/src/main/java/be/groept/ui/MyUi.java", "file_name": "MyUi.java", "file_ext": "java", "file_size_in_byte": 975, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "d38069903c0f3fdbcb32ca5b3318ac60bd260fa9", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/vanackerb/Vaadin
215
FILENAME: MyUi.java
0.255344
package be.groept.ui; import javax.servlet.annotation.WebServlet; import com.vaadin.annotations.Theme; import com.vaadin.annotations.VaadinServletConfiguration; import com.vaadin.navigator.Navigator; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServlet; import com.vaadin.ui.Panel; import com.vaadin.ui.UI; @Theme("ie2") public class MyUi extends UI { @Override protected void init(VaadinRequest request) { // setContent(new SearchOrder()); Panel panel = new Panel(); panel.setSizeFull(); Navigator navigator = new Navigator(getUI(), panel); setNavigator(navigator); getNavigator().addView("OrderDetail", OrderDetail.class); getNavigator().addView("SearchOrder", SearchOrder.class); navigator.navigateTo("SearchOrder"); setContent(panel); } @WebServlet(value = "/*", asyncSupported = true) @VaadinServletConfiguration(productionMode = false, ui = MyUi.class) public static class Servlet extends VaadinServlet { } }
ba62318e-eb22-4cc0-8aaa-23847c69e2f8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-02 23:35:17", "repo_name": "lixiawss/BusPlat", "sub_path": "/zy-cache/cache-example/src/test/java/com/RedisTests.java", "file_name": "RedisTests.java", "file_ext": "java", "file_size_in_byte": 964, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "981745f7d17d452ac33b57b550310198263a9b8d", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/lixiawss/BusPlat
188
FILENAME: RedisTests.java
0.23092
package com; import com.didispace.Application; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = Application.class) public class RedisTests { @Autowired private StringRedisTemplate stringRedisTemplate; @Test public void test() throws Exception { String key = "demo_could_del_key"; String val = "sss"; stringRedisTemplate.opsForValue().set(key, val, 1000); assertThat(stringRedisTemplate.opsForValue().get(key)).isEqualTo(val); // Assert.assertEquals("111", stringRedisTemplate.opsForValue().get("aaa")); } }
1256e576-0c88-4092-925a-2dc6f0b4a277
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-29 06:55:42", "repo_name": "millionseleshi/AndroidBasics", "sub_path": "/IntentPassData/app/src/main/java/com/example/intentpassdata/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 979, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "a125d9f810eb887dcfe973d650dfb735d83d74a9", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/millionseleshi/AndroidBasics
170
FILENAME: MainActivity.java
0.239349
package com.example.intentpassdata; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends AppCompatActivity { EditText nameEditText; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); nameEditText = findViewById(R.id.nameEditText); } public void getName(View view) { String name = nameEditText.getText().toString(); if (name.length() > 0) { Intent passDataIntent = new Intent(MainActivity.this, ViewNameActivity.class); passDataIntent.putExtra("name", name); startActivity(passDataIntent); } else { Toast.makeText(getApplicationContext(), "No name", Toast.LENGTH_LONG).show(); } } }
801904eb-c8d3-43aa-9db1-7745ac7af1de
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-01-22 17:08:39", "repo_name": "DarkholmeTenk/darkcraft", "sub_path": "/src/main/java/io/darkcraft/mod/common/command/MagicChalkCommand.java", "file_name": "MagicChalkCommand.java", "file_ext": "java", "file_size_in_byte": 979, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "e33e6bd0e470461203642cdfa17f3530bfd0ce9b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/DarkholmeTenk/darkcraft
227
FILENAME: MagicChalkCommand.java
0.290176
package io.darkcraft.mod.common.command; import java.util.List; import io.darkcraft.darkcore.mod.abstracts.AbstractCommandNew; import io.darkcraft.darkcore.mod.helpers.WorldHelper; import io.darkcraft.mod.common.magic.items.MagicChalk; import io.darkcraft.mod.common.registries.ItemBlockRegistry; import net.minecraft.command.ICommandSender; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; public class MagicChalkCommand extends AbstractCommandNew { @Override public String getCommandName() { return "chalk"; } @Override public void getAliases(List<String> list){} @Override public boolean process(ICommandSender sen, List<String> strList) { if(sen instanceof EntityPlayer) { if(strList.size() == 0) return false; ItemStack is = new ItemStack(ItemBlockRegistry.magicChalk); MagicChalk.setString(is,strList.get(0)); WorldHelper.giveItemStack((EntityPlayer) sen, is); return true; } return false; } }
1a72abac-ebdf-4db1-93c9-e0aa2e712f65
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-03-28T07:26:36", "repo_name": "ReneNyffenegger/Arch-Linux-UEFI-Installation", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 977, "line_count": 51, "lang": "en", "doc_type": "text", "blob_id": "81d19cc9850bf6f850720c279495ea7953cf34e5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ReneNyffenegger/Arch-Linux-UEFI-Installation
302
FILENAME: README.md
0.224055
# Arch-Linux-UEFI-Installation Scripts for an installation of Arch Linux with UEFI firmware. # Preparation ## 1. Clone this repository to USB stick cd /media/rene/1C51-C5A2 git clone https://github.com/ReneNyffenegger/Arch-Linux-UEFI-Installation cd umount /dev/sdb1 ## 2. Start Arch Linux live CD Insert the Ach Linux live CD into the computer where Arch Linux is to be installed. Start computer. ## 3. Mount USB Stick on PC Insert USB stick, then mkdir /media mount -o umask=000 /dev/sdb1 /media cd /media/Arch-Linux-UEFI-Installation ## 4. Set a few environment variables export WIFI_ESSID=essid export WIFI_PASSWORD=secret ## 5. Start first script ./01-before-chroot.sh ## 6. chroot to /mnt cd / umount /dev/sdb1 arch-chroot /mnt /bin/bash ## 7. mount USB stick again mount -o umask=000 /dev/sdb1 /mnt ## 8. start second script cd /mnt/Arch-Linux_UEFI-Installation ./02-after-chroot.sh
8859e113-51ac-40e5-b505-1ea997c1a4a5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-09 15:53:09", "repo_name": "bartekJava/workspace", "sub_path": "/SimpleServletProject/src/org/koushik/javabrains/XmlServlet.java", "file_name": "XmlServlet.java", "file_ext": "java", "file_size_in_byte": 967, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "d25ace59d8b10776a90e75edec5f19fef3274cdc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bartekJava/workspace
181
FILENAME: XmlServlet.java
0.272799
package org.koushik.javabrains; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class XmlServlet extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); String userName = request.getParameter("userName"); HttpSession session = request.getSession(); if(userName != "" && userName != null) { session.setAttribute("savedUserName", userName); } out.println("Hello from the Get Method " + userName); out.println("Hello from theSession " + (String)session.getAttribute("savedUserName")); } }
9b74047a-c1fa-443c-b8ef-2db326df81db
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-13 07:24:05", "repo_name": "liveqmock/charging-1", "sub_path": "/holley-charging-calc/src/main/java/com/holley/charging/main/CalcServer.java", "file_name": "CalcServer.java", "file_ext": "java", "file_size_in_byte": 989, "line_count": 25, "lang": "en", "doc_type": "code", "blob_id": "b6e01bc565cab98002ad204387a6e63b09afa231", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/liveqmock/charging-1
200
FILENAME: CalcServer.java
0.27513
package com.holley.charging.main; import org.apache.log4j.Logger; import org.apache.log4j.PropertyConfigurator; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class CalcServer { private final static Logger logger = Logger.getLogger(CalcServer.class); public static String CONFIG_IN_PATH = "config"; public static ApplicationContext springHandle = null; public static void init() { JarUtil ju = new JarUtil(CalcServer.class); PropertyConfigurator.configure(ju.getJarPath() + "/classes/" + CONFIG_IN_PATH + "/log4j.properties"); springHandle = new ClassPathXmlApplicationContext(new String[] { CONFIG_IN_PATH + "/spring/applicationContext.xml", CONFIG_IN_PATH + "/spring/spring-bus-dao.xml", CONFIG_IN_PATH + "/spring/spring-job.xml" }); } public static void main(String[] args) { init(); } }
7a40d2ec-e325-47b6-8c48-e33f1043056a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-06 19:18:25", "repo_name": "resident-bluejay/Routes", "sub_path": "/app/src/main/java/edu/andrews/kundani/routes/PagerAdapter.java", "file_name": "PagerAdapter.java", "file_ext": "java", "file_size_in_byte": 985, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "80b3a5bac09a60a0305cb6b1847d182e932e0cf8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/resident-bluejay/Routes
212
FILENAME: PagerAdapter.java
0.23092
package edu.andrews.kundani.routes; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; /** * Created by resident_bluejay on 11/16/17. */ public class PagerAdapter extends FragmentStatePagerAdapter { int mNumOfTabs; public PagerAdapter(FragmentManager fm, int NumOfTabs) { super(fm); this.mNumOfTabs = NumOfTabs; } @Override public Fragment getItem(int position) { switch (position) { case 0: UserFragment user = new UserFragment(); return user; case 1: FEMAFragment fema = new FEMAFragment(); return fema; case 2: MapFragment map = new MapFragment(); return map; default: return null; } } @Override public int getCount() { return mNumOfTabs; } }
4b7084e7-3da7-47e3-94b4-b0f5d1d1dc8e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-12-11 00:42:17", "repo_name": "SlimSider/app-dev", "sub_path": "/src/main/java/hu/elte/easybet/service/MatchService.java", "file_name": "MatchService.java", "file_ext": "java", "file_size_in_byte": 965, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "bded4f4ecc7878e8816975304f66e515120acc83", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/SlimSider/app-dev
184
FILENAME: MatchService.java
0.247987
package hu.elte.easybet.service; import hu.elte.easybet.model.Match; import hu.elte.easybet.repository.MatchRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Optional; @Service public class MatchService { @Autowired private MatchRepository matchRepository; public Iterable<Match> findAll() { return matchRepository.findAll(); } public Match create(Match match) { return matchRepository.save(match); } public Optional<Match> findById(Long id) { return Optional.of(matchRepository.findOne(id)); } public Match update(Long id, Match match) { System.out.println(match.toString()); return matchRepository.save(match); } public void delete(Long id) { matchRepository.delete(id); } public Match read(Long id) { return matchRepository.findOne(id); } }
f15f85e3-7507-45ac-a98f-fad34b258c71
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-03 20:32:30", "repo_name": "javiera2020/Requerimientos", "sub_path": "/Requerimientos/src/java/Conexion/Conexion.java", "file_name": "Conexion.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "cbfeea0e29c995028827953a430dda650c96c240", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/javiera2020/Requerimientos
190
FILENAME: Conexion.java
0.20947
/* * 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 Conexion; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; /** * * @author javil */ public class Conexion { public static ResultSet consultarSQL(String sentencia) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } Connection con; public Conexion(){ try { Class.forName("com.mysql.jdbc.Driver"); con=(Connection) DriverManager.getConnection("jdbc:mysql://localhost:3307/Evaluacion2","root",""); } catch (Exception e) { System.err.print("Error" +e); } } public static void main(String[] args) { Conexion con=new Conexion(); } }
c8a303ff-473e-41fd-9719-bcb25f1e85a4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-27 11:00:23", "repo_name": "Wojciech98/INIS4_PR2-master", "sub_path": "/src/com/company/Human.java", "file_name": "Human.java", "file_ext": "java", "file_size_in_byte": 980, "line_count": 63, "lang": "en", "doc_type": "code", "blob_id": "659484494b2a60ef5524a86adea151e3e095ecbe", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Wojciech98/INIS4_PR2-master
225
FILENAME: Human.java
0.249447
package com.company; public class Human extends Animal { String firstName; String lastName; Phone phone; Animal pet; Car car; boolean gender; private Double salry = 1000.0; public Human(String species) { super(species); } public Double getSalry() { return salry; } public void setSalry(Double salry) { this.salry = salry; } public void riseMySalry(){ this.salry *=1.1; } public String buyCar(){ if(this.salry>car.carCost){ return "You can buy car"; } else { return "You not enough money"; } } public String whoDrive(){ if(this.gender==true){ return "male drive"; }else return "female drive"; } public void setGender(boolean gender) { this.gender = gender; } public String nameAndLast(){ return firstName+" "+lastName; } }
5c4f35c0-4a0b-4509-9129-70c668026e57
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-13 22:44:47", "repo_name": "RyanLlewellin/iGottaGoGo", "sub_path": "/client/iGottaGoGo/app/src/main/java/com/underthejava/igottagogo/RegisterBathroomRequest.java", "file_name": "RegisterBathroomRequest.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "2a5dcf2ba2436640255da6b8cf5adfa1022bc343", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RyanLlewellin/iGottaGoGo
210
FILENAME: RegisterBathroomRequest.java
0.247987
package com.underthejava.igottagogo; import com.android.volley.toolbox.StringRequest; import java.util.Map; import com.android.volley.*; import java.io.StringReader; import java.util.HashMap; /** * Created by vincentdelacruz on 2017-03-29. */ public class RegisterBathroomRequest extends StringRequest{ private static final String UPDATE_REQUEST_URL = "http://ig2gg.000webhostapp.com/RegisterBathroom.php"; private Map<String, String> params; public RegisterBathroomRequest(String name, String description, Double longitude, Double latitude, Response.Listener<String> listener) { super(Request.Method.POST, UPDATE_REQUEST_URL, listener, null); params = new HashMap<>(); params.put("name", name); params.put("description", description); params.put("longitude", longitude + ""); params.put("latitude", latitude + ""); } @Override public Map<String, String> getParams() { return params; } }
015c9a20-f62d-4058-8e29-332034dffe73
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-24 06:44:58", "repo_name": "rachit-openxcell/BlurDemo", "sub_path": "/app/src/main/java/com/example/rachit/aemjdemo/Model/StaticDatum.java", "file_name": "StaticDatum.java", "file_ext": "java", "file_size_in_byte": 973, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "560c652ba8a9b9e1b8711cea831e0468a6a65f94", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rachit-openxcell/BlurDemo
207
FILENAME: StaticDatum.java
0.195594
package com.example.rachit.aemjdemo.Model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class StaticDatum { @SerializedName("contentId") @Expose private Integer contentId; @SerializedName("title") @Expose private String title; @SerializedName("text") @Expose private String text; public StaticDatum(Integer contentId, String title, String text) { this.contentId = contentId; this.title = title; this.text = text; } public Integer getContentId() { return contentId; } public void setContentId(Integer contentId) { this.contentId = contentId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getText() { return text; } public void setText(String text) { this.text = text; } }
0fdf0c3a-dab2-4c3e-848f-d1cf3742cd41
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-07-26 08:07:13", "repo_name": "ektachaudhari/AngularjsExample", "sub_path": "/src/main/java/com/auskeny/resources/read/CustomerReadResource.java", "file_name": "CustomerReadResource.java", "file_ext": "java", "file_size_in_byte": 990, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "1987c59b66b7eb08ccef26f672cd8635c5d7c200", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ektachaudhari/AngularjsExample
206
FILENAME: CustomerReadResource.java
0.288569
package com.auskeny.resources.read; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.auskeny.hibernate.bdo.CustomerBDO; @Path("/read/customer") public class CustomerReadResource { private static final Logger logger = LoggerFactory.getLogger(CustomerReadResource.class); /* rest service for listing employee details */ @GET @Path("/list") @Produces(MediaType.APPLICATION_JSON) public Response list() { try { System.out.println("read/customer"); String responseData = new CustomerBDO().list(); System.out.println(responseData); return Response.ok(responseData).build(); } catch (Exception ex) { ex.printStackTrace(); logger. trace(ex.getMessage()); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(ex.getMessage()).build(); } } }
12e9ee38-350e-4ae6-b62d-2092868c775c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-05-11 13:57:13", "repo_name": "chinazzl/JavaBase", "sub_path": "/wwj_concurrentLearn/src/com/wwj_concurrent/leve2/chapter2/design/activeobjcetpattern/Servant.java", "file_name": "Servant.java", "file_ext": "java", "file_size_in_byte": 990, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "c8920827348f47c93158db4380fe2e927766d0f1", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/chinazzl/JavaBase
217
FILENAME: Servant.java
0.256832
package com.wwj_concurrent.leve2.chapter2.design.activeobjcetpattern; /********************************** * @author zhang zhao lin * @date 2021年07月22日 22:48 * @Description **********************************/ public class Servant implements ActiveObject{ @Override public Result makeString(int count, char filterChar) { char[] charsArray = new char[count]; for (int i = 0; i < charsArray.length; i++) { charsArray[i] = filterChar; try { Thread.sleep(10); } catch (InterruptedException e) { e.printStackTrace(); } } String result = new String(charsArray); return new RealResult(result); } @Override public void displayString(String text) { System.out.println("display the text ==> " + text); try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } }
6e81acc6-d009-4842-8acf-37da0f460782
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-03-26 20:40:41", "repo_name": "miguel-gomes/EasyPDM", "sub_path": "/EasyPDM/src/main/java/fr/upem/easypdm/entity/Team.java", "file_name": "Team.java", "file_ext": "java", "file_size_in_byte": 990, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "7bafe79032605b40acfa7c7df947a7b25afd29d6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/miguel-gomes/EasyPDM
200
FILENAME: Team.java
0.205615
/* * 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 fr.upem.easypdm.entity; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; /** * * @author sybille */ @Entity public class Team extends Organisation { @ManyToOne @JoinColumn(name="service_id", nullable=false) private Service service; public Team() { } public Team(Service service) { this.service = service; } public Team(String name, String description) { super(name, description); } public Team(Service service, String name, String description) { super(name, description); this.service = service; } public Service getService() { return service; } public void setService(Service service) { this.service = service; } }
e25d62ed-b891-4911-be85-1c417575a1b6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-28 13:06:37", "repo_name": "adminpp/sjdemo", "sub_path": "/src/main/java/com/itqf/enums/ResultEnum.java", "file_name": "ResultEnum.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "f949e91b836924a0e9dd69f95630518d2dda1581", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/adminpp/sjdemo
265
FILENAME: ResultEnum.java
0.26971
package com.itqf.enums; public enum ResultEnum { PRODUCT_NOT_EXISTS(6,"商品不存在"), PRODUCT_STOCK_ERROR(7,"商品库存不足"), PARAM_ERROR(8,"参数不正确"), CART_ERROR(9,"购物车为空"), OPENID_NULL(10,"微信号为空"), ORDER_NOT_EXISTS(11,"订单不存在"), ORDER_DETAIL_NOT_EXISTS(12,"订单详情不存在"), ORDER_OWNER_ERROR(13,"不是订单所有者"), ORDER_STATUS_ERROR(14,"订单状态不对"), ORDER_UPDATE_ERROR(15,"订单修改失败"), ORDER_PAY_STATUS_ERROR(16,"订单支付状态错误"), ORDER_PAY_UPDATE_ERROR(17,"订单支付状态修改错误"), PAY_ERROR(18,"支付错误"), PRODUCT_STATUS_ERROR(19,"商品状态错误"); private Integer code; private String message; ResultEnum(Integer code,String message){ this.code=code; this.message=message; } public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
77343f2e-1ca6-441f-8a8e-7da947ea3909
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-12 07:05:58", "repo_name": "SunhyuckKim/miniswing-pilot", "sub_path": "/src/main/java/miniswing/pilot/web/OrdersApiController.java", "file_name": "OrdersApiController.java", "file_ext": "java", "file_size_in_byte": 990, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "a3d3f8c9f8d4209b8f652a19747a201d727f2450", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/SunhyuckKim/miniswing-pilot
210
FILENAME: OrdersApiController.java
0.242206
package miniswing.pilot.web; import lombok.RequiredArgsConstructor; import miniswing.pilot.service.OrdersService; import miniswing.pilot.web.dto.OrdersResponseDto; import miniswing.pilot.web.dto.OrdersSaveRequestDto; import miniswing.pilot.web.dto.OrdersUpdateRequestDto; import org.springframework.web.bind.annotation.*; @RequiredArgsConstructor @RestController public class OrdersApiController { private final OrdersService ordersService; @PostMapping("/api/v1/orders") //저장 public Long save(@RequestBody OrdersSaveRequestDto requestDto) { return ordersService.save(requestDto); } @GetMapping("/api/v1/orders/{id}") //조회 public OrdersResponseDto findById (@PathVariable Long id) { return ordersService.findById(id); } @PutMapping("/api/v1/orders/{id}") //업데이트 public Long update(@PathVariable Long id, @RequestBody OrdersUpdateRequestDto requestDto) { return ordersService.update(id, requestDto); } }
1040e13c-b81d-4a90-a814-2b44aecaa6be
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-07-04T19:19:08", "repo_name": "Ahmed-10/NodeJs-weather-journal", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 984, "line_count": 37, "lang": "en", "doc_type": "text", "blob_id": "4a4e2a72379fa7b7e17d437c4ccc1f39770859fc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Ahmed-10/NodeJs-weather-journal
225
FILENAME: README.md
0.229535
# NodeJs-weather-journal This project is an asynchronous web app that uses open weather map Web API and user data to dynamically update the UI with the temperature in the city associated with the ZIP code provided by the user. ## Getting Started These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. ### Dependencies * Node JS >= v12.18.0 * click [here](https://nodejs.org/en/download/) to download ### Installing and Running 1. Clone the repository on your local machine 2. Open the terminal on the repository folder and install some libraries listed in [package.json](package.json) file ``` npm install ``` 3. Now you can run a local server on your machine using the command ``` node .\server.js ``` 4. Open your browser and type the following url `http://localhost:3000`. ## License This project is licensed under the The Unlicense - see the [LICENSE.md](LICENSE.md) file for details
e4147707-d794-49b4-b936-7b585315cea3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-03-08 06:53:02", "repo_name": "pthaike/FilmPlat", "sub_path": "/FilmPlatServer/src/scu/edu/cn/action/ManagerInfoAction.java", "file_name": "ManagerInfoAction.java", "file_ext": "java", "file_size_in_byte": 991, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "9733c2f3bd530fb43d48e348fccaf63185ec1233", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "GB18030"}
https://github.com/pthaike/FilmPlat
238
FILENAME: ManagerInfoAction.java
0.268941
package scu.edu.cn.action; import java.util.Map; import org.apache.struts2.ServletActionContext; import scu.nine.modle.ManagerInfoDAO; public class ManagerInfoAction { private String loginName; private String password; private String error; public String getError() { return error; } public void setError(String error) { this.error = error; } public String getLoginName() { return loginName; } public void setLoginName(String loginName) { this.loginName = loginName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } //管理员验证 public String VeridateManager(){ error="0"; ManagerInfoDAO managerInfoDAO =new ManagerInfoDAO(); if(managerInfoDAO.findManagerbyNameAndPsw(loginName,password)){ Map session=ServletActionContext.getContext().getSession(); session.put("admin", loginName); error="0"; return "mloginOk"; }else{ error="1"; return "error"; } } }
4662b705-325f-46c4-9d34-45bc807645b5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-02-11 17:03:47", "repo_name": "RestQ/restq", "sub_path": "/cluster/src/main/java/org/restq/cluster/impl/DefaultPartitionStrategy.java", "file_name": "DefaultPartitionStrategy.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "daf14ff25b977026c6da94c5aa4f6571d724d329", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RestQ/restq
222
FILENAME: DefaultPartitionStrategy.java
0.283781
/** * */ package org.restq.cluster.impl; import java.io.Serializable; import org.restq.cluster.Cluster; import org.restq.cluster.Partition; import org.restq.cluster.PartitionStrategy; import org.restq.core.Identifiable; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; /** * @author ganeshs * */ public class DefaultPartitionStrategy implements PartitionStrategy { @Autowired private Cluster cluster; @Override public Partition getPartition(Serializable... keys) { int partitionCount = cluster.getPartitions(); int hash = StringUtils.arrayToDelimitedString(keys, "_").hashCode(); return new Partition((Math.abs(hash) % partitionCount) + 1); } @Override public Partition getPartition(Identifiable... keys) { Serializable[] serializables = new Serializable[keys.length]; for (int i = 0; i < keys.length; i++) { serializables[i] = keys[i].getId(); } return getPartition(serializables); } }
a0bedf60-f6fe-47de-ae2a-d94d3fae5363
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-29 14:20:02", "repo_name": "rahulagrahari/DigiBahi", "sub_path": "/src/main/java/com/wonkmonk/digikhata/userauth/models/CustomUserDetail.java", "file_name": "CustomUserDetail.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "578bd7582bedfdd6ca95d81510720b6cf8503321", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rahulagrahari/DigiBahi
177
FILENAME: CustomUserDetail.java
0.233706
package com.wonkmonk.digikhata.userauth.models; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Set; public class CustomUserDetail extends ApplicationUser implements UserDetails { public CustomUserDetail(final ApplicationUser applicationUser) { super(applicationUser); } @Override public Collection<? extends GrantedAuthority> getAuthorities() { Set<Role> roles = super.getRoles(); List<SimpleGrantedAuthority> authorities = new ArrayList<>(); for (Role role : roles) { authorities.add(new SimpleGrantedAuthority(role.getName())); } return authorities; } @Override public boolean isCredentialsNonExpired() { return true; } }
e081e783-7e4c-4a44-b635-8859e8eb5229
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-03-20T18:42:51", "repo_name": "matt-bendel/4900_capstone_web", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 990, "line_count": 36, "lang": "en", "doc_type": "text", "blob_id": "23ad06abccb346ceea017efca84dead0b0cfc02b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/matt-bendel/4900_capstone_web
234
FILENAME: README.md
0.27048
# Setting Up the App In order to get started, clone the repository then run the following command: ###`npm install` This will install all required packages - with appropriate versions - as specified in package-lock.json Next, in order to run the app locally, run the following command: ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. ## UPDATING FROM DEVICE In order to update from the device you need to send an HTTP POST request to the following endpoint with the following body content (as JSON): ### Endpoint: #### `https://us-central1-capstone-a7aa2.cloudfunctions.net/updateDeviceAndNotify` ### Body Content: { "device": DEVICE_ID (string), "battery": BATTERY_NUMBER (int) "liquid": LIQUID_NUMBER (int) } Once again, it is imperative to specify the Content-Type as application/json.
4543276d-63ac-40ea-a389-17a4e2450e86
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-24 14:08:23", "repo_name": "Babator/android-demo-app", "sub_path": "/app/src/main/java/babator/com/sdkdemo/CustomViewHolder.java", "file_name": "CustomViewHolder.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "0d3f047a05313b9b2b237798b558f6a5914a6b8f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Babator/android-demo-app
194
FILENAME: CustomViewHolder.java
0.261331
package babator.com.sdkdemo; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.TextView; /** * A View holder class for the RecyclerView holding the players list */ public class CustomViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{ final TextView tvName; private final IHolderClicks mListener; /** * Constructor * @param view The View * @param listener a listener reference */ public CustomViewHolder(View view, IHolderClicks listener) { super(view); mListener = listener; view.setOnClickListener(this); this.tvName = (TextView) view.findViewById(R.id.tvName); } @Override public void onClick(View v){ mListener.onItemClick(this, getAdapterPosition()); } /** * An interface to pass item clicked */ public interface IHolderClicks{ void onItemClick(CustomViewHolder caller, int position); } }
26d90007-24dc-463a-8615-4701402d69d9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-17 15:33:03", "repo_name": "silentcharacter/jooby-app", "sub_path": "/src/main/java/com/mycompany/service/ReviewService.java", "file_name": "ReviewService.java", "file_ext": "java", "file_size_in_byte": 975, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "c931b95ca66c9e12302bd95bddfc8dd0b0bc0477", "star_events_count": 3, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/silentcharacter/jooby-app
225
FILENAME: ReviewService.java
0.288569
package com.mycompany.service; import com.mycompany.domain.shop.Review; import org.apache.commons.lang3.StringUtils; import org.bson.types.Binary; import org.bson.types.ObjectId; import java.util.List; public class ReviewService extends AbstractService<Review> { public ReviewService() { super(Review.class); } @Override public void onSave(Review review) { if (review.image == null && StringUtils.isNotEmpty(review.id)) { review.image = getReviewImage(review.id); } } public Binary getReviewImage(String reviewId) { if (StringUtils.isEmpty(reviewId)) return null; return getCollection().findOne(new ObjectId(reviewId)).as(Review.class).image; } public List<Review> getAll(Integer page, Integer perPage, String sort, String query, List<Object> filterValues) { List<Review> reviews = super.getAll(page, perPage, sort, query, filterValues); reviews.forEach(r -> r.text = r.text.replace("<p>", "").replace("</p>", "")); return reviews; } }
84c82fec-fd2e-4046-b854-67b80cdd5b28
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-07-17 09:57:11", "repo_name": "coca-cola33/CloudFilm", "sub_path": "/app/src/main/java/me/jessyan/mvparms/demo/app/view/searchbar/SearchBar.java", "file_name": "SearchBar.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "bc186942cced43afe9b8d649fc25d6d5ad6f5747", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/coca-cola33/CloudFilm
209
FILENAME: SearchBar.java
0.239349
package me.jessyan.mvparms.demo.app.view.searchbar; import android.content.Context; import android.content.res.TypedArray; import android.util.AttributeSet; import android.widget.RelativeLayout; import me.jessyan.mvparms.demo.R; /** * Created by phenix on 2017/7/12. */ public class SearchBar extends RelativeLayout { private float mHeight=0f; public SearchBar(Context context) { this(context,null); } public SearchBar(Context context, AttributeSet attrs) { this(context,attrs,0); } public SearchBar(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); TypedArray ta=attrs==null?null:getContext().obtainStyledAttributes(attrs, R.styleable.SearchBar); if(ta!=null){ mHeight=ta.getDimension(R.styleable.SearchBar_search_bar_float_height,mHeight); ta.recycle(); } initView(); } private void initView() { } }
970875ec-bf4f-4ac9-be34-3438ddc47af5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-04T12:28:55", "repo_name": "alexbatashev/rmilab", "sub_path": "/src/com/example/server/GameServiceImpl.java", "file_name": "GameServiceImpl.java", "file_ext": "java", "file_size_in_byte": 979, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "c45da979bc697a2e07749ff305b10a711b01f1b5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/alexbatashev/rmilab
196
FILENAME: GameServiceImpl.java
0.26588
package com.example.server; import com.example.client.GameClientCallback; import com.example.lib.Message; import java.rmi.RemoteException; import java.rmi.server.UnicastRemoteObject; import java.util.HashMap; public class GameServiceImpl extends UnicastRemoteObject implements GameService { private static final long serialVersionUID = 1L; private int[][] gameField = new int[10][10]; private int gamers = 0; private HashMap<Integer, GameClientCallback> callbacks = new HashMap<>(); public GameServiceImpl() throws RemoteException { super(); } @Override public void addNewMessage(Message msg) throws RemoteException { } @Override public int getPlayerId() throws RemoteException { if (gamers >= 2) throw new RemoteException("2 players max"); return gamers++; } @Override public void register(int playerId, GameClientCallback callback) { callbacks.put(playerId, callback); } }
d3e826c8-8d82-4208-bddf-e8242bbda1c2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-12 23:21:16", "repo_name": "ktorsh/JDSHackathon2020", "sub_path": "/src/GUIController.java", "file_name": "GUIController.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "ebc14ab014c19e7f2275ecbc814bd51a786957c0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ktorsh/JDSHackathon2020
235
FILENAME: GUIController.java
0.247987
import java.io.IOException; import java.util.ArrayList; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.ChoiceBox; import javafx.scene.control.TextField; import web.Scrape; public class GUIController { private Scrape scraper; private ArrayList<String[]> utilities; @FXML TextField zip; @FXML ChoiceBox<String> utility; @FXML Button zipButton; @FXML void getZip(ActionEvent event) throws IOException { System.out.println("dlhfbdsakl"); scraper = new Scrape(zip.getText()); utilities = scraper.getUtilities(); for(String[] str : utilities) { utility.getItems().add(str[0]); } } @FXML void getUtility(ActionEvent event) throws IOException { String url = null; for(String[] arr : utilities) { if(arr[0].equals(utility.getValue())) { url = arr[3]; } } ArrayList<String[]> contaminants = scraper.getContaminants(url); System.out.println(contaminants); } }
b9c3f828-9103-4c97-95be-f76bccc0334b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-28 14:06:29", "repo_name": "liyork/concurrenttest", "sub_path": "/src/main/java/com/wolf/concurrenttest/mtadp/balking/DocumentTest.java", "file_name": "DocumentTest.java", "file_ext": "java", "file_size_in_byte": 983, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "e8426a00c2d5d7c28d94ce83629ff6b73f730afe", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/liyork/concurrenttest
197
FILENAME: DocumentTest.java
0.247987
package com.wolf.concurrenttest.mtadp.balking; import java.util.Scanner; /** * Description: * * @author 李超 * @date 2019/02/04 */ public class DocumentTest { public static void main(String[] args) { new Thread(new DocumentEditTask(), "DocumentEditThread").start(); } static class DocumentEditTask implements Runnable { private final Scanner scanner = new Scanner(System.in); @Override public void run() { int times = 1; Document document = Document.create("xx/abc/dbe/e.txt"); while (true) { String input = scanner.next(); if ("quit".equals(input)) { document.close(); break; } document.edit(input); if (times == 5) { document.save(); times = 1; } times++; } } } }
166d3285-f280-4358-9a82-45f481e18e49
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-01 08:59:46", "repo_name": "amit4alljava/SeleniumWeekEnd_DecBatch", "sub_path": "/Day-7/AccessingElements02.java", "file_name": "AccessingElements02.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "ed167aa95bb3c098bbdfb7c4113a7d009954afbc", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/amit4alljava/SeleniumWeekEnd_DecBatch
219
FILENAME: AccessingElements02.java
0.29584
package com.srivastava.basics; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.Assert; import org.testng.annotations.Test; public class AccessingElements02 { @Test public void testAccessingElements(){ String url= "http://newtours.demoaut.com/"; System.setProperty("webdriver.chrome.driver","D:\\Selenium-WS\\Jars\\chromedriver_win32\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get(url); WebElement userName = driver.findElement(By.name("userName")); userName.sendKeys("amitsrivastava"); WebElement password = driver.findElement(By.name("password")); password.sendKeys("amit123456"); WebElement loginButton = driver.findElement(By.name("login")); loginButton.click(); List<WebElement> hyperLinks = driver.findElements(By.tagName("a")); Assert.assertTrue(hyperLinks.size()> 5); } }
e0cadab7-e38c-4e16-9ba3-e514aa666ecc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-12-12 19:36:57", "repo_name": "nitink133/Instagram-Profile-Downloader", "sub_path": "/app/src/main/java/com/storyPost/PhotoVideoDownloader/data/localpojo/IntroScreens.java", "file_name": "IntroScreens.java", "file_ext": "java", "file_size_in_byte": 989, "line_count": 21, "lang": "en", "doc_type": "code", "blob_id": "2c28968f33ce15b10edbc662e50d24d7c3e1db10", "star_events_count": 53, "fork_events_count": 11, "src_encoding": "UTF-8"}
https://github.com/nitink133/Instagram-Profile-Downloader
198
FILENAME: IntroScreens.java
0.23092
package com.storyPost.PhotoVideoDownloader.data.localpojo; import java.util.ArrayList; import com.storyPost.PhotoVideoDownloader.R; public class IntroScreens { static ArrayList<IntroScreenList> introScreenLists = new ArrayList<>(); static IntroScreenList screenList; public static ArrayList<IntroScreenList> getScreen() { screenList = new IntroScreenList("Authenticate with official Instagram", R.mipmap.instadownloader_icon, "We respect your privacy,we are not storing your password."); introScreenLists.add(screenList); screenList = new IntroScreenList("Download your favourite posts", R.drawable.ic_download_posts, "InstaSaver let you download Instagram stories,profile picture and many more."); introScreenLists.add(screenList); screenList = new IntroScreenList("Stories downloader", R.drawable.ic_selfie, "Download stories of your loved ones"); introScreenLists.add(screenList); return introScreenLists; } }
8d004834-f0a9-4c10-a391-a36830858eaf
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-15 23:55:07", "repo_name": "habib671/quizAppNative", "sub_path": "/app/src/main/java/com/example/quizappnative/quizActivities/QuizScoreActivity.java", "file_name": "QuizScoreActivity.java", "file_ext": "java", "file_size_in_byte": 989, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "cdcf3529448c784acc8b647de98ff81021d1147b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/habib671/quizAppNative
164
FILENAME: QuizScoreActivity.java
0.23092
package com.example.quizappnative.quizActivities; import android.content.Intent; import android.os.Bundle; import android.widget.Button; import android.widget.TextView; import androidx.appcompat.app.AppCompatActivity; import com.example.quizappnative.MainActivity; import com.example.quizappnative.R; public class QuizScoreActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_quiz_score); TextView scoreTV = findViewById(R.id.scoreTV); Button done = findViewById(R.id.doneTV); String score_str = getIntent().getStringExtra("SCORE"); scoreTV.setText(score_str); done.setOnClickListener(view -> { Intent intent = new Intent(QuizScoreActivity.this, MainActivity.class); QuizScoreActivity.this.startActivity(intent); QuizScoreActivity.this.finish(); }); } }
66499fde-362b-494a-b8b9-2ed2427e115d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-02-05T20:49:11", "repo_name": "brandon-fryslie/esp-bloom", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 966, "line_count": 38, "lang": "en", "doc_type": "text", "blob_id": "8fa7df30e31ae31bbed7b44252d5b0b10d99051b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/brandon-fryslie/esp-bloom
263
FILENAME: README.md
0.172172
# esp-bloom ESPPixelStick + ESP8266 Bias Lighting Inspired by ScreenBloom but I don't want to have to use Hue/ZigBee lights. This will use addressable LEDs for higher resolution. ## connecting to esp8266 ### serial Once the device is flashed, it can be connected to via serial with this command: ```shell screen /dev/tty.usbserial-0001 115200 ``` The path of your serial port might be different. You can run `ls /dev/tty.*` to try to find it. ## LED strips I'm using some SK6812 LED strips I have. They are RGB + W channels. Due to the RGBW LEDs I need to use a nightly build of ESPixelStick fw that has support for RGBW LEDs. The important settings are: - Color Order: GRBW ## TODO - Check out this library: https://github.com/abhiTronix/vidgear - Supposed to be faster for grabbing screenshots - Cache some screenshot data (we grab the same data multiple times per frame) - Fix PixelStrip4 (something isn't working related to the start offset)
896a2c1d-f8bf-4c6f-8987-d90481bdf892
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-03-30T23:03:05", "repo_name": "robertoeb/CodeNation-React-Challenge", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 992, "line_count": 34, "lang": "en", "doc_type": "text", "blob_id": "308132bafdbb9abbc59d1f01c401e854b57ce7f2", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/robertoeb/CodeNation-React-Challenge
255
FILENAME: README.md
0.293404
# Using React to list and filter recipes In this challenge, you will create an interface for listing and filtering recipes. ## Topics With this challeng, I learn: - React - ES6 - Javascript - Unitary tests ## Requirements You will need the NodeJS (LTS or Current) installed on your machine. ### Tasks - [x] Render dynamically the `RecipeItems` component for all elements within the sample data; - [x] When entering a text in the `input` within the `Navbar` component, `RecipeItems` should be filtered, both by `title` and `ingredients`; - [x] The filter should be `case insensitive`; - [x] (Bonus) highlight the searched text within the `title` and `ingredients` using the tag `<mark>`; ### Example ![](https://s3-us-west-1.amazonaws.com/codenation-challenges/react-0/BouncyAfraidDikkops-size_restricted.gif) ## Running the application Run on your terminal: ``` npm install ``` Then, to run the application: ``` npm start ``` You should access [localhost:3000](http://localhost:3000/)
826ad2c8-437d-4175-8f82-cf7a6d2cf465
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-17 19:01:18", "repo_name": "umeshmishra099/pim-importer", "sub_path": "/src/test/java/com/pim/importer/pimimpoter/publisher/RabbitMQPublisherTest.java", "file_name": "RabbitMQPublisherTest.java", "file_ext": "java", "file_size_in_byte": 979, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "cd982c29f2b0f3f3aa9042469a0682ca04b77b85", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/umeshmishra099/pim-importer
209
FILENAME: RabbitMQPublisherTest.java
0.271252
package com.pim.importer.pimimpoter.publisher; import com.pim.importer.pimimpoter.config.ApplicationConfigReader; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; import org.springframework.amqp.core.AmqpTemplate; import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) public class RabbitMQPublisherTest { @InjectMocks private RabbitMQPublisher rabbitMQPublisher; @Mock private AmqpTemplate amqpTemplate; @Mock private ApplicationConfigReader applicationConfig; @Test public void publishMessage() { final String message = "hello"; when(applicationConfig.getPimExchange()).thenReturn("testExchange"); when(applicationConfig.getPimRoutingKey()).thenReturn("testRoutingKey"); rabbitMQPublisher.publishMessage(message); verify(amqpTemplate, times(1)).convertAndSend(anyString(), anyString(), eq(message)); } }
3069cdac-bbb1-4b2b-867f-222c602faf58
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-20 23:39:41", "repo_name": "sosnovvski/inpost-test-automation", "sub_path": "/src/test/java/steps/AbbSteps.java", "file_name": "AbbSteps.java", "file_ext": "java", "file_size_in_byte": 973, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "b5612e08bc9c44d9c45875986585db3571b4c76a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sosnovvski/inpost-test-automation
248
FILENAME: AbbSteps.java
0.271252
package steps; import cucumber.api.java.en.And; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; import cucumber.api.java.en.When; import pages.AbbPageObject; import static org.testng.Assert.assertTrue; public class AbbSteps extends TestRunnerTestNG { private AbbPageObject abbPageObject = new AbbPageObject(seleniumCore); @Given("^Otworzylem strone glowna abb$") public void openAbbPage() { abbPageObject.open(); } @And("^Wybralem zakladke: Downloads$") public void clickDownloadTab() { abbPageObject.clickDownloadTab(); } @And("^Wybieram zakladke: Movie$") public void clickMovieTab() { abbPageObject.clickMovieTab(); } @When("^Naciskam na tytul filmu$") public void clickOpenMovieButton() { abbPageObject.clickOpenMovieButton(); } @Then("^Film jest odtwarzany w osobnej karcie$") public void checkVideoIsPlaying() throws InterruptedException { assertTrue(abbPageObject.videoIsPlaying(), "Video is not playing"); } }
261ced17-6ed9-446c-b0af-1bf51d0987c4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-02 14:40:10", "repo_name": "a7v266/pfpay-server", "sub_path": "/src/main/java/ru/pfpay/service/persistence/OrganizationPersistenceImpl.java", "file_name": "OrganizationPersistenceImpl.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "1c3d0b72475e099830e27e8f035e96490da8f135", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/a7v266/pfpay-server
182
FILENAME: OrganizationPersistenceImpl.java
0.284576
package ru.pfpay.service.persistence; import org.springframework.stereotype.Repository; import ru.pfpay.domain.Organization; import ru.pfpay.service.search.Filter; import ru.pfpay.service.search.Search; import java.util.function.Consumer; @Repository public class OrganizationPersistenceImpl extends BasePersistenceImpl<Organization, Long> implements OrganizationPersistence { public OrganizationPersistenceImpl() { super(Organization.class); } @Override public Organization findOrganization(String ogrn) { Search search = new Search(); search.addFilter(Filter.eq(Organization.OGRN, ogrn)); return uniqueResult(search); } @Override public Organization findOrganization(String ogrn, Consumer<String> notFoundConsumer) { Organization organization = findOrganization(ogrn); if (organization == null) { notFoundConsumer.accept(ogrn); } return organization; } }
26d77eeb-5897-4cab-8adc-fb652f5943d5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-07 00:48:00", "repo_name": "NikolaMag99/Student-Services", "sub_path": "/src/main/java/studsluzba/client/fxmlcontrollers/AddIspitController.java", "file_name": "AddIspitController.java", "file_ext": "java", "file_size_in_byte": 980, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "d381b6ac3e3fb583c69cb868e0984512d73d9710", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/NikolaMag99/Student-Services
225
FILENAME: AddIspitController.java
0.246533
package studsluzba.client.fxmlcontrollers; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.Node; import javafx.scene.control.TextField; import javafx.stage.Stage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import studsluzba.model.Ispit; import studsluzba.services.IspitiService; @Component public class AddIspitController { @Autowired IspitiService ispitiService; @Autowired IspitController ispitController; @FXML TextField sifraIspitaTf; @FXML public void addIspit(ActionEvent event) { Ispit ss = new Ispit(); ss.setSifraIspita(sifraIspitaTf.getText()); closeStage(event); } @FXML public void initialize() { } private void closeStage(ActionEvent event) { Node source = (Node) event.getSource(); Stage stage = (Stage) source.getScene().getWindow(); stage.close(); } }
4ebba1e2-65e4-47e2-a5b3-5e954c5f5d27
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-01 08:31:34", "repo_name": "LWHTarena/lwh-example", "sub_path": "/lwh-springcloud-knife4j/service-order/src/main/java/com/lwhtarena/sc/model/Order.java", "file_name": "Order.java", "file_ext": "java", "file_size_in_byte": 998, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "73cf814e37f51fd2039389e61af31f02a575dcb7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/LWHTarena/lwh-example
253
FILENAME: Order.java
0.264358
package com.lwhtarena.sc.model; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.text.DecimalFormat; import java.util.Random; /** * @author liwh * @Title: Order * @Package com.lwhtarena.sc.model * @Description: * @Version 1.0.0 * @date 2020/5/17 23:10 */ @ApiModel(value = "订单模块") public class Order { @ApiModelProperty(value = "订单号") private String orderNo; @ApiModelProperty(value = "订单名称") private String name; public Order() { DecimalFormat df=new DecimalFormat("00000"); this.orderNo="TAW"+df.format(new Random().nextInt(1000)); this.name="订单"+new Random().nextInt(1000); } public String getOrderNo() { return orderNo; } public void setOrderNo(String orderNo) { this.orderNo = orderNo; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
5f6524b8-c6d2-46df-bb23-b2ac08658cbe
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-12-13 21:38:15", "repo_name": "paulhemmings/mem-app", "sub_path": "/src/main/java/com/razor/memories/partials/FriendListPartial.java", "file_name": "FriendListPartial.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "88bf5bd721b78ba9ff2a5f9df4e56b6063c0af32", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/paulhemmings/mem-app
240
FILENAME: FriendListPartial.java
0.29584
package com.razor.memories.partials; import java.util.List; import com.restfb.Connection; import com.restfb.types.User; public class FriendListPartial { public String build(Connection<User> myFriends){ StringBuilder builder = new StringBuilder(); builder.append("<div class=\"friendSelectionContainer\" >"); for (List<User> myFriendsList : myFriends) { for(User user: myFriendsList){ String selectionHtml = String.format("<input class=\"friendSelector\" type=\"checkbox\" value=\"%s\" data-name=\"%s\" />", user.getId(),user.getName()); builder.append( "<div class=\"friendItem\" >" + "<img class=\"friendImage\" src=\"https://graph.facebook.com/" + user.getId() + "/picture\"/>" + "<div class=\"friendName\">" + user.getName() + "</div>" + "<div class=\"friendSeletorBlock\" >" + selectionHtml + "</div>" + "</div>"); } } builder.append("</div>"); return builder.toString(); } }
e1faba3b-7dc0-416c-bca2-6c0232873207
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-07-26 01:57:48", "repo_name": "qinliu777/PhoneWeishi", "sub_path": "/app/src/main/java/com/ecjtu/liuqin/weishi_my/mode/bean/PhoneInfo.java", "file_name": "PhoneInfo.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "14ee63021b8e0e98e0afb19c03cad7ede267b808", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/qinliu777/PhoneWeishi
211
FILENAME: PhoneInfo.java
0.183594
package com.ecjtu.liuqin.weishi_my.mode.bean; import java.io.Serializable; /** * Created by liuqin on 2016/7/19. * 获取手机通讯录的bean类 */ public class PhoneInfo implements Serializable{ private String phoneName; private String phoneNumber; public PhoneInfo(){ } public PhoneInfo(String phoneNumber, String phoneName) { this.phoneNumber = phoneNumber; this.phoneName = phoneName; } public String getPhoneName() { return phoneName; } public void setPhoneName(String phoneName) { this.phoneName = phoneName; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } @Override public String toString() { return "PhoneInfo{" + "phoneName='" + phoneName + '\'' + ", phoneNumber='" + phoneNumber + '\'' + '}'; } }
af903d99-a830-4b27-9717-6c4582728b40
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-23 06:42:34", "repo_name": "busliksuslik/SPTVR19PhonesShop", "sub_path": "/src/java/facades/TagFacade.java", "file_name": "TagFacade.java", "file_ext": "java", "file_size_in_byte": 980, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "fb49589b2c924a992db6ca4396448e5063806936", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/busliksuslik/SPTVR19PhonesShop
203
FILENAME: TagFacade.java
0.282196
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package facades; import entites.Tag; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; /** * * @author nikita */ @Stateless public class TagFacade extends AbstractFacade<Tag> { @PersistenceContext(unitName = "SPTVR19WebPhoneShopPU") private EntityManager em; @Override protected EntityManager getEntityManager() { return em; } public TagFacade() { super(Tag.class); } public Tag findByName(String name) { try { return (Tag) em.createQuery("SELECT t FROM Tag t WHERE t.name = :name") .setParameter("name", name) .getSingleResult(); } catch (Exception e) { return null; } } }
32310aec-f6aa-4370-a84b-97a2bdd3a614
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-15 23:44:58", "repo_name": "ginamerla/dietapp", "sub_path": "/src/main/java/com/tortu/api/rest/mappers/ShoppingIngredientResourceMapper.java", "file_name": "ShoppingIngredientResourceMapper.java", "file_ext": "java", "file_size_in_byte": 976, "line_count": 26, "lang": "en", "doc_type": "code", "blob_id": "8a2adbffb9ae1e4bf03b742699ee0a731c5ef331", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/ginamerla/dietapp
179
FILENAME: ShoppingIngredientResourceMapper.java
0.245085
package com.tortu.api.rest.mappers; import com.tortu.api.dto.ShoppingIngredientDTO; import com.tortu.api.rest.resources.ShoppingIngredientResource; import org.springframework.stereotype.Component; /** * Implementacion del convertidor que mapea las propiedades de la lista de ingredientes con el recurso de la capa REST */ @Component public class ShoppingIngredientResourceMapper implements DefaultResourceMapper<ShoppingIngredientDTO, ShoppingIngredientResource> { @Override public ShoppingIngredientResource map(ShoppingIngredientDTO model) { if(model==null){ return null; } ShoppingIngredientResource resource = new ShoppingIngredientResource(); resource.setCategory(model.getCategory()); resource.setIdIngredient(model.getIdIngredient()); resource.setItem(model.getItem()); resource.setQuantity(model.getQuantity()); resource.setUnit(model.getUnit()); return resource; } }
7b5d0d72-ba3a-46be-88a7-345c7de667e3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-06 00:43:50", "repo_name": "int-a/Android-Tutorial", "sub_path": "/FragmentLayouts/app/src/main/java/netgenes/fragmentlayouts/DetailsActivity.java", "file_name": "DetailsActivity.java", "file_ext": "java", "file_size_in_byte": 980, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "af38b620fcf4063a24724997374fa656977db830", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/int-a/Android-Tutorial
180
FILENAME: DetailsActivity.java
0.23793
package netgenes.fragmentlayouts; import android.app.Activity; import android.content.res.Configuration; import android.os.Bundle; /** * Created by Anthony on 12/29/2015. */ public class DetailsActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // If in landscape mode, kill activity if(getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE){ finish(); return; } // If activity was not killed... // If savedInstanceState is null we will need to create it if(savedInstanceState == null){ DetailsFragment details = new DetailsFragment(); // Get bundle of key value pairs (just 1) details.setArguments(getIntent().getExtras()); getFragmentManager().beginTransaction().add(android.R.id.content, details).commit(); } } }
c167543e-4ee7-47fb-8a83-596b767b08a9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-28 14:25:40", "repo_name": "pkrysztofiak/mesurements-drawer", "sub_path": "/src/main/java/pl/pkrysztofiak/mesurementsdrawer/view/measurements/polygon/PolygonMeasurementView.java", "file_name": "PolygonMeasurementView.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "6a4b0f9c5d683dbbad482b2f6194d152742b6cb1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pkrysztofiak/mesurements-drawer
211
FILENAME: PolygonMeasurementView.java
0.275909
package pl.pkrysztofiak.mesurementsdrawer.view.measurements.polygon; import javafx.collections.ObservableList; import javafx.scene.Group; import javafx.scene.Node; import pl.pkrysztofiak.mesurementsdrawer.view.measurements.MeasurementView; public class PolygonMeasurementView extends MeasurementView { private final Group edgesPane = new Group(); private final Group verticesPane = new Group(); private final Group group = new Group(edgesPane, verticesPane); public PolygonMeasurementView() { getChildren().add(group); // getChildren().addAll(edgesPane, verticesPane); } public void setTranslateXGroup(double value) { group.setTranslateX(value); // setTranslateX(value); } public void setTranslateYGroup(double value) { group.setTranslateY(value); // setTranslateY(value); } public ObservableList<Node> getVerticesChildren() { return verticesPane.getChildren(); } public ObservableList<Node> getEdgesChildren() { return edgesPane.getChildren(); } }
99c04df7-032d-4cb6-b8ae-f751cf3f7eab
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-11-27 01:40:34", "repo_name": "geetima/inmemorydatabase", "sub_path": "/src/com/grai/dbcommands/BeginCommand.java", "file_name": "BeginCommand.java", "file_ext": "java", "file_size_in_byte": 967, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "08deb61235df1bf28064ec3d93e35fcaddaa51f9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/geetima/inmemorydatabase
207
FILENAME: BeginCommand.java
0.291787
package com.grai.dbcommands; import java.util.HashMap; import java.util.Stack; import com.grai.data.CommandData; import com.grai.data.Data; /** * Begin signifies a new transaction. If user has input the first BEGIN * statement, all storage is refreshed. If user inputs nested BEGIN statements, * all GET, SET and BEGIN commands are stored in command stack to be used later * for ROLLBACK. */ public class BeginCommand implements ICommand { @Override public void execute(CommandData commandData, String command) { int beginCount = commandData.getBeginCount(); if (beginCount == 0) { commandData.setDataStore(new HashMap<String, String>()); commandData.setCommandStack(new Stack<String>()); commandData.setRollbackHelperStack(new Stack<Data>()); commandData.setOccurenceStore(new HashMap<String, Integer>()); } beginCount++; commandData.setBeginCount(beginCount); commandData.addCommand(command); } }
7a85a60b-aed7-49da-bd65-fd2d91afdd78
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-01-09 09:01:05", "repo_name": "ghouman/ghouman", "sub_path": "/weigaoSys/src/main/java/org/mybatis/weigao/web/actions/CatalogActionBean.java", "file_name": "CatalogActionBean.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "62280800150d6563c349ac228a6e6afc252375e2", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/ghouman/ghouman
214
FILENAME: CatalogActionBean.java
0.213377
package org.mybatis.weigao.web.actions; import net.sourceforge.stripes.action.DefaultHandler; import net.sourceforge.stripes.action.ForwardResolution; import net.sourceforge.stripes.action.SessionScope; import net.sourceforge.stripes.integration.spring.SpringBean; import java.util.List; @SessionScope public class CatalogActionBean extends AbstractActionBean { private static final long serialVersionUID = 5849523372175050635L; private static final String MAIN = "/WEB-INF/jsp/catalog/Main.jsp"; private static final String VIEW_CATEGORY = "/WEB-INF/jsp/catalog/Category.jsp"; private static final String VIEW_PRODUCT = "/WEB-INF/jsp/catalog/Product.jsp"; private static final String VIEW_ITEM = "/WEB-INF/jsp/catalog/Item.jsp"; private static final String SEARCH_PRODUCTS = "/WEB-INF/jsp/catalog/SearchProducts.jsp"; @DefaultHandler public ForwardResolution viewMain() { return new ForwardResolution(MAIN); } public void clear() { } }
be49ac9b-3280-4cdc-b53b-4157934dcda7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-17 11:46:35", "repo_name": "vippulpanditgit/myrewardengine", "sub_path": "/src/main/java/com/myreward/parser/util/MyRewardParserUtil.java", "file_name": "MyRewardParserUtil.java", "file_ext": "java", "file_size_in_byte": 989, "line_count": 27, "lang": "en", "doc_type": "code", "blob_id": "ce288ab7059a7f4317be2001de2dc6a6a0d7e345", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/vippulpanditgit/myrewardengine
200
FILENAME: MyRewardParserUtil.java
0.252384
package com.myreward.parser.util; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.CommonTokenStream; import com.myreward.engine.event.processor.MetaOpCodeProcessor; import com.myreward.parser.grammar.MyRewardLexer; import com.myreward.parser.grammar.MyRewardParser; public class MyRewardParserUtil { public static MyRewardParser getParsed(MetaOpCodeProcessor metaOpCodeProcessor, String eventString) throws IOException { InputStream stream = new ByteArrayInputStream(eventString.getBytes(StandardCharsets.UTF_8)); MyRewardLexer myRewardLexer = new MyRewardLexer(CharStreams.fromStream(stream, StandardCharsets.UTF_8)); MyRewardParser myRewardParser = new MyRewardParser(new CommonTokenStream(myRewardLexer)); myRewardParser.metaOpCodeProcessor = metaOpCodeProcessor; return myRewardParser; } }
fc27ecc7-55b9-42c1-aa4b-3bcc7100dbdc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-10 14:38:21", "repo_name": "saraqp/EDAMAM", "sub_path": "/app/src/main/java/quesado/prado/sara/edamam/fragments/FragmentIngredientes.java", "file_name": "FragmentIngredientes.java", "file_ext": "java", "file_size_in_byte": 976, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "3b10ea88f87794afef6e066d1586ee70bcef1704", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/saraqp/EDAMAM
185
FILENAME: FragmentIngredientes.java
0.200558
package quesado.prado.sara.edamam.fragments; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.fragment.app.Fragment; import quesado.prado.sara.edamam.R; public class FragmentIngredientes extends Fragment { public TextView ingredientes; public FragmentIngredientes() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view=inflater.inflate(R.layout.fragment_ingredientes,container,false); ingredientes=view.findViewById(R.id.textviewFragmentIngredientes); return view; } public void changeText(String ingrediente){ String vermas= getResources().getString(R.string.verMas)+"...."; ingredientes.setText(ingrediente+"\n\n"+vermas+"\n\n"); } }
84f34a4c-369a-40ee-994e-a4ad9f4bd118
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-11 20:45:36", "repo_name": "Ilhuicamina-G/sistemainspector", "sub_path": "/app/src/main/java/artbot/com/sistemainspector/InicioActivity.java", "file_name": "InicioActivity.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "3fd06394392fc763e91664a4bcb57a181d2c2197", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Ilhuicamina-G/sistemainspector
165
FILENAME: InicioActivity.java
0.199308
package artbot.com.sistemainspector; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.os.Handler; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class InicioActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_inicio); //comentario new Handler().postDelayed(new Runnable() { @Override public void run() { Intent intent = new Intent(InicioActivity.this, LoginActivity.class); startActivity(intent); finish(); } },1000); } public boolean obtenerEstadoyDatos(){ SharedPreferences preferences = getSharedPreferences("USER", Context.MODE_PRIVATE); return preferences.getBoolean("sesion",false); } }
ed1ff216-043d-4685-b8de-7241a195729b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-04-28 09:06:17", "repo_name": "guantong/ABCNewsFeeds", "sub_path": "/app/src/main/java/com/guantong/newsfeeds/NewsDetailActivity.java", "file_name": "NewsDetailActivity.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "5af361e02f184ffedf3d9787ce85df8a0362c668", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/guantong/ABCNewsFeeds
176
FILENAME: NewsDetailActivity.java
0.214691
package com.guantong.newsfeeds; import android.app.Activity; import android.os.Bundle; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; public class NewsDetailActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { WebView webView; super.onCreate(savedInstanceState); setContentView(R.layout.activity_news_detail); webView = (WebView) findViewById(R.id.webView); WebSettings webSettings = webView.getSettings(); webSettings.setJavaScriptEnabled(true); webView.setWebViewClient(new WebViewClient()); // Get the intent, setup ImageView and the ActionBar title NewsEntity newsEntity = (NewsEntity)(getIntent().getSerializableExtra("result")); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl(newsEntity.getArticleUrl()); setTitle(newsEntity.getArticleTitle()); } }
7a7347eb-fa05-4357-a792-54ca8d36a415
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-18 07:48:58", "repo_name": "lukehuang/cloud-gateway", "sub_path": "/gateway-netty/src/main/java/org/cloud/gateway/message/Header.java", "file_name": "Header.java", "file_ext": "java", "file_size_in_byte": 1193, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "26ea18d867120d76789360ad122a9ae8846c4ab0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/lukehuang/cloud-gateway
264
FILENAME: Header.java
0.279828
package org.cloud.gateway.message; public class Header implements Cloneable { private final HeaderName name; private final String value; public Header(HeaderName name, String value) { if (name == null) throw new NullPointerException("Header name cannot be null!"); this.name = name; this.value = value; } public String getKey() { return name.getName(); } public HeaderName getName() { return name; } public String getValue() { return value; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Header header = (Header) o; if (!name.equals(header.name)) return false; return !(value != null ? !value.equals(header.value) : header.value != null); } @Override public int hashCode() { int result = name.hashCode(); result = 31 * result + (value != null ? value.hashCode() : 0); return result; } @Override public String toString() { return String.format("%s: %s", name, value); } }
4d7290cf-4531-40b4-a5ce-dbff8c5875dd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-03 15:35:28", "repo_name": "Hafsahabib76/give2share-MobileApp", "sub_path": "/app/src/main/java/com/se17/give2shareapplication/Model/UserLoginResponse.java", "file_name": "UserLoginResponse.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "8a7c02058ff95133edc9a45c469d61a0729f0547", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Hafsahabib76/give2share-MobileApp
201
FILENAME: UserLoginResponse.java
0.203075
package com.se17.give2shareapplication.Model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class UserLoginResponse{ @SerializedName("user") @Expose private UserLogin user; @SerializedName("access_token") @Expose private String accessToken; /** * No args constructor for use in serialization * */ public UserLoginResponse() { } /** * * @param accessToken * @param user */ public UserLoginResponse(UserLogin user, String accessToken) { super(); this.user = user; this.accessToken = accessToken; } public UserLogin getUser() { return user; } public void setUser(UserLogin user) { this.user = user; } public String getAccessToken() { return accessToken; } public void setAccessToken(String accessToken) { this.accessToken = accessToken; } }
7ed93a04-fb24-4008-8594-e0ee1796c149
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-31 03:50:01", "repo_name": "amitp499/Classroom-Traing", "sub_path": "/src/com/pSerial/AccountInfor.java", "file_name": "AccountInfor.java", "file_ext": "java", "file_size_in_byte": 1111, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "5a656d95e608c3804ded2e229e8ca50ddf8cdbab", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/amitp499/Classroom-Traing
245
FILENAME: AccountInfor.java
0.250913
package com.pSerial; import java.io.Serializable; public class AccountInfor implements Serializable { String accountName; String acctNo; String actBalance; public AccountInfor(String accountName, String acctNo, String actBalance) { this.accountName = accountName; this.acctNo = acctNo; this.actBalance = actBalance; } public String getAccountName() { return accountName; } public void setAccountName(String accountName) { this.accountName = accountName; } public String getAcctNo() { return acctNo; } public void setAcctNo(String acctNo) { this.acctNo = acctNo; } public String getActBalance() { return actBalance; } public void setActBalance(String actBalance) { this.actBalance = actBalance; } @Override public String toString() { return "AccountInfor{" + "accountName='" + accountName + '\'' + ", acctNo='" + acctNo + '\'' + ", actBalance='" + actBalance + '\'' + '}'; } }
8f4b00bc-54be-4c26-8f2a-5e6eeaf04b88
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-09 02:51:17", "repo_name": "pengzp/lovepet", "sub_path": "/src/main/java/com/pet/lovepet/base/ResponseResult.java", "file_name": "ResponseResult.java", "file_ext": "java", "file_size_in_byte": 1091, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "8e7d5e19efa2c461fd2d3979f77ea578d929560f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pengzp/lovepet
191
FILENAME: ResponseResult.java
0.239349
package com.pet.lovepet.base; import lombok.Data; import java.io.Serializable; @Data public class ResponseResult implements Serializable { private String code; private String message; private StatusMessage statusMessage; public ResponseResult() { this.statusMessage = StatusMessage.SUCCESS; this.code = statusMessage.getCode(); this.message = statusMessage.getMessage(); } public ResponseResult(String code, String message){ this.code = code; this.message = message; } public static ResponseResult successResult(){ return new ResponseResult(); } public static ResponseResult errorResult(){ return new ResponseResult(StatusMessage.ERROR.getCode(),StatusMessage.ERROR.getMessage()); } public static ResponseResult errorResult(String code,String message){ return new ResponseResult(code,message); } public static ResponseResult errorResult(StatusMessage statusMessage){ return new ResponseResult(statusMessage.getCode(),statusMessage.getMessage()); } }
767f28ce-b13c-44d7-a386-406cd03bb632
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-11 02:44:15", "repo_name": "LucasKrmpotic/java-remote-filesystem", "sub_path": "/rfs-client/src/remoteobjects/RequestSignUp.java", "file_name": "RequestSignUp.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "54b9704b799b16d7465c69890417f82764f6f1aa", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/LucasKrmpotic/java-remote-filesystem
193
FILENAME: RequestSignUp.java
0.268941
package remoteobjects; import java.io.Serializable; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class RequestSignUp extends RFSCommand{ String username; String password; public RequestSignUp(String username, String password) { this.username = username; this.password = password; } public RFSCommand exec(Object server) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { Method method = server.getClass().getMethod("signup", String.class, String.class); String token = (String) method.invoke(server, this.username, this.password); if (token != null) { RFSCommand response = new RFSCommand(); response.setUserToken(token); return response; } RFSCommand error = new RFSCommand(); error.setError(true); error.setErrorMessage("No ha podido loguearse"); return error; } }
8813f118-52f1-4243-afc7-83857cf05e89
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-07-26T03:36:39", "repo_name": "Vindexus/testlists", "sub_path": "/readme.md", "file_name": "readme.md", "file_ext": "md", "file_size_in_byte": 1191, "line_count": 41, "lang": "en", "doc_type": "text", "blob_id": "705e04c621c2d466f5a3f2126ba4ed4637e4ecf4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Vindexus/testlists
299
FILENAME: readme.md
0.259826
# Testlists This is a tool to generate HTML checklists for testing your code from markdown files created in your project. Each `testlist.md` file you create in your project will have its own HTML page created. You can check off the items there. They are saved with localStorage in your browser. ## Installation `npm install Vindexus/testlists` ## testlist.md File Format The file accepts markdown. Any line beginning with ` * ` will turn into a checkbox. Example: ``` # Registration Page * Email validation is working * Social media icons are up-to-date ``` ## Scripts You can add these to your package.json ### Generate ``` "testlists": "node_modules/.bin/testlists", ``` ### Watch Requires the `nodemon` package ``` "watch-testlists": "nodemon -e md --ignore \"!(testlist).md\" --exec \"npm run testlists\"" ``` ## Configuration You can create your own config file at `/path/to/your/project/testlists.json` ### Config Values |key|description|default| |:--|:--|:--| |`destinationDir`|Where the HTML files with the checklists will be saved.|`/your/app/root/folder/testlists`| |`skippedDirectoryNames`|Don't check directories with these names.|`['.git', 'node_modules']`|
9879f6a0-d1da-4a07-854b-510ba5c0102b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-02-27 23:07:12", "repo_name": "jvanz/redditapp", "sub_path": "/app/src/main/java/com/vanzstuff/readdit/Utils.java", "file_name": "Utils.java", "file_ext": "java", "file_size_in_byte": 1191, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "1fb2f9bbd040838e86eab9dd7b0d2245e10a9186", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jvanz/redditapp
287
FILENAME: Utils.java
0.293404
package com.vanzstuff.readdit; public class Utils { private static final String URL_IMAGE = "^.+[jpg|jpeg|png|gif]$"; /** * Check if String s is not null or empty * @param s * @return true if string s is not null or empty. Otherwise, false */ public static final boolean stringNotNullOrEmpty(String s) { return !(s == null || s.isEmpty()); } /** * Check if String s is null or empty * @param s * @return true if string s is null or empty. Otherwise, false */ public static final boolean stringNullOrEmpty(String s) { return s == null || s.isEmpty(); } /** * Check if the String s is alphanumeric. * @param s * @return true if the string s is alphanumeric. Otherwise, false */ public static boolean isAlphaNumeric(String s) { return s.matches("\\w+"); } /** * Check if a given url is to an image ( url ending with images extensions like jpg and png ) * @param url the url to check * @return true if is a url to an image. Otherwise, false */ public static boolean isImageUrl(String url) { return url.matches(URL_IMAGE); } }
c3e5f64d-b35e-4589-9166-698b0b59a2ab
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-22 13:13:05", "repo_name": "EfrosEugeniu-md/rzia", "sub_path": "/src/main/java/ru/list/sorfe/rzia/service/impl/TransServiceImpl.java", "file_name": "TransServiceImpl.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "8c0c30c3c355aa61690317409282e8d43bdc7152", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/EfrosEugeniu-md/rzia
182
FILENAME: TransServiceImpl.java
0.286968
package ru.list.sorfe.rzia.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import ru.list.sorfe.rzia.beans.station.TransformationCurrent; import ru.list.sorfe.rzia.repository.TransRepository; import ru.list.sorfe.rzia.service.TransService; import java.util.ArrayList; import java.util.List; @Service public class TransServiceImpl implements TransService { private final TransRepository transRepository; @Autowired public TransServiceImpl(TransRepository transRepository) { this.transRepository = transRepository; } @Override public TransformationCurrent save(TransformationCurrent trans) { return transRepository.save(trans); } @Override public List<TransformationCurrent> findAll() { List<TransformationCurrent> result = new ArrayList<>(); transRepository.findAll().forEach(result::add); return result; } }
b602e47b-2800-4a3a-8f58-aa96e6a5dfa3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-18 19:20:13", "repo_name": "AnomalyUK/wplinkfix", "sub_path": "/src/party/anomalyuk/wplinkfix/Dump.java", "file_name": "Dump.java", "file_ext": "java", "file_size_in_byte": 983, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "7fc99481f5e277bccb5e85ed006b6843c78faa8c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/AnomalyUK/wplinkfix
203
FILENAME: Dump.java
0.229535
package party.anomalyuk.wplinkfix; import java.io.BufferedReader; import java.io.InputStreamReader; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import javax.sql.DataSource; import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource; public class Dump { public static void main(String args[]) throws Exception { String pwd = new BufferedReader(new InputStreamReader(System.in)).readLine(); MysqlConnectionPoolDataSource ds = new MysqlConnectionPoolDataSource(); ds.setURL("jdbc:mysql://localhost/wp_database"); ds.setUser("wpuser"); ds.setPassword(pwd); Connection c = ds.getConnection(); PreparedStatement s = c.prepareStatement("select id, post_content from wp0_2_posts"); ResultSet rs = s.executeQuery(); while (rs.next()) { String post = rs.getString(2); Post p = new Post(rs.getString(1), post); for (String l : p.links()) { System.out.println(l); } } s.close(); c.close(); } }
aa1a4530-31f4-4015-8be3-2d7e2484f125
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-28 08:25:22", "repo_name": "liqisheng202123/test", "sub_path": "/dubbo-consumer/src/main/java/com/dubbo/dubboconsumer/service/GetAuthorService.java", "file_name": "GetAuthorService.java", "file_ext": "java", "file_size_in_byte": 976, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "e0ddb05e34cb5d9f6477f0d0c1d2988933589fd2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/liqisheng202123/test
223
FILENAME: GetAuthorService.java
0.23231
package com.dubbo.dubboconsumer.service; import com.dubbo.dubbodemo.entity.Author; import com.dubbo.dubbodemo.service.AuthorService; import jdk.nashorn.internal.ir.annotations.Reference; import org.springframework.stereotype.Component; import java.util.List; @Component public class GetAuthorService { @Reference private AuthorService auhtorService; public String sayHello(String name){ return auhtorService.test(name); } // public int addAuthor(Author author) { // return auhtorService.addAuthor(author); // } // // public int updateAuthor(Author author) { // return auhtorService.updateAuthor(author); // } // // public int deleteAuthor(Long id) { // return auhtorService.deleteAuthor(id); // } // // public Author findAuthor(Long id) { // return auhtorService.findAuthor(id); // } // // public List<Author> findAuthorList() { // return auhtorService.findAuthorList(); // } }
4db6ece3-7033-4e65-9102-6033b3ab16e4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-05 08:47:07", "repo_name": "xuliangliang1992/demo", "sub_path": "/app/src/main/java/com/byrj/pet/fun/login/code/VerificationCodeActivity.java", "file_name": "VerificationCodeActivity.java", "file_ext": "java", "file_size_in_byte": 1019, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "b516e0b2285322f779b3a0f994317c3427304732", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xuliangliang1992/demo
204
FILENAME: VerificationCodeActivity.java
0.203075
package com.byrj.pet.fun.login.code; import android.os.Bundle; import android.support.annotation.Nullable; import com.byrj.pet.base.BaseActivity; import com.byrj.pet.injection.Injection; import com.byrj.pet.pet.R; import com.xll.mvplib.utils.ActivityUtils; /** * 验证码登录 * * @author xll * @date 2018/12/5 */ public class VerificationCodeActivity extends BaseActivity { @Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle("验证码登录"); VerificationCodeFragment fragment = (VerificationCodeFragment) getSupportFragmentManager().findFragmentById(R.id.fl_content); if (null == fragment) { fragment = VerificationCodeFragment.newInstance(); ActivityUtils.addFragmentToActivity(getSupportFragmentManager(), fragment, R.id.fl_content); } new VerificationCodePresenter(Injection.provideLoanRepository(),fragment,Injection.provideSchedulerProvider()); } }
8fd6f333-b0e3-4953-85ff-051e32161ea2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-01-26T08:49:10", "repo_name": "ToreAa/ServiceRobot2", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 966, "line_count": 16, "lang": "en", "doc_type": "text", "blob_id": "5c10e771f465297b7743a199a2bfec54c48a9959", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ToreAa/ServiceRobot2
210
FILENAME: README.md
0.253861
WRITE-UP OF PROJECT The source-files consists of seven packages, split between the official ROS packages in one folder and my own two packages in another folder. These two folders are pick_objects and using_markers. pick_objects sends goal poses to the robot. using_markers publishes visual markers in rviz. In addition, there are multiple bash scripts in the scripts folder. These launch a multiple of ros-packages in the appropiate order, each in its own xterminal. This makes sure that the ROS status messages are easily differentiated between the different nodes. Robot spawned with pose by modifying /officialROS/turtlebot_simulator/turtlebot_gazebo/launch/includes/kobuki.launch.xml (-Y 1.5708) The official packages are used to - spawn the robot in the environment (turtlebot and turtlebot_simulator) - interact with robot and get it to move (turtlebot_interactions) - to create a map (pgm_map_creator) - for localization (slam_gmapping), that does AMCL
088b8587-9de7-47c9-a012-9d4e040d2392
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-05 02:55:14", "repo_name": "TatsukiIshijima/PassGenerator_2", "sub_path": "/SampleApplication1/app/src/main/java/com/example/ti/sampleapplication1/tools/CategoryListItem.java", "file_name": "CategoryListItem.java", "file_ext": "java", "file_size_in_byte": 1248, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "51ae40bc08b2b582471a1c609e7d109d474996a2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/TatsukiIshijima/PassGenerator_2
295
FILENAME: CategoryListItem.java
0.285372
package com.example.ti.sampleapplication1.tools; import com.example.ti.sampleapplication1.R; import java.util.ArrayList; import java.util.List; /** * Created by TI on 2016/01/17. */ public class CategoryListItem { private int mImageId; private String mTitle; public int getmImageId() { return mImageId; } public void setmImageId(int id) { mImageId = id; } public String getmTitle() { return mTitle; } public void setmTitle(String name) { mTitle = name; } public static List<CategoryListItem> contentItem() { List<CategoryListItem> items = new ArrayList<>(); final String[] category = {"メール","SNS", "Web","コンピュータ","ショッピング","クレジットカード", "銀行", "その他"}; final int[] imageId = {R.drawable.mail, R.drawable.sns,R.drawable.webpage, R.drawable.computer, R.drawable.shop, R.drawable.creditcard, R.drawable.bank, R.drawable.file}; for (int i=0; i<category.length; i++) { CategoryListItem item = new CategoryListItem(); item.setmTitle(category[i]); item.setmImageId(imageId[i]); items.add(item); }; return items; } }
c63fd0e6-16c3-47d2-b8e7-9dc2c229e5a3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-10 14:39:58", "repo_name": "bustertm/Bakalarka1", "sub_path": "/src/main/java/com/bp_sevd/model/Location.java", "file_name": "Location.java", "file_ext": "java", "file_size_in_byte": 1107, "line_count": 66, "lang": "en", "doc_type": "code", "blob_id": "8d0650904a65fe91835f031cca6262e1db25f4d8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bustertm/Bakalarka1
263
FILENAME: Location.java
0.275909
package com.bp_sevd.model; import javax.persistence.*; import java.util.Set; /** * Created by Martin on 07.04.2017. */ @Entity @Table(name="location") public class Location { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id") private int id; @Column(name="nazov") private String nazov; @Column (name="sunIntensity") private double sunIntensity; @OneToMany(mappedBy = "location") private Set<Household> households ; public Set<Household> getHouseholds() { return this.households; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getNazov() { return nazov; } public void setNazov(String nazov) { this.nazov = nazov; } public double getSunIntensity() { return sunIntensity; } public void setSunIntensity(double sunIntensity) { this.sunIntensity = sunIntensity; } public void setHouseholds(Set<Household> households) { this.households = households; } }
eb1ecbc0-6ade-4181-9a64-5b3d0f42c2e2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-30 14:12:43", "repo_name": "khsergvl/gateway_java", "sub_path": "/src/main/java/com/accenture/pay/gateway/entity/Account.java", "file_name": "Account.java", "file_ext": "java", "file_size_in_byte": 1085, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "0e489f68461702baa820976c18732fa72e8ccefb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/khsergvl/gateway_java
232
FILENAME: Account.java
0.279828
package com.accenture.pay.gateway.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import java.util.Objects; @Entity public class Account { public Account() {} public Account(Integer id, Double balance) { this.id = id; this.balance = balance; } @Id @Column private Integer id; @Column private Double balance; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Double getBalance() { return balance; } public void setBalance(Double balance) { this.balance = balance; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Account account = (Account) o; return Objects.equals(id, account.id) && Objects.equals(balance, account.balance); } @Override public int hashCode() { return Objects.hash(id, balance); } }
77f5d0e4-9c96-43fb-81f8-8b2eb77228cc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-08 10:06:46", "repo_name": "ashank/ZmeTest", "sub_path": "/app/src/main/java/com/funhotel/hmvp/test/classtest/MyUI.java", "file_name": "MyUI.java", "file_ext": "java", "file_size_in_byte": 356, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "a036e48e48266a1225bf3d94f80693ae8d62b6d8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ashank/ZmeTest
267
FILENAME: MyUI.java
0.258326
/* * Copyright (C) 2018 ZME * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.funhotel.hmvp.test.classtest; import android.app.Fragment; /** * Description :MyUI * Author:ZME * Create Time :2018/4/22 22:35 * Modify Time:2018/4/22 22:35 * Version:1.0 */ public class MyUI<T> extends Fragment{ My<String> ui=new My<>(); public MyUI() { } public void setYU(T t){ System.out.print(t); } }
9c69d1ce-af0b-4766-b674-6107193ae9d1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-11 06:01:34", "repo_name": "iamzhubao/phoenix", "sub_path": "/src/main/java/com/shengekeji/phoenix/util/HttpUtil.java", "file_name": "HttpUtil.java", "file_ext": "java", "file_size_in_byte": 1017, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "d09d732cc469f31ba2974c496337f2d0f6289451", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/iamzhubao/phoenix
248
FILENAME: HttpUtil.java
0.258326
package com.shengekeji.phoenix.util; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; public class HttpUtil { public static String sendGet(String url, String param) throws Exception { String result = ""; BufferedReader in = null; try { String e = url + param; URL realUrl = new URL(e); URLConnection connection = realUrl.openConnection(); connection.setConnectTimeout(3000); connection.connect(); String line; for (in = new BufferedReader(new InputStreamReader( connection.getInputStream())); (line = in.readLine()) != null; result = result + line) { ; } } catch (Exception var15) { var15.printStackTrace(); throw new Exception("发送GET请求出现异常!" + var15); } finally { try { if (in != null) { in.close(); } } catch (Exception var14) { var14.printStackTrace(); throw new Exception("关闭网络请求异常!" + var14); } } return result; } }
f3b6e443-a2f7-492b-89f9-bf3e4f31b417
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-06-06T21:52:15", "repo_name": "pxai/pxai.github.io", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1109, "line_count": 52, "lang": "en", "doc_type": "text", "blob_id": "4a7ca91cb6f14934994d01425805123c04bbc0ca", "star_events_count": 19, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/pxai/pxai.github.io
288
FILENAME: README.md
0.26971
# pello.io website Based on Jekyll ``` bundle exec jekyll serve ``` # useful commandss ``` $ jekyll build ``` => The current folder will be generated into ./_site ``` $ jekyll build --safe ``` Option for GitHub generation, does not generate any plugin or dynamic content ``` $ jekyll build --destination <destination> ``` => The current folder will be generated into <destination> ``` $ jekyll build --source <source> --destination <destination> ``` => The <source> folder will be generated into <destination> ``` $ jekyll build --watch ``` => The current folder will be generated into ./_site, watched for changes, and regenerated automatically. # Plugins instalation In _config.yml ``` plugins: [jekyll-coffeescript, jekyll-watch, jekyll-assets] ``` Instalation: ``` gem install jekyll-coffeescript jekyll-watch jekyll-assets ``` # Using theme: minima *Minima is a one-size-fits-all Jekyll theme for writers*. It's Jekyll's default (and first) theme. It's what you get when you run `jekyll new`. [Theme preview](https://jekyll.github.io/minima/) ![minima theme preview](/screenshot.png)
e4750740-af23-4f2f-910e-3174a1d5227c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-28 06:40:38", "repo_name": "hejiajie2008/mycloud", "sub_path": "/commons/src/test/java/com/cloud/commons/test/DesignTest.java", "file_name": "DesignTest.java", "file_ext": "java", "file_size_in_byte": 1102, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "50d7c84de0a3a12f34cb629018bd5dfe62c43dc3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hejiajie2008/mycloud
228
FILENAME: DesignTest.java
0.285372
package com.cloud.commons.test; import org.junit.jupiter.api.Test; import java.util.*; import java.util.concurrent.ConcurrentHashMap; public class DesignTest { class TestOne extends Observable{ @Override protected void setChanged() { super.setChanged(); } } @Test public void testOne(){ TestOne observer=new TestOne(); observer.addObserver(new Observer() { @Override public void update(Observable o, Object arg) { System.out.println(arg); } }); observer.setChanged(); observer.notifyObservers("okk"); } static Map<String,Object> map=new ConcurrentHashMap<String,Object>(8){{ put("one","one"); put("two","one"); put("three","one"); }}; private static void print(String s, Object o) { System.out.println("key="+s+",value="+o); map.remove("three"); } @Test public void testTwo(){ map.forEach(DesignTest::print); } @Test public void testFour(){ } }
5f5f91f7-85bb-45fc-9e6d-9b8cf9b30f2b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-02-27 10:10:20", "repo_name": "ExplorerGroup/RelativesCircle", "sub_path": "/RelativesCircleClient/app/src/main/java/com/android/relativescircle/ui/login/LoginActivity.java", "file_name": "LoginActivity.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "0407f23053af1d16600dd48ff30471030256604c", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ExplorerGroup/RelativesCircle
158
FILENAME: LoginActivity.java
0.220007
package com.android.relativescircle.ui.login; import android.os.Bundle; import android.support.v4.app.FragmentTransaction; import com.android.relativescircle.R; import com.android.relativescircle.base.BaseActivity; import com.android.relativescircle.utils.MemberListManager; import butterknife.ButterKnife; public class LoginActivity extends BaseActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); ButterKnife.bind(this); LoginFragment loginFragment = LoginFragment.newInstance(); FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); fragmentTransaction.add(R.id.fm_login,loginFragment); fragmentTransaction.commitAllowingStateLoss(); new LoginPresenter(loginFragment); MemberListManager mlm = MemberListManager.getInstance(); } }
eede2af7-20fc-49be-8e10-139bb47ba46e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-01 11:41:00", "repo_name": "SharanyaMenon/prms", "sub_path": "/src/java/sg/edu/nus/iss/phoenix/scheduleprogram/restful/ProgramSlots.java", "file_name": "ProgramSlots.java", "file_ext": "java", "file_size_in_byte": 1193, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "e574cf05284cc2a9c90d7b3d631c92bafa7b5cdb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/SharanyaMenon/prms
257
FILENAME: ProgramSlots.java
0.255344
/* * 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 sg.edu.nus.iss.phoenix.scheduleprogram.restful; import java.util.ArrayList; import java.util.Objects; import sg.edu.nus.iss.phoenix.scheduleprogram.entity.ProgramSlot; /** * * @author sharanya */ public class ProgramSlots { private ArrayList<ProgramSlot> pgSlots; public ArrayList<ProgramSlot> getPgSlots() { return pgSlots; } @Override public int hashCode() { int hash = 7; hash = 89 * hash + Objects.hashCode(this.pgSlots); return hash; } public void setPgSlots(ArrayList<ProgramSlot> pgSlots) { this.pgSlots = pgSlots; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ProgramSlots other = (ProgramSlots) obj; return true; } }
f20c1cd0-f65d-4c2f-b623-b5af51222498
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-17 19:18:58", "repo_name": "JoseSpx/Drinkeros-Back-end", "sub_path": "/src/main/java/com/josespx/drinkeros/service/ProviderServiceImpl.java", "file_name": "ProviderServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1191, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "5aab869edc88441a7d8f3074cd46152aac3df63f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JoseSpx/Drinkeros-Back-end
234
FILENAME: ProviderServiceImpl.java
0.272025
package com.josespx.drinkeros.service; import com.josespx.drinkeros.dao.ProviderDao; import com.josespx.drinkeros.model.Provider; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; @Transactional @Service(value = "providerService") public class ProviderServiceImpl implements ProviderService { private ProviderDao providerDao; @Autowired public ProviderServiceImpl(ProviderDao providerDao) { this.providerDao = providerDao; } @Override public void save(Provider provider) { this.providerDao.save(provider); } @Override public Provider findById(Long id) { return this.providerDao.findById(id).orElse(null); } @Override public List<Provider> findAll() { return this.providerDao.findAll(); } @Override public void delete(Long id) { this.providerDao.deleteById(id); } @Override public List<Provider> findAllByEliminatedEquals(String eliminated) { return this.providerDao.findAllByEliminatedEquals(eliminated); } }
f9d607cd-15d6-4047-95b4-cbe56ac40e10
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-25 04:09:56", "repo_name": "gopiklr5/projecttest01", "sub_path": "/src/seleniumPack/SecondTest.java", "file_name": "SecondTest.java", "file_ext": "java", "file_size_in_byte": 967, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "66126e353a126dc1e5ab2f1988c34668099ac502", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/gopiklr5/projecttest01
225
FILENAME: SecondTest.java
0.264358
package seleniumPack; import java.util.NoSuchElementException; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class SecondTest { public static void main(String[] args) throws InterruptedException { System.setProperty(Data.Key, Data.Value); WebDriver driver = new ChromeDriver(); // driver.get(""); driver.navigate().to(Data.URL); driver.findElement(By.id("username")).sendKeys(Data.username); driver.findElement(By.name("pwd")).sendKeys(Data.Password); driver.findElement(By.id("loginButton")).click(); Thread.sleep(5000); driver.manage().window().maximize(); Thread.sleep(5000); driver.findElement(By.id("logo_aT")).isDisplayed(); Thread.sleep(3000); while(true) { try { driver.findElement(By.id("logoutLink")).click(); System.out.println("Validation is success"); break; } catch(NoSuchElementException e) { } } } }
465e581a-3d36-4faa-8fa8-8365c469d27f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-18 19:35:52", "repo_name": "sayub/discovertoronto", "sub_path": "/app/src/main/java/toronto/amazinglocations/com/discovertoronto/misc/LocationEnabledChecker.java", "file_name": "LocationEnabledChecker.java", "file_ext": "java", "file_size_in_byte": 999, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "b9be88f674dc5b87c1fb1f2b1c321b5b0e5b6809", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sayub/discovertoronto
214
FILENAME: LocationEnabledChecker.java
0.282988
/* * @author Saad Muhammad Ayub * Copyright 2016, Saad Muhammad Ayub, All rights reserved. */ package toronto.amazinglocations.com.discovertoronto.misc; import android.app.Activity; import android.content.Context; import android.location.LocationManager; public class LocationEnabledChecker { public static boolean isLocationEnabled(Activity context) { LocationManager lm = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE); boolean gpsEnabled = false; boolean networkEnabled = false; // Checking if gps location is enabled. try { gpsEnabled = lm.isProviderEnabled(LocationManager.GPS_PROVIDER); } catch(Exception ex) {} // Checking if network location is enabled. try { networkEnabled = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER); } catch(Exception ex) {} // If both are disabled return false. if (!gpsEnabled && !networkEnabled) { return false; } // Else return true. return true; } }
31033af4-6080-4df1-87e8-ea7dc79cf485
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-04-21 13:56:50", "repo_name": "sergigrau/DAWDAMM03UF456-Java-exercicis", "sub_path": "/UF6. POO. Introducció a la persistència en BD/src/14 - ORM Relacions/ServeiAparcament.java", "file_name": "ServeiAparcament.java", "file_ext": "java", "file_size_in_byte": 965, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "6503eeaa3303f1a75f01de24e181ad262f643867", "star_events_count": 4, "fork_events_count": 6, "src_encoding": "UTF-8"}
https://github.com/sergigrau/DAWDAMM03UF456-Java-exercicis
248
FILENAME: ServeiAparcament.java
0.262842
import java.util.Date; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.TypedQuery; /** * * @author sergi */ public class ServeiAparcament { protected EntityManager em; public ServeiAparcament(EntityManager em) { this.em = em; } public Aparcament crearAparcament(String ubicacio) { Aparcament ap = new Aparcament(); ap.setUbicacio(ubicacio); em.persist(ap); return ap; } public void esborrarAparcament(int id) { Aparcament emp = trobarAparcament(id); if (emp != null) { em.remove(emp); } } public Aparcament trobarAparcament(int id) { return em.find(Aparcament.class, id); } public List<Aparcament> trobarTotsAparcaments() { TypedQuery<Aparcament> query = em.createQuery( "SELECT e FROM Aparcament e", Aparcament.class); return query.getResultList(); } }
765fe58e-eb5d-4ff8-9232-4026275137ad
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-02 16:24:14", "repo_name": "axeljovanny/UukuApp", "sub_path": "/UukuApp/src/main/java/developers/jar/uuku/about/AboutActivity.java", "file_name": "AboutActivity.java", "file_ext": "java", "file_size_in_byte": 1110, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "d349b397a0a918015e018697b13e965f997b0d6f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/axeljovanny/UukuApp
192
FILENAME: AboutActivity.java
0.200558
package developers.jar.uuku.about; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.method.LinkMovementMethod; import android.view.View; import android.widget.TextView; import butterknife.Bind; import butterknife.ButterKnife; public class AboutActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(developers.jar.uuku.R.layout.activity_about); } @Bind(developers.jar.uuku.R.id.messageWithLinkTextView) TextView messageWithLinkTextView; public void onViewCreated(View view, Bundle savedInstanceState) { super.findViewById(developers.jar.uuku.R.id.messageWithLinkTextView); ButterKnife.bind(this, view); messageWithLinkTextView.setMovementMethod(LinkMovementMethod.getInstance()); } public void lanzarPoliticas(View view){ Intent i = new Intent(this, PoliticasActivity.class); startActivity(i); } }
4d7934a4-35c3-4286-bc5b-ceeb6b55beb5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-10 06:35:18", "repo_name": "liangzhouci/S-Java", "sub_path": "/Net/TCP/Chat.java", "file_name": "Chat.java", "file_ext": "java", "file_size_in_byte": 1251, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "74c5deb8e0aa422c66788bd8611dd3de8dcc79f6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/liangzhouci/S-Java
224
FILENAME: Chat.java
0.267408
package Net.TCP; import java.io.*; import java.net.ServerSocket; import java.net.Socket; /** * 单人收发消息 * @author: CTH **/ public class Chat { public static void main(String[] args) { try { //创建服务端 ServerSocket server = new ServerSocket(9999); //阻塞等待接收 Socket client = server.accept(); DataInputStream dis = new DataInputStream( new BufferedInputStream(client.getInputStream()) ); DataOutputStream dos = new DataOutputStream( new BufferedOutputStream(client.getOutputStream()) ); boolean isRuning = true; while (isRuning) { //接收消息 String msg = dis.readUTF(); //发送消息 dos.writeUTF(msg); dos.flush(); } //释放资源 if (dis != null) { dis.close(); } if (dos != null) { dos.close(); } client.close(); } catch (IOException e) { e.printStackTrace(); } } }
ccf0b0a1-aa10-4fdd-ad02-3569572bdd2c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-19 04:40:39", "repo_name": "shailkumarimishra/spring-framework", "sub_path": "/boot/src/main/java/com/sirt/boot/hibernate/inheritancemapping/OldStudent.java", "file_name": "OldStudent.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "15ece5c2379ad91e6907025afc7c9752d28c5926", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/shailkumarimishra/spring-framework
218
FILENAME: OldStudent.java
0.271252
package com.sirt.boot.hibernate.inheritancemapping; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import javax.persistence.PrimaryKeyJoinColumn; import javax.persistence.Table; import lombok.Getter; import lombok.Setter; @Getter @Setter @Entity @Table(name = "old_student") //@PrimaryKeyJoinColumn(name = "sid") @DiscriminatorValue("old_stu") public class OldStudent extends Student { @Column(name = "old_company") private String oldCompany; @Column(name = "old_ctc") private double oldCTC; @Column(name = "old_company_email") private String oldCompanyEmail; public OldStudent() { } public OldStudent(int sid, String name, String city, String status, double totalFee, String oldCompany, double oldCTC, String oldCompanyEmail) { super(sid, name, city, status, totalFee); this.oldCompany = oldCompany; this.oldCTC = oldCTC; this.oldCompanyEmail = oldCompanyEmail; } }
a6e580cd-2eab-4e55-a327-d86a123df49e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-11-23 08:14:41", "repo_name": "ilee9999/enhanced-match-ticker-api", "sub_path": "/enhanced-match-ticker-api-common/src/main/java/com/hkesports/matchticker/vo/getprivacypolicy/GetprivacypolicyVo.java", "file_name": "GetprivacypolicyVo.java", "file_ext": "java", "file_size_in_byte": 1192, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "95b646bc36cc497acb76e77e501d53fdd5a91c85", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ilee9999/enhanced-match-ticker-api
280
FILENAME: GetprivacypolicyVo.java
0.272799
package com.hkesports.matchticker.vo.getprivacypolicy; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.hkesports.matchticker.vo.BasicVo; /** * @author manboyu * */ public class GetprivacypolicyVo extends BasicVo { private static final long serialVersionUID = 1L; private String enPrivacyPolicy; private String twPrivacyPolicy; public GetprivacypolicyVo() { } public GetprivacypolicyVo(String enPrivacyPolicy, String twPrivacyPolicy) { this.enPrivacyPolicy = enPrivacyPolicy; this.twPrivacyPolicy = twPrivacyPolicy; } public String getEnPrivacyPolicy() { return enPrivacyPolicy; } public void setEnPrivacyPolicy(String enPrivacyPolicy) { this.enPrivacyPolicy = enPrivacyPolicy; } public String getTwPrivacyPolicy() { return twPrivacyPolicy; } public void setTwPrivacyPolicy(String twPrivacyPolicy) { this.twPrivacyPolicy = twPrivacyPolicy; } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) .append("enPrivacyPolicy", getEnPrivacyPolicy()) .append("twPrivacyPolicy", getTwPrivacyPolicy()) .build(); } }
e3b0e6e6-c0c9-48d3-8bd3-8b28059428be
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-22 04:01:45", "repo_name": "snapthecode/boot1", "sub_path": "/src/main/java/dev40/querydsl/QuerydslApplication.java", "file_name": "QuerydslApplication.java", "file_ext": "java", "file_size_in_byte": 1192, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "b2607527b7629bdf13bb895b394b6d5d718235f4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/snapthecode/boot1
248
FILENAME: QuerydslApplication.java
0.262842
package dev40.querydsl; import lombok.extern.slf4j.Slf4j; import org.h2.tools.Server; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import java.io.File; import java.sql.SQLException; @SpringBootApplication @EnableJpaAuditing @Slf4j public class QuerydslApplication { public static void main(String[] args) { startH2Server(); SpringApplication.run(QuerydslApplication.class, args); } private static void startH2Server() { try { String absolutePath = new File("./db").getAbsolutePath(); Server h2Server = Server.createTcpServer("-tcp", "-tcpAllowOthers", "-ifNotExists","-tcpPort", 8001+"","-key", "-baseDir", absolutePath).start(); if (h2Server.isRunning(true)) { log.info("H2 server was started and is running."); } else { throw new RuntimeException("Could not start H2 server."); } } catch (SQLException e) { throw new RuntimeException("Failed to start H2 server: ", e); } } }
61249637-4ad4-4541-8b93-7248ffd2fd0e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-10-19 14:56:54", "repo_name": "biridian/PlayPoll2", "sub_path": "/PlayPoll/src/main/java/com/sds/playpoll/service/UserService.java", "file_name": "UserService.java", "file_ext": "java", "file_size_in_byte": 987, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "3f31fc4b51217e54ebb6f4023a8d3448786b8b12", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/biridian/PlayPoll2
168
FILENAME: UserService.java
0.264358
package com.sds.playpoll.service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import com.sds.playpoll.domain.entity.User; import com.sds.playpoll.domain.repository.UserRepository; @Service public class UserService implements UserDetailsService { static final Logger LOG = LoggerFactory.getLogger(UserService.class); @Autowired protected UserRepository userRepository; @Override public User loadUserByUsername(String username) throws UsernameNotFoundException { return userRepository.findByUsername(username); } public User makeUser(User user) { LOG.debug("UserService makeUser"); System.out.println("UserService makeUser : "+user.toString()); return userRepository.save(user); } }
49b5421a-bbec-4122-ad00-96e82a2da516
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2022-02-01T19:48:27", "repo_name": "ravendesignsystem/rds", "sub_path": "/src/docs/dev/blocks/main/imagetile/index.md", "file_name": "index.md", "file_ext": "md", "file_size_in_byte": 1018, "line_count": 31, "lang": "en", "doc_type": "text", "blob_id": "af00cd745ea63cf41de6f1f0701ad1af6f22205d", "star_events_count": 5, "fork_events_count": 3, "src_encoding": "UTF-8"}
https://github.com/ravendesignsystem/rds
222
FILENAME: index.md
0.224055
--- layout: docs subsite: dev menu: dev title: Image Tiles section: Blocks subsection: Main Blocks --- The image tile block allows you to feature content using images as the primary focal point. The left hand portion of the block is the featured content and uses a large image with title and excerpt, while the right hand side displays 4 additional items with hover effects to reveal the excerpt. <img src="https://cu-rds.s3.amazonaws.com/docs/assets/imagetile.png" alt="Image tile sections"> ## Markup Example ```html {% filter escape %} {% include 'imagetile/imagetile' %} {% endfilter %} ``` ## Block details | {{ page.title }} block meta | values | | :-------------------------- | :-------------- | | handle | `imagetile` | | width type | full | | colour options | `u-block--full` | | section use | `<main>` | | has heading | false | | theme(s) | CU |
3db819aa-c127-4536-ade4-f12ca7a5e6e0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-20 16:23:17", "repo_name": "youdliang/lor", "sub_path": "/src/main/java/com/ecsolutions/Validators/DocumentValidate.java", "file_name": "DocumentValidate.java", "file_ext": "java", "file_size_in_byte": 1135, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "e25077408603e80caaf144fc3528f8e4ac14d97e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/youdliang/lor
222
FILENAME: DocumentValidate.java
0.276691
package com.ecsolutions.Validators; import com.ecsolutions.entity.document_entity; import org.springframework.stereotype.Component; import org.springframework.validation.Errors; import org.springframework.validation.Validator; /** * Created by tim on 2017/7/4. */ @Component public class DocumentValidate implements Validator { @Override public void validate(Object target, Errors errors) { document_entity documentForm = (document_entity) target; int effectiveDate = Integer.parseInt(documentForm.getEffectivedate()); int expiryDate = Integer.parseInt(documentForm.getExpirydate()); if (!(documentForm.getEffectivedate().isEmpty()) || !(documentForm.getExpirydate().isEmpty())){ if (effectiveDate > expiryDate) { errors.rejectValue("effectivedate", "ddd", "生效日期不应晚于到期日期."); errors.rejectValue("expirydate", "ddd", "到期日期不应早于生效日期."); } } } @Override public boolean supports(Class<?> clazz) { return document_entity.class.isAssignableFrom(clazz); } }
d00bbe02-bbe5-4199-a94f-570293c8c7f7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-22 15:16:26", "repo_name": "iamEtornam/GroundUp", "sub_path": "/app/src/main/java/io/github/regnex/groundup/ViewHolder/CategoryViewHolder.java", "file_name": "CategoryViewHolder.java", "file_ext": "java", "file_size_in_byte": 1072, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "dd7692e96960059855dede8a065f8de12ed05439", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/iamEtornam/GroundUp
190
FILENAME: CategoryViewHolder.java
0.267408
package io.github.regnex.groundup.ViewHolder; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; import io.github.regnex.groundup.Interface.ItemClickListener; import io.github.regnex.groundup.R; /** * Created by HP on 19/02/2018. */ public class CategoryViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { public TextView categoty_name; public ImageView background_image; ItemClickListener itemClickListener; public void setItemClickListener(ItemClickListener itemClickListener) { this.itemClickListener = itemClickListener; } public CategoryViewHolder(View itemView) { super(itemView); background_image = itemView.findViewById(R.id.image); categoty_name = itemView.findViewById(R.id.name); itemView.setOnClickListener(this); } @Override public void onClick(View view) { itemClickListener.onClick(view,getAdapterPosition()); } }
b2f309e8-0135-4206-85d1-80d0ad8edb81
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-29 19:52:33", "repo_name": "LubaEremenko/oop-reboot-homework1", "sub_path": "/src/com/company/TestDriver.java", "file_name": "TestDriver.java", "file_ext": "java", "file_size_in_byte": 1192, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "e58c0cf58458deae189638e491afbdc1c0060b96", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/LubaEremenko/oop-reboot-homework1
272
FILENAME: TestDriver.java
0.27513
package com.company; public class TestDriver { public static void run(){ testApple(); testBag(); testBoard(); testBook(); testPencil(); } private static void testApple(){ Apple a = new Apple("Granny Smith"); System.out.println("Apple variety is " + a.getVariety()); Apple ap = new Apple("Spain"); System.out.println("Apple produced in " + ap.getManufacturer()); } private static void testBag(){ Bag b = new Bag("leather"); System.out.println("This bag made of " + b.getMadeOf()); } private static void testBoard(){ Board bd = new Board("black"); System.out.println("Board has " + bd.getColour() + " colour"); } private static void testBook(){ Book bk = new Book("Armageddon"); System.out.println("Title of the book is " + bk.getName()); Book bka = new Book("Tim Lahaye"); System.out.println("The book was written by " + bka.getAuthor()); } private static void testPencil(){ Pencil p = new Pencil("blue"); System.out.println("Only " + p.getColour() + " pencils are on sale"); } }
13b52505-431c-4ae0-a13c-d391d00dd129
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-22 09:06:19", "repo_name": "YuichiHamamoto/SE319-Project", "sub_path": "/Backend/TrackYourFridge/src/main/java/com/t09/TrackYourFridge/repo/FridgeRepo.java", "file_name": "FridgeRepo.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "e2177f99d2668d720452412ffc2e8cca2f371aa0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/YuichiHamamoto/SE319-Project
215
FILENAME: FridgeRepo.java
0.253861
package com.t09.TrackYourFridge.repo; import com.t09.TrackYourFridge.models.FoodItem; import com.t09.TrackYourFridge.models.Fridge; import com.t09.TrackYourFridge.models.User; import org.springframework.data.jpa.repository.JpaRepository; import java.util.ArrayList; import java.util.List; public interface FridgeRepo extends JpaRepository<Fridge, Integer> { default List<Fridge> getString(String s) { List<Fridge> fridgeResult = new ArrayList<>(); for (Fridge f : this.findAll()) { if (f.getFridgename().equals(s)) { fridgeResult.add(f); } } return fridgeResult; } default List<String> getFridgeByUser(String s) { List<String> fridges = new ArrayList<>(); for (Fridge fridge : this.findAll()) { if (fridge.getUsername().equals(s)) { fridges.add(fridge.getFridgename()); } } return fridges; } }
4d9c05ed-55a1-4ad6-a740-5974b6851c39
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-01-11T22:51:02", "repo_name": "efrei-paris-sud/2020-C-Just-do-it", "sub_path": "/lab/4/Ex1/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 985, "line_count": 37, "lang": "en", "doc_type": "text", "blob_id": "6740016db3e407ee63f476da6865d29b17b29f1a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/efrei-paris-sud/2020-C-Just-do-it
343
FILENAME: README.md
0.285372
# Exercise 1 In this exercice, we need to upload the Blink LED source code. build the circut and see if it works. ## Schematic ![Test Image00](https://github.com/efrei-paris-sud/2020-C-Just-do-it/blob/main/lab/4/Ex1/130532617_145776116946750_3652552744816391959_n.png) ## Code ```Arduino const int led = 21; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second } ``` ## Board Image ![Board](https://github.com/efrei-paris-sud/2020-C-Just-do-it/blob/main/lab/4/Ex1/129411623_133665651685408_4786929376080953025_n.jpg) ## Issues
858e42a0-ab44-435d-a49a-d78b2fac708e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-09-25T20:14:10", "repo_name": "arnoldpatrickm/ASimpleGame", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 986, "line_count": 21, "lang": "en", "doc_type": "text", "blob_id": "ddb456051a48b50fcd02f9d4febe5087758ff66c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/arnoldpatrickm/ASimpleGame
218
FILENAME: README.md
0.279828
# ASimpleGame Objective: create a game that presents a word and starts a timer. Using event listeners, the game then checks for the correct key to be input, however if the wrong key is input the text shrinks up to 3 times. On the third failure the time stops and GameOver appears. If all letters are input correctly the user is told "good job, try another?". Have a counter for number of wins in a row Aesthetic Details: When a correct letter is input, there should be a visual change to let the player know which letter they are on (maybe greyed out, or take away the letter completely) When the word is completed, it can be turned all gold, or just dissapear. when inputing an incorrect letter the letter could turn red. Using: HTML/CSS/Javascript Testing: test to make sure that all standard keys constitute an input including numbers not case sensitive, keep it simple shrink on incorrect input test counter continuity test timer reset on new word failure shows GameOver screen