blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 390 | content_id stringlengths 40 40 | detected_licenses listlengths 0 35 | license_type stringclasses 2 values | repo_name stringlengths 6 132 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 539 values | visit_date timestamp[us]date 2016-08-02 21:09:20 2023-09-06 10:10:07 | revision_date timestamp[us]date 1990-01-30 01:55:47 2023-09-05 21:45:37 | committer_date timestamp[us]date 2003-07-12 18:48:29 2023-09-05 21:45:37 | github_id int64 7.28k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 13 values | gha_event_created_at timestamp[us]date 2012-06-11 04:05:37 2023-09-14 21:59:18 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-28 02:39:21 ⌀ | gha_language stringclasses 62 values | src_encoding stringclasses 26 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 128 12.8k | extension stringclasses 11 values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 79 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10f634123d97bcf27a6d0c12b27ee7c90904caa2 | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/jdbi/learning/7385/RegisterBeanMappersImpl.java | 269fad121cf7b575b9d3697b1a0e05a90c0e3628 | [] | no_license | ASSERT-KTH/synthetic-checkstyle-error-dataset | 40e8d1e0a7ebe7f7711def96a390891a6922f7bd | 40c057e1669584bfc6fecf789b5b2854660222f3 | refs/heads/master | 2023-03-18T12:50:55.410343 | 2019-01-25T09:54:39 | 2019-01-25T09:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,528 | java | /*
* 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.jdbi.v3.sqlobject.config.internal;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.stream.Stream;
import org.jdbi.v3.core.config.ConfigRegistry;
import org.jdbi.v3.sqlobject.config.Configurer;
import org.jdbi.v3.sqlobject.config.RegisterBeanMappers;
public class RegisterBeanMappersImpl implements Configurer {
@Override
public void configureForType(ConfigRegistry registry, Annotation annotation, Class<?>sqlObjectType) {
Configurer delegate = new RegisterBeanMapperImpl();
RegisterBeanMappers registerBeanMappers = (RegisterBeanMappers) annotation;
Stream.of(registerBeanMappers.value()).forEach(anno -> delegate.configureForType(registry, anno, sqlObjectType));
}
@Override
public void configureForMethod(ConfigRegistry registry, Annotation annotation, Class<?> sqlObjectType, Method method) {
configureForType(registry, annotation, sqlObjectType);
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
846ac1474d789bdbb9de3f977f7be572b5ba420d | 22b1fe6a0af8ab3c662551185967bf2a6034a5d2 | /experimenting-rounds/massive-count-of-annotated-classes/src/main/java/fr/javatronic/blog/massive/annotation1/sub1/Class_7939.java | e2f491bbdaf8e994bafb902f63650237a487cd91 | [
"Apache-2.0"
] | permissive | lesaint/experimenting-annotation-processing | b64ed2182570007cb65e9b62bb2b1b3f69d168d6 | 1e9692ceb0d3d2cda709e06ccc13290262f51b39 | refs/heads/master | 2021-01-23T11:20:19.836331 | 2014-11-13T10:37:14 | 2014-11-13T10:37:14 | 26,336,984 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 151 | java | package fr.javatronic.blog.massive.annotation1.sub1;
import fr.javatronic.blog.processor.Annotation_001;
@Annotation_001
public class Class_7939 {
}
| [
"sebastien.lesaint@gmail.com"
] | sebastien.lesaint@gmail.com |
d4c2e566394d2181be7d1053c139a8f84fb4a46b | 32f38cd53372ba374c6dab6cc27af78f0a1b0190 | /app/src/main/java/com/alipay/mobile/quinox/bundle/IBundle.java | 606476724377d4dc52926e8ac58a6ddc1ebbbc6c | [] | no_license | shuixi2013/AmapCode | 9ea7aefb42e0413f348f238f0721c93245f4eac6 | 1a3a8d4dddfcc5439df8df570000cca12b15186a | refs/heads/master | 2023-06-06T23:08:57.391040 | 2019-08-29T04:36:02 | 2019-08-29T04:36:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,601 | java | package com.alipay.mobile.quinox.bundle;
import com.alipay.mobile.quinox.bundle.IBundle;
import java.util.List;
public interface IBundle<T extends IBundle<T>> {
public static final int INT_127 = 127;
public static final int INT_27 = 27;
public static final String TAG = "Bundle";
public static final int VERSION_1_1_3 = 0;
public static final int VERSION_1_3_0 = 1;
public static final int VERSION_1_5_0 = 2;
public static final int VERSION_1_6_0 = 3;
public static final int VERSION_2_1_3 = 4;
public static final int VERSION_2_3_5 = 5;
boolean containCode();
boolean containRes();
long getAdler32Sum();
List<String> getComponents();
List<String> getDependencies();
List<String> getExportPackages();
int getInitLevel();
String getLocation();
String getMD5();
String getName();
List<String> getNativeLibs();
int getPackageId();
List<String> getPackageNames();
@Deprecated
long getSize();
int getVERSION();
String getVersion();
T setAdler32Sum(long j);
T setComponents(List<String> list);
T setContainCode(boolean z);
T setContainRes(boolean z);
T setDependencies(List<String> list);
T setExportPackages(List<String> list);
T setInitLevel(int i);
T setLocation(String str);
T setMD5(String str);
T setName(String str);
T setNativeLibs(List<String> list);
T setPackageId(int i);
T setPackageNames(List<String> list);
@Deprecated
T setSize(long j);
T setVERSION(int i);
T setVersion(String str);
}
| [
"hubert.yang@nf-3.com"
] | hubert.yang@nf-3.com |
8cc4726f6c0945dbfbd7b8a7f2a0c9e451dae044 | 5f56dfdc6232f3ba6464a8a34f8e0ae9e29a27f9 | /src/test/java/com/training/web/rest/AuditResourceIntTest.java | 458e429cbf7139069c52618a3bf9368ee79cbd6b | [] | no_license | BulkSecurityGeneratorProject/training09 | fd9f34f5c677e4123685083632a9340e45f6a50f | 7a5c1816f213e1902fd946905074aff612a88c5d | refs/heads/master | 2022-12-11T01:42:27.404535 | 2019-01-09T02:40:15 | 2019-01-09T02:40:15 | 296,663,821 | 0 | 0 | null | 2020-09-18T15:44:40 | 2020-09-18T15:44:40 | null | UTF-8 | Java | false | false | 6,591 | java | package com.training.web.rest;
import com.training.Training09App;
import com.training.config.audit.AuditEventConverter;
import com.training.domain.PersistentAuditEvent;
import com.training.repository.PersistenceAuditEventRepository;
import com.training.service.AuditEventService;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.web.PageableHandlerMethodArgumentResolver;
import org.springframework.format.support.FormattingConversionService;
import org.springframework.http.MediaType;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.transaction.annotation.Transactional;
import java.time.Instant;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
/**
* Test class for the AuditResource REST controller.
*
* @see AuditResource
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = Training09App.class)
@Transactional
public class AuditResourceIntTest {
private static final String SAMPLE_PRINCIPAL = "SAMPLE_PRINCIPAL";
private static final String SAMPLE_TYPE = "SAMPLE_TYPE";
private static final Instant SAMPLE_TIMESTAMP = Instant.parse("2015-08-04T10:11:30Z");
private static final long SECONDS_PER_DAY = 60 * 60 * 24;
@Autowired
private PersistenceAuditEventRepository auditEventRepository;
@Autowired
private AuditEventConverter auditEventConverter;
@Autowired
private MappingJackson2HttpMessageConverter jacksonMessageConverter;
@Autowired
private FormattingConversionService formattingConversionService;
@Autowired
private PageableHandlerMethodArgumentResolver pageableArgumentResolver;
private PersistentAuditEvent auditEvent;
private MockMvc restAuditMockMvc;
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
AuditEventService auditEventService =
new AuditEventService(auditEventRepository, auditEventConverter);
AuditResource auditResource = new AuditResource(auditEventService);
this.restAuditMockMvc = MockMvcBuilders.standaloneSetup(auditResource)
.setCustomArgumentResolvers(pageableArgumentResolver)
.setConversionService(formattingConversionService)
.setMessageConverters(jacksonMessageConverter).build();
}
@Before
public void initTest() {
auditEventRepository.deleteAll();
auditEvent = new PersistentAuditEvent();
auditEvent.setAuditEventType(SAMPLE_TYPE);
auditEvent.setPrincipal(SAMPLE_PRINCIPAL);
auditEvent.setAuditEventDate(SAMPLE_TIMESTAMP);
}
@Test
public void getAllAudits() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Get all the audits
restAuditMockMvc.perform(get("/management/audits"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL)));
}
@Test
public void getAudit() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Get the audit
restAuditMockMvc.perform(get("/management/audits/{id}", auditEvent.getId()))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.principal").value(SAMPLE_PRINCIPAL));
}
@Test
public void getAuditsByDate() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Generate dates for selecting audits by date, making sure the period will contain the audit
String fromDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
String toDate = SAMPLE_TIMESTAMP.plusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
// Get the audit
restAuditMockMvc.perform(get("/management/audits?fromDate="+fromDate+"&toDate="+toDate))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(jsonPath("$.[*].principal").value(hasItem(SAMPLE_PRINCIPAL)));
}
@Test
public void getNonExistingAuditsByDate() throws Exception {
// Initialize the database
auditEventRepository.save(auditEvent);
// Generate dates for selecting audits by date, making sure the period will not contain the sample audit
String fromDate = SAMPLE_TIMESTAMP.minusSeconds(2*SECONDS_PER_DAY).toString().substring(0, 10);
String toDate = SAMPLE_TIMESTAMP.minusSeconds(SECONDS_PER_DAY).toString().substring(0, 10);
// Query audits but expect no results
restAuditMockMvc.perform(get("/management/audits?fromDate=" + fromDate + "&toDate=" + toDate))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
.andExpect(header().string("X-Total-Count", "0"));
}
@Test
public void getNonExistingAudit() throws Exception {
// Get the audit
restAuditMockMvc.perform(get("/management/audits/{id}", Long.MAX_VALUE))
.andExpect(status().isNotFound());
}
@Test
@Transactional
public void testPersistentAuditEventEquals() throws Exception {
TestUtil.equalsVerifier(PersistentAuditEvent.class);
PersistentAuditEvent auditEvent1 = new PersistentAuditEvent();
auditEvent1.setId(1L);
PersistentAuditEvent auditEvent2 = new PersistentAuditEvent();
auditEvent2.setId(auditEvent1.getId());
assertThat(auditEvent1).isEqualTo(auditEvent2);
auditEvent2.setId(2L);
assertThat(auditEvent1).isNotEqualTo(auditEvent2);
auditEvent1.setId(null);
assertThat(auditEvent1).isNotEqualTo(auditEvent2);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
a8b8824e3e4e9ce3c732e17230ae248dd1d695ce | ac5b1d1d11ea42e08eeb3bc69cc75ca9c03115ab | /DatabasesAdvanced/Hibernate-Code-First-Exercises/hospital-db/src/main/java/app/service/DoctorServiceImpl.java | e6a4c99987e9e5f60e496b6d5c5c610c44b5651e | [] | no_license | KNikovv/SoftuniHomeworks | 367f4af9fff5886fa5cd952adbe8c4e3d61d2c90 | c268818ce54446df3699e108925eed89e3fe7f9e | refs/heads/master | 2021-01-17T13:52:20.020668 | 2016-11-23T18:59:01 | 2016-11-23T18:59:01 | 54,383,819 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 557 | java | package app.service;
import app.dao.DoctorDao;
import app.entities.Doctor;
import app.service.interfaces.DoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class DoctorServiceImpl implements DoctorService {
private final DoctorDao doctorDao;
@Autowired
public DoctorServiceImpl(DoctorDao doctorDao) {
this.doctorDao = doctorDao;
}
@Override
public void create(Doctor doctor) {
this.doctorDao.saveAndFlush(doctor);
}
}
| [
"kaloyannikov@gmail.com"
] | kaloyannikov@gmail.com |
f6459d8a369606387aa90c2ce32c6c4c5787da88 | 2f1e0112d84940aaf399dcbc07f9abc57b91ad56 | /src/com/wiatec/playz/orm/pojo/ChannelTypeInfo.java | 2a424b42ec4a3ec14cc2d1be95b9cb05644ac5a7 | [] | no_license | xcpxcp198608/web_playz | 2b8f69ce9bd208a6a9f70bcb8a12ddf5f314030f | bcbf83dee13a5015f29c1e16a23be92c8429d037 | refs/heads/master | 2021-01-23T09:39:02.689697 | 2017-09-06T09:43:10 | 2017-09-06T09:43:10 | 102,586,707 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,359 | java | package com.wiatec.playz.orm.pojo;
/**
* Created by xuchengpeng on 23/06/2017.
*/
public class ChannelTypeInfo {
private int id;
private String tag;
private String name;
private String icon;
private String type;
private short flag;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public short getFlag() {
return flag;
}
public void setFlag(short flag) {
this.flag = flag;
}
@Override
public String toString() {
return "ChannelTypeInfo{" +
"id=" + id +
", tag='" + tag + '\'' +
", name='" + name + '\'' +
", icon='" + icon + '\'' +
", type='" + type + '\'' +
", flag=" + flag +
'}';
}
}
| [
"xcpxcp198608@163.com"
] | xcpxcp198608@163.com |
36d6736bd47cd85208e02febaf07984a7e526f69 | 1f3c00468850bc6e7794cb70efd8dd1c73eda1b5 | /huzhou/HuZhouMobipublic/src/com/huzhouport/electricreport/ElectricReportNewAddPort.java | 78bc003073b8deb3acb08a7f6a368290992710c5 | [] | no_license | litcas/PRJ | 2861f3eabe163465fb640b5259d0b946a3d3778a | 2cceb861502d8b7b0f54e4b99c50469b3c97b63a | refs/heads/master | 2021-06-27T19:32:47.168612 | 2017-09-17T05:44:31 | 2017-09-17T05:44:31 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 4,023 | java | package com.huzhouport.electricreport;
import java.util.ArrayList;
import java.util.HashMap;
import org.json.JSONArray;
import org.json.JSONObject;
import org.json.JSONTokener;
import com.example.huzhouportpublic.R;
import com.huzhouport.common.CommonListenerWrapper;
import com.huzhouport.common.WaitingDialog;
import com.huzhouport.common.util.Query;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;
/**
* 电子报港添加港口
* @author Administrator
*
*/
public class ElectricReportNewAddPort extends Activity {
private Query query = new Query();
private ArrayList<HashMap<String, Object>> portlist;
private ListView listView;
private String kind;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.electricreportnew_addport);
CommonListenerWrapper.commonBackWrapperListener(R.id.electricreportnew_addport_back,this);
kind = getIntent().getStringExtra("kind");
listView = (ListView) findViewById(R.id.electricreportnew_addport_viewlist);
new queryPortTask(this).execute();
}
class queryPortTask extends AsyncTask<String, Integer, String> {
ProgressDialog pDialog = null;
public queryPortTask() {
}
public queryPortTask(Context context) {
pDialog = new WaitingDialog().createDefaultProgressDialog(context, this);
pDialog.show();
}
@Override
protected String doInBackground(String... params) {
if (isCancelled())
return null;// 取消异步
return query.showPortList();
}
@Override
protected void onPostExecute(String result) {
if(result==null){
Toast.makeText(ElectricReportNewAddPort.this, "网络异常", Toast.LENGTH_SHORT).show();
}else{
parseContent(result);
showContent();
}
if (pDialog != null)
pDialog.dismiss();
super.onPostExecute(result);
}
}
public void parseContent(String result) {
JSONTokener jsonParser_User = new JSONTokener(result);
try {
JSONObject data = (JSONObject) jsonParser_User.nextValue();
JSONArray jsonArray = data.getJSONArray("list");
portlist = new ArrayList<HashMap<String, Object>>();
for (int i = 0; i < jsonArray.length(); i++) {
HashMap<String, Object> portmap = new HashMap<String, Object>();
JSONObject jsonObject = (JSONObject) jsonArray.opt(i);
portmap.put("ID", jsonObject.getString("portID"));
portmap.put("Name", jsonObject.getString("portName"));
portlist.add(portmap);
}
} catch (Exception e) {
Toast.makeText(ElectricReportNewAddPort.this, "网络异常",
Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
}
public void showContent() {
SimpleAdapter adapter = new SimpleAdapter(
ElectricReportNewAddPort.this, portlist,
R.layout.wharfwork_add_goods_item1,
new String[] { "Name", "ID" }, new int[] {
R.id.wharfwork_add_goods_item1_name,
R.id.wharfwork_add_goods_item1_id });
listView.setAdapter(adapter);
listView.setOnItemClickListener(new Submit());
}
class Submit implements OnItemClickListener {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
TextView tv_name = (TextView) arg1
.findViewById(R.id.wharfwork_add_goods_item1_name);
TextView tv_id = (TextView) arg1
.findViewById(R.id.wharfwork_add_goods_item1_id);
Intent intent = new Intent();
intent.putExtra("id", tv_id.getText().toString());// 设置回传的意图
intent.putExtra("name", tv_name.getText().toString());// 设置回传的意图
intent.putExtra("kind", kind);// 设置回传的意图
setResult(50, intent);
finish();
}
}
}
| [
"393054246@qq.com"
] | 393054246@qq.com |
e10fe6d40f19190dd1e45e665924eb2b05825b0d | 96e13dd386491e9cc444170c705577b35a487859 | /starshield/src/main/java/com/jdcloud/sdk/service/starshield/client/ChangeMirageSettingExecutor.java | e454354f9762c6d1d8022a9acb068096f685c1f1 | [
"Apache-2.0"
] | permissive | shijunLee/jdcloud-sdk-java | 125cdea82e84687dab4e2770612908c9a2af4a71 | 08be41292da36d0604013d34d6704ae13076006a | refs/heads/master | 2022-11-30T10:07:17.436266 | 2022-11-11T13:44:59 | 2022-11-11T13:44:59 | 137,592,050 | 0 | 1 | null | 2018-06-16T15:51:03 | 2018-06-16T15:51:03 | null | UTF-8 | Java | false | false | 1,520 | java | /*
* Copyright 2018 JDCLOUD.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.
*
* Zone Settings
* A Zone setting changes how the Zone works in relation to caching, security, or other features of JDC StarShield
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.starshield.client;
import com.jdcloud.sdk.client.JdcloudExecutor;
import com.jdcloud.sdk.service.JdcloudResponse;
import com.jdcloud.sdk.service.starshield.model.ChangeMirageSettingResponse;
/**
* 自动优化移动设备上网站访问者的图像加载
*/
class ChangeMirageSettingExecutor extends JdcloudExecutor {
@Override
public String method() {
return "PATCH";
}
@Override
public String url() {
return "/zones/{zone_identifier}/settings$$mirage";
}
@Override
public Class<? extends JdcloudResponse> returnType() {
return ChangeMirageSettingResponse.class;
}
}
| [
"jdcloud-api@jd.com"
] | jdcloud-api@jd.com |
0a60490972878a34807a35fd84fe15e94d254495 | 6573f97fbe6461f2481091d3a321e69cfaba9fd7 | /tourShare-Manage-Service/src/main/java/com/xmyy/manage/service/impl/AdminSessionServiceImpl.java | 1b1474393d8ed7369a4c7c159c6bafa280fa0cde | [] | no_license | LeeJeam/tourShare | 1ce65e9602decf04e52d0bd89fe2ac754bcdce56 | 2c8380d3e4284ef35837ff44beecfb547007cb0d | refs/heads/master | 2022-12-16T15:28:23.904487 | 2019-07-07T03:55:42 | 2019-07-07T03:55:42 | 195,601,846 | 1 | 1 | null | 2022-12-15T23:42:14 | 2019-07-07T02:33:28 | Java | UTF-8 | Java | false | false | 2,757 | java | package com.xmyy.manage.service.impl;
import com.alibaba.dubbo.config.annotation.Service;
import com.xmyy.manage.dao.AdminSessionDao;
import com.xmyy.manage.mapper.AdminSessionMapper;
import com.xmyy.manage.model.AdminSession;
import com.xmyy.manage.service.AdminSessionService;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CachePut;
import org.springframework.transaction.annotation.Transactional;
import top.ibase4j.core.Constants;
import top.ibase4j.core.base.BaseServiceImpl;
import top.ibase4j.core.util.CacheUtil;
import top.ibase4j.core.util.InstanceUtil;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 后台登录日志 服务实现类
*
* @author zlp
*/
@Service(interfaceClass = AdminSessionService.class)
@CacheConfig(cacheNames = "AdminSession")
public class AdminSessionServiceImpl extends BaseServiceImpl<AdminSession, AdminSessionMapper> implements AdminSessionService {
@Resource
private AdminSessionDao adminSessionDao;
@CachePut
@Transactional
public AdminSession update(AdminSession record) {
if (record != null && record.getId() == null) {
record.setUpdateTime(new Date());
Long id = adminSessionDao.queryBySessionId(record.getSessionId());
if (id != null) {
mapper.updateById(record);
} else {
record.setCreateTime(new Date());
mapper.insert(record);
}
} else {
mapper.updateById(record);
}
return record;
}
// 系统触发,由系统自动管理缓存
public void deleteBySessionId(final AdminSession adminSession) {
if (adminSession != null) {
adminSessionDao.deleteBySessionId(adminSession.getSessionId());
}
}
public List<String> querySessionIdByAccount(AdminSession sysSession) {
if (sysSession != null) {
return adminSessionDao.querySessionIdByAccount(sysSession.getAccount());
}
return null;
}
//
public void cleanExpiredSessions() {
Map<String, Object> columnMap = InstanceUtil.newHashMap();
List<AdminSession> sessions = queryList(columnMap);
for (AdminSession adminSession : sessions) {
if (adminSession != null) {
logger.info("检查SESSION : {}", adminSession.getSessionId());
if (!CacheUtil.getCache().exists(Constants.REDIS_SHIRO_SESSION + adminSession.getSessionId())) {
logger.info("移除SESSION : {}", adminSession.getSessionId());
delete(adminSession.getId());
}
}
}
}
}
| [
"goodbye_li@163.com"
] | goodbye_li@163.com |
d8cb43a7c3931f3ed2c7d2b7e27c7eb63145cccb | 5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab | /app/src/main/wechat6.5.3/com/tencent/mm/pluginsdk/j/p.java | 5edc78e39564afd45a1bf32f49d84ae85fc7dff6 | [] | no_license | newtonker/wechat6.5.3 | 8af53a870a752bb9e3c92ec92a63c1252cb81c10 | 637a69732afa3a936afc9f4679994b79a9222680 | refs/heads/master | 2020-04-16T03:32:32.230996 | 2017-06-15T09:54:10 | 2017-06-15T09:54:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,421 | java | package com.tencent.mm.pluginsdk.j;
import com.tencent.mm.sdk.platformtools.bf;
import com.tencent.mm.sdk.platformtools.v;
import com.tencent.mmdb.database.SQLiteDatabase;
import java.util.Map;
public final class p {
public final int aZk;
public final int action;
public final String content;
public final int errorCode;
public final int lCN;
public final String title;
public final int type;
public final String url;
public p(int i, int i2, String str) {
String str2;
Exception exception;
int i3;
Exception exception2;
String str3;
int i4;
String str4;
int i5 = 0;
String str5 = SQLiteDatabase.KeyEmpty;
int i6 = 5;
String str6 = SQLiteDatabase.KeyEmpty;
String str7 = SQLiteDatabase.KeyEmpty;
try {
Map q = bf.q(str, "e");
if (q == null) {
throw new IllegalArgumentException("values == null");
}
int intValue = Integer.valueOf((String) q.get(".e.ShowType")).intValue();
try {
i5 = Integer.valueOf((String) q.get(".e.Action")).intValue();
i6 = Integer.valueOf((String) q.get(".e.DispSec")).intValue();
str2 = (String) q.get(".e.Title");
} catch (Exception e) {
exception = e;
str2 = str7;
str7 = str6;
i3 = i6;
i6 = i5;
i5 = intValue;
exception2 = exception;
v.e("MicroMsg.UnifyErrorProcessor", exception2.toString());
str3 = str5;
i4 = i6;
str4 = str3;
this.errorCode = i2;
this.aZk = i;
this.type = i5;
this.action = i4;
this.content = str4;
this.lCN = i3;
this.title = str2;
this.url = str7;
}
try {
str7 = (String) q.get(".e.Url");
try {
i4 = i5;
i5 = intValue;
int i7 = i6;
str4 = (String) q.get(".e.Content");
i3 = i7;
} catch (Exception e2) {
exception = e2;
i3 = i6;
i6 = i5;
i5 = intValue;
exception2 = exception;
v.e("MicroMsg.UnifyErrorProcessor", exception2.toString());
str3 = str5;
i4 = i6;
str4 = str3;
this.errorCode = i2;
this.aZk = i;
this.type = i5;
this.action = i4;
this.content = str4;
this.lCN = i3;
this.title = str2;
this.url = str7;
}
} catch (Exception e3) {
exception = e3;
str7 = str6;
i3 = i6;
i6 = i5;
i5 = intValue;
exception2 = exception;
v.e("MicroMsg.UnifyErrorProcessor", exception2.toString());
str3 = str5;
i4 = i6;
str4 = str3;
this.errorCode = i2;
this.aZk = i;
this.type = i5;
this.action = i4;
this.content = str4;
this.lCN = i3;
this.title = str2;
this.url = str7;
}
this.errorCode = i2;
this.aZk = i;
this.type = i5;
this.action = i4;
this.content = str4;
this.lCN = i3;
this.title = str2;
this.url = str7;
} catch (Exception e4) {
exception2 = e4;
str2 = str7;
str7 = str6;
i3 = 5;
i6 = 0;
v.e("MicroMsg.UnifyErrorProcessor", exception2.toString());
str3 = str5;
i4 = i6;
str4 = str3;
this.errorCode = i2;
this.aZk = i;
this.type = i5;
this.action = i4;
this.content = str4;
this.lCN = i3;
this.title = str2;
this.url = str7;
}
}
}
| [
"zhangxhbeta@gmail.com"
] | zhangxhbeta@gmail.com |
7d3cf8290ba7bddf7453e3ed68501b3dcdce277e | 2203f9e82de6157d337aae1fdffcbb11def70a62 | /pc2/src/main/java/edu/csus/ecs/pc2/ui/LoadUIClass.java | 096ef8254c040b859f36614eec8c963d318dfe40 | [] | no_license | Kamo98/DIPLOM_NEW | c55b59ccd0610d4d2867619ca40c9fed0957a786 | 4434a43acedc44fc7b041214f66204a4936ffe6b | refs/heads/master | 2023-04-27T18:22:32.869058 | 2020-05-21T13:21:30 | 2020-05-21T13:21:30 | 265,855,486 | 0 | 0 | null | 2021-05-12T00:29:54 | 2020-05-21T13:27:35 | Java | UTF-8 | Java | false | false | 6,428 | java | package edu.csus.ecs.pc2.ui;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;
import edu.csus.ecs.pc2.core.model.ClientId;
import edu.csus.ecs.pc2.core.model.ClientType.Type;
/**
* Contains methods to find and instantiate UI classes.
*
* @see #loadUIClass(String)
* @author pc2@ecs.csus.edu
* @version $Id$
*/
// $HeadURL$
public final class LoadUIClass {
/**
* The base project path for all classes.
*/
private static final String PROJECT_PACKAGE_PATH = "edu.csus.ecs.pc2";
/**
* Filename for default ui properties filename.
*/
public static final String UI_PROPERTIES_FILENAME = "uiname.properties";
/**
* Name of property which can contain a file name or path for uiname.
*
* @see #loadUIClass(String)
*/
public static final String UI_PROPERTY_NAME = "uiname";
private LoadUIClass (){
// present per CodeStyle
}
/**
* Find and create an instance of UIPlugin from className.
* <P>
* Code snippet.
* <pre>
* String uiClassName = "edu.csus.ecs.pc2.core.ui.editor.RunEditor";
* UIPlugin plugin = loadUIClass(uiClassName);
* plugin.setModelAndController(model, controller);
* </pre>
*
* @param className
* @throws ClassNotFoundException
* @throws InstantiationException
* @throws IllegalAccessException
*/
public static UIPlugin loadUIClass(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
Class<?> newClass = Class.forName(className);
Object object = newClass.newInstance();
if (object instanceof UIPlugin) {
return (UIPlugin) object;
}
object = null;
throw new SecurityException(className + " loaded, but not an instanceof UIPlugin");
}
/**
* A Properties, key is client type, value is default UI class name.
* @return default class names for each client type.
*/
public static Properties getDefaultUIProperties() {
Properties properties = new Properties();
properties.put(Type.ADMINISTRATOR.toString().toLowerCase(), PROJECT_PACKAGE_PATH + ".ui.admin.AdministratorView");
properties.put(Type.SCOREBOARD.toString().toLowerCase(), PROJECT_PACKAGE_PATH + ".ui.board.ScoreboardView");
properties.put(Type.JUDGE.toString().toLowerCase(), PROJECT_PACKAGE_PATH + ".ui.judge.JudgeView");
properties.put(Type.SPECTATOR.toString().toLowerCase(), PROJECT_PACKAGE_PATH + ".ui.judge.JudgeView");
properties.put(Type.EXECUTOR.toString().toLowerCase(), PROJECT_PACKAGE_PATH + ".ui.judge.JudgeView");
properties.put(Type.SERVER.toString().toLowerCase(), PROJECT_PACKAGE_PATH + ".ui.server.ServerView");
properties.put(Type.TEAM.toString().toLowerCase(), PROJECT_PACKAGE_PATH + ".ui.team.TeamView");
properties.put(Type.FEEDER.toString().toLowerCase(), PROJECT_PACKAGE_PATH + ".ui.eventfeed.ServicesView");
return properties;
}
/**
* Return default UI class name for input clientId.
*
* @param clientId
*/
private static String defaultUIClassName(ClientId clientId) {
String clientName = clientId.getClientType().toString().toLowerCase();
return getDefaultUIProperties().getProperty(clientName);
}
/**
* Search for uiname.properties file, using uiname property.
* <P>
* If uiname property value is an existing directory will return directory + file.seperator + uiname.properties. <br>
* Else If uiname property value is an existing file will return the name of that file. <br>
* Else returns the default filename {@link #UI_PROPERTIES_FILENAME}
* <P>
*
* Here is an example of the command lines that can be used to set the uiname property.
*
* <pre>
* java -Duiname=dirname ...
* java -Duiname=filename ...
* </pre>
*
* @return filename for UI properties.
*/
protected static String getUiFileName() {
String pathName = System.getProperty("uiname");
if (pathName != null) {
File file = new File(pathName);
if (file.isDirectory()) {
return pathName + File.separator + UI_PROPERTIES_FILENAME;
} else if (file.isFile()) {
return pathName;
}
}
return UI_PROPERTIES_FILENAME;
}
/**
* Return the UI class name for the input client.
*
* Will read the properties file for loading custom UIs. If not found in properties file, will return a default UI name using {@link #defaultUIClassName(ClientId)}.
*
* Code snippet.
*
* <pre>
* String uiClassName = getUIClassName(clientId);
* UIPlugin plugin = loadUIClass(uiClassName);
* plugin.setModelAndController(model, controller);
* </pre>
*
* @param clientId
* @return name for the UI Class.
* @throws IOException
*/
public static String getUIClassName(ClientId clientId) throws IOException {
String className = null;
Properties properties = new Properties();
String uiPropertiesFilename = getUiFileName();
if (new File(uiPropertiesFilename).exists()){
FileInputStream fileInputStream = new FileInputStream (uiPropertiesFilename);
properties.load(fileInputStream);
fileInputStream.close();
fileInputStream = null;
}
className = properties.getProperty(clientId.getName()); // lookup by short/login name
if (className == null){
return defaultUIClassName(clientId);
} else {
return className;
}
}
/**
* Write sample properties file using default values.
* @param filename
*/
public static void writeSample (String filename){
try {
Properties properties = getDefaultUIProperties();
FileOutputStream fileOutputStream = new FileOutputStream(filename,false);
properties.store(fileOutputStream, "PC^2 GUI Plugins ");
fileOutputStream.close();
fileOutputStream = null;
} catch (Exception e) {
e.printStackTrace(System.err);
}
}
}
| [
"avanesjan.k@gmail.com"
] | avanesjan.k@gmail.com |
999dd8e8accb222dfe0aa617ee57fff4762a745a | 82a8f35c86c274cb23279314db60ab687d33a691 | /duokan/reader/ui/general/gg.java | 112f2123efd3f6e551bbeefe55de03ee78739033 | [] | no_license | QMSCount/DReader | 42363f6187b907dedde81ab3b9991523cbf2786d | c1537eed7091e32a5e2e52c79360606f622684bc | refs/heads/master | 2021-09-14T22:16:45.495176 | 2018-05-20T14:57:15 | 2018-05-20T14:57:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 956 | java | package com.duokan.reader.ui.general;
import android.content.Context;
import com.duokan.core.ui.ay;
public abstract class gg extends ay {
final /* synthetic */ PagesView d;
public gg(PagesView pagesView, Context context) {
this.d = pagesView;
super(context, null);
}
protected final void o() {
super.j();
}
protected final void p() {
super.i();
}
protected final void q() {
super.l();
}
protected final int a(int i) {
if (s(i)) {
return super.l(i);
}
return 0;
}
protected final int b(int i) {
if (s(i)) {
return super.m(i);
}
return 0;
}
protected final int d(int i) {
if (s(i)) {
return super.n(i);
}
return 0;
}
protected final int e(int i) {
if (s(i)) {
return super.o(i);
}
return 0;
}
}
| [
"lixiaohong@p2peye.com"
] | lixiaohong@p2peye.com |
c6b85810ee952d105a48f09f10e6aa03f04c3b5c | 838576cc2e44f590d4c59f8a4d120f629969eedf | /src/com/sino/ams/yj/constant/YJWebAttribute.java | 7bcae602e76c3241553ee6c6057e318a951481ea | [] | no_license | fancq/CQEAM | ecbfec8290fc4c213101b88365f7edd4b668fdc8 | 5dbb23cde5f062d96007f615ddae8fd474cb37d8 | refs/heads/master | 2021-01-16T20:33:40.983759 | 2013-09-03T16:00:57 | 2013-09-03T16:00:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 170 | java | package com.sino.ams.yj.constant;
public interface YJWebAttribute {
String ORG_OPTION="ORG_OPTION";
String COMVAN="COMVAN";
String RESOURCE="RESOURCE";
} | [
"lq_xm@163.com"
] | lq_xm@163.com |
3a32fc21bf08a7e7e7f4dc183f5e069652e47410 | 2e21c46206c053a4356fe2e2cca4f419c62c4ca1 | /xmodule-examples-security/xmodule-examples-security-oauth2/xmodule-examples-security-oauth2-authcode/xmodule-examples-security-oauth2-authcode-authorization-server/src/main/java/com/penglecode/xmodule/springsecurity/oauth2/config/OAuth2AuthorizationServerConfiguration.java | c01490e4293da7776933902f6f7735eb4326f335 | [
"Apache-2.0"
] | permissive | hikaru2025/xmodule | cc2d4a7da1a3f2c494566f7878bfb4e50b4c53a6 | 4b170e6e7c9ed83e9e7a3ad163f497a4d7205e8f | refs/heads/master | 2020-07-30T00:28:07.850263 | 2019-08-29T03:22:32 | 2019-08-29T03:22:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,007 | java | package com.penglecode.xmodule.springsecurity.oauth2.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.annotation.ObjectPostProcessor;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.oauth2.config.annotation.builders.InMemoryClientDetailsServiceBuilder;
import org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer;
import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer;
import org.springframework.security.oauth2.provider.client.ClientCredentialsTokenEndpointFilter;
import org.springframework.security.oauth2.provider.error.OAuth2AccessDeniedHandler;
import org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint;
import org.springframework.security.oauth2.provider.token.TokenStore;
import com.penglecode.xmodule.common.security.oauth2.CustomOAuth2ExceptionRenderer;
import com.penglecode.xmodule.common.security.oauth2.OAuth2Client;
import com.penglecode.xmodule.common.security.oauth2.OAuth2ServerConfigProperties;
import com.penglecode.xmodule.common.util.ArrayUtils;
import com.penglecode.xmodule.common.util.ReflectionUtils;
/**
* SpringSecurity-OAuth2认证授权服务器配置
*
* @author pengpeng
* @date 2019年2月13日 上午10:17:15
*/
@Configuration
@EnableAuthorizationServer
public class OAuth2AuthorizationServerConfiguration extends AuthorizationServerConfigurerAdapter {
@Autowired
private AuthenticationManager authenticationManager;
@Autowired
private UserDetailsService userDetailsService;
@Autowired
private PasswordEncoder passwordEncoder;
@Autowired
private TokenStore tokenStore;
@Autowired
private OAuth2ServerConfigProperties oauth2ServerConfig;
/**
* OAuth2认证授权异常渲染
* @return
*/
@Bean(name="oauth2ExceptionRenderer")
public CustomOAuth2ExceptionRenderer oauth2ExceptionRenderer() {
CustomOAuth2ExceptionRenderer oauth2ExceptionRenderer = new CustomOAuth2ExceptionRenderer();
oauth2ExceptionRenderer.setResponseContentType(MediaType.APPLICATION_JSON_UTF8);
return oauth2ExceptionRenderer;
}
/**
* 禁止访问处理
* @return
*/
@Bean(name="oauth2AccessDeniedHandler")
public OAuth2AccessDeniedHandler oauth2AccessDeniedHandler() {
OAuth2AccessDeniedHandler oauth2AccessDeniedHandler = new OAuth2AccessDeniedHandler();
oauth2AccessDeniedHandler.setExceptionRenderer(oauth2ExceptionRenderer());
return oauth2AccessDeniedHandler;
}
/**
* AuthorizationServerSecurityConfigurer:用来配置令牌端点(Token Endpoint)的安全约束.
*/
@Override
public void configure(AuthorizationServerSecurityConfigurer security) throws Exception {
security.addObjectPostProcessor(new ObjectPostProcessor<ClientCredentialsTokenEndpointFilter>() {
@Override
public <O extends ClientCredentialsTokenEndpointFilter> O postProcess(O object) {
OAuth2AuthenticationEntryPoint authenticationEntryPoint = ReflectionUtils.getFieldValue(object, "authenticationEntryPoint");
authenticationEntryPoint.setExceptionRenderer(oauth2ExceptionRenderer());
return object;
}
});
security.checkTokenAccess("isAuthenticated()") //允许在basic认证通过的情况下检测token。默认denyAll(),在ResourceServer启用RemoteTokenServices来检测token时需要放开
.tokenKeyAccess("permitAll()")
.allowFormAuthenticationForClients() //允许表单登录
.accessDeniedHandler(oauth2AccessDeniedHandler());
}
protected ClientCredentialsTokenEndpointFilter process(ClientCredentialsTokenEndpointFilter object) {
return object;
}
/**
* ClientDetailsServiceConfigurer:用来配置客户端详情服务(ClientDetailsService),客户端详情信息在这里进行初始化,
* 你能够把客户端详情信息写死在这里或者是通过数据库来存储调取详情信息。
*/
@Override
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
InMemoryClientDetailsServiceBuilder build = clients.inMemory();
if(!ArrayUtils.isEmpty(oauth2ServerConfig.getClients())) {
for(OAuth2Client client : oauth2ServerConfig.getClients()) {
build.withClient(client.getClientId())
.secret(passwordEncoder.encode(client.getClientSecret()))
.accessTokenValiditySeconds(client.getAccessTokenValiditySeconds())
.refreshTokenValiditySeconds(client.getRefreshTokenValiditySeconds())
.redirectUris(client.getRedirectUrl())
.authorizedGrantTypes(client.getAuthorizedGrantTypes())
.scopes(client.getScope())
.resourceIds(client.getResourceIds());
}
}
}
/**
* AuthorizationServerEndpointsConfigurer:用来配置授权(authorization)以及令牌(token)的访问端点和令牌服务(token services)。
*/
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
endpoints.tokenStore(tokenStore)
.authenticationManager(authenticationManager)
.userDetailsService(userDetailsService);
}
}
| [
"pengp@certusnet.com.cn"
] | pengp@certusnet.com.cn |
af5db8df065adcd8b1f2708f422854b2827d103e | b97bc0706448623a59a7f11d07e4a151173b7378 | /src/main/java/radian/web/servlets/fedco/FedcoPrintScreen.java | 426b39efe05520743bd1ff7fbafbaa9dbdc7b73d | [] | no_license | zafrul-ust/tcmISDev | 576a93e2cbb35a8ffd275fdbdd73c1f9161040b5 | 71418732e5465bb52a0079c7e7e7cec423a1d3ed | refs/heads/master | 2022-12-21T15:46:19.801950 | 2020-02-07T21:22:50 | 2020-02-07T21:22:50 | 241,601,201 | 0 | 0 | null | 2022-12-13T19:29:34 | 2020-02-19T11:08:43 | Java | UTF-8 | Java | false | false | 2,094 | java | package radian.web.servlets.fedco;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.SingleThreadModel;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import radian.tcmis.server7.client.ray.dbObjs.RayTcmISDBModel;
import radian.tcmis.server7.share.helpers.ServerResourceBundle;
import radian.web.erw.printScreen.SPrintScreen;
public class FedcoPrintScreen extends HttpServlet implements SingleThreadModel
{
public void init(ServletConfig config) throws ServletException
{
super.init(config);
}
/**
* HTTP POST handler.
*
* @param request An object implementing the request context
* @param response An object implementing the response context
* @exception ServletException A wrapper for all exceptions thrown by the
* servlet.
*/
public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException
{
response.setContentType("text/html");
RayTcmISDBModel db = null;
SPrintScreen obj = null;
try
{
db = new RayTcmISDBModel("Fedco");
if (db == null)
{
PrintWriter out2 = response.getWriter();
out2.println("Starting DB");
out2.println("DB is null");
out2.close();
return;
}
obj=new SPrintScreen( ( ServerResourceBundle )new FedcoServerResourceBundle(),db );
obj.doResult( request,response );
}
catch (Exception e)
{
e.printStackTrace();
return;
}
finally
{
db.close();
obj = null;
return;
}
}
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
doPost(request,response);
}
}
| [
"julio.rivero@wescoair.com"
] | julio.rivero@wescoair.com |
e61640da2011956ae78e72262119e577ca508a70 | ca030864a3a1c24be6b9d1802c2353da4ca0d441 | /classes10.dex_source_from_JADX/com/facebook/orca/notify/ContactsUploadNotification.java | 3563c43b931f8228a8be633dfb4945f250218e0b | [] | no_license | pxson001/facebook-app | 87aa51e29195eeaae69adeb30219547f83a5b7b1 | 640630f078980f9818049625ebc42569c67c69f7 | refs/heads/master | 2020-04-07T20:36:45.758523 | 2018-03-07T09:04:57 | 2018-03-07T09:04:57 | 124,208,458 | 4 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,770 | java | package com.facebook.orca.notify;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.facebook.common.parcels.ParcelUtil;
import com.facebook.messaging.notify.MessagingNotification;
import com.facebook.messaging.notify.MessagingNotification.Type;
/* compiled from: notPausedTransferIds */
public class ContactsUploadNotification extends MessagingNotification {
public static final Creator<ContactsUploadNotification> CREATOR = new C09481();
public final String f6183a;
public final String f6184b;
public final String f6185c;
public boolean f6186d;
/* compiled from: notPausedTransferIds */
final class C09481 implements Creator<ContactsUploadNotification> {
C09481() {
}
public final Object createFromParcel(Parcel parcel) {
return new ContactsUploadNotification(parcel);
}
public final Object[] newArray(int i) {
return new ContactsUploadNotification[i];
}
}
public ContactsUploadNotification(String str, String str2, String str3) {
super(Type.CONTACTS_UPLOAD);
this.f6183a = str;
this.f6184b = str2;
this.f6185c = str3;
}
public ContactsUploadNotification(Parcel parcel) {
super(parcel);
this.f6183a = parcel.readString();
this.f6184b = parcel.readString();
this.f6185c = parcel.readString();
this.f6186d = ParcelUtil.a(parcel);
}
public int describeContents() {
return 0;
}
public void writeToParcel(Parcel parcel, int i) {
super.a(parcel);
parcel.writeString(this.f6183a);
parcel.writeString(this.f6184b);
parcel.writeString(this.f6185c);
ParcelUtil.a(parcel, this.f6186d);
}
}
| [
"son.pham@jmango360.com"
] | son.pham@jmango360.com |
d37d3099ccc6af44540315c40bf50c860179ee5a | f0d25d83176909b18b9989e6fe34c414590c3599 | /app/src/main/java/com/google/android/gms/auth/api/proxy/zzb.java | 415b5866cf072eb64010ce9f4c7821987a222fe9 | [] | no_license | lycfr/lq | e8dd702263e6565486bea92f05cd93e45ef8defc | 123914e7c0d45956184dc908e87f63870e46aa2e | refs/heads/master | 2022-04-07T18:16:31.660038 | 2020-02-23T03:09:18 | 2020-02-23T03:09:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,092 | java | package com.google.android.gms.auth.api.proxy;
import android.app.PendingIntent;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
public final class zzb implements Parcelable.Creator<ProxyResponse> {
public final /* synthetic */ Object createFromParcel(Parcel parcel) {
int zzd = com.google.android.gms.common.internal.safeparcel.zzb.zzd(parcel);
byte[] bArr = null;
Bundle bundle = null;
int i = 0;
PendingIntent pendingIntent = null;
int i2 = 0;
int i3 = 0;
while (parcel.dataPosition() < zzd) {
int readInt = parcel.readInt();
switch (65535 & readInt) {
case 1:
i2 = com.google.android.gms.common.internal.safeparcel.zzb.zzg(parcel, readInt);
break;
case 2:
pendingIntent = (PendingIntent) com.google.android.gms.common.internal.safeparcel.zzb.zza(parcel, readInt, PendingIntent.CREATOR);
break;
case 3:
i = com.google.android.gms.common.internal.safeparcel.zzb.zzg(parcel, readInt);
break;
case 4:
bundle = com.google.android.gms.common.internal.safeparcel.zzb.zzs(parcel, readInt);
break;
case 5:
bArr = com.google.android.gms.common.internal.safeparcel.zzb.zzt(parcel, readInt);
break;
case 1000:
i3 = com.google.android.gms.common.internal.safeparcel.zzb.zzg(parcel, readInt);
break;
default:
com.google.android.gms.common.internal.safeparcel.zzb.zzb(parcel, readInt);
break;
}
}
com.google.android.gms.common.internal.safeparcel.zzb.zzF(parcel, zzd);
return new ProxyResponse(i3, i2, pendingIntent, i, bundle, bArr);
}
public final /* synthetic */ Object[] newArray(int i) {
return new ProxyResponse[i];
}
}
| [
"quyenlm.vn@gmail.com"
] | quyenlm.vn@gmail.com |
30fe5568615e272c170a70c8696c6c85e00337ed | 513fc8eebfc93e9cb27f75ed4e363eb3fd3170b5 | /java_example/src/java_example_180531/ch8_05_PDA.java | 2596821481e876d60f117433ae22b5b705500b2f | [] | no_license | seongjunLee96/test180529 | a4181e3733f11c609a23adb6df23b30e1398fab5 | f16746a5de6325282f5e4166b74d2dfb566a130e | refs/heads/master | 2020-03-18T20:59:10.178551 | 2018-06-03T23:57:18 | 2018-06-03T23:57:18 | 135,251,041 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 242 | java | package java_example_180531;
public class ch8_05_PDA {
//덧셈 계산
int a;
int b;
int c;
public void add(int a, int b) {
this.a = a;
this.b = b;
c = a + b;
System.out.println(a + " + " + b +" = " + c);
}
}
| [
"user@user-PC"
] | user@user-PC |
5752d21bb763be76b98e0601dadcb48751a1f41a | 883b7801d828a0994cae7367a7097000f2d2e06a | /python/experiments/projects/seedstack-seed/real_error_dataset/1/287/StreamMessageBodyReader.java | 72cdccfcd91a6fd5238816310f1acb0892e4b1df | [] | no_license | pombredanne/styler | 9c423917619912789289fe2f8982d9c0b331654b | f3d752d2785c2ab76bacbe5793bd8306ac7961a1 | refs/heads/master | 2023-07-08T05:55:18.284539 | 2020-11-06T05:09:47 | 2020-11-06T05:09:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,202 | java | /*
* Copyright © 2013-2020, The SeedStack authors <http://seedstack.org>
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
package org.seedstack.seed.rest.internal;
import static com.google.inject.util.Types.newParameterizedType;
import java.io.IOException;
import java.io.InputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
import java.util.stream.Stream;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyReader;
import javax.ws.rs.ext.Provider;
import javax.ws.rs.ext.Providers;
@Provider
class StreamMessageBodyReader<T> implements MessageBodyReader<Stream<T>> {
private static final ParameterizedType GENERIC_TYPE = newParameterizedType(
List.class,
Object.class
);
@Context
private Providers providers;
@Override
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
return Stream.class.isAssignableFrom(type);
}
@Override
@SuppressWarnings("unchecked")
public Stream<T> readFrom(Class<Stream<T>> type, Type genericType, Annotation[] annotations, MediaType mediaType,
MultivaluedMap<String, String> httpHeaders,
InputStream entityStream) throws IOException, WebApplicationException {
// If we don't use an intermediate list, the underlying stream gets closed before we
// get the chance to read the stream. Maybe this can be fixed/improved.
return providers.getMessageBodyReader(List.class,
GENERIC_TYPE,
annotations,
mediaType)
.readFrom(List.class,
GENERIC_TYPE,
annotations,
mediaType,
httpHeaders,
entityStream).stream();
}
}
| [
"fer.madeiral@gmail.com"
] | fer.madeiral@gmail.com |
7f63ef20ba9aff3751ed6487936d6eebbd4681e5 | d98c78ba919c70399bf8802bd4ff7d7b6a5279fe | /jmist-core/src/main/java/ca/eandb/jmist/framework/Photon.java | bc80fc9f4eaab3f85ac9aff0ffbc1952560e5c93 | [
"MIT"
] | permissive | bwkimmel/jmist | 4096f8d63321d7886ccaab1255eb772d0c1bb73d | 092654f4f4522d9c763d2f58aa770a8e134313d0 | refs/heads/master | 2023-06-11T17:29:51.509162 | 2022-02-17T20:44:59 | 2022-02-17T20:44:59 | 23,644,253 | 10 | 2 | MIT | 2022-02-17T20:45:00 | 2014-09-04T01:34:59 | Java | UTF-8 | Java | false | false | 2,854 | java | /**
* Java Modular Image Synthesis Toolkit (JMIST)
* Copyright (C) 2018 Bradley W. Kimmel
*
* 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 ca.eandb.jmist.framework;
import ca.eandb.jmist.framework.color.Color;
import ca.eandb.jmist.math.Point3;
import ca.eandb.jmist.math.Ray3;
import ca.eandb.jmist.math.Vector3;
/**
* A <code>Ray3</code> with an associated <code>Color</code>.
* @author Brad Kimmel
*/
public final class Photon {
/** The <code>Ray3</code>. */
private final Ray3 ray;
/** The <code>Color</code>. */
private final Color power;
/**
* Creates a <code>Photon</code>.
* @param ray The <code>Ray3</code>.
* @param power The <code>Color</code>.
*/
public Photon(Ray3 ray, Color power) {
this.ray = ray;
this.power = power;
}
/**
* Creates a <code>Photon</code>.
* @param position The <code>Point3</code> at the origin of the ray.
* @param direction The <code>Vector3</code> indicating the direction of
* the ray.
* @param power The <code>Color</code>.
*/
public Photon(Point3 position, Vector3 direction, Color power) {
this(new Ray3(position, direction), power);
}
/**
* The <code>Ray3</code>.
* @return The <code>Ray3</code>.
*/
public Ray3 ray() {
return ray;
}
/**
* The <code>Color</code>.
* @return The <code>Color</code>.
*/
public Color power() {
return power;
}
/**
* The <code>Point3</code> at the origin of the ray.
* @return The <code>Point3</code> at the origin of the ray.
*/
public Point3 position() {
return ray.origin();
}
/**
* The <code>Vector3</code>indicating the direction of the ray.
* @return The <code>Vector3</code>indicating the direction of the ray.
*/
public Vector3 direction() {
return ray.direction();
}
}
| [
"intrepidca@gmail.com"
] | intrepidca@gmail.com |
519f2af7abe71134a7bb94b3ee486813ba575006 | 6392035b0421990479baf09a3bc4ca6bcc431e6e | /projects/spring-data-jpa-36d1b071/curr/src/test/java/org/springframework/data/jpa/repository/support/SoftDeleteIntegrationTests.java | 08b1ad07297ee8d22fddf05783ef7002c4bd41b3 | [] | no_license | ameyaKetkar/RMinerEvaluationTools | 4975130072bf1d4940f9aeb6583eba07d5fedd0a | 6102a69d1b78ae44c59d71168fc7569ac1ccb768 | refs/heads/master | 2020-09-26T00:18:38.389310 | 2020-05-28T17:34:39 | 2020-05-28T17:34:39 | 226,119,387 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,100 | java | /*
* Copyright 2013 the original author or authors.
*
* 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.springframework.data.jpa.repository.support;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.data.jpa.domain.sample.QUser;
import org.springframework.data.jpa.domain.sample.User;
import org.springframework.data.jpa.repository.augment.JpaSoftDeleteQueryAugmentor;
import org.springframework.data.jpa.repository.augment.QueryDslSoftDeleteQueryAugmentor;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.SoftDelete;
import org.springframework.data.repository.SoftDelete.FlagMode;
import org.springframework.data.repository.augment.QueryAugmentor;
import org.springframework.data.repository.augment.QueryContext;
import org.springframework.data.repository.augment.UpdateContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;
import com.mysema.query.types.Predicate;
/**
* @author Oliver Gierke
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:infrastructure.xml")
@Transactional
public class SoftDeleteIntegrationTests {
@PersistenceContext EntityManager em;
SoftUserRepository softRepository;
SpecialUserRepository repository;
@Before
public void setUp() {
JpaRepositoryFactory factory = new JpaRepositoryFactory(em);
JpaSoftDeleteQueryAugmentor jpaAugmentor = new JpaSoftDeleteQueryAugmentor();
QueryDslSoftDeleteQueryAugmentor queryDslAugmentor = new QueryDslSoftDeleteQueryAugmentor();
List<QueryAugmentor<? extends QueryContext<?>, ? extends QueryContext<?>, ? extends UpdateContext<?>>> augmentors = //
new ArrayList<QueryAugmentor<? extends QueryContext<?>, ? extends QueryContext<?>, ? extends UpdateContext<?>>>();
augmentors.add(jpaAugmentor);
augmentors.add(queryDslAugmentor);
factory.setQueryAugmentors(augmentors);
softRepository = factory.getRepository(SoftUserRepository.class);
repository = factory.getRepository(SpecialUserRepository.class);
}
@Test
public void basicSaveAndDelete() {
User user = new User("Foo", "Bar", "foo@bar.de");
user = softRepository.save(user);
assertThat(repository.findAll(), hasItem(user));
assertThat(softRepository.findAll(), hasItem(user));
softRepository.delete(user);
assertThat(softRepository.findAll(), is(emptyIterable()));
assertThat(softRepository.count(), is(0L));
assertThat(softRepository.findOne(user.getId()), is(nullValue()));
assertThat(repository.count(), is(1L));
assertThat(repository.findAll(), hasItem(user));
assertThat(repository.findOne(user.getId()), is(notNullValue()));
Predicate predicate = QUser.user.firstname.eq("Foo");
assertThat(softRepository.findAll(predicate), is(emptyIterable()));
assertThat(softRepository.count(predicate), is(0L));
assertThat(softRepository.findOne(predicate), is(nullValue()));
assertThat(repository.count(predicate), is(1L));
assertThat(repository.findAll(predicate), hasItem(user));
assertThat(repository.findOne(predicate), is(notNullValue()));
}
@Test
public void basicSaveAndDeleteWithQueryDslPredicate() {
User user = new User("Tony", "Stark", "tony@stark.com");
user = softRepository.save(user);
assertThat(repository.findAll(), hasItem(user));
assertThat(softRepository.findAll(), hasItem(user));
softRepository.delete(user);
Predicate predicate = QUser.user.firstname.eq("Tony");
assertThat(softRepository.findAll(predicate), is(emptyIterable()));
assertThat(softRepository.count(predicate), is(0L));
assertThat(softRepository.findOne(predicate), is(nullValue()));
assertThat(repository.count(predicate), is(1L));
assertThat(repository.findAll(predicate), hasItem(user));
assertThat(repository.findOne(predicate), is(notNullValue()));
}
@SoftDelete(value = "active", flagMode = FlagMode.ACTIVE)
interface SoftUserRepository extends CrudRepository<User, Integer>, QueryDslPredicateExecutor<User> {
List<User> findByLastname();
}
interface SpecialUserRepository extends CrudRepository<User, Integer>, QueryDslPredicateExecutor<User> {
List<User> findAll();
}
}
| [
"ask1604@gmail.com"
] | ask1604@gmail.com |
d034183efc8fb354a7a0d2d7692c70a8597b0d8d | 9254e7279570ac8ef687c416a79bb472146e9b35 | /scdn-20171115/src/main/java/com/aliyun/scdn20171115/models/UpdateScdnDomainRequest.java | 72cc4ce0a6c3c89ec11194c30c1738103e02ee3d | [
"Apache-2.0"
] | permissive | lquterqtd/alibabacloud-java-sdk | 3eaa17276dd28004dae6f87e763e13eb90c30032 | 3e5dca8c36398469e10cdaaa34c314ae0bb640b4 | refs/heads/master | 2023-08-12T13:56:26.379027 | 2021-10-19T07:22:15 | 2021-10-19T07:22:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,756 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.scdn20171115.models;
import com.aliyun.tea.*;
public class UpdateScdnDomainRequest extends TeaModel {
@NameInMap("OwnerId")
public Long ownerId;
@NameInMap("SecurityToken")
public String securityToken;
@NameInMap("DomainName")
public String domainName;
@NameInMap("Sources")
public String sources;
@NameInMap("ResourceGroupId")
public String resourceGroupId;
public static UpdateScdnDomainRequest build(java.util.Map<String, ?> map) throws Exception {
UpdateScdnDomainRequest self = new UpdateScdnDomainRequest();
return TeaModel.build(map, self);
}
public UpdateScdnDomainRequest setOwnerId(Long ownerId) {
this.ownerId = ownerId;
return this;
}
public Long getOwnerId() {
return this.ownerId;
}
public UpdateScdnDomainRequest setSecurityToken(String securityToken) {
this.securityToken = securityToken;
return this;
}
public String getSecurityToken() {
return this.securityToken;
}
public UpdateScdnDomainRequest setDomainName(String domainName) {
this.domainName = domainName;
return this;
}
public String getDomainName() {
return this.domainName;
}
public UpdateScdnDomainRequest setSources(String sources) {
this.sources = sources;
return this;
}
public String getSources() {
return this.sources;
}
public UpdateScdnDomainRequest setResourceGroupId(String resourceGroupId) {
this.resourceGroupId = resourceGroupId;
return this;
}
public String getResourceGroupId() {
return this.resourceGroupId;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
f255d7232ec42e0972499295df3568105fc167e9 | 7d67b8f964cda743e55a87044892886b2dba3d27 | /src/main/java/com/siemens/dl/supply/config/DatabaseConfiguration.java | 048a36f40a9cf93eb1090b2337418cdcb92a83c8 | [] | no_license | chenyouzhen/goods-supply | a32be7d9e02d5b42556ca706b69a6851fe468e88 | 7072c36fb3a6cb517137ac3385969c993b24069f | refs/heads/master | 2021-01-26T09:20:47.324112 | 2020-02-27T01:24:15 | 2020-02-27T01:24:15 | 243,402,302 | 0 | 0 | null | 2020-02-27T01:24:16 | 2020-02-27T01:20:57 | Java | UTF-8 | Java | false | false | 788 | java | package com.siemens.dl.supply.config;
import io.github.jhipster.config.JHipsterConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration
@EnableJpaRepositories("com.siemens.dl.supply.repository")
@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware")
@EnableTransactionManagement
public class DatabaseConfiguration {
private final Logger log = LoggerFactory.getLogger(DatabaseConfiguration.class);
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
4d9402607531df960f707ee904e45ad5c970ebc6 | 2256e4ad6fcb35d6e84ee610a6b11df0e4122ccd | /src/java/com/viettel/im/client/form/FineItemForm.java | 8b2640e14b325982ecfbd6371e70cd0302e5d164 | [] | no_license | tuanns/bccs_sm | cd9ae4da6dc410e4c71909b21c2ae1cf35864fc2 | 60476a905db7d4e7422061423fe93f7713eebf9c | refs/heads/master | 2022-06-21T05:52:49.165156 | 2020-05-06T19:02:56 | 2020-05-06T19:02:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,692 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.viettel.im.client.form;
import com.viettel.im.database.BO.FineItems;
import org.apache.struts.action.ActionForm;
/**
*
* @author TheTM
*/
public class FineItemForm extends ActionForm {
private Long fineItemsId;
private String fineItemsName;
private Long status;
private String description;
private Long telecomServiceId;
private String telecomServiceName;
private Boolean checkStatus;
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Long getFineItemsId() {
return fineItemsId;
}
public void setFineItemsId(Long fineItemsId) {
this.fineItemsId = fineItemsId;
}
public String getFineItemsName() {
return fineItemsName;
}
public void setFineItemsName(String fineItemsName) {
this.fineItemsName = fineItemsName;
}
public Long getStatus() {
return status;
}
public void setStatus(Long status) {
this.status = status;
}
public Long getTelecomServiceId() {
return telecomServiceId;
}
public void setTelecomServiceId(Long telecomServiceId) {
this.telecomServiceId = telecomServiceId;
}
public String getTelecomServiceName() {
return telecomServiceName;
}
public void setTelecomServiceName(String telecomServiceName) {
this.telecomServiceName = telecomServiceName;
}
public Boolean getCheckStatus() {
return checkStatus;
}
public void setCheckStatus(Boolean checkStatus) {
this.checkStatus = checkStatus;
}
public void copyDataFromBO(FineItems fineItems) {
this.setFineItemsId(fineItems.getFineItemsId());
this.setFineItemsName(fineItems.getFineItemsName());
this.setDescription(fineItems.getDescription());
this.setStatus(fineItems.getStatus());
this.setTelecomServiceId(fineItems.getTelecomServiceId());
}
public void copyDataToBO(FineItems fineItems) {
fineItems.setFineItemsId(this.getFineItemsId());
fineItems.setFineItemsName(this.getFineItemsName());
fineItems.setStatus(this.getStatus());
fineItems.setDescription(this.getDescription());
fineItems.setTelecomServiceId(this.getTelecomServiceId());
}
public void resetForm() {
this.setFineItemsId(0L);
this.setFineItemsName("");
this.setStatus(null);
this.setDescription("");
this.setTelecomServiceId(0L);
}
}
| [
"xuanbac1611@gmail.com"
] | xuanbac1611@gmail.com |
935e8bf55255a6a1070f7a329f4f4bf98b7e1526 | 58f239a9aebd8992ac3cd4adde855d407460f1f5 | /lds-service/src/main/java/com/weweibuy/lds/op/core/OpLogConvertModule.java | 00aea8c6570dfea43c3f0d1a987cdb7ab29d99b5 | [] | no_license | weweibuy/lds | 7f6fb3cb93da5928a5d545e3374fc2c634e946af | 336bd540f5d4f3b4d7625a5e26d470a9c4a7b88b | refs/heads/master | 2023-07-29T09:58:29.462613 | 2021-09-13T05:40:43 | 2021-09-13T05:40:43 | 402,376,313 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 789 | java | package com.weweibuy.lds.op.core;
import com.weweibuy.lds.iop.LogParam;
import com.weweibuy.lds.iop.OpLog;
import com.weweibuy.lds.op.model.vo.ModuleInfo;
/**
* 操作日志转化模块
*
* @author durenhao
* @date 2021/9/2 21:41
**/
public interface OpLogConvertModule {
/**
* 转化
*
* @param logParam
* @return
*/
OpLog convert(LogParam logParam);
/**
* 模块信息
*
* @return
*/
ModuleInfo moduleInfo();
/**
* 初始化模块
*
* @throws Exception
*/
void init() throws Exception;
/**
* 销毁方法
*
* @throws Exception
*/
void destroy() throws Exception;
/**
* 获取资源
*
* @return
*/
ModuleResource getResource();
}
| [
"ak514250@126.com"
] | ak514250@126.com |
12a917a80032f09beb70e8f9bef9c308d7e79d63 | 06e0e3a3844e6a6e8ade4a2f8785befb39a8faf8 | /src/main/java/com/amazon/opendistroforelasticsearch/sql/expression/window/ranking/RowNumberFunction.java | e11d071ffc774fc18d9d4a16b383f58ca96b8730 | [
"Apache-2.0"
] | permissive | YANG-DB/sql-open-distro | 09505abbe72ef8e71e9c860b5817dadda85d33d2 | fb4ff5a35b6c04f33df03d5a460505f83e8ac05c | refs/heads/main | 2023-01-09T13:29:11.148593 | 2020-11-13T23:02:52 | 2020-11-13T23:02:52 | 310,531,657 | 2 | 1 | Apache-2.0 | 2020-11-06T08:06:34 | 2020-11-06T08:06:25 | null | UTF-8 | Java | false | false | 1,287 | java | /*
* Copyright 2020 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://www.apache.org/licenses/LICENSE-2.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.amazon.opendistroforelasticsearch.sql.expression.window.ranking;
import com.amazon.opendistroforelasticsearch.sql.expression.function.BuiltinFunctionName;
import com.amazon.opendistroforelasticsearch.sql.expression.window.CumulativeWindowFrame;
/**
* Row number window function that assigns row number starting from 1 to each row in a partition.
*/
public class RowNumberFunction extends RankingWindowFunction {
public RowNumberFunction() {
super(BuiltinFunctionName.ROW_NUMBER.getName());
}
@Override
protected int rank(CumulativeWindowFrame frame) {
if (frame.isNewPartition()) {
rank = 1;
}
return rank++;
}
}
| [
"yang.db.dev@gmail.com"
] | yang.db.dev@gmail.com |
467f7d825b14178be0f3a270506a20dca23d77e7 | 208ba847cec642cdf7b77cff26bdc4f30a97e795 | /di/dh/src/main/java/org.wp.dh/ui/reader/actions/ReaderCommentActions.java | cb779c74b26885f097f2a28e7efa2b6d5247489e | [] | no_license | kageiit/perf-android-large | ec7c291de9cde2f813ed6573f706a8593be7ac88 | 2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8 | refs/heads/master | 2021-01-12T14:00:19.468063 | 2016-09-27T13:10:42 | 2016-09-27T13:10:42 | 69,685,305 | 0 | 0 | null | 2016-09-30T16:59:49 | 2016-09-30T16:59:48 | null | UTF-8 | Java | false | false | 7,648 | java | package org.wp.dh.ui.reader.actions;
import android.text.TextUtils;
import com.android.volley.VolleyError;
import com.wordpress.rest.RestRequest;
import org.json.JSONObject;
import org.wp.dh.WordPress;
import org.wp.dh.datasets.ReaderCommentTable;
import org.wp.dh.datasets.ReaderLikeTable;
import org.wp.dh.datasets.ReaderUserTable;
import org.wp.dh.models.ReaderComment;
import org.wp.dh.models.ReaderPost;
import org.wp.dh.models.ReaderUser;
import org.wp.dh.util.AppLog;
import org.wp.dh.util.AppLog.T;
import org.wp.dh.util.DateTimeUtils;
import org.wp.dh.util.JSONUtils;
import org.wp.dh.util.VolleyUtils;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class ReaderCommentActions {
/*
* used by post detail to generate a temporary "fake" comment id (see below)
*/
public static long generateFakeCommentId() {
return System.currentTimeMillis();
}
/*
* add the passed comment text to the passed post - caller must pass a unique "fake" comment id
* to give the comment that's generated locally
*/
public static ReaderComment submitPostComment(final ReaderPost post,
final long fakeCommentId,
final String commentText,
final long replyToCommentId,
final ReaderActions.CommentActionListener actionListener) {
if (post == null || TextUtils.isEmpty(commentText)) {
return null;
}
// determine which page this new comment should be assigned to
final int pageNumber;
if (replyToCommentId != 0) {
pageNumber = ReaderCommentTable.getPageNumberForComment(post.blogId, post.postId, replyToCommentId);
} else {
pageNumber = ReaderCommentTable.getLastPageNumberForPost(post.blogId, post.postId);
}
// create a "fake" comment that's added to the db so it can be shown right away - will be
// replaced with actual comment if it succeeds to be posted, or deleted if comment fails
// to be posted
ReaderComment newComment = new ReaderComment();
newComment.commentId = fakeCommentId;
newComment.postId = post.postId;
newComment.blogId = post.blogId;
newComment.parentId = replyToCommentId;
newComment.pageNumber = pageNumber;
newComment.setText(commentText);
Date dtPublished = DateTimeUtils.nowUTC();
newComment.setPublished(DateTimeUtils.javaDateToIso8601(dtPublished));
newComment.timestamp = dtPublished.getTime();
ReaderUser currentUser = ReaderUserTable.getCurrentUser();
if (currentUser != null) {
newComment.setAuthorAvatar(currentUser.getAvatarUrl());
newComment.setAuthorName(currentUser.getDisplayName());
}
ReaderCommentTable.addOrUpdateComment(newComment);
// different endpoint depending on whether the new comment is a reply to another comment
final String path;
if (replyToCommentId == 0) {
path = "sites/" + post.blogId + "/posts/" + post.postId + "/replies/new";
} else {
path = "sites/" + post.blogId + "/comments/" + Long.toString(replyToCommentId) + "/replies/new";
}
Map<String, String> params = new HashMap<>();
params.put("content", commentText);
RestRequest.Listener listener = new RestRequest.Listener() {
@Override
public void onResponse(JSONObject jsonObject) {
ReaderCommentTable.deleteComment(post, fakeCommentId);
AppLog.i(T.READER, "comment succeeded");
ReaderComment newComment = ReaderComment.fromJson(jsonObject, post.blogId);
newComment.pageNumber = pageNumber;
ReaderCommentTable.addOrUpdateComment(newComment);
if (actionListener != null) {
actionListener.onActionResult(true, newComment);
}
}
};
RestRequest.ErrorListener errorListener = new RestRequest.ErrorListener() {
@Override
public void onErrorResponse(VolleyError volleyError) {
ReaderCommentTable.deleteComment(post, fakeCommentId);
AppLog.w(T.READER, "comment failed");
AppLog.e(T.READER, volleyError);
if (actionListener != null) {
actionListener.onActionResult(false, null);
}
}
};
AppLog.i(T.READER, "submitting comment");
WordPress.getRestClientUtilsV1_1().post(path, params, null, listener, errorListener);
return newComment;
}
/*
* like or unlike the passed comment
*/
public static boolean performLikeAction(final ReaderComment comment, boolean isAskingToLike) {
if (comment == null) {
return false;
}
// make sure like status is changing
boolean isCurrentlyLiked = ReaderCommentTable.isCommentLikedByCurrentUser(comment);
if (isCurrentlyLiked == isAskingToLike) {
AppLog.w(T.READER, "comment like unchanged");
return false;
}
// update like status and like count in local db
int newNumLikes = (isAskingToLike ? comment.numLikes + 1 : comment.numLikes - 1);
ReaderCommentTable.setLikesForComment(comment, newNumLikes, isAskingToLike);
ReaderLikeTable.setCurrentUserLikesComment(comment, isAskingToLike);
// sites/$site/comments/$comment_ID/likes/new
final String actionName = isAskingToLike ? "like" : "unlike";
String path = "sites/" + comment.blogId + "/comments/" + comment.commentId + "/likes/";
if (isAskingToLike) {
path += "new";
} else {
path += "mine/delete";
}
RestRequest.Listener listener = new RestRequest.Listener() {
@Override
public void onResponse(JSONObject jsonObject) {
boolean success = (jsonObject != null && JSONUtils.getBool(jsonObject, "success"));
if (success) {
AppLog.d(T.READER, String.format("comment %s succeeded", actionName));
} else {
AppLog.w(T.READER, String.format("comment %s failed", actionName));
ReaderCommentTable.setLikesForComment(comment, comment.numLikes, comment.isLikedByCurrentUser);
ReaderLikeTable.setCurrentUserLikesComment(comment, comment.isLikedByCurrentUser);
}
}
};
RestRequest.ErrorListener errorListener = new RestRequest.ErrorListener() {
@Override
public void onErrorResponse(VolleyError volleyError) {
String error = VolleyUtils.errStringFromVolleyError(volleyError);
if (TextUtils.isEmpty(error)) {
AppLog.w(T.READER, String.format("comment %s failed", actionName));
} else {
AppLog.w(T.READER, String.format("comment %s failed (%s)", actionName, error));
}
AppLog.e(T.READER, volleyError);
ReaderCommentTable.setLikesForComment(comment, comment.numLikes, comment.isLikedByCurrentUser);
ReaderLikeTable.setCurrentUserLikesComment(comment, comment.isLikedByCurrentUser);
}
};
WordPress.getRestClientUtilsV1_1().post(path, listener, errorListener);
return true;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
179144bea96676aec9da304989f069e8891442e1 | acb7217f9eb7c4be1586cd3bff4c4f177b79321a | /gotopXmzh/src/com/fr/function/ParamLongStr.java | e1e77e37cee5b2977e92546428005e62d429ef83 | [] | no_license | 2416879170/XMpro | 4f4650eff3428c12edfd9ade5eb8b7af0b375904 | 676dbcbf05ba25e7b49e623c0ebd3998b3f11535 | refs/heads/master | 2020-06-25T22:03:53.991120 | 2017-07-12T10:11:40 | 2017-07-12T10:11:40 | 94,502,163 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 644 | java | package com.fr.function;
import java.util.HashMap;
import java.util.Map;
import com.fr.script.AbstractFunction;
public class ParamLongStr extends AbstractFunction{
private static Map<String,String> mess = new HashMap<String,String>();
@Override
public Object run(Object[] arg0) {
if(arg0.length<1 || arg0[0]==null){
return "";
}
String key = String.valueOf(arg0[0]);
String value = mess.get(key);
mess.remove(key);
return value;
}
public static void setKeyValue(String key,String value){
mess.put(key, value);
}
}
| [
"2416879170@qq.com"
] | 2416879170@qq.com |
6b769bb2ff700c7568a3285fff340615390e9943 | 778da6dbb2eb27ace541338d0051f44353c3f924 | /src/main/java/com/espertech/esper/epl/metric/MetricEventRouter.java | 6f85495487a3677c611904a9395b07398d59d118 | [] | no_license | jiji87432/ThreadForEsperAndBenchmark | daf7188fb142f707f9160173d48c2754e1260ec7 | fd2fc3579b3dd4efa18e079ce80d3aee98bf7314 | refs/heads/master | 2021-12-12T02:15:18.810190 | 2016-12-01T12:15:01 | 2016-12-01T12:15:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,074 | java | /**************************************************************************************
* Copyright (C) 2006-2015 EsperTech Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
**************************************************************************************/
package com.espertech.esper.epl.metric;
import com.espertech.esper.client.metric.MetricEvent;
/**
* Interface for routing metric events for processing.
*/
public interface MetricEventRouter
{
/**
* Process metric event.
* @param metricEvent metric event to process
*/
public void route(MetricEvent metricEvent);
}
| [
"qinjie2012@163.com"
] | qinjie2012@163.com |
a7d7cd246aa8c916517309f089f84f12aaca6bb4 | cdf97f33eaeaf2668c3b459b0beed2d684a8653a | /dac/backend/src/test/java/com/dremio/dac/api/TestClusterStatsResource.java | 9a7f7f565256c2dd58ed0b2b6b033bcab556be72 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | gs80140/dremio-oss | 43916d6f668f6f077c6f7bc4e60bcfc4b8ff228a | e8eaa9f44b5ba7c556daf697e59fb5e7cd22b224 | refs/heads/master | 2020-05-16T23:35:20.602907 | 2019-05-10T07:24:21 | 2019-05-10T07:24:21 | 183,370,054 | 0 | 0 | Apache-2.0 | 2019-04-25T06:25:21 | 2019-04-25T06:25:21 | null | UTF-8 | Java | false | false | 1,305 | java | /*
* Copyright (C) 2017-2018 Dremio Corporation
*
* 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.dremio.dac.api;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import com.dremio.dac.server.BaseTestServer;
/**
* Tests the {@link ClusterStatsResource} API
*/
public class TestClusterStatsResource extends BaseTestServer {
private static final String PATH = "/cluster/stats";
@Test
public void testListSources() throws Exception {
ClusterStatsResource.ClusterStats stats = expectSuccess(getBuilder(getPublicAPI(3).path(PATH)).buildGet(), ClusterStatsResource.ClusterStats.class);
assertNotNull(stats);
assertEquals(stats.getSources().size(), newSourceService().getSources().size());
}
}
| [
"laurent@dremio.com"
] | laurent@dremio.com |
ce0f98b37461d4567eaad33168b39268d52202a9 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/35/35_96cd566ffafb8bc741f40657aae4b38ebe80e435/AbstractHost/35_96cd566ffafb8bc741f40657aae4b38ebe80e435_AbstractHost_t.java | 96fd229b556ec9b2ed497b9a531eac575b555936 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,411 | java | /* Soot - a J*va Optimization Framework
* Copyright (C) 1997-1999 Raja Vallee-Rai
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/*
* Modified by the Sable Research Group and others 1997-1999.
* See the 'credits' file distributed with Soot for the complete list of
* contributors. (Soot is distributed at http://www.sable.mcgill.ca/soot)
*/
package soot.tagkit;
import soot.*;
import java.util.*;
// extended by SootClass, SootField, SootMethod, Scene
/**
* This class is the reference implementation for
* the Host interface, which allows arbitrary taggable
* data to be stored with Soot objects.
*/
public class AbstractHost implements Host
{
// avoid creating an empty list for each element, when it is not used
// use lazy instantation (in addTag) instead
private static List emptyList = Collections.EMPTY_LIST;
private List mTagList = emptyList;
/** get the list of tags. This list should not be modified! */
public List getTags()
{
return mTagList;
}
/** remove the tag named <code>aName</code> */
public void removeTag(String aName)
{
int tagIndex;
if((tagIndex = searchForTag(aName)) != -1) {
mTagList.remove(tagIndex);
}
}
/** search for tag named <code>aName</code> */
private int searchForTag(String aName)
{
int i = 0;
Iterator it = mTagList.iterator();
while(it.hasNext()) {
Tag tag = (Tag) it.next();
if(tag.getName().equals(aName))
return i;
i++;
}
return -1;
}
/** get the Tag object named <code>aName</code> */
public Tag getTag(String aName)
{
int tagIndex;
if((tagIndex = searchForTag(aName)) != -1) {
return (Tag) mTagList.get(tagIndex);
}
return null;
}
/** look if this host has a tag named <code>aName</code> */
public boolean hasTag(String aName)
{
return (searchForTag(aName) != -1);
}
/** add tag <code>t</code> to this host */
public void addTag(Tag t)
{
if (mTagList == emptyList)
mTagList = new ArrayList(1);
mTagList.add(t);
}
/** Removes all the tags from this host. */
public void removeAllTags() {
mTagList = emptyList;
}
/** Adds all the tags from h to this host. */
public void addAllTagsOf( Host h ) {
for( Iterator tIt = h.getTags().iterator(); tIt.hasNext(); ) {
final Tag t = (Tag) tIt.next();
addTag( t );
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
431b355a508bf3545a558bc534dd7e7f05a74786 | 684f1081076b6c3f3b730fdaab6cee96169cf65e | /lealone-test-hbase/src/test/java/org/lealone/hbase/jdbc/misc/PreparedStatementTest.java | 8e646a37f40ded04d39e0f9d117fbcc0ad5c853c | [
"Apache-2.0"
] | permissive | baishuo/Lealone | b5e466750b46bbd2fb7002af5edbdb786cb84d74 | d1162614727f13fc41e2c69c739548f6047f1fb2 | refs/heads/master | 2021-01-15T08:05:10.043456 | 2014-12-24T01:53:25 | 2014-12-24T01:53:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,118 | 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 org.lealone.hbase.jdbc.misc;
import static junit.framework.Assert.assertEquals;
import java.sql.PreparedStatement;
import org.junit.Test;
import org.lealone.hbase.jdbc.TestBase;
public class PreparedStatementTest extends TestBase {
@Test
public void run() throws Exception {
init();
test();
}
void init() throws Exception {
createTableSQL("CREATE HBASE TABLE IF NOT EXISTS PreparedStatementTest(COLUMN FAMILY cf)");
sql = "INSERT INTO PreparedStatementTest(_rowkey_, f1, f2) VALUES(?, ?, ?)";
PreparedStatement ps = conn.prepareStatement(sql);
ps.setString(1, "01");
ps.setString(2, "a1");
ps.setInt(3, 10);
ps.executeUpdate();
ps.setString(1, "02");
ps.setString(2, "a2");
ps.setInt(3, 50);
ps.executeUpdate();
ps.setString(1, "03");
ps.setString(2, "a3");
ps.setInt(3, 30);
ps.executeUpdate();
ps.close();
}
void test() throws Exception {
sql = "SELECT count(*) FROM PreparedStatementTest WHERE f2 >= ?";
PreparedStatement ps = conn.prepareStatement(sql);
ps.setInt(1, 30);
rs = ps.executeQuery();
rs.next();
assertEquals(2, getIntValue(1, true));
ps.close();
}
}
| [
"zhh200910@gmail.com"
] | zhh200910@gmail.com |
ab5f91d9ea83505d4aab2eb21f7b3e92f3d36063 | 20265e89e736cb29c2eeb2cdce18c5400a03427c | /src/Lintcode/isInterleave.java | 4aac164398f390c756b7950eadaba0053c819417 | [] | no_license | Hcqian/algorithem | 112b3e421a2e45e3d6be455358947c8655ce7006 | 49a7c2f584012c86b325d1a191a5358ecaf679c1 | refs/heads/master | 2021-08-24T06:00:09.027642 | 2017-12-08T09:16:45 | 2017-12-08T09:20:29 | 113,555,980 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,252 | java | package Lintcode;
public class isInterleave {
char[] ss3;
char[] ss2;
char[] ss1;
public boolean isInterleave(String s1, String s2, String s3) {
// write your code here
ss3 = s3.toCharArray();
ss2 = s2.toCharArray();
ss1 = s1.toCharArray();
if(s1.length()==0&&s2.length()==0&&s3.length()==0) return true;
boolean[][] chars = new boolean[s2.length() + 1][s1.length() + 1];
chars[0][0]=true;
for (int i = 1; i <=s1.length(); i++) {
if(ss1[i-1]==ss3[i-1]) chars[0][i]=true;
else break;
}
for (int i = 1; i <=s2.length(); i++) {
if(ss2[i-1]==ss3[i-1]) chars[i][0]=true;
else break;
}
for (int i = 1; i <=s2.length(); i++) {
for (int j = 1; j <=s1.length(); j++) {
if(ss3[i+j-1]==ss2[i-1])
chars[i][j]=chars[i-1][j];
if(ss3[i+j-1]==ss1[j-1])
chars[i][j]=chars[i][j]||chars[i][j-1];
}
}
return chars[s2.length()][s1.length()];
}
// 指数级别解法
public boolean find(int s1, int s2, int s3) {
if (s3 == ss3.length)
return true;
boolean flag = false;
if (s1 < ss1.length && ss1[s1] == ss3[s3]) {
flag = find(s1 + 1, s2, s3 + 1);
}
if (flag)
return flag;
if (s2 < ss2.length && ss2[s2] == ss3[s3]) {
flag = find(s1, s2 + 1, s3 + 1);
}
return flag;
}
}
| [
"email@example.com"
] | email@example.com |
ed6a0454b68c95fc174895314c71c4bf917215eb | aa76c179f0b424cdf4d0f11e89265881443bdd9a | /app/src/main/java/com/lltech/manager/entity/IpItem.java | fa67784efb5d8febbed0919024189c8e52740c53 | [] | no_license | 317764920/manager | ad9a63567e6c9f1c2c0787a1bc8085bda755df13 | 9813fcfe8208a4d5be746dca7d6e4b58fb0b9ca3 | refs/heads/master | 2020-12-25T09:38:17.988949 | 2016-06-23T08:39:28 | 2016-06-23T08:39:28 | 61,787,972 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 832 | java | package com.lltech.manager.entity;
import org.litepal.crud.DataSupport;
/**
* @ClassName(类名) : IpItem
* @Description(描述) : 请填入描述
* @author(作者) :liuchunxu
* @date (开发日期) :2016年04月19日 15:12
*/
public class IpItem extends DataSupport {
public static final String Y = "y";
public static final String N = "n";
private String ip;
private String port;
private String choose;
public String getPort() {
return port;
}
public void setPort(String port) {
this.port = port;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getChoose() {
return choose;
}
public void setChoose(String choose) {
this.choose = choose;
}
}
| [
"java"
] | java |
737bfc2cc92747216c00a035471c3fb843cfc8d7 | 8a8091ff40c020a226a035ed87ff6117b8a92077 | /core/src/main/java/be/isach/ultracosmetics/cosmetics/gadgets/GadgetSmashDown.java | 30234ba26b672a6759272552bf7e01678ab893f2 | [] | no_license | Aipaloovik/UltraCosmetics | 02437eb40e162facc783b3d29afa9b7fccc08777 | 01ecebc3a0443270dee74bd71c3cb8c16e8c04eb | refs/heads/master | 2021-05-31T22:23:15.470465 | 2016-06-04T23:04:32 | 2016-06-04T23:04:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,917 | java | package be.isach.ultracosmetics.cosmetics.gadgets;
import be.isach.ultracosmetics.UltraCosmetics;
import be.isach.ultracosmetics.util.BlockUtils;
import be.isach.ultracosmetics.util.MathUtils;
import be.isach.ultracosmetics.util.Particles;
import be.isach.ultracosmetics.util.UtilParticles;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.FallingBlock;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.entity.EntityChangeBlockEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.util.Vector;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* Created by sacha on 08/08/15.
*/
public class GadgetSmashDown extends Gadget {
List<Player> activePlayers = new ArrayList<>();
List<FallingBlock> fallingBlocks = new ArrayList<>();
GadgetSmashDown instance;
public GadgetSmashDown(UUID owner) {
super(owner, GadgetType.SMASHDOWN);
UltraCosmetics.getInstance().registerListener(this);
instance = this;
}
@Override
void onRightClick() {
switch (UltraCosmetics.getServerVersion()) {
case v1_8_R3:
getPlayer().playSound(getPlayer().getLocation(), Sound.valueOf("FIREWORK_LAUNCH"), 2.0f, 1.0f);
break;
case v1_9_R1:
getPlayer().playSound(getPlayer().getLocation(), Sound.ENTITY_FIREWORK_LAUNCH, 2.0f, 1.0f);
break;
}
getPlayer().setVelocity(new Vector(0, 3, 0));
final int taskId = Bukkit.getScheduler().runTaskTimer(UltraCosmetics.getInstance(), new Runnable() {
@Override
public void run() {
UtilParticles.display(Particles.CLOUD, getPlayer().getLocation());
}
}, 0, 1).getTaskId();
Bukkit.getScheduler().runTaskLater(UltraCosmetics.getInstance(), new Runnable() {
@Override
public void run() {
Bukkit.getScheduler().cancelTask(taskId);
getPlayer().setVelocity(new Vector(0, -3, 0));
activePlayers.add(getPlayer());
}
}, 25);
}
@Override
void onLeftClick() {
}
@EventHandler
public void onEntityDamage(EntityDamageEvent event) {
if (activePlayers.contains(event.getEntity()))
event.setCancelled(true);
}
@Override
void onUpdate() {
if (activePlayers.contains(getPlayer()) && getPlayer().isOnGround()) {
activePlayers.remove(getPlayer());
playBoomEffect();
}
}
private void playBoomEffect() {
final Location loc = getPlayer().getLocation();
switch (UltraCosmetics.getServerVersion()) {
case v1_8_R3:
loc.getWorld().playSound(loc, Sound.valueOf("EXPLODE"), 2.0f, 1.0f);
break;
case v1_9_R1:
loc.getWorld().playSound(loc, Sound.ENTITY_GENERIC_EXPLODE, 2.0f, 1.0f);
break;
}
new BukkitRunnable() {
int i = 1;
@Override
public void run() {
if (i == 5) {
cancel();
}
if (UltraCosmetics.getCustomPlayer(getPlayer()).currentGadget != instance) {
cancel();
return;
}
for (Block b : BlockUtils.getBlocksInRadius(loc.clone().add(0, -1, 0), i, true)) {
if (b.getLocation().getBlockY() == loc.getBlockY() - 1) {
if (b.getType() != Material.AIR
&& b.getType() != Material.SIGN_POST
&& b.getType() != Material.CHEST
&& b.getType() != Material.STONE_PLATE
&& b.getType() != Material.WOOD_PLATE
&& b.getType() != Material.WALL_SIGN
&& b.getType() != Material.WALL_BANNER
&& b.getType() != Material.STANDING_BANNER
&& b.getType() != Material.CROPS
&& b.getType() != Material.LONG_GRASS
&& b.getType() != Material.SAPLING
&& b.getType() != Material.DEAD_BUSH
&& b.getType() != Material.RED_ROSE
&& b.getType() != Material.RED_MUSHROOM
&& b.getType() != Material.BROWN_MUSHROOM
&& b.getType() != Material.TORCH
&& b.getType() != Material.LADDER
&& b.getType() != Material.VINE
&& b.getType() != Material.DOUBLE_PLANT
&& b.getType() != Material.PORTAL
&& b.getType() != Material.CACTUS
&& b.getType() != Material.WATER
&& b.getType() != Material.STATIONARY_WATER
&& b.getType() != Material.LAVA
&& b.getType() != Material.STATIONARY_LAVA
&& !BlockUtils.isRocketBlock(b)
&& !BlockUtils.isTreasureChestBlock(b)
&& b.getType().isSolid()
&& b.getType().getId() != 43
&& b.getType().getId() != 44
&& b.getRelative(BlockFace.UP).getType() == Material.AIR) {
FallingBlock fb = loc.getWorld().spawnFallingBlock(b.getLocation().clone().add(0, 1.1f, 0), b.getType(), b.getData());
fb.setVelocity(new Vector(0, 0.3f, 0));
fb.setDropItem(false);
fallingBlocks.add(fb);
for (Entity ent : fb.getNearbyEntities(1, 1, 1)) {
if (ent != getPlayer() && ent.getType() != EntityType.FALLING_BLOCK)
if (affectPlayers)
MathUtils.applyVelocity(ent, new Vector(0, 0.5, 0));
}
}
}
}
i++;
}
}.runTaskTimer(UltraCosmetics.getInstance(), 0, 1);
}
@EventHandler
public void onBlockChangeState(EntityChangeBlockEvent event) {
if (fallingBlocks.contains(event.getEntity())) {
event.setCancelled(true);
fallingBlocks.remove(event.getEntity());
FallingBlock fb = (FallingBlock) event.getEntity();
Particles.BLOCK_CRACK.display(new Particles.BlockData(Material.getMaterial(fb.getBlockId()), fb.getBlockData()), 0f, 0f, 0f, 0.4f, 50, fb.getLocation(), 128);
switch (UltraCosmetics.getServerVersion()) {
case v1_8_R3:
getPlayer().playSound(getPlayer().getLocation(), Sound.valueOf("STEP_STONE"), 1.0f, 1.0f);
break;
case v1_9_R1:
getPlayer().playSound(getPlayer().getLocation(), Sound.BLOCK_STONE_STEP, 1.0f, 1.0f);
break;
}
event.getEntity().remove();
}
}
@Override
public void onClear() {
for (FallingBlock block : fallingBlocks) {
block.remove();
}
HandlerList.unregisterAll(this);
}
}
| [
"sacha.lewin@me.com"
] | sacha.lewin@me.com |
5ddffb1fcf2ad7729de83fe546a5a3cb442f6240 | 92cb886d4a5a5c86894d4679f76045e92dfdc986 | /souyue/src/main/java/com/zhongsou/souyue/module/ToolTip.java | 5a8e9786a8975d88661695320bfe6da556a0d48a | [] | no_license | chzh1377/souyue_android | 9602d84fb5fd0360b98fb320cc09f343c32147ff | be27d88f6187a374e3bd611835f6d421c34d7bb7 | refs/heads/master | 2016-09-14T05:12:51.419652 | 2016-05-18T13:01:14 | 2016-05-18T13:01:14 | 59,115,792 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,846 | java | package com.zhongsou.souyue.module;
import com.zhongsou.souyue.net.HttpJsonResponse;
import com.zhongsou.souyue.utils.StringUtils;
@SuppressWarnings("serial")
public class ToolTip extends ResponseObject {
private String _id;
private Long id;
private String category = "";
private String rssImage = "";
private String url = "";
private String keyword = "";
private String srpId = "";
private String srpCate = "";
private String m = ""; // 主词
private String g = ""; // 分义标注
private String version = "";//词性
private boolean xiaoqi;
private String lastUpdate;
private boolean ischeck = false;
public ToolTip(){}
public ToolTip( String _id,
String category,
String rssImg,
String url,
String keyword,
String srpId,
String srpCate,
String m,
String g,
String lastUpdate,
String version
) {
this._id = _id;
this.category = category;
this.rssImage = rssImg;
this.url = url;
this.keyword = keyword;
this.srpId = srpId;
this.srpCate = srpCate;
this.m = m;
this.g = g;
this.lastUpdate = lastUpdate;
this.version = version;
}
public boolean ischeck() {
return ischeck;
}
public void ischeck_$eq(boolean ischeck) {
this.ischeck = ischeck;
}
public String _id(){
return _id;
}
public void _id_$eq(String _id){
this._id = _id;
}
public String lastUpdate(){
return lastUpdate;
}
public void lastUpdate_$eq(String lastUpdate){
this.lastUpdate = lastUpdate;
}
public Long id(){
return id;
}
public void id_$eq(Long id){
this.id = id;
}
public ToolTip(HttpJsonResponse httpJsonResponse){
this.keyword = httpJsonResponse.getHeadString("keyword");
this.version = httpJsonResponse.getHeadString("version");
this.xiaoqi = httpJsonResponse.getHeadBoolean("xiaoqi");
}
public String version(){
return version;
}
public void version_$eq(String str){
this.version = str;
}
public String category() {
return category;
}
public void category_$eq(String category) {
this.category = category;
}
public String rssImage() {
return rssImage;
}
public void rssImage_$eq(String rssImage) {
this.rssImage = rssImage;
}
public String url() {
return url;
}
public void url_$eq(String url) {
this.url = url;
}
public String keyword() {
return keyword;
}
public void keyword_$eq(String keyword) {
this.keyword = keyword;
}
public String srpId() {
return srpId;
}
public void srpId_$eq(String srpId) {
this.srpId = srpId;
}
public String srpCate() {
return srpCate;
}
public void srpCate_$eq(String srpCate) {
this.srpCate = srpCate;
}
public String m() {
return m;
}
public void m_$eq(String m) {
this.m = m;
}
public String g() {
return g;
}
public void g_$eq(String g) {
this.g = g;
}
public boolean isRss(){
return this.category != null && this.category.equals("rss");
}
public boolean isSrp(){
return (this.category != null && this.category.equals("srp")) && !StringUtils.isEmpty(this.srpId);
}
public boolean isHotSrp(){
return !StringUtils.isEmpty(this.keyword) && !StringUtils.isEmpty(this.srpId);
}
public boolean xiaoqi(){
return xiaoqi;
}
public boolean isHot(){
return this.category != null && this.category.equals("hotWord");
}
}
| [
"zhch1377@163.com"
] | zhch1377@163.com |
cd8bafe89abb5a5a7ee6848a08e270f8cdb9c2ec | f1b43d3cf5a6efd8755d2b88c622eada6cc41b53 | /emp-platform/system/system-core/src/main/java/org/minxc/emp/syetem2/model/SystemDataSourceImpl.java | 0546bed2d218b57a0af3da519c9b9fc7543eb4e4 | [
"Apache-2.0"
] | permissive | minxc/iEMPv7 | ed324d9bdcbd22db14f1214ee7ebd0d0838cb24e | 428ba1b516fc0e0a6e6b345c8042e7aef0d14a63 | refs/heads/master | 2020-03-26T20:14:10.882046 | 2018-08-24T14:01:40 | 2018-08-24T14:01:40 | 145,312,273 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,799 | java | package org.minxc.emp.syetem2.model;
import org.minxc.emp.base.core.model.BaseModelImpl;
import org.minxc.emp.base.core.util.JsonUtil;
import org.minxc.emp.syetem2.model.def.SystemDataSourceDefAttribute;
import org.minxc.emp.system.api2.model.SystemDataSource;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* <pre>
* 描述:数据源对象
* 作者:min.xianchang
* 邮箱:xianchangmin@126.com
* 日期:2018年1月8日 下午8:51:30
* 版权:summer
* </pre>
*/
public class SystemDataSourceImpl extends BaseModelImpl implements SystemDataSource {
/**
* 数据源的别名
*/
@NotEmpty
private String key;
/**
* 数据源的名字
*/
@NotEmpty
private String name;
/**
* 描述
*/
private String desc;
/**
* 数据库类型 枚举在org.minxc.emp.base.api.db.DbType 的key
*/
@NotEmpty
private String dbType;
/**
* 类路径
*/
@NotEmpty
private String classPath;
/**
* <pre>
* 属性字段json,为了简单就以json格式入库就行
* 因为这个对象也不常用,这样保存是可以的,对于常用对象这样就不建议用这个了
* </pre>
*/
@NotEmpty
private String attributesJson;
/**
* 属性字段
*/
@NotNull
@Valid
private List<SystemDataSourceDefAttribute> attributes;
@Override
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
@Override
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
@Override
public String getDbType() {
return dbType;
}
public void setDbType(String dbType) {
this.dbType = dbType;
}
public String getClassPath() {
return classPath;
}
public void setClassPath(String classPath) {
this.classPath = classPath;
}
public String getAttributesJson() {
return attributesJson;
}
public void setAttributesJson(String attributesJson) {
this.attributesJson = attributesJson;
this.attributes = JsonUtil.parseArray(attributesJson, SystemDataSourceDefAttribute.class);
}
public List<SystemDataSourceDefAttribute> getAttributes() {
return attributes;
}
public void setAttributes(List<SystemDataSourceDefAttribute> attributes) {
this.attributes = attributes;
this.attributesJson = JsonUtil.toJSONString(attributes);
}
}
| [
"xianchangmin@126.com"
] | xianchangmin@126.com |
1d0290d66e37b713ee6cddbde4ae8d6bd60453b6 | f0b4ab0afcbcadec8353294ae625d2c01d1e24da | /tr-web/src/main/java/com/tmser/tr/uc/service/impl/UserMenuServiceImpl.java | e0c48ec9411d80740d3fc4d1847c036b85428514 | [] | no_license | tjx222/teach-research | b280e5feb07f66b6e4e284264fdc30a8c8bf8560 | b3553530807d96f2a5e632dc82c48ea407dc3386 | refs/heads/master | 2020-04-07T13:44:40.996883 | 2018-03-07T10:12:09 | 2018-03-07T10:12:09 | 124,217,080 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,955 | java | /**
* Tmser.com Inc.
* Copyright (c) 2015-2017 All Rights Reserved.
*/
package com.tmser.tr.uc.service.impl;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.tmser.tr.common.dao.BaseDAO;
import com.tmser.tr.common.service.AbstractService;
import com.tmser.tr.manage.meta.bo.Menu;
import com.tmser.tr.manage.meta.service.MenuService;
import com.tmser.tr.uc.bo.UserMenu;
import com.tmser.tr.uc.dao.UserMenuDao;
import com.tmser.tr.uc.service.UserMenuService;
import com.tmser.tr.utils.JyAssert;
/**
* 用户菜单 服务实现类
* <pre>
*
* </pre>
*
* @author Generate Tools
* @version $Id: UserMenu.java, v 1.0 2015-02-12 Generate Tools Exp $
*/
@Service
@Transactional
public class UserMenuServiceImpl extends AbstractService<UserMenu, Integer> implements UserMenuService {
@Resource
private UserMenuDao userMenuDao;
@Resource
private MenuService menuService;
/**
* @return
* @see com.tmser.tr.common.service.BaseService#getDAO()
*/
@Override
public BaseDAO<UserMenu, Integer> getDAO() {
return userMenuDao;
}
/**
* @param uid
* @param sysRoleId
* @return
* @see com.tmser.tr.uc.service.UserMenuService#findUserMenuByUser(java.lang.Integer, java.lang.Integer)
*/
@Override
public List<UserMenu> findUserMenuByUser(Integer userId, Integer sysRoleId,Boolean display) {
JyAssert.notNull(userId, "user id can't be null!");
JyAssert.notNull(sysRoleId, "sysRoleId id can't be null!");
UserMenu model = new UserMenu();
model.setUserId(userId);
model.setSysRoleId(sysRoleId);
model.setDisplay(display);
model.addOrder("sort");
List<UserMenu> umList = userMenuDao.listAll(model);
List<UserMenu> acList = new ArrayList<UserMenu>();
for(UserMenu um : umList){
Menu m = menuService.getMenuWithIcon(um.getMenuId());
if(m != null){
if(m.getParentid() == 0 && !m.getIsNormal()){
continue;
}
um.setMenu(m);
acList.add(um);
}
}
return acList;
}
/**
* @param mids
* @param userid
* @see com.tmser.tr.uc.service.UserMenuService#sortUser(java.lang.String, java.lang.Integer)
*/
@Override
public int sortUser(String mids, Integer userid) {
String[] midlist = mids.split(",");
int sort = 0;
int count = 0;
for(String mid : midlist){
UserMenu model = new UserMenu();
model.setSort(sort);
Map<String,Object> paramMap = new HashMap<String,Object>(2);
paramMap.put("userId", userid);
paramMap.put("nsort", sort);
model.addCustomCondition("and userId = :userId and sort != :nsort", paramMap);
model.setId(Integer.valueOf(mid));
sort++;
count = count + userMenuDao.update(model);
}
return count;
}
}
| [
"tjx1222@163.com"
] | tjx1222@163.com |
d45ba5092f1dd36b3c95f257847250a6a9a32904 | 67204b235db0a42b45a21cee78c8cb6118201837 | /src/com/fengling/cms/dao/assist/CmsSearchWordsDao.java | 8bb031b28f82b82b43aa39985930726946de3a84 | [] | no_license | nextflower/fengling | ed5d6f636587c2cd427fb10b12f29a807c7f7f7f | 11b6536f6d3c1faf3e8e6629e8cef7f90cb6c7c2 | refs/heads/master | 2021-01-25T05:35:44.356765 | 2015-05-05T15:00:41 | 2015-05-05T15:00:41 | 33,312,953 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 658 | java | package com.fengling.cms.dao.assist;
import java.util.List;
import com.fengling.common.hibernate3.Updater;
import com.fengling.common.page.Pagination;
import com.fengling.cms.entity.assist.CmsSearchWords;
public interface CmsSearchWordsDao {
public Pagination getPage(int pageNo, int pageSize);
public List<CmsSearchWords> getList(String name,Integer orderBy,boolean cacheable);
public CmsSearchWords findById(Integer id);
public CmsSearchWords findByName(String name);
public CmsSearchWords save(CmsSearchWords bean);
public CmsSearchWords updateByUpdater(Updater<CmsSearchWords> updater);
public CmsSearchWords deleteById(Integer id);
} | [
"dv3333@163.com"
] | dv3333@163.com |
b2bd260ed30619fa6764e23bf430c2919e837b86 | 17e8438486cb3e3073966ca2c14956d3ba9209ea | /dso/tags/2.2.2/code/base/dso-performance-tests/tests.base/com/tctest/performance/sampledata/OrganicObjectGraphNode_93.java | 70ae1bfff00ddf78523844abece21173f40e4206 | [] | no_license | sirinath/Terracotta | fedfc2c4f0f06c990f94b8b6c3b9c93293334345 | 00a7662b9cf530dfdb43f2dd821fa559e998c892 | refs/heads/master | 2021-01-23T05:41:52.414211 | 2015-07-02T15:21:54 | 2015-07-02T15:21:54 | 38,613,711 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,045 | java | /*
* All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
*/
package com.tctest.performance.sampledata;
public final class OrganicObjectGraphNode_93 extends OrganicObjectGraph {
private int size = 26;
private int[] types = new int[] { 3, 3, 1, 0, 0, 2, 0, 2, 3, 1, 2, 3, 0, 1, 2, 1, 2, 0, 1, 2, 3, 2, 1, 1, 2, 3 };
private double f0;
private double f1;
private String f2;
private int f3;
private int f4;
private short f5;
private int f6;
private short f7;
private double f8;
private String f9;
private short f10;
private double f11;
private int f12;
private String f13;
private short f14;
private String f15;
private short f16;
private int f17;
private String f18;
private short f19;
private double f20;
private short f21;
private String f22;
private String f23;
private short f24;
private double f25;
public OrganicObjectGraphNode_93(int sequenceNumber, String envKey) {
super(sequenceNumber, envKey);
}
public OrganicObjectGraphNode_93() {
super();
}
protected int getSize() {
return size;
}
protected int getType(int index) {
return types[index];
}
protected void setValue(int index, double value) {
switch (index) {
case 0:
f0 = value;
case 1:
f1 = value;
case 8:
f8 = value;
case 11:
f11 = value;
case 20:
f20 = value;
case 25:
f25 = value;
default:
break;
}
}
protected void setValue(int index, String value) {
switch (index) {
case 2:
f2 = value;
case 9:
f9 = value;
case 13:
f13 = value;
case 15:
f15 = value;
case 18:
f18 = value;
case 22:
f22 = value;
case 23:
f23 = value;
default:
break;
}
}
protected void setValue(int index, int value) {
switch (index) {
case 3:
f3 = value;
case 4:
f4 = value;
case 6:
f6 = value;
case 12:
f12 = value;
case 17:
f17 = value;
default:
break;
}
}
protected void setValue(int index, short value) {
switch (index) {
case 5:
f5 = value;
case 7:
f7 = value;
case 10:
f10 = value;
case 14:
f14 = value;
case 16:
f16 = value;
case 19:
f19 = value;
case 21:
f21 = value;
case 24:
f24 = value;
default:
break;
}
}
public boolean equals(Object rawObj) {
if (!(rawObj instanceof OrganicObjectGraphNode_93)) { System.out.println("not instanceof"); System.out.println(rawObj.getClass().getName() + "=OrganicObjectGraphNode_93"); return false; }
OrganicObjectGraphNode_93 obj = (OrganicObjectGraphNode_93) rawObj;
if (f0 != obj.f0) return false;
if (f1 != obj.f1) return false;
if (!("" + f2).equals("" + obj.f2)) return false;
if (f3 != obj.f3) return false;
if (f4 != obj.f4) return false;
if (f5 != obj.f5) return false;
if (f6 != obj.f6) return false;
if (f7 != obj.f7) return false;
if (f8 != obj.f8) return false;
if (!("" + f9).equals("" + obj.f9)) return false;
if (f10 != obj.f10) return false;
if (f11 != obj.f11) return false;
if (f12 != obj.f12) return false;
if (!("" + f13).equals("" + obj.f13)) return false;
if (f14 != obj.f14) return false;
if (!("" + f15).equals("" + obj.f15)) return false;
if (f16 != obj.f16) return false;
if (f17 != obj.f17) return false;
if (!("" + f18).equals("" + obj.f18)) return false;
if (f19 != obj.f19) return false;
if (f20 != obj.f20) return false;
if (f21 != obj.f21) return false;
if (!("" + f22).equals("" + obj.f22)) return false;
if (!("" + f23).equals("" + obj.f23)) return false;
if (f24 != obj.f24) return false;
if (f25 != obj.f25) return false;
return super.equals(obj);
}
}
| [
"jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864"
] | jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864 |
e9121062f30ca43cdb1f7013ad1b2c4b94817a1f | 8ce73e769986695f3e1402ae026c67c5ba7cdebf | /src/main/java/ch/ethz/matsim/av/plcpc/ParallelLeastCostPathCalculatorWorker.java | e96d20d3b34f49f383b02a89c83acf9ae3b9d1f5 | [] | no_license | dkoutsou/av | f2db58abb2ebae7aab3510000a7e206d3a00479a | 9e01ff1d8b5ff8ace5ad686eb9452e267cff1d68 | refs/heads/master | 2021-08-12T06:40:33.481402 | 2017-11-04T18:10:05 | 2017-11-04T18:10:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,570 | java | package ch.ethz.matsim.av.plcpc;
import org.matsim.core.router.util.LeastCostPathCalculator;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
public class ParallelLeastCostPathCalculatorWorker extends Thread implements LeastCostPathCalculatorWorker {
final private BlockingQueue<ParallelLeastCostPathCalculatorTask> pending = new LinkedBlockingQueue<>();
final private LeastCostPathCalculator router;
final private Object waitLock = new Object();
public ParallelLeastCostPathCalculatorWorker(LeastCostPathCalculator router) {
this.router = router;
}
@Override
public void addTask(ParallelLeastCostPathCalculatorTask task) {
try {
pending.put(task);
} catch (InterruptedException e) {}
}
@Override
public void run() {
try {
while (true) {
ParallelLeastCostPathCalculatorTask task = pending.take();
task.result = router.calcLeastCostPath(task.fromNode, task.toNode, task.time, task.person, task.vehicle);
synchronized (waitLock) {
waitLock.notifyAll();
}
}
} catch (InterruptedException e) {}
}
public void terminate() {
interrupt();
}
public void waitForTasksToFinish() {
try {
synchronized (waitLock) {
while(pending.peek() != null) {
waitLock.wait();
}
}
} catch (InterruptedException e) { }
}
}
| [
"hoerl.sebastian@gmail.com"
] | hoerl.sebastian@gmail.com |
ca0df78f3965b26312f5e7dbad7966f191322f98 | 402710e9577f77f479e25fed181e8a2786b6a810 | /DIBeanAutowiringByNamee/src/org/spring/learning/BeanAutowiringByNamee.java | 50a5820ee501bddb00368eda18cb49ea5ece9580 | [] | no_license | Bishnu-KC/AllData | a27155a2f43c970994791ae6babc4f227a4eca03 | 181bbd079452e1430c71243a51868ae8791b0f49 | refs/heads/master | 2020-03-28T16:30:08.435330 | 2018-09-13T21:49:53 | 2018-09-13T21:49:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 593 | java | package org.spring.learning;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class BeanAutowiringByNamee {
public static void main(String args[])
{
ApplicationContext appContext=new ClassPathXmlApplicationContext("a.xml");
Country countryObj=(Country) appContext.getBean("country");
String countryName=countryObj.getCountryName();
String capitalName=countryObj.getCapitalObj().getCapitalName();
System.out.println(capitalName+" is capita of "+countryName+" Mero Desh Nepal.");
}
}
| [
"kcbishnu8@outlook.com"
] | kcbishnu8@outlook.com |
8d4b7f6cfd24b88e47e8dbf0232bee7e76395bb2 | de01380c556c28c2a87bd7610d63ba0f683a9d77 | /gmall-oms/src/main/java/com/atguigu/gmall/oms/dao/RefundInfoDao.java | 28e3b02003c7207dd2abe552082c7fbec6a0023d | [
"Apache-2.0"
] | permissive | zhao3976zhi/gmall | 76b55456938425f148a436fe8b89a3245ec908ca | 7eb1741df73c9339a454aea20de71317c594a5e7 | refs/heads/master | 2020-09-17T10:34:34.891197 | 2019-11-19T05:37:55 | 2019-11-19T05:37:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 377 | java | package com.atguigu.gmall.oms.dao;
import com.atguigu.gmall.oms.entity.RefundInfoEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
/**
* 退款信息
*
* @author breeze
* @email gentle@breeze.com
* @date 2019-10-28 18:23:45
*/
@Mapper
public interface RefundInfoDao extends BaseMapper<RefundInfoEntity> {
}
| [
"819974025@qq.com"
] | 819974025@qq.com |
64421820d97b383732ab294853165e6fbd249709 | 6baa09045c69b0231c35c22b06cdf69a8ce227d6 | /modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201605/cm/UrlList.java | 825611bca3b5e11362a496bbb9229ca85a28d833 | [
"Apache-2.0"
] | permissive | remotejob/googleads-java-lib | f603b47117522104f7df2a72d2c96ae8c1ea011d | a330df0799de8d8de0dcdddf4c317d6b0cd2fe10 | refs/heads/master | 2020-12-11T01:36:29.506854 | 2016-07-28T22:13:24 | 2016-07-28T22:13:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,180 | java | /**
* UrlList.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201605.cm;
/**
* Wrapper POJO for a list of URLs. The list can be cleared if a
* request contains
* a UrlList with an empty urls list.
*/
public class UrlList implements java.io.Serializable {
/* List of URLs. On SET operation, empty list indicates to clear
* the list.
* <span class="constraint CollectionSize">The maximum
* size of this collection is 10.</span>
* <span class="constraint ContentsStringLength">Strings
* in this field must be non-empty (trimmed).</span> */
private java.lang.String[] urls;
public UrlList() {
}
public UrlList(
java.lang.String[] urls) {
this.urls = urls;
}
/**
* Gets the urls value for this UrlList.
*
* @return urls * List of URLs. On SET operation, empty list indicates to clear
* the list.
* <span class="constraint CollectionSize">The maximum
* size of this collection is 10.</span>
* <span class="constraint ContentsStringLength">Strings
* in this field must be non-empty (trimmed).</span>
*/
public java.lang.String[] getUrls() {
return urls;
}
/**
* Sets the urls value for this UrlList.
*
* @param urls * List of URLs. On SET operation, empty list indicates to clear
* the list.
* <span class="constraint CollectionSize">The maximum
* size of this collection is 10.</span>
* <span class="constraint ContentsStringLength">Strings
* in this field must be non-empty (trimmed).</span>
*/
public void setUrls(java.lang.String[] urls) {
this.urls = urls;
}
public java.lang.String getUrls(int i) {
return this.urls[i];
}
public void setUrls(int i, java.lang.String _value) {
this.urls[i] = _value;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj) {
if (!(obj instanceof UrlList)) return false;
UrlList other = (UrlList) obj;
if (obj == null) return false;
if (this == obj) return true;
if (__equalsCalc != null) {
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true &&
((this.urls==null && other.getUrls()==null) ||
(this.urls!=null &&
java.util.Arrays.equals(this.urls, other.getUrls())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode() {
if (__hashCodeCalc) {
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getUrls() != null) {
for (int i=0;
i<java.lang.reflect.Array.getLength(getUrls());
i++) {
java.lang.Object obj = java.lang.reflect.Array.get(getUrls(), i);
if (obj != null &&
!obj.getClass().isArray()) {
_hashCode += obj.hashCode();
}
}
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(UrlList.class, true);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201605", "UrlList"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("urls");
elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201605", "urls"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
elemField.setMaxOccursUnbounded(true);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanSerializer(
_javaType, _xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.BeanDeserializer(
_javaType, _xmlType, typeDesc);
}
}
| [
"jradcliff@users.noreply.github.com"
] | jradcliff@users.noreply.github.com |
edee914c4b2aef4e89c4cc2453224492f5041712 | 3971cede02d6675fd6010b45017f91b422ee2fbd | /chapter_010/src/main/java/ru/yalymar/mapping/model/dao/unproxy/Unproxy.java | 509a2bf3a1f9dabd92dad60efffec547f18b586c | [] | no_license | SlavaLymar/job4j.ru | cdb6b323e9a8f4fe8147eef56f00c98c95295e92 | 365947c6388bb7a87c91b17bea058e4730b5f75d | refs/heads/master | 2021-01-11T09:31:38.556410 | 2017-12-18T08:58:25 | 2017-12-18T08:58:25 | 77,396,278 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 665 | java | package ru.yalymar.mapping.model.dao.unproxy;
import org.hibernate.Hibernate;
import org.hibernate.proxy.HibernateProxy;
/**
* @author slavalymar
* @since 19.06.2017
* @version 1
*/
public interface Unproxy<T> {
default T initializeAndUnproxy(T entity) {
if (entity == null) {
throw new
NullPointerException("Entity passed for initialization is null");
}
Hibernate.initialize(entity);
if (entity instanceof HibernateProxy) {
entity = (T) ((HibernateProxy) entity).getHibernateLazyInitializer()
.getImplementation();
}
return entity;
}
}
| [
"slavalymar@gmail.com"
] | slavalymar@gmail.com |
f5d3ca8e7d30b7ac55e220891fec368d842ed728 | ff406eece999f175e87278b263e3d0f5aa5b4f5e | /src/datastructuredemo/Trie.java | 7dd9c159371a8acb08745ab3463b70f50efd3044 | [] | no_license | mahfuz-omi/DataStructureDemo | 5b0ca22c9ed30e9f779093dccad342b32ceca237 | 1ce15749c4d3a7642d24ede0cddd94bd7a234c90 | refs/heads/master | 2021-01-19T21:12:29.588246 | 2017-05-22T05:11:01 | 2017-05-22T05:11:01 | 88,623,660 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,006 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package datastructuredemo;
/**
*
* @author omi
*/
public class Trie {
private TrieNode root;
public Trie()
{
this.root = new TrieNode();
}
public Trie(TrieNode root)
{
this.root = root;
}
public void addWord(String word)
{
int length = word.length();
TrieNode temp = this.root;
for(int i=0;i<length;i++)
{
char data = word.charAt(i);
if(this.findPosition(temp, data)== -1)
{
temp.next[temp.nextIn] = new TrieNode();
TrieNode temp2 = temp.next[temp.nextIn];
temp2.data = data;
temp.nextIn++;
temp = temp2;
}
else
{
int k = findPosition(temp, data);
temp = temp.next[k];
}
}
temp.isEnd = true;
}
private int findPosition(TrieNode node,char data)
{
if(node == null)
return -1;
for(int i=0;i<node.nextIn;i++)
{
if(node.next[i].data == data)
return i;
}
return -1;
}
public boolean isExists(String word)
{
int length = word.length();
TrieNode temp = this.root;
for(int i=0;i<length;i++)
{
char data = word.charAt(i);
if(this.findPosition(temp, data)== -1)
{
return false;
}
else
{
int k = findPosition(temp, data);
temp = temp.next[k];
}
}
if(temp.isEnd == true)
return true;
else
return false;
}
}
| [
"="
] | = |
39d297cae48d24a912a451a8ab56813cde9866fa | 2642b821788e2858d627b1058d2d007a7601e708 | /src/main/java/com/testrail/api/TestRailApiClient.java | 78adf6d111136dd2b6325e5b76382f52e735f30e | [
"MIT"
] | permissive | nemanovich/testrail | 4554e05424ace1a223a3c1e2f055f01e940620c4 | 7dc2d183d9d53b41cd2172940b50ccf396dd7c11 | refs/heads/master | 2021-01-01T16:37:36.722118 | 2017-07-20T21:53:58 | 2017-07-20T21:53:58 | 97,876,145 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,531 | java | package com.testrail.api;
import com.google.gson.Gson;
import com.testrail.api.gurock.APIClient;
import org.json.simple.JSONAware;
/*
Wrapper for gurock APIClient
*/
public class TestRailApiClient {
private final APIClient client;
public TestRailApiClient(String base_url) {
this.client = new APIClient(base_url);
}
public String getUser() {
return client.getUser();
}
public void setUser(String user) {
client.setUser(user);
}
public String getPassword() {
return client.getPassword();
}
public void setPassword(String password) {
client.setPassword(password);
}
public <T> T sendPost(String uri, final Object data, Class<T> clazz) {
return new Gson().fromJson(sendPost(uri, (JSONAware) data::toString), clazz);
}
public <T> T sendPost(RelativePath resource, Object bean, Class<T> clazz) {
return sendPost(resource.toString(), new Gson().toJson(bean), clazz);
}
public <T> T sendGet(String uri, Class<T> clazz) {
return new Gson().fromJson(sendGet(uri), clazz);
}
private String sendPost(String uri, Object data) {
try {
return client.sendPost(uri, data).toString();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private String sendGet(String uri) {
try {
return client.sendGet(uri).toString();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
| [
"="
] | = |
b218b473abe16a808d9d64bb9a3b9780a46e6947 | d7de50fc318ff59444caabc38d274f3931349f19 | /src/com/google/android/gms/internal/zzanw$zzd.java | cef65a55a64eb05f374df3cb8f492148bc8ab9f4 | [] | no_license | reverseengineeringer/fr.dvilleneuve.lockito | 7bbd077724d61e9a6eab4ff85ace35d9219a0246 | ad5dbd7eea9a802e5f7bc77e4179424a611d3c5b | refs/heads/master | 2021-01-20T17:21:27.500016 | 2016-07-19T16:23:04 | 2016-07-19T16:23:04 | 63,709,932 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,788 | java | package com.google.android.gms.internal;
import java.util.Map.Entry;
final class zzanw$zzd<K, V>
implements Map.Entry<K, V>
{
final K aQw;
V aQx;
zzd<K, V> bfo;
zzd<K, V> bfr;
zzd<K, V> bfs;
zzd<K, V> bft;
zzd<K, V> bfu;
int height;
zzanw$zzd()
{
aQw = null;
bfu = this;
bfo = this;
}
zzanw$zzd(zzd<K, V> paramzzd1, K paramK, zzd<K, V> paramzzd2, zzd<K, V> paramzzd3)
{
bfr = paramzzd1;
aQw = paramK;
height = 1;
bfo = paramzzd2;
bfu = paramzzd3;
bfo = this;
bfu = this;
}
public zzd<K, V> d()
{
Object localObject1 = bfs;
Object localObject2 = this;
while (localObject1 != null)
{
zzd localzzd = bfs;
localObject2 = localObject1;
localObject1 = localzzd;
}
return (zzd<K, V>)localObject2;
}
public zzd<K, V> e()
{
Object localObject1 = bft;
Object localObject2 = this;
while (localObject1 != null)
{
zzd localzzd = bft;
localObject2 = localObject1;
localObject1 = localzzd;
}
return (zzd<K, V>)localObject2;
}
public boolean equals(Object paramObject)
{
boolean bool2 = false;
boolean bool1 = bool2;
if ((paramObject instanceof Map.Entry))
{
paramObject = (Map.Entry)paramObject;
if (aQw != null) {
break label56;
}
bool1 = bool2;
if (((Map.Entry)paramObject).getKey() == null)
{
if (aQx != null) {
break label77;
}
bool1 = bool2;
if (((Map.Entry)paramObject).getValue() != null) {}
}
}
for (;;)
{
bool1 = true;
label56:
label77:
do
{
do
{
return bool1;
bool1 = bool2;
} while (!aQw.equals(((Map.Entry)paramObject).getKey()));
break;
bool1 = bool2;
} while (!aQx.equals(((Map.Entry)paramObject).getValue()));
}
}
public K getKey()
{
return (K)aQw;
}
public V getValue()
{
return (V)aQx;
}
public int hashCode()
{
int j = 0;
int i;
if (aQw == null)
{
i = 0;
if (aQx != null) {
break label33;
}
}
for (;;)
{
return i ^ j;
i = aQw.hashCode();
break;
label33:
j = aQx.hashCode();
}
}
public V setValue(V paramV)
{
Object localObject = aQx;
aQx = paramV;
return (V)localObject;
}
public String toString()
{
String str1 = String.valueOf(aQw);
String str2 = String.valueOf(aQx);
return String.valueOf(str1).length() + 1 + String.valueOf(str2).length() + str1 + "=" + str2;
}
}
/* Location:
* Qualified Name: com.google.android.gms.internal.zzanw.zzd
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
a70dc59afbf032ae1640269d7a0137fe6038388f | acd9b11687fd0b5d536823daf4183a596d4502b2 | /java-client/src/main/java/co/elastic/clients/elasticsearch/nodes/KeyedProcessor.java | 1c474f5586f794c26d4f7e084d8a75b579d82bfd | [
"Apache-2.0"
] | permissive | szabosteve/elasticsearch-java | 75be71df80a4e010abe334a5288b53fa4a2d6d5e | 79a1249ae77be2ce9ebd5075c1719f3c8be49013 | refs/heads/main | 2023-08-24T15:36:51.047105 | 2021-10-01T14:23:34 | 2021-10-01T14:23:34 | 399,091,850 | 0 | 0 | Apache-2.0 | 2021-08-23T12:15:19 | 2021-08-23T12:15:19 | null | UTF-8 | Java | false | false | 4,357 | java | /*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. 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.
*/
//----------------------------------------------------
// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
//----------------------------------------------------
package co.elastic.clients.elasticsearch.nodes;
import co.elastic.clients.json.DelegatingDeserializer;
import co.elastic.clients.json.JsonpDeserializable;
import co.elastic.clients.json.JsonpDeserializer;
import co.elastic.clients.json.JsonpMapper;
import co.elastic.clients.json.JsonpSerializable;
import co.elastic.clients.json.ObjectBuilderDeserializer;
import co.elastic.clients.json.ObjectDeserializer;
import co.elastic.clients.util.ObjectBuilder;
import jakarta.json.stream.JsonGenerator;
import java.lang.String;
import java.util.Objects;
import java.util.function.Function;
import javax.annotation.Nullable;
// typedef: nodes._types.KeyedProcessor
@JsonpDeserializable
public final class KeyedProcessor implements JsonpSerializable {
private final Process statistics;
private final String type;
// ---------------------------------------------------------------------------------------------
public KeyedProcessor(Builder builder) {
this.statistics = Objects.requireNonNull(builder.statistics, "statistics");
this.type = Objects.requireNonNull(builder.type, "type");
}
public KeyedProcessor(Function<Builder, Builder> fn) {
this(fn.apply(new Builder()));
}
/**
* API name: {@code statistics}
*/
public Process statistics() {
return this.statistics;
}
/**
* API name: {@code type}
*/
public String type() {
return this.type;
}
/**
* Serialize this object to JSON.
*/
public void serialize(JsonGenerator generator, JsonpMapper mapper) {
generator.writeStartObject();
serializeInternal(generator, mapper);
generator.writeEnd();
}
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("statistics");
this.statistics.serialize(generator, mapper);
generator.writeKey("type");
generator.write(this.type);
}
// ---------------------------------------------------------------------------------------------
/**
* Builder for {@link KeyedProcessor}.
*/
public static class Builder implements ObjectBuilder<KeyedProcessor> {
private Process statistics;
private String type;
/**
* API name: {@code statistics}
*/
public Builder statistics(Process value) {
this.statistics = value;
return this;
}
/**
* API name: {@code statistics}
*/
public Builder statistics(Function<Process.Builder, ObjectBuilder<Process>> fn) {
return this.statistics(fn.apply(new Process.Builder()).build());
}
/**
* API name: {@code type}
*/
public Builder type(String value) {
this.type = value;
return this;
}
/**
* Builds a {@link KeyedProcessor}.
*
* @throws NullPointerException
* if some of the required fields are null.
*/
public KeyedProcessor build() {
return new KeyedProcessor(this);
}
}
// ---------------------------------------------------------------------------------------------
/**
* Json deserializer for {@link KeyedProcessor}
*/
public static final JsonpDeserializer<KeyedProcessor> _DESERIALIZER = ObjectBuilderDeserializer.lazy(Builder::new,
KeyedProcessor::setupKeyedProcessorDeserializer, Builder::build);
protected static void setupKeyedProcessorDeserializer(DelegatingDeserializer<KeyedProcessor.Builder> op) {
op.add(Builder::statistics, Process._DESERIALIZER, "statistics");
op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type");
}
}
| [
"sylvain@elastic.co"
] | sylvain@elastic.co |
f491f58c11d518a0876d0455dc191cd1ddd9659b | 9e8b8d5949a35c55cfac8ebe4c7b6fed043dc267 | /common/platform-common/src/main/java/com/codeabovelab/dm/platform/configuration/RedisConfigurationFactory.java | 4e420acdd89c7cf112ba11dd9abf284a521c226b | [] | no_license | awsautomation/Docker-Orchestration-master | 5fac7dc060a6021371c95e4a5e52fb4c42d605f3 | 0c1544f4d2f6ceb869661b2f75e9216f990025ae | refs/heads/master | 2021-08-28T11:40:05.834148 | 2020-02-06T15:45:19 | 2020-02-06T15:45:19 | 238,753,850 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 656 | java |
package com.codeabovelab.dm.platform.configuration;
/*
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
@Configuration
public class RedisConfigurationFactory {
@Bean(name = "cacheTemplate")
public RedisTemplate redisTemplate(RedisConnectionFactory redisConnectionFactory) {
final RedisTemplate redisTemplate = new RedisTemplate();
redisTemplate.setConnectionFactory(redisConnectionFactory);
return redisTemplate;
}
}
*/ | [
"tech_fur@outlook.com"
] | tech_fur@outlook.com |
ede129a94516ccafb1b078a096d7dcfb9558600d | fec4a09f54f4a1e60e565ff833523efc4cc6765a | /Dependencies/work/decompile-00fabbe5/net/minecraft/server/packs/resources/ResourceManager.java | 137914b909c90ec3d4c5b5e431e6d534a708b4e6 | [] | no_license | DefiantBurger/SkyblockItems | 012d2082ae3ea43b104ac4f5bf9eeb509889ec47 | b849b99bd4dc52ae2f7144ddee9cbe2fd1e6bf03 | refs/heads/master | 2023-06-23T17:08:45.610270 | 2021-07-27T03:27:28 | 2021-07-27T03:27:28 | 389,780,883 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,648 | java | package net.minecraft.server.packs.resources;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Executor;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import net.minecraft.resources.MinecraftKey;
import net.minecraft.server.packs.EnumResourcePackType;
import net.minecraft.server.packs.IResourcePack;
import net.minecraft.util.Unit;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.util.Supplier;
public class ResourceManager implements IReloadableResourceManager {
private static final Logger LOGGER = LogManager.getLogger();
private final Map<String, ResourceManagerFallback> namespacedPacks = Maps.newHashMap();
private final List<IReloadListener> listeners = Lists.newArrayList();
private final Set<String> namespaces = Sets.newLinkedHashSet();
private final List<IResourcePack> packs = Lists.newArrayList();
private final EnumResourcePackType type;
public ResourceManager(EnumResourcePackType enumresourcepacktype) {
this.type = enumresourcepacktype;
}
public void a(IResourcePack iresourcepack) {
this.packs.add(iresourcepack);
ResourceManagerFallback resourcemanagerfallback;
for (Iterator iterator = iresourcepack.a(this.type).iterator(); iterator.hasNext(); resourcemanagerfallback.a(iresourcepack)) {
String s = (String) iterator.next();
this.namespaces.add(s);
resourcemanagerfallback = (ResourceManagerFallback) this.namespacedPacks.get(s);
if (resourcemanagerfallback == null) {
resourcemanagerfallback = new ResourceManagerFallback(this.type, s);
this.namespacedPacks.put(s, resourcemanagerfallback);
}
}
}
@Override
public Set<String> a() {
return this.namespaces;
}
@Override
public IResource a(MinecraftKey minecraftkey) throws IOException {
IResourceManager iresourcemanager = (IResourceManager) this.namespacedPacks.get(minecraftkey.getNamespace());
if (iresourcemanager != null) {
return iresourcemanager.a(minecraftkey);
} else {
throw new FileNotFoundException(minecraftkey.toString());
}
}
@Override
public boolean b(MinecraftKey minecraftkey) {
IResourceManager iresourcemanager = (IResourceManager) this.namespacedPacks.get(minecraftkey.getNamespace());
return iresourcemanager != null ? iresourcemanager.b(minecraftkey) : false;
}
@Override
public List<IResource> c(MinecraftKey minecraftkey) throws IOException {
IResourceManager iresourcemanager = (IResourceManager) this.namespacedPacks.get(minecraftkey.getNamespace());
if (iresourcemanager != null) {
return iresourcemanager.c(minecraftkey);
} else {
throw new FileNotFoundException(minecraftkey.toString());
}
}
@Override
public Collection<MinecraftKey> a(String s, Predicate<String> predicate) {
Set<MinecraftKey> set = Sets.newHashSet();
Iterator iterator = this.namespacedPacks.values().iterator();
while (iterator.hasNext()) {
ResourceManagerFallback resourcemanagerfallback = (ResourceManagerFallback) iterator.next();
set.addAll(resourcemanagerfallback.a(s, predicate));
}
List<MinecraftKey> list = Lists.newArrayList(set);
Collections.sort(list);
return list;
}
private void c() {
this.namespacedPacks.clear();
this.namespaces.clear();
this.packs.forEach(IResourcePack::close);
this.packs.clear();
}
@Override
public void close() {
this.c();
}
@Override
public void a(IReloadListener ireloadlistener) {
this.listeners.add(ireloadlistener);
}
@Override
public IReloadable a(Executor executor, Executor executor1, CompletableFuture<Unit> completablefuture, List<IResourcePack> list) {
ResourceManager.LOGGER.info("Reloading ResourceManager: {}", new Supplier[]{() -> {
return list.stream().map(IResourcePack::a).collect(Collectors.joining(", "));
}});
this.c();
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
IResourcePack iresourcepack = (IResourcePack) iterator.next();
try {
this.a(iresourcepack);
} catch (Exception exception) {
ResourceManager.LOGGER.error("Failed to add resource pack {}", iresourcepack.a(), exception);
return new ResourceManager.a(new ResourceManager.b(iresourcepack, exception));
}
}
return (IReloadable) (ResourceManager.LOGGER.isDebugEnabled() ? new ReloadableProfiled(this, Lists.newArrayList(this.listeners), executor, executor1, completablefuture) : Reloadable.a(this, Lists.newArrayList(this.listeners), executor, executor1, completablefuture));
}
@Override
public Stream<IResourcePack> b() {
return this.packs.stream();
}
private static class a implements IReloadable {
private final ResourceManager.b exception;
private final CompletableFuture<Unit> failedFuture;
public a(ResourceManager.b resourcemanager_b) {
this.exception = resourcemanager_b;
this.failedFuture = new CompletableFuture();
this.failedFuture.completeExceptionally(resourcemanager_b);
}
@Override
public CompletableFuture<Unit> a() {
return this.failedFuture;
}
@Override
public float b() {
return 0.0F;
}
@Override
public boolean c() {
return true;
}
@Override
public void d() {
throw this.exception;
}
}
public static class b extends RuntimeException {
private final IResourcePack pack;
public b(IResourcePack iresourcepack, Throwable throwable) {
super(iresourcepack.a(), throwable);
this.pack = iresourcepack;
}
public IResourcePack a() {
return this.pack;
}
}
}
| [
"joseph.cicalese@gmail.com"
] | joseph.cicalese@gmail.com |
16d30732928a74612f47e8f4d08c965c08274fe1 | dee407e7d56c3591e93400685b75900bc91d97fb | /mobileoa2.0/mgimlibs/src/main/java/com/handmark/pulltorefresh/library/PullToRefreshScrollView.java | 7876a4acf7844f0a897a4e2112838c8d5de1fdbe | [] | no_license | chengyue5923/android-OaCode | 20777c4ec319f990e05fd6443f3b5bebde7a57ef | c93b2673be33e203413eba05966d9348dd28f0ca | refs/heads/master | 2021-01-14T08:13:49.651060 | 2017-02-15T05:20:26 | 2017-02-15T05:20:26 | 82,023,114 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,842 | java | /*******************************************************************************
* Copyright 2011, 2012 Chris Banes.
* <p/>
* 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
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
* <p/>
* 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.handmark.pulltorefresh.library;
import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build.VERSION;
import android.os.Build.VERSION_CODES;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ScrollView;
import com.mogujie.im.libs.R;
public class PullToRefreshScrollView extends PullToRefreshBase<ScrollView> {
public PullToRefreshScrollView(Context context) {
super(context);
}
public PullToRefreshScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PullToRefreshScrollView(Context context, Mode mode) {
super(context, mode);
}
public PullToRefreshScrollView(Context context, Mode mode, AnimationStyle style) {
super(context, mode, style);
}
@Override
public final Orientation getPullToRefreshScrollDirection() {
return Orientation.VERTICAL;
}
@Override
protected ScrollView createRefreshableView(Context context, AttributeSet attrs) {
ScrollView scrollView;
if (VERSION.SDK_INT >= VERSION_CODES.GINGERBREAD) {
scrollView = new InternalScrollViewSDK9(context, attrs);
} else {
scrollView = new ScrollView(context, attrs);
}
scrollView.setId(R.id.scrollview);
return scrollView;
}
@Override
protected boolean isReadyForPullStart() {
return mRefreshableView.getScrollY() == 0;
}
@Override
protected boolean isReadyForPullEnd() {
View scrollViewChild = mRefreshableView.getChildAt(0);
if (null != scrollViewChild) {
return mRefreshableView.getScrollY() >= (scrollViewChild.getHeight() - getHeight());
}
return false;
}
@TargetApi(9)
final class InternalScrollViewSDK9 extends ScrollView {
public InternalScrollViewSDK9(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX,
int scrollRangeY, int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) {
final boolean returnValue = super.overScrollBy(deltaX, deltaY, scrollX, scrollY, scrollRangeX,
scrollRangeY, maxOverScrollX, maxOverScrollY, isTouchEvent);
// Does all of the hard work...
OverscrollHelper.overScrollBy(PullToRefreshScrollView.this, deltaX, scrollX, deltaY, scrollY,
getScrollRange(), isTouchEvent);
return returnValue;
}
/**
* Taken from the AOSP ScrollView source
*/
private int getScrollRange() {
int scrollRange = 0;
if (getChildCount() > 0) {
View child = getChildAt(0);
scrollRange = Math.max(0, child.getHeight() - (getHeight() - getPaddingBottom() - getPaddingTop()));
}
return scrollRange;
}
}
}
| [
"chengyue5923@163.com"
] | chengyue5923@163.com |
057571496a1418c38642b7f1e7aac14f30f9086b | 34ee77f14d9f5ca384d01042d1ae9af22295c1df | /spring-boot-demo-sharding-jdbc/src/main/java/com/demo/sharding/jdbc/key/TinyIdShardingKeyGenerator.java | afbb7814059aa2ce59f88b32e6730b8f5e673289 | [] | no_license | Hupeng7/spring-boot-demo1 | d8cb46cb8949d0bebfbc9ae829581475022ab31b | 0d6c052845bdf05f5780a717d8dd88bf690ae3d9 | refs/heads/master | 2023-06-13T01:12:43.168992 | 2023-05-26T07:29:46 | 2023-05-26T07:29:46 | 214,409,453 | 1 | 0 | null | 2022-11-16T11:35:04 | 2019-10-11T10:34:57 | Java | UTF-8 | Java | false | false | 752 | java | package com.demo.sharding.jdbc.key;
import org.apache.shardingsphere.spi.keygen.ShardingKeyGenerator;
import org.springframework.stereotype.Component;
import java.util.Properties;
/**
* @ClassName TinyIdShardingKeyGenerator
* @Description
* @Author H
* @Date 2021/10/11 14:58
* @Version 1.0
*/
@Component
public class TinyIdShardingKeyGenerator implements ShardingKeyGenerator {
@Override
public Comparable<?> generateKey() {
// Long id = TinyId.nextId("order");
return null;
}
@Override
public String getType() {
return "tinyid";
}
@Override
public Properties getProperties() {
return null;
}
@Override
public void setProperties(Properties properties) {
}
}
| [
"hup@hzphfin.com"
] | hup@hzphfin.com |
37a57227a4cc8d0c22d5dc45515d4b736306476a | c50b4239c1dfebd2a3672188b503c723651d0787 | /src/test/java/com/bow/demo/embed/DemoService.java | a1e31728f1dc497a9c37a15733dec7b2f58899d4 | [] | no_license | williamxww/activemq-demo | f6875f998c8a539b663d2623c5650be3c8d9587b | 5ae7813714da1c5a5417ee3ebc44fbb7b05d8949 | refs/heads/master | 2021-01-18T21:58:17.284602 | 2018-03-22T16:55:47 | 2018-03-22T16:55:47 | 87,032,200 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 172 | java | package com.bow.demo.embed;
/**
* @author vv
* @since 2017/12/10.
*/
public class DemoService {
public int calculate(int a, int b) {
return a + b;
}
}
| [
"vivid_xiang@163.com"
] | vivid_xiang@163.com |
fda025d6245b6b98942535a662bbabc5775755dd | 1e293b91adf5fe30f3c05bbd81146f726b09e7b5 | /src/main/java/PageObject/MainLogin.java | 29914807d4e7351b2c438f5c77ed3750df901dc2 | [] | no_license | imdadul2005/restapi | 4edf04c6fa76631d0120067f2394eb0ef811ff2f | 5df96890dd50a77024183d5fb453e379d1760f6e | refs/heads/master | 2021-09-06T22:33:11.979196 | 2018-01-11T15:41:20 | 2018-01-11T15:41:20 | 115,741,307 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,352 | java | package PageObject;
import GUI.Base;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindAll;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import java.util.List;
public class MainLogin extends Base{
public MainLogin(WebDriver driver){
this.driver = driver;
PageFactory.initElements(driver,this);
}
@FindBy(xpath="//input[@name='username']") WebElement userName;
@FindBy(xpath="//input[@name='domain']") WebElement domain;
@FindBy(xpath="//input[@name='password']") WebElement password;
@FindBy(xpath = "//button[@name='login']") WebElement loginButton;
@FindBy(xpath="//ul[@class='nav navbar-nav']") WebElement topMenu;
@FindAll(@FindBy(xpath="//div[@class='navbar-left ng-scope']/ul/li/a/span[1]"))List<WebElement> navLeftBar;
public WebElement getTopMenu() { return topMenu; }
public List<WebElement> getNavLeftBar() {return navLeftBar;}
public WebElement getUserName() { return userName; }
public WebElement getDomain() { return domain; }
public WebElement getPassword() {return password;}
public WebElement getLoginButton() { return loginButton; }
public WebElement navigateElement(String navigate){ return ListOfString(navLeftBar,navigate); }
}
| [
"you@example.com"
] | you@example.com |
344cdce63eb15dfed72429c56b2e29288e8997cb | fc6c869ee0228497e41bf357e2803713cdaed63e | /weixin6519android1140/src/sourcecode/com/tencent/mm/protocal/c/aty.java | 9a603b3278a4664ff4ff9979a61f58a83cad79fd | [] | no_license | hyb1234hi/reverse-wechat | cbd26658a667b0c498d2a26a403f93dbeb270b72 | 75d3fd35a2c8a0469dbb057cd16bca3b26c7e736 | refs/heads/master | 2020-09-26T10:12:47.484174 | 2017-11-16T06:54:20 | 2017-11-16T06:54:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,664 | java | package com.tencent.mm.protocal.c;
import com.tencent.gmtrace.GMTrace;
import java.util.LinkedList;
public final class aty
extends com.tencent.mm.bm.a
{
public int jhc;
public LinkedList<atx> jhd;
public aty()
{
GMTrace.i(13585384210432L, 101219);
this.jhd = new LinkedList();
GMTrace.o(13585384210432L, 101219);
}
protected final int a(int paramInt, Object... paramVarArgs)
{
GMTrace.i(13585518428160L, 101220);
if (paramInt == 0)
{
paramVarArgs = (b.a.a.c.a)paramVarArgs[0];
paramVarArgs.fk(1, this.jhc);
paramVarArgs.d(2, 8, this.jhd);
GMTrace.o(13585518428160L, 101220);
return 0;
}
int i;
if (paramInt == 1)
{
paramInt = b.a.a.a.fh(1, this.jhc);
i = b.a.a.a.c(2, 8, this.jhd);
GMTrace.o(13585518428160L, 101220);
return paramInt + 0 + i;
}
if (paramInt == 2)
{
paramVarArgs = (byte[])paramVarArgs[0];
this.jhd.clear();
paramVarArgs = new b.a.a.a.a(paramVarArgs, unknownTagHandler);
for (paramInt = com.tencent.mm.bm.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bm.a.a(paramVarArgs)) {
if (!super.a(paramVarArgs, this, paramInt)) {
paramVarArgs.csW();
}
}
GMTrace.o(13585518428160L, 101220);
return 0;
}
if (paramInt == 3)
{
Object localObject1 = (b.a.a.a.a)paramVarArgs[0];
aty localaty = (aty)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
switch (paramInt)
{
default:
GMTrace.o(13585518428160L, 101220);
return -1;
case 1:
localaty.jhc = ((b.a.a.a.a)localObject1).yqV.nj();
GMTrace.o(13585518428160L, 101220);
return 0;
}
paramVarArgs = ((b.a.a.a.a)localObject1).Gv(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
Object localObject2 = (byte[])paramVarArgs.get(paramInt);
localObject1 = new atx();
localObject2 = new b.a.a.a.a((byte[])localObject2, unknownTagHandler);
for (boolean bool = true; bool; bool = ((atx)localObject1).a((b.a.a.a.a)localObject2, (com.tencent.mm.bm.a)localObject1, com.tencent.mm.bm.a.a((b.a.a.a.a)localObject2))) {}
localaty.jhd.add(localObject1);
paramInt += 1;
}
GMTrace.o(13585518428160L, 101220);
return 0;
}
GMTrace.o(13585518428160L, 101220);
return -1;
}
}
/* Location: D:\tools\apktool\weixin6519android1140\jar\classes-dex2jar.jar!\com\tencent\mm\protocal\c\aty.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"robert0825@gmail.com"
] | robert0825@gmail.com |
06415af5addc5407f9bf58ef2c5aeed3ba9708ce | 7033053710cf2fd800e11ad609e9abbb57f1f17e | /cardayProject/carday-microservice/carday-api-service/src/main/java/com/cmdt/carday/microservice/model/request/rule/RuleDateTimeDto.java | 563681f1902b6ce63336508e80391b4b65c59907 | [] | no_license | chocoai/cardayforfjga | 731080f72c367c7d3b8e7844a1c3cd034cc11ee6 | 91d7c8314f44024825747e12a60324ffc3d43afb | refs/heads/master | 2020-04-29T02:14:07.834535 | 2018-04-02T09:51:07 | 2018-04-02T09:51:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 858 | java | package com.cmdt.carday.microservice.model.request.rule;
/**
* Created by zhengjun.jing on 6/6/2017.
*/
public class RuleDateTimeDto {
private String startDay;
private String endDay;
private String startTime;
private String endTime;
public String getStartDay() {
return startDay;
}
public void setStartDay(String startDay) {
this.startDay = startDay;
}
public String getEndDay() {
return endDay;
}
public void setEndDay(String endDay) {
this.endDay = endDay;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
}
| [
"xiaoxing.zhou@cm-dt.com"
] | xiaoxing.zhou@cm-dt.com |
e6ab5da371de9c8ac5f0236ca62e73c7b6a2ce1f | 68e8aa9c993f3daeb32322e02d75c2047cb0d742 | /src/main/java/com/zih/booking/system/config/FileMvcConfig.java | 0be17aac34bd8c90fb99589c02cf0191cb83f2df | [] | no_license | WZCtqs/booking | 129a5d45190f7f81146ecf41039f5df361c65c6a | 59171db0fd6ed4015db2967249947c263f7399b2 | refs/heads/main | 2023-03-03T14:52:06.457169 | 2021-02-17T08:55:09 | 2021-02-17T08:55:09 | 339,660,157 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 881 | java | package com.zih.booking.system.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class FileMvcConfig implements WebMvcConfigurer {
@Value("${file.staticAccessPath}")
private String staticAccessPath;
@Value("${file.uploadFolder}")
private String uploadFolder;
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
//文件磁盘图片url 映射
//配置server虚拟路径,handler为前台访问的目录,locations为files相对应的本地路径
registry.addResourceHandler(staticAccessPath).addResourceLocations("file:"+uploadFolder);
}
} | [
"1120159229@qq.com"
] | 1120159229@qq.com |
857c647c99247e90a05d65cc19b219469bea5608 | 896c75cc5b1af206f60da8aafa498de491bb4514 | /ThingCollection-application/src/main/java/br/com/gumga/thingcollection/application/repository/AuthorRepository.java | 71142faf905a6615894547cbe4f60b2a8fdbb2d2 | [] | no_license | willianmarquesfreire/ThingCollection | 543beb26302b147918c4c7a22da58294defc37e2 | 22133fe80e21b61ed7a973fd4cd992e29c43765c | refs/heads/master | 2021-08-25T17:09:04.893882 | 2016-08-10T15:14:05 | 2016-08-10T15:14:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 261 | java | package br.com.gumga.thingcollection.application.repository;
import gumga.framework.domain.repository.GumgaCrudRepository;
import br.com.gumga.thingcollection.domain.model.Author;
public interface AuthorRepository extends GumgaCrudRepository<Author, Long> {
} | [
"willianmarquesfreire@gmail.com"
] | willianmarquesfreire@gmail.com |
6510e17e9cf51b34918aac26c838c34a36ddd1cc | dffafa3283480e34144944878b7b8db9b7b78fed | /Cvac/src/main/java/cn/misection/cvac/ast/statement/ICvaStatement.java | c82f03e4097b41f86183e08c2f95350e7f54aa70 | [
"MIT"
] | permissive | WenTop1/Cva | 0bd1c3e1e2999c4104c82d62f08732514523cd0b | d9de791d73f82339f2b31019246f9a93a082da3f | refs/heads/master | 2023-03-19T13:13:53.779435 | 2021-03-08T08:24:01 | 2021-03-08T08:24:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 411 | java | package cn.misection.cvac.ast.statement;
import cn.misection.cvac.ast.IASTreeNode;
/**
* @author Military Intelligence 6 root
* @version 1.0.0
* @ClassName AbstractStatement
* @Description TODO
* @CreateTime 2021年02月14日 18:02:00
*/
@FunctionalInterface
public interface ICvaStatement extends IASTreeNode
{
/**
* 拿到enum;
* @return toEnum;
*/
EnumCvaStatement toEnum();
}
| [
"hlrongzun@qq.com"
] | hlrongzun@qq.com |
a0d6cbfc248d8798439069380bd5e029c43651ee | 283bc9b82fe856875e0985a3b1eacc1962dfd9fb | /subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptRunnerFactoryTest.java | 0c7347e31225fd65c4e9af09ab3db398519423f6 | [] | no_license | genail/gradle | a623085599d7e57186b2b5f008bfc889132b4e99 | 442a5e17d883a05bfd252b32d83a14f07b4e3db4 | refs/heads/master | 2021-01-15T20:33:32.692898 | 2010-06-26T04:43:03 | 2010-06-26T04:43:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,650 | java | /*
* Copyright 2010 the original author or authors.
*
* 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.gradle.groovy.scripts;
import org.gradle.api.GradleScriptException;
import org.gradle.api.logging.StandardOutputCapture;
import org.hamcrest.Description;
import org.jmock.Expectations;
import org.jmock.Sequence;
import org.jmock.api.Action;
import org.jmock.api.Invocation;
import org.jmock.integration.junit4.JMock;
import org.jmock.integration.junit4.JUnit4Mockery;
import org.jmock.lib.legacy.ClassImposteriser;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
@RunWith(JMock.class)
public class DefaultScriptRunnerFactoryTest {
private final JUnit4Mockery context = new JUnit4Mockery() {{
setImposteriser(ClassImposteriser.INSTANCE);
}};
private final Script scriptMock = context.mock(Script.class, "<script-to-string>");
private final StandardOutputCapture standardOutputCaptureMock = context.mock(StandardOutputCapture.class);
private final ClassLoader classLoaderDummy = context.mock(ClassLoader.class);
private final ScriptSource scriptSourceDummy = context.mock(ScriptSource.class);
private final ScriptExecutionListener scriptExecutionListenerMock = context.mock(ScriptExecutionListener.class);
private final DefaultScriptRunnerFactory factory = new DefaultScriptRunnerFactory(scriptExecutionListenerMock);
@Before
public void setUp() {
context.checking(new Expectations() {{
allowing(scriptMock).getStandardOutputCapture();
will(returnValue(standardOutputCaptureMock));
allowing(scriptMock).getScriptSource();
will(returnValue(scriptSourceDummy));
allowing(scriptMock).getContextClassloader();
will(returnValue(classLoaderDummy));
ignoring(scriptSourceDummy);
}});
}
@Test
public void createsScriptRunner() {
ScriptRunner<Script> scriptRunner = factory.create(scriptMock);
assertThat(scriptRunner.getScript(), sameInstance(scriptMock));
}
@Test
public void redirectsStandardOutputAndSetsContextClassLoaderWhenScriptIsRun() {
ScriptRunner<Script> scriptRunner = factory.create(scriptMock);
context.checking(new Expectations() {{
Sequence sequence = context.sequence("seq");
one(scriptExecutionListenerMock).beforeScript(scriptMock);
inSequence(sequence);
one(standardOutputCaptureMock).start();
inSequence(sequence);
one(scriptMock).run();
inSequence(sequence);
will(doAll(new Action() {
public void describeTo(Description description) {
description.appendValue("check context classloader");
}
public Object invoke(Invocation invocation) throws Throwable {
assertThat(Thread.currentThread().getContextClassLoader(), sameInstance(classLoaderDummy));
return null;
}
}));
one(standardOutputCaptureMock).stop();
inSequence(sequence);
one(scriptExecutionListenerMock).afterScript(scriptMock, null);
inSequence(sequence);
}});
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
assertThat(originalClassLoader, not(sameInstance(classLoaderDummy)));
scriptRunner.run();
assertThat(Thread.currentThread().getContextClassLoader(), sameInstance(originalClassLoader));
}
@Test
public void wrapsExecutionExceptionAndRestoresStateWhenScriptFails() {
final RuntimeException failure = new RuntimeException();
ScriptRunner<Script> scriptRunner = factory.create(scriptMock);
context.checking(new Expectations() {{
Sequence sequence = context.sequence("seq");
one(scriptExecutionListenerMock).beforeScript(scriptMock);
inSequence(sequence);
one(standardOutputCaptureMock).start();
inSequence(sequence);
one(scriptMock).run();
inSequence(sequence);
will(throwException(failure));
one(standardOutputCaptureMock).stop();
inSequence(sequence);
one(scriptExecutionListenerMock).afterScript(with(sameInstance(scriptMock)), with(notNullValue(Throwable.class)));
inSequence(sequence);
}});
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
assertThat(originalClassLoader, not(sameInstance(classLoaderDummy)));
try {
scriptRunner.run();
fail();
} catch (GradleScriptException e) {
assertThat(e.getMessage(), equalTo("A problem occurred evaluating <script-to-string>."));
assertThat(e.getCause(), sameInstance((Throwable) failure));
}
assertThat(Thread.currentThread().getContextClassLoader(), sameInstance(originalClassLoader));
}
}
| [
"a@rubygrapefruit.net"
] | a@rubygrapefruit.net |
6deff6dcb47d4da3428ab44c547ef9b31f4b4d4c | 2c9e87e4f44a0d0082ff4e630e0da3f736d3f6ed | /lswht-web/src/main/java/com/gofaner/game/lswht/service/impl/UserServiceImpl.java | 070293acca2afc58fb9a8e0aeefa858660f3ab82 | [] | no_license | EdenSun/game-lswht | 4f109c5d9b75d9ea54f043144ce689ae1f193fa3 | a9d54d88f30583e3cb63a4000f55ca279c1e5560 | refs/heads/master | 2021-01-10T18:29:45.316377 | 2014-09-22T05:11:26 | 2014-09-22T05:11:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,159 | java | package com.gofaner.game.lswht.service.impl;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gofaner.game.lswht.dao.UserMapper;
import com.gofaner.game.lswht.dto.ViewDTO;
import com.gofaner.game.lswht.exception.ServiceException;
import com.gofaner.game.lswht.model.User;
import com.gofaner.game.lswht.model.UserExample;
import com.gofaner.game.lswht.model.UserExample.Criteria;
import com.gofaner.game.lswht.service.IUserService;
@Service
public class UserServiceImpl implements IUserService {
@Autowired
private UserMapper userMapper;
@Override
public void resetPlayTime() throws ServiceException {
userMapper.resetPlayTime();
}
@Override
public ViewDTO<Integer> getPlayTime(String loginToken)
throws ServiceException {
User user = this.getByLoginToken(loginToken);
ViewDTO<Integer> view = new ViewDTO<Integer>();
if( user == null ){
view.setMsg("user is not exists.");
return view;
}
view.setData(user.getPlayTimes());
return view;
}
private User getByLoginToken(String loginToken) throws ServiceException {
UserExample example = new UserExample();
Criteria criteria = example.createCriteria();
criteria.andLoginTokenEqualTo(loginToken);
List<User> userList = userMapper.selectByExample(example);
if( userList == null || userList.size() == 0 ){
return null;
}
return userList.get(0);
}
@Override
public User getByAccount(String account) throws ServiceException {
UserExample example = new UserExample();
Criteria criteria = example.createCriteria();
criteria.andAccountEqualTo(account);
List<User> userList = userMapper.selectByExample(example);
if( userList == null || userList.size() == 0 ){
return null;
}
return userList.get(0);
}
@Override
public User saveUserByAccount(String account) throws ServiceException {
if( account == null ){
throw new ServiceException("参数错误");
}
User user = new User();
user.setAccount(account);
user.setCreateTime(new Date());
userMapper.insertSelective(user);
return user;
}
}
| [
"durian.suen@gmail.com"
] | durian.suen@gmail.com |
68c7f174dad8f8b354fe7cf73113cb8f30e98e4e | 0106d23ea81ddd2c46b484fbff833733946050b4 | /app/src/main/java/com/xiaobukuaipao/youngmam/view/SpecialCardHeadView.java | ba9c14b4e2ee380e00248fe53ce199ff0556dcdb | [] | no_license | wanghaihui/Youngmam | df7c4249cc20765bfc738339630896a1519059fe | 64b8ddc1b0b3b791fd9eb32731be4ae147a39db3 | refs/heads/master | 2021-01-10T01:35:17.707653 | 2016-02-18T07:54:58 | 2016-02-18T07:54:58 | 51,988,276 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,215 | java | package com.xiaobukuaipao.youngmam.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.Gravity;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.xiaobukuaipao.youngmam.R;
/**
* Created by xiaobu1 on 15-7-8.
*/
public class SpecialCardHeadView extends ImageView {
public SpecialCardHeadView(Context context) {
this(context, null);
}
public SpecialCardHeadView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public SpecialCardHeadView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init(context, attrs, defStyleAttr);
}
/**
* 初始化ActionBar
*/
private void init(Context context, AttributeSet attrs, int defStyleAttr) {
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT);
params.setMargins(0, context.getResources().getDimensionPixelOffset(R.dimen.activity_basic_margin_15dp), 0, 0);
params.gravity = Gravity.CENTER;
setLayoutParams(params);
}
}
| [
"465495722@qq.com"
] | 465495722@qq.com |
7292fcf3e2d8822d22bacdcb861b45e40a5b94af | 5ecd15baa833422572480fad3946e0e16a389000 | /framework/Synergetics-Open/subsystems/osgi-jpox/main/api/java/com/volantis/osgi/jdo/OSGiPersistenceManagerFactory.java | 563549953070162759f18dd294675bbfacaf3577 | [] | no_license | jabley/volmobserverce | 4c5db36ef72c3bb7ef20fb81855e18e9b53823b9 | 6d760f27ac5917533eca6708f389ed9347c7016d | refs/heads/master | 2021-01-01T05:31:21.902535 | 2009-02-04T02:29:06 | 2009-02-04T02:29:06 | 38,675,289 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,792 | java | /* ----------------------------------------------------------------------------
* (c) Volantis Systems Ltd 2006. All Rights Reserved.
* ----------------------------------------------------------------------------
*/
package com.volantis.osgi.jdo;
import org.osgi.framework.Bundle;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;
import javax.jdo.datastore.DataStoreCache;
import javax.jdo.listener.InstanceLifecycleListener;
import java.util.Collection;
import java.util.Properties;
public class OSGiPersistenceManagerFactory
implements PersistenceManagerFactory {
private final PersistenceManagerFactory factory;
private final Bundle bundle;
public OSGiPersistenceManagerFactory(
Bundle bundle, PersistenceManagerFactory factory) {
this.bundle = bundle;
this.factory = factory;
}
public void close() {
factory.close();
}
public boolean isClosed() {
return factory.isClosed();
}
public PersistenceManager getPersistenceManager() {
ClassLoader oldLoader = OSGiHelper.pushContextClassLoader(bundle);
try {
return factory.getPersistenceManager();
} finally {
OSGiHelper.popContextClassLoader(oldLoader);
}
}
public PersistenceManager getPersistenceManager(
String userid, String password) {
ClassLoader oldLoader = OSGiHelper.pushContextClassLoader(bundle);
try {
return factory.getPersistenceManager(userid, password);
} finally {
OSGiHelper.popContextClassLoader(oldLoader);
}
}
public void setConnectionUserName(String userName) {
factory.setConnectionUserName(userName);
}
public String getConnectionUserName() {
return factory.getConnectionUserName();
}
public void setConnectionPassword(String password) {
factory.setConnectionPassword(password);
}
public void setConnectionURL(String url) {
factory.setConnectionURL(url);
}
public String getConnectionURL() {
return factory.getConnectionURL();
}
public void setConnectionDriverName(String driverName) {
factory.setConnectionDriverName(driverName);
}
public String getConnectionDriverName() {
return factory.getConnectionDriverName();
}
public void setConnectionFactoryName(String connectionFactoryName) {
factory.setConnectionFactoryName(connectionFactoryName);
}
public String getConnectionFactoryName() {
return factory.getConnectionFactoryName();
}
public void setConnectionFactory(Object connectionFactory) {
factory.setConnectionFactory(connectionFactory);
}
public Object getConnectionFactory() {
return factory.getConnectionFactory();
}
public void setConnectionFactory2Name(String connectionFactoryName) {
factory.setConnectionFactory2Name(connectionFactoryName);
}
public String getConnectionFactory2Name() {
return factory.getConnectionFactory2Name();
}
public void setConnectionFactory2(Object connectionFactory) {
factory.setConnectionFactory2(connectionFactory);
}
public Object getConnectionFactory2() {
return factory.getConnectionFactory2();
}
public void setMultithreaded(boolean flag) {
factory.setMultithreaded(flag);
}
public boolean getMultithreaded() {
return factory.getMultithreaded();
}
public void setMapping(String mapping) {
factory.setMapping(mapping);
}
public String getMapping() {
return factory.getMapping();
}
public void setOptimistic(boolean flag) {
factory.setOptimistic(flag);
}
public boolean getOptimistic() {
return factory.getOptimistic();
}
public void setRetainValues(boolean flag) {
factory.setRetainValues(flag);
}
public boolean getRetainValues() {
return factory.getRetainValues();
}
public void setRestoreValues(boolean restoreValues) {
factory.setRestoreValues(restoreValues);
}
public boolean getRestoreValues() {
return factory.getRestoreValues();
}
public void setNontransactionalRead(boolean flag) {
factory.setNontransactionalRead(flag);
}
public boolean getNontransactionalRead() {
return factory.getNontransactionalRead();
}
public void setNontransactionalWrite(boolean flag) {
factory.setNontransactionalWrite(flag);
}
public boolean getNontransactionalWrite() {
return factory.getNontransactionalWrite();
}
public void setIgnoreCache(boolean flag) {
factory.setIgnoreCache(flag);
}
public boolean getIgnoreCache() {
return factory.getIgnoreCache();
}
public boolean getDetachAllOnCommit() {
return factory.getDetachAllOnCommit();
}
public void setDetachAllOnCommit(boolean flag) {
factory.setDetachAllOnCommit(flag);
}
public Properties getProperties() {
return factory.getProperties();
}
public Collection supportedOptions() {
return factory.supportedOptions();
}
public DataStoreCache getDataStoreCache() {
return factory.getDataStoreCache();
}
public void addInstanceLifecycleListener(
InstanceLifecycleListener instanceLifecycleListener,
Class[] classes) {
factory.addInstanceLifecycleListener(instanceLifecycleListener,
classes);
}
public void removeInstanceLifecycleListener(
InstanceLifecycleListener instanceLifecycleListener) {
factory.removeInstanceLifecycleListener(instanceLifecycleListener);
}
}
| [
"iwilloug@b642a0b7-b348-0410-9912-e4a34d632523"
] | iwilloug@b642a0b7-b348-0410-9912-e4a34d632523 |
cf7783f5d78d3af592164504b396289e7d517264 | cc65e10feea55bfa97cade23176cd6e574d3bbea | /commons/commons-redis/src/main/java/com/imall/commons/redis/RedisCacheInitBean.java | a81582250289f29b986d925bab15310134b3ce7c | [] | no_license | weishihuai/imallCloudc | ef5a0d7e4866ad7e63251dff512afede7246bd4f | f3163208eaf539aa63dc9e042d2ff6c7403aa405 | refs/heads/master | 2021-08-20T05:42:23.717707 | 2017-11-28T09:10:36 | 2017-11-28T09:10:36 | 112,305,704 | 2 | 4 | null | null | null | null | UTF-8 | Java | false | false | 2,493 | java | package com.imall.commons.redis;
import com.imall.commons.redis.annotation.RedisCacheable;
import com.imall.commons.redis.util.EntityCacheInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import java.util.Map;
public class RedisCacheInitBean implements ApplicationContextAware, InitializingBean {
private static final Logger LOGGER = LoggerFactory.getLogger(RedisCacheInitBean.class);
private static final String DATE_PATTERN = "yyMMddHHmmssSSS";
private static final String REDIS_CACHEABLE_ENTITY_KEYS = "redisCacheableEntityKeys";
@Override
public void setApplicationContext(ApplicationContext ctx) throws BeansException {
Map<String, Object> serviceBeanMap = ctx.getBeansWithAnnotation(RedisCacheable.class);
if (!serviceBeanMap.isEmpty()) {
for (Object bean : serviceBeanMap.values()) {
RedisCacheable redisCacheable = bean.getClass().getAnnotation(RedisCacheable.class);
System.out.println("使用到缓存的类=" + redisCacheable.value().getName());
//entityKey格式例如:iportal:com.imall.iportal.core.entity.SysApp
String entityKey = redisCacheable.appName() + ":" + redisCacheable.value().getName();
if (RedisUtil.sIsMember(REDIS_CACHEABLE_ENTITY_KEYS, entityKey)) {
continue;
}
EntityCacheInfo entityCacheInfo = new EntityCacheInfo();
entityCacheInfo.setCacheEntityName(redisCacheable.value().getSimpleName());
entityCacheInfo.setCacheEntityPath(redisCacheable.value().getName());
entityCacheInfo.setAppName(redisCacheable.appName());
entityCacheInfo.setCacheEntityExpireSeconds(86400);
entityCacheInfo.setRequestCount(0);
entityCacheInfo.setWriteCount(0);
entityCacheInfo.setHitCount(0);
entityCacheInfo.setClearCount(0);
entityCacheInfo.setKey(entityKey);
RedisUtil.sAdd(REDIS_CACHEABLE_ENTITY_KEYS, entityKey);
RedisUtil.putNotEx(entityKey, entityCacheInfo);
}
}
}
@Override
public void afterPropertiesSet() throws Exception {
}
}
| [
"34024258+weishihuai@users.noreply.github.com"
] | 34024258+weishihuai@users.noreply.github.com |
711a11aeec4d9e2c2aeff7beb4d23de158b7e689 | 4e1c4ff181c3673e7c1abc230a01e0b38b8c2ad4 | /common/src/java/org/jppf/management/spi/JPPFMBeanProvider.java | fe63911bab4dbb075da33dc327cbe86be2ee1cdc | [
"Apache-2.0"
] | permissive | trinhpham/JPPF | b864cfb00cf97cdd9618a44993ff18ec15861a43 | bb8ae8a59edc6bdf28b83961874199746c3ff1d4 | refs/heads/master | 2020-03-24T16:48:59.623812 | 2018-07-30T06:19:33 | 2018-07-30T06:19:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,349 | java | /*
* JPPF.
* Copyright (C) 2005-2017 JPPF Team.
* http://www.jppf.org
*
* 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.jppf.management.spi;
/**
* Service provider interface for pluggable management beans.
* @author Laurent Cohen
*/
public interface JPPFMBeanProvider
{
/**
* Return the fully qualified name of the management interface defined by this provider.
* @return the fully qualified interface name as a string.
*/
String getMBeanInterfaceName();
/**
* Return the name of the specified MBean.<br>
* This is the name under which the MBean will be registered with the MBean server.
* It must be a valid object name, as specified in the documentation for {@link javax.management.ObjectName ObjectName}.
* @return the MBean name for this MBean provider.
*/
String getMBeanName();
}
| [
"lolocohen@e7e8ced0-bd8d-47ad-80f2-b228e06c1907"
] | lolocohen@e7e8ced0-bd8d-47ad-80f2-b228e06c1907 |
8478cd439b2c47a1c7fd8c2c4570b4678845bf07 | a82ffa9487703b15ed9af9d8e791129c24b3e6a2 | /2.JavaCore/src/com/javarush/task/task13/task1327/Person.java | 656e18a63386be387a93c21cc5071fdb8b9dabac | [] | no_license | dinikoff/JavaRushTasks | 53d9b31acfdd154d847045debb410297e848ac7a | d7ecd4b0ec6acdb93c33301aa738138e4ce3ca8f | refs/heads/master | 2020-03-20T11:16:57.260238 | 2018-10-31T19:01:27 | 2018-10-31T19:01:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 690 | java | package com.javarush.task.task13.task1327;
public class Person implements RepkaItem {
private String name;
private String namePadezh;
public Person(String name, String namePadezh) {
this.name = name;
this.namePadezh = namePadezh;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNamePadezh() {
return namePadezh;
}
public void setNamePadezh(String namePadezh) {
this.namePadezh = namePadezh;
}
public void pull (Person person) {
System.out.println(this.getName() + " за " + person.getNamePadezh());
}
}
| [
"zarazablin@gmail.com"
] | zarazablin@gmail.com |
f2ba53c9bbb104094ac323255f9acf88366edcac | 4338580e7ee938dc2254cc97dd17a3e59dc52f50 | /05. JavaScript and AJAX/Exercise/Resident Evil Part II/src/main/java/org/softuni/residentevil/domain/validation/annotations/composite/virus/ValidVirusMutation.java | 60411bd961a7e1315b5f66bf8e6baa5bc4e632f4 | [
"MIT"
] | permissive | Martin-BG/SoftUni-Java-MVC-Frameworks-Spring-Feb-2019 | 3b588c3acd69af070c9ca28f95c013459e8cc301 | 0d55098fe41cbea3c81ca2879f710418a4e7e2ed | refs/heads/master | 2022-01-30T01:32:34.117843 | 2019-08-29T14:20:45 | 2019-08-29T14:20:45 | 172,678,699 | 1 | 2 | MIT | 2022-01-21T23:24:03 | 2019-02-26T09:21:11 | Java | UTF-8 | Java | false | false | 954 | java | package org.softuni.residentevil.domain.validation.annotations.composite.virus;
import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.constraints.NotNull;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Mutation – Cannot be null.
* <ul> Should hold one of the following values:
* <li>ZOMBIE</li>
* <li>T_078_TYRANT</li>
* <li>GIANT_SPIDER</li>
* </ul>
*/
@NotNull(message = "{virus.mutation.null}")
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER})
@Retention(RUNTIME)
@Constraint(validatedBy = {})
@Documented
public @interface ValidVirusMutation {
int MAX_LENGTH = 12;
String message() default "";
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
| [
"MartinBG@abv.bg"
] | MartinBG@abv.bg |
5c4994aec628bd7cfeef61a08b42a0b8a882093d | 59d6eda4ee7bd7ddf0c4f69ccd693a41f504dc3d | /src/main/java/com/raoulvdberge/refinedstorageaddons/proxy/ProxyClient.java | 6083427d84acafbb0f74b54d3c6b1cacda5c08d4 | [
"MIT"
] | permissive | TartaricAcid/refinedstorageaddons | 0f27e8c7b5a2c9e763dc9c7895f38c5526f27051 | 624040c6173cdcbf01cf83a7885c172a04745b2e | refs/heads/master | 2021-01-01T06:56:11.450237 | 2017-07-18T04:13:25 | 2017-07-18T04:13:25 | 97,551,374 | 0 | 0 | null | 2017-07-18T04:07:25 | 2017-07-18T04:07:25 | null | UTF-8 | Java | false | false | 666 | java | package com.raoulvdberge.refinedstorageaddons.proxy;
import com.raoulvdberge.refinedstorageaddons.RSAddonsItems;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.model.ModelLoader;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class ProxyClient extends ProxyCommon {
@SubscribeEvent
public void registerModels(ModelBakeEvent e) {
ModelLoader.setCustomModelResourceLocation(RSAddonsItems.WIRELESS_CRAFTING_GRID, 0, new ModelResourceLocation("refinedstorageaddons:wireless_crafting_grid", "inventory"));
}
}
| [
"raoulvdberge@gmail.com"
] | raoulvdberge@gmail.com |
77be94d1ab34b37a466e950c8c0d16db2eb3e0fe | ec9bf57a07b7b06134ec7a21407a11f69cc644f7 | /src/afc.java | 236c130050cab3523c835d1574d68f3cbcff38bb | [] | no_license | jzarca01/com.ubercab | f95c12cab7a28f05e8f1d1a9d8a12a5ac7fbf4b1 | e6b454fb0ad547287ae4e71e59d6b9482369647a | refs/heads/master | 2020-06-21T04:37:43.723581 | 2016-07-19T16:30:34 | 2016-07-19T16:30:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 342 | java | @aih
public final class afc
{
private final long a;
private final String b;
private final afc c;
public afc(long paramLong, String paramString, afc paramafc)
{
a = paramLong;
b = paramString;
c = paramafc;
}
}
/* Location:
* Qualified Name: afc
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"reverseengineeringer@hackeradmin.com"
] | reverseengineeringer@hackeradmin.com |
98020b35b754366cac1e6ad9bc7355cbedcabe56 | 44cf55948283f2201570991a2c9d34ebd57bae5e | /Java 1ª Evaluación/JavaApplication4/src/javaapplication4/JavaApplication4.java | c26cb94d4e47d44d24c91604ce2279775ede551d | [] | no_license | LDHugeman/DAM_1 | bb96fc05795b66a8e5fda356d40163d8ab6e35ff | 4711f878b12cf9d8adcdcad2a4f104ddd1d45e26 | refs/heads/master | 2020-03-29T03:48:53.352432 | 2019-05-23T20:35:25 | 2019-05-23T20:35:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 437 | 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 javaapplication4;
/**
*
* @author a18luisdvp
*/
public class JavaApplication4 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println("Hello world");
}
}
| [
"luisdavid.vp@gmail.com"
] | luisdavid.vp@gmail.com |
fa7b4c333fe4a8fd6eff5921cc5c8af52b4461d9 | 7bc44ea5026e09ce0a1020a510bc11db66338142 | /FEL/src/main/java/com/yahoo/semsearch/fastlinking/view/StringAndCandidate.java | d2727330cbf57db3ca6f49d295cf190789fe3cf6 | [] | no_license | WeilerWebServices/Yahoo | 92636d2f091ea48f65ec3920db2f7c1531094526 | 648c832d0dadea16d5ae32c516d954b5dad3b279 | refs/heads/master | 2022-12-27T10:39:56.323937 | 2020-10-15T11:27:00 | 2020-10-15T11:27:00 | 301,539,366 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 484 | java | /**
Copyright 2016, Yahoo Inc.
Licensed under the terms of the Apache License 2.0. See LICENSE file at the project root for terms.
**/
package com.yahoo.semsearch.fastlinking.view;
/**
* Holder for a pair (surface form, info)
* surface form is represented with a String and the information about the alias with a @see CandidatesInfo object
*
* @author roi blanco
*/
public class StringAndCandidate {
public CandidatesInfo candidatesInfo;
public String surfaceForm;
} | [
"nateweiler84@gmail.com"
] | nateweiler84@gmail.com |
16a8bbc6748c4c941d009744f7b4f12d87c7c8ec | 9d172524ec55d7b0d22b3b67941833d9c993933c | /depaul/csc435/Mimer/myDataArray.java | b7c13e65ec0cec0218a9d46a1aa91a7aac5c464e | [] | no_license | shawnchris/java | 37b47bdbf2c8e2dfeba5d98e8e4ad3f14f791037 | 02404c0e7468ffd6e18cc1f3246b59314994602c | refs/heads/master | 2023-03-08T14:01:51.243074 | 2023-03-04T02:27:20 | 2023-03-04T02:27:20 | 54,849,893 | 5 | 4 | null | null | null | null | UTF-8 | Java | false | false | 272 | java | package depaul.csc435.Mimer;
import java.util.ArrayList;
public class myDataArray {
public int num_lines = 0;
// I modified the data structure to use ArrayList. So don't need to worry about overflow.
public ArrayList<String> lines = new ArrayList<String>();
} | [
"shawn.chris.gao@outlook.com"
] | shawn.chris.gao@outlook.com |
a2f315c32909f673741a762b2b197c38fbc59558 | 5e4100a6611443d0eaa8774a4436b890cfc79096 | /src/main/java/com/alipay/api/domain/LoanRepayPlanTerm.java | fced0d4d1c6dd6f51d1b7bb789c9372898d0ef4f | [
"Apache-2.0"
] | permissive | coderJL/alipay-sdk-java-all | 3b471c5824338e177df6bbe73ba11fde8bc51a01 | 4f4ed34aaf5a320a53a091221e1832f1fe3c3a87 | refs/heads/master | 2020-07-15T22:57:13.705730 | 2019-08-14T10:37:41 | 2019-08-14T10:37:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,416 | java | package com.alipay.api.domain;
import java.util.Date;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 还款计划分期信息
*
* @author auto create
* @since 1.0, 2017-10-30 11:35:46
*/
public class LoanRepayPlanTerm extends AlipayObject {
private static final long serialVersionUID = 3531927128931481421L;
/**
* 是否当前期
*/
@ApiField("current_term")
private Boolean currentTerm;
/**
* 当期已还金额
*/
@ApiField("paid_amt")
private LoanMoneyTypeAmt paidAmt;
/**
* 剩余应还金额
*/
@ApiField("remain_amt")
private LoanMoneyTypeAmt remainAmt;
/**
* 分期状态,目前支持的分期状态有:
NORMAL: 正常
OVD: 逾期
CLEAR: 结清
*/
@ApiField("status")
private String status;
/**
* 本期到期日
*/
@ApiField("term_end_date")
private Date termEndDate;
/**
* 期次号
*/
@ApiField("term_no")
private Long termNo;
/**
* 本期开始日
*/
@ApiField("term_start_date")
private Date termStartDate;
/**
* 当期总金额
*/
@ApiField("total_amt")
private LoanMoneyTypeAmt totalAmt;
public Boolean getCurrentTerm() {
return this.currentTerm;
}
public void setCurrentTerm(Boolean currentTerm) {
this.currentTerm = currentTerm;
}
public LoanMoneyTypeAmt getPaidAmt() {
return this.paidAmt;
}
public void setPaidAmt(LoanMoneyTypeAmt paidAmt) {
this.paidAmt = paidAmt;
}
public LoanMoneyTypeAmt getRemainAmt() {
return this.remainAmt;
}
public void setRemainAmt(LoanMoneyTypeAmt remainAmt) {
this.remainAmt = remainAmt;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getTermEndDate() {
return this.termEndDate;
}
public void setTermEndDate(Date termEndDate) {
this.termEndDate = termEndDate;
}
public Long getTermNo() {
return this.termNo;
}
public void setTermNo(Long termNo) {
this.termNo = termNo;
}
public Date getTermStartDate() {
return this.termStartDate;
}
public void setTermStartDate(Date termStartDate) {
this.termStartDate = termStartDate;
}
public LoanMoneyTypeAmt getTotalAmt() {
return this.totalAmt;
}
public void setTotalAmt(LoanMoneyTypeAmt totalAmt) {
this.totalAmt = totalAmt;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
832c863bb89c85b7dca3d18f65c86bbc4a949df4 | 4e91e0220cfc734491b69fe8f33a29ffa62ce966 | /jOOQ/src/main/java/org/jooq/MergeNotMatchedValuesStep19.java | c2847815a2f45e9e92641000ede64e6bb2c9da3a | [
"Apache-2.0"
] | permissive | elenaem26/jOOQ | 7dc4108a4e917d3bc7b59324a415145d9af087a3 | 56dda2b08d420c64469a9ac7bc7d3fb15e842919 | refs/heads/main | 2023-01-19T20:03:58.947915 | 2020-11-18T16:32:45 | 2020-11-18T16:32:45 | 313,946,107 | 0 | 0 | NOASSERTION | 2020-11-18T13:39:07 | 2020-11-18T13:39:06 | null | UTF-8 | Java | false | false | 3,359 | java | /*
* 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.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq;
import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.DERBY;
import static org.jooq.SQLDialect.FIREBIRD;
import static org.jooq.SQLDialect.H2;
// ...
import static org.jooq.SQLDialect.HSQLDB;
// ...
// ...
// ...
// ...
// ...
import java.util.Collection;
import org.jetbrains.annotations.NotNull;
/**
* This type is used for the {@link Merge}'s DSL API.
* <p>
* Example: <code><pre>
* DSLContext create = DSL.using(configuration);
*
* create.mergeInto(table)
* .using(select)
* .on(condition)
* .whenMatchedThenUpdate()
* .set(field1, value1)
* .set(field2, value2)
* .whenNotMatchedThenInsert(field1, field2)
* .values(value1, value2)
* .execute();
* </pre></code>
*
* @author Lukas Eder
*/
public interface MergeNotMatchedValuesStep19<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19> {
/**
* Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code>
* statement's <code>WHEN NOT MATCHED THEN INSERT</code> clause.
*/
@NotNull
@Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB })
MergeNotMatchedWhereStep<R> values(T1 value1, T2 value2, T3 value3, T4 value4, T5 value5, T6 value6, T7 value7, T8 value8, T9 value9, T10 value10, T11 value11, T12 value12, T13 value13, T14 value14, T15 value15, T16 value16, T17 value17, T18 value18, T19 value19);
/**
* Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code>
* statement's <code>WHEN NOT MATCHED THEN INSERT</code> clause.
*/
@NotNull
@Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB })
MergeNotMatchedWhereStep<R> values(Field<T1> value1, Field<T2> value2, Field<T3> value3, Field<T4> value4, Field<T5> value5, Field<T6> value6, Field<T7> value7, Field<T8> value8, Field<T9> value9, Field<T10> value10, Field<T11> value11, Field<T12> value12, Field<T13> value13, Field<T14> value14, Field<T15> value15, Field<T16> value16, Field<T17> value17, Field<T18> value18, Field<T19> value19);
/**
* Set <code>VALUES</code> for <code>INSERT</code> in the <code>MERGE</code>
* statement's <code>WHEN NOT MATCHED THEN INSERT</code> clause.
*/
@NotNull
@Support({ CUBRID, DERBY, FIREBIRD, H2, HSQLDB })
MergeNotMatchedWhereStep<R> values(Collection<?> values);
}
| [
"lukas.eder@gmail.com"
] | lukas.eder@gmail.com |
5ad7fb7cb0136a0bd1abf94a4a67926ef03dc466 | 9499cdcad9a9197983121c0ebfef93cf453fa1eb | /server/offline-service/src/main/java/cn/kt/mall/offline/vo/GoodUpVO.java | 88a71bce917d98413a4cc6dddaedbcd2705e01bd | [] | no_license | GaRyXiaoPh/shop | a9603bbc24db4468341c0df943e5f837f50126d7 | 263d5293001016fb51e8a231e1b7d7e521ad85f4 | refs/heads/master | 2020-04-12T09:59:59.407392 | 2018-12-19T09:43:29 | 2018-12-19T09:43:29 | 162,415,594 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 756 | java | package cn.kt.mall.offline.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import java.io.Serializable;
/**
* Created by Administrator on 2018/4/28.
*/
@ApiModel(description = "商品请求体")
@Setter
@Getter
@NoArgsConstructor
public class GoodUpVO implements Serializable{
@ApiModelProperty("商品id")
private String id;
@ApiModelProperty("商品名称")
private String name;
@ApiModelProperty("商品价格")
private Double price;
@ApiModelProperty("商品图片数组")
private String[] goodsPic;
@ApiModelProperty("商品详情图片数组")
private String[] goodDetailPic;
}
| [
"474566234@qq.com"
] | 474566234@qq.com |
170b69411ab98f9554990796366400f8864ef244 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/nearby/video/NearbyVideoPresenter.java | 1bb04fe34f1e91dd796f0d1a6aebf89c6443b5e1 | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 232 | java | // INTERNAL ERROR //
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar
* Qualified Name: com.tencent.mm.plugin.finder.nearby.video.NearbyVideoPresenter
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
8fbfe319459acad89191c41ddf4aaa4f502d56e9 | 4d0f2d62d1c156d936d028482561585207fb1e49 | /Ma nguon/zcs-8.0.2_GA_5570-src/ZimbraServer/src/java-test/com/zimbra/cs/service/mail/SendShareNotificationTest.java | ac3254c263801fd26e7b8ff9e867e5565d5b3f5b | [] | no_license | vuhung/06-email-captinh | e3f0ff2e84f1c2bc6bdd6e4167cd7107ec42c0bd | af828ac73fc8096a3cc096806c8080e54d41251f | refs/heads/master | 2020-07-08T09:09:19.146159 | 2013-05-18T12:57:24 | 2013-05-18T12:57:24 | 32,319,083 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 7,970 | java | /*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2011 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
* ***** END LICENSE BLOCK *****
*/
package com.zimbra.cs.service.mail;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.UUID;
import javax.mail.Address;
import javax.mail.BodyPart;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import com.google.common.collect.Maps;
import com.zimbra.common.account.Key;
import com.zimbra.common.mime.MimeConstants;
import com.zimbra.common.service.ServiceException;
import com.zimbra.common.soap.Element;
import com.zimbra.common.soap.MailConstants;
import com.zimbra.cs.account.Account;
import com.zimbra.cs.account.Provisioning;
import com.zimbra.cs.account.ShareInfoData;
import com.zimbra.cs.mailbox.ACL;
import com.zimbra.cs.mailbox.Folder;
import com.zimbra.cs.mailbox.MailItem;
import com.zimbra.cs.mailbox.MailSender;
import com.zimbra.cs.mailbox.Mailbox;
import com.zimbra.cs.mailbox.MailboxTestUtil;
import com.zimbra.cs.mailbox.Mailbox.MailboxData;
import com.zimbra.cs.mailbox.MailboxManager;
import com.zimbra.cs.service.util.ItemId;
import com.zimbra.soap.mail.message.SendShareNotificationRequest;
public class SendShareNotificationTest extends SendShareNotification {
@Override
protected MimeMessage generateShareNotification(Account authAccount, Account ownerAccount, ShareInfoData sid,
String notes, SendShareNotificationRequest.Action action,
Collection<String> internalRecipients, String externalRecipient)
throws ServiceException, MessagingException {
MimeMessage mm = super.generateShareNotification(authAccount, ownerAccount,
sid, notes, action, internalRecipients, externalRecipient);
try {
MimeMultipart mmp = (MimeMultipart)mm.getContent();
BodyPart bp = mmp.getBodyPart(2);
Assert.assertTrue(bp.getContentType().startsWith(MimeConstants.CT_XML_ZIMBRA_SHARE));
Element share = Element.parseXML(bp.getInputStream());
if (revoke) {
Assert.assertEquals(share.getQName().getName(), MailConstants.ShareConstants.E_REVOKE);
} else {
Assert.assertEquals(share.getQName().getName(), MailConstants.ShareConstants.E_SHARE);
}
} catch (Exception e) {
Assert.fail(e.getMessage());
}
return mm;
}
static boolean revoke;
@BeforeClass
public static void init() throws Exception {
MailboxTestUtil.initServer();
Provisioning prov = Provisioning.getInstance();
Map<String, Object> attrs = Maps.newHashMap();
prov.createDomain("zimbra.com", attrs);
attrs = Maps.newHashMap();
prov.createAccount("test@zimbra.com", "secret", attrs);
attrs = Maps.newHashMap();
attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
prov.createAccount("test2@zimbra.com", "secret", attrs);
attrs = Maps.newHashMap();
attrs.put(Provisioning.A_zimbraId, UUID.randomUUID().toString());
prov.createAccount("test3@zimbra.com", "secret", attrs);
// this MailboxManager does everything except actually send mail
MailboxManager.setInstance(new MailboxManager() {
@Override
protected Mailbox instantiateMailbox(MailboxData data) {
return new Mailbox(data) {
@Override
public MailSender getMailSender() {
return new MailSender() {
@Override
protected Collection<Address> sendMessage(Mailbox mbox, MimeMessage mm, Collection<RollbackData> rollbacks)
throws SafeMessagingException, IOException {
try {
return Arrays.asList(getRecipients(mm));
} catch (Exception e) {
return Collections.emptyList();
}
}
};
}
};
}
});
}
@Before
public void setUp() throws Exception {
MailboxTestUtil.clearData();
}
@Test
public void shareByOwner() throws Exception {
revoke = false;
Account acct = Provisioning.getInstance().get(Key.AccountBy.name, "test@zimbra.com");
Account acct2 = Provisioning.getInstance().get(Key.AccountBy.name, "test2@zimbra.com");
Mailbox mbox = MailboxManager.getInstance().getMailboxByAccount(acct);
Folder f = mbox.createFolder(null, "f1", Mailbox.ID_FOLDER_BRIEFCASE, new Folder.FolderOptions().setDefaultView(MailItem.Type.DOCUMENT));
mbox.grantAccess(null, f.getId(), acct2.getId(), ACL.GRANTEE_USER, ACL.RIGHT_ADMIN, null);
Element request = new Element.XMLElement(MailConstants.SEND_SHARE_NOTIFICATION_REQUEST);
request.addElement(MailConstants.E_ITEM).addAttribute(MailConstants.A_ID, f.getId());
request.addElement(MailConstants.E_EMAIL).addAttribute(MailConstants.A_ADDRESS, "test2@zimbra.com");
handle(request, ServiceTestUtil.getRequestContext(acct));
}
@Test
public void shareByAdmin() throws Exception {
revoke = false;
Account acct = Provisioning.getInstance().get(Key.AccountBy.name, "test@zimbra.com");
Account acct2 = Provisioning.getInstance().get(Key.AccountBy.name, "test2@zimbra.com");
Account acct3 = Provisioning.getInstance().get(Key.AccountBy.name, "test3@zimbra.com");
Mailbox mbox = MailboxManager.getInstance().getMailboxByAccount(acct);
Folder f = mbox.createFolder(null, "f1", Mailbox.ID_FOLDER_BRIEFCASE, new Folder.FolderOptions().setDefaultView(MailItem.Type.DOCUMENT));
mbox.grantAccess(null, f.getId(), acct2.getId(), ACL.GRANTEE_USER, ACL.RIGHT_ADMIN, null);
mbox.grantAccess(null, f.getId(), acct3.getId(), ACL.GRANTEE_USER, ACL.RIGHT_ADMIN, null);
Element request = new Element.XMLElement(MailConstants.SEND_SHARE_NOTIFICATION_REQUEST);
request.addElement(MailConstants.E_ITEM).addAttribute(MailConstants.A_ID, new ItemId(acct.getId(), f.getId()).toString());
request.addElement(MailConstants.E_EMAIL).addAttribute(MailConstants.A_ADDRESS, "test3@zimbra.com");
handle(request, ServiceTestUtil.getRequestContext(acct));
}
@Test
public void revoke() throws Exception {
revoke = true;
Account acct = Provisioning.getInstance().get(Key.AccountBy.name, "test@zimbra.com");
Mailbox mbox = MailboxManager.getInstance().getMailboxByAccount(acct);
Folder f = mbox.createFolder(null, "f1", Mailbox.ID_FOLDER_BRIEFCASE, new Folder.FolderOptions().setDefaultView(MailItem.Type.DOCUMENT));
Element request = new Element.XMLElement(MailConstants.SEND_SHARE_NOTIFICATION_REQUEST);
request.addAttribute(MailConstants.A_ACTION, "revoke");
request.addElement(MailConstants.E_ITEM).addAttribute(MailConstants.A_ID, f.getId());
request.addElement(MailConstants.E_EMAIL).addAttribute(MailConstants.A_ADDRESS, "test2@zimbra.com");
handle(request, ServiceTestUtil.getRequestContext(acct));
}
}
| [
"vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931"
] | vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931 |
bdc7dc187e60499da706006be35f27dba5e5146d | eed414fd52e13f6dd08a6ca400ed7de0805d380d | /src/main/java/org/fundacionjala/coding/escarleth/Kata12.java | d2e2cd6c7841815f7c8ecfaf20c16b92d47ea8e7 | [] | no_license | AT-06/coding | 416a0cb547fa3abbb571ccd39013123794e42822 | a7c120a453d5a7929f4e7672df739b0428c32c5f | refs/heads/develop | 2021-04-27T21:53:40.445308 | 2018-07-02T13:52:11 | 2018-07-02T13:52:11 | 122,407,980 | 0 | 1 | null | 2018-07-02T13:52:12 | 2018-02-21T23:42:21 | Java | UTF-8 | Java | false | false | 463 | java | package org.fundacionjala.coding.escarleth;
/**
* Powered by Escarleth Ledezma Q.
* Kata12 is a class that contains a getScore method
*/
public class Kata12 {
private static final int MIN = 1;
private static final int FIFTY = 50;
/**
* @param number This is a number.
* @return getScore of the number
*/
public int getScore(int number) {
return number == MIN ? FIFTY : number * FIFTY + getScore(number - MIN);
}
}
| [
"carledriss@gmail.com"
] | carledriss@gmail.com |
626552dca92a0afb2297700561bc05c78e33c528 | ad7d7fbe78f1e8aec980b077649c3fad50275695 | /platform/core-impl/src/com/intellij/psi/impl/smartPointers/AnchorElementInfoFactory.java | eb48a0ce015dc5c04a38fd39cc7a55e4249c14b5 | [
"Apache-2.0"
] | permissive | xinqianli/consulo | f43897dffefe741ffebefbcd1fbbf01740757866 | 6e3739f153fd8b6cdfd3b29aee361cc5bb2fc3c4 | refs/heads/master | 2020-12-11T03:39:33.534212 | 2015-12-19T20:56:34 | 2015-12-19T20:56:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,939 | java | /*
* Copyright 2000-2015 JetBrains s.r.o.
*
* 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.intellij.psi.impl.smartPointers;
import com.intellij.psi.PsiAnchor;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.StubBasedPsiElement;
import com.intellij.psi.impl.source.PsiFileImpl;
import com.intellij.psi.impl.source.PsiFileWithStubSupport;
import com.intellij.psi.stubs.IStubElementType;
import com.intellij.psi.stubs.StubTree;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.IStubFileElementType;
import com.intellij.psi.util.PsiUtilCore;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.mustbe.consulo.RequiredReadAction;
public class AnchorElementInfoFactory implements SmartPointerElementInfoFactory {
@RequiredReadAction
@Override
@Nullable
public SmartPointerElementInfo createElementInfo(@NotNull PsiElement element) {
PsiFile containingFile = element.getContainingFile();
if (element instanceof StubBasedPsiElement && containingFile instanceof PsiFileWithStubSupport) {
PsiFileWithStubSupport stubFile = (PsiFileWithStubSupport)containingFile;
StubTree stubTree = stubFile.getStubTree();
if (stubTree != null) {
// use stubs when tree is not loaded
StubBasedPsiElement stubPsi = (StubBasedPsiElement)element;
int stubId = PsiAnchor.calcStubIndex(stubPsi);
IStubElementType myStubElementType = stubPsi.getElementType();
IElementType contentElementType = ((PsiFileImpl)containingFile).getContentElementType();
if (stubId != -1 && contentElementType instanceof IStubFileElementType) { // TemplateDataElementType is not IStubFileElementType
return new AnchorElementInfo(element, stubFile, stubId, myStubElementType);
}
}
}
PsiElement anchor = getAnchor(element);
if (anchor != null) {
return new AnchorElementInfo(anchor, containingFile);
}
return null;
}
@Nullable
public static PsiElement getAnchor(@NotNull PsiElement element) {
PsiUtilCore.ensureValid(element);
PsiElement anchor = null;
for (SmartPointerAnchorProvider provider : SmartPointerAnchorProvider.EP_NAME.getExtensions()) {
anchor = provider.getAnchor(element);
if (anchor != null && anchor.isPhysical()) {
return anchor;
}
}
return anchor;
}
}
| [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
b2f24fa8f4b5221fc672e36939e711b4a1f30e52 | c5cfc970b85ae8e938f662a24753c3ab04278e27 | /src/com/hx/crawler/crawler/HtmlPage.java | 284720be14c63a1e8484a0b439c0c87774bc3adb | [] | no_license | 970655147/HXCrawler | 20bb63c206a76ce10a4ea9e93ed3de7972534fbd | a6286cc1cabd7fa4cee5e0c2735334abba23d942 | refs/heads/master | 2016-09-01T15:33:50.653693 | 2016-05-21T08:16:30 | 2016-05-21T08:16:30 | 54,728,625 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 5,825 | java | /**
* file name : Page.java
* created at : 3:28:05 PM Jul 26, 2015
* created by 970655147
*/
package com.hx.crawler.crawler;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.http.Header;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.fluent.Response;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import com.hx.crawler.crawler.interf.Page;
import com.hx.crawler.util.Tools;
// Page
public class HtmlPage implements Page<HttpResponse> {
// Response
private String content;
private HttpResponse httpResp;
private List<Header> headers;
private Map<String, String> cookies;
private String charset = Tools.DEFAULT_CHARSET;
// 初始化
public HtmlPage(Response resp) {
super();
headers = new ArrayList<>();
cookies = new HashMap<>();
try {
this.httpResp = resp.returnResponse();
parseResponse(httpResp);
// this.content = Tools.getContent(httpResp.getEntity().getContent() );
this.content = EntityUtils.toString(httpResp.getEntity(), charset );
} catch (IOException e) {
e.printStackTrace();
}
}
// 响应头中cookie的元素据keys
static Set<String> nonCookieKeys = new HashSet<>();
static {
nonCookieKeys.add(getStdForString("path") );
nonCookieKeys.add(getStdForString("Max-Age") );
nonCookieKeys.add(getStdForString("expires") );
nonCookieKeys.add(getStdForString("domain") );
// add at 2016.05.02 ref : 深入javaweb p262[Cookie Version1]
nonCookieKeys.add(getStdForString("secure") );
nonCookieKeys.add(getStdForString("version") );
nonCookieKeys.add(getStdForString("comment") );
nonCookieKeys.add(getStdForString("commentUrl") );
nonCookieKeys.add(getStdForString("discard") );
nonCookieKeys.add(getStdForString("port") );
}
// setter & getter
public void setCharset(String charset) {
this.charset = charset;
}
public HttpResponse getResponse() {
return httpResp;
}
public String getCharset() {
return charset;
}
public Map<String, String> getCookies() {
return cookies;
}
// got 'response.headers' add at 2016.05.02
public List<Header> getHeaders() {
return headers;
}
public String getCookie(String key) {
return cookies.get(key);
}
public String getHeader(String key) {
int idx = HtmlCrawlerConfig.indexOfHeader(headers, key);
if(idx < 0) {
return null;
}
return headers.get(idx).getValue();
}
// 获取Page的内容
public String getContent() {
String srcHtml = content;
// String srcHtml = new String(resp.returnContent().asString().getBytes("iso8859-1"), "gbk");
// String dstHtml = Jsoup.parseBodyFragment(srcHtml).outerHtml();
String dstHtml = srcHtml;
return dstHtml;
}
// 解析响应消息 [cookie, charset等等]
private void parseResponse(HttpResponse resp) {
Header[] headers = resp.getAllHeaders();
for(int i=0; i<headers.length; i++) {
Header header = headers[i];
String headerName = header.getName();
if(Tools.equalsIgnoreCase(headerName, Tools.RESP_COOKIE_STR) ) {
String headerValue = header.getValue();
Set<String> nonCookieKeysTmp = nonCookieKeys;
NameValuePair[] cookie = getCookie(headerValue, nonCookieKeysTmp);
if(cookie != null) {
for(NameValuePair nvp : cookie) {
cookies.put(nvp.getName(), nvp.getValue() );
}
}
} else if(Tools.equalsIgnoreCase(headerName, Tools.CONTENT_TYPE) ) {
String charsetTmp = Tools.getStrInRangeWithStart(header.getValue(), "charset=");
if(! Tools.isEmpty(charsetTmp) ) {
charset = charsetTmp;
}
this.headers.add(header);
} else {
this.headers.add(header);
}
}
}
// 获取响应头中的"Set-Cookie" 中对应的cookie
// 以; 分割kv对, =分割key 和value
// 这样解析不太好啊[鲁棒性],, 直接split就行了 add at 2016.05.02
private NameValuePair[] getCookie(String value, Set<String>nonCookieKeys) {
NameValuePair[] cookie = new BasicNameValuePair[0];
int lastIdxSemicolon = 0, idxEqu = value.indexOf(Tools.COOKIE_KV_SEP), idxSemicolon = value.indexOf(Tools.COOKIE_COOKIE_SEP);
while((idxSemicolon > 0) && (idxEqu > 0) ) {
String key = value.substring(lastIdxSemicolon, idxEqu);
String val = value.substring(idxEqu+1, idxSemicolon);
if(! nonCookieKeys.contains(getStdForString(key.trim())) ) {
NameValuePair[] cookieTmp = new BasicNameValuePair[cookie.length + 1];
System.arraycopy(cookie, 0, cookieTmp, 0, cookie.length);
cookieTmp[cookieTmp.length-1] = new BasicNameValuePair(key, val);
cookie = cookieTmp;
}
lastIdxSemicolon = idxSemicolon+1;
idxEqu = value.indexOf(Tools.COOKIE_KV_SEP, idxSemicolon);
idxSemicolon = value.indexOf(Tools.COOKIE_COOKIE_SEP, idxSemicolon+1);
}
// 处理最后一组kv对
// 鲁棒性判断 : Set-Cookie: __cfduid=d97fc04a3d79d4567d86b62582fbaa4bc1444897363; expires=Fri, 14-Oct-16 08:22:43 GMT; path=/; domain=.tom365.co; HttpOnly
if(idxEqu > 0) {
String key = value.substring(lastIdxSemicolon, idxEqu);
String val = value.substring(idxEqu+1);
if(! nonCookieKeys.contains(getStdForString(key.trim())) ) {
NameValuePair[] cookieTmp = new BasicNameValuePair[cookie.length + 1];
System.arraycopy(cookie, 0, cookieTmp, 0, cookie.length);
cookieTmp[cookieTmp.length-1] = new BasicNameValuePair(key, val);
cookie = cookieTmp;
}
}
return cookie;
}
// 获取统一的大写 或者小写
private static String getStdForString(String str) {
return str.toUpperCase();
}
}
| [
"970655147@qq.com"
] | 970655147@qq.com |
0e7e15bcf4910b69d9483c5b0f99f7d86b960511 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Chart/1/org/jfree/chart/axis/Axis_getTickLabelFont_747.java | 7457250ce6bf7687eb5a5ce0d636039757162aec | [] | 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,886 | java |
org jfree chart axi
base ax free chart jfreechart subclass divid
displai valu link axi valueaxi displai
categori link categori axi categoryaxi
axi cloneabl serializ
return font tick label show
font code code
set tick label font setticklabelfont font
font tick label font getticklabelfont
tick label font ticklabelfont
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
9abbf5d111ca43e249daeab60dbc06a94b5e42a5 | 20939cbed3020f59cc26124778e205366a5ae97d | /app/src/main/java/com/sctjsj/gasdrawer/entity/javaBean/Message.java | cdd3a504c71f04b7d37ebf306f5ef8c89cbd55d8 | [] | no_license | lifuyuan123/GasDrawer | f4656488d7ef3951e2256965a97a862119e2986d | fdf2ed63e2d8b12b93d98f1700187b69b31f35f0 | refs/heads/master | 2021-08-11T07:50:21.928132 | 2017-11-13T10:45:19 | 2017-11-13T10:45:19 | 110,535,603 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 704 | java | package com.sctjsj.gasdrawer.entity.javaBean;
import java.io.Serializable;
/**
* Created by lifuy on 2017/6/5.
*/
public class Message implements Serializable{
private String s;
private int num;
public Message(String s, int num) {
this.s = s;
this.num = num;
}
public String getS() {
return s;
}
public void setS(String s) {
this.s = s;
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
@Override
public String toString() {
return "MessageBean{" +
"s='" + s + '\'' +
", num=" + num +
'}';
}
}
| [
"446960231@qq.com"
] | 446960231@qq.com |
a7bcc1bd8629443d6e0627284ef91c71a739cfe7 | 7cab112a472df702c9b616c760b8940d50324550 | /aionxemu-master/GameServer/src/gameserver/model/templates/bonus/BossBonus.java | 949e11f9c35a146bef93cae28f5926a8145fa52b | [] | no_license | luckychenheng/server_demo | 86d31c939fd895c7576156b643ce89354e102209 | 97bdcb1f6cd614fd360cfed800c479fbdb695cd3 | refs/heads/master | 2020-05-15T02:59:07.396818 | 2019-05-09T10:30:47 | 2019-05-09T10:30:47 | 182,059,222 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,109 | java | /**
* This file is part of Aion X Emu <aionxemu.com>
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This software 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 Lesser Public License for more details.
*
* You should have received a copy of the GNU Lesser Public License
* along with this software. If not, see <http://www.gnu.org/licenses/>.
*/
package gameserver.model.templates.bonus;
import gameserver.model.gameobjects.Item;
import gameserver.model.gameobjects.player.Player;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* @author Rolandas
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BossBonus")
public class BossBonus extends AbstractInventoryBonus {
static final InventoryBonusType type = InventoryBonusType.BOSS;
/* (non-Javadoc)
* @see com.aionemu.gameserver.itemengine.bonus.AbstractInventoryBonus#canApply(com.aionemu.gameserver.model.gameobjects.player.Player, int)
*/
@Override
public boolean canApply(Player player, int itemId, int questId) {
// TODO Auto-generated method stub
return false;
}
/* (non-Javadoc)
* @see com.aionemu.gameserver.itemengine.bonus.AbstractInventoryBonus#apply(com.aionemu.gameserver.model.gameobjects.player.Player)
*/
@Override
public boolean apply(Player player, Item item) {
// TODO Auto-generated method stub
return true;
}
/* (non-Javadoc)
* @see gameserver.model.templates.bonus.AbstractInventoryBonus#getType()
*/
@Override
public InventoryBonusType getType() {
return type;
}
}
| [
"seemac@seedeMacBook-Pro.local"
] | seemac@seedeMacBook-Pro.local |
743f17c1c1447d91c2968084439f34904def4072 | b857619af53fbdb11959439750df38a533af4542 | /src/net/ion/nradon/netty/FlashPolicyFileHandler.java | 4af5014cbed648ffd4b601c0d1a69bb4591e15d8 | [] | no_license | novision/aradon | b012aa0498d337d7e6267c81691ab494a1c062d2 | 28a90456213b4970f1b0bb2911bbf13481b8554a | refs/heads/master | 2020-04-05T23:28:07.728441 | 2012-10-11T07:38:35 | 2012-10-11T07:38:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,137 | java | package net.ion.nradon.netty;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelFutureListener;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.channel.ExceptionEvent;
import org.jboss.netty.channel.MessageEvent;
import org.jboss.netty.channel.SimpleChannelUpstreamHandler;
import org.jboss.netty.util.CharsetUtil;
/**
* Responds with a Flash socket policy file.
*
* <p>
* This implementation is based on the <a href="https://github.com/waywardmonkeys/netty-flash-crossdomain-policy-server" >waywardmonkeys/netty-flash-crossdomain-policy-server</a> project and the <a href="http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html" ><em>Setting up a socket policy file server</em></a> article.
* </p>
*/
public class FlashPolicyFileHandler extends SimpleChannelUpstreamHandler {
private final int publicPort;
public FlashPolicyFileHandler(int publicPort) {
super();
this.publicPort = publicPort;
}
@Override
public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) throws Exception {
Channel ch = e.getChannel();
ChannelBuffer response = getPolicyFileContents();
ChannelFuture future = ch.write(response);
future.addListener(ChannelFutureListener.CLOSE);
ctx.getPipeline().remove(this);
}
private ChannelBuffer getPolicyFileContents() throws Exception {
return ChannelBuffers.copiedBuffer("<?xml version=\"1.0\"?>\r\n" + "<!DOCTYPE cross-domain-policy SYSTEM \"/xml/dtds/cross-domain-policy.dtd\">\r\n" + "<cross-domain-policy>\r\n" + " <site-control permitted-cross-domain-policies=\"master-only\"/>\r\n"
+ " <allow-access-from domain=\"*\" to-ports=\"" + this.publicPort + "\" />\r\n" + "</cross-domain-policy>\r\n", CharsetUtil.US_ASCII);
}
@Override
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {
e.getCause().printStackTrace();
e.getChannel().close();
}
}
| [
"bleujin@gmail.com"
] | bleujin@gmail.com |
322a00d8836b0b80d28978eeac80e5d95dc11d24 | 87d4ff60c2e6acc4435658f888c5f63bd5ee366f | /app/src/main/java/com/example/arial/mvvm/tempview/TempViewActivity.java | c70b71796c415a449414a779fe22a3fb42f5a6e9 | [
"Apache-2.0"
] | permissive | zhenqinrui/MVVM | b5b872885697ebbb157596305bbd7cf7ab2f4104 | 2d686512580acd2988d19e97360049324a2213e3 | refs/heads/v_2.0_dev | 2020-12-14T06:17:23.538090 | 2016-05-27T10:37:12 | 2016-05-27T10:37:12 | 59,819,846 | 0 | 0 | null | 2016-05-27T08:47:36 | 2016-05-27T08:47:35 | null | UTF-8 | Java | false | false | 2,033 | java | package com.example.arial.mvvm.tempview;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import com.arialyy.frame.core.AbsActivity;
import com.arialyy.frame.temp.ITempView;
import com.arialyy.frame.util.show.T;
import com.example.arial.mvvm.R;
import com.example.arial.mvvm.databinding.ActivityTempViewBinding;
/**
* Created by lyy on 2016/4/27.
*/
public class TempViewActivity extends AbsActivity<ActivityTempViewBinding> {
@Override
protected void init(Bundle savedInstanceState) {
super.init(savedInstanceState);
// setUseTempView(false);
setTitle("Activity 填充界面测试");
}
@Override
protected int setLayoutId() {
return R.layout.activity_temp_view;
}
@Override
protected void dataCallback(int result, Object data) {
}
public void onClick(View view) {
switch (view.getId()) {
case R.id.net_error:
showTempView(ITempView.ERROR);
break;
case R.id.data_null:
showTempView(ITempView.DATA_NULL);
break;
case R.id.loading:
showTempView(ITempView.LOADING);
hintTempView(2000);
break;
case R.id.bind_test:
getBinding().setStr("test");
break;
case R.id.custom_temp:
setCustomTempView(new CustomTempView(this));
T.showShort(this, "自定义填充对话框设置成功");
break;
case R.id.ft:
startActivity(new Intent(this, TVFContentActivity.class));
break;
case R.id.vp_ft:
startActivity(new Intent(this, TVVPContentActivity.class));
break;
}
}
@Override
public void onBtTempClick(View view, int type) {
super.onBtTempClick(view, type);
hintTempView();
}
}
| [
"511455842@qq.com"
] | 511455842@qq.com |
e4e13ebaa40b8d22842211b03f1fc868fcbeeffc | b499e91f1a365cf969bfd54967820c1126322166 | /4.JavaCollections/src/com/javarush/task/task36/task3602/Solution.java | f211ee2eaa5f261f389fa8c878139965c2a88c50 | [] | no_license | msuzko/JRT | 9a00a1d367153f26aab4fd5863cd1b2f336bd81c | 59906f4afee0ae1d2378b5c19a832694af2d8286 | refs/heads/master | 2020-09-11T13:12:52.956583 | 2019-12-10T07:58:56 | 2019-12-10T07:58:56 | 221,706,354 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,573 | java | package com.javarush.task.task36.task3602;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Collections;
/*
Найти класс по описанию
*/
public class Solution {
public static void main(String[] args) {
System.out.println(getExpectedClass());
}
public static Class getExpectedClass() {
for (Class clazz : Collections.class.getDeclaredClasses())
if (Modifier.isPrivate(clazz.getModifiers()) && Modifier.isStatic(clazz.getModifiers()))
if (hasInterfaceList(clazz) && hasMethodGetThrowsIndexOutOfBoundsException(clazz))
return clazz;
return null;
}
private static boolean hasMethodGetThrowsIndexOutOfBoundsException(Class clazz) {
try {
Constructor<?> constructor = getConstructor(clazz);
Method methodGet = getMethodGet(clazz);
methodGet.invoke(constructor.newInstance(), 1);
} catch (NoSuchMethodException | InstantiationException | IllegalAccessException e) {
} catch (InvocationTargetException e) {
if (e.getCause().getClass().getName().contains("IndexOutOfBoundsException"))
return true;
}
return false;
}
private static Constructor<?> getConstructor(Class clazz) throws NoSuchMethodException {
Constructor<?> constructor = clazz.getDeclaredConstructor();
constructor.setAccessible(true);
return constructor;
}
private static Method getMethodGet(Class clazz) throws NoSuchMethodException {
Method methodGet = clazz.getDeclaredMethod("get", int.class);
methodGet.setAccessible(true);
return methodGet;
}
private static boolean hasInterfaceList(Class clazz) {
boolean isImplementsList = checkImplementsList(clazz.getInterfaces());
if (isImplementsList)
return true;
Class<?> superClass = clazz.getSuperclass();
while (superClass != null) {
isImplementsList = checkImplementsList(superClass.getInterfaces());
if (isImplementsList)
return true;
superClass = superClass.getSuperclass();
}
return false;
}
public static boolean checkImplementsList(Class<?>[] interfaces) {
for (Class<?> interFace : interfaces)
if (interFace.getSimpleName().equals("List"))
return true;
return false;
}
}
| [
"msuzko@gmail.com"
] | msuzko@gmail.com |
59916f2fd6dca6d29d2f0f5c9278a44ef4df98c9 | 2ee773cbdc216c9165029632eb36fedd8de36ca5 | /app/src/main/java/androidx/vectordrawable/graphics/drawable/ArgbEvaluator.java | f2859d04841136e25baf6e867d029ffa48620909 | [] | no_license | Killian-Townsend/Custom-FTC-Driver-Station-2021 | 6bee582afdb032ad2921b394280a2321f0f815ec | 16e8999d7593ef2c4189902bf2d376db8a3a6b41 | refs/heads/master | 2023-03-28T04:48:30.704409 | 2021-03-19T01:09:18 | 2021-03-19T01:09:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,711 | java | package androidx.vectordrawable.graphics.drawable;
import android.animation.TypeEvaluator;
public class ArgbEvaluator implements TypeEvaluator {
private static final ArgbEvaluator sInstance = new ArgbEvaluator();
public static ArgbEvaluator getInstance() {
return sInstance;
}
public Object evaluate(float paramFloat, Object paramObject1, Object paramObject2) {
int i = ((Integer)paramObject1).intValue();
float f1 = (i >> 24 & 0xFF) / 255.0F;
float f4 = (i >> 16 & 0xFF) / 255.0F;
float f5 = (i >> 8 & 0xFF) / 255.0F;
float f6 = (i & 0xFF) / 255.0F;
i = ((Integer)paramObject2).intValue();
float f2 = (i >> 24 & 0xFF) / 255.0F;
float f8 = (i >> 16 & 0xFF) / 255.0F;
float f7 = (i >> 8 & 0xFF) / 255.0F;
float f3 = (i & 0xFF) / 255.0F;
f4 = (float)Math.pow(f4, 2.2D);
f5 = (float)Math.pow(f5, 2.2D);
f6 = (float)Math.pow(f6, 2.2D);
f8 = (float)Math.pow(f8, 2.2D);
f7 = (float)Math.pow(f7, 2.2D);
f3 = (float)Math.pow(f3, 2.2D);
f4 = (float)Math.pow((f4 + (f8 - f4) * paramFloat), 0.45454545454545453D);
f5 = (float)Math.pow((f5 + (f7 - f5) * paramFloat), 0.45454545454545453D);
f3 = (float)Math.pow((f6 + paramFloat * (f3 - f6)), 0.45454545454545453D);
i = Math.round((f1 + (f2 - f1) * paramFloat) * 255.0F);
return Integer.valueOf(Math.round(f4 * 255.0F) << 16 | i << 24 | Math.round(f5 * 255.0F) << 8 | Math.round(f3 * 255.0F));
}
}
/* Location: C:\Users\Student\Desktop\APK Decompiling\com.qualcomm.ftcdriverstation_38_apps.evozi.com\classes-dex2jar.jar!\androidx\vectordrawable\graphics\drawable\ArgbEvaluator.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"admin@thatsfuckingstupid.org"
] | admin@thatsfuckingstupid.org |
283fa3940d79cc1c3a92098ef255d1d19cd83efb | dffad0ee2972fccecefb894b876034563729f74e | /dynatrace/src/main/java/de/tsystems/mms/apm/performancesignature/dynatracesaas/rest/model/ProcessGroupToRelationships.java | d6c511ae2138ed5ffcc011e0536491c1c0848bd9 | [
"Apache-2.0"
] | permissive | T-Systems-MMS/perfsig-jenkins | 5224425310845ffa7253f22a2062171f812ab82f | b1a7dc2b3da5466f019cced70dc18e7f53f9baf3 | refs/heads/master | 2023-04-06T03:52:00.874578 | 2021-07-01T07:57:47 | 2021-07-01T07:58:08 | 52,352,133 | 3 | 0 | Apache-2.0 | 2023-04-04T00:28:45 | 2016-02-23T10:51:28 | Java | UTF-8 | Java | false | false | 4,180 | java | /*
* Copyright (c) 2014-2018 T-Systems Multimedia Solutions GmbH
*
* 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.
*/
/*
* Dynatrace Environment API
* Documentation of the Dynatrace REST API. Refer to the [help page](https://www.dynatrace.com/support/help/shortlink/section-api) to read about use-cases and examples.
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package de.tsystems.mms.apm.performancesignature.dynatracesaas.rest.model;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
import static de.tsystems.mms.apm.performancesignature.ui.util.PerfSigUIUtils.toIndentedString;
/**
* ProcessGroupToRelationships
*/
public class ProcessGroupToRelationships {
@SerializedName("isNetworkClientOfProcessGroup")
private List<String> isNetworkClientOfProcessGroup;
@SerializedName("isInstanceOf")
private List<String> isInstanceOf;
@SerializedName("runsOn")
private List<String> runsOn;
public ProcessGroupToRelationships isNetworkClientOfProcessGroup(List<String> isNetworkClientOfProcessGroup) {
this.isNetworkClientOfProcessGroup = isNetworkClientOfProcessGroup;
return this;
}
public ProcessGroupToRelationships addIsNetworkClientOfProcessGroupItem(String isNetworkClientOfProcessGroupItem) {
if (this.isNetworkClientOfProcessGroup == null) {
this.isNetworkClientOfProcessGroup = new ArrayList<>();
}
this.isNetworkClientOfProcessGroup.add(isNetworkClientOfProcessGroupItem);
return this;
}
/**
* @return isNetworkClientOfProcessGroup
**/
public List<String> getIsNetworkClientOfProcessGroup() {
return isNetworkClientOfProcessGroup;
}
public void setIsNetworkClientOfProcessGroup(List<String> isNetworkClientOfProcessGroup) {
this.isNetworkClientOfProcessGroup = isNetworkClientOfProcessGroup;
}
public ProcessGroupToRelationships isInstanceOf(List<String> isInstanceOf) {
this.isInstanceOf = isInstanceOf;
return this;
}
public ProcessGroupToRelationships addIsInstanceOfItem(String isInstanceOfItem) {
if (this.isInstanceOf == null) {
this.isInstanceOf = new ArrayList<>();
}
this.isInstanceOf.add(isInstanceOfItem);
return this;
}
/**
* @return isInstanceOf
**/
public List<String> getIsInstanceOf() {
return isInstanceOf;
}
public void setIsInstanceOf(List<String> isInstanceOf) {
this.isInstanceOf = isInstanceOf;
}
public ProcessGroupToRelationships runsOn(List<String> runsOn) {
this.runsOn = runsOn;
return this;
}
public ProcessGroupToRelationships addRunsOnItem(String runsOnItem) {
if (this.runsOn == null) {
this.runsOn = new ArrayList<>();
}
this.runsOn.add(runsOnItem);
return this;
}
/**
* @return runsOn
**/
public List<String> getRunsOn() {
return runsOn;
}
public void setRunsOn(List<String> runsOn) {
this.runsOn = runsOn;
}
@Override
public String toString() {
return "class ProcessGroupToRelationships {\n"
+ " isNetworkClientOfProcessGroup: " + toIndentedString(isNetworkClientOfProcessGroup) + "\n"
+ " isInstanceOf: " + toIndentedString(isInstanceOf) + "\n"
+ " runsOn: " + toIndentedString(runsOn) + "\n"
+ "}";
}
}
| [
"Raphael.Pionke@t-systems.com"
] | Raphael.Pionke@t-systems.com |
715864d1db682d91e25856900376c436ec4aa27c | 3fc503bed9e8ba2f8c49ebf7783bcdaa78951ba8 | /TRAVACC_R5/travelrulesengine/testsrc/de/hybris/platform/travelrulesengine/jalo/TravelrulesengineTest.java | faf3f1f377cc62e7f0cab41805c65e57fca18d33 | [] | no_license | RabeS/model-T | 3e64b2dfcbcf638bc872ae443e2cdfeef4378e29 | bee93c489e3a2034b83ba331e874ccf2c5ff10a9 | refs/heads/master | 2021-07-01T02:13:15.818439 | 2020-09-05T08:33:43 | 2020-09-05T08:33:43 | 147,307,585 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,408 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.travelrulesengine.jalo;
import static org.junit.Assert.assertTrue;
import de.hybris.platform.testframework.HybrisJUnit4TransactionalTest;
import org.apache.log4j.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* JUnit Tests for the Travelrulesengine extension
*/
public class TravelrulesengineTest extends HybrisJUnit4TransactionalTest
{
/** Edit the local|project.properties to change logging behaviour (properties log4j.*). */
@SuppressWarnings("unused")
private static final Logger LOG = Logger.getLogger(TravelrulesengineTest.class.getName());
@Before
public void setUp()
{
// implement here code executed before each test
}
@After
public void tearDown()
{
// implement here code executed after each test
}
/**
* This is a sample test method.
*/
@Test
public void testTravelrulesengine()
{
final boolean testTrue = true;
assertTrue("true is not true", testTrue);
}
}
| [
"sebastian.rulik@gmail.com"
] | sebastian.rulik@gmail.com |
abe25c6c46bddf44b4cc9b8d472f5562f1956e37 | 10eec5ba9e6dc59478cdc0d7522ff7fc6c94cd94 | /maind/src/main/java/com/vvt/capture/telegram/internal/TLRPC$TL_inputDocument.java | ed427c918affa3de8abef60ed49a014ce79eb2d2 | [] | no_license | EchoAGI/Flexispy.re | a2f5fec409db083ee3fe0d664dc2cca7f9a4f234 | ba65a5b8b033b92c5867759f2727c5141b7e92fc | refs/heads/master | 2023-04-26T02:52:18.732433 | 2018-07-16T07:46:56 | 2018-07-16T07:46:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 985 | java | package com.vvt.capture.telegram.internal;
public class TLRPC$TL_inputDocument
extends TLRPC.InputDocument
{
public static int constructor = 410618194;
public void readParams(AbstractSerializedData paramAbstractSerializedData, boolean paramBoolean)
{
long l = paramAbstractSerializedData.readInt64(paramBoolean);
this.id = l;
l = paramAbstractSerializedData.readInt64(paramBoolean);
this.access_hash = l;
}
public void serializeToStream(AbstractSerializedData paramAbstractSerializedData)
{
int i = constructor;
paramAbstractSerializedData.writeInt32(i);
long l = this.id;
paramAbstractSerializedData.writeInt64(l);
l = this.access_hash;
paramAbstractSerializedData.writeInt64(l);
}
}
/* Location: /Volumes/D1/codebase/android/POC/assets/product/maind/classes-enjarify.jar!/com/vvt/capture/telegram/internal/TLRPC$TL_inputDocument.class
* Java compiler version: 5 (49.0)
* JD-Core Version: 0.7.1
*/ | [
"52388483@qq.com"
] | 52388483@qq.com |
bb84c705aab172fea909b435e9473227ffeadb70 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Time/18/org/joda/time/chrono/GJChronology_getDifference_994.java | 56e0a66ab5f7d7bb3d473c1ec47f40d539fe3089 | [] | 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 | 3,158 | java |
org joda time chrono
implement gregorian julian calendar system calendar system
world recommend
link iso chronolog isochronolog
gregorian calendar replac julian calendar point time
chronolog switch control paramet
instanc getinst method cutov set date
gregorian calendar institut octob
date chronolog prolept julian calendar
prolept mean extend indefinit julian calendar leap year
year gregorian special rule
year meaning result obtain input valu
julian leap year irregular bce
julian calendar
chronolog differ
link java util gregorian calendar gregoriancalendar gregorian calendar gregoriancalendar year
bce return correctli year bce return
year era yearofera field produc result compat gregorian calendar gregoriancalendar
julian calendar year year
year gregorian cutov date year
julian year defin word prolept gregorian
chronolog year
creat pure prolept julian chronolog link julian chronolog julianchronolog
creat pure prolept gregorian chronolog
link gregorian chronolog gregorianchronolog
chronolog gjchronolog thread safe immut
author brian neill o'neil
author stephen colebourn
chronolog gjchronolog assembl chronolog assembledchronolog
differ getdiffer minuend instant minuendinst subtrahend instant subtrahendinst
minuend instant minuendinst cutov icutov
subtrahend instant subtrahendinst cutov icutov
gregorian field igregorianfield differ getdiffer minuend instant minuendinst subtrahend instant subtrahendinst
rememb add revers subtrahend
julian convert minuend julian match
minuend instant minuendinst gregorian julian gregoriantojulian minuend instant minuendinst
julian field ijulianfield differ getdiffer minuend instant minuendinst subtrahend instant subtrahendinst
subtrahend instant subtrahendinst cutov icutov
julian field ijulianfield differ getdiffer minuend instant minuendinst subtrahend instant subtrahendinst
rememb add revers subtrahend
gregorian convert minuend gregorian match
minuend instant minuendinst julian gregorian juliantogregorian minuend instant minuendinst
gregorian field igregorianfield differ getdiffer minuend instant minuendinst subtrahend instant subtrahendinst
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
460ea9789d88fe5e83fc74fcb363900d94c0b84d | 80552d844f54667b4d6f00845a667026d656e1ba | /zip/spring-framework-3.2.x/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/CancellableFormControllerTests.java | 7d8d0d9a266e5c824ead1c376b916a99d5ad9d56 | [
"Apache-2.0"
] | permissive | 13266764646/spring-framewrok3.2.x | e662e4d633adec91fcfca6d66e15a7555044429d | 84c238239ebd8cebdddee540c0fefa8e4755eac8 | refs/heads/master | 2020-05-03T15:38:25.422211 | 2019-08-26T02:44:12 | 2019-08-26T02:44:12 | 178,707,063 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,678 | java | /*
* Copyright 2002-2013 the original author or authors.
*
* 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
*
* https://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.springframework.web.servlet.mvc;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import junit.framework.TestCase;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.mock.web.test.MockHttpServletRequest;
import org.springframework.mock.web.test.MockHttpServletResponse;
import org.springframework.validation.BindException;
import org.springframework.validation.Errors;
import org.springframework.validation.Validator;
import org.springframework.web.servlet.ModelAndView;
/**
* @author Rob Harrop
* @author Juergen Hoeller
*/
public class CancellableFormControllerTests extends TestCase {
public void testFormViewRequest() throws Exception {
String formView = "theFormView";
TestController ctl = new TestController();
ctl.setFormView(formView);
ctl.setBindOnNewForm(true);
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
String name = "Rob Harrop";
int age = 23;
request.setMethod("GET");
request.addParameter("name", name);
request.addParameter("age", "" + age);
ModelAndView mv = ctl.handleRequest(request, response);
assertEquals("Incorrect view name", formView, mv.getViewName());
TestBean command = (TestBean) mv.getModel().get(ctl.getCommandName());
testCommandIsBound(command, name, age);
}
public void testFormSubmissionRequestWithoutCancel() throws Exception {
String successView = "successView";
TestController ctl = new TestController();
ctl.setSuccessView(successView);
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
String name = "Rob Harrop";
int age = 23;
request.setMethod("POST");
request.addParameter("name", name);
request.addParameter("age", "" + age);
ModelAndView mv = ctl.handleRequest(request, response);
assertEquals("Incorrect view name", successView, mv.getViewName());
TestBean command = (TestBean) mv.getModel().get(ctl.getCommandName());
testCommandIsBound(command, name, age);
}
public void testFormSubmissionWithErrors() throws Exception {
String successView = "successView";
String formView = "formView";
TestController ctl = new TestController();
ctl.setSuccessView(successView);
ctl.setFormView(formView);
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
request.setMethod("POST");
request.addParameter("name", "Rob Harrop");
request.addParameter("age", "xxx23");
ModelAndView mv = ctl.handleRequest(request, response);
assertEquals("Incorrect view name", formView, mv.getViewName());
Errors errors = (Errors) mv.getModel().get(BindException.MODEL_KEY_PREFIX + ctl.getCommandName());
assertNotNull("No errors", errors);
assertEquals(1, errors.getErrorCount());
}
public void testFormSubmissionWithValidationError() throws Exception {
String successView = "successView";
String formView = "formView";
TestController ctl = new TestController();
ctl.setSuccessView(successView);
ctl.setFormView(formView);
TestValidator val = new TestValidator();
ctl.setValidator(val);
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
request.setMethod("POST");
request.addParameter("name", "Rob Harrop");
request.addParameter("age", "23");
ModelAndView mv = ctl.handleRequest(request, response);
assertEquals("Incorrect view name", formView, mv.getViewName());
Errors errors = (Errors) mv.getModel().get(BindException.MODEL_KEY_PREFIX + ctl.getCommandName());
assertNotNull("No errors", errors);
assertEquals(1, errors.getErrorCount());
assertTrue(val.invoked);
}
public void testCancelSubmission() throws Exception {
String cancelView = "cancelView";
String cancelParameterKey = "cancelRequest";
TestController ctl = new TestController();
ctl.setCancelParamKey(cancelParameterKey);
ctl.setCancelView(cancelView);
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
request.setMethod("POST");
request.addParameter("cancelRequest", "true");
ModelAndView mv = ctl.handleRequest(request, response);
assertEquals("Incorrect view name", cancelView, mv.getViewName());
}
public void testCancelSubmissionWithValidationError() throws Exception {
String cancelView = "cancelView";
String cancelParameterKey = "cancelRequest";
TestController ctl = new TestController();
ctl.setCancelParamKey(cancelParameterKey);
ctl.setCancelView(cancelView);
TestValidator val = new TestValidator();
ctl.setValidator(val);
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
request.setMethod("POST");
request.addParameter("name", "Rob Harrop");
request.addParameter("age", "23");
request.addParameter("cancelRequest", "true");
ModelAndView mv = ctl.handleRequest(request, response);
assertEquals("Incorrect view name", cancelView, mv.getViewName());
assertFalse(val.invoked);
}
public void testCancelSubmissionWithCustomModelParams() throws Exception {
String cancelView = "cancelView";
String cancelParameterKey = "cancelRequest";
final String reason = "Because I wanted to";
TestController ctl = new TestController() {
@Override
protected ModelAndView onCancel(HttpServletRequest request, HttpServletResponse response, Object command) {
return new ModelAndView(getCancelView(), "reason", reason);
}
};
ctl.setCancelParamKey(cancelParameterKey);
ctl.setCancelView(cancelView);
MockHttpServletRequest request = new MockHttpServletRequest();
MockHttpServletResponse response = new MockHttpServletResponse();
request.setMethod("POST");
request.addParameter("cancelRequest", "true");
ModelAndView mv = ctl.handleRequest(request, response);
assertEquals("Incorrect view name", cancelView, mv.getViewName());
assertEquals("Model parameter reason not correct", reason, mv.getModel().get("reason"));
}
private void testCommandIsBound(TestBean command, String name, int age) {
assertNotNull("Command bean should not be null", command);
assertEquals("Name not bound", name, command.getName());
assertEquals("Age not bound", age, command.getAge());
}
private static class TestController extends CancellableFormController {
public TestController() {
setCommandClass(TestBean.class);
}
}
private static class TestValidator implements Validator {
private boolean invoked = false;
@Override
public boolean supports(Class clazz) {
return TestBean.class.isAssignableFrom(clazz);
}
@Override
public void validate(Object target, Errors errors) {
this.invoked = true;
TestBean tb = (TestBean) target;
if (tb.getAge() < 25) {
errors.rejectValue("age", "TOO_YOUNG");
}
}
}
}
| [
"972181522@qq.com"
] | 972181522@qq.com |
eca32e54f0e630169fd3949b2527aff77924722b | 9d0517091fe2313c40bcc88a7c82218030d2075c | /apis/route53/src/test/java/org/jclouds/route53/parse/CreateHostedZoneResponseTest.java | 884b7930d16943a0442a566acc6ae0110fba4ba4 | [
"Apache-2.0"
] | permissive | nucoupons/Mobile_Applications | 5c63c8d97f48e1051049c5c3b183bbbaae1fa6e6 | 62239dd0f17066c12a86d10d26bef350e6e9bd43 | refs/heads/master | 2020-12-04T11:49:53.121041 | 2020-01-04T12:00:04 | 2020-01-04T12:00:04 | 231,754,011 | 0 | 0 | Apache-2.0 | 2020-01-04T12:02:30 | 2020-01-04T11:46:54 | Java | UTF-8 | Java | false | false | 1,857 | 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 org.jclouds.route53.parse;
import static org.testng.Assert.assertEquals;
import java.io.InputStream;
import org.jclouds.http.functions.BaseHandlerTest;
import org.jclouds.route53.domain.NewHostedZone;
import org.jclouds.route53.xml.CreateHostedZoneResponseHandler;
import org.testng.annotations.Test;
// NOTE:without testName, this will not call @Before* and fail w/NPE during surefire
@Test(groups = "unit", testName = "CreateHostedZoneResponseTest")
public class CreateHostedZoneResponseTest extends BaseHandlerTest {
public void test() {
InputStream is = getClass().getResourceAsStream("/new_zone.xml");
NewHostedZone expected = expected();
CreateHostedZoneResponseHandler handler = injector.getInstance(CreateHostedZoneResponseHandler.class);
NewHostedZone result = factory.create(handler).parse(is);
assertEquals(result, expected);
}
public NewHostedZone expected() {
return NewHostedZone.create(new GetHostedZoneResponseTest().expected(), new GetChangeResponseTest().expected());
}
}
| [
"Administrator@fdp"
] | Administrator@fdp |
8e663aa085e9d6550b31e6f496e29002c93505dc | 2fca83d25f0e10e3a4b28181b4098405f60f88af | /app/src/main/java/com/example/trubrowsermenusample/IteoraBottomAppMenuBasicNtpItems.java | eca6f4843a417721a02611924cdfe6ee7201940a | [] | no_license | webprog26/browser_bottom_menu_sample | c2ec14d65e4cbab1d102aec3f950a02c7326aeef | abe24de93e32a73aad7101bbe0efbf2e8bf9f367 | refs/heads/master | 2023-01-23T16:50:05.935175 | 2020-12-12T20:27:03 | 2020-12-12T20:27:03 | 319,234,369 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,679 | java | package com.example.trubrowsermenusample;
import android.content.Context;
import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
public class IteoraBottomAppMenuBasicNtpItems extends LinearLayout implements IteoraBottomAppMenuItem.OnItemClickListener, View.OnClickListener {
public interface OnIteoraBottomAppMenuItemClickListener {
void onAddToBookmarksClick();
void onSearchOnPageClick();
void onPrivateTabClick();
void onDarkModeClick();
void onProtectTabClick();
void onBookmarksClick();
void onDownloadsClick();
void onAddToHomeScreenClick();
void onMyDataClicked();
void onTranslateClicked();
void onLogOutClicked();
void onRecentTabsClicked();
void onHistoryClicked();
void onDesktopSiteClicked();
void onSettingsClicked();
void onCloseAppClicked();
void onItemReleased();
}
protected OnIteoraBottomAppMenuItemClickListener itemClickListener;
private IteoraDesktopSiteBottomAppMenuItem desktopSite;
public IteoraBottomAppMenuBasicNtpItems(Context context) {
super(context);
init(context);
}
public IteoraBottomAppMenuBasicNtpItems(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
init(context);
}
public void setItemClickListener(final OnIteoraBottomAppMenuItemClickListener listener) {
this.itemClickListener = listener;
}
private void init(final Context context) {
setOrientation(VERTICAL);
final View rootView = LayoutInflater.from(context).inflate(getLayoutRes(), this, true);
onInitialize(rootView);
}
protected void onInitialize(final View rootView) {
final IteoraBottomAppMenuItem privateTab = rootView.findViewById(R.id.private_tab);
final IteoraBottomAppMenuItem darkMode = rootView.findViewById(R.id.dark_mode);
final IteoraBottomAppMenuItem protectTab = rootView.findViewById(R.id.protect_tab);
final IteoraBottomAppMenuItem bookmarks = rootView.findViewById(R.id.bookmarks);
final IteoraBottomAppMenuItem downloads = rootView.findViewById(R.id.downloads);
final IteoraBottomAppMenuItem myData = rootView.findViewById(R.id.my_data);
final IteoraBottomAppMenuItem logout = rootView.findViewById(R.id.logout);
final IteoraBottomAppMenuItem recentTabs = rootView.findViewById(R.id.recent_tabs);
final IteoraBottomAppMenuItem history = rootView.findViewById(R.id.history);
desktopSite = rootView.findViewById(R.id.desktop_site);
final IteoraBottomAppMenuItem settings = rootView.findViewById(R.id.settings);
final IteoraBottomAppMenuItem closeApp = rootView.findViewById(R.id.close_app);
privateTab.setOnItemClickListener(this);
darkMode.setOnItemClickListener(this);
protectTab.setOnItemClickListener(this);
bookmarks.setOnItemClickListener(this);
downloads.setOnItemClickListener(this);
myData.setOnItemClickListener(this);
logout.setOnItemClickListener(this);
recentTabs.setOnItemClickListener(this);
history.setOnItemClickListener(this);
desktopSite.setOnItemClickListener(this);
settings.setOnItemClickListener(this);
closeApp.setOnItemClickListener(this);
}
@LayoutRes
protected int getLayoutRes() {
return R.layout.bottom_app_menu_basic_items;
}
@Override
public void onItemClicked(View itemView) {
onClick(itemView);
}
@Override
public void onItemReleased() {
itemClickListener.onItemReleased();
}
public void initDesktopSiteItem(final boolean isInDesktopMode) {
if (desktopSite != null) {
IteoraBottomAppSettingsLayout.log(getClass().getSimpleName() + "initDesktopSiteItem(): " + isInDesktopMode);
desktopSite.setChecked(isInDesktopMode);
} else {
IteoraBottomAppSettingsLayout.log(getClass().getSimpleName() + "initDesktopSiteItem(): " + "not an instanceof IteoraDesktopSiteBottomAppMenuItem");
}
}
@Override
public void onClick(View v) {
if (itemClickListener != null) {
final int id = v.getId();
if (id == R.id.private_tab) {
itemClickListener.onPrivateTabClick();
} else if (id == R.id.dark_mode) {
itemClickListener.onDarkModeClick();
} else if (id == R.id.protect_tab) {
itemClickListener.onProtectTabClick();
} else if (id == R.id.bookmarks) {
itemClickListener.onBookmarksClick();
} else if (id == R.id.downloads) {
itemClickListener.onDownloadsClick();
} else if (id == R.id.my_data) {
itemClickListener.onMyDataClicked();
} else if (id == R.id.logout) {
itemClickListener.onLogOutClicked();
} else if (id == R.id.recent_tabs) {
itemClickListener.onRecentTabsClicked();
} else if (id == R.id.history) {
itemClickListener.onHistoryClicked();
} else if (id == R.id.desktop_site) {
itemClickListener.onDesktopSiteClicked();
} else if (id == R.id.settings) {
itemClickListener.onSettingsClicked();
} else if (id == R.id.close_app) {
itemClickListener.onCloseAppClicked();
}
}
}
}
| [
"webprog26@gmail.com"
] | webprog26@gmail.com |
a6a9a8a43ff6ee75dbfe0e31eff3f145afe6f02c | 14e91965436e775ea1291706e65b56ef75808ed4 | /mmo-db/src/main/java/org/mmo/db/memory/service/MemoryCacheService.java | e8942a2e3f97a68bbe1be86f61f983e565770c64 | [] | no_license | 5432935/mmo-server | 59ca1529b6c21ef385e0c8052f4c51b990ab1567 | 516e92f2c187d91a8c836cb8f453424aa8de0a7e | refs/heads/master | 2020-04-05T03:08:32.102968 | 2018-10-23T02:21:45 | 2018-10-23T02:21:45 | 156,502,572 | 1 | 0 | null | 2018-11-07T06:47:11 | 2018-11-07T06:47:11 | null | UTF-8 | Java | false | false | 779 | java | package org.mmo.db.memory.service;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
/**
* 内存缓存
*
* @author JiangZhiYong
* @mail 359135103@qq.com
*/
@Service
public class MemoryCacheService {
private static final Logger LOGGER = LoggerFactory.getLogger(MemoryCacheService.class);
private Map<String, Object> mapData = new HashMap<>();
/**
* 存储map数据
* @param key
* @param value
*/
public void saveMapData(String key,Object value) {
mapData.put(key, value);
}
/**
* 获取缓存数据
* @param key
* @return
*/
public Object getMapData(String key) {
return mapData.get(key);
}
}
| [
"359135103@qq.com"
] | 359135103@qq.com |
71f1f26b7edf9a60b3d256e45dfca3854d378890 | 4dbbf63c1937a523890390c5ee34e81589f78e5e | /bus-crypto/src/main/java/org/aoju/bus/crypto/provider/RSAProvider.java | 7cf09d72e9a3ef6d528a5f0d22fa7a73d6be9f17 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | q040407/bus | 9b0970b829264899857a5035396ddbb1052e0aac | f10136c6ea472e8886355a76caa331cb607d59ef | refs/heads/master | 2022-04-23T10:10:50.686780 | 2020-04-14T06:43:17 | 2020-04-14T06:43:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,479 | java | /*********************************************************************************
* *
* The MIT License *
* *
* Copyright (c) 2015-2020 aoju.org and other contributors. *
* *
* 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. *
********************************************************************************/
/*********************************************************************************
* *
* The MIT License *
* *
* Copyright (c) 2015-2020 aoju.org and other contributors. *
* *
* 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 org.aoju.bus.crypto.provider;
import org.aoju.bus.core.lang.Symbol;
import org.aoju.bus.core.lang.exception.InstrumentException;
import org.aoju.bus.core.utils.StringUtils;
import org.aoju.bus.crypto.Builder;
import org.aoju.bus.crypto.Provider;
import org.aoju.bus.crypto.asymmetric.KeyType;
import org.aoju.bus.crypto.asymmetric.RSA;
/**
* RSA 加密解密算法
*
* @author Kimi Liu
* @version 5.8.6
* @since JDK 1.8+
*/
public class RSAProvider implements Provider {
/**
* 加密
*
* @param key 密钥
* @param content 需要加密的内容
* @return 加密结果
*/
@Override
public byte[] encrypt(String key, byte[] content) {
if (StringUtils.isEmpty(key)) {
throw new InstrumentException("key is null!");
}
String[] array = StringUtils.split(key, Symbol.COMMA);
RSA rsa = Builder.rsa(array[0], array[1]);
return rsa.encrypt(content, KeyType.valueOf(array[2]));
}
/**
* 解密
*
* @param key 密钥
* @param content 需要解密的内容
* @return 解密结果
*/
@Override
public byte[] decrypt(String key, byte[] content) {
if (StringUtils.isEmpty(key)) {
throw new InstrumentException("key is null!");
}
String[] array = StringUtils.split(key, Symbol.COMMA);
RSA rsa = Builder.rsa(array[0], array[1]);
return rsa.decrypt(content, KeyType.valueOf(array[2]));
}
}
| [
"839536@qq.com"
] | 839536@qq.com |
dff332fa901ed907ba666e8159200b5cb52e79a1 | 7093ae6f0a768c8abee9db5d2e5be4d6c9105f27 | /depa/11_AB_Scheduler/src/ch/fhnw/depa/Scheduler.java | 17f9427752d0056bca39f26e82b52b9cfe4cc669 | [] | no_license | heshamOuda1/FHNW-Java-Projekte | 9da0bb495f89655eea6c521f1aaee6fb21d784dd | 00decf1d2fae80fc29c0f8c1c251b999ed0ceabb | refs/heads/master | 2021-05-29T05:46:17.805368 | 2015-06-22T13:15:04 | 2015-06-22T13:15:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 422 | java | package ch.fhnw.depa;
/***
*
* Invoker
*
* Holds a task reference which it can remove, override or call
*
*
* @author Chregi Glatthard
*
*/
public class Scheduler {
AbstractTask task;
public Scheduler() {
empty();
}
public void empty() {
task = new NullTask();
}
public void registerTask(AbstractTask st) {
task = st;
}
public void runTask() {
if (task.ready) task.execute();
}
}
| [
"chregi.glatthard@gmail.com"
] | chregi.glatthard@gmail.com |
c1867e8d13f1e9a54e36bbd5909982140a8de5db | 4c19b724f95682ed21a82ab09b05556b5beea63c | /XMSYGame/java2/server/zxyy-webhome/src/main/java/com/xmsy/server/zxyy/webhome/modules/manager/pooldispatchtask/controller/PoolDispatchTaskController.java | 846f4cd42ff8239448ac8b34d97698a29050f0cb | [] | no_license | angel-like/angel | a66f8fda992fba01b81c128dd52b97c67f1ef027 | 3f7d79a61dc44a9c4547a60ab8648bc390c0f01e | refs/heads/master | 2023-03-11T03:14:49.059036 | 2022-11-17T11:35:37 | 2022-11-17T11:35:37 | 222,582,930 | 3 | 5 | null | 2023-02-22T05:29:45 | 2019-11-19T01:41:25 | JavaScript | UTF-8 | Java | false | false | 5,510 | java | package com.xmsy.server.zxyy.webhome.modules.manager.pooldispatchtask.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.xmsy.server.zxyy.webhome.cache.LocalContentCache;
import com.xmsy.server.zxyy.webhome.common.annotation.SysLog;
import com.xmsy.server.zxyy.webhome.common.utils.PageUtils;
import com.xmsy.server.zxyy.webhome.common.utils.R;
import com.xmsy.server.zxyy.webhome.modules.manager.pooldispatchtask.entity.PoolDispatchTaskEntity;
import com.xmsy.server.zxyy.webhome.modules.manager.pooldispatchtask.service.PoolDispatchTaskService;
import com.xmsy.server.zxyy.webhome.modules.manager.poolgame.entity.PoolGameEntity;
import com.xmsy.server.zxyy.webhome.modules.manager.poolgame.service.PoolGameService;
import com.xmsy.server.zxyy.webhome.modules.manager.rankinglist.entity.RankingListEntity;
import com.xmsy.server.zxyy.webhome.modules.manager.rankinglist.service.RankingListService;
/**
*
*
* @author lpp
* @email xxxxx
* @date 2019-01-21 09:46:00
*/
@RestController
@RequestMapping("pooldispatchtask/pooldispatchtask")
public class PoolDispatchTaskController {
@Autowired
private PoolDispatchTaskService poolDispatchTaskService;
@Autowired
private PoolGameService poolGameService;
@Autowired
private RankingListService rankingListService;
@Autowired
private LocalContentCache localContentCache;
/**
* 列表
*/
@RequestMapping("/list")
@RequiresPermissions("pooldispatchtask:pooldispatchtask:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = poolDispatchTaskService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
@RequiresPermissions("pooldispatchtask:pooldispatchtask:info")
public R info(@PathVariable("id") Long id){
PoolDispatchTaskEntity poolDispatchTask = poolDispatchTaskService.selectById(id);
return R.ok().put("pooldispatchtask", poolDispatchTask);
}
/**
* 榜单信息
*/
@RequestMapping("/getRankingList")
@RequiresPermissions("pooldispatchtask:pooldispatchtask:info")
public R getRankingList(){
RankingListEntity ranklist=new RankingListEntity();
ranklist.setEnable(true);
return R.ok().put("ranklist",
rankingListService.
selectList(new EntityWrapper<RankingListEntity>(ranklist)));
}
/**
* 奖池信息
*/
@RequestMapping("/getPool")
@RequiresPermissions("pooldispatchtask:pooldispatchtask:info")
public R getPoolList(){
PoolGameEntity poolgame = new PoolGameEntity();
poolgame.setEnable(true);
List<Map<String, Object>> result = new ArrayList<>();
List<PoolGameEntity> dataList = poolGameService.selectList(new EntityWrapper<PoolGameEntity>(poolgame));
if(dataList!=null && !dataList.isEmpty()) {
Map<String, Object> amap = null;
Map<Long, String> gameMap = localContentCache.getGameMap();//SysConstant.gameMap
for(PoolGameEntity data : dataList) {
amap = new HashMap<>();
amap.put("id", data.getId());
amap.put("name", gameMap.get(data.getGameId())+"奖池");
result.add(amap);
}
}
return R.ok().put("poolList", result);
// return R.ok().put("poolList", poolGameService.findPoolList());
}
/**
* 奖池金额信息
*/
@RequestMapping("/pool/{id}")
@RequiresPermissions("pooldispatchtask:pooldispatchtask:info")
public R pool(@PathVariable("id") Long id){
return R.ok().put("pool", poolGameService.selectById(id).getPool());
}
/**
* 保存
*/
@SysLog("新增奖池奖金派送任务")
@RequestMapping("/save")
@RequiresPermissions("pooldispatchtask:pooldispatchtask:save")
public R save(@RequestBody PoolDispatchTaskEntity poolDispatchTask){
poolDispatchTaskService.insert(poolDispatchTask);
return R.ok();
}
/**
* 修改
*/
@SysLog("修改奖池奖金派送任务")
@RequestMapping("/update")
@RequiresPermissions("pooldispatchtask:pooldispatchtask:update")
public R update(@RequestBody PoolDispatchTaskEntity poolDispatchTask){
poolDispatchTaskService.updateById(poolDispatchTask);
return R.ok();
}
/**
* 删除
*/
@SysLog("删除奖池奖金派送任务")
@RequestMapping("/delete")
@RequiresPermissions("pooldispatchtask:pooldispatchtask:delete")
public R delete(@RequestBody Long[] ids){
for (Long id : ids) {
poolDispatchTaskService.deleteById(id);
}
return R.ok();
}
/**
* 派发奖金
*/
@SysLog(" 派发奖金")
@RequestMapping("/dispatch/{id}")
@RequiresPermissions("pooldispatchtask:pooldispatchtask:dispatch")
public R dispatch(@PathVariable("id") Long id){
poolDispatchTaskService.dispatch(id);
return R.ok();
}
}
| [
"163@qq.com"
] | 163@qq.com |
8f6e935c88de9c603b3591011db926b659cc4b82 | f6e39f668c6b1ef1d1583099a0c0f76e98c3f254 | /src/main/java/grondag/doomtree/block/tree/DoomedBlock.java | 790701c78d609ced235a0eac13d4c4070ae51c4f | [
"MIT"
] | permissive | grondag/doomtree | 8948c0c8d4a21e18f69df44674e33d1f3e628172 | b48a11b25d575bb95ba351b5c341db71e90b7466 | refs/heads/master | 2020-08-21T11:07:54.336457 | 2019-11-11T15:40:45 | 2019-11-11T15:40:45 | 216,146,106 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,877 | java | /*******************************************************************************
* Copyright (C) 2019 grondag
*
* 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 grondag.doomtree.block.tree;
import grondag.doomtree.block.treeheart.DoomTreeTracker;
import grondag.doomtree.entity.DoomEffect;
import grondag.doomtree.registry.DoomTags;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
public class DoomedBlock extends Block {
public DoomedBlock(final Settings settings) {
super(settings);
}
@Override
public void onBlockRemoved(final BlockState myState, final World world, final BlockPos blockPos, final BlockState newState, final boolean someFlag) {
super.onBlockRemoved(myState, world, blockPos, newState, someFlag);
DoomTreeTracker.reportBreak(world, blockPos, false);
}
@Override
public void onBreak(final World world, final BlockPos pos, final BlockState blockState, final PlayerEntity player) {
final ItemStack toolStack = player.getMainHandStack();
if (!toolStack.getItem().isIn(DoomTags.WARDED_ITEMS)) {
DoomEffect.addToDoom(player, 80);
if (!world.isClient) {
float extraExhaustion = 0.01F;
// if using a tool, take extra durability. If not, then extra doom exposure for player
if (toolStack.getItem().isDamageable()) {
toolStack.damage(3, player, p -> {
p.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND);
});
} else {
extraExhaustion += 0.01F;
}
player.addExhaustion(extraExhaustion);
}
}
super.onBreak(world, pos, blockState, player);
}
}
| [
"grondag@gmail.com"
] | grondag@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.