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 |
|---|---|---|---|---|---|---|
04965edc-a462-4973-8f40-027f9df2736f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-08 21:43:15", "repo_name": "dikart/billing", "sub_path": "/src/test/java/com/rfl/billing/UserTestData.java", "file_name": "UserTestData.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "31f9a30abd015c257be87f7cff557420b05768c6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/dikart/billing | 254 | FILENAME: UserTestData.java | 0.281406 | package com.rfl.billing;
import com.rfl.billing.model.Role;
import com.rfl.billing.model.User;
import java.util.Collections;
import static com.rfl.billing.model.AbstractBaseEntity.START_SEQ;
public class UserTestData {
public static final TestMatcher<User> USER_MATCHER = TestMatcher.usingIgnoringFieldsComparator("registered", "roles");
public static final int ADMIN_ID = START_SEQ;
public static final int USER_ID = START_SEQ + 1;
public static final User admin = new User(ADMIN_ID, "Admin", "admin@gmail.com", "admin",
Role.ROLE_ADMIN);
public static final User user = new User(USER_ID, "User", "user@yandex.ru", "password",
Role.ROLE_USER);
public static User getNew() {
return new User(null, "New", "new@gmail.com", "newPass", Role.ROLE_USER);
}
public static User getUpdated() {
User updated = new User(user);
updated.setEmail("update@gmail.com");
updated.setName("UpdatedName");
updated.setPassword("newPass");
updated.setEnabled(false);
updated.setRoles(Collections.singletonList(Role.ROLE_ADMIN));
return updated;
}
}
|
d7520411-9ce9-4d0a-a59e-7a7847d38bcc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-06-30 18:15:02", "repo_name": "g-rauhoeft/enchantment", "sub_path": "/src/net/lunareffect/enchantment/results/PageAdapter.java", "file_name": "PageAdapter.java", "file_ext": "java", "file_size_in_byte": 1070, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "83d9c6c72f17a9464f08c396957937ca8ea4c646", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/g-rauhoeft/enchantment | 217 | FILENAME: PageAdapter.java | 0.291787 | package net.lunareffect.enchantment.results;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.app.Activity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
public class PageAdapter extends BaseAdapter{
private Activity context;
private JSONArray information;
public PageAdapter(Activity context, JSONArray information){
this.context = context;
this.information = information;
}
@Override
public int getCount() {
return information.length();
}
@Override
public Object getItem(int position) {
try {
return information.getJSONObject(position);
} catch (JSONException e) {
return null;
}
}
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
try {
JSONObject data = this.information.getJSONObject(position);
return PageViewFactory.getView(context.getApplicationContext(), data);
} catch (JSONException e) {
return null;
}
}
}
|
b95e1480-0bb3-480c-bed3-28950bf432b8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-07-28 05:26:52", "repo_name": "markuslamm/tree", "sub_path": "/src/test/java/proventis/tree/AbstractIntegrationTest.java", "file_name": "AbstractIntegrationTest.java", "file_ext": "java", "file_size_in_byte": 1036, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "566d985f331c22322b7d2468e4fcb67d8927e91b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/markuslamm/tree | 207 | FILENAME: AbstractIntegrationTest.java | 0.252384 | /**
*
*/
package proventis.tree;
import javax.inject.Inject;
import neo4j.tree.config.ApplicationConfig;
import org.junit.runner.RunWith;
import org.springframework.data.neo4j.support.Neo4jTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
import org.springframework.test.context.transaction.TransactionConfiguration;
import proventis.tree.config.Neo4jTestConfig;
/**
* @author Markus Lamm
*
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(loader = AnnotationConfigContextLoader.class, classes = { ApplicationConfig.class, Neo4jTestConfig.class })
@TransactionConfiguration(transactionManager = "neo4jTransactionManager", defaultRollback = true)
public abstract class AbstractIntegrationTest
{
@Inject
private Neo4jTemplate neo4jTemplate;
protected Neo4jTemplate getNeo4jTemplate() {
return neo4jTemplate;
}
}
|
08b37fce-b5e2-43e6-95e4-dfdf0993d613 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-14 02:17:05", "repo_name": "SaadBenn/Go2Fit", "sub_path": "/Go2Fit/source/app/src/androidTest/java/comp3350/srsys/LogInAcceptanceTest.java", "file_name": "LogInAcceptanceTest.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "4921f07aa324a4ca52ab09e833b32e38d0090cb9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/SaadBenn/Go2Fit | 249 | FILENAME: LogInAcceptanceTest.java | 0.275909 | package comp3350.srsys;
import android.support.test.rule.ActivityTestRule;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import comp3350.go2fit.Application.StartUp;
import comp3350.go2fit.R;
import static android.support.test.espresso.Espresso.closeSoftKeyboard;
import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
@RunWith(AndroidJUnit4.class)
public class LogInAcceptanceTest
{
//this is where the test will start running (in the StartUp activity)
@Rule
public ActivityTestRule<StartUp> activityRule = new ActivityTestRule<>(StartUp.class);
@Test
public void logIn()
{
//logging into Go2Fit
onView(withId(R.id.username)).perform(typeText("s"));
onView(withId(R.id.password)).perform(typeText("a"));
closeSoftKeyboard();
onView(withId(R.id.start_button)).perform(click());
}
}
|
573ba05b-810c-4175-809e-9421dd3ec294 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-04 02:26:30", "repo_name": "heylichen/IRLab", "sub_path": "/src/main/java/com/heylichen/ir/booleanretrieval/Term.java", "file_name": "Term.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "abd95867a75d0d2cc537934a6c0cb744f9deabfb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/heylichen/IRLab | 250 | FILENAME: Term.java | 0.255344 | package com.heylichen.ir.booleanretrieval;
import java.util.Objects;
import lombok.Getter;
import lombok.Setter;
/**
* Created by Chen Li on 2018/8/4.
*/
@Getter
@Setter
public class Term implements Comparable<Term> {
private String term;
private int docFrequency;
public Term(String term) {
this.term = term;
this.docFrequency = 0;
}
public Term(String term, int docFrequency) {
this.term = term;
this.docFrequency = docFrequency;
}
public void addDocFreqeuncy(int delta) {
this.docFrequency += delta;
}
@Override
public int compareTo(Term o) {
return this.getTerm().compareTo(o.term);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Term term1 = (Term) o;
return Objects.equals(term, term1.term);
}
@Override
public int hashCode() {
return Objects.hash(term);
}
}
|
b7547896-3dff-4d62-b2bf-b8659e884c72 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2023-08-24T13:51:56", "repo_name": "alphagov/govuk-aws", "sub_path": "/docs/architecture/decisions/0022-remove-the-elasticsearch-proxy.md", "file_name": "0022-remove-the-elasticsearch-proxy.md", "file_ext": "md", "file_size_in_byte": 1160, "line_count": 37, "lang": "en", "doc_type": "text", "blob_id": "fc61078c7939c79bc7ca436c00c03017900b8524", "star_events_count": 430, "fork_events_count": 90, "src_encoding": "UTF-8"} | https://github.com/alphagov/govuk-aws | 247 | FILENAME: 0022-remove-the-elasticsearch-proxy.md | 0.212069 | # 22. Remove the Elasticsearch proxy
Date: 2017-08-16
## Status
Accepted
## Context
We currently have a local nginx based proxy for Elasticsearch connections
on a number of our machines. The original reason for this was:
```
Load balance connections to Elasticsearch by creating a loopback-only
vhost in Nginx which will forward to a set of Elasticsearch servers.
This is for the benefit of applications with client libraries that don't
support native cluster awareness or load balancing.
```
In the AWS environments these services are behind an ELB so this layer may
no longer be required.
## Decision
We've tested the instances in AWS without the local proxies and we have not discovered any
degradation of service when using the ELBs. In light of this we will remove the configuration and
exclude this puppet code from running in AWS and accept the ELBs as its replacement.
## Consequences
There will be a slight difference, considered by the team to be an improvement,
between the current environments and the new, AWS ones. This means we won't be
testing the exact same thing but will simplify the networking and application
data flow paths.
|
18bdc694-6d85-436e-a38d-24ba13921b49 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-10-04 04:45:15", "repo_name": "Stealth2800/SimplePromoter", "sub_path": "/src/main/java/com/stealthyone/mcb/simplepromoter/UpdateCheckRunnable.java", "file_name": "UpdateCheckRunnable.java", "file_ext": "java", "file_size_in_byte": 991, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "29ff9f56fb95fdb959adc63d2b1d698ab6fd8f14", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Stealth2800/SimplePromoter | 233 | FILENAME: UpdateCheckRunnable.java | 0.278257 | package com.stealthyone.mcb.simplepromoter;
import com.stealthyone.mcb.simplepromoter.SimplePromoter.Log;
import com.stealthyone.mcb.simplepromoter.config.ConfigHelper;
public final class UpdateCheckRunnable implements Runnable {
private SimplePromoter plugin;
public UpdateCheckRunnable(SimplePromoter plugin) {
this.plugin = plugin;
}
@Override
public final void run() {
if (ConfigHelper.CHECK_FOR_UPDATES.getBoolean()) {
UpdateChecker updateChecker = new UpdateChecker(plugin);
updateChecker.checkForUpdates();
if (updateChecker.isUpdateNeeded()) {
Log.info("Found a different version on BukkitDev! (Remote: " + updateChecker.getNewVersion() + " | Current: " + plugin.getVersion() + ")");
Log.info("You can download it from: " + updateChecker.getVersionLink());
}
} else {
Log.info("Update checker is disabled, enable in config for auto update checking.");
Log.info("You can also check for updates by typing the version command.");
}
}
} |
db4c9e0e-befe-484a-aa50-dc40c0422599 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-09 13:14:39", "repo_name": "seerdaryilmazz/OOB", "sub_path": "/kartoteks-service/src/main/java/ekol/kartoteks/domain/validator/MultiThreading.java", "file_name": "MultiThreading.java", "file_ext": "java", "file_size_in_byte": 1055, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "c088ce7bf19069e3999519426262b589b970b2b3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/seerdaryilmazz/OOB | 252 | FILENAME: MultiThreading.java | 0.284576 | package ekol.kartoteks.domain.validator;
/**
* Created by Dogukan Sahinturk on 16.03.2020
*/
public class MultiThreading implements Runnable {
private Thread t;
private String threadName;
MultiThreading( String name) {
threadName = name;
System.out.println("Creating " + threadName );
}
public void run() {
System.out.println("Running " + threadName );
try {
for(int i = 4; i > 0; i--) {
System.out.println("Thread: " + threadName + ", " + i + " Id: " + t.getId());
// Let the thread sleep for a while.
Thread.sleep(50);
}
} catch (InterruptedException e) {
System.out.println("Thread " + threadName + " interrupted.");
}
System.out.println("Thread " + threadName + " exiting.");
}
public void start () {
System.out.println("Starting " + threadName );
if (t == null) {
t = new Thread (this, threadName);
t.start ();
}
}
}
|
7a6c4feb-824d-4db3-8bae-8b0763bb7311 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-31 10:20:13", "repo_name": "4deepanshu/Android-Development", "sub_path": "/ChildShieldParent/app/src/main/java/com/schoolshieldparent_ui/controller/helper/custom_functions/SoftKeyboard.java", "file_name": "SoftKeyboard.java", "file_ext": "java", "file_size_in_byte": 979, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "208028de8552f00920d7f8a4e4c1b5a8d895b828", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/4deepanshu/Android-Development | 183 | FILENAME: SoftKeyboard.java | 0.252384 | package com.schoolshieldparent_ui.controller.helper.custom_functions;
import android.app.Activity;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import com.schoolshieldparent_ui.view.custom_controls.EditText_Regular;
/**
* Created by root on 17/8/16.
*/
public class SoftKeyboard {
public static void hideSoftKeyboard(Activity activity,EditText_Regular editText) {
View view = editText;
if (view != null) {
InputMethodManager imm = (InputMethodManager) activity.getSystemService( activity.INPUT_METHOD_SERVICE );
imm.hideSoftInputFromWindow( view.getWindowToken(), 0 );
}
}
public static void showSoftKeyboard(Activity activity, EditText editText) {
InputMethodManager imm = (InputMethodManager) activity.getSystemService( activity.INPUT_METHOD_SERVICE );
imm.showSoftInput( editText, InputMethodManager.SHOW_IMPLICIT );
}
}
|
67a9ce12-366e-4920-8e8b-a37c2f3cb4bb | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-31 12:00:29", "repo_name": "AnthonyOrtiz/Reserva_Salas_UTPL", "sub_path": "/src/logica/Expresiones.java", "file_name": "Expresiones.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 59, "lang": "en", "doc_type": "code", "blob_id": "7d06d9b07193eeb0ed6dc992e2bb85e61f46d67c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/AnthonyOrtiz/Reserva_Salas_UTPL | 268 | FILENAME: Expresiones.java | 0.282988 | /*
* 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 logica;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.JTextField;
/**
*
* @author Salas
*/
public class Expresiones {
public boolean validarMail(String email) {
Pattern pat= Pattern.compile("^[\\w-]+(\\.[\\w-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$");
// if (email.length() == 20) {
//
// }
Matcher mat = pat.matcher(email);
if (mat.find()) {
return true;
} else {
return false;
}
}
public boolean validarNumeros(String celular) {
boolean t = false;
Pattern pat = Pattern.compile("[0-9]{10}");
if (celular.length() == 10) {
Matcher mat = pat.matcher(celular);
if (mat.find()) {
t = true;
} else {
t = false;
}
}
return t;
}
}
|
ed0f284c-c2e9-42bc-870d-b6f0c3d9dce8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-07 14:51:18", "repo_name": "MickeyDang/Konnect", "sub_path": "/app/src/main/java/mmd/konnect/Activities/MapActivity.java", "file_name": "MapActivity.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "a0be0e6b6bba6a3c484a2611765fd01395f04ce4", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/MickeyDang/Konnect | 159 | FILENAME: MapActivity.java | 0.20947 | package mmd.konnect.Activities;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;
import mmd.konnect.Fragments.MapFragment;
import mmd.konnect.R;
public class MapActivity extends AppCompatActivity implements MapFragment.OnFragmentInteractionListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
getSupportActionBar().setTitle(getString(R.string.title_placepicker_activity));
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.replace(R.id.fragment_container, MapFragment.newInstance());
fragmentTransaction.commit();
}
@Override
public void onFragmentInteraction() {
}
}
|
ebbaeede-a13f-411c-a13c-d9edd87b4214 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-12 17:02:10", "repo_name": "GavinMarsh/scalperBot", "sub_path": "/src/main/java/Activate.java", "file_name": "Activate.java", "file_ext": "java", "file_size_in_byte": 1094, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "9e69f83e760f999a26ad60c5c3114bfaf23d0cca", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/GavinMarsh/scalperBot | 224 | FILENAME: Activate.java | 0.264358 | import org.telegram.telegrambots.meta.api.objects.replykeyboard.buttons.InlineKeyboardButton;
import java.util.ArrayList;
import java.util.List;
public class Activate {
public static void command() {
Bot.messageDelete(); //delete previous message
Bot.setAddKeyboard(true); // add a new keyboard
Bot.active = true;
Bot.trading = "*yes*";
//create a list of keyboard rows
List<List<InlineKeyboardButton>> buttons = new ArrayList<>();
//buttons
List<InlineKeyboardButton> showSettings = new ArrayList<>();
showSettings.add(new InlineKeyboardButton().setText("stop").setCallbackData("stop"));
showSettings.add(new InlineKeyboardButton().setText("settings").setCallbackData("settings"));
buttons.add(showSettings);
//send button array to Bot variable buttonArray
Bot.setButtonArray(buttons);
// new bot object to be able to send a message as sendMsg() is not static
Bot settings = new Bot();
settings.sendMsg(Bot.getChatId(), "🤖 okay i'm trading");
}
}
|
95e7bf35-8c38-47f5-83b1-19768d9c58d9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-19 09:09:05", "repo_name": "woutbr/sosit18", "sub_path": "/Sosit18/src/java/be/hbo5/java/menu/MenuLink.java", "file_name": "MenuLink.java", "file_ext": "java", "file_size_in_byte": 978, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "8a912d6ab1b61c177ffd2046e2ef8d048d444ecd", "star_events_count": 2, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/woutbr/sosit18 | 232 | FILENAME: MenuLink.java | 0.242206 | package be.hbo5.java.menu;
/**
* @author woutbr@student.hik.be
*/
public class MenuLink extends MenuItem{
private String outcome;
public MenuLink(String name, String roles, String href) {
super(name, roles);
this.outcome = href;
}
public String getOutcome() {
return outcome;
}
public void setOutcome(String outcome) {
this.outcome = outcome;
}
@Override
public String toString() {
return "MenuLink{" + "name=" + getName() + ", outcome=" + outcome + ", roles=" + getRoles() + '}';
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof MenuLink)) {
return false;
}
MenuLink other = (MenuLink) obj;
return !((this.outcome == null && other.outcome != null) || (this.outcome != null && !this.outcome.equals(other.outcome)));
}
@Override
public int hashCode() {
return this.outcome.hashCode() + 53;
}
}
|
2977e812-6760-4706-bf08-d4dbc606cb0b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-03 14:48:23", "repo_name": "lsecotaro/svc-auto-admin-site", "sub_path": "/src/main/java/com/devsupernova/autoadminsite/restservice/categories/CategoryService.java", "file_name": "CategoryService.java", "file_ext": "java", "file_size_in_byte": 990, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "276ad589e6986790fd0f5161d1520e14bfabdf65", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/lsecotaro/svc-auto-admin-site | 169 | FILENAME: CategoryService.java | 0.259826 | package com.devsupernova.autoadminsite.restservice.categories;
import com.devsupernova.autoadminsite.restservice.utils.IdGenerator;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
@Service
@RequiredArgsConstructor
public class CategoryService {
private final CategoryRepository repository;
public List<Category> getAll(){
return repository.findAll();
}
public List<Category> getAllActive(){
return repository.findAll().stream()
.filter(Category::isActive)
.collect(Collectors.toList());
}
public Category add(Category category){
category.setId(IdGenerator.generate());
return repository.save(category);
}
public Category update(Category category){
return repository.save(category);
}
public void delete(String id){
repository.delete(repository.getOne(id));
}
}
|
4afb4f4f-402d-48bc-a144-065714232c04 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-05-28T13:38:28", "repo_name": "loudy-art/ZoomLinks", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1053, "line_count": 21, "lang": "en", "doc_type": "text", "blob_id": "66b09b583e60d0ea1ad1007aa7e78539acee9ab4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/loudy-art/ZoomLinks | 235 | FILENAME: README.md | 0.2227 | # ZoomLinks
Zoom links is a simple Python program that can automate sending e-mails to multiple people on an .xlsx file.
How it works?
> You run the program ->
> select the .xlsx file that contains NAME and EMAIL ->
> paste the URL that you wanna send on your e-mail, which in my case, was a Zoom recording link.
What can you implement?
My first intention was to connect this with the Zoom API (https://marketplace.zoom.us/docs/api-reference/zoom-api), so that i can automatically fetch the recordings,
and get the link of the last one, so when a new recording will pop, the program will run and send it to the corresponding people.
I didn't do it because zoom really needs HTTPS to work with their API so that was red flag for the time that i had lol.
Also, you can add some graphic interface to this, because at the time i'm running the program from terminal, which is not bad but it might be hard to understand
for the average people.
I'm uploading this so maybe someone can start from the point that i left make something else, byebye<3
|
39093a28-8bad-45fe-a519-c5e4d42b5162 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-28 18:53:03", "repo_name": "minemeraj/assignment6", "sub_path": "/Source/jhotdraw7/src/main/java/de/rwth/swc/oosc/group111/Main.java", "file_name": "Main.java", "file_ext": "java", "file_size_in_byte": 990, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "9aa1d0573aba9e2765b4395fb3e6d795c01a2300", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/minemeraj/assignment6 | 244 | FILENAME: Main.java | 0.279828 | package de.rwth.swc.oosc.group111;
import org.jhotdraw.app.Application;
import org.jhotdraw.app.OSXApplication;
import org.jhotdraw.app.SDIApplication;
import org.jhotdraw.util.ResourceBundleUtil;
public class Main {
/** Creates a new instance. */
public static void main(String[] args) {
// Debug resource bundle
ResourceBundleUtil.setVerbose(true);
Application app;
String os = System.getProperty("os.name").toLowerCase();
if (os.startsWith("mac")) {
app = new OSXApplication();
} else if (os.startsWith("win")) {
app = new SDIApplication();
} else {
app = new SDIApplication();
}
SWCArchitectApplicationModel model = new SWCArchitectApplicationModel();
model.setName("SWCArchitect");
model.setVersion(Main.class.getPackage().getImplementationVersion());
model.setCopyright("Copyright 2016 (c) by group111");
model.setViewClassName("org.jhotdraw.samples.svg.SVGView");
app.setModel(model);
app.launch(args);
}
}
|
a61ffe36-0537-4f62-8199-3f9a2ddaba54 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-11-28 02:31:10", "repo_name": "Samders/CorpoAgroHJC", "sub_path": "/app/src/main/java/com/alberthneerans/corpoagrohjc/MediosFragment.java", "file_name": "MediosFragment.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "61ace4eb0b84f3422d3e62c7099a35dde41f728c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Samders/CorpoAgroHJC | 217 | FILENAME: MediosFragment.java | 0.221351 | package com.alberthneerans.corpoagrohjc;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
/**
* A simple {@link Fragment} subclass.
*/
public class MediosFragment extends Fragment {
private Button bCitas;
public MediosFragment() {
// Required empty public constructor
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_medios, container, false);
bCitas = (Button)view.findViewById(R.id.bCitas);
bCitas.setOnClickListener( new View.OnClickListener() {
public void onClick(View view){
goCitasActivity();
}
});
return view;
}
public void goCitasActivity(){
Intent intent = new Intent(getActivity(), CitasActivity.class);
startActivity(intent);
}
}
|
1de67f74-ed8c-4c52-910a-24dd264a5c65 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-05 22:35:08", "repo_name": "dhutchison/microprofile-experiments", "sub_path": "/src/main/java/com/devwithimagination/microprofile/experiments/config/featureflag/FeatureConverter.java", "file_name": "FeatureConverter.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "9f87df86fed94f543752e21c0511ddac81d765e9", "star_events_count": 2, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/dhutchison/microprofile-experiments | 198 | FILENAME: FeatureConverter.java | 0.220007 | package com.devwithimagination.microprofile.experiments.config.featureflag;
import javax.json.bind.Jsonb;
import javax.json.bind.JsonbBuilder;
import org.eclipse.microprofile.config.spi.Converter;
/**
* Implementation of Converter for converting our string representation into the
* Feature POJO.
*/
public class FeatureConverter implements Converter<Feature> {
/**
* Converts the supplied string in to a Feature instance by deserializing the
* input string as a JSON object.
*
* @param value the input string to convert
* @return the Feature object created by deserializing the input string.
*/
@Override
public Feature convert(String value) {
Jsonb jsonb = JsonbBuilder.create();
try {
return jsonb.fromJson(value, Feature.class);
} finally {
try {
jsonb.close();
} catch (Exception e) {
// Nothing to do here
}
}
}
} |
9c4adf22-4a9f-467b-9802-3afa6e85377b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-27 01:03:09", "repo_name": "Biscottezi/OnlineShoppingSystem", "sub_path": "/src/java/order/totalInOrderTable.java", "file_name": "totalInOrderTable.java", "file_ext": "java", "file_size_in_byte": 993, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "13f8fab94624216954f7d1fb4af3d8b42d6d343b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Biscottezi/OnlineShoppingSystem | 223 | FILENAME: totalInOrderTable.java | 0.253861 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package order;
import java.io.Serializable;
import java.sql.Date;
/**
*
* @author ASUS
*/
public class totalInOrderTable implements Serializable{
private int total;
private String date;
public totalInOrderTable() {
}
public totalInOrderTable(int total, String date) {
this.total = total;
this.date = date;
}
/**
* @return the total
*/
public int getTotal() {
return total;
}
/**
* @param total the total to set
*/
public void setTotal(int total) {
this.total = total;
}
/**
* @return the date
*/
public String getDate() {
return date;
}
/**
* @param date the date to set
*/
public void setDate(String date) {
this.date = date;
}
}
|
37880ebd-cc1e-4322-b427-02fe559b02cb | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-20 07:07:58", "repo_name": "evstpetr/SystemInfoClient", "sub_path": "/src/ru/pes/systeminfoclient/objects/Net.java", "file_name": "Net.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "63d2b2f99f266ef4d8214be53e1b7cfeceb94c73", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/evstpetr/SystemInfoClient | 277 | FILENAME: Net.java | 0.255344 | package ru.pes.systeminfoclient.objects;
import java.io.Serializable;
public class Net implements Serializable{
private String ipAddr;
private String macAddr;
private String pcName;
public Net(String ipAddr, String macAddr, String pcName){
this.ipAddr = ipAddr;
this.macAddr = macAddr;
this.pcName = pcName;
}
/**
* @return the ipAddr
*/
public String getIpAddr() {
return ipAddr;
}
/**
* @param ipAddr the ipAddr to set
*/
public void setIpAddr(String ipAddr) {
this.ipAddr = ipAddr;
}
/**
* @return the macAddr
*/
public String getMacAddr() {
return macAddr;
}
/**
* @param macAddr the macAddr to set
*/
public void setMacAddr(String macAddr) {
this.macAddr = macAddr;
}
/**
* @return the pcName
*/
public String getPcName() {
return pcName;
}
/**
* @param pcName the pcName to set
*/
public void setPcName(String pcName) {
this.pcName = pcName;
}
}
|
3d74e4ed-1098-4a59-a02b-4514cd5dbadb | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-06-06 08:54:02", "repo_name": "BidsTeam/LandOfDKL_project", "sub_path": "/src/main/java/util/HibernateUtil.java", "file_name": "HibernateUtil.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "077492c82197b5abdd94a3c8e6fe52cce93d16c0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/BidsTeam/LandOfDKL_project | 185 | FILENAME: HibernateUtil.java | 0.267408 | package util;
import org.apache.logging.log4j.Logger;
import org.hibernate.HibernateException;
import org.hibernate.SessionFactory;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
public class HibernateUtil {
private SessionFactory sessionFactory;
private ServiceRegistry serviceRegistry;
public HibernateUtil(){
try {
Configuration configuration = new Configuration();
configuration.addResource("hibernate.cfg.xml");
configuration.configure();
serviceRegistry = new StandardServiceRegistryBuilder().applySettings(
configuration.getProperties()).build();
sessionFactory = configuration.buildSessionFactory(serviceRegistry);
} catch (HibernateException he) {
LogFactory.getInstance().getLogger(this.getClass()).fatal("Util.HibernateUtil/static Error creating Session:",he);
throw new ExceptionInInitializerError(he);
}
}
public SessionFactory getSessionFactory() {
return sessionFactory;
}
}
|
23015e73-fa3d-4068-b8b3-5b9de4789ef9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-06 09:59:33", "repo_name": "maxfeldman99/SolEMobileUnit", "sub_path": "/app/src/main/java/com/example/maxfeldman/sole_mobileunit/Main/models/Request.java", "file_name": "Request.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "e9d7386e04317c9807a0d1cddef7783fb905011b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/maxfeldman99/SolEMobileUnit | 245 | FILENAME: Request.java | 0.261331 | package com.example.maxfeldman.sole_mobileunit.Main.models;
import com.example.maxfeldman.sole_mobileunit.Main.models.MotorRequest;
import java.util.ArrayList;
public class Request
{
private String id;
ArrayList<MotorRequest> sequence;
int sizeOfSequence;
public Request(){}
public Request(String id, ArrayList<MotorRequest> sequence, int sizeOfSequence) {
this.id = id;
this.sequence = sequence;
this.sizeOfSequence = sizeOfSequence;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public ArrayList<MotorRequest> getSequence() {
return sequence;
}
public void setSequence(ArrayList<MotorRequest> sequence)
{
this.sequence = sequence;
this.sizeOfSequence = sequence.size();
}
public int getSizeOfSequence() {
return sizeOfSequence;
}
@Override
public String toString() {
return "Request{" +
"id='" + id + '\'' +
", sequence=" + sequence +
", sizeOfSequence=" + sizeOfSequence +
'}';
}
}
|
cdfced01-7fb4-457d-a3a3-fe82d8b9827c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-05 08:48:59", "repo_name": "mhearttzw/wangxin-demo", "sub_path": "/src/main/java/com/wangxin/springboot/common/utils/LogAnnotationWrapperUtil.java", "file_name": "LogAnnotationWrapperUtil.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "089dd8b32f78309d99400038e2b8b496d8ca18b7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/mhearttzw/wangxin-demo | 186 | FILENAME: LogAnnotationWrapperUtil.java | 0.23793 | package com.wangxin.springboot.common.utils;
import com.wangxin.springboot.common.annotation.Log;
import javassist.NotFoundException;
public class LogAnnotationWrapperUtil {
private volatile static LogAnnotationWrapperUtil awu;
private LogAnnotationWrapperUtil() {
}
public static LogAnnotationWrapperUtil get() {
if (awu == null) {
synchronized (LogAnnotationWrapperUtil.class) {
if (awu == null) {
awu = new LogAnnotationWrapperUtil();
}
}
}
return awu;
}
public void setLog(String logStr) throws NotFoundException {
String className = Thread.currentThread().getStackTrace()[2].getClassName();
String methodName = Thread.currentThread().getStackTrace()[2].getMethodName();
LogAnnotationUtil.getLogAnnotationUtil().setAnnotationUtilFieldValue(className, methodName, Log.class.getName(), "logStr", logStr);
}
}
|
f8b71189-371c-4b7e-9c4b-4dbd7d6b5482 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-31 05:55:19", "repo_name": "nuzzz/ConspecDashboard", "sub_path": "/src/main/java/com/example/helper/TodoistConfig.java", "file_name": "TodoistConfig.java", "file_ext": "java", "file_size_in_byte": 991, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "75f09ff08491b273ba6e14b3e47f921f5a253595", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/nuzzz/ConspecDashboard | 201 | FILENAME: TodoistConfig.java | 0.220007 | package com.example.helper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class TodoistConfig {
@Value("#{environment.TODOIST_CLIENT_ID}")
private String clientID;
@Value("#{environment.TODOIST_CLIENT_SECRET}")
private String clientSecret;
@Value("#{environment.TODOIST_ACCESS_TOKEN}")
private String accessToken;
@Bean(name = "clientID")
public String getClientID() {
return clientID;
}
public void setClientID(String clientID) {
this.clientID = clientID;
}
@Bean(name = "clientSecret")
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
@Bean(name = "accessToken")
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
} |
d0317803-a54d-4ba8-b47c-c820e013cc2e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-30 22:52:14", "repo_name": "x-lin/publications-lod-quality", "sub_path": "/src/main/java/at/ac/tuwien/ifs/semweb/publications/WebApplication.java", "file_name": "WebApplication.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "e14046d4d2b4f96014dcb11a7d97f967dfa2b2cc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/x-lin/publications-lod-quality | 232 | FILENAME: WebApplication.java | 0.224055 | package at.ac.tuwien.ifs.semweb.publications;
import at.ac.tuwien.ifs.semweb.publications.restclient.PublikExtractor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter;
import org.springframework.web.client.RestTemplate;
/**
* Spring boot application main class.
*
* @author xlin
*/
@SpringBootApplication
public class WebApplication {
public static void main(String[] args) {
SpringApplication.run(WebApplication.class, args);
}
@Bean
public RestTemplate restTemplate() {
RestTemplate restTemplate = new RestTemplate();
for(HttpMessageConverter converter : restTemplate.getMessageConverters()) {
if(converter instanceof Jaxb2RootElementHttpMessageConverter) {
((Jaxb2RootElementHttpMessageConverter)converter).setSupportDtd(true);
break;
}
}
return restTemplate;
}
@Bean
public PublikExtractor publikExtractor() {
return new PublikExtractor();
}
}
|
ed3a450e-7e9d-43e6-be38-e56ffa4f8efd | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-28 18:22:37", "repo_name": "gurubabujampala/management", "sub_path": "/common/src/main/java/com/guru/management/common/httpentity/GenericHttpEntity.java", "file_name": "GenericHttpEntity.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "9f450926b0449cf588c37830fca445c39fb55cca", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/gurubabujampala/management | 210 | FILENAME: GenericHttpEntity.java | 0.267408 | package com.telstra.tdm.common.httpentity;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
/**
* Generic method to build and create httpEntity object
*
* @param actionRequestObject
* @param tokenValue
*
* @return httpEntity
*/
public class GenericHttpEntity<T> {
public static <T> HttpEntity<T> buildAndCreateHttpEntity(T actionRequestObject, String tokenValue) {
HttpHeaders headers = new HttpHeaders();
headers.setBearerAuth(tokenValue);
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
HttpEntity<T> httpEntity = new HttpEntity<T>(actionRequestObject, headers);
return httpEntity;
}
public HttpEntity<T> buildAndCreateHttpEntity(T requestObject) {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
HttpEntity<T> httpEntity = new HttpEntity<T>(requestObject, headers);
return httpEntity;
}
}
|
82689c9d-c836-4128-8ad1-af46ca91f290 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-02-22 22:15:49", "repo_name": "eletxi84/AppSpringMyBatis", "sub_path": "/AppSpringMyBatis-WEB/src/org/eletxi/app/web/springmvc/SpringMvcInit.java", "file_name": "SpringMvcInit.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "cad0abd87d481d9cf932db63ebc3159eb3860cc7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "WINDOWS-1250"} | https://github.com/eletxi84/AppSpringMyBatis | 194 | FILENAME: SpringMvcInit.java | 0.23092 | package org.eletxi.app.web.springmvc;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.ContextLoaderListener;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;
/**
* Clase 'SpringMvcInit'.
* @author Omar Eletxigerra Cano
* @version 1.0 - Versión inicial.
*/
public class SpringMvcInit implements WebApplicationInitializer {
@Override
public final void onStartup(final ServletContext container) throws ServletException {
AnnotationConfigWebApplicationContext context = new AnnotationConfigWebApplicationContext();
context.register(SpringMvcConfig.class);
container.addListener(new ContextLoaderListener(context));
ServletRegistration.Dynamic dispatcher = container.addServlet("dispatcher", new DispatcherServlet(context));
dispatcher.setLoadOnStartup(1);
dispatcher.addMapping("*.action");
}
}
|
52dff5c6-1c31-49c2-901c-2190ea8da99a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-21 23:34:14", "repo_name": "qiuchili/ggnn_graph_classification", "sub_path": "/program_data/JavaProgramData/33/3309.java", "file_name": "3309.java", "file_ext": "java", "file_size_in_byte": 1089, "line_count": 67, "lang": "en", "doc_type": "code", "blob_id": "0f65705c2cd7f1a68569859e11b09ff6ab6641ca", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/qiuchili/ggnn_graph_classification | 431 | FILENAME: 3309.java | 0.285372 | package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n;
int m;
int i;
int j;
char[][] zfc = new char[1000][1000];
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
for (i = 0;i < n;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
zfc[i] = tempVar2.charAt(0);
}
}
for (i = 0;i < n;i++)
{
m = String.valueOf(zfc[i]).length();
for (j = 0;j < m - 1;j++)
{
if (zfc[i][j] == 'A')
{
System.out.print("T");
}
if (zfc[i][j] == 'T')
{
System.out.print("A");
}
if (zfc[i][j] == 'C')
{
System.out.print("G");
}
if (zfc[i][j] == 'G')
{
System.out.print("C");
}
}
if (zfc[i][m - 1] == 'A')
{
System.out.print("T\n");
}
if (zfc[i][m - 1] == 'T')
{
System.out.print("A\n");
}
if (zfc[i][m - 1] == 'C')
{
System.out.print("G\n");
}
if (zfc[i][m - 1] == 'G')
{
System.out.print("C\n");
}
m = 0;
}
return 0;
}
}
|
0d0875fe-3d1a-48cb-a3c1-4667891e6cb3 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-13 13:39:22", "repo_name": "Montego/terminalMock", "sub_path": "/src/main/java/com/terminalmock/test/entities/dictionary/Subject.java", "file_name": "Subject.java", "file_ext": "java", "file_size_in_byte": 1131, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "0c6f34c82d3af37c72a2a00461d9fb4024394aaf", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Montego/terminalMock | 240 | FILENAME: Subject.java | 0.294215 | package com.terminalmock.test.entities.dictionary;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "\"D_Subject\"")
public class Subject {
@Id
@Column(name = "\"SubjectId\"")
private String subjectId;
@Column(name = "\"Name\"")
private String name;
@Column(name = "\"OrderBy\"")
private int orderBy;
@Column(name = "\"MinScore\"")
private int minScore;
@Column(name = "\"isEGE\"")
private int isEGE;
@Column(name = "\"Cipher\"")
private String cipher;
//конструктор для информативного заполения JSON
public Subject(boolean defValues) {
if (defValues) {
this.subjectId = "";
this.name = "";
this.orderBy = -1;
this.minScore = -1;
this.isEGE = -1;
this.cipher = "";
}
}
}
|
ba47bc13-fed6-4570-861d-df38292ee10f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-01-24 22:32:02", "repo_name": "marsavela/SportStats", "sub_path": "/src/adm/werock/sportstats/basics/User.java", "file_name": "User.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 62, "lang": "en", "doc_type": "code", "blob_id": "14880da957389011a875b2c5f0d06d8ffc1948fc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/marsavela/SportStats | 238 | FILENAME: User.java | 0.23092 | package adm.werock.sportstats.basics;
/**
* @author Sergiu Daniel Marsavela This Class represents a User that will use
* the service.
*/
public class User {
private String email;
private String name;
private String password;
/**
* @param email
* @param name
* @param password
*/
public User(String email, String name, String password) {
super();
this.email = email;
this.name = name;
this.password = password;
}
/**
* @param email
* @param password
*/
public User(String email, String password) {
super();
this.email = email;
this.password = password;
}
// Setters and Getters
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
|
11e83200-b38f-4b6c-aad7-26ec917f4627 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-26 14:31:14", "repo_name": "HN605/cc", "sub_path": "/common/src/main/java/com/example/demo/execute/StatementClient.java", "file_name": "StatementClient.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "551a831698273db25ca82c51434e9d87277f2fcf", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/HN605/cc | 199 | FILENAME: StatementClient.java | 0.279828 | package com.example.demo.execute;
import com.example.demo.common.ApplicationContextHelper;
import com.example.demo.service.StatementHandle;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@Component
public class StatementClient<T> implements InitializingBean {
@Autowired
private ApplicationContextHelper applicationContextHelper;
private Map<String, StatementHandle> typeAndStatementHandle = new ConcurrentHashMap<>();
@Override
public void afterPropertiesSet() throws Exception {
Map<String, StatementHandle> statementHandles = applicationContextHelper.getBeansOfType(StatementHandle.class);
for (Map.Entry<String, StatementHandle> statementHandle: statementHandles.entrySet()) {
typeAndStatementHandle.put(statementHandle.getValue().getType().getConfigCode(), statementHandle.getValue());
}
}
public void doHandler(String tag, T t) {
typeAndStatementHandle.get(tag).process(t);
}
}
|
601e9063-df34-4a60-8cf8-f17b2a9d74ad | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-02-02 21:49:01", "repo_name": "toroktibor/partyappandroid", "sub_path": "/src/hu/schonherz/y2014/partyappandroid/util/datamodell/GaleryImage.java", "file_name": "GaleryImage.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "c53d90d745af3afc06651eed7e18502f40d9646d", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/toroktibor/partyappandroid | 211 | FILENAME: GaleryImage.java | 0.2227 | package hu.schonherz.y2014.partyappandroid.util.datamodell;
import hu.schonherz.y2014.partyappandroid.ImageUtils;
import android.graphics.Bitmap;
public class GaleryImage {
private Bitmap bitmap;
private Bitmap bitmap_thumbnail;
private int id;
public GaleryImage(int id, Bitmap bitmap_thumbnail) {
this.id = id;
this.bitmap_thumbnail = bitmap_thumbnail;
}
public Bitmap getBitmap() {
return bitmap;
}
public void setBitmap(Bitmap bitmap) {
this.bitmap = bitmap;
}
public Bitmap getBitmap_thumbnail() {
return bitmap_thumbnail;
}
public void setBitmap_thumbnail(Bitmap bitmap_thumbnail) {
this.bitmap_thumbnail = bitmap_thumbnail;
}
public void downloadBitmap() {
this.bitmap = ImageUtils.StringToBitMap(Session.getInstance().getActualCommunicationInterface()
.DownLoadAnImage(this.id));
}
public int getId() {
return this.id;
}
}
|
7ead548c-41e5-4d64-8462-9d06ca01d568 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-23 11:54:08", "repo_name": "toanntit96/network-programming", "sub_path": "/RMI/ATM/ATM/src/atm/ClClass.java", "file_name": "ClClass.java", "file_ext": "java", "file_size_in_byte": 1162, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "0b6029f8dbcc0eef47f978ff0f690316165a4195", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/toanntit96/network-programming | 244 | FILENAME: ClClass.java | 0.286169 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package atm;
import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author Cold
*/
public class ClClass {
ATMInteface rmt;
void conectsv()
{
try {
String host ="rmi://localhost:1099/severatm";
LocateRegistry.getRegistry(host);
try {
rmt =(ATMInteface)Naming.lookup(host);
} catch (NotBoundException ex) {
Logger.getLogger(ClClass.class.getName()).log(Level.SEVERE, null, ex);
} catch (MalformedURLException ex) {
Logger.getLogger(ClClass.class.getName()).log(Level.SEVERE, null, ex);
}
} catch (RemoteException ex) {
Logger.getLogger(ClClass.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
|
4c829f9a-509d-4f18-bdcb-9ddd081938b0 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-10-20 17:11:57", "repo_name": "Mangalashri/Android-Lab-Exercises", "sub_path": "/app/src/main/java/com/example/mangalashri/androidlab/T2SActivity.java", "file_name": "T2SActivity.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "1755f5fe0e59236105f60a12e2d37e9007fabc7f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Mangalashri/Android-Lab-Exercises | 225 | FILENAME: T2SActivity.java | 0.267408 | package com.example.mangalashri.androidlab;
import android.speech.tts.TextToSpeech;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import java.util.Locale;
public class T2SActivity extends AppCompatActivity {
TextToSpeech textToSpeech;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_t2_s);
textToSpeech = new TextToSpeech(T2SActivity.this, new TextToSpeech.OnInitListener() {
@Override
public void onInit(int status) {
textToSpeech.setLanguage(Locale.UK);
}
});
final EditText editText = (EditText)findViewById(R.id.editText11);
Button button = (Button)findViewById(R.id.button15);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
textToSpeech.speak(editText.getText().toString(),TextToSpeech.QUEUE_FLUSH, null);
}
});
}
}
|
70fd8aa7-a115-47f8-b39b-a01090ca7923 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-08-10 05:42:25", "repo_name": "soulofwolf/YaWSpleef", "sub_path": "/src/main/java/us/iluthi/soulofw0lf/yawspleef/loaders/InventoryLoader.java", "file_name": "InventoryLoader.java", "file_ext": "java", "file_size_in_byte": 1037, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "705c62726ce90fdb7475817faf474e5f87db22b3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/soulofwolf/YaWSpleef | 264 | FILENAME: InventoryLoader.java | 0.282988 | package us.iluthi.soulofw0lf.yawspleef.loaders;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import us.iluthi.soulofw0lf.yawspleef.YaWSpleef;
import us.iluthi.soulofw0lf.yawspleef.utility.Chat;
/**
* Created by: soulofw0lf
* Date: 8/7/13
* Time: 3:40 PM
*/
public class InventoryLoader {
@SuppressWarnings("deprecation")
public static void gameInv(Player p){
for (String key : YaWSpleef.weaponPerms.keySet()){
if (p.hasPermission(key)){
p.getInventory().addItem(YaWSpleef.weaponPerms.get(key));
p.updateInventory();
}
}
}
public static Inventory shopInv(Player p){
Inventory inv = Bukkit.createInventory(null, 45, Chat.color(YaWSpleef.localeSettings.get("Shop Name")));
for (String key : YaWSpleef.weaponPerms.keySet()){
if (!p.hasPermission(key)){
inv.addItem(YaWSpleef.weaponPerms.get(key));
}
}
return inv;
}
}
|
4a45c384-d996-4bf3-9d8e-10f56e0790fa | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-02-05 22:55:47", "repo_name": "arv124/Lab2B_Team2", "sub_path": "/src/lab2b_team2/Checks.java", "file_name": "Checks.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "f2fa776c82dbfd5a5f975d6a0b612f06e934758e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/arv124/Lab2B_Team2 | 200 | FILENAME: Checks.java | 0.240775 | /*
* 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 lab2b_team2;
/**
*
* @author Alex
*/
public class Checks {
public int checkNumber = 0;
public double amount = 0;
public int accountNumber;
public Customer reciever;
public Checks(int checkNumber, double amount, int accountNumber, Customer reciever){
this.checkNumber = checkNumber;
this.amount = amount;
this.accountNumber = accountNumber;
this.reciever = reciever;
}
public int getCheckNumber(){
return this.checkNumber;
}
public double getAmount(){
return this.amount;
}
public int getAccountNumber(){
return this.accountNumber;
}
public Customer getCustomer(){
return this.reciever;
}
}
|
7bef2933-991c-4504-9e9b-0ea4e93f2d99 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-09 14:10:01", "repo_name": "hqw-1997/spring-boot01", "sub_path": "/src/main/java/com/example/dto/ResultDto.java", "file_name": "ResultDto.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "3482ae39c7f6446e3b5c5c224c6398432336e7d7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/hqw-1997/spring-boot01 | 230 | FILENAME: ResultDto.java | 0.283781 | package com.example.dto;
import com.example.exception.CustomException;
import com.example.exception.ECustomException;
public class ResultDto<T> {
private int code;
private String message;
private T data;
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public static ResultDto errorof(Throwable e){
ResultDto resultDto=new ResultDto();
resultDto.setCode(((CustomException) e).getCode());
resultDto.setMessage(e.getMessage());
return resultDto;
}
public static ResultDto errorof(ECustomException e){
ResultDto resultDto=new ResultDto();
resultDto.setCode(e.getCode());
resultDto.setMessage(e.getMessage());
return resultDto;
}
public static ResultDto<T> okOff(Object t){
ResultDto resultDto=new ResultDto();
resultDto.setCode(t.getCode());
resultDto.setMessage(e.getMessage());
return ResultDto<T>;
}
}
|
68586ffc-5635-4e6a-92e4-8c9edfdb26e7 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-04-14T09:38:00", "repo_name": "loulafripouille/jekyll-dock-starter", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1160, "line_count": 34, "lang": "en", "doc_type": "text", "blob_id": "744c1baa08f5a110c8362ffd9f357504c0c23a70", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/loulafripouille/jekyll-dock-starter | 313 | FILENAME: README.md | 0.264358 |
# A minimal jekyll kickstart project using docker (or docker-compose)
This project was made with the idea of sharing a similar dev environment between different OS (OSX, Win, Linux) and without the need of installing ruby & Cie on our local machines. So we looked at jekyll/docker project. And started to try using it. We created a basic jekyll project skeleton.
Feel free to use it if it fits your needs to. Cheers!
## Using Docker Compose
Take a look at the `docker-compose.yml` file. Then start the container with:
```sh
docker-compose up
```
## Using Docker
*Instructions from the official Github [jekyll/docker](https://github.com/jekyll/docker/wiki/Usage:-Running) repository.*
**Native docker**
```sh
docker run --rm --label=jekyll --volume=$(pwd):/srv/jekyll \
-it -p 127.0.0.1:4000:4000 jekyll/jekyll jekyll serve
```
**Docker-machine / Docker-Toolbox**
```sh
docker run --rm --label=jekyll --volume=$(pwd):/srv/jekyll \
-it -p $(docker-machine ip `docker-machine active`):4000:4000 \
jekyll/jekyll jekyll serve
```
*If you are on Windows or OS X using Docker-Machine or Boot2Docker you will need to add the option --force_polling*
|
1ddc65e2-6e5c-4826-8394-9866385a41b0 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-05-10 11:53:22", "repo_name": "key2wen/jorigin", "sub_path": "/origin/src/test/java/com/key/jorigin/rocketmq/transactional/TransactionExecuterImpl.java", "file_name": "TransactionExecuterImpl.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "b0b84a4c86a7eacbcf5b3e746d3e584f380522dc", "star_events_count": 5, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/key2wen/jorigin | 201 | FILENAME: TransactionExecuterImpl.java | 0.246533 | package com.key.jorigin.rocketmq.transactional;
import com.alibaba.rocketmq.client.producer.LocalTransactionExecuter;
import com.alibaba.rocketmq.client.producer.LocalTransactionState;
import com.alibaba.rocketmq.common.message.Message;
import java.util.concurrent.atomic.AtomicInteger;
/**
* 执行本地事务
*/
public class TransactionExecuterImpl implements LocalTransactionExecuter {
private AtomicInteger transactionIndex = new AtomicInteger(1);
@Override
public LocalTransactionState executeLocalTransactionBranch(final Message msg, final Object arg) {
int value = transactionIndex.getAndIncrement();
if (value == 0) {
throw new RuntimeException("Could not find db");
} else if ((value % 5) == 0) {
return LocalTransactionState.ROLLBACK_MESSAGE;
} else if ((value % 4) == 0) {
return LocalTransactionState.COMMIT_MESSAGE;
}
return LocalTransactionState.UNKNOW;
}
} |
b56f26e0-64d4-431a-8cfb-8a0748908a6c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-16 19:41:49", "repo_name": "RachidAbbad/Jee_recrutement", "sub_path": "/src/main/java/com/Models/EntretienEntity.java", "file_name": "EntretienEntity.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "f89d69eb7303705bb9be49354bbbe022e44a841a", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/RachidAbbad/Jee_recrutement | 231 | FILENAME: EntretienEntity.java | 0.246533 | package com.Models;
import javax.persistence.*;
import java.util.Objects;
@Entity
@Table(name = "entretien", schema = "dbo", catalog = "jee_recrutement")
public class EntretienEntity {
private int id;
private String resultat;
@Id
@Column(name = "id")
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Basic
@Column(name = "resultat")
public String getResultat() {
return resultat;
}
public void setResultat(String resultat) {
this.resultat = resultat;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EntretienEntity that = (EntretienEntity) o;
return id == that.id &&
Objects.equals(resultat, that.resultat);
}
@Override
public int hashCode() {
return Objects.hash(id, resultat);
}
}
|
f6071d26-3e73-411e-8acc-7de03cee3cd4 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2014-04-23T23:29:58", "repo_name": "bryanberger/OrigamiQuartzDemo", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1076, "line_count": 23, "lang": "en", "doc_type": "text", "blob_id": "feded3c38ce635996ca94928eda8be54bbd481aa", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/bryanberger/OrigamiQuartzDemo | 239 | FILENAME: README.md | 0.264358 | ## Origami + Quartz Composer Demo
List view and detail view interaction animation. I am using Origami and Quartz composer for the Mac.
It is extremely simple to interchange interaction and animation types. In this test demo I change from a scale+fade to a slide out, no compiling or rendering, it simply works. This is a great way to quickly prototype interactions for development into actual products.
### Youtube Video
[http://youtu.be/6m0_Gsl316Y](http://)
####Snippet from Medium post by Christoph Wolfe on Origami:
[https://medium.com/quartz-facebook-origami/ae4743b45254](http://)
> Facebook Origami is basically a lot of additional patches for Quartz composer that make it easier than ever to quickly create a high fidelity mockup of interactions and animations. The best way to understand Quartz composer is more as a visual programming tool with inputs and outputs than a designing software like sketch, photoshop etc.
####Quartz Composer Download:
[http://developer.apple.com/](http://)
####Origami Download:
[http://facebook.github.io/origami/](http://)
|
2ab00e0f-151d-45b7-bf9e-d7d4eaefd4c2 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-08 13:35:31", "repo_name": "Rahghul/Infralog", "sub_path": "/app/src/main/java/com/sncf/itif/Menu/ActAboutUs.java", "file_name": "ActAboutUs.java", "file_ext": "java", "file_size_in_byte": 1231, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "12c876641d7bf7b28969c86b7fa471b6a66c5371", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Rahghul/Infralog | 218 | FILENAME: ActAboutUs.java | 0.228156 | package com.sncf.itif.Menu;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Html;
import android.view.MenuItem;
import android.widget.TextView;
import android.widget.Toast;
import com.sncf.itif.R;
public class ActAboutUs extends AppCompatActivity {
TextView tvAboutUs;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.act_about_us);
getSupportActionBar().setTitle(getResources().getString(R.string.main_act_menu_action_a_propos));
getSupportActionBar().setSubtitle(R.string.global_tv_short_title);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
tvAboutUs = (TextView) findViewById(R.id.tv_about_us);
}
@Override
protected void onStart() {
tvAboutUs.setText(getString(R.string.act_about_us_tv_context));
super.onStart();
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
super.onBackPressed();
break;
}
return super.onOptionsItemSelected(item);
}
}
|
80d35d44-74bf-4951-be72-ebcac413bd50 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-12 22:14:56", "repo_name": "batman59/java_tests", "sub_path": "/src/main/java/com/company/Billing.java", "file_name": "Billing.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "ac5a50fae429933278df11d0a6cbe5c2f5b30608", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/batman59/java_tests | 203 | FILENAME: Billing.java | 0.235108 | package com.company;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Josef on 12.03.2018.
*/
public class Billing {
private List<Convention> conventionList=new ArrayList<Convention>();
private String client;
private String date;
private String reference;
public String getClient() {
return client;
}
public void setClient(String client) {
this.client = client;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getReference() {
return reference;
}
public void setReference(String reference) {
this.reference = reference;
}
public Billing() {
}
public List<Convention> getConventionList() {
return conventionList;
}
public void setConventionList(List<Convention> conventionList) {
this.conventionList = conventionList;
}
}
|
b95c3835-53a8-4a5e-b56b-87aa56101ae7 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-16 10:18:22", "repo_name": "htr3n/dera", "sub_path": "/src/main/java/dera/rest/GET.java", "file_name": "GET.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "d75751c99854a3ed6738991e9d249b16d6124d81", "star_events_count": 4, "fork_events_count": 2, "src_encoding": "UTF-8"} | https://github.com/htr3n/dera | 246 | FILENAME: GET.java | 0.290176 | package dera.rest;
import dera.util.FireAndForget;
import dera.util.RequestReply;
import dera.util.TextUtil;
import org.apache.http.client.methods.HttpGet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.URI;
import java.net.URISyntaxException;
public final class GET {
private static final Logger LOG = LoggerFactory.getLogger(GET.class);
private GET(){
}
public static void fireAndForget(String uri) {
if (TextUtil.neitherNullNorEmpty(uri)) {
try {
final HttpGet httpGet = new HttpGet(new URI(uri));
FireAndForget.send(httpGet, null);
} catch (URISyntaxException e) {
LOG.error("Invalid URI : " + uri, e);
}
}
}
public static String requestReply(String uri) {
if (TextUtil.neitherNullNorEmpty(uri)) {
try {
final HttpGet httpGet = new HttpGet(new URI(uri));
return RequestReply.send(httpGet, null);
} catch (URISyntaxException e) {
LOG.error("Invalid URI : " + uri, e);
}
}
return null;
}
}
|
147db8c5-2fad-401e-a573-274fa15c174f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-05 16:58:11", "repo_name": "mkghosh/TUP-VU-01", "sub_path": "/SwingInitial/src/com/my_package/SwingDemo.java", "file_name": "SwingDemo.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "42ffda965517f871300306ae7ae7ac1d457a6d93", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/mkghosh/TUP-VU-01 | 263 | FILENAME: SwingDemo.java | 0.288569 | package com.my_package;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
* @author Mithun Kumer Ghose.
* Created on {2/14/2017}
*/
public class SwingDemo {
public static void main(String[] args) {
JFrame myFrame = new JFrame("My First GUI java Application");
myFrame.setSize(500,500);
JPanel rootPanel = new JPanel();
rootPanel.setLayout(new BoxLayout(rootPanel, BoxLayout.Y_AXIS));
JPanel myPanel = new JPanel();
JLabel label = new JLabel();
label.setSize(300,50);
label.setText("Wow What a nice looking text field");
myPanel.add(label);
JPanel newPanel = new JPanel();
JButton btn = new JButton("Click Me");
btn.addActionListener((e) -> label.setText("You have clicked on the button"));
newPanel.add(btn);
newPanel.setBounds(20,70,300,100);
rootPanel.add(myPanel);
rootPanel.add(newPanel);
myFrame.add(rootPanel);
myFrame.setVisible(true);
myFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
}
}
|
1d5beb1a-8864-44b8-b5e5-b6af277977b1 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-22 18:56:58", "repo_name": "halilbahar/xibo-on-demand", "sub_path": "/backend-on-demand/src/main/java/at/htl/ondemand/service/XiboTokenService.java", "file_name": "XiboTokenService.java", "file_ext": "java", "file_size_in_byte": 1009, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "2ceb25de46e82f17e6a5379b0bd64e79f7cb6597", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/halilbahar/xibo-on-demand | 218 | FILENAME: XiboTokenService.java | 0.259826 | package at.htl.ondemand.service;
import at.htl.ondemand.model.form.XiboTokenForm;
import at.htl.ondemand.model.xibo.XiboToken;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.jboss.logging.Logger;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import java.time.LocalDateTime;
@ApplicationScoped
public class XiboTokenService {
@Inject
@RestClient
XiboRestClient xiboRestClient;
@Inject
Logger log;
private String token;
private LocalDateTime expirationDate = LocalDateTime.MIN;
public String getToken() {
if (this.expirationDate.isBefore(LocalDateTime.now())) {
XiboToken xiboToken = this.xiboRestClient.getAccessToken(XiboTokenForm.get());
this.token = xiboToken.access_token;
this.log.infov("Fetched new token [{0}]", this.token);
this.expirationDate = LocalDateTime.now().plusSeconds(xiboToken.expires_in);
}
return this.token;
}
}
|
ec3d69ea-89e6-4f9a-a07b-92f7a30a94d9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-10-04 12:11:24", "repo_name": "gling-project/server", "sub_path": "/app/be/lynk/server/dto/ChangeEmailDTO.java", "file_name": "ChangeEmailDTO.java", "file_ext": "java", "file_size_in_byte": 1091, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "f8e58f96e526a9621c5b6d8bfc1b782f5a0091ec", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/gling-project/server | 241 | FILENAME: ChangeEmailDTO.java | 0.233706 | package be.lynk.server.dto;
import be.lynk.server.dto.technical.DTO;
import be.lynk.server.util.constants.ValidationRegex;
import javax.validation.constraints.Pattern;
import java.util.Date;
/**
* Created by florian on 27/12/14.
*/
public class ChangeEmailDTO extends DTO {
@Pattern(regexp = ValidationRegex.PASSWORD,message = "--.validation.dto.password")
private String oldPassword;
@Pattern(regexp = ValidationRegex.EMAIL,message = "--.validation.dto.email")
private String newEmail;
public ChangeEmailDTO() {
}
public String getOldPassword() {
return oldPassword;
}
public void setOldPassword(String oldPassword) {
this.oldPassword = oldPassword;
}
public String getNewEmail() {
return newEmail;
}
public void setNewEmail(String newEmail) {
this.newEmail = newEmail;
}
@Override
public String toString() {
return "ChangeEmailDTO{" +
"oldPassword='" + oldPassword + '\'' +
", newEmail='" + newEmail + '\'' +
'}';
}
}
|
554eea92-8fe7-47b7-8d66-4b20c7cc4894 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-09-06 05:55:54", "repo_name": "Dalejannirmalkar/ExpenseManager", "sub_path": "/app/src/main/java/nirmalkar/dalejan/expensemanager/Flash.java", "file_name": "Flash.java", "file_ext": "java", "file_size_in_byte": 1028, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "5297de36f6fb894c4b286c9e4bca9ebcf4dcfc0a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Dalejannirmalkar/ExpenseManager | 196 | FILENAME: Flash.java | 0.23092 | package nirmalkar.dalejan.expensemanager;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import java.util.Timer;
import java.util.TimerTask;
public class Flash extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_flash);
ImageView iv1 = (ImageView) findViewById(R.id.imageView1);
Animation a1 = AnimationUtils.loadAnimation(Flash.this, R.anim.fadeout);
iv1.startAnimation(a1);
Timer t1 = new Timer();
TimerTask tt = new TimerTask() {
public void run() {
Intent i1 = new Intent(Flash.this, MainActivity.class);
startActivity(i1);
Flash.this.finish();
}
};
t1.schedule(tt, 1800);
}
}
|
a98865a4-cd4a-440b-8f7d-6f776b01805d | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-23 22:08:10", "repo_name": "OpenGridMap/OpenGridMapApp", "sub_path": "/app/src/main/java/tanuj/opengridmap/models/Payload.java", "file_name": "Payload.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "529bebf04d108ab74c59ef97d65627ca07c78114", "star_events_count": 3, "fork_events_count": 2, "src_encoding": "UTF-8"} | https://github.com/OpenGridMap/OpenGridMapApp | 211 | FILENAME: Payload.java | 0.23793 | package tanuj.opengridmap.models;
import android.content.Context;
import org.json.JSONException;
import org.json.JSONObject;
import tanuj.opengridmap.R;
/**
* Created by Tanuj on 13/10/2015.
*/
public class Payload {
private long submissionId;
private long imageId;
private JSONObject payloadJSON;
public Payload(long submissionId, long imageId, JSONObject payloadJSON) {
this.submissionId = submissionId;
this.imageId = imageId;
this.payloadJSON = payloadJSON;
}
public long getSubmissionId() {
return submissionId;
}
public long getImageId() {
return imageId;
}
public String getPayloadEntity() {
return payloadJSON.toString();
}
public void renewPayloadToken(Context context, String idToken) {
try {
payloadJSON.put(context.getString(R.string.json_key_id_token), idToken);
} catch (JSONException e) {
e.printStackTrace();
}
}
}
|
6dda083b-38c9-4a57-84b7-2fb5111d170b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-07-27T16:31:41", "repo_name": "efratrvd/eurovision_social_analysis", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1161, "line_count": 27, "lang": "en", "doc_type": "text", "blob_id": "8c7be9c8b211a2695d94aba149de47d3a1f86f06", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/efratrvd/eurovision_social_analysis | 250 | FILENAME: README.md | 0.285372 | # Eurovision Social Analysis
NLP-SD project - An analysis of social behaviors in the Eurovision
## Overview
In this project we show an empirical analysis of intersting public opinions regarding social behaviors in the Eurovision Song Contest.
Here you can find the following:
- Our full report describing the motivation, our method, analysis and results can be found <a href="https://github.com/oriheldman/eurovision_social_analysis/blob/main/Eurovision_Project%20(4).pdf">here</a>
- The source code of our work contains the following jupyter notebooks:
- data_preprocessing_euroVotes_euroTour_euroTrade
- youtube_comments_model_and_analysis
- vote_behaviour_analysis
## Notebooks
### data_preprocessing_euroVotes_euroTour_euroTrade
For the Eurovision votes, Euro countries trade and tourism data:
- Data collection, cleaning and preprocecing
- Graph building for later analysis.
### youtube_comments_model_and_analysis
The notebook contains the following parts:
- Youtube comments preprocsing and cleaning
- Training our BERT based classifier
- Youtube comments analysis
### vote_behaviour_analysis
- Analysis of social subjects on voting in ESC
|
2d161e38-8dea-48b1-af93-8f86cb46117e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-11 04:42:06", "repo_name": "rwz657026189/mvvmframe", "sub_path": "/baselist/src/main/java/com/rwz/baselist/entity/SimpleEntity.java", "file_name": "SimpleEntity.java", "file_ext": "java", "file_size_in_byte": 1101, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "0ab575c0ec7c1801f743976ac936c0a95840f40c", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/rwz657026189/mvvmframe | 271 | FILENAME: SimpleEntity.java | 0.262842 | package com.rwz.baselist.entity;
import android.support.annotation.LayoutRes;
/**
* Created by rwz on 2016/12/16.
* 简单实体类, 实用无逻辑的基本布局
*/
public class SimpleEntity extends BaseListEntity{
@LayoutRes int mLayoutRes; //默认0,将作为空item
private Object data; //数据
private boolean bool;
public SimpleEntity(@LayoutRes int mLayoutRes) {
this.mLayoutRes = mLayoutRes;
}
public SimpleEntity(@LayoutRes int mLayoutRes, Object data) {
this.mLayoutRes = mLayoutRes;
this.data = data;
}
public SimpleEntity(int mLayoutRes, Object data, boolean bool) {
this.mLayoutRes = mLayoutRes;
this.data = data;
this.bool = bool;
}
public void setData(Object data) {
this.data = data;
}
public void setBool(boolean bool) {
this.bool = bool;
}
public boolean isBool() {
return bool;
}
@Override
public int getItemLayoutId() {
return mLayoutRes;
}
public Object getData() {
return data;
}
}
|
190980b0-b8a5-459e-8f6c-a82f01c182bc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-09 03:02:41", "repo_name": "Chen1997c/pilipili-data", "sub_path": "/pili-provider/pili-provider-mdc/src/main/java/com/pilipili/provider/entity/VideoLabelRel.java", "file_name": "VideoLabelRel.java", "file_ext": "java", "file_size_in_byte": 1040, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "45c5326747bfcf227f7185e9098e0bacaceb4709", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Chen1997c/pilipili-data | 245 | FILENAME: VideoLabelRel.java | 0.221351 | package com.pilipili.provider.entity;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*;
import java.util.Date;
/**
* 描述: 视频标签关联实体
*
* @author ChenJianChuan
* @date 2019/3/25 14:57
*/
@Data
@ToString
@Entity
@Table(name = "video_label_rel")
@EntityListeners(AuditingEntityListener.class)
public class VideoLabelRel {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/**
* 视频id
*/
@Column(nullable = false)
private Long videoId;
/**
* 标签实体
*/
@ManyToOne
@JoinColumn(name = "label_id", nullable = false)
private Label label;
/**
* 更新时间
*/
@LastModifiedDate
private Date gmtModified;
/**
* 创建时间
*/
@CreatedDate
private Date gmtCreate;
}
|
d47a544e-8e62-4399-9d43-68b3d9a3dad1 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-19 16:48:03", "repo_name": "orimajp/ddd-sample-jooq-study", "sub_path": "/ddd-main/src/main/java/com/example/dddcorestudy/infrastructure/messaging/jms/CargoHandledConsumer.java", "file_name": "CargoHandledConsumer.java", "file_ext": "java", "file_size_in_byte": 1094, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "8c114b94ab4b25a926cbb699b8ba3c4f79acc22f", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/orimajp/ddd-sample-jooq-study | 215 | FILENAME: CargoHandledConsumer.java | 0.242206 | package com.example.dddcorestudy.infrastructure.messaging.jms;
import com.example.dddcorestudy.application.service.CargoInspectionService;
import com.example.dddcorestudy.domain.model.cargo.TrackingId;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
@Slf4j
@Component
@RequiredArgsConstructor
public class CargoHandledConsumer implements MessageListener {
private final CargoInspectionService cargoInspectionService;
/**
* Passes a message to the listener.
*
* @param message the message passed to the listener
*/
@Override
public void onMessage(Message message) {
try {
final TextMessage textMessage = (TextMessage) message;
final String trackingidString = textMessage.getText();
cargoInspectionService.inspectCargo(new TrackingId(trackingidString));
} catch (Exception e) {
log.error(e.getMessage(), e);
}
}
}
|
e83c14ee-bb5c-4482-b876-59818169d5fa | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-16 06:12:43", "repo_name": "FlyingDuck/java-demo", "sub_path": "/src/main/java/demo/concurrent/first/Philosopher.java", "file_name": "Philosopher.java", "file_ext": "java", "file_size_in_byte": 1026, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "2726ee1cca064ccf484b0988a061502ead06ca2e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/FlyingDuck/java-demo | 234 | FILENAME: Philosopher.java | 0.290176 | package demo.concurrent.first;
import java.util.Random;
/**
* Created by Bennett Dong <br>
* Date : 2017/11/11 <br>
* Mail: dongshujin.beans@gmail.com <br> <br>
* Desc: 多把锁 实现哲学家行为
*/
public class Philosopher extends Thread {
private Chopstick left;
private Chopstick right;
private Random random;
public Philosopher(Chopstick left, Chopstick right) {
this.left = left;
this.right = right;
random = new Random();
}
@Override
public void run() {
try {
while (true) {
Thread.sleep(random.nextInt(1000)); // 思考一会儿
synchronized (left) { // 拿起左手的筷子
synchronized (right) { // 拿起右手的筷子
Thread.sleep(random.nextInt(1000)); // 进餐
}
}
}
} catch (InterruptedException e) {
// handle exception
}
}
}
|
bf216440-ad51-43c9-a408-958dbee16a71 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-02-08 15:55:37", "repo_name": "cristirosu/rpg-scheduler-backend", "sub_path": "/src/main/java/ro/fmi/rpg/interceptor/ExceptionInterceptor.java", "file_name": "ExceptionInterceptor.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "dd8787079d76db7556455406311ef72e01d451d7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/cristirosu/rpg-scheduler-backend | 212 | FILENAME: ExceptionInterceptor.java | 0.247987 | package ro.fmi.rpg.interceptor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import ro.fmi.rpg.exception.RPGException;
import ro.fmi.rpg.to.ErrorResponse;
import javax.persistence.EntityNotFoundException;
import javax.servlet.http.HttpServletRequest;
/**
* Created by User on 11/13/2016.
*/
@RestControllerAdvice
public class ExceptionInterceptor {
private Logger LOG = LoggerFactory.getLogger(ExceptionInterceptor.class);
@ResponseStatus(value = HttpStatus.NOT_FOUND)
@ExceptionHandler(RPGException.class)
@ResponseBody
public ErrorResponse badRequest(HttpServletRequest req, RPGException exception) {
LOG.error("Exceptione " + exception);
return new ErrorResponse(exception.getErrorMessage());
}
@ResponseStatus(value = HttpStatus.NOT_FOUND)
@ExceptionHandler(EntityNotFoundException.class)
@ResponseBody
public ErrorResponse idk(HttpServletRequest req, Exception exception) {
LOG.error("Exception " + exception);
return new ErrorResponse(exception.getMessage());
}
} |
72aed2e1-a427-49ea-9844-426d7a6ebbc5 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-26 12:45:09", "repo_name": "zhanglingde/cn.krossframework", "sub_path": "/kross-websocket/src/main/java/cn/krossframework/websocket/WebSocketChannelInitializer.java", "file_name": "WebSocketChannelInitializer.java", "file_ext": "java", "file_size_in_byte": 975, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "2a96496702f3b936625ca4212a772629d4b3e76a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/zhanglingde/cn.krossframework | 192 | FILENAME: WebSocketChannelInitializer.java | 0.245085 | package cn.krossframework.websocket;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.http.HttpObjectAggregator;
import io.netty.handler.codec.http.HttpServerCodec;
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
public abstract class WebSocketChannelInitializer extends ChannelInitializer<NioSocketChannel> {
public final String socketPath;
public WebSocketChannelInitializer(String socketPath) {
this.socketPath = socketPath;
}
@Override
protected void initChannel(NioSocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(new HttpServerCodec());
pipeline.addLast(new HttpObjectAggregator(65536));
pipeline.addLast(new WebSocketServerProtocolHandler(this.socketPath, null,
true, 65336 * 10));
}
}
|
4e3a2cd8-cb2a-4350-9bf0-f9fad98c9670 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-09-10 12:51:39", "repo_name": "yangqi0224/annotationfast", "sub_path": "/src/main/java/com/yq/bean/Computer.java", "file_name": "Computer.java", "file_ext": "java", "file_size_in_byte": 981, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "fe2c263363076689ba5e2a3fc124e4d73e790463", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/yangqi0224/annotationfast | 218 | FILENAME: Computer.java | 0.262842 | package com.yq.bean;
public class Computer {
private String name;
private int byteNum;
private int price;
public Computer(String name, int byteNum, int price) {
this.name = name;
this.byteNum = byteNum;
this.price = price;
}
public Computer() {
System.out.println("computer is init .....");
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getByteNum() {
return byteNum;
}
public void setByteNum(int byteNum) {
this.byteNum = byteNum;
}
public int getPrice() {
return price;
}
public void setPrice(int price) {
this.price = price;
}
@Override
public String toString() {
return "Computer{" +
"name='" + name + '\'' +
", byteNum=" + byteNum +
", price=" + price +
'}';
}
}
|
afaad488-2473-4549-b7ec-bcfd52073f80 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-29 08:41:30", "repo_name": "sanghshlsh/ProjectBoard", "sub_path": "/src/kr/co/command/UpdateNoticeUICommand.java", "file_name": "UpdateNoticeUICommand.java", "file_ext": "java", "file_size_in_byte": 983, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "3b6af5c623225f411d3e79571ed58d804e7bb41b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/sanghshlsh/ProjectBoard | 210 | FILENAME: UpdateNoticeUICommand.java | 0.26588 | package kr.co.command;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import kr.co.dao.BoardDAO;
import kr.co.domain.AttDTO;
import kr.co.domain.BoardDTO;
import kr.co.domain.CommandAction;
import kr.co.domain.SelectDTO;
public class UpdateNoticeUICommand implements Command {
@Override
public CommandAction execute(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String sNum = request.getParameter("num");
int num = 0;
if (sNum != null) {
num = Integer.parseInt(sNum);
}
BoardDAO dao = new BoardDAO();
BoardDTO dto = dao.readNotice(num);
List<AttDTO> alist =dto.getAttList();
request.setAttribute("dto", dto);
request.setAttribute("alist", alist);
return new CommandAction(false, "updateNotice.jsp");
}
}
|
2484c856-4bef-44c4-8dc1-bc1c8a92c26f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-05-26 07:29:46", "repo_name": "Hupeng7/spring-boot-demo1", "sub_path": "/spring-boot-demo-mytool/src/main/java/com/example/springbootdemomytool/utils/threaddemo/conditiondemo/test1/MyService01.java", "file_name": "MyService01.java", "file_ext": "java", "file_size_in_byte": 1004, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "bb03d77da37756b539b9ecb7bc44d3c33711bfbb", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Hupeng7/spring-boot-demo1 | 213 | FILENAME: MyService01.java | 0.224055 | package com.example.springbootdemomytool.utils.threaddemo.conditiondemo.test1;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* @ClassName MyService01
* @Description
* @Author H
* @Date 2021/8/6 11:51
* @Version 1.0
*/
public class MyService01 {
private Lock lock = new ReentrantLock();
public Condition condition = lock.newCondition();
public void await() {
lock.lock();
try {
System.out.println("await 时间为:" + System.currentTimeMillis());
condition.await();
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
lock.unlock();
}
}
public void signal() {
lock.lock();
try {
System.out.println("singal 时间为:" + System.currentTimeMillis());
condition.signal();
} finally {
lock.unlock();
}
}
}
|
8492ee28-b876-4148-9546-a11b4901f195 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2017-06-25T21:35:25", "repo_name": "mascarenhas/lua-lsp", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 995, "line_count": 37, "lang": "en", "doc_type": "text", "blob_id": "026d86b11b997a041635fe28292a443412be4e75", "star_events_count": 8, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/mascarenhas/lua-lsp | 250 | FILENAME: README.md | 0.236516 | # Typed Lua Language Server
This is a [language server](http://langserver.org/) for [Typed Lua](https://github.com/andremm/typedlua).
## Requirements
* [Typed Lua](https://github.com/andremm/typedlua)
* [luv](https://github.com/luvit/luv)
* [Lua CJSON](https://www.kyne.com.au/~mark/software/lua-cjson.php)
## Running
By default `lua-lsp` will serve request on the standard input/output streams.
Alternatively a port can be specified with the `-p` command line argument.
## Status
The following works
[x] Linting as you type (syntax and type errors)
[x] Identifier renames
[x] Goto definition of identifiers (*not* functions or table indicies)
[x] Find all references of identifiers (*not* functions or table indicies)
[x] Hover identifiers
Not yet implemented
[ ] Code completion
[ ] Signature help
[ ] Code formatting
[ ] Symbol information
[ ] Incremental synchronization
[ ] Multiple file support
[ ] Cancelation support (asynchroneous non-blocking operation)
...
|
0c823e70-6eea-437b-a6ca-027c2b99d464 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-17 07:23:03", "repo_name": "TThanida/EmployeeMangementDemo", "sub_path": "/src/main/java/com/example/employeemanagement/controller/ExceptionHandlerAdvice.java", "file_name": "ExceptionHandlerAdvice.java", "file_ext": "java", "file_size_in_byte": 985, "line_count": 24, "lang": "en", "doc_type": "code", "blob_id": "c6cd2817f35aa7021d3e5a584fefa6dd4133efd8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/TThanida/EmployeeMangementDemo | 156 | FILENAME: ExceptionHandlerAdvice.java | 0.221351 | package com.example.employeemanagement.controller;
import com.example.employeemanagement.controller.view.ExceptionErrorResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
public class ExceptionHandlerAdvice {
private Logger logger = LoggerFactory.getLogger(ExceptionHandlerAdvice.class);
@ExceptionHandler(Exception.class)
@ResponseBody
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
public ExceptionErrorResponse handleException(Exception e) throws Exception {
logger.error(e.getMessage(),e);
return new ExceptionErrorResponse(HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase(),e.getMessage());
}
}
|
3b9ebbfb-7f39-4690-8fae-98537226949f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-20 10:32:23", "repo_name": "martinwithyou/ironrhino", "sub_path": "/ironrhino/src/org/ironrhino/core/model/LabelValue.java", "file_name": "LabelValue.java", "file_ext": "java", "file_size_in_byte": 1162, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "984e8405a1c770142dfbd9f691073e7e5180c583", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/martinwithyou/ironrhino | 256 | FILENAME: LabelValue.java | 0.233706 | package org.ironrhino.core.model;
import java.io.Serializable;
import org.ironrhino.core.search.elasticsearch.annotations.Index;
import org.ironrhino.core.search.elasticsearch.annotations.Searchable;
import org.ironrhino.core.search.elasticsearch.annotations.SearchableProperty;
@Searchable(root = false)
public class LabelValue implements Serializable {
private static final long serialVersionUID = 7629652470042630809L;
@SearchableProperty(boost = 2, index = Index.NOT_ANALYZED)
private String value;
@SearchableProperty(boost = 2, index = Index.NOT_ANALYZED)
private String label;
private Boolean selected;
public LabelValue() {
}
public LabelValue(String label, String value) {
this.label = label;
this.value = value;
}
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public Boolean getSelected() {
return selected;
}
public void setSelected(Boolean selected) {
this.selected = selected;
}
}
|
a0cf2166-871a-403f-a487-40e745c6ff70 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-22 05:12:25", "repo_name": "benhalfon/home-assignment-back", "sub_path": "/src/main/java/com/sony/assignment/config/converters/user/CreateUserBoundaryToEntityConverter.java", "file_name": "CreateUserBoundaryToEntityConverter.java", "file_ext": "java", "file_size_in_byte": 985, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "28bac9079408cf291032e9c57d83759d47fb3889", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/benhalfon/home-assignment-back | 174 | FILENAME: CreateUserBoundaryToEntityConverter.java | 0.259826 | package com.sony.assignment.config.converters.user;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;
import com.sony.assignment.boundaries.CreateUserBoundary;
import com.sony.assignment.config.security.PasswordConfig;
import com.sony.assignment.entities.UserEntity;
@Component
public class CreateUserBoundaryToEntityConverter
implements Converter<CreateUserBoundary, UserEntity> {
@Autowired
private PasswordConfig securityConfig;
@Override
public UserEntity convert(CreateUserBoundary source) {
UserEntity target = new UserEntity();
target.setAddress(source.getAddress());
target.setEmail(source.getEmail());
target.setFirstName(source.getFirstName());
target.setLastName(source.getLastName());
target.setBirthDate(source.getBirthDate());
target.setPassword(securityConfig.encodePassword(source.getPassword()));
return target;
}
}
|
844d4438-c9e9-4871-820b-62680ad194a9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-16 15:29:26", "repo_name": "zovivo/demo-spring-core", "sub_path": "/src/main/java/com/demo/spring/model/Author.java", "file_name": "Author.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 64, "lang": "en", "doc_type": "code", "blob_id": "8372112e1cab6d7ce1f4e2db6ed76748e98316f5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/zovivo/demo-spring-core | 249 | FILENAME: Author.java | 0.23231 | package com.demo.spring.model;
import java.io.Serializable;
import java.util.List;
public class Author implements Serializable {
private Long id;
private String name;
private Integer gender;
private String email;
private List<Book> books;
public Author() {
}
public Author(String name, Integer gender, String email, List<Book> books) {
this.name = name;
this.gender = gender;
this.email = email;
this.books = books;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getGender() {
return gender;
}
public void setGender(Integer gender) {
this.gender = gender;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public List<Book> getBooks() {
return books;
}
public void setBooks(List<Book> books) {
this.books = books;
}
}
|
0c5bce97-5a6c-4b19-ad74-6c8a1928fdd0 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-02 21:19:58", "repo_name": "mightyflavieee/ing-sw-2021-rizzoglio-ruberto-mussato", "sub_path": "/src/main/java/it/polimi/ingsw/project/observer/Observable.java", "file_name": "Observable.java", "file_ext": "java", "file_size_in_byte": 973, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "26ff53a7dcbcbedddf203ef48f36cf3a4f9a1af0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/mightyflavieee/ing-sw-2021-rizzoglio-ruberto-mussato | 206 | FILENAME: Observable.java | 0.261331 | package it.polimi.ingsw.project.observer;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class Observable<T> implements Serializable{
private static final long serialVersionUID = 3840280592475043704L;
private final List<Observer<T>> observers = new ArrayList<>();
private String type = "Generic Type";
public void addObserver(Observer<T> observer) {
synchronized (observers) {
observers.add(observer);
}
}
public void removeObserver(Observer<T> observer) {
synchronized (observers) {
observers.remove(observer);
}
}
public void notify(T message) {
synchronized (observers) {
for (Observer<T> observer : observers) {
observer.update(message);
}
}
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
|
319d565d-b705-44fc-9eb8-dc6c38aa395b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-31 16:41:56", "repo_name": "CHeuberger/Taxi", "sub_path": "/src/java/cfh/taxi/node/WritersDepot.java", "file_name": "WritersDepot.java", "file_ext": "java", "file_size_in_byte": 978, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "6c41b1162276e42d84168140a5fa59a0798ea2d3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/CHeuberger/Taxi | 222 | FILENAME: WritersDepot.java | 0.290176 | package cfh.taxi.node;
import static cfh.taxi.node.NodeClass.INOUT;
import static cfh.taxi.node.NodeClass.STRING;
import java.util.EnumSet;
import cfh.taxi.Location;
import cfh.taxi.Passenger;
import cfh.taxi.TaxiException;
import cfh.taxi.Value;
public class WritersDepot extends Location {
WritersDepot(NodeType type, String name, int x, int y) {
super(type, name, x, y);
}
@Override
public String description() {
return "pickup a specified string";
}
@Override
public EnumSet<NodeClass> nodeClass() {
return EnumSet.of(STRING, INOUT);
}
@Override
public Passenger addWaiting(Value value) throws TaxiException {
if (!value.isString())
throw new TaxiException(value + " cannot be made to wait at " + this + ", only strings");
Passenger passenger = new Passenger(value);
addOutgoing(passenger);
return passenger;
}
}
|
de084e9e-bb28-4d4f-8382-2537a2d05288 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-30 09:04:59", "repo_name": "PeterInfraBIM/IFC_GraphQL_server", "sub_path": "/dataserver/src/main/java/nl/infrabim/ifc/dataserver/services/IfcWallStandardCaseService.java", "file_name": "IfcWallStandardCaseService.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "daf81028c4a50747e4f0bdcab781ad8ba98b7b13", "star_events_count": 3, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/PeterInfraBIM/IFC_GraphQL_server | 206 | FILENAME: IfcWallStandardCaseService.java | 0.267408 | package nl.infrabim.ifc.dataserver.services;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import nl.infrabim.ifc.dataserver.models.IfcWallStandardCase;
@Service
public class IfcWallStandardCaseService {
@Autowired
private MongoTemplate mongoTemplate;
public List<IfcWallStandardCase> getAllWallStandardCases() {
Query query = new Query();
query.addCriteria(Criteria.where("type").is("IfcWallStandardCase"));
return mongoTemplate.find(query, IfcWallStandardCase.class);
}
public IfcWallStandardCase getOneWallStandardCase(String globalId) {
Query query = new Query();
query.addCriteria(Criteria.where("globalId").is(globalId));
return mongoTemplate.findOne(query, IfcWallStandardCase.class);
}
}
|
ab230200-fe7a-4429-a0b2-ee81329ca34a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-10-15 06:59:00", "repo_name": "jovan-b/The-ECS-Games", "sub_path": "/SWEN222 ECS Wars/src/gameWorld/characters/StreaderPlayer.java", "file_name": "StreaderPlayer.java", "file_ext": "java", "file_size_in_byte": 978, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "c4015f8510b3969d5220b2c1fe83bce7e0fb85fb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/jovan-b/The-ECS-Games | 272 | FILENAME: StreaderPlayer.java | 0.273574 | package gameWorld.characters;
import java.awt.Image;
import java.io.IOException;
import javax.imageio.ImageIO;
import gameWorld.Room;
/**
* Represents the David Streader playable character
*
* @author Sarah Dobie 300315033
* @author Chris Read 300254724
*
*/
public class StreaderPlayer extends Player {
public static final PlayerType type = PlayerType.MarcoPlayer;
public StreaderPlayer(Room room, int posX, int posY){
super(room, posX, posY);
// Load sprites
sprites = new Image[4][3];
try {
for (int dir = 0; dir < 4; dir++){
for (int ani = 0; ani < 3; ani++){
sprites[dir][ani] = ImageIO.read(StreaderPlayer.class.getResource("/Players/Streader"+dir+ani+".png"));
}
}
} catch (IOException e) {
System.out.println("Error loading player images: " + e.getMessage());
}
scaledSprites = sprites;
}
@Override
public PlayerType getType() {
return type;
}
@Override
public String getName() {
return "DaveS";
}
}
|
a74f1883-bb93-4afc-9b07-9dd41ac29223 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-30 19:20:48", "repo_name": "nicolaivalsted/TAYS", "sub_path": "/smp-client/src/main/java/dk/yousee/smp/casemodel/vo/cvp/SwitchFeature.java", "file_name": "SwitchFeature.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "5abd458c2d16954fbd484882b3fd0085996a2ad9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/nicolaivalsted/TAYS | 295 | FILENAME: SwitchFeature.java | 0.291787 | package dk.yousee.smp.casemodel.vo.cvp;
import dk.yousee.smp.casemodel.SubscriberModel;
import dk.yousee.smp.casemodel.vo.helpers.BasicUnit;
import dk.yousee.smp.casemodel.vo.helpers.PropHolder;
import dk.yousee.smp.order.model.OrderDataLevel;
import dk.yousee.smp.order.model.OrderDataType;
import dk.yousee.smp.order.model.ServicePrefix;
/**
* Created by IntelliJ IDEA.
* User: m14857
* Date: Oct 21, 2010
* Time: 2:59:38 PM
* Data structure reference to YouSee Data Migration Requirements: 5.4.1.2 Switch Feature
*/
public class SwitchFeature extends BasicUnit {
public static OrderDataLevel LEVEL = OrderDataLevel.CHILD_SERVICE;
public static OrderDataType TYPE = new OrderDataType( ServicePrefix.SubSvcSpec,"smp_switch_feature_pkg_std");
public SwitchFeature(SubscriberModel model, String externalKey, CableVoiceService parent) {
super(model, externalKey, TYPE, LEVEL,null, parent);
parent.getSwitchFeatureList().add(this);
switch_feature_service_id.updateValue(externalKey);
}
//Type.FEATURE
public PropHolder switch_feature_service_id = new PropHolder(this, "switch_feature_service_id", true);
}
|
4b70367c-13d1-482f-a9d4-36ac4a7a9d6c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-01 02:27:32", "repo_name": "PeanutZhang/MyExe", "sub_path": "/app/src/main/java/com/example/zyh/myexe/RunningNumberActivity.java", "file_name": "RunningNumberActivity.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "7923d605e9d31b38d6bf62cbde1d6fc7ef203022", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/PeanutZhang/MyExe | 225 | FILENAME: RunningNumberActivity.java | 0.264358 | package com.example.zyh.myexe;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.chaychan.viewlib.NumberRunningTextView;
public class RunningNumberActivity extends Activity {
protected NumberRunningTextView tvMoney;
protected NumberRunningTextView tvNum;
int money = 18888;
int num = 666666;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setContentView(R.layout.activity_running_number);
initView();
}
public void setNum(View view) {
tvMoney.setContent(++money+"");
tvNum.setContent(++num+"");
}
private void initView() {
tvMoney = (NumberRunningTextView) findViewById(R.id.tv_money);
tvNum = (NumberRunningTextView) findViewById(R.id.tv_num);
}
public void toast(View view) {
String mony= tvMoney.getText().toString();
Toast.makeText(getBaseContext(),"获取金额内容---"+mony,Toast.LENGTH_SHORT).show();
}
}
|
5b494933-2ebf-4457-9861-49ea82cc61e5 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-13 01:31:35", "repo_name": "EAGARCIAH707/todo1-kardex-api", "sub_path": "/src/main/java/com/todo1/kardex/service/user/impl/UserServiceImpl.java", "file_name": "UserServiceImpl.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "898fbae4898b3b324c104dafe7e2474504427377", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/EAGARCIAH707/todo1-kardex-api | 219 | FILENAME: UserServiceImpl.java | 0.261331 | package com.todo1.kardex.service.user.impl;
import com.todo1.kardex.model.dto.UserDto;
import com.todo1.kardex.model.entities.UserEntity;
import com.todo1.kardex.repository.user.impl.UserRepositoryFacade;
import com.todo1.kardex.service.user.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import static com.todo1.kardex.commons.util.Converter.converterObject;
@Service
public class UserServiceImpl implements IUserService {
private final UserRepositoryFacade userRepository;
private final PasswordEncoder passwordEncoder;
@Autowired
public UserServiceImpl(UserRepositoryFacade userRepository, PasswordEncoder passwordEncoder) {
this.userRepository = userRepository;
this.passwordEncoder = passwordEncoder;
}
@Override
public UserDto signUp(UserDto userDto) {
userDto.setPassword(passwordEncoder.encode(userDto.getPassword()));
var user = converterObject(userDto, UserEntity.class);
user = userRepository.create(user);
return converterObject(user, UserDto.class);
}
}
|
80fb016c-f6db-4ed3-a9c7-e388217d7c85 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-15 09:41:18", "repo_name": "albert-liu435/rookie-springboot-quartz", "sub_path": "/springquartz/learnquartz/src/main/java/com/rookie/bigdata/learn10/SimpleJob.java", "file_name": "SimpleJob.java", "file_ext": "java", "file_size_in_byte": 1074, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "de838828f8b754a0a90e02eead31eeb0d8ccbbc5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/albert-liu435/rookie-springboot-quartz | 261 | FILENAME: SimpleJob.java | 0.275909 | package com.rookie.bigdata.learn10;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobKey;
import java.util.Date;
import java.util.Set;
/**
* @ClassName SimpleJob
* @Description SimpleJob
* @Author
* @Date 2020/1/20 9:18
* @Version 1.0
*/
public class SimpleJob implements Job {
public SimpleJob() {
}
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
JobKey jobKey = context.getJobDetail().getKey();
System.out.println("Executing job: " + jobKey + " executing at " + new Date() + ", fired by: " + context.getTrigger().getKey());
if(context.getMergedJobDataMap().size() > 0) {
Set<String> keys = context.getMergedJobDataMap().keySet();
for(String key: keys) {
String val = context.getMergedJobDataMap().getString(key);
System.out.println(" - jobDataMap entry: " + key + " = " + val);
}
}
context.setResult("hello");
}
}
|
9ed4c4d8-c8ef-42c8-83ad-76cde408aeb8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-01-21T18:21:21", "repo_name": "wartman/blok", "sub_path": "/notes/Style.md", "file_name": "Style.md", "file_ext": "md", "file_size_in_byte": 1161, "line_count": 35, "lang": "en", "doc_type": "text", "blob_id": "a58e526f66d1b5fd3295c03dad89bec3c5a58d85", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/wartman/blok | 303 | FILENAME: Style.md | 0.267408 | Styles
======
Looking at `elm-ui` again, and thinking that will be a better direction to go than trying to recreate all of CSS in our style system (as is sorta happening now).
Could look something more like (stealing this directly from `elm-ui`'s example):
```haxe
Ui.row({
style: [
Element.width(Fill),
Layout.style({
position: CenterY,
spacing: 30
})
// // Or, using shortcuts:
// Layout.centerY(),
// Layout.spacing(30)
],
children: [
Ui.element({
style: [
Background.color(Color.rgb(240, 0, 245)),
Font.color(Color.rgb(255 255 255)),
Border.rounded(3),
Element.padding(30)
],
child: Ui.text('Stylish!')
})
]
});
```
This would use the existing `Style` system, but would expose a lot of shortcuts (like `Element.width(Fill`). `Ui` would be fairly simple, exposing `Ui.row`, `Ui.element`, `Ui.text`. Other elements will require using `Html`. The `Ui` module is mostly just some helpers to make sure base styles are applied (`elm-ui` does go harder, and has its own `Input` module and everything, but I don't think that will be needed with our system.).
|
79ed1a58-2978-4333-bb17-a24dc87758bd | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-02-05T17:34:59", "repo_name": "almaleh/Dispatcher", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 977, "line_count": 20, "lang": "en", "doc_type": "text", "blob_id": "b99505ea2701f2a0421456b48074cd42ea2b31b6", "star_events_count": 102, "fork_events_count": 15, "src_encoding": "UTF-8"} | https://github.com/almaleh/Dispatcher | 239 | FILENAME: README.md | 0.275909 | # Dispatcher
This is the companion app to my article on concurrency in iOS
[Concurrency Explained: Sync vs Async, Serial vs Concurrent](https://medium.com/@almalehdev/concurrency-visualized-part-1-sync-vs-async-c433ff7b3ebe)
## How to Install
- Clone the repo, open xcworkspace and build locally (requires Xcode 11)
- [Or download the public beta directly on your device](https://testflight.apple.com/join/2tC0CKMO)
The app runs on iOS 13.0+ (it's in SwiftUI). It's optimized for iPhone X screen or larger, so I recommend not picking something smaller than an iPhone X simulator.
It includes a 10-question concurrency quiz. I suggest trying it before and then again after reading the article to see how your score changes
There is also a visual explanation of synchronous and asynchronous execution, as well as serial and concurrent queues.
<p align="center"><img src="https://github.com/almaleh/Dispatcher/blob/master/Github-Images/concurrent.gif" width="300"></p>
|
232e4808-f43a-4869-b6eb-d2485295a548 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2015-11-06T17:15:31", "repo_name": "iliatcymbal/filterTable", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1070, "line_count": 22, "lang": "en", "doc_type": "text", "blob_id": "1b6eaba1d1c8d0e35412a56253c24ae4632b85ad", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/iliatcymbal/filterTable | 254 | FILENAME: README.md | 0.240775 | The simple example of nodeJS server and ui-filtering of the data.
The data is asynchronously received from the server, where this data had been converted from TSV to JSON.
Installation.
1. Run "npm install".
2. Run "npm run full-start" and wait for the console output "Server running at http://127.0.0.1:8124".
3. Open http://127.0.0.1:8124 in your browser.
Known issues:
1) Application has just base styles for it's markup. Also it has minimalistic design.
2) The filter fields aren't linked with each other (single filtering).
3) Rendering table with the 1k items within 1 execution doesn’t seem to be a good approach. This will be definitely "performance killer" (especially for old browsers). The more preferable approach is lazy loading/rendering.
4) Still I have low rendering issue for ie8 (the table with the user list).
5) I showed all the items inside the users table because there is no any requirements about fields that have to be shown.
6) Server side aren't used any additional frameworks for routing and templaters due to simple server logic.
|
cba19f51-acb0-456e-8e53-e2bac28f6ff4 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-04 16:48:47", "repo_name": "dougculnane/java-pi-thing", "sub_path": "/src/main/java/net/culnane/pi/thing/actuator/Relay.java", "file_name": "Relay.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 62, "lang": "en", "doc_type": "code", "blob_id": "90178b59fb368ebb3a80614c03319755784eabba", "star_events_count": 3, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/dougculnane/java-pi-thing | 347 | FILENAME: Relay.java | 0.268941 | package net.culnane.pi.thing.actuator;
import com.pi4j.io.gpio.GpioFactory;
import com.pi4j.io.gpio.GpioPinDigitalOutput;
import com.pi4j.io.gpio.Pin;
import com.pi4j.io.gpio.PinState;
/**
* Relay switch.
*
* @author Doug Culnane
*/
public class Relay {
/**
* Name of the actuator.
*/
private String name = "MyRelay";
private boolean wiredOffWithNoPower = false;
private boolean on = false;
private GpioPinDigitalOutput pin = null;
public Relay(Pin pin, boolean wiredOffWithNoPower) {
this.pin = GpioFactory.getInstance().provisionDigitalOutputPin(pin, PinState.LOW);
this.wiredOffWithNoPower = wiredOffWithNoPower;
}
public Relay(Pin pin, boolean wiredOffWithNoPower, String name) {
this(pin, wiredOffWithNoPower);
this.name = name;
}
public void on() {
if (wiredOffWithNoPower) {
pin.setState(PinState.HIGH);
} else {
pin.setState(PinState.LOW);
}
on = true;
}
public void off() {
if (wiredOffWithNoPower) {
pin.setState(PinState.LOW);
} else {
pin.setState(PinState.HIGH);
}
on = false;
}
public String getName() {
return name;
}
public boolean isOn() {
return on;
}
}
|
efab4bd6-4a0a-46d0-b53e-b12cbde36c8b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-21 17:34:39", "repo_name": "KamilAdd-Byte/multi-threading", "sub_path": "/src/main/java/com/multithreading/queuethread/countdownfatch/HuntRunnable.java", "file_name": "HuntRunnable.java", "file_ext": "java", "file_size_in_byte": 1008, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "55eb9f97a7fd3202521f4d67de4248df8216f8b6", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/KamilAdd-Byte/multi-threading | 218 | FILENAME: HuntRunnable.java | 0.294215 | package com.multithreading.queuethread.countdownfatch;
import lombok.extern.slf4j.Slf4j;
import java.util.concurrent.CountDownLatch;
@Slf4j
public class HuntRunnable implements Runnable{
private CountDownLatch countDownLatch;
public HuntRunnable(CountDownLatch countDownLatch) {
this.countDownLatch = countDownLatch;
}
@Override
public void run() {
log.info("Enter to hunt! " + Thread.currentThread().getName());
hunt();
countDownLatch.countDown();//wywołania obniza licznik (3) o jeden.
log.info("Leaving the hunt! " + Thread.currentThread().getName());
}
private void hunt(){
log.info(" Character from the thread: " + Thread.currentThread().getName() + " is hunting");
try {
Thread.sleep(7000);
} catch (InterruptedException e) {
e.printStackTrace();
}
log.info(" Character from the thread: " + Thread.currentThread().getName() + " come back from the hunt");
}
}
|
4092aaeb-2fe6-4052-9b27-501d873f37be | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-04 08:56:15", "repo_name": "yfuks/react-native-parse-notification-android", "sub_path": "/Android/src/main/java/com/notificationandroid/NotificationAndroidPackage.java", "file_name": "NotificationAndroidPackage.java", "file_ext": "java", "file_size_in_byte": 1160, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "fc31281b995877ae1823ad2ed04846df82a0f988", "star_events_count": 2, "fork_events_count": 3, "src_encoding": "UTF-8"} | https://github.com/yfuks/react-native-parse-notification-android | 218 | FILENAME: NotificationAndroidPackage.java | 0.249447 | package com.notificationandroid;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JavaScriptModule;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import android.app.Activity;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class NotificationAndroidPackage implements ReactPackage {
private final Activity mMainActivity;
private NotificationAndroidModule mModuleInstance;
public NotificationAndroidPackage(Activity mainActivity) {
this.mMainActivity = mainActivity;
}
@Override
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
mModuleInstance = new NotificationAndroidModule(reactContext, mMainActivity);
return Arrays.<NativeModule>asList(mModuleInstance);
}
@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
@Override
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
return Collections.emptyList();
}
} |
ccf665c0-2067-4943-a90d-c131dbececfd | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-06-22 10:29:44", "repo_name": "elapsedMs/MagicSpace", "sub_path": "/app/src/main/java/storm/magicspace/activity/FeedBackActivity.java", "file_name": "FeedBackActivity.java", "file_ext": "java", "file_size_in_byte": 1117, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "31f4a691e98e36d00acfc368c94e46bcfafc657e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/elapsedMs/MagicSpace | 220 | FILENAME: FeedBackActivity.java | 0.235108 | package storm.magicspace.activity;
import android.content.Context;
import android.content.Intent;
import android.widget.EditText;
import android.widget.TextView;
import storm.commonlib.common.CommonConstants;
import storm.commonlib.common.base.BaseActivity;
import storm.magicspace.R;
/**
* Created by py on 2016/6/16.
*/
public class FeedBackActivity extends BaseActivity {
private TextView tv_client_version;
private EditText et_feedback, et_contact;
public FeedBackActivity() {
super(R.layout.activity_feed_back, CommonConstants.ACTIVITY_STYLE_WITH_TITLE_BAR);
}
@Override
public void initView() {
super.initView();
tv_client_version = findView(R.id.tv_client_version);
et_feedback = findView(R.id.et_feedback);
et_contact = findView(R.id.et_contact);
setActivityTitle(getResources().getString(R.string.feedback));
setRightText(R.string.finish);
}
public static void startActivity(Context context) {
Intent intent = new Intent(context, FeedBackActivity.class);
context.startActivity(intent);
}
}
|
c0309f7f-d843-43f2-9f78-ba5033e583a0 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-13 13:17:01", "repo_name": "V-E-S-T/voting", "sub_path": "/src/main/java/voting/repository/RestaurantRepositoryImpl.java", "file_name": "RestaurantRepositoryImpl.java", "file_ext": "java", "file_size_in_byte": 992, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "1b9d4910f1928ff84a75bd6192508f174f01e9fa", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/V-E-S-T/voting | 198 | FILENAME: RestaurantRepositoryImpl.java | 0.279042 | package voting.repository;
import org.springframework.beans.factory.annotation.Autowired;
import voting.model.RestaurantMenu;
import voting.repository.jpaRepository.JpaRestaurantRepository;
import java.util.List;
public class RestaurantRepositoryImpl implements RestaurantRepository{
@Autowired
private JpaRestaurantRepository jpaRestaurantRepository;
@Override
public RestaurantMenu save(RestaurantMenu restaurantMenu) {
return jpaRestaurantRepository.save(restaurantMenu);
}
@Override
public boolean delete(int id) {
return jpaRestaurantRepository.delete(id) != 0;
}
@Override
public RestaurantMenu get(int id) {
return jpaRestaurantRepository.findById(id).orElse(null);
}
@Override
public List<RestaurantMenu> getAll() {
return jpaRestaurantRepository.findAll();
}
@Override
public void setVoteCount(int id, int vote) {
jpaRestaurantRepository.setVoteCount(id, vote);
}
}
|
2c3fde95-54b5-4bcc-88ec-86e5cc354836 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-24 23:04:22", "repo_name": "ProyectoProgra3/ProyectoP3", "sub_path": "/src/Model/Agenda.java", "file_name": "Agenda.java", "file_ext": "java", "file_size_in_byte": 1162, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "c58fe6e8717af10aeb879aa254489f8b02eb67cb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/ProyectoProgra3/ProyectoP3 | 204 | FILENAME: Agenda.java | 0.273574 | /*
* 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 Model;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.Arrays;
import Model.InitModel;
/**
*
* @author Mario
*/
public class Agenda {
public Agenda(){}
public ResultSet Day(){
ArrayList<Object> objs = new ArrayList<>();
objs.addAll(Arrays.asList());
ResultSet rs = InitModel.sql.SELECT("Dia", objs);
return rs;
}
public ResultSet Week(){
ArrayList<Object> objs = new ArrayList<>();
objs.addAll(Arrays.asList());
ResultSet rs = InitModel.sql.SELECT("Week", objs);
return rs;
}
public ResultSet Month(){
ArrayList<Object> objs = new ArrayList<>();
objs.addAll(Arrays.asList());
ResultSet rs = InitModel.sql.SELECT("Month", objs);
return rs;
}
}
|
e7bf4a21-00d4-4265-b568-2c0d2cbc25b8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-12-09 18:42:44", "repo_name": "DeserRC/Celeste-Plugins", "sub_path": "/CelesteHOMES/src/main/java/com/redeceleste/celestehomes/command/impls/DelHomeCommand.java", "file_name": "DelHomeCommand.java", "file_ext": "java", "file_size_in_byte": 979, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "5ba4a8f1b8504efcbb4dc74892c96d9e950a2713", "star_events_count": 6, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/DeserRC/Celeste-Plugins | 215 | FILENAME: DelHomeCommand.java | 0.255344 | package com.redeceleste.celestehomes.command.impls;
import com.redeceleste.celestehomes.command.CreateCommand;
import com.redeceleste.celestehomes.manager.HomeManager;
import com.redeceleste.celestehomes.manager.ConfigManager;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
public class DelHomeCommand extends CreateCommand {
public DelHomeCommand() {
super("delhome", "deletehome", "deletarhome");
}
@Override
public boolean execute(CommandSender sender, String s, String[] args) {
Player p = (Player) sender;
if (args.length != 1) {
p.sendMessage(ConfigManager.DelHomeArgumentsInvalid);
return false;
}
if (!HomeManager.isHome(p, args[0])) {
p.sendMessage(ConfigManager.DelHomeNotFound);
return false;
}
HomeManager.delHome(p, args[0]);
p.sendMessage(ConfigManager.HomeSuccessDeleted);
return false;
}
}
|
74fccc4a-48f0-4d2d-9bdb-5b38bd9eef9e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-26 20:13:00", "repo_name": "guilhermemartinszupper/orange-talents-09-template-ecommerce", "sub_path": "/mercado_livre/src/main/java/br/com/zupedu/gui/mercado_livre/security/AutenticacaoService.java", "file_name": "AutenticacaoService.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 27, "lang": "en", "doc_type": "code", "blob_id": "498b34f8a87d82fff45e890a3d5b1134594c8393", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/guilhermemartinszupper/orange-talents-09-template-ecommerce | 172 | FILENAME: AutenticacaoService.java | 0.190724 | package br.com.zupedu.gui.mercado_livre.security;
import br.com.zupedu.gui.mercado_livre.usuario.Usuario;
import br.com.zupedu.gui.mercado_livre.usuario.UsuarioRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;
import java.util.Optional;
@Service
public class AutenticacaoService implements UserDetailsService {
@Autowired
UsuarioRepository usuarioRepository;
@Override
public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
Optional<Usuario> usuario = usuarioRepository.findByLogin(s);
if (usuario.isPresent()) {
return usuario.get();
}
throw new UsernameNotFoundException("Usuario Nao Existe");
}
}
|
3b24ef58-1321-4f7b-8620-6ce09dc4db3c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-09 13:22:02", "repo_name": "rohitmore/LPrime-Project", "sub_path": "/LPrime/src/main/java/com/lp/controllers/UserController.java", "file_name": "UserController.java", "file_ext": "java", "file_size_in_byte": 1065, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "77a56fc316ff28c3e91e6d430af061ee0abad2d6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/rohitmore/LPrime-Project | 171 | FILENAME: UserController.java | 0.235108 | package com.lp.controllers;
import com.lp.entities.User;
import com.lp.models.ModelResponse;
import com.lp.services.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
public class UserController {
private final UserService userService;
@Autowired
public UserController(UserService userService) {
this.userService = userService;
}
@RequestMapping(name = "/users", method = RequestMethod.GET)
public List<User> getUsers() {
return userService.getAllUser();
}
@ExceptionHandler(Throwable.class)
public ModelResponse handleException(Exception ex) {
return new ModelResponse(false, ex.getMessage(), HttpStatus.INTERNAL_SERVER_ERROR);
}
}
|
306361e0-96ce-4b4f-9a22-da7cfd2aba8e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-11-02 08:24:01", "repo_name": "stadnytskyivp/HotlineSeleniumGradle", "sub_path": "/src/main/java/com/hotline/pageobject/pages/LoginPage.java", "file_name": "LoginPage.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "6fa033eb47b91b88682f53a7b59c62fa3b7ef394", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/stadnytskyivp/HotlineSeleniumGradle | 219 | FILENAME: LoginPage.java | 0.253861 | package com.hotline.pageobject.pages;
import io.qameta.allure.Step;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class LoginPage extends AuthorizationPage {
private WebElement submitBtn;
private WebElement forgotPasswordLink;
private WebElement registerLink;
public LoginPage(WebDriver driver) {
super(driver);
}
public WebElement getSubmitBtn() {
submitBtn = driver.findElement(By.cssSelector("[data-id='verification']"));
return submitBtn;
}
public WebElement getForgotPasswordLink() {
forgotPasswordLink = driver.findElement(By.cssSelector("[href='/reminder/']"));
return forgotPasswordLink;
}
public WebElement getRegisterLink() {
registerLink = driver.findElement(By.cssSelector("[href='/register/']"));
return registerLink;
}
@Step("Going to the registration page")
public RegistrationPage gotoRegistrationPage() {
clickRegister();
return new RegistrationPage(driver);
}
private void clickRegister() {
getRegisterLink().click();
}
}
|
82915573-3b95-4ed8-a1dc-46b4c251d305 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-06-09T17:33:04", "repo_name": "kmate/parallella-cipher-demo", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1159, "line_count": 44, "lang": "en", "doc_type": "text", "blob_id": "992e7a724d5bd7c898d10840436036155ad56a05", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/kmate/parallella-cipher-demo | 312 | FILENAME: README.md | 0.224055 | # parallella-cipher-demo
Demo application for encryption on Parallella using RAW-Feldspar and Zeldspar
## Instructions
### Preparation
git clone git@github.com:emilaxelsson/imperative-edsl
git clone git@github.com:emilaxelsson/raw-feldspar
git clone git@github.com:koengit/zeldspar
git clone git@github.com:kmate/raw-feldspar-mcs
git clone git@github.com:kmate/parallella-cipher-demo
cd parallella-cipher-demo
cabal sandbox init
cabal sandbox add-source ../imperative-edsl
cabal sandbox add-source ../raw-feldspar
cabal sandbox add-source ../zeldspar
cabal sandbox add-source ../raw-feldspar-mcs
cabal install --constraint="language-c-quote -full-haskell-antiquotes"
### Usage
To build, use
./make.sh
or on a Parallella:
./make_epiphany.sh
Encrypt a file (in-place):
cp input-file.dat encrypted.dat
./run.sh this-is-my-key encrypted.dat
The encrypted file could be restored like this:
openssl bf-ecb -d -nosalt -nopad -k this-is-my-key -in encrypted.dat -out decrypted.dat
## Known issues
* Host-device communication and one-element buffers makes it slower than is should be.
|
abd1ff17-097e-4c01-88c6-f9f76341ea59 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-08-09 11:00:24", "repo_name": "ccpwer/android_store", "sub_path": "/app/src/main/java/nba/com/wr3d_second/ViewHolder/ModsViewHolder.java", "file_name": "ModsViewHolder.java", "file_ext": "java", "file_size_in_byte": 976, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "a433086dc632fc0b9a017ee6b698785b6dab3e57", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/ccpwer/android_store | 176 | FILENAME: ModsViewHolder.java | 0.239349 | package nba.com.wr3d_second.ViewHolder;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import nba.com.wr3d_second.Interface.ItemClickListener;
import nba.com.wr3d_second.R;
public class ModsViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
public TextView modsName;
public ImageView modsImage;
ItemClickListener itemClickListener;
public void setItemClickListener(ItemClickListener itemClickListener) {
this.itemClickListener = itemClickListener;
}
public ModsViewHolder(View itemView) {
super(itemView);
modsImage = (ImageView)itemView.findViewById(R.id.mods_image);
modsName = (TextView)itemView.findViewById(R.id.mods_name);
itemView.setOnClickListener(this);
}
@Override
public void onClick(View v) {
itemClickListener.onClick(v,getAdapterPosition()); }
}
|
6ba8e17a-baa6-49f9-98cf-0f3aed412a18 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-13 07:13:48", "repo_name": "yh958619101/0619springboot-web-crud", "sub_path": "/src/main/java/com/yh/dao/impl/EmployeeDaoImpl.java", "file_name": "EmployeeDaoImpl.java", "file_ext": "java", "file_size_in_byte": 1022, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "83cd62e599b4dd97271c60ed8fbb58731a651cd4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/yh958619101/0619springboot-web-crud | 196 | FILENAME: EmployeeDaoImpl.java | 0.286169 | package com.yh.dao.impl;
import com.yh.dao.EmployeeDao;
import com.yh.entity.Employee;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public class EmployeeDaoImpl implements EmployeeDao {
@Autowired
private JdbcTemplate template;
@Override
public List<Employee> getEmpls(){
String sql ="select * from employee";
List<Employee> query = template.query(sql, new BeanPropertyRowMapper<Employee>(Employee.class));
return query;
}
@Override
public void addEmployee(Employee employee) {
String sql="insert into employee (last_name,email,gender,birth,department_id) values (?,?,?,?,?)";
int update = template.update(sql, employee.getLastName(), employee.getEmail(), employee.getGender(), employee.getBirth(), employee.getDepartmentId());
}
}
|
4ed6a676-7235-492e-bfc0-538630372649 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-07-07 05:34:53", "repo_name": "posnopi13/tock_tock", "sub_path": "/app/src/main/java/com/example/home/myapplication/SplashActivity.java", "file_name": "SplashActivity.java", "file_ext": "java", "file_size_in_byte": 1167, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "79587f0e735156fc33b72ef40b08b59049e57797", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/posnopi13/tock_tock | 221 | FILENAME: SplashActivity.java | 0.272025 | package com.example.home.myapplication;
import android.app.Activity;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
public class SplashActivity extends Activity {
static SplashActivity singleton;
public static SplashActivity getInstance() {
return singleton;
}
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
singleton = this;
//notification 없애기
NotificationManager mNotificationManager = (NotificationManager)this.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.cancel(GcmIntentService.NOTIFICATION_ID);
setContentView(R.layout.activity_splash);
initialize();
}
private void initialize() {
Handler handler = new Handler() {
public void handleMessage(Message msg) {
finish();
Intent i = new Intent(getApplicationContext(), MainActivity.class);
startActivity(i);
overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
}
};
handler.sendEmptyMessageDelayed(0, 1000);
}
}
|
80e3d1ad-3b11-46c6-90df-19e9b93237ec | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-21 06:17:49", "repo_name": "weiliji/Jrtplib4Android", "sub_path": "/app/src/main/java/com/wtoe/jrtplib/RtpHandle.java", "file_name": "RtpHandle.java", "file_ext": "java", "file_size_in_byte": 1251, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "ab490b682eaa15aad348c5c7eab048ba6d4bb9a2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/weiliji/Jrtplib4Android | 297 | FILENAME: RtpHandle.java | 0.261331 | package com.wtoe.jrtplib;
import java.io.IOException;
import java.net.ServerSocket;
public class RtpHandle {
static {
System.loadLibrary("rtp-handle");
}
/**
* 生成一个可使用的udp端口(20000以上)
*
* @param port 传20000即可
* @return
*/
public static int getAvailablePort(int port) {
try {
ServerSocket socket = new ServerSocket(port);
socket.close();
return port;
} catch (IOException e) {
return getAvailablePort(port + 2);
}
}
/**
* 只发送数据,不做接收处理
*/
public static native long initSendHandle(int localport, String desthost, int destport, RtpListener listener);
/**
* 接收数据,并转发
*/
public static native long initReceiveAndSendHandle(String localhost, int localreceiveport, int localsendport, String desthost, int destport, RtpListener listener);
/**
* 发送数据
*/
public static native boolean sendByte(long rtpHandler, byte[] src, int byteLength, boolean isSpsOrMarker, boolean isRtpData,long lastTime);
/**
* 销毁资源
*/
public static native boolean finiHandle(long rtpHandler);
}
|
19f4dc47-e67b-41e3-98dd-3d4325fd79fc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-15 09:05:54", "repo_name": "syt123450/Java-concurrency", "sub_path": "/src/main/java/com/concurrency/chapter3/control/TimeLock.java", "file_name": "TimeLock.java", "file_ext": "java", "file_size_in_byte": 1049, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "b72773e6a3fe72e9ecfa7228ef75a3d75e635e83", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/syt123450/Java-concurrency | 216 | FILENAME: TimeLock.java | 0.273574 | package com.concurrency.chapter3.control;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;
/**
* Created by ss on 2017/7/20.
*/
public class TimeLock implements Runnable {
private static ReentrantLock lock = new ReentrantLock();
@Override
public void run() {
try {
if (lock.tryLock(5, TimeUnit.SECONDS)) {
Thread.sleep(6000);
System.out.println(Thread.currentThread().getId() + ":Finish work.");
} else {
System.out.println(Thread.currentThread().getId() + ":Failed to get lock.");
}
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
if (lock.isHeldByCurrentThread()) {
lock.unlock();
}
}
}
public static void main(String[] args) {
Thread thread1 = new Thread(new TimeLock());
Thread thread2 = new Thread(new TimeLock());
thread1.start();
thread2.start();
}
}
|
19b1557b-3d9d-47f0-9a33-c8bd0c316c37 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-09 08:23:14", "repo_name": "johnnylfq/MyApplication", "sub_path": "/app/src/main/java/com/example/myapplication/constant/MessageEvent.java", "file_name": "MessageEvent.java", "file_ext": "java", "file_size_in_byte": 967, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "0b112fad3b30aad865c8741876e45bf79839e140", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/johnnylfq/MyApplication | 224 | FILENAME: MessageEvent.java | 0.206894 | package com.example.myapplication.constant;
/**
* Description:
* Detail:
* Create Time: 2018/8/13
*
* @author LiuFangQiang
* @version 1.0
* @see ...
* History:
* @since Since
*/
public class MessageEvent {
public int code;
public String message;
public String name;
public MessageEvent(int code, String message) {
this.code = code;
this.message = message;
}
public MessageEvent(int code, String message, String name) {
this.code = code;
this.message = message;
this.name = name;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
|
b4333a6f-bcaa-41e8-80d4-0c18385d96ee | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-06-03T11:43:25", "repo_name": "fkundrak/Privacy-Bot", "sub_path": "/Notes/Code Milestones.md", "file_name": "Code Milestones.md", "file_ext": "md", "file_size_in_byte": 1078, "line_count": 13, "lang": "en", "doc_type": "text", "blob_id": "12a31a082f059a872839cc7b6affd0d29ef70780", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/fkundrak/Privacy-Bot | 258 | FILENAME: Code Milestones.md | 0.216012 | https://github.com/kevinam99/Instagram-Like-Bot
Milestones for the bot:
1. Download all necessary drivers etc. for the GitHub 'like bot'.
2. Run the 'like bot' from GitHub, make sure it works and has no bugs. Runs fine, why does it stop after 1 like? FIXED.
3. Test that feeding hashtags of one category to the 'like bot' creates a timeline of associated posts. Does changing the hashtag change the timeline?
4. If step 2 is true, alter code to create a 'save bot', where posts of a certain hashtag are saved not liked.
5. Again, test that the 'save bot' affects the timeline.
6. Next, find a BIG list of hashtags, and write a script that will randomly select a hashtag from that list. Perhaps use the categories that Instagram/fb/google have for interests as the hashtags themselves (e.g. #fitness). https://voymedia.com/facebook-interests-list/
7. Add this to the 'save bot', which should now be a randomised privacy bot.
8. Confirm that the bot does no more saving than Instagram's hourly limit (probably same as the hourly limit for liking).
|
f54bfaf0-6feb-4ced-9f35-70b55fd79210 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-10 05:58:39", "repo_name": "iggor1995/cinema", "sub_path": "/presentation/src/main/java/com/epam/igor/entity/LanguageBean.java", "file_name": "LanguageBean.java", "file_ext": "java", "file_size_in_byte": 1161, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "d6eb1c5660f3be0a156e5881ebe92ab8eb3bebea", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/iggor1995/cinema | 245 | FILENAME: LanguageBean.java | 0.290176 | package com.epam.igor.entity;
import javax.annotation.PostConstruct;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;
import java.io.Serializable;
import java.util.Locale;
@ManagedBean(name = "language")
@SessionScoped
public class LanguageBean implements Serializable {
private static final long serialVersionUID = -6831921342246196194L;
private Locale locale;
/**
* Method initializes session's locale
*/
@PostConstruct
public void init() {
locale = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale();
}
/**
* @return present locale
*/
public Locale getLocale() {
return locale;
}
/**
* @return present language name
*/
public String getLanguage() {
return locale.getLanguage();
}
/**
* Method changes present language on another
*
* @param language on changing
*/
public void setLanguage(String language) {
locale = new Locale(language);
FacesContext.getCurrentInstance().getViewRoot().setLocale(locale);
}
}
|
761a125b-6898-49f8-8ae2-0c9c6b635f0b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-08-29 10:11:28", "repo_name": "hanqunfeng/springbootchapter", "sub_path": "/chapter27/src/main/java/com/example/runner/IndexController.java", "file_name": "IndexController.java", "file_ext": "java", "file_size_in_byte": 1231, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "e18345e3e1a1b44690af795a015927f8d4420bc7", "star_events_count": 9, "fork_events_count": 10, "src_encoding": "UTF-8"} | https://github.com/hanqunfeng/springbootchapter | 232 | FILENAME: IndexController.java | 0.216012 | package com.example.runner;
import com.example.externalproperties.PropertiesDemo;
import com.example.utils.ExternalPropertiesRefresh;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>index</p>
* Created by hanqf on 2020/4/16 22:36.
*/
@RestController
public class IndexController {
@Autowired
private ExternalPropertiesRefresh externalPropertiesRefresh;
@Autowired
private PropertiesDemo propertiesDemo;
@RequestMapping("/")
public String index() {
return "hello world";
}
@RequestMapping("/refresh")
public String refreshpro() {
externalPropertiesRefresh.refresh();
return "refresh properties success";
}
@RequestMapping("/{beanName}/refresh")
public String refreshProByBeanName(@PathVariable String beanName) {
externalPropertiesRefresh.refresh(beanName);
return "refresh properties success for " + beanName;
}
@RequestMapping("/demo")
public PropertiesDemo demo() {
return propertiesDemo;
}
}
|
f53c56a9-453b-48e4-8007-e5aab6e0f027 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-08-02 18:20:57", "repo_name": "isdom/restful-demo", "sub_path": "/src/main/java/org/jocean/restfuldemo/ctrl/ErrorHandler.java", "file_name": "ErrorHandler.java", "file_ext": "java", "file_size_in_byte": 1074, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "80a59f5741c606edd97e45f5a22298586ab26c87", "star_events_count": 4, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/isdom/restful-demo | 238 | FILENAME: ErrorHandler.java | 0.261331 | package org.jocean.restfuldemo.ctrl;
import org.jocean.aliyun.oss.OssException;
import org.jocean.idiom.ExceptionUtils;
import org.jocean.svr.annotation.HandleError;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import io.netty.handler.codec.http.HttpRequest;
@Component
public class ErrorHandler {
private static final Logger LOG = LoggerFactory.getLogger(ErrorHandler.class);
@HandleError(OssException.class)
String handleOssException(final HttpRequest req, final OssException osserror) {
LOG.warn("handle oss error when {}, detail: {}", req.uri(), osserror.error());
return "handle oss error when " + req.uri() + "{\n" + osserror.error().toString() + "\n}";
}
@HandleError(Exception.class)
String handleException(final HttpRequest req, final Exception error) {
LOG.warn("error when {}, detail: {}", req.uri(), ExceptionUtils.exception2detail(error));
return "error when " + req.uri() + "{\n" + ExceptionUtils.exception2detail(error) + "\n}";
}
}
|
89b69a19-943f-45bb-abba-468d25770fd2 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-29T20:56:27", "repo_name": "AlexzTj/p2p", "sub_path": "/src/main/java/p2p/repository/DataSource.java", "file_name": "DataSource.java", "file_ext": "java", "file_size_in_byte": 1004, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "30ad587b3d856b72a1466bc8888ec8b606d016ec", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/AlexzTj/p2p | 230 | FILENAME: DataSource.java | 0.267408 | package p2p.repository;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import java.sql.Connection;
import java.sql.SQLException;
public class DataSource {
private static HikariConfig config = new HikariConfig();
private static HikariDataSource ds;
static {
config.setJdbcUrl("jdbc:h2:~/test;DB_CLOSE_DELAY=-1;MULTI_THREADED=1;");
config.setUsername("sa");
config.setPassword("");
config.setMinimumIdle(25);
config.setMaximumPoolSize(25);
config.addDataSourceProperty("cachePrepStmts", "true");
config.addDataSourceProperty("prepStmtCacheSize", "250");
config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
ds = new HikariDataSource(config);
}
private DataSource() {}
public static Connection getConnection() {
try {
return ds.getConnection();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
} |
ca446c85-cf8b-469a-8d42-c3194bd7155c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-04-13 16:08:30", "repo_name": "FlipE/EntityUnknown", "sub_path": "/src/co/uk/cbaker/eu/game/ai/soldier/DeadState.java", "file_name": "DeadState.java", "file_ext": "java", "file_size_in_byte": 1007, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "26ebcde83763a2e83db3cd7014409ed6a4e5e5f0", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/FlipE/EntityUnknown | 233 | FILENAME: DeadState.java | 0.268941 | package co.uk.cbaker.eu.game.ai.soldier;
import co.uk.cbaker.eu.game.entity.EntityManager;
import co.uk.cbaker.eu.game.state.State;
import co.uk.cbaker.eu.game.state.StateMachine;
/**
* Singleton AIState implementation
*
* @author Chris B
*/
public class DeadState implements State {
/** The AIState instance */
private static State instance;
/** Private constructor can't be called from outside the class */
private DeadState() {}
/**
* Returns the singleton AIState instance
* @return the singleton AIState instance
*/
public static State getInsatnce() {
if(instance == null) {
instance = new DeadState();
}
return instance;
}
@Override
public void Enter(EntityManager em, int entity, StateMachine machine) {
// do something when state is entered
System.out.println("Dead.");
}
@Override
public void Execute(EntityManager em, int entity, StateMachine machine) {
}
@Override
public void Exit(EntityManager em, int entity, StateMachine machine) {
}
}
|
bdfe514d-9ac1-4639-80e7-53bf09ec89d0 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-20 02:58:08", "repo_name": "MingZhang-PS/cloud-knowledgebase-service", "sub_path": "/src/main/java/com/sap/fsm/knowledgebase/domain/model/ProviderType.java", "file_name": "ProviderType.java", "file_ext": "java", "file_size_in_byte": 1032, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "d08c9945203cefa48b12741593529183a64b0b27", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/MingZhang-PS/cloud-knowledgebase-service | 233 | FILENAME: ProviderType.java | 0.279828 | package com.sap.fsm.knowledgebase.domain.model;
import org.hibernate.validator.constraints.Length;
import lombok.Data;
import javax.persistence.*;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Entity
@Table(name = "knowledgebaseprovidertype")
@Valid
@Data
public class ProviderType {
@Id
@NotBlank
@Column(name = "code", nullable = false, updatable = false, unique = true)
@Length(max = 512)
private String code;
@NotNull
@Column(name = "lastchanged")
@Temporal(TemporalType.TIMESTAMP)
@Version
private Date lastChanged;
@Column
@Length(max = 512)
private String name;
/* @OneToOne(mappedBy = "providerType", fetch = FetchType.LAZY)
private KnowledgeBaseProviderConfiguration providerConfiguration; */
@PrePersist
@PreUpdate
private void beforeUpdate() {
this.lastChanged = this.lastChanged == null? new Date(): this.lastChanged;
}
}
|
2ad910d6-60dc-4a46-b50b-8be18095b0cf | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-03 06:47:04", "repo_name": "rzendaris/pos", "sub_path": "/app/src/main/java/id/kopipintar/pos/model/Paket.java", "file_name": "Paket.java", "file_ext": "java", "file_size_in_byte": 1162, "line_count": 58, "lang": "en", "doc_type": "code", "blob_id": "f39f525157554484f976302d7329b6317539ea83", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/rzendaris/pos | 261 | FILENAME: Paket.java | 0.249447 | package id.kopipintar.pos.model;
public class Paket {
private String nama;
private int harga;
private int diskon;
private int quantity;
private String[] items;
public Paket(String nama, int harga, int diskon, int quantity, String[] items) {
this.nama = nama;
this.harga = harga;
this.diskon = diskon;
this.quantity = quantity;
this.items = items;
}
public String getNama() {
return nama;
}
public void setNama(String nama) {
this.nama = nama;
}
public int getHarga() {
return harga;
}
public void setHarga(int harga) {
this.harga = harga;
}
public int getDiskon() {
return diskon;
}
public void setDiskon(int diskon) {
this.diskon = diskon;
}
public int getQuantity() {
return quantity;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
}
public String[] getItems() {
return items;
}
public void setItems(String[] items) {
this.items = items;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.