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
f9f2ed1c-2799-4345-9f1e-a4d02d6e1613
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-06 02:34:04", "repo_name": "yuanzaiyuanfang/LifeHelper", "sub_path": "/app/src/main/java/com/yzyfdf/lifehelper/ui/travel/model/FoundModel.java", "file_name": "FoundModel.java", "file_ext": "java", "file_size_in_byte": 988, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "217996c57dd27364222da3155b3d4ba43006cb4d", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/yuanzaiyuanfang/LifeHelper
223
FILENAME: FoundModel.java
0.282988
package com.yzyfdf.lifehelper.ui.travel.model; import android.content.Context; import com.jaydenxiao.common.baserx.RxSchedulers; import com.yzyfdf.lifehelper.app.Api; import com.yzyfdf.lifehelper.bean.travel.TravelFoundBean; import com.yzyfdf.lifehelper.ui.travel.contract.FoundContract; import rx.Observable; /** * Created by Conan on 2017/2/23. */ /**************** * 使用例子 ****************/ // Api.getInstance().errorObservable("失败"); // Api.getInstance().demoMethod(mContext, params...).flatMap(Func...).map(Func...).compose(RxSchedulers.<Object>io_main()); public class FoundModel implements FoundContract.Model { Context mContext; @Override public void setTag(Context context) { mContext = context; } @Override public Observable<TravelFoundBean.DataBean > getHots() { return Api.getInstance().getHots(mContext) .map(TravelFoundBean::getData) .compose(RxSchedulers.io_main()); } }
4bbfae99-67a3-414a-9743-e390a456756d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-02 03:00:18", "repo_name": "brakhin/job4j", "sub_path": "/2_ood/src/main/java/ru/bgbrakhi/ood/store/stores/WarehouseExt.java", "file_name": "WarehouseExt.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "eff3a18218ea5810435579c14c99c4fdcf47f2a5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/brakhin/job4j
209
FILENAME: WarehouseExt.java
0.288569
package ru.bgbrakhi.ood.store.stores; import ru.bgbrakhi.ood.store.food.Food; import ru.bgbrakhi.ood.store.food.FoodExt; public class WarehouseExt extends BasicStore { protected IStore component; protected WarehouseExt warehouseRes = null; public WarehouseExt(IStore component) { this.component = component; } public BasicStore getComponent() { return (BasicStore) this.component; } public WarehouseExt getWarehouseRes() { return warehouseRes; } private boolean hasStorePlace() { return true; } @Override public void add(Food food) { if (!hasStorePlace() && warehouseRes == null) { warehouseRes = new WarehouseExt(component); warehouseRes.add(food); } else { if (((FoodExt) food).isNeedLowTemp()) { component.add(food); } else { super.add(food); } } } }
219f8850-f119-421e-b2e7-6b641188cb50
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-10-07 09:58:04", "repo_name": "Raigen/PersonalAssistantAndroid", "sub_path": "/app/src/main/java/de/falkentavio/speechrecognizer/Visualizer/VoiceResponse.java", "file_name": "VoiceResponse.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "895a67638765ac07a285ac69f71260333be78c00", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Raigen/PersonalAssistantAndroid
226
FILENAME: VoiceResponse.java
0.245085
package de.falkentavio.speechrecognizer.Visualizer; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.speech.tts.TextToSpeech; import android.util.Log; import java.util.Locale; /** * Created by foellerich on 16.10.2015. */ public class VoiceResponse implements TextToSpeech.OnInitListener { TextToSpeech engine; public VoiceResponse(Context context) { engine = new TextToSpeech(context, this); } @Override public void onInit(int status) { Log.d("Speech", "OnInit - Status [" + status + "]"); if (status == TextToSpeech.SUCCESS) { Log.d("Speech", "Success!"); engine.setLanguage(Locale.GERMAN); } } @TargetApi(Build.VERSION_CODES.LOLLIPOP) public void speech(String text) { engine.setPitch(1); engine.setSpeechRate(1); engine.speak(text, TextToSpeech.QUEUE_FLUSH, null, null); } }
d40cce5e-0fb8-4e03-b1af-552b6a921f94
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-15 16:43:43", "repo_name": "GabrielPelosi/lapr3-isep", "sub_path": "/src/main/java/lapr/project/controller/RegisterCostumerController.java", "file_name": "RegisterCostumerController.java", "file_ext": "java", "file_size_in_byte": 973, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "04b3da9d601ab150a6a54a8a08baaa478992a00b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/GabrielPelosi/lapr3-isep
210
FILENAME: RegisterCostumerController.java
0.26588
package lapr.project.controller; import lapr.project.model.Address; import lapr.project.model.CostumerService; import lapr.project.model.PHUserService; import lapr.project.model.Pharmacy; /** * The type Register costumer controller. */ public class RegisterCostumerController { private final CostumerService costumerService; /** * Instantiates a new Register costumer controller. */ public RegisterCostumerController() { this.costumerService = new CostumerService(); } /** * Register costumer boolean. * * @param userName the user name * @param email the email * @param password the password * @param address the address * @param nif the nif * @return the boolean */ public boolean registerCostumer(String userName, String email, String password, Address address, int nif){ return costumerService.registerCostumer(userName,email,password,address, nif); } }
21b77a7d-cc01-45e6-b647-bdfafbf1cee2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-05 02:21:31", "repo_name": "ZettaiKurokaze/CMS_Android", "sub_path": "/app/src/main/java/com/andromeda/cms/ui/logoutFragment.java", "file_name": "logoutFragment.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "6671d43b1383b8645d433827629d31d12be50536", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ZettaiKurokaze/CMS_Android
152
FILENAME: logoutFragment.java
0.224055
package com.andromeda.cms.ui; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import androidx.fragment.app.Fragment; import com.andromeda.cms.Login; import com.google.firebase.auth.FirebaseAuth; import static android.content.Context.MODE_PRIVATE; public class logoutFragment extends Fragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FirebaseAuth.getInstance().signOut(); saveData(); startActivity(new Intent(getActivity().getApplicationContext(),Login.class)); getActivity().finish(); } public void saveData() { SharedPreferences sharedPreferences = getContext().getSharedPreferences("sharedPrefs", MODE_PRIVATE); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putInt("user type",0); editor.apply(); } }
223be45e-0b9b-48bd-9d18-8ece6da883dd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-10-11T10:54:49", "repo_name": "ubirch/az-iot-hub", "sub_path": "/IBMCLOUD.md", "file_name": "IBMCLOUD.md", "file_ext": "md", "file_size_in_byte": 962, "line_count": 14, "lang": "en", "doc_type": "text", "blob_id": "7aa56ed37d5f2b9d25a6c005f8f462e3e795ad83", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ubirch/az-iot-hub
231
FILENAME: IBMCLOUD.md
0.203075
# Example for Accessing IBM Cloud w/ Pycom Device #### Prerequisites - Editor ([Visual Studio Code](https://code.visualstudio.com/download) or [Atom](https://atom.io)) with pymakr plugin installed #### How to send sensor data to IBM Cloud - Setup an [IBM Cloud account](https://cloud.ibm.com/registration) and create a Watson IoT Platform instance. > You can choose the *Lite service plan* - Register your device. Follow Step 1 of [this tutorial](https://cloud.ibm.com/docs/services/IoT?topic=iot-platform-getting-started#step1) - Fill out `ibm_cloud.json` in this project with the organization ID, device type, device ID, and authentication token - Add `config.json` with your WIFI SSID and password - Upload project to device using pymakr and run > You can find a tutorial on how to visualize your sensor data in the Watson IoT Platform [here](https://cloud.ibm.com/docs/tutorials?topic=solution-tutorials-gather-visualize-analyze-iot-data#createcards).
ee90becd-b845-4803-af59-6c7fffdfb836
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-06 19:53:30", "repo_name": "zalak13/SmartYou", "sub_path": "/Finale/src/Business/Investor/FinancialsDirectory.java", "file_name": "FinancialsDirectory.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "48a457777608ad55ca2e86dd3aa90b72fc2d2df7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/zalak13/SmartYou
210
FILENAME: FinancialsDirectory.java
0.283781
/* * 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 Business.Investor; import java.util.ArrayList; /** * * @author Zak */ public class FinancialsDirectory { private ArrayList<Financials> financialsList; public FinancialsDirectory() { financialsList = new ArrayList<Financials>(); } public ArrayList<Financials> getFinancialsList() { return financialsList; } public void setFinancialsList(ArrayList<Financials> financialsList) { this.financialsList = financialsList; } public Financials addFinancials() { Financials objFinancials = new Financials(); financialsList.add(objFinancials); return objFinancials; } public void deleteFinancials(Financials financials) { financialsList.remove(financials); } }
e1f78865-a7b8-40f0-9cd8-09b95f5cde71
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2012-12-13T19:02:53", "repo_name": "fernandoasevedo/nlputil", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 963, "line_count": 26, "lang": "en", "doc_type": "text", "blob_id": "5b3bff02524febc6abc3a0e68cb1d247d868b9d5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/fernandoasevedo/nlputil
249
FILENAME: README.md
0.23793
A set of NLP functionalities in Java Lang - Lemmar - Morphotagger - StopWords list and identical - Tokenizer - Translate - Web Search - WordNet Synsets Search #Dependencies - JAWS: Java API for WordNet access <http://lyle.smu.edu/~tspell/jaws/index.html> - Lematizador: <http://www2.icmc.usp.br/~taspardo/sucinto/resources.html> (developed by Erick G. Maziero) - Mxpost: A morphotagger maximum entropy basead <http://www.inf.ed.ac.uk/resources/nlp/local_doc/MXPOST.html> - Commons-codec: Security codec from apache <http://www.apache.org/> #Necessary for... - BingSearch: Account in Window Azure <https://datamarket.azure.com> - BingTranslate: Account in Window Azure <https://datamarket.azure.com> - WordNet use: Download WordNet <http://wordnet.princeton.edu/wordnet/download/> - WordReference Translate: Development Account in WordReference API <http://www.wordreference.com/docs/APIregistration.aspx> This information can be stored in the config file.
f65d45b1-5afe-49ae-abc1-feda6769a18b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-19 17:13:53", "repo_name": "mystudy2000/basicjava", "sub_path": "/src/main/java/webapp/model/StringSection.java", "file_name": "StringSection.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "6317c3389506c5952c70ecd3df69f9f36315dfa4", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/mystudy2000/basicjava
189
FILENAME: StringSection.java
0.23231
package webapp.model; import java.util.Objects; public class StringSection extends Section { private static final long serialVersionUID = 1L; public static final StringSection EMPTY = new StringSection(); private String stringSection; public String getStringSection() { return stringSection; } public StringSection() { this.stringSection = EMPTY_STRING; } public StringSection(String stringSection) { this.stringSection = stringSection; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof StringSection)) return false; StringSection that = (StringSection) o; return Objects.equals(getStringSection(), that.getStringSection()); } @Override public int hashCode() { return Objects.hash(getStringSection()); } @Override public String toString() { return stringSection; } }
cfb8c718-2598-4610-8c19-9ddb57ea664a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-17 20:07:29", "repo_name": "MotawroonProjects/Uber", "sub_path": "/app/src/main/java/com/semicolon/uber/Service/NetworkConnection.java", "file_name": "NetworkConnection.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "fa09a5e1db75a381de69c1851a762c7f4c0382ce", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/MotawroonProjects/Uber
164
FILENAME: NetworkConnection.java
0.246533
package com.semicolon.uber.Service; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class NetworkConnection { private static NetworkConnection instance=null; private NetworkConnection() { } public static synchronized NetworkConnection getInstance() { if (instance==null) { instance = new NetworkConnection(); } return instance; } private boolean getConnection(Context context) { ConnectivityManager manager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo info = manager.getActiveNetworkInfo(); if (manager!=null) { if (info.isAvailable()&&info.isConnected()) { return true; }else { return false; } } return false; } }
f9a2e807-2b19-4d58-a5d9-b2cd9b40f9ba
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-11 23:55:53", "repo_name": "function-future/function-backend", "sub_path": "/function-validation/src/main/java/com/future/function/validation/validator/scoring/QuestionBankMustExistValidator.java", "file_name": "QuestionBankMustExistValidator.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "5aaca91a73959fac9b46bd1e96ea581dbb38a839", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/function-future/function-backend
167
FILENAME: QuestionBankMustExistValidator.java
0.288569
package com.future.function.validation.validator.scoring; import com.future.function.repository.feature.scoring.QuestionBankRepository; import com.future.function.validation.annotation.scoring.QuestionBankMustExist; import java.util.List; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public class QuestionBankMustExistValidator implements ConstraintValidator<QuestionBankMustExist, List<String>> { @Autowired private QuestionBankRepository questionBankRepository; @Override public void initialize(QuestionBankMustExist constraintAnnotation) { //No Initialization needed } @Override public boolean isValid(List<String> value, ConstraintValidatorContext context) { return value.stream() .allMatch(questionBankRepository::existsByIdAndDeletedFalse); } }
47756b41-8ae1-4fa3-bd23-b8d4ba082caf
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-01 11:33:12", "repo_name": "GmBeHappy/OOP_OBJECT_ORIENTED_PROGRAMMING_KMITL", "sub_path": "/OOP_Lab7/src/oop_lab7/Staff.java", "file_name": "Staff.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "9edf59d82381e75d08a3c3143a96705940937671", "star_events_count": 2, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/GmBeHappy/OOP_OBJECT_ORIENTED_PROGRAMMING_KMITL
203
FILENAME: Staff.java
0.242206
package oop_lab7; import java.util.Date; /* * 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. */ /** * * @author Gm */ public class Staff extends Employee { private String title; public Staff(String title, String office, Double salary) { super(office, salary); this.title = title; } public Staff(String title, String office, Double salary, String name, String address, String phoneNumber, String emailAddress) { super(office, salary, name, address, phoneNumber, emailAddress); this.title = title; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } @Override public String toString() { return super.toString() + "Staff{" + "title=" + title + '}'; } }
bc524ec4-8622-4fab-92c4-5563ae74f723
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-11-06 04:27:01", "repo_name": "suxiongye/intel-iot_android", "sub_path": "/app/src/main/java/bjut/edu/cn/intel/GetRemoteData.java", "file_name": "GetRemoteData.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "ce0b1c0903d1e1733f6fc34b9d843964df0e877b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/suxiongye/intel-iot_android
199
FILENAME: GetRemoteData.java
0.246533
package bjut.edu.cn.intel; import android.util.Log; import java.io.IOException; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; /** * Created by ray on 2016/9/14. */ public class GetRemoteData { private static final String TAG = GetRemoteData.class.getSimpleName(); protected OkHttpClient client; protected String apiUrl; public GetRemoteData() { client = new OkHttpClient(); } public String getApiData(String ip_address) { apiUrl = "http://"+ip_address+":8080/intel-iot/allInfo"; Log.i(TAG, "请求 URL 为"+ apiUrl); Request request = new Request.Builder().url(apiUrl).build(); try { Response response = client.newCall(request).execute(); return response.body().string(); } catch (IOException e) { e.printStackTrace(); } return ""; } }
2cbc16de-db2e-441b-b00f-34fb97bb6423
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-06-15T06:30:28", "repo_name": "devBoysal/Feed-Reader-Testing-Project4", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 974, "line_count": 17, "lang": "en", "doc_type": "text", "blob_id": "90b9d4a7c33d098d565814346e9f43ce875d4d86", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/devBoysal/Feed-Reader-Testing-Project4
185
FILENAME: README.md
0.273574
# Project Overview In this project scenario we were given a web-based application that reads RSS feeds. The original developer of this application have already included [Jasmine](http://jasmine.github.io/). Unfortunately, they decided to move on to start their own company and we're now left with an application with an incomplete test suite. ## What I've learnt I've learnt that testing is an important part of the development process known as "test-driven development." This is when developers write tests first, before they ever start developing their application. All the tests initially fail and then they start writing application code to make these tests pass. I've now learnt how to use Jasmine to write a number of tests against pre-existing applications. These will test the underlying business logic of the application as well as the event handling and DOM manipulation. ## How to open/view project * download/clone repo and run index.html in your browser
4c51d8d6-dad3-465d-bf10-8b228563bfcb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-21T09:11:26", "repo_name": "evg-dragalev/phoneshop", "sub_path": "/core/src/main/java/com/es/core/model/phone/PhoneServiceImpl.java", "file_name": "PhoneServiceImpl.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "4b7397eb69862e3f79425dccec16f37adfa860c9", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/evg-dragalev/phoneshop
205
FILENAME: PhoneServiceImpl.java
0.276691
package com.es.core.model.phone; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.List; @Service public class PhoneServiceImpl implements PhoneService{ @Resource private PhoneDao phoneDao; @Override public List<Phone> findAll(int offset, int limit, String sortBy) { return phoneDao.findAll(offset, limit, sortBy); } @Override public int countAll() { return phoneDao.countAll(); } @Override public List<Phone> searchByModel(String keyString, int limit, int offset, String sortBy) { return phoneDao.searchByModel(keyString, limit, offset, sortBy); } @Override public int countSearchResult(String keyString) { return phoneDao.countSearchResult(keyString); } @Override public Phone getById(Long id) { return phoneDao.get(id).orElseThrow(()->new IllegalArgumentException("phoneId doesn't exist")); } }
3c30fea9-86f5-46d7-965b-2f1160195aec
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-02-26 02:07:43", "repo_name": "HaroldYi/Damanna-Android", "sub_path": "/app/src/main/java/com/hello/holaApp/activity/BaseActivity.java", "file_name": "BaseActivity.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "4b94ba1e84bbe609eea5074367d9a549d40a9caa", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/HaroldYi/Damanna-Android
189
FILENAME: BaseActivity.java
0.203075
package com.hello.holaApp.activity; import android.app.Activity; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import java.util.ArrayList; import java.util.List; /** * Created by lji5317 on 03/01/2018. */ public class BaseActivity extends AppCompatActivity { public static List<Activity> actList = new ArrayList<>(); @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); getSupportActionBar().hide(); } /*@Override protected void attachBaseContext(Context newBase) { super.attachBaseContext(TypekitContextWrapper.wrap(newBase)); }*/ /*@Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch (keyCode) { case KeyEvent.KEYCODE_BACK: return true; } return super.onKeyDown(keyCode, event); }*/ }
a5181386-b451-4a84-bc84-c8a5740e55e7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-26 17:39:52", "repo_name": "xionglian/wechatEE", "sub_path": "/src/main/java/com/controller/ProjrectActionTest.java", "file_name": "ProjrectActionTest.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "e793fb0c4da17cfa0997221397c7c88f2f1bbd19", "star_events_count": 5, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xionglian/wechatEE
196
FILENAME: ProjrectActionTest.java
0.239349
package com.controller; import com.entity.Pager; import com.entity.newT.ProjectT; import com.service.ProjectServiceTest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import java.util.List; /** * Created by zengqin on 2017/3/21. */ @Controller @RequestMapping("/projectTest") public class ProjrectActionTest { @Autowired ProjectServiceTest projectService; @RequestMapping(value = "/projectList") public Pager findAllProject(){ int a=5; System.out.println(a); String scope="active"; Pager pagerModel=new Pager(1,5); Pager pager= projectService.findAllProject(scope,pagerModel); List<ProjectT> list=pager.getDataList(); for(ProjectT s:list){ System.out.println(s.getProject()+" "+s.getSubproject()); } return pager; } }
f7e6ea5a-e4b1-4f99-b24e-6fd892ad1a64
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-15 19:01:26", "repo_name": "matishen/OpenLendingWorkAssignment", "sub_path": "/src/main/java/PageObjectLibrary/GooglePage.java", "file_name": "GooglePage.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "7e7f3ad77ef990d6b8e6f85dec6027be880190d6", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/matishen/OpenLendingWorkAssignment
189
FILENAME: GooglePage.java
0.255344
package PageObjectLibrary; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import java.util.ArrayList; import java.util.List; public class GooglePage { WebDriver driver; public GooglePage(WebDriver driver){ this.driver = driver; } private By searchBox = By.xpath("//input[@title='Search']"); private By googleSearchResults = By.xpath("//h3[@class='LC20lb DKV0Md']"); public void searchResults(String inputText){ driver.findElement(searchBox).sendKeys(inputText); } public WebElement findLinkedInResult(){ WebElement found = null; List<WebElement> links = new ArrayList<WebElement>(); links = driver.findElements(googleSearchResults); for (WebElement link: links) { String text = link.getText(); if (text.contains("LinkedIn")) found = link; } return found; } }
0622e007-c855-4f01-b213-38738b988e29
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-05-19T12:49:55", "repo_name": "ThorNicolai/System_Administration_Project", "sub_path": "/assignment01/TestReport/Lab 1.md", "file_name": "Lab 1.md", "file_ext": "md", "file_size_in_byte": 964, "line_count": 30, "lang": "en", "doc_type": "text", "blob_id": "fed61443e1598e5f8a1018eee2283526673c7138", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ThorNicolai/System_Administration_Project
253
FILENAME: Lab 1.md
0.210766
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>test report lab1.md</title> <link rel="stylesheet" href="https://stackedit.io/style.css" /> </head> <body class="stackedit"> <div class="stackedit__html"><blockquote> <p>Written with <a href="https://stackedit.io/">StackEdit</a>.<br> Testreport Assignment 1: Lab 1 (Establishing a Console Session with Tera Term)</p> </blockquote> <ol> <li>Navigate to the Command-line-interface (CLI) of the switch<br> The navigation is successful</li> <li>In user EXEC mode<br> The navigation is successful</li> <li>Use command: <em>show clock</em><br> The clock shows</li> <li>Verify that the clock setting is correct<br> The clock does not show the right time because there is no NTP server and thus the configurations of the time on the switch is reset on the reboot.</li> </ol> </div> </body> </html>
d8625978-7fdc-42c2-be83-404ec5706d0d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-31 04:57:03", "repo_name": "min-w-park/AutoParams", "sub_path": "/autoparams/src/main/java/org/javaunit/autoparams/Customizers.java", "file_name": "Customizers.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "c3601c23712316b954e085592a6a269cb05889b3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/min-w-park/AutoParams
192
FILENAME: Customizers.java
0.289372
package org.javaunit.autoparams; import java.util.ArrayList; import java.util.List; import java.util.stream.Stream; import org.javaunit.autoparams.customization.Customizer; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.api.extension.ExtensionContext.Namespace; final class Customizers { private static final Namespace NAMESPACE = Namespace.create(new Object()); static void addCustomizer(ExtensionContext context, Customizer customizer) { getStore(context).add(customizer); } static Stream<Customizer> getCustomizers(ExtensionContext context) { return getStore(context).stream(); } @SuppressWarnings("unchecked") private static List<Customizer> getStore(ExtensionContext context) { return (List<Customizer>) context.getStore(NAMESPACE).getOrComputeIfAbsent( Customizers.class, k -> new ArrayList<Customizer>(), List.class); } }
5f3d11c5-1b57-434d-b15f-fc87ffff3cfd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-04 20:48:53", "repo_name": "userjuno/MyMall", "sub_path": "/form1/src/mgraction/BoardRegAction.java", "file_name": "BoardRegAction.java", "file_ext": "java", "file_size_in_byte": 986, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "18369e89a18c8164267ba3af42957de1c5f2ce5e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/userjuno/MyMall
184
FILENAME: BoardRegAction.java
0.259826
package mgraction; import java.util.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import mgrsvc.BoardListService; import mgrsvc.BoardRegService; import mgrvo.ActionForward; import mgrvo.UserBean; import mgrvo.PageInfo; public class BoardRegAction implements Action { public ActionForward execute(HttpServletRequest request,HttpServletResponse response) throws Exception{ ArrayList<UserBean> articleList=new ArrayList<UserBean>(); int page=1; int limit=10; BoardRegService boardListService = new BoardRegService(); articleList = boardListService.getArticleList(); //리스트를 받아옴. //총 페이지 수. request.setAttribute("articleList", articleList); ActionForward forward= new ActionForward(); forward.setPath("/mgr_board/dogOrderInfo.jsp"); return forward; } }
71049152-19e7-4a9f-b487-6d59bcf6c86d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-30 02:10:29", "repo_name": "zhou-ll/zhoulangxinku", "sub_path": "/shiro/src/main/java/com/jh/shiro/controller/TeacherController.java", "file_name": "TeacherController.java", "file_ext": "java", "file_size_in_byte": 967, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "d418b68aea5e524d88a9829d654182db872abf74", "star_events_count": 8, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/zhou-ll/zhoulangxinku
204
FILENAME: TeacherController.java
0.212069
package com.jh.shiro.controller; import com.jh.shiro.entity.DataResult; import com.jh.shiro.entity.TeacherEntity; import com.jh.shiro.service.TeacherService; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; /** * * * @author: jh * @date: 2020/3/14 * @version: 1.0 */ @Slf4j @RestController public class TeacherController { @Resource private TeacherService teacherService; @PostMapping("shiro/addTeacherInfo") public DataResult addTeacherInfo(@RequestBody TeacherEntity entity){ DataResult dataResult; try { dataResult = teacherService.transationTest(entity); } catch (Exception e) { log.error(e.getMessage()); dataResult = new DataResult(); dataResult.setMessage("失败"); dataResult.setSuccess(false); } return dataResult; } }
13f290e0-0990-4dcd-877c-81429cad2ca4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-03-30 08:17:54", "repo_name": "RyanTech/sohu", "sub_path": "/src/StorageWorkspace/StorageAPI/src/com/scss/server/ComponentBean.java", "file_name": "ComponentBean.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "da6430f06fd9bd205cbfa103a9c0592ab967ec25", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RyanTech/sohu
211
FILENAME: ComponentBean.java
0.247987
/** * */ package com.scss.server; import java.io.Serializable; import java.util.List; /** * @author leonzhou * */ public class ComponentBean implements Serializable{ /** * */ private static final long serialVersionUID = -2532143325137491954L; private List<ApplicationBean> applications; private List<HostBean> hosts; public List<ApplicationBean> getApplications() { return applications; } public void setApplications(List<ApplicationBean> applications) { this.applications = applications; } public List<HostBean> getHosts() { return hosts; } public void setHosts(List<HostBean> hosts) { this.hosts = hosts; } public String toString() { StringBuilder sb = new StringBuilder(); for (ApplicationBean bean : getApplications()) { sb.append(bean.toString()); } return sb.toString(); } }
fc1d5174-32d0-4384-b73f-880635bd3cad
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-13 08:06:47", "repo_name": "superThisMe/example-web", "sub_path": "/example-web/src/com/exampleWeb/servlet/ResponseServlet.java", "file_name": "ResponseServlet.java", "file_ext": "java", "file_size_in_byte": 1037, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "bc7e9eb904cae3b94c402e1d7ff53f4ff4c3cfe7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/superThisMe/example-web
203
FILENAME: ResponseServlet.java
0.285372
package com.exampleWeb.servlet; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet("/05.move-to-result.action") public class ResponseServlet extends HttpServlet { private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // 1. 요청 데이터 읽기 // 2. 데이터 처리 req.setAttribute("req-data", "DATA FROM SERVLET"); // JSP에서 데이터를 읽을 수 있도록 request객체에 저장 // 3. 응답 컨텐츠 만들기 RequestDispatcher rd = req.getRequestDispatcher("05.result.jsp"); rd.forward(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { } }
4c12cb89-233c-40ce-af31-797d707e2e83
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-18 05:56:20", "repo_name": "Sean0516/JavaThread", "sub_path": "/Thread/src/com/voicecyber/threadexception/Test.java", "file_name": "Test.java", "file_ext": "java", "file_size_in_byte": 977, "line_count": 26, "lang": "en", "doc_type": "code", "blob_id": "95d130f11bff4b5f3862a23a9f5a7425b227a4ed", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Sean0516/JavaThread
189
FILENAME: Test.java
0.226784
package com.voicecyber.threadexception; /** * Created by Sean on 2018/7/11 * * @author Sean */ public class Test { public static void main(String[] args) { // ThreadException exception=new ThreadException(); // Thread exceptionThread=new Thread(exception); // exceptionThread.setUncaughtExceptionHandler((t, e) -> System.out.println("线程:" +t.getName() +e.getMessage())); // exceptionThread.setName("exceptionThread"); // exceptionThread.start(); DefaultException.setDefaultUncaughtExceptionHandler((t, e) -> { System.out.println(t.getName() +"发生异常:"+e.getMessage()); }); DefaultException defaultException=new DefaultException(); defaultException.setName("defaultException"); DefaultException defaultException1=new DefaultException(); defaultException1.setName("defaultException1"); defaultException.start(); defaultException1.start(); } }
1e65db5b-7160-40fa-8b33-cc8d02980198
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-12-29 01:59:01", "repo_name": "Mungrel/SteamAPIQuery", "sub_path": "/src/main/java/listeners/URLMouseListener.java", "file_name": "URLMouseListener.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "de2ebf15c0bca457aea96b26175ed7a672db3d4a", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Mungrel/SteamAPIQuery
203
FILENAME: URLMouseListener.java
0.256832
package listeners; import java.awt.Desktop; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; public class URLMouseListener implements MouseListener { private URI destination; public URLMouseListener(String uri) { try { this.destination = new URI(uri); } catch (URISyntaxException e) { System.out.println("Invalid URI: " + uri); } } @Override public void mouseClicked(MouseEvent e) { Desktop desktop = Desktop.getDesktop(); try { desktop.browse(this.destination); } catch (IOException e1) { System.out.println("Could not open browser"); } } @Override public void mousePressed(MouseEvent e) { } @Override public void mouseReleased(MouseEvent e) { } @Override public void mouseEntered(MouseEvent e) { } @Override public void mouseExited(MouseEvent e) { } }
2f318bff-a72f-471b-b60c-df97a849fa33
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-06 09:07:39", "repo_name": "cuong117/mmt", "sub_path": "/Client/src/ClientThread/Client.java", "file_name": "Client.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "373fee83e09a483e93730d6a4b2a2397ecf3e55e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cuong117/mmt
180
FILENAME: Client.java
0.23092
package ClientThread; import java.io.*; import java.net.Socket; public class Client { public Socket socket; private ReadThread reader; private Writer writer; private String userName; public Client(){ try { socket = new Socket("localhost", 2001); reader = new ReadThread(socket); reader.start(); writer = new Writer(socket); } catch (IOException e) { e.printStackTrace(); } } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public void close(){ try { socket.isInputShutdown(); socket.isOutputShutdown(); socket.close(); } catch (Exception e) { e.printStackTrace(); } } public void sendMessage(String message){ this.writer.sendMessage(message); } }
433a68c0-81af-40a2-b156-a4fa820466ba
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-29 08:25:34", "repo_name": "duxingzhe311/system4j", "sub_path": "/biz/com/dw/biz/web/BizFlowServlet.java", "file_name": "BizFlowServlet.java", "file_ext": "java", "file_size_in_byte": 963, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "3f7cc8bc3eb34531e166363543b1b73f93ac7a73", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/duxingzhe311/system4j
189
FILENAME: BizFlowServlet.java
0.272799
package com.dw.biz.web; import java.io.IOException; import java.io.PrintStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class BizFlowServlet extends HttpServlet { protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { HttpSession session = req.getSession(); resp.setContentType("text/html;charset=UTF-8"); String uri = req.getRequestURI(); System.out.println("flow servlet uri=" + uri); if (!uri.endsWith(".flow")) { return; } String qs = req.getQueryString(); if ((qs == null) || (qs.equals(""))) resp.sendRedirect("/biz/biz_flow_start.jsp?fp=" + uri); else resp.sendRedirect("/biz/biz_flow_start.jsp?fp=" + uri + "&" + qs); } }
daab642d-3c17-4ca2-8be7-fd33051a6a32
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-05-09T14:46:23", "repo_name": "Mohamed-Rayan-iti/To-Do-List-App", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 965, "line_count": 21, "lang": "en", "doc_type": "text", "blob_id": "08f797736c61a34726e5b894ec50c9df79b7072a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Mohamed-Rayan-iti/To-Do-List-App
216
FILENAME: README.md
0.261331
TO-DO-LIST-APP Using Object-Oriented JS Developed by Mohamed Ahmed Rayan Miligy The app allows to: -Add tasks to the list (from input text field) -Remove tasks from the list (by clicking the remove button its color red) -Mark completed tasks (by clicking the √ button color green) -Unmark the completed tasks (by clicking the × button color green) The entire app is done in js with classes and OOP. There is only one variable in the global scope available. Using render function with every change of app state as default. Additionally: -You can search for tasks or filter them by category (all/completed/not finished) -plus it all sits in your browser's local storage for your convenience. Error-handling: -If the user doesn't enter a value in the input textbox and he pressed in add button will alert this massage "This input field is required" -If the user doesn't enter a value in the input text box and he pressed in search button nothing will happen
e74ff350-909d-4e17-aed8-2e793e559676
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-07-22 12:07:01", "repo_name": "kszit/cdrecord", "sub_path": "/CDRecord/src/com/kszit/CDReport/cor/dao/hibernate/po/ParentPO.java", "file_name": "ParentPO.java", "file_ext": "java", "file_size_in_byte": 1015, "line_count": 58, "lang": "en", "doc_type": "code", "blob_id": "f9415beeb2263725799a80464a428080bc7f24d9", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kszit/cdrecord
263
FILENAME: ParentPO.java
0.295027
package com.kszit.CDReport.cor.dao.hibernate.po; import java.util.Date; import com.kszit.CDReport.cor.service.StaticIndexService; public class ParentPO { private Long id; protected Long bindId; private int orderIndex; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public int getOrderIndex() { return orderIndex; } public void setOrderIndex(int orderIndex) { this.orderIndex = orderIndex; } public Long getBindId() { return bindId; } public void setBindId(Long bindId) { this.bindId = bindId; } /** * 初始化bindid,添加数据时必须调用 * 返回值:true 生成新的bindid,false 不用生成 */ public boolean initBindId(){ if(bindId==null || bindId==0){ bindId = StaticIndexService.getBindidIndex(); return true; } return false; } public String getDaySqlFileValue(Date d){ if(d==null){ return "null"; }else{ return "'"+d+"'"; } } }
a1bc864b-4e83-47fa-9aab-b5eda532522a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-05-27T21:26:38", "repo_name": "goodmaz1/DV-Dijkstra-2", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 964, "line_count": 16, "lang": "en", "doc_type": "text", "blob_id": "0604a9bf3b7b890858beacbdd4820e1e0200574c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/goodmaz1/DV-Dijkstra-2
236
FILENAME: README.md
0.212069
# DV-Dijkstra-2 Re-build of the Dijkstra DV project, except this time, the camera is actually facing the right way. As you can see, the player just randomly goes up infinitely and I don't know why, but it at least gets to the goal. It just...skips all the other steps to get there. Build: https://goodmaz1.github.io/DV-Dijkstra-2/ From the OG DV build: Dick Van Dijk-Stra (aka D.V. for Dijkstra) note: It's currently buggy and only goes toward the last target because the onCollision function I wrote broke and I had to revert to a save file. My group is leaving for CA in ten minutes, so I'll clean it up for the Project version on the 17th. -ZG note pt 2: the scripts are in the Assets folder - I need to rework my arrive function so that it will actually collide with the waypoint instead of stopping and looking at it. Then I need to rewrite the onCollision function so it switches targets after it hits the waypoints. Then I have to make it look nice.
2c86a34d-325b-4a1f-8c83-f62c954a2e9c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-08 10:09:49", "repo_name": "ZhuangCurator/curator-exam", "sub_path": "/curator-exam-paper/curator-exam-paper-api/src/main/java/com/curator/api/paper/enums/QuestionDifficultyEnum.java", "file_name": "QuestionDifficultyEnum.java", "file_ext": "java", "file_size_in_byte": 998, "line_count": 61, "lang": "en", "doc_type": "code", "blob_id": "6a0161060f78b6db3a61967692a5f1acc8c6c997", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ZhuangCurator/curator-exam
235
FILENAME: QuestionDifficultyEnum.java
0.284576
package com.curator.api.paper.enums; /** * 试题难度枚举 * * @author Jun * @date 2021/4/16 */ public enum QuestionDifficultyEnum { /** * 初级 * */ PRIMARY(1,"初级"), /** * 中级 */ MIDDLE(2,"中级"), /** * 高级 */ HIGH(3,"高级"); private int status; private String desc; QuestionDifficultyEnum(int status, String desc) { this.status = status; this.desc = desc; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public static String getDesc(int status){ for(QuestionDifficultyEnum obj : QuestionDifficultyEnum.values()){ if(obj.getStatus() == (status)){ return obj.desc; } } return ""; } }
d84e8acb-dedd-4fa1-84f1-3888f15f98e4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-03 05:30:47", "repo_name": "SHC12/SHC_I_PROTOTYPE1", "sub_path": "/app/src/main/java/com/mobile/pmmp/admin/SubmitJadwalPetugas.java", "file_name": "SubmitJadwalPetugas.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "e603dd47b6ce34ab70ac1323ddeae66ad9d30161", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/SHC12/SHC_I_PROTOTYPE1
180
FILENAME: SubmitJadwalPetugas.java
0.213377
package com.mobile.pmmp.admin; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.ArrayAdapter; import android.widget.AutoCompleteTextView; import com.mobile.pmmp.R; public class SubmitJadwalPetugas extends AppCompatActivity { private String[] shift = {"Shift 1","Shift 2"}; private AutoCompleteTextView spinner; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_submit_jadwal_petugas); spinner = findViewById(R.id.in_shift); ArrayAdapter<String> adapter = new ArrayAdapter<>(getApplicationContext(),R.layout.spinner_list_item,shift); spinner.setAdapter(adapter); } public void toJadwalPetugas(View view) { startActivity(new Intent(SubmitJadwalPetugas.this,JadwalPetugasMaintenance.class)); } }
a635dbaa-e40b-4dbd-a78c-04bf6eb4f3f6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-11-21T10:57:53", "repo_name": "hendrassirait/Django-Helloworld", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 962, "line_count": 32, "lang": "en", "doc_type": "text", "blob_id": "e4cf442a8b9745706e7f82b5d802f8ac5a68805a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/hendrassirait/Django-Helloworld
259
FILENAME: README.md
0.258326
# Django-Helloworld to use it, - open Terminal, - change directory to folder - start virtual environment pipenv shell - start server python manage.py runserver - go to url given by terminal and add /Hello/ ie. http://127.0.0.1:8000/Hello/ update #1 I found alert after I upload this folder, it says pipfile and pipfile.lock is High Severity, i still try to figure it out what is happening, but in case if you get the error for pipfile and pipfile.lock maybe you should install those file on your folder first. - open terminal - change directory to folder - install pipnenv on django pipenv install django==2.1 you can use any django version, but i use 2.1 on my project so far update #2 i found the issue, it seems that GitHub told me to upgrade my django version to 2.1.2 instead of 2.1 if you use django 2.1.2 version or the newest, you should delete pipfile and pipfile.lock and then install django to get those file again thanks
8e2810c5-45b0-48f2-a6ec-3efb203d4078
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-09-25T22:54:18", "repo_name": "ElectricSquid/OctoPrint-PrintTrack", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 961, "line_count": 13, "lang": "en", "doc_type": "text", "blob_id": "248c5952ef06a2bc83d31c855a86f3bb229a1d3b", "star_events_count": 3, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/ElectricSquid/OctoPrint-PrintTrack
204
FILENAME: README.md
0.196826
# OctoPrint-PrintTrack This plugin is meant to help you keep track of your printers progress and status. Currently it will display the printers status in the tab of OctoPrint in the browser. There are custimization options to change how it is displayed and also has adjustable strings so you can translate them or just make them something else. ## Setup Install via the bundled [Plugin Manager](https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager) or manually using this URL: https://github.com/ElectricSquid/OctoPrint-PrintTrack/archive/master.zip #### Reporting Issues & Improvments If you encounter any issues or bugs with the plugin please feel free to create an issue on the repo. I also fully support additions to the plugin from third parties. If you have an idea or an already developed solution that would implement with the plugin well, please submit it to the github repo and I will gladly consider additions and contributions.
b3b49250-4d54-44b8-b682-ba140e29bc8f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-11-12T05:24:09", "repo_name": "rameshnagaraju/angularMultiLayout", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 962, "line_count": 22, "lang": "en", "doc_type": "text", "blob_id": "85116aaad3d157670b8ab4e860154298c1ce52d9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rameshnagaraju/angularMultiLayout
205
FILENAME: README.md
0.23092
# angularMultiLayout This is angular multilayer application with user registration, and login,logout features. Angular,Material design, mongodb, jwt ,express is used . Source code is organized as follows: app ----- |---layouts : Contains full page layout for different screens. | | --> home : Contains the landing page layout. | | --> body-placeholder : a holding component. | | --> admin-dashboard : Contains dashboard layout | |---pages : This contains components that fit into layouts. | |---> home-page :Conatins the page content component. | |---> admin-dashboard-page: Contains code for dashboard contents(and not the layout) | |---> login : login component | |---> register: register component | |---Services: This folder contains implementation of services such as auth etc ... | |----> auth service : A service that talks to backend for login,logout,registration.
57c70c62-d269-41f3-8817-b7b91e45d2b7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-08 07:07:38", "repo_name": "PetBrontosaurus/RabbitClient", "sub_path": "/src/javaRabbitReciever/RabbitMessageDataStructure.java", "file_name": "RabbitMessageDataStructure.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "636d2f05b4f74137efb478e0eb82362bb462152a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/PetBrontosaurus/RabbitClient
215
FILENAME: RabbitMessageDataStructure.java
0.249447
package javaRabbitReciever; import com.rabbitmq.client.Envelope; public class RabbitMessageDataStructure { private Boolean error = false; private String messageText = ""; private Envelope envelope; private String errorText = ""; public String getErrorText() { return errorText; } public RabbitMessageDataStructure(String message, Envelope inEnvelope) { messageText = message; envelope = inEnvelope; error = false; } public RabbitMessageDataStructure(Boolean errorCase, String errorMessage) { error = true; errorText = errorMessage; } public String getMessageText() { return messageText; } public void setMessageText(String messageText) { this.messageText = messageText; } public Envelope getEnvelope() { return envelope; } public void setEnvelope(Envelope envelope) { this.envelope = envelope; } public Boolean getError() { return error; } public void setError(Boolean error) { this.error = error; } }
e906cfbb-6980-409d-882b-71c22df0524f
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-10-22T15:58:27", "repo_name": "duerdod/message-board", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 971, "line_count": 36, "lang": "en", "doc_type": "text", "blob_id": "cdea5c0b943894d1d5cb825a1209fab99e5b7ab1", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/duerdod/message-board
263
FILENAME: README.md
0.188324
## Message Board Sleepy, unencrypted Heroku-deploy at: http://bulletin.okbry.cool/. 🔓 🐌 🚀 Internet has no need for this application but yet it's a work in progress. Comes with the most simplest sanitizer for all you evil ones. ## Todo - [x] Message grid cleanup. - [x] "Vote" for removal. - [x] Add comments. - [x] "Pagination". - [x] Tag and "trending" posts. - [x] Signup/Login using jwt and bcryptjs (use provided test user or signup, unencrypted, use dummy). - [ ] Write tests! - [ ] User settings. - [ ] WebSocket for GraphQL subscriptions. - [ ] Error handling. - [ ] Filter and sort messages. - [ ] Naming, refactoring and cleanup. - [ ] Cleanup, refactoring, cleanup, refactoring, cleanup, refactoring, cleanup, refactoring. ## Tools - React - React Apollo - GraphQL - React Apollo Server - Express - Emotion - Docker and docker-compose Merge from: https://github.com/duerdod/message-board-old AND https://gitlab.com/erikpehrers/message-board-api
11accefe-7d8f-4c05-be64-7892b0a6e637
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-04 12:41:32", "repo_name": "PMachura/FeaturesSelectionWithReinforcementLearning_v3", "sub_path": "/src/main/java/machura/przemyslaw/featuresselectionwithrl/returns/Reward.java", "file_name": "Reward.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "7f9f8d5397bd3d18c01e1aad91bffca689aa18a9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/PMachura/FeaturesSelectionWithReinforcementLearning_v3
207
FILENAME: Reward.java
0.26588
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package machura.przemyslaw.featuresselectionwithrl.returns; /** * * @author Przemek */ public class Reward { private Double value; private Integer timeStep; public Reward(){ this.value = null; this.timeStep = null; } public Reward(Double value){ this.value = value; this.timeStep = null; } public Reward(Double value, int timeStep){ this(value); this.timeStep = timeStep; } public Double getValue() { return value; } public void setValue(Double value) { this.value = value; } public Integer getTimeStep() { return timeStep; } public void setTimeStep(Integer timeStep) { this.timeStep = timeStep; } }
c0398d22-d4fa-4682-bb01-895f426f0190
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-09-15 18:01:09", "repo_name": "imanzano/stampCatalogue", "sub_path": "/common/parser/src/main/java/com/imanzano/sc/common/parser/html/PageParser.java", "file_name": "PageParser.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "656306cd292d99e05cc0fcd0aac4510646676e00", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/imanzano/stampCatalogue
189
FILENAME: PageParser.java
0.27513
package com.imanzano.sc.common.parser.html; import org.jsoup.nodes.Element; import java.util.function.Function; /** * Page parser with pagination */ class PageParser<T> extends HtmlParser<PageInfo<T>> { private HtmlParser<T> contentParser = null; private Function<Element,Integer> pageCountResolver = null; PageParser(HtmlParser<T> parser, Function<Element, Integer> pagesCount) { contentParser = parser; pageCountResolver = pagesCount; source(parser.getSource()); setProcessor(new ElementProcessor<>(getConverter()).using(getSelectExpression())); } private ElementConverter<PageInfo<T>> getConverter() { return e -> { final PageInfo<T> page = new PageInfo<>(); page.pages = pageCountResolver.apply(e); page.content = contentParser.from(e).parse(); return page; }; } private String getSelectExpression() { return "body";} }
7230511b-49c1-4b26-9485-c23818abd78e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-18 00:21:45", "repo_name": "VGubarev/WST", "sub_path": "/lab5/standalone/src/main/java/org/vladimirg/wst/lab5/standalone/AuthenticationService.java", "file_name": "AuthenticationService.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "54359883b1245b3ff8d25860667ad3c5f0ed9c54", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/VGubarev/WST
197
FILENAME: AuthenticationService.java
0.259826
package org.vladimirg.wst.lab5.standalone; import com.sun.jersey.core.util.Base64; import java.util.HashMap; import java.util.Map; public class AuthenticationService { private static Map<String, String> passwordStorage = new HashMap<String, String>() {{ put("admin", "admin"); }}; public static boolean authenticate(String encoded) { if (encoded == null) { return false; } String usernameAndPassword = Base64.base64Decode(encoded.replaceFirst("Basic ", "")); String authValue[] = usernameAndPassword.split(":"); String login = authValue[0]; String password = authValue[1]; if ((login == null) || login.isEmpty()) { return false; } String correctPassword = passwordStorage.get(login); if ((correctPassword != null) && correctPassword.equals(password)) { return true; } else return false; } }
6df76ac3-cefc-4623-9582-17f52df224c5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-04-21T23:54:11", "repo_name": "gckirchoff/bacterifind-backend", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 962, "line_count": 12, "lang": "en", "doc_type": "text", "blob_id": "d02d62e3a6da61c38af976f4abebf4b43d083e42", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/gckirchoff/bacterifind-backend
206
FILENAME: README.md
0.229535
# Bacterifind This project was created with the goal of increasing the efficiency of characterizing and identifying Enterobacteriaceae and other gram negative, oxidase negative bacteria. The Enteropluri-Test is a 12 sector system, each of which contains a specific medium that changes in visual appearance after inoculation due to the specficic biochemical properties of the bacteria of interest. For more information see https://www.liofilchem.com/featured-products/enteropluri-test.html. ## Technology The back end of this project is built with Node and Express for the server, and Mongoose/MongoDB for the database. Because this project is hosted online for free, the port "goes to sleep" if nobody accesses this site for 30 minutes and then needs around 30 seconds to a few minutes to "wake up" again. To make this process smoother, I implemented server side rendering so that only one wake up period is necessary to access both the front and back end.
f6f3342c-6d29-4554-aab5-b462e67e8170
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-02-16 12:37:46", "repo_name": "jlcdeveloper/Lugares", "sub_path": "/src/com/jllobera/lugares/classes/PreCarga.java", "file_name": "PreCarga.java", "file_ext": "java", "file_size_in_byte": 973, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "3794f86064c6cc0fdc9f803cb9d0c9a0f03567e5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "WINDOWS-1250"}
https://github.com/jlcdeveloper/Lugares
218
FILENAME: PreCarga.java
0.252384
package com.jllobera.lugares.classes; import android.app.ProgressDialog; import android.content.Context; import android.os.AsyncTask; /** * Diálogo de espera entre acciones * * Created by IntelliJ IDEA. * User: Joanet * Date: 16/10/11 * Time: 2:38 */ public class PreCarga extends AsyncTask<String, Void, Boolean>{ private ProgressDialog dialog; private Context ctx; public PreCarga(Context ctx) { this.ctx = ctx; dialog = new ProgressDialog(ctx); } @Override protected Boolean doInBackground(String... strings) { return null; } // progress dialog to show user that contacting server. protected void onPreExecute() { this.dialog = ProgressDialog.show(ctx, "Cargando la ficha", "Porfavor, espera...", true, false); } @Override protected void onPostExecute(final Boolean success) { if (dialog.isShowing()) { dialog.dismiss(); } } }
4863b9b2-2de0-4928-b7fe-dabc7d0b9cd4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-25 13:55:30", "repo_name": "juhwan0815/shareU", "sub_path": "/src/main/java/inu/project/shareu/model/college/response/CollegeDetailResponse.java", "file_name": "CollegeDetailResponse.java", "file_ext": "java", "file_size_in_byte": 1050, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "0eb328b7754780a18853a9ccb3b392e103c10a0d", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/juhwan0815/shareU
234
FILENAME: CollegeDetailResponse.java
0.225417
package inu.project.shareu.model.college.response; import inu.project.shareu.domain.College; import inu.project.shareu.domain.CollegeStatus; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("단과대학 상세 응답 모델") public class CollegeDetailResponse { @ApiModelProperty(name = "collegeId",value = "단과대학 Id",example = "1") private Long collegeId; @ApiModelProperty(name = "collegeName",value = "단과대학 이름",example = "정보기술대학") private String collegeName; @ApiModelProperty(name = "collegeStatus",value = "단과대학 분류 전공 or 교양",example = "전공") private String collegeStatus; public CollegeDetailResponse(College college) { this.collegeId = college.getId(); this.collegeName = college.getName(); if(college.getStatus().equals(CollegeStatus.전공)){ collegeStatus = "전공"; }else{ collegeStatus = "교양"; } } }
a3bd06bd-ca22-4e74-810e-ab40ce538ced
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-04-06 03:33:10", "repo_name": "liujiajun2/learning", "sub_path": "/learning-springboot/springboot-demo/src/main/java/xin/liujiajun/springboot/service/WebSocketService.java", "file_name": "WebSocketService.java", "file_ext": "java", "file_size_in_byte": 966, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "e727cc100c5543edb4ab54afc7e66b5a8714b35c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/liujiajun2/learning
211
FILENAME: WebSocketService.java
0.194368
package xin.liujiajun.springboot.service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import javax.websocket.OnClose; import javax.websocket.OnMessage; import javax.websocket.OnOpen; import javax.websocket.Session; import javax.websocket.server.PathParam; import javax.websocket.server.ServerEndpoint; /** * @author LiuJiaJun * @date 2019/5/30 13:19 */ @Service @ServerEndpoint("/websocket/{uid}") public class WebSocketService { private final static Logger logger = LoggerFactory.getLogger(WebSocketService.class); private Session session; @OnOpen public void onOpen(Session session, @PathParam("uid") String uid){ this.session = session; logger.info("uid : {}",uid); } @OnClose public void onClose(){ logger.info("关闭"); } @OnMessage public void onMessage(String message, Session session){ logger.info(message); } }
a4434b42-db14-4157-a6fd-0da9759274ac
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-04 04:08:04", "repo_name": "charanraj92/TargetCaseStudy", "sub_path": "/src/main/java/com/retail/retailAPI/models/Product.java", "file_name": "Product.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "c7c62867d465f2c1454f0dcb41e57aa5860d9170", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/charanraj92/TargetCaseStudy
204
FILENAME: Product.java
0.236516
package com.retail.retailAPI.models; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; import org.springframework.data.mongodb.core.mapping.Field; /** * This is the Data Model for the product */ @Document(collection = "products") public class Product { @Id private int id; private String name; @Field("current_price") private Price price; public Product(int id, String name, Price price) { this.id = id; this.name = name; this.price = price; } public void setId(int id) { this.id = id; } public int getId() { return id; } public void setName(String productName) { this.name = productName; } public String getName() { return name; } public void setPrice(Price price) { this.price = price; } public Price getPrice() { return price; } }
4f94b250-df8b-4b10-92c3-c30237044cf7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-11-15 08:14:51", "repo_name": "rongyingjie/SpringBootDemo", "sub_path": "/src/main/java/cn/gxufe/boot/service/CustomerService.java", "file_name": "CustomerService.java", "file_ext": "java", "file_size_in_byte": 968, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "17fc2150f0a3d9aa1b402a1e00816ec7bdda7fa8", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rongyingjie/SpringBootDemo
202
FILENAME: CustomerService.java
0.233706
package cn.gxufe.boot.service; import cn.gxufe.boot.mapper.CustomerMapper; import cn.gxufe.boot.pojo.Customer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; /** * @author 燕赤侠 2016-10-16 */ @Service public class CustomerService { @Autowired private CustomerMapper customerMapper; public List<String> getCitys(){ List<String> list = new ArrayList<String>(); list.add("beijing"); list.add("shanghai"); list.add("guangzhou"); System.out.println("----------------------"); // List<Customer> customers = customerMapper.selectAll(); // System.out.println(customers); List<Customer> select = customerMapper.select(null); System.out.println(select); Customer byId = customerMapper.getById(1); System.out.println(byId); return list; } }
14499821-0896-46f1-849e-25c5c32bce95
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-10 18:28:58", "repo_name": "vbequart/FirstStock", "sub_path": "/FirstStock/src/Models/Unit.java", "file_name": "Unit.java", "file_ext": "java", "file_size_in_byte": 965, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "2c6202429c2848d2e58a8119162e188d218c9297", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/vbequart/FirstStock
220
FILENAME: Unit.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 Models; import java.io.Serializable; /** * * @author louis */ public class Unit implements Serializable{ /* Penser à implenter une sérialisation de l'enum afin de rajouter des unités par l'utilisateur */ private String unit; private int power; public Unit(String u, int p){ this.setUnit(u); this.setPower(p); } /* Getters & setters */ public String getUnit() { return unit; } public void setUnit(String unit) { this.unit = unit; } public int getPower() { return power; } public void setPower(int power) { this.power = power; } @Override public String toString(){ return "Unit : "+unit+" with 10^"+power; } }
7c537eb7-c42c-4ff1-b29c-95993095aff5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-21 10:13:38", "repo_name": "sdfagfaga/SINIA-Project", "sub_path": "/app/src/main/java/com/sinnia/data/cart/CartData.java", "file_name": "CartData.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "87b37ae94c4f0e0948b20dceb49babc05ed8b905", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sdfagfaga/SINIA-Project
197
FILENAME: CartData.java
0.235108
package com.sinnia.data.cart; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import com.sinnia.data.login.User; import com.sinnia.data.products.Products; import java.io.Serializable; import java.util.ArrayList; import java.util.List; public class CartData implements Serializable { @SerializedName("userAddressData") @Expose private ArrayList<UserAddress> userAddressData = null; @SerializedName("productData") @Expose private ArrayList<Products> productData = null; public ArrayList<Products> getProductData() { return productData; } public void setProductData(ArrayList<Products> productData) { this.productData = productData; } public ArrayList<UserAddress> getUserAddressData() { return userAddressData; } public void setUserAddressData(ArrayList<UserAddress> userAddressData) { this.userAddressData = userAddressData; } }
ddec5e26-a45e-4aca-9b37-dacee9f44919
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-08-28 13:58:20", "repo_name": "drewnoakes/metadata-extractor", "sub_path": "/Source/com/drew/metadata/xmp/XmpWriter.java", "file_name": "XmpWriter.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "5725caef2a8675aea80328809a35a0b65d6f24e4", "star_events_count": 2462, "fork_events_count": 565, "src_encoding": "UTF-8"}
https://github.com/drewnoakes/metadata-extractor
220
FILENAME: XmpWriter.java
0.290176
package com.drew.metadata.xmp; import java.io.OutputStream; import com.adobe.internal.xmp.XMPException; import com.adobe.internal.xmp.XMPMeta; import com.adobe.internal.xmp.XMPMetaFactory; import com.adobe.internal.xmp.options.SerializeOptions; import com.drew.metadata.Metadata; public class XmpWriter { /** * Serializes the XmpDirectory component of <code>Metadata</code> into an <code>OutputStream</code> * @param os Destination for the xmp data * @param data populated metadata * @return serialize success */ public static boolean write(OutputStream os, Metadata data) throws XMPException { XmpDirectory dir = data.getFirstDirectoryOfType(XmpDirectory.class); if (dir == null) return false; XMPMeta meta = dir.getXMPMeta(); SerializeOptions so = new SerializeOptions().setOmitPacketWrapper(true); XMPMetaFactory.serialize(meta, os, so); return true; } }
1aa7673f-cee2-4ce2-9eba-2f9d34e29a6c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-05-04 05:44:21", "repo_name": "Halayem/cryptox", "sub_path": "/src/main/java/fr/enix/exchanges/model/repository/PriceReference.java", "file_name": "PriceReference.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 27, "lang": "en", "doc_type": "code", "blob_id": "39c0ca9e1047ee6e7860737d512ebb11fd5c8541", "star_events_count": 3, "fork_events_count": 5, "src_encoding": "UTF-8"}
https://github.com/Halayem/cryptox
177
FILENAME: PriceReference.java
0.286968
package fr.enix.exchanges.model.repository; import lombok.Builder; import lombok.Getter; import java.math.BigDecimal; import java.time.LocalDateTime; @Builder @Getter public class PriceReference { private String applicationAssetPair; private String updatedBy; private BigDecimal price; private LocalDateTime datetime; @Override public String toString() { return new StringBuilder("price reference:").append("\n\t") .append("- application asset pair -- <").append(applicationAssetPair ).append(">").append("\n\t") .append("- price ------------------- <").append(price ).append(">").append("\n\t") .append("- updated by -------------- <").append(updatedBy ).append(">").append("\n\t") .append("- updated at -------------- <").append(datetime ).append(">") .toString(); } }
17d5e96f-8082-409c-bb39-23458dfcf578
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-14 13:26:34", "repo_name": "a1532422135/mydemo", "sub_path": "/springcloud/cloudprovider/src/main/java/com/springcloud/provider/controller/UserController.java", "file_name": "UserController.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "63fd5099844d96fdfdb16d328def0498ce770fc2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/a1532422135/mydemo
188
FILENAME: UserController.java
0.225417
package com.springcloud.provider.controller; import com.springcloud.provider.bean.User; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("user") @Slf4j public class UserController { @RequestMapping(value = "getUser", produces = {"application/json;charset=UTF-8"}) public User getUser(long id) { User user = new User(); user.setAge(18); user.setId(id); user.setName("张三"); return user; } @RequestMapping(value = "getUser1", produces = {"application/json;charset=UTF-8"}) public User getUser1(@RequestBody User user) { user.setAge(18); user.setId(user.getId()); user.setName("张三"); return user; } }
008548ec-76c1-4356-a4ba-650fbfd879fd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-06-14 01:42:38", "repo_name": "felixdies/RCCar", "sub_path": "/RCsailor/src/john/rcsailor/SailorCommandReceiver.java", "file_name": "SailorCommandReceiver.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "3b508b45a220a5e771247c70e9cac33a713c4cfc", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/felixdies/RCCar
227
FILENAME: SailorCommandReceiver.java
0.276691
package john.rcsailor; import john.rcsailor.udp.UDPReceiver; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.os.Handler; import android.util.Log; import android.view.View; import android.widget.FrameLayout; public class SailorCommandReceiver extends Thread { SailorMainActivity mainActivity; UDPReceiver receiver; byte[] receivemsg; public SailorCommandReceiver(SailorMainActivity activity) { this.mainActivity = activity; receiver = UDPReceiver.getInstance(); } public void run(){ Log.d("direction", ""+mainActivity.direction); while (mainActivity.isRunning) { try { receivemsg = receiver.receive(1, 5000); mainActivity.direction = receivemsg[0]; Log.d("direction", ""+mainActivity.direction); } catch (Exception ex) { Log.e("SampleThreadActivity", "Exception in processing message.", ex); } } } }
1beb65f1-9f66-4531-a084-caaf92d6d57b
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-12-01 19:32:38", "repo_name": "rock-it-rob/wicket-test", "sub_path": "/src/main/java/com/rob/wickettest/page/FeedbackPage.java", "file_name": "FeedbackPage.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "b79d3e06c835c118ebf97692beb49f74009116d2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/rock-it-rob/wicket-test
192
FILENAME: FeedbackPage.java
0.261331
package com.rob.wickettest.page; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.AjaxLink; public class FeedbackPage extends AbstractPage { @Override protected void onInitialize() { super.onInitialize(); final AjaxLink<Void> sessionLink = new AjaxLink<Void>("sessionLink") { private int messageCount = 1; @Override public void onClick(AjaxRequestTarget target) { getSession().info("Session Message: " + messageCount++); } }; add(sessionLink); final AjaxLink<Void> requestLink = new AjaxLink<Void>("requestLink") { private int messageCount = 1; @Override public void onClick(AjaxRequestTarget target) { info("Request Message: " + messageCount++); } }; add(requestLink); } }
212512c1-f077-4beb-a136-9d636354a792
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-08 01:13:22", "repo_name": "youcoding98/codeLearning", "sub_path": "/src/com/bupt/leetcode/concurrency/FooBar.java", "file_name": "FooBar.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "63ab54af59ca5330fc65447d0dcf40d5294ef059", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/youcoding98/codeLearning
218
FILENAME: FooBar.java
0.284576
package com.bupt.leetcode.concurrency; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.CyclicBarrier; /** * Leetcode1115:交替打印FooBar * @author ge */ public class FooBar { private int n; private boolean flag = true; CyclicBarrier cb = new CyclicBarrier(2); public FooBar(int n) { this.n = n; } public void foo(Runnable printFoo) throws InterruptedException { for (int i = 0; i < n;i++) { while (!flag){ } printFoo.run(); flag = false; try { cb.await(); }catch (BrokenBarrierException e){ } } } public void bar(Runnable printBar) throws InterruptedException { for (int i = 0; i < n;i++) { try { cb.await(); }catch (BrokenBarrierException e){ } printBar.run(); flag = true; } } }
7f1e2db5-9e42-439e-8ad7-1766f7b798ed
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-05 09:01:43", "repo_name": "nerososft/leaf", "sub_path": "/app/src/main/java/nero/intel/com/leaf/entity/Result.java", "file_name": "Result.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "ac3f9fe99426d4b1a4ba85335deda5f92f0c38f9", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/nerososft/leaf
222
FILENAME: Result.java
0.224055
package nero.intel.com.leaf.entity; import android.content.Intent; import java.io.Serializable; /** * Created by ny on 2018/3/6. */ public class Result<T> implements Serializable { private String msg; private T data; private Integer code; public Result(String msg, T data, Integer code) { this.msg = msg; this.data = data; code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public T getData() { return data; } public void setData(T data) { this.data = data; } public Integer getCode() { return code; } public void setCode(Integer code) { code = code; } @Override public String toString() { return "Result{" + "msg='" + msg + '\'' + ", data=" + data + ", code=" + code + '}'; } }
cf0abf2d-e61b-4838-962a-f7c7eb8cd608
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-10 17:45:59", "repo_name": "bararuchi1/DedsecServices", "sub_path": "/Dedsec/src/main/java/com/dedsec/common/ValidationAssociate.java", "file_name": "ValidationAssociate.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "4d2af86516d3e8a13896d71a8aadf579046a1e03", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/bararuchi1/DedsecServices
213
FILENAME: ValidationAssociate.java
0.295027
package com.dedsec.common; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.stereotype.Service; import com.dedsec.JPARepo.AssociateJPARepository; import com.dedsec.bean.Associates; import com.dedsec.bean.Product; @Component public class ValidationAssociate { private static List<String> listErrors = new ArrayList<String>(); /* * Erorr Messages * * "NONUNIQUEADHAAR" */ public static List<String> ValidateAssociate(Associates associate, AssociateJPARepository associateJPARepository) { listErrors.clear(); // Check Unique Associate Associates associates = associateJPARepository.findSelectedActiveProductAndAssociate( associate.getProduct().getProductCode(), associate.getAssociateAdhaarNo()); if (associates != null) { listErrors.add("NONUNIQUEADHAAR"); } return listErrors; } }
143f96d7-39e7-4092-a932-6cb7ce39400c
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-17 14:40:55", "repo_name": "second852/ChargeAPP", "sub_path": "/app/src/main/java/com/chargeapp/whc/chargeapp/TypeCode/RequestCode.java", "file_name": "RequestCode.java", "file_ext": "java", "file_size_in_byte": 1038, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "96bee506af6faf94f7f7b1c7cd223c6e7ff2346a", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/second852/ChargeAPP
247
FILENAME: RequestCode.java
0.252384
package com.chargeapp.whc.chargeapp.TypeCode; public enum RequestCode { UpLoadLocalOpen(0,"上傳頁面打開Local"), UpLoadGoogleUpload(3,"上傳頁面上傳雲端"), DownLoadGoogleOpen(4,"下傳頁面打開雲端"), DownLoadGoogleDownload(5,"下傳頁面下載雲端"), Dropbox(6,"dropbox 上傳/下載"), ; private int code; //代碼 private String name;//名子 RequestCode(int code, String name) { this.code = code; this.name = name; } public static RequestCode getEnum(int code){ RequestCode requestCode=null; for(RequestCode r:RequestCode.values()){ if(r.code==code){ requestCode=r; break; } } return requestCode; } public int getCode() { return code; } public void setCode(int code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
537f7c4e-eebb-4845-bff6-4253668e3977
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-10 15:33:15", "repo_name": "JohnCrissman/chicago-crime-tracker-map", "sub_path": "/src/main/java/Address.java", "file_name": "Address.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "692dd4c3d1744d55d3074f8476888e197ef83e55", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/JohnCrissman/chicago-crime-tracker-map
212
FILENAME: Address.java
0.243642
public class Address { private double latitude; private double longitude; private String restOfAddress; // from block ie: N Paulina etc private String block; // from block, ie: 0078XX Address(double latitude, double longitude, String blockAddress) { this.latitude = latitude; this.longitude = longitude; this.block = AddressHelper.parseBlock(blockAddress); this.restOfAddress = AddressHelper.parseStreet(blockAddress); } @Override public String toString(){ return "{ \"block\" : \"" + this.block + "\", \"street\" : \"" + this.restOfAddress + "\", \"lat\" : \"" + this.latitude+"\", \"long\" : \""+this.longitude+ "\"}"; } public String getFullAddress() { return (this.block + " " + this.restOfAddress).toUpperCase(); } public double getLatitude() { return this.latitude; } public double getLongitude() { return this.longitude; } }
d4b338c9-4f68-497a-9aee-c25be13313f2
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-02-15T05:40:57", "repo_name": "alexschumaker/FunimationFeatures", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 962, "line_count": 18, "lang": "en", "doc_type": "text", "blob_id": "dcb3195ca3565fa67e70a3b6db029f8ea608a971", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/alexschumaker/FunimationFeatures
238
FILENAME: README.md
0.190724
# FunimationFeatures Chrome Extension that adds convenient features to Funimation's lackluster video player. ## Features - Keybinds (the real main feature) - **F** : toggle fullscreen from anywhere on the page. - **left/right arrow** : scrub five seconds - **S** : skip 82 seconds (enough to skip a standard 90 second OP/ED and still catch a few seconds of the beginning or end) - **space** : play/pause; this was already a thing, but now it works even while the player isn't focused. - **up/down** : increase/decrease volume (currently no visual feedback for this) - **shift + up/down** : increase/decrease playback speed - **shift + 0** : reset playback speed to 100% - You can now **click** the screen to play/pause and **double click** to toggle fullscreen! - Basically, stuff that is standard in literally every video player on earth except for Funimation's. - Dark Mode for video pages. Click the extension toolbar icon to toggle!
aa77e61a-8dd3-4c74-8401-4cdae7d6dcaf
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-08-18 15:55:08", "repo_name": "antoncorekt/Minesweeper", "sub_path": "/Minesweeper/src/kozlovsky_board/Block.java", "file_name": "Block.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "bc6ea49b33cfc1f239d9a05c75bd081c1f156a9c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "WINDOWS-1251"}
https://github.com/antoncorekt/Minesweeper
220
FILENAME: Block.java
0.282196
package kozlovsky_board; import javax.swing.*; import java.awt.*; /** * Created by Антон on 31.03.2016. */ public class Block extends JButton { final public int Opened=0, CheckedMina=1; public boolean haveMina; private int X,Y; public Block(String s) { super(s); this.setIcon(new ImageIcon("C:\\res\\StaticBlock.jpg")); this.setRolloverIcon(new ImageIcon("C:\\res\\RollBlock.jpg")); this.setVisible(true); haveMina=false; } public int getX(){return X;} public int getY(){return Y;} public void checkOpened() { /*if (haveMina) { this.setEnabled(false); this.setDisabledIcon(new ImageIcon("C:\\res\\DisBlock.jpg")); this.setText(""); } else { this.setEnabled(false); this.setDisabledIcon(new ImageIcon("C:\\res\\PressBlock.jpg")); }*/ } }
9d89febc-91ab-4a43-bc54-9f5973f4c258
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2022-02-23T16:21:37", "repo_name": "jennapederson/cli-crash-course", "sub_path": "/setup-nix.md", "file_name": "setup-nix.md", "file_ext": "md", "file_size_in_byte": 967, "line_count": 29, "lang": "en", "doc_type": "text", "blob_id": "50b0f150587e4cd63bebaea58c11fa6c5d63eba7", "star_events_count": 35, "fork_events_count": 10, "src_encoding": "UTF-8"}
https://github.com/jennapederson/cli-crash-course
258
FILENAME: setup-nix.md
0.224055
# Linux/Unix/OS X If you are using a *nix flavor (i.e. OS X/Mac, Linux, or Unix), let's make sure you have the correct Terminal shell set up. 1. If you’re on a Mac: 1. hit CMD+Space and type 'terminal'. 1. Hit enter after selecting Terminal. 1. If you're on Linux/Unix: 1. open up the console or terminal application (it is assumed you already know how to do this). 1. Type the following command and press enter: ``` echo $SHELL ``` 1. Does it read something similar to the following, ending in ‘bash’? If yes, you are good to go! ``` /bin/bash ``` 1. If not, type the following command (note that those are back ticks, not single quotes) and press enter. ``` chsh -s `grep bash /etc/shells` ``` 1. Enter your password to authorize the change. 1. Reopen the terminal or a new tab. 1. Double-check the change using the echo command above to make sure it reflects the new shell path. ## Now you're ready for the workshop. See you there!
ce94ce53-4da1-4d10-8e4b-2cbef78be304
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-30 10:03:28", "repo_name": "tianyongzhou/weixin", "sub_path": "/src/com/tyz/weixin/model/msg/kaf/send/MusicMsg.java", "file_name": "MusicMsg.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "d454b9a88f30d24f12c5d15f7d0e1a100bc87deb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/tianyongzhou/weixin
248
FILENAME: MusicMsg.java
0.240775
package com.tyz.weixin.model.msg.kaf.send; import com.tyz.weixin.model.msg.MsgType; import com.tyz.weixin.model.msg.Music; import com.tyz.weixin.model.msg.kaf.KafInfo; /** * @Version 1.0 * @Author: tyz * @Description: 音乐消息 * @Date: 2017/12/22. * @Modified: tyz */ public class MusicMsg extends Msg{ private Music music; public MusicMsg() { this.setMsgtype(MsgType.MUSIC); } public MusicMsg(String touser, String msgtype, Music music) { super(touser, msgtype); this.music = music; this.setMsgtype(MsgType.MUSIC); } public MusicMsg(String touser, String msgtype, KafInfo customservice, Music music) { super(touser, msgtype, customservice); this.music = music; this.setMsgtype(MsgType.MUSIC); } public Music getMusic() { return music; } public void setMusic(Music music) { this.music = music; } }
1513ef92-814d-425b-8d0f-fc8ba849bbb5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-04 07:44:21", "repo_name": "superspeedone/Athena", "sub_path": "/athena-portal/src/main/java/com/superspeed/grabticket/pojo/HttpRequestResult.java", "file_name": "HttpRequestResult.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "da81e7c129e45fb3cdb3ed2d5c129d98c4a81090", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/superspeedone/Athena
202
FILENAME: HttpRequestResult.java
0.2227
package com.superspeed.grabticket.pojo; import org.apache.http.cookie.Cookie; import java.util.List; public class HttpRequestResult { int statusCode; String data; List<Cookie> cookies; public HttpRequestResult(String data, List<Cookie> cookies) { this.data = data; this.cookies = cookies; } public HttpRequestResult(int statusCode, String data, List<Cookie> cookies) { this.statusCode = statusCode; this.data = data; this.cookies = cookies; } public int getStatusCode() { return statusCode; } public void setStatusCode(int statusCode) { this.statusCode = statusCode; } public String getData() { return data; } public void setData(String data) { this.data = data; } public List<Cookie> getCookies() { return cookies; } public void setCookies(List<Cookie> cookies) { this.cookies = cookies; } }
67713094-df16-4e82-9b9a-958f13104329
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2022-09-08 15:54:11", "repo_name": "chongyang92/learndemo", "sub_path": "/Day11Demo/src/com/lchy/_09文件上传演示/ServerDemo.java", "file_name": "ServerDemo.java", "file_ext": "java", "file_size_in_byte": 1092, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "732420823546b4d80c7cc29c2bbaa84c5220ae28", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/chongyang92/learndemo
240
FILENAME: ServerDemo.java
0.27513
package com.lchy._09文件上传演示; import java.io.IOException; import java.io.InputStream; import java.net.ServerSocket; import java.net.Socket; import java.util.concurrent.Executors; /** 目标:实现客户端上传图片给服务端保存起来 开发客户端: 本地图片 F:/file/IMG_20201116_183806.jpg 开发服务端: 服务器路径 F:/file/image */ public class ServerDemo { public static void main(String[] args) { System.out.println("服务器启动"); try(//1.注册端口 ServerSocket serverSocket = new ServerSocket(7777);){ //2.线程池 MyHandlerSocketThreadPool myHandlerSocketThreadPool = new MyHandlerSocketThreadPool(3,100); //2.接入连接 while (true){ Socket socket = serverSocket.accept(); System.out.println("接入"); myHandlerSocketThreadPool.execute(new MyReaderClientRunnable(socket)); } }catch (IOException e){ e.printStackTrace(); } } }
b1398abd-3d60-4532-858d-4e6fa6860496
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-02-02 03:17:37", "repo_name": "meverline/my-transite-dm", "sub_path": "/libs/common/src/main/java/me/transit/dao/query/translator/PolygonTupleTranslator.java", "file_name": "PolygonTupleTranslator.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "1c8bf26f8b397101415194c1e819a8eb59ffdb63", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/meverline/my-transite-dm
191
FILENAME: PolygonTupleTranslator.java
0.292595
package me.transit.dao.query.translator; import me.transit.dao.query.tuple.IQueryTuple; import me.transit.dao.query.tuple.PolygonBoxTuple; import me.transit.dao.query.tuple.Tuple; import org.locationtech.jts.geom.Polygon; public class PolygonTupleTranslator implements IOrmQueryTranslator { private final PolygonBoxTuple tuple; public PolygonTupleTranslator(IQueryTuple tuple) { this.tuple = PolygonBoxTuple.class.cast(tuple); } public Tuple getCriterion() { Polygon range = tuple.makePolygon(tuple.getPointLine()); StringBuilder builder = new StringBuilder("within( "); if ( tuple.getAlias() != null ) { builder.append(tuple.getAlias().getSimpleName()); builder.append("."); } builder.append(tuple.getField()); builder.append(", :polygon)"); Tuple rtn = new Tuple(builder.toString()); rtn.add("polygon", range); return rtn; } }
a497b9e0-25c3-4ac4-8ba6-de434c003767
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-07-22T16:03:37", "repo_name": "Stainystain/Arcade-Game", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 971, "line_count": 36, "lang": "en", "doc_type": "text", "blob_id": "47cfbf4858ce0d9304db46188c43d49c7fce881e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Stainystain/Arcade-Game
226
FILENAME: README.md
0.240775
# Classic Arcade Game / Frogger ## Table of Contents * [Description](#description) * [Features](#features) * [Instructions](#instructions) * [Application](#application) ## Description A basic browser based arcade game built with vanilla javascript, html & css. A project completed for Udacity's Front-End Web Developer Nanodegree Program (Google Scholarship). [Live Preview](https://stainystain.github.io/Arcade-Game/) ## Features - Moveable user character - Moving enemies - Collision detection - Collision & end game restart ## Instructions The object of the game is to direct the character over a road to the river without hitting any of the enemies. If you navigate the enemies and get to the river, you win. If you hit an enemy the game is reset. ## Application Play the game online - [Live Preview](https://stainystain.github.io/Arcade-Game/) Download or clone the repository from Github - git clone https://github.com/Stainystain/Arcade-Game.git
f2baf260-2caf-488a-9842-9c488f4499a4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-01-25 17:16:27", "repo_name": "Elsamarsantos/PharmaFriend", "sub_path": "/pharmafriend/src/main/java/pharmafriend/services/UserRequestService.java", "file_name": "UserRequestService.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "31247f736456cd921ef2f3a0919d3fe78558f619", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/Elsamarsantos/PharmaFriend
223
FILENAME: UserRequestService.java
0.287768
package pharmafriend.services; import java.util.List; import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; import pharmafriend.Dtos.PharmacyDto; import pharmafriend.business.UserRequestBusiness; @Path("request") public class UserRequestService { @Inject UserRequestBusiness UserRequestBusiness1; @GET @Path("test") @Produces (MediaType.APPLICATION_JSON) public String medicineRequest() { return "funciona"; } @GET @Produces (MediaType.APPLICATION_JSON) public List<PharmacyDto> medicineRequest(@QueryParam("medicinename") String name,@QueryParam("dose") String dose,@QueryParam("volume") String volume,@QueryParam("lonlocation") double lon,@QueryParam("latlocation") double lat, @QueryParam("userdistance") double distance) { return UserRequestBusiness1.userRequest(name,dose,volume, lon, lat, distance); } }
5af5ca4b-d316-4eba-bfde-834319c4bad0
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-20 22:27:20", "repo_name": "Jose98Lapa/SecondYearFinalProject", "sub_path": "/Projeto/eapli.base/base.core/src/main/java/eapli/base/collaborator/domain/Street.java", "file_name": "Street.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "9b9bd7e7300b009609691dbbae24101ab9732da8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Jose98Lapa/SecondYearFinalProject
229
FILENAME: Street.java
0.242206
package eapli.base.collaborator.domain; import eapli.framework.domain.model.ValueObject; import javax.persistence.Embeddable; import java.io.Serializable; import java.util.Objects; @Embeddable public class Street implements ValueObject, Serializable { private String estrada; public Street(String estrada) { if (estrada==null ||estrada.isEmpty()||!estrada.matches("^[A-zÀ-ú\\.\\- ]+$")) throw new IllegalArgumentException("Estrada nao cumpre os critérios"); this.estrada = estrada; } protected Street(){} @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Street street1 = (Street) o; return estrada.equals(street1.estrada); } @Override public int hashCode() { return Objects.hash(estrada); } @Override public String toString() { return this.estrada; } }
4dcafc81-7fc8-41d6-8d93-7fcdd9cb7863
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-03-10 16:08:45", "repo_name": "harilee1325/BSafe", "sub_path": "/app/src/main/java/com/harilee/bsafe/Model/AssignCabModel.java", "file_name": "AssignCabModel.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "e5c251e8c9f437094cc590b1da12f9e5b911b947", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/harilee1325/BSafe
208
FILENAME: AssignCabModel.java
0.187133
package com.harilee.bsafe.Model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class AssignCabModel { @SerializedName("lat") @Expose private String lat; @SerializedName("lng") @Expose private String lng; @SerializedName("message") @Expose private String message; @SerializedName("success") @Expose private String success; public String getLat() { return lat; } public void setLat(String lat) { this.lat = lat; } public String getLng() { return lng; } public void setLng(String lng) { this.lng = lng; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getSuccess() { return success; } public void setSuccess(String success) { this.success = success; } }
e19f97de-ae08-42de-b577-261f0249de91
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-01 14:37:17", "repo_name": "Columbus478/OrchidBank", "sub_path": "/src/test/java/com/OrchidBank/Solution_1/PerfectSquareCount.java", "file_name": "PerfectSquareCount.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "040c7dc7d6c144673668c62786199cd68dc5f311", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Columbus478/OrchidBank
254
FILENAME: PerfectSquareCount.java
0.280616
/** * */ package com.OrchidBank.Solution_1; import java.util.ArrayList; import java.util.List; import java.util.Scanner; /** * @author Samuel Columbus Jan 31, 2021 */ public class PerfectSquareCount { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter the number of test-case"); int numberOfTestcase = input.nextInt(); List<Integer> listSum = new ArrayList<Integer>(); for (int tc = 0; tc < numberOfTestcase; tc++) { int length = input.nextInt(); int width = input.nextInt(); int sum = 0; for (int i = 0; i <= length; i++) { for (int j = 0; j <= width; j++) { for (int k = 1; k <= width; k++) { if ((j + k) <= width && (i + k) <= length) { sum += 1; } } } } listSum.add(sum); } for (Integer integer : listSum) { System.out.println(integer); } } }
e5a42bc0-d0ef-4e45-b732-16bd9f67e4cd
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-08-10 12:44:34", "repo_name": "RookieWangXF/Framework-base", "sub_path": "/ssh/src/main/java/cn/rookie/bean/Employee.java", "file_name": "Employee.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "6842eb19d5510df4f0352035bc867165fbb0cc12", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/RookieWangXF/Framework-base
220
FILENAME: Employee.java
0.259826
package cn.rookie.bean; import javax.persistence.*; /** * Created by Rookie on 2016/5/18. * Package_name is cn.rookie.bean * Description: */ @Entity @Table(name = "employee") public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; private String empName; private double salary; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getEmpName() { return empName; } public void setEmpName(String empName) { this.empName = empName; } public double getSalary() { return salary; } public void setSalary(double salary) { this.salary = salary; } @Override public String toString() { return "Employee{" + "id=" + id + ", empName='" + empName + '\'' + ", salary=" + salary + '}'; } }
cb81c809-d171-4019-bf16-d1e527ed6c21
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-13 15:02:05", "repo_name": "sotomskir/stager", "sub_path": "/src/main/java/io/github/sotomskir/stager/repository/MockTemplateRepository.java", "file_name": "MockTemplateRepository.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "46134f5ad6f1b7d8ac003c78508a29f92d33b5df", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sotomskir/stager
187
FILENAME: MockTemplateRepository.java
0.224055
package io.github.sotomskir.stager.repository; import io.github.sotomskir.stager.domain.Template; import org.springframework.stereotype.Component; import java.util.*; @Component public class MockTemplateRepository implements TemplateRepository { @Override public List<Template> findAll() { List<Template> templates = new ArrayList<>(); templates.add(new Template()); templates.add(new Template()); templates.add(new Template()); templates.add(new Template()); return templates; } @Override public Optional<Template> findOneByName(String name) { Template template = new Template(); Map<String, String> environment = new HashMap<>(); environment.put("psql_version", "9.6"); environment.put("service_version", "1.0"); environment.put("djdidaj_version", "1.2"); template.setEnvironment(environment); return Optional.of(template); } }
e3d86733-b518-435c-bc4a-957f1331a26a
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-09 04:17:27", "repo_name": "cch0/spring-boot-distributed-tracing-with-jaeger", "sub_path": "/profile-service/src/main/java/com/demo/profileservice/controller/Controller.java", "file_name": "Controller.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "12e37685d44e4bc85a217be112a5569df9346c04", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/cch0/spring-boot-distributed-tracing-with-jaeger
190
FILENAME: Controller.java
0.272799
package com.demo.profileservice.controller; import com.demo.profileservice.model.ProfileInfo; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.Date; import java.util.Random; @RestController @Slf4j public class Controller { private Random random = new Random(); @RequestMapping("/profileInfo/accounts/{accountId}") public ProfileInfo getProfileInfoByAccountId(@PathVariable("accountId") long id) { log.info("Handling getProfileInfoByAccountId: id={}", id); this.randomDelay(); return new ProfileInfo(id, new Date()); } private void randomDelay() { try { // sleep a bit Thread.sleep((long)(2*random.nextDouble()*1000)); } catch (Exception e) { // ignore } } }
a26bae12-1267-449f-8efa-b01f64b364df
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-10 10:05:27", "repo_name": "leejy9095/information", "sub_path": "/src/main/java/jun/com/information/main/MainController.java", "file_name": "MainController.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "1b7b9929fd84c4d9ed649d27c210aac0c1713b4f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/leejy9095/information
164
FILENAME: MainController.java
0.235108
package jun.com.information.main; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.support.SessionStatus; import org.springframework.web.servlet.ModelAndView; /** * Handles requests for the application home page. */ @Controller public class MainController { private static final Logger logger = LoggerFactory.getLogger(MainController.class); @RequestMapping(value = "/", method = RequestMethod.GET) public ModelAndView home( ModelAndView modelAndView, HttpServletRequest request, HttpServletResponse response, SessionStatus status ){ logger.info("main"); modelAndView.setViewName("home"); return modelAndView; } }
e7c07d15-c78f-486b-a899-fcf89586e2cb
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-09-28 14:06:29", "repo_name": "liyork/concurrenttest", "sub_path": "/src/main/java/com/wolf/concurrenttest/hcpta/activeobject/ActiveMessageQueue.java", "file_name": "ActiveMessageQueue.java", "file_ext": "java", "file_size_in_byte": 1014, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "52048f3b223fe1d871aea3dab401f4b59ec303af", "star_events_count": 0, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/liyork/concurrenttest
216
FILENAME: ActiveMessageQueue.java
0.252384
package com.wolf.concurrenttest.hcpta.activeobject; import java.util.LinkedList; /** * Description: 队列 * 无限制大小 * Created on 2021/9/26 10:09 PM * * @author 李超 * @version 0.0.1 */ public class ActiveMessageQueue { // 存放提交的MethodMessage消息 private final LinkedList<MethodMessage> messages = new LinkedList<>(); public ActiveMessageQueue() { new ActiveDaemonThread(this).start(); } public void offer(MethodMessage methodMessage) { synchronized (this) { messages.addLast(methodMessage); // 因为只有一个线程负责take this.notify(); } } protected MethodMessage take() { synchronized (this) { while (messages.isEmpty()) { try { this.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } return messages.removeFirst(); } } }
c97c06cc-87e4-4fea-9fc6-675d391588e4
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2013-04-28 00:36:04", "repo_name": "jbalmert/goos-by-chapter", "sub_path": "/src/main/java/auctionsniper/Item.java", "file_name": "Item.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "bde761826859c523fa184bab0b8689e8b3441e8d", "star_events_count": 10, "fork_events_count": 2, "src_encoding": "UTF-8"}
https://github.com/jbalmert/goos-by-chapter
202
FILENAME: Item.java
0.259826
package auctionsniper; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; /** * Added Chapter 18: * Code from GOOS, pg 209 * - This bundles up the item id and stop price for the item together. * */ public class Item { public final String identifier; public final int stopPrice; public Item(String identifier, int stopPrice) { this.identifier = identifier; this.stopPrice = stopPrice; } @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } @Override public boolean equals(Object that) { return EqualsBuilder.reflectionEquals(this, that); } public boolean allowsBid(int bid) { return bid <= stopPrice; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
346d36be-6e24-441b-a533-7d42a7498589
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-09-14 05:24:05", "repo_name": "r9software/CodeTestContacts", "sub_path": "/AndroidCodeTestRodolfoAbarca/app/src/main/java/com/midevs/androidcodetestrodolfoabarca/BaseActivity.java", "file_name": "BaseActivity.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "432cc9b0e89b25a302bc7716ce826b788b13382d", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"}
https://github.com/r9software/CodeTestContacts
192
FILENAME: BaseActivity.java
0.225417
package com.midevs.androidcodetestrodolfoabarca; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import com.midevs.androidcodetestrodolfoabarca.utils.Navigator; /** * Created by asus on 06/08/2016. */ public abstract class BaseActivity extends AppCompatActivity { public static final String CONTACT_ID = "CONTACT_ID"; protected static final int EMAIL_TYPE = 0; protected static final int PHONE_TYPE = 1; protected static final int ADDRESS_TYPE = 2; protected Navigator navigator; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); navigator = new Navigator(this); Log.e("Activity Created", this.getClass().getCanonicalName() + " created"); setContentView(getContentLayout()); initialize(); } public abstract void initialize(); protected abstract int getContentLayout(); }
b53f23ca-1f90-456e-a570-dbebda2b12a8
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-07-05 03:20:02", "repo_name": "xyzlf/Grunt", "sub_path": "/app/src/main/java/com/xyzlf/apt/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "898620a56998bb4127d655adc952f8902b320367", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xyzlf/Grunt
178
FILENAME: MainActivity.java
0.247987
package com.xyzlf.apt; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import com.xyzlf.apt.annotations.BindView; import com.xyzlf.apt.api.ViewInjector; public class MainActivity extends AppCompatActivity { @BindView(R.id.text) TextView textView; @BindView(R.id.button) Button button; @BindView(R.id.image) ImageView imageView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ViewInjector.injectView(this); Log.i("MainActivity", "--------------------------"); Log.i("MainActivity", BindView.class.getCanonicalName()); Log.i("MainActivity", BindView.class.getName()); Log.i("MainActivity", BindView.class.getSimpleName()); } }
e522f6a3-795a-41b9-b589-48e74d31adc7
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-05-16 15:35:02", "repo_name": "flashch/MyProject", "sub_path": "/app/src/main/java/com/chinamobile/onenet/mymvp/mvp/ui/fragment/FragmentFactory.java", "file_name": "FragmentFactory.java", "file_ext": "java", "file_size_in_byte": 994, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "8f1500929ae1af2f6001ad5a6c4df63282fa37b2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/flashch/MyProject
194
FILENAME: FragmentFactory.java
0.217338
package com.chinamobile.onenet.mymvp.mvp.ui.fragment; import android.support.v4.app.Fragment; import com.chinamobile.onenet.mymvp.mvp.ui.fragment.map.MapFragment; /** * Fragment的工厂类 * * @author Administrator */ public class FragmentFactory { /** * 根据不同的position生产对应的Fragment对象 * * @param position * @return */ public static Fragment create(int position) { Fragment fragment = null; switch (position) { case 0: fragment = new LivingFragment(); break; case 1: fragment = new HomeFragment(); break; case 2: fragment = new VideoFragment(); break; case 3: fragment = new MapFragment(); break; case 4: fragment = MineFragment.newInstance(); break; } return fragment; } }
11a569a5-9c41-4a29-bebe-69fca107a015
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-07-28 07:21:49", "repo_name": "imacback/bs", "sub_path": "/bs-back/src/main/java/cn/aiyuedu/bs/back/component/BookComponent.java", "file_name": "BookComponent.java", "file_ext": "java", "file_size_in_byte": 972, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "5ddeb049cf1568c28fdedafe7cd2a4f72a094625", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/imacback/bs
203
FILENAME: BookComponent.java
0.242206
package cn.aiyuedu.bs.back.component; import cn.aiyuedu.bs.da.enumeration.ConfigEnum; import cn.aiyuedu.bs.da.service.KanshuService; import com.google.common.collect.Lists; import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; import java.util.List; /** * Description: * * @author yz.wu */ @Component("bookComponent") public class BookComponent { @Autowired private KanshuService kanshuService; @Async public void snatchKanshu() { List<Integer> ids = kanshuService.getCpBookIds(); if (CollectionUtils.isNotEmpty(ids)) { List<String> bookIds = Lists.newArrayList(); for (Integer id : ids) { bookIds.add(id.toString()); } kanshuService.update(ConfigEnum.Provider.Kanshu, bookIds); } } }
4a520502-bb5e-4faf-be0e-33ec3e5c764d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-15 16:04:12", "repo_name": "Basyav/petclinic", "sub_path": "/petclinic-service/src/main/java/com/bas/petclinic/dto/ESOwnerDTO.java", "file_name": "ESOwnerDTO.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "0753e94a7377b96fbd723442bc8fd9904a2abe43", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Basyav/petclinic
244
FILENAME: ESOwnerDTO.java
0.253861
package com.bas.petclinic.dto; /** * Data transfer object for ESOwner */ public class ESOwnerDTO { private Long id; private String FIO; public ESOwnerDTO() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getFIO() { return FIO; } public void setFIO(String FIO) { this.FIO = FIO; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ESOwnerDTO that = (ESOwnerDTO) o; return id != null ? id.equals(that.id) : that.id == null; } @Override public int hashCode() { return id != null ? id.hashCode() : 0; } @Override public String toString() { return "ESOwnerDTO{" + "id=" + id + ", FIO='" + FIO + '\'' + '}'; } }
3b20361d-5026-48df-853e-8c77a4ee0023
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2010-08-22 18:24:41", "repo_name": "dilgerma/Ks-Video-Store", "sub_path": "/src/main/java/de/pentasys/k/navigation/MenuEntry.java", "file_name": "MenuEntry.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "858af63e9828cf3c8933ea4c78a8189389b46dab", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/dilgerma/Ks-Video-Store
220
FILENAME: MenuEntry.java
0.218669
/** * */ package de.pentasys.k.navigation; import java.io.Serializable; import org.apache.wicket.markup.html.WebPage; /** * @author <a href="mailto:martin.dilger@pentasys.de">Martin Dilger</a> * @since 29.07.2010 */ public class MenuEntry implements Serializable { /** * Serial Version UID */ private static final long serialVersionUID = 1L; private Class<? extends WebPage> targetPage; private String displayName; public MenuEntry(Class<? extends WebPage> targetPage, String displayName) { super(); this.targetPage = targetPage; this.displayName = displayName; } public Class<? extends WebPage> getTargetPage() { return targetPage; } public void setTargetPage(Class<? extends WebPage> targetPage) { this.targetPage = targetPage; } public String getDisplayName() { return displayName; } public void setDisplayName(String displayName) { this.displayName = displayName; } }
978e5d17-1327-44de-9aa4-81cf6d5140f1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-30 09:11:27", "repo_name": "xialonglei/web-RBAC", "sub_path": "/src/main/java/com/xll/enums/ResponseEnum.java", "file_name": "ResponseEnum.java", "file_ext": "java", "file_size_in_byte": 1128, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "de9939f6e6481ea84f6bf232ba8d249c67e09f15", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/xialonglei/web-RBAC
320
FILENAME: ResponseEnum.java
0.29584
package com.xll.enums; /** * Created by lonely.xia on 2017/10/17. */ public enum ResponseEnum { INSERT_SUCCESS("插入成功" , 200) , INSERT_FAIL("插入失败" , -101) , INSERT_OR_UPDATE_ROLE_NAME_DUPLICATION("插入或更新重复角色名" , -102) , UPDATE_SUCCESS("更新成功" , 200) , UPDATE_FAIL("更新失败" , -201) , SELECT_SUCCESS("查询成功" , 200) , SELECT_FAIL("查询失败" , -301) , DELETE_SUCCESS("删除成功" , 200) , DELETE_FAIL("删除失败" , -401) , INSERT_NAME_OR_EMAIL_DUPLICATION("插入重复用户名或邮箱" , -501) , UPDATE_NAME_DUPLICATION("更新的用户名已存在" , -601) , UPDATE_EMAIL_DUPLICATION("更新的用户邮箱已存在" , -701) , INSERT_OR_UPDATE_TITLE_DUPLICATION("插入或更新重复的权限TITLE" , -502) , OK("成功" , 200); private String name; private int code; private ResponseEnum(String name , int code) { this.name = name; this.code = code; } public String getName() { return name; } public int getCode() { return code; } }
689edb41-dfcb-4bf5-a4ea-219a37260201
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-25 15:06:01", "repo_name": "jvictorvilela/RU-System", "sub_path": "/src/java/commands/EditarNome.java", "file_name": "EditarNome.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "b8472a5ff3cb8d235bb3abe6dbe6c0123177383b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/jvictorvilela/RU-System
165
FILENAME: EditarNome.java
0.252384
package commands; import DAO.UsuarioDAO; import entidade.Usuario; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class EditarNome implements Command { @Override public void execute(HttpServletRequest request, HttpServletResponse response) { try{ UsuarioDAO dao = new UsuarioDAO(); Usuario usr = (Usuario)dao.getPojo((String)((request.getSession().getAttribute("usuario"))+"")); usr.setNome(request.getParameter("nome")); dao.updatePojo(usr); RequestDispatcher d = request.getRequestDispatcher("/editarPerfil.jsp?sucesso=Nome editado com sucesso!"); d.forward(request, response); }catch(IOException | ServletException ex){ throw new RuntimeException(ex); } } }
6ff16b72-c08e-4e86-8187-677339580af6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-04-14T14:52:07", "repo_name": "kic-markon/Zeppelin", "sub_path": "/Zeppelin notes.md", "file_name": "Zeppelin notes.md", "file_ext": "md", "file_size_in_byte": 963, "line_count": 25, "lang": "en", "doc_type": "text", "blob_id": "55f81a5b311d9065004d72423561953157e1e057", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/kic-markon/Zeppelin
214
FILENAME: Zeppelin notes.md
0.23092
# Zeppelin notes ## Installing Zeppelin Download the Zeppelin binary package for your environment. Things are most simple if you choose the "Package with all interpreters". https://zeppelin.apache.org/docs/0.7.3/install/install.html Initially, start the Zeppelin server from the terminal. It will run in the background as a daemon. Later, you can find out how to do it in a more organized fashion. Open now a browser window or tab, with the URL: http://localhost:8080/ This should show the local Zeppelin home page, with the initial sample notebooks. ## Using the AM4 notebooks Clone the Zeppelin repository somewhere: ``` git clone https://github.com/kic-markon/Zeppelin.git ``` This will create the local copy of the AM4 Zeppelin notebook repository, with the "notebook" directory inside. Copy or link this into your zeppelin directory, instead of the original notebook directory. If you restart now the Zeppelin server, the notebooks become available.
4488504f-19e0-4134-8579-dbfd457850d9
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-06-22T20:16:50", "repo_name": "matipacheco/dynamic-blog", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 965, "line_count": 31, "lang": "en", "doc_type": "text", "blob_id": "45839d3b99d3d9af839bb83b6b2c1e1e0625f4e8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/matipacheco/dynamic-blog
234
FILENAME: README.md
0.276691
# Dynamic blog This app was created to test dynamic routing on Rails. So, lets say that John wants to create his own blog. What we are looking for is that once John is registered in the system, the route `dynamic-blog/john` becomes immediately available within the app. And with that set up, John can start posting articles/events and whatnot on the `dynamic-blog/john/events` url. In other words, I just wanted to test how to modify Rails routes so that we won't have to search by `:id` anymore ¯\\_(ツ)_/¯ Note: FriendlyId made it really, really simple :) Note: I took the opportunity to use two gems that I've never used before, `friendly_id` and `bootstrap`. ## Setup Ruby version: 2.5.1 System dependencies: rvm gemset create dynamic-blog rvm gemset use dynamic-blog bundle install ## Resources - [FriendlyId](https://github.com/norman/friendly_id) - [Bootstrap Ruby Gem](https://github.com/twbs/bootstrap-rubygem)
eb5500f3-275f-4925-8b1b-f5b99cc28c9d
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2012-01-24 09:48:50", "repo_name": "Minecarts/MiracleGrow", "sub_path": "/src/com/minecarts/miraclegrow/listener/WorldListener.java", "file_name": "WorldListener.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "d88e85d8f632c00eb10dfd0b9670717283fbfb37", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Minecarts/MiracleGrow
209
FILENAME: WorldListener.java
0.256832
package com.minecarts.miraclegrow.listener; import com.minecarts.miraclegrow.MiracleGrow; import com.minecarts.miraclegrow.BlockStateRestore.Cause; import org.bukkit.event.world.*; import org.bukkit.block.Block; import org.bukkit.block.BlockState; public class WorldListener extends org.bukkit.event.world.WorldListener { private MiracleGrow plugin; public WorldListener(MiracleGrow plugin) { this.plugin = plugin; } @Override public void onPortalCreate(PortalCreateEvent event) { if(event.isCancelled()) return; for(Block block : event.getBlocks()) { plugin.scheduleRestore(block, Cause.PLAYER); } } @Override public void onStructureGrow(StructureGrowEvent event) { if(event.isCancelled()) return; for(BlockState state : event.getBlocks()) { plugin.scheduleRestore(state.getBlock(), Cause.PLAYER); } } }
342981bf-a948-476b-b63f-445b83f5823e
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-04-02 11:13:08", "repo_name": "ccva/KotlinTaste", "sub_path": "/app/src/main/java/com/va/kotlintaste/service/ListenerService.java", "file_name": "ListenerService.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "21ea3ca9fee8ab4df1fa72a44361847b3f6f080e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ccva/KotlinTaste
193
FILENAME: ListenerService.java
0.220007
package com.va.kotlintaste.service; import android.annotation.SuppressLint; import android.service.notification.NotificationListenerService; import android.service.notification.StatusBarNotification; import android.util.Log; /** * Created by Junmeng.Chen on 2017/9/22. */ @SuppressLint("OverrideAbstract") public class ListenerService extends NotificationListenerService { public static final String TAG = ListenerService.class.getSimpleName(); @Override public void onListenerConnected() { super.onListenerConnected(); Log.i(TAG, "onListenerConnected: "); } @Override public void onNotificationPosted(StatusBarNotification sbn) { super.onNotificationPosted(sbn); Log.i(TAG, "onNotificationPosted: "); } @Override public void onNotificationRemoved(StatusBarNotification sbn) { super.onNotificationRemoved(sbn); Log.i(TAG, "onNotificationRemoved: "); } }
efd89599-24c1-41e4-8485-7a742263afe6
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-08-14 10:17:13", "repo_name": "ArronMingCN/OrderHub", "sub_path": "/OrderHub/test/com/orderhub/dao/OrderBookDAOTest.java", "file_name": "OrderBookDAOTest.java", "file_ext": "java", "file_size_in_byte": 960, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "15685a418a16ce5aea7ba8d962b6ba1dd9e1e049", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ArronMingCN/OrderHub
213
FILENAME: OrderBookDAOTest.java
0.283781
package com.orderhub.dao; import net.sf.json.JSONObject; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import java.util.ArrayList; import java.util.List; import static org.junit.jupiter.api.Assertions.*; class OrderBookDAOTest{ @Autowired private OrderBookDAO orderBookDAO; @Test void getOrderBookBidBySymbol() { } @Test void getOrderBookAskBySymbol() { } @Test void getBestAskBySymbol() { } @Test void getBestBidBySymbol() { } @Test void getAllLevel1() { String bidSql = "select DISTINCT(Symbol) from bidorderbook"; QueryRunner queryRunner = mock(QueryRunner.class); List<String> l =new ArrayList<>(); l.add("symbol"); when(queryRunner.query(bidSql)).thenReturn(l); JSONObject jsonObject = orderBookDAO.getAllLevel1(); assertEquals(jsonObject.get("symbol"), "data"); } }
52ab2293-8b23-47a1-9052-04c361302be1
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-02 12:32:34", "repo_name": "l00196967/Hello-World", "sub_path": "/ims/ims-web/src/main/java/com/alibaba/ims/web/vo/PageVO.java", "file_name": "PageVO.java", "file_ext": "java", "file_size_in_byte": 643, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "660f513361f99612f292ddb5c0e108640fd48359", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/l00196967/Hello-World
228
FILENAME: PageVO.java
0.242206
/* * Copyright 2014 Alibaba.com All right reserved. This software is the * confidential and proprietary information of Alibaba.com ("Confidential * Information"). You shall not disclose such Confidential Information and shall * use it only in accordance with the terms of the license agreement you entered * into with Alibaba.com. */ package com.alibaba.ims.web.vo; /** * 分页模型对象 * * @author randy.ly 2014年12月10日 下午8:53:24 */ public class PageVO { private int current; private int start; private int limit; public int getCurrent() { return current; } public void setCurrent(int current) { this.current = current; } public int getStart() { return start; } public void setStart(int start) { this.start = start; } public int getLimit() { return limit; } public void setLimit(int limit) { this.limit = limit; } }
1ed60ca6-d4b4-4735-8a09-7f3569a922b5
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-13 00:44:27", "repo_name": "ziyoushi/atcrowdfunding-parent", "sub_path": "/manager-impl/src/main/java/com/atguigu/atcrowdfunding/component/AppUserDetail.java", "file_name": "AppUserDetail.java", "file_ext": "java", "file_size_in_byte": 966, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "a75c5276fcd8a49b60ab3addcb955e3dd91c1a95", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/ziyoushi/atcrowdfunding-parent
194
FILENAME: AppUserDetail.java
0.240775
package com.atguigu.atcrowdfunding.component; import java.util.Collection; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.User; import org.springframework.stereotype.Component; import com.atguigu.atcrowdfunding.bean.TAdmin; public class AppUserDetail extends User { /** * */ private static final long serialVersionUID = 1L; //封装TAmin private TAdmin admin; public AppUserDetail(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities,TAdmin admin) { super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities); this.admin = admin; } public TAdmin getAdmin() { return admin; } public void setAdmin(TAdmin admin) { this.admin = admin; } }
d39d0346-5d51-46bd-a80a-4cbf2b4fb064
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-16 05:11:52", "repo_name": "mdzyuba/bakingtime", "sub_path": "/model/src/test/java/com/mdzyuba/bakingtime/repository/TestDataUtils.java", "file_name": "TestDataUtils.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "028333bfdfbeb0bcb9363ce13056f1ae6eba8d84", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/mdzyuba/bakingtime
169
FILENAME: TestDataUtils.java
0.253861
package com.mdzyuba.bakingtime.repository; import java.io.IOException; import java.io.InputStream; import java.util.Scanner; import androidx.annotation.Nullable; class TestDataUtils { private static final String DELIMITER = "\\A"; @Nullable public static String getJsonString(String fileName) throws IOException { ClassLoader classLoader = TestDataUtils.class.getClassLoader(); if (classLoader == null) { return null; } try (InputStream inputStream = classLoader.getResourceAsStream(fileName)) { if (inputStream == null) { return null; } Scanner scanner = new Scanner(inputStream); scanner.useDelimiter(DELIMITER); boolean hasInput = scanner.hasNext(); if (hasInput) { return scanner.next(); } else { return null; } } } }
d4713ee0-713d-49ff-8a31-ae221dd9d1c3
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-19 10:32:03", "repo_name": "homertruong66/research", "sub_path": "/link-stats-processor/src/main/java/com/hoang/lsp/controller/ClickProcessorImpl.java", "file_name": "ClickProcessorImpl.java", "file_ext": "java", "file_size_in_byte": 974, "line_count": 32, "lang": "en", "doc_type": "code", "blob_id": "c423ac289237f18389c3bcbf51ee47e3e1d4c263", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/homertruong66/research
193
FILENAME: ClickProcessorImpl.java
0.271252
package com.hoang.lsp.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import com.hoang.lsp.events.ClickEvent; import com.hoang.lsp.exception.BusinessException; import com.hoang.lsp.service.LinkStatsService; @Controller("clickProcessor") public class ClickProcessorImpl implements ClickProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(ClickProcessorImpl.class); @Autowired private LinkStatsService linkStatsService; @Override public void process (ClickEvent event) { LOGGER.info("Processing Click message: " + event.toString()); try { this.linkStatsService.increaseClick(event); } catch (BusinessException be) { LOGGER.error("Error increasing Click for event: " + event.toString() + " - Cause: " + be.getMessage()); } } }
bb099720-6560-4528-a457-7ead466b3032
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-06 02:42:46", "repo_name": "runenv/wxms", "sub_path": "/src/main/java/com/ecp888/wxms/web/controller/notice/NoticeForm.java", "file_name": "NoticeForm.java", "file_ext": "java", "file_size_in_byte": 971, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "c6e070da61e35f76c9be8dea0b6e475f10b85bf1", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/runenv/wxms
271
FILENAME: NoticeForm.java
0.243642
package com.ecp888.wxms.web.controller.notice; import java.util.ArrayList; import java.util.List; import com.ecp888.wxms.vo.PageVO; import com.ecp888.wxms.vo.notice.NoticeVO; /** * APP广告位信息Form * @author ecp875 * @since 2014-08-11 */ public class NoticeForm { private PageVO pageVO=new PageVO(); private NoticeVO noticeVO = new NoticeVO(); private List<NoticeVO> noticeList = new ArrayList<NoticeVO>(); private String data; public PageVO getPageVO() { return pageVO; } public void setPageVO(PageVO pageVO) { this.pageVO = pageVO; } public NoticeVO getNoticeVO() { return noticeVO; } public void setNoticeVO(NoticeVO noticeVO) { this.noticeVO = noticeVO; } public List<NoticeVO> getNoticeList() { return noticeList; } public void setNoticeList(List<NoticeVO> noticeList) { this.noticeList = noticeList; } public String getData() { return data; } public void setData(String data) { this.data = data; } }
87d1b912-fcef-4d7e-a496-f913808acc49
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-05-17 17:23:27", "repo_name": "max40a/sekta-online-platform", "sub_path": "/src/main/java/sekta/platform/core/entity/ForumCategory.java", "file_name": "ForumCategory.java", "file_ext": "java", "file_size_in_byte": 962, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "2067034466ecacd03a308e68a20af31b8e8a2f67", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/max40a/sekta-online-platform
216
FILENAME: ForumCategory.java
0.249447
package sekta.platform.core.entity; import javax.persistence.*; import java.util.HashSet; import java.util.Set; /** * Created by Retro on 16.05.2016. */ @Entity @Table(name = "forum_category_table") public class ForumCategory { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; @Column(name="title") private String title; @OneToMany(mappedBy = "forumCategory") private Set<Message> messageSet= new HashSet<>(); public ForumCategory() { } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Set<Message> getMessageSet() { return messageSet; } public void setMessageSet(Set<Message> messageSet) { this.messageSet = messageSet; } }
e303e7dd-c236-4737-9499-1dd12bcdffdc
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-16 02:53:50", "repo_name": "oflegend/StudyDemo", "sub_path": "/AsynTaskDemo/src/main/java/demon/com/asyntaskdemo/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "29c6186e622be1d79252eeaf119691ddff5f6755", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/oflegend/StudyDemo
196
FILENAME: MainActivity.java
0.218669
package demon.com.asyntaskdemo; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.Button; import android.widget.TextView; import java.net.MalformedURLException; import java.net.URL; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; public class MainActivity extends AppCompatActivity { @BindView(R.id.down) Button down; @BindView(R.id.text) TextView text; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ButterKnife.bind(this); } @OnClick(R.id.down) public void onViewClicked(){ DownloadTask task = new DownloadTask(this); try { task.execute(new URL("http://192.168.199.100:8080/mp3/Me.mp3")); } catch (MalformedURLException e) { e.printStackTrace(); } } }
ec944cac-8a94-4476-9b7c-6b8025f62269
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-03-16 13:44:50", "repo_name": "sagungw/sbtest", "sub_path": "/02/consumer/src/main/java/io/wijaya/external/stockbit_02/consumer/StockEntry.java", "file_name": "StockEntry.java", "file_ext": "java", "file_size_in_byte": 961, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "f94c8a4079d74ced0253b108b3ebc445289958c4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/sagungw/sbtest
191
FILENAME: StockEntry.java
0.279828
package io.wijaya.external.stockbit_02.consumer; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; public class StockEntry { private LocalDateTime timestamp; private String code; private Integer price; private StockEntry(){} public LocalDateTime getTimestamp() { return timestamp; } public String getCode() { return code; } public Integer getPrice() { return price; } public static StockEntry parse(String s) throws Exception { String[] parts = s.split("\\|"); if (parts.length < 3) { throw new IllegalArgumentException("invalid entry"); } StockEntry entry = new StockEntry(); entry.timestamp = LocalDateTime.parse(parts[0], DateTimeFormatter.ofPattern("yyyy-MMM-dd HH:mm:ss")).withSecond(0); entry.code = parts[1]; entry.price = Integer.parseInt(parts[2]); return entry; } }
2b2f79b1-71f0-4efc-a785-3a10ec450090
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-08 16:13:33", "repo_name": "l0new4nder3r/drools-tests", "sub_path": "/src/test/java/drools/KJARUtils.java", "file_name": "KJARUtils.java", "file_ext": "java", "file_size_in_byte": 960, "line_count": 19, "lang": "en", "doc_type": "code", "blob_id": "4d7f548ab2942b83860da5b6284fff6f372369b3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/l0new4nder3r/drools-tests
317
FILENAME: KJARUtils.java
0.282196
package drools; import org.kie.api.builder.ReleaseId; /** * "Inspired" from * https://github.com/kiegroup/drools/blob/00657c78d252951abbf8b541a7fc2417df8d6fb1/drools-model/drools-model-compiler/src/test/java/org/drools/modelcompiler/KJARUtils.java#L21 * */ public class KJARUtils { public static String getPom(final ReleaseId releaseId) { final String pom = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" + "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" + " xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n" + " <modelVersion>4.0.0</modelVersion>\n" + "\n" + " <groupId>" + releaseId.getGroupId() + "</groupId>\n" + " <artifactId>" + releaseId.getArtifactId() + "</artifactId>\n" + " <version>" + releaseId.getVersion() + "</version>\n" + "</project>"; return pom; } }
26893766-124b-45d1-98d0-5f0a3dfd6753
{"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2014-08-15T01:00:25", "repo_name": "Pitt-RAS/color_follower", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 961, "line_count": 22, "lang": "en", "doc_type": "text", "blob_id": "0542709badd132feba66d39f4797324122583fb8", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"}
https://github.com/Pitt-RAS/color_follower
222
FILENAME: README.md
0.226784
color_follower ============== Control code for a webcam-based color tracking/following robot This is the code to run a BeagleBone Black based robot that follows a specified color. The hardware requirements are: - A frame that utilizes two direct drive motors, one on either side of the robot. - A webcam (low resolution is fine, this script doesn't use anything higher than 320 x 240) - A BeagleBone Black to run the code and drive the PWM output - A motor driver board (Pololu dual bidirectional motor driver is best) - Several power sources: 5V usb battery for BBB, 9V (or appropriate) battery for motor power The software requirements are: - Angstrom Linux running the 3.8.13 kernel - Saad Ahmad's beaglebone-black-cpp-PWM driver modifications installed - Customized adafruit-beaglebone-io-python (kiorpesc's fork - for fully functional PWM) - opencv and python-opencv installed