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 |
|---|---|---|---|---|---|---|
b697b409-b86d-4ad2-972a-3dd1b0241d4f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-08-04 13:21:17", "repo_name": "edwardwe7/pitmutation-jenkins", "sub_path": "/src/main/java/org/jenkinsci/plugins/pitmutation/targets/MutationStatsImpl.java", "file_name": "MutationStatsImpl.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "cc1b4060c19482e2a19c464c2ade1955aa9147a2", "star_events_count": 3, "fork_events_count": 3, "src_encoding": "UTF-8"} | https://github.com/edwardwe7/pitmutation-jenkins | 228 | FILENAME: MutationStatsImpl.java | 0.268941 | package org.jenkinsci.plugins.pitmutation.targets;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.Multiset;
import org.jenkinsci.plugins.pitmutation.Mutation;
import java.util.Collection;
/**
* @author Ed Kimber
*/
public class MutationStatsImpl extends MutationStats {
public MutationStatsImpl(String title, Collection<Mutation> mutations) {
title_ = title;
mutationsByType_ = HashMultiset.create();
if (mutations == null) return;
for (Mutation m : mutations) {
if (!m.isDetected()) {
undetected_++;
}
mutationsByType_.add(m.getMutatorClass());
}
total_ = mutations.size();
}
public String getTitle() {
return title_;
}
public int getUndetected() {
return undetected_;
}
public int getTotalMutations() {
return total_;
}
private String title_;
private int undetected_ = 0;
private int total_;
private Multiset<String> mutationsByType_;
}
|
1b705264-ad30-459e-9baa-0ebbef2b9558 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-18 11:24:25", "repo_name": "markusFrost/Avia-Sales-Mobile-Application", "sub_path": "/AviaSales/app/src/main/java/avia/androi/innopolis/com/aviasales/models/Booking.java", "file_name": "Booking.java", "file_ext": "java", "file_size_in_byte": 975, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "8bc67b7a4df37185fab5593269ec83ccdd6064ec", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/markusFrost/Avia-Sales-Mobile-Application | 240 | FILENAME: Booking.java | 0.26971 | package avia.androi.innopolis.com.aviasales.models;
import java.util.List;
import java.util.UUID;
public class Booking {
private UUID bookingId;
private long dateBook;
private List<Flight> listFlightsTo;
private List<Flight> listFlightsBack;
public long getDateBook() {
return dateBook;
}
public void setDateBook(long dateBook) {
this.dateBook = dateBook;
}
public List<Flight> getListFlightsTo() {
return listFlightsTo;
}
public void setListFlightsTo(List<Flight> listFlightsTo) {
this.listFlightsTo = listFlightsTo;
}
public List<Flight> getListFlightsBack() {
return listFlightsBack;
}
public void setListFlightsBack(List<Flight> listFlightsBack) {
this.listFlightsBack = listFlightsBack;
}
public UUID getBookingId() {
return bookingId;
}
public void setBookingId(UUID bookingId) {
this.bookingId = bookingId;
}
}
|
1f4e3d60-8f87-41ca-91bb-5510ded814d9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-09-08 09:54:34", "repo_name": "wbppppp/spring-boot-gather", "sub_path": "/spring-boot-mybatis/src/main/java/com/wbp/mybatis/config/MyBatisPageHelper.java", "file_name": "MyBatisPageHelper.java", "file_ext": "java", "file_size_in_byte": 1235, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "116570ebc03858716fe5535f360bd142623f5946", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/wbppppp/spring-boot-gather | 261 | FILENAME: MyBatisPageHelper.java | 0.283781 | package com.wbp.mybatis.config;
import com.github.pagehelper.PageHelper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Properties;
/**
* Created by Administrator on 2018/6/18 0018.
*
*
* PageHelper:
*
* 一.与spring boot的整合,要在pom使用pagehelper-spring-boot-starter,不要引入github的,
* 否则分页效果可能失效,这里在idea中测试失效
*
* 二.与spring boot整合方式有两种:
* ①配置实体bean,即使用@Configuration,@Bean这种注解
* ②在application.yaml中配置
*
*
*/
@Configuration
public class MyBatisPageHelper {
@Bean
public PageHelper pageHelper(){
System.out.println("PageHelper分页插件===========");
PageHelper pageHelper = new PageHelper();
Properties properties = new Properties();
properties.setProperty("offsetAsPageNum","true");
properties.setProperty("rowBoundsWithCount","true");
properties.setProperty("reasonable","true");
properties.setProperty("helperDialect","mysql");
pageHelper.setProperties(properties);
return pageHelper;
}
}
|
f5dd8d3a-bdb3-4452-8b0f-6986428e8ec4 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-05 15:40:32", "repo_name": "CristianFGR/challenge-mobdev", "sub_path": "/src/main/java/com/mobdev/challengemobdev/service/dto/CharacterResponseDTO.java", "file_name": "CharacterResponseDTO.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "5d569c35a03d643d1bc9d6acc1fc9f68bde62f7a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/CristianFGR/challenge-mobdev | 237 | FILENAME: CharacterResponseDTO.java | 0.212069 | package com.mobdev.challengemobdev.service.dto;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import java.io.Serializable;
/**
* Objeto donde se mapea la respuesta del servicio
*
* @author Cristian Gonzalez Rojas (cristian.gonzalez.rojas@gmail.com)
* @version 0.0.1
* @since 0.0.1
*/
@ToString
@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown=true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CharacterResponseDTO implements Serializable {
@JsonProperty(value = "id")
private int idCharacter;
@JsonProperty(value = "name")
private String nameCharacter;
@JsonProperty(value = "status")
private String status;
@JsonProperty(value = "species")
private String species;
@JsonProperty(value = "type")
private String type;
@JsonProperty(value = "episode_count")
private int episodeCount;
@JsonProperty(value = "origin")
private OriginCharacterDTO originCharacterDTO;
}
|
e26aceb3-af6a-4c16-8dec-f9250c6d0221 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-02-18 09:03:12", "repo_name": "a2175/Springboard", "sub_path": "/src/main/java/first/common/controller/ExceptionController.java", "file_name": "ExceptionController.java", "file_ext": "java", "file_size_in_byte": 1163, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "801d8c108a4097642430b6df9b1614b181e61e29", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/a2175/Springboard | 220 | FILENAME: ExceptionController.java | 0.203075 | package first.common.controller;
import org.apache.log4j.Logger;
import org.springframework.http.HttpStatus;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
@ControllerAdvice
public class ExceptionController {
Logger log = Logger.getLogger(this.getClass());
// 권한 에러 발생시
@ExceptionHandler(AccessDeniedException.class)
@ResponseStatus(HttpStatus.FORBIDDEN)
public String AccessDeniedException(Model model, Exception e) {
log.debug(e.getMessage());
model.addAttribute("message", "접근 할 수 없습니다.");
return "/common/exception";
}
// 런타임 에러 발생시 (DB 관련 등등..)
@ExceptionHandler(RuntimeException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
public String errorException(Model model, Exception e) {
log.debug(e.getMessage());
model.addAttribute("message", "에러가 발생했습니다.");
return "/common/exception";
}
}
|
54a3f095-5cae-4824-a5f4-ebf7ceb99d24 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-06-11T11:32:29", "repo_name": "bxck75/CamScan-and-GOAhead-exploiter", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1056, "line_count": 32, "lang": "en", "doc_type": "text", "blob_id": "b548b3e926a0ff1e1a77a50f072a216282c0a3b8", "star_events_count": 1, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/bxck75/CamScan-and-GOAhead-exploiter | 341 | FILENAME: README.md | 0.246533 | Camscan scripts using shodan and censys to get target ip:port
The exploit is for over 20 brnds of webcams that all have
the hardcoded backdoor,
authenticatiob bypass,
the ftp bind shell,
###################################################
# install the following stuff
# censys_io.py (cp censys_io.py /usr/bin/censys_io.py)
# GeoLiteCity.dat (
# wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# gunzip GeoLiteCity.dat.gz
# cp GeoLiteCity.dat /usr/bin/GeoLiteCity.dat
###################################################
Usage :
-c/--count <number> # how many targets should be pulled from api
-e/--exploit # run exploit on found targets
-a/--api <number> # Choose api (0)censys.io (1)shodan.io
-h/--help # show this help
Example :
./cam_scan.sh --api 0 --count 100 --exploit
./camscan.sh -a censys -e -c 500 -d
./camscan.sh -a shodan -e -c 500 -d
./camscan.sh -a single -e -i 193.250.224.180:80
./camscan.sh -e -f <IP:PORT list>
Files can be found in /root/.Cam_Scan/output/
support
K00B404@gmail.com
|
41946524-3f7d-4469-b7bd-8e709e6dafba | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-11-29 18:47:58", "repo_name": "teshi04/WearDemo", "sub_path": "/wear/src/main/java/jp/tsur/wearui/DelayedConfirmationViewActivity.java", "file_name": "DelayedConfirmationViewActivity.java", "file_ext": "java", "file_size_in_byte": 1222, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "0bdf5cec69ab483dd7debb2adc94951066fbe0b6", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/teshi04/WearDemo | 229 | FILENAME: DelayedConfirmationViewActivity.java | 0.249447 | package jp.tsur.wearui;
import android.app.Activity;
import android.os.Bundle;
import android.support.wearable.view.DelayedConfirmationView;
import android.view.View;
import android.widget.Toast;
/**
* Created by teshi on 2015/11/24.
*/
public class DelayedConfirmationViewActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_delayed_confirmation);
DelayedConfirmationView delayedConfirmationView =
(DelayedConfirmationView) findViewById(R.id.delayed_confirmation_view);
delayedConfirmationView.setTotalTimeMs(5000);
delayedConfirmationView.setListener(new DelayedConfirmationView.DelayedConfirmationListener() {
@Override
public void onTimerFinished(View view) {
Toast.makeText(DelayedConfirmationViewActivity.this, "Finished!!", Toast.LENGTH_SHORT).show();
}
@Override
public void onTimerSelected(View view) {
// DelayedConfirmationView がタップされると呼ばれる
}
});
delayedConfirmationView.start();
}
}
|
4854be53-30de-491a-b5ee-92c10a4d169b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-04-24 11:38:10", "repo_name": "SmithAdoph/im", "sub_path": "/wxgs/src/com/lejoying/wxgs/activity/LoadingActivity.java", "file_name": "LoadingActivity.java", "file_ext": "java", "file_size_in_byte": 983, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "9250c9c58e29052b1cd868a99eb4d9b469966f5c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/SmithAdoph/im | 189 | FILENAME: LoadingActivity.java | 0.243642 | package com.lejoying.wxgs.activity;
import java.util.Timer;
import java.util.TimerTask;
import com.lejoying.wxgs.R;
import com.lejoying.wxgs.SysApplication;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.app.Activity;
import android.content.Intent;
public class LoadingActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_loading);
SysApplication.getInstance().addActivity(this);
getWindow().setBackgroundDrawableResource(R.drawable.bg);
final Intent localIntent=new Intent(LoadingActivity.this,LoginActivity.class);
Timer timer=new Timer();
TimerTask task=new TimerTask(){
@Override
public void run(){
startActivity(localIntent);
finish();
}
};
timer.schedule(task,2000);
}
}
|
33634c75-64ea-4ee4-b69d-e3ac494969c8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-20 05:24:36", "repo_name": "payencai/MeiMeng", "sub_path": "/app/src/main/java/com/example/meimeng/cookie/AddCookiesInterceptor.java", "file_name": "AddCookiesInterceptor.java", "file_ext": "java", "file_size_in_byte": 1075, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "1e2cf4ec015b2e6db3a2e6af94456753ff15b0e4", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/payencai/MeiMeng | 239 | FILENAME: AddCookiesInterceptor.java | 0.282988 | package com.example.meimeng.cookie;
import android.util.Log;
import com.example.meimeng.APP;
import java.io.IOException;
import java.util.HashSet;
import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;
/**
* 作者:凌涛 on 2019/4/20 18:06
* 邮箱:771548229@qq..com
*/
public class AddCookiesInterceptor implements Interceptor {
@Override
public Response intercept(Chain chain) throws IOException {
Request.Builder builder = chain.request().newBuilder();
HashSet<String> preferences = (HashSet) APP.getInstance().getSharedPreferences("config",
APP.getInstance().MODE_PRIVATE).getStringSet("cookie", null);
if (preferences != null) {
for (String cookie : preferences) {
builder.addHeader("Cookie", cookie);
Log.v("OkHttp", "Adding Header: " + cookie); // This is done so I know which headers are being added; this interceptor is used after the normal logging of OkHttp
}
}
return chain.proceed(builder.build());
}
}
|
ddc616bf-b1c8-4fc5-87c2-50ce98b91033 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-08-03 07:00:11", "repo_name": "Parithi/theOrangeStation", "sub_path": "/app/src/main/java/com/parithi/theorangestation/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1060, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "9b6c695c661b1905f2c292fcdc9596de91ec8190", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Parithi/theOrangeStation | 223 | FILENAME: MainActivity.java | 0.23231 | package com.parithi.theorangestation;
import android.os.Bundle;
import android.view.View;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;
import com.parithi.theorangestation.fragments.TaxiFragment;
public class MainActivity extends BaseActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
AdView mAdView = (AdView) findViewById(R.id.adView);
if(TheOrangeStation.isConnected(this)){
// AdRequest adRequest = new AdRequest.Builder().addTestDevice("E49AB252E21B9515E2B66516BE1D0542").build();
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
} else {
mAdView.setVisibility(View.GONE);
}
TaxiFragment taxiFragment = new TaxiFragment();
getSupportFragmentManager().beginTransaction()
.replace(R.id.container, taxiFragment)
.commit();
}
}
|
9af77bf3-e2fe-463a-87b9-c171547780b5 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-12-27 14:39:16", "repo_name": "cketti/MateLightAndroid", "sub_path": "/matelight/src/main/java/de/cketti/matelight/AboutFragment.java", "file_name": "AboutFragment.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 30, "lang": "en", "doc_type": "code", "blob_id": "9b39945a2c0d9b8909ae176b5dee6ff930c6ab23", "star_events_count": 1, "fork_events_count": 2, "src_encoding": "UTF-8"} | https://github.com/cketti/MateLightAndroid | 170 | FILENAME: AboutFragment.java | 0.204342 | package de.cketti.matelight;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.TextView;
public class AboutFragment extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
View view = getActivity().getLayoutInflater().inflate(R.layout.fragment_about, null);
TextView about = (TextView) view.findViewById(R.id.about_text);
about.setText(Html.fromHtml(getString(R.string.about_text)));
about.setMovementMethod(LinkMovementMethod.getInstance());
return new AlertDialog.Builder(getActivity())
.setTitle(getActivity().getString(R.string.about_dialog_title))
.setPositiveButton(R.string.about_dialog_ok, null)
.setView(view)
.create();
}
}
|
7abbeadf-b0f5-455f-96f1-9f9534d7d230 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-21 00:51:47", "repo_name": "mandiriwhatthehackorg/AppTeam4", "sub_path": "/app/src/main/java/id/co/mandiri/onepushservices/model/transaction/TransactionDetails.java", "file_name": "TransactionDetails.java", "file_ext": "java", "file_size_in_byte": 1196, "line_count": 63, "lang": "en", "doc_type": "code", "blob_id": "b3953f4a4e6c3cb17ff4fb32e019dbdb42a350fe", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/mandiriwhatthehackorg/AppTeam4 | 252 | FILENAME: TransactionDetails.java | 0.216012 | package id.co.mandiri.onepushservices.model.transaction;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class TransactionDetails {
@SerializedName("source")
@Expose
private String source;
@SerializedName("type")
@Expose
private String type;
@SerializedName("code")
@Expose
private String code;
@SerializedName("amount")
@Expose
private String amount;
@SerializedName("date")
@Expose
private String date;
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
}
|
eb78250c-a5ca-4ea5-82fc-3c980f81e92e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-21 09:41:30", "repo_name": "Kubixy/Process-Thread", "sub_path": "/processManager2.java", "file_name": "processManager2.java", "file_ext": "java", "file_size_in_byte": 1078, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "86b363e6a086857c6ac56d6f55c4c5cb39459bb2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Kubixy/Process-Thread | 196 | FILENAME: processManager2.java | 0.284576 | import java.io.*;
public class processManager2 {
public static void main(String[] args) {
Runtime r = Runtime.getRuntime();
String command = "cmd /c date";
Process p = null;
try {
p = r.exec(command);
// Writing - sending input to date
OutputStream os = p.getOutputStream();
os.write("10-10-13".getBytes());
os.flush();
// Reading - getting output date
InputStream is = p.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader((is)));
String line;
while ((line = br.readLine()) != null) {
System.out.println(line);
}
br.close();
} catch (IOException e) {
e.printStackTrace();
}
int exitVal;
try {
exitVal = p.waitFor();
System.out.println(exitVal);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
|
0834efac-1057-446c-8080-1fdef0e335f1 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-14 15:43:39", "repo_name": "Har5haw/spring-practice", "sub_path": "/src/main/java/com/example/demo/relationShips/entity/Subject.java", "file_name": "Subject.java", "file_ext": "java", "file_size_in_byte": 1010, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "6e9c10deb65fcf439384439ffb1581b7660660e3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Har5haw/spring-practice | 196 | FILENAME: Subject.java | 0.283781 | package com.example.demo.relationShips.entity;
import lombok.*;
import javax.persistence.*;
import java.util.List;
@Getter
@Setter
@Entity
@RequiredArgsConstructor
@NoArgsConstructor
@Table(uniqueConstraints = {@UniqueConstraint(columnNames = "name")})
public class Subject {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long subjectId;
@NonNull private String name;
@ManyToOne(cascade = {
CascadeType.DETACH,
CascadeType.MERGE,
CascadeType.PERSIST,
CascadeType.REFRESH
})
private Teacher teacher;
@ManyToMany(fetch = FetchType.LAZY,cascade = {
CascadeType.DETACH,
CascadeType.MERGE,
CascadeType.PERSIST,
CascadeType.REFRESH
})
@JoinTable(
name = "student_subject",
joinColumns = @JoinColumn(name = "subject_id"),
inverseJoinColumns = @JoinColumn(name = "student_id")
)
private List<Student> students;
}
|
704cb2cb-3d2f-4cc2-a55c-fe7b730cbbba | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "mdx", "committer_date": "2023-04-19T15:51:12", "repo_name": "APJohns/Portfolio", "sub_path": "/src/markdown/epsilon.mdx", "file_name": "epsilon.mdx", "file_ext": "mdx", "file_size_in_byte": 1055, "line_count": 14, "lang": "en", "doc_type": "text", "blob_id": "035a35c3b99310b5073217217f17775ab9ab7834", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/APJohns/Portfolio | 229 | FILENAME: epsilon.mdx | 0.201813 | ---
title: Epsilon
subTitle: UX Frontend Developer
thumbnail: ../images/blueprint-icon.png
image: ../images/blueprint.png
tech: HTML, CSS, Sass, Javascript, Typescript, Angular, Bootstrap, Gulp, npm
siteLink: https://epsilon-blueprint.netlify.app/
codeLink: https://github.com/epsilon-ux/blueprint-ui
date: 2019-05-13
---
The primary project I worked on at Epsilon was an Angular component library called Blueprint. Blueprint was built with UX and Accessibility at the core, meeting Web Content Accessibility Guidelines (WCAG). It improved the consistency and user experience of the Epsilon products, and cut down on development time.
We were a small team consisting of two designers and two developers. My initial task was to figure out how to deliver Blueprint to Epsilon's products. The solution was to create an NPM package built on an Angular library. Once this was complete my focus moved to building out new components, enhancing existing components based on feedback, maintaining documentation, and supporting products with any front end issues. |
4434e2dc-31d0-46bb-a503-6a897ba81b1c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-07-08T19:58:31", "repo_name": "sf-wdi-gaia/questions-in-a-hat", "sub_path": "/week-04.md", "file_name": "week-04.md", "file_ext": "md", "file_size_in_byte": 987, "line_count": 20, "lang": "en", "doc_type": "text", "blob_id": "cbfa51fdf0504c04d35585d43ea8f01253f2f928", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/sf-wdi-gaia/questions-in-a-hat | 230 | FILENAME: week-04.md | 0.253861 | * What is node?
* What describe node's event loop and it's purpose
* Name two global variables in node and describe why they are useful
* What is npm, why is it useful
* In node how could you share code from one JavaScript file to another?
* Compare and contrast an http verb, a path, and a route.
* What is a static asset? What makes an application dynamic?
* What file type is most commonly used to transfer data between a client and a server? What file type is commonly used to view that data?
* What is a `package.json` useful for?
* What is a route?
* What is a controller?
* What is model?
* What is middleware?
* What is a server and why is it useful?
* Why is REST useful?
* Compare and contrast EJS with Handlebars.
* Compare and contrast the `params`, `query` and `body` of a request.
* Compare and contrast mongo with mongoose.
* Compare and contrast a schema with a model.
* Compare and contrast embedded data with referenced data. Give an example of when you would use each. |
1404df3f-e927-4c4c-9fda-21bf7e658454 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-12-27 06:49:11", "repo_name": "JeffRisberg/Example03", "sub_path": "/src/main/java/com/company/common/ContentType.java", "file_name": "ContentType.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "a7db556838c036020a03c7ac6b53a8096afa3fcd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/JeffRisberg/Example03 | 229 | FILENAME: ContentType.java | 0.258326 | package com.company.common;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import java.util.HashMap;
import java.util.Map;
@Getter
@Setter
public class ContentType {
protected String name;
protected String protobufClassName;
protected boolean creatable;
protected boolean modifiable;
@JsonIgnore
protected ContentType parent;
@JsonIgnore
protected Map<String, ContentType> childContentTypes;
public ContentType(String name) {
this.name = name;
this.childContentTypes = new HashMap<String, ContentType>();
}
public boolean hasAncestor(String name) {
ContentType ct = this;
while (ct != null) {
if (ct.getName().equalsIgnoreCase(name)) {
return true;
}
ct = ct.getParent();
}
return false;
}
public Map<String, ContentType> getChildren() {
return childContentTypes;
}
public ContentType getChild(String name) {
return childContentTypes.get(name);
}
public void addChild(ContentType childContentType) {
this.childContentTypes.put(childContentType.getName(), childContentType);
}
}
|
5fbb69a2-01eb-45c9-9ee3-de5e13ba2f55 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-20 02:39:14", "repo_name": "AlexanderCm1/CasoProductoLp1", "sub_path": "/src/main/java/com/example/demo/controller/ProductoController.java", "file_name": "ProductoController.java", "file_ext": "java", "file_size_in_byte": 1200, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "ea5449bedc0216928a8b5859465fcf8be7aad95c", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/AlexanderCm1/CasoProductoLp1 | 224 | FILENAME: ProductoController.java | 0.258326 | package com.example.demo.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.example.demo.entity.Producto;
import com.example.demo.service.ProductoService;
@RestController
public class ProductoController {
@Autowired
private ProductoService productoService;
@GetMapping("/")
public List<Producto> jaja() {
return productoService.readAll();
}
@GetMapping("/producto/{id}")
public Producto read(@PathVariable int id) {
return productoService.read(id);
}
@GetMapping("/producto")
public int create(@RequestBody Producto pro) {
return productoService.create(pro);
}
@GetMapping("/delete/{id}")
public int del(@PathVariable int id){
return productoService.delete(id);
}
@PutMapping("/usuario/{id}")
public int edit(@RequestBody Producto pro, @PathVariable int id) {
return productoService.edit(pro);
}
}
|
330fa6df-14a3-46ff-8bef-c9fbaca6e136 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-03-28 06:22:19", "repo_name": "cynricshu/java-template", "sub_path": "/common-service/src/main/java/com/cynricshu/service/FfmpegService.java", "file_name": "FfmpegService.java", "file_ext": "java", "file_size_in_byte": 926, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "cdcd2923a806c63e6c73504b01d7d40fbb671ba4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/cynricshu/java-template | 200 | FILENAME: FfmpegService.java | 0.240775 | // Copyright (C) 2018 Baidu Inc. All rights reserved.
package com.cynricshu.service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
/**
* FfmpegService
*
*/
@Slf4j
@Service
public class FfmpegService {
@Value("${ffmpeg.command:ffmpeg}")
private String ffmpegCommand;
public void doFfmpeg(String sourceFile, String targetFile) {
try {
Process process = Runtime.getRuntime().exec(new String[] {
ffmpegCommand,
"-i",
sourceFile,
"-acodec",
"pcm_s16le",
"-ar",
"16000",
"-ac",
"1",
targetFile
});
process.waitFor();
} catch (Exception e) {
log.error("failed to execute ffmpeg command", e);
}
}
}
|
a47d6e9e-e111-48cb-a6b1-41018f323c67 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-04-19T18:50:02", "repo_name": "kferbs/Samazon", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 983, "line_count": 36, "lang": "en", "doc_type": "text", "blob_id": "af9ad3ce28bc5032555acf7ddbab57bef3ce6631", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/kferbs/Samazon | 297 | FILENAME: README.md | 0.210766 | # Non-Profit Website
Web application to showcase a non-profit organization.
## Preview

=======
## Getting Started
Run in IDE and open a web browser to your default localhost port (generally this is localhost:8080)
## Built With
* [Java 8](https://www.java.com/en/) - Backend Language
* [IntelliJ](https://www.jetbrains.com/idea/) - IDE used
* [Maven](http://maven.apache.org/) - Dependency Management
* [Thymeleaf](http://www.thymeleaf.org/) - Template Engine
* [BootStrap4](https://getbootstrap.com/docs/4.0) - Website Creation
## Contributors
* **Kristyn** - [kferbs](https://github.com/kferbs)
* **Max** - [maxkorzan](https://github.com/maxkorzan)
* **James** - [Jhwang37](https://github.com/Jhwang37)
## Acknowledgments
* Montgomery College Java Web Development Boot Camp teachers and TAs.
* Our classmates who pushed us to excel. |
a2174a50-58f3-4033-a333-bc19088aa6dd | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-10-23 02:49:35", "repo_name": "DiegogcFD/Android-Projects", "sub_path": "/NoteApp/app/src/main/java/com/diego/noteapp/NoteActivity.java", "file_name": "NoteActivity.java", "file_ext": "java", "file_size_in_byte": 1233, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "208d164701099d4706093a5830a9f7fd22177fe2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/DiegogcFD/Android-Projects | 212 | FILENAME: NoteActivity.java | 0.247987 | package com.diego.noteapp;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
public class NoteActivity extends AppCompatActivity {
EditText editText;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_note);
editText = findViewById(R.id.editText);
Intent intent = getIntent();
final int noteId = intent.getIntExtra("noteId", -1);
if(noteId == -1) {
editText.setText(MainActivity.notes.get(noteId));
}
editText.addTextChangedListener(new TextWatcher() {
public void afterTextChanged(Editable text) {
}
public void beforeTextChanged(CharSequence text, int start, int count, int after) {
}
public void onTextChanged(CharSequence text, int start, int before, int count) {
MainActivity.notes.set(noteId, String.valueOf(text));
MainActivity.arrayAdapter.notifyDataSetChanged();
}
});
}
}
|
9e891e18-b491-4d56-a5fd-e6bb53b15eb4 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-18 15:29:20", "repo_name": "green-fox-academy/adamkocso-todo-app", "sub_path": "/ToDo/src/ToDo.java", "file_name": "ToDo.java", "file_ext": "java", "file_size_in_byte": 1080, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "ec199fcf9132fb74544e27e575f2124b928f33b9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/green-fox-academy/adamkocso-todo-app | 234 | FILENAME: ToDo.java | 0.271252 | public class ToDo {
public static TaskList list = new TaskList();
public static PrintUsage print = new PrintUsage();
public static void main(String[] args) {
if(args.length == 0) {
print.printUsage();
} else if(args[0].equals("-l")){
list.listTask();
} else if(args[0].equals("-a")){
if(args.length == 2) {
list.addNewTask(args[1]);
} else {
System.out.println("Unable to add: no task provided");
}
} else if (args[0].equals("-r")){
if(args.length ==2) {
list.removeTask(args[1]);
} else {
System.out.println("Unable to remove: no index provided");
}
} else if (args[0].equals("-c")) {
if (args.length == 2) {
list.chechkTask(args[1]);
} else {
System.out.println("Unable to check: no index provided");
}
} else {
System.out.println("Unsupported argument");
}
}
}
|
33945a8e-2891-4a02-bf9e-ee6177e61c7a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2023-04-16 12:17:01", "repo_name": "zhangxuhui1992/Java", "sub_path": "/src/new2023/juc/ReentantLockCondationTest.java", "file_name": "ReentantLockCondationTest.java", "file_ext": "java", "file_size_in_byte": 1149, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "13cb1e2b85fda2cf8eecdf814ac63d80e9763883", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/zhangxuhui1992/Java | 242 | FILENAME: ReentantLockCondationTest.java | 0.268941 | package new2023.juc;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
/**
* @Author zhangxuhui
* @Date 2023/4/7
* @email zxh_1633@163.com
*/
public class ReentantLockCondationTest {
static ReentrantLock lock = new ReentrantLock();
static Condition room = lock.newCondition();
public static void main(String[] args) {
Thread t1 = new Thread(() -> {
lock.lock();
try {
System.out.println("go into room");
try {
room.await();
System.out.println("run..");
} catch (InterruptedException e) {
e.printStackTrace();
}
}finally {
lock.unlock();
}
}, "t1");
t1.start();
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
lock.lock();
try {
System.out.println("唤醒。。。");
room.signal();
}finally {
lock.unlock();
}
}
}
|
3e0f9aa0-4e36-4f86-b78e-55134b085067 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-11 04:07:24", "repo_name": "guo156627977/Hadoop", "sub_path": "/StormDemo/src/main/java/com/gzq/storm/calllog/LogAnalyserStorm.java", "file_name": "LogAnalyserStorm.java", "file_ext": "java", "file_size_in_byte": 1214, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "b4ae92a7685718782dab29c86a6f74c2071c40fe", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/guo156627977/Hadoop | 287 | FILENAME: LogAnalyserStorm.java | 0.289372 | package com.gzq.storm.calllog;
import org.apache.storm.Config;
import org.apache.storm.StormSubmitter;
import org.apache.storm.topology.TopologyBuilder;
import org.apache.storm.tuple.Fields;
/**
* ${DESCRIPTION}
*
* @author guozhiqiang
* @created 2017-12-18 16:19.
*/
public class LogAnalyserStorm {
public static void main(String[] args) throws Exception {
TopologyBuilder builder = new TopologyBuilder();
builder.setSpout("call-log-reader-spout", new CallLogSpout());
builder.setBolt("call-log-creator-bolt", new CallLogCreatorBolt())
.shuffleGrouping("call-log-reader-spout");
builder.setBolt("call-log-counter-bolt", new CallLogCounterBolt())
.fieldsGrouping("call-log-creator-bolt", new Fields("call"));
Config config = new Config();
config.setDebug(true);
////本地模式
//LocalCluster cluster = new LocalCluster();
//cluster.submitTopology("LogAnalyserStorm", config, builder.createTopology());
//Thread.sleep(10000);
//cluster.shutdown();
//集群模式
StormSubmitter.submitTopology("LogAnalyserStorm", config, builder.createTopology());
}
}
|
233e8eb9-0451-40b4-93fb-11b1b9d99eea | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-20 02:03:22", "repo_name": "lucasromagnoli/cashcontrol-api", "sub_path": "/src/main/java/br/com/lucasromagnoli/cashcontrol/dominio/entidade/Origem.java", "file_name": "Origem.java", "file_ext": "java", "file_size_in_byte": 984, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "e52418e95b9b428060a6a13f6823d7ac09afbee2", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/lucasromagnoli/cashcontrol-api | 227 | FILENAME: Origem.java | 0.205615 | package br.com.lucasromagnoli.cashcontrol.dominio.entidade;
import br.com.lucasromagnoli.cashcontrol.dominio.persistencia.common.TransferObject;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
/**
* @author github.com/lucasromagnoli
* @since 05/2021
*/
@Entity
public class Origem extends TransferObject<Long> {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Column(nullable = false)
private String nome;
public Origem() {
}
public Origem(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
@Override
public Long getKey() {
return id;
}
}
|
e4fdb0b9-4ea7-4655-8d1a-61e57c29c268 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-23 19:19:34", "repo_name": "Nitin1130/Nitin", "sub_path": "/HibernateExample/src/main/java/org/Nitin/App.java", "file_name": "App.java", "file_ext": "java", "file_size_in_byte": 1043, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "faced8da24562c8bb0dd305459af867db040365a", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Nitin1130/Nitin | 177 | FILENAME: App.java | 0.272025 | package org.Nitin;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
/**
* Hello world!
*
*/
public class App
{
public static void main( String[] args )
{
Alien telusko = new Alien();
Configuration con = new Configuration().configure("hibernate.cfg.xml").addAnnotatedClass(Alien.class);
ServiceRegistry reg = new StandardServiceRegistryBuilder().applySettings(con.getProperties()).build();
SessionFactory sf = con.buildSessionFactory(reg);
Session session = sf.openSession();
Transaction tx = session.beginTransaction();
telusko = (Alien)session.get(Alien.class,101);
System.out.println(telusko);
}
}
|
ace34558-e893-4c83-b527-a6bd18b284e9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-12-14 23:21:59", "repo_name": "osamaasim/APITask", "sub_path": "/app/src/main/java/com/example/osama/apitask/Activities/DetailActivity.java", "file_name": "DetailActivity.java", "file_ext": "java", "file_size_in_byte": 1198, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "062070b33029e55ff84c969c97ac66e783681b4d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/osamaasim/APITask | 208 | FILENAME: DetailActivity.java | 0.216012 | package com.example.osama.apitask.Activities;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MenuItem;
import com.example.osama.apitask.model.News;
import com.example.osama.apitask.R;
import com.example.osama.apitask.databinding.ActivityDetailBinding;
public class DetailActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getSupportActionBar() != null) {
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
}
News news = (News) getIntent().getSerializableExtra("SELECTED_NEWS");
ActivityDetailBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_detail);
binding.setNews(news);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
}
|
f387795b-db4f-4bbc-b929-856e91d82a85 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2018-03-07T18:25:51", "repo_name": "dragospaulpop/attendances", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 987, "line_count": 31, "lang": "en", "doc_type": "text", "blob_id": "a28794d8261256c77479b2a5ad71171ceec2bb4d", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/dragospaulpop/attendances | 263 | FILENAME: README.md | 0.264358 | # prezente
> A Vue.js project
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For detailed explanation on how things work, checkout the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
Steps to clone and work with the repo:
1. (once) Clone the repo: git clone https://github.com/dragospaulpop/attendances.git
2. (everytime) Switch to your branch: git branch nacisa SAU git branch madalina
3. git pull origin narcisa SI/SAU git pull orign madaina SI/SAU git pull origin master
4. make your code changes
5. (everytime) Add your changes: git add --all
6. (everytime) Commit your changes: git commit -m "appropriate message here"
7. (everytime) Push changes: git push origin master SI/SAU madalina SI/SAU narcisa |
f8a39754-db73-4dca-a95d-096a4a0c3203 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-22 12:59:54", "repo_name": "stanislaw-tokarski/github-discovery", "sub_path": "/github-discovery-service/src/main/java/com/github/stanislawtokarski/githubdiscovery/model/RepositoryDetails.java", "file_name": "RepositoryDetails.java", "file_ext": "java", "file_size_in_byte": 990, "line_count": 28, "lang": "en", "doc_type": "code", "blob_id": "733db17b7b9b62b933c864f0f4b635f3edc7d4fb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/stanislaw-tokarski/github-discovery | 167 | FILENAME: RepositoryDetails.java | 0.206894 | package com.github.stanislawtokarski.githubdiscovery.model;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
@Getter
@JsonIgnoreProperties(ignoreUnknown = true)
public class RepositoryDetails {
private String fullName;
private String description;
private String cloneUrl;
private String stars;
private String createdAt;
public RepositoryDetails(@JsonProperty("full_name") String fullName,
@JsonProperty("description") String description,
@JsonProperty("clone_url") String cloneUrl,
@JsonProperty("stargazers_count") String stars,
@JsonProperty("created_at") String createdAt) {
this.fullName = fullName;
this.description = description;
this.cloneUrl = cloneUrl;
this.stars = stars;
this.createdAt = createdAt;
}
}
|
645a624e-1624-46a1-89a2-93f1858ccb88 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-18 08:11:09", "repo_name": "jongyeon95/eatgo", "sub_path": "/eatgo-reataurant-api/src/test/java/kr/co/fastcampus/eatgo/application/ReservationServiceTest.java", "file_name": "ReservationServiceTest.java", "file_ext": "java", "file_size_in_byte": 1084, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "dc5210e721af7ab9c625b26f1584d73c6b1e5f06", "star_events_count": 3, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/jongyeon95/eatgo | 213 | FILENAME: ReservationServiceTest.java | 0.295027 | package kr.co.fastcampus.eatgo.application;
import kr.co.fastcampus.eatgo.domain.Reservation;
import kr.co.fastcampus.eatgo.domain.ReservationRepository;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import java.util.List;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.verify;
public class ReservationServiceTest {
private ReservationService reservationService;
@Mock
private ReservationRepository reservationRepository;
@Before
public void setUp(){
MockitoAnnotations.initMocks(this);
reservationService = new ReservationService(reservationRepository);
}
@Test
public void getReservations(){
Long restaurantId=1004L;
List<Reservation> reservations=reservationService.getReservations(restaurantId);
verify(reservationRepository).findAllByRestaurantId(restaurantId);
}
} |
c6d20434-ac89-4068-aa16-60bb59955349 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-10-24 20:52:19", "repo_name": "EddyMakboul/GestionnaireEquipe", "sub_path": "/springboot-rest-api-sample/src/main/java/gestionnaire/service/TacheService.java", "file_name": "TacheService.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 42, "lang": "en", "doc_type": "code", "blob_id": "e50e201040104ed64810b352c73752039c07af5b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/EddyMakboul/GestionnaireEquipe | 220 | FILENAME: TacheService.java | 0.274351 | package gestionnaire.service;
import gestionnaire.model.Tache;
import gestionnaire.repository.TacheRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
/**
* Service correspondant aux taches
*/
@Service
public class TacheService {
@Autowired
TacheRepository tacheRepository;
public void deleteTacheById(Long id){
Optional<Tache> potentialTache = tacheRepository.findById(id);
if (potentialTache.isPresent()){
Tache tache = potentialTache.get();
tache.setEmploye(null);
tache.setProjet(null);
tacheRepository.save(tache);
tacheRepository.deleteById(id);
}
}
public void deleteAllTask(){
List<Tache> taches = tacheRepository.findAll();
for (Tache tache: taches){
tache.setEmploye(null);
tache.setProjet(null);
tacheRepository.save(tache);
}
tacheRepository.deleteAll();
}
}
|
039a5179-7254-4fc8-b94f-26644a462a4d | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-08-10 12:43:39", "repo_name": "janardhansivakula/NewTours", "sub_path": "/WebAppWithJava/src/com/Mercur/login/NewTours_LoginTest.java", "file_name": "NewTours_LoginTest.java", "file_ext": "java", "file_size_in_byte": 986, "line_count": 46, "lang": "en", "doc_type": "code", "blob_id": "3991d6959c7c55667b8d35e4dc38ae9315696350", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/janardhansivakula/NewTours | 199 | FILENAME: NewTours_LoginTest.java | 0.23231 | package com.Mercur.login;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class NewTours_LoginTest {
public static void main(String[] args) {
WebDriver driver = null;
String url12 ="http://newtours.demoaut.com/";
//System.setProperty("webdriver.chrome.driver", "./DriverFiles/chromedriver.exe");
//driver= new ChromeDriver();
//driver.get(url12);
System.setProperty("webdriver.gecko.driver", "./DriverFiles/geckodriver.exe");
driver=new FirefoxDriver();
driver.get(url12);
driver.findElement(By.name("userName")).sendKeys("tutorial");;
driver.findElement(By.name("password")).sendKeys("tutorial");
driver.findElement(By.name("login")).click();
//driver.close();
}
}
|
4280cf07-a509-40b0-ab8c-faef20e39afd | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-03-07 10:22:30", "repo_name": "wiootk/springCloudDemo", "sub_path": "/demo_jpa/src/main/java/com/jun/biz/copier/UserCopier.java", "file_name": "UserCopier.java", "file_ext": "java", "file_size_in_byte": 1005, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "d1f21a5ba6dc46a70767a58cb3405ea25e126f62", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/wiootk/springCloudDemo | 233 | FILENAME: UserCopier.java | 0.27048 | package com.jun.biz.copier;
import com.jun.biz.utils.DataCopier;
import com.jun.data.entity.UserEntity;
import com.jun.design.pojo.UserInfo;
import org.springframework.beans.BeanUtils;
import javax.inject.Named;
/**
* Created by Administrator on 2018-1-6.
*/
@Named
public class UserCopier implements DataCopier<UserInfo, UserEntity> {
@Override
public UserInfo newViewObject() {
UserInfo info=new UserInfo();
return info;
}
@Override
public UserEntity newEntity() {
UserEntity entity=new UserEntity();
return entity;
}
@Override
public void copyToEntityForInsert(UserInfo vo, UserEntity entity) {
BeanUtils.copyProperties(vo,entity,"id");
}
@Override
public void copyToEntityForUpdate(UserInfo vo, UserEntity entity) {
BeanUtils.copyProperties(vo,entity,"id");
}
@Override
public void copyToViewObject(UserEntity entity, UserInfo vo) {
BeanUtils.copyProperties(entity,vo);
}
}
|
35cd9a8b-2f00-4cf1-b553-f20c5fb1d49b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-31 23:38:36", "repo_name": "thaalesalves/ibm-movietitles", "sub_path": "/src/main/java/es/thalesalv/ibmtest/controller/MovieController.java", "file_name": "MovieController.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "740335af65af1fff695f090f06f86a6fdab99e59", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/thaalesalves/ibm-movietitles | 230 | FILENAME: MovieController.java | 0.286169 | package es.thalesalv.ibmtest.controller;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import es.thalesalv.ibmtest.data.MovieDAO;
@RestController
@RequestMapping(value = "api/movie")
public class MovieController {
private final static Logger LOGGER = Logger.getLogger(MovieController.class);
@RequestMapping(method = RequestMethod.GET, value = "/title")
public List<String> addAuthor(@RequestParam(value = "title") String title) throws Exception {
try {
MovieDAO dao = new MovieDAO();
List<String> movies = dao.listFromUrl(title).stream().map(x -> x.getTitle()).collect(Collectors.toList());
Collections.sort(movies);
LOGGER.info("Printing " + movies.size() + " movies");
return movies;
} catch (Exception e) {
LOGGER.error("Wow! Something went wrong!", e);
throw e;
}
}
}
|
5f7a35b1-ca3c-423d-8524-92bf73358604 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-04-13 11:06:20", "repo_name": "ZuoCoder/zuols", "sub_path": "/Lockscreen/src/main/java/com/rcplatform/rclockscreen/utils/MyDateUtils.java", "file_name": "MyDateUtils.java", "file_ext": "java", "file_size_in_byte": 1264, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "8e0daa70c9da802c8a77bb88f4cf50b97fe931f4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/ZuoCoder/zuols | 263 | FILENAME: MyDateUtils.java | 0.268941 | package com.rcplatform.rclockscreen.utils;
import android.annotation.SuppressLint;
import android.text.TextUtils;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
/**
* Created by zuo on 2016/4/1.
*/
@SuppressLint("SimpleDateFormat")
public class MyDateUtils {
/**
* 转换后的日期
*/
public static String getChangeDateFormat(Date date){
String str = null;
if(date != null && !"".equals(date)){
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
str = format.format(date);
}
return str;
}
/**
*转换后的时间
*/
public static String getChangeTimeFormat(Date date){
String str = null;
if(date != null && !"".equals(date)){
SimpleDateFormat format = new SimpleDateFormat("HH:mm");
str = format.format(date);
}
return str;
}
public static String getChangeWeekFormat(Date date){
String[] weeks = {"星期日","星期一","星期二","星期三","星期四","星期五","星期六"};
Calendar c = Calendar.getInstance();
c.setTime(date);
int week = c.get(Calendar.DAY_OF_WEEK);
return weeks[week];
}
}
|
bacf48df-b999-438b-b163-9bb6b3ed01b8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-03-15 02:35:01", "repo_name": "teimatinimarin/red-wine", "sub_path": "/redwine.strategy.rollercoaster/src/main/java/com/beuwa/redwine/strategy/rollercoaster/observers/TradeObserver.java", "file_name": "TradeObserver.java", "file_ext": "java", "file_size_in_byte": 1047, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "d0b669e2a3a7c21a1bfb95af59c305f386ee6499", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/teimatinimarin/red-wine | 225 | FILENAME: TradeObserver.java | 0.288569 | package com.beuwa.redwine.strategy.rollercoaster.observers;
import com.beuwa.redwine.core.events.business.TradeEvent;
import com.beuwa.redwine.core.model.ModelFactory;
import com.beuwa.redwine.core.model.Trades;
import com.beuwa.redwine.core.services.OrderbookService;
import org.apache.logging.log4j.Logger;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
import java.time.Instant;
public class TradeObserver {
@Inject
Logger logger;
@Inject
private ModelFactory modelFactory;
@Inject
private OrderbookService orderbookService;
public void observe(@Observes TradeEvent event) {
long init = Instant.now().toEpochMilli();
Trades trades = modelFactory.buildTrade(event.getMessage());
long finished = Instant.now().toEpochMilli();
if(orderbookService.isInited()) {
orderbookService.print(60);
}
logger.debug(
"TradeEvent ({}): {}",
finished-init,
trades.getAction()
);
}
}
|
7604a3e3-bf94-4df0-b89f-9a6d9c36b02f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-24 13:11:53", "repo_name": "glserra/gestioneFattura", "sub_path": "/GestioneFatture/src/it/exp75/gestionefatture/business/DBConnection.java", "file_name": "DBConnection.java", "file_ext": "java", "file_size_in_byte": 1113, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "c745de7817d8aada17d22b3eb2a6e88d45aac059", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/glserra/gestioneFattura | 208 | FILENAME: DBConnection.java | 0.252384 | package it.exp75.gestionefatture.business;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
public class DBConnection {
private static Config configuration;
public static Connection getConnection() throws SQLException{
Connection con = null;
setConfiguration(Config.getIstance());
getConfiguration().loadConfig();
if(con == null) {
MysqlDataSource dataSource = new MysqlDataSource();
dataSource.setServerName(getConfiguration().getDbHost());
dataSource.setPortNumber(new Integer(getConfiguration().getDbPort()).intValue());
dataSource.setUser(getConfiguration().getDbUser());
dataSource.setPassword(getConfiguration().getDbPassword());
dataSource.setDatabaseName(getConfiguration().getDbName());
con = dataSource.getConnection();
}
return con;
}
public static Config getConfiguration() {
return configuration;
}
public static void setConfiguration(Config config) {
configuration = config;
}
}
|
e8d48ce8-a723-4143-8e2f-29adf5121f0f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-08-31T20:48:28", "repo_name": "MrPointcut95/ArduinoSimBox", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1117, "line_count": 35, "lang": "en", "doc_type": "text", "blob_id": "fd7b8bc00211c0b60ca4161f30986ea7089f4a47", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/MrPointcut95/ArduinoSimBox | 348 | FILENAME: README.md | 0.245085 | # ArduinoSimBox
This project is about a button box with sequential shifter and handbrake, connected to an Arduino Pro Micro ATmega32u4 board.
It is specially designed for use in simracing (tested on Assetto Corsa and iRacing).

## Hardware
- Arduino Pro Micro ATmega32u4
- 2 x limit switches (for shifter).
- 1 x 5k slide potentiometer (for handbrake)
- 4 x push buttons.
- 3 x 3-way toggle switches.
- 4 x Rotary encoders.
- 1 x Joystick XY
## Dependencies
- Arduino Joystick Library [Link](https://github.com/MHeironimus/ArduinoJoystickLibrary)
- Keypad Library for Arduino [Link](https://playground.arduino.cc/Code/Keypad/)
## Wiring Diagram

## 3D models
- Button box [Link](https://www.thingiverse.com/thing:4584873)
- Adapted from Shifter [Link](https://www.thingiverse.com/thing:2924658)
- Handbrake [Link](https://www.tinkercad.com/things/k4PGvxEYYVc) (Based on [Link](https://www.tinkercad.com/things/e0aZ4ehOGfT-handbrake-for-gaming) )
|
fea38fce-bda0-47d9-8563-aa3aaf571ef5 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-01-31 22:54:24", "repo_name": "rubaiyat6370/Data-structuresAndAlgorithms", "sub_path": "/DataStructureAndAlgorithm/src/algorithms/binaryTree/BinarySearchTree.java", "file_name": "BinarySearchTree.java", "file_ext": "java", "file_size_in_byte": 986, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "61408ffd5d0a37c2697152aa2fe5d9cd2a5946bc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/rubaiyat6370/Data-structuresAndAlgorithms | 245 | FILENAME: BinarySearchTree.java | 0.288569 | package algorithms.binaryTree;
public class BinarySearchTree {
TreeNode root = null;
public void insertNode(int data) {
if(root == null) {
root = new TreeNode(data);
} else {
TreeNode current = root;
while(current!=null) {
if(data >= current.getData()) {
if(current.getRightNode()!= null) {
current = current.getRightNode();
} else {
current.setRightNode(new TreeNode(data));
break;
}
} else {
if(current.getLeftNode()!=null) {
current = current.getLeftNode();
} else {
current.setLeftNode(new TreeNode(data));
break;
}
}
}
}
}
public boolean searchNode(int data) {
TreeNode current = root;
while(current!=null) {
if(data > current.getData()) {
current = current.getRightNode();
} else if(data < current.getData()) {
current = current.getLeftNode();
} else if(data == current.getData()) {
return true;
}
}
return false;
}
}
|
d6e542ec-6d13-48ea-b767-740362492136 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-20 22:05:46", "repo_name": "BenakTomas/Crime", "sub_path": "/app/client/src/benak/tomas/crimemonitor/client/dataloading/handler/CrimeServiceQueryContext.java", "file_name": "CrimeServiceQueryContext.java", "file_ext": "java", "file_size_in_byte": 1056, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "68f1fb0a942230b23379a777b18be96edd4895da", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/BenakTomas/Crime | 213 | FILENAME: CrimeServiceQueryContext.java | 0.252384 | package benak.tomas.crimemonitor.client.dataloading.handler;
import java.util.Properties;
import benak.tomas.crimemonitor.client.utils.FieldNames;
import benak.tomas.crimemonitor.library.exception.QueryConfigInternalErrorException;
import benak.tomas.crimemonitor.library.query.config.QueryConfigBase;
import benak.tomas.crimemonitor.library.service.CrimeMonitorServiceProvider;
public class CrimeServiceQueryContext extends QueryConfigBase
{
protected String mServiceUrl;
protected String mTargetNamespace;
public CrimeServiceQueryContext(Properties configuration)
throws QueryConfigInternalErrorException
{
super(configuration);
}
@Override
protected void loadConfiguration(Properties configuration)
throws QueryConfigInternalErrorException
{
mServiceUrl = configuration.getProperty(FieldNames.SERVICE_URL);
mTargetNamespace = configuration.getProperty(FieldNames.SERVICE_TARGET_NAMESPACE);
}
public String getServiceUrl()
{
return mServiceUrl;
}
public String getTargetNamespace()
{
return mTargetNamespace;
}
}
|
0ca3066e-a7dc-44d7-99c3-0d6e1e9bd1ff | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-04-29 12:52:29", "repo_name": "PavelKastrykin/TextParserFix", "sub_path": "/src/com/pavel/textparser/model/complicated/Sentence.java", "file_name": "Sentence.java", "file_ext": "java", "file_size_in_byte": 1065, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "1a70f8abe2e45f7dc61f2dbadb2b8882b365ee50", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/PavelKastrykin/TextParserFix | 225 | FILENAME: Sentence.java | 0.29584 | package com.pavel.textparser.model.complicated;
import com.pavel.textparser.model.ParseableText;
import com.pavel.textparser.splitter.SentenceSplitter;
import java.util.List;
/**
* Class Sentence contains text parts such as WordComplicated arranged to an ArrayList. Given Sentence is divided
* by rules and by means of described in SentenceSplitter class.
*/
public class Sentence implements ParseableText {
private List<ParseableText> arrayOfSubs;
private SentenceSplitter sentenceSplitter = new SentenceSplitter();
public List<ParseableText> getArrayOfSubs() {
return arrayOfSubs;
}
public Sentence (String value){
this.arrayOfSubs = sentenceSplitter.splitText(value);
}
/**
* @return returns String representation of Sentence by merging its parts: WordComplicated as String
*/
@Override
public String merge(){
StringBuilder sb = new StringBuilder();
for (ParseableText x : this.arrayOfSubs){
sb.append(x.merge());
}
return sb.toString();
}
}
|
00b42b6d-0e7e-4ade-9739-f835717e7e3a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-01-31 11:23:26", "repo_name": "CoffeeInka/MyDSL", "sub_path": "/src/main/java/core/entities/element/LazyCollectionFoundByConditionElement.java", "file_name": "LazyCollectionFoundByConditionElement.java", "file_ext": "java", "file_size_in_byte": 1090, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "0302475d577260cd137f13dc7d2b9f24140e96f3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/CoffeeInka/MyDSL | 187 | FILENAME: LazyCollectionFoundByConditionElement.java | 0.29584 | package core.entities.element;
import core.conditions.Condition;
import core.entities.LazyCollection;
import core.exceptions.ElementNotFoundException;
import org.openqa.selenium.WebElement;
import java.util.List;
public class LazyCollectionFoundByConditionElement extends AbstractLazyElement {
private LazyCollection parentCollection;
private Condition<WebElement> condition;
public LazyCollectionFoundByConditionElement(LazyCollection parentCollection, Condition<WebElement> condition) {
this.parentCollection = parentCollection;
this.condition = condition;
}
@Override
public String toString() {
return parentCollection.toString() + " find(" + condition.getClass().getSimpleName() + ")";
}
@Override
public WebElement fetchWrappedEntity() {
List<WebElement> list = parentCollection.getWrappedEntity();
for (WebElement element : list) {
if (condition.check(element)) {
return element;
}
}
throw new ElementNotFoundException(toString());
}
}
|
d13e3b7a-30d0-462c-b5f3-ab6f7a42bff2 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-06 10:16:08", "repo_name": "devrath123/C2NRetailer", "sub_path": "/app/src/main/java/com/example/c2n/addproduct/domain/AddProductToMasterProductsUseCase.java", "file_name": "AddProductToMasterProductsUseCase.java", "file_ext": "java", "file_size_in_byte": 970, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "e30659fbb6f6224ab69b6b63ff325861e51829f4", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/devrath123/C2NRetailer | 196 | FILENAME: AddProductToMasterProductsUseCase.java | 0.279828 | package com.example.c2n.addproduct.domain;
import android.content.Context;
import com.example.c2n.addproduct.data.AddProductRepository;
import com.example.c2n.core.models.MasterProductDataModel;
import com.example.c2n.core.usecase.UseCase;
import com.example.c2n.core.usecase.UseCaseComposer;
import javax.inject.Inject;
import io.reactivex.Observable;
public class AddProductToMasterProductsUseCase extends UseCase<MasterProductDataModel, String> {
private AddProductRepository addProductRepository;
@Inject
protected AddProductToMasterProductsUseCase(UseCaseComposer useCaseComposer, AddProductRepository addProductRepository) {
super(useCaseComposer);
this.addProductRepository = addProductRepository;
}
@Override
protected Observable<String> createUseCaseObservable(MasterProductDataModel masterProductDataModel, Context context) {
return addProductRepository.addProductMaster(masterProductDataModel);
}
}
|
43f46eb7-ab5d-4745-898d-29be462db9ab | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-06 04:58:42", "repo_name": "shike-me/CustomRunDe", "sub_path": "/RunDe-Android/RunDe-Android/video-module/src/main/java/com/bokecc/video/widget/RadioView.java", "file_name": "RadioView.java", "file_ext": "java", "file_size_in_byte": 1140, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "4d1bd9e494fbf47b34302972334a33566017f612", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/shike-me/CustomRunDe | 195 | FILENAME: RadioView.java | 0.23793 | package com.bokecc.video.widget;
import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.bokecc.video.R;
public class RadioView extends LinearLayout {
private ImageView imageView;
private boolean select = false;
public RadioView(Context context) {
this(context,null);
}
public RadioView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init(context);
}
private void init(Context ctx){
LayoutInflater.from(ctx).inflate(R.layout.item_radio_view,this,true);
imageView = findViewById(R.id.id_radio_image);
}
public void select(boolean select){
this.select = select;
if(select){
imageView.setImageResource(R.drawable.live_radio_on);
}else{
imageView.setImageResource(R.drawable.live_radio_normal);
}
}
public boolean isSelect(){
return select;
}
}
|
c7e1144c-c6a3-4e15-8779-27b6f2218aef | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-24 14:12:43", "repo_name": "lyltsh/springBootChapter1", "sub_path": "/src/main/java/com/springboot/javaee/chapter2/taskexecutor/TaskExecutorConfig.java", "file_name": "TaskExecutorConfig.java", "file_ext": "java", "file_size_in_byte": 1214, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "dd9ea08fa5cee81cf897478e80727de14b69f5f5", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/lyltsh/springBootChapter1 | 230 | FILENAME: TaskExecutorConfig.java | 0.246533 | package com.springboot.javaee.chapter2.taskexecutor;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.AsyncConfigurer;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component;
import java.util.concurrent.Executor;
import java.util.concurrent.ThreadPoolExecutor;
/**
* @Description:
* @Author: leiyulin
* @date: 2018/8/23
*/
@Component
@ComponentScan("com.springboot.javaee.chapter2.taskexecutor")
@EnableAsync //开启异步任务支持
public class TaskExecutorConfig implements AsyncConfigurer{
@Override
public Executor getAsyncExecutor() {
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
taskExecutor.setCorePoolSize(5);
taskExecutor.setMaxPoolSize(10);
taskExecutor.setQueueCapacity(25);
taskExecutor.initialize();
return taskExecutor;
}
@Override
public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() {
return null;
}
}
|
f1caf7d9-38f8-45d6-8428-01e336ccf19f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-01-27 16:09:27", "repo_name": "nevihta/Filmi", "sub_path": "/app/src/main/java/com/rvir/filmi/filmi/filmi/FilmiPageAdapter.java", "file_name": "FilmiPageAdapter.java", "file_ext": "java", "file_size_in_byte": 1007, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "347a985ca1a70028cb3f90f220b90baa28ee8833", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/nevihta/Filmi | 208 | FILENAME: FilmiPageAdapter.java | 0.256832 | package com.rvir.filmi.filmi.filmi;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
public class FilmiPageAdapter extends FragmentStatePagerAdapter {
int mNumOfTabs;
public FilmiPageAdapter(FragmentManager fm, int NumOfTabs) {
super(fm);
this.mNumOfTabs = NumOfTabs;
}
@Override
public Fragment getItem(int position) {
switch (position) {
case 0:
FragmentPopularni tab1 = new FragmentPopularni();
return tab1;
case 1:
FragmentKategorije tab2 = new FragmentKategorije();
return tab2;
case 2:
FragmentIskanje tab3 = new FragmentIskanje();
return tab3;
default:
return null;
}
}
@Override
public int getCount() {
return mNumOfTabs;
}
}
|
76738c0a-d3e9-4487-95fe-28c07d7af664 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-10-15 09:09:31", "repo_name": "sandeeprana011/MapChallenge", "sub_path": "/app/src/main/java/com/rana/mapchallenge/database/Favorite.java", "file_name": "Favorite.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "c831dbb7fef68d501dad38f19982151fe28edc1b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/sandeeprana011/MapChallenge | 229 | FILENAME: Favorite.java | 0.239349 | package com.rana.mapchallenge.database;
import com.orm.SugarRecord;
/**
* Created by sandeeprana on 15/10/16.
* License is only applicable to individuals and non-profits
* and that any for-profit company must
* purchase a different license, and create
* a second commercial license of your
* choosing for companies
*/
public class Favorite extends SugarRecord {
private double latitude;
private double longitude;
private String address;
public Favorite(double latitude, double longitude, String address) {
this.latitude = latitude;
this.longitude = longitude;
this.address = address;
}
public Favorite() {
}
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
}
|
a72f100b-3d19-4448-8d80-21ba4449b85d | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-23 17:24:28", "repo_name": "makkoli98/2340Project", "sub_path": "/app/src/main/java/com/example/spacetraders/data/models/ShipInteractor.java", "file_name": "ShipInteractor.java", "file_ext": "java", "file_size_in_byte": 1005, "line_count": 29, "lang": "en", "doc_type": "code", "blob_id": "cfa1319d109b2c68d355377d06c97b36f62927a7", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/makkoli98/2340Project | 217 | FILENAME: ShipInteractor.java | 0.280616 | package com.example.spacetraders.data.models;
import com.example.spacetraders.data.entity.Spaceship;
public class ShipInteractor {
private Interactor interactor;
/**
* Allows for ShipInteractor to affect ship data in Interactor.java
* @param interactor Interactor.java
*/
public ShipInteractor(Interactor interactor) {
this.interactor = interactor;
}
/**
* Sets the new resources on the ship using the current setResource method in the Ship class
* @param newResources the int array of the resources bought/sold by the character
* @param Buying whether or not the character was buying or selling
*/
public void setResource(int[] newResources, boolean Buying) {
interactor.getCharacter().getShip().setResource(newResources, Buying);
}
public Spaceship getShip() {return interactor.getCharacter().getShip();}
public int[] getCurrentResources() {return interactor.getCharacter().getShip().getCurrentResources();}
}
|
1ca26f21-ebd9-48b3-8f39-7dff8fa7f9c9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-04-01 15:58:03", "repo_name": "boryaevva/Polis-Test", "sub_path": "/src/main/java/LoginPage.java", "file_name": "LoginPage.java", "file_ext": "java", "file_size_in_byte": 1075, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "eb214c68c753436f86d82b995f86328bf6e8dfb2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/boryaevva/Polis-Test | 212 | FILENAME: LoginPage.java | 0.236516 |
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
public class LoginPage {
String baseUrl = "https://ok.ru/";
WebDriver driver;
public LoginPage(WebDriver driver) {
PageFactory.initElements(driver,this);
this.driver = driver;
}
public void open() {
driver.get(baseUrl);
driver.manage().window().maximize();
}
public WebElement getLogin() {
return login;
}
public WebElement getPassword() {
return password;
}
public WebElement getEnter() {
return enter;
}
public void loginMe(String login, String password) {
getLogin().sendKeys(login);
getPassword().sendKeys(password);
enter.click();
}
@FindBy(id = "field_email")
WebElement login;
@FindBy(id = "field_password")
WebElement password;
@FindBy(xpath = "//input[@value='Войти в Одноклассники']")
WebElement enter;
}
|
bb2db4ed-6387-4663-b4a7-c4adaea27178 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-06-04 17:05:32", "repo_name": "yaphone/spring-boot-learning", "sub_path": "/src/main/java/cn/zhouyafeng/common/controller/UserController.java", "file_name": "UserController.java", "file_ext": "java", "file_size_in_byte": 1120, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "7ea702e060b2749ce0ce05a0d468710659ae175b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/yaphone/spring-boot-learning | 221 | FILENAME: UserController.java | 0.191933 | package cn.zhouyafeng.common.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import cn.zhouyafeng.common.model.UserEntity;
import cn.zhouyafeng.common.service.IUserService;
/**
* 用户控制器
*
* @author https://github.com/yaphone
* @date 创建时间:2017年5月22日 上午12:58:37
* @version 1.0
*
*/
@RestController
@EnableAutoConfiguration
@RequestMapping("/user")
public class UserController {
@Autowired
private IUserService userService;
@RequestMapping(value = "/test", method = RequestMethod.GET)
@ResponseBody
String test(String username) {
UserEntity user = userService.getUserEntityByUsername(username);
System.out.println(user.getUsername() + "--" + user.getPassword());
return user.getUsername() + "--" + user.getPassword();
}
}
|
10aab449-4c91-481c-8c52-f6586d817f37 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-03 21:09:11", "repo_name": "cbochs/AndroidExamples", "sub_path": "/20_DialogListExample/app/src/main/java/com/calvin/a20_dialoglistexample/ListDialogFragment.java", "file_name": "ListDialogFragment.java", "file_ext": "java", "file_size_in_byte": 1097, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "5422694a080ea62752973b27958463ff6b2e834e", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/cbochs/AndroidExamples | 184 | FILENAME: ListDialogFragment.java | 0.253861 | package com.calvin.a20_dialoglistexample;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.widget.Toast;
public class ListDialogFragment extends DialogFragment {
@NonNull
@Override
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
final String[] colors = getActivity().getResources().getStringArray(R.array.colors);
Dialog dialog = new AlertDialog.Builder(getActivity())
.setTitle("Pick A Color")
.setItems(colors, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Toast.makeText(getActivity(), "Selected Color: " + colors[i], Toast.LENGTH_SHORT).show();
}
})
.create();
return dialog;
}
}
|
40b8254e-3f58-4ea6-ba30-1ff8e59a2541 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-06 07:45:24", "repo_name": "doraoe/gitTest", "sub_path": "/demogit/src/main/java/com/example/demogit/ThreadDemo/SemaphoneDemo.java", "file_name": "SemaphoneDemo.java", "file_ext": "java", "file_size_in_byte": 1266, "line_count": 33, "lang": "en", "doc_type": "code", "blob_id": "a08a127ab6c2eb7a207ebead7065a812a4611849", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/doraoe/gitTest | 242 | FILENAME: SemaphoneDemo.java | 0.294215 | package com.example.demogit.ThreadDemo;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
/**
* 信号量
* 多线程抢多个共享资源互斥调用
* 并发线程数控制
*/
public class SemaphoneDemo {
public static void main(String[] args) {
Semaphore semaphore = new Semaphore(3);
for (int i = 0; i < 10; i++) {
new Thread(()->{
try {
System.out.println("线程:"+Thread.currentThread().getName()+"开始前当前可用车位:"+semaphore.availablePermits());
semaphore.acquire();
System.out.println("线程:"+Thread.currentThread().getName()+"--->抢到车位");
TimeUnit.SECONDS.sleep(3);
System.out.println("线程:"+Thread.currentThread().getName()+"------------->离开车位");
System.out.println("线程:"+Thread.currentThread().getName()+"离开后当前可用车位:"+semaphore.availablePermits());
} catch (InterruptedException e) {
e.printStackTrace();
}finally {
semaphore.release();
}
},String.valueOf(i)).start();
}
}
} |
42026ccb-cffc-414e-90f0-64bb17768b78 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-06-07 04:29:22", "repo_name": "garrib10/M1-Challenge-Garrity-Brian", "sub_path": "/M1-Challenge-Garrity-Brian/RPGInheritance/src/main/java/com/company/Constable.java", "file_name": "Constable.java", "file_ext": "java", "file_size_in_byte": 1198, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "c99ed5c16ce9b3548f93bf408718c0d3ed3fccdd", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/garrib10/M1-Challenge-Garrity-Brian | 263 | FILENAME: Constable.java | 0.255344 | package com.company;
import java.util.Objects;
public class Constable extends Person {
private String jurisdiction;
public Constable (String name, int strength, int health, int stamina, int speed, int attackPower) {
super(name, 60,100,60,20,5);
}
public Constable(){
super();
}
public String getJurisdiction() {
return jurisdiction;
}
public void setJurisdiction(String jurisdiction) {
this.jurisdiction = jurisdiction;
}
public void arrest(Constable constable){
System.out.println("You have arrested someone!");
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
Constable constable = (Constable) o;
return Objects.equals(jurisdiction, constable.jurisdiction);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), jurisdiction);
}
@Override
public String toString() {
return "Constable{" +
"jurisdiction='" + jurisdiction + '\'' +
'}';
}
}
|
63902052-4efb-449f-a6d2-1032e845d43e | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-10-19 09:05:29", "repo_name": "whg333/qzone-game-cheater", "sub_path": "/src/main/java/com/hoolai/qzone/sango/gui/ItemBagTableModel.java", "file_name": "ItemBagTableModel.java", "file_ext": "java", "file_size_in_byte": 1006, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "83074587e32bf60df76c7ea1f4a685e7885fb90d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/whg333/qzone-game-cheater | 243 | FILENAME: ItemBagTableModel.java | 0.282988 | package com.hoolai.qzone.sango.gui;
import java.util.List;
import javax.swing.table.AbstractTableModel;
import com.hoolai.qzone.sango.vo.ItemBag;
@SuppressWarnings("serial")
public class ItemBagTableModel extends AbstractTableModel {
private static final String[] colNames = { "道具XmlId", "道具名称", "道具数量" };
private final List<ItemBag> itemBagList;
public ItemBagTableModel(List<ItemBag> itemBagList) {
this.itemBagList = itemBagList;
}
@Override
public String getColumnName(int columnIndex) {
return colNames[columnIndex];
}
@Override
public int getColumnCount() {
return colNames.length;
}
@Override
public int getRowCount() {
return itemBagList.size();
}
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
ItemBag itemBag = itemBagList.get(rowIndex);
switch (columnIndex) {
case 0:
return itemBag.getItemXmlId();
case 1:
return itemBag.getName();
case 2:
return itemBag.getNum();
}
return "错误的值";
}
}
|
73df0975-2064-482a-beee-57f06a0119b9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-10-13 16:03:18", "repo_name": "rdskill/vacina-fatec", "sub_path": "/src/main/java/br/com/vacina/service/LoteService.java", "file_name": "LoteService.java", "file_ext": "java", "file_size_in_byte": 1071, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "f641dfae9cb3bfa2d7c08a26d082efdcf6692117", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/rdskill/vacina-fatec | 285 | FILENAME: LoteService.java | 0.294215 | package br.com.vacina.service;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import br.com.vacina.dao.LoteDAO;
import br.com.vacina.domain.Lote;
@Path("/lote")
public class LoteService {
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response listar() {
LoteDAO loteDao = new LoteDAO();
List<Lote> cartoesVacina = loteDao.listar();
return Response.ok(cartoesVacina).build();
}
@GET
@Path("/{codigo}")
@Produces(MediaType.APPLICATION_JSON)
public Response buscar(@PathParam("codigo") Integer codigo) {
LoteDAO loteDao = new LoteDAO();
Lote lote = loteDao.buscar(codigo);
return Response.ok(lote).build();
}
@POST
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public Response salvar(Lote lote) {
LoteDAO loteDao = new LoteDAO();
loteDao.salvar(lote);
return Response.ok(lote).build();
}
}
|
3bb1beff-901e-45fd-9d8e-40c8d2e3040a | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-12-06 21:03:32", "repo_name": "entropyofchaos/QLearning", "sub_path": "/src/TestTestAndSetLock.java", "file_name": "TestTestAndSetLock.java", "file_ext": "java", "file_size_in_byte": 1197, "line_count": 57, "lang": "en", "doc_type": "code", "blob_id": "a2ae590a5092bd57ea0e3f63aef9760ffc734479", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/entropyofchaos/QLearning | 271 | FILENAME: TestTestAndSetLock.java | 0.264358 | import java.util.concurrent.atomic.AtomicBoolean;
/**
* A simple test-test-and-set lock.
*
* @author jbowens
* @since April 2013
*/
public class TestTestAndSetLock implements Lock {
/**
* Whether or not the lock is locked.
*/
protected AtomicBoolean m_locked;
/**
* Constructs a new TTAS lock.
*/
public TestTestAndSetLock() {
m_locked = new AtomicBoolean(false);
}
/**
* Locks the lock.
*/
public void lock() {
boolean acquired = false;
while(!acquired) {
/* First test the lock without invalidating
any cache lines. */
if(!m_locked.get()) {
/* Attempt to lock the lock with an atomic CAS. */
acquired = m_locked.compareAndSet(false, true);
}
}
}
/**
* Locks the lock if available. This will not
* block.
*/
public boolean tryLock() {
if(m_locked.get()) {
return false;
}
return m_locked.compareAndSet(false, true);
}
/**
* Unlocks the lock. This will not block.
*/
public void unlock() {
m_locked.set(false);
}
} |
81a38d58-d84f-4c52-824b-a9add36a0e88 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-01 08:16:46", "repo_name": "eadgyo/mstripes", "sub_path": "/src/main/java/org/upes/Application.java", "file_name": "Application.java", "file_ext": "java", "file_size_in_byte": 981, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "717106a36829fc78faadadbddbda7e961d34b8a7", "star_events_count": 0, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/eadgyo/mstripes | 202 | FILENAME: Application.java | 0.289372 | package org.upes;
import org.upes.controller.Controller;
import org.upes.model.ComputeModel;
import org.upes.view.View;
/**
* Created by eadgyo on 27/06/17.
*/
public class Application
{
// View
private View view;
// ComputeModel
private ComputeModel computeModel;
// Controller
private Controller controller;
public Application()
{
view = new View();
computeModel = new ComputeModel();
controller = new Controller(view, computeModel);
view.optionsDialog.pack();
view.askPathView.pack();
launchApp();
}
public static void main(String[] args)
{
// Start application
new Application();
}
private void launchApp()
{
view.startLoading();
try
{
Thread.sleep(Constants.TIME_LOADING);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
view.swapCard();
}
}
|
7ffa8163-296b-4a76-8419-d6e6f5d0a631 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-05-24T05:39:22", "repo_name": "awarenessxz/java-web-app", "sub_path": "/doc/ANNOUNCEMENT_IMPLEMENTATION.md", "file_name": "ANNOUNCEMENT_IMPLEMENTATION.md", "file_ext": "md", "file_size_in_byte": 1056, "line_count": 26, "lang": "en", "doc_type": "text", "blob_id": "fbd8fb0bad8963e21f50a067e0769e8b314ed401", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/awarenessxz/java-web-app | 216 | FILENAME: ANNOUNCEMENT_IMPLEMENTATION.md | 0.287768 | # Announcement Implementation for Frontend
Here are some background context for announcement feature:
1. There can be several active announcements
2. Announcements are stored inside database
3. There is an [**announcement service (API)**](../app-backend/ms-web-service/doc/ANNOUNCEMENT_SERVICE.md) inside [**web microservice**](../app-backend/ms-web-service)
## User View

- When a new announcement is created by the admin, the user will receive the **announcement notification via websocket**.
- **InfiniteScrollListView** is a custom component inside react-component-library. Refer to documentation for more details.
- **localStorage** is used to keep track of user have read the announcements. (key = `readAnnouncementIds`).
## Admin View
Admin have an admin announcement console to manage announcements
- create announcements (which will be active based on notification period)
- edit announcements
- delete announcements


|
9b72baea-82cd-4f8c-ac12-ba672df7cd6f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-05-19 06:23:51", "repo_name": "superisis1/FinalProject", "sub_path": "/app/src/main/java/kr/insungjung/finalproject/NoticeDetailActivity.java", "file_name": "NoticeDetailActivity.java", "file_ext": "java", "file_size_in_byte": 1149, "line_count": 49, "lang": "en", "doc_type": "code", "blob_id": "6028bafefc1f1c7fdceb059b21224b2e5c40f097", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/superisis1/FinalProject | 224 | FILENAME: NoticeDetailActivity.java | 0.205615 | package kr.insungjung.finalproject;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.widget.TextView;
import kr.insungjung.finalproject.databinding.ActivityNoticeDetailBinding;
import kr.insungjung.finalproject.datas.Notice;
public class NoticeDetailActivity extends BaseActivity {
ActivityNoticeDetailBinding act;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
bindViews();
setupEvents();
setValues();
}
@Override
public void setupEvents() {
}
@Override
public void setValues() {
TextView contentTxt = act.noticeContentTxt;
TextView titleTxt = act.noticeTitleTxt;
TextView dateTxt = act.noticeDateTxt;
Notice notice = (Notice) getIntent().getSerializableExtra("공지사항정보");
titleTxt.setText(notice.title);
dateTxt.setText(notice.date);
contentTxt.setText(notice.content);
}
@Override
public void bindViews() {
act = DataBindingUtil.setContentView(this, R.layout.activity_notice_detail);
}
}
|
3feda696-8e35-4246-af97-10121be683d5 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-07-22 08:02:28", "repo_name": "ShawnLeo/eapi", "sub_path": "/eapi-server/src/main/java/com/shawn/generator/tools/swagger/cmd/SwaggerCodegen.java", "file_name": "SwaggerCodegen.java", "file_ext": "java", "file_size_in_byte": 1096, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "0440762833e8c9d2a04709dcd53bbc27dc9a4408", "star_events_count": 7, "fork_events_count": 4, "src_encoding": "UTF-8"} | https://github.com/ShawnLeo/eapi | 224 | FILENAME: SwaggerCodegen.java | 0.235108 | package com.shawn.generator.tools.swagger.cmd;
import io.airlift.airline.Cli;
import io.airlift.airline.Help;
/**
* User: lanwen Date: 24.03.15 Time: 17:56
* <p>
* Command line interface for swagger codegen use `swagger-codegen-cli.jar help` for more info
*
* @since 2.1.3-M1
*/
public class SwaggerCodegen {
public static void main(String[] args) {
String version = Version.readVersionFromResources();
@SuppressWarnings("unchecked")
Cli.CliBuilder<Runnable> builder =
Cli.<Runnable>builder("swagger-codegen-cli")
.withDescription(
String.format(
"Swagger code generator CLI (version %s). More info on swagger.io",
version))
.withDefaultCommand(Langs.class)
.withCommands(Generate.class, Meta.class, Langs.class, Help.class,
ConfigHelp.class, Validate.class, Version.class);
builder.build().parse(args).run();
}
}
|
64ef1a88-735d-4a5d-8be2-0734c3c1f143 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2019-04-04T19:40:01", "repo_name": "peterlamar/html-examples", "sub_path": "/refactoringUITailwind/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 999, "line_count": 26, "lang": "en", "doc_type": "text", "blob_id": "2f24d106bc2cbfb3c1556e50b8d164123eff3200", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/peterlamar/html-examples | 265 | FILENAME: README.md | 0.23793 | # Tailwind CSS Webpack Starter Project
Code from following along [tailwind livecode video](https://www.youtube.com/watch?v=17OBlxY2C_0)
Which creates [refactoringui](https://refactoringui.com/) site
## Learning points
Tailwind containers fix their width to the breakpoint, or pre-set size of screen. (sm, md, lg, xl)
When this is coupled with mx-auto, it creates centered content with an adjustable padding on both
sides.
[Container Div](https://stackoverflow.com/questions/354739/why-should-i-use-a-container-div-in-html)
Auto margin creates a balanced margin on both x and y.
[Auto margin](https://stackoverflow.com/questions/3170772/what-does-auto-do-in-margin0-auto)
http://learnlayout.com/margin-auto.html
Display block allocates fixed space while display inline places content within.
[Display Block](https://quirksmode.org/css/css2/display.html#block)
[Span tags](https://www.codecademy.com/en/forum_questions/502ad0ea558dfe0002026d69)
- Span tags are inline, Div tags are block
|
b40b4dcc-8d5b-444c-a79f-cc1aef3b1b3c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-11-07 16:52:20", "repo_name": "tdashton/thermoAndroidPi", "sub_path": "/app/src/main/java/com/ashtonandassociates/thermopi/util/AppStateManager.java", "file_name": "AppStateManager.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "cd72cbaa1142499995e0d6cd25c5f491cb21146e", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/tdashton/thermoAndroidPi | 265 | FILENAME: AppStateManager.java | 0.281406 | package com.ashtonandassociates.thermopi.util;
import java.util.Date;
public class AppStateManager {
private static AppStateManager instance = null;
private AppStateManager() {}
public static AppStateManager getInstance() {
if(AppStateManager.instance == null) {
AppStateManager.instance = new AppStateManager();
AppStateManager.instance.apiNonceExpires = new Date(0);
}
return instance;
}
private String apiNonce = null;
private Date apiNonceExpires = null;
private String apiSharedSecret = null;
public void setApiNonce(String param, Date expires) {
this.apiNonceExpires = expires;
this.apiNonce = param;
}
public void setApiNonce(String param) {
long now = new Date().getTime();
this.setApiNonce(param, new Date(now + 10 * 60 * 1000));
}
public String getApiNonce() {
return this.apiNonce;
}
public boolean hasApiNonce() {
boolean expired = this.apiNonceExpires.before(new Date());
return this.apiNonce != null && !expired;
}
public String getApiSharedSecret() {
return this.apiSharedSecret;
}
public void setApiSharedSecret(String param) {
this.apiSharedSecret = param;
}
}
|
77ee0a21-a717-4424-bbff-c543221423b3 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-02-16 12:23:04", "repo_name": "giannislvc/E-shop-1", "sub_path": "/app/src/main/java/com/nativeboys/eshop/customViews/PVCFragment.java", "file_name": "PVCFragment.java", "file_ext": "java", "file_size_in_byte": 1198, "line_count": 40, "lang": "en", "doc_type": "code", "blob_id": "49937442b034c9570bfa9d65a1887f3346f99aba", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/giannislvc/E-shop-1 | 199 | FILENAME: PVCFragment.java | 0.2227 | package com.nativeboys.eshop.customViews;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.fragment.NavHostFragment;
public class PVCFragment extends Fragment {
private NavController parentNavController;
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
parentNavController = initParentNavController();
}
protected NavController getParentNavController() {
return parentNavController;
}
@Nullable
private NavController initParentNavController() {
NavHostFragment navHostFragment = (NavHostFragment) getParentFragment();
if (navHostFragment != null) {
Fragment parent = navHostFragment.getParentFragment();
if (parent != null && parent.getView() != null) {
return Navigation.findNavController(parent.getView());
}
}
return null;
}
}
|
6b6b27ac-4e58-4e7b-870d-1567c6687894 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-02-08 22:52:34", "repo_name": "Awesome20o0/HydraRelicRecoveryMaster", "sub_path": "/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/Libraries/Pushers.java", "file_name": "Pushers.java", "file_ext": "java", "file_size_in_byte": 991, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "497d69b4630014cddb866ff21e96be13e78b379b", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Awesome20o0/HydraRelicRecoveryMaster | 247 | FILENAME: Pushers.java | 0.286169 | package org.firstinspires.ftc.teamcode.Libraries;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.hardware.Servo;
/**
* Created by willi on 10/10/2017.
*/
public class Pushers {
LinearOpMode opMode;
Servo pusherR;
Servo pusherL;
private final String LOG_TAG = "DriveTrain";
public Pushers(LinearOpMode opMode)throws InterruptedException{
this.opMode = opMode;
pusherR = this.opMode.hardwareMap.servo.get("pushR");
pusherL = this.opMode.hardwareMap.servo.get("pushL");
this.opMode.telemetry.addData("init", "finished drivetrain init");
this.opMode.telemetry.update();
this.opMode.telemetry.addData("init", "init finished");
this.opMode.telemetry.update();
}
public void pushersOut(){
pusherR.setPosition(-1);
pusherL.setPosition(1);
}
public void pushersIn(){
pusherR.setPosition(1);
pusherL.setPosition(-1);
}
}
|
218e5186-3ff9-4a59-ba36-a454914e4002 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2022-03-30T06:20:53", "repo_name": "OjasKarmarkar/Firebase-Flutter", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1047, "line_count": 31, "lang": "en", "doc_type": "text", "blob_id": "4463f75c68653e96d8cf79e8f482574a18a30e9b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/OjasKarmarkar/Firebase-Flutter | 281 | FILENAME: README.md | 0.23092 | # apli
1. Added Onboarding
2. Added (Update Only) Feature For Editing Profile( Using FireBase Firestore)(No Fetching Yet)
3. Added Splash
4. Added Login , SignUp










## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
|
3ba76997-1369-48ea-a2aa-ab6a1bec66df | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-13 10:35:42", "repo_name": "FrozenTear7/distributed-systems", "sub_path": "/lab5/src/server/OrderActor.java", "file_name": "OrderActor.java", "file_ext": "java", "file_size_in_byte": 1084, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "8bdd64778bf14dcfa9300759911e62b69979de05", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/FrozenTear7/distributed-systems | 178 | FILENAME: OrderActor.java | 0.268941 | package server;
import akka.actor.AbstractActor;
import akka.event.Logging;
import akka.event.LoggingAdapter;
import utils.Request;
import utils.RequestType;
import utils.Response;
import java.io.IOException;
import static utils.UtilFunctions.writeOrder;
public class OrderActor extends AbstractActor {
private final LoggingAdapter log = Logging.getLogger(getContext().getSystem(), this);
@Override
public AbstractActor.Receive createReceive() {
return receiveBuilder()
.match(Request.class, req -> {
try {
writeOrder(req.getTitle());
} catch (IOException e) {
throw new IOException();
} finally {
getSender().tell(new Response("Done"), getSelf());
req.setType(RequestType.STOP);
getContext().parent().tell(req, null);
}
})
.matchAny(o -> log.info("received unknown message"))
.build();
}
}
|
9553b3e6-74df-4dd5-8073-702fd833529b | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-14 10:57:12", "repo_name": "Madong1994/iyou", "sub_path": "/src/main/java/com/md/iyou/common/CurrenthashMapUtil.java", "file_name": "CurrenthashMapUtil.java", "file_ext": "java", "file_size_in_byte": 1120, "line_count": 38, "lang": "en", "doc_type": "code", "blob_id": "a4e61c003353331563b7d0bd3fd46c03b9147e6a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Madong1994/iyou | 256 | FILENAME: CurrenthashMapUtil.java | 0.277473 | package com.md.iyou.common;
import cn.hutool.json.JSONObject;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Created by 马东 on 2019/3/20.
*
* @Author:madong
* @Description:
* @Date:Create in 20:51 2019/3/20
* 关关雎鸠,在河之洲,
* 窈窕淑女,君子好逑。
*/
public class CurrenthashMapUtil {
private static ConcurrentHashMap<String, JSONObject> currentHashMap = new ConcurrentHashMap();
public static void put(String key, JSONObject value) {
String openidValue = (String) value.get("openid");
boolean cun = false;
for (Map.Entry<String, JSONObject> entry: currentHashMap.entrySet()) {
JSONObject jsonObject = entry.getValue();
String keyStr = entry.getKey();
String openid = (String) jsonObject.get("openid");
if (openid.equals(openidValue)) {
currentHashMap.remove(keyStr);
break;
}
}
currentHashMap.put(key, value);
}
public static JSONObject get(String key) {
return currentHashMap.get(key);
}
}
|
b8bd103e-c48f-497d-a3fe-30c7e4e8f040 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-03-04 17:08:00", "repo_name": "anaumenko85/tk_Lender", "sub_path": "/eclipse_selenium_test_project/eclipse-selenium-sample-project/src/com/example/pages/LoginPage.java", "file_name": "LoginPage.java", "file_ext": "java", "file_size_in_byte": 1091, "line_count": 44, "lang": "en", "doc_type": "code", "blob_id": "bad5e4708291e4e7920c5d205fbdbedb40c87a29", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/anaumenko85/tk_Lender | 225 | FILENAME: LoginPage.java | 0.256832 | package com.example.pages;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
public class LoginPage extends AnyPage {
@FindBy(id = "loginform")
public WebElement loginForm;
@FindBy(name = "username")
public WebElement userNameField;
@FindBy(name = "password")
public WebElement passwordField;
@FindBy(name = "submit")
public WebElement loginButtton;
public boolean isOnThisPage() {
return loginForm.isDisplayed();
}
@Override
public void tryToOpen() {
MyPageFactory.getPage(driver, InternalPage.class).logout();
}
public InternalPage loginWithValidCredentials(String username, String password) {
userNameField.sendKeys(username);
passwordField.sendKeys(password);
loginButtton.click();
return MyPageFactory.getPage(driver, InternalPage.class);
}
public LoginPage loginWithWrongCredentials(String username, String password) {
userNameField.sendKeys(username);
passwordField.sendKeys(password);
loginButtton.click();
return MyPageFactory.getPage(driver, LoginPage.class);
}
}
|
62192f91-06f0-4d4d-807a-b5ec073b9f51 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-04-17 07:43:21", "repo_name": "yuanzhentao90/microservicecloud", "sub_path": "/microservicecloud-consumer-dept-feign/src/main/java/com/atguigu/springcloud/controller/DeptController_consumer.java", "file_name": "DeptController_consumer.java", "file_ext": "java", "file_size_in_byte": 1003, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "b589e7dade08eb3e743081e089e38368ea99b133", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/yuanzhentao90/microservicecloud | 190 | FILENAME: DeptController_consumer.java | 0.259826 | package com.atguigu.springcloud.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.atguigu.springcloud.entities.Dept;
import com.atguigu.springcloud.service.DeptClientService;
@RestController
@RequestMapping(value="consumer/dept")
public class DeptController_consumer {
@Autowired
private DeptClientService service;
@RequestMapping(value="/get/{id}",method=RequestMethod.GET)
public Dept get(@PathVariable long id) {
return service.get(id);
}
@RequestMapping(value="/add",method=RequestMethod.POST)
public Object add(Dept dept) {
return service.add(dept);
}
@RequestMapping(value="/list",method=RequestMethod.GET)
public List<Dept> list(){
return service.list();
}
}
|
b5b28c5b-9784-4c9d-86c4-fdebd62dfd89 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-07-15 14:50:22", "repo_name": "hems42/SpringBootJPAHrmsProject", "sub_path": "/src/main/java/cap_software/hrms/entities/JopPosition.java", "file_name": "JopPosition.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "133d0379c35cbf5ceb08dd868fdac95d7226a49d", "star_events_count": 2, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/hems42/SpringBootJPAHrmsProject | 236 | FILENAME: JopPosition.java | 0.288569 | package cap_software.hrms.entities;
import cap_software.hrms.entities.utils.DateParameters;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name="JopPositions")
public class JopPosition {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@Column(name = "JopPosition",length = 100,nullable = false,unique = true)
private String positionName;
@JsonIgnore
@ManyToMany(cascade = {CascadeType.ALL})
@JoinTable(name="CategoryJopposition",
joinColumns = @JoinColumn(name = "JopId",referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "CategoryId",referencedColumnName = "id"))
private List<Category> categoryList;
@Column(name = "CreatedDate",updatable = false)
private LocalDateTime createdDate;
@Column(name = "UpdatedDate",insertable = false)
private LocalDateTime updatedDate;
}
|
d2a921e7-7d1c-4410-8cd0-15e609cb6f88 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-02 20:43:20", "repo_name": "Gozied/InterView-Project", "sub_path": "/src/test/java/Steps/DeleteBasket.java", "file_name": "DeleteBasket.java", "file_ext": "java", "file_size_in_byte": 1198, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "ee60143b11db44cba6a887968334c1c1e822f011", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Gozied/InterView-Project | 259 | FILENAME: DeleteBasket.java | 0.290981 | package Steps;
import Base.TestBase;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import org.testng.annotations.IDataProviderAnnotation;
import org.testng.annotations.Test;
import pages.DeleteBasketPage;
import java.io.IOException;
public class DeleteBasket extends TestBase
{
DeleteBasketPage basket = new DeleteBasketPage(driver);
@Given("^i login successfully$")
public void i_login_successfully() {
basket.SuccessfulLogIn();
}
@Given("^i add a dress to my Shopping Cart$")
public void i_add_a_dress_to_my_Shopping_Cart() {
basket.ClickDresses();
basket.AddDressToCart();
}
@Given("^i confirm that Cart has a delete button$")
public void i_confirm_that_Cart_has_a_delete_button() {
basket.ConfirmDeleteButton();
}
@When("^i delete dress from Shopping cart$")
public void i_delete_dress_from_Shopping_cart() {
basket.DeleteItemFromCart();
}
@Then("^Banner should displays shopping cart is empty$")
public void banner_should_displays_shopping_cart_is_empty() {
basket.ConfirmCartStatus();
TestCleanUp();
}
}
|
82507915-f45a-49ea-adf4-474c61c10d50 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-04-24 08:56:43", "repo_name": "fenglingguitar/noodleschedule", "sub_path": "/noodleschedule-client/src/main/java/org/fl/noodleschedule/client/callback/JobCallbackImpl.java", "file_name": "JobCallbackImpl.java", "file_ext": "java", "file_size_in_byte": 973, "line_count": 37, "lang": "en", "doc_type": "code", "blob_id": "dfd190bb19190b03314423ff997803aeac3a060a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/fenglingguitar/noodleschedule | 235 | FILENAME: JobCallbackImpl.java | 0.293404 | package org.fl.noodleschedule.client.callback;
import org.fl.noodle.common.net.http.HttpConnect;
import org.fl.noodle.common.net.http.jdk.HttpConnectJdk;
import org.fl.noodleschedule.client.pojo.JobResult;
public class JobCallbackImpl implements JobCallback {
private String url;
private int connectTimeout = 10000;
private int readTimeout = 10000;
@Override
public JobResult callback(JobResult jobResult) {
HttpConnect httpConnect = new HttpConnectJdk(url, connectTimeout, readTimeout);
try {
JobResult jobResultBack = httpConnect.post("input", jobResult, JobResult.class);
jobResultBack.setResult(true);
return jobResultBack;
} catch (Exception e) {
return new JobResult(false, e.getMessage());
}
}
public void setUrl(String url) {
this.url = url;
}
public void setConnectTimeout(int connectTimeout) {
this.connectTimeout = connectTimeout;
}
public void setReadTimeout(int readTimeout) {
this.readTimeout = readTimeout;
}
}
|
5034c795-be87-49a5-9a59-a8d66d8ed429 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-11-02 15:19:00", "repo_name": "ICE1997/Chat", "sub_path": "/app/src/main/java/com/chzu/ice/chat/activity/splash/SplashActivity.java", "file_name": "SplashActivity.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 39, "lang": "en", "doc_type": "code", "blob_id": "8a31620071e9d5f56ad66682995b3fc018e8e603", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/ICE1997/Chat | 209 | FILENAME: SplashActivity.java | 0.236516 | package com.chzu.ice.chat.activity.splash;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import com.chzu.ice.chat.R;
import com.chzu.ice.chat.activity.friendsRelations.FriendsActivity;
import com.chzu.ice.chat.activity.login.LoginActivity;
public class SplashActivity extends AppCompatActivity implements ISplashContract.View {
ISplashContract.Presenter presenter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
new SplashPresenter(this);
init();
}
private void init() {
if (!presenter.isFirstOpen() && presenter.hasSignedIn()) {
Intent intent = new Intent(this, FriendsActivity.class);
startActivity(intent);
}else {
Intent intent = new Intent(this, LoginActivity.class);
startActivity(intent);
}
this.finish();
}
@Override
public void setPresenter(ISplashContract.Presenter presenter) {
this.presenter = presenter;
}
}
|
2d0f05f1-b70e-488a-94a7-ac04f60766a6 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-02-06 03:17:41", "repo_name": "laky55555/android", "sub_path": "/SignMe/app/src/main/java/hr/math/android/signme/SettingsFragment.java", "file_name": "SettingsFragment.java", "file_ext": "java", "file_size_in_byte": 1076, "line_count": 35, "lang": "en", "doc_type": "code", "blob_id": "b4ef5bef019419d211c44c42f8b3189a5a3581a1", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/laky55555/android | 190 | FILENAME: SettingsFragment.java | 0.236516 | package hr.math.android.signme;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
/**
* Fragment for all settings.
* Include fragment for setting password and email address.
* Implements all other settings.
*/
public class SettingsFragment extends Fragment {
private void initializePassMail() {
Log.d("TAG", "Starting fragment for initializing password and mail");
FragmentTransaction ft = getChildFragmentManager().beginTransaction();
ft.add(R.id.pass_email_settings_fragment, new PasswordEmailFragment());
ft.commit();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
return inflater.inflate(R.layout.fragment_settings, parent, false);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
initializePassMail();
}
} |
64a46a25-2c14-4ec7-a782-96a35819819f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2022-06-17T17:45:33", "repo_name": "hoodie/magnetoplasmadynamic-thruster", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1119, "line_count": 49, "lang": "en", "doc_type": "text", "blob_id": "63a1226cf8913fbff4b4e9cb4b8f148c2dec86d0", "star_events_count": 7, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/hoodie/magnetoplasmadynamic-thruster | 359 | FILENAME: README.md | 0.206894 | # ⏏️ Magnetoplasmadynamic Thruster 🚀
*a.k.a [MPD](https://crates.io/crates/mpd) meets [Rocket](https://crates.io/crates/rocket).*
This is a WIP webinterface for [music player daemon](https://www.musicpd.org/).
### T minus 10 .. 9 .. 8 ..
* [`curl https://sh.rustup.rs -sSf | sh`](https://rustup.rs/) to get rustup
* `git clone https://github.com/hoodie/magnetoplasmadynamic.git`
* `cd magnetoplasmadynamic`
### .. 7 .. 6 .. 5 ..
- `rustup override set nightly` (because [rocket.rs](https://rocket.rs) only launches at night)
* `export MPD_HOST=localhost:6600 MPD_PW=your_mpd_password`
* **buckle up!**
### .. 4 .. 3 .. 2 ..
* `cargo run`
* **Rocket has launched**
* go to [http://localhost:8000](http://localhost:8000)
### .. 1
* ***"LIFT OFF! WE HAVE A LIFT OFF!"***
## This is a message to the future:
> Ground Control to future Hendrik, please implement the following:
>
> * [ ] error handling
> * [ ] more freatures ( browsing, adding streams, etc )
> * [ ] complete REST API
> * [ ] react.js interface
> * [ ] take your protein pills
> * [ ] put your helmet on
Happy Hacking
|
8eef3346-ad99-483c-bde6-b32dc20a5338 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2014-04-22 15:08:45", "repo_name": "dafefuve/JavaBoardGame_Iter_3", "sub_path": "/Iter3/src/view/ViewHexIrrigation.java", "file_name": "ViewHexIrrigation.java", "file_ext": "java", "file_size_in_byte": 966, "line_count": 54, "lang": "en", "doc_type": "code", "blob_id": "e7fbdf8edb7a532d331c50a476aa3dd6779af2af", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/dafefuve/JavaBoardGame_Iter_3 | 228 | FILENAME: ViewHexIrrigation.java | 0.267408 | package view;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
/**
* Created by alexbujduveanu on 4/19/14.
*/
public class ViewHexIrrigation extends ViewHex
{
Rectangle rectangle = new Rectangle(300, 300, 300, 300);
public ViewHexIrrigation()
{
try
{
image = ImageIO.read(new File("Iter3/src/view/images/water.jpg"));
}
catch(Exception e)
{
e.printStackTrace();
}
texture = new TexturePaint(image, rectangle);
selected = false;
hexID = ID;
ID++;
}
@Override
public TexturePaint getTP()
{
return texture;
}
@Override
public BufferedImage getImage()
{
return image;
}
public boolean getSelected()
{
return selected;
}
public void setSelected(boolean selected)
{
this.selected = selected;
}
}
|
7f2729f9-7baf-4e99-a120-7c2c18a353b4 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-04-29 01:35:38", "repo_name": "guochanglun/library-web", "sub_path": "/src/main/java/com/gcl/library/service/UserService.java", "file_name": "UserService.java", "file_ext": "java", "file_size_in_byte": 1106, "line_count": 51, "lang": "en", "doc_type": "code", "blob_id": "0ddcd601fb15e6418507fcfa582260c39da73910", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/guochanglun/library-web | 223 | FILENAME: UserService.java | 0.218669 | package com.gcl.library.service;
import com.gcl.library.bean.User;
import com.gcl.library.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
/**
* Created by gcl on 2016/12/16.
* UserService
*/
@Service
@Scope("session")
public class UserService {
@Autowired
private UserRepository userRepository;
/**
* 登录
*/
public User login(User user) {
User u = userRepository.findByEmail(user.getEmail());
if (u != null && u.getPassword().equals(user.getPassword())) {
return u;
}
return null;
}
/**
* 注册
*/
public boolean register(User user) {
User u = userRepository.findByEmail(user.getEmail());
if (u != null) {
return false;
}
userRepository.save(user);
return true;
}
/**
* 修改信息
*/
public boolean change(User user) {
userRepository.save(user);
return true;
}
}
|
927dcb23-59c8-4305-95bf-2c3129ea1014 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-09-30 12:31:07", "repo_name": "gram7gram/DivineDefense", "sub_path": "/core/src/ua/gram/view/screen/CreditsScreen.java", "file_name": "CreditsScreen.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "ad6ce2ec043508ab03ed1695d2461ae8604be001", "star_events_count": 6, "fork_events_count": 2, "src_encoding": "UTF-8"} | https://github.com/gram7gram/DivineDefense | 239 | FILENAME: CreditsScreen.java | 0.292595 | package ua.gram.view.screen;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputAdapter;
import com.badlogic.gdx.InputMultiplexer;
import ua.gram.DDGame;
import ua.gram.controller.listener.CameraControlsListener;
import ua.gram.controller.stage.CreditsStage;
import ua.gram.utils.Log;
import ua.gram.view.AbstractScreen;
/**
* @author Gram <gram7gram@gmail.com>
*/
public class CreditsScreen extends AbstractScreen {
private final CreditsStage stage;
public CreditsScreen(DDGame game) {
super(game);
stage = new CreditsStage(game);
Log.info("CreditsScreen is OK");
}
@Override
public void show() {
super.show();
InputMultiplexer multiplexer = new InputMultiplexer();
InputAdapter inputAdapter = new CameraControlsListener(game);
multiplexer.addProcessor(stage);
multiplexer.addProcessor(inputAdapter);
Gdx.input.setInputProcessor(multiplexer);
}
@Override
public void renderAlways(float delta) {
stage.act(delta);
stage.draw();
}
@Override
public void renderNoPause(float delta) {
}
}
|
24bc6523-d24b-46b2-819e-b63706201455 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-08-25 06:32:55", "repo_name": "RobertBoothby/djenni", "sub_path": "/util/src/main/java/com/robertboothby/djenni/util/Nullable.java", "file_name": "Nullable.java", "file_ext": "java", "file_size_in_byte": 1199, "line_count": 50, "lang": "en", "doc_type": "code", "blob_id": "d9be927c924ec4e9cc8708e4dc0365ddec6605a9", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/RobertBoothby/djenni | 272 | FILENAME: Nullable.java | 0.282988 | package com.robertboothby.djenni.util;
/**
* <P>
* Nullable class currently used a stand in until I can find a widely used open source version...
* </P>
* <P>
* This class is used in all code where I want an explicit indicator that a value may be null and so by extension
* any attributes, parameters or return types which are not nullable must always return a value. This keeps the
* interfaces semantically clear.
* </P>
*
* @author robertboothby
*/
public final class Nullable<T> {
private T value;
public Nullable() {
}
public Nullable(T value) {
this.value = value;
}
/**
* Check whether this nullable has a value or not.
* @return true if there is a value, false otherwise.
*/
public final boolean hasValue() {
return value !=null;
}
public final T value() {
if(hasValue()){
return value;
}
throw new RuntimeException("Attempt to directly access a null value");
}
public static <Q> Nullable<Q> nullValue(){
return new Nullable<>();
}
public static <Q> Nullable<Q> nullable(Q value) {
return new Nullable<>(value);
}
}
|
93770c4f-6d4d-45a6-b535-e3294a28e5fc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2016-10-30T08:30:01", "repo_name": "felromo/YARR-Boilerplate", "sub_path": "/Readme.md", "file_name": "Readme.md", "file_ext": "md", "file_size_in_byte": 1197, "line_count": 35, "lang": "en", "doc_type": "text", "blob_id": "f019da0c78948a5ac5d091ff7e4bfbaab5a59051", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/felromo/YARR-Boilerplate | 312 | FILENAME: Readme.md | 0.212069 | # YARR-Boilerplate
> Yet Another React Redux Boilerplate
## What is it??
A pre-configured environment with a lot of goodies to make React-Redux development more responsive and fun without having to spend a long time to set up.
## Features
- React
- Redux
- React-Router
- Redux Form
- Redux Promise
- Axios
- Webpack
- React Component Hot Reloading
- Scss Hot Reloading
- CSS Source Maps enabled
- Mocha & Chai Testing
- Component Testing Jquery Helper
## Install
1. `git clone https://github.com/tyrantwarship/YARR-Boilerplate [some-folder]`
2. `npm install` inside the root of the cloned folder, and wait for it to download all dependencies
3. `npm start` to start the server on port 3000, `npm test` to run all the tests, or `npm test:watch` to run tests on save
4. Start developing
> Open the package.json and view the deps/dev-deps and remove according to your needs before installing
## Credits
This boilerplate is a combination of Stephen Grider's [ReduxSimpleStarter] (https://github.com/StephenGrider/ReduxSimpleStarter) and Dan Abramov's [react-hot-boilerplate](https://github.com/gaearon/react-hot-boilerplate)
with some adittions so many thanks to both for their amazing work. |
29169b33-8896-4d4c-b426-30c4492981b0 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-09-25 07:50:31", "repo_name": "marweennp/MyHotixGuest", "sub_path": "/app/src/main/java/com/hotix/myhotixguest/models/RestaurantsResponse.java", "file_name": "RestaurantsResponse.java", "file_ext": "java", "file_size_in_byte": 1136, "line_count": 53, "lang": "en", "doc_type": "code", "blob_id": "7e8127b39b8cbcbdafad449abff7e39d1d9f7e87", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/marweennp/MyHotixGuest | 226 | FILENAME: RestaurantsResponse.java | 0.23793 | package com.hotix.myhotixguest.models;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
public class RestaurantsResponse {
@SerializedName("Message")
@Expose
private String message;
@SerializedName("Error")
@Expose
private Integer error;
@SerializedName("Success")
@Expose
private Boolean success;
@SerializedName("Data")
@Expose
private ArrayList<Restaurant> restaurants = null;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public Integer getError() {
return error;
}
public void setError(Integer error) {
this.error = error;
}
public Boolean getSuccess() {
return success;
}
public void setSuccess(Boolean prizeOrder) {
this.success = success;
}
public ArrayList<Restaurant> getRestaurants() {
return restaurants;
}
public void setRestaurants(ArrayList<Restaurant> restaurants) { this.restaurants = restaurants; }
}
|
a49a8505-0f89-41a7-a3b4-0da2acd24e87 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-06-01 11:42:23", "repo_name": "lost-233/project-parent", "sub_path": "/bean-parent/platform-bean/src/main/java/com/zhaoming/bean/platfrom/result/CommonResult.java", "file_name": "CommonResult.java", "file_ext": "java", "file_size_in_byte": 1129, "line_count": 43, "lang": "en", "doc_type": "code", "blob_id": "b86c0f391bc70b62517bca861656956e7cf33dbc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/lost-233/project-parent | 243 | FILENAME: CommonResult.java | 0.249447 | package com.zhaoming.bean.platfrom.result;
import com.zhaoming.bean.platfrom.constant.ResultCode;
import com.zhaoming.bean.platfrom.constant.ResultMsg;
import org.apache.commons.lang3.StringUtils;
/**
* 通用返回值枚举
* @author huhuixin
* @create 2017/11/23 下午5:34
*/
public enum CommonResult {
SUCCESS(ResultCode.SUCCESS, ResultMsg.SUCCESS),
SERVER_ERROR(ResultCode.SERVER_ERROR, ResultMsg.SERVER_ERROR),
INVALID_SIGN(ResultCode.INVALID_SIGN, "签名无效"),
INVALID_TIMESTAMP(ResultCode.INVALID_TIMESTAMP, "时间戳无效"),
INVALID_METHOD(ResultCode.INVALID_METHOD, "无效的方法"),
INVALID_PARAMTER(ResultCode.INVALID_PARAMTER, "请求参数不合法"),
;
public final String result;
public final String message;
CommonResult(String result, String message) {
this.result = result;
this.message = message;
}
public static CommonResult get(String result) {
for(CommonResult cr : values()){
if(StringUtils.equals(result, cr.result)){
return cr;
}
}
return null;
}
}
|
dfd2e4fc-06c0-407c-8648-6bdc8d87973c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-10-29 14:23:11", "repo_name": "zerOlones/zbooks", "sub_path": "/src/main/java/com/pojo/Bookshelfnow.java", "file_name": "Bookshelfnow.java", "file_ext": "java", "file_size_in_byte": 1080, "line_count": 56, "lang": "en", "doc_type": "code", "blob_id": "08bb8727b92984e0d8d6d2376430d47eda12cafc", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/zerOlones/zbooks | 240 | FILENAME: Bookshelfnow.java | 0.252384 | package com.pojo;
import java.util.Date;
public class Bookshelfnow {
private Integer userId;
private Integer bookId;
private Date addTime;
private Integer lastChapter;
public Bookshelfnow(Integer userId, Integer bookId, Date addTime, Integer lastChapter) {
this.userId = userId;
this.bookId = bookId;
this.addTime = addTime;
this.lastChapter = lastChapter;
}
public Bookshelfnow() {
super();
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getBookId() {
return bookId;
}
public void setBookId(Integer bookId) {
this.bookId = bookId;
}
public Date getAddTime() {
return addTime;
}
public void setAddTime(Date addTime) {
this.addTime = addTime;
}
public Integer getLastChapter() {
return lastChapter;
}
public void setLastChapter(Integer lastChapter) {
this.lastChapter = lastChapter;
}
} |
fb27aced-e969-4c06-bd2e-59d439e42697 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2021-03-27T12:43:55", "repo_name": "Manabendra842/Chatbot-using-Python", "sub_path": "/README.md", "file_name": "README.md", "file_ext": "md", "file_size_in_byte": 1070, "line_count": 48, "lang": "en", "doc_type": "text", "blob_id": "dc5a7d133ccd72d1d1a0ef77912de7606d289961", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Manabendra842/Chatbot-using-Python | 314 | FILENAME: README.md | 0.292595 | # Chatbot-using-Python

**ATTENTION**
A common error SOLVED
If you are using Python 3.8 , download the previous version
Go to CMD
pip install chatterbot==1.0.4
This will work and everything is installed
You will probably get an error after some time, where it says
File "C:\Python38\lib\site-packages\sqlalchemy\util\compat.py
", line 264, in <module>
time_func = time.clock
AttributeError: module 'time' has no attribute 'clock'
This is because time.clock() function was removed in Py 3.8.
Go to the search bar and then paste the location given right above the last line of error
It will look something like this : C:\Python38\lib\site-packages\sqlalchemy\util\compat.py
Open file with IDLE or whatever editor you have
Then , go to line 264 in that . It would be written
time_func = time.clock()
Instead of this change, it to
time.perf_counter()
Save the file and now run it. It will work
|
0bdf1dbc-2fa4-4783-b832-7a9e0e461be1 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2021-01-31 14:56:00", "repo_name": "kimmy100b/todo", "sub_path": "/src/main/java/kr/or/connect/todo/TodoTypeServlet.java", "file_name": "TodoTypeServlet.java", "file_ext": "java", "file_size_in_byte": 1075, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "58f882b4257997b3e6b9472e459c93b69bcec0ac", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/kimmy100b/todo | 224 | FILENAME: TodoTypeServlet.java | 0.275909 | package kr.or.connect.todo;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import kr.or.connect.todo.dao.TodoDao;
import kr.or.connect.todo.dto.TodoDto;
@WebServlet("/todoType")
public class TodoTypeServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
TodoDao dao = null;
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
Long id = Long.parseLong(req.getParameter("id"));
String type = req.getParameter("type");
if (type.equals("TODO")) {
type = "DOING";
} else if (type.equals("DOING")) {
type = "DONE";
}
TodoDto todo = new TodoDto(id, type);
TodoDao dao = new TodoDao();
dao.updateTodo(todo);
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
doPost(req, resp);
}
}
|
75674fb4-7f75-4bf1-b18b-56e5ba34c569 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-19 02:34:17", "repo_name": "flytotop/shop_web02", "sub_path": "/shop_manger/shop_manger_dto/src/main/java/com/shop/dto/First_Levels.java", "file_name": "First_Levels.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 41, "lang": "en", "doc_type": "code", "blob_id": "6bc9da2926ea87ab8e428d87b718482f72e49f7d", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/flytotop/shop_web02 | 237 | FILENAME: First_Levels.java | 0.279828 | package com.shop.dto;
import java.io.Serializable;
import java.util.List;
public class First_Levels implements Serializable {
private Integer first_levels_id;
private String first_level_name;
private List<Second_Levels> second_levels;
public First_Levels(){}
public First_Levels(Integer first_levels_id,String first_level_name,List<Second_Levels> second_levels){
this.first_levels_id=first_levels_id;
this.first_level_name=first_level_name;
this.second_levels=second_levels;
}
public Integer getFirst_levels_id() {
return first_levels_id;
}
public void setFirst_levels_id(Integer first_levels_id) {
this.first_levels_id = first_levels_id;
}
public String getFirst_level_name() {
return first_level_name;
}
public void setFirst_level_name(String first_level_name) {
this.first_level_name = first_level_name;
}
public List<Second_Levels> getSecond_levels() {
return second_levels;
}
public void setSecond_levels(List<Second_Levels> second_levels) {
this.second_levels = second_levels;
}
}
|
11196d26-ddd3-4efa-a597-4b235c04af81 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-11-24 09:54:45", "repo_name": "kejitongxin/sdmp", "sub_path": "/system/system/src/main/java/org/neris/system/domain/UserApplication.java", "file_name": "UserApplication.java", "file_ext": "java", "file_size_in_byte": 1338, "line_count": 68, "lang": "en", "doc_type": "code", "blob_id": "6b17b200ecbd5e5ea5e040c201cda80afbedeac3", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/kejitongxin/sdmp | 308 | FILENAME: UserApplication.java | 0.295027 | package org.neris.system.domain;
import java.util.Collection;
import java.util.UUID;
public class UserApplication {
/**
* ID
*/
private String userApplicationID;
/**
* 用户名
*/
private String userName;
/**
* 密码
*/
private String password;
/**
* 姓名
*/
private String name;
/**
* 性别
*/
private int sex;
/**
* 身份证号
*/
private String personalIDNum;
/**
* 申请处理状态。0,新申请;1,处理中;2,审核不通过;3,审核通过
*/
private ApplicationDealState applicationDealState;
private UserApplicationRepo userApplicationRepo;
public enum ApplicationDealState{
applied,//0,已申请
dealing,//1,处理中
applyFailed,//2,审核不通过
applySuceed//3,审核通过
}
/**
* 用户注册
*/
public void register(UserApplication userApplication) {
UserApplication newUserApplication=userApplication;
newUserApplication.userApplicationID=UUID.randomUUID().toString();
newUserApplication.applicationDealState=ApplicationDealState.applied;
userApplicationRepo.saveUserApplication(newUserApplication);
}
/**
* 用户审核
*/
void approve(Collection<String> userApplicationIDs,ApplicationDealState applicationDealState) {
}
}
|
37b8e6a6-066e-4b98-9578-dd73593fd338 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2017-07-17 09:45:48", "repo_name": "boyley/seckil", "sub_path": "/module/seckil-service/src/main/java/com/danlu/seckil/common/ResultModel.java", "file_name": "ResultModel.java", "file_ext": "java", "file_size_in_byte": 975, "line_count": 55, "lang": "en", "doc_type": "code", "blob_id": "f889d81724ba7dc8a917ea1553251dfd710aae70", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/boyley/seckil | 226 | FILENAME: ResultModel.java | 0.225417 | package com.danlu.seckil.common;
import java.io.Serializable;
/**
* Created by Danlu on 2017/7/17.
*/
public class ResultModel<T> implements Serializable {
private boolean success;
private T body;
private String msg;
public ResultModel(T body) {
this(true, body, "成功");
}
public ResultModel(boolean success, String msg) {
this.success = success;
this.msg = msg;
}
public ResultModel(boolean success, T body, String msg) {
this.success = success;
this.body = body;
this.msg = msg;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public T getBody() {
return body;
}
public void setBody(T body) {
this.body = body;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
|
1c478451-e925-43c8-9789-694c6043d17c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-02-13 15:59:09", "repo_name": "zclyne/The-Complete-Android-Oreo-Developer-Course", "sub_path": "/DemoApp/app/src/main/java/com/yifan/demoapp/MainActivity.java", "file_name": "MainActivity.java", "file_ext": "java", "file_size_in_byte": 1196, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "fc7ac0fa5b4314fdce531906e8152a558988ecce", "star_events_count": 3, "fork_events_count": 2, "src_encoding": "UTF-8"} | https://github.com/zclyne/The-Complete-Android-Oreo-Developer-Course | 234 | FILENAME: MainActivity.java | 0.274351 | package com.yifan.demoapp;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
public void clickFunction(View view) {
Log.i("Info", "Button pressed!");
}
public void click2(View view) {
EditText myTextField = (EditText) findViewById(R.id.myTextField); // findViewById returns a view, and we need to convert it into EditText
Log.i("btn2", myTextField.getText().toString());
}
public void login(View view) {
EditText username = (EditText) findViewById(R.id.username);
EditText password = (EditText) findViewById(R.id.password);
Log.i("userInfo", "The username is: " + username.getText().toString() + "; the password is " + password.getText().toString());
Toast.makeText(this, "Hi there, " + username.getText().toString(), Toast.LENGTH_SHORT).show();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
|
bf99acf8-f9ba-45e1-9412-e10edf610dd8 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2016-03-29 02:07:59", "repo_name": "xuanyongcang/CoolWeather123", "sub_path": "/app/src/main/java/com/coolweather/app/db/FarmDefine.java", "file_name": "FarmDefine.java", "file_ext": "java", "file_size_in_byte": 1054, "line_count": 34, "lang": "en", "doc_type": "code", "blob_id": "78abd96436c04fdf19e8e40807a4cab3b4564fa2", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/xuanyongcang/CoolWeather123 | 230 | FILENAME: FarmDefine.java | 0.281406 | package com.coolweather.app.db;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
/**
* Created by Administrator on 2015-07-23.
*/
public class FarmDefine extends SQLiteOpenHelper {
public static final String CREATE_FARMLOG = "create table FARMLOG ("
+ "text integer primary key autoincrement, "
+ "province_name text, "
+ "province_na text, "
+ "province_nam text, "
+ "province_nam1 text, "
+ "province_code text)";
public FarmDefine(Context context, String name, SQLiteDatabase.CursorFactory factory,
int version) {
super(context, name, factory, version);
}
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL(CREATE_FARMLOG); // 创建Farmlog表
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
db.execSQL("drop table if exists FARMLOG");
onCreate(db);
}
} |
9fedda91-f7ab-4f3d-85dc-e56ea7d08008 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-22 14:47:16", "repo_name": "mathmach/ShortUrl", "sub_path": "/src/main/java/br/com/matheus/machado/shorturl/dto/ResponseDTO.java", "file_name": "ResponseDTO.java", "file_ext": "java", "file_size_in_byte": 1089, "line_count": 62, "lang": "en", "doc_type": "code", "blob_id": "874887b8b4a7a15713b2290cd95a07f2c0d3fb79", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/mathmach/ShortUrl | 233 | FILENAME: ResponseDTO.java | 0.20947 | package br.com.matheus.machado.shorturl.dto;
import java.util.Date;
import java.util.List;
public class ResponseDTO<T> {
private Date timestamp;
private Integer status;
private T data;
private String error;
private List<String> errors;
public ResponseDTO() {
}
public ResponseDTO(List<String> errors) {
this.errors = errors;
}
public Date getTimestamp() {
return timestamp;
}
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
public List<String> getErrors() {
return errors;
}
public void setErrors(List<String> errors) {
this.errors = errors;
}
}
|
a6fe1c91-11d7-4660-a6b6-2c24c6e672fc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-07-20 08:22:25", "repo_name": "vickrame/bcode", "sub_path": "/bcode-camel-services/src/main/java/com/bcode/fwk/camel/context/route/UneRoute.java", "file_name": "UneRoute.java", "file_ext": "java", "file_size_in_byte": 1055, "line_count": 52, "lang": "en", "doc_type": "code", "blob_id": "28e853aac1cbbf41597d31885b1234b3977b017a", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/vickrame/bcode | 254 | FILENAME: UneRoute.java | 0.261331 | /**
*
*/
package com.bcode.fwk.camel.context.route;
import javax.inject.Named;
import org.apache.camel.builder.RouteBuilder;
/**
* @author vickrame
*
*/
@Named
public class UneRoute extends RouteBuilder {
private String data;
public UneRoute(){
System.out.println("creation de la route");
}
private String uriEndpoint;
/* (non-Javadoc)
* @see org.apache.camel.builder.RouteBuilder#configure()
*/
@Override
public void configure() throws Exception {
from(uriEndpoint).routeId("123456789")
// Set Body with text "Bean Injected"
.setBody().simple("Bean Injected")
// Lookup for bean injected by CDIcontainer
.beanRef("monBean", "getNom")
// Display response received in log when calling HelloWorld
.log(">> Response : ${body}");
}
/**
* @return the uriEndpoint
*/
public String getUriEndpoint() {
return uriEndpoint;
}
/**
* @param uriEndpoint the uriEndpoint to set
*/
public void setUriEndpoint(String uriEndpoint) {
this.uriEndpoint = uriEndpoint;
}
}
|
840459b4-5b1b-435d-a1c3-fd8993d829bc | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "markdown", "committer_date": "2020-01-12T21:42:57", "repo_name": "SannatKumar/Thesis_Project", "sub_path": "/Readme.md", "file_name": "Readme.md", "file_ext": "md", "file_size_in_byte": 1070, "line_count": 36, "lang": "en", "doc_type": "text", "blob_id": "b420580f4ac64bc3abc34d0b824b2e81b18de2cb", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/SannatKumar/Thesis_Project | 223 | FILENAME: Readme.md | 0.268941 | #Description
This Project takes English language text as user Input, analyze the
sentiment of the statement. After the analysis, input and result is
stored in the database using python script. The input and result is then
displayed in the Webpage using php script.
#Details
Python script
A python script rest.py takes the user input from command line. The script
uses Vader Sentiment Library to analyze the sentiment of the statement. The
input and the result is then updated to the database using mysql.connector.
php script
The php script connects to the database and display the input and Results
in a webpage.
#MySQL
Mysql is installed in the raspberry pi. A database with the name
"raspberry_pi_data" is created. The database has single table "nltk_results"
with three columns ID, UserInput and Results.
#Raspberry pi
The environment such as Apache,python and python libraries are installed
inside raspberry pi. After the program is run, the result page can be viewed
from different devices using the host address within the same network.
|
c16721fc-9fa3-4204-a0e7-fe97cf029be1 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2020-06-14 20:20:44", "repo_name": "Mintiss/AND1Exam", "sub_path": "/app/src/main/java/AND1/TheRasmussen/ui/lecture_seven/LectureSevenViewModel.java", "file_name": "LectureSevenViewModel.java", "file_ext": "java", "file_size_in_byte": 1139, "line_count": 47, "lang": "en", "doc_type": "code", "blob_id": "1298a9dbffde6e373b12984a4aab68a6a9d7fc98", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/Mintiss/AND1Exam | 197 | FILENAME: LectureSevenViewModel.java | 0.258326 | package AND1.TheRasmussen.ui.lecture_seven;
import android.app.Application;
import android.content.SharedPreferences;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import java.util.List;
public class LectureSevenViewModel extends AndroidViewModel {
private LectureSevenRepository repository;
public LectureSevenViewModel(Application application) {
super(application);
repository = LectureSevenRepository.getInstance(application);
}
public void storeColor(String color){
repository.storeColor(color);
}
public boolean preferencesContainColor() {
return repository.containsColor();
}
public String getColor() {
return repository.getColor();
}
public void storeColorInLocalDB(String color) {
repository.storeColorInLocalDB(color);
}
public LiveData<List<ColorEntity>> getPreviousColorList() {
return repository.getPreviousColorList();
}
public void clearList() {
repository.clearList();
}
}
|
122535db-64a9-4972-a6a6-330074eaf4a9 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-07-03 14:54:22", "repo_name": "heeyeah/place-search-project", "sub_path": "/src/main/java/place/dto/entity/SearchHistory.java", "file_name": "SearchHistory.java", "file_ext": "java", "file_size_in_byte": 1199, "line_count": 59, "lang": "en", "doc_type": "code", "blob_id": "7302779b89585a62a016f59fe8c733a3426e3e42", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/heeyeah/place-search-project | 247 | FILENAME: SearchHistory.java | 0.249447 | package place.dto.entity;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.time.LocalDateTime;
import java.util.UUID;
@Entity
@Table(name="SEARCH_HISTORY")
public class SearchHistory {
@Id
private String uuid;
private String userId;
private String keyword;
private LocalDateTime searchDttm;
private SearchHistory() {
}
public SearchHistory(String userId, String keyword, LocalDateTime searchDttm) {
this.uuid = UUID.randomUUID().toString();
this.userId = userId;
this.keyword = keyword;
this.searchDttm = searchDttm;
}
public String getUuid() {
return uuid;
}
public String getUserId() {
return userId;
}
public String getKeyword() {
return keyword;
}
public LocalDateTime getSearchDttm() {
return searchDttm;
}
@Override
public String toString() {
return "SearchHistory{" +
"uuid=" + uuid +
", userId='" + userId + '\'' +
", keyword='" + keyword + '\'' +
", searchDttm=" + searchDttm +
'}';
}
}
|
96286f6b-e8b5-4ac7-984d-e1777158996c | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-04-20 16:19:52", "repo_name": "jannoholm/pt-ar-game-3", "sub_path": "/ProxyServer2/server/server-api/src/main/java/com/playtech/ptargame3/api/AbstractMessage.java", "file_name": "AbstractMessage.java", "file_ext": "java", "file_size_in_byte": 1138, "line_count": 48, "lang": "en", "doc_type": "code", "blob_id": "1bdc4a406bc20f6b4cb673237e08106bc539d544", "star_events_count": 2, "fork_events_count": 1, "src_encoding": "UTF-8"} | https://github.com/jannoholm/pt-ar-game-3 | 229 | FILENAME: AbstractMessage.java | 0.27513 | package com.playtech.ptargame3.api;
import com.playtech.ptargame3.common.message.Message;
import com.playtech.ptargame3.common.message.MessageHeader;
import java.nio.ByteBuffer;
public abstract class AbstractMessage implements Message {
private final MessageHeader header;
public AbstractMessage(MessageHeader header) {
this.header = header;
}
@Override
public MessageHeader getHeader() {
return header;
}
@Override
public void parse(ByteBuffer messageData) {
}
@Override
public void format(ByteBuffer messageData) {
}
protected void toStringImpl(StringBuilder s) {
s.append("h=");
if (header instanceof MessageHeaderImpl) {
MessageHeaderImpl headerImpl = (MessageHeaderImpl)header;
headerImpl.toStringImpl(s);
} else {
s.append(header.toString());
}
}
@Override
public String toString() {
StringBuilder s = new StringBuilder();
s.append(getClass().getSimpleName()).append("(");
toStringImpl(s);
s.append(")");
return s.toString();
}
}
|
8b6559ef-193e-47f7-884b-f940a93270cb | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-06-07 20:40:35", "repo_name": "bortmex/LoanSystem", "sub_path": "/src/main/java/ru/javaproject/loansystem/web/user/RepresAjaxController.java", "file_name": "RepresAjaxController.java", "file_ext": "java", "file_size_in_byte": 1094, "line_count": 31, "lang": "en", "doc_type": "code", "blob_id": "f63e92bb84e13f0f9b8870e5bd09e4754104f4db", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/bortmex/LoanSystem | 213 | FILENAME: RepresAjaxController.java | 0.276691 | package ru.javaproject.loansystem.web.user;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import ru.javaproject.loansystem.model.Role;
import ru.javaproject.loansystem.model.User;
import ru.javaproject.loansystem.to.UserTo;
import ru.javaproject.loansystem.util.UsersUtil;
import javax.validation.Valid;
import java.util.List;
@RestController
@RequestMapping("/ajax/repres/part")
public class RepresAjaxController extends AbstractUserController {
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public List<User> getAllPartner() {
return UsersUtil.getAllPartnerList(super.getAll());
}
@PostMapping
public void createPartner(@Valid UserTo userTo) {
User user = new User(userTo.getId(), userTo.getName(), userTo.getEmail(), userTo.getPassword(), Role.ROLE_PARTNER);
super.create(user);
}
}
|
15f248cb-7a96-49a1-9fa2-8780b9216f77 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2015-11-24 00:27:58", "repo_name": "tylernolan/OOPDA_BikeShop", "sub_path": "/src/bikeShop/Order.java", "file_name": "Order.java", "file_ext": "java", "file_size_in_byte": 982, "line_count": 45, "lang": "en", "doc_type": "code", "blob_id": "dcbc9ceb39f56c534c297707f729385e0b0b665f", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/tylernolan/OOPDA_BikeShop | 260 | FILENAME: Order.java | 0.295027 | package bikeShop;
import java.util.HashMap;
/**
* Class for a hashmap of orders
*/
public class Order {
private HashMap<Item, Integer> itemsToOrder = new HashMap<>();
public Order()
{
}
public Order(HashMap<Item, Integer> itemsToOrder)
{
this.itemsToOrder = itemsToOrder;
}
/**
* increments the quantity of the item by the quantity specified.
* @param item the item you'd like to increase the quantity of
* @param quantity the quantity you'd like to increase by.
*/
public void addItemToOrder(Item item, int quantity)
{
for (Item i : itemsToOrder.keySet())
{
if (i.toString().equals(item.toString()))
{
Integer thing = itemsToOrder.get(i);
thing+=quantity;
return;
}
}
itemsToOrder.put(item, quantity);
}
@Override public String toString()
{
String retString = "";
for (Item i : itemsToOrder.keySet())
{
retString +="Item: "+ i.toString() + "\nQuantity: " + itemsToOrder.get(i) + "\n";
}
return retString;
}
}
|
0ed50ab2-4bf7-4f95-b0ca-723b75c1161f | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2019-10-31 15:24:46", "repo_name": "aliamzil/agentask", "sub_path": "/src/main/java/fr/dawan/agentask/bean/User.java", "file_name": "User.java", "file_ext": "java", "file_size_in_byte": 1053, "line_count": 65, "lang": "en", "doc_type": "code", "blob_id": "62a0b1d79add908760f7e61b7beeec54dbbd0b0b", "star_events_count": 1, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/aliamzil/agentask | 283 | FILENAME: User.java | 0.235108 | package fr.dawan.agentask.bean;
import java.util.Date;
import fr.dawan.agentask.enums.Role;
public class User {
private int id;
private String pseudo;
private String email;
private String pass;
private Date date;
/**
*
* @param id
* @param pseudo
* @param email
* @param pass
* @param date
*/
public User(int id, String pseudo, String email, String pass, Date date) {
this.id = id;
this.pseudo = pseudo;
this.email = email;
this.pass = pass;
this.date = date;
}
public User() {
super();
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getPseudo() {
return pseudo;
}
public void setPseudo(String pseudo) {
this.pseudo = pseudo;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPass() {
return pass;
}
public void setPass(String pass) {
this.pass = pass;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
}
|
d180086b-db31-4604-bb1b-f8c6d1d54567 | {"source": "refinecode", "ori_score": "", "domain": "code", "program_lang": "java", "committer_date": "2018-05-14 09:49:55", "repo_name": "hungnb94/Diary", "sub_path": "/app/src/main/java/example/com/hb/diary/fragment/ProgressFragment.java", "file_name": "ProgressFragment.java", "file_ext": "java", "file_size_in_byte": 990, "line_count": 36, "lang": "en", "doc_type": "code", "blob_id": "78a1b8b9159933e556a898f7ecf81a68b5e7d37b", "star_events_count": 0, "fork_events_count": 0, "src_encoding": "UTF-8"} | https://github.com/hungnb94/Diary | 176 | FILENAME: ProgressFragment.java | 0.213377 | package example.com.hb.diary.fragment;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import example.com.hb.diary.App;
import example.com.hb.diary.R;
public class ProgressFragment extends Fragment {
public ProgressFragment() {
// Required empty public constructor
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_progress, container, false);
App app = (App) getActivity().getApplication();
view.setBackgroundColor(app.getBackgroundColor());
return view;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.