blob_id
stringlengths 40
40
| directory_id
stringlengths 40
40
| path
stringlengths 4
410
| content_id
stringlengths 40
40
| detected_licenses
sequencelengths 0
51
| license_type
stringclasses 2
values | repo_name
stringlengths 5
132
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
80
| visit_date
timestamp[us] | revision_date
timestamp[us] | committer_date
timestamp[us] | github_id
int64 5.85k
689M
⌀ | star_events_count
int64 0
209k
| fork_events_count
int64 0
110k
| gha_license_id
stringclasses 22
values | gha_event_created_at
timestamp[us] | gha_created_at
timestamp[us] | gha_language
stringclasses 131
values | src_encoding
stringclasses 34
values | language
stringclasses 1
value | is_vendor
bool 1
class | is_generated
bool 2
classes | length_bytes
int64 3
9.45M
| extension
stringclasses 32
values | content
stringlengths 3
9.45M
| authors
sequencelengths 1
1
| author_id
stringlengths 0
313
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d3b5717412046b56caa4659e34ef5dd2ea3173a | cef6d4f1a0d17f35f0bce0d21c1901e5e2db62ed | /2da Parte/charat/src/charat/MuestraCaracteresApp.java | 5e1fa7498d81a83d972c0bc5f020b8e5820fc81d | [] | no_license | babolat22/cotorras | 11057e649cb5f3c4cb3656b9518d5e366292b218 | 3a4ab8f6e14401885ee66ab56bc56806a3593cef | refs/heads/master | 2023-07-31T19:47:06.084164 | 2021-09-16T02:01:55 | 2021-09-16T02:01:55 | 406,980,628 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,209 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package charat;
import java.util.Scanner;
/**
*
* @author juanj
*/
public class MuestraCaracteresApp {
public static void main(String[] args) {
Scanner sn=new Scanner(System.in);
//Pido al usuario que escriba una frase
System.out.println("Escriban una frase");
//Recomiendo usar nextLine en lugar de next por los espacios
String frase="es lindo vivir";
// String frase = sn.nextLine();
//Creamos un array de caracteres
//char caracteres[]=new char[frase.length()];
//Creamos un array de caracteres usando el metodo de String
char caracteres[]=frase.toCharArray();
char carac[]= new char[20];
//Recorremos la frase y cogemos cada caracter y lo metemos en el array
for(int i=0;i<frase.length();i++){
carac[i]=frase.charAt(i);
System.out.println("CharAT: "+carac[i]);
System.out.println("toChar: "+caracteres[i]);
}
}
}
| [
"[email protected]"
] | |
42176865c977839e64e4e684d4dfa5742371d9fb | 4873dff9f0e7275aeab8b6d9c13bda95318aa238 | /SpringBootExample/src/main/java/com/example/demo/controller/StudentController.java | d9f258e3687e25916ee3f81187564498e825be97 | [] | no_license | aseemahuja/SpringBootApp | 30c9921396fb0d69ad4b6b5d630f64b726852717 | 2f7dfbe726372a50dece7ff654e120512bd085ae | refs/heads/master | 2021-04-22T23:07:14.843312 | 2020-04-19T15:56:58 | 2020-04-19T15:56:58 | 249,879,431 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,262 | java | package com.example.demo.controller;
import java.util.List;
import java.util.Optional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
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 com.example.demo.data.ResponseDataSource;
import com.example.demo.exception.ServiceException;
import com.example.demo.model.GetStudentByIdResponse;
import com.example.demo.model.GetStudentListResponse;
import com.example.demo.model.Student;
import com.example.demo.model.StudentDataRequest;
@RestController
@RequestMapping("/student")
public class StudentController {
private static final Logger LOGGER = LoggerFactory.getLogger(StudentController.class);
@Autowired
ResponseDataSource responseDataSource;
@Value("${student.application.switch}")
boolean applicationSwitch;
@Value("${student.application.name}")
String applicationName;
@Value("#{'${student.application.studentIds}'.split(',')}")
List<Integer> studentIdList;
@RequestMapping("/data")
public String studentData() {
System.out.println("I'm in studentData...................");
LOGGER.info("I'm in studentData..applicationSwitch:{}... applicationName:{}...",applicationSwitch, applicationName);
LOGGER.error("I'm in studentData...................");
if(applicationSwitch) {
return "Greeting Students!! From:" +applicationName + studentIdList.get(1);
} else {
return "Greetings Guests!! From:" + applicationName + studentIdList.get(1);
}
}
@RequestMapping(value="/list", method = RequestMethod.GET)
public ResponseEntity<GetStudentListResponse> studentList()
{
GetStudentListResponse response = new GetStudentListResponse();
response.setStudentList(responseDataSource.getStudentDataFromDB());
if(null!=response.getStudentList() && !response.getStudentList().isEmpty()) {
return new ResponseEntity<>(response, HttpStatus.OK);
} else {
throw new ServiceException("DATA_NOT_FOUND");
}
}
@RequestMapping(value="/byId/{studentId}", method= RequestMethod.GET)
public ResponseEntity<GetStudentByIdResponse> studentDataById(@PathVariable(value="studentId") int studentId){
GetStudentByIdResponse response = new GetStudentByIdResponse();
if(StringUtils.isEmpty(studentId)) {
throw new ServiceException("STUDENT_ID_NOT_FOUND");
}
List<Student> studentList = ResponseDataSource.getStudentData();
Optional<Student> studentOptional = studentList
.stream()
.filter(student -> studentId==student.getStudentId())
.findFirst();
if(!studentOptional.isPresent()) {
response.setErrorMessage("Student Id not found");
return new ResponseEntity<>(response, HttpStatus.BAD_REQUEST);
} else {
response.setStudent(studentOptional.get());
return new ResponseEntity<>(response, HttpStatus.OK);
}
}
@RequestMapping(value="/add", method= RequestMethod.POST)
public ResponseEntity<GetStudentListResponse> addStudent(@RequestBody StudentDataRequest studentDataRequest){
GetStudentListResponse response = new GetStudentListResponse();
if(null== studentDataRequest
|| null== studentDataRequest.getStudent()
|| StringUtils.isEmpty(studentDataRequest.getStudent().getFirstName())) {
response.setErrorMessage("Student details not found in request.");
return new ResponseEntity<>(response, HttpStatus.BAD_REQUEST);
}
responseDataSource.addStudentToDB(studentDataRequest.getStudent());
List<Student> studentList = responseDataSource.getStudentDataFromDB();
//List<Student> studentList = ResponseDataSource.getStudentData();
//studentList.add(studentDataRequest.getStudent());
response.setStudentList(studentList);
return new ResponseEntity<>(response, HttpStatus.OK);
}
}
| [
"[email protected]"
] | |
573fb386bb3f00c3314681805285070b1842008d | e810dc89b79cd24217f41482bc5539d1dcdb9069 | /src/main/java/nz/ringfence/ack/web/websocket/dto/package-info.java | 2c1d56e6bcb6fc8848bfb7487640917a967421c2 | [] | no_license | AlexanderNZ/ack | 21bc0817249c4814dc07ba539c1b5baa02ddd5f0 | cb86e2ee8d00e566de618f18c90e76ec3760eeb6 | refs/heads/master | 2020-07-01T12:23:59.528162 | 2016-11-02T20:07:20 | 2016-11-02T20:07:20 | 74,078,045 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 103 | java | /**
* Data Access Objects used by WebSocket services.
*/
package nz.ringfence.ack.web.websocket.dto;
| [
"[email protected]"
] | |
33dded92b72e0107eedc7dd2975b4b5775414c00 | 5db42e96dfa0ad3f4e3a321d610fad94f5881e53 | /jobqueue/src/main/java/com/birbit/android/jobqueue/scheduling/GcmScheduler.java | 1f9e133f8229f8526b164e178ae4fa5aea8fa905 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | skynewborn/android-priority-jobqueue | b8ab3fc49b134add341b7bb5f530d1d2409731e6 | 7ca91565cc90be7e01ff8bda43bfa4263709bfbc | refs/heads/master | 2020-12-25T21:12:32.389618 | 2016-05-16T08:23:18 | 2016-05-16T08:23:18 | 29,381,959 | 1 | 0 | null | 2015-01-17T06:06:03 | 2015-01-17T06:06:02 | null | UTF-8 | Java | false | false | 6,683 | java | package com.birbit.android.jobqueue.scheduling;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import com.birbit.android.jobqueue.BatchingScheduler;
import com.birbit.android.jobqueue.log.JqLog;
import com.birbit.android.jobqueue.network.NetworkUtil;
import com.google.android.gms.gcm.GcmNetworkManager;
import com.google.android.gms.gcm.GcmTaskService;
import com.google.android.gms.gcm.OneoffTask;
import com.google.android.gms.gcm.Task;
import com.google.android.gms.gcm.TaskParams;
import java.util.UUID;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
public class GcmScheduler extends Scheduler {
private static final String KEY_UUID = "uuid";
private static final String KEY_ID = "id";
private static final String KEY_DELAY = "delay";
private static final String KEY_NETWORK_STATUS = "networkStatus";
private static SharedPreferences preferences;
private final GcmNetworkManager gcmNetworkManager;
private final Class<? extends GcmJobSchedulerService> serviceClass;
public GcmScheduler(Context context, Class<? extends GcmJobSchedulerService> serviceClass) {
this.serviceClass = serviceClass;
gcmNetworkManager = GcmNetworkManager.getInstance(context.getApplicationContext());
}
private static SharedPreferences getPreferences(Context context) {
synchronized (GcmScheduler.class) {
if (preferences == null) {
preferences = context.getSharedPreferences("jobqueue_gcm_scheduler",
Context.MODE_PRIVATE);
}
return preferences;
}
}
/**
* Creates a new ID for the job info. Can be overridden if you need to provide different ids not
* to conflict with the rest of your application.
*
* @return A unique integer id for the next Job request to be sent to system scheduler
*/
@SuppressLint("CommitPrefEdits")
public int createId() {
synchronized (GcmScheduler.class) {
final SharedPreferences preferences = getPreferences(getApplicationContext());
final int id = preferences.getInt(KEY_ID, 0) + 1;
preferences.edit().putInt(KEY_ID, id).commit();
return id;
}
}
@Override
public void request(SchedulerConstraint constraint) {
if (JqLog.isDebugEnabled()) {
JqLog.d("creating gcm wake up request for %s", constraint);
}
OneoffTask oneoffTask = new OneoffTask.Builder()
.setExecutionWindow(constraint.getDelayInMs(), constraint.getDelayInMs()
+ getExecutionWindowSizeInSeconds())
.setRequiredNetwork(toNetworkState(constraint.getNetworkStatus()))
.setPersisted(true)
.setService(serviceClass)
.setTag("jobmanager-" + createId())
.setExtras(toBundle(constraint))
.build();
gcmNetworkManager.schedule(oneoffTask);
}
/**
* GCMNetworkManager accepts an execution window for jobs so that it can batch them together for
* better battery utilization. You can override this method to provide a different execution
* window. The default value is {@link BatchingScheduler#DEFAULT_BATCHING_PERIOD_IN_MS} (converted
* to seconds).
*
* @return The execution window time for the Job request
*/
public long getExecutionWindowSizeInSeconds() {
return TimeUnit.MILLISECONDS.toSeconds(BatchingScheduler.DEFAULT_BATCHING_PERIOD_IN_MS);
}
@Override
public void cancelAll() {
gcmNetworkManager.cancelAllTasks(serviceClass);
}
private static int toNetworkState(@NetworkUtil.NetworkStatus int networkStatus) {
switch (networkStatus) {
case NetworkUtil.DISCONNECTED:
return Task.NETWORK_STATE_ANY;
case NetworkUtil.METERED:
return Task.NETWORK_STATE_CONNECTED;
case NetworkUtil.UNMETERED:
return Task.NETWORK_STATE_UNMETERED;
}
JqLog.e("unknown network status %d. Defaulting to CONNECTED", networkStatus);
return Task.NETWORK_STATE_CONNECTED;
}
private static Bundle toBundle(SchedulerConstraint constraint) {
Bundle bundle = new Bundle();
// put boolean is api 22
bundle.putString(KEY_UUID, constraint.getUuid());
bundle.putInt(KEY_NETWORK_STATUS, constraint.getNetworkStatus());
bundle.putLong(KEY_DELAY, constraint.getDelayInMs());
return bundle;
}
private static SchedulerConstraint fromBundle(Bundle bundle) {
SchedulerConstraint constraint = new SchedulerConstraint(bundle.getString(KEY_UUID));
if (constraint.getUuid() == null) {
// backward compatibility
constraint.setUuid(UUID.randomUUID().toString());
}
constraint.setNetworkStatus(bundle.getInt(KEY_NETWORK_STATUS, NetworkUtil.DISCONNECTED));
constraint.setDelayInMs(bundle.getLong(KEY_DELAY, 0));
return constraint;
}
public int onStartJob(TaskParams taskParams) {
SchedulerConstraint constraint = fromBundle(taskParams.getExtras());
if (JqLog.isDebugEnabled()) {
JqLog.d("starting job %s", constraint);
}
ResultCallback callback = new ResultCallback();
constraint.setData(callback);
start(constraint);
return callback.get() ? GcmNetworkManager.RESULT_RESCHEDULE : GcmNetworkManager.RESULT_SUCCESS;
}
@Override
public void onFinished(SchedulerConstraint constraint, boolean reschedule) {
Object data = constraint.getData();
if (JqLog.isDebugEnabled()) {
JqLog.d("finished job %s", constraint);
}
if (data instanceof ResultCallback) {
ResultCallback callback = (ResultCallback) data;
callback.onDone(reschedule);
}
}
private static class ResultCallback {
volatile boolean reschedule;
CountDownLatch latch;
public ResultCallback() {
latch = new CountDownLatch(1);
reschedule = false;
}
public boolean get() {
try {
latch.await(10 * 60, TimeUnit.SECONDS);
} catch (InterruptedException e) {
JqLog.e("job did not finish in 10 minutes :/");
}
return reschedule;
}
public void onDone(boolean reschedule) {
this.reschedule = reschedule;
latch.countDown();
}
}
}
| [
"[email protected]"
] | |
4ed8966bb0378225d145f9c71307053cf5b43e25 | 65905f969ffc8ab37dcdde6616ac7d3980b7fe2f | /src/first_week/statements/lekcja_statements.java | d53db39f7195158a9a1f581c308e0e8f0f177e5b | [] | no_license | MarcinRozkwitalski/ZSE_Praktyki | 88003b9c28a8b9aa9f1c61279593c17866cf9cb2 | 8d4c303cd246a0a7dfb2a42845787a0942dbca70 | refs/heads/master | 2023-04-06T04:29:32.647187 | 2021-03-18T21:49:04 | 2021-03-18T21:49:04 | 341,393,268 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,867 | java | package first_week.statements;
import java.util.Scanner;
public class lekcja_statements {
/*
postać instrukcji warunkowej IF oraz ELSE:
(musi istnieć IF przed ELSE):
if (warunek){
zrobCos1;
zrobCos2;
...
zrobCosX;
}
else{
zrobCosInnego1;
zrobCosInnego2;
...
zrobCosInnegoX;
}
*/
/*
if (warunek){
zrobCos1;
zrobCos2;
...
zrobCosX;
}
else{
zrobCosInnego1;
zrobCosInnego2;
...
zrobCosInnegoX;
}
if (warunek){
zrobCos1;
zrobCos2;
...
zrobCosX;
}
else{
zrobCosInnego1;
zrobCosInnego2;
...
zrobCosInnegoX;
}
if (warunek){
zrobCos1;
zrobCos2;
...
zrobCosX;
}
else{
zrobCosInnego1;
zrobCosInnego2;
...
zrobCosInnegoX;
}
*/
public static void main(String[] args) {
Scanner skaner = new Scanner(System.in);
boolean stan = false;
if(stan){
System.out.println("Wykonała się instrukcja IF.");
}
else{
System.out.println("Wykonała się instrukcja ELSE.");
}
System.out.print("Podaj swój wiek: ");
int wiek = skaner.nextInt();
if(wiek >= 18){
System.out.println("Jesteś pełnoletni!");
}
else{
System.out.println("Jesteś niepełnoletni!");
}
System.out.println("Podaj liczbę: ");
int liczba = skaner.nextInt();
if(10 < liczba && liczba < 20){
System.out.println("Liczba mieści się w zakresie.");
}
else{
System.out.println("Liczba NIE mieści się w zakresie.");
}
System.out.print("Podaj liczbę całkowitą A: ");
int a = skaner.nextInt();
System.out.print("Podaj liczbę całkowitą B: ");
int b = skaner.nextInt();
if(a > b){
System.out.println("A jest większe od B.");
}
if(a < b){
System.out.println("A jest mniejsze od B.");
}
if(a == b){
System.out.println("A jest równe B.");
}
if(a > b){
System.out.println("A jest większe od B.");
}
else {
if (a < b) {
System.out.println("A jest mniejsze od B.");
}
else {
System.out.println("A jest równe B.");
}
}
char charA = 'A';
char charB = 'B';
if (charA > charB){
System.out.println("charA ma większą wartość od charB w tabeli ASCII.");
}
else{
System.out.println("charA ma mniejszą wartość od charB w tabeli ASCII.");
}
String hello = "hello";
String world = "world";
if(hello.equals(world)){
System.out.println("hello jest równe world");
}
else {
System.out.println("hello nie jest równe world");
}
System.out.print("Podaj swój wybór (1, 2): ");
int x = skaner.nextInt();
switch (x){
case 1:
System.out.println("Przypadek pierwszy.");
break;
case 2:
System.out.println("Przypadek drugi.");
break;
default:
System.out.println("Nie wybrano poprawnej opcji.");
break;
}
System.out.print("Podaj swój wybór (1, 2, A, B): ");
String y = skaner.next();
switch (y){
case "1":
System.out.println("Przypadek pierwszy.");
break;
case "2":
System.out.println("Przypadek drugi.");
break;
case "A":
System.out.println("Przypadek A.");
break;
case "B":
System.out.println("Przypadek B.");
break;
default:
System.out.println("Nie wybrano poprawnej opcji.");
break;
}
System.out.print("Podaj swój wybór (1, 2, A, B): ");
char z = skaner.next().charAt(0);
switch (z){
case '1':
System.out.println("Przypadek pierwszy.");
break;
case '2':
System.out.println("Przypadek drugi.");
break;
case 'A':
System.out.println("Przypadek A.");
break;
case 'B':
System.out.println("Przypadek B.");
break;
default:
System.out.println("Nie wybrano poprawnej opcji.");
break;
}
}
}
| [
"[email protected]"
] | |
9f6d5deac2072a5a4a4b204a4201491cda0c1a3e | 1bd3c852d5ed20717cf2f4571dd2087ce9fbb5f0 | /src/main/com/hsw/main/App.java | f5b750f7f16fbdfd5397727c9a0327f8ab3bbe49 | [] | no_license | hsw123456/SpringTask | b98758d3a2279e8029fdd00a848172db66a7f1e8 | 0ad146bfe0798ca946975e9ebaf9197cf1aaaa84 | refs/heads/master | 2020-03-26T21:32:01.352267 | 2018-08-20T09:04:24 | 2018-08-20T09:04:24 | 145,393,419 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 424 | java | package com.hsw.main;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Hello world!
*/
public class App {
private static final Logger logger = LoggerFactory.getLogger(App.class);
public static void main(String[] args) {
System.out.println("Hello World!");
int i=1;
String j= "Hello";
String k= "World";
logger.error("haha:i={},j={},k={}",i,j,k);
}
}
| [
"[email protected]"
] | |
72763c34ef63973bbacdc2d441be5b4683da39d8 | 1953115dec10d657d671ff4441e36a7f7ee2bd4d | /src/main/java/com/econception/employemanagement/controller/LeaveController.java | ab7a43341478bc498acd035ed11eccf718002e49 | [] | no_license | salman-mehboob/employee-management-system | 508312db6d91fb4e4b99faa9cbbfea8e80ed8b64 | ffab44f5423a70a7ccd91dc745d01a2377f1c04c | refs/heads/master | 2023-08-28T06:59:35.111676 | 2021-10-12T20:44:51 | 2021-10-12T20:44:51 | 416,454,971 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,843 | java | package com.econception.employemanagement.controller;
import com.econception.employemanagement.domain.*;
import com.econception.employemanagement.domain.Module;
import com.econception.employemanagement.dto.LeavesDTO;
import com.econception.employemanagement.dto.NewEmployeeDTO;
import com.econception.employemanagement.enumeration.ApprovedStatus;
import com.econception.employemanagement.enumeration.ModuleTitles;
import com.econception.employemanagement.repository.*;
import com.econception.employemanagement.service.EmployeeLeaveService;
import com.econception.employemanagement.service.UserService;
import groovy.util.logging.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
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.servlet.ModelAndView;
import javax.validation.Valid;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import static com.econception.employemanagement.enumeration.ApprovedStatus.*;
import static com.econception.employemanagement.enumeration.ModuleTitles.Leaves;
@Controller
@Slf4j
@RequestMapping("/leave")
public class LeaveController {
@Autowired
UserRepository userRepository;
@Autowired
UserService userService;
@Autowired
LeaveCategoryRepository leaveCategoryRepository;
@Autowired
EmployeeLeavesRepository employeeLeavesRepository;
@Autowired
ModuleRepository moduleRepository;
@Autowired
CommentRepository commentRepository;
@Autowired
EmployeeLeaveService employeeLeaveService;
private Session session;
@RequestMapping("/showLeaves")
public String leaves(Model model) {
User user = userService.findUserByCurrentUserName();
if (user != null) {
model.addAttribute("userList", user);
List<LeavesCategories> leavesCategoriesList = leaveCategoryRepository.findAll();
model.addAttribute("leavesCategoriesList", leavesCategoriesList);
return "Leaves";
}
return null;
}
@RequestMapping("/requestLeave")
public ResponseEntity<String> requestLeave(@Valid LeavesDTO leavesDTO) {
EmployeeLeaves employeeLeaves = new EmployeeLeaves();
Employee employee = new Employee();
employee.setId(leavesDTO.getEmployeeID());
employeeLeaves.setEmployee(employee);
LeavesCategories leavesCategories = new LeavesCategories();
leavesCategories.setId(leavesDTO.getEmployeeLeaveId());
employeeLeaves.setLeavesCategories(leavesCategories);
DateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date dateobj = new Date();
String date1 = df.format(dateobj);
employeeLeaves.setDateCreated(date1);
employeeLeaves.setDateFrom(leavesDTO.getDateFrom());
employeeLeaves.setDateTo(leavesDTO.getDateTo());
EmployeeLeaves savedLeave = new EmployeeLeaves();
ApprovedStatus status = PENDING;
employeeLeaves.setStatus(status);
savedLeave = employeeLeavesRepository.save(employeeLeaves);
if(!leavesDTO.getText().isEmpty()) {
Comments comments = new Comments();
comments.setEmployee(employee);
comments.setText(leavesDTO.getText());
String date = df.format(dateobj);
comments.setDateCreated(date);
Module module1 = new Module();
module1.setId((long) 1);
comments.setModule(module1);
comments.setParent(savedLeave.getId());
commentRepository.save(comments);
}
return ResponseEntity.ok("Success");
}
@RequestMapping("/leavesRequestList")
public String leavesRequestList(Model model) {
// ApprovedStatus status1 = PENDING;
// ApprovedStatus status2 = APPROVED;
// ApprovedStatus status3 = REJECTED;
User user = userService.findUserByCurrentUserName();
if (user != null) {
Long id = user.getEmployee().getId();
List<EmployeeLeaves> employeeLeavesList1 = employeeLeavesRepository.findAllByEmployeeIdOrderByIdDesc(id);
model.addAttribute("requestLeavesList", employeeLeavesList1);
// List<EmployeeLeaves> employeeLeavesList2 = employeeLeavesRepository.findAllByStatusAndEmployeeId(status2, id);
// model.addAttribute("approvedLeavesList", employeeLeavesList2);
// List<EmployeeLeaves> employeeLeavesList3 = employeeLeavesRepository.findAllByStatusAndEmployeeId(status3, id);
// model.addAttribute("deniedLeavesList", employeeLeavesList3);
return "leavesRequestList";
}
return "leavesRequestList";
}
@RequestMapping("/requestListDetail")
public String requestListDetail(@RequestParam(value = "employeeLeaveId") Long employeeLeaveId, Model model) {
EmployeeLeaves employeeLeaves = employeeLeavesRepository.findById(employeeLeaveId)
.map(iss -> iss)
.orElseThrow();
List<Comments> commentsList = commentRepository.findAllByParentAndModuleId(employeeLeaveId, (long) 1);
model.addAttribute("employeeLeaveId", employeeLeaveId);
model.addAttribute("employeeLeaves", employeeLeaves);
model.addAttribute("comtList", commentsList);
return "requestListDetailForm";
}
}
| [
"[email protected]"
] | |
192b84d1bbf8e66136c1a16a59a2ab18d906d956 | 0b8333cb0f25ced0955f50c2fb8eec0ea07751d9 | /src/main/java/gds/health/security/jwt/JWTConfigurer.java | 1b8b7dd9458d874baa7a66a90dfc7e57142ea0ad | [] | no_license | sunxing109/twentyOnePoints | 0b5a75cf0446cfff0b9b4d012dda819764c653ab | 6404a0d25062ed0e22152b664b0407f4f2c6fe10 | refs/heads/master | 2022-12-23T16:18:24.945339 | 2019-09-12T08:06:46 | 2019-09-12T08:06:46 | 207,997,828 | 0 | 0 | null | 2022-12-16T05:03:31 | 2019-09-12T08:07:53 | Java | UTF-8 | Java | false | false | 850 | java | package gds.health.security.jwt;
import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.web.DefaultSecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
public class JWTConfigurer extends SecurityConfigurerAdapter<DefaultSecurityFilterChain, HttpSecurity> {
private TokenProvider tokenProvider;
public JWTConfigurer(TokenProvider tokenProvider) {
this.tokenProvider = tokenProvider;
}
@Override
public void configure(HttpSecurity http) throws Exception {
JWTFilter customFilter = new JWTFilter(tokenProvider);
http.addFilterBefore(customFilter, UsernamePasswordAuthenticationFilter.class);
}
}
| [
"[email protected]"
] | |
ed2d214ce19a8a280e984dbf486ae3c32136aa28 | e14bdeb92eab65e8bae00f3b29dfb9afac7c2ac2 | /src/main/java/zxc/person/design_pattern/pattern/behavioral/iterator/CourseIterator.java | 580e96b8a65e80c7ebbff70e20caedcd76d52362 | [] | no_license | zxccong/design_pattern | 153a64f0fbd2efc93242d62a4312469161563ff6 | 085339a640d11b15fdebc5996fd2c9d367ec0682 | refs/heads/master | 2022-06-28T18:01:51.809822 | 2019-08-08T14:48:14 | 2019-08-08T14:48:14 | 199,156,475 | 0 | 0 | null | 2022-06-21T01:37:28 | 2019-07-27T11:31:27 | Java | UTF-8 | Java | false | false | 202 | java | package zxc.person.design_pattern.pattern.behavioral.iterator;
/**
* Created by geely.
* 迭代器接口
*/
public interface CourseIterator {
Course nextCourse();
boolean isLastCourse();
}
| [
"[email protected]"
] | |
49dff34eca25f5093783912042c50df51b7ae084 | 95746979c032245baca8416e232400d939ad4f7f | /tests/robotests/src/com/android/settings/gestures/ButtonNavigationSettingsAssistControllerTest.java | d961cdf161d40548bfc382ad51b373fbb3a2e2e0 | [
"Apache-2.0"
] | permissive | Bootleggers-BrokenLab/packages_apps_Settings | a62382fb552834a1caf4e9c8f945165108b65f00 | bfbe2603b66216093677a932774c2a32c6f85a8c | refs/heads/tirimbino | 2023-08-22T13:42:41.667571 | 2023-05-27T17:14:30 | 2023-05-27T17:14:30 | 213,136,686 | 0 | 2 | NOASSERTION | 2019-11-26T13:12:57 | 2019-10-06T08:57:16 | Java | UTF-8 | Java | false | false | 3,474 | java | /*
* Copyright (C) 2021 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.gestures;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
import android.content.Context;
import android.content.res.Resources;
import android.provider.Settings;
import androidx.test.core.app.ApplicationProvider;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
@RunWith(RobolectricTestRunner.class)
public class ButtonNavigationSettingsAssistControllerTest {
private static final String KEY_LONG_PRESS_HOME_FOR_ASSIST =
"assistant_long_press_home_gesture";
private Context mContext;
private Resources mResources;
private ButtonNavigationSettingsAssistController mController;
@Before
public void setUp() {
mContext = spy(ApplicationProvider.getApplicationContext());
mResources = mock(Resources.class);
when(mContext.getResources()).thenReturn(mResources);
mController = new ButtonNavigationSettingsAssistController(
mContext, KEY_LONG_PRESS_HOME_FOR_ASSIST);
}
@Test
public void isChecked_valueUnknownDefaultTrue_shouldReturnTrue() {
when(mResources.getBoolean(
com.android.internal.R.bool.config_assistLongPressHomeEnabledDefault)).thenReturn(
true);
assertThat(mController.isChecked()).isTrue();
}
@Test
public void isChecked_valueUnknownDefaultFalse_shouldReturnFalse() {
when(mResources.getBoolean(
com.android.internal.R.bool.config_assistLongPressHomeEnabledDefault)).thenReturn(
true);
assertThat(mController.isChecked()).isTrue();
}
@Test
public void isChecked_valueTrue_shouldReturnTrue() {
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED, 1);
assertThat(mController.isChecked()).isTrue();
}
@Test
public void isChecked_valueFalse_shouldReturnFalse() {
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED, 0);
assertThat(mController.isChecked()).isFalse();
}
@Test
public void setChecked_valueFalse_shouldSetFalse() {
mController.setChecked(false);
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED, -1)).isEqualTo(0);
}
@Test
public void setChecked_valueTrue_shouldSetTrue() {
mController.setChecked(true);
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED, -1)).isEqualTo(1);
}
}
| [
"[email protected]"
] | |
b13a6c522715735cf8c548e62670fef923921d21 | 3d3161098b38a4ba74b52eb8c53c70745e60289e | /app/src/main/java/com/groovin101/chooseyourownadventure/MainActivity.java | 7dc300f259a0355d15c58ced8af7a72a04b0f736 | [] | no_license | groovin101/android-cyoa | 3b53a38260d90d727eb9444eb1c169c4bea7d6a1 | adf1b72bfde66431770329ea80ba57d91fcf7e6d | refs/heads/master | 2020-09-16T05:01:15.053974 | 2016-08-24T13:44:55 | 2016-08-24T13:44:55 | 66,372,032 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,235 | java | package com.groovin101.chooseyourownadventure;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
private EditText nameField;
private Button startButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
nameField = (EditText)findViewById(R.id.nameEditText);
startButton = (Button)findViewById(R.id.startButton);
startButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
String name = nameField.getText().toString();
Toast.makeText(MainActivity.this, name, Toast.LENGTH_SHORT).show();
startStoryActivity(name);
}
});
}
private void startStoryActivity(String username) {
Intent intent = new Intent(this, StoryActivity.class);
intent.putExtra("NAME", username);
startActivity(intent);
}
}
| [
"[email protected]"
] | |
3d65195d1b96185b33648ca2c20320969c0ef47e | c0e3af1cee9fc53559f76b0f361fc7258e9fd821 | /scala/scala-impl/testdata/projectsForHighlightingTests/local/akka-samples/src/main/java/sample/java/sharding/ShardingApp.java | ce9f0cbab9ee556b10be6112067f47fb199217a5 | [
"LicenseRef-scancode-public-domain",
"CC0-1.0",
"Apache-2.0"
] | permissive | JetBrains/intellij-scala | b2924f4265466a2609a40dad6cb6285d9b41abd4 | 4059fba4822e1cb9ed820b2303f8a6eb28c8620a | refs/heads/idea232.x | 2023-08-31T23:17:57.635634 | 2023-08-30T13:08:09 | 2023-08-30T13:08:09 | 2,756,223 | 1,000 | 430 | Apache-2.0 | 2023-05-17T16:20:39 | 2011-11-11T14:34:07 | Scala | UTF-8 | Java | false | false | 866 | java | package sample.java.sharding;
import akka.actor.ActorSystem;
import akka.actor.Props;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
public class ShardingApp {
public static void main(String[] args) {
if (args.length == 0)
startup(new String[] { "2551", "2552", "0" });
else
startup(args);
}
public static void startup(String[] ports) {
for (String port : ports) {
// Override the configuration of the port
Config config = ConfigFactory.parseString(
"akka.remote.netty.tcp.port=" + port).withFallback(
ConfigFactory.load());
// Create an Akka system
ActorSystem system = ActorSystem.create("ShardingSystem", config);
// Create an actor that starts the sharding and sends random messages
system.actorOf(Props.create(Devices.class));
}
}
} | [
"[email protected]"
] | |
1ecb7b63aacec0310ee9bbc22bcb35b9a3b93a07 | 885eea52e8746eb1c05a1d2a32cdc4d6ff33e98a | /Hoofdstuke3.java | dd02b6035cb115a4ace66ce53ecff0b6bd1932d1 | [] | no_license | daedalusbc304/rocva-basisprog | 53356b8275175b5625d9e72704e34211130f9396 | 3b21a2dfc1526fbf373f4fc9ee421cbbefcea937 | refs/heads/master | 2020-12-25T14:33:28.699038 | 2016-11-06T21:25:22 | 2016-11-06T21:25:22 | 67,059,654 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,884 | java | package Hoofdstuke3;
// Dit is een opdracht voor het vaak basis programirring
//Dit is samengemaakt met Anthony en Ismail
import java.awt.Graphics;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
//PCJFRAME
public class Hoofdstuke3 extends JFrame
{
public static void main( String args[] )
{
JFrame frame = new Hoofdstuke3 ();
frame.setSize( 550, 350);
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.setTitle( "Opdracht voor cijfer" );
JPanel paneel = new Paneel();
frame.setContentPane( paneel );
frame.setVisible( true );
}
}
///BELANGRIJK
class Paneel extends JPanel {
private int x;
private int y;
private int antwoord1;
private JTextField invoervak1, invoervak2, resultaatVak;
private JButton plusKnop;
private float antwoord2;
private JButton schakel;
private int diameter;
//public panel
public Paneel () {
x = 3;
y = 8;
antwoord1 = x + y;
antwoord2 = (float)x / y;
invoervak1 = new JTextField( 10 );
invoervak2 = new JTextField( 10 );
resultaatVak = new JTextField( 10 );
plusKnop = new JButton( "+" );
plusKnop.addActionListener( new PlusKnopHandler () );
add( invoervak1 );
add( invoervak2 );
add( plusKnop );
add( resultaatVak );
setBackground( Color.WHITE );
diameter = 10;
schakel = new JButton( "Groter");
schakel.addActionListener( new KnopHandler2() );
add( schakel );
}
//inwnedige klasse
class PlusKnopHandler implements ActionListener {
public void actionPerformed(ActionEvent e ) {
String invoerstring1 = invoervak1.getText();
int getal1 = Integer.parseInt( invoerstring1 );
String invoerstring2 = invoervak2.getText();
int getal2 = Integer.parseInt( invoerstring2 );
int resultaat = getal1 + getal2;
resultaatVak.setText( "" + resultaat );
}
}
class KnopHandler2 implements ActionListener {
public void actionPerformed( ActionEvent e ) {
diameter++;
repaint();
}
}
public void paintComponent( Graphics g ) {
super.paintComponent( g );
g.drawString( "Overzicht van de berekening", 40, 200);
g.drawString( "x = " + x, 40, 240 );
g.drawString( "y = " + y, 40, 260 );
g.drawString( "De som is: " + antwoord1, 40, 280);
g.drawString( "De deling in decimaal: " + antwoord2, 40, 300);
g.setColor( Color.BLUE );
g.fillOval( 150, 100, diameter, diameter );
}
} | [
"[email protected]"
] | |
28a0b28c12d7a4c694d051cbe42f64e9bd9d17fb | 6721c72a07072a52fe6a4984c7ecad7db22cac7e | /verclaim/src/main/java/com/idhub/magic/did/parser/ParserContext.java | 56d54c02492ff2a5ae0a59984accf34b1197a04c | [] | no_license | idhub-did-plus/magic-center | f5502e1190d795c9737a1edd9ab4f2e2b2c84f2c | ac3cd126882de91bcfc7b4c8bda811976b5a2c8c | refs/heads/master | 2020-07-05T03:09:31.618624 | 2020-06-15T08:01:07 | 2020-06-15T08:01:07 | 202,502,778 | 0 | 0 | null | 2019-08-15T08:22:09 | 2019-08-15T08:22:09 | null | UTF-8 | Java | false | false | 2,292 | java | /* -----------------------------------------------------------------------------
* ParserContext.java
* -----------------------------------------------------------------------------
*
* Producer : com.parse2.aparse.Parser 2.5
* Produced : Fri Apr 19 22:09:52 CEST 2019
*
* -----------------------------------------------------------------------------
*/
package com.idhub.magic.did.parser;
import java.util.Stack;
public class ParserContext {
public final String text;
public int index;
private Stack<Integer> startStack = new Stack<Integer>();
private Stack<String> callStack = new Stack<String>();
private Stack<String> errorStack = new Stack<String>();
private int level = 0;
private int errorIndex = 0;
private final boolean traceOn;
public ParserContext(String text, boolean traceOn) {
this.text = text;
this.traceOn = traceOn;
index = 0;
}
public void push(String rulename) {
push(rulename, "");
}
public void push(String rulename, String trace) {
callStack.push(rulename);
startStack.push(new Integer(index));
if (traceOn) {
System.out.println("-> " + ++level + ": " + rulename + "(" + (trace != null ? trace : "") + ")");
System.out.println(
index + ": " + text.substring(index, index + 10 > text.length() ? text.length() : index + 10)
.replaceAll("[\\x00-\\x1F]", " "));
}
}
public void pop(String function, boolean result) {
Integer start = startStack.pop();
callStack.pop();
if (traceOn) {
System.out.println("<- " + level-- + ": " + function + "(" + (result ? "true" : "false") + ",s=" + start
+ ",l=" + (index - start) + ",e=" + errorIndex + ")");
}
if (!result) {
if (index > errorIndex) {
errorIndex = index;
errorStack = new Stack<String>();
errorStack.addAll(callStack);
} else if (index == errorIndex && errorStack.isEmpty()) {
errorStack = new Stack<String>();
errorStack.addAll(callStack);
}
} else {
if (index > errorIndex)
errorIndex = 0;
}
}
public Stack<String> getErrorStack() {
return errorStack;
}
public int getErrorIndex() {
return errorIndex;
}
}
/*
* -----------------------------------------------------------------------------
* eof
* -----------------------------------------------------------------------------
*/
| [
"[email protected]"
] | |
b3c50a8c02cda56f54e18383732693a1af54e113 | 1393305d4573ac73d159d9efd2d58ade00f17dc8 | /Java/BD/Trabalho 2/src/DBConnection.java | 8fc826ab54e9294daffe199b3955fd9c5b774d47 | [] | no_license | ShutDownMan/UniProjects | f865136169b4626fc79e92c36e5c6590496216d2 | 40704eb1f51f82df50fb7497985c2ab55a3aff26 | refs/heads/master | 2022-06-02T22:38:04.137699 | 2022-05-12T00:19:40 | 2022-05-12T00:19:40 | 113,806,338 | 3 | 2 | null | 2022-04-04T23:04:57 | 2017-12-11T03:11:54 | C++ | UTF-8 | Java | false | false | 9,974 | java | import Entity.*;
import java.sql.*;
import java.util.ArrayList;
import java.util.Properties;
class DBConnection {
private Connection connection;
void initialize() throws SQLException {
String url = "jdbc:postgresql://localhost:5432/empresa_telecom";
Properties props = new Properties();
props.setProperty("user", "postgres");
props.setProperty("password", "NotSafePasswd321");
connection = DriverManager.getConnection(url, props);
}
void populate() throws SQLException {
Statement st;
// ResultSet rs;
st = this.connection.createStatement();
st.execute("INSERT INTO rua(nome) VALUES " +
"('Rio de Janeiro'), ('377'), ('Brasil')");
st.execute("INSERT INTO logradouro(nome) VALUES " +
"('rua'), ('avenida'), ('rodovia')");
st.execute("INSERT INTO pais(nome) VALUES " +
"('Brasil')");
st.execute("INSERT INTO estado(nome, id_pais) VALUES " +
"('Parana', 1)");
st.execute("INSERT INTO cidade(nome, id_estado) VALUES " +
"('foz do iguacu', 1), ('curitiba', 1)");
st.execute("INSERT INTO endereco(id_rua, id_logradouro, id_cidade, numero) VALUES " +
"(1, 1, 1, 44), (2, 3, 2, 1456), (3, 2, 1, 445)");
st.execute("INSERT INTO empresa_telecomunicacao(razao_social, cnpj, id_endereco) VALUES " +
"('Click Internet', '12345678910119', 1)");
st.execute("INSERT INTO cliente(nome, cpf, id_endereco) VALUES " +
"('Guilherme Sganderla', '43423798645', 2)," +
"('Vivian Fugihara', '46716678352', 3)");
st.execute("INSERT INTO fatura(cod_barra, vencimento, emissao, id_empresa_telecomunicacao) VALUES " +
"('1312151245495486', DATE '2019-09-30', DATE '2019-09-13', 1), " +
"('5166516516516651', DATE '2019-08-29', DATE '2019-09-13', 1)");
st.execute("INSERT INTO cliente_fatura(id_cliente, id_fatura) VALUES " +
"(1, 2)," +
"(2, 1)");
st.execute("INSERT INTO ligacao(id_fatura, valor, hora, duracao, telefone, tipo) VALUES " +
"(2, 1.27, TIMESTAMP WITH TIME ZONE '2019-08-15 13:15:54-03', INTERVAL '0 hours 07 mins 12 secs', '+55 45 9945-1231', 'local')," +
"(2, 3.50, TIMESTAMP WITH TIME ZONE '2019-08-16 21:51:21-03', INTERVAL '0 hours 21 mins 51 secs', '+45 15 1651-515', 'internacional')," +
"(2, 2.44, TIMESTAMP WITH TIME ZONE '2019-08-16 06:23:12-03', INTERVAL '0 hours 16 mins 31 secs', '+55 45 9906-3072', 'local')," +
"(2, 3.57, TIMESTAMP WITH TIME ZONE '2019-08-16 02:16:11-03', INTERVAL '0 hours 28 mins 51 secs', '+55 41 9842-0677', 'interurbano')," +
"(2, 5.32, TIMESTAMP WITH TIME ZONE '2019-08-16 15:46:12-03', INTERVAL '0 hours 41 mins 01 secs', '+55 45 9855-11191', 'local')");
st.execute("INSERT INTO ligacao(id_fatura, valor, hora, duracao, telefone, tipo) VALUES " +
"(1, 3.19, TIMESTAMP WITH TIME ZONE '2019-09-15 22:23:54-03', INTERVAL '0 hours 32 mins 33 secs', '+55 45 9926-5773', 'local')," +
"(1, 1.26, TIMESTAMP WITH TIME ZONE '2019-09-16 10:15:12-03', INTERVAL '0 hours 06 mins 02 secs', '+55 45 9842-0677', 'local')," +
"(1, 2.11, TIMESTAMP WITH TIME ZONE '2019-09-16 12:16:11-03', INTERVAL '0 hours 19 mins 10 secs', '+55 41 9842-0677', 'interurbano')," +
"(1, 2.08, TIMESTAMP WITH TIME ZONE '2019-09-16 12:16:11-03', INTERVAL '0 hours 19 mins 30 secs', '+55 41 84165-5447', 'interurbano')," +
"(1, 3.59, TIMESTAMP WITH TIME ZONE '2019-09-16 16:46:21-03', INTERVAL '0 hours 21 mins 21 secs', '+45 15 1651-515', 'internacional')," +
"(1, 4.34, TIMESTAMP WITH TIME ZONE '2019-09-16 21:53:12-03', INTERVAL '0 hours 53 mins 35 secs', '+55 45 9926-5773', 'local')");
st.execute("INSERT INTO internet(id_fatura, data, volume, valor) VALUES" +
"(1, TIMESTAMP WITH TIME ZONE '2019-09-15 16:26:45-03', 2640, 0.03)," +
"(1, TIMESTAMP WITH TIME ZONE '2019-09-16 01:57:39-03', 51302, 0.68)," +
"(1, TIMESTAMP WITH TIME ZONE '2019-09-16 18:46:30-03', 21584, 0.20)");
st.execute("INSERT INTO internet(id_fatura, data, volume, valor) VALUES" +
"(2, TIMESTAMP WITH TIME ZONE '2019-08-15 17:13:42-03', 561320, 10.15)," +
"(2, TIMESTAMP WITH TIME ZONE '2019-08-16 14:52:28-03', 651350, 12.41)");
st.close();
}
ArrayList<Cliente> searchClientByName(String buffer) throws SQLException {
ArrayList<Cliente> clientes = new ArrayList<>();
Statement st = this.connection.createStatement();
ResultSet rs;
rs = st.executeQuery("SELECT * FROM cliente WHERE nome LIKE '%" + buffer + "%'");
while (rs.next()) {
clientes.add(new Cliente(
rs.getInt("id"),
rs.getString("nome"),
rs.getString("cpf"),
this.getEnderecoById(rs.getInt("id_endereco"))));
}
st.close();
rs.close();
return clientes;
}
private Endereco getEnderecoById(int id) throws SQLException {
Endereco foundEndereco = null;
Statement st = this.connection.createStatement();
ResultSet rs;
rs = st.executeQuery("SELECT * FROM endereco WHERE id=" + id + "");
rs.next();
foundEndereco = new Endereco(
rs.getInt("id"),
getStringAttrTableId("rua", "nome", rs.getInt("id_rua")),
getStringAttrTableId("logradouro", "nome", rs.getInt("id_logradouro")),
getStringAttrTableId("cidade", "nome", rs.getInt("id_cidade")),
rs.getInt("numero"));
st.close();
rs.close();
return foundEndereco;
}
private String getStringAttrTableId(String table, String attr, int id) throws SQLException {
Statement st = this.connection.createStatement();
ResultSet rs = st.executeQuery("SELECT * FROM " + table + " WHERE id=" + id + "");
rs.next();
String res = rs.getString(attr);
st.close();
rs.close();
return res;
}
Cliente getClientById(int id) throws SQLException {
Cliente foundCliente = null;
Statement st = this.connection.createStatement();
ResultSet rs;
rs = st.executeQuery("SELECT * FROM cliente WHERE id=" + id + "");
rs.next();
foundCliente = new Cliente(
rs.getInt("id"),
rs.getString("nome"),
rs.getString("cpf"),
this.getEnderecoById(rs.getInt("id_endereco")));
st.close();
rs.close();
return foundCliente;
}
ArrayList<Fatura> getFaturasByClientId(int id) throws SQLException {
ArrayList<Fatura> faturas = new ArrayList<>();
Cliente foundCliente = this.getClientById(id);
Statement st = this.connection.createStatement();
ResultSet rs;
if (foundCliente == null)
return null;
rs = st.executeQuery("SELECT * FROM fatura WHERE id=" + id + "");
while (rs.next()) {
faturas.add(new Fatura(
rs.getInt("id"),
rs.getString("cod_barra"),
rs.getString("vencimento"),
rs.getString("emissao"),
rs.getInt("id_empresa_telecomunicacao")));
}
st.close();
rs.close();
return faturas;
}
Fatura getFaturaById(int id) throws SQLException {
Fatura foundFatura = null;
Statement st = this.connection.createStatement();
ResultSet rs;
rs = st.executeQuery("SELECT * FROM fatura WHERE id=" + id + "");
rs.next();
foundFatura = new Fatura(
rs.getInt("id"),
rs.getString("cod_barra"),
rs.getString("vencimento"),
rs.getString("emissao"),
rs.getInt("id_empresa_telecomunicacao"));
st.close();
rs.close();
return foundFatura;
}
ArrayList<Ligacao> getLigacoesByFaturaId(int id) throws SQLException {
ArrayList<Ligacao> faturas = new ArrayList<>();
Fatura foundFatura = this.getFaturaById(id);
Statement st = this.connection.createStatement();
ResultSet rs;
if (foundFatura == null)
return null;
rs = st.executeQuery("SELECT * FROM ligacao WHERE id_fatura=" + id + "");
while (rs.next()) {
faturas.add(new Ligacao(
rs.getInt("id"),
rs.getString("hora"),
rs.getFloat("valor"),
rs.getInt("id_fatura"),
rs.getString("duracao"),
rs.getString("telefone"),
rs.getString("tipo")));
}
st.close();
rs.close();
return faturas;
}
ArrayList<Internet> getInternetByFaturaId(int id) throws SQLException {
ArrayList<Internet> internetList = new ArrayList<>();
Fatura foundFatura = this.getFaturaById(id);
Statement st = this.connection.createStatement();
ResultSet rs;
if (foundFatura == null)
return null;
rs = st.executeQuery("SELECT * FROM internet WHERE id_fatura=" + id + "");
while (rs.next()) {
internetList.add(new Internet(
rs.getInt("id"),
rs.getString("data"),
rs.getInt("volume"),
rs.getFloat("valor"),
rs.getInt("id_fatura")));
}
st.close();
rs.close();
return internetList;
}
void close() throws SQLException {
this.connection.close();
}
}
| [
"[email protected]"
] | |
19816d04b69eed4458bac9c236494ecfc53d3aa7 | d00ee8570e4b88cbee1aa0280d5748e8ba03db1c | /exampleplain/src/main/java/com/anadeainc/exampleplain/firstscreen/FirstPresenter.java | 929e6c18bed882e4591f294bd6ed673c207ca3ac | [
"LicenseRef-scancode-public-domain",
"Unlicense"
] | permissive | shinevit/LightMVP | ad49c9b6ab548505503fa0a0deb68d1c7c4cee16 | 500cc31e3eefddb01afc712149d144b2f3cb99c5 | refs/heads/master | 2020-03-11T15:36:59.516748 | 2017-02-08T14:25:03 | 2017-02-08T14:25:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 536 | java | package com.anadeainc.exampleplain.firstscreen;
import android.support.annotation.NonNull;
import com.anadeainc.lightmvp.Presenter;
class FirstPresenter extends Presenter<FirstMvp.View> implements FirstMvp.Presenter {
private int counter;
@Override
public void attachView(@NonNull FirstMvp.View mvpView) {
super.attachView(mvpView);
mvpView().setScreenTitle();
mvpView().setCounter(++counter);
}
@Override
public void onButtonClick() {
mvpView().toSecondActivity();
}
}
| [
"[email protected]"
] | |
620a7639c4ffd32c0682e435220834f758c66bd8 | e02522140a29387738fb80af5c5980db7341c390 | /modules/metrics/src/test/java/com/spotify/apollo/metrics/ConfigTest.java | 2f580a858d18e1ec4df4be195d47279f5f63376d | [
"Apache-2.0"
] | permissive | irock/apollo | 7461650b8e60f8b024d5759e81376ae77104c264 | f97640154371c426b21d6c3bd8afa7a5eee7bc1e | refs/heads/master | 2020-12-21T19:14:30.953874 | 2019-12-09T12:03:56 | 2019-12-09T12:03:56 | 236,531,859 | 0 | 0 | Apache-2.0 | 2020-01-27T16:09:47 | 2020-01-27T16:09:46 | null | UTF-8 | Java | false | false | 1,719 | java | /*
* -\-\-
* Spotify Apollo Metrics Module
* --
* Copyright (C) 2013 - 2016 Spotify AB
* --
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* -/-/-
*/
package com.spotify.apollo.metrics;
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
import static org.junit.Assert.assertEquals;
@RunWith(Enclosed.class)
public class ConfigTest {
public static class FfwdSettings {
@Test
public void ffwdScheduleDefaultsToEvery39Seconds() {
String json = "{}";
FfwdConfig ffwdCompletelyEmpty = new FfwdConfig(conf(json));
String ffwdjson = "{\"ffwd\":{}}";
FfwdConfig ffwdEmpty = new FfwdConfig(conf(ffwdjson));
assertEquals(30, ffwdCompletelyEmpty.getInterval());
assertEquals(30, ffwdEmpty.getInterval());
}
@Test
public void ffwdScheduleCanBeSetFromConfig() {
String json = "{\"ffwd\":{ \"interval\": 15}}";
FfwdConfig ffwd = new FfwdConfig(conf(json));
assertEquals(15, ffwd.getInterval());
}
}
private static Config conf(String json) {
return ConfigFactory.parseString(json);
}
}
| [
"[email protected]"
] | |
3dc86fdb000bce173a388f844b98096484de5604 | 0de4ed4a4434063f9c6974b5e1bc7b5953bd5265 | /src/main/java/com/example/demo/model/Game.java | 55d6e329061ae3e9b28ce5dcd3e4a5f8e88c6c3f | [] | no_license | contactniraj/tictactoe | 6ad62ff3cb83f36de9e4d16b1f7101673958c12b | ccf1cced53ae2a8544828ab85f5548bc98ac30bd | refs/heads/master | 2021-05-07T16:56:59.514573 | 2017-10-30T22:50:08 | 2017-10-30T22:50:08 | 108,688,200 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,693 | java | package com.example.demo.model;
import com.example.demo.exceptions.GameException;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
@EqualsAndHashCode(exclude={"board", "gameSteps"})
public class Game {
@Getter
@Setter
private String id;
@Getter
private char[][] board = new char[3][3];
@Getter
private Player player1;
@Getter
private Player player2;
@Getter
private Player winner;
private List<GameStep> gameSteps;
public Game(String channelId, String player1, String player2){
this.id = channelId;
this.player1 = new Player(player1);
this.player2 = new Player(player2);
char count = '1';
for(int i=0; i<board.length; i++){
for(int j=0;j<board.length;j++){
board[i][j] = count++;
}
}
}
public Response start(){
this.player1.setSymbol('X');
this.player2.setSymbol('O');
this.gameSteps = new ArrayList<>();
return new Response(null, board, "", player1, player2);
}
public Response start(String id, Player p1, Player p2){
this.player1 = p1;
this.player1.setSymbol('X');
this.player2 = p2;
this.player2.setSymbol('O');
this.gameSteps = new ArrayList<>();
return new Response(null, board, "", player1, player2);
}
public Response play(Player player, int x, int y){
validateUser(player);
validateCell(x,y);
gameSteps.add(new GameStep(player, x, y));
board[x][y] = player.getSymbol();
doPlayerWon(player, x, y);
Player nextPlayer = getNextPlayer(player);
if(this.winner != null){
return new Response(winner, board,
"", player,
nextPlayer,
"Congratulations " + winner.toString() +", you won!! Play again soon");
}
return new Response(null,
board,
"",
player,
nextPlayer,
"Game on, Take your turn " + nextPlayer.toString());
}
public void doPlayerWon(Player player, int x, int y) {
char symbol = player.getSymbol();
boolean hasWon = (board[x][0] == symbol && symbol == board[x][1] && symbol == board[x][2])
|| (board[0][y] == symbol && board[1][y] == symbol && symbol == board[2][y])
|| (x == y && board[0][0] == symbol && board[1][1] == symbol && board[2][2] == symbol)
|| (x + y == 2 && board[0][2] == symbol && symbol == board[1][1] && board[2][0] == symbol);
if(hasWon) {
winner = player;
};
}
private void validateUser(Player p){
if(!(p.equals(player1) || p.equals(player2))) {
throw new GameException(this, p.getId() + " cannot participate in this game");
}
if(gameSteps.size() > 0 && p.equals(gameSteps.get(gameSteps.size()-1).getPlayer())){
throw new GameException(this, "Wait!! go slow. Next play belongs to other user " + getNextPlayer(p).toString());
}
}
private void validateCell(int x, int y){
if(!( (0 <= x && x < board.length) || (0 <= y && y < board[0].length))){
throw new GameException(this, "Please know your boundries[1-9] for game :D ");
}
if(board[x][y] == 'X' || board[x][y] == 'O'){
throw new GameException(this, "Please choose unused slot");
}
}
public Response view(String channel){
Player winner = getWinner();
Player nextPlayer = gameSteps.size() > 0?getNextPlayer(gameSteps.get(gameSteps.size()-1).getPlayer()):player1;
if(winner != null){
return new Response(winner, board, "",
gameSteps.get(gameSteps.size()-1).getPlayer(), nextPlayer,
"Congratulations " + winner.toString() +", you won!! Play again soon");
}
return new Response(null, board,"",
gameSteps.get(gameSteps.size()-1).getPlayer(), nextPlayer,
"Game on," + nextPlayer.toString() + " takes the next turn" );
}
public boolean isFinished(){
return true;
}
public boolean isRowUnique(char[] row, char ch){
boolean isUnique = true;
for(char c:row){
if(c != ch){
return false;
}
}
return isUnique;
}
public boolean isColumnUnique(int column, char ch){
boolean isUnique = true;
for(int i=0; i<board[0].length;i++ ){
if(board[i][column] != ch){
return false;
}
}
return isUnique;
}
public boolean isDiagonalUniqe(char ch){
boolean isUnique = true;
for(int i=0, j=0; i<board.length; i++,j++){
if(board[i][j] != ch){
return false;
}
}
for(int i=0, j=board.length-1; i<board.length; i++, j--){
if(board[i][j] != ch){
return false;
}
}
return isUnique;
}
public Player getPlayerById(String id){
if(player1.getId().equals(id)){
return player1;
}else if(player2.getId().equals(id)){
return player2;
}
return null;
}
public Player getNextPlayer(Player currentPlayer){
if(player1.getId().equals(currentPlayer.getId())){
return player2;
}else{
return player1;
}
}
public boolean isGameDone(){
return gameSteps.size() == 9;
}
}
| [
"[email protected]"
] | |
be8f41680d056b05e46400dd81e89aee1fc19698 | 45dd9e8dc389f9f99e4f4e626dd2b03aec7329bc | /app/src/main/java/com/aiqing/kaiheiba/MyActivity.java | e507cce617f0e8ca0273734914431c4654a931b4 | [] | no_license | huxq17/app | fb0538f375ad2c85c677da58429bdc10ea5437ab | d80be52541ce064affbc4b87455a4e6861bc432c | refs/heads/master | 2020-03-07T09:46:06.305994 | 2018-05-19T14:28:23 | 2018-05-19T14:28:23 | 127,415,644 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,023 | java | package com.aiqing.kaiheiba;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.aiqing.kaiheiba.common.BaseActivity;
import com.aiqing.kaiheiba.login.LoginAct;
import com.aiqing.kaiheiba.neteasyim.IMActivity;
import com.aiqing.kaiheiba.personal.download.MyDownloadAct;
import com.aiqing.kaiheiba.personal.invite.InviteFriendAct;
import com.aiqing.kaiheiba.personal.profile.EditPersonProfileAct;
import com.aiqing.kaiheiba.personal.relationship.MyFansAct;
import com.aiqing.kaiheiba.personal.relationship.MyFollowAct;
import com.aiqing.kaiheiba.personal.wallet.MyWalletAct;
import com.aiqing.kaiheiba.personal.wallet.TradeRecordAct;
import com.aiqing.kaiheiba.settings.SettingsAct;
import pub.devrel.easypermissions.AfterPermissionGranted;
public class MyActivity extends BaseActivity {
private final int RC_BASIC_PERMISSIONS = 1;
/**
* 基本权限管理
*/
private final String[] BASIC_PERMISSIONS = new String[]{
android.Manifest.permission.WRITE_EXTERNAL_STORAGE,
android.Manifest.permission.READ_EXTERNAL_STORAGE,
android.Manifest.permission.CAMERA,
android.Manifest.permission.READ_PHONE_STATE,
android.Manifest.permission.RECORD_AUDIO,
android.Manifest.permission.ACCESS_COARSE_LOCATION,
android.Manifest.permission.ACCESS_FINE_LOCATION
};
@AfterPermissionGranted(RC_BASIC_PERMISSIONS)
private void onBasicPermissionGranted() {
// takePhoto();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void jumpToPersonalProfile(View v) {
jumpTo(EditPersonProfileAct.class);
}
public void jumpToMyFollow(View v) {
jumpTo(MyFollowAct.class);
}
public void jumpToMyFans(View v) {
jumpTo(MyFansAct.class);
}
public void jumpToMyDowload(View v) {
jumpTo(MyDownloadAct.class);
}
public void jumpToMyWallet(View v) {
jumpTo(MyWalletAct.class);
}
public void jumpToTradeRecord(View v) {
jumpTo(TradeRecordAct.class);
}
public void jumpToInviteFriend(View v) {
jumpTo(InviteFriendAct.class);
}
public void jumpToSettings(View v) {
jumpTo(SettingsAct.class);
}
public void jumpToLogin(View v) {
jumpTo(LoginAct.class);
}
public void jumpToIM(View v) {
jumpTo(IMActivity.class);
}
private void jumpTo(Class<?> activity) {
Intent intent = new Intent(this, activity);
startActivity(intent);
}
public static void start(Context context) {
Intent intent = new Intent(context, MyActivity.class);
// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);
// intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
context.startActivity(intent);
}
}
| [
"[email protected]"
] | |
438e2f7d730d70dff895a5c7d8b19d204991e201 | 9d09df7eded8f2922b6e80bfeba7c9fb53ac1a60 | /org/pscafepos/backends/domain/pos/GlobalPOSPropertiesImpl.java | 3050c5c3ca74d44beba766b086d4a7445462edba | [] | no_license | bugzmanov/PSCafepos.fork | 3bcabe29cc453a9bce1440eb7ada158402b89601 | 3e1948ffc2a66c0c07ae8756a91dea47382ea5f1 | refs/heads/master | 2020-08-06T15:26:30.580054 | 2013-05-14T07:43:14 | 2013-05-14T07:43:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,734 | java | /* PSCafePOS is an Open Source Point of Sale System for Schools
* Copyright (C) 2007 Charles Syperski
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
*/
package org.pscafepos.backends.domain.pos;
import org.pscafepos.backends.database.dao.ResultsetProcessor;
import org.pscafepos.backends.pos.IPosSettings;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import org.pscafepos.backends.database.dao.BasePOSDao;
import org.pscafepos.backends.database.dao.DAOException;
public class GlobalPOSPropertiesImpl extends BasePOSDao implements GlobalPOSProperties {
private int registrationID;
private Map<String, String> propertiesCach;
public GlobalPOSPropertiesImpl(int registrationID) {
this.registrationID = registrationID;
propertiesCach = new HashMap<String,String>();
}
public GlobalPOSPropertiesImpl(Connection connection, IPosSettings settings, int posRegistrationId) {
super(connection, settings);
this.registrationID = posRegistrationId;
}
public String getMessage() throws DAOException {
String sql = "select m_text, m_id from " + posTablesPrefix + "pos_messages where m_posid = " + registrationID + " and m_viewed <> '1'";
List<String> messages = executeQuery(sql, new ResultsetProcessor<String>() {
public String processEntity(ResultSet resultSet) throws SQLException {
String updateSql = "update " + posTablesPrefix + "pos_messages set m_viewed = '1' where m_id = '" + resultSet.getInt("m_id") + "'";
executeUpdateSqlSilently(updateSql);
return resultSet.getString("m_text");
}
});
return messages.isEmpty() ? null : messages.get(0);
}
public boolean hasMessage() throws DAOException {
String sql = "select count(*) as cnt from " + posTablesPrefix + "pos_messages where m_posid = '" + registrationID + "' and m_viewed <> '1'";
Boolean hasMessage = executeSingleResultQuery(sql, new ResultsetProcessor<Boolean>() {
public Boolean processEntity(ResultSet resultSet) throws SQLException {
return resultSet.getInt("cnt") > 0;
}
});
return hasMessage != null ? hasMessage : false;
}
public String getGeneralSettings(String key) throws DAOException {
String value = propertiesCach.get(key);
if(propertiesCach.containsKey(key)){
return value;
}
String sql = "select set_value from " + posTablesPrefix + "pos_settings where set_key = '" + key + "' and set_posid = '" + registrationID + "'";
value = executeSingleResultQuery(sql, new ResultsetProcessor<String>() {
public String processEntity(ResultSet resultSet) throws SQLException {
return resultSet.getString("set_value");
}
});
propertiesCach.put(key, value);
return value;
}
}
| [
"[email protected]"
] | |
c24b01e27f913f566d19bfba08bd657652d83904 | 46ff29d986dbc25e8f104bf19b19a5daea96c05d | /src/main/java/com/dewey/core/controller/DataInsertController.java | 1c79846d5cacc2201a37e7b47d49ba59de916daa | [] | no_license | DeweyNULL/dataMaker | 1e661015c084fbafbe162749933a6bdca58febbd | 100064a7ed0a46d35666d526250784e78f61b25d | refs/heads/master | 2022-07-03T16:33:04.170412 | 2019-07-26T08:48:53 | 2019-07-26T08:48:53 | 198,635,796 | 0 | 0 | null | 2022-06-21T01:32:14 | 2019-07-24T12:56:20 | Java | UTF-8 | Java | false | false | 1,901 | java | package com.dewey.core.controller;
import com.alibaba.fastjson.JSONObject;
import com.dewey.core.service.DataInsertService;
import com.dewey.core.utils.MapUtils;
import com.dewey.core.utils.TaskMapUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ThreadPoolExecutor;
/**
* @program dataMaker
* @description: 数据开始插入
* @author: xielinzhi
* @create: 2019/07/24 20:11
*/
@RestController
@RequestMapping("/insert")
@Slf4j
public class DataInsertController {
@Autowired
DataInsertService dataInsertService;
@PostMapping("/start")
public ResponseEntity add(@RequestBody Map<String, Object> params){
Map<String ,Object> returnMap = new HashMap<>();
int id = MapUtils.getInteger(params,"id",0);
int size = MapUtils.getInteger(params,"size",0);
String tableName = MapUtils.getString(params,"tableName","");
returnMap.put("msg",dataInsertService.insertTask(id,size,tableName));
return ResponseEntity.ok(returnMap);
}
@PostMapping("/check")
public ResponseEntity getSchedule(@RequestBody Map<String, Object> params){
Map<String ,Object> returnMap = new HashMap<>();
int id = MapUtils.getInteger(params,"id",0);
int size = MapUtils.getInteger(params,"size",0);
String tableName = MapUtils.getString(params,"tableName","");
returnMap.put("schedule",dataInsertService.checkTask(id,tableName,size));
return ResponseEntity.ok(returnMap);
}
}
| [
"[email protected]"
] | |
c5990f13110a107d3b12846502d5ea7315cb2d49 | 4d05782d86c549eeea0e78fdba5b40f1d03862dc | /app/src/main/java/tech/boshu/changjiangshidai/ui/activity/stockinfo/allocatehistory/IStockAllocateHistoryPresenter.java | f2c5d1729aec245d5236f84744f4aa335a53c491 | [] | no_license | JETYIN/changjiang | 4898367cbff2b1c981aebb4b46df78a57d1d4967 | ff16ed18dddc8e197f6b2458e6b71bb8f2941fb2 | refs/heads/master | 2020-09-22T06:05:35.757974 | 2016-08-29T14:24:14 | 2016-08-29T14:24:14 | 66,849,827 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 356 | java | package tech.boshu.changjiangshidai.ui.activity.stockinfo.allocatehistory;
import tech.boshu.changjiangshidai.libs.activity.IBasePresenter;
/**
* @author allipper
* @version 1.00 2016/1/6
* @(#)IStockAllocateHistoryPresenter.java
*/
public interface IStockAllocateHistoryPresenter extends IBasePresenter {
void add();
void gotoSearch();
} | [
"[email protected]"
] | |
13cee66008501495995185d0111f55d6276f721d | 1c416d6a81e6e65041ae3ca97f745bfc55337ca4 | /Multithread.java | 176cd92b3d0e06c3c957101be7ee2cbe6c0523c7 | [] | no_license | Neeti29/Java-Programs | 97b1725e69be13b9405cf6b0f69f525c4216c6c5 | 96cf43470568823a040dddeacdf701feb086ded4 | refs/heads/master | 2020-04-23T15:31:45.202181 | 2019-03-18T11:22:52 | 2019-03-18T11:22:52 | 171,268,638 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 670 | java | package Threads;
class MultithreadDemo extends Thread
{
public void run()
{
try
{
//Displaying the thread that is running
System.out.println("Thread " + Thread.currentThread().getId() + " is running");
}
catch(Exception e)
{
//Throwing an exception
System.out.println("Exception is caught");
}
}
}
public class Multithread {
public static void main(String[] args) {
// TODO Auto-generated method stub
int n=8; //Number of threads
for(int i=0;i<n;i++)
{
MultithreadDemo object=new MultithreadDemo();
object.start();
}
System.out.println("This is the Main Thread");
}
}
| [
"[email protected]"
] | |
74389bc47afd664290dca08009429b851529edc5 | f50746ff091593ce231d0821a7179d7c7cc99ddc | /src/main/java/pe/edu/upc/serviceimpl/TiendaServiceImpl.java | 4d15d6d302b5f4e8856d38ef0c359c7482b4d7f0 | [] | no_license | Leslie144/demoIdealPC | 4b27fa3e5d96b452ef69217f8cc7dd2c871e5b34 | 6ddb43dffcb750b3ffe09a1cecbbeca407501e42 | refs/heads/master | 2023-08-13T02:59:13.310898 | 2021-09-29T00:48:36 | 2021-09-29T00:48:36 | 407,984,164 | 0 | 0 | null | 2021-09-27T21:04:46 | 2021-09-18T22:54:41 | Java | UTF-8 | Java | false | false | 779 | java | package pe.edu.upc.serviceimpl;
import java.util.List;
import javax.enterprise.context.RequestScoped;
import javax.inject.Inject;
import javax.inject.Named;
import pe.edu.upc.dao.ITiendaDao;
import pe.edu.upc.entities.Tienda;
import pe.edu.upc.service.ITiendaService;
@Named
@RequestScoped
public class TiendaServiceImpl implements ITiendaService{
@Inject
private ITiendaDao tDao;
@Override
public void insert(Tienda t) {
tDao.insert(t);
}
@Override
public void eliminar(int idTienda) {
tDao.eliminar(idTienda);
}
@Override
public void modificar(Tienda tienda) {
tDao.modificar(tienda);
}
@Override
public List<Tienda>list(){
return tDao.list();
}
@Override
public List<Tienda> finByNameTienda(Tienda de) {
return tDao.finByNameTienda(de);
}
}
| [
"[email protected]"
] | |
3c6d7425ac29902bb0ddb79541f190527237b7d5 | 721d7291504d76ffb3dcd3159bd91434246ae0b2 | /src/neunet/HeuristicEvaluation.java | 44ec05a8996e74bdcacf0089182a758fec1d6390 | [] | no_license | Mika412/Checkers-Neuroevolution | 929e07bc74861689d0f67eb9fa86995c42b9770b | be45ea84a56a1ae743fb3362da96dde32ce065fe | refs/heads/master | 2020-05-02T16:58:48.366160 | 2019-03-27T23:21:44 | 2019-03-27T23:21:44 | 178,084,855 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,154 | java | package neunet;
import checkers.*;
import java.util.ArrayList;
import java.util.List;
/**
* Heuristic evaluation class
*/
public class HeuristicEvaluation {
boolean typeA = true; //Switch to check between normalized and real values
/**
* Evaluation function
* @param board current board
* @param player which player, black or white
* @return
*/
public double[] evaluateBoard(Board board, Player player) {
double[] boardValue;
if (player == Player.black) {
boardValue = getScore(board.getFlipped());
} else {
boardValue = getScore(board);
}
return boardValue;
}
/**
* Temporary class to save board positions
*/
private static class TempPos{
int row;
int col;
TempPos(int row, int col){
this.row = col;
this.col = row;
}
}
/**
* Calculate score for the board
*
* @param board board configuration
* @return an array of scores
*/
private double[] getScore(Board board) {
White white = new White();
Black black = new Black();
int nPawns = 0;
int nKings = 0;
int enemyPawns = 0;
int enemyKings = 0;
int safePawns = 0;
int safeKings = 0;
int movablePawns = 0;
int movableKings = 0;
int defenderPieces = 0;
int centralPawns = 0;
int centralKings = 0;
int cornerPawns = 0;
int cornerKings = 0;
int aggregatedDistance = 0;
int unocPromotion = 0;
int lonerPawns = 0;
int lonerKings = 0;
int countEmpty = 0;
double agrDistPawns = 0;
double agrDistKings = 0;
List<TempPos> blacksPos = new ArrayList<>();
List<TempPos> whitesPos = new ArrayList<>();
// Scan across the board
for (int r = 0; r < Board.rows; r++) {
// Check only valid cols
int c = (r % 2 == 0) ? 0 : 1;
for (; c < Board.cols; c += 2) {
CellEntry entry = board.cell[r][c];
// 1,2. Check pawns and kings
if (entry == CellEntry.white)
nPawns++;
else if (entry == CellEntry.whiteKing)
nKings++;
// 1,2. Check pawns and kings
if (entry == CellEntry.black)
enemyPawns++;
else if (entry == CellEntry.blackKing)
enemyKings++;
// 2,3. Check if the pawn and king is safe
if(entry == CellEntry.white && (c == 0 || c == Board.cols-1))
safePawns++;
else if(entry == CellEntry.whiteKing && (c == 0 || c == Board.cols-1))
safeKings++;
// 4,5. Check if pawn and king is movable
if(entry == CellEntry.white) {
if(white.ForwardLeftForWhite(r, c, board) != null || white.ForwardRightForWhite(r, c, board) != null)
movablePawns += 1;
}else if(entry == CellEntry.whiteKing) {
if(white.ForwardLeftForWhite(r, c, board) != null || white.ForwardRightForWhite(r, c, board) != null || white.BackwardLeftForWhite(r, c, board) != null || white.BackwardRightForWhite(r, c, board) != null)
movableKings += 1;
}
// 9. Defender pieces
if(r < 2 && (entry == CellEntry.white || entry == CellEntry.whiteKing))
defenderPieces++;
// 10. Attacking pieces
if(r > 4 && entry == CellEntry.white)
defenderPieces++;
// Aggregated distance
if(entry == CellEntry.white)
aggregatedDistance += 7 - r;
if(entry == CellEntry.empty && r == 7)
unocPromotion++;
//Central pawns and kings
if(r > 1 && r < 6 && c > 1 && c < 6){
if(entry == CellEntry.white)
centralPawns++;
else if(entry == CellEntry.whiteKing)
centralKings++;
}
//Pawns and kings in the corner
if((r == 0 && c == 0) || (r == 7 && c == 7)) {
if (entry == CellEntry.white)
cornerPawns++;
else if (entry == CellEntry.whiteKing)
cornerKings++;
}
//Count lonely pieces
if(white.ForwardLeftForWhite(r, c, board) != null
&& white.ForwardRightForWhite(r, c, board) != null
&& white.BackwardLeftForWhite(r, c, board) != null
&& white.BackwardRightForWhite(r, c, board) != null) {
if (entry == CellEntry.white)
lonerPawns++;
else if(entry == CellEntry.whiteKing)
lonerKings++;
}
//Count empty slots
if(entry == CellEntry.empty)
countEmpty++;
if(entry == CellEntry.black || entry == CellEntry.blackKing)
blacksPos.add(new TempPos(r, c));
if(entry == CellEntry.white || entry == CellEntry.whiteKing)
whitesPos.add(new TempPos(r, c));
}
}
for(TempPos w : whitesPos){
for(TempPos b : blacksPos){
double dx = Math.abs(w.col - b.col); //Col
double dy = Math.abs(w.row - b.row); //Row
if(black.equals(CellEntry.black))
agrDistPawns += Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
else
agrDistKings += Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
}
}
if(typeA) {
double difPawns = (nPawns - enemyPawns) / 12.0f;
difPawns = (difPawns + 12.0f) / (12f + 12f);
double difKings = (nKings - enemyKings) / 12.0f;
difKings = (difKings + 12.0f) / (12f + 12f);
double[] result = new double[]{nPawns / 12f, nKings / 12f, difPawns, difKings, safePawns / 12f, safeKings / 12f, movablePawns / 12f, movableKings / 12f, defenderPieces / 8f, centralPawns / 8f, centralKings / 8f, cornerPawns / 2f, cornerKings / 2f, aggregatedDistance / 20f, unocPromotion / 4f, lonerPawns / 12f, lonerKings / 12f, countEmpty / 24f, agrDistPawns / 1000f, agrDistKings / 1000f};
return result;
}else{
double difPawns = nPawns - enemyPawns;
double difKings = nKings - enemyKings;
double[] result = new double[]{nPawns, nKings, difPawns, difKings, safePawns, safeKings, movablePawns, movableKings, defenderPieces, centralPawns, centralKings, cornerPawns, cornerKings, aggregatedDistance, unocPromotion, lonerPawns, lonerKings, countEmpty, agrDistPawns, agrDistKings};
return result;
}
}
}
| [
"[email protected]"
] | |
3173796a023db2f0aef36f22eabd68800786b47d | 534d10446c104ca6efde8db41460aa5928800777 | /src/main/java/com/niit/interact/daoimpl/BlogLikesDAOImpl.java | 9f07c0a360dbe88a0e45b0d895823b1ffaa80ba0 | [] | no_license | TejaswiGudimalla/InteractBackEnd | 2bb901d4f186d54cb76a87b91f3f0f0ab11cd30b | 993ebf5c71127941a844dcbece5b6a1b66183396 | refs/heads/master | 2020-04-06T04:12:32.597514 | 2017-03-18T04:04:28 | 2017-03-18T04:04:28 | 83,013,885 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,254 | java | package com.niit.interact.daoimpl;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.niit.interact.dao.BlogLikesDAO;
import com.niit.interact.model.BlogLikes;
@SuppressWarnings({ "unchecked", "deprecation" })
@Repository
public class BlogLikesDAOImpl implements BlogLikesDAO {
@Autowired
private SessionFactory sessionFactory;
public BlogLikesDAOImpl(SessionFactory sessionFactory) {
this.sessionFactory=sessionFactory;
}
@Transactional
public boolean saveOrUpdate(BlogLikes blogLikes) {
try {
sessionFactory.getCurrentSession().saveOrUpdate(blogLikes);
System.out.println("save");
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
@Transactional
public boolean delete(BlogLikes blogLikes) {
try {
sessionFactory.getCurrentSession().delete(blogLikes);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
@SuppressWarnings("rawtypes")
@Transactional
public BlogLikes list(int uid, int bid) {
String hql="from Bloglikes where blogid='"+bid+"' and userid='"+uid+"'";
Query query=sessionFactory.getCurrentSession().createQuery(hql);
List<BlogLikes>list= query.list();
if(list==null)
{
return null;
}
else
{
return list.get(0);
}
}
@Transactional
public List<BlogLikes> bloglist(int bid) {
Criteria c=sessionFactory.getCurrentSession().createCriteria(BlogLikes.class);
c.add(Restrictions.eq("blogid",bid));
List<BlogLikes> list=c.list();
return list;
}
@Transactional
public List<BlogLikes> list(int uid) {
// Criteria c=sessionFactory.getCurrentSession().createCriteria(BlogLikes.class);
String hql = "from BlogLikes where userid ="+uid;
List<BlogLikes> list=sessionFactory.getCurrentSession().createQuery(hql).list();
System.err.println("featching BlogLikes..........!");
return list;
}
}
| [
"hp-pc@Teja"
] | hp-pc@Teja |
eb5d9be61aeeb59b24b73175f7b6c0e31aa236c8 | 678a3d58c110afd1e9ce195d2f20b2531d45a2e0 | /sources/com/airbnb/android/contentframework/fragments/StoryFeedFragment$$Lambda$1.java | 2b19f3abdffe1650a989d38083a1ea0940e2cf71 | [] | no_license | jasonnth/AirCode | d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5 | d37db1baa493fca56f390c4205faf5c9bbe36604 | refs/heads/master | 2020-07-03T08:35:24.902940 | 2019-08-12T03:34:56 | 2019-08-12T03:34:56 | 201,842,970 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 652 | java | package com.airbnb.android.contentframework.fragments;
import android.support.p000v4.widget.SwipeRefreshLayout.OnRefreshListener;
final /* synthetic */ class StoryFeedFragment$$Lambda$1 implements OnRefreshListener {
private final StoryFeedFragment arg$1;
private StoryFeedFragment$$Lambda$1(StoryFeedFragment storyFeedFragment) {
this.arg$1 = storyFeedFragment;
}
public static OnRefreshListener lambdaFactory$(StoryFeedFragment storyFeedFragment) {
return new StoryFeedFragment$$Lambda$1(storyFeedFragment);
}
public void onRefresh() {
StoryFeedFragment.lambda$onCreateView$0(this.arg$1);
}
}
| [
"[email protected]"
] | |
5c3ddac52c14f1c77191940544b988a592f175da | dd39d6f7c5129d8d3a9d597245cc9e4f220eeb8d | /src/main/java/geym/nn/mlperceptron/MIPerceptronAndOutputNoLearn.java | 53cc51bf17c3d58c4d500e3da087acabf1816139 | [] | no_license | anglabace/nn.practice | 2a0bb74bffa6634895825da7d8ce8d5f6941a1bd | 069ba22810ea6461d7551bd18c7c8c4508f43bab | refs/heads/master | 2022-04-07T20:06:49.061136 | 2020-02-24T15:24:31 | 2020-02-24T15:24:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,413 | java | package geym.nn.mlperceptron;
import org.neuroph.core.Connection;
import org.neuroph.core.Layer;
import org.neuroph.core.Neuron;
import org.neuroph.core.Weight;
import org.neuroph.core.input.And;
import org.neuroph.core.transfer.Linear;
import org.neuroph.nnet.comp.neuron.BiasNeuron;
import org.neuroph.nnet.comp.neuron.InputNeuron;
import org.neuroph.util.*;
import java.util.List;
public class MIPerceptronAndOutputNoLearn extends MlPerceptron {
public MIPerceptronAndOutputNoLearn(TransferFunctionType transferFunctionType, int... neuronsInLayers) {
super(transferFunctionType, neuronsInLayers);
}
@Override
protected void createNetWork(List<Integer> neuronsInLayers, NeuronProperties neuronProperties) {
this.setNetworkType(NeuralNetworkType.MULTI_LAYER_PERCEPTRON);
NeuronProperties inputNeuronProperties = new NeuronProperties(InputNeuron.class, Linear.class);
Layer layer = LayerFactory.createLayer(neuronsInLayers.get(0), inputNeuronProperties);
layer.addNeuron(new BiasNeuron());
this.addLayer(layer);
Layer prevLayer = layer;
int layerIdx;
for (layerIdx = 1; layerIdx < neuronsInLayers.size() - 1; layerIdx++) {
Integer neuronsNum = neuronsInLayers.get(layerIdx);
layer = LayerFactory.createLayer(neuronsNum, neuronProperties);
layer.addNeuron(new BiasNeuron());
this.addLayer(layer);
ConnectionFactory.fullConnect(prevLayer, layer);
prevLayer = layer;
}
Neuron n1=layer.getNeuronAt(0);
List<Connection> c1=n1.getInputConnections();
c1.get(0).setWeight(new Weight(2));
c1.get(1).setWeight(new Weight(2));
c1.get(2).setWeight(new Weight(-1));
Neuron n2=layer.getNeuronAt(1);
List<Connection> c2=n2.getInputConnections();
c2.get(0).setWeight(new Weight(-2));
c2.get(1).setWeight(new Weight(-2));
c2.get(2).setWeight(new Weight(3));
//建立输出层
Integer neuronsNum=neuronsInLayers.get(layerIdx);
NeuronProperties outProperties=new NeuronProperties();
outProperties.put("inputFunction", And.class);
layer=LayerFactory.createLayer(neuronsNum,outProperties);
this.addLayer(layer);
ConnectionFactory.fullConnect(prevLayer,layer);
NeuralNetworkFactory.setDefaultIO(this);
}
}
| [
"[email protected]"
] | |
f5bee9dde84d41c8f796a964bd691b40b8cc259d | 45b8a2e5c2724191b5c750a3cd8886df3fe694ad | /Operadores.java | 502638cd57eb62f9cda45bd2755031bb337b86fe | [] | no_license | aliadame/Programacion-Avanzada-JAVA-UABC-FCAyS | 45b02fdc9def8ade709fa9310e6668653a68f9e2 | fb3a0da27bc26cea0a98ae60e86b7da973e3aa3a | refs/heads/master | 2022-04-22T17:00:23.177836 | 2020-03-17T17:25:49 | 2020-03-17T17:25:49 | 240,076,823 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,963 | java | /**
* Copyright <YEAR> <COPYRIGHT HOLDER>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package operadores;
/**
* Esta clase ilustra el uso de los operadores en el lenguaje Java
* @author Ali Adame
*/
public class Operadores {
/**
* El siguiente es un metodo que suma valores
* utilizando argumentos variables
* @return double indicando el resultado
* @param argumentos, arreglos de datos a sumar
*/
public double sumar(double... argumentos) {
double resultado = 0.0D;
for (int i = 0; i < argumentos.length; i++) {
resultado = resultado + argumentos[i];
}
return resultado;
}
/**
* El siguiente es un metodo que resta valores
* utilizando argumentos variables
* @param argumentos, arreglo de datos a restar
* @return double indicando el resultado
*/
public double restar(int inicio, double... argumentos) {
double resultado = argumentos[inicio];
for (double arg : argumentos) {
if(inicio != 0) {
if(arg > 0) {
resultado = resultado - (arg);
} else {
resultado = resultado + (arg);
}
} else {
inicio = 1;
}
}
return resultado;
}
/**
* El siguiente es un metodo que multiplica valores
* utilizando argumentos variables
* @param args valores con tipo de dato double
* @return double con la multiplicacion
*/
public double multiplicar(double... args) {
double resultado = args[0];
for (int i = 0; i < args.length; i++) {
resultado = resultado * Math.abs(args[i]);
}
return resultado;
}
/**
* El siguiente es un metodo que divide valores
* utilizando argumentos variables
* @param args valores con tipo de dato double
* @return Double con la division o nulo si hay error
*/
public Double dividir(double... args) {
double resultado = args[0];
for (int i = 0; i < args.length; i++) {
if(args[i] == 0) {
return null;
}
resultado = resultado / Math.abs(args[i]);
}
return resultado;
}
/**
* Metodo main, de ejecucion de la operaciones
* @param args the command line arguments
*/
public static void main(String[] args) {
// Probando el metodo sumar
System.out.println(new Operadores().sumar(-2,-3,5));
// Probando el metodo restar
System.out.println(new Operadores().restar(0,-100,-100));
System.out.println(new Operadores().restar(0,100,100,-100,-200));
System.out.println(new Operadores().multiplicar(0,-2,-1,-3));
System.out.println(new Operadores().dividir(100,100));
}
}
| [
"[email protected]"
] | |
3ffd5fa8a76546604603e8ae0e1674a459f350a5 | f67beaa4e7ff2dbb7315a3d1d64e9285d94dd7b3 | /phoenix-ui/src/main/java/com/guoxiaoxing/phoenix/picker/ui/camera/config/model/Record.java | 1a9ace368e7417fba82fb7a67ddd3d191654159c | [
"Apache-2.0"
] | permissive | lianwt115/qmqiu | c7a731cd07861648cd1ed5a8a31f3aa4260fc636 | 2fec69b68b593b6eca530019f383d25699b6650b | refs/heads/master | 2020-04-01T00:13:53.677088 | 2019-07-31T09:03:50 | 2019-07-31T09:03:50 | 152,687,979 | 5 | 2 | null | null | null | null | UTF-8 | Java | false | false | 541 | java | package com.guoxiaoxing.phoenix.picker.ui.camera.config.model;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import androidx.annotation.IntDef;
public class Record {
public static final int TAKE_PHOTO_STATE = 0;
public static final int READY_FOR_RECORD_STATE = 1;
public static final int RECORD_IN_PROGRESS_STATE = 2;
@IntDef({TAKE_PHOTO_STATE, READY_FOR_RECORD_STATE, RECORD_IN_PROGRESS_STATE})
@Retention(RetentionPolicy.SOURCE)
public @interface RecordState {
}
}
| [
"[email protected]"
] | |
4c9b244202fa7c61e3b5574374efea96ff71c927 | 9e0e119dd134bef0bb74ba67b967abc0aa72fc9c | /Module_IOS/src/main/java/com/siw/module/moduleios/IOSFragments.java | 788a300ebb245802c7d4fc7b8136a2537e8cb506 | [] | no_license | lkjlksdjgi/AndroidModularSample | 3b9eade1a7a7e0f3fbaae4884aae795aabb73c78 | 4a09111422ad8433be5c9344ecf8e02f2918721d | refs/heads/master | 2021-08-28T20:14:41.391470 | 2017-12-13T03:29:48 | 2017-12-13T03:29:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 800 | java | package com.siw.module.moduleios;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.siw.module.modulecommon.base.BaseFragment;
/**
* Created by 童思伟 on 2017/12/7.
*
*/
@Route(path = "/ios/IOSFragments")
public class IOSFragments extends BaseFragment {
public IOSFragments() {
}
private View view;
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
view = View.inflate(getActivity(), R.layout.ios_fragment, null);
return view;
}
}
| [
"[email protected]"
] | |
be762274ded917badf3be9253f2136b0978efa8b | 70edbd5fdeb05cb4b87a0129bc0598e3d0904afc | /src/main/java/it/michelepiccirillo/mirror/reflect/QNameMap.java | 4dc6807142627bf4585585ba7b00e45374d73f12 | [] | no_license | lordofthelake/mirror | 50c362313fdf46948dd1c3f965d1a3590c536d6a | 2479e7d181a13529b8bd18213ebb192a54a5ffab | refs/heads/master | 2020-05-18T08:18:12.547275 | 2013-06-25T17:04:57 | 2013-06-25T17:04:57 | 10,943,524 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,711 | java | package it.michelepiccirillo.mirror.reflect;
import javax.xml.namespace.QName;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* Represents a mapping of {@link QName} instances to Java class names
* allowing class aliases and namespace aware mappings of QNames to class names.
*
* @version $Revision: 1345 $
*/
public class QNameMap {
private String defaultNamespace = "";
private String defaultPrefix = "";
private Map javaToQName;
// lets make the mapping a no-op unless we specify some mapping
private Map qnameToJava;
public String getDefaultNamespace() {
return defaultNamespace;
}
public String getDefaultPrefix() {
return defaultPrefix;
}
/**
* Returns the Java class name that should be used for the given QName.
* If no explicit mapping has been made then the localPart of the QName is used
* which is the normal default in XStream.
*/
public String getJavaClassName(QName qname) {
if (qnameToJava != null) {
String answer = (String) qnameToJava.get(qname);
if (answer != null) {
return answer;
}
}
return qname.getLocalPart();
}
/**
* Returns the Java class name that should be used for the given QName.
* If no explicit mapping has been made then the localPart of the QName is used
* which is the normal default in XStream.
*/
public QName getQName(String javaClassName) {
if (javaToQName != null) {
QName answer = (QName) javaToQName.get(javaClassName);
if (answer != null) {
return answer;
}
}
return new QName(defaultNamespace, javaClassName, defaultPrefix);
}
/**
* Registers the mapping of the type to the QName
*/
public synchronized void registerMapping(QName qname, Class type) {
registerMapping(qname, type.getName());
}
/**
* Registers the mapping of the Java class name to the QName
*/
public synchronized void registerMapping(QName qname, String javaClassName) {
if (javaToQName == null) {
javaToQName = Collections.synchronizedMap(new HashMap());
}
if (qnameToJava == null) {
qnameToJava = Collections.synchronizedMap(new HashMap());
}
javaToQName.put(javaClassName, qname);
qnameToJava.put(qname, javaClassName);
}
public void setDefaultNamespace(String defaultNamespace) {
this.defaultNamespace = defaultNamespace;
}
public void setDefaultPrefix(String defaultPrefix) {
this.defaultPrefix = defaultPrefix;
}
}
| [
"[email protected]"
] | |
1e7841ed260f65a3345074e7b916c2974d40c542 | 7e3eb8ba00f4a7b86ad525125abd8bd4f77650c1 | /mobile/src/main/java/com/isoftzone/yoappstore/adapter/SubCatAdapter.java | 4bfd38682b9c7d747accc89455c8725c5a298629 | [] | no_license | chetanthakurgit/YoAppConsumer | 5a26a064f8bd9380002cf8362899b4aa76f3dbb3 | ae4a0934539ea79c35eb556b233a07cef6c18b51 | refs/heads/master | 2022-12-28T06:45:57.530141 | 2020-10-13T08:37:53 | 2020-10-13T08:37:53 | 302,822,624 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,292 | java | package com.isoftzone.yoappstore.adapter;
import android.content.Context;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.isoftzone.yoappstore.R;
import com.isoftzone.yoappstore.bean.CompanyDetails;
import com.isoftzone.yoappstore.bean.SubCategoryBean;
import com.nostra13.universalimageloader.core.ImageLoader;
import java.util.ArrayList;
public class SubCatAdapter extends RecyclerView.Adapter<SubCatAdapter.MyViewHolder> {
private ArrayList<SubCategoryBean> subCategoryBeanArrayList;
private Context context;
private Listner recyclerClickDelegate;
protected ImageLoader imageLoader;
public interface Listner {
void onClickSubCat(int pos, String subCatId, SubCategoryBean bean);
}
public SubCatAdapter(ArrayList<SubCategoryBean> subCategoryBeanArrayList, ImageLoader imageLoader, Context context,
Listner recyclerClickDelegate) {
this.subCategoryBeanArrayList = subCategoryBeanArrayList;
this.imageLoader = imageLoader;
this.context = context;
this.recyclerClickDelegate = recyclerClickDelegate;
}
@NonNull
@Override
public SubCatAdapter.MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
if (CompanyDetails.getInstance().getDetails().getSubcat_grid().equalsIgnoreCase("0")) {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.subcat_row, parent, false);
return new MyViewHolder(view);
} else {
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.subcat_rowgrid, parent, false);
return new MyViewHolder(view);
}
}
@Override
public void onBindViewHolder(@NonNull final MyViewHolder holder, final int position) {
final SubCategoryBean bean = subCategoryBeanArrayList.get(position);
holder.titleTextView.setText(bean.getSubCatName());
String imgPath = bean.getThumbnail_image().trim().replaceAll(" ", "%20");
imageLoader.displayImage(imgPath, holder.homeRowIcon);
holder.descTextView.setText(bean.getSubCatDesc());
holder.linearHome.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
recyclerClickDelegate.onClickSubCat(position, bean.getId(), bean);
}
});
}
@Override
public int getItemCount() {
return subCategoryBeanArrayList.size();
}
public static class MyViewHolder extends RecyclerView.ViewHolder {
private TextView titleTextView;
private TextView descTextView;
private ImageView homeRowIcon;
private LinearLayout linearHome;
public MyViewHolder(View view) {
super(view);
titleTextView = view.findViewById(R.id.titleTextView);
descTextView = view.findViewById(R.id.descTextView);
homeRowIcon = view.findViewById(R.id.homeRowIcon);
linearHome = view.findViewById(R.id.linearHome);
}
}
}
| [
"[email protected]"
] | |
84547ff43b60bce6745a5c3128085fe6676e0a9d | 97c0a67db6558f8ade85dbadb771ac257d5a0e8c | /opentasks/src/main/java/org/dmfs/tasks/widget/PercentageFieldView.java | f560d7e6d49c0e1a98b2a05f392c91b8780f2eb4 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | sknaht/mobad-opentasks | 29079d792aeab939da0bbec58632f3e20ab70fe7 | f436d770aeb20b49f1b21363567f6d30bca6b36a | refs/heads/master | 2021-01-21T13:18:09.876101 | 2016-04-26T22:38:11 | 2016-04-26T22:38:11 | 54,916,577 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,353 | java | /*
* Copyright (C) 2013 Marten Gajda <[email protected]>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.dmfs.tasks.widget;
import org.dmfs.tasks.R;
import org.dmfs.tasks.model.ContentSet;
import org.dmfs.tasks.model.FieldDescriptor;
import org.dmfs.tasks.model.adapters.IntegerFieldAdapter;
import org.dmfs.tasks.model.layout.LayoutOptions;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.TextView;
/**
* Widget to display Integer values.
*
* @author Arjun Naik <[email protected]>
*/
public class PercentageFieldView extends AbstractFieldView
{
private IntegerFieldAdapter mAdapter;
private TextView mText;
private ProgressBar mProgress;
public PercentageFieldView(Context context, AttributeSet attrs, int defStyle)
{
super(context, attrs, defStyle);
}
public PercentageFieldView(Context context, AttributeSet attrs)
{
super(context, attrs);
}
public PercentageFieldView(Context context)
{
super(context);
}
@Override
protected void onFinishInflate()
{
super.onFinishInflate();
mText = (TextView) findViewById(R.id.text);
mProgress = (ProgressBar) findViewById(R.id.percentage_progress_bar);
}
@Override
public void setFieldDescription(FieldDescriptor descriptor, LayoutOptions layoutOptions)
{
super.setFieldDescription(descriptor, layoutOptions);
mAdapter = (IntegerFieldAdapter) descriptor.getFieldAdapter();
}
@Override
public void onContentChanged(ContentSet contentSet)
{
if (mValues != null && mAdapter.get(mValues) != null)
{
int percentage = mAdapter.get(mValues);
mProgress.setProgress(percentage);
mText.setText(Integer.toString(percentage) + "%");
setVisibility(View.VISIBLE);
}
else
{
setVisibility(View.GONE);
}
}
}
| [
"[email protected]"
] | |
7dd799a7d945b0f19b9b7f1c8668f90bcd93c860 | b8afc09e004f705b06561d3540bf84f348d6d207 | /core/src/main/java/org/kohsuke/stapler/compression/CompressionServletResponse.java | 0bcf5aea59a9d65c3eb32ec5a0320808b8e609e8 | [
"BSD-2-Clause"
] | permissive | jglick/stapler | 4341fa6226a785d76704b1aa673d173b040ab04c | c6f7b324ddcb082e9c810b89debe8a401178b279 | refs/heads/master | 2023-02-07T22:06:35.564420 | 2013-04-29T16:42:16 | 2013-04-29T16:42:16 | 9,800,974 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,027 | java | package org.kohsuke.stapler.compression;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.zip.GZIPOutputStream;
/**
* {@link HttpServletResponse} that recognizes Content-Encoding: gzip in the response header
* and acts accoringly.
*
* @author Kohsuke Kawaguchi
*/
public class CompressionServletResponse extends HttpServletResponseWrapper {
/**
* If not null, we are compressing the stream.
*/
private ServletOutputStream stream;
private PrintWriter writer;
public CompressionServletResponse(HttpServletResponse response) {
super(response);
}
@Override
public void setHeader(String name, String value) {
super.setHeader(name, value);
activateCompressionIfNecessary(name,value);
}
@Override
public void addHeader(String name, String value) {
super.addHeader(name, value);
activateCompressionIfNecessary(name, value);
}
private void activateCompressionIfNecessary(String name, String value) {
try {
if (name.equals("Content-Encoding") && value.equals("gzip")) {
if (stream==null)
stream = new FilterServletOutputStream(new GZIPOutputStream(super.getOutputStream()));
}
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public PrintWriter getWriter() throws IOException {
if (writer!=null) return writer;
if (stream!=null) {
writer = new PrintWriter(new OutputStreamWriter(stream,getCharacterEncoding()));
return writer;
}
return super.getWriter();
}
@Override
public ServletOutputStream getOutputStream() throws IOException {
if (stream!=null) return stream;
return super.getOutputStream();
}
}
| [
"[email protected]"
] | |
4b0eeabdf8063e7dc0600892b24a4cfc20d36c22 | 4a5d43387557b87f9e17f45940b6e715dc7a600b | /src/com/dsj/proj/controller/PriorityQ.java | 54e33e4ca2c1bb329d1212e9a3a936d65a051d15 | [] | no_license | susheels/Huffman-Coding-Using-Java | c977d06230f6994f18854e1da0851f875e2d9479 | 9f95065cab3f92d8ec127a3417ed694267259d40 | refs/heads/master | 2020-05-20T00:19:56.218795 | 2014-11-21T15:28:59 | 2014-11-21T15:28:59 | 26,965,103 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,965 | java | package com.dsj.proj.controller;
import java.util.ArrayList;
import java.util.NoSuchElementException;
public class PriorityQ<T extends Comparable<T>> {// Using min Heap
private ArrayList<T> items;
int size = 0;
public PriorityQ(){
items = new ArrayList<T>();
}
public void shiftUp(){
int k = items.size()-1;
while(k > 0){
T item = items.get(k);
int p = (k-1)/2;
T parent = items.get(p);
if(item.compareTo(parent) < 0){
//swap
items.set(p, item);
items.set(k, parent);
// up
k = p;
}else{
break;
}
}
}
public void shiftDown(){
int k = 0;
int l = 2*k+1;
while (l < items.size()) {
int min=l, r=l+1;
if (r < items.size()) { // there is a right child
if (items.get(l).compareTo(items.get(r)) <= 0) {
min = l;
}else{
min = r;
}
}
if (items.get(k).compareTo(items.get(min)) > 0) {
// switch
T temp = items.get(k);
items.set(k, items.get(min));
items.set(min, temp);
k = min;
l = 2*k+1;
} else {
break;
}
}
}
public T de() throws NoSuchElementException {
if (items.size() == 0) {
throw new NoSuchElementException();
}
if (items.size() == 1) {
size--;
return items.remove(0);
}
T hold = items.get(0);
items.set(0, items.remove(items.size()-1));
size--;
shiftDown();
return hold;
}
public void en(T item){
items.add(item);
//shiftUp
size++;
//System.out.println(size);
shiftUp();
}
public int size() {
// TODO Auto-generated method stub
return size;
}
}
| [
"[email protected]"
] | |
05ffe2aa7ebbf336fa0860d7ed13cdbcd95c0e6c | 84d394e0928999840842b8a1c3c9402e64e0f90e | /Program/web/src/dev/boom/services/QuizOptionData.java | 449326671f3098fabb591962127e08c116ae5ed7 | [] | no_license | KenyDinh/boom | 7eac8f27b79fde4925952ce600a39f6f2e5c3543 | 634513603528dcfd4c3639207480c816f4937f97 | refs/heads/master | 2023-04-07T01:20:07.536209 | 2023-04-05T03:19:15 | 2023-04-05T03:19:15 | 128,220,068 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 625 | java | package dev.boom.services;
import dev.boom.dao.DaoValue;
public class QuizOptionData {
private DaoValue tblQuizOptionData;
public QuizOptionData() {
}
public QuizOptionData(DaoValue tblQuizOptionData) {
this.tblQuizOptionData = tblQuizOptionData;
}
public int getId() {
return (Integer) tblQuizOptionData.Get("id");
}
public int getQuizDataId() {
return (Integer) tblQuizOptionData.Get("quiz_data_id");
}
public String getOption() {
return (String) this.tblQuizOptionData.Get("option");
}
public boolean isCorrectAnswer() {
return ((Integer) this.tblQuizOptionData.Get("correct") != 0);
}
}
| [
"[email protected]"
] | |
56c4fca557e7ef52cc55ec158732980ed55d9edc | 32167fc1851fdb5d88d5d1d8fb27523a59ad6b4d | /android/app/src/main/java/com/secureapp/MainActivity.java | 67c70ae2372da06f73459edc2f8d7e9c19ab274a | [] | no_license | mraible/react-native-logout-issue | 8e609ac9a9f815e91f47222597de9d02571897b3 | e384133fa751854771df4cf7c9c534347b01acdc | refs/heads/main | 2023-07-31T04:07:20.564047 | 2021-09-27T14:39:52 | 2021-09-27T14:39:52 | 410,899,029 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 345 | java | package com.secureapp;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "SecureApp";
}
}
| [
"[email protected]"
] | |
8d3e11315edd51bdd3ba506237aba2c06ed96d73 | 7d4a947e824c94722519ac607f677312cf150900 | /SecurityShepherdCore/src/servlets/module/challenge/CsrfChallengeOne.java | 42f94413d2b36bb66b9171bd0d9fbd770619adb8 | [] | no_license | markdenihan/LatamOwaspSecurityShepherd | 69fbb89467b91f0aadd64daa8ff59413175bb2d6 | 655ca7407dfceb1ffdb1dccb810e0d250c5a3791 | refs/heads/master | 2020-04-10T00:51:29.001344 | 2015-04-21T11:45:41 | 2015-04-21T11:45:41 | 30,969,859 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,004 | java | package servlets.module.challenge;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.log4j.Logger;
import utils.ShepherdLogManager;
import utils.Validate;
import dbProcs.Getter;
import dbProcs.Setter;
/**
* Cross Site Request Forgery Challenge One - Does not return reslut key
* <br/><br/>
* This file is part of the Security Shepherd Project.
*
* The Security Shepherd project is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.<br/>
*
* The Security Shepherd project is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.<br/>
*
* You should have received a copy of the GNU General Public License
* along with the Security Shepherd project. If not, see <http://www.gnu.org/licenses/>.
* @author Mark Denihan
*
*/
public class CsrfChallengeOne extends HttpServlet
{
private static final long serialVersionUID = 1L;
private static org.apache.log4j.Logger log = Logger.getLogger(CsrfChallengeOne.class);
private static String levelName = "Cross-SiteForegery Challenge One";
private static String levelHash = "s74a796e84e25b854906d88f622170c1c06817e72b526b3d1e9a6085f429cf52";
/**
* Allows users to set their CSRF attack string to complete this module
* @param myMessage To Be stored as the users message for this module
*/
public void doPost (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
//Setting IpAddress To Log and taking header for original IP if forwarded from proxy
ShepherdLogManager.setRequestIp(request.getRemoteAddr(), request.getHeader("X-Forwarded-For"));
log.debug(levelName + " Servlet Accessed");
PrintWriter out = response.getWriter();
out.print(getServletInfo());
try
{
HttpSession ses = request.getSession(true);
if(Validate.validateSession(ses))
{
ShepherdLogManager.setRequestIp(request.getRemoteAddr(), request.getHeader("X-Forwarded-For"), ses.getAttribute("userName").toString());
log.debug(levelName + " servlet accessed by: " + ses.getAttribute("userName").toString());
Cookie tokenCookie = Validate.getToken(request.getCookies());
Object tokenParmeter = request.getParameter("csrfToken");
if(Validate.validateTokens(tokenCookie, tokenParmeter))
{
String myMessage = request.getParameter("myMessage");
log.debug("User Submitted - " + myMessage);
myMessage = Validate.makeValidUrl(myMessage);
log.debug("Updating User's Stored Message");
String ApplicationRoot = getServletContext().getRealPath("");
String moduleId = Getter.getModuleIdFromHash(ApplicationRoot, levelHash);
String userId = (String)ses.getAttribute("userStamp");
Setter.setStoredMessage(ApplicationRoot, myMessage, userId, moduleId);
log.debug("Retrieving user's class's forum");
String classId = null;
if(ses.getAttribute("userClass") != null)
classId = (String)ses.getAttribute("userClass");
String htmlOutput = Getter.getCsrfForumWithImg(ApplicationRoot, classId, moduleId);
log.debug("Outputting HTML");
out.write(htmlOutput);
}
}
}
catch(Exception e)
{
out.write("An Error Occurred! You must be getting funky!");
log.fatal(levelName + " - " + e.toString());
}
}
public static String getLevelHash()
{
return levelHash;
}
}
| [
"[email protected]"
] | |
2a8f70a12b87d2c97faa5a09fc4b60ffdfcba608 | 5be21acad34d8f53c77d30a9f847c7dced179e8d | /microservice-consumer-safe-manage/src/main/java/com/cloud/consumer/safe/service/IBaseUserService.java | 6528a562703b88f4f5cadda5f6454a5336a18a1e | [] | no_license | comeNie/safe | 38a260422b5fb1b05eec7fdb1c663566b09d5089 | 7e895588f4152806ca05b30a94c0aedbb9c5f839 | refs/heads/master | 2020-05-29T14:24:19.086960 | 2019-05-24T02:52:35 | 2019-05-24T02:52:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 244 | java | package com.cloud.consumer.safe.service;
import com.alibaba.fastjson.JSONObject;
public interface IBaseUserService {
/**
* 用户登录
* @param params
* @return JSONObject
*/
public JSONObject login(Object params);
} | [
"[email protected]"
] | |
a08685f8155f858ea8c6e06a2535ae8cd7ecd796 | 31a6fa040421d9d9869bcfea377dae84e6319ef0 | /49-GroupAnagrams/Solution.java | 7954761db23a2c36ce8f8280e4f16b1a41d7620b | [] | no_license | JiananZhang/leetcode-answers | 176b78978158139903d0dc5a50dd64d6a2f009e0 | e86ab6cea73ebb8772bf3b6343a7e946ac6b3816 | refs/heads/master | 2022-03-26T07:11:52.081296 | 2018-10-12T09:20:52 | 2018-10-12T09:20:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,025 | java | class Solution {
public List<List<String>> groupAnagrams(String[] strs) {
// key: a string to represent the feature of a anagram
// value: a list to contain all String which has the same feature
Map<String, List> map = new HashMap<String, List>();
int[] count = new int[26];
for(String str : strs) {
// generate the key: a string to represent the feature of a anagram
Arrays.fill(count, 0);
for(char c : str.toCharArray()) {
count[c - 'a']++;
}
StringBuilder sb = new StringBuilder();
for(int i = 0; i < 26; i++) {
sb.append("#");
sb.append(count[i]);
}
String key = sb.toString();
if(!map.containsKey(key)) {
map.put(key, new ArrayList());
}
map.get(key).add(str);
}
return new ArrayList(map.values());
}
}
| [
"[email protected]"
] | |
97d9192bb9e1261bf4915406b95286b4c1daf72d | e6d47d1d0d9f5f644bcf05ff9ed866517340c38a | /example-web-struts/src/main/java/cn/fireface/call/web/action/HelloAction.java | 7de37de539c32cd49fd33865640f0ce44d060f94 | [] | no_license | GoWith/callChain | 2e56c92ec7e02a0e12b4408230fc6d635b884ea1 | 042d38576d6671855e43877c5423a54c25ca4fef | refs/heads/master | 2023-06-09T19:53:36.456824 | 2023-05-29T05:50:42 | 2023-05-29T05:50:42 | 155,153,424 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 761 | java | package cn.fireface.call.web.action;
import cn.fireface.call.core.proxy.CallChain;
import cn.fireface.call.web.service.HelloService;
import cn.fireface.call.web.uitls.RandomTime;
import com.opensymphony.xwork2.ActionSupport;
/**
* Created by maoyi on 2018/10/29.
* don't worry , be happy
*/
@CallChain
public class HelloAction extends ActionSupport{
public String hello() throws InterruptedException {
Thread.sleep(RandomTime.next());
new HelloService().sayHello();
new HelloService().sayBye();
return SUCCESS;
}
public String hi() throws InterruptedException {
Thread.sleep(RandomTime.next());
new HelloService().sayHello();
new HelloService().sayBye();
return SUCCESS;
}
}
| [
"[email protected]"
] | |
2a0a18733f868bc7e34c24d2bbbb7369d7e80a89 | a2dcc70e14aa8b5bdf571c53588718dc88a22067 | /com/cc/java/subject/Subject.java | 5d5d1441a2732601b90b83b0c94762757234f144 | [] | no_license | fatihkoeksal/04b_observer_interface_push_pull | f3a7ed3466a6e0c7880d7122aefeb3b92bb209ec | a4e9211a390d16689f996d32d7e70fe263bcd1e3 | refs/heads/main | 2023-08-29T08:33:09.387470 | 2021-11-03T08:07:04 | 2021-11-03T08:07:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,108 | java | package com.cc.java.subject;
import java.util.ArrayList;
import java.util.List;
import com.cc.java.Logger;
import com.cc.java.observers.Observer;
public class Subject implements Observable{
private List<Observer> observers = new ArrayList<>();
private String state;
// registration interface ...
@Override
public void attach(Observer o) {
observers.add(o);
}
// deregistration interface()
@Override
public void detatch(Observer o) {
observers.remove(o);
}
// Notification interface
@Override
public void notifyObservers() {
for (Observer o : observers) {
if (o.isNotifiedByPush()) {
o.update(state); //Push
} else {
o.update(); // Pull
}
}
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
Logger.ausgabe("The subject changed its state to: " + state);
notifyObservers();
}
}
| [
"[email protected]"
] | |
0f201ab61638f65d5c6decaaab986d9f02bafe6e | 0ea7c5c88c62773f8b612bdd4b10604c81056a2b | /src/main/java/javaday/istanbul/sliconf/micro/survey/controller/survey/UserViewedSurvey.java | 7f514dda8feeb8422d9494edd02a3de5a51a4823 | [] | no_license | taliptayfur/sliconf-micro | 8813c3e2bfe64d28acb59dfaed35d91d80b4ea06 | a24bc2b34491457cd2a6efb61283687afe6f2ab3 | refs/heads/master | 2022-03-02T01:12:29.919158 | 2019-07-24T11:16:47 | 2019-07-24T11:16:47 | 279,097,942 | 1 | 0 | null | 2020-07-12T15:55:52 | 2020-07-12T15:55:52 | null | UTF-8 | Java | false | false | 2,738 | java | package javaday.istanbul.sliconf.micro.survey.controller.survey;
import io.swagger.annotations.*;
import javaday.istanbul.sliconf.micro.response.ResponseMessage;
import javaday.istanbul.sliconf.micro.survey.service.SurveyService;
import javaday.istanbul.sliconf.micro.util.json.JsonUtil;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import spark.Request;
import spark.Response;
import spark.Route;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import java.util.Map;
import java.util.Objects;
@AllArgsConstructor
@Api(value = "survey", authorizations = {@Authorization(value = "Bearer")})
@Path("/service/events/:eventIdentifier/surveys/:surveyId/view")
@Produces("application/json")
@Component
public class UserViewedSurvey implements Route {
private SurveyService surveyService;
@POST
@ApiOperation(value = "Save that user viewed the survey", nickname = "UserViewSurvey")
@ApiImplicitParams({ //
@ApiImplicitParam(required = true, dataType = "string", name = "token", paramType = "header",
example = "Authorization: Bearer <tokenValue>"), //
@ApiImplicitParam(required = true, dataTypeClass = Map.Entry.class, name = "userId", paramType = "body"), //
@ApiImplicitParam(required = true, dataType = "string", name = "eventIdentifier", paramType = "request"), //
@ApiImplicitParam(required = true, dataType = "string", name = "surveyId", paramType = "request"), //
}) //
@ApiResponses(value = { //
@ApiResponse(code = 200, message = "Success", response = ResponseMessage.class), //
@ApiResponse(code = 400, message = "Invalid input data", response = ResponseMessage.class), //
@ApiResponse(code = 401, message = "Unauthorized", response = ResponseMessage.class), //
@ApiResponse(code = 404, message = "User not found", response = ResponseMessage.class) //
})
@Override
public ResponseMessage handle(@ApiParam(hidden = true) Request request,
@ApiParam(hidden = true) Response response) throws Exception {
ResponseMessage responseMessage;
String body = request.body();
Map<String, String> userIdFromBody = body.isEmpty() ? null : JsonUtil.fromJson(body, Map.class);
String surveyId = request.params("surveyId");
String eventIdentifier = request.params("eventIdentifier");
String userId = Objects.isNull(userIdFromBody) ? null : userIdFromBody.values().stream().findFirst().orElse(null);
responseMessage = surveyService.updateSurveyViewers(userId, surveyId, eventIdentifier);
return responseMessage;
}
}
| [
"[email protected]"
] | |
e774a4d91972f25de3faa99776f3e923034f375d | 074d1c83d3819c22a67d7c2c85457895b9ccc41b | /android/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java | 13ff467cfa95c83c26520d72f6326033b17e61cc | [] | no_license | whs-codervets/auth | 2814f2bfaf78f4e4f0ba978043b78cc61a6d8291 | 8b36e4c6e734170d900df84566bfe9665abb162b | refs/heads/master | 2022-11-15T00:25:52.680218 | 2018-02-17T18:19:54 | 2018-02-17T18:19:54 | 116,913,375 | 0 | 1 | null | 2022-10-22T16:55:06 | 2018-01-10T05:42:48 | Makefile | UTF-8 | Java | false | false | 90,405 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* gradle plugin from the resource data it found. It
* should not be modified by hand.
*/
package android.support.v7.appcompat;
public final class R {
public static final class anim {
public static final int abc_fade_in = 0x7f010000;
public static final int abc_fade_out = 0x7f010001;
public static final int abc_grow_fade_in_from_bottom = 0x7f010002;
public static final int abc_popup_enter = 0x7f010003;
public static final int abc_popup_exit = 0x7f010004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f010005;
public static final int abc_slide_in_bottom = 0x7f010006;
public static final int abc_slide_in_top = 0x7f010007;
public static final int abc_slide_out_bottom = 0x7f010008;
public static final int abc_slide_out_top = 0x7f010009;
}
public static final class attr {
public static final int actionBarDivider = 0x7f020000;
public static final int actionBarItemBackground = 0x7f020001;
public static final int actionBarPopupTheme = 0x7f020002;
public static final int actionBarSize = 0x7f020003;
public static final int actionBarSplitStyle = 0x7f020004;
public static final int actionBarStyle = 0x7f020005;
public static final int actionBarTabBarStyle = 0x7f020006;
public static final int actionBarTabStyle = 0x7f020007;
public static final int actionBarTabTextStyle = 0x7f020008;
public static final int actionBarTheme = 0x7f020009;
public static final int actionBarWidgetTheme = 0x7f02000a;
public static final int actionButtonStyle = 0x7f02000b;
public static final int actionDropDownStyle = 0x7f02000c;
public static final int actionLayout = 0x7f02000d;
public static final int actionMenuTextAppearance = 0x7f02000e;
public static final int actionMenuTextColor = 0x7f02000f;
public static final int actionModeBackground = 0x7f020010;
public static final int actionModeCloseButtonStyle = 0x7f020011;
public static final int actionModeCloseDrawable = 0x7f020012;
public static final int actionModeCopyDrawable = 0x7f020013;
public static final int actionModeCutDrawable = 0x7f020014;
public static final int actionModeFindDrawable = 0x7f020015;
public static final int actionModePasteDrawable = 0x7f020016;
public static final int actionModePopupWindowStyle = 0x7f020017;
public static final int actionModeSelectAllDrawable = 0x7f020018;
public static final int actionModeShareDrawable = 0x7f020019;
public static final int actionModeSplitBackground = 0x7f02001a;
public static final int actionModeStyle = 0x7f02001b;
public static final int actionModeWebSearchDrawable = 0x7f02001c;
public static final int actionOverflowButtonStyle = 0x7f02001d;
public static final int actionOverflowMenuStyle = 0x7f02001e;
public static final int actionProviderClass = 0x7f02001f;
public static final int actionViewClass = 0x7f020020;
public static final int activityChooserViewStyle = 0x7f020021;
public static final int alertDialogButtonGroupStyle = 0x7f020025;
public static final int alertDialogCenterButtons = 0x7f020026;
public static final int alertDialogStyle = 0x7f020027;
public static final int alertDialogTheme = 0x7f020028;
public static final int arrowHeadLength = 0x7f020029;
public static final int arrowShaftLength = 0x7f02002a;
public static final int autoCompleteTextViewStyle = 0x7f02002b;
public static final int background = 0x7f02002c;
public static final int backgroundSplit = 0x7f02002e;
public static final int backgroundStacked = 0x7f02002f;
public static final int backgroundTint = 0x7f020030;
public static final int backgroundTintMode = 0x7f020031;
public static final int barLength = 0x7f020032;
public static final int borderlessButtonStyle = 0x7f020033;
public static final int buttonBarButtonStyle = 0x7f020034;
public static final int buttonBarNegativeButtonStyle = 0x7f020035;
public static final int buttonBarNeutralButtonStyle = 0x7f020036;
public static final int buttonBarPositiveButtonStyle = 0x7f020037;
public static final int buttonBarStyle = 0x7f020038;
public static final int buttonPanelSideLayout = 0x7f020039;
public static final int buttonStyle = 0x7f02003a;
public static final int buttonStyleSmall = 0x7f02003b;
public static final int buttonTint = 0x7f02003c;
public static final int buttonTintMode = 0x7f02003d;
public static final int checkboxStyle = 0x7f02003e;
public static final int checkedTextViewStyle = 0x7f02003f;
public static final int closeIcon = 0x7f020040;
public static final int closeItemLayout = 0x7f020041;
public static final int collapseContentDescription = 0x7f020042;
public static final int collapseIcon = 0x7f020043;
public static final int color = 0x7f020044;
public static final int colorAccent = 0x7f020045;
public static final int colorButtonNormal = 0x7f020046;
public static final int colorControlActivated = 0x7f020047;
public static final int colorControlHighlight = 0x7f020048;
public static final int colorControlNormal = 0x7f020049;
public static final int colorPrimary = 0x7f02004a;
public static final int colorPrimaryDark = 0x7f02004b;
public static final int colorSwitchThumbNormal = 0x7f02004c;
public static final int commitIcon = 0x7f02004d;
public static final int contentInsetEnd = 0x7f02004e;
public static final int contentInsetLeft = 0x7f02004f;
public static final int contentInsetRight = 0x7f020050;
public static final int contentInsetStart = 0x7f020051;
public static final int controlBackground = 0x7f020052;
public static final int customNavigationLayout = 0x7f020053;
public static final int defaultQueryHint = 0x7f020054;
public static final int dialogPreferredPadding = 0x7f020055;
public static final int dialogTheme = 0x7f020056;
public static final int displayOptions = 0x7f020057;
public static final int divider = 0x7f020058;
public static final int dividerHorizontal = 0x7f020059;
public static final int dividerPadding = 0x7f02005a;
public static final int dividerVertical = 0x7f02005b;
public static final int drawableSize = 0x7f02005c;
public static final int drawerArrowStyle = 0x7f02005d;
public static final int dropDownListViewStyle = 0x7f02005e;
public static final int dropdownListPreferredItemHeight = 0x7f02005f;
public static final int editTextBackground = 0x7f020060;
public static final int editTextColor = 0x7f020061;
public static final int editTextStyle = 0x7f020062;
public static final int elevation = 0x7f020063;
public static final int expandActivityOverflowButtonDrawable = 0x7f020064;
public static final int gapBetweenBars = 0x7f020068;
public static final int goIcon = 0x7f020069;
public static final int height = 0x7f02006a;
public static final int hideOnContentScroll = 0x7f02006b;
public static final int homeAsUpIndicator = 0x7f02006c;
public static final int homeLayout = 0x7f02006d;
public static final int icon = 0x7f02006e;
public static final int iconifiedByDefault = 0x7f02006f;
public static final int indeterminateProgressStyle = 0x7f020070;
public static final int initialActivityCount = 0x7f020071;
public static final int isLightTheme = 0x7f020072;
public static final int itemPadding = 0x7f020073;
public static final int layout = 0x7f020074;
public static final int listChoiceBackgroundIndicator = 0x7f020075;
public static final int listDividerAlertDialog = 0x7f020076;
public static final int listItemLayout = 0x7f020077;
public static final int listLayout = 0x7f020078;
public static final int listPopupWindowStyle = 0x7f020079;
public static final int listPreferredItemHeight = 0x7f02007a;
public static final int listPreferredItemHeightLarge = 0x7f02007b;
public static final int listPreferredItemHeightSmall = 0x7f02007c;
public static final int listPreferredItemPaddingLeft = 0x7f02007d;
public static final int listPreferredItemPaddingRight = 0x7f02007e;
public static final int logo = 0x7f02007f;
public static final int logoDescription = 0x7f020080;
public static final int maxButtonHeight = 0x7f020081;
public static final int measureWithLargestChild = 0x7f020082;
public static final int multiChoiceItemLayout = 0x7f020083;
public static final int navigationContentDescription = 0x7f020084;
public static final int navigationIcon = 0x7f020085;
public static final int navigationMode = 0x7f020086;
public static final int overlapAnchor = 0x7f020087;
public static final int paddingEnd = 0x7f020089;
public static final int paddingStart = 0x7f02008a;
public static final int panelBackground = 0x7f02008b;
public static final int panelMenuListTheme = 0x7f02008c;
public static final int panelMenuListWidth = 0x7f02008d;
public static final int popupMenuStyle = 0x7f020090;
public static final int popupTheme = 0x7f020091;
public static final int popupWindowStyle = 0x7f020092;
public static final int preserveIconSpacing = 0x7f020093;
public static final int progressBarPadding = 0x7f020098;
public static final int progressBarStyle = 0x7f020099;
public static final int queryBackground = 0x7f02009a;
public static final int queryHint = 0x7f02009b;
public static final int radioButtonStyle = 0x7f02009c;
public static final int ratingBarStyle = 0x7f02009d;
public static final int searchHintIcon = 0x7f0200aa;
public static final int searchIcon = 0x7f0200ab;
public static final int searchViewStyle = 0x7f0200ac;
public static final int selectableItemBackground = 0x7f0200ad;
public static final int selectableItemBackgroundBorderless = 0x7f0200ae;
public static final int showAsAction = 0x7f0200af;
public static final int showDividers = 0x7f0200b0;
public static final int showText = 0x7f0200b1;
public static final int singleChoiceItemLayout = 0x7f0200b2;
public static final int spinBars = 0x7f0200b3;
public static final int spinnerDropDownItemStyle = 0x7f0200b4;
public static final int spinnerStyle = 0x7f0200b5;
public static final int splitTrack = 0x7f0200b6;
public static final int state_above_anchor = 0x7f0200b7;
public static final int submitBackground = 0x7f0200b8;
public static final int subtitle = 0x7f0200b9;
public static final int subtitleTextAppearance = 0x7f0200ba;
public static final int subtitleTextColor = 0x7f0200bb;
public static final int subtitleTextStyle = 0x7f0200bc;
public static final int suggestionRowLayout = 0x7f0200bd;
public static final int switchMinWidth = 0x7f0200be;
public static final int switchPadding = 0x7f0200bf;
public static final int switchStyle = 0x7f0200c0;
public static final int switchTextAppearance = 0x7f0200c1;
public static final int textAllCaps = 0x7f0200c2;
public static final int textAppearanceLargePopupMenu = 0x7f0200c3;
public static final int textAppearanceListItem = 0x7f0200c4;
public static final int textAppearanceListItemSmall = 0x7f0200c5;
public static final int textAppearanceSearchResultSubtitle = 0x7f0200c6;
public static final int textAppearanceSearchResultTitle = 0x7f0200c7;
public static final int textAppearanceSmallPopupMenu = 0x7f0200c8;
public static final int textColorAlertDialogListItem = 0x7f0200c9;
public static final int textColorSearchUrl = 0x7f0200ca;
public static final int theme = 0x7f0200cb;
public static final int thickness = 0x7f0200cc;
public static final int thumbTextPadding = 0x7f0200cd;
public static final int title = 0x7f0200ce;
public static final int titleMarginBottom = 0x7f0200cf;
public static final int titleMarginEnd = 0x7f0200d0;
public static final int titleMarginStart = 0x7f0200d1;
public static final int titleMarginTop = 0x7f0200d2;
public static final int titleMargins = 0x7f0200d3;
public static final int titleTextAppearance = 0x7f0200d4;
public static final int titleTextColor = 0x7f0200d5;
public static final int titleTextStyle = 0x7f0200d6;
public static final int toolbarNavigationButtonStyle = 0x7f0200d7;
public static final int toolbarStyle = 0x7f0200d8;
public static final int track = 0x7f0200d9;
public static final int voiceIcon = 0x7f0200db;
public static final int windowActionBar = 0x7f0200dc;
public static final int windowActionBarOverlay = 0x7f0200dd;
public static final int windowActionModeOverlay = 0x7f0200de;
public static final int windowFixedHeightMajor = 0x7f0200df;
public static final int windowFixedHeightMinor = 0x7f0200e0;
public static final int windowFixedWidthMajor = 0x7f0200e1;
public static final int windowFixedWidthMinor = 0x7f0200e2;
public static final int windowMinWidthMajor = 0x7f0200e3;
public static final int windowMinWidthMinor = 0x7f0200e4;
public static final int windowNoTitle = 0x7f0200e5;
}
public static final class bool {
public static final int abc_action_bar_embed_tabs = 0x7f030000;
public static final int abc_action_bar_embed_tabs_pre_jb = 0x7f030001;
public static final int abc_action_bar_expanded_action_views_exclusive = 0x7f030002;
public static final int abc_config_actionMenuItemAllCaps = 0x7f030003;
public static final int abc_config_allowActionMenuItemTextWithIcon = 0x7f030004;
public static final int abc_config_closeDialogWhenTouchOutside = 0x7f030005;
public static final int abc_config_showMenuShortcutsWhenKeyboardPresent = 0x7f030006;
}
public static final class color {
public static final int abc_background_cache_hint_selector_material_dark = 0x7f040000;
public static final int abc_background_cache_hint_selector_material_light = 0x7f040001;
public static final int abc_color_highlight_material = 0x7f040002;
public static final int abc_input_method_navigation_guard = 0x7f040003;
public static final int abc_primary_text_disable_only_material_dark = 0x7f040004;
public static final int abc_primary_text_disable_only_material_light = 0x7f040005;
public static final int abc_primary_text_material_dark = 0x7f040006;
public static final int abc_primary_text_material_light = 0x7f040007;
public static final int abc_search_url_text = 0x7f040008;
public static final int abc_search_url_text_normal = 0x7f040009;
public static final int abc_search_url_text_pressed = 0x7f04000a;
public static final int abc_search_url_text_selected = 0x7f04000b;
public static final int abc_secondary_text_material_dark = 0x7f04000c;
public static final int abc_secondary_text_material_light = 0x7f04000d;
public static final int accent_material_dark = 0x7f04000e;
public static final int accent_material_light = 0x7f04000f;
public static final int background_floating_material_dark = 0x7f040010;
public static final int background_floating_material_light = 0x7f040011;
public static final int background_material_dark = 0x7f040012;
public static final int background_material_light = 0x7f040013;
public static final int bright_foreground_disabled_material_dark = 0x7f040014;
public static final int bright_foreground_disabled_material_light = 0x7f040015;
public static final int bright_foreground_inverse_material_dark = 0x7f040016;
public static final int bright_foreground_inverse_material_light = 0x7f040017;
public static final int bright_foreground_material_dark = 0x7f040018;
public static final int bright_foreground_material_light = 0x7f040019;
public static final int button_material_dark = 0x7f04001a;
public static final int button_material_light = 0x7f04001b;
public static final int dim_foreground_disabled_material_dark = 0x7f04001d;
public static final int dim_foreground_disabled_material_light = 0x7f04001e;
public static final int dim_foreground_material_dark = 0x7f04001f;
public static final int dim_foreground_material_light = 0x7f040020;
public static final int foreground_material_dark = 0x7f040021;
public static final int foreground_material_light = 0x7f040022;
public static final int highlighted_text_material_dark = 0x7f040023;
public static final int highlighted_text_material_light = 0x7f040024;
public static final int hint_foreground_material_dark = 0x7f040025;
public static final int hint_foreground_material_light = 0x7f040026;
public static final int material_blue_grey_800 = 0x7f040027;
public static final int material_blue_grey_900 = 0x7f040028;
public static final int material_blue_grey_950 = 0x7f040029;
public static final int material_deep_teal_200 = 0x7f04002a;
public static final int material_deep_teal_500 = 0x7f04002b;
public static final int material_grey_100 = 0x7f04002c;
public static final int material_grey_300 = 0x7f04002d;
public static final int material_grey_50 = 0x7f04002e;
public static final int material_grey_600 = 0x7f04002f;
public static final int material_grey_800 = 0x7f040030;
public static final int material_grey_850 = 0x7f040031;
public static final int material_grey_900 = 0x7f040032;
public static final int primary_dark_material_dark = 0x7f040033;
public static final int primary_dark_material_light = 0x7f040034;
public static final int primary_material_dark = 0x7f040035;
public static final int primary_material_light = 0x7f040036;
public static final int primary_text_default_material_dark = 0x7f040037;
public static final int primary_text_default_material_light = 0x7f040038;
public static final int primary_text_disabled_material_dark = 0x7f040039;
public static final int primary_text_disabled_material_light = 0x7f04003a;
public static final int ripple_material_dark = 0x7f04003b;
public static final int ripple_material_light = 0x7f04003c;
public static final int secondary_text_default_material_dark = 0x7f04003d;
public static final int secondary_text_default_material_light = 0x7f04003e;
public static final int secondary_text_disabled_material_dark = 0x7f04003f;
public static final int secondary_text_disabled_material_light = 0x7f040040;
public static final int switch_thumb_disabled_material_dark = 0x7f040041;
public static final int switch_thumb_disabled_material_light = 0x7f040042;
public static final int switch_thumb_material_dark = 0x7f040043;
public static final int switch_thumb_material_light = 0x7f040044;
public static final int switch_thumb_normal_material_dark = 0x7f040045;
public static final int switch_thumb_normal_material_light = 0x7f040046;
}
public static final class dimen {
public static final int abc_action_bar_content_inset_material = 0x7f050000;
public static final int abc_action_bar_default_height_material = 0x7f050001;
public static final int abc_action_bar_default_padding_end_material = 0x7f050002;
public static final int abc_action_bar_default_padding_start_material = 0x7f050003;
public static final int abc_action_bar_icon_vertical_padding_material = 0x7f050004;
public static final int abc_action_bar_overflow_padding_end_material = 0x7f050005;
public static final int abc_action_bar_overflow_padding_start_material = 0x7f050006;
public static final int abc_action_bar_progress_bar_size = 0x7f050007;
public static final int abc_action_bar_stacked_max_height = 0x7f050008;
public static final int abc_action_bar_stacked_tab_max_width = 0x7f050009;
public static final int abc_action_bar_subtitle_bottom_margin_material = 0x7f05000a;
public static final int abc_action_bar_subtitle_top_margin_material = 0x7f05000b;
public static final int abc_action_button_min_height_material = 0x7f05000c;
public static final int abc_action_button_min_width_material = 0x7f05000d;
public static final int abc_action_button_min_width_overflow_material = 0x7f05000e;
public static final int abc_alert_dialog_button_bar_height = 0x7f05000f;
public static final int abc_button_inset_horizontal_material = 0x7f050010;
public static final int abc_button_inset_vertical_material = 0x7f050011;
public static final int abc_button_padding_horizontal_material = 0x7f050012;
public static final int abc_button_padding_vertical_material = 0x7f050013;
public static final int abc_config_prefDialogWidth = 0x7f050014;
public static final int abc_control_corner_material = 0x7f050015;
public static final int abc_control_inset_material = 0x7f050016;
public static final int abc_control_padding_material = 0x7f050017;
public static final int abc_dialog_list_padding_vertical_material = 0x7f050018;
public static final int abc_dialog_min_width_major = 0x7f050019;
public static final int abc_dialog_min_width_minor = 0x7f05001a;
public static final int abc_dialog_padding_material = 0x7f05001b;
public static final int abc_dialog_padding_top_material = 0x7f05001c;
public static final int abc_disabled_alpha_material_dark = 0x7f05001d;
public static final int abc_disabled_alpha_material_light = 0x7f05001e;
public static final int abc_dropdownitem_icon_width = 0x7f05001f;
public static final int abc_dropdownitem_text_padding_left = 0x7f050020;
public static final int abc_dropdownitem_text_padding_right = 0x7f050021;
public static final int abc_edit_text_inset_bottom_material = 0x7f050022;
public static final int abc_edit_text_inset_horizontal_material = 0x7f050023;
public static final int abc_edit_text_inset_top_material = 0x7f050024;
public static final int abc_floating_window_z = 0x7f050025;
public static final int abc_list_item_padding_horizontal_material = 0x7f050026;
public static final int abc_panel_menu_list_width = 0x7f050027;
public static final int abc_search_view_preferred_width = 0x7f050028;
public static final int abc_search_view_text_min_width = 0x7f050029;
public static final int abc_switch_padding = 0x7f05002a;
public static final int abc_text_size_body_1_material = 0x7f05002b;
public static final int abc_text_size_body_2_material = 0x7f05002c;
public static final int abc_text_size_button_material = 0x7f05002d;
public static final int abc_text_size_caption_material = 0x7f05002e;
public static final int abc_text_size_display_1_material = 0x7f05002f;
public static final int abc_text_size_display_2_material = 0x7f050030;
public static final int abc_text_size_display_3_material = 0x7f050031;
public static final int abc_text_size_display_4_material = 0x7f050032;
public static final int abc_text_size_headline_material = 0x7f050033;
public static final int abc_text_size_large_material = 0x7f050034;
public static final int abc_text_size_medium_material = 0x7f050035;
public static final int abc_text_size_menu_material = 0x7f050036;
public static final int abc_text_size_small_material = 0x7f050037;
public static final int abc_text_size_subhead_material = 0x7f050038;
public static final int abc_text_size_subtitle_material_toolbar = 0x7f050039;
public static final int abc_text_size_title_material = 0x7f05003a;
public static final int abc_text_size_title_material_toolbar = 0x7f05003b;
public static final int dialog_fixed_height_major = 0x7f05003c;
public static final int dialog_fixed_height_minor = 0x7f05003d;
public static final int dialog_fixed_width_major = 0x7f05003e;
public static final int dialog_fixed_width_minor = 0x7f05003f;
public static final int disabled_alpha_material_dark = 0x7f050040;
public static final int disabled_alpha_material_light = 0x7f050041;
public static final int highlight_alpha_material_colored = 0x7f050042;
public static final int highlight_alpha_material_dark = 0x7f050043;
public static final int highlight_alpha_material_light = 0x7f050044;
public static final int notification_large_icon_height = 0x7f050045;
public static final int notification_large_icon_width = 0x7f050046;
public static final int notification_subtext_size = 0x7f050047;
}
public static final class drawable {
public static final int abc_ab_share_pack_mtrl_alpha = 0x7f060000;
public static final int abc_action_bar_item_background_material = 0x7f060001;
public static final int abc_btn_borderless_material = 0x7f060002;
public static final int abc_btn_check_material = 0x7f060003;
public static final int abc_btn_check_to_on_mtrl_000 = 0x7f060004;
public static final int abc_btn_check_to_on_mtrl_015 = 0x7f060005;
public static final int abc_btn_colored_material = 0x7f060006;
public static final int abc_btn_default_mtrl_shape = 0x7f060007;
public static final int abc_btn_radio_material = 0x7f060008;
public static final int abc_btn_radio_to_on_mtrl_000 = 0x7f060009;
public static final int abc_btn_radio_to_on_mtrl_015 = 0x7f06000a;
public static final int abc_btn_rating_star_off_mtrl_alpha = 0x7f06000b;
public static final int abc_btn_rating_star_on_mtrl_alpha = 0x7f06000c;
public static final int abc_btn_switch_to_on_mtrl_00001 = 0x7f06000d;
public static final int abc_btn_switch_to_on_mtrl_00012 = 0x7f06000e;
public static final int abc_cab_background_internal_bg = 0x7f06000f;
public static final int abc_cab_background_top_material = 0x7f060010;
public static final int abc_cab_background_top_mtrl_alpha = 0x7f060011;
public static final int abc_control_background_material = 0x7f060012;
public static final int abc_dialog_material_background_dark = 0x7f060013;
public static final int abc_dialog_material_background_light = 0x7f060014;
public static final int abc_edit_text_material = 0x7f060015;
public static final int abc_ic_ab_back_mtrl_am_alpha = 0x7f060016;
public static final int abc_ic_clear_mtrl_alpha = 0x7f060017;
public static final int abc_ic_commit_search_api_mtrl_alpha = 0x7f060018;
public static final int abc_ic_go_search_api_mtrl_alpha = 0x7f060019;
public static final int abc_ic_menu_copy_mtrl_am_alpha = 0x7f06001a;
public static final int abc_ic_menu_cut_mtrl_alpha = 0x7f06001b;
public static final int abc_ic_menu_moreoverflow_mtrl_alpha = 0x7f06001c;
public static final int abc_ic_menu_paste_mtrl_am_alpha = 0x7f06001d;
public static final int abc_ic_menu_selectall_mtrl_alpha = 0x7f06001e;
public static final int abc_ic_menu_share_mtrl_alpha = 0x7f06001f;
public static final int abc_ic_search_api_mtrl_alpha = 0x7f060020;
public static final int abc_ic_voice_search_api_mtrl_alpha = 0x7f060021;
public static final int abc_item_background_holo_dark = 0x7f060022;
public static final int abc_item_background_holo_light = 0x7f060023;
public static final int abc_list_divider_mtrl_alpha = 0x7f060024;
public static final int abc_list_focused_holo = 0x7f060025;
public static final int abc_list_longpressed_holo = 0x7f060026;
public static final int abc_list_pressed_holo_dark = 0x7f060027;
public static final int abc_list_pressed_holo_light = 0x7f060028;
public static final int abc_list_selector_background_transition_holo_dark = 0x7f060029;
public static final int abc_list_selector_background_transition_holo_light = 0x7f06002a;
public static final int abc_list_selector_disabled_holo_dark = 0x7f06002b;
public static final int abc_list_selector_disabled_holo_light = 0x7f06002c;
public static final int abc_list_selector_holo_dark = 0x7f06002d;
public static final int abc_list_selector_holo_light = 0x7f06002e;
public static final int abc_menu_hardkey_panel_mtrl_mult = 0x7f06002f;
public static final int abc_popup_background_mtrl_mult = 0x7f060030;
public static final int abc_ratingbar_full_material = 0x7f060031;
public static final int abc_spinner_mtrl_am_alpha = 0x7f060032;
public static final int abc_spinner_textfield_background_material = 0x7f060033;
public static final int abc_switch_thumb_material = 0x7f060034;
public static final int abc_switch_track_mtrl_alpha = 0x7f060035;
public static final int abc_tab_indicator_material = 0x7f060036;
public static final int abc_tab_indicator_mtrl_alpha = 0x7f060037;
public static final int abc_text_cursor_material = 0x7f060038;
public static final int abc_textfield_activated_mtrl_alpha = 0x7f060039;
public static final int abc_textfield_default_mtrl_alpha = 0x7f06003a;
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f06003b;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f06003c;
public static final int abc_textfield_search_material = 0x7f06003d;
public static final int notification_template_icon_bg = 0x7f06003e;
}
public static final class id {
public static final int action0 = 0x7f070000;
public static final int action_bar = 0x7f070001;
public static final int action_bar_activity_content = 0x7f070002;
public static final int action_bar_container = 0x7f070003;
public static final int action_bar_root = 0x7f070004;
public static final int action_bar_spinner = 0x7f070005;
public static final int action_bar_subtitle = 0x7f070006;
public static final int action_bar_title = 0x7f070007;
public static final int action_context_bar = 0x7f070008;
public static final int action_divider = 0x7f070009;
public static final int action_menu_divider = 0x7f07000a;
public static final int action_menu_presenter = 0x7f07000b;
public static final int action_mode_bar = 0x7f07000c;
public static final int action_mode_bar_stub = 0x7f07000d;
public static final int action_mode_close_button = 0x7f07000e;
public static final int activity_chooser_view_content = 0x7f07000f;
public static final int alertTitle = 0x7f070010;
public static final int always = 0x7f070011;
public static final int beginning = 0x7f070012;
public static final int buttonPanel = 0x7f070013;
public static final int cancel_action = 0x7f070014;
public static final int checkbox = 0x7f070019;
public static final int chronometer = 0x7f07001a;
public static final int collapseActionView = 0x7f07001b;
public static final int contentPanel = 0x7f07001c;
public static final int custom = 0x7f07001d;
public static final int customPanel = 0x7f07001e;
public static final int decor_content_parent = 0x7f07001f;
public static final int default_activity_button = 0x7f070020;
public static final int disableHome = 0x7f070021;
public static final int edit_query = 0x7f070022;
public static final int end = 0x7f070023;
public static final int end_padder = 0x7f070024;
public static final int expand_activities_button = 0x7f070025;
public static final int expanded_menu = 0x7f070026;
public static final int home = 0x7f07002d;
public static final int homeAsUp = 0x7f07002e;
public static final int icon = 0x7f07002f;
public static final int ifRoom = 0x7f070030;
public static final int image = 0x7f070031;
public static final int info = 0x7f070032;
public static final int line1 = 0x7f070033;
public static final int line3 = 0x7f070034;
public static final int listMode = 0x7f070035;
public static final int list_item = 0x7f070036;
public static final int media_actions = 0x7f070037;
public static final int middle = 0x7f070038;
public static final int multiply = 0x7f070039;
public static final int never = 0x7f07003a;
public static final int none = 0x7f07003b;
public static final int normal = 0x7f07003c;
public static final int parentPanel = 0x7f07003d;
public static final int progress_circular = 0x7f07003e;
public static final int progress_horizontal = 0x7f07003f;
public static final int radio = 0x7f070040;
public static final int screen = 0x7f07004c;
public static final int scrollView = 0x7f07004d;
public static final int search_badge = 0x7f07004e;
public static final int search_bar = 0x7f07004f;
public static final int search_button = 0x7f070050;
public static final int search_close_btn = 0x7f070051;
public static final int search_edit_frame = 0x7f070052;
public static final int search_go_btn = 0x7f070053;
public static final int search_mag_icon = 0x7f070054;
public static final int search_plate = 0x7f070055;
public static final int search_src_text = 0x7f070056;
public static final int search_voice_btn = 0x7f070057;
public static final int select_dialog_listview = 0x7f070058;
public static final int shortcut = 0x7f070059;
public static final int showCustom = 0x7f07005a;
public static final int showHome = 0x7f07005b;
public static final int showTitle = 0x7f07005c;
public static final int split_action_bar = 0x7f07005d;
public static final int src_atop = 0x7f07005e;
public static final int src_in = 0x7f07005f;
public static final int src_over = 0x7f070060;
public static final int status_bar_latest_event_content = 0x7f070061;
public static final int submit_area = 0x7f070062;
public static final int tabMode = 0x7f070063;
public static final int text = 0x7f070064;
public static final int text2 = 0x7f070065;
public static final int textSpacerNoButtons = 0x7f070066;
public static final int time = 0x7f070067;
public static final int title = 0x7f070068;
public static final int title_template = 0x7f070069;
public static final int topPanel = 0x7f07006a;
public static final int up = 0x7f07006b;
public static final int useLogo = 0x7f07006c;
public static final int withText = 0x7f07006e;
public static final int wrap_content = 0x7f07006f;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f080000;
public static final int abc_config_activityShortDur = 0x7f080001;
public static final int abc_max_action_buttons = 0x7f080002;
public static final int cancel_button_image_alpha = 0x7f080003;
public static final int status_bar_notification_info_maxnum = 0x7f080004;
}
public static final class layout {
public static final int abc_action_bar_title_item = 0x7f090000;
public static final int abc_action_bar_up_container = 0x7f090001;
public static final int abc_action_bar_view_list_nav_layout = 0x7f090002;
public static final int abc_action_menu_item_layout = 0x7f090003;
public static final int abc_action_menu_layout = 0x7f090004;
public static final int abc_action_mode_bar = 0x7f090005;
public static final int abc_action_mode_close_item_material = 0x7f090006;
public static final int abc_activity_chooser_view = 0x7f090007;
public static final int abc_activity_chooser_view_list_item = 0x7f090008;
public static final int abc_alert_dialog_material = 0x7f090009;
public static final int abc_dialog_title_material = 0x7f09000a;
public static final int abc_expanded_menu_layout = 0x7f09000b;
public static final int abc_list_menu_item_checkbox = 0x7f09000c;
public static final int abc_list_menu_item_icon = 0x7f09000d;
public static final int abc_list_menu_item_layout = 0x7f09000e;
public static final int abc_list_menu_item_radio = 0x7f09000f;
public static final int abc_popup_menu_item_layout = 0x7f090010;
public static final int abc_screen_content_include = 0x7f090011;
public static final int abc_screen_simple = 0x7f090012;
public static final int abc_screen_simple_overlay_action_mode = 0x7f090013;
public static final int abc_screen_toolbar = 0x7f090014;
public static final int abc_search_dropdown_item_icons_2line = 0x7f090015;
public static final int abc_search_view = 0x7f090016;
public static final int abc_select_dialog_material = 0x7f090017;
public static final int notification_media_action = 0x7f09001a;
public static final int notification_media_cancel_action = 0x7f09001b;
public static final int notification_template_big_media = 0x7f09001c;
public static final int notification_template_big_media_narrow = 0x7f09001d;
public static final int notification_template_lines = 0x7f09001e;
public static final int notification_template_media = 0x7f09001f;
public static final int notification_template_part_chronometer = 0x7f090020;
public static final int notification_template_part_time = 0x7f090021;
public static final int select_dialog_item_material = 0x7f090025;
public static final int select_dialog_multichoice_material = 0x7f090026;
public static final int select_dialog_singlechoice_material = 0x7f090027;
public static final int support_simple_spinner_dropdown_item = 0x7f090028;
}
public static final class string {
public static final int abc_action_bar_home_description = 0x7f0b0000;
public static final int abc_action_bar_home_description_format = 0x7f0b0001;
public static final int abc_action_bar_home_subtitle_description_format = 0x7f0b0002;
public static final int abc_action_bar_up_description = 0x7f0b0003;
public static final int abc_action_menu_overflow_description = 0x7f0b0004;
public static final int abc_action_mode_done = 0x7f0b0005;
public static final int abc_activity_chooser_view_see_all = 0x7f0b0006;
public static final int abc_activitychooserview_choose_application = 0x7f0b0007;
public static final int abc_search_hint = 0x7f0b0008;
public static final int abc_searchview_description_clear = 0x7f0b0009;
public static final int abc_searchview_description_query = 0x7f0b000a;
public static final int abc_searchview_description_search = 0x7f0b000b;
public static final int abc_searchview_description_submit = 0x7f0b000c;
public static final int abc_searchview_description_voice = 0x7f0b000d;
public static final int abc_shareactionprovider_share_with = 0x7f0b000e;
public static final int abc_shareactionprovider_share_with_application = 0x7f0b000f;
public static final int abc_toolbar_collapse_description = 0x7f0b0010;
public static final int status_bar_notification_info_overflow = 0x7f0b0028;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0c0000;
public static final int AlertDialog_AppCompat_Light = 0x7f0c0001;
public static final int Animation_AppCompat_Dialog = 0x7f0c0002;
public static final int Animation_AppCompat_DropDownUp = 0x7f0c0003;
public static final int Base_AlertDialog_AppCompat = 0x7f0c0006;
public static final int Base_AlertDialog_AppCompat_Light = 0x7f0c0007;
public static final int Base_Animation_AppCompat_Dialog = 0x7f0c0008;
public static final int Base_Animation_AppCompat_DropDownUp = 0x7f0c0009;
public static final int Base_DialogWindowTitleBackground_AppCompat = 0x7f0c000b;
public static final int Base_DialogWindowTitle_AppCompat = 0x7f0c000a;
public static final int Base_TextAppearance_AppCompat = 0x7f0c000c;
public static final int Base_TextAppearance_AppCompat_Body1 = 0x7f0c000d;
public static final int Base_TextAppearance_AppCompat_Body2 = 0x7f0c000e;
public static final int Base_TextAppearance_AppCompat_Button = 0x7f0c000f;
public static final int Base_TextAppearance_AppCompat_Caption = 0x7f0c0010;
public static final int Base_TextAppearance_AppCompat_Display1 = 0x7f0c0011;
public static final int Base_TextAppearance_AppCompat_Display2 = 0x7f0c0012;
public static final int Base_TextAppearance_AppCompat_Display3 = 0x7f0c0013;
public static final int Base_TextAppearance_AppCompat_Display4 = 0x7f0c0014;
public static final int Base_TextAppearance_AppCompat_Headline = 0x7f0c0015;
public static final int Base_TextAppearance_AppCompat_Inverse = 0x7f0c0016;
public static final int Base_TextAppearance_AppCompat_Large = 0x7f0c0017;
public static final int Base_TextAppearance_AppCompat_Large_Inverse = 0x7f0c0018;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c0019;
public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c001a;
public static final int Base_TextAppearance_AppCompat_Medium = 0x7f0c001b;
public static final int Base_TextAppearance_AppCompat_Medium_Inverse = 0x7f0c001c;
public static final int Base_TextAppearance_AppCompat_Menu = 0x7f0c001d;
public static final int Base_TextAppearance_AppCompat_SearchResult = 0x7f0c001e;
public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c001f;
public static final int Base_TextAppearance_AppCompat_SearchResult_Title = 0x7f0c0020;
public static final int Base_TextAppearance_AppCompat_Small = 0x7f0c0021;
public static final int Base_TextAppearance_AppCompat_Small_Inverse = 0x7f0c0022;
public static final int Base_TextAppearance_AppCompat_Subhead = 0x7f0c0023;
public static final int Base_TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c0024;
public static final int Base_TextAppearance_AppCompat_Title = 0x7f0c0025;
public static final int Base_TextAppearance_AppCompat_Title_Inverse = 0x7f0c0026;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c0027;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c0028;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c0029;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c002a;
public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c002b;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c002c;
public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c002d;
public static final int Base_TextAppearance_AppCompat_Widget_Button = 0x7f0c002e;
public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c002f;
public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c0030;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c0031;
public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c0032;
public static final int Base_TextAppearance_AppCompat_Widget_Switch = 0x7f0c0033;
public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c0034;
public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c0035;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c0036;
public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c0037;
public static final int Base_ThemeOverlay_AppCompat = 0x7f0c0046;
public static final int Base_ThemeOverlay_AppCompat_ActionBar = 0x7f0c0047;
public static final int Base_ThemeOverlay_AppCompat_Dark = 0x7f0c0048;
public static final int Base_ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c0049;
public static final int Base_ThemeOverlay_AppCompat_Light = 0x7f0c004a;
public static final int Base_Theme_AppCompat = 0x7f0c0038;
public static final int Base_Theme_AppCompat_CompactMenu = 0x7f0c0039;
public static final int Base_Theme_AppCompat_Dialog = 0x7f0c003a;
public static final int Base_Theme_AppCompat_DialogWhenLarge = 0x7f0c003e;
public static final int Base_Theme_AppCompat_Dialog_Alert = 0x7f0c003b;
public static final int Base_Theme_AppCompat_Dialog_FixedSize = 0x7f0c003c;
public static final int Base_Theme_AppCompat_Dialog_MinWidth = 0x7f0c003d;
public static final int Base_Theme_AppCompat_Light = 0x7f0c003f;
public static final int Base_Theme_AppCompat_Light_DarkActionBar = 0x7f0c0040;
public static final int Base_Theme_AppCompat_Light_Dialog = 0x7f0c0041;
public static final int Base_Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c0045;
public static final int Base_Theme_AppCompat_Light_Dialog_Alert = 0x7f0c0042;
public static final int Base_Theme_AppCompat_Light_Dialog_FixedSize = 0x7f0c0043;
public static final int Base_Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c0044;
public static final int Base_V11_Theme_AppCompat_Dialog = 0x7f0c004b;
public static final int Base_V11_Theme_AppCompat_Light_Dialog = 0x7f0c004c;
public static final int Base_V12_Widget_AppCompat_AutoCompleteTextView = 0x7f0c004d;
public static final int Base_V12_Widget_AppCompat_EditText = 0x7f0c004e;
public static final int Base_V21_Theme_AppCompat = 0x7f0c004f;
public static final int Base_V21_Theme_AppCompat_Dialog = 0x7f0c0050;
public static final int Base_V21_Theme_AppCompat_Light = 0x7f0c0051;
public static final int Base_V21_Theme_AppCompat_Light_Dialog = 0x7f0c0052;
public static final int Base_V22_Theme_AppCompat = 0x7f0c0053;
public static final int Base_V22_Theme_AppCompat_Light = 0x7f0c0054;
public static final int Base_V23_Theme_AppCompat = 0x7f0c0055;
public static final int Base_V23_Theme_AppCompat_Light = 0x7f0c0056;
public static final int Base_V7_Theme_AppCompat = 0x7f0c0057;
public static final int Base_V7_Theme_AppCompat_Dialog = 0x7f0c0058;
public static final int Base_V7_Theme_AppCompat_Light = 0x7f0c0059;
public static final int Base_V7_Theme_AppCompat_Light_Dialog = 0x7f0c005a;
public static final int Base_V7_Widget_AppCompat_AutoCompleteTextView = 0x7f0c005b;
public static final int Base_V7_Widget_AppCompat_EditText = 0x7f0c005c;
public static final int Base_Widget_AppCompat_ActionBar = 0x7f0c005d;
public static final int Base_Widget_AppCompat_ActionBar_Solid = 0x7f0c005e;
public static final int Base_Widget_AppCompat_ActionBar_TabBar = 0x7f0c005f;
public static final int Base_Widget_AppCompat_ActionBar_TabText = 0x7f0c0060;
public static final int Base_Widget_AppCompat_ActionBar_TabView = 0x7f0c0061;
public static final int Base_Widget_AppCompat_ActionButton = 0x7f0c0062;
public static final int Base_Widget_AppCompat_ActionButton_CloseMode = 0x7f0c0063;
public static final int Base_Widget_AppCompat_ActionButton_Overflow = 0x7f0c0064;
public static final int Base_Widget_AppCompat_ActionMode = 0x7f0c0065;
public static final int Base_Widget_AppCompat_ActivityChooserView = 0x7f0c0066;
public static final int Base_Widget_AppCompat_AutoCompleteTextView = 0x7f0c0067;
public static final int Base_Widget_AppCompat_Button = 0x7f0c0068;
public static final int Base_Widget_AppCompat_ButtonBar = 0x7f0c006e;
public static final int Base_Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c006f;
public static final int Base_Widget_AppCompat_Button_Borderless = 0x7f0c0069;
public static final int Base_Widget_AppCompat_Button_Borderless_Colored = 0x7f0c006a;
public static final int Base_Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c006b;
public static final int Base_Widget_AppCompat_Button_Colored = 0x7f0c006c;
public static final int Base_Widget_AppCompat_Button_Small = 0x7f0c006d;
public static final int Base_Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c0070;
public static final int Base_Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c0071;
public static final int Base_Widget_AppCompat_CompoundButton_Switch = 0x7f0c0072;
public static final int Base_Widget_AppCompat_DrawerArrowToggle = 0x7f0c0073;
public static final int Base_Widget_AppCompat_DrawerArrowToggle_Common = 0x7f0c0074;
public static final int Base_Widget_AppCompat_DropDownItem_Spinner = 0x7f0c0075;
public static final int Base_Widget_AppCompat_EditText = 0x7f0c0076;
public static final int Base_Widget_AppCompat_Light_ActionBar = 0x7f0c0077;
public static final int Base_Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c0078;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c0079;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c007a;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c007b;
public static final int Base_Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c007c;
public static final int Base_Widget_AppCompat_Light_PopupMenu = 0x7f0c007d;
public static final int Base_Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c007e;
public static final int Base_Widget_AppCompat_ListPopupWindow = 0x7f0c007f;
public static final int Base_Widget_AppCompat_ListView = 0x7f0c0080;
public static final int Base_Widget_AppCompat_ListView_DropDown = 0x7f0c0081;
public static final int Base_Widget_AppCompat_ListView_Menu = 0x7f0c0082;
public static final int Base_Widget_AppCompat_PopupMenu = 0x7f0c0083;
public static final int Base_Widget_AppCompat_PopupMenu_Overflow = 0x7f0c0084;
public static final int Base_Widget_AppCompat_PopupWindow = 0x7f0c0085;
public static final int Base_Widget_AppCompat_ProgressBar = 0x7f0c0086;
public static final int Base_Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c0087;
public static final int Base_Widget_AppCompat_RatingBar = 0x7f0c0088;
public static final int Base_Widget_AppCompat_SearchView = 0x7f0c0089;
public static final int Base_Widget_AppCompat_SearchView_ActionBar = 0x7f0c008a;
public static final int Base_Widget_AppCompat_Spinner = 0x7f0c008b;
public static final int Base_Widget_AppCompat_Spinner_Underlined = 0x7f0c008c;
public static final int Base_Widget_AppCompat_TextView_SpinnerItem = 0x7f0c008d;
public static final int Base_Widget_AppCompat_Toolbar = 0x7f0c008e;
public static final int Base_Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c008f;
public static final int Platform_AppCompat = 0x7f0c0096;
public static final int Platform_AppCompat_Light = 0x7f0c0097;
public static final int Platform_ThemeOverlay_AppCompat = 0x7f0c0098;
public static final int Platform_ThemeOverlay_AppCompat_Dark = 0x7f0c0099;
public static final int Platform_ThemeOverlay_AppCompat_Light = 0x7f0c009a;
public static final int Platform_V11_AppCompat = 0x7f0c009b;
public static final int Platform_V11_AppCompat_Light = 0x7f0c009c;
public static final int Platform_V14_AppCompat = 0x7f0c009d;
public static final int Platform_V14_AppCompat_Light = 0x7f0c009e;
public static final int Platform_Widget_AppCompat_Spinner = 0x7f0c009f;
public static final int RtlOverlay_DialogWindowTitle_AppCompat = 0x7f0c00a0;
public static final int RtlOverlay_Widget_AppCompat_ActionBar_TitleItem = 0x7f0c00a1;
public static final int RtlOverlay_Widget_AppCompat_ActionButton_Overflow = 0x7f0c00a2;
public static final int RtlOverlay_Widget_AppCompat_DialogTitle_Icon = 0x7f0c00a3;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem = 0x7f0c00a4;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup = 0x7f0c00a5;
public static final int RtlOverlay_Widget_AppCompat_PopupMenuItem_Text = 0x7f0c00a6;
public static final int RtlOverlay_Widget_AppCompat_SearchView_MagIcon = 0x7f0c00ac;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown = 0x7f0c00a7;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 = 0x7f0c00a8;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 = 0x7f0c00a9;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Query = 0x7f0c00aa;
public static final int RtlOverlay_Widget_AppCompat_Search_DropDown_Text = 0x7f0c00ab;
public static final int TextAppearance_AppCompat = 0x7f0c00b1;
public static final int TextAppearance_AppCompat_Body1 = 0x7f0c00b2;
public static final int TextAppearance_AppCompat_Body2 = 0x7f0c00b3;
public static final int TextAppearance_AppCompat_Button = 0x7f0c00b4;
public static final int TextAppearance_AppCompat_Caption = 0x7f0c00b5;
public static final int TextAppearance_AppCompat_Display1 = 0x7f0c00b6;
public static final int TextAppearance_AppCompat_Display2 = 0x7f0c00b7;
public static final int TextAppearance_AppCompat_Display3 = 0x7f0c00b8;
public static final int TextAppearance_AppCompat_Display4 = 0x7f0c00b9;
public static final int TextAppearance_AppCompat_Headline = 0x7f0c00ba;
public static final int TextAppearance_AppCompat_Inverse = 0x7f0c00bb;
public static final int TextAppearance_AppCompat_Large = 0x7f0c00bc;
public static final int TextAppearance_AppCompat_Large_Inverse = 0x7f0c00bd;
public static final int TextAppearance_AppCompat_Light_SearchResult_Subtitle = 0x7f0c00be;
public static final int TextAppearance_AppCompat_Light_SearchResult_Title = 0x7f0c00bf;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Large = 0x7f0c00c0;
public static final int TextAppearance_AppCompat_Light_Widget_PopupMenu_Small = 0x7f0c00c1;
public static final int TextAppearance_AppCompat_Medium = 0x7f0c00c2;
public static final int TextAppearance_AppCompat_Medium_Inverse = 0x7f0c00c3;
public static final int TextAppearance_AppCompat_Menu = 0x7f0c00c4;
public static final int TextAppearance_AppCompat_SearchResult_Subtitle = 0x7f0c00c5;
public static final int TextAppearance_AppCompat_SearchResult_Title = 0x7f0c00c6;
public static final int TextAppearance_AppCompat_Small = 0x7f0c00c7;
public static final int TextAppearance_AppCompat_Small_Inverse = 0x7f0c00c8;
public static final int TextAppearance_AppCompat_Subhead = 0x7f0c00c9;
public static final int TextAppearance_AppCompat_Subhead_Inverse = 0x7f0c00ca;
public static final int TextAppearance_AppCompat_Title = 0x7f0c00cb;
public static final int TextAppearance_AppCompat_Title_Inverse = 0x7f0c00cc;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Menu = 0x7f0c00cd;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle = 0x7f0c00ce;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse = 0x7f0c00cf;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title = 0x7f0c00d0;
public static final int TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse = 0x7f0c00d1;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle = 0x7f0c00d2;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse = 0x7f0c00d3;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title = 0x7f0c00d4;
public static final int TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse = 0x7f0c00d5;
public static final int TextAppearance_AppCompat_Widget_Button = 0x7f0c00d6;
public static final int TextAppearance_AppCompat_Widget_Button_Inverse = 0x7f0c00d7;
public static final int TextAppearance_AppCompat_Widget_DropDownItem = 0x7f0c00d8;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Large = 0x7f0c00d9;
public static final int TextAppearance_AppCompat_Widget_PopupMenu_Small = 0x7f0c00da;
public static final int TextAppearance_AppCompat_Widget_Switch = 0x7f0c00db;
public static final int TextAppearance_AppCompat_Widget_TextView_SpinnerItem = 0x7f0c00dc;
public static final int TextAppearance_StatusBar_EventContent = 0x7f0c00dd;
public static final int TextAppearance_StatusBar_EventContent_Info = 0x7f0c00de;
public static final int TextAppearance_StatusBar_EventContent_Line2 = 0x7f0c00df;
public static final int TextAppearance_StatusBar_EventContent_Time = 0x7f0c00e0;
public static final int TextAppearance_StatusBar_EventContent_Title = 0x7f0c00e1;
public static final int TextAppearance_Widget_AppCompat_ExpandedMenu_Item = 0x7f0c00e2;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Subtitle = 0x7f0c00e3;
public static final int TextAppearance_Widget_AppCompat_Toolbar_Title = 0x7f0c00e4;
public static final int ThemeOverlay_AppCompat = 0x7f0c00fb;
public static final int ThemeOverlay_AppCompat_ActionBar = 0x7f0c00fc;
public static final int ThemeOverlay_AppCompat_Dark = 0x7f0c00fd;
public static final int ThemeOverlay_AppCompat_Dark_ActionBar = 0x7f0c00fe;
public static final int ThemeOverlay_AppCompat_Light = 0x7f0c00ff;
public static final int Theme_AppCompat = 0x7f0c00e6;
public static final int Theme_AppCompat_CompactMenu = 0x7f0c00e7;
public static final int Theme_AppCompat_Dialog = 0x7f0c00e8;
public static final int Theme_AppCompat_DialogWhenLarge = 0x7f0c00eb;
public static final int Theme_AppCompat_Dialog_Alert = 0x7f0c00e9;
public static final int Theme_AppCompat_Dialog_MinWidth = 0x7f0c00ea;
public static final int Theme_AppCompat_Light = 0x7f0c00ec;
public static final int Theme_AppCompat_Light_DarkActionBar = 0x7f0c00ed;
public static final int Theme_AppCompat_Light_Dialog = 0x7f0c00ee;
public static final int Theme_AppCompat_Light_DialogWhenLarge = 0x7f0c00f1;
public static final int Theme_AppCompat_Light_Dialog_Alert = 0x7f0c00ef;
public static final int Theme_AppCompat_Light_Dialog_MinWidth = 0x7f0c00f0;
public static final int Theme_AppCompat_Light_NoActionBar = 0x7f0c00f2;
public static final int Theme_AppCompat_NoActionBar = 0x7f0c00f3;
public static final int Widget_AppCompat_ActionBar = 0x7f0c0100;
public static final int Widget_AppCompat_ActionBar_Solid = 0x7f0c0101;
public static final int Widget_AppCompat_ActionBar_TabBar = 0x7f0c0102;
public static final int Widget_AppCompat_ActionBar_TabText = 0x7f0c0103;
public static final int Widget_AppCompat_ActionBar_TabView = 0x7f0c0104;
public static final int Widget_AppCompat_ActionButton = 0x7f0c0105;
public static final int Widget_AppCompat_ActionButton_CloseMode = 0x7f0c0106;
public static final int Widget_AppCompat_ActionButton_Overflow = 0x7f0c0107;
public static final int Widget_AppCompat_ActionMode = 0x7f0c0108;
public static final int Widget_AppCompat_ActivityChooserView = 0x7f0c0109;
public static final int Widget_AppCompat_AutoCompleteTextView = 0x7f0c010a;
public static final int Widget_AppCompat_Button = 0x7f0c010b;
public static final int Widget_AppCompat_ButtonBar = 0x7f0c0111;
public static final int Widget_AppCompat_ButtonBar_AlertDialog = 0x7f0c0112;
public static final int Widget_AppCompat_Button_Borderless = 0x7f0c010c;
public static final int Widget_AppCompat_Button_Borderless_Colored = 0x7f0c010d;
public static final int Widget_AppCompat_Button_ButtonBar_AlertDialog = 0x7f0c010e;
public static final int Widget_AppCompat_Button_Colored = 0x7f0c010f;
public static final int Widget_AppCompat_Button_Small = 0x7f0c0110;
public static final int Widget_AppCompat_CompoundButton_CheckBox = 0x7f0c0113;
public static final int Widget_AppCompat_CompoundButton_RadioButton = 0x7f0c0114;
public static final int Widget_AppCompat_CompoundButton_Switch = 0x7f0c0115;
public static final int Widget_AppCompat_DrawerArrowToggle = 0x7f0c0116;
public static final int Widget_AppCompat_DropDownItem_Spinner = 0x7f0c0117;
public static final int Widget_AppCompat_EditText = 0x7f0c0118;
public static final int Widget_AppCompat_Light_ActionBar = 0x7f0c0119;
public static final int Widget_AppCompat_Light_ActionBar_Solid = 0x7f0c011a;
public static final int Widget_AppCompat_Light_ActionBar_Solid_Inverse = 0x7f0c011b;
public static final int Widget_AppCompat_Light_ActionBar_TabBar = 0x7f0c011c;
public static final int Widget_AppCompat_Light_ActionBar_TabBar_Inverse = 0x7f0c011d;
public static final int Widget_AppCompat_Light_ActionBar_TabText = 0x7f0c011e;
public static final int Widget_AppCompat_Light_ActionBar_TabText_Inverse = 0x7f0c011f;
public static final int Widget_AppCompat_Light_ActionBar_TabView = 0x7f0c0120;
public static final int Widget_AppCompat_Light_ActionBar_TabView_Inverse = 0x7f0c0121;
public static final int Widget_AppCompat_Light_ActionButton = 0x7f0c0122;
public static final int Widget_AppCompat_Light_ActionButton_CloseMode = 0x7f0c0123;
public static final int Widget_AppCompat_Light_ActionButton_Overflow = 0x7f0c0124;
public static final int Widget_AppCompat_Light_ActionMode_Inverse = 0x7f0c0125;
public static final int Widget_AppCompat_Light_ActivityChooserView = 0x7f0c0126;
public static final int Widget_AppCompat_Light_AutoCompleteTextView = 0x7f0c0127;
public static final int Widget_AppCompat_Light_DropDownItem_Spinner = 0x7f0c0128;
public static final int Widget_AppCompat_Light_ListPopupWindow = 0x7f0c0129;
public static final int Widget_AppCompat_Light_ListView_DropDown = 0x7f0c012a;
public static final int Widget_AppCompat_Light_PopupMenu = 0x7f0c012b;
public static final int Widget_AppCompat_Light_PopupMenu_Overflow = 0x7f0c012c;
public static final int Widget_AppCompat_Light_SearchView = 0x7f0c012d;
public static final int Widget_AppCompat_Light_Spinner_DropDown_ActionBar = 0x7f0c012e;
public static final int Widget_AppCompat_ListPopupWindow = 0x7f0c012f;
public static final int Widget_AppCompat_ListView = 0x7f0c0130;
public static final int Widget_AppCompat_ListView_DropDown = 0x7f0c0131;
public static final int Widget_AppCompat_ListView_Menu = 0x7f0c0132;
public static final int Widget_AppCompat_PopupMenu = 0x7f0c0133;
public static final int Widget_AppCompat_PopupMenu_Overflow = 0x7f0c0134;
public static final int Widget_AppCompat_PopupWindow = 0x7f0c0135;
public static final int Widget_AppCompat_ProgressBar = 0x7f0c0136;
public static final int Widget_AppCompat_ProgressBar_Horizontal = 0x7f0c0137;
public static final int Widget_AppCompat_RatingBar = 0x7f0c0138;
public static final int Widget_AppCompat_SearchView = 0x7f0c0139;
public static final int Widget_AppCompat_SearchView_ActionBar = 0x7f0c013a;
public static final int Widget_AppCompat_Spinner = 0x7f0c013b;
public static final int Widget_AppCompat_Spinner_DropDown = 0x7f0c013c;
public static final int Widget_AppCompat_Spinner_DropDown_ActionBar = 0x7f0c013d;
public static final int Widget_AppCompat_Spinner_Underlined = 0x7f0c013e;
public static final int Widget_AppCompat_TextView_SpinnerItem = 0x7f0c013f;
public static final int Widget_AppCompat_Toolbar = 0x7f0c0140;
public static final int Widget_AppCompat_Toolbar_Button_Navigation = 0x7f0c0141;
}
public static final class styleable {
public static final int[] ActionBar = { 0x7f02002c, 0x7f02002e, 0x7f02002f, 0x7f02004e, 0x7f02004f, 0x7f020050, 0x7f020051, 0x7f020053, 0x7f020057, 0x7f020058, 0x7f020063, 0x7f02006a, 0x7f02006b, 0x7f02006c, 0x7f02006d, 0x7f02006e, 0x7f020070, 0x7f020073, 0x7f02007f, 0x7f020086, 0x7f020091, 0x7f020098, 0x7f020099, 0x7f0200b9, 0x7f0200bc, 0x7f0200ce, 0x7f0200d6 };
public static final int ActionBar_background = 0;
public static final int ActionBar_backgroundSplit = 1;
public static final int ActionBar_backgroundStacked = 2;
public static final int ActionBar_contentInsetEnd = 3;
public static final int ActionBar_contentInsetLeft = 4;
public static final int ActionBar_contentInsetRight = 5;
public static final int ActionBar_contentInsetStart = 6;
public static final int ActionBar_customNavigationLayout = 7;
public static final int ActionBar_displayOptions = 8;
public static final int ActionBar_divider = 9;
public static final int ActionBar_elevation = 10;
public static final int ActionBar_height = 11;
public static final int ActionBar_hideOnContentScroll = 12;
public static final int ActionBar_homeAsUpIndicator = 13;
public static final int ActionBar_homeLayout = 14;
public static final int ActionBar_icon = 15;
public static final int ActionBar_indeterminateProgressStyle = 16;
public static final int ActionBar_itemPadding = 17;
public static final int ActionBar_logo = 18;
public static final int ActionBar_navigationMode = 19;
public static final int ActionBar_popupTheme = 20;
public static final int ActionBar_progressBarPadding = 21;
public static final int ActionBar_progressBarStyle = 22;
public static final int ActionBar_subtitle = 23;
public static final int ActionBar_subtitleTextStyle = 24;
public static final int ActionBar_title = 25;
public static final int ActionBar_titleTextStyle = 26;
public static final int[] ActionBarLayout = { 0x010100b3 };
public static final int ActionBarLayout_android_layout_gravity = 0;
public static final int[] ActionMenuItemView = { 0x0101013f };
public static final int ActionMenuItemView_android_minWidth = 0;
public static final int[] ActionMenuView = { };
public static final int[] ActionMode = { 0x7f02002c, 0x7f02002e, 0x7f020041, 0x7f02006a, 0x7f0200bc, 0x7f0200d6 };
public static final int ActionMode_background = 0;
public static final int ActionMode_backgroundSplit = 1;
public static final int ActionMode_closeItemLayout = 2;
public static final int ActionMode_height = 3;
public static final int ActionMode_subtitleTextStyle = 4;
public static final int ActionMode_titleTextStyle = 5;
public static final int[] ActivityChooserView = { 0x7f020064, 0x7f020071 };
public static final int ActivityChooserView_expandActivityOverflowButtonDrawable = 0;
public static final int ActivityChooserView_initialActivityCount = 1;
public static final int[] AlertDialog = { 0x010100f2, 0x7f020039, 0x7f020077, 0x7f020078, 0x7f020083, 0x7f0200b2 };
public static final int AlertDialog_android_layout = 0;
public static final int AlertDialog_buttonPanelSideLayout = 1;
public static final int AlertDialog_listItemLayout = 2;
public static final int AlertDialog_listLayout = 3;
public static final int AlertDialog_multiChoiceItemLayout = 4;
public static final int AlertDialog_singleChoiceItemLayout = 5;
public static final int[] AppCompatTextView = { 0x01010034, 0x7f0200c2 };
public static final int AppCompatTextView_android_textAppearance = 0;
public static final int AppCompatTextView_textAllCaps = 1;
public static final int[] CompoundButton = { 0x01010107, 0x7f02003c, 0x7f02003d };
public static final int CompoundButton_android_button = 0;
public static final int CompoundButton_buttonTint = 1;
public static final int CompoundButton_buttonTintMode = 2;
public static final int[] DrawerArrowToggle = { 0x7f020029, 0x7f02002a, 0x7f020032, 0x7f020044, 0x7f02005c, 0x7f020068, 0x7f0200b3, 0x7f0200cc };
public static final int DrawerArrowToggle_arrowHeadLength = 0;
public static final int DrawerArrowToggle_arrowShaftLength = 1;
public static final int DrawerArrowToggle_barLength = 2;
public static final int DrawerArrowToggle_color = 3;
public static final int DrawerArrowToggle_drawableSize = 4;
public static final int DrawerArrowToggle_gapBetweenBars = 5;
public static final int DrawerArrowToggle_spinBars = 6;
public static final int DrawerArrowToggle_thickness = 7;
public static final int[] LinearLayoutCompat = { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f020058, 0x7f02005a, 0x7f020082, 0x7f0200b0 };
public static final int LinearLayoutCompat_android_gravity = 0;
public static final int LinearLayoutCompat_android_orientation = 1;
public static final int LinearLayoutCompat_android_baselineAligned = 2;
public static final int LinearLayoutCompat_android_baselineAlignedChildIndex = 3;
public static final int LinearLayoutCompat_android_weightSum = 4;
public static final int LinearLayoutCompat_divider = 5;
public static final int LinearLayoutCompat_dividerPadding = 6;
public static final int LinearLayoutCompat_measureWithLargestChild = 7;
public static final int LinearLayoutCompat_showDividers = 8;
public static final int[] LinearLayoutCompat_Layout = { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 };
public static final int LinearLayoutCompat_Layout_android_layout_gravity = 0;
public static final int LinearLayoutCompat_Layout_android_layout_width = 1;
public static final int LinearLayoutCompat_Layout_android_layout_height = 2;
public static final int LinearLayoutCompat_Layout_android_layout_weight = 3;
public static final int[] ListPopupWindow = { 0x010102ac, 0x010102ad };
public static final int ListPopupWindow_android_dropDownHorizontalOffset = 0;
public static final int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static final int[] MenuGroup = { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 };
public static final int MenuGroup_android_enabled = 0;
public static final int MenuGroup_android_id = 1;
public static final int MenuGroup_android_visible = 2;
public static final int MenuGroup_android_menuCategory = 3;
public static final int MenuGroup_android_orderInCategory = 4;
public static final int MenuGroup_android_checkableBehavior = 5;
public static final int[] MenuItem = { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f02000d, 0x7f02001f, 0x7f020020, 0x7f0200af };
public static final int MenuItem_android_icon = 0;
public static final int MenuItem_android_enabled = 1;
public static final int MenuItem_android_id = 2;
public static final int MenuItem_android_checked = 3;
public static final int MenuItem_android_visible = 4;
public static final int MenuItem_android_menuCategory = 5;
public static final int MenuItem_android_orderInCategory = 6;
public static final int MenuItem_android_title = 7;
public static final int MenuItem_android_titleCondensed = 8;
public static final int MenuItem_android_alphabeticShortcut = 9;
public static final int MenuItem_android_numericShortcut = 10;
public static final int MenuItem_android_checkable = 11;
public static final int MenuItem_android_onClick = 12;
public static final int MenuItem_actionLayout = 13;
public static final int MenuItem_actionProviderClass = 14;
public static final int MenuItem_actionViewClass = 15;
public static final int MenuItem_showAsAction = 16;
public static final int[] MenuView = { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f020093 };
public static final int MenuView_android_windowAnimationStyle = 0;
public static final int MenuView_android_itemTextAppearance = 1;
public static final int MenuView_android_horizontalDivider = 2;
public static final int MenuView_android_verticalDivider = 3;
public static final int MenuView_android_headerBackground = 4;
public static final int MenuView_android_itemBackground = 5;
public static final int MenuView_android_itemIconDisabledAlpha = 6;
public static final int MenuView_preserveIconSpacing = 7;
public static final int[] PopupWindow = { 0x01010176, 0x7f020087 };
public static final int PopupWindow_android_popupBackground = 0;
public static final int PopupWindow_overlapAnchor = 1;
public static final int[] PopupWindowBackgroundState = { 0x7f0200b7 };
public static final int PopupWindowBackgroundState_state_above_anchor = 0;
public static final int[] SearchView = { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f020040, 0x7f02004d, 0x7f020054, 0x7f020069, 0x7f02006f, 0x7f020074, 0x7f02009a, 0x7f02009b, 0x7f0200aa, 0x7f0200ab, 0x7f0200b8, 0x7f0200bd, 0x7f0200db };
public static final int SearchView_android_focusable = 0;
public static final int SearchView_android_maxWidth = 1;
public static final int SearchView_android_inputType = 2;
public static final int SearchView_android_imeOptions = 3;
public static final int SearchView_closeIcon = 4;
public static final int SearchView_commitIcon = 5;
public static final int SearchView_defaultQueryHint = 6;
public static final int SearchView_goIcon = 7;
public static final int SearchView_iconifiedByDefault = 8;
public static final int SearchView_layout = 9;
public static final int SearchView_queryBackground = 10;
public static final int SearchView_queryHint = 11;
public static final int SearchView_searchHintIcon = 12;
public static final int SearchView_searchIcon = 13;
public static final int SearchView_submitBackground = 14;
public static final int SearchView_suggestionRowLayout = 15;
public static final int SearchView_voiceIcon = 16;
public static final int[] Spinner = { 0x01010176, 0x0101017b, 0x01010262, 0x7f020091 };
public static final int Spinner_android_popupBackground = 0;
public static final int Spinner_android_prompt = 1;
public static final int Spinner_android_dropDownWidth = 2;
public static final int Spinner_popupTheme = 3;
public static final int[] SwitchCompat = { 0x01010124, 0x01010125, 0x01010142, 0x7f0200b1, 0x7f0200b6, 0x7f0200be, 0x7f0200bf, 0x7f0200c1, 0x7f0200cd, 0x7f0200d9 };
public static final int SwitchCompat_android_textOn = 0;
public static final int SwitchCompat_android_textOff = 1;
public static final int SwitchCompat_android_thumb = 2;
public static final int SwitchCompat_showText = 3;
public static final int SwitchCompat_splitTrack = 4;
public static final int SwitchCompat_switchMinWidth = 5;
public static final int SwitchCompat_switchPadding = 6;
public static final int SwitchCompat_switchTextAppearance = 7;
public static final int SwitchCompat_thumbTextPadding = 8;
public static final int SwitchCompat_track = 9;
public static final int[] TextAppearance = { 0x01010095, 0x01010096, 0x01010097, 0x01010098, 0x01010161, 0x01010162, 0x01010163, 0x01010164, 0x7f0200c2 };
public static final int TextAppearance_android_textSize = 0;
public static final int TextAppearance_android_typeface = 1;
public static final int TextAppearance_android_textStyle = 2;
public static final int TextAppearance_android_textColor = 3;
public static final int TextAppearance_android_shadowColor = 4;
public static final int TextAppearance_android_shadowDx = 5;
public static final int TextAppearance_android_shadowDy = 6;
public static final int TextAppearance_android_shadowRadius = 7;
public static final int TextAppearance_textAllCaps = 8;
public static final int[] Theme = { 0x01010057, 0x010100ae, 0x7f020000, 0x7f020001, 0x7f020002, 0x7f020003, 0x7f020004, 0x7f020005, 0x7f020006, 0x7f020007, 0x7f020008, 0x7f020009, 0x7f02000a, 0x7f02000b, 0x7f02000c, 0x7f02000e, 0x7f02000f, 0x7f020010, 0x7f020011, 0x7f020012, 0x7f020013, 0x7f020014, 0x7f020015, 0x7f020016, 0x7f020017, 0x7f020018, 0x7f020019, 0x7f02001a, 0x7f02001b, 0x7f02001c, 0x7f02001d, 0x7f02001e, 0x7f020021, 0x7f020025, 0x7f020026, 0x7f020027, 0x7f020028, 0x7f02002b, 0x7f020033, 0x7f020034, 0x7f020035, 0x7f020036, 0x7f020037, 0x7f020038, 0x7f02003a, 0x7f02003b, 0x7f02003e, 0x7f02003f, 0x7f020045, 0x7f020046, 0x7f020047, 0x7f020048, 0x7f020049, 0x7f02004a, 0x7f02004b, 0x7f02004c, 0x7f020052, 0x7f020055, 0x7f020056, 0x7f020059, 0x7f02005b, 0x7f02005e, 0x7f02005f, 0x7f020060, 0x7f020061, 0x7f020062, 0x7f02006c, 0x7f020075, 0x7f020076, 0x7f020079, 0x7f02007a, 0x7f02007b, 0x7f02007c, 0x7f02007d, 0x7f02007e, 0x7f02008b, 0x7f02008c, 0x7f02008d, 0x7f020090, 0x7f020092, 0x7f02009c, 0x7f02009d, 0x7f0200ac, 0x7f0200ad, 0x7f0200ae, 0x7f0200b4, 0x7f0200b5, 0x7f0200c0, 0x7f0200c3, 0x7f0200c4, 0x7f0200c5, 0x7f0200c6, 0x7f0200c7, 0x7f0200c8, 0x7f0200c9, 0x7f0200ca, 0x7f0200d7, 0x7f0200d8, 0x7f0200dc, 0x7f0200dd, 0x7f0200de, 0x7f0200df, 0x7f0200e0, 0x7f0200e1, 0x7f0200e2, 0x7f0200e3, 0x7f0200e4, 0x7f0200e5 };
public static final int Theme_android_windowIsFloating = 0;
public static final int Theme_android_windowAnimationStyle = 1;
public static final int Theme_actionBarDivider = 2;
public static final int Theme_actionBarItemBackground = 3;
public static final int Theme_actionBarPopupTheme = 4;
public static final int Theme_actionBarSize = 5;
public static final int Theme_actionBarSplitStyle = 6;
public static final int Theme_actionBarStyle = 7;
public static final int Theme_actionBarTabBarStyle = 8;
public static final int Theme_actionBarTabStyle = 9;
public static final int Theme_actionBarTabTextStyle = 10;
public static final int Theme_actionBarTheme = 11;
public static final int Theme_actionBarWidgetTheme = 12;
public static final int Theme_actionButtonStyle = 13;
public static final int Theme_actionDropDownStyle = 14;
public static final int Theme_actionMenuTextAppearance = 15;
public static final int Theme_actionMenuTextColor = 16;
public static final int Theme_actionModeBackground = 17;
public static final int Theme_actionModeCloseButtonStyle = 18;
public static final int Theme_actionModeCloseDrawable = 19;
public static final int Theme_actionModeCopyDrawable = 20;
public static final int Theme_actionModeCutDrawable = 21;
public static final int Theme_actionModeFindDrawable = 22;
public static final int Theme_actionModePasteDrawable = 23;
public static final int Theme_actionModePopupWindowStyle = 24;
public static final int Theme_actionModeSelectAllDrawable = 25;
public static final int Theme_actionModeShareDrawable = 26;
public static final int Theme_actionModeSplitBackground = 27;
public static final int Theme_actionModeStyle = 28;
public static final int Theme_actionModeWebSearchDrawable = 29;
public static final int Theme_actionOverflowButtonStyle = 30;
public static final int Theme_actionOverflowMenuStyle = 31;
public static final int Theme_activityChooserViewStyle = 32;
public static final int Theme_alertDialogButtonGroupStyle = 33;
public static final int Theme_alertDialogCenterButtons = 34;
public static final int Theme_alertDialogStyle = 35;
public static final int Theme_alertDialogTheme = 36;
public static final int Theme_autoCompleteTextViewStyle = 37;
public static final int Theme_borderlessButtonStyle = 38;
public static final int Theme_buttonBarButtonStyle = 39;
public static final int Theme_buttonBarNegativeButtonStyle = 40;
public static final int Theme_buttonBarNeutralButtonStyle = 41;
public static final int Theme_buttonBarPositiveButtonStyle = 42;
public static final int Theme_buttonBarStyle = 43;
public static final int Theme_buttonStyle = 44;
public static final int Theme_buttonStyleSmall = 45;
public static final int Theme_checkboxStyle = 46;
public static final int Theme_checkedTextViewStyle = 47;
public static final int Theme_colorAccent = 48;
public static final int Theme_colorButtonNormal = 49;
public static final int Theme_colorControlActivated = 50;
public static final int Theme_colorControlHighlight = 51;
public static final int Theme_colorControlNormal = 52;
public static final int Theme_colorPrimary = 53;
public static final int Theme_colorPrimaryDark = 54;
public static final int Theme_colorSwitchThumbNormal = 55;
public static final int Theme_controlBackground = 56;
public static final int Theme_dialogPreferredPadding = 57;
public static final int Theme_dialogTheme = 58;
public static final int Theme_dividerHorizontal = 59;
public static final int Theme_dividerVertical = 60;
public static final int Theme_dropDownListViewStyle = 61;
public static final int Theme_dropdownListPreferredItemHeight = 62;
public static final int Theme_editTextBackground = 63;
public static final int Theme_editTextColor = 64;
public static final int Theme_editTextStyle = 65;
public static final int Theme_homeAsUpIndicator = 66;
public static final int Theme_listChoiceBackgroundIndicator = 67;
public static final int Theme_listDividerAlertDialog = 68;
public static final int Theme_listPopupWindowStyle = 69;
public static final int Theme_listPreferredItemHeight = 70;
public static final int Theme_listPreferredItemHeightLarge = 71;
public static final int Theme_listPreferredItemHeightSmall = 72;
public static final int Theme_listPreferredItemPaddingLeft = 73;
public static final int Theme_listPreferredItemPaddingRight = 74;
public static final int Theme_panelBackground = 75;
public static final int Theme_panelMenuListTheme = 76;
public static final int Theme_panelMenuListWidth = 77;
public static final int Theme_popupMenuStyle = 78;
public static final int Theme_popupWindowStyle = 79;
public static final int Theme_radioButtonStyle = 80;
public static final int Theme_ratingBarStyle = 81;
public static final int Theme_searchViewStyle = 82;
public static final int Theme_selectableItemBackground = 83;
public static final int Theme_selectableItemBackgroundBorderless = 84;
public static final int Theme_spinnerDropDownItemStyle = 85;
public static final int Theme_spinnerStyle = 86;
public static final int Theme_switchStyle = 87;
public static final int Theme_textAppearanceLargePopupMenu = 88;
public static final int Theme_textAppearanceListItem = 89;
public static final int Theme_textAppearanceListItemSmall = 90;
public static final int Theme_textAppearanceSearchResultSubtitle = 91;
public static final int Theme_textAppearanceSearchResultTitle = 92;
public static final int Theme_textAppearanceSmallPopupMenu = 93;
public static final int Theme_textColorAlertDialogListItem = 94;
public static final int Theme_textColorSearchUrl = 95;
public static final int Theme_toolbarNavigationButtonStyle = 96;
public static final int Theme_toolbarStyle = 97;
public static final int Theme_windowActionBar = 98;
public static final int Theme_windowActionBarOverlay = 99;
public static final int Theme_windowActionModeOverlay = 100;
public static final int Theme_windowFixedHeightMajor = 101;
public static final int Theme_windowFixedHeightMinor = 102;
public static final int Theme_windowFixedWidthMajor = 103;
public static final int Theme_windowFixedWidthMinor = 104;
public static final int Theme_windowMinWidthMajor = 105;
public static final int Theme_windowMinWidthMinor = 106;
public static final int Theme_windowNoTitle = 107;
public static final int[] Toolbar = { 0x010100af, 0x01010140, 0x7f020042, 0x7f020043, 0x7f02004e, 0x7f02004f, 0x7f020050, 0x7f020051, 0x7f02007f, 0x7f020080, 0x7f020081, 0x7f020084, 0x7f020085, 0x7f020091, 0x7f0200b9, 0x7f0200ba, 0x7f0200bb, 0x7f0200ce, 0x7f0200cf, 0x7f0200d0, 0x7f0200d1, 0x7f0200d2, 0x7f0200d3, 0x7f0200d4, 0x7f0200d5 };
public static final int Toolbar_android_gravity = 0;
public static final int Toolbar_android_minHeight = 1;
public static final int Toolbar_collapseContentDescription = 2;
public static final int Toolbar_collapseIcon = 3;
public static final int Toolbar_contentInsetEnd = 4;
public static final int Toolbar_contentInsetLeft = 5;
public static final int Toolbar_contentInsetRight = 6;
public static final int Toolbar_contentInsetStart = 7;
public static final int Toolbar_logo = 8;
public static final int Toolbar_logoDescription = 9;
public static final int Toolbar_maxButtonHeight = 10;
public static final int Toolbar_navigationContentDescription = 11;
public static final int Toolbar_navigationIcon = 12;
public static final int Toolbar_popupTheme = 13;
public static final int Toolbar_subtitle = 14;
public static final int Toolbar_subtitleTextAppearance = 15;
public static final int Toolbar_subtitleTextColor = 16;
public static final int Toolbar_title = 17;
public static final int Toolbar_titleMarginBottom = 18;
public static final int Toolbar_titleMarginEnd = 19;
public static final int Toolbar_titleMarginStart = 20;
public static final int Toolbar_titleMarginTop = 21;
public static final int Toolbar_titleMargins = 22;
public static final int Toolbar_titleTextAppearance = 23;
public static final int Toolbar_titleTextColor = 24;
public static final int[] View = { 0x01010000, 0x010100da, 0x7f020089, 0x7f02008a, 0x7f0200cb };
public static final int View_android_theme = 0;
public static final int View_android_focusable = 1;
public static final int View_paddingEnd = 2;
public static final int View_paddingStart = 3;
public static final int View_theme = 4;
public static final int[] ViewBackgroundHelper = { 0x010100d4, 0x7f020030, 0x7f020031 };
public static final int ViewBackgroundHelper_android_background = 0;
public static final int ViewBackgroundHelper_backgroundTint = 1;
public static final int ViewBackgroundHelper_backgroundTintMode = 2;
public static final int[] ViewStubCompat = { 0x010100d0, 0x010100f2, 0x010100f3 };
public static final int ViewStubCompat_android_id = 0;
public static final int ViewStubCompat_android_layout = 1;
public static final int ViewStubCompat_android_inflatedId = 2;
}
}
| [
"[email protected]"
] | |
cdd77b6b0b1b685f3fb9742854ad148dc9a18606 | 3bc9371c8348c60d553536d11a0d232e7834065c | /mobile/src/main/java/com/elegion/androidschool/finalproject/event/EntrySelectedEvent.java | 980076fdc295b7be06221c0eae0082167639c499 | [] | no_license | bobrusha/final_project | 0a09e78e131e8af4bc6663be4dbe8952a2d96f14 | 62fe1af57b76a9a02750d2c4c9cca3eee00c0b8a | refs/heads/master | 2020-12-11T04:11:59.975023 | 2015-10-28T14:25:19 | 2015-10-28T14:25:19 | 44,129,574 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 453 | java | package com.elegion.androidschool.finalproject.event;
/**
* Created by Aleksandra on 24.10.15.
*/
public class EntrySelectedEvent {
private long mEntryId;
private long mProductId;
public EntrySelectedEvent(long productId, long entryId) {
mProductId = productId;
mEntryId = entryId;
}
public long getEntryId() {
return mEntryId;
}
public long getProductId() {
return mProductId;
}
}
| [
"[email protected]"
] | |
2a3e90386409b1fdd58f20dcd88e7d1ae96e76d9 | 48c4b5cae0739829e9f590a888c276b732572395 | /boot/src/main/java/com/spring/gameloft/BootApplication.java | 92330945b9cf7a54e762d90ed3b4b9450b7c9d97 | [] | no_license | Ionut09/spring-course | 0d4beeec8f47c235654f284f600943943a56b033 | dffc045007367faf0e4c496b57caf2f1315ea0b7 | refs/heads/master | 2020-08-28T09:40:25.921798 | 2019-10-30T17:06:39 | 2019-10-30T17:06:39 | 217,663,154 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,155 | java | package com.spring.gameloft;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import java.text.SimpleDateFormat;
@SpringBootApplication
public class BootApplication {
public static void main(String[] args) {
SpringApplication.run(BootApplication.class, args);
}
@Bean
public MappingJackson2HttpMessageConverter mappingJackson2HttpMessageConverter() {
ObjectMapper mapper = new ObjectMapper();
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(mapper);
return converter;
}
}
| [
"[email protected]"
] | |
bf0522ad700fa14861aff672b172d0d6f7e93e14 | e999a519d9fb7a344bf791eaf0fe62e8f98dfa4a | /app/src/main/java/com/example/student/smsapplication/MainActivity.java | 2ebde87e62cc9c0ff85a200dc5667b6db752cdb5 | [] | no_license | mercyngatia/SMSApplication | 6ed2afe569eaafd83df34d3e1936259324af0175 | 6343f938f5e174b72d67d58cc7e94781e3248c97 | refs/heads/master | 2021-01-23T22:29:54.435380 | 2017-09-09T07:02:54 | 2017-09-09T07:02:54 | 102,764,209 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,092 | java | package com.example.student.smsapplication;
import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.content.pm.PackageManager;
import android.provider.Telephony;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.telephony.SmsManager;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
Button button;
EditText editText, editText2;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if(ContextCompat.checkSelfPermission(MainActivity.this,
Manifest.permission.SEND_SMS) != PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.shouldShowRequestPermissionRationale(MainActivity.this,
Manifest.permission.SEND_SMS)){
ActivityCompat.requestPermissions(MainActivity.this,
new String[]{Manifest.permission.SEND_SMS}, 1);
}else {
ActivityCompat.requestPermissions(MainActivity.this,
new String[]{Manifest.permission.SEND_SMS}, 1);
}
}else {
// do nothing
}
button=(Button) findViewById(R.id.button);
editText =(EditText) findViewById(R.id.editText);
editText2 =(EditText) findViewById(R.id.editText2);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String number = editText.getText().toString();
String sms = editText2.getText().toString();
try {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(number, null, sms, null, null);
Toast.makeText(MainActivity.this, "sent!", Toast.LENGTH_SHORT).show();
} catch (Exception e){
Toast.makeText(MainActivity.this, "Failed!", Toast.LENGTH_SHORT).show();
}
}
});
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
switch (requestCode) {
case 1:{
if(grantResults.length>0 && grantResults[0] == PackageManager.PERMISSION_GRANTED){
if(ContextCompat.checkSelfPermission(MainActivity.this,
Manifest.permission.SEND_SMS) == PackageManager.PERMISSION_GRANTED){
Toast.makeText(this, "Permission granted!", Toast.LENGTH_SHORT).show();
}
} else {
Toast.makeText(this, "No permission granted!", Toast.LENGTH_SHORT) .show();
}
return;
}
}
}
}
| [
"[email protected]"
] | |
c24c6f9100cbdb580d90214dc00f06880ef17e89 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Lang/31/org/apache/commons/lang3/exception/ContextedRuntimeException_getValue_162.java | ca812f519f0066a86cfaebacd114254b6e422611 | [] | no_license | hvdthong/NetML | dca6cf4d34c5799b400d718e0a6cd2e0b167297d | 9bb103da21327912e5a29cbf9be9ff4d058731a5 | refs/heads/master | 2021-06-30T15:03:52.618255 | 2020-10-07T01:58:48 | 2020-10-07T01:58:48 | 150,383,588 | 1 | 1 | null | 2018-09-26T07:08:45 | 2018-09-26T07:08:44 | null | UTF-8 | Java | false | false | 1,589 | java |
org apach common lang3 except
runtim except easi safe add contextu inform
except trace insuffici provid rapid diagnosi issu
frequent need select piec local contextu data
provid data tricki due concern format null
context except approach except creat
map context valu addit inform automat includ
messag print stack trace
check version except provid context except contextedexcept
write code
pre
except
context except contextedexcept error post account transact
add addvalu account number accountnumb account number accountnumb
add addvalu amount post amountpost amount post amountpost
add addvalu previou balanc previousbal previou balanc previousbal
pre
output print stacktrac printstacktrac written log
pre
org apach common lang3 except context runtim except contextedruntimeexcept java lang except error post account transact
except context
account number accountnumb
amount post amountpost
previou balanc previousbal
org apach common lang3 except context runtim except test contextedruntimeexceptiontest test add testaddvalu context except test contextedexceptiontest java
rest trace
pre
context except contextedexcept
author apach softwar foundat
author ashmor
author ouml schaibl
context runtim except contextedruntimeexcept runtim except runtimeexcept except context exceptioncontext
retriev contextu data label
param label label contextu
contextu label
object getvalu string label
except context exceptioncontext getvalu label
| [
"[email protected]"
] | |
5b9050b1a9e8ffc698d194edf4c6f97b46fb2fb5 | 2968a4051e107f35970c1ddf7110e52a887cc243 | /kmls/kmls-db/src/main/java/ch/ntb/inf/klms/model/objects/base/Credential.java | 04755f6bbf172f73397739545ff29ea1b87d7314 | [
"BSD-2-Clause-Views"
] | permissive | LabSEC/kmip4j | e278b6bc62bbed9a3b2809bb3d67e606b2885e48 | 11be6b512c5e86aeb8ef0aba48c9d3d2d19fbb27 | refs/heads/master | 2022-02-19T15:48:07.331431 | 2017-10-01T22:09:34 | 2017-10-01T22:09:34 | 104,767,679 | 0 | 2 | NOASSERTION | 2019-09-12T02:02:24 | 2017-09-25T15:25:36 | Java | UTF-8 | Java | false | false | 1,513 | java | package ch.ntb.inf.klms.model.objects.base;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import ch.ntb.inf.klms.model.objects.CredentialValue;
@Entity
public class Credential {
@Id @GeneratedValue(strategy = GenerationType.AUTO)
private String id;
private String credentialType;
@ManyToOne ( cascade = CascadeType.ALL)
private CredentialValue credentialValue;
public Credential(){
}
public Credential(CredentialValue credentialValue) {
this.credentialValue = credentialValue;
}
public Credential(CredentialValue credentialValue, String credentialType) {
this.credentialValue = credentialValue;
this.credentialType = credentialType;
}
public void setCredentialType(String credentialType) {
this.credentialType = credentialType;
}
public CredentialValue getCredentialValue() {
return credentialValue;
}
public String getCredentialType(){
return this.credentialType;
}
public void setCredentialValue(CredentialValue credentialValue) {
this.credentialValue = credentialValue;
}
public boolean equals(Credential otherCredential){
if(this.credentialType.equals(otherCredential.getCredentialType())){
if(this.credentialValue.equals(otherCredential.getCredentialValue())){
return true;
}
}
return false;
}
} | [
"[email protected]"
] | |
0de33378c5f966cf9740a2a7176370a812d1d98b | 178b5107fefb53f63d4b32e8e8f7f52084230b01 | /rpc-core/src/main/java/top/huhong/rpc/transport/socket/util/ObjectWriter.java | 658ab597de38dfe30415204a1f21903a095e6e7f | [] | no_license | 873696121/my-rpc-framework | c252117c66debe5bc046a3e55ca17509875d658c | c975ac180b95654b780dad19560349c70d0c8559 | refs/heads/main | 2023-04-19T10:11:00.274814 | 2021-05-03T07:45:52 | 2021-05-03T07:45:52 | 362,754,242 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,273 | java | package top.huhong.rpc.transport.socket.util;
import top.huhong.rpc.entity.RpcRequest;
import top.huhong.rpc.enumeration.PackageType;
import top.huhong.rpc.serializer.CommonSerializer;
import java.io.IOException;
import java.io.OutputStream;
public class ObjectWriter {
private static final int MAGIC_NUMBER = 0xCAFEBABE;
public static void writeObject(OutputStream outputStream, Object object, CommonSerializer serializer) throws IOException {
outputStream.write(intToBytes(MAGIC_NUMBER));
if (object instanceof RpcRequest) {
outputStream.write(intToBytes(PackageType.REQUEST_PACK.getCode()));
} else {
outputStream.write(intToBytes(PackageType.RESPONSE_PACK.getCode()));
}
outputStream.write(intToBytes(serializer.getCode()));
byte[] bytes = serializer.serialize(object);
outputStream.write(intToBytes(bytes.length));
outputStream.write(bytes);
outputStream.flush();
}
private static byte[] intToBytes(int value) {
byte[] src = new byte[4];
src[0] = (byte) ((value>>24) & 0xFF);
src[1] = (byte) ((value>>16)& 0xFF);
src[2] = (byte) ((value>>8)&0xFF);
src[3] = (byte) (value & 0xFF);
return src;
}
}
| [
"[email protected]"
] | |
437f1a26921d92ac02d700651bfd970b556a40db | 0cf25af7bf547f401ce603ecadba42c8fa37b9b8 | /imooc-coupon-service/coupon-template/src/main/java/com/imooc/coupon/TemplateApplication.java | 911bf68aadd767f69e49d5a0609f57fa89630b6e | [] | no_license | EngineerSun/imooc-coupon | f21980645feea15cf283550e17977953d2a3ab17 | 386493ef7fab69bea9c60a0c795aeec3ec51981b | refs/heads/master | 2022-12-29T17:34:18.738068 | 2020-10-18T02:38:07 | 2020-10-18T02:38:07 | 305,008,028 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 610 | java | package com.imooc.coupon;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableScheduling;
@EnableScheduling//开启定时任务
@EnableJpaAuditing
@EnableEurekaClient
@SpringBootApplication
public class TemplateApplication {
public static void main(String[] args) {
SpringApplication.run(TemplateApplication.class, args);
}
}
| [
"[email protected]"
] | |
2d677bcf0d22657a843df33089061d0c96f4ea22 | e36ae1983bf911caa7347c3c6a7c46ef7ab58112 | /src/jCode/Empresa.java | 6ed529944d129c40fe9e77ecf71f2639cd2d7154 | [] | no_license | murilorcm/primeiros-passos | cfa3c3317d1d202c1587522cc08a1775749ece42 | 0b171d9abb63b890b7adead53637d64115481bc2 | refs/heads/master | 2021-05-14T19:25:15.416631 | 2018-01-17T17:57:37 | 2018-01-17T17:57:37 | 116,156,967 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 847 | java | package jCode;
import java.util.ArrayList;
import java.util.List;
public class Empresa {
protected String nome;
protected List<Funcionario> funcionarios = new ArrayList();
protected String cpnj;
public void adicionarFuncionario (Funcionario f){
this.funcionarios.add(new Funcionario(f));
}
public void mostraFuncionarios(){
for (Funcionario funcionario: this.funcionarios) {
funcionario.mostraFuncionario();
}
}
public Funcionario getFuncionarios(int posicao) {
return funcionarios.get(posicao);
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getCpnj() {
return cpnj;
}
public void setCpnj(String cpnj) {
this.cpnj = cpnj;
}
}
| [
"[email protected]"
] | |
63bf692c3bf4ba310ba353d93126af7b597463c0 | 6a14cc6ffacbe4459b19f882b33d307ab08e8783 | /aliyun-java-sdk-drds/src/main/java/com/aliyuncs/drds/transform/v20150413/CreateTableResponseUnmarshaller.java | 1edd45e0dc7ef1780df350ca1bd14da40e12d8e7 | [
"Apache-2.0"
] | permissive | 425296516/aliyun-openapi-java-sdk | ea547c7dc8f05d1741848e1db65df91b19a390da | 0ed6542ff71e907bab3cf21311db3bfbca6ca84c | refs/heads/master | 2023-09-04T18:27:36.624698 | 2015-11-10T07:52:55 | 2015-11-10T07:52:55 | 46,623,385 | 1 | 2 | null | 2016-12-07T18:36:30 | 2015-11-21T16:28:33 | Java | UTF-8 | Java | false | false | 1,354 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.aliyuncs.drds.transform.v20150413;
import com.aliyuncs.drds.model.v20150413.CreateTableResponse;
import com.aliyuncs.transform.UnmarshallerContext;
public class CreateTableResponseUnmarshaller {
public static CreateTableResponse unmarshall(CreateTableResponse createTableResponse, UnmarshallerContext context) {
createTableResponse.setRequestId(context.stringValue("CreateTableResponse.RequestId"));
createTableResponse.setTaskId(context.stringValue("CreateTableResponse.TaskId"));
return createTableResponse;
}
} | [
"[email protected]"
] | |
006c42b997952885ef238832c11a0f198e55d1f8 | f2efeb58610b52d9ea30d9374c8107b92a8ee022 | /src/main/test/com/lgd/Mysql_Con_test.java | 40c5b490953ae4d0df2ca53d8b18cf2557acffeb | [] | no_license | GirlFriendNotFindException/jungle | af754c17c8e5d0e1caa6e30924c8c5435d7db5b1 | dc77ee3a4236af2c0951ebda476fcba80ec6c350 | refs/heads/master | 2020-03-10T13:12:27.990327 | 2018-04-13T11:57:14 | 2018-04-13T11:57:14 | 129,394,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 748 | java | package com.lgd;
import javax.annotation.Resource;
import org.apache.commons.dbcp.BasicDataSource;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:springConfig.xml")
public class Mysql_Con_test {
@Resource(name="dataSource")
private BasicDataSource dataSource;
@Resource(name="sqlSession")
private SqlSession session;
@Test
public void getDataSource(){
System.out.println(dataSource);
}
@Test
public void getSqlSession(){
System.out.println(session);
}
}
| [
"[email protected]"
] | |
c6903e9a1619f2b90f1929da15e724f9402c2add | 27120d2eb1026907d9af88b224214bfc8bbe2166 | /src/test/java/ucles/weblab/common/files/webapi/FileController_IT.java | 7168120cbbdd0f8d76e8d47c8de166c12d34e8f1 | [
"Apache-2.0"
] | permissive | eccosolutions/secure-files | 9a234f3223d7190bc5ebdb1c91280e3805fcc0a4 | 1bbf2e966fb12799ba40c4170ff443a8342772cb | refs/heads/master | 2021-05-05T17:32:47.326363 | 2018-01-13T00:58:34 | 2018-01-13T01:26:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 13,241 | java | package ucles.weblab.common.files.webapi;
import com.google.common.io.Resources;
import com.jayway.jsonpath.JsonPath;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.convert.threeten.Jsr310JpaConverters;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.multipart.MultipartException;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.servlet.DispatcherServlet;
import org.springframework.web.util.NestedServletException;
import ucles.weblab.common.domain.ConfigurableEntitySupport;
import ucles.weblab.common.files.domain.*;
import ucles.weblab.common.files.domain.jpa.FilesFactoryJpa;
import ucles.weblab.common.files.domain.jpa.SecureFileCollectionRepositoryJpa;
import ucles.weblab.common.files.domain.jpa.SecureFileEntityJpa;
import ucles.weblab.common.files.webapi.converter.FilesConverters;
import ucles.weblab.common.files.webapi.resource.FileCollectionResource;
import ucles.weblab.common.test.webapi.AbstractRestController_IT;
import ucles.weblab.common.multipart.webapi.jersey.JerseyMultipartResolver;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.text.MessageFormat;
import java.time.Instant;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Scanner;
import java.util.concurrent.CompletableFuture;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.hamcrest.Matchers.is;
import static org.springframework.http.HttpHeaders.LOCATION;
import static org.springframework.http.MediaType.IMAGE_JPEG;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* Integration test to check HTTP interaction with base64-encoded file content.
*
* @since 25/06/15
*/
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
//@WebIntegrationTest(value = "classpath:/public", randomPort = true)
@Transactional
public class FileController_IT extends AbstractRestController_IT {
/** This multipart resource MUST have CR LF line terminators, not just LF. */
private static final String BASE64_RESOURCE_NAME_1 = "base64multipart.crlf.txt";
private static final String BASE64_RESOURCE_NAME_2 = "base64-post-error500.crlf.txt";
private static final String BASE64_RESOURCE_NAME_3 = "base64-post-error400.crlf.txt";
private static final String IMAGE_RESOURCE_PATH = "beautiful_st_ives_cornwall_england_uk-1532356.jpg";
@Autowired
private FileDownloadCache fileDownloadCache;
@Autowired
private DownloadController downloadController;
@Configuration
@EnableJpaRepositories(basePackageClasses = {SecureFileCollectionRepositoryJpa.class})
@EntityScan(basePackageClasses = {SecureFileEntityJpa.class, Jsr310JpaConverters.class})
@ComponentScan(basePackageClasses = {FileController.class, DownloadController.class})
@Import({ConfigurableEntitySupport.class, DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, FilesConverters.class, FilesBuilders.class})
@EnableAutoConfiguration
public static class Config {
@Bean
public FilesFactory filesFactoryJpa() {
return new FilesFactoryJpa();
}
@Bean
public EncryptionService encryptionService() {
return new EncryptionServiceImpl(Arrays.asList(new AesGcmEncryptionStrategy("some-test-aad"), new DummyEncryptionStrategy()),
"0123456789012345".getBytes(UTF_8));
}
@Bean
public SecureFileCollectionService secureFileCollectionService(SecureFileCollectionRepository secureFileCollectionRepository, SecureFileRepository secureFileRepository) {
return new AutoPurgeSecureFileCollectionServiceImpl(secureFileCollectionRepository, secureFileRepository);
}
/**
* Use JerseyMultipartResolver instead of the default StandardServletMultipartResolver or CommonsMultipartResolver
* as it can handle base64 Content-Transfer-Encoding.
*/
@Bean(name = DispatcherServlet.MULTIPART_RESOLVER_BEAN_NAME)
MultipartResolver multipartResolver() {
return new JerseyMultipartResolver();
}
@Bean
FileDownloadCache fileDownloadCache() {
return new FileDownloadCacheInMemory();
}
}
@Test
public void testUploadingBase64EncodedFile() throws Exception {
MediaType multipartType = new MediaType(MediaType.MULTIPART_FORM_DATA, new HashMap<String, String>() {{
put("boundary", "----WebKitFormBoundaryrH2JPoateChY15Vo");
}});
final String collectionName = getClass().getSimpleName() + "-01";
final String notes = getClass().getSimpleName() + "-notes-01";
// Create the collection
mockMvc.perform(post("/api/files/")
.contentType(APPLICATION_JSON_UTF8)
.content(json(new FileCollectionResource(collectionName, Instant.now()))))
.andExpect(status().is2xxSuccessful());
// Upload the image
final CompletableFuture<String> imageLocation = new CompletableFuture<>();
final CompletableFuture<URI> imageDownload = new CompletableFuture<>();
final InputStream resource = getClass().getResourceAsStream(BASE64_RESOURCE_NAME_1);
try (final InputStreamReader readable = new InputStreamReader(resource, StandardCharsets.UTF_8)) {
final String base64PostData = readAll(readable);
mockMvc.perform(post("/api/files/")
.contentType(multipartType)
.accept("*/*")
.content(MessageFormat.format(base64PostData, collectionName, notes)))
.andExpect(status().isCreated())
.andExpect(content().contentType(APPLICATION_JSON_UTF8))
.andExpect(jsonPath("$.notes", is(notes)))
.andDo(result -> {
String loc = result.getResponse().getHeader(LOCATION);
System.out.println("imageLocation: " + loc);
imageLocation.complete(loc);
})
.andDo(result -> {
String loc = ((List<String>) JsonPath.read(result.getResponse().getContentAsString(),"$.links[?(@.rel=='enclosure')].href")).get(0);
System.out.println("imageDownload: " + loc);
imageDownload.complete(URI.create(loc));
});
}
// Follow the download link to get redirected to a temporary link
final URI contextRoot = getContextRoot(imageLocation.get());
URI relativeDownload = toContextRelativeUri(imageDownload.get(), contextRoot);
final CompletableFuture<URI> imageDownloadRedirected = new CompletableFuture<>();
mockMvc.perform(get(relativeDownload))
.andExpect(status().is3xxRedirection())
.andDo(result -> imageDownloadRedirected.complete(URI.create(result.getResponse().getHeader(LOCATION))));
// Fetch the temporary link and check we got the binary data back.
relativeDownload = toContextRelativeUri(imageDownloadRedirected.get(), contextRoot);
final byte[] originalData = Resources.toByteArray(getClass().getResource(IMAGE_RESOURCE_PATH));
mockMvc.perform(get(relativeDownload))
.andExpect(status().isOk())
.andExpect(content().contentType(IMAGE_JPEG))
.andExpect(content().bytes(originalData));
}
/**
* This test uses data generated by the real front-end code which was erroneously including the leading dashes
* in the Content-Type header.
* <p>
* These headers were used:
* <pre>
* Host: localhost:8080
* Connection: keep-alive
* Content-Length: 39817
* Pragma: no-cache
* Cache-Control: no-cache
* Origin: http://localhost:8080
* X-Requested-With: XMLHttpRequest
* User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36
* Content-Type: multipart/form-data; boundary=--FormDataObject0
* Referer: http://localhost:8080/
* Accept-Encoding: gzip, deflate
* Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
* </pre>
*/
@Test(expected = MultipartException.class)
public void testFrontEndGeneratedUploadFailsDueToBoundaryFailure() throws Throwable {
MediaType multipartType = new MediaType(MediaType.MULTIPART_FORM_DATA, new HashMap<String, String>() {{
put("boundary", "--FormDataObject0");
}});
final String collectionName = getClass().getSimpleName() + "-02";
// Create the collection
mockMvc.perform(post("/api/files/")
.contentType(APPLICATION_JSON_UTF8)
.content(json(new FileCollectionResource(collectionName, Instant.now()))))
.andExpect(status().is2xxSuccessful());
// Upload the image
final InputStream resource = getClass().getResourceAsStream(BASE64_RESOURCE_NAME_2);
try (final InputStreamReader readable = new InputStreamReader(resource, StandardCharsets.UTF_8)) {
final String base64PostData = readAll(readable);
mockMvc.perform(post("/api/files/")
.contentType(multipartType)
.accept("*/*")
.content(MessageFormat.format(base64PostData, collectionName)))
.andExpect(status().isBadRequest());
} catch (NestedServletException e) {
throw e.getRootCause();
}
}
/**
* This test uses data generated by the real front-end code.
* <p>
* These headers were used:
* <pre>
* Host: localhost:3000
* Connection: keep-alive
* Content-Length: 39864
* Pragma: no-cache
* Cache-Control: no-cache
* Origin: http://localhost:3000
* X-Requested-With: XMLHttpRequest
* User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36
* Content-Type: multipart/form-data; boundary=FormDataObject3c9
* Referer: http://localhost:3000/
* Accept-Encoding: gzip, deflate
* Accept-Language: en-GB,en-US;q=0.8,en;q=0.6
* </pre>
*/
@Test
public void testFrontEndGeneratedUploadFailsDueToBoundaryFailureAgain() throws Exception {
MediaType multipartType = new MediaType(MediaType.MULTIPART_FORM_DATA, new HashMap<String, String>() {{
put("boundary", "FormDataObject3c9");
}});
final String collectionName = "a7f43deb-3bb8-471a-a88c-e02a55082b9a";
// Create the collection
mockMvc.perform(post("/api/files/")
.contentType(APPLICATION_JSON_UTF8)
.content(json(new FileCollectionResource(collectionName, Instant.now()))))
.andExpect(status().is2xxSuccessful());
// Upload the image
final InputStream resource = getClass().getResourceAsStream(BASE64_RESOURCE_NAME_3);
try (final InputStreamReader readable = new InputStreamReader(resource, StandardCharsets.UTF_8)) {
final String base64PostData = readAll(readable);
mockMvc.perform(post("/api/files/")
.contentType(multipartType)
.accept("*/*")
.content(MessageFormat.format(base64PostData, collectionName)))
.andExpect(status().is2xxSuccessful());
}
}
/**
* From https://weblogs.java.net/blog/pat/archive/2004/10/stupid_scanner.html
*/
String readAll(Readable readable) {
return new Scanner(readable).useDelimiter("\\A").next();
}
}
| [
"[email protected]"
] | |
07e8c2bcbe15251d58a10e8669b94d86756a3e00 | 716e8d06b67be4d9d2358d630f8d6cd762a20c7f | /zuul/src/main/java/com/zhuge/spring/cloud/learn/zuul/MyZuulFilter.java | 3866de1f338a9a0e36c60d7a6e5c4c57b3193280 | [] | no_license | zhuge134/spring-cloud-learn | 3b1da82fe1423f8fe36e77a17fbe1921edd6be39 | 94e40318c15b89ce91659f4bb0b15ea1ec9a18cb | refs/heads/master | 2020-04-14T23:57:21.235066 | 2019-02-17T11:25:24 | 2019-02-17T11:25:24 | 163,741,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,561 | java | package com.zhuge.spring.cloud.learn.zuul;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.netflix.zuul.exception.ZuulException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
@Component
public class MyZuulFilter extends ZuulFilter {
private static Logger log = LoggerFactory.getLogger(MyZuulFilter.class);
@Override
public String filterType() {
return "pre";
}
@Override
public int filterOrder() {
return 0;
}
@Override
public boolean shouldFilter() {
return true;
}
@Override
public Object run() throws ZuulException {
RequestContext ctx = RequestContext.getCurrentContext();
HttpServletRequest request = ctx.getRequest();
log.info("method:{}, url:{}", request.getMethod(), request.getRequestURL().toString());
String token = request.getParameter("token");
if (null == token) {
log.warn("token is empty!");
ctx.setSendZuulResponse(false);
ctx.setResponseStatusCode(HttpStatus.UNAUTHORIZED.value());
try {
ctx.getResponse().getWriter().write("token is empty !");
} catch (IOException e) {
log.error("IOException for", e);
}
return null;
}
log.info("ok!");
return null;
}
}
| [
"[email protected]"
] | |
81eb52bce4d9367bb2efdbdd21da362e77c72698 | ce0fb19d8bda8dc26bb053525b3801965768b675 | /app/src/main/java/com/color_analysis_in_xinjiangtimes/view/Indicator.java | 8796be414ac2877bea9798661664bdfd314b9a73 | [] | no_license | agony48/doushouqi | e90b5ad824d9b9b770de0f1a60e562ca72f3f6fb | a85fa36733f3fac8cca227a27b4d06c83168034c | refs/heads/master | 2020-05-04T08:37:44.852220 | 2019-04-02T10:04:58 | 2019-04-02T10:04:58 | 179,050,267 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,589 | java | package com.color_analysis_in_xinjiangtimes.view;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import com.color_analysis_in_xinjiangtimes.R;
/**
* 选中菜单
* @author lishan
* @date 16/7/27
* @version 1.0
*/
public class Indicator extends View {
private Paint mPaint; // 画指示符的paint
private int mTop; // 指示符的top
private int mLeft; // 指示符的left
private int mWidth; // 指示符的width
private int mHeight = 5; // 指示符的高度
private int mColor; // 指示符的颜色
private int mChildCount;
private int position=0;
public Indicator(Context context, AttributeSet attrs) {
super(context, attrs);
// setBackgroundColor(Color.TRANSPARENT); // 必须设置背景,否则onDraw不执行
// 获取自定义属性 指示符的颜色
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.Indicator, 0, 0);
mChildCount= ta.getInt(R.styleable.Indicator_count,1);
mColor = ta.getColor(R.styleable.Indicator_Indicator_color, Color.parseColor("#3cb1f7"));
ta.recycle();
// 初始化paint
mPaint = new Paint();
mPaint.setColor(mColor);
mPaint.setAntiAlias(true);
}
public void setChildCount(int childCount){
this.mChildCount = childCount;
postInvalidate();
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
mTop = getMeasuredHeight(); // 测量的高度即指示符的顶部位置
int width = getMeasuredWidth(); // 获取测量的总宽度
int height = mTop + mHeight; // 重新定义一下测量的高度
setMeasuredDimension(width, height);
}
public void scroll(int position) {
this.position = position;
mLeft = position * mWidth;
postInvalidate();
}
@Override
protected void onDraw(Canvas canvas) {
int width = getMeasuredWidth(); // 获取测量的总宽度
mWidth = width / mChildCount; // 指示符的宽度为总宽度/item的个数
mLeft = position * mWidth;
// 圈出一个矩形
Rect rect = new Rect(mLeft, mTop, mLeft + mWidth, mTop + mHeight);
canvas.drawRect(rect, mPaint); // 绘制该矩形
super.onDraw(canvas);
}
}
| [
"[email protected]"
] | |
b3d17cf12972f3710b71e91d5edf53a9c3c65da3 | b93e801bb9a11fd820201ad56894b896e0831ff1 | /CleverWeb-Service/src/main/java/com/cleverweb/service/fhdb/brdb/BRdbManager.java | 53d5fd8bc89b6d8433d66cd24ca6e313dbe664bf | [
"Apache-2.0"
] | permissive | showtofly/CleverWeb | c41569f7a238112196fa37a8cb7f317bc0a49a97 | f7a9079f2e3206c255fe37ae6b750a3f453807c0 | refs/heads/master | 2023-04-13T13:34:35.442782 | 2017-02-06T14:29:10 | 2017-02-06T14:29:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,098 | java | package com.cleverweb.service.fhdb.brdb;
import java.util.List;
import com.cleverweb.core.entity.Page;
import com.cleverweb.common.util.PageData;
/**
* 说明: 数据库管理接口
* 创建人:FH Q313596790
* 创建时间:2016-03-30
* @version
*/
public interface BRdbManager{
/**新增
* @param pd
* @throws Exception
*/
public void save(PageData pd)throws Exception;
/**删除
* @param pd
* @throws Exception
*/
public void delete(PageData pd)throws Exception;
/**修改
* @param pd
* @throws Exception
*/
public void edit(PageData pd)throws Exception;
/**列表
* @param page
* @throws Exception
*/
public List<PageData> list(Page page)throws Exception;
/**列表(全部)
* @param pd
* @throws Exception
*/
public List<PageData> listAll(PageData pd)throws Exception;
/**通过id获取数据
* @param pd
* @throws Exception
*/
public PageData findById(PageData pd)throws Exception;
/**批量删除
* @param ArrayDATA_IDS
* @throws Exception
*/
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
}
| [
"[email protected]"
] | |
de2ffc79c4942b640115eb48ee77dc75961d5e77 | ea91069f5ac25973d612d333c5dd29ee3c3f7d3b | /app/src/main/java/greencode/ir/consulant/dialog/FreeTimeInterface.java | fddd7ea1e6d512f99b0b41144f0da1ef971446e1 | [] | no_license | alirezat66/consultant | fe797cb9050f5dbc5f4387b2f4811767e7d81fb4 | 8df40a38ab68ecc33dd7ebbadf93908fd03fd4a2 | refs/heads/master | 2022-02-05T19:20:17.577589 | 2019-06-18T10:16:30 | 2019-06-18T10:16:30 | 192,516,171 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 155 | java | package greencode.ir.consulant.dialog;
public interface FreeTimeInterface {
void onSuccess(String start,String end);
public void onRejected();
}
| [
"[email protected]"
] | |
11c48d4c675108420f4813de5cc407e6030a810a | 3813f1a7bac934b26057b5f44d1b65a14543397d | /workspace/03_array/src/ex01_array/Ex03_array_reference.java | 2870af52ef9abe66aef1d9bca3ff667e80d2dfc0 | [] | no_license | dksqjq4851/javastudy | 156da0449c2414f717bee44cd5f9397a41801f88 | 0960a4ddc752dd2f9d575e7e93d8e7f4937ab806 | refs/heads/main | 2023-04-01T21:52:52.998771 | 2021-03-31T05:54:01 | 2021-03-31T05:54:01 | 347,885,756 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 991 | java | package ex01_array;
public class Ex03_array_reference {
public static void main(String[] args) {
// 배열은 reference type입니다.
int[] arr = new int[3];
System.out.println(arr); // new int[3]을 통해서 생성된 배열요소들의 주소가 저장되어 있습니다.
// 배열의 길이를 조정하는 (일반적으로 늘이는 작업) 코드입니다.
int[] a = { 1, 2, 3 }; // 배열 a의 길이는 3입니다.
int[] b = new int[10]; // 배열 b의 길이는 10입니다.
// b[0] = a[0], b[1] = a[1], b[2] = a[2]
for (int i = 0; i < a.length; i++) {
b[i] = a[i];
}
// a에는 {1, 2, 3}이 저장된 주소가 있습니다.
// b에는 {1, 2, 3, 0, 0, 0, 0, 0, 0, 0}이 저장된 주소가 있습니다.
a = b; // a에는 {1, 2, 3, 0, 0, 0, 0, 0, 0, 0}이 저장된 주소가 있습니다.
// 배열 a의 길이가 증가했습니다.
for (int i = 0; i < a.length; i++) {
System.out.println(a[i]);
}
}
}
| [
"[email protected]"
] | |
b18ded40a42c482909ee5c6a5cb3cd95dc16d4f0 | f099ca4184b15a8bca436d4ea7182a451ed1a40e | /Licenciatura_BSc/3º Ano/1º Semestre/Sistemas Distribuidos/Guiões TP/Feito em Aulas/Guiao 5/Writer.java | 14567a111ba98eec2616c5a5ea2096fa2c960dd3 | [
"MIT"
] | permissive | MikeDM16/Computer-Science-UMinho | f74c5a57877235908d7c5125ffa93e2936993795 | 74a3441762fd5557234c5080579567f7c4b019eb | refs/heads/master | 2020-05-03T09:06:40.225626 | 2019-03-30T15:59:42 | 2019-03-30T15:59:42 | 178,545,377 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 636 | java |
/**
* Escreva a descrição da classe Writer aqui.
*
* @author (seu nome)
* @version (número de versão ou data)
*/
public class Writer implements Runnable
{
RWLock rw;
public Writer(RWLock rw){ this.rw = rw; }
public void escrever() throws InterruptedException {
while( rw.nEscritores >0 || rw.nLeitores > 0 ){
rw.escritores.await();
}
rw.writerLock();
rw.nEscritores++;
rw.escrever();
rw.nEscritores--;
rw.writerUnlock();
rw.escritores.signalAll();
rw.leitores.signalAll();
}
public void run(){}
}
| [
"[email protected]"
] | |
e194e72f4b89af5a2ddfdb8c6b655e82ac8cfc26 | ba0e0dcadef65693a319b0090b92d4116b4cc32b | /myebay/src/dao/OrderItemDAO.java | b92512c96d41aa5dca0732e712c8756e1a58b83b | [] | no_license | Feng-HuaJie/shopping | 505aae33efac6f1e59365c1d4870e8f2778dea92 | 23de334638e5bf95c0cb85f4424ad1c51a7ac56f | refs/heads/master | 2020-03-22T16:07:03.210431 | 2018-07-24T14:55:24 | 2018-07-24T14:55:24 | 140,303,892 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,284 | java | package dao;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import domain.OrderItem;
public class OrderItemDAO {
public static void main(String[] args) {
}
public void insert(OrderItem oi) {
try {
Class.forName("com.mysql.jdbc.Driver");
Connection c = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/cart?characterEncoding=UTF-8",
"root", "admin");
String sql = "insert into orderitem values(null,?,?,?)";
PreparedStatement ps = c.prepareStatement(sql);
ps.setInt(1,oi.getProduct().getId());
ps.setInt(2,oi.getNum());
ps.setInt(3,oi.getOrder().getId());
ps.execute();
ps.close();
c.close();
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
| [
"[email protected]"
] | |
4c001f4e022ab1151f7ed0b068c5cdbabad1357d | 07b996b8440dbe5499b857f284e0aa86193f2faa | /src/test/java/com/sky/ddt/service/UserServiceTest2.java | b0499d7e01baedef2d7f1e39e2a4c2d65e2a5720 | [] | no_license | skywhitebai/ddt | 2b0b35194199abf2126e8297316ad16fec2186b9 | 33ce8da01d75f185c832e32ac117e23a7040cf64 | refs/heads/master | 2023-06-07T00:29:53.206163 | 2023-06-04T04:19:53 | 2023-06-04T04:19:53 | 311,826,029 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 773 | java | package com.sky.ddt.service;
import com.sky.ddt.BaseControllerTest;
import com.sky.ddt.entity.User;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import java.util.List;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration(locations = {"classpath*:/spring-mvc.xml","classpath*:spring-mybatis.xml"})
public class UserServiceTest2 {
@Autowired
public IUserService userService;
@Test
public void getUserList() {
System.out.println("123");
}
}
| [
"[email protected]"
] | |
e0a66487f976b51145ccd88c40080b1965e1958c | b49c6f309316b0e588f131ec14b124d9d99a534d | /src/com/codechef/CodeChef1.java | a703278b3c2828c3f69f98a11d67d20c5c665a7b | [] | no_license | silversteak/coding-practices | 058ae13ab3b2f2db68dda4b9ccb910c778a41519 | f463a1467eaae2e243933085b885d2e2c5f61eb7 | refs/heads/master | 2021-06-25T21:47:31.122855 | 2021-04-10T10:10:59 | 2021-04-10T10:10:59 | 224,480,793 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,122 | java | package com.codechef;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
public class CodeChef1 {
public static void main(String[] args) {
int t;
try {
BufferedReader inp = new BufferedReader(new InputStreamReader(System.in));
t = Integer.parseInt(inp.readLine());
while(t > 0){
int j = Integer.parseInt(inp.readLine());
String input[] = new String[j];
for(int i = 0; i < j ; i++)
input[i] = inp.readLine();
Boolean prim[] = new Boolean[26];
Arrays.fill(prim, new Boolean(true));
for(int i = 0; i < j; i++) {
Boolean sec[] = new Boolean[26];
Arrays.fill(sec, new Boolean(false));
for(int k = 0; k < input[i].length(); k++) {
if(prim[input[i].charAt(k)-'a'])
sec[input[i].charAt(k)-'a'] = true;
}
System.arraycopy(sec, 0, prim, 0, 26);
}
int count = 0;
for(int i = 0; i < 26;i++) {
if(prim[i])
count++;
}
System.out.println(count);
t--;
}
}
catch(Exception e) {
}
}
}
| [
"[email protected]"
] | |
ccc97b03a98579abe1a1076f8c4a156fe6430c1e | 778d73eda9c72e1763d92a44f181d58d79205f8e | /framework/soa-web-framework/src/main/java/com/lebaoxun/soa/web/framework/http/UploadDownload.java | c436b499d5e52bfd3ea7abc3e27d4f394e8bed88 | [] | no_license | caiqianyi/guess | c3839e85dc600862fafa0901143b83719a773920 | 40784bcc7745371cd8ff6866031524942ba7c528 | refs/heads/master | 2021-09-25T21:56:50.024422 | 2018-10-26T02:37:17 | 2018-10-26T02:37:17 | 103,381,452 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,530 | java | /**
*
*/
package com.lebaoxun.soa.web.framework.http;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;
/**
* 上传下载
* @author xjc
*
*/
public class UploadDownload {
public static void dounload(HttpServletRequest request, HttpServletResponse response, String storeName) throws Exception{
request.setCharacterEncoding("UTF-8");
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
//获取项目根目录
String ctxPath = request.getSession().getServletContext().getRealPath("");
//获取下载文件路径 (storeName 文件名称)
String downLoadPath = ctxPath+"/download/"+ storeName;
//获取文件的长度
long fileLength = new File(downLoadPath).length();
//设置文件输出类型
response.setContentType("application/octet-stream");
response.setHeader("Content-disposition", "attachment; filename=" + new String(storeName.getBytes("utf-8"), "ISO8859-1"));
//设置输出长度
response.setHeader("Content-Length", String.valueOf(fileLength));
//获取输入流
bis = new BufferedInputStream(new FileInputStream(downLoadPath));
//输出流
bos = new BufferedOutputStream(response.getOutputStream());
byte[] buff = new byte[2048];
int bytesRead;
while (-1 != (bytesRead = bis.read(buff, 0, buff.length))) {
bos.write(buff, 0, bytesRead);
}
//关闭流
bis.close();
bos.close();
}
public static Map<String, String> upload(MultipartFile file, HttpServletRequest request){
Map<String, String> resMap = new HashMap<String, String>();
String s = UUID.randomUUID().toString();
String replace = s.replace('-', '_');
String fileName = file.getOriginalFilename();
String newName = replace + "." + fileName.substring(fileName.lastIndexOf(".") + 1);
String path = request.getSession().getServletContext().getRealPath("upfile") + "/";
String pa = path+newName;
resMap.put("path", path+newName);
try {
file.transferTo(new File(path+newName));
resMap.put("flag", "VIP0000");
} catch (IllegalStateException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return resMap;
}
}
| [
"[email protected]"
] | |
fed59e1c9dcf0dfa0c2cdff6f324244b0b39230e | 16f17a0d585229ac6dcf395e5275381e2cece5ea | /src/com/MainMethod.java | 0ce26c8254adf76d734df2abaf54894081071b46 | [] | no_license | chinmoysihi/QueryDatasetWithoutSQLin-JAVA | 06fdf124fbcb770ec8d7b2050669c8243a33bb6b | bcfae8af4334f2dd43fe81615c85243fca8e33cd | refs/heads/master | 2020-03-29T08:48:11.858878 | 2018-09-21T08:15:54 | 2018-09-21T08:15:54 | 149,727,701 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,501 | java | package com;
import java.util.*;
public class MainMethod {
public static final String CSV_deliveries="D:\\EclipseWorkSpace\\QueryDatasetWithoutSQLin-JAVA\\iplDataset\\deliveries.csv";
public static final String CSV_matches="D:\\EclipseWorkSpace\\QueryDatasetWithoutSQLin-JAVA\\iplDataset\\matches.csv";
static ArrayList dell=null;
static ArrayList matt=null;
public static void main(String[] args) {
// TODO Auto-generated method stub
dell=ReadDeliveries.readDataLineByLine(CSV_deliveries);
System.out.println(" Deliveries read Completed");
matt=ReadMatches.readDataLineByLine(CSV_matches);
System.out.println(" Matches read Completed");
System.out.println();
System.out.println("Top 4 teams which elected to field first after winning toss in the year 2016 and 2017.");
Top4TeamsFieldFirst.fieldFirst(matt);
System.out.println();
System.out.println("List of Total number of fours, sixes, total score with respect to team and year");
TotalFourSixScore.score(dell, matt);
System.out.println();
System.out.println("Top 10 best economy rate bowler with respect to year who bowled at least 10 overs");
TopTenEconomy.economy(dell, matt);
System.out.println();
System.out.println("Team name which has Highest Net Run Rate with respect to year");
TeamNetRunRate.netRunRate(dell, matt);
}
}
| [
"[email protected]"
] | |
b410d8152cc8a2c6e08881709090fa1965a70a1f | e6f74cc2c044ab10894d856d316b0226bff7319a | /src/mx/com/rodel/utils/SoundHelper.java | 89bd5058da8772408001ef0c3b99af0ef8a234af | [] | no_license | rodel77/ItemRescuer | 182c46a28c6145eae6e57e6fc08054319a22c8f9 | 2e89979e33bc7ae23a1bffb383e90dd415502da4 | refs/heads/master | 2020-03-23T06:21:23.630514 | 2018-07-16T23:27:36 | 2018-07-16T23:27:36 | 141,205,442 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 31,220 | java | package mx.com.rodel.utils;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
/**
* Sound helper enum
*
* Select one sound and play it, in 1.7/1.8/1.9/1.10
*
* @author rodel77
*/
public enum SoundHelper {
AMBIENT_CAVE("ambient_cave", "ambient.cave"),
BLOCK_ANVIL_BREAK("dig.stone", "block.anvil.break"),
BLOCK_ANVIL_DESTROY("random.anvil_break", "block.anvil.destroy"),
BLOCK_ANVIL_FALL("step.stone", "block.anvil.fall"),
BLOCK_ANVIL_HIT("step.stone", "block.anvil.hit"),
BLOCK_ANVIL_LAND("random.anvil_land", "block.anvil.land"),
BLOCK_ANVIL_PLACE("random.anvil_land", "block.anvil.place"),
BLOCK_ANVIL_STEP("step.stone", "block.anvil.step"),
BLOCK_ANVIL_USE("random.anvil_use", "block.anvil.use"),
BLOCK_BREWING_STAND_BREW("random.brup:0", "block.brewing_stand.brew"),
BLOCK_CHEST_CLOSE("random.chestopen", "block.chest.close"),
BLOCK_CHEST_LOCKED("random.door_open", "block.chest.locked"),
BLOCK_CHEST_OPEN("random.chestclosed", "block.chest.open"),
BLOCK_CHORUS_FLOWER_DEATH("step.gravel:0", "block.chorus_flower.death"),
BLOCK_CHORUS_FLOWER_GROW("step.gravel:0", "block.chorus_flower.grow"),
BLOCK_CLOTH_BREAK("dig.cloth", "block.cloth.break"),
BLOCK_CLOTH_FALL("step.cloth", "block.cloth.fall"),
BLOCK_CLOTH_HIT("step.cloth", "block.cloth.hit"),
BLOCK_CLOTH_PLACE("dig.cloth", "block.cloth.place"),
BLOCK_CLOTH_STEP("step.cloth", "block.cloth.step"),
BLOCK_COMPARATOR_CLICK("random.click", "block.comparator.click"),
BLOCK_DISPENSER_DISPENSE("random.click", "block.dispenser.dispense"),
BLOCK_DISPENSER_FAIL("random.click", "block.dispenser.fail"),
BLOCK_DISPENSER_LAUNCH("random.bow", "block.dispenser.launch"),
BLOCK_ENDERCHEST_CLOSE("random.chestclosed", "block.enderchest.close"),
BLOCK_ENDERCHEST_OPEN("random.chestopen", "block.enderchest.open"),
BLOCK_END_GATEWAY_SPAWN("random.explode", "block.end_gateway.spawn"),
BLOCK_FENCE_GATE_CLOSE("random.door_close", "block.fence_gate.close"),
BLOCK_FENCE_GATE_OPEN("random.door_open", "block.fence_gate.open"),
BLOCK_FIRE_AMBIENT("fire.fire", "block.fire.ambient"),
BLOCK_FIRE_EXTINGUISH("random.fizz", "block.fire.extinguish"),
BLOCK_FURNACE_FIRE_CRACKLE("fire.fire", "block.furnace.fire_crackle"),
BLOCK_GLASS_BREAK("random.glass", "block.glass.break"),
BLOCK_GLASS_FALL("step.stone", "block.glass.fall"),
BLOCK_GLASS_HIT("step.stone", "block.glass.hit"),
BLOCK_GLASS_PLACE("dig.stone", "block.glass.place"),
BLOCK_GLASS_STEP("step.stone", "block.glass.step"),
BLOCK_GRASS_BREAK("dig.grass", "block.grass.break"),
BLOCK_GRASS_FALL("step.grass", "block.grass.fall"),
BLOCK_GRASS_HIT("step.grass", "block.grass.hit"),
BLOCK_GRASS_PLACE("dig.grass", "block.grass.place"),
BLOCK_GRASS_STEP("step.grass", "block.grass.step"),
BLOCK_GRAVEL_BREAK("dig.gravel", "block.gravel.break"),
BLOCK_GRAVEL_FALL("step.gravel", "block.gravel.fall"),
BLOCK_GRAVEL_HIT("step.gravel", "block.gravel.hit"),
BLOCK_GRAVEL_PLACE("dig.gravel", "block.gravel.place"),
BLOCK_GRAVEL_STEP("step.gravel", "block.gravel.step"),
BLOCK_IRON_DOOR_CLOSE("random.door_close", "block.iron_door.close"),
BLOCK_IRON_DOOR_OPEN("random.door_open", "block.iron_door.open"),
BLOCK_IRON_TRAPDOOR_CLOSE("random.door_close", "block.iron_trapdoor.close"),
BLOCK_IRON_TRAPDOOR_OPEN("random.door_open", "block.iron_trapdoor.open"),
BLOCK_LADDER_BREAK("dig.ladder", "block.ladder.break"),
BLOCK_LADDER_FALL("step.ladder", "block.ladder.fall"),
BLOCK_LADDER_HIT("step.ladder", "block.ladder.hit"),
BLOCK_LADDER_PLACE("dig.ladder", "block.ladder.place"),
BLOCK_LADDER_STEP("step.ladder", "block.ladder.step"),
BLOCK_LAVA_AMBIENT("liquid.lava", "block.lava.ambient"),
BLOCK_LAVA_EXTINGUISH("random.fizz", "block.lava.extinguish"),
BLOCK_LAVA_POP("liquid.lavapop", "block.lava.pop"),
BLOCK_LEVER_CLICK("random.click", "block.lever.click"),
BLOCK_METAL_BREAK("dig.stone", "block.metal.break"),
BLOCK_METAL_FALL("step.stone", "block.metal.fall"),
BLOCK_METAL_HIT("step.stone", "block.metal.hit"),
BLOCK_METAL_PLACE("dig.stone", "block.metal.place"),
BLOCK_METAL_PRESSUREPLATE_CLICK_OFF("random.click", "block.metal_pressureplate.click_off"),
BLOCK_METAL_PRESSUREPLATE_CLICK_ON("random.click", "block.metal_pressureplate.click_on"),
BLOCK_METAL_STEP("step.stone", "block.metal.step"),
BLOCK_NOTE_BASEDRUM("note.bd", "block.note.basedrum"),
BLOCK_NOTE_BASS("note.bass", "block.note.bass"),
BLOCK_NOTE_HARP("note.harp", "block.note.harp"),
BLOCK_NOTE_HAT("note.hat", "block.note.hat"),
BLOCK_NOTE_PLING("note.pling", "block.note.pling"),
BLOCK_NOTE_SNARE("note.snare", "block.note.snare"),
BLOCK_PISTON_CONTRACT("tile.piston.in", "block.piston.contract"),
BLOCK_PISTON_EXTEND("tile.piston.out", "block.piston.extend"),
BLOCK_PORTAL_AMBIENT("portal.portal", "block.portal.ambient"),
BLOCK_PORTAL_TRAVEL("portal.travel", "block.portal.travel"),
BLOCK_PORTAL_TRIGGER("portal.trigger", "block.portal.trigger"),
BLOCK_REDSTONE_TORCH_BURNOUT("random.fizz", "block.redstone_torch.burnout"),
BLOCK_SAND_BREAK("dig.sand", "block.sand.break"),
BLOCK_SAND_FALL("step.sand", "block.sand.fall"),
BLOCK_SAND_HIT("step.sand", "block.sand.hit"),
BLOCK_SAND_PLACE("dig.sand", "block.sand.place"),
BLOCK_SAND_STEP("step.sand", "block.sand.step"),
BLOCK_SLIME_BREAK("mob.slime.big", "block.slime.break"),
BLOCK_SLIME_FALL("mob.slime.attack", "block.slime.fall"),
BLOCK_SLIME_HIT("mob.slime.attack", "block.slime.hit"),
BLOCK_SLIME_PLACE("mob.slime.big", "block.slime.place"),
BLOCK_SLIME_STEP("mob.slime.attack", "block.slime.step"),
BLOCK_SNOW_BREAK("dig.snow", "block.snow.break"),
BLOCK_SNOW_FALL("step.snow", "block.snow.fall"),
BLOCK_SNOW_HIT("step.snow", "block.snow.hit"),
BLOCK_SNOW_PLACE("dig.snow", "block.snow.place"),
BLOCK_SNOW_STEP("step.snow", "block.snow.step"),
BLOCK_STONE_BREAK("dig.stone", "block.stone.break"),
BLOCK_STONE_BUTTON_CLICK_OFF("random.click", "block.stone_button.click_off"),
BLOCK_STONE_BUTTON_CLICK_ON("random.click", "block.stone_button.click_on"),
BLOCK_STONE_FALL("step.stone", "block.stone.fall"),
BLOCK_STONE_HIT("step.stone", "block.stone.hit"),
BLOCK_STONE_PLACE("dig.stone", "block.stone.place"),
BLOCK_STONE_PRESSUREPLATE_CLICK_OFF("random.click", "block.stone_pressureplate.click_off"),
BLOCK_STONE_PRESSUREPLATE_CLICK_ON("random.click", "block.stone_pressureplate.click_on"),
BLOCK_STONE_STEP("step.stone", "block.stone.step"),
BLOCK_TRIPWIRE_ATTACH("random.click", "block.tripwire.attach"),
BLOCK_TRIPWIRE_CLICK_OFF("random.click", "block.tripwire.click_off"),
BLOCK_TRIPWIRE_CLICK_ON("random.click", "block.tripwire.click_on"),
BLOCK_TRIPWIRE_DETACH("random.bowhit", "block.tripwire.detach"),
BLOCK_WATERLILY_PLACE("mob.slime.small", "block.waterlily.place"),
BLOCK_WATER_AMBIENT("liquid.water", "block.water.ambient"),
BLOCK_WOODEN_DOOR_CLOSE("random.door_close", "block.wooden_door.close"),
BLOCK_WOODEN_DOOR_OPEN("random.door_open", "block.wooden_door.open"),
BLOCK_WOODEN_TRAPDOOR_CLOSE("random.door_close", "block.wooden_trapdoor.close"),
BLOCK_WOODEN_TRAPDOOR_OPEN("random.door_open", "block.wooden_trapdoor.open"),
BLOCK_WOOD_BREAK("dig.wood", "block.wood.break"),
BLOCK_WOOD_BUTTON_CLICK_OFF("random.click", "block.wood_button.click_off"),
BLOCK_WOOD_BUTTON_CLICK_ON("random.click", "block.wood_button.click_on"),
BLOCK_WOOD_FALL("step.wood", "block.wood_fall"),
BLOCK_WOOD_HIT("step.wood", "block.wood.hit"),
BLOCK_WOOD_PLACE("dig.wood", "block.wood.place"),
BLOCK_WOOD_PRESSUREPLATE_CLICK_OFF("random.click", "block.wood_pressureplate.click_off"),
BLOCK_WOOD_PRESSUREPLATE_CLICK_ON("random.click", "block.wood_pressureplate.click_on"),
BLOCK_WOOD_STEP("step.wood", "block.wood.step"),
ENCHANT_THORNS_HIT("damage.hit", "enchant.thorns.hit"),
ENTITY_ARMORSTAND_BREAK("dig.wood", "entity.armorstand.break"),
ENTITY_ARMORSTAND_FALL("step.wood", "entity.armorstand.fall"),
ENTITY_ARMORSTAND_HIT("step.wood", "entity.armorstand.hit"),
ENTITY_ARMORSTAND_PLACE("dig.wood", "entity.armorstand.place"),
ENTITY_ARROW_HIT("random.bowhit", "entity.arrow.hit"),
ENTITY_ARROW_HIT_PLAYER("random.successful_hit", "entity.arrow.hit_player"),
ENTITY_ARROW_SHOOT("random.bow", "entity.arrow.shoot"),
ENTITY_BAT_AMBIENT("mob.bat.loop", "entity.bat.ambient"),
ENTITY_BAT_DEATH("mob.bat.idle", "entity.bat.death"),
ENTITY_BAT_HURT("mob.bat.hurt", "entity.bat.hurt"),
ENTITY_BAT_LOOP("mob.bat.loop", "entity.bat.loop"),
ENTITY_BAT_TAKEOFF("mob.bat.takeoff", "entity.bat.takeoff"),
ENTITY_BLAZE_AMBIENT("mob.blaze.breathe", "entity.blaze.ambient"),
ENTITY_BLAZE_BURN("fire.fire", "entity.blaze.burn"),
ENTITY_BLAZE_DEATH("mob.blaze.death", "entity.blaze.death"),
ENTITY_BLAZE_HURT("mob.blaze.hit", "entity.blaze.hurt"),
ENTITY_BLAZE_SHOOT("mob.ghast.fireball4", "entity.blaze.shoot"),
ENTITY_BOBBER_SPLASH("liquid.splash", "entity.bobber_splash"),
ENTITY_BOBBER_THROW("random.bow", "entity.bobber_throw"),
ENTITY_CAT_AMBIENT("mob.cat.meow", "entity.cat.ambient"),
ENTITY_CAT_DEATH("mob.cat.hitt", "entity.cat.death"),
ENTITY_CAT_HISS("mob.cat.hiss", "entity.cat.hiss"),
ENTITY_CAT_HURT("mob.cat.hitt", "entity.cat.hurt"),
ENTITY_CAT_PURR("mob.cat.purr", "entity.cat.purr"),
ENTITY_CAT_PURREOW("mob.cat.purreow", "entity.cat.purreow"),
ENTITY_CHICKEN_AMBIENT("mob.chicken.say", "entity.chicken.ambient"),
ENTITY_CHICKEN_DEATH("mob.chicken.hurt", "entity.chicken.death"),
ENTITY_CHICKEN_EGG("mob.chicken.plop", "entity.chicken.egg"),
ENTITY_CHICKEN_HURT("mob.chicken.hurt", "entity.chicken.hurt"),
ENTITY_CHICKEN_STEP("mob.chicken.step", "entity.chicken.step"),
ENTITY_COW_AMBIENT("mob.cow.say", "entity.cow.ambient"),
ENTITY_COW_DEATH("mob.cow.hurt", "entity.cow.death"),
ENTITY_COW_HURT("mob.cow.hurt", "entity.cow.hurt"),
ENTITY_COW_MILK("random.pop", "entity.cow.milk"),
ENTITY_COW_STEP("mob.cow.step", "entity.cow.step"),
ENTITY_CREEPER_DEATH("mob.creeper.death", "entity.creeper.death"),
ENTITY_CREEPER_HURT("mob.creeper.death", "entity.creeper.hurt"),
ENTITY_CREEPER_PRIMED("random.fuse", "entity.creeper.primed"),
ENTITY_DONKEY_AMBIENT("mob.donkey.idle", "entity.donkey.ambient"),
ENTITY_DONKEY_ANGRY("mob.donkey.angry", "entity.donkey.angry"),
ENTITY_DONKEY_CHEST("random.pop", "entity.donkey.chest"),
ENTITY_DONKEY_DEATH("mob.donkey.death", "entity.donkey.death"),
ENTITY_DONKEY_HURT("mob.donkey.hit", "entity.donkey.hurt"),
ENTITY_EGG_THROW("random.bow", "entity.egg.throw"),
ENTITY_ELDER_GUARDIAN_AMBIENT("mob.guardian.elder.idle", "entity.elder_guardian.ambient"),
ENTITY_ELDER_GUARDIAN_AMBIENT_LAND("mob.guardian.elder.land.idle", "entity.elder_guardian.ambient_land"),
ENTITY_ELDER_GUARDIAN_CURSE("mob.guardian.elder.curse", "entity.elder_guardian.curse"),
ENTITY_ELDER_GUARDIAN_DEATH("mob.guardian.elder.death", "entity.elder_guardian.death"),
ENTITY_ELDER_GUARDIAN_DEATH_LAND("mob.guardian.land.death", "entity.elder_guardian.death_land"),
ENTITY_ELDER_GUARDIAN_HURT("mob.guardian.elder.hit", "entity.elder_guardian.hurt"),
ENTITY_ELDER_GUARDIAN_HURT_LAND("mob.guardian.land.hit", "entity.elder_guardian.hurt_land"),
ENTITY_ENDERDRAGON_AMBIENT("mob.enderdragon.idle", "entity.enderdragon.ambient"),
ENTITY_ENDERDRAGON_DEATH("mob.enderdragon.end", "entity.enderdragon.death"),
ENTITY_ENDERDRAGON_FIREBALL_EXPLODE("", "entity.enderdragon.fireball_explode"),
ENTITY_ENDERDRAGON_FLAP("mob.enderdragon.wings", "entity.enderdragon.flap"),
ENTITY_ENDERDRAGON_GROWL("mob.enderdragon.growl", "entity.enderdragon.growl"),
ENTITY_ENDERDRAGON_HURT("mob.enderdragon.hit", "entity.enderdragon.hurt"),
ENTITY_ENDERDRAGON_SHOOT("mob.ghast.fireball4", "entity.enderdragon.shoot"),
ENTITY_ENDEREYE_LAUNCH("random.bow", "entity.endereye.launch"),
ENTITY_ENDERMEN_AMBIENT("mob.endermen.idle", "entity.endermen.ambient"),
ENTITY_ENDERMEN_DEATH("mob.endermen.death", "entity.endermen.death"),
ENTITY_ENDERMEN_HURT("mob.endermen.hit", "entity.endermen.hurt"),
ENTITY_ENDERMEN_SCREAM("mob.endermen.scream", "entity.endermen.scream"),
ENTITY_ENDERMEN_STARE("mob.endermen.stare", "entity.endermen.stare"),
ENTITY_ENDERMEN_TELEPORT("mob.endermen.portal", "entity.endermen.teleport"),
ENTITY_ENDERMITE_AMBIENT("mob.silverfish.say", "entity.endermite.ambient"),
ENTITY_ENDERMITE_DEATH("mob.silverfish.kill", "entity.endermite.death"),
ENTITY_ENDERMITE_HURT("mob.silverfish.hit", "entity.endermite.hurt"),
ENTITY_ENDERMITE_STEP("mob.silverfish.step", "entity.endermite.step"),
ENTITY_ENDERPEARL_THROW("random.bow", "entity.enderpearl.throw"),
ENTITY_EXPERIENCE_BOTTLE_THROW("random.bow", "entity.experience_bottle.throw"),
ENTITY_EXPERIENCE_ORB_PICKUP("random.orb", "entity.experience_orb.pickup"),
ENTITY_EXPERIENCE_ORB_TOUCH("random.orb", "entity.experience_orb.touch"),
ENTITY_FIREWORK_BLAST("firework.blast1", "entity.firework.blast"),
ENTITY_FIREWORK_BLAST_FAR("firework.blast_far1", "entity.firework.blast_far"),
ENTITY_FIREWORK_LARGE_BLAST("firework.largeBlast1", "entity.firework.large_blast"),
ENTITY_FIREWORK_LARGE_BLAST_FAR("firework.largeBlast_far1", "entity.firework.large_blast_far"),
ENTITY_FIREWORK_LAUNCH("firework.launch1", "entity.firework.launch"),
ENTITY_FIREWORK_SHOOT("random.bow", "entity.firework.shoot"),
ENTITY_FIREWORK_TWINKLE("firework.twinkle1", "entity.firework.twinkle"),
ENTITY_FIREWORK_TWINKLE_FAR("firework.twinkle_far1", "entity.firework.twinkle_far"),
ENTITY_GENERIC_BIG_FALL("damage.fallbig", "entity.generic.big_fall"),
ENTITY_GENERIC_BURN("random.fizz", "entity.generic.burn"),
ENTITY_GENERIC_DEATH("damage.hit", "entity.generic.death"),
ENTITY_GENERIC_DRINK("random.drink", "entity.generic.drink"),
ENTITY_GENERIC_EAT("random.eat", "entity.generic.eat"),
ENTITY_GENERIC_EXPLODE("random.explode", "entity.generic.explode"),
ENTITY_GENERIC_EXTINGUISH_FIRE("random.fizz", "entity.generic.extinguish_fire"),
ENTITY_GENERIC_HURT("damage.hurt", "entity.generic.hurt"),
ENTITY_GENERIC_SMALL_FALL("damage.fallsmall", "entity.generic.small_fall"),
ENTITY_GENERIC_SPLASH("liquid.splash", "entity.generic.splash"),
ENTITY_GENERIC_SWIM("liquid.swim", "entity.generic_swim"),
ENTITY_GHAST_AMBIENT("mob.ghast.moan", "entity.ghast.ambient"),
ENTITY_GHAST_DEATH("mob.ghast.death", "entity.ghast.death"),
ENTITY_GHAST_HURT("mob.ghast.scream", "entity.ghast.hurt"),
ENTITY_GHAST_SCREAM("mob.ghast.scream", "entity.ghast.scream"),
ENTITY_GHAST_SHOOT("mob.ghast.fireball4", "entity.ghast.shoot"),
ENTITY_GHAST_WARN("mob.ghast.charge", "entity.ghast.warn"),
ENTITY_GUARDIAN_AMBIENT("mob.guardian.idle", "entity.guardian.ambient"),
ENTITY_GUARDIAN_AMBIENT_LAND("mob.guardian.land.idle", "entity.guardian.ambient_land"),
ENTITY_GUARDIAN_ATTACK("mob.guardian.attack.loop", "entity.guardian.attack"),
ENTITY_GUARDIAN_DEATH("mob.guardian.death", "entity.guardian.death"),
ENTITY_GUARDIAN_DEATH_LAND("mob.guardian.land.death", "entity.guardian.death_land"),
ENTITY_GUARDIAN_FLOP("mob.guardian.flop", "entity.guardian.flop"),
ENTITY_GUARDIAN_HURT("mob.guardian.hit", "entity.guardian.hurt"),
ENTITY_GUARDIAN_HURT_LAND("mob.guardian.land.hit", "entity.guardian.hurt_land"),
ENTITY_HORSE_AMBIENT("mob.horse.idle", "entity.horse.ambient"),
ENTITY_HORSE_ANGRY("mob.horse.angry1", "entity.horse.angry"),
ENTITY_HORSE_ARMOR("mob.horse.armor", "entity.horse.armor"),
ENTITY_HORSE_BREATHE("mob.horse.breathe", "entity.horse.breathe"),
ENTITY_HORSE_DEATH("mob.horse.death", "entity.horse.death"),
ENTITY_HORSE_EAT("", "entity.horse.eat"),
ENTITY_HORSE_GALLOP("mob.horse.gallop", "entity.horse.gallop"),
ENTITY_HORSE_HURT("mob.horse.hit", "entity.horse.hurt"),
ENTITY_HORSE_JUMP("mob.horse.jump", "entity.horse.jump"),
ENTITY_HORSE_LAND("mob.horse.land", "entity.horse.land"),
ENTITY_HORSE_SADDLE("mob.horse.leather", "entity.horse.saddle"),
ENTITY_HORSE_STEP("mob.horse.soft", "entity.horse.step"),
ENTITY_HORSE_STEP_WOOD("mob.horse.wood", "entity.horse.step_wood"),
ENTITY_HOSTILE_BIG_FALL("damage.fallbig", "entity.hostile.big_fall"),
ENTITY_HOSTILE_DEATH("damage.hit", "entity.hostile.death"),
ENTITY_HOSTILE_HURT("damage.hit", "entity.hostile.hurt"),
ENTITY_HOSTILE_SMALL_FALL("damage.fallsmall", "entity.hostile.small_fall"),
ENTITY_HOSTILE_SPLASH("liquid.splash", "entity.hostile.splash"),
ENTITY_HOSTILE_SWIM("liquid.swin", "entity.hostile.swim"),
ENTITY_IRONGOLEM_ATTACK("mob.irongolem.hit", "entity.irongolem.attack"),
ENTITY_IRONGOLEM_DEATH("mob.irongolem.death", "entity.irongolem.death"),
ENTITY_IRONGOLEM_HURT("mob.irongolem.hit", "entity.irongolem.hurt"),
ENTITY_IRONGOLEM_STEP("mob.irongolem.step", "entity.irongolem.step"),
ENTITY_ITEMFRAME_ADD_ITEM("random.pop", "entity.itemframe.add_item"),
ENTITY_ITEMFRAME_BREAK("random.pop", "entity.itemframe.break"),
ENTITY_ITEMFRAME_PLACE("random.pop", "entity.itemframe.place"),
ENTITY_ITEMFRAME_REMOVE_ITEM("random.pop", "entity.itemframe.remove_item"),
ENTITY_ITEMFRAME_ROTATE_ITEM("random.pop", "entity.itemframe.rotate_item"),
ENTITY_ITEM_BREAK("random.pop", "entity.item.break"),
ENTITY_ITEM_PICKUP("random.pop", "entity.item.pickup"),
ENTITY_LEASHKNOT_BREAK("mob.horse.leather", "entity.leashknot.break"),
ENTITY_LEASHKNOT_PLACE("mob.horse.leather", "entity.leashknot.place"),
ENTITY_LIGHTNING_IMPACT("random.explode", "entity.lightning.impact"),
ENTITY_LIGHTNING_THUNDER("ambient.weather.thunder", "entity.lightning.thunder"),
ENTITY_LINGERINGPOTION_THROW("random.bow", "entity.lingeringpotion.throw"),
ENTITY_MAGMACUBE_DEATH("mob.magmacube.big", "entity.magmacube.death"),
ENTITY_MAGMACUBE_HURT("mob.magmacube.big", "entity.magmacube.hurt"),
ENTITY_MAGMACUBE_JUMP("mob.magmacube.jump", "entity.magmacube.jump"),
ENTITY_MAGMACUBE_SQUISH("mob.magmacube.small", "entity.magmacube.squish"),
ENTITY_MINECART_INSIDE("minecart.inside", "entity.minecart.inside"),
ENTITY_MINECART_RIDING("minecart.base", "entity.minecart.riding"),
ENTITY_MOOSHROOM_SHEAR("mob.sheep.shear", "entity.mooshroom.shear"),
ENTITY_MULE_AMBIENT("mob.horse.donkey.idle", "entity.mule.ambient"),
ENTITY_MULE_DEATH("mob.horse.donkey.death", "entity.mule.death"),
ENTITY_MULE_HURT("mob.horse.donkey.hit", "entity.mule.hurt"),
ENTITY_PAINTING_BREAK("dig.wool", "entity.painting.break"),
ENTITY_PAINTING_PLACE("dig.wool", "entity.painting.place"),
ENTITY_PIG_AMBIENT("mob.pig.say", "entity.pig.ambient"),
ENTITY_PIG_DEATH("mob.pig.death", "entity.pig.death"),
ENTITY_PIG_HURT("mob.pig.say", "entity.pig.hurt"),
ENTITY_PIG_SADDLE("mob.horse.leather", "entity.pig.saddle"),
ENTITY_PIG_STEP("mob.pig.step", "entity.pig.step"),
ENTITY_PLAYER_ATTACK_CRIT("damage.hit", "entity.player.attack.crit"),
ENTITY_PLAYER_ATTACK_KNOCKBACK("damage.hit", "entity.player.attack.knockback"),
ENTITY_PLAYER_ATTACK_NODAMAGE("damage.hit", "entity.player.attack.nodamage"),
ENTITY_PLAYER_ATTACK_STRONG("damage.hit", "entity.player.attack.strong"),
ENTITY_PLAYER_ATTACK_SWEEP("damage.hit", "entity.player.attack.sweep"),
ENTITY_PLAYER_ATTACK_WEAK("damage.hit", "entity.player.attack.weak"),
ENTITY_PLAYER_BIG_FALL("damage.fallbig", "entity.player.big_fall"),
ENTITY_PLAYER_BREATH("random.breath", "entity.player.breath"),
ENTITY_PLAYER_BURP("random.burp", "entity.player.burp"),
ENTITY_PLAYER_DEATH("damage.hit", "entity.player.death"),
ENTITY_PLAYER_HURT("damage.hit", "entity.player.hurt"),
ENTITY_PLAYER_LEVELUP("random.levelup", "entity.player.levelup"),
ENTITY_PLAYER_SMALL_FALL("damage.fallsmall", "entity.player.small_fall"),
ENTITY_PLAYER_SPLASH("liquid.splash", "entity.player.splash"),
ENTITY_PLAYER_SWIM("liquid.swim", "entity.player.swim"),
ENTITY_RABBIT_AMBIENT("mob.rabbit.idle", "entity.rabbit.ambient"),
ENTITY_RABBIT_ATTACK("damage.hit", "entity.rabbit.attack"),
ENTITY_RABBIT_DEATH("mob.rabbit.death", "entity.rabbit.death"),
ENTITY_RABBIT_HURT("mob.rabbit.hurt", "entity.rabbit.hurt"),
ENTITY_RABBIT_JUMP("mob.rabbit.hop", "entity.rabbit.jump"),
ENTITY_SHEEP_AMBIENT("mob.sheep.say", "entity.sheep.ambient"),
ENTITY_SHEEP_DEATH("mob.sheep.say", "entity.sheep.death"),
ENTITY_SHEEP_HURT("mob.sheep.say", "entity.sheep.hurt"),
ENTITY_SHEEP_SHEAR("mob.sheep.shear", "entity.sheep.shear"),
ENTITY_SHEEP_STEP("mob.sheep.step", "entity.sheep.step"),
ENTITY_SHULKER_AMBIENT("", "entity.shulker.ambient"),
ENTITY_SHULKER_BULLET_HIT("", "entity.shulker.bullet.hit"),
ENTITY_SHULKER_BULLET_HURT("", "entity.shulker.bullet.hurt"),
ENTITY_SHULKER_CLOSE("", "entity.shulker.close"),
ENTITY_SHULKER_DEATH("", "entity.shulker.death"),
ENTITY_SHULKER_HURT("", "entity.shulker.hurt"),
ENTITY_SHULKER_HURT_CLOSED("", "entity.shulker.hurt_closed"),
ENTITY_SHULKER_OPEN("", "entity.shulker.open"),
ENTITY_SHULKER_SHOOT("", "entity.shulker.shoot"),
ENTITY_SHULKER_TELEPORT("", "entity.shulker.teleport"),
ENTITY_SILVERFISH_AMBIENT("mob.silverfish.say", "entity.silverfish.ambient"),
ENTITY_SILVERFISH_DEATH("mob.silverfish.kill", "entity.silverfish.death"),
ENTITY_SILVERFISH_HURT("mob.silverfish.hit", "entity.silverfish.hurt"),
ENTITY_SILVERFISH_STEP("mob.silverfish.step", "entity.silverfish.step"),
ENTITY_SKELETON_AMBIENT("mob.skeleton.say", "entity.skeleton.ambient"),
ENTITY_SKELETON_DEATH("mob.skeleton.death", "entity.skeleton.death"),
ENTITY_SKELETON_HORSE_AMBIENT("mob.horse.skeleton.idle", "entity.skeleton_horse.ambient"),
ENTITY_SKELETON_HORSE_DEATH("mob.horse.skeleton.death", "entity.skeleton_horse.death"),
ENTITY_SKELETON_HORSE_HURT("mob.horse.skeleton.hit", "entity.skeleton_horse.hurt"),
ENTITY_SKELETON_HURT("mob.skeleton.hurt", "entity.skeleton.hurt"),
ENTITY_SKELETON_SHOOT("random.bow", "entity.skeleton.shoot"),
ENTITY_SKELETON_STEP("mob.skeleton.step", "entity.skeleton.step"),
ENTITY_SLIME_ATTACK("mob.slime.attack", "entity.slime.attack"),
ENTITY_SLIME_DEATH("mob.slime.big", "entity.slime.death"),
ENTITY_SLIME_HURT("mob.slime.big", "entity.slime.hurt"),
ENTITY_SLIME_JUMP("mob.slime.big", "entity.slime.jump"),
ENTITY_SLIME_SQUISH("mob.slime.small", "entity.slime.squish"),
ENTITY_SMALL_MAGMACUBE_DEATH("mob.magmacube.small", "entity.small_magmacube.death"),
ENTITY_SMALL_MAGMACUBE_HURT("mob.magmacube.small", "entity.small_magmacube.hurt"),
ENTITY_SMALL_MAGMACUBE_SQUISH("mob.magmacube.small", "entity.small_magmacube.squish"),
ENTITY_SMALL_SLIME_DEATH("mob.slime.small", "entity.small_slime.death"),
ENTITY_SMALL_SLIME_HURT("mob.slime.small", "entity.small_slime.hurt"),
ENTITY_SMALL_SLIME_JUMP("mob.slime.small", "entity.small_slime.jump"),
ENTITY_SMALL_SLIME_SQUISH("mob.slime.small", "entity.small_slime.squish"),
ENTITY_SNOWBALL_THROW("random.bow", "entity.snowball.throw"),
ENTITY_SNOWMAN_AMBIENT("", "entity.snowman.ambient"),
ENTITY_SNOWMAN_DEATH("dig.snow", "entity.snowman.death"),
ENTITY_SNOWMAN_HURT("dig.snow", "entity.snowman.hurt"),
ENTITY_SNOWMAN_SHOOT("random.bow", "entity.snowman.shoot"),
ENTITY_SPIDER_AMBIENT("mob.spider.say", "entity.spider.ambient"),
ENTITY_SPIDER_DEATH("mob.spider.death", "entity.spider.death"),
ENTITY_SPIDER_HURT("mob.spider.say", "entity.spider.hurt"),
ENTITY_SPIDER_STEP("mob.spider.step", "entity.spider.step"),
ENTITY_SPLASH_POTION_BREAK("game.potion.smash", "entity.splash_potion.break"),
ENTITY_SPLASH_POTION_THROW("random.bow", "entity.splash_potion.throw"),
ENTITY_SQUID_AMBIENT("", "entity.squid.ambient"),
ENTITY_SQUID_DEATH("", "entity.squid.death"),
ENTITY_SQUID_HURT("", "entity.squid.hurt"),
ENTITY_TNT_PRIMED("random.fuse", "entity.tnt.primed"),
ENTITY_VILLAGER_AMBIENT("mob.villager.idle", "entity.villager.ambient"),
ENTITY_VILLAGER_DEATH("mob.villager.death", "entity.villager.death"),
ENTITY_VILLAGER_HURT("mob.villager.hit", "entity.villager.hurt"),
ENTITY_VILLAGER_NO("mob.villager.no", "entity.villager.no"),
ENTITY_VILLAGER_TRADING("mob.villager.haggle", "entity.villager.trading"),
ENTITY_VILLAGER_YES("mob.villager.yes", "entity.villager.yes"),
ENTITY_WITCH_AMBIENT("mob.villager.idle", "entity.witch.ambient"),
ENTITY_WITCH_DEATH("mob.villager.death", "entity.witch.death"),
ENTITY_WITCH_DRINK("liquid.splash", "entity.witch.drink"),
ENTITY_WITCH_HURT("mob.villaher.hit", "entity.witch_hurt"),
ENTITY_WITCH_THROW("random.bow", "entity.witch_throw"),
ENTITY_WITHER_AMBIENT("mob.wither.idle", "entity.wither.ambient"),
ENTITY_WITHER_BREAK_BLOCK("mob.zombie.woodbreak", "entity.wither.break_block"),
ENTITY_WITHER_DEATH("mob.wither.death", "entity.wither.death"),
ENTITY_WITHER_HURT("mob.wither.hurt", "entity.wither.hurt"),
ENTITY_WITHER_SHOOT("mob.wither.shoot", "entity.wither.shoot"),
ENTITY_WITHER_SPAWN("mob.wither.spawn", "entity.wither.spawn"),
ENTITY_WOLF_AMBIENT("mob.wolf.bark", "entity.wolf.ambient"),
ENTITY_WOLF_DEATH("mob.wolf.death", "entity.wolf.death"),
ENTITY_WOLF_GROWL("mob.wolf.growl", "entity.wolf.growl"),
ENTITY_WOLF_HOWL("mob.wolf.howl", "entity.wolf.howl"),
ENTITY_WOLF_HURT("mob.wolf.hurt", "entity.wolf.hurt"),
ENTITY_WOLF_PANT("mob.wolf.panting", "entity.wolf.pant"),
ENTITY_WOLF_SHAKE("mob.wolf.shake", "entity.wolf.shake"),
ENTITY_WOLF_STEP("mob.wolf.step", "entity.wolf.step"),
ENTITY_WOLF_WHINE("mob.wolf.whine", "entity.wolf.whine"),
ENTITY_ZOMBIE_AMBIENT("mob.zombie.idle", "entity.zombie.ambient"),
ENTITY_ZOMBIE_ATTACK_DOOR_WOOD("mob.zombie.wood", "entity.zombie.attack.door_wood"),
ENTITY_ZOMBIE_ATTACK_IRON_DOOR("mob.zombie.wood", "entity.zombie.attack.iron_door"),
ENTITY_ZOMBIE_BREAK_DOOR_WOOD("mob.zombie.woodbreak", "entity.zombie.break_door_wood"),
ENTITY_ZOMBIE_DEATH("mob.zombie.death", "entity.zombie.death"),
ENTITY_ZOMBIE_HORSE_AMBIENT("mob.horse.zombie.idle", "entity.zombie_horse.ambient"),
ENTITY_ZOMBIE_HORSE_DEATH("mob.horse.zombie.death", "entity.zombie_horse.death"),
ENTITY_ZOMBIE_HORSE_HURT("hit", "entity.zombie.horse_hurt"),
ENTITY_ZOMBIE_HURT("mob.zombie.hurt", "entity.zombie.hurt"),
ENTITY_ZOMBIE_INFECT("mob.zombie.infect", "entity.zombie.infect"),
ENTITY_ZOMBIE_PIG_AMBIENT("mob.zombiepig.zpig", "entity.zombie_pig.ambient"),
ENTITY_ZOMBIE_PIG_ANGRY("mob.zombiepig.zpigangry", "entity.zombie_pig.angry"),
ENTITY_ZOMBIE_PIG_DEATH("mob.zombiepig.zpigdeath", "entity.zombie_pig.death"),
ENTITY_ZOMBIE_PIG_HURT("mob.zombiepig.hurt", "entity.zombie_pig.hurt"),
ENTITY_ZOMBIE_STEP("mob.zombie.step", "entity.zombie.step"),
ENTITY_ZOMBIE_VILLAGER_AMBIENT("mob.zombie.idle", "entity.zombie.villager_ambient"),
ENTITY_ZOMBIE_VILLAGER_CONVERTED("mob.zombie.unfect", "entity.zombie.villager_converted"),
ENTITY_ZOMBIE_VILLAGER_CURE("mob.zombie.remedy", "entity.zombie.villager_cure"),
ENTITY_ZOMBIE_VILLAGER_DEATH("mob.zombie.death", "entity.zombie.villager_death"),
ENTITY_ZOMBIE_VILLAGER_HURT("mob.zombie.hurt", "entity.zombie.villager_hurt"),
ENTITY_ZOMBIE_VILLAGER_STEP("mob.zombie.step", "entity.zombie.villager_step"),
ITEM_ARMOR_EQUIP_CHAIN("random.pop", "item.armor.equip_chain"),
ITEM_ARMOR_EQUIP_DIAMOND("random.pop", "item.armor.equip_diamond"),
ITEM_ARMOR_EQUIP_GENERIC("random.pop", "item.armor.equip_generic"),
ITEM_ARMOR_EQUIP_GOLD("random.pop", "item.armor.equip_gold"),
ITEM_ARMOR_EQUIP_IRON("random.pop", "item.armor.equip_iron"),
ITEM_ARMOR_EQUIP_LEATHER("mob.horse.leather", "item.armor.equip_leather"),
ITEM_BOTTLE_FILL("liquid.splash", "item.bottle.fill"),
ITEM_BOTTLE_FILL_DRAGONBREATH("liquid.splash", "item.bottle.fill_dragonbreath"),
ITEM_BUCKET_EMPTY("liquid.splash", "item.bucket.empty"),
ITEM_BUCKET_EMPTY_LAVA("liquid.splash", "item.bucket.empty_lava"),
ITEM_BUCKET_FILL("liquid.splash", "item.bucket.fill"),
ITEM_BUCKET_FILL_LAVA("liquid.splash", "item.bucket.fill_lava"),
ITEM_CHORUS_FRUIT_TELEPORT("mob.endermen.portal", "item.chorus_fruit.teleport"),
ITEM_ELYTRA_FLYING("", "item.elytra_flying"),
ITEM_FIRECHARGE_USE("item.fireCharge.use", "item.firecharge.use"),
ITEM_FLINTANDSTEEL_USE("fire.ingnite", "item.flintandsteel.use"),
ITEM_HOE_TILL("step.grass", "item.hoe.till"),
ITEM_SHIELD_BLOCK("", "item.shield.block"),
ITEM_SHIELD_BREAK("random.anvil_break", "item.shield.break"),
ITEM_SHOVEL_FLATTEN("dig.grass", "item.shovel.flatten"),
MUSIC_CREATIVE("music.game.creative", "music.creative"),
MUSIC_CREDITS("music.game.end.credits", "music.credits"),
MUSIC_DRAGON("music.game.end.dragon", "music.dragon"),
MUSIC_END("music.game.end", "music.end"),
MUSIC_GAME("music.game", "music.game"),
MUSIC_MENU("music.menu", "music.menu"),
MUSIC_NETHER("music.game.nether", "music.nether"),
RECORD_11("records.record_11", "record.11"),
RECORD_13("records.record_13", "record.13"),
RECORD_BLOCKS("records.blocks", "record.blocks"),
RECORD_CAT("records.cat", "record.cat"),
RECORD_CHIRP("records.chrip", "record.chirp"),
RECORD_FAR("records.far", "record.far"),
RECORD_MALL("records.mall", "record.mall"),
RECORD_MELLOHI("records.mellohi", "record.mellohi"),
RECORD_STAL("records.stal", "record.stal"),
RECORD_STRAD("records.strad", "record.strad"),
RECORD_WAIT("records.wait", "record.wait"),
RECORD_WARD("records.ward", "record.ward"),
UI_BUTTON_CLICK("random.click", "ui.button.click"),
WEATHER_RAIN("ambient.weather.rain", "weather.rain"),
WEATHER_RAIN_ABOVE("ambient.weather.rain", "weather.rain.above");
private String oldSound;
private String newSound;
SoundHelper(String oldSound, String newSound) {
this.oldSound = oldSound;
this.newSound = newSound;
}
/**
* Play sound with version bridge!
*
* @param player
* @param sound
* @param volume
* @param pitch
*/
public static void playSound(Player player, SoundHelper sound, float volume, float pitch){
String s = "";
if(getVersion()>=110){
s = sound.newSound;
}else{
s = sound.oldSound;
}
player.playSound(player.getLocation(), s, volume, pitch);
}
public void play(Player player, float volume, float pitch){
playSound(player, this, volume, pitch);
}
public static int getVersion(){
return Integer.parseInt(Bukkit.getVersion().substring(Bukkit.getVersion().lastIndexOf("MC: ")+4).replace(")", "").replace(".", ""));
}
public String getOldSound() {
return oldSound;
}
public String getNewSound() {
return newSound;
}
} | [
"[email protected]"
] | |
2942da9b513be3e4c107165ac8350665fe66a199 | 514c4359c5379f0049ce4f9523aea4ef56a908a0 | /sisyphos-core/src/main/java/org/ops4j/sisyphos/core/builder/DuringFluxBuilder.java | 48964bf3dace5e35d8ac96f04053a36198a42df9 | [
"Apache-2.0"
] | permissive | hwellmann/org.ops4j.sisyphos | 894a42a79f5dfea55d72eebfb45846bddb9acffa | 05914831547d090b822ca2b1d9fac9f7762f08dd | refs/heads/master | 2020-03-17T03:09:45.536428 | 2018-06-10T08:51:04 | 2018-06-10T08:51:04 | 133,223,042 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,442 | java | /*
* Copyright 2018 OPS4J Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied.
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.ops4j.sisyphos.core.builder;
import org.ops4j.sisyphos.api.action.DuringBuilder;
import org.ops4j.sisyphos.api.session.Session;
import org.ops4j.sisyphos.core.common.ScenarioContext;
import reactor.core.publisher.Flux;
import reactor.retry.Repeat;
public class DuringFluxBuilder implements FluxBuilder {
private DuringBuilder duringBuilder;
public DuringFluxBuilder(DuringBuilder duringBuilder) {
this.duringBuilder = duringBuilder;
}
@Override
public Flux<Session> buildFlux(ScenarioContext context) {
FluxBuilderAdapter adapter = new FluxBuilderAdapter();
FluxBuilder fluxBuilder = adapter.adapt(duringBuilder.getStepBuilder());
return Repeat.times(Integer.MAX_VALUE).timeout(duringBuilder.getDuration())
.apply(fluxBuilder.buildFlux(context));
}
}
| [
"[email protected]"
] | |
c0f18956897fab9d71a9466b874d4ec459e19de3 | 34647c0c9ca162f506b5487e1f392a239858c821 | /spring-X/spring/src/com/xlj/spring/aop/ThrowsInterceptor.java | 16fca6ac828721d42d772cd9ec002e32daaa12b7 | [] | no_license | jguoguo/javaStudy | 8860d0ca19abb339314cda450a37e8e5e9f7a1c4 | 41df2d5834e499d477f56881452a3e5c25315b6e | refs/heads/master | 2021-08-08T01:51:47.501645 | 2017-11-09T10:01:02 | 2017-11-09T10:01:02 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 552 | java | package com.xlj.spring.aop;
import java.lang.reflect.Method;
import javax.security.auth.login.AccountException;
import org.springframework.aop.ThrowsAdvice;
public class ThrowsInterceptor implements ThrowsAdvice {//异常拦截器
public void afterThrowing(Method method, Object[] arg,Object instance,
AccountException ex) throws Throwable {
System.out.println("方法"+method.getName()+"抛出了异常:"+ex);
}
public void afterThrowing(NullPointerException ex) throws Throwable {
System.out.println("抛出了异常:"+ex);
}
}
| [
"[email protected]"
] | |
ecda4ad6f7d07b9214a878b0c052334d86fbe219 | 23cb6471a45b54d353bf83a40c4bd89160fe4a1d | /src/calculadora/Calculadora.java | 719ae67868eb4ebcea1750c6801f01f1fb0ebce4 | [] | no_license | VlamirD/Calculadora111 | a32cceafe81748573d8990ae31257775d3f02985 | bedaf6b00fd892e8e2c10b189448a770eec54d9e | refs/heads/master | 2021-01-09T20:08:21.746519 | 2016-06-17T16:21:21 | 2016-06-17T16:21:21 | 61,387,983 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 864 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package calculadora;
/**
*
* @author EPIS
*/
public class Calculadora {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
}
float sumar(float a, float b){
return a+b;
}
float resta(float a,float b){
return a-b;
}
float multiplicacion(float a,float b){
return a*b;
}
float division(float a,float b){
if (b == 0) {
System.out.print("no se puede imprimir");
return -1;
}
return a/b;
}
double potencia(double a,double b){
return Math.pow(a, b);
}
}
| [
"[email protected]"
] | |
e2058486a072cf4560075671601cefe7cf065cac | e0b0846eb7283081f34dc9c886d6f0fd60c6d1ec | /app/src/main/java/vn/bongtran/scar/ui/login/LoggedInUserView.java | 4438184b1ad76a6bffdf8ffb3b04e39340b1b6c3 | [] | no_license | bongtran/scar | 75dd04e452157f9cac98f7c5eb4ea56f7f0a8e2e | 88af6dbbdff9fbf7063f00f810d0bb3a87de6791 | refs/heads/master | 2020-05-19T18:57:20.209490 | 2019-05-06T09:43:49 | 2019-05-06T09:43:49 | 185,168,078 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 375 | java | package vn.bongtran.scar.ui.login;
/**
* Class exposing authenticated user details to the UI.
*/
class LoggedInUserView {
private String displayName;
//... other data fields that may be accessible to the UI
LoggedInUserView(String displayName) {
this.displayName = displayName;
}
String getDisplayName() {
return displayName;
}
}
| [
"[email protected]"
] | |
fbc5c9e11eb4019d3daeff72eddee0e952263417 | 97683fcec4cd1a73ee9b5bf5365cc09f64509e15 | /app/src/main/java/worknasi/model/PlanItem.java | a716ede00dfdf25eab15703952870996e93d6961 | [] | no_license | nyumbanicreative/worknasi_android | 44304e3b3b691efb857919e4cf92f6b2ce126579 | eb91eac94435786c0e1a0b598581782f9b9b56aa | refs/heads/master | 2020-03-12T10:35:03.538308 | 2018-04-22T16:01:03 | 2018-04-22T16:01:03 | 130,576,431 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 530 | java | package worknasi.model;
/**
* Created by user on 1/25/2018.
*/
public class PlanItem {
private int plan_id;
private String plan_description;
public PlanItem() {
}
public int getPlan_id() {
return plan_id;
}
public void setPlan_id(int plan_id) {
this.plan_id = plan_id;
}
public String getPlan_description() {
return plan_description;
}
public void setPlan_description(String plan_description) {
this.plan_description = plan_description;
}
}
| [
"[email protected]"
] | |
052f59af527f539b0d26f3a3ed1fb1dc194693cb | 74b47b895b2f739612371f871c7f940502e7165b | /aws-java-sdk-codestarconnections/src/main/java/com/amazonaws/services/codestarconnections/model/ConnectionStatus.java | fb69f3075d6afb01ce0de7371bbac5ad37258bf6 | [
"Apache-2.0"
] | permissive | baganda07/aws-sdk-java | fe1958ed679cd95b4c48f971393bf03eb5512799 | f19bdb30177106b5d6394223a40a382b87adf742 | refs/heads/master | 2022-11-09T21:55:43.857201 | 2022-10-24T21:08:19 | 2022-10-24T21:08:19 | 221,028,223 | 0 | 0 | Apache-2.0 | 2019-11-11T16:57:12 | 2019-11-11T16:57:11 | null | UTF-8 | Java | false | false | 1,825 | java | /*
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.codestarconnections.model;
import javax.annotation.Generated;
/**
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public enum ConnectionStatus {
PENDING("PENDING"),
AVAILABLE("AVAILABLE"),
ERROR("ERROR");
private String value;
private ConnectionStatus(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
/**
* Use this in place of valueOf.
*
* @param value
* real value
* @return ConnectionStatus corresponding to the value
*
* @throws IllegalArgumentException
* If the specified value does not map to one of the known values in this enum.
*/
public static ConnectionStatus fromValue(String value) {
if (value == null || "".equals(value)) {
throw new IllegalArgumentException("Value cannot be null or empty!");
}
for (ConnectionStatus enumEntry : ConnectionStatus.values()) {
if (enumEntry.toString().equals(value)) {
return enumEntry;
}
}
throw new IllegalArgumentException("Cannot create enum from " + value + " value!");
}
}
| [
""
] | |
431175e87c8775ad05b08158485d5c78ebd86258 | 77a525fdb04426f20701ad9f78fad6d5c19e2a0e | /src/main/java/hr/tvz/njakopcic/zavrsnijakopcic/engine/graphics/particle/Particle.java | 7043da5a031b660411af1c6e5414aa8d1258fb01 | [] | no_license | nevenjakopcic/ZavrsniJakopcic | 90cedd99d109960cdb03d1361dde9b5268118f9d | cd9934dc57770c3d2eacb4cf0144d88402707e43 | refs/heads/master | 2022-12-07T09:36:46.123581 | 2020-09-02T03:21:15 | 2020-09-02T03:21:15 | 272,475,834 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,165 | java | package hr.tvz.njakopcic.zavrsnijakopcic.engine.graphics.particle;
import hr.tvz.njakopcic.zavrsnijakopcic.engine.GameItem;
import hr.tvz.njakopcic.zavrsnijakopcic.engine.graphics.Mesh;
import hr.tvz.njakopcic.zavrsnijakopcic.engine.graphics.Texture;
import lombok.Getter;
import lombok.Setter;
import org.joml.Vector3f;
public class Particle extends GameItem {
private long currentAnimTimeMillis;
@Getter @Setter private long updateTextureMillis;
@Getter @Setter private Vector3f speed;
@Getter @Setter private long lifespan;
@Getter private final int animFrames;
public Particle(Mesh mesh, Vector3f speed, long lifespan, long updateTextureMillis) {
super(mesh);
this.speed = new Vector3f(speed);
this.lifespan = lifespan;
this.updateTextureMillis = updateTextureMillis;
this.currentAnimTimeMillis = 0;
Texture texture = this.getMesh().getMaterial().getTexture();
this.animFrames = texture.getNumCols() * texture.getNumRows();
}
public Particle(Particle baseParticle) {
super(baseParticle.getMesh());
Vector3f aux = baseParticle.getPosition();
setPosition(aux.x, aux.y, aux.z);
aux = baseParticle.getRotation();
setRotation(aux.x, aux.y, aux.z);
setScale(baseParticle.getScale());
this.speed = new Vector3f(baseParticle.speed);
this.lifespan = baseParticle.getLifespan();
this.updateTextureMillis = baseParticle.getUpdateTextureMillis();
this.currentAnimTimeMillis = 0;
this.animFrames = baseParticle.getAnimFrames();
}
public long updateLifespan(long elapsedTime) {
this.lifespan -= elapsedTime;
this.currentAnimTimeMillis += elapsedTime;
if (this.currentAnimTimeMillis >= this.getUpdateTextureMillis() && this.animFrames > 0) {
this.currentAnimTimeMillis = 0;
int pos = this.getTexturePos();
pos++;
if (pos < this.animFrames) {
this.setTexturePos(pos);
} else {
this.setTexturePos(0);
}
}
return this.lifespan;
}
}
| [
"[email protected]"
] | |
e7cb26699caac8d1512655c8421e378d9d5a327b | 67c2a85a9225c5f41ca1effaec1caa2abb3f9e32 | /yytj_java/utils/src/main/java/com/hongbao/utils/NumberUtil.java | d9264a5397ec87af0e9e50cc3fa35842da93661c | [] | no_license | qinbo89/yytj_java | 789a31e1f3d17ad16f05b63b70306b171ffd144e | 4de9e02e49dbbb5d58f55fdb37ff6c8e43c313e3 | refs/heads/master | 2021-01-18T22:11:42.721730 | 2016-09-27T02:21:53 | 2016-09-27T02:21:53 | 69,311,520 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,176 | java | package com.hongbao.utils;
import java.math.BigDecimal;
import java.text.DecimalFormat;
public class NumberUtil {
public static final long MILLION = 1000000;
public static String formatUserId(long id) {
return new DecimalFormat("0000").format(id);
}
/**
* 相加
* @param num1
* @param num2
* @return
*/
public static Integer add(Integer num1,Integer num2){
if(num1 == null){
num1 = 0;
}
if(num2 == null){
num2 = 0;
}
return num1 + num2;
}
/**
* 分转化成元
* @param amount
* @return
*/
public static double fen2Yuan(Integer amount){
if(amount == null){
return 0.00;
}else{
return BigDecimal.valueOf(amount).divide(BigDecimal.valueOf(100)).doubleValue();
}
}
/**
* 分转化成元
* @param amount
* @return
*/
public static double longFen2Yuan(Long amount){
if(amount == null){
return 0.00;
}else{
return BigDecimal.valueOf(amount).divide(BigDecimal.valueOf(100)).doubleValue();
}
}
}
| [
"[email protected]"
] | |
216ef295a927e7ffd5bc647f70bbd1bd25909d78 | a7075e63f1e89c66eb6192b905dff3016966b25b | /src/entities/SolverProperties.java | cf1a0eeef45e59dc6e2bb1a27d076a4692caf632 | [] | no_license | jargelich/SolverAssistant | e11d1f554af6c7407b52362c65a60031d7c0016a | 193139ac75f0f8dfadb57a11c4e66b7349cabdf9 | refs/heads/master | 2021-01-14T12:47:38.200550 | 2015-01-07T19:18:11 | 2015-01-07T19:18:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,481 | java | /*
* TFG: Daniel Casanovas Gayoso
* Grau en Enginyeria Informàtica - Escola Politècnica Superior de Lleida
* 2014/2015
* Solver entity
*/
package entities;
import java.util.List;
import javafx.beans.property.IntegerProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
public class SolverProperties {
private Solver solver;
private StringProperty name = new SimpleStringProperty() {
@Override
public void set(String name) {
super.set(name);
solver.setName(name);
}
};
private StringProperty benchmark = new SimpleStringProperty() {
@Override
public void set(String benchmark) {
super.set(benchmark);
solver.setBenchmark(benchmark);
}
};
private StringProperty type = new SimpleStringProperty() {
@Override
public void set(String type) {
super.set(type);
solver.setType(type);
}
};
private IntegerProperty timeOut = new SimpleIntegerProperty() {
@Override
public void set(int timeout) {
super.set(timeout);
solver.setTimeOut(timeout);
}
};
private IntegerProperty memory = new SimpleIntegerProperty() {
@Override
public void set(int memory) {
super.set(memory);
solver.setMemory(memory);
}
};
private IntegerProperty numberOfCores = new SimpleIntegerProperty() {
@Override
public void set(int numberOfCores) {
super.set(numberOfCores);
solver.setNumberOfCores(numberOfCores);
}
};
private List<SolverInstance> instancesList;
public SolverProperties(Solver solver) {
this.setSolver(solver);
}
private void setSolver(Solver solver) {
if (solver != null) {
this.solver = solver;
getNameProperty().set(this.solver.getName());
getBenchmarkProperty().set(this.solver.getBenchmark());
getTypeProperty().set(this.solver.getType());
getTimeOutProperty().set(this.solver.getTimeOut());
getMemoryProperty().set(this.solver.getMemory());
getNumberOfCoresProperty().set(this.solver.getNumberOfCores());
solver.setInstancesList(this.solver.getInstancesList());
}
}
public Solver getSolver() {
return solver;
}
public StringProperty getNameProperty() {
return name;
}
public String getName() {
return name.getValue();
}
public StringProperty getBenchmarkProperty() {
return benchmark;
}
public String getBenchmark() {
return benchmark.getValue();
}
public StringProperty getTypeProperty() {
return type;
}
public String getType() {
return type.getValue();
}
public IntegerProperty getTimeOutProperty() {
return timeOut;
}
public int getTimeOut() {
return timeOut.getValue();
}
public IntegerProperty getMemoryProperty() {
return memory;
}
public int getMemory() {
return memory.getValue();
}
public IntegerProperty getNumberOfCoresProperty() {
return numberOfCores;
}
public int getNumberOfCores() {
return numberOfCores.getValue();
}
public List<SolverInstance> getInstancesList() {
return instancesList;
}
/**
* @param name the name to set
*/
public void setNameProperty(StringProperty name) {
this.name = name;
}
/**
* @param benchmark the benchmark to set
*/
public void setBenchmarkProperty(StringProperty benchmark) {
this.benchmark = benchmark;
}
/**
* @param type the type to set
*/
public void setTypeProperty(StringProperty type) {
this.type = type;
}
/**
* @param timeOut the timeOut to set
*/
public void setTimeOutProperty(IntegerProperty timeOut) {
this.timeOut = timeOut;
}
/**
* @param memory the memory to set
*/
public void setMemoryProperty(IntegerProperty memory) {
this.memory = memory;
}
/**
* @param numberOfCores the numberOfCores to set
*/
public void setNumberOfCoresProperty(IntegerProperty numberOfCores) {
this.numberOfCores = numberOfCores;
}
}
| [
"[email protected]"
] | |
402fcc3b834966db82a00dd14c96c8b4bbd63670 | 2869fc39e2e63d994d5dd8876476e473cb8d3986 | /pet/pet_public/src/test/java/com/lvmama/pet/mark/service/MarkCouponServcieTest.java | 9637be0dd1915e799c1a2da88385824176187d93 | [] | no_license | kavt/feiniu_pet | bec739de7c4e2ee896de50962dbd5fb6f1e28fe9 | 82963e2e87611442d9b338d96e0343f67262f437 | refs/heads/master | 2020-12-25T17:45:16.166052 | 2016-06-13T10:02:42 | 2016-06-13T10:02:42 | 61,026,061 | 0 | 0 | null | 2016-06-13T10:02:01 | 2016-06-13T10:02:01 | null | UTF-8 | Java | false | false | 2,033 | java | /**
*
*/
package com.lvmama.pet.mark.service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.lvmama.comm.pet.po.mark.MarkCoupon;
import com.lvmama.comm.pet.service.mark.MarkCouponService;
import com.lvmama.pet.BaseTest;
/**
* @author liuyi
*
*/
@ContextConfiguration(locations = { "classpath:/applicationContext-pet-public-beans.xml" })
@RunWith(SpringJUnit4ClassRunner.class)
public class MarkCouponServcieTest extends BaseTest{
@Autowired
private MarkCouponService markCouponService;
@Test
public void testSelectAllCanUseMarkCoupon(){
Map<String,Object> map = new HashMap<String,Object>();
map.put("withCode", "true");
List<MarkCoupon> markCouponList = markCouponService.selectAllCanUseMarkCoupon(map);
System.out.println("test1111");
}
@Test
public void testSelectProductCanUseMarkCoupon(){
Map<String,Object> map = new HashMap<String,Object>();
map.put("productId", 30459l);
List<MarkCoupon> markCouponList = markCouponService.selectProductCanUseMarkCoupon(map);
System.out.println("test1111");
}
@Test
public void testAllCanUseMarkCoupon(){
Map<String,Object> map = new HashMap<String,Object>();
List<Long> idsList = new ArrayList<Long>();
idsList.add(63777l);
map.put("productIds", idsList);
List<String> subProductTypesList = new ArrayList<String>();
subProductTypesList.add("SINGLE");
map.put("subProductTypes", subProductTypesList);
map.put("withCode", "false");//只取优惠活动
List<MarkCoupon> markCouponList = markCouponService.selectAllCanUseAndProductCanUseMarkCoupon(map);
System.out.println("test1111");
}
}
| [
"[email protected]"
] | |
c7ac56aec046cd944e5438a0c3a4984c0573cd1b | d28d31a687f653bf033892e8c84b55d61882741a | /workshops/cadenaj/unit3/WS30BookStore/Bookstore/src/ec/edu/espe/bookstore/view/FrmDelete.java | 175b9d1adf9d502301477715194ef16ee0e0f43a | [] | no_license | elascano/ESPE202105-OOP-SW-3682 | 02debcbd73540438ac39e04eb5ed2c4c99c72eb0 | 6198fb3b90faeee6ea502f3eb80532a67cf5739f | refs/heads/main | 2023-08-29T12:30:09.487090 | 2021-09-20T14:40:03 | 2021-09-20T14:40:03 | 369,223,490 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,769 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package ec.edu.espe.bookstore.view;
/**
*
* @author Steven Achig Future Programmers ESPE-DCCO
*/
public class FrmDelete extends javax.swing.JFrame {
/**
* Creates new form FrmDelete
*/
public FrmDelete() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPanel1 = new javax.swing.JPanel();
btnCancel = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
btnCancel.setText("Cancel");
btnCancel.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
btnCancelMouseClicked(evt);
}
});
jLabel1.setFont(new java.awt.Font("Tahoma", 0, 60)); // NOI18N
jLabel1.setText("Buy");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(btnCancel)
.addGap(172, 172, 172))
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(317, 317, 317)
.addComponent(jLabel1)
.addContainerGap(346, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 310, Short.MAX_VALUE)
.addComponent(btnCancel)
.addGap(84, 84, 84))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
);
pack();
}// </editor-fold>//GEN-END:initComponents
private void btnCancelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCancelMouseClicked
FrmBookstore bookstore = new FrmBookstore();
bookstore.setVisible(true);
dispose();
}//GEN-LAST:event_btnCancelMouseClicked
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(FrmDelete.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(FrmDelete.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(FrmDelete.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(FrmDelete.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new FrmDelete().setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton btnCancel;
private javax.swing.JLabel jLabel1;
private javax.swing.JPanel jPanel1;
// End of variables declaration//GEN-END:variables
}
| [
"[email protected]"
] | |
ebdb8712888dd34d8a1abb4da04e47c9c2fdf8f7 | e75be673baeeddee986ece49ef6e1c718a8e7a5d | /submissions/blizzard/Corpus/eclipse.jdt.core/4651.java | 431a8ccbe2d38dcd22d09321d6f1a0299de1d91b | [
"MIT"
] | permissive | zhendong2050/fse18 | edbea132be9122b57e272a20c20fae2bb949e63e | f0f016140489961c9e3c2e837577f698c2d4cf44 | refs/heads/master | 2020-12-21T11:31:53.800358 | 2018-07-23T10:10:57 | 2018-07-23T10:10:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 82 | java | package b142044;
public class X142044_AB implements I142044_A, I142044_B {
}
| [
"[email protected]"
] | |
0ba6c22ce7624b08b260b8663a1b569629ee86f6 | 6b1b0902a4000343820846ccaf57085287aeb311 | /assignment2/at.ac.tuwien.big.forms.form/src/at/ac/tuwien/big/forms/form/FormRuntimeModule.java | 68301a376889a8269f61c2a22e7c59666dd5417b | [] | no_license | Model-Engineering-AG-34/model-engineering-ws14 | 5bdfd5e64152ec87d3644243d21039d7822689d8 | 95bf13fdd30c6296e4e39a7fd8f1ae7c0ccb3023 | refs/heads/master | 2020-03-29T13:47:47.026520 | 2015-01-12T21:22:56 | 2015-01-12T21:22:56 | 27,044,988 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 278 | java | /*
* generated by Xtext
*/
package at.ac.tuwien.big.forms.form;
/**
* Use this class to register components to be used at runtime / without the Equinox extension registry.
*/
public class FormRuntimeModule extends at.ac.tuwien.big.forms.form.AbstractFormRuntimeModule {
}
| [
"[email protected]"
] | |
1ca08178b025c77428a801454dda00676815d48a | 3b539d430d8c66e9f726982737028f3aa7c707d3 | /src/com/android/tradefed/targetprep/TargetSetupError.java | b501e8f8e22609072db2ea92d3710cbbfd928f02 | [] | no_license | hi-cbh/CrashMonkey4Android_tradefederation_C | e6ea1fdf5344021c29cab6b019613a4c53834369 | 6c539ad75bdf930bab00f8a789048e08a259b76f | refs/heads/master | 2020-12-24T10:11:07.533244 | 2016-11-09T02:10:13 | 2016-11-09T02:10:13 | 73,245,095 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,519 | java | /*
* Copyright (C) 2010 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tradefed.targetprep;
/**
* A fatal error occurred while preparing the target for testing.
*/
public class TargetSetupError extends Exception {
private static final long serialVersionUID = 2202987086655357201L;
/**
* Constructs a new (@link TargetSetupError} with a meaningful error message.
*
* @param reason a error message describing the cause of the error
*/
public TargetSetupError(String reason) {
super(reason);
}
/**
* Constructs a new (@link TargetSetupError} with a meaningful error message, and a
* cause.
*
* @param reason a detailed error message.
* @param cause a {@link Throwable} capturing the original cause of the TargetSetupError
*/
public TargetSetupError(String reason, Throwable cause) {
super(reason, cause);
}
}
| [
"[email protected]"
] | |
d15d2cc3d47da17b5f21fd1d4990f61a7f1eaa29 | 238f5c3fc23a22c6a4c98562aa99320f3438a527 | /java-assignment-3,4,5/assignment_3/charStream.java | 45f8c65f3d0811a5987ca8e23dac41acb924849d | [] | no_license | nitcse2018/daa-abhishek2007 | 7d905df77a5a73f004eb738ff337bd99f65d53b6 | bea060a1a09a509af5b53c1ba9ca4f354af9bcd7 | refs/heads/master | 2022-07-04T05:10:50.794816 | 2020-05-10T19:10:06 | 2020-05-10T19:10:06 | 256,582,626 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 791 | java | import java.io.*;
public class charStream {
public static void main(String args[]) throws IOException {
FileReader in = null;
FileWriter out = null;
try {
in = new FileReader("input.txt");
out = new FileWriter("output.txt");
int n;
while ((n = in.read()) != -1) {
out.write(n);
}
}
catch(Exception e)
{
e.printStackTrace();
System.out.println("Exception Found");
}
finally
{
try
{
if (in != null) {
in.close();
}
if (out != null) {
out.close();
}
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
}
| [
"[email protected]"
] | |
c3734e343b74d02b67c62a0af6bebf8c8a9d8085 | 12be2d3e318a5a4f7cebf95a366556c434ff379e | /phoss-smp-backend-mongodb/src/main/java/com/helger/phoss/smp/backend/mongodb/mgr/SMLInfoManagerMongoDB.java | caef1a3e940d0ca1d80938ab0c1dba2f769626de | [] | no_license | vcgato29/phoss-smp | 095e29a6d133a65bf110dd1a45bbc927053d39ed | e0684b16892825b41a1e4f28c2671131444ad6ca | refs/heads/master | 2020-06-17T06:53:10.648209 | 2019-07-03T19:37:47 | 2019-07-03T19:37:47 | 195,836,728 | 1 | 0 | null | 2019-07-08T15:08:57 | 2019-07-08T15:08:57 | null | UTF-8 | Java | false | false | 7,468 | java | /**
* Copyright (C) 2014-2019 Philip Helger and contributors
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.phoss.smp.backend.mongodb.mgr;
import java.util.function.Consumer;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.bson.Document;
import com.helger.commons.annotation.Nonempty;
import com.helger.commons.annotation.ReturnsMutableCopy;
import com.helger.commons.collection.impl.CommonsArrayList;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.state.EChange;
import com.helger.commons.string.StringHelper;
import com.helger.peppol.sml.CSMLDefault;
import com.helger.peppol.sml.ISMLInfo;
import com.helger.peppol.sml.SMLInfo;
import com.helger.phoss.smp.domain.sml.ISMLInfoManager;
import com.helger.photon.audit.AuditHelper;
import com.mongodb.client.model.Indexes;
import com.mongodb.client.model.Updates;
import com.mongodb.client.result.DeleteResult;
/**
* Implementation of {@link ISMLInfoManager} for MongoDB
*
* @author Philip Helger
*/
public class SMLInfoManagerMongoDB extends AbstractManagerMongoDB implements ISMLInfoManager
{
private static final String BSON_ID = "id";
private static final String BSON_DISPLAYNAME = "displayname";
private static final String BSON_DNSZONE = "dnszone";
private static final String BSON_SERVICEURL = "serviceurl";
private static final String BSON_CLIENTCERT = "clientcert";
public SMLInfoManagerMongoDB ()
{
super ("smp-smlinfo");
getCollection ().createIndex (Indexes.ascending (BSON_ID));
}
@Nonnull
@ReturnsMutableCopy
public static Document toBson (@Nonnull final ISMLInfo aValue)
{
return new Document ().append (BSON_ID, aValue.getID ())
.append (BSON_DISPLAYNAME, aValue.getDisplayName ())
.append (BSON_DNSZONE, aValue.getDNSZone ())
.append (BSON_SERVICEURL, aValue.getManagementServiceURL ())
.append (BSON_CLIENTCERT, Boolean.valueOf (aValue.isClientCertificateRequired ()));
}
@Nonnull
@ReturnsMutableCopy
public static SMLInfo toDomain (@Nonnull final Document aDoc)
{
return new SMLInfo (aDoc.getString (BSON_ID),
aDoc.getString (BSON_DISPLAYNAME),
aDoc.getString (BSON_DNSZONE),
aDoc.getString (BSON_SERVICEURL),
aDoc.getBoolean (BSON_CLIENTCERT).booleanValue ());
}
@Nonnull
public ISMLInfo createSMLInfo (@Nonnull @Nonempty final String sDisplayName,
@Nonnull @Nonempty final String sDNSZone,
@Nonnull @Nonempty final String sManagementServiceURL,
final boolean bClientCertificateRequired)
{
final SMLInfo aSMLInfo = new SMLInfo (sDisplayName, sDNSZone, sManagementServiceURL, bClientCertificateRequired);
getCollection ().insertOne (toBson (aSMLInfo));
AuditHelper.onAuditCreateSuccess (SMLInfo.OT,
aSMLInfo.getID (),
sDisplayName,
sDNSZone,
sManagementServiceURL,
Boolean.valueOf (bClientCertificateRequired));
return aSMLInfo;
}
@Nonnull
public EChange updateSMLInfo (@Nullable final String sSMLInfoID,
@Nonnull @Nonempty final String sDisplayName,
@Nonnull @Nonempty final String sDNSZone,
@Nonnull @Nonempty final String sManagementServiceURL,
final boolean bClientCertificateRequired)
{
final Document aOldDoc = getCollection ().findOneAndUpdate (new Document (BSON_ID, sSMLInfoID),
Updates.combine (Updates.set (BSON_DISPLAYNAME,
sDisplayName),
Updates.set (BSON_DNSZONE, sDNSZone),
Updates.set (BSON_SERVICEURL,
sManagementServiceURL),
Updates.set (BSON_CLIENTCERT,
Boolean.valueOf (bClientCertificateRequired))));
if (aOldDoc == null)
return EChange.UNCHANGED;
AuditHelper.onAuditModifySuccess (SMLInfo.OT,
"all",
sSMLInfoID,
sDisplayName,
sDNSZone,
sManagementServiceURL,
Boolean.valueOf (bClientCertificateRequired));
return EChange.CHANGED;
}
@Nullable
public EChange deleteSMLInfo (@Nullable final String sSMLInfoID)
{
if (StringHelper.hasNoText (sSMLInfoID))
return EChange.UNCHANGED;
final DeleteResult aDR = getCollection ().deleteOne (new Document (BSON_ID, sSMLInfoID));
if (!aDR.wasAcknowledged () || aDR.getDeletedCount () == 0)
{
AuditHelper.onAuditDeleteFailure (SMLInfo.OT, "no-such-id", sSMLInfoID);
return EChange.UNCHANGED;
}
AuditHelper.onAuditDeleteSuccess (SMLInfo.OT, sSMLInfoID);
return EChange.CHANGED;
}
@Nonnull
@ReturnsMutableCopy
public ICommonsList <ISMLInfo> getAllSMLInfos ()
{
final ICommonsList <ISMLInfo> ret = new CommonsArrayList <> ();
getCollection ().find ().forEach ((Consumer <Document>) x -> ret.add (toDomain (x)));
return ret;
}
@Nullable
public ISMLInfo getSMLInfoOfID (@Nullable final String sID)
{
return getCollection ().find (new Document (BSON_ID, sID)).map (x -> toDomain (x)).first ();
}
public boolean containsSMLInfoWithID (@Nullable final String sID)
{
return getCollection ().find (new Document (BSON_ID, sID)).first () != null;
}
@Nullable
public ISMLInfo findFirstWithManageParticipantIdentifierEndpointAddress (@Nullable final String sAddress)
{
if (StringHelper.hasNoText (sAddress))
return null;
// The stored field does not contain the suffix
final String sSearchAddress = StringHelper.trimEnd (sAddress,
'/' + CSMLDefault.MANAGEMENT_SERVICE_PARTICIPANTIDENTIFIER);
return getCollection ().find (new Document (BSON_SERVICEURL, sSearchAddress))
.map (SMLInfoManagerMongoDB::toDomain)
.first ();
}
}
| [
"[email protected]"
] | |
45c5c9691c0a6d4758c2d632c664bb8e2bfbc81a | 146ab29e1d12a238c01019bb0c331790d97ecde7 | /src/main/java/com/mashibing/service/WyCarSpaceManageService.java | 359d70e8a046734046df7351953482096e108868 | [] | no_license | DT0352/family_service | 9d4477af02e934614bc710b1f3f54bed1fe5856b | 50dc5801dd74c0030f80f0c9a0588106174d0d40 | refs/heads/master | 2023-02-16T14:31:22.413132 | 2021-01-09T07:37:47 | 2021-01-09T07:37:47 | 328,101,063 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 307 | java | package com.mashibing.service;
import com.mashibing.bean.WyCarSpaceManage;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* 车位管理 服务类
* </p>
*
* @author lian
* @since 2021-01-09
*/
public interface WyCarSpaceManageService extends IService<WyCarSpaceManage> {
}
| [
"[email protected]"
] | |
785ffe329962a23766c85fedc67c2afec931c2e6 | 6b6765763691a89cfdf691084410cd84194f78e5 | /src/main/java/cn/itcast/dao/UsersMapper.java | c2528cd2cc84db630f1ec24af5dd432f3a7c2efb | [] | no_license | dadalili2019/U4_house | 20ceea5d5b71804f5d5dad02bcd2bbc3aa46e1ee | 23f01581d65f5bb81585b21c3fde07195ea7f0e9 | refs/heads/master | 2022-12-22T20:36:11.553886 | 2020-01-13T10:07:54 | 2020-01-13T10:07:54 | 231,852,469 | 0 | 0 | null | 2022-12-15T23:53:29 | 2020-01-05T01:32:05 | JavaScript | UTF-8 | Java | false | false | 1,659 | java | package cn.itcast.dao;
import cn.itcast.model.UserHouseMsg;
import cn.itcast.model.Users;
import cn.itcast.model.UsersExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface UsersMapper {
int deleteByPrimaryKey(Integer id);
int insert(Users record);
int insertSelective(Users record);
List<Users> selectByExample(UsersExample example);
Users selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Users record);
int updateByPrimaryKey(Users record);
/**
* 验证用户名是否存在
* @param username
* @return
*/
@Select("select * from users where name =#{username}")
List<Users> checkUserName(@Param(value = "username") String username);
/**
* 用户登录
* @param users
* @return
*/
@Select("SELECT * FROM users WHERE NAME=#{name} AND PASSWORD=#{password}")
Users findUser(Users users);
/**
* 根据用户id+房屋id查询房屋详细信息
* @param userHouseMsg+hid
* @return
*/
Users getHouseMsgById(UserHouseMsg userHouseMsg);
/**
* 根据用户名查询用户是否存在
* @param username
* @return
*/
@Select("SELECT * FROM users WHERE NAME =#{username} ")
Users checkUser(@Param(value = "username") String username);
/**
* 前台验证旧密码是否正确
* @param users
* @return
*/
@Select("SELECT * FROM users WHERE NAME =#{name} AND PASSWORD =#{password}")
int checkPassword(Users users);
} | [
"[email protected]"
] | |
813aa90097d4433c50926d067abe9dbe1409362a | 7691a14e56e313b3efb9100dfdf56c1e68942711 | /monitor.agent/src/main/java/com/qiangungun/monitor/agent/model/RemoteAddress.java | 3d12d558850c6898efbedaa0cd20f141e056b8c2 | [] | no_license | czhou3306/monitor | eea3170c44318a25972a7dafb35525c177cd1454 | 97f8f3b261c9890bcedf38c893e4907abd36599a | refs/heads/master | 2021-01-11T20:45:37.722859 | 2017-01-17T03:25:35 | 2017-01-17T03:25:35 | 79,179,413 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,345 | java | /**
* qiangungun.com Inc.
* Copyright (c) 2004-2016 All Rights Reserved.
*/
package com.qiangungun.monitor.agent.model;
/**
*
*
* @author [email protected]
* @version $Id: RemoteAddress.java, v0.1 2016年11月20日 下午4:54:05 [email protected] Exp $
*/
public class RemoteAddress {
public RemoteAddress(String ip, int port) {
this.ip = ip;
this.port = port;
}
private String ip;
private int port;
/**
* Getter method for property <tt>ip</tt>.
*
* @return property value of ip
*/
public String getIp() {
return ip;
}
/**
* Setter method for property <tt>ip</tt>.
*
* @param ip value to be assigned to property ip
*/
public void setIp(String ip) {
this.ip = ip;
}
/**
* Getter method for property <tt>port</tt>.
*
* @return property value of port
*/
public int getPort() {
return port;
}
/**
* Setter method for property <tt>port</tt>.
*
* @param port value to be assigned to property port
*/
public void setPort(int port) {
this.port = port;
}
/**
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "RemoteAddress [ip=" + ip + ", port=" + port + "]";
}
}
| [
"[email protected]"
] | |
4b46f9431b333f5b5b6749cd783d6a261e4ffba4 | 22ce9377722aa28b56ea022c05165c3caf090656 | /Practice/src/Array/ContainerWithMostWater.java | d5668fea480dc536f119f5a307806b0004fc3866 | [] | no_license | nikhilbarapatre/leetcode | ec95b1009600ada78a825b7866e416e161f1be19 | b9c16cab093c211931d7c08cfd70d51415fb1263 | refs/heads/master | 2020-08-04T04:11:48.303258 | 2019-12-17T23:18:15 | 2019-12-17T23:18:15 | 211,997,543 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 591 | java | package Array;
public class ContainerWithMostWater {
public int maxArea(int[] height){
int max = 0;
for(int i = 0; i < height.length; i++){
for(int j = i + 1; j < height.length; j++) {
max = Math.max(max, Math.min(height[i], height[j]) * (j - i));
}
}
return max;
}
public static void main(String[] args) {
ContainerWithMostWater con = new ContainerWithMostWater();
int[] height = {1,8,6,2,5,4,8,3,7};
int result = con.maxArea(height);
System.out.println(result);
}
}
| [
"[email protected]"
] | |
8a6d075675a0e1c17e35e9665994cc5264b27147 | 46370ea56c2b14f15663878e67eb5030b1d56951 | /src/main/java/com/orange/ru/mongodb/reference/bvpntariffs/Colors.java | c01e84e5d64ae8b473d791414c0131c6b4bde38b | [] | no_license | orange-business/PricingModelingTool | a2b3e4afa1e8fbeebe52b17ec2f533dbb8171ae1 | c1a0e89149831c00a7b73689d43ccd2e6e8bbc64 | refs/heads/master | 2021-01-13T01:29:55.417657 | 2014-02-07T14:05:57 | 2014-02-07T14:05:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,751 | java | package com.orange.ru.mongodb.reference.bvpntariffs;
/**
* .
* User: Зайнуллин Радик
* Date: 23.07.13
*/
public class Colors {
public Colors(){
data3 = new Color();
data2 = new Color();
data1 = new Color();
voice = new Color();
video = new Color();
}
private String caption;
public String getCaption() { return caption; }
public void setCaption(String caption) { this.caption = caption; }
private String description;
public String getDescription() { return description; }
public void setDescription(String description) { this.description = description; }
private Color data3, data2, data1, voice, video;
public Color getData3() { return data3; }
public void setData3(Color data3) { this.data3 = data3; }
public Color getData2() { return data2; }
public void setData2(Color data2) { this.data2 = data2; }
public Color getData1() { return data1; }
public void setData1(Color data1) { this.data1 = data1; }
public Color getVoice() { return voice; }
public void setVoice(Color voice) { this.voice = voice; }
public Color getVideo() { return video; }
public void setVideo(Color video) { this.video = video; }
@Override
public boolean equals(Object obj){
if (!(obj instanceof Colors)) return false;
Colors in = (Colors) obj;
if (!in.getCaption().equals(this.caption)) return false;
if (!in.getDescription().equals(this.description)) return false;
if (!in.getData3().equals(this.data3)) return false;
if (!in.getData2().equals(this.data2)) return false;
if (!in.getData1().equals(this.data1)) return false;
if (!in.getVoice().equals(this.voice)) return false;
if (!in.getVideo().equals(this.video)) return false;
return true;
}
} | [
"[email protected]"
] | |
4849efaaf9b8895103e57eac4cf3371671901af4 | 9f08ffc90011c013769f122ccef98a7d3abd6de3 | /app/src/test/java/zfani/assaf/saving_files/ExampleUnitTest.java | 938ed829131276e5fb2ba5802436142a34f9347d | [] | no_license | AssafZfani/SavingFiles | bb4f830c5939d8a1440a9eced1620762fe2391ef | 1b7e1b6a1d2029c16ded2580548044ee95aec4c0 | refs/heads/master | 2022-11-11T12:40:45.137320 | 2020-06-24T16:49:35 | 2020-06-24T16:49:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 385 | java | package zfani.assaf.saving_files;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"[email protected]"
] | |
846d108175919808a8fde651d2d268fdf0e2751c | 70bf2be984369fac6922bbeb613930d8f3d9b14d | /chon-platform/wiki-feature-bundles/org.chon.cms.wiki.nodes/src/org/chon/cms/wiki/nodes/WikiPageNodeRenderer.java | 8efa60f6a1fdaea56b251d373da75c0636da0e49 | [] | no_license | dewmal/choncms | adb6c3576123ac85a2e7af649b3e31dbe2d9bf48 | eb935b7f6889f01fc5d54a1e5f091801c0158bb3 | refs/heads/master | 2021-03-12T22:51:14.823630 | 2014-11-05T19:25:18 | 2014-11-05T19:25:18 | 35,773,260 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,223 | java | package org.chon.cms.wiki.nodes;
import javax.jcr.RepositoryException;
import org.chon.cms.core.model.renderers.VTplNodeRenderer;
import org.chon.cms.model.content.IContentNode;
import org.chon.web.api.Application;
import org.chon.web.api.Request;
import org.chon.web.api.Response;
import org.chon.web.api.ServerInfo;
public class WikiPageNodeRenderer extends VTplNodeRenderer {
@Override
public void render(IContentNode contentNode, Request req, Response resp,
Application _app, ServerInfo serverInfo) {
WikiPageContentNode wikiPageContentNode = (WikiPageContentNode) contentNode;
String paramMarkup = req.get("markup");
if(paramMarkup != null) {
wikiPageContentNode.setMarkup(paramMarkup);
}
String save = req.get("save");
if(save!= null && "true".equals(save)) {
//TODO: Check permissions
try {
Object user = req.getUser();
if(user == null) {
wikiPageContentNode.setMarkup("==Illegall access==");
} else {
wikiPageContentNode.save();
}
} catch (RepositoryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
super.render(wikiPageContentNode, req, resp, _app, serverInfo);
}
}
| [
"[email protected]@bbf6abbb-87fe-4cb4-6891-5151353d81b6"
] | [email protected]@bbf6abbb-87fe-4cb4-6891-5151353d81b6 |
438a9ac8beb5df079c13cab74871cc22ddc67f70 | b403a88662abba3a098a88502eab7d019e75045c | /app/src/main/java/cz/cuni/mff/nutritionalassistant/MainActivity.java | d7d8093b112d5119b221324b9fc36fd0f44e5b91 | [] | no_license | alfonzii/Nutritional-assistant | e713c8c87b058f774e8950a30021849816b1f652 | 90c51c35c359c4d593924a62453871a3cd447781 | refs/heads/master | 2023-04-16T19:57:28.873153 | 2023-04-15T21:50:36 | 2023-04-15T21:50:36 | 282,767,568 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 18,189 | java | package cz.cuni.mff.nutritionalassistant;
import android.annotation.SuppressLint;
import android.arch.lifecycle.Observer;
import android.arch.lifecycle.ViewModelProviders;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.app.AlertDialog;
import android.util.Pair;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import cz.cuni.mff.nutritionalassistant.activity.BaseAbstractActivity;
import cz.cuni.mff.nutritionalassistant.activity.overview.ProductOverviewActivity;
import cz.cuni.mff.nutritionalassistant.activity.overview.RecipeOverviewActivity;
import cz.cuni.mff.nutritionalassistant.activity.overview.RestaurantfoodOverviewActivity;
import cz.cuni.mff.nutritionalassistant.data.DataHolder;
import cz.cuni.mff.nutritionalassistant.data.PersistentStorage;
import cz.cuni.mff.nutritionalassistant.data.PersistentStorageBySharedPrefs;
import cz.cuni.mff.nutritionalassistant.databinding.ActivityMainBinding;
import cz.cuni.mff.nutritionalassistant.databinding.LayoutGeneratedFoodBinding;
import cz.cuni.mff.nutritionalassistant.foodtypes.Food;
import cz.cuni.mff.nutritionalassistant.guidancebot.Brain;
import cz.cuni.mff.nutritionalassistant.guidancebot.GeneratedFoodListCallback;
import cz.cuni.mff.nutritionalassistant.util.FormatUtil;
import cz.cuni.mff.nutritionalassistant.util.listener.AddedFoodTouchListener;
import cz.cuni.mff.nutritionalassistant.util.listener.GeneratedFoodClickListener;
import lombok.Setter;
import static cz.cuni.mff.nutritionalassistant.Constants.FOOD_REQUEST;
import static cz.cuni.mff.nutritionalassistant.Constants.PARAMETERS_REQUEST;
import static cz.cuni.mff.nutritionalassistant.Constants.RESULT_AUTOMATIC_FAILURE;
import static cz.cuni.mff.nutritionalassistant.Constants.VALUES_REQUEST;
public class MainActivity extends BaseAbstractActivity {
//Reference to singleton object
private DataHolder dataHolder;
private PersistentStorage storage;
private MainViewModel mViewModel;
//View binding object
private ActivityMainBinding binding;
@Setter
private Food clickedFood;
public static final String ACTION_EXAMINE_DETAILS =
"cz.cuni.mff.nutritionalassistant.action.EXAMINE_DETAILS";
public static final String EXTRA_SERIALIZABLE_FOOD =
"cz.cuni.mff.nutritionalassistant.EXTRA_SERIALIZABLE_FOOD";
//---------------------------------- ACTIVITY LIFECYCLE --------------------------------------------
@SuppressLint("SetTextI18n") //suppress setText warning
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
dataHolder = DataHolder.getInstance();
storage = new PersistentStorageBySharedPrefs(this);
binding = ActivityMainBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
setSupportActionBar(binding.toolbar);
binding.fab.setOnClickListener(view -> {
Intent intent = new Intent(MainActivity.this, FoodAddingActivity.class);
startActivityForResult(intent, FOOD_REQUEST);
});
// Setup ViewModel
mViewModel = ViewModelProviders.of(this).get(MainViewModel.class);
// Create observers
mViewModel.getNutValuesTrigger().observe(this, aBoolean -> refreshValues());
mViewModel.getGenFoodsTrigger().observe(this, aBoolean -> refreshGeneratedFoods());
mViewModel.getUserAddTrigger().observe(this, aBoolean -> refreshUserAddedFoods());
mViewModel.getProgressBarLoading().observe(this, isLoading -> {
if (isLoading) {
binding.content.progressBar.setVisibility(View.VISIBLE);
binding.content.progressBar.setIndeterminate(true);
} else {
binding.content.progressBar.setVisibility(View.GONE);
binding.content.progressBar.setIndeterminate(false);
}
});
mViewModel.getCheckboxesEnabled().observe(this, areEnabled -> {
if (areEnabled) {
enableCheckboxes();
} else {
disableCheckboxes();
}
});
mViewModel.getBackendRegenerateCallResult().observe(this, callResult -> {
if (callResult == 1) { //success
showRegenerateSuccesDialog();
} else if (callResult == 2) { //fail
showRegenerateFailDialog(mViewModel.getFailThrowable());
} else if (callResult == 3) { //exception
showRegenerateExceptionDialog();
} else { //different situation
}
});
mViewModel.dateCheckInit();
}
@Override
protected void onStop() {
super.onStop();
storage.save();
}
//----------------------------------------- FRONT-END ----------------------------------------------
public void refreshValues() {
binding.content.textCaloriesValue.setText(
Math.round(dataHolder.getCaloriesCurrent()) + "/" + Math.round(dataHolder.getCaloriesGoal()));
binding.content.textFatsValue.setText(
Math.round(dataHolder.getFatsCurrent()) + "/" + Math.round(dataHolder.getFatsGoal()));
binding.content.textCarbsValue.setText(
Math.round(dataHolder.getCarbohydratesCurrent()) + "/" + Math.round(dataHolder.getCarbohydratesGoal()));
binding.content.textProteinsValue.setText(
Math.round(dataHolder.getProteinsCurrent()) + "/" + Math.round(dataHolder.getProteinsGoal()));
}
private void refreshGeneratedFoods() {
for (int i = 0; i < MealController.NUMBER_OF_MEALS; i++) {
Food genFood = dataHolder.getGeneratedFoods().get(i).first;
boolean isChecked = dataHolder.getGeneratedFoods().get(i).second;
LayoutGeneratedFoodBinding generatedFoodBinding = MealController.getGeneratedFoodBindingFromMealID(binding, i);
generatedFoodBinding.textNameGeneratedFood.setText(genFood.getFoodName());
generatedFoodBinding.textCaloriesGeneratedFood.setText(
FormatUtil.roundedStringFormat(genFood.getCalories()) + " cals");
generatedFoodBinding.checkBox.setChecked(isChecked);
//if (!dataHolder.getGeneratedFoods().get(i).second) {
generatedFoodBinding.textNameGeneratedFood.setOnClickListener(
new GeneratedFoodClickListener(this, genFood));
//}
}
}
private void refreshUserAddedFoods() {
// clear user added foods frontend
for (int meal = 0; meal < MealController.NUMBER_OF_MEALS; meal++) {
int childCount = MealController.getLayoutFromMealID(binding, meal).getChildCount();
MealController.getLayoutFromMealID(binding, meal).removeViews(2, childCount - 2);
}
for (int meal = 0; meal < MealController.NUMBER_OF_MEALS; meal++) {
for (Food food : dataHolder.getUserAddedFoods().get(meal)) {
View userAddedFoodView = createAddedFoodView(food);
MealController.getLayoutFromMealID(binding, meal).addView(userAddedFoodView);
}
}
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
switch (id) {
case R.id.action_nutSettings:
Intent intent = new Intent(this, NHSetActivity.class);
startActivityForResult(intent, VALUES_REQUEST);
break;
case R.id.action_userParameters:
Intent uParIntent = new Intent(this, UserParametersActivity.class);
startActivityForResult(uParIntent, PARAMETERS_REQUEST);
break;
case R.id.action_resetCurrent:
mViewModel.reset(true);
break;
default:
return super.onOptionsItemSelected(item);
}
return true;
}
// LayoutAddedFood.onClick
public void examineAddedFoodDetails(View view) {
Intent intentFoodDetails;
switch (clickedFood.getFoodType()) {
case PRODUCT:
intentFoodDetails = new Intent(this, ProductOverviewActivity.class);
break;
case RECIPE:
intentFoodDetails = new Intent(this, RecipeOverviewActivity.class);
break;
case RESTAURANTFOOD:
intentFoodDetails = new Intent(this, RestaurantfoodOverviewActivity.class);
break;
default:
throw new IllegalStateException(getString(R.string.unexpected_value_en) + clickedFood.getFoodType());
}
intentFoodDetails.setAction(ACTION_EXAMINE_DETAILS);
intentFoodDetails.putExtra(EXTRA_SERIALIZABLE_FOOD, clickedFood);
startActivity(intentFoodDetails);
}
private void disableCheckboxes() {
for (int i = 0; i < MealController.NUMBER_OF_MEALS; i++) {
MealController.getGeneratedFoodBindingFromMealID(binding, i).checkBox.setEnabled(false);
}
}
private void enableCheckboxes() {
for (int i = 0; i < MealController.NUMBER_OF_MEALS; i++) {
MealController.getGeneratedFoodBindingFromMealID(binding, i).checkBox.setEnabled(true);
}
}
//--------------------------------------------------------------------------------------------------
@SuppressLint({"SetTextI18n"}) //suppress setText warning
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case VALUES_REQUEST:
if (resultCode == RESULT_OK) {
//tu bolo pridavanie do values
refreshValues();
} else if (resultCode == RESULT_AUTOMATIC_FAILURE) {
Intent uParIntent = new Intent(this, UserParametersActivity.class);
startActivityForResult(uParIntent, PARAMETERS_REQUEST);
}
break;
case FOOD_REQUEST:
if (resultCode == RESULT_OK) {
Food food = dataHolder.getLastEatenFood();
View newAddedFood = createAddedFoodView(food);
MealController.getLayoutFromMealID(
binding, dataHolder.getLastAddedMeal()).addView(newAddedFood);
refreshValues();
}
break;
case PARAMETERS_REQUEST:
if (resultCode == RESULT_OK) {
refreshValues();
}
break;
}
}
@SuppressLint("SetTextI18n")
private View createAddedFoodView(Food food) {
View newAddedFood = getLayoutInflater().inflate(R.layout.layout_added_food, null, false);
TextView txtNameAddedFood, txtWeightAddedFood, txtCaloriesAddedFood;
LinearLayout layout;
txtNameAddedFood = newAddedFood.findViewById(R.id.text_name_added_food);
txtWeightAddedFood = newAddedFood.findViewById(R.id.text_weight_added_food);
txtCaloriesAddedFood = newAddedFood.findViewById(R.id.text_calories_added_food);
layout = newAddedFood.findViewById(R.id.layout_added_food);
txtNameAddedFood.setText(food.getFoodName());
if (food.getServingWeight() != null) {
txtWeightAddedFood.setText(
FormatUtil.correctStringFormat(food.getServingQuantity().get(0)) + " x " +
food.getServingUnit().get(0) + " (" +
FormatUtil.correctStringFormat(food.getServingWeight().get(0)) + " g)"
);
} else { // null Product servingWeight
txtWeightAddedFood.setText(
FormatUtil.correctStringFormat(food.getServingQuantity().get(0)) + " x " +
food.getServingUnit().get(0)
);
}
txtCaloriesAddedFood.setText(Math.round(food.getCalories()) + " cal");
layout.setOnTouchListener(new AddedFoodTouchListener(
this, newAddedFood, food));
return newAddedFood;
}
public void onCheckboxClick(View view) {
int checkboxMealID = MealController.getMealIDfromCheckbox(binding, view);
boolean isChecked = ((CheckBox) view).isChecked();
mViewModel.onCheckboxClick(checkboxMealID, isChecked);
}
//-------------------------------------- REGENERATE-------------------------------------------------
private AlertDialog.Builder createRegenerateDialog(String message) {
AlertDialog.Builder myAlertBuilder;
myAlertBuilder = new AlertDialog.Builder(MainActivity.this);
// Add the dialog buttons.
myAlertBuilder.setPositiveButton(getString(R.string.dismiss_en),
(dialog, which) -> {}); // Dismiss button
myAlertBuilder.setTitle(getString(R.string.error_en));
myAlertBuilder.setMessage(message);
return myAlertBuilder;
}
public void showRegenerateSuccesDialog() {
}
public void showRegenerateFailDialog(@NonNull Throwable failThrowable) {
AlertDialog.Builder myAlertBuilder = createRegenerateDialog(
getString(R.string.meal_plan_generation_exception_en) + failThrowable.getMessage());
myAlertBuilder.show();
}
public void showRegenerateExceptionDialog() {
AlertDialog.Builder myAlertBuilder = createRegenerateDialog(getString(R.string.set_parameters_en));
myAlertBuilder.show();
}
public void regenerateButtonClick(View view) {
mViewModel.regenerateButtonClick();
}
// Controller class responsible for correct processing when interaction with meal layouts
// is needed. This class exists because of modularity reasons. Should we ever need to increase
// number of meals, only thing we need to change is content of methods here. Rest of code
// will act accordingly to it and no changes should be required to make.
public static class MealController {
// Meal constants (Meal IDs)
public static final int NUMBER_OF_MEALS = 4;
public static final int BREAKFAST = 0;
public static final int LUNCH = 1;
public static final int DINNER = 2;
public static final int SNACK = 3;
public static int getMealIDfromCheckbox(ActivityMainBinding binding, View view) {
if (view == binding.content.generatedFoodBreakfast.checkBox) {
return BREAKFAST;
} else if (view == binding.content.generatedFoodLunch.checkBox) {
return LUNCH;
} else if (view == binding.content.generatedFoodDinner.checkBox) {
return DINNER;
} else if (view == binding.content.generatedFoodSnack.checkBox) {
return SNACK;
} else { // ERROR
throw new IllegalStateException("Unexpected value: " + view.getId());
}
}
public static int getMealIDfromLayout(ViewGroup parent) {
switch (parent.getId()) {
case R.id.LinearLayout_breakfast:
return BREAKFAST;
case R.id.LinearLayout_lunch:
return LUNCH;
case R.id.LinearLayout_dinner:
return DINNER;
case R.id.LinearLayout_snack:
return SNACK;
default:
throw new IllegalStateException("Unexpected value: " + parent.getId());
}
}
public static ViewGroup getLayoutFromMealID(ActivityMainBinding binding, int mealID) {
LinearLayout layout = null;
switch (mealID) {
case BREAKFAST:
layout = binding.content.LinearLayoutBreakfast;
break;
case LUNCH:
layout = binding.content.LinearLayoutLunch;
break;
case DINNER:
layout = binding.content.LinearLayoutDinner;
break;
case SNACK:
layout = binding.content.LinearLayoutSnack;
break;
}
return layout;
}
public static LayoutGeneratedFoodBinding getGeneratedFoodBindingFromMealID(ActivityMainBinding binding, int mealID) {
LayoutGeneratedFoodBinding genFoodBinding = null;
switch (mealID) {
case BREAKFAST:
genFoodBinding = binding.content.generatedFoodBreakfast;
break;
case LUNCH:
genFoodBinding = binding.content.generatedFoodLunch;
break;
case DINNER:
genFoodBinding = binding.content.generatedFoodDinner;
break;
case SNACK:
genFoodBinding = binding.content.generatedFoodSnack;
break;
}
return genFoodBinding;
}
}
//Not implemented - doing nothing
/*public void exampleClick(View view) {
Intent intent = new Intent(this, SwapActivity.class);
startActivity(intent);
}*/
} | [
"[email protected]"
] | |
9f5944d43ad1e93450e39ca4bef2e1b0dcd1066a | db0f2ed43674663b838aae78bb1851853bac39fd | /epcis-legacy/src/main/java/org/oliot/model/epcis/ImplementationExceptionSeverity.java | e63516f35c1e016fbbab0f3c4d83bd6efad9b922 | [
"Apache-2.0"
] | permissive | piwpiw/epcis | 7d1c08cda0f0fe759465d57c6c5f483227cd097f | e89e36372e18de1ed26c3c3a7a7122c866e057cd | refs/heads/master | 2020-04-01T00:05:16.253229 | 2018-09-12T23:41:17 | 2018-09-12T23:41:17 | 152,681,500 | 1 | 0 | Apache-2.0 | 2018-10-12T02:16:25 | 2018-10-12T02:16:25 | null | UTF-8 | Java | false | false | 1,213 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.08.31 at 10:36:23 AM KST
//
package org.oliot.model.epcis;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>
* Java class for ImplementationExceptionSeverity.
*
* <p>
* The following schema fragment specifies the expected content contained within
* this class.
* <p>
*
* <pre>
* <simpleType name="ImplementationExceptionSeverity">
* <restriction base="{http://www.w3.org/2001/XMLSchema}NCName">
* <enumeration value="ERROR"/>
* <enumeration value="SEVERE"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "ImplementationExceptionSeverity", namespace = "query.epcis.oliot.org")
@XmlEnum
public enum ImplementationExceptionSeverity {
ERROR, SEVERE;
public String value() {
return name();
}
public static ImplementationExceptionSeverity fromValue(String v) {
return valueOf(v);
}
}
| [
"[email protected]"
] | |
febce6787ae9660e69282e199e2868a5f4d25b27 | de795f09249c1e627193fbc0599b40ae44c00889 | /springBoot_comunityBoard/demo/src/main/java/com/example/demo/pojo/Fruit.java | 6f9001d53abed48523b3117c22e6da00e5351f7f | [] | no_license | ChoiGiSung/SpringBoot | 0575348d5c93aeef0f297e341fa62de914645409 | 3e2fbe6008e2da988e985bdc50a70b68ec6eb87f | refs/heads/master | 2023-04-15T16:30:26.815222 | 2021-05-02T14:24:54 | 2021-05-02T14:24:54 | 287,983,897 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 134 | java | package com.example.demo.pojo;
import lombok.Data;
@Data
public class Fruit {
private String name;
private String color;
}
| [
"[email protected]"
] | |
0b831818f4174210d151d017fc26a9e6fa95164a | dd949f215d968f2ee69bf85571fd63e4f085a869 | /binding/tags/release3/subarchitectures/binder/src/java/binder/components/Binder.java | e564eb522ddd7487a914a5270ffaf9d90630e605 | [] | no_license | marc-hanheide/cogx | a3fd395805f1b0ad7d713a05b9256312757b37a9 | cb9a9c9cdfeba02afac6a83d03b7c6bb778edb95 | refs/heads/master | 2022-03-16T23:36:21.951317 | 2013-12-10T23:49:07 | 2013-12-10T23:49:07 | 219,460,352 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 14,217 | java | package binder.components;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Vector;
import binder.autogen.core.AlternativeUnionConfigurations;
import binder.autogen.core.Feature;
import binder.autogen.core.FeatureValue;
import binder.autogen.core.PerceivedEntity;
import binder.autogen.core.ProbabilityDistribution;
import binder.autogen.core.Proxy;
import binder.autogen.core.Union;
import binder.autogen.core.UnionConfiguration;
import binder.autogen.distributions.combined.CombinedProbabilityDistribution;
import binder.autogen.distributions.combined.OperationType;
import binder.autogen.distributions.discrete.DiscreteProbabilityDistribution;
import binder.autogen.featvalues.StringValue;
import binder.bayesiannetwork.BayesianNetworkManager;
import binder.utils.GradientDescent;
import binder.utils.ProbDistribUtils;
import binder.utils.UnionConstructor;
import cast.architecture.ChangeFilterFactory;
import cast.architecture.ManagedComponent;
import cast.architecture.WorkingMemoryChangeReceiver;
import cast.cdl.WorkingMemoryChange;
import cast.cdl.WorkingMemoryOperation;
import cast.core.CASTData;
/**
* The core binding algorithm - it takes proxies as inputs, and generate
* a distribution of possible union configurations (sequences of unions)
* for the proxies, given a predefined Bayesian Network specifying
* the correlations between features
*
* @author Pierre Lison
* @version 31/08/2008
*
*/
public class Binder extends ManagedComponent {
private UnionConstructor constructor;
// whether to perform incremental or full rebinding
public boolean incrementalBinding = true;
// Filtering parameters: maximum number of union configurations
// to keep in the binder at a given time
public int NB_CONFIGURATIONS_TO_KEEP = 1;
// The union configurations computed for the current state
// of the binder WM (modulo filtering)
Vector<UnionConfiguration> currentUnionConfigurations ;
public Binder() {
constructor = new UnionConstructor();
}
/**
* Add filters on proxy insertions, modifications (overwrite) and deletions,
* and initialise the binder
*
*/
@Override
public void start() {
// Proxy insertion
addChangeFilter(ChangeFilterFactory.createGlobalTypeFilter(Proxy.class,
WorkingMemoryOperation.ADD), new WorkingMemoryChangeReceiver() {
public void workingMemoryChanged(WorkingMemoryChange _wmc) {
try {
proxyInsertion(_wmc);
}
catch (Exception e) {
e.printStackTrace();
}
}
});
// Proxy modification
addChangeFilter(ChangeFilterFactory.createGlobalTypeFilter(Proxy.class,
WorkingMemoryOperation.OVERWRITE), new WorkingMemoryChangeReceiver() {
public void workingMemoryChanged(WorkingMemoryChange _wmc) {
try {
proxyUpdate(_wmc);
}
catch (Exception e) {
e.printStackTrace();
}
}
});
// Proxy deletion
addChangeFilter(ChangeFilterFactory.createGlobalTypeFilter(Proxy.class,
WorkingMemoryOperation.DELETE), new WorkingMemoryChangeReceiver() {
public void workingMemoryChanged(WorkingMemoryChange _wmc) {
try {
proxyDeletion(_wmc);
}
catch (Exception e) {
e.printStackTrace();
}
}
});
// Initialisation stuff
initializeUnionConfigurations();
log("Binding Monitor successfully started");
}
/**
* (re)initialize the binder with a single union configuration
*/
public void initializeUnionConfigurations () {
currentUnionConfigurations = new Vector<UnionConfiguration>();
UnionConfiguration initialConfig = new UnionConfiguration();
initialConfig.includedUnions = new Union[0];
currentUnionConfigurations.add(initialConfig);
}
@Override
public void configure(Map<String, String> _config) {
if (_config.containsKey("--alpha")) {
constructor.setAlphaParam(Float.parseFloat(_config.get("--alpha")));
}
if (_config.containsKey("--incremental")) {
incrementalBinding = Boolean.parseBoolean(_config.get("--incremental"));
}
}
public void fullRebinding() {
try {
log("Perform full rebinding...");
initializeUnionConfigurations();
CASTData<Proxy>[] proxies = getWorkingMemoryEntries(Proxy.class);
for (int i = 0 ; i < proxies.length; i++) {
incrementalBinding(proxies[i].getData());
}
}
catch (Exception e) {
e.printStackTrace();
}
}
private Vector<PerceivedEntity> getOtherProxies (Proxy[] proxies, Proxy proxyToExclude) {
Vector<PerceivedEntity> otherProxies = new Vector<PerceivedEntity>();
for (int i = 0; i < proxies.length ; i++) {
Proxy prox = proxies[i];
if (!prox.equals(proxyToExclude)) {
otherProxies.add(prox);
}
}
return otherProxies;
}
public void proxyUpdate (WorkingMemoryChange wmc) {
log("--------START BINDING----------");
log("binder working memory updated with an overwrite of an existing proxy!");
try {
Proxy updatedProxy= getMemoryEntry(wmc.address, Proxy.class);
if (updatedProxy.distribution == null) {
updatedProxy.features = ProbDistribUtils.addIndeterminateFeatureValues(updatedProxy.features);
updatedProxy.distribution = ProbDistribUtils.generateProbabilityDistribution(updatedProxy);
}
for (Enumeration<UnionConfiguration> configs =
currentUnionConfigurations.elements() ; configs.hasMoreElements(); ) {
UnionConfiguration existingUnionConfig = configs.nextElement();
for (int i = 0 ; i < existingUnionConfig.includedUnions.length; i++) {
Union existingUnion = existingUnionConfig.includedUnions[i];
for (int j = 0; j < existingUnion.includedProxies.length ; j++) {
Proxy existingProxy = existingUnion.includedProxies[j];
if (existingProxy.entityID.equals(updatedProxy.entityID)) {
Vector<PerceivedEntity> proxies =
getOtherProxies(existingUnion.includedProxies, existingProxy);
proxies.add(updatedProxy);
Union updatedUnion = constructor.constructNewUnion(proxies, newDataID());
updatedUnion.entityID = existingUnion.entityID ;
existingUnionConfig.includedUnions[i] = updatedUnion;
}
}
}
}
AlternativeUnionConfigurations alters = buildNewAlternativeUnionConfigurations();
updateWM(alters);
}
catch (Exception e) {
e.printStackTrace();
}
log("--------STOP BINDING----------");
}
private UnionConfiguration removeUnionFromConfig
(UnionConfiguration existingconfig, Union unionToDelete) {
Vector<Union> unionsInConfig = new Vector<Union>();
for (int i = 0; i < existingconfig.includedUnions.length ; i++) {
Union curUnion = existingconfig.includedUnions[i];
if (!curUnion.equals(unionToDelete)) {
unionsInConfig.add(curUnion);
}
}
existingconfig.includedUnions = new Union[unionsInConfig.size()];
existingconfig.includedUnions = unionsInConfig.toArray(existingconfig.includedUnions);
return existingconfig;
}
public void proxyDeletion (WorkingMemoryChange wmc) {
log("--------START BINDING----------");
log("binder working memory updated with a deletion of an existing proxy!");
try {
String deletedProxyID= wmc.address.id;
for (Enumeration<UnionConfiguration> configs =
currentUnionConfigurations.elements() ; configs.hasMoreElements(); ) {
UnionConfiguration existingUnionConfig = configs.nextElement();
for (int i = 0 ; i < existingUnionConfig.includedUnions.length; i++) {
Union existingUnion = existingUnionConfig.includedUnions[i];
for (int j = 0; j < existingUnion.includedProxies.length ; j++) {
Proxy existingProxy = existingUnion.includedProxies[j];
if (existingProxy.entityID.equals(deletedProxyID)) {
Vector<PerceivedEntity> proxies =
getOtherProxies(existingUnion.includedProxies, existingProxy);
if (proxies.size() > 0) {
Union updatedUnion = constructor.constructNewUnion(proxies, newDataID());
updatedUnion.entityID = existingUnion.entityID ;
existingUnionConfig.includedUnions[i] = updatedUnion;
}
else {
existingUnionConfig =
removeUnionFromConfig(existingUnionConfig, existingUnion);
}
}
}
}
}
AlternativeUnionConfigurations alters = buildNewAlternativeUnionConfigurations();
updateWM(alters);
}
catch (Exception e) {
e.printStackTrace();
}
log("--------STOP BINDING----------");
}
public void proxyInsertion(WorkingMemoryChange wmc) {
log("--------START BINDING----------");
log("binder working memory updated with a new proxy!");
long initTime = System.currentTimeMillis();
if (incrementalBinding) {
try {
Proxy newProxy = getMemoryEntry(wmc.address, Proxy.class);
newProxy.features = ProbDistribUtils.addIndeterminateFeatureValues(newProxy.features);
newProxy.distribution = ProbDistribUtils.generateProbabilityDistribution(newProxy);
incrementalBinding(newProxy);
}
catch (Exception e) {
e.printStackTrace();
}
}
else {
// fullRebinding();
}
long finalTime = System.currentTimeMillis();
log("Total binding time: " + (finalTime - initTime)/1000.0 + " seconds");
log("--------STOP BINDING----------");
}
public void incrementalBinding(Proxy newProxy) {
try {
log("Perform incremental binding...");
log("Proxy ID: " + newProxy.entityID);
Union newUnion = constructor.getInitialUnion(newProxy);
log("Construction of initial unions finished, moving to unions of more than 1 proxy...");
Vector<UnionConfiguration> newUnionConfigurations = new Vector<UnionConfiguration>();
HashMap<String,Union> alreadyMergedUnions = new HashMap<String, Union>();
for (Enumeration<UnionConfiguration> configs =
currentUnionConfigurations.elements() ; configs.hasMoreElements(); ) {
UnionConfiguration existingUnionConfig = configs.nextElement();
UnionConfiguration newConfigWithSingleUnion =
createNewUnionConfiguration (existingUnionConfig, newUnion);
newUnionConfigurations.add(newConfigWithSingleUnion);
for (int i = 0 ; i < existingUnionConfig.includedUnions.length; i++) {
Union existingUnion = existingUnionConfig.includedUnions[i];
Union newMergedUnion;
if (!hasConflictingSubarch(existingUnion, newUnion)) {
if (!alreadyMergedUnions.containsKey(existingUnion.entityID)) {
Vector<PerceivedEntity> unionsToMerge = new Vector<PerceivedEntity>();
unionsToMerge.add(existingUnion);
unionsToMerge.add(newUnion);
newMergedUnion = constructor.constructNewUnion(unionsToMerge, newDataID());
alreadyMergedUnions.put(existingUnion.entityID, newMergedUnion);
}
else {
newMergedUnion = alreadyMergedUnions.get(existingUnion.entityID);
}
UnionConfiguration newConfigWithMergedUnion =
createNewUnionConfiguration (existingUnionConfig, newMergedUnion, existingUnion);
newUnionConfigurations.add(newConfigWithMergedUnion);
}
}
}
Vector<UnionConfiguration> NBests =
GradientDescent.getNBestUnionConfigurations
(newUnionConfigurations, NB_CONFIGURATIONS_TO_KEEP);
currentUnionConfigurations = NBests;
log("Total number of union configurations generated: " + currentUnionConfigurations.size());
AlternativeUnionConfigurations alters = buildNewAlternativeUnionConfigurations();
updateWM(alters);
}
catch (Exception e) {
e.printStackTrace();
}
}
private AlternativeUnionConfigurations buildNewAlternativeUnionConfigurations () {
AlternativeUnionConfigurations alters = new AlternativeUnionConfigurations();
alters.alterconfigs = new UnionConfiguration[currentUnionConfigurations.size()];
for (int i = 0; i < alters.alterconfigs.length ; i++) {
alters.alterconfigs[i] = currentUnionConfigurations.elementAt(i);
}
return alters;
}
private UnionConfiguration createNewUnionConfiguration
(UnionConfiguration existingUnionConfig, Union unionToAdd) {
return createNewUnionConfiguration(existingUnionConfig, unionToAdd, new Vector<Union>());
}
private UnionConfiguration createNewUnionConfiguration
(UnionConfiguration existingUnionConfig, Union unionToAdd, Union unionToRemove) {
Vector<Union> unionsToRemove = new Vector<Union>();
unionsToRemove.add(unionToRemove);
return createNewUnionConfiguration(existingUnionConfig, unionToAdd, unionsToRemove);
}
private UnionConfiguration createNewUnionConfiguration(UnionConfiguration existingUnionConfig,
Union unionToAdd, Vector<Union> unionsToRemove) {
UnionConfiguration newConfig = new UnionConfiguration();
newConfig.includedUnions = new Union[existingUnionConfig.includedUnions.length + 1 - unionsToRemove.size()];
int count = 0;
for (int i = 0 ; i < existingUnionConfig.includedUnions.length; i++) {
if (!unionsToRemove.contains(existingUnionConfig.includedUnions[i])) {
newConfig.includedUnions[i- count] = existingUnionConfig.includedUnions[i];
}
else {
count ++;
}
}
newConfig.includedUnions[existingUnionConfig.includedUnions.length - unionsToRemove.size()] = unionToAdd;
return newConfig;
}
private boolean hasConflictingSubarch(Union union1, Union union2) {
for (int i = 0 ; i < union1.includedProxies.length ; i++) {
Proxy proxyi = union1.includedProxies[i];
for (int j = 0 ; j < union2.includedProxies.length ; j++) {
Proxy proxyj = union2.includedProxies[j];
if (proxyi.subarchId.equals(proxyj.subarchId)) {
return true;
}
}
}
return false;
}
private void updateWM(AlternativeUnionConfigurations configs) {
try {
CASTData<AlternativeUnionConfigurations>[] alterconfigs =
getWorkingMemoryEntries(AlternativeUnionConfigurations.class);
if (alterconfigs.length == 0) {
addToWorkingMemory(newDataID(), configs);
}
else {
overwriteWorkingMemory(alterconfigs[0].getID(), configs);
}
}
catch (Exception e) {
e.printStackTrace();
}
}
}
| [
"plison@9dca7cc1-ec4f-0410-aedc-c33437d64837"
] | plison@9dca7cc1-ec4f-0410-aedc-c33437d64837 |
8fddb5163299c9cc224fd9d65f459a90b8cacdf6 | 16f7f839a31248bc0df97f9bd987a4ce2d9cb248 | /horx-wdf-sys/horx-wdf-sys-impl/src/main/java/org/horx/wdf/sys/manager/SessionManager.java | ff4bd6c31aa207244ee12c58f76913cde4ab73ca | [
"Apache-2.0"
] | permissive | horxorg/horx-wdf | 2421c61f12149fee57a69ec262a7c9e299c29192 | 15abf81f21c70be8203b780f28d8c38057daf5a4 | refs/heads/master | 2022-12-11T19:17:44.093726 | 2020-09-13T08:43:31 | 2020-09-13T08:43:31 | 221,460,302 | 3 | 0 | Apache-2.0 | 2020-07-18T04:08:09 | 2019-11-13T13:00:23 | Java | UTF-8 | Java | false | false | 1,279 | java | package org.horx.wdf.sys.manager;
import org.horx.wdf.common.entity.PaginationParam;
import org.horx.wdf.common.entity.PaginationResult;
import org.horx.wdf.sys.domain.OnlineUser;
import org.horx.wdf.sys.domain.Session;
import org.horx.wdf.sys.domain.SessionAttr;
import org.horx.wdf.sys.dto.dataauth.SysDataAuthDTO;
import org.horx.wdf.sys.dto.query.OnlineUserQueryDTO;
import java.util.List;
/**
* 会话Manager。
* @since 1.0
*/
public interface SessionManager {
void create(Session session);
void modify(Session session);
void removeBySessionKey(String sessionKey);
void removeExpired();
Session getBySessionKey(String sessionKey);
void createAttr(SessionAttr sessionAttr);
void modifyAttr(SessionAttr sessionAttr);
void removeAttrByKey(Long sessionId, String attrKey);
List<SessionAttr> queryAttrBySessionId(Long sessionId);
SessionAttr getAttrByKey(Long sessionId, String attrKey);
PaginationResult<OnlineUser> paginationQueryOnlineUser(OnlineUserQueryDTO query, PaginationParam paginationParam);
/**
* 检查用户是否可下线。
* @param ids
* @param sysDataAuth
* @return 可下线的sessionKey数组。
*/
String[] offlineCheck(Long[] ids, SysDataAuthDTO sysDataAuth);
}
| [
"[email protected]"
] | |
1358c4c4ccb2579d064246d300e9af7edd8bcbe8 | 0d0fa21ea897909578fed66e0d5e74ce3d080399 | /src/test/java/com/thinkaurelius/faunus/FaunusElementTest.java | 9b93ea377995b3f7c0a1a0caced778ea09f0593c | [
"Apache-2.0"
] | permissive | bepcyc/faunus | d8291efb71c1c05c88afa396e9189c133e88b031 | 27142c8d6cc7e5a524b2a91d435e9de8b621aab5 | refs/heads/master | 2021-01-16T21:59:56.631656 | 2012-11-05T23:07:38 | 2012-11-05T23:07:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,454 | java | package com.thinkaurelius.faunus;
import com.thinkaurelius.faunus.util.MicroElement;
import com.thinkaurelius.faunus.util.MicroVertex;
import junit.framework.TestCase;
import org.apache.hadoop.io.WritableUtils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class FaunusElementTest extends TestCase {
public void testBasicSerialization() throws IOException {
FaunusVertex vertex1 = new FaunusVertex(10);
FaunusVertex vertex2 = new FaunusVertex(Long.MAX_VALUE);
ByteArrayOutputStream bytes1 = new ByteArrayOutputStream();
vertex1.write(new DataOutputStream(bytes1));
assertEquals(bytes1.size(), 9);
// 1 long id + 1 boolean path + 1 variable int paths + 1 short properties + 2 shorts edge types (4)
// ? + 1 + 1 + 2 + 2 + 2 = 11 bytes + 1 byte long id
ByteArrayOutputStream bytes2 = new ByteArrayOutputStream();
vertex2.write(new DataOutputStream(bytes2));
assertEquals(bytes2.size(), 17);
// 1 long id + 1 boolean path + 1 int paths + 1 short properties + 2 shorts edge types (4)
// ? + 1 + 1 + 2 + 2 + 2 = 11 bytes + 9 byte long id
final Long id1 = WritableUtils.readVLong(new DataInputStream(new ByteArrayInputStream(bytes1.toByteArray())));
final Long id2 = WritableUtils.readVLong(new DataInputStream(new ByteArrayInputStream(bytes2.toByteArray())));
assertEquals(id1, new Long(10l));
assertEquals(id2, new Long(Long.MAX_VALUE));
}
public void testElementComparator() throws IOException {
FaunusVertex a = new FaunusVertex(10);
FaunusVertex b = new FaunusVertex(Long.MAX_VALUE);
FaunusVertex c = new FaunusVertex(10);
FaunusVertex d = new FaunusVertex(12);
assertEquals(a.compareTo(a), 0);
assertEquals(a.compareTo(b), -1);
assertEquals(a.compareTo(c), 0);
assertEquals(a.compareTo(d), -1);
assertEquals(b.compareTo(a), 1);
assertEquals(b.compareTo(b), 0);
assertEquals(b.compareTo(c), 1);
assertEquals(b.compareTo(d), 1);
assertEquals(c.compareTo(a), 0);
assertEquals(c.compareTo(b), -1);
assertEquals(c.compareTo(c), 0);
assertEquals(c.compareTo(d), -1);
assertEquals(d.compareTo(a), 1);
assertEquals(d.compareTo(b), -1);
assertEquals(d.compareTo(c), 1);
assertEquals(d.compareTo(d), 0);
ByteArrayOutputStream aBytes = new ByteArrayOutputStream();
a.write(new DataOutputStream(aBytes));
ByteArrayOutputStream bBytes = new ByteArrayOutputStream();
b.write(new DataOutputStream(bBytes));
ByteArrayOutputStream cBytes = new ByteArrayOutputStream();
c.write(new DataOutputStream(cBytes));
ByteArrayOutputStream dBytes = new ByteArrayOutputStream();
d.write(new DataOutputStream(dBytes));
//////// test raw byte comparator
FaunusElement.Comparator comparator = new FaunusElement.Comparator();
assertEquals(0, comparator.compare(aBytes.toByteArray(), 0, aBytes.size(), aBytes.toByteArray(), 0, aBytes.size()));
assertEquals(-1, comparator.compare(aBytes.toByteArray(), 0, aBytes.size(), bBytes.toByteArray(), 0, bBytes.size()));
assertEquals(0, comparator.compare(aBytes.toByteArray(), 0, aBytes.size(), cBytes.toByteArray(), 0, cBytes.size()));
assertEquals(-1, comparator.compare(aBytes.toByteArray(), 0, aBytes.size(), dBytes.toByteArray(), 0, dBytes.size()));
assertEquals(1, comparator.compare(bBytes.toByteArray(), 0, bBytes.size(), aBytes.toByteArray(), 0, aBytes.size()));
assertEquals(0, comparator.compare(bBytes.toByteArray(), 0, bBytes.size(), bBytes.toByteArray(), 0, bBytes.size()));
assertEquals(1, comparator.compare(bBytes.toByteArray(), 0, bBytes.size(), cBytes.toByteArray(), 0, cBytes.size()));
assertEquals(1, comparator.compare(bBytes.toByteArray(), 0, bBytes.size(), dBytes.toByteArray(), 0, dBytes.size()));
assertEquals(0, comparator.compare(cBytes.toByteArray(), 0, cBytes.size(), aBytes.toByteArray(), 0, aBytes.size()));
assertEquals(-1, comparator.compare(cBytes.toByteArray(), 0, cBytes.size(), bBytes.toByteArray(), 0, bBytes.size()));
assertEquals(0, comparator.compare(cBytes.toByteArray(), 0, cBytes.size(), cBytes.toByteArray(), 0, cBytes.size()));
assertEquals(-1, comparator.compare(cBytes.toByteArray(), 0, cBytes.size(), dBytes.toByteArray(), 0, dBytes.size()));
assertEquals(1, comparator.compare(dBytes.toByteArray(), 0, dBytes.size(), aBytes.toByteArray(), 0, aBytes.size()));
assertEquals(-1, comparator.compare(dBytes.toByteArray(), 0, dBytes.size(), bBytes.toByteArray(), 0, bBytes.size()));
assertEquals(1, comparator.compare(dBytes.toByteArray(), 0, dBytes.size(), cBytes.toByteArray(), 0, cBytes.size()));
assertEquals(0, comparator.compare(dBytes.toByteArray(), 0, dBytes.size(), dBytes.toByteArray(), 0, dBytes.size()));
}
public void testPathIteratorRemove() {
FaunusVertex vertex1 = new FaunusVertex(10);
assertEquals(vertex1.pathCount(), 0);
vertex1.enablePath(true);
assertEquals(vertex1.pathCount(), 0);
vertex1.addPath((List) Arrays.asList(new MicroVertex(1l), new MicroVertex(2l)), false);
vertex1.addPath((List) Arrays.asList(new MicroVertex(1l), new MicroVertex(3l)), false);
vertex1.addPath((List) Arrays.asList(new MicroVertex(1l), new MicroVertex(4l)), false);
assertEquals(vertex1.pathCount(), 3);
Iterator<List<MicroElement>> itty = vertex1.getPaths().iterator();
while (itty.hasNext()) {
if (itty.next().get(1).getId() == 3l)
itty.remove();
}
assertEquals(vertex1.pathCount(), 2);
}
public void testPathHash() {
List<MicroElement> path1 = (List) Arrays.asList(new MicroVertex(1l), new MicroVertex(2l));
List<MicroElement> path2 = (List) Arrays.asList(new MicroVertex(1l), new MicroVertex(1l));
assertEquals(new HashSet(path1).size(), 2);
assertEquals(new HashSet(path2).size(), 1);
}
}
| [
"[email protected]"
] | |
6bfb54eff51be4fa03b028e8e0af1202856bef3b | e9dc4e9b5046322b02c54e6a035f6620f0abbc89 | /lian_hjy_project/src/main/java/com/zhanghp/mapper/TblNetdiskUrlMapper.java | 7f6a9631772bd446c468cdfc60e181daaafcbffe | [] | no_license | zhp1221/hjy | 333003784ca8c97b0ef2e5af6d7b8843c2c6eeb7 | 88db8f0aca84e0b837de6dc8ebb43de3f0cf8e85 | refs/heads/master | 2023-08-28T04:02:54.552694 | 2021-10-31T11:24:21 | 2021-10-31T11:24:21 | 406,342,462 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 319 | java | package com.zhanghp.mapper;
import com.zhanghp.bean.TblNetdiskUrl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* 网络硬盘路径 Mapper 接口
* </p>
*
* @author zhanghp
* @since 2021-09-12
*/
public interface TblNetdiskUrlMapper extends BaseMapper<TblNetdiskUrl> {
}
| [
"[email protected]"
] | |
7143568ce6f73a6a53c50d7b28f6d3457bf0d90e | a52fcaa52f001b40ed21f57b4f0d11474f42028a | /Test1/成人大礼包/src/M3u8ThreadDownLoad.java | 4e19dcd7faaa2db7ff7139e3ba20c46e32bcff7c | [] | no_license | cobight/secondstage | 4e4e6f3bc97b801d2fd39b10e3216a55c991e6c7 | c8d0105ea326deca211e2659bade75633797a464 | refs/heads/master | 2023-01-04T11:09:10.391732 | 2020-10-20T13:39:46 | 2020-10-20T13:39:46 | 290,418,379 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,296 | java | import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
/**
* @ClassName M3u8ThreadDownLoad
* @Description 线程下载M3U8格式文件切片,并合并为视频
* @Author cobight
* @CreateTime 2020/8/25 16:41
* @Version 1.0
**/
public class M3u8ThreadDownLoad {
public static void main(String[] args) throws Exception {
long start = System.currentTimeMillis();
//自己换
String url = "https://play.093ch.com/20200126/90/901/901.mp4.m3u8";
long time = new Date().getTime();
//System.out.println(new File("").getAbsolutePath());
File f = new File("download\\" + time);
if (!f.exists()) {
System.out.println(f.mkdirs() ? "成功生成目录!" : "文件夹创建失败!");
}
Tool_m3u8 t = new Tool_m3u8();//m3u8视频格式的下载工具类
/* 参数一m3u8网址
* 参数二保存路径
* 参数三线程数量
*/
t.load_m3u8(url, "" + time, 12);
long stop = System.currentTimeMillis();
long allsecond=(stop - start)/1000, min=allsecond/60,second=allsecond-60*min;
System.out.println("下载消耗时长:" + min+"分钟,"+second+"秒");
}
public static void down(String url, Integer ThreadNum ) throws Exception {
long time = new Date().getTime();
File f = new File("download\\" + time);
if (!f.exists()) {
System.out.println(f.mkdirs() ? "成功生成目录!" : "文件夹创建失败!");
}
Tool_m3u8 t = new Tool_m3u8();//m3u8视频格式的下载工具类
t.load_m3u8(url, "" + time, ThreadNum);
}
static class Tool_m3u8 {
private int length = 0;
/**
* @Author cobight
* @Date 2020/8/25
* @Description 读m3u8网址数据,解析切片路径,读取网络切片到文件
* @Param [url, file, ThreadNum]
* @Return void
**/
public void load_m3u8(String url, String file, Integer ThreadNum) throws Exception {
String m = HttpRequest.sendGet(url, "");
// System.out.println(m);//获取m3u8切片数据
String uri = url.substring(0, url.lastIndexOf("/") + 1);
ArrayList<String> list = getM3u8_ItemList(m, uri);
this.length = list.size();//记录长度,合并用
ExecutorService executorService = Executors.newFixedThreadPool(ThreadNum);//返回一个执行器的服务类
for (int i = 0; i < list.size(); i++) {
DownloadThread dt = new DownloadThread(list.get(i), "download/" + file + "/file.mp4" + i + ".ts");
executorService.execute(dt);
}
executorService.shutdown();//执行完关闭
while (true) {
if (executorService.isTerminated()) {
TimeUnit.SECONDS.sleep(1);
break;
}
}
merge_ts("download/" + file);//切片视频下载完,开始合并视频
// System.out.println(m);
//cmd控制台的合并文件语句
// copy /b file.mp4*.ts test.mp4
}
/**
* @Author cobight
* @Date 2020/8/25
* @Description 下载的m3u8文件解析出所有的切片路径,打包到list返回
* @Param [info, uri]
* @Return java.util.ArrayList<java.lang.String>
**/
public ArrayList<String> getM3u8_ItemList(String info, String uri) {
String[] arr = info.split("\n");//分割m3u8里的字符串数据
ArrayList<String> list = new ArrayList<>();
for (String s : arr) {
if (s.contains(".ts")) {//找ts结尾的
list.add(uri + s);
}
}
return list;
}
/**
* @Author cobight
* @Date 2020/8/25
* @Description 合并文件夹下所有ts切片,合一个,清一个
* @Param [PATH]
* @Return void
**/
public void merge_ts(String PATH) {
String outputPATH = PATH + "\\file.mp4";//合并文件位置
try {
OutputStream os = new FileOutputStream(outputPATH);
for (int i = 0; i < this.length; i++) {
File f = new File(PATH + "\\file.mp4" + i + ".ts");
InputStream is = new FileInputStream(f);//我记得想用list.get(i)来着
byte[] temp = new byte[1024];
int len;
while ((len = is.read(temp)) != -1) {
os.write(temp, 0, len);
os.flush();
}
is.close();
f.delete();
}
os.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
static class HttpRequest {
/**
* 向指定URL发送GET方法的请求,返回字符串
*
* @param url 发送请求的URL
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return URL 所代表远程资源的响应结果
*/
public static String sendGet(String url, String param) {
StringBuilder result = new StringBuilder();
BufferedReader in = null;
try {
String urlNameString = url + "?" + param;
URL realUrl = new URL(urlNameString);
// 打开和URL之间的连接
URLConnection connection = realUrl.openConnection();
// 设置通用的请求属性
connection.setRequestProperty("User-Agent",
"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3756.400 QQBrowser/10.5.4039.400");
// 建立实际的连接
connection.connect();
// 获取所有响应头字段
// Map<String, List<String>> map = connection.getHeaderFields();
// // 遍历所有的响应头字段
// for (String key : map.keySet()) {
// System.out.println(key + "--->" + map.get(key));
// }
// 定义 BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(
connection.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result.append(line).append("\n");
}
return result.toString();
} catch (Exception e) {
System.out.println("发送GET请求出现异常!" + url);
// e.printStackTrace();
return sendGet(url, param);
}
// 使用finally块来关闭输入流
finally {
try {
if (in != null) {
in.close();
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
/**
* 向指定 URL 发送POST方法的请求
*
* @param url 发送请求的 URL
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return 所代表远程资源的响应结果
*/
public static String sendPost(String url, String param) {
PrintWriter out = null;
BufferedReader in = null;
StringBuilder result = new StringBuilder();
try {
URL realUrl = new URL(url);
// 打开和URL之间的连接
URLConnection conn = realUrl.openConnection();
// 设置通用的请求属性
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
// 发送POST请求必须设置如下两行
conn.setDoOutput(true);
conn.setDoInput(true);
// 获取URLConnection对象对应的输出流
out = new PrintWriter(conn.getOutputStream());
// 发送请求参数
out.print(param);
// flush输出流的缓冲
out.flush();
// 定义BufferedReader输入流来读取URL的响应
in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
result.append(line);
}
} catch (Exception e) {
System.out.println("发送 POST 请求出现异常!" + e);
e.printStackTrace();
}
//使用finally块来关闭输出流、输入流
finally {
try {
if (out != null) {
out.close();
}
if (in != null) {
in.close();
}
} catch (IOException ex) {
ex.printStackTrace();
}
}
return result.toString();
}
/**
* 文件下载与保存
*/
public static void download_file(String url, String filepath) {
InputStream is = null;
FileOutputStream fos = null;
try {
URL realUrl = new URL(url);
// 打开和URL之间的连接
URLConnection connection = realUrl.openConnection();
// 设置通用的请求属性头
connection.setRequestProperty("accept", "*/*");
connection.setRequestProperty("connection", "Keep-Alive");
connection.setRequestProperty("user-agent",
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
// 建立实际的连接
connection.connect();
// 获取所有响应头字段
// Map<String, List<String>> map = connection.getHeaderFields();
// // 遍历所有的响应头字段
// for (String key : map.keySet()) {
// System.out.println(key + "--->" + map.get(key));
// }
// 定义 BufferedReader输入流来读取URL的响应
is = new BufferedInputStream(connection.getInputStream());
fos = new FileOutputStream(filepath);
byte[] temp = new byte[1024];
int len;
while ((len = is.read(temp)) != -1) {
fos.write(temp, 0, len);
}
} catch (Exception e) {
System.out.println("ts切片下载出现异常!开始重新下载:" + url);
// e.printStackTrace();异常重载
download_file(url, filepath);
} finally {
try {
if (is != null) {
is.close();
}
if (fos != null) {
fos.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
// 使用finally块来关闭输入流
}
}
static class DownloadThread implements Runnable {
private String url;
private String filepath;
public DownloadThread(String url, String filepath) {
this.url = url;//切片地址
this.filepath = filepath;//保存路径
}
@Override
public void run() {
System.out.println(this.url);
HttpRequest.download_file(this.url, this.filepath);
}
}
}
| [
"[email protected]"
] | |
1c78843b0d58c445bd914bd245636773ca639aec | cc84d062f266e799948834b55aeb95d818ce4533 | /project/工程代码/03-springboot-mybatis/src/main/java/com/wkcto/springboot/service/StudentService.java | 3dfe1496ea1e463c20001291ce35b074414c1e07 | [] | no_license | GanHoL/spring-boot | 86e94ef99eba002ef27c853f19e273cf0f4c752c | 9d63b9c6021332f76bb51381cda139c26889ebad | refs/heads/master | 2023-01-22T08:59:13.843923 | 2020-11-30T10:11:34 | 2020-11-30T10:11:36 | 317,182,045 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 409 | java | package com.wkcto.springboot.service;
import com.wkcto.springboot.model.Student;
/**
* ClassName:StudentService
* <p>
* Package:com.wkcto.springboot.service
* Description:
*
* @Date:2018/8/7 12:20
* @Author:GanHoL
*/
public interface StudentService {
public Student getStudentById(Integer id);
public int updateStudent(Student student);
public int insertStudent(Student student);
}
| [
"5504467659ghl"
] | 5504467659ghl |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.