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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b7b0e73eaf27f3f55db3036c5f3aa5bb665cad7d | 10fdc3aa333ef07a180f29a4425650945c3da9c8 | /zhuanbo-service/src/main/java/com/zhuanbo/service/mapper/ShopIndexTopicGoodsMapper.java | 83d246215d0a2a4d80ed59a69205610ca9a345fd | [] | no_license | arvin-xiao/lexuan | 4d67f4ab40243c7e6167e514d899c6cd0c3f0995 | 6cffeee1002bad067e6c8481a3699186351d91a8 | refs/heads/master | 2023-04-27T21:01:06.644131 | 2020-05-03T03:03:52 | 2020-05-03T03:03:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 307 | java | package com.zhuanbo.service.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhuanbo.core.entity.IndexTopicGoods;
/**
* <p>
* Mapper 接口
* </p>
*
* @author rome
* @since 2019-03-14
*/
public interface ShopIndexTopicGoodsMapper extends BaseMapper<IndexTopicGoods> {
}
| [
"13509030019@163.com"
] | 13509030019@163.com |
e2fcc9f1b64a764c65f9c54908b3623b80cc7c9b | c18ca0ee85f21ef5e9890db9bb70ab8bb114200a | /Software Engineering/Assignments/Assignment3/Triangle/src/bug5/Triangle.java | c42e8b86cd90e05ef158fbdf98b0cad33016b382 | [] | no_license | f1lm/MS-2014-Boise-State-University | a3032b8b9e13303cdb3b4cb0001eddfd0d1cbffe | 9d87f14e48a5c51a8a3ebfb0e010a493faf70576 | refs/heads/master | 2020-04-15T15:17:48.031552 | 2015-03-18T01:37:30 | 2015-03-18T01:37:30 | 32,502,472 | 1 | 1 | null | 2015-03-19T05:19:57 | 2015-03-19T05:19:56 | null | UTF-8 | Java | false | false | 681 | java | package bug5;
public class Triangle {
public enum TriangleType {RIGHT, ACUTE, OBTUSE, NOTRIANGLE};
private int angleA, angleB, angleC;
public Triangle(int a, int b, int c){
this.angleA = a;
this.angleB = b;
this.angleC = c;
}
public TriangleType reportTriangleType() {
if (angleA <= 0 || angleB <= 0 || angleC <=0){
return TriangleType.NOTRIANGLE;
}
if (angleA+angleB+angleC != 180) {
return TriangleType.NOTRIANGLE;
}
if (angleA== 90 || angleB == 90 || angleC == 90) {
return TriangleType.RIGHT;
}
if (angleA > 90 || angleB > 90 || angleC > 91) // bug 5
return TriangleType.OBTUSE;
else
return TriangleType.ACUTE;
}
} | [
"milsonmun@yahoo.com"
] | milsonmun@yahoo.com |
d2e6c8f3769de182a7efff4c7a1f1c4a36b982bd | c3015944f8dcdd45e1124d27f8fbe1f5fbad9f98 | /src/main/java/com/github/chen0040/tensorflow/classifiers/demo/Cifar10AudioEncoderDemo.java | 66ef35609d09c4fab3ba4b5fec187e2918d3b5ec | [
"MIT"
] | permissive | shiddugmail/java-tensorflow-music | 82276517bcf02c7a2c0200731a6a8a1b08d43b1a | e6f21b1903a897e34f7547c7e4586a3e9989ae70 | refs/heads/master | 2021-05-25T07:29:48.885228 | 2018-04-18T07:15:01 | 2018-04-18T07:15:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,227 | java | package com.github.chen0040.tensorflow.classifiers.demo;
import com.github.chen0040.tensorflow.classifiers.models.cifar10.Cifar10AudioClassifier;
import com.github.chen0040.tensorflow.classifiers.utils.FileUtils;
import com.github.chen0040.tensorflow.classifiers.utils.ResourceUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
public class Cifar10AudioEncoderDemo {
private static final Logger logger = LoggerFactory.getLogger(Cifar10AudioEncoderDemo.class);
public static void main(String[] args) throws IOException {
Cifar10AudioClassifier classifier = new Cifar10AudioClassifier();
classifier.load_model();
List<String> paths = FileUtils.getAudioFiles();
Collections.shuffle(paths);
for (String path : paths) {
System.out.println("Encoding " + path + " ...");
File f = new File(path);
float[] encoded_audio = classifier.encode_audio(f);
System.out.println("Encoded: " + Arrays.toString(encoded_audio));
}
}
}
| [
"xs0040@gmail.com"
] | xs0040@gmail.com |
5c20069e96ceef22839c373a9e219afc09034ba7 | faad9426e40b868103f7995aad166f2328060f00 | /TestModel/mymode/src/main/java/yuncar/aten/com/mymode/banner/transformer/ZoomOutTranformer.java | 1e64f506c174536faf57a9ce6b8749373b4c6d18 | [] | no_license | jkabcd/TestModel | f46f193a3a688e35e1283e93263c01762ff0d8e9 | 6ea474ab4784475fc30f65d5a8f32cacbaf262b3 | refs/heads/master | 2020-03-23T12:05:24.058614 | 2018-08-03T09:03:46 | 2018-08-03T09:03:46 | 141,536,287 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,141 | java | /*
* Copyright 2014 Toxic Bakery
*
* 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 yuncar.aten.com.mymode.banner.transformer;
import android.view.View;
public class ZoomOutTranformer extends ABaseTransformer {
@Override
protected void onTransform(View view, float position) {
final float scale = 1f + Math.abs(position);
view.setScaleX(scale);
view.setScaleY(scale);
view.setPivotX(view.getWidth() * 0.5f);
view.setPivotY(view.getHeight() * 0.5f);
view.setAlpha(position < -1f || position > 1f ? 0f : 1f - (scale - 1f));
if(position == -1){
view.setTranslationX(view.getWidth() * -1);
}
}
}
| [
"610184089@qq.com"
] | 610184089@qq.com |
a5b256fac27b9ec5712a22c8a2498a435a62ce66 | bc9ac4a549291c79971bfd6ec65d291009dd394e | /app/src/main/java/com/ghs/ghspm/models/task/relatedtometask/RelatedToMeTaskFragment.java | 82ce0f4add761eb1b2c47e6f5acd738cbe7ea68b | [] | no_license | DevelopWb/ghsPm | cc2f97a399a578164271478a4f0979547d6592d8 | 595272959eaddf8c9f8e6b1d9b911c7fa60eb344 | refs/heads/master | 2021-08-28T03:39:36.776497 | 2021-08-18T07:05:45 | 2021-08-18T07:05:45 | 210,289,189 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,712 | java | package com.ghs.ghspm.models.task.relatedtometask;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.ghs.ghspm.R;
import com.ghs.ghspm.base.BaseFragment;
import com.ghs.ghspm.base.network.RequestStatus;
import com.ghs.ghspm.bean.TaskMultipleItem;
import com.ghs.ghspm.bean.TasksBean;
import com.ghs.ghspm.models.main.MainContact;
import com.ghs.ghspm.models.task.TaskAdapter;
import com.ghs.ghspm.models.task.TaskContract;
import com.ghs.ghspm.models.task.TaskDetailInfoActivity;
import com.ghs.ghspm.models.task.TaskPresent;
import com.ghs.ghspm.tools.ActivityResultManager;
import com.ghs.ghspm.tools.Contract;
import com.ghs.ghspm.tools.PubUtil;
import com.ghs.ghspm.tools.UserInfoUtil;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.util.ArrayList;
import java.util.List;
public class RelatedToMeTaskFragment extends BaseFragment<TaskContract.ITaskView, TaskPresent> implements TaskContract.ITaskView, RequestStatus, View.OnClickListener {
private View view;
private RecyclerView mUnNormalNoticeRv;
private TaskAdapter adapter;
private SwipeRefreshLayout mSwipeLayout;
private int offset = 0;
private int limit = 10;
@Override
public void onStart() {
super.onStart();
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
@Subscribe(threadMode = ThreadMode.MAIN)
public void stringMsgReceived(String str) {
if (MainContact.CHANGE_VILLAGE.equals(str)||ActivityResultManager.TASK_FRAGMENT_REFRESH.equals(str)) {//
offset = 0;
getPresenter().getTasks(Contract.RELATED_TASK, UserInfoUtil.getInstance().getUserId(), offset, limit, TaskContract.REFRESH);
}
}
@Override
public void onStop() {
super.onStop();
}
@Override
public void onResume() {
super.onResume();
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
}
public static RelatedToMeTaskFragment getInstance() {
return FirstFragmentHolder.instatce;
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (ActivityResultManager.PUBLISH_TASK==resultCode||ActivityResultManager.DEAL_TASK_DETAIL==resultCode) {
offset = 0;
getPresenter().getTasks(Contract.RELATED_TASK, UserInfoUtil.getInstance().getUserId(), offset, limit, TaskContract.REFRESH);
}
}
@Override
public void startLoading(String tag) {
}
@Override
public void stopLoading(String tag) {
}
@Override
public void updateView(Object o, String tag) {
mSwipeLayout.setRefreshing(false);
TasksBean taskBean = (TasksBean) o;
boolean isFresh = TaskContract.REFRESH.equals(tag)?true:false;
if (taskBean != null) {
if (taskBean.getData() != null) {
List<TasksBean.DataBean> dataBeanList = taskBean.getData();
List<TaskMultipleItem> arrays = new ArrayList<>();
for (TasksBean.DataBean dataBean : dataBeanList) {
arrays.add(new TaskMultipleItem(TaskMultipleItem.TEMP_TASK,dataBean));
}
offset+=dataBeanList.size();
if (isFresh) {
adapter.setNewData(arrays);
}else{
adapter.addData(arrays);
}
if (dataBeanList.size() < limit) {
//第一页如果不够一页就不显示没有更多数据布局
adapter.loadMoreEnd(isFresh);
} else {
adapter.loadMoreComplete();
}
}
}
}
@Override
public void onStart(String tag) {
}
@Override
public void onSuccess(Object o, String tag) {
}
@Override
public void onError(String tag) {
mSwipeLayout.setRefreshing(false);
}
@Override
public void onClick(View v) {
}
private void initView(View view) {
mUnNormalNoticeRv = (RecyclerView) view.findViewById(R.id.un_normal_notice_rv);
adapter = new TaskAdapter(null);
initRecyclerview(mUnNormalNoticeRv, adapter, LinearLayoutManager.VERTICAL, false);
adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
TaskMultipleItem taskMultipleItem = (TaskMultipleItem) adapter.getData().get(position);
switch (taskMultipleItem.getItemType()) {
case TaskMultipleItem.TEMP_TASK:
TasksBean.DataBean dataBean = (TasksBean.DataBean) taskMultipleItem.getObject();
PubUtil.clickedTaskID = dataBean.getId();
PubUtil.clickedTaskType = 2;
startActivityForResult(new Intent(getContext(), TaskDetailInfoActivity.class), ActivityResultManager.DEAL_TASK_DETAIL);
break;
default:
break;
}
}
});
adapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() {
@Override
public void onLoadMoreRequested() {
getPresenter().getTasks(Contract.RELATED_TASK, UserInfoUtil.getInstance().getUserId(), offset, limit, "");
}
}, mUnNormalNoticeRv);
mSwipeLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipeLayout);
mSwipeLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
offset = 0;
adapter.setEnableLoadMore(false);//这里的作用是防止下拉刷新的时候还可以上拉加载
mSwipeLayout.setRefreshing(true);
getPresenter().getTasks(Contract.RELATED_TASK, UserInfoUtil.getInstance().getUserId(), offset, limit, TaskContract.REFRESH);
}
});
adapter.setEmptyView(getAdapterEmptyView("很干净,一条任务也没有"));
}
private static class FirstFragmentHolder {
private static RelatedToMeTaskFragment instatce = new RelatedToMeTaskFragment();
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.unnormal_notice_fragment_layout, container, false);
initView(view);
return view;
}
@Override
protected void lazyLoad() {
offset = 0;
getPresenter().getTasks(Contract.RELATED_TASK, UserInfoUtil.getInstance().getUserId(), offset, limit, TaskContract.REFRESH);
}
@Override
protected View initFragmentViewLayout(LayoutInflater inflater, ViewGroup container) {
return null;
}
@Override
protected void initFragmentView(View view) {
}
@Override
protected void initFragmentData() {
}
@Override
protected TaskPresent createPresenter() {
return new TaskPresent();
}
}
| [
"three6one@163.com"
] | three6one@163.com |
de3866b2c0de769f070416a4036795c0f318fac2 | 0d40f2824c1e9f1a43f3853efea83c765925fa3d | /src/main/java/com/vidal/merlin/wsclient/indicationGroup/SearchByCispIdResponse.java | bca6efd2ab416deededf1cd6551511755cda71f2 | [] | no_license | ncauvet/VidalPrescriptionWS | 2319ae3b9a2f97fe9a4c2fae7c82b322d68df861 | 9911d3b9a2f02abac78a3d40d8d8914bc0d34db0 | refs/heads/master | 2020-03-31T07:33:47.792042 | 2013-11-02T08:50:40 | 2013-11-02T08:50:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,697 | java |
package com.vidal.merlin.wsclient.indicationGroup;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="indicationGroupList" type="{urn:Vidal}ArrayOfIndicationGroup"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"indicationGroupList"
})
@XmlRootElement(name = "searchByCispIdResponse")
public class SearchByCispIdResponse {
@XmlElement(required = true, nillable = true)
protected ArrayOfIndicationGroup indicationGroupList;
/**
* Gets the value of the indicationGroupList property.
*
* @return
* possible object is
* {@link ArrayOfIndicationGroup }
*
*/
public ArrayOfIndicationGroup getIndicationGroupList() {
return indicationGroupList;
}
/**
* Sets the value of the indicationGroupList property.
*
* @param value
* allowed object is
* {@link ArrayOfIndicationGroup }
*
*/
public void setIndicationGroupList(ArrayOfIndicationGroup value) {
this.indicationGroupList = value;
}
}
| [
"nicolascauvet@gmail.com"
] | nicolascauvet@gmail.com |
0b44d3451b7ec388ec64faee74f52d38d29a5fbd | f79556e9a4cdace2b24d68a27328a1629e085530 | /学生成绩 教务管理 系统/教务管理系统(jsp+servlet+mysql)/guanli/src/com/bjsxt/drp/web/usermgr/actions/DelUserAction.java | 46519837630464bea79e4d4d27df69665b80d4a8 | [] | no_license | X-lun/Java-web | 3274b5f4e1536573d70c4b515c96efcd8233cf90 | f21b76d6b690d68a53366622a859551e1ebc0b40 | refs/heads/master | 2022-04-15T08:21:53.094414 | 2019-04-21T07:20:08 | 2019-04-21T07:20:08 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 969 | java | package com.bjsxt.drp.web.usermgr.actions;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.bjsxt.drp.business.usermgr.manager.UserManager;
import com.bjsxt.drp.web.usermgr.forms.UserActionForm;
/**
* 用户删除Action
*
*/
public class DelUserAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
//获取从页面表单中提交过来的值
UserActionForm uaf = (UserActionForm)form;
//取得需要删除的userId的集合
String[] userIdList = uaf.getSelectFlag();
//调用业务逻辑操作
UserManager.getInstance().deleteUsers(userIdList);
return mapping.findForward("success");
}
} | [
"3196614820@qq.com"
] | 3196614820@qq.com |
9a47d59c179015a7fc38273b28753e5425a98947 | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/jaxrs-resteasy/generated/src/gen/java/org/openapitools/model/OrgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo.java | 261985ee8b0f2e6f664d1ac6f0e2f4346d4bbf70 | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | Java | false | false | 3,558 | java | package org.openapitools.model;
import java.util.Objects;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import org.openapitools.model.OrgApacheSlingDistributionPackagingImplImporterLocalDistributioProperties;
import javax.validation.constraints.*;
import io.swagger.annotations.*;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", date = "2019-08-05T00:59:30.156Z[GMT]")
public class OrgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo {
private String pid = null;
private String title = null;
private String description = null;
private OrgApacheSlingDistributionPackagingImplImporterLocalDistributioProperties properties = null;
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("pid")
public String getPid() {
return pid;
}
public void setPid(String pid) {
this.pid = pid;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("title")
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("properties")
public OrgApacheSlingDistributionPackagingImplImporterLocalDistributioProperties getProperties() {
return properties;
}
public void setProperties(OrgApacheSlingDistributionPackagingImplImporterLocalDistributioProperties properties) {
this.properties = properties;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OrgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo orgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo = (OrgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo) o;
return Objects.equals(pid, orgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo.pid) &&
Objects.equals(title, orgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo.title) &&
Objects.equals(description, orgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo.description) &&
Objects.equals(properties, orgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo.properties);
}
@Override
public int hashCode() {
return Objects.hash(pid, title, description, properties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OrgApacheSlingDistributionPackagingImplImporterLocalDistributioInfo {\n");
sb.append(" pid: ").append(toIndentedString(pid)).append("\n");
sb.append(" title: ").append(toIndentedString(title)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
eb85393ce5e2e8beda518dc86b352a001366152e | 5a26b745dcbe99e7bbce9b61ba0004aaed0762d4 | /app/src/main/java/com/yingzhiyun/yingquxue/adapter/VipCouresAdapter.java | 5c007cc1e6a1dbc2da21265bb6e6cb14d9ff01ad | [] | no_license | moxun/Yingzhiyun | c7a41c78f7d0b57e16b733944f246da0516c5fc0 | ca5d62f26d885c057ae502715e9de78f2154e58c | refs/heads/master | 2022-09-06T21:07:57.926039 | 2020-06-03T08:58:06 | 2020-06-03T08:58:06 | 269,038,272 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,486 | java | package com.yingzhiyun.yingquxue.adapter;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import com.yingzhiyun.yingquxue.OkBean.VipCenterBean;
import com.yingzhiyun.yingquxue.R;
import com.yingzhiyun.yingquxue.activity.homepagr.course.CourseInfoActivity;
import com.yingzhiyun.yingquxue.base.adapter.BaseAdapter;
import java.util.List;
public class VipCouresAdapter extends BaseAdapter<VipCenterBean.ResultBean.VipCourseListBean> {
private final Context context;
public VipCouresAdapter(List<VipCenterBean.ResultBean.VipCourseListBean> dataList, Context context) {
super(dataList);
this.context =context;
}
@Override
public int getLayoutId() {
return R.layout.item_vip_video;
}
@Override
public void addAll(List<VipCenterBean.ResultBean.VipCourseListBean> list, int page) {
}
@Override
public void createHolder(ViewHolder holder, VipCenterBean.ResultBean.VipCourseListBean vipCourseListBean, int position) {
holder.setPic(R.id.item_vipvideo_back,vipCourseListBean.getCoverImg());
holder.setText(R.id.item_vipcourese_title,vipCourseListBean.getTitle());
holder.itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
context.startActivity(new Intent(context, CourseInfoActivity.class).putExtra("id",vipCourseListBean.getId()));
}
});
}
}
| [
"2636216883@qq.com"
] | 2636216883@qq.com |
1ca8240b344466288e742728f26cddb95f9a7747 | 622259e01d8555d552ddeba045fafe6624d80312 | /edu.harvard.i2b2.eclipse.plugins.adminTool/src/edu/harvard/i2b2/patientMapping/ui/DisplayXmlMessageDialog.java | 3354ef4de342435a80ca544b3b42319d947af8e2 | [] | no_license | kmullins/i2b2-workbench-old | 93c8e7a3ec7fc70b68c4ce0ae9f2f2c5101f5774 | 8144b0b62924fa8a0e4076bf9672033bdff3b1ff | refs/heads/master | 2021-05-30T01:06:11.258874 | 2015-11-05T18:00:58 | 2015-11-05T18:00:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,680 | java | /*
* Copyright (c) 2006-2015 Massachusetts General Hospital
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the i2b2 Software License v2.1
* which accompanies this distribution.
*
* Contributors:
*
* Wensong Pan
*
*/
/*
* QueryDisplayXmlMessageDialog.java
*
* Created on February 21, 2007, 4:22 PM
*/
package edu.harvard.i2b2.patientMapping.ui;
import java.io.StringWriter;
import java.util.List;
import org.jdom.input.SAXBuilder;
import org.jdom.output.Format;
import org.jdom.output.XMLOutputter;
@SuppressWarnings("serial")
public class DisplayXmlMessageDialog extends javax.swing.JFrame {
/** Creates new form QueryDisplayXmlMessageDialog */
public DisplayXmlMessageDialog(String msg) {
initComponents();
setSize(800, 400);
try {
SAXBuilder parser = new SAXBuilder();
String xmlContent = msg;
java.io.StringReader xmlStringReader = new java.io.StringReader(
xmlContent);
final org.jdom.Document tableDoc = parser.build(xmlStringReader);
XMLOutputter o = new XMLOutputter();
o.setFormat(Format.getPrettyFormat());
StringWriter str = new StringWriter();
o.output(tableDoc, str);
jMessageTextArea.setText(str.toString());
}
catch(Exception e) {
}
}
/** Creates new form QueryDisplayXmlMessageDialog */
public DisplayXmlMessageDialog(List<String> msgs) {
initComponents();
setSize(800, 400);
int it = msgs.size();
String allMessages = "";
while (it > 0) {
allMessages = allMessages + msgs.get(it - 1) + "\n\n";
it = it - 1;
}
jMessageTextArea.setText(allMessages);
}
/**
* This method is called from within the constructor to initialize the form.
*/
private void initComponents() {
jScrollPane = new javax.swing.JScrollPane();
jMessageTextArea = new javax.swing.JTextArea();
jMenuBar = new javax.swing.JMenuBar();
jFileMenu = new javax.swing.JMenu();
jCloseMenuItem = new javax.swing.JMenuItem();
getContentPane().setLayout(
new javax.swing.BoxLayout(getContentPane(),
javax.swing.BoxLayout.X_AXIS));
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
java.awt.Image img = this.getToolkit().getImage(
DisplayXmlMessageDialog.class.getResource("core-cell.gif"));
this.setIconImage(img);
jMessageTextArea.setColumns(20);
jMessageTextArea.setEditable(false);
jMessageTextArea.setRows(5);
jScrollPane.setViewportView(jMessageTextArea);
getContentPane().add(jScrollPane);
jFileMenu.setText("File");
jCloseMenuItem.setText("Close");
jCloseMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jCloseMenuItemActionPerformed(evt);
}
});
jFileMenu.add(jCloseMenuItem);
jMenuBar.add(jFileMenu);
setJMenuBar(jMenuBar);
pack();
}
private void jCloseMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
setVisible(false);
dispose();
}
/**
* @param args
* the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
String empty = null;
public void run() {
new DisplayXmlMessageDialog(empty).setVisible(true);
}
});
}
// Variables declaration
private javax.swing.JMenuItem jCloseMenuItem;
private javax.swing.JMenu jFileMenu;
private javax.swing.JMenuBar jMenuBar;
private javax.swing.JTextArea jMessageTextArea;
private javax.swing.JScrollPane jScrollPane;
// End of variables declaration
}
| [
"Janice@phs000774.partners.org"
] | Janice@phs000774.partners.org |
4fa8af81eb73ee4509bec611a11d50987175fa72 | f3da64ad593bcb25be6d258cb6aca8324fda9c0d | /app/src/main/java/tellh/com/autogo/AndroidApplication.java | b0f695e4c7ad5616874021b60329d67727290bad | [
"Apache-2.0"
] | permissive | GalesnjakBot/AutoGo | 9c3eb1ee15d44a4ebc9268bdf1780457d128f8ee | a3e5bd40ded7adf577c2303fcbc0c8914ec267c3 | refs/heads/master | 2021-01-22T19:53:56.618828 | 2017-03-15T13:47:05 | 2017-03-15T13:47:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 469 | java | package tellh.com.autogo;
import android.app.Application;
import com.squareup.leakcanary.LeakCanary;
/**
* Created by tlh on 2016/8/16 :)
*/
public class AndroidApplication extends Application {
private static AndroidApplication instance;
public static AndroidApplication getInstance() {
return instance;
}
@Override
public void onCreate() {
super.onCreate();
instance = this;
LeakCanary.install(this);
}
} | [
"570495627@qq.com"
] | 570495627@qq.com |
12141eaef95e4c5a708101c1ff74e03fd3dc61e4 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /platform/platform-impl/src/com/intellij/application/options/editor/fonts/AppFontConfigurable.java | 3341fe737724f9cbe9722a86e149bc6589bff2e9 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Java | false | false | 3,357 | java | // Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.application.options.editor.fonts;
import com.intellij.ide.DataManager;
import com.intellij.openapi.editor.EditorFactory;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.editor.colors.EditorColorsScheme;
import com.intellij.openapi.editor.colors.EditorFontCache;
import com.intellij.openapi.editor.colors.FontPreferences;
import com.intellij.openapi.editor.colors.impl.AppFontOptions;
import com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl;
import com.intellij.openapi.options.Configurable;
import com.intellij.openapi.options.Configurable.NoScroll;
import com.intellij.openapi.options.SearchableConfigurable;
import com.intellij.openapi.options.ex.Settings;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.NotNullLazyValue;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
public abstract class AppFontConfigurable implements SearchableConfigurable, Configurable.NoMargin, NoScroll {
private final NotNullLazyValue<AppFontPanel> myFontPanelInstance =
NotNullLazyValue.lazy(() -> new AppFontPanel(new AppFontPanel.FontOptionsPanelFactory() {
@Override
public @NotNull AppFontOptionsPanel create(@NotNull EditorColorsScheme previewScheme) {
return createFontOptionsPanel(previewScheme);
}
}));
@Override
public @NotNull JComponent createComponent() {
return getFontPanel().getComponent();
}
@Override
public boolean isModified() {
getFontPanel().updateWarning();
return !getStoredPreferences().equals(getUIFontPreferences());
}
@Override
public final void apply() {
applyFontPreferences();
EditorFontCache.getInstance().reset();
((EditorColorsManagerImpl)EditorColorsManager.getInstance()).schemeChangedOrSwitched(null);
EditorFactory.getInstance().refreshAllEditors();
}
protected void applyFontPreferences() {
getFontOptions().update(getUIFontPreferences());
}
private @NotNull FontPreferences getUIFontPreferences() {
return getFontPanel().getOptionsPanel().getFontPreferences();
}
@Override
public void reset() {
getStoredPreferences().copyTo(getUIFontPreferences());
getFontPanel().getOptionsPanel().updateOnChangedFont();
}
private @NotNull FontPreferences getStoredPreferences() {
return getFontOptions().getFontPreferences();
}
protected abstract @NotNull AppFontOptions<?> getFontOptions();
private @NotNull AppFontPanel getFontPanel() {
return myFontPanelInstance.getValue();
}
@Override
public void disposeUIResources() {
if (myFontPanelInstance.isComputed()) {
Disposer.dispose(getFontPanel());
}
}
@Override
public @NotNull String getHelpTopic() {
return "reference.settingsdialog.IDE.editor.colors";
}
protected abstract @NotNull AppFontOptionsPanel createFontOptionsPanel(@NotNull EditorColorsScheme previewScheme);
protected static AppFontConfigurable findConfigurable(JComponent component, Class<? extends AppFontConfigurable> confClass) {
Settings allSettings = Settings.KEY.getData(DataManager.getInstance().getDataContext(component));
return allSettings != null ? allSettings.find(confClass) : null;
}
}
| [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
c4f2a5f24224731c59bb9724c625af944b435785 | af96c6474835be2cc34ef21b0c2a45e950bb9148 | /awt/org/apache/harmony/awt/wtk/NativeRobot.java | 0b354d05bc116339c60f019dbad7d3f614e2c6b8 | [
"Apache-2.0",
"LicenseRef-scancode-unicode"
] | permissive | zsol/android_frameworks_base | 86abe37fcd4136923cab2d6677e558826f087cf9 | 8d18426076382edaaea68392a0298d2c32cfa52e | refs/heads/donut | 2021-07-04T17:24:05.847586 | 2010-01-13T19:24:55 | 2010-01-13T19:24:55 | 469,422 | 14 | 12 | NOASSERTION | 2020-10-01T18:05:31 | 2010-01-12T21:20:20 | Java | UTF-8 | Java | false | false | 2,445 | 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.
*/
/**
* @author Dmitry A. Durnev
* @version $Revision$
*/
package org.apache.harmony.awt.wtk;
import java.awt.Color;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
/**
* A cross-platform interface for java.awt.Robot implementation
*/
public interface NativeRobot {
/**
* @see java.awt.Robot#createScreenCapture(Rectangle)
* @param screenRect rectangle to capture in screen coordinates
* @return the captured image or null if
* capture failed.
*/
BufferedImage createScreenCapture(Rectangle screenRect);
/**
* @see java.awt.Robot#getPixelColor(int, int)
*/
Color getPixel(int x, int y);
/**
* Generate a native system keyboard input event.
* @param keycode A Java virtual key code
* @param press A key is pressed if true, released otherwise
* @see java.awt.Robot#keyPress(int)
* @throws IllegalArgumentException if keycode is invalid in the native system
*/
void keyEvent(int keycode, boolean press);
/**
* Generate a native system mouse button(s) press or release event.
* @param buttons A mask of Java mouse button flags
* @param press buttons are pressed if true, released otherwise
* @see java.awt.Robot#mousePress(int)
*/
void mouseButton(int buttons, boolean press);
/**
* Generate a native system mouse motion event.
*
* @see java.awt.Robot#mouseMove(int, int)
*/
void mouseMove(int x, int y);
/**
* Generate a native system mouse wheel event.
*
* @see java.awt.Robot#mouseWheel(int)
*/
void mouseWheel(int wheelAmt);
}
| [
"initial-contribution@android.com"
] | initial-contribution@android.com |
19e1f0aaa6fa78615b8ca5ce9747399a823169bd | ba6b506a9b27f3a7b1e264b200a605a29184998d | /src/java/edu/uns/oceca/jpa/SvaRespuestaPK.java | 9130445bace3d848aebbdd7f52d3e45bfc724b50 | [] | no_license | davidpy3/pegasusERP | 3255158ce837b2e1256ea5dd639b94ec1bfc5dfa | 0b6d8653c20f6c2d776249d9dc539dfc897a37b4 | refs/heads/master | 2021-01-10T11:51:18.822607 | 2015-11-16T21:57:18 | 2015-11-16T21:57:18 | 46,126,676 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,914 | java | package edu.uns.oceca.jpa;
import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
/**
*
* @author Jorik
*/
@Embeddable
public class SvaRespuestaPK implements Serializable {
@Basic(optional = false)
@Column(name = "id_participacion")
private int idParticipacion;
@Basic(optional = false)
@Column(name = "id_pregunta")
private int idPregunta;
public SvaRespuestaPK() {
}
public SvaRespuestaPK(int idParticipacion, int idPregunta) {
this.idParticipacion = idParticipacion;
this.idPregunta = idPregunta;
}
public int getIdParticipacion() {
return idParticipacion;
}
public void setIdParticipacion(int idParticipacion) {
this.idParticipacion = idParticipacion;
}
public int getIdPregunta() {
return idPregunta;
}
public void setIdPregunta(int idPregunta) {
this.idPregunta = idPregunta;
}
@Override
public int hashCode() {
int hash = 0;
hash += (int) idParticipacion;
hash += (int) idPregunta;
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof SvaRespuestaPK)) {
return false;
}
SvaRespuestaPK other = (SvaRespuestaPK) object;
if (this.idParticipacion != other.idParticipacion) {
return false;
}
if (this.idPregunta != other.idPregunta) {
return false;
}
return true;
}
@Override
public String toString() {
return "edu.uns.oceca.jpa.SvaRespuestaPK[ idParticipacion=" + idParticipacion + ", idPregunta=" + idPregunta + " ]";
}
}
| [
"TOSHIBA@192.168.1.34"
] | TOSHIBA@192.168.1.34 |
2dff8cf901e0ac9565ca80a83b5e7c2e385279c5 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/XWIKI-13372-19-26-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/xwiki/job/AbstractJob_ESTest_scaffolding.java | fb12e5807d2c51bc1f20758e6fcefb1341fc614e | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 429 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Apr 06 05:03:05 UTC 2020
*/
package org.xwiki.job;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class AbstractJob_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
e2aecff75ff692f02a6d368a3b115616de42bebf | f6504b7e7e0cc6e814f7d97c77d134bf0dd2fe71 | /BaseLib/src/main/java/de/splotycode/bamboo/core/notification/Notification.java | 81866ba59f813592383b4828eb4c588ae572985f | [] | no_license | SplotyCode/Bomboo | 8d95d376ac6f2a3d42b3d4e763667bf1f71802cd | 60a5d0fd43a5a0ca5b4d35342c100b39e6455845 | refs/heads/master | 2022-12-28T06:55:51.377560 | 2019-06-13T21:47:32 | 2019-06-13T21:47:32 | 148,342,213 | 0 | 0 | null | 2022-12-14T20:33:53 | 2018-09-11T15:52:47 | Java | UTF-8 | Java | false | false | 206 | java | package de.splotycode.bamboo.core.notification;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public class Notification {
private NotificationType type;
private String title, message;
}
| [
"davidscandurra@gmail.com"
] | davidscandurra@gmail.com |
2da7b0b7a6dbbf37e4abc5d0257f29df9edd7fd2 | 774d36285e48bd429017b6901a59b8e3a51d6add | /sources/p118io/presage/C6505hc.java | 4e0d9e49e6501b42734e6300e51f601cf9c0f29a | [] | no_license | jorge-luque/hb | 83c086851a409e7e476298ffdf6ba0c8d06911db | b467a9af24164f7561057e5bcd19cdbc8647d2e5 | refs/heads/master | 2023-08-25T09:32:18.793176 | 2020-10-02T11:02:01 | 2020-10-02T11:02:01 | 300,586,541 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 938 | java | package p118io.presage;
import java.util.Iterator;
import java.util.NoSuchElementException;
/* renamed from: io.presage.hc */
final class C6505hc<T> implements C6520hr, Iterator<T> {
/* renamed from: a */
private int f17036a;
/* renamed from: b */
private final T[] f17037b;
public C6505hc(T[] tArr) {
this.f17037b = tArr;
}
public final boolean hasNext() {
return this.f17036a < this.f17037b.length;
}
public final T next() {
try {
T[] tArr = this.f17037b;
int i = this.f17036a;
this.f17036a = i + 1;
return tArr[i];
} catch (ArrayIndexOutOfBoundsException e) {
this.f17036a--;
throw new NoSuchElementException(e.getMessage());
}
}
public final void remove() {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
}
| [
"jorge.luque@taiger.com"
] | jorge.luque@taiger.com |
7ecc37559e5e9fae683d3a1bae0be0570ee39a71 | f86938ea6307bf6d1d89a07b5b5f9e360673d9b8 | /CodeComment_Data/Code_Jam/train/Standing_Ovation/S/main(351).java | 3c4cd56c5a53ef26b1d556e291261aa09981a4cf | [] | no_license | yxh-y/code_comment_generation | 8367b355195a8828a27aac92b3c738564587d36f | 2c7bec36dd0c397eb51ee5bd77c94fa9689575fa | refs/heads/master | 2021-09-28T18:52:40.660282 | 2018-11-19T14:54:56 | 2018-11-19T14:54:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 974 | java | package methodEmbedding.Standing_Ovation.S.LYD673;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.File;
public class main {
/**
* @param args
* RanexX
*/
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
File file = new File("example.txt");
BufferedReader in = new BufferedReader(new FileReader(file));
String line;
while((line = in.readLine()) != null){
for(int j=0;j<Integer.parseInt(line);j++){
int ap=-1,ppa=0,i=0;
String[] caseline = in.readLine().split(" ");
int maxS = Integer.parseInt(caseline[0]);
String per = caseline[1];
while(i<=maxS){
ap = ap + Character.getNumericValue(per.charAt(i));
if(ap>=i){
i++;
}else{
ap++;
ppa++;
}
}
System.out.println("Case #" + (j +1) + ": " + ppa);
}
}
in.close();
}
}
| [
"liangyuding@sjtu.edu.cn"
] | liangyuding@sjtu.edu.cn |
75331300107c49b6eb87a735cad0094e40184ff2 | e3780c806fdb6798abf4ad5c3a7cb49e3d05f67a | /src/main/java/com/hankcs/hanlp/seg/Dijkstra/Path/State.java | 16a4f1138407671eb47eca29e3a20f8f04175573 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | AnyListen/HanLP | 7e3cf2774f0980d24ecab0568ad59774232a56d6 | 58e5f6cda0b894cad156b06ac75bd397c9e26de3 | refs/heads/master | 2021-01-22T04:23:14.514117 | 2018-12-11T01:27:36 | 2018-12-11T01:27:36 | 125,140,795 | 1 | 1 | Apache-2.0 | 2018-04-16T16:49:47 | 2018-03-14T02:04:04 | Java | UTF-8 | Java | false | false | 944 | java | /*
* <summary></summary>
* <author>He Han</author>
* <email>hankcs.cn@gmail.com</email>
* <create-date>2014/10/29 15:35</create-date>
*
* <copyright file="State.java" company="上海林原信息科技有限公司">
* Copyright (c) 2003-2014, 上海林原信息科技有限公司. All Right Reserved, http://www.linrunsoft.com/
* This source is subject to the LinrunSpace License. Please contact 上海林原信息科技有限公司 to get more information.
* </copyright>
*/
package com.hankcs.hanlp.seg.Dijkstra.Path;
/**
* @author hankcs
*/
public class State implements Comparable<State>
{
/**
* 路径花费
*/
public double cost;
/**
* 当前位置
*/
public int vertex;
@Override
public int compareTo(State o)
{
return Double.compare(cost, o.cost);
}
public State(double cost, int vertex)
{
this.cost = cost;
this.vertex = vertex;
}
}
| [
"jfservice@126.com"
] | jfservice@126.com |
7aaebf54673f7f3b7f04bbec6d0738b1f92b2e68 | 3b55fa2ab12a3034cd38a7ace86b9d6adc9127db | /default/administracion/gen/ceip/medicalissues/diabetes/ObservationsProperty.java | 836e6eb3acf602962121ce966a3fde4a468c124f | [] | no_license | ellishia/CEIP | e1b58eb5fef0aa7130845f2f31c4c96f4f348c5a | 206177a0924d1f0c0e84f77a93976fd9439d9645 | refs/heads/master | 2020-12-30T09:58:04.809910 | 2013-05-13T08:45:27 | 2013-05-13T08:45:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 397 | java | package ceip.medicalissues.diabetes;
import org.monet.metamodel.TextFieldProperty;
@SuppressWarnings("all")
public class ObservationsProperty extends TextFieldProperty {
public ObservationsProperty() {
super();this._code = "mbtnb3g";
this._name = "Observations";
this._label = "Observaciones";
}
public static String static_getName() {
return "Observations";
}
}
| [
"askerosi@askerosi-laptop.(none)"
] | askerosi@askerosi-laptop.(none) |
941263ffa5374b616c078c8adf372dca05f45a8e | 5e9a4b1be359c8fcc4ff4270b7eaacf4943246a7 | /src/tailor/structure/Strand.java | 486ced3a7ebbb6f5895d33e74ca1a4b4aa3da4b2 | [] | no_license | VijayEluri/tailor | 4c42ee88ff0a0582d39bcac06f3d590412261db9 | 5dad7db350f4fee4961feed0f988b63c616a2519 | refs/heads/master | 2020-05-20T11:05:36.568834 | 2019-03-16T19:34:23 | 2019-03-16T19:34:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,730 | java | package tailor.structure;
import java.util.ArrayList;
public class Strand extends Segment implements Structure, SSE {
public Strand() {
super(new ArrayList<>());
}
@Override
public void accept(StructureVisitor visitor) {
// TODO Auto-generated method stub
}
@Override
public void accept(HierarchyVisitor visitor) {
// TODO Auto-generated method stub
}
@Override
public Level getLevel() {
return Level.SSE;
}
@Override
public void addGroup(Group group) {
super.addGroup(group);
}
@Override
public Group getFirst() {
return super.getFirst();
}
@Override
public Group getLast() {
return super.getLast();
}
@Override
public String getName() {
// TODO Auto-generated method stub
return null;
}
@Override
public void addSubStructure(Structure structure) {
if (structure instanceof Group) {
addGroup((Group) structure);
} else {
throw new IllegalArgumentException("Can only add instances of " + Group.class.getName());
}
}
@Override
public String getProperty(String key) {
// TODO Auto-generated method stub
return null;
}
@Override
public void copyProperty(Structure other, String key) {
// TODO Auto-generated method stub
}
@Override
public boolean hasPropertyEqualTo(String string, String name) {
// TODO Auto-generated method stub
return false;
}
@Override
public void setProperty(String string, String string2) {
// TODO Auto-generated method stub
}
}
| [
"gilleain.torrance@gmail.com"
] | gilleain.torrance@gmail.com |
68fdbb95625bbb99e5d4666905a9cfdd02fced82 | d00ade2c3b51771c4bc722039283dc8ee88b8c76 | /src/main/java/com/allmsi/flow/reflection/FlowNodeDealUserRegisterQueryReflection.java | a69101d3063aacf381ba8702581453254b3f7571 | [] | no_license | nannan07/im-flow-spring-boot | e21eaeab6b5ba17a8e4e089b7681078790a1e2b1 | 7c1295920d638c2851b78970986fc509c14f080d | refs/heads/master | 2020-04-26T17:22:05.128842 | 2019-03-04T09:07:48 | 2019-03-04T09:07:48 | 173,710,741 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,215 | java | package com.allmsi.flow.reflection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import com.allmsi.flow.third.service.FlowExternalNodeDealUserService;
import com.allmsi.sys.config.SpringContextRegister;
import com.allmsi.sys.util.StrUtil;
@Component
public class FlowNodeDealUserRegisterQueryReflection {
@Value("${im.flow.node.deal.value:defaultFlowNodeDealUserRegisterQuery}")
private String imFlowUserList;
private final String DEFAULT_FLOW_SERVICE = "defaultFlowNodeDealUserRegisterQuery";
@Autowired
private SpringContextRegister springContextRegister;
public FlowExternalNodeDealUserService getFlowNodeDealUserService() {
FlowExternalNodeDealUserService flowNodeDealUserService = null;
String className = imFlowUserList;
if (StrUtil.isEmpty(className)) {
flowNodeDealUserService = springContextRegister.getServiceImpl(FlowExternalNodeDealUserService.class,
DEFAULT_FLOW_SERVICE);
} else {
flowNodeDealUserService = springContextRegister.getServiceImpl(FlowExternalNodeDealUserService.class,
className);
}
return flowNodeDealUserService;
}
}
| [
"15711021520@163.com"
] | 15711021520@163.com |
00e4f93aa9974d48a7473409a9224118d3f135a2 | 4a0f2d321a642075997b2b9ec700e7d4d395d66e | /src/com/core/v2ch08/PersistenceDelegateTest/PersistenceDelegateTest.java | 7178b656274090028d4e428a4a7d4b179d0d33ce | [] | no_license | rexnie/my_java | 4598fd833d295908c04f5dc77d5e71234e4298dc | 11fa99dadc93b14ebd949b87458656a0131bfbf1 | refs/heads/master | 2021-01-01T05:51:24.291937 | 2017-03-22T12:05:07 | 2017-03-22T12:05:07 | 41,648,277 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,105 | java | package com.core.v2ch08.PersistenceDelegateTest;
import java.awt.geom.*;
import java.beans.*;
import java.net.*;
import java.util.*;
/**
* This program demonstrates various persistence delegates.
* @version 1.01 2007-10-03
* @author Cay Horstmann
*/
public class PersistenceDelegateTest
{
public static class Point
{
@ConstructorProperties( { "x", "y" })
public Point(int x, int y)
{
this.x = x;
this.y = y;
}
public int getX()
{
return x;
}
public int getY()
{
return y;
}
private final int x, y;
}
public static void main(String[] args) throws Exception
{
PersistenceDelegate delegate = new PersistenceDelegate()
{
protected Expression instantiate(Object oldInstance, Encoder out)
{
Employee e = (Employee) oldInstance;
GregorianCalendar c = new GregorianCalendar();
c.setTime(e.getHireDay());
return new Expression(oldInstance, Employee.class, "new", new Object[] {
e.getName(), e.getSalary(), c.get(Calendar.YEAR), c.get(Calendar.MONTH),
c.get(Calendar.DATE) });
}
};
BeanInfo info = Introspector.getBeanInfo(Employee.class);
info.getBeanDescriptor().setValue("persistenceDelegate", delegate);
XMLEncoder out = new XMLEncoder(System.out);
out.setExceptionListener(new ExceptionListener()
{
public void exceptionThrown(Exception e)
{
e.printStackTrace();
}
});
out.setPersistenceDelegate(Rectangle2D.Double.class, new DefaultPersistenceDelegate(
new String[] { "x", "y", "width", "height" }));
out.setPersistenceDelegate(Inet4Address.class, new DefaultPersistenceDelegate()
{
protected Expression instantiate(Object oldInstance, Encoder out)
{
return new Expression(oldInstance, InetAddress.class, "getByAddress",
new Object[] { ((InetAddress) oldInstance).getAddress() });
}
});
out.setPersistenceDelegate(BitSet.class, new DefaultPersistenceDelegate()
{
protected void initialize(Class<?> type, Object oldInstance, Object newInstance,
Encoder out)
{
super.initialize(type, oldInstance, newInstance, out);
BitSet bs = (BitSet) oldInstance;
for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1))
out.writeStatement(new Statement(bs, "set", new Object[] { i, i + 1, true }));
}
});
out.writeObject(new Employee("Harry Hacker", 50000, 1989, 10, 1));
out.writeObject(new Point(17, 29));
out.writeObject(new java.awt.geom.Rectangle2D.Double(5, 10, 20, 30));
out.writeObject(InetAddress.getLocalHost());
BitSet bs = new BitSet();
bs.set(1, 4);
bs.clear(2, 3);
out.writeObject(bs);
out.close();
}
}
| [
"niedaocai@snda.com"
] | niedaocai@snda.com |
f5f3dc4037e7f0d09fe8d7a5b3e1e87c41439c8a | c68f4bfaf06bdc785d8d42372c9362d79aadcabf | /de.dc.javafx.mm.lang/src-gen/de/dc/javafx/mm/lang/validation/AbstractMmDslValidator.java | efb346fed268343ad65cd702a8695baf9483db0f | [] | no_license | chqu1012/DCSceneBuilder | d8b5c776e8993ee9d0860844d344420f132db220 | 6792fd4cdd5f2dd08ae67cb6941e577c9f85d9d8 | refs/heads/master | 2020-07-07T19:58:02.157055 | 2020-03-14T09:54:41 | 2020-03-14T09:54:41 | 203,460,887 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 863 | java | /*
* generated by Xtext 2.17.0
*/
package de.dc.javafx.mm.lang.validation;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.xtext.xbase.validation.XbaseValidator;
public abstract class AbstractMmDslValidator extends XbaseValidator {
@Override
protected List<EPackage> getEPackages() {
List<EPackage> result = new ArrayList<EPackage>(super.getEPackages());
result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.frateranatis.org/javafx"));
result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.eclipse.org/xtext/xbase/Xbase"));
result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.eclipse.org/xtext/common/JavaVMTypes"));
result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.eclipse.org/xtext/xbase/Xtype"));
return result;
}
}
| [
"cqd2202@yahoo.de"
] | cqd2202@yahoo.de |
3b67d0cf3d3e3a094282a2d61c5284e271dbbefe | dc0919c9609f03f5b239ec0799cea22ed070f411 | /com/irainxun/wifilight/fragment/FUT090ColorFragment$7.java | 9bb5233df4d0cd69cb076889d2e06b4e468ec39c | [] | no_license | jjensn/milight-decompile | a8f98af475f452c18a74fd1032dce8680f23abc0 | 47c4b9eea53c279f6fab3e89091e2fef495c6159 | refs/heads/master | 2021-06-01T17:23:28.555123 | 2016-10-12T18:07:53 | 2016-10-12T18:07:53 | 70,721,205 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,682 | java | package com.irainxun.wifilight.fragment;
import android.os.Handler;
import android.util.Log;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
import com.irainxun.wifilight.xlink.MyApp;
class FUT090ColorFragment$7
implements SeekBar.OnSeekBarChangeListener
{
FUT090ColorFragment$7(FUT090ColorFragment paramFUT090ColorFragment)
{
}
public void onProgressChanged(SeekBar paramSeekBar, int paramInt, boolean paramBoolean)
{
Log.d("debug", "progress =" + paramInt);
if (FUT090ColorFragment.access$45(this.this$0))
{
MyApp.rain_09saturation = paramInt;
FUT090ColorFragment.access$14(this.this$0).setText("Saturation:" + MyApp.rain_09saturation + "%");
if (!FUT090ColorFragment.access$48(this.this$0))
{
FUT090ColorFragment.access$8(this.this$0, true);
this.this$0.myHandler.removeMessages(4357);
this.this$0.myHandler.sendEmptyMessageDelayed(4357, 200L);
}
}
}
public void onStartTrackingTouch(SeekBar paramSeekBar)
{
}
public void onStopTrackingTouch(SeekBar paramSeekBar)
{
if (FUT090ColorFragment.access$45(this.this$0))
{
MyApp.rain_09saturation = FUT090ColorFragment.access$18(this.this$0).getProgress();
FUT090ColorFragment.access$14(this.this$0).setText("Saturation:" + MyApp.rain_09saturation + "%");
this.this$0.myHandler.removeMessages(4357);
this.this$0.myHandler.sendEmptyMessageDelayed(4357, 200L);
}
}
}
/* Location:
* Qualified Name: com.irainxun.wifilight.fragment.FUT090ColorFragment.7
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.6.1-SNAPSHOT
*/ | [
"jjensen@GAM5YG3QC-MAC.local"
] | jjensen@GAM5YG3QC-MAC.local |
c60fbbf79354a609e3614769a5ae18c45b6d94b4 | 5b009657de1892dd83cd9f7f91cd1369ca52fd5c | /src/com/qpidnetwork/request/OnQueryMyProfileCallback.java | ed0aea79075be3f5360de581733384ead1b06fd2 | [] | no_license | pangpangcc/Dating4Lady | 925c17892733eeb0ee9d149be65f35c1565eb915 | fa706ba594371a7013345bd2bcbb1db3357c5071 | refs/heads/master | 2021-01-13T15:48:47.488513 | 2016-11-30T03:55:01 | 2016-11-30T03:55:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 253 | java | package com.qpidnetwork.request;
import com.qpidnetwork.request.item.MyProfileItem;
public interface OnQueryMyProfileCallback {
public void OnQueryMyProfileDetail(long requestId, boolean isSuccess, String errno, String errmsg, MyProfileItem item);
}
| [
"Kingsleyyau@gmail.com"
] | Kingsleyyau@gmail.com |
2740ea2c97f79bfeca7ff4829289e373dafe4070 | 4b1c7b9d106344d9a30973219dfeff9060bd2ad0 | /ngap/src/main/java/tr/havelsan/ueransim/ngap0/ies/choices/NGAP_AMFPagingTarget.java | ba4cf80af5ae90b7e69e2ce60a9487582be501e2 | [
"MIT"
] | permissive | kensinxie/UERANSIM | 6384a17114e8a9ceb8bd94461edb5a393e39aba2 | 2c39c8f6895bc5bb60944797e7bcd50f7ff7011b | refs/heads/master | 2022-12-07T13:41:28.552550 | 2020-09-07T13:54:15 | 2020-09-07T13:54:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,353 | java | /*
* MIT License
*
* Copyright (c) 2020 ALİ GÜNGÖR
*
* 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 tr.havelsan.ueransim.ngap0.ies.choices;
import tr.havelsan.ueransim.ngap0.core.*;
import tr.havelsan.ueransim.ngap0.pdu.*;
import tr.havelsan.ueransim.utils.bits.*;
import tr.havelsan.ueransim.utils.octets.*;
import tr.havelsan.ueransim.ngap0.ies.bit_strings.*;
import tr.havelsan.ueransim.ngap0.ies.octet_strings.*;
import tr.havelsan.ueransim.ngap0.ies.printable_strings.*;
import tr.havelsan.ueransim.ngap0.ies.sequences.*;
import tr.havelsan.ueransim.ngap0.ies.sequence_ofs.*;
import tr.havelsan.ueransim.ngap0.ies.choices.*;
import tr.havelsan.ueransim.ngap0.ies.integers.*;
import tr.havelsan.ueransim.ngap0.ies.enumerations.*;
import java.util.List;
public class NGAP_AMFPagingTarget extends NGAP_Choice {
public NGAP_GlobalRANNodeID globalRANNodeID;
public NGAP_TAI tAI;
@Override
public String getAsnName() {
return "AMFPagingTarget";
}
@Override
public String getXmlTagName() {
return "AMFPagingTarget";
}
@Override
public String[] getMemberNames() {
return new String[]{"globalRANNodeID", "tAI"};
}
@Override
public String[] getMemberIdentifiers() {
return new String[]{"globalRANNodeID", "tAI"};
}
}
| [
"aligng1620@gmail.com"
] | aligng1620@gmail.com |
adc28e2724416342391bdef967e1547d3bddab19 | b03e73ff19caff0eef688ebc651de913c67592c0 | /2018.2/IA/Projeto/weka_source_from_jdcore/weka/gui/beans/InstanceListener.java | ef7ffdb5a033bd50fa38837cdb2d22b741fa3f96 | [] | no_license | fiorentinogiuseppe/Projetos_UFRPE | 51a577680909979c9728ff71520b497b1d8e11e8 | 52d5fb74648e5221d455cbb5faf3f2c8ac2c0c64 | refs/heads/master | 2020-12-09T05:52:39.522462 | 2020-01-16T10:35:28 | 2020-01-16T10:35:28 | 233,209,784 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 202 | java | package weka.gui.beans;
import java.util.EventListener;
public abstract interface InstanceListener
extends EventListener
{
public abstract void acceptInstance(InstanceEvent paramInstanceEvent);
}
| [
"fiorentinogiuseppebcc@gmail.com"
] | fiorentinogiuseppebcc@gmail.com |
da21172397bbf53f1ede51151c3f6d04cb9e1c29 | ab1b6e7b92517e4425bb3ae817041b7697f98558 | /drools-core/src/main/java/org/drools/xml/XmlChangeSetReader.java | 97c9d1f2ebed4c4eedf7cdc4249985dfd91187f1 | [] | no_license | jayzhk/drools51 | 2a1ee1a3a9284e79b294aa39d7050b35ffac6f31 | 98c4067df30c060ec19c0ae70244cc089ae43e56 | refs/heads/master | 2021-05-08T07:11:39.985092 | 2017-10-18T15:13:50 | 2017-10-18T15:13:50 | 106,695,906 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,813 | java | /**
* Copyright 2010 JBoss Inc
*
* 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.drools.xml;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import javax.xml.parsers.SAXParser;
import org.drools.ChangeSet;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
public class XmlChangeSetReader {
private ExtensibleXmlParser parser;
public XmlChangeSetReader(final SemanticModules modules) {
this( modules, null );
}
public XmlChangeSetReader(final SemanticModules modules, final SAXParser parser) {
if ( parser == null ) {
this.parser = new ExtensibleXmlParser();
} else {
this.parser = new ExtensibleXmlParser( parser );
}
this.parser.setSemanticModules( modules );
}
public void setClassLoader(ClassLoader classLoader, Class clazz ) {
this.parser.setClassLoader( classLoader );
this.parser.getMetaData().put( "clazz", clazz );
}
public ExtensibleXmlParser getParser() {
return this.parser;
}
/**
* Read a <code>RuleSet</code> from a <code>Reader</code>.
*
* @param reader
* The reader containing the rule-set.
*
* @return The rule-set.
*/
public ChangeSet read(final Reader reader) throws SAXException,
IOException {
return (ChangeSet) this.parser.read( reader );
}
/**
* Read a <code>RuleSet</code> from an <code>InputStream</code>.
*
* @param inputStream
* The input-stream containing the rule-set.
*
* @return The rule-set.
*/
public ChangeSet read(final InputStream inputStream) throws SAXException,
IOException {
return (ChangeSet) this.parser.read( inputStream );
}
/**
* Read a <code>RuleSet</code> from an <code>InputSource</code>.
*
* @param in
* The rule-set input-source.
*
* @return The rule-set.
*/
public ChangeSet read(final InputSource in) throws SAXException,
IOException {
return (ChangeSet) this.parser.read( in );
}
}
| [
"jay.zeng@hotmail.com"
] | jay.zeng@hotmail.com |
d20eddf5ab3253fee012af27c7cdd4223e94ce9a | 5aa4d6e75dff32e54ccaa4b10709e7846721af05 | /samples/j2ee/snippets/com.ibm.sbt.automation.test/src/main/java/com/ibm/sbt/test/java/smartcloud/CommunitiesTestSuite.java | 10d5953fe6bf3036eba77d298aa7b4c8eef4278e | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | gnuhub/SocialSDK | 6bc49880e34c7c02110b7511114deb8abfdee924 | 02cc3ac4d131b7a094f6983202c1b5e0043b97eb | refs/heads/master | 2021-01-16T20:08:07.509051 | 2014-07-09T08:53:03 | 2014-07-09T08:53:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,534 | java | /*
* � Copyright IBM Corp. 2013
*
* 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.ibm.sbt.test.java.smartcloud;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import com.ibm.sbt.automation.core.environment.TestEnvironment;
import com.ibm.sbt.automation.core.environment.TestEnvironmentFactory;
/**
* @author mwallace
*
* @date 6 Mar 2013
*/
@RunWith(Suite.class)
@SuiteClasses({ com.ibm.sbt.test.java.connections.CommunitiesTestSuite.class})
public class CommunitiesTestSuite {
@BeforeClass
public static void init() {
TestEnvironment environment = TestEnvironmentFactory.getEnvironment();
environment.enableSmartCloud();
}
@AfterClass
public static void cleanup() {
TestEnvironment environment = TestEnvironmentFactory.getEnvironment();
environment.disableSmartCloud();
TestEnvironment.cleanup();
}
}
| [
"LORENZOB@ie.ibm.com"
] | LORENZOB@ie.ibm.com |
dfa43039538a781a9194b92feb1ccc71b50ff1e4 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/4/4_8a509751afe51b13fa732c9feda6b0e6bcaffec0/MechanicPopup/4_8a509751afe51b13fa732c9feda6b0e6bcaffec0_MechanicPopup_t.java | d44c0c584092c160cc8a354d1ac54cd16a00610d | [] | 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 | 4,457 | java | /*******************************************************************************
* Copyright (C) 2011, Google Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package com.google.eclipse.mechanic.plugin.ui;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.Hyperlink;
/**
* Business end of the popup.
*/
public class MechanicPopup extends AbstractPopup {
private Font boldFont;
public MechanicPopup(Display display) {
super(display);
}
public MechanicPopup(Display display, int type) {
super(display, type);
}
@Override
protected void createTitleBar(Composite parent) {
GridLayout layout = new GridLayout(2, false);
parent.setLayout(layout);
Label label = new Label(parent, SWT.WRAP);
Font font = parent.getFont();
this.boldFont = createBoldFont(font);
label.setFont(boldFont);
label.setText("Workspace Mechanic");
GridData gridData = new GridData();
gridData.horizontalAlignment = SWT.FILL;
gridData.grabExcessHorizontalSpace = true;
label.setLayoutData(gridData);
// Yes, I'm using an 'x' as a close hint.
// TODO(konigsberg): replace with image.
// TODO(konigsberg) Move to AbstractPopup.
label = new Label(parent, SWT.WRAP);
label.setText("x");
gridData = new GridData(GridData.END, GridData.CENTER, false, false);
label.setLayoutData(gridData);
label.addMouseListener(new MouseAdapter() {
@Override
public void mouseUp(MouseEvent e) {
close();
}
});
}
private Font createBoldFont(Font font) {
FontData[] fontDatas = font.getFontData();
for (FontData fd: fontDatas) {
fd.setStyle(SWT.BOLD);
}
return new Font(font.getDevice(), fontDatas);
}
@Override
public void createContents(Composite parent) {
Label label = new Label(parent, SWT.WRAP);
label.setText(
"The Workspace Mechanic found\nissues that need your attention.");
createHyperlink(parent, "View and correct configuration issues", new Runnable() {
public void run() {
close();
correctConfigurationIssues();
}
});
createHyperlink(parent, "Disable this popup", new Runnable() {
public void run() {
close();
doNotShowPopup();
}
});
}
private Hyperlink createHyperlink(Composite parent, String text,
final Runnable runnable) {
Hyperlink hyperlink = new Hyperlink(parent, 0) {
@Override
protected void paint(PaintEvent e) {
// From half of Hyperlink.paint, this removes the part that
// draws the focus border.
GC gc = e.gc;
Rectangle clientArea = getClientArea();
if (clientArea.width == 0 || clientArea.height == 0) {
return;
}
paintHyperlink(gc);
}
};
hyperlink.setText(text);
hyperlink.setUnderlined(true);
hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
getDisplay().syncExec(runnable);
}
});
return hyperlink;
}
@Override
public void dispose() {
if (boldFont != null && !boldFont.isDisposed()) {
boldFont.dispose();
}
super.dispose();
}
/**
* Implement in subclass to correct configuration issues.
*/
public void correctConfigurationIssues() {
}
/**
* Implement in subclass to hide popup
*/
public void doNotShowPopup() {
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
5b7d3a505f2dc75412aeecdd1dab9c454cfc4e49 | 2fd9d77d529e9b90fd077d0aa5ed2889525129e3 | /DecompiledViberSrc/app/src/main/java/com/viber/voip/u.java | 2d65c3ceee792499b34249bd5822465ffc9802c9 | [] | no_license | cga2351/code | 703f5d49dc3be45eafc4521e931f8d9d270e8a92 | 4e35fb567d359c252c2feca1e21b3a2a386f2bdb | refs/heads/master | 2021-07-08T15:11:06.299852 | 2021-05-06T13:22:21 | 2021-05-06T13:22:21 | 60,314,071 | 1 | 3 | null | null | null | null | UTF-8 | Java | false | false | 344 | java | package com.viber.voip;
final class u
implements Runnable
{
private final HomeActivity a;
u(HomeActivity arg1)
{
}
public void run()
{
}
}
/* Location: E:\Study\Tools\apktool2_2\dex2jar-0.0.9.15\classes_viber_4_dex2jar.jar
* Qualified Name: com.viber.voip.u
* JD-Core Version: 0.6.2
*/ | [
"yu.liang@navercorp.com"
] | yu.liang@navercorp.com |
4a503b6f5a297e310e8f67e665d437c43cf128a5 | 66121735032200be61a8930620f4ef40ece418e6 | /src/main/java/com/tomgs/spring/data/coherence/core/extractor/ExpressionExtractor.java | 9d286e70079fba8ab2b6552b6e5004d5c218a133 | [] | no_license | tincopper/spring-data-coherence | a3816bc5553ebbafb860130ebfc979e81affbf8d | b51b2b46efab3cf27d3480cc65e68ed8f9bbc71b | refs/heads/master | 2021-04-15T10:00:10.086095 | 2018-04-08T04:47:12 | 2018-04-08T04:47:12 | 126,456,465 | 2 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,427 | java | /*
* Copyright 2009 Aleksandar Seovic
*
* 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.tomgs.spring.data.coherence.core.extractor;
import com.tangosol.io.pof.PofReader;
import com.tangosol.io.pof.PofWriter;
import com.tangosol.io.pof.PortableObject;
import com.tomgs.spring.data.coherence.core.Defaults;
import com.tomgs.spring.data.coherence.core.Expression;
import com.tomgs.spring.data.coherence.core.Extractor;
import java.io.IOException;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
/**
* An implementation of {@link Extractor} that extracts value from a target
* object using one of the {@link Expression} implementations.
*
* @author Aleksandar Seovic 2009.06.17
*/
@SuppressWarnings({"unchecked"})
public class ExpressionExtractor<T>
implements Extractor<T>, Serializable, PortableObject {
private static final long serialVersionUID = -4304647085789449767L;
// ---- data members ----------------------------------------------------
/**
* The expression to use.
*/
private Expression<T> expression;
/**
* The map containing variables to use during evaluation.
*/
private Map<String, Object> variables = new HashMap<String, Object>();
// ---- constructors ----------------------------------------------------
/**
* Deserialization constructor (for internal use only).
*/
public ExpressionExtractor() {
}
/**
* Construct an <tt>ExpressionExtractor</tt> instance.
*
* @param expression the expression to use
*/
public ExpressionExtractor(String expression) {
this(Defaults.createExpression(expression));
}
/**
* Construct an <tt>ExpressionExtractor</tt> instance.
*
* @param expression the expression to use
*/
public ExpressionExtractor(Expression<T> expression) {
this.expression = expression;
}
/**
* Construct an <tt>ExpressionExtractor</tt> instance.
*
* @param expression the expression to use
* @param variables the map containing variables to be used during
* evaluation
*/
public ExpressionExtractor(Expression<T> expression,
Map<String, Object> variables) {
this.expression = expression;
this.variables = variables;
}
// ---- Extractor implementation ----------------------------------------
/**
* {@inheritDoc}
*/
public T extract(Object target) {
if (target == null) {
return null;
}
return expression.evaluate(target, variables);
}
// ---- PortableObject implementation -----------------------------------
/**
* Deserialize this object from a POF stream.
*
* @param reader POF reader to use
*
* @throws IOException if an error occurs during deserialization
*/
public void readExternal(PofReader reader) throws IOException {
expression = (Expression<T>) reader.readObject(0);
reader.readMap(1, variables);
}
/**
* Serialize this object into a POF stream.
*
* @param writer POF writer to use
*
* @throws IOException if an error occurs during serialization
*/
public void writeExternal(PofWriter writer) throws IOException {
writer.writeObject(0, expression);
writer.writeMap(1, variables, String.class);
}
// ---- Object methods --------------------------------------------------
/**
* Test objects for equality.
*
* @param o object to compare this object with
*
* @return <tt>true</tt> if the specified object is equal to this object
* <tt>false</tt> otherwise
*/
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ExpressionExtractor that = (ExpressionExtractor) o;
return expression.equals(that.expression)
&& (variables == null
? that.variables == null
: variables.equals(that.variables));
}
/**
* Return hash code for this object.
*
* @return this object's hash code
*/
@Override
public int hashCode() {
int result = expression.hashCode();
result = 31 * result + (variables != null
? variables.hashCode()
: 0);
return result;
}
/**
* Return string representation of this object.
*
* @return string representation of this object
*/
@Override
public String toString() {
return getClass().getSimpleName() + "{" +
"expression=" + expression +
", variables=" + variables +
'}';
}
} | [
"136082619@qq.com"
] | 136082619@qq.com |
a0c68adbf77df67862d84eb1c64e006888ca3e51 | 9b2b6aa7e2546ca9734f732811c77d32c16708f7 | /app/src/main/java/com/example/myapplication/presenter/NewsSlidePersenter.java | e643b578b9407b980338af46b30360c8fef1e1b6 | [] | no_license | Laddie1994/NewsSample | 34055141531eb9883e93871c5c92aa4032807bbd | 29d59a195d62ad70f9874401dca231bdbde5e3f3 | refs/heads/master | 2020-07-20T07:19:43.426524 | 2019-09-05T15:29:51 | 2019-09-05T15:29:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 654 | java | package com.example.myapplication.presenter;
import com.example.myapplication.bean.NewsDetail;
import com.example.myapplication.interactor.NewsDetailInteracor;
import com.example.myapplication.presenter.BasePresenter;
import com.example.myapplication.view.NewsSlideView;
/**
* Created by MBENBEN on 2016/1/19.
*/
public class NewsSlidePersenter extends BasePresenter<NewsDetail> {
public NewsSlidePersenter(NewsSlideView view){
super(new NewsDetailInteracor(), view);
}
@Override
protected void formatData(NewsDetail newsDetail) {
if(newsDetail != null){
mView.showSuccess(newsDetail);
}
}
}
| [
"762900942@qq.com"
] | 762900942@qq.com |
e68aa0b82c4936d878bb373657a988f30199b813 | aebc64415090ab67574aea581f0935c6af7df350 | /policy-service/src/main/java/zw/co/mynhaka/policyservice/domain/model/MobileMoneyDetails.java | d06ff124a737b21e4d2b3a4cb94e268ad83269eb | [] | no_license | emanyeruke/emanyeruke | 12d1828535322e8aef89c1158a8a048076e5a9ec | da5a0faef7053a3b384b1a236c71e5e7f405f8a5 | refs/heads/main | 2023-09-06T09:18:40.677758 | 2021-11-09T13:33:36 | 2021-11-09T13:33:36 | 425,185,901 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 342 | java | package zw.co.mynhaka.policyservice.domain.model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.Embeddable;
@Data
@Embeddable
@NoArgsConstructor
@AllArgsConstructor
public class MobileMoneyDetails {
private String mobileNumber;
private String mobileAccountName;
}
| [
"annettez@sonity.net"
] | annettez@sonity.net |
c12e091bdc4fd80d751df12d08fd9d7275dae9ab | 228f85a03cf7b6cd93ca80c332b7c8fd7e5c1519 | /manager/biz/src/main/java/com/alibaba/otter/manager/biz/config/pipeline/dal/PipelineNodeRelationDAO.java | 3115425ed59fc39c5e13878686d6ae71f5068277 | [
"Apache-2.0"
] | permissive | alibaba/otter | 4ef5ad538a3793a5737cd2fd80d68e4601b773c6 | 7af72a3f73094da25ab98bd7319e2a29d086075c | refs/heads/master | 2023-07-17T23:17:08.088038 | 2023-05-31T06:18:32 | 2023-05-31T06:18:32 | 11,997,640 | 7,942 | 2,568 | Apache-2.0 | 2023-09-14T13:51:43 | 2013-08-09T09:31:22 | Java | UTF-8 | Java | false | false | 1,484 | java | /*
* Copyright (C) 2010-2101 Alibaba Group Holding Limited.
*
* 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.alibaba.otter.manager.biz.config.pipeline.dal;
import java.util.List;
import com.alibaba.otter.manager.biz.common.basedao.GenericDAO;
import com.alibaba.otter.manager.biz.config.pipeline.dal.dataobject.PipelineNodeRelationDO;
/**
* 考虑是否需要 类PipelineNodeRelationDAO.java的实现描述:TODO 类实现描述
*
* @author simon 2011-10-31 下午11:41:53
*/
public interface PipelineNodeRelationDAO extends GenericDAO<PipelineNodeRelationDO> {
public void insertBatch(List<PipelineNodeRelationDO> pipelineNodeRelationDos);
public void updateByNodeId(Long... nodeId);
public void deleteByPipelineId(Long pipelineId);
public void deleteByNodeId(Long... nodeId);
public List<PipelineNodeRelationDO> listByPipelineIds(Long... pipelineId);
public List<PipelineNodeRelationDO> listByNodeId(Long nodeId);
}
| [
"jianghang.loujh@alibaba-inc.com"
] | jianghang.loujh@alibaba-inc.com |
938df44465b50d90a97a14a35d5d798f4a3864a5 | 7c21c81e21f465b8e131cc991fdcd4af7846b981 | /src/main/java/vazkii/quark/misc/feature/PoisonPotatoUsage.java | 4c5d7a0e022e5cebb0bc3d28e799f06096b453c2 | [
"Apache-2.0"
] | permissive | lumien231/Quark | 0f5446febdf8964a44db8209707f845eec3b669a | 89400b45ee6d37eaec885725cf82040b15700d60 | refs/heads/master | 2021-05-14T12:41:39.601749 | 2018-01-01T17:39:38 | 2018-01-01T17:39:38 | 116,417,439 | 2 | 0 | null | 2018-01-05T19:02:02 | 2018-01-05T19:02:01 | null | UTF-8 | Java | false | false | 1,959 | java | package vazkii.quark.misc.feature;
import net.minecraft.client.particle.ParticleSpell.MobFactory;
import net.minecraft.entity.Entity;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.init.Items;
import net.minecraft.init.MobEffects;
import net.minecraft.potion.PotionEffect;
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteract;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import vazkii.quark.base.module.Feature;
public class PoisonPotatoUsage extends Feature {
private static final String TAG_POISONED = "quark:poison_potato_applied";
double chance;
@Override
public void setupConfig() {
chance = loadPropDouble("Chance to Poison", "", 0.1);
}
@SubscribeEvent
public void onInteract(EntityInteract event) {
if(event.getTarget() instanceof EntityAnimal && event.getItemStack().getItem() == Items.POISONOUS_POTATO) {
EntityAnimal animal = (EntityAnimal) event.getTarget();
if(animal.isChild() && !isEntityPoisoned(animal)) {
if(!event.getWorld().isRemote) {
if(animal.world.rand.nextDouble() < chance) {
poisonEntity(animal);
animal.addPotionEffect(new PotionEffect(MobEffects.POISON, 60, 0));
}
} else event.getEntityPlayer().swingArm(event.getHand());
event.getItemStack().shrink(1);
}
}
}
@SubscribeEvent
public void onEntityUpdate(LivingUpdateEvent event) {
if(event.getEntity() instanceof EntityAnimal) {
EntityAnimal animal = (EntityAnimal) event.getEntity();
if(animal.isChild() && isEntityPoisoned(animal))
animal.setGrowingAge(-24000);
}
}
private boolean isEntityPoisoned(Entity e) {
return e.getEntityData().getBoolean(TAG_POISONED);
}
private void poisonEntity(Entity e) {
e.getEntityData().setBoolean(TAG_POISONED, true);
}
@Override
public boolean hasSubscriptions() {
return true;
}
}
| [
"vazkii@hotmail.com"
] | vazkii@hotmail.com |
caab9bb5b1f9f876dd71ecb36de050de1efeeaf8 | 62acd49e0e8a7e2c66ffdcea99abbf3198bd1557 | /linphone/src/main/java/com/android/face/linphone/compatibility/ApiElevenPlus.java | cedd800ceeca5c4e869ec52e688ae388c12d22ad | [] | no_license | liujingyi1/Translator-5 | 29dee688ec6a5c3f86e2ba8b6804314cc436610e | 2627486d80a1d4aa4dbb2360da1a96f5d6234d26 | refs/heads/master | 2020-09-10T04:24:54.444148 | 2019-11-14T08:29:41 | 2019-11-14T08:29:41 | 221,647,783 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,720 | java | package com.android.face.linphone.compatibility;
import android.annotation.TargetApi;
import android.app.AlarmManager;
import android.app.Notification;
import android.app.PendingIntent;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.provider.ContactsContract.CommonDataKinds.SipAddress;
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Intents.Insert;
import android.widget.TextView;
import com.android.face.R;
import java.util.ArrayList;
/*
ApiElevenPlus.java
Copyright (C) 2012 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/**
* @author Sylvain Berfini
*/
@TargetApi(11)
public class ApiElevenPlus {
@SuppressWarnings("deprecation")
public static Notification createMessageNotification(Context context,
int msgCount, String msgSender, String msg, Bitmap contactIcon,
PendingIntent intent) {
String title;
if (msgCount == 1) {
title = msgSender;
} else {
title = context.getString(R.string.unread_messages)
.replace("%i", String.valueOf(msgCount));
}
Notification notif = new Notification.Builder(context)
.setContentTitle(title)
.setContentText(msg)
.setContentIntent(intent)
.setSmallIcon(R.drawable.chat)
.setAutoCancel(true)
.setDefaults(
Notification.DEFAULT_LIGHTS
| Notification.DEFAULT_SOUND
| Notification.DEFAULT_VIBRATE)
.setWhen(System.currentTimeMillis())
.setNumber(msgCount)
.setLargeIcon(contactIcon).getNotification();
return notif;
}
@SuppressWarnings("deprecation")
public static Notification createInCallNotification(Context context,
String title, String msg, int iconID, Bitmap contactIcon,
String contactName, PendingIntent intent) {
Notification notif = new Notification.Builder(context).setContentTitle(contactName)
.setContentText(msg).setSmallIcon(iconID)
.setAutoCancel(false)
.setContentIntent(intent)
.setWhen(System.currentTimeMillis())
.setLargeIcon(contactIcon).getNotification();
notif.flags |= Notification.FLAG_ONGOING_EVENT;
return notif;
}
@SuppressWarnings("deprecation")
public static Notification createNotification(Context context, String title, String message, int icon, int level, Bitmap largeIcon, PendingIntent intent, boolean isOngoingEvent) {
Notification notif;
if (largeIcon != null) {
notif = new Notification.Builder(context)
.setContentTitle(title)
.setContentText(message)
.setSmallIcon(icon, level)
.setLargeIcon(largeIcon)
.setContentIntent(intent)
.setWhen(System.currentTimeMillis())
.getNotification();
} else {
notif = new Notification.Builder(context)
.setContentTitle(title)
.setContentText(message)
.setSmallIcon(icon, level)
.setContentIntent(intent)
.setWhen(System.currentTimeMillis())
.getNotification();
}
if (isOngoingEvent) {
notif.flags |= Notification.FLAG_ONGOING_EVENT;
}
return notif;
}
public static Intent prepareAddContactIntent(String displayName, String sipUri) {
Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
intent.putExtra(Insert.NAME, displayName);
if (sipUri != null && sipUri.startsWith("sip:")) {
sipUri = sipUri.substring(4);
}
ArrayList<ContentValues> data = new ArrayList<ContentValues>();
ContentValues sipAddressRow = new ContentValues();
sipAddressRow.put(Contacts.Data.MIMETYPE, SipAddress.CONTENT_ITEM_TYPE);
sipAddressRow.put(SipAddress.SIP_ADDRESS, sipUri);
data.add(sipAddressRow);
intent.putParcelableArrayListExtra(Insert.DATA, data);
return intent;
}
public static Intent prepareEditContactIntentWithSipAddress(int id, String sipUri) {
Intent intent = new Intent(Intent.ACTION_EDIT, Contacts.CONTENT_URI);
Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, id);
intent.setData(contactUri);
ArrayList<ContentValues> data = new ArrayList<ContentValues>();
ContentValues sipAddressRow = new ContentValues();
sipAddressRow.put(Contacts.Data.MIMETYPE, SipAddress.CONTENT_ITEM_TYPE);
sipAddressRow.put(SipAddress.SIP_ADDRESS, sipUri);
data.add(sipAddressRow);
intent.putParcelableArrayListExtra(Insert.DATA, data);
return intent;
}
@SuppressWarnings("deprecation")
public static Notification createMissedCallNotification(Context context, String title, String text, PendingIntent intent) {
Notification notif = new Notification.Builder(context)
.setContentTitle(title)
.setContentText(text)
.setContentIntent(intent)
.setSmallIcon(R.drawable.call_status_missed)
.setAutoCancel(true)
.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE)
.setWhen(System.currentTimeMillis()).getNotification();
return notif;
}
@SuppressWarnings("deprecation")
public static Notification createSimpleNotification(Context context, String title, String text, PendingIntent intent) {
Notification notif = new Notification.Builder(context)
.setContentTitle(title)
.setContentText(text)
.setContentIntent(intent)
.setSmallIcon(R.drawable.linphone_logo)
.setAutoCancel(true)
.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE)
.setWhen(System.currentTimeMillis()).getNotification();
return notif;
}
@SuppressWarnings("deprecation")
public static void setTextAppearance(TextView textview, Context context, int style) {
textview.setTextAppearance(context, style);
}
public static void scheduleAlarm(AlarmManager alarmManager, int type, long triggerAtMillis, PendingIntent operation) {
alarmManager.set(type, triggerAtMillis, operation);
}
}
| [
"jingyi.liu@ragentek.com"
] | jingyi.liu@ragentek.com |
8348a4fd603c1e336d6a5935205dff7e42fda8af | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /plugins/lombok/testData/action/delombok/equalsandhashcode/beforeEqualsAndHashCodeCallSuper.java | 0fdc156a600adf8984d4752511721233e392bef2 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Java | false | false | 529 | java | @lombok.EqualsAndHashCode(callSuper = true)
class EqualsAndHashCodeCallSuper extends java.util.Date {
int x;
float f;
double d;
boolean bool;
boolean[] y;
Object[] z;
String a;
int getX() {
return x;
}
float getF() {
return f;
}
double getD() {
return d;
}
boolean isBool() {
return bool;
}
boolean[] getY() {
return y;
}
Object[] getZ() {
return z;
}
String getA() {
return a;
}
}
| [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
baa29d5a7dcfac13122d079a904a67fb63002c9a | 3eff038a86189cc7fd7ccf0d8789cd0a67e7c7cc | /main/elasticactors-kafka/src/main/java/org/elasticsoftware/elasticactors/kafka/serialization/UUIDSerializer.java | 1a8f0c2b6898988d10a0e0a7d5ea2adf13292eb2 | [
"Apache-2.0"
] | permissive | elasticsoftwarefoundation/elasticactors | 0491846542a90135ac34811c47b77b9c1ede7e47 | 660250d9e69429101d7e44163c3e09d764b9c6fe | refs/heads/master | 2023-06-22T06:16:07.072248 | 2023-05-05T06:34:07 | 2023-05-05T06:34:07 | 8,428,305 | 34 | 11 | Apache-2.0 | 2023-08-03T16:19:55 | 2013-02-26T08:25:40 | Java | UTF-8 | Java | false | false | 1,285 | java | /*
* Copyright 2013 - 2023 The Original 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.elasticsoftware.elasticactors.kafka.serialization;
import org.apache.kafka.common.serialization.Serializer;
import org.elasticsoftware.elasticactors.messaging.UUIDTools;
import java.util.Map;
import java.util.UUID;
public final class UUIDSerializer implements Serializer<UUID> {
@Override
public void configure(Map<String, ?> configs, boolean isKey) {
}
@Override
public byte[] serialize(String topic, UUID uuid) {
if (uuid == null) {
return null;
} else {
return UUIDTools.toByteArray(uuid);
}
}
@Override
public void close() {
}
}
| [
"jwijgerd@gmail.com"
] | jwijgerd@gmail.com |
6da14c658d0432fd8bde03ba53e1b4eeba2417a2 | ac7853e1d932cb5af3e393b255971c245d284637 | /discovery/src/main/java/io/airlift/discovery/client/MergingServiceSelectorFactory.java | c4a956e89fcfbf5b4d6c0a0776a7796bad531fcd | [
"Apache-2.0"
] | permissive | treasure-data/airlift | 23e62ea072800c80f38641721ead5bbdcd0853d3 | 519fb14dd23b663a80367ebcb6d7b9b871aadc24 | refs/heads/master | 2023-08-08T07:27:23.292718 | 2023-07-21T14:41:48 | 2023-07-21T14:41:48 | 22,635,417 | 2 | 2 | Apache-2.0 | 2023-06-13T22:55:38 | 2014-08-05T07:59:36 | Java | UTF-8 | Java | false | false | 1,009 | java | package io.airlift.discovery.client;
import io.airlift.node.NodeInfo;
import static java.util.Objects.requireNonNull;
public class MergingServiceSelectorFactory
implements ServiceSelectorFactory
{
private final ServiceSelectorFactory selectorFactory;
private final Announcer announcer;
private final NodeInfo nodeInfo;
public MergingServiceSelectorFactory(ServiceSelectorFactory selectorFactory, Announcer announcer, NodeInfo nodeInfo)
{
this.selectorFactory = requireNonNull(selectorFactory, "selectorFactory is null");
this.announcer = requireNonNull(announcer, "announcer is null");
this.nodeInfo = requireNonNull(nodeInfo, "nodeInfo is null");
}
@Override
public ServiceSelector createServiceSelector(String type, ServiceSelectorConfig selectorConfig)
{
ServiceSelector selector = selectorFactory.createServiceSelector(type, selectorConfig);
return new MergingServiceSelector(selector, announcer, nodeInfo);
}
}
| [
"david@acz.org"
] | david@acz.org |
68587136690aca6ad4ff771a0430dd9d132f1d00 | 41ae950b46036a9ebe6a221fcc0a23601bfbf190 | /LeetCode/src/lcci/Lcci1715.java | f886e189820c87b863daca7b41dd4f27c54fd253 | [] | no_license | yuruiyin/AlgorithmLearn | f7a88a499d050fa9c5d666514a74de0f0a56d001 | 4224b664e6d05f233512f77088f6d1437a87cd97 | refs/heads/master | 2023-07-08T09:19:41.101604 | 2023-07-03T01:48:08 | 2023-07-03T01:48:08 | 143,147,502 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,480 | java | package lcci;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
/**
* Lcci1715
*
* @author: yry
* @date: 2020/3/23
*/
public class Lcci1715 {
private Set<String> set;
private Boolean[] memo;
private boolean dp(int from, String word) {
int len = word.length();
if (from == len) {
return true;
}
if (memo[from] != null) {
return memo[from];
}
for (int i = from; i < len; i++) {
if (set.contains(word.substring(from, i + 1)) && dp(i + 1, word)) {
memo[from] = true;
return true;
}
}
memo[from] = false;
return false;
}
public String longestWord(String[] words) {
Arrays.sort(words, (o1, o2) -> o1.length() == o2.length() ? o1.compareTo(o2) : o2.length() - o1.length());
set = new HashSet<>();
set.addAll(Arrays.asList(words));
for (String word : words) {
memo = new Boolean[word.length()];
set.remove(word);
if (dp(0, word)) {
return word;
}
set.add(word);
}
return "";
}
public static void main(String[] args) {
System.out.println(new Lcci1715().longestWord(new String[]{
"qlmql","qlmqlmqqlqmqqlq","mqqlqmqqlqmqqlq","mqqlq","mqqlqlmlsmqq","qmlmmmmsm","lmlsmqq","slmsqq","mslqssl","mqqlqmqqlq"
}));
}
}
| [
"yuruiyin@cyou-inc.com"
] | yuruiyin@cyou-inc.com |
219f86472b82d8703b67cff516b182f729b0dda9 | 427eba234b6bb3421db737df1725194a8404ed3f | /subprojects/griffon-tasks-core/src/main/java/griffon/plugins/tasks/TaskPredicates.java | 03df9aecbbce116692d39c87a4ac15ef852e19ea | [
"Apache-2.0"
] | permissive | griffon-plugins/griffon-tasks-plugin | 161182dbe8c95716b6105279363d21d022007d40 | 6fc4bc8c78088f0782245406bec0330c4346904d | refs/heads/master | 2021-06-04T04:00:41.601582 | 2021-03-02T01:01:03 | 2021-03-02T01:01:03 | 22,605,266 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,955 | java | /*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2014-2021 The author and/or original 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 griffon.plugins.tasks;
/**
* @author <a href="mailto:eike.kettner@gmail.com">Eike Kettner</a>
* @since 21.07.11 17:34
*/
public class TaskPredicates {
public static TaskPredicate blockingTasks = new TaskPredicate() {
public boolean apply(TaskControl input) {
return input.getContext().getTask().getMode() == Task.Mode.BLOCKING_APPLICATION ||
input.getContext().getTask().getMode() == Task.Mode.BLOCKING_WINDOW;
}
};
public static TaskPredicate backgroundTasks = new TaskPredicate() {
public boolean apply(TaskControl input) {
return input.getContext().getTask().getMode() == Task.Mode.BACKGROUND;
}
};
public static TaskPredicate pendingTasks = new TaskPredicate() {
public boolean apply(TaskControl input) {
return input.getContext().getState() == Task.State.PENDING;
}
};
public static TaskPredicate startedTasks = new TaskPredicate() {
public boolean apply(TaskControl input) {
return input.getContext().getState() == Task.State.STARTED;
}
};
public static TaskPredicate allTasks = new TaskPredicate() {
public boolean apply(TaskControl control) {
return true;
}
};
}
| [
"aalmiray@gmail.com"
] | aalmiray@gmail.com |
1f4b514731c10c42b41f038b2d6b3f3244e78c67 | 5fc707b4ef12826faca8ec1c580cb1dcf4cc7dc2 | /news-app/news-app-server/src/main/java/com/kanfa/news/app/mapper/DemandMapper.java | 5f619ceabce9d0954d9d6f9298f28d742131be04 | [] | no_license | MavonCmc/wdw | 06597b8aca4054ecc6be7d2062543311da2073c0 | 814911c723fe6a9a7cd2c13e968776ead71f1b1b | refs/heads/master | 2023-03-15T14:49:46.993701 | 2018-08-29T08:34:42 | 2018-08-29T08:34:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 971 | java | package com.kanfa.news.app.mapper;
import com.kanfa.news.app.entity.Demand;
import com.kanfa.news.app.vo.admin.my.DemandInfo;
import com.kanfa.news.app.vo.admin.my.MyDemandPageInfo;
import com.kanfa.news.app.vo.admin.video.VideoDemandInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;
import tk.mybatis.mapper.common.Mapper;
import java.util.List;
/**
*
*
* @author chenjie
* @email chenjie@kanfanews.com
* @date 2018-03-15 11:52:46
*/
public interface DemandMapper extends Mapper<Demand> {
//视频库的分页显示
List<VideoDemandInfo> getPage();
//视频库的搜索功能
List<VideoDemandInfo> getSearchPage(@Param("title") String title);
//我的视频库 分页信息及搜索
List<MyDemandPageInfo> getMyDemandPage(@RequestBody MyDemandPageInfo entity);
/**
* 新增视频
* @param
* @return
*/
int insertDemand(DemandInfo entity);
}
| [
"wdw.ok@163.com"
] | wdw.ok@163.com |
262d0da919a2c4861af12a29d4867e85c369a051 | 06becbda8621ab76e89880ff1efe890bc5a9bc8e | /src/main/java/com/gdi/posbackend/model/response/WarehouseWithProductStocksResponse.java | a47f61dd97f92eb0be397c2f99f484f1a592acb2 | [] | no_license | feryadialoi/pos-v2-backend | b1655f3ed4401edaf8399f79748f99db45c17712 | ac6d1b6ff2b4375c57826d6eaabf350ddc54e3db | refs/heads/master | 2023-08-18T06:39:10.404229 | 2021-10-04T03:57:52 | 2021-10-04T03:57:52 | 393,136,589 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 473 | java | package com.gdi.posbackend.model.response;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.domain.Page;
/**
* @author Feryadialoi
* @date 9/7/2021 3:44 AM
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WarehouseWithProductStocksResponse {
private WarehouseResponse warehouse;
private Page<SimplifiedProductStockResponse> pageOfProductStock;
}
| [
"feryadialoi@gmail.com"
] | feryadialoi@gmail.com |
98adb08b6a45d6f30745a9a780191dc66c547dbd | 326b59ba3ad20993ce9a9103503faab242f59090 | /src/net/minecraft/server/class_gv.java | 3c1abd60f06892049dfcb20a0e7264abdf0585ad | [] | no_license | MinecraftSources/MinecraftServerDec19 | 0960ab05ef7a52d2008c199d33dbf6b5f1bdfdbe | c58a9821063cfb5f1c65674ce9c172d945a8fdf9 | refs/heads/master | 2021-01-17T05:18:33.321026 | 2015-08-29T03:09:12 | 2015-08-29T03:09:12 | 44,114,398 | 6 | 2 | null | 2015-10-12T14:55:05 | 2015-10-12T14:55:04 | null | UTF-8 | Java | false | false | 2,088 | java | package net.minecraft.server;
import java.io.IOException;
import java.util.Collection;
public class class_gv implements Packet {
private int a;
private byte b;
private boolean c;
private class_axk[] d;
private int e;
private int f;
private int g;
private int h;
private byte[] i;
public class_gv() {
}
public class_gv(int var1, byte var2, boolean var3, Collection var4, byte[] var5, int var6, int var7, int var8, int var9) {
a = var1;
b = var2;
c = var3;
d = (class_axk[]) var4.toArray(new class_axk[var4.size()]);
e = var6;
f = var7;
g = var8;
h = var9;
i = new byte[var8 * var9];
for (int var10 = 0; var10 < var8; ++var10) {
for (int var11 = 0; var11 < var9; ++var11) {
i[var10 + (var11 * var8)] = var5[var6 + var10 + ((var7 + var11) * 128)];
}
}
}
@Override
public void decode(PacketDataSerializer var1) throws IOException {
a = var1.g();
b = var1.readByte();
c = var1.readBoolean();
d = new class_axk[var1.g()];
for (int var2 = 0; var2 < d.length; ++var2) {
short var3 = var1.readByte();
d[var2] = new class_axk((byte) ((var3 >> 4) & 15), var1.readByte(), var1.readByte(), (byte) (var3 & 15));
}
g = var1.readUnsignedByte();
if (g > 0) {
h = var1.readUnsignedByte();
e = var1.readUnsignedByte();
f = var1.readUnsignedByte();
i = var1.a();
}
}
@Override
public void encode(PacketDataSerializer var1) throws IOException {
var1.b(a);
var1.writeByte(b);
var1.writeBoolean(c);
var1.b(d.length);
class_axk[] var2 = d;
int var3 = var2.length;
for (int var4 = 0; var4 < var3; ++var4) {
class_axk var5 = var2[var4];
var1.writeByte(((var5.a() & 15) << 4) | (var5.d() & 15));
var1.writeByte(var5.b());
var1.writeByte(var5.c());
}
var1.writeByte(g);
if (g > 0) {
var1.writeByte(h);
var1.writeByte(e);
var1.writeByte(f);
var1.a(i);
}
}
public void a(PacketListenerPlayOut var1) {
var1.a(this);
}
// $FF: synthetic method
// $FF: bridge method
@Override
public void handle(PacketListener var1) {
this.a((PacketListenerPlayOut) var1);
}
}
| [
"jpguereque@yahoo.com.mx"
] | jpguereque@yahoo.com.mx |
8756e5d7e2fd26b08413eb169bc49c5fcbd5fdef | a3bd3b51694c78649560a40f91241fda62865b18 | /src/test/java/com/alibaba/druid/bvt/pool/exception/OracleExceptionSorterTest_stmt_clearWarrnings.java | 9b25b558c6728d85c66b9493a206df56040e6b87 | [
"Apache-2.0"
] | permissive | kerry8899/druid | e96d7ccbd03353e47a97bea8388d46b2fe173f61 | a7cd07aac11c49d4d7d3e1312c97b6513efd2daa | refs/heads/master | 2021-01-23T02:00:33.500852 | 2019-03-29T10:14:34 | 2019-03-29T10:14:34 | 85,957,671 | 0 | 0 | null | 2017-03-23T14:14:01 | 2017-03-23T14:14:01 | null | UTF-8 | Java | false | false | 2,724 | java | package com.alibaba.druid.bvt.pool.exception;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import junit.framework.TestCase;
import org.junit.Assert;
import com.alibaba.druid.mock.MockConnection;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.pool.DruidPooledConnection;
import com.alibaba.druid.pool.vendor.OracleExceptionSorter;
import com.alibaba.druid.stat.DruidDataSourceStatManager;
import com.alibaba.druid.stat.JdbcStatManager;
import com.alibaba.druid.test.util.OracleMockDriver;
import com.alibaba.druid.util.JdbcUtils;
public class OracleExceptionSorterTest_stmt_clearWarrnings extends TestCase {
private DruidDataSource dataSource;
protected void setUp() throws Exception {
Assert.assertEquals(0, JdbcStatManager.getInstance().getSqlList().size());
dataSource = new DruidDataSource();
dataSource.setExceptionSorter(new OracleExceptionSorter());
dataSource.setDriver(new OracleMockDriver());
dataSource.setUrl("jdbc:mock:xxx");
dataSource.setPoolPreparedStatements(true);
dataSource.setMaxOpenPreparedStatements(100);
}
@Override
protected void tearDown() throws Exception {
JdbcUtils.close(dataSource);
Assert.assertEquals(0, DruidDataSourceStatManager.getInstance().getDataSourceList().size());
}
public void test_connect() throws Exception {
String sql = "SELECT 1";
{
DruidPooledConnection conn = dataSource.getConnection();
PreparedStatement pstmt = conn.prepareStatement(sql);
pstmt.execute();
pstmt.close();
conn.close();
}
DruidPooledConnection conn = dataSource.getConnection();
MockConnection mockConn = conn.unwrap(MockConnection.class);
Assert.assertNotNull(mockConn);
Statement stmt = conn.createStatement();
stmt.execute(sql);
SQLException exception = new SQLException("xx", "xxx", 28);
mockConn.setError(exception);
SQLException stmtErrror = null;
try {
stmt.clearWarnings();
} catch (SQLException ex) {
stmtErrror = ex;
}
Assert.assertNotNull(stmtErrror);
Assert.assertSame(exception, stmtErrror);
SQLException commitError = null;
try {
conn.commit();
} catch (SQLException ex) {
commitError = ex;
}
Assert.assertNotNull(commitError);
Assert.assertSame(exception, commitError.getCause());
conn.close();
}
}
| [
"372822716@qq.com"
] | 372822716@qq.com |
98af0309941db37adfb90de7a09da12eeae875fa | 065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be | /eclipsejdt_cluster/8703/src_0.java | 00f8dd7cea0b58663c2edb0166730f17422c53fb | [] | no_license | martinezmatias/GenPat-data-C3 | 63cfe27efee2946831139747e6c20cf952f1d6f6 | b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4 | refs/heads/master | 2022-04-25T17:59:03.905613 | 2020-04-15T14:41:34 | 2020-04-15T14:41:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,083 | java | package org.eclipse.jdt.internal.eval;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
import org.eclipse.jdt.internal.compiler.Compiler;
import org.eclipse.jdt.internal.compiler.*;
import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
/**
* A compiler that compiles code snippets.
*/
public class CodeSnippetCompiler extends Compiler {
/**
* Creates a new code snippet compiler initialized with a code snippet parser.
*/
public CodeSnippetCompiler(
INameEnvironment environment,
IErrorHandlingPolicy policy,
ConfigurableOption[] settings,
ICompilerRequestor requestor,
IProblemFactory problemFactory,
EvaluationContext evaluationContext,
int codeSnippetStart,
int codeSnippetEnd) {
super(environment, policy, settings, requestor, problemFactory);
this.parser =
new CodeSnippetParser(problemReporter, evaluationContext, this.options.parseLiteralExpressionsAsConstants, codeSnippetStart, codeSnippetEnd);
this.parseThreshold = 1; // fully parse only the code snippet compilation unit
}
}
| [
"375833274@qq.com"
] | 375833274@qq.com |
c1cebb4bc6f1bd5e74a74127026a9a935cba0eb6 | 53f5a941261609775dc3eedf0cb487956b734ab0 | /com.samsung.accessory.atticmgr/sources/com/samsung/accessory/hearablemgr/core/fota/manager/FotaProviderApplication.java | dac584042714d5ae16292e8b68a3a0e3ab7dadf7 | [] | no_license | ThePBone/BudsProAnalysis | 4a3ede6ba6611cc65598d346b5a81ea9c33265c0 | 5b04abcae98d1ec8d35335d587b628890383bb44 | refs/heads/master | 2023-02-18T14:24:57.731752 | 2021-01-17T12:44:58 | 2021-01-17T12:44:58 | 322,783,234 | 16 | 1 | null | null | null | null | UTF-8 | Java | false | false | 759 | java | package com.samsung.accessory.hearablemgr.core.fota.manager;
import com.samsung.accessory.hearablemgr.Application;
import com.samsung.android.fotaprovider.FotaProviderInitializer;
import seccompat.android.util.Log;
public class FotaProviderApplication {
private static final String TAG = (Application.TAG_ + FotaProviderApplication.class.getSimpleName());
public static void init(Application application) {
Log.d(TAG, "init()");
FotaProviderInitializer.initializeFotaProviderWithAccessoryController(application, new FotaController());
}
public static void terminate(Application application) {
Log.d(TAG, "terminate()");
FotaProviderInitializer.terminateFotaProvider(application);
}
}
| [
"thebone.main@gmail.com"
] | thebone.main@gmail.com |
6a4825639e21094c03fc17f53bd7c9585085837d | eace11a5735cfec1f9560e41a9ee30a1a133c5a9 | /CMT/cptiscas/程序变异体的backup/V1和V2合并之前v2的变异体/SequentialHeap/AOR_70/PQueue.java | fe75d969973dda569ba5475c8968be1c480ba7cd | [] | no_license | phantomDai/mypapers | eb2fc0fac5945c5efd303e0206aa93d6ac0624d0 | e1aa1236bbad5d6d3b634a846cb8076a1951485a | refs/heads/master | 2021-07-06T18:27:48.620826 | 2020-08-19T12:17:03 | 2020-08-19T12:17:03 | 162,563,422 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 458 | java | /*
* PQueue.java
*
* Created on March 8, 2007, 10:49 PM
*
* From "Multiprocessor Synchronization and Concurrent Data Structures",
* by Maurice Herlihy and Nir Shavit.
* Copyright 2007 Elsevier Inc. All rights reserved.
*/
package mutants.SequentialHeap.AOR_70;
/**
* Unbounded priority queue interface
* @param T item type
* @author Maurice Herlihy
*/
public interface PQueue<T> {
void add(T item, int priority);
T removeMin();
}
| [
"daihepeng@sina.cn"
] | daihepeng@sina.cn |
fe902f0ba8b5ec50a39a5bb0002c851005c1b44c | ee53bc9d48eef2f1cbc1a11f8915dd8c6b23fba0 | /workplace/workplace/javaBasic/src/reflex/Person.java | 639ab760983488a308ad39955f3facde8323ec07 | [] | no_license | xinyangyun/JavaExercise | 545d787a78ab3d60f2b37ff41c89b5cb4470a85a | 6e40c233dd43364e1fd4c265641eb0e306ec4dd8 | refs/heads/master | 2023-02-15T18:08:40.097738 | 2021-01-16T04:47:57 | 2021-01-16T04:47:57 | 330,085,976 | 0 | 0 | null | null | null | null | TIS-620 | Java | false | false | 356 | java | package reflex;
public class Person {
private String name = "ะกรื";
private int age = 15;
public void test(String str) {
System.out.println(str);
}
public void test2() {
System.out.println("tset22");
}
public Person(String name, int age) {
super();
this.name = name;
this.age = age;
}
public Person() {
super();
}
}
| [
"you@example.com"
] | you@example.com |
dbde607f941fd8e9f5685e4cd04ce628b2397e46 | b6fe0817f6cccd7c815f5ddcc822892ca879aea2 | /app/src/main/java/com/example/yuan_wanandroid/presenter/home/HomeFragmentPresenter.java | 1b118b4a78e7e61674f40c52c806227dbda56482 | [
"Apache-2.0"
] | permissive | jsyjst/Yuan-WanAndroid | b2a1010cb4a9337250d0ea9e90bccd7ff18c0165 | a46bf637e41394aab968b146cc43515e76384509 | refs/heads/master | 2020-04-17T10:59:20.398159 | 2020-02-17T05:48:31 | 2020-02-17T05:48:31 | 166,522,241 | 46 | 14 | null | null | null | null | UTF-8 | Java | false | false | 4,546 | java | package com.example.yuan_wanandroid.presenter.home;
import android.util.Log;
import com.example.yuan_wanandroid.base.BaseObserver;
import com.example.yuan_wanandroid.base.presenter.BasePresenter;
import com.example.yuan_wanandroid.component.RxBus;
import com.example.yuan_wanandroid.contract.home.HomeFragmentContract;
import com.example.yuan_wanandroid.event.AutoRefreshEvent;
import com.example.yuan_wanandroid.event.NoImgEvent;
import com.example.yuan_wanandroid.model.DataModel;
import com.example.yuan_wanandroid.model.entity.Articles;
import com.example.yuan_wanandroid.model.entity.BannerData;
import com.example.yuan_wanandroid.model.entity.BaseResponse;
import com.example.yuan_wanandroid.utils.RxUtil;
import java.util.List;
import javax.inject.Inject;
/**
* <pre>
* author : 残渊
* time : 2019/01/21
* desc :
* </pre>
*/
public class HomeFragmentPresenter extends BasePresenter<HomeFragmentContract.View>implements HomeFragmentContract.Presenter {
private static final String TAG="HomeFragmentPresenter";
@Inject
public HomeFragmentPresenter(DataModel model){
super(model);
}
@Override
public void subscribeEvent() {
addRxSubscribe(
RxBus.getInstance().toObservable(AutoRefreshEvent.class)
.filter(autoRefreshEvent -> autoRefreshEvent.isAutoRefresh())
.subscribe(loginEvent -> mView.autoRefresh())
);
addRxSubscribe(
RxBus.getInstance().toObservable(NoImgEvent.class)
.subscribe(noImgEvent -> mView.autoRefresh())
);
}
@Override
public void loadBannerData() {
addRxSubscribe(
mModel.getBannerData()
.compose(RxUtil.rxSchedulerHelper())
.compose(RxUtil.handleResult())
.subscribeWith(new BaseObserver<List<BannerData>>(mView,false,false){
@Override
public void onNext(List<BannerData> bannerData) {
super.onNext(bannerData);
Log.d(TAG, "BannerOnNext: "+bannerData.size());
mView.showBannerData(bannerData);
}
})
);
}
@Override
public void loadArticles(int pageNum) {
addRxSubscribe(
mModel.getArticles(pageNum)
.compose(RxUtil.rxSchedulerHelper())
.compose(RxUtil.handleResult())
.subscribeWith(new BaseObserver<Articles>(mView) {
@Override
public void onNext(Articles articles) {
super.onNext(articles);
mView.showArticles(articles.getDatas());
}
})
);
}
@Override
public void loadMoreArticles(int pageNum) {
addRxSubscribe(
mModel.getArticles(pageNum)
.compose(RxUtil.rxSchedulerHelper())
.compose(RxUtil.handleResult())
.subscribeWith(new BaseObserver<Articles>(mView,false,false) {
@Override
public void onNext(Articles articles) {
super.onNext(articles);
mView.showMoreArticles(articles.getDatas());
}
})
);
}
@Override
public void collectArticles(int id) {
addRxSubscribe(
mModel.collectArticles(id)
.compose(RxUtil.rxSchedulerHelper())
.subscribeWith(new BaseObserver<BaseResponse>(mView,false,false){
@Override
public void onNext(BaseResponse baseResponse){
mView.showCollectSuccess();
}
})
);
}
@Override
public void unCollectArticles(int id) {
addRxSubscribe(
mModel.unCollectArticles(id)
.compose(RxUtil.rxSchedulerHelper())
.subscribeWith(new BaseObserver<BaseResponse>(mView,false,false){
@Override
public void onNext(BaseResponse baseResponse){
mView.showUnCollectSuccess();
}
})
);
}
}
| [
"y8588130@163.com"
] | y8588130@163.com |
c6a681a23f639b22945227735d35f4a1762dfa1e | 8f07d264d7d19bd086d2a4cead0653e613a2f3eb | /JAVA提高篇/27_函数式接口/src/二函数式编程/Comparator.java | 3c6236c5087e9594b94d4566913a31ced3f64da7 | [] | no_license | GaoLingCong/Java-SE | 5bdc948310b8e9ba4e065c0d7b7a88b8a97525aa | 285542ca713224e155b8224b0fcf1e4cc8f4e092 | refs/heads/master | 2023-04-08T10:18:27.388378 | 2021-03-30T07:13:25 | 2021-03-30T07:13:25 | 303,992,701 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 859 | java | package 二函数式编程;
/*
如果一个方法的返回值类型是一个函数式接口,那么就可以直接返回一个Lambda表达式。
当需要通过一个方法来获取一个java.util.Comparator接口类型的对象作为排序器时,就可以调该方法获取。
*/
public class Comparator {
//定义一个方法,方法的返回值类型使用函数式接口Comparator
public static java.util.Comparator<String> getComparator(){
//方法的返回值类型是一个接口,那么我们可以返回这个接口的匿名内部类
//一
/* return new java.util.Comparator<String>() {
@Override
public int compare(String o1, String o2) {
return 02-01;
}
};
*/
//二
return ((o1, o2) -> o2.length()-o1.length());
}
}
| [
"you@example.com"
] | you@example.com |
2d88c138a0a31858b404829fab5a16f1e4958811 | a589ba1c533c9aa17332c522007788e9d2b795c7 | /mard-frontend/src/main/java/com/nsw/monre/p01/model/base/TbdKetQuaXuLy1BaseModel.java | d8b682fe6be6e800b8a5c3f5b41590b4000e9d12 | [] | no_license | tandaica0612/MARDJAVA | b241aa9e1000feb81c25533d73336960f2e286da | f709dc5f02ecc82474bad09ca25f8110860d57bb | refs/heads/master | 2023-03-22T15:36:58.721471 | 2020-10-17T06:32:07 | 2020-10-17T06:32:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 713 | java | package com.nsw.monre.p01.model.base;
public abstract class TbdKetQuaXuLy1BaseModel {
private String tenTrangThai;
public String getTenTrangThai() {
return tenTrangThai;
}
public void setTenTrangThai(String tenTrangThai) {
this.tenTrangThai = tenTrangThai;
}
private int soThuTu;
public int getSoThuTu() {
return soThuTu;
}
public void setSoThuTu(int soThuTu) {
this.soThuTu = soThuTu;
}
private int pageIndex = 1;
public int getPageIndex() {
return pageIndex;
}
public void setPageIndex(int pageIndex) {
this.pageIndex = pageIndex;
}
private int total;
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
} | [
"phongpv2@vnpt.vn"
] | phongpv2@vnpt.vn |
1d94c0094c507984547d0a61a59e8086f2bd5254 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_45236.java | 6605c6a2fa5b47b442fe1c18af79eb739b88185d | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 172 | java | private String stackTraceToString(final Throwable e){
StringWriter writer=new StringWriter();
e.printStackTrace(new PrintWriter(writer));
return writer.toString();
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
3bcd1fba81e3860b1ba43248126e45244425e1bb | b046f9e18ab34ecb8a389742f636befeb92e14b0 | /extensions/qute/deployment/src/test/java/io/quarkus/qute/deployment/extensions/NamespaceTemplateExtensionValidationFailureTest.java | 09da240df68507156c4c712a591c4436885ef2ab | [
"Apache-2.0"
] | permissive | stefanorg/quarkus | b8a53423b685e7aa86da771111c0836d415313c0 | 371482aef23dcd1ba87ae9c94942fcfe4b093fba | refs/heads/main | 2023-09-01T08:42:40.228648 | 2021-10-16T05:59:51 | 2021-10-16T05:59:51 | 417,845,686 | 1 | 0 | Apache-2.0 | 2021-10-16T14:05:56 | 2021-10-16T14:05:55 | null | UTF-8 | Java | false | false | 2,101 | java | package io.quarkus.qute.deployment.extensions;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.fail;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import io.quarkus.qute.TemplateException;
import io.quarkus.qute.TemplateExtension;
import io.quarkus.test.QuarkusUnitTest;
public class NamespaceTemplateExtensionValidationFailureTest {
@RegisterExtension
static final QuarkusUnitTest config = new QuarkusUnitTest()
.setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class)
.addAsResource(new StringAsset(
"{bro:surname}\n"
+ "{bro:name.bubu}"),
"templates/foo.html")
.addClasses(SomeExtensions.class))
.assertException(t -> {
Throwable e = t;
TemplateException te = null;
while (e != null) {
if (e instanceof TemplateException) {
te = (TemplateException) e;
break;
}
e = e.getCause();
}
assertNotNull(te);
assertTrue(te.getMessage().contains("Found template problems (2)"), te.getMessage());
assertTrue(te.getMessage().contains("no matching namespace [bro] extension method found"), te.getMessage());
assertTrue(te.getMessage().contains("property/method [bubu] not found on class [java.lang.String]"),
te.getMessage());
});
@Test
public void test() {
fail();
}
@TemplateExtension(namespace = "bro")
public static class SomeExtensions {
static String name() {
return "bubu";
}
}
}
| [
"mkouba@redhat.com"
] | mkouba@redhat.com |
3a998d4691c7131b77e8206eb0ac1c6b3a1bf1e5 | 9ec9a2487af3ace6a1e9979b58f01ccd6a19b200 | /java_src/AirConditioning/src/apserver/socket.java | 0d81aa3709272466a5fc9c3fdbc1de610c0c23c2 | [] | no_license | ckliu2/chongkai | 8ade0a80378a666b27d76672fb6a8f8aecc50e12 | e7cb57d328dcc1599931cb16a57db48606dd67e6 | refs/heads/master | 2021-06-12T19:18:42.980496 | 2017-04-05T09:02:58 | 2017-04-05T09:02:58 | 69,371,034 | 0 | 0 | null | null | null | null | ISO-8859-15 | Java | false | false | 2,059 | java | package apserver;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import apserver.watcher.Reader;
public class socket {
private static ServerSocket serverSocket;
DataInputStream in;
public static String recive="";
Init init=new Init();
public socket(){
try{
System.out.println("socket listen 8082 init()");
serverSocket = new ServerSocket( 8082 );
Thread thread = new Thread(new listen(serverSocket));
thread.start();
//init.start();
}catch (Exception ex) {
System.out.println(ex.toString());
}
}
//listen
class listen implements Runnable {
private ServerSocket serverSocket;
private Socket clientSocket;
DataInputStream in;
DataOutputStream out;
public listen(ServerSocket serverSocket) throws Exception {
this.serverSocket = serverSocket;
}
public void run() {
try {
while(true) {
clientSocket = serverSocket.accept();
System.out.println("Connection from " + clientSocket.getInetAddress().getHostAddress());
in = new DataInputStream (clientSocket.getInputStream());
String inData=in.readLine();
System.out.println("receive Data="+inData);
setRecive(inData);
}
}
catch (Exception ex) {
ex.printStackTrace();
}
}
}
public static String getRecive() {
return recive;
}
public static void setRecive(String recive) {
socket.recive = recive;
}
/**
* ²MªÅreceive data
* */
class Init extends Thread{
int i=0;
public void run(){
try{
while(true){
System.out.println("Init() setRecive()");
System.out.println("init() getRecive().length()"+getRecive().length());
/* if(getRecive().length()==0){
setRecive("");
}
setRecive("");*/
setRecive("");
sleep(1000);
}
}catch(Exception e){
System.out.println("Init() fail..");
}
}
}
}
| [
"chongkai@cacece.net"
] | chongkai@cacece.net |
1397c700d2761c8bd7159eb77d142681ac6f3026 | 28c95ff3e059e896d2f10caf25b3353c7ac50109 | /characteristic/core/src/test/java/org/im97mori/ble/characteristic/core/TimeZoneUtilsTest.java | 12e8ccfd8c7ee7a863a6739c582aa5183c9c565e | [
"MIT"
] | permissive | im97mori-github/JavaBLEUtil | 7c8fd4bf0b640c87a874a07aa8873815ba1beb09 | 335b7a76869abf89ad1397aaf7544c1ca5b92526 | refs/heads/master | 2023-08-30T21:04:34.786942 | 2023-08-25T12:00:07 | 2023-08-26T23:07:11 | 242,078,480 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,122 | java | package org.im97mori.ble.characteristic.core;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.im97mori.ble.test.TestBase;
public class TimeZoneUtilsTest extends TestBase {
@Test
public void test_isTimeZoneNotKnown_00001() {
assertTrue(TimeZoneUtils.isTimeZoneNotKnown(TimeZoneUtils.TIME_ZONE_IS_NOT_KNOWN));
}
@Test
public void test_isTimeZoneNotKnown_00002() {
assertFalse(TimeZoneUtils.isTimeZoneNotKnown(-48));
}
@Test
public void test_isTimeZoneNotKnown_00003() {
assertFalse(TimeZoneUtils.isTimeZoneNotKnown(56));
}
@Test
public void test_getTimeZoneOffsetMin_00001() {
int timeZone = -48;
assertEquals(TimeZoneUtils.TIME_ZONE_UNIT * timeZone, TimeZoneUtils.getTimeZoneOffsetMin(timeZone));
}
@Test
public void test_getTimeZoneOffsetMin_00002() {
int timeZone = 56;
assertEquals(TimeZoneUtils.TIME_ZONE_UNIT * timeZone, TimeZoneUtils.getTimeZoneOffsetMin(timeZone));
}
}
| [
"github@im97mori.org"
] | github@im97mori.org |
ca77db292c54801ce5dcf55b29dd1019df1b7f67 | 73fd7cf535b476ed2238ca42cb5e79d440a92f06 | /app/src/main/java/com/cn/uca/bean/home/translate/HistoryBean.java | 6c5ca7c865d955e635a542023e25b819481b1c1c | [] | no_license | WengYihao/UCA | f4c5ee5d8624aa89aa23eb0558062d80902a576b | 2b83b0550db9b44c73015f17e1e0e3a7287768a6 | refs/heads/master | 2021-01-02T22:28:49.469304 | 2018-03-29T12:38:11 | 2018-03-29T12:38:11 | 99,201,955 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 760 | java | package com.cn.uca.bean.home.translate;
/**
* Created by asus on 2018/3/12.
*/
public class HistoryBean {
private String fromType;
private String toType;
private String src;
private String dst;
public String getFromType() {
return fromType;
}
public String getToType() {
return toType;
}
public String getSrc() {
return src;
}
public String getDst() {
return dst;
}
public void setFromType(String fromType) {
this.fromType = fromType;
}
public void setToType(String toType) {
this.toType = toType;
}
public void setSrc(String src) {
this.src = src;
}
public void setDst(String dst) {
this.dst = dst;
}
}
| [
"15112360329@163.com"
] | 15112360329@163.com |
7cb892f103b2faa6320de73b01a8778179d4192a | 85eb4edc9db417fcd67b4937888899eab8b2108a | /src/main/java/io/manasobi/domain/mng/cash/sh03001200/Sh03001200Mapper.java | 6853f4df4d8f2cf133443bf8880138b44c8ed863 | [] | no_license | ddONGzaru/manasobi-boot | 6df05d31b82a729f117fd14897a45e62cc29d70f | 495ff8a60aac22b9a02a6ffbcf80872cd9df2dee | refs/heads/master | 2021-01-19T02:13:54.957907 | 2017-04-23T11:34:35 | 2017-04-23T11:34:35 | 87,265,524 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 382 | java | package io.manasobi.domain.mng.cash.sh03001200;
import io.manasobi.core.mybatis.MyBatisMapper;
import java.util.List;
public interface Sh03001200Mapper extends MyBatisMapper {
List<Sh03001200> findAll();
Sh03001200 findOne(Sh03001200 sh03001200);
int update(Sh03001200 sh03001200);
int delete(Sh03001200 sh03001200);
int insert(Sh03001200 sh03001200);
} | [
"tw.jang@dream-ant.com"
] | tw.jang@dream-ant.com |
2d00412f9283fe5bb6daebd8155a11f6038592f2 | 478a7feeed2cb5a2ec1de0d425aac96f3664ecb4 | /src/main/java/com/donaldy/udp/UDPProvider.java | c47007b1767e7858cc2ae58448e75264d8f924c9 | [] | no_license | DonaldY/Socket-Practice | e6f0157b535c076a3fd5a4bd35a1f828844579e1 | 6149952d0029027c30e26b0979b7799af1da1210 | refs/heads/master | 2020-04-24T22:14:37.579850 | 2019-03-02T15:50:02 | 2019-03-02T15:50:02 | 172,304,883 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,228 | java | package com.donaldy.udp;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
/**
* UDP 提供者,用于提供服务
*/
public class UDPProvider {
public static void main(String[] args) throws IOException {
System.out.println("UDPProvider Started.");
// 作为接受者,指定一个端口用于数据接收
DatagramSocket datagramSocket = new DatagramSocket(2000);
// 构建接收实体
final byte[] buf = new byte[512];
DatagramPacket receivePack = new DatagramPacket(buf, buf.length);
// 接收
datagramSocket.receive(receivePack);
// 打印接收到的信息与发送者的信息
// 发送者的IP地址
String ip = receivePack.getAddress().getHostAddress();
int port = receivePack.getPort();
int dataLen = receivePack.getLength();
String data = new String(receivePack.getData(), 0, dataLen);
System.out.println("UDPProvider receive from ip: " + ip + "\tport: " + port + "\tdata: " + data);
// 构建一份回送数据
String responseData = "Receive data with len: " + dataLen;
byte[] responseDataBytes = responseData.getBytes();
// 直接根据发送者构建一份回送信息
DatagramPacket responsePacket = new DatagramPacket(responseDataBytes,
responseDataBytes.length,
receivePack.getAddress(),
receivePack.getPort());
datagramSocket.send(responsePacket);
// 完成
System.out.println("UDPProvider Finished.");
datagramSocket.close();
}
private static class Provider extends Thread {
private final String sn;
private boolean done = false;
private DatagramSocket ds = null;
public Provider(String sn) {
super();
this.sn = sn;
}
@Override
public void run() {
super.run();
}
void exit() {
this.done = true;
close();
}
private void close() {
if (ds != null) {
ds.close();
ds = null;
}
}
}
}
| [
"448641125@qq.com"
] | 448641125@qq.com |
4e60e47eb8f9ea1ca94fbd1cf0ecee052e78f099 | bee9a140f51f85c612f4e869747aae3d155188c5 | /src/main/java/org/apache/sysds/runtime/instructions/spark/functions/MatrixMatrixBinaryOpFunction.java | c0272678a9838de9f0726597b77de7c6b037d151 | [
"Apache-2.0"
] | permissive | clarapueyoballarin/systemds | cb64a494afd14da142269c788c76edb236d8b755 | a68a71ddb089ebdd52e8f316a03bda281f4532ba | refs/heads/master | 2023-05-22T16:39:04.409220 | 2021-06-17T16:14:15 | 2021-06-17T16:14:15 | 341,305,828 | 0 | 1 | Apache-2.0 | 2021-02-24T22:51:31 | 2021-02-22T18:59:49 | Java | UTF-8 | Java | false | false | 1,532 | 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.apache.sysds.runtime.instructions.spark.functions;
import org.apache.spark.api.java.function.Function;
import org.apache.sysds.runtime.matrix.data.MatrixBlock;
import org.apache.sysds.runtime.matrix.operators.BinaryOperator;
import scala.Tuple2;
public class MatrixMatrixBinaryOpFunction implements Function<Tuple2<MatrixBlock,MatrixBlock>, MatrixBlock> {
private static final long serialVersionUID = -2683276102742977900L;
private BinaryOperator _bop;
public MatrixMatrixBinaryOpFunction(BinaryOperator op) {
_bop = op;
}
@Override
public MatrixBlock call(Tuple2<MatrixBlock, MatrixBlock> arg0) throws Exception {
return arg0._1().binaryOperations(_bop, arg0._2(), new MatrixBlock());
}
}
| [
"mboehm7@gmail.com"
] | mboehm7@gmail.com |
ec5ec8edb897979511f1cbcbcb235b66b036f215 | cc3806d1276f7df3062d9a294592d600c21ff3fb | /IBFbWorkbook/src/ibfb/workbook/renders/AutoCompleteJCB.java | 7d2f42275d5a3df73861ae8bf2210ebf42542e7c | [] | no_license | digitalabs/IBFb | 7f59be1f87b40d8073e3b2551be1f1228678ccda | 12cf95c296c01324489c061b4a161d459312c3ab | refs/heads/master | 2021-01-10T21:15:46.823523 | 2013-12-27T01:59:00 | 2013-12-27T01:59:00 | 12,491,100 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,807 | java | package ibfb.workbook.renders;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.ComboBoxModel;
import javax.swing.JComboBox;
import javax.swing.text.AttributeSet;
import javax.swing.text.BadLocationException;
import javax.swing.text.JTextComponent;
import javax.swing.text.PlainDocument;
public final class AutoCompleteJCB extends PlainDocument implements FocusListener, KeyListener, PropertyChangeListener {
private JComboBox comboBox;
private ComboBoxModel model;
private JTextComponent editor;
private boolean hidePopupOnFocusLoss;
public AutoCompleteJCB() {
hidePopupOnFocusLoss = System.getProperty("java.version").startsWith("1.6");
}
public AutoCompleteJCB(JComboBox jcb) {
this();
registraComboBox(jcb);
}
public void registraComboBox(JComboBox jcb) {
desregistraComboBox();
this.comboBox = jcb;
comboBox.setEditable(true);
model = comboBox.getModel();
editor = (JTextComponent) comboBox.getEditor().getEditorComponent();
editor.setDocument(this);
editor.addFocusListener(this);
editor.addKeyListener(this);
comboBox.addPropertyChangeListener(this);
Object selected = comboBox.getSelectedItem();
if (selected != null) {
editor.setText(selected.toString());
} else {
editor.setText("");
}
}
public void desregistraComboBox() {
if (comboBox != null) {
comboBox.getEditor().getEditorComponent().removeFocusListener(this);
comboBox.getEditor().getEditorComponent().removeKeyListener(this);
comboBox.removePropertyChangeListener(this);
comboBox.setSelectedItem(null);
comboBox = null;
}
}
@Override
public void insertString(int offs, String str, AttributeSet a) throws BadLocationException {
String currentText = getText(0, getLength());
String beforeOffset = currentText.substring(0, offs);
String afterOffset = currentText.substring(offs, currentText.length());
String futureText = beforeOffset + str + afterOffset;
Object item = lookupItem(futureText);
if (item != null) {
comboBox.setSelectedItem(item);
} else {
item = comboBox.getSelectedItem();
offs = offs - str.length();
comboBox.getToolkit().beep();
}
super.remove(0, getLength());
super.insertString(0, item.toString(), a);
if (item.toString().equals(str) && offs == 0) {
highlightCompletedText(0);
} else {
highlightCompletedText(offs + str.length());
if (comboBox.isShowing() && comboBox.isFocusOwner()) {
comboBox.setPopupVisible(true);
}
}
}
private void highlightCompletedText(int start) {
editor.setCaretPosition(getLength());
editor.moveCaretPosition(start);
}
private Object lookupItem(String pattern) {
Object selectedItem = model.getSelectedItem();
if (selectedItem != null && startsWithIgnoreCase(selectedItem.toString(), pattern)) {
return selectedItem;
} else {
for (int i = 0, n = model.getSize(); i < n; i++) {
Object currentItem = model.getElementAt(i);
if (startsWithIgnoreCase(currentItem.toString(), pattern)) {
return currentItem;
}
}
}
return null;
}
private boolean startsWithIgnoreCase(String str1, String str2) {
return str1.toUpperCase().startsWith(str2.toUpperCase());
}
@Override
public void focusGained(FocusEvent e) {
}
@Override
public void focusLost(FocusEvent e) {
highlightCompletedText(0);
if (hidePopupOnFocusLoss) {
comboBox.setPopupVisible(false);
}
}
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyReleased(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
highlightCompletedText(0);
} else if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
comboBox.setSelectedIndex(0);
editor.setText(comboBox.getSelectedItem().toString());
highlightCompletedText(0);
}
}
@Override
public void propertyChange(PropertyChangeEvent evt) {
if (evt.getPropertyName().equals("model")) {
registraComboBox(comboBox);
}
}
} | [
"alvince@4ebb2e00-0138-4608-bc6e-edf3948d4863"
] | alvince@4ebb2e00-0138-4608-bc6e-edf3948d4863 |
02fdd29c3460c96646050eafd4193d8975847a3c | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_d9cc39b7eb6e9ecb7ef6e7ab0f5540b9172849e0/GlobalDataWebTest/2_d9cc39b7eb6e9ecb7ef6e7ab0f5540b9172849e0_GlobalDataWebTest_t.java | df4c41590a5bb2924a5a7459f8640905f32e1b36 | [] | 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 | 5,529 | java | /*
* Copyright 2008, 2009 Wyona
*
* 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.wyona.org/licenses/APACHE-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.wyona.yanel.htmlunit.yanelwebsite;
import org.wyona.yanel.htmlunit.AbstractHtmlUnitTest;
/**
* Test the resources under the Yanel reserved prefix.
*/
public class GlobalDataWebTest extends AbstractHtmlUnitTest {
private String getReservedURL(String resourceRelativeURL) throws Exception {
return reservedPrefix + resourceRelativeURL;
}
private void loadReservedHtmlPage(String pageRelativeURL) throws Exception {
loadHtmlPage(getReservedURL(pageRelativeURL));
}
private void loadReservedErrorPage(String pageRelativeURL, int expectedErrorCode) throws Exception {
loadErrorPage(getReservedURL(pageRelativeURL), expectedErrorCode);
}
private void loadReservedResource(String resourceRelativeURL) throws Exception {
loadResource(getReservedURL(resourceRelativeURL));
}
protected void setUp() throws Exception {
this.testName = "Global Data Web Test";
super.setUp();
}
public void testAboutPage() throws Exception {
loadReservedHtmlPage("about.html");
assertTitleEquals("About Yanel");
assertPageContainsText("Version");
}
public void testUsersPages() throws Exception {
//TODO: test an existing user page
//XXX: IMHO ( see http://lists.wyona.org/pipermail/yanel-development/2008-December/002514.html ) this should instead redirect to a login page or at least fail gracefully:
loadReservedErrorPage("users/dummy.html", 500);
loadReservedErrorPage("user-mgmt/list-users.html", 404);
}
public void testDataRepoSitetreePage() throws Exception {
loadReservedHtmlPage("data-repository-sitetree.html");
assertTitleContains("Sitetree");
assertTitleContains("Yanel");
//XXX should work, why does it not?!?: clickLink("?yanel.resource.viewid=xmlVersion");
}
public void testResourceTypesPages() throws Exception {
loadReservedErrorPage("resource-types/dummy", /* XXX: should be 404: */500);
loadReservedErrorPage("resource-types/http%3a%2f%2fwww.wyona.org%2fyanel%2fresource%2f1.0%3a%3afile/"+reservedPrefix+"icons/1x1/rt-icon.png", /* XXX: should be 404: */500);
loadReservedErrorPage("resource-types/^http^3a^2f^2fwww.wyona.org^2fyanel^2fresource^2f1.0::file/"+reservedPrefix+"icons/1x1/rt-icon.png", /* XXX: should be 404: */500);
loadReservedErrorPage("resource-types/http://www.wyona.org/yanel/resource/1.0::file/"+reservedPrefix+"icons/1x1/rt-icon.png", /* XXX: should be 404: */500);
loadReservedResource("resource-types/http%3a%2f%2fwww.wyona.org%2fyanel%2fresource%2f1.0%3a%3afile/"+reservedPrefix+"icons/32x32/rt-icon.png");
loadReservedResource("resource-types/^http^3a^2f^2fwww.wyona.org^2fyanel^2fresource^2f1.0::file/"+reservedPrefix+"icons/32x32/rt-icon.png");
loadReservedResource("resource-types/http://www.wyona.org/yanel/resource/1.0::file/"+reservedPrefix+"icons/32x32/rt-icon.png");
assertNotNull(response.getResponseHeaderValue("Last-Modified"));
//TODO: test 304 handling
loadReservedErrorPage("resource-types/http%3a%2f%2fwww.wyona.org%2fyanel%2fresource%2f1.0%3a%3atesting-control/dummy", /* XXX: should be 404: */500);
loadReservedErrorPage("resource-types/^http^3a^2f^2fwww.wyona.org^2fyanel^2fresource^2f1.0::testing-control/dummy", /* XXX: should be 404: */500);
loadReservedErrorPage("resource-types/http://www.wyona.org/yanel/resource/1.0::testing-control/dummy", /* XXX: should be 404: */500);
loadReservedResource("resource-types/http%3a%2f%2fwww.wyona.org%2fyanel%2fresource%2f1.0%3a%3atesting-control/js/ajaxexecutetests.js");
loadReservedResource("resource-types/^http^3a^2f^2fwww.wyona.org^2fyanel^2fresource^2f1.0::testing-control/js/ajaxexecutetests.js");
loadReservedResource("resource-types/http://www.wyona.org/yanel/resource/1.0::testing-control/js/ajaxexecutetests.js");
assertNotNull(response.getResponseHeaderValue("Last-Modified"));
//TODO: test 304 handling
}
/**
* Test globally available htdocs (located within src/webapp/htdocs/ or rather local/apache-tomcat-5.5.20/webapps/yanel/htdocs/)
*/
public void testHtdocsPages() throws Exception {
loadReservedHtmlPage("help.html");
// TODO: should be not null?!
assertNull(response.getResponseHeaderValue("Last-Modified"));
assertTitleContains("Help");
loadReservedErrorPage("../index.html?yanel.toolbar=on", 401);
//clickLink("../index.html?yanel.toolbar=on");
//assertTitleContains("Login");
loadReservedResource("yanel_toolbar_logo.png");
}
public void testNonExistingPage() throws Exception {
loadReservedErrorPage("dummy.html", 404);
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
a264b4d817697979f98e6a4c283bcba21daf6bae | 5786dd79a11403b2f70f50ced88f4cd59e12e8ea | /jewelcli/src/test/java/com/lexicalscope/jewel/cli/TestObjectMethods.java | d23fb54ab2360188a4adabd9e2ed73c5a278d208 | [
"Apache-2.0"
] | permissive | orsonjones/jewelcli | 9cf9983394ebbbe7fd945b6983563e13ef174f31 | f16bda6ce3007e303dc118992d9a2ab92cdd9432 | refs/heads/master | 2021-01-21T07:30:40.155477 | 2015-04-23T14:09:40 | 2015-04-23T14:09:40 | 34,419,902 | 0 | 1 | null | 2015-04-22T22:39:28 | 2015-04-22T22:39:27 | null | UTF-8 | Java | false | false | 5,353 | java | /*
* Copyright 2007 Tim Wood
*
* 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.lexicalscope.jewel.cli;
import static org.junit.Assert.*;
import java.util.List;
import org.junit.Test;
public class TestObjectMethods {
public interface SingleOption {
@Option String getName();
}
public interface ListOption {
@Option List<String> getName();
}
public interface BooleanOption {
@Option boolean getName();
}
public interface OptionalOption {
@Option String getName();
boolean isName();
}
public interface UnparsedOption {
@Unparsed List<String> getName();
}
public interface SeveralOptions {
@Option String getName0();
@Option List<String> getName1();
@Option boolean getName2();
@Option String getName3();
boolean isName3();
@Unparsed List<String> getName();
}
@Test public void testHashCode() throws ArgumentValidationException {
final SingleOption parsedArguments = CliFactory.parseArguments(SingleOption.class, "--name", "value");
parsedArguments.hashCode();
}
@Test public void testEquals() throws ArgumentValidationException {
final SingleOption parsedArguments = CliFactory.parseArguments(SingleOption.class, "--name", "value");
assertTrue(parsedArguments.equals(parsedArguments));
}
@Test public void testNotEquals() throws ArgumentValidationException {
final SingleOption parsedArguments0 = CliFactory.parseArguments(SingleOption.class, "--name", "value");
final SingleOption parsedArguments1 = CliFactory.parseArguments(SingleOption.class, "--name", "value");
assertFalse(parsedArguments0.equals(parsedArguments1));
}
@Test public void testToString() throws ArgumentValidationException {
final SingleOption parsedArguments = CliFactory.parseArguments(SingleOption.class, "--name", "value");
assertEquals(
"com.lexicalscope.jewel.cli.TestObjectMethods$SingleOption {name=value}",
parsedArguments.toString());
}
@Test public void testToStringList() throws ArgumentValidationException {
final ListOption parsedArguments =
CliFactory.parseArguments(ListOption.class, "--name", "value0", "value1", "value2");
assertEquals(
"com.lexicalscope.jewel.cli.TestObjectMethods$ListOption {name=[value0, value1, value2]}",
parsedArguments.toString());
}
@Test public void testToStringBoolean() throws ArgumentValidationException {
final BooleanOption parsedArguments =
CliFactory.parseArguments(BooleanOption.class, "--name");
assertEquals(
"com.lexicalscope.jewel.cli.TestObjectMethods$BooleanOption {name=null}",
parsedArguments.toString());
}
@Test public void testToStringOptionalMissing() throws ArgumentValidationException {
final OptionalOption parsedArguments = CliFactory.parseArguments(OptionalOption.class);
assertEquals(
"com.lexicalscope.jewel.cli.TestObjectMethods$OptionalOption {}",
parsedArguments.toString());
}
@Test public void testToStringOptionalPresent() throws ArgumentValidationException {
final OptionalOption parsedArguments = CliFactory.parseArguments(OptionalOption.class, "--name", "value");
assertEquals(
"com.lexicalscope.jewel.cli.TestObjectMethods$OptionalOption {name=value}",
parsedArguments.toString());
}
@Test public void testToStringUnparsedOptions() throws ArgumentValidationException {
final UnparsedOption parsedArguments =
CliFactory.parseArguments(UnparsedOption.class, "value0", "value1", "value2", "value3");
assertEquals(
"com.lexicalscope.jewel.cli.TestObjectMethods$UnparsedOption {name=[value0, value1, value2, value3]}",
parsedArguments.toString());
}
@Test public void testToStringSeveralOptions() throws ArgumentValidationException {
final SeveralOptions parsedArguments =
CliFactory.parseArguments(
SeveralOptions.class,
"--name0",
"value0",
"--name1",
"value1",
"value2",
"--name2",
"--name3",
"value3",
"value4",
"value5");
assertEquals(
"com.lexicalscope.jewel.cli.TestObjectMethods$SeveralOptions {name0=value0, name1=[value1, value2], name2=null, name3=value3, name=[value4, value5]}",
parsedArguments.toString());
}
}
| [
"lexicalscope@gmail.com"
] | lexicalscope@gmail.com |
77724604aee424902b90597cff575d7184535956 | f573e9371f69d518bc6082721e671a91ebfa6df4 | /src/main/java/org/docksidestage/oracle/dbflute/exbhv/Vendor$DollarBhv.java | 940e6567ccfdca5c5c3dafbfa26b205a2f1faf33 | [
"Apache-2.0"
] | permissive | dbflute-test/dbflute-test-dbms-oracle | 74ba26a295a8179ace708a4a988fcfdcd9ae8a01 | ee684d953ea544465acc7208451508e0721470fd | refs/heads/master | 2022-05-27T20:56:16.466597 | 2022-05-15T08:39:45 | 2022-05-15T08:39:45 | 26,077,332 | 0 | 0 | null | 2015-09-08T06:17:34 | 2014-11-02T10:18:49 | Java | UTF-8 | Java | false | false | 410 | java | package org.docksidestage.oracle.dbflute.exbhv;
import org.docksidestage.oracle.dbflute.bsbhv.BsVendor$DollarBhv;
/**
* The behavior of VENDOR_$_DOLLAR.
* <p>
* You can implement your original methods here.
* This class remains when re-generating.
* </p>
* @author oracleman
*/
@org.springframework.stereotype.Component("vendor$DollarBhv")
public class Vendor$DollarBhv extends BsVendor$DollarBhv {
}
| [
"dbflute@gmail.com"
] | dbflute@gmail.com |
17a1fe51bbdbc2cfc6eac997c4e40c0b1a3dbf71 | a79c006dc4ae5755a025e71d9a97a71dd5b30d4e | /cms/.svn/pristine/ab/ab5b41dd5d02b2241efeaa911b4ee1bc840a7b28.svn-base | 05da2c9c9e3a49e8f226babf7227f7fc8f647f57 | [
"MIT"
] | permissive | chocoai/workspace | d62774d92e255662374dae1894e36e08ea9529e6 | ab0e20d7945ef8af439d848625eb30eb8f46e668 | refs/heads/master | 2020-04-13T07:37:52.922076 | 2018-11-09T11:03:09 | 2018-11-09T11:03:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,141 | package com.yhcrt.weihu.common.fck;
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.util.Properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Manages FCKeditor.Java properties files.
* <p>
* It manages/loads the properties files in the following order:
* <ol>
* <li>the default properties as defined <a
* href="http://java.fckeditor.net/properties.html">here</a>,
* <li>the user-defined properties (<code>fckeditor.properties</code>) if
* present.
* </ol>
* This means that user-defined properties <em>override</em> default ones. In
* the backend it utilizes the regular {@link Properties} class.
* </p>
* <p>
* Moreover, you can set properties programmatically too but make sure to
* override them <em>before</em> the first call of that specific property.
*
* @version $Id: PropertiesLoader.java,v 1.1 2011/12/06 01:36:06 administrator Exp $
*/
public class PropertiesLoader {
private static final Logger logger = LoggerFactory
.getLogger(PropertiesLoader.class);
private static final String DEFAULT_FILENAME = "default.properties";
private static final String LOCAL_PROPERTIES = "/fckeditor.properties";
private static Properties properties = new Properties();
static {
// 1. load library defaults
InputStream in = PropertiesLoader.class
.getResourceAsStream(DEFAULT_FILENAME);
if (in == null) {
logger.error("{} not found", DEFAULT_FILENAME);
throw new RuntimeException(DEFAULT_FILENAME + " not found");
} else {
if (!(in instanceof BufferedInputStream))
in = new BufferedInputStream(in);
try {
properties.load(in);
in.close();
logger.debug("{} loaded", DEFAULT_FILENAME);
} catch (Exception e) {
logger.error("Error while processing {}", DEFAULT_FILENAME);
throw new RuntimeException("Error while processing "
+ DEFAULT_FILENAME, e);
}
}
// 2. load user defaults if present
InputStream in2 = PropertiesLoader.class
.getResourceAsStream(LOCAL_PROPERTIES);
if (in2 == null) {
logger.info("{} not found", LOCAL_PROPERTIES);
} else {
if (!(in2 instanceof BufferedInputStream))
in2 = new BufferedInputStream(in2);
try {
properties.load(in2);
in2.close();
logger.debug("{} loaded", LOCAL_PROPERTIES);
} catch (Exception e) {
logger.error("Error while processing {}", LOCAL_PROPERTIES);
throw new RuntimeException("Error while processing "
+ LOCAL_PROPERTIES, e);
}
}
}
/**
* Searches for the property with the specified key in this property list.
*
* @see Properties#getProperty(String)
*/
public static String getProperty(final String key) {
return properties.getProperty(key);
}
/**
* Sets the property with the specified key in this property list.
*
* @see Properties#setProperty(String, String)
*/
public static void setProperty(final String key, final String value) {
properties.setProperty(key, value);
}
/**
* Returns <code>connector.resourceType.file.path</code> property
*/
public static String getFileResourceTypePath() {
return properties.getProperty("connector.resourceType.file.path");
}
/**
* Returns <code>connector.resourceType.flash.path</code> property
*/
public static String getFlashResourceTypePath() {
return properties.getProperty("connector.resourceType.flash.path");
}
/**
* Returns <code>connector.resourceType.image.path</code> property
*/
public static String getImageResourceTypePath() {
return properties.getProperty("connector.resourceType.image.path");
}
/**
* Returns <code>connector.resourceType.media.path</code> property
*/
public static String getMediaResourceTypePath() {
return properties.getProperty("connector.resourceType.media.path");
}
/**
* Returns <code>connector.resourceType.file.extensions.allowed</code>
* property
*/
public static String getFileResourceTypeAllowedExtensions() {
return properties
.getProperty("connector.resourceType.file.extensions.allowed");
}
/**
* Returns <code>connector.resourceType.file.extensions.denied</code>
* property
*/
public static String getFileResourceTypeDeniedExtensions() {
return properties
.getProperty("connector.resourceType.file.extensions.denied");
}
/**
* Returns <code>connector.resourceType.flash.extensions.allowed</code>
* property
*/
public static String getFlashResourceTypeAllowedExtensions() {
return properties
.getProperty("connector.resourceType.flash.extensions.allowed");
}
/**
* Returns <code>connector.resourceType.flash.extensions.denied</code>
* property
*/
public static String getFlashResourceTypeDeniedExtensions() {
return properties
.getProperty("connector.resourceType.flash.extensions.denied");
}
/**
* Returns <code>connector.resourceType.image.extensions.allowed</code>
* property
*/
public static String getImageResourceTypeAllowedExtensions() {
return properties
.getProperty("connector.resourceType.image.extensions.allowed");
}
/**
* Returns <code>connector.resourceType.image.extensions.denied</code>
* property
*/
public static String getImageResourceTypeDeniedExtensions() {
return properties
.getProperty("connector.resourceType.image.extensions.denied");
}
/**
* Returns <code>connector.resourceType.media.extensions.allowed</code>
* property
*/
public static String getMediaResourceTypeAllowedExtensions() {
return properties
.getProperty("connector.resourceType.media.extensions.allowed");
}
/**
* Returns <code>connector.resourceType.media.extensions.denied</code>
* property
*/
public static String getMediaResourceTypeDeniedExtensions() {
return properties
.getProperty("connector.resourceType.media.extensions.denied");
}
/**
* Returns <code>connector.userFilesPath</code> property
*/
public static String getUserFilesPath() {
return properties.getProperty("connector.userFilesPath");
}
/**
* Returns <code>connector.userFilesAbsolutePath</code> property
*/
public static String getUserFilesAbsolutePath() {
return properties.getProperty("connector.userFilesAbsolutePath");
}
}
| [
"250344934@qq.com"
] | 250344934@qq.com | |
3218160027a797792679fedd0653e50a78e1cd9a | fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4 | /jsps-kaken/src/5.impl/jp/go/jsps/kaken/model/vo/BukyokuSearchInfo.java | 59e9768a8b3b9250054e058c1b38e0b6d0434c3d | [] | no_license | sensui74/legacy-project | 4502d094edbf8964f6bb9805be88f869bae8e588 | ff8156ae963a5c61575ff34612c908c4ccfc219b | refs/heads/master | 2020-03-17T06:28:16.650878 | 2016-01-08T03:46:00 | 2016-01-08T03:46:00 | null | 0 | 0 | null | null | null | null | SHIFT_JIS | Java | false | false | 524 | java | /*
* Created on 2005/04/05
*
*/
package jp.go.jsps.kaken.model.vo;
/**
* 部局管理情報検索用データ保持クラス
*
*/
public class BukyokuSearchInfo extends SearchInfo {
/** 所属機関コード */
private String shozokuCd;
/**
* @return 所属機関コードを返します。
*/
public String getShozokuCd() {
return shozokuCd;
}
/**
* @param shozokuCd 所属機関コードを設定します。
*/
public void setShozokuCd(String shozokuCd) {
this.shozokuCd = shozokuCd;
}
}
| [
"wow_fei@163.com"
] | wow_fei@163.com |
31ca3467f1958f9d2bf6e78fb8763944ad8a63a4 | 558d1b6d6f8ca2e3dddcf331fd24e0d0ab69ba99 | /app/src/main/java/com/benben/megamart/adapter/HomeBannerViewpagerAdapter.java | 0373abfb88e8db75ef7753b18144e5a24a8cc4d2 | [] | no_license | wanghkzzz/MegaMart | 741788429ecc542eabd417417924ab5fe7755299 | 8ee96f0e8d9cc145be62c41868d19f6dc62419c6 | refs/heads/master | 2020-07-24T16:44:50.159727 | 2019-09-12T07:13:14 | 2019-09-12T07:13:14 | 207,986,499 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,139 | java | package com.benben.megamart.adapter;
import android.app.Activity;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v4.view.PagerAdapter;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.benben.commoncore.utils.ImageUtils;
import com.benben.megamart.R;
import com.benben.megamart.bean.HomeBannerImageBean;
import com.benben.megamart.utils.UrlUtils;
import java.util.List;
/**
* Create by wanghk on 2019-6-6.
* Describe:首页轮播图adapter
*/
public class HomeBannerViewpagerAdapter extends PagerAdapter {
private List<HomeBannerImageBean> images;
private Activity mContext;
public HomeBannerViewpagerAdapter(List<HomeBannerImageBean> images, Context context) {
this.mContext = (Activity) context;
this.images = images;
}
public void refreshList(List<HomeBannerImageBean> list) {
if (images == null) {
return;
}
images.clear();
images.addAll(list);
notifyDataSetChanged();
}
@Override
public int getCount() {
return images.size();
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
View view = View.inflate(mContext, R.layout.item_banner_image_view, null);
ImageView iv = view.findViewById(R.id.iv_banner);
ImageUtils.getCircularPic(images.get(position).getBanner_img(), iv, mContext, 10);
iv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
UrlUtils.clickBannerUrl(mContext,images.get(position).getParam_type(),images.get(position).getBanner_title(),images.get(position).getBanner_param());
}
});
container.addView(view);
return view;
}
@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
container.removeView((View) object);
}
}
| [
"1157038440@qq.com"
] | 1157038440@qq.com |
70bda13260b097812264f45f984e5283cdc1a6f9 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/5/5_32345f9755abbfaefd7a19dc7a1a1ba6da79126b/Projects/5_32345f9755abbfaefd7a19dc7a1a1ba6da79126b_Projects_t.java | 64adced7cbbd272ae26f039f1cc8c129952fbc84 | [] | 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 | 2,013 | java | package controllers;
import java.util.List;
import models.Project;
import play.mvc.Before;
import play.mvc.Controller;
import play.i18n.Messages;
import play.data.validation.Validation;
import play.data.validation.Valid;
public class Projects extends SearchableController {
@Before
public static void beforeAction() {
List<Project> projects =
Project.find("byIsActive", new Boolean(true)).fetch();
renderArgs.put("projects", projects);
}
public static void index() {
List<Project> entities = models.Project.all().fetch();
render(entities);
}
public static void create(Project entity) {
render(entity);
}
public static void show(java.lang.Long id) {
Project entity = Project.findById(id);
render(entity);
}
public static void edit(java.lang.Long id) {
Project entity = Project.findById(id);
render(entity);
}
public static void delete(java.lang.Long id) {
Project entity = Project.findById(id);
entity.delete();
index();
}
public static void save(@Valid Project entity) {
if (validation.hasErrors()) {
flash.error(Messages.get("scaffold.validation"));
render("@create", entity);
}
entity.save();
flash.success(Messages.get("scaffold.created", "Project"));
index();
}
public static void update(@Valid Project entity) {
if (validation.hasErrors()) {
flash.error(Messages.get("scaffold.validation"));
render("@edit", entity);
}
entity = entity.merge();
entity.save();
flash.success(Messages.get("scaffold.updated", "Project"));
index();
}
@Override
protected Class getOwnedModel() {
return Project.class;
}
@Override
protected Class getOwnedModel() {
return Project.class;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
6191c0645d1f911dc3328a10cbd5bb0d1e219d04 | 66220fbb2b7d99755860cecb02d2e02f946e0f23 | /src/net/sourceforge/plantuml/activitydiagram3/ftile/vertical/FtileDecorateOut.java | 9dfc01927eecddfcdce04f21f1a0cad24b1d1323 | [
"MIT"
] | permissive | isabella232/plantuml-mit | 27e7c73143241cb13b577203673e3882292e686e | 63b2bdb853174c170f304bc56f97294969a87774 | refs/heads/master | 2022-11-09T00:41:48.471405 | 2020-06-28T12:42:10 | 2020-06-28T12:42:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,326 | java | /* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
* (C) Copyright 2009-2020, Arnaud Roques
*
* Project Info: https://plantuml.com
*
* If you like this project or if you find it useful, you can support us at:
*
* https://plantuml.com/patreon (only 1$ per month!)
* https://plantuml.com/paypal
*
* This file is part of PlantUML.
*
* Licensed under The MIT License (Massachusetts Institute of Technology License)
*
* See http://opensource.org/licenses/MIT
*
* 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.
*
*
* Original Author: Arnaud Roques
*/
package net.sourceforge.plantuml.activitydiagram3.ftile.vertical;
import net.sourceforge.plantuml.activitydiagram3.LinkRendering;
import net.sourceforge.plantuml.activitydiagram3.ftile.Ftile;
public class FtileDecorateOut extends FtileDecorate {
final private LinkRendering linkRendering;
public FtileDecorateOut(final Ftile ftile, final LinkRendering linkRendering) {
super(ftile);
if (linkRendering == null) {
throw new IllegalArgumentException();
}
this.linkRendering = linkRendering;
}
public LinkRendering getOutLinkRendering() {
return linkRendering;
}
}
| [
"plantuml@gmail.com"
] | plantuml@gmail.com |
39ba72c732d78f57606d74a17277f76fb0c7ef4e | 0308ca5b152a082c1a206a1a136fd45e79b48143 | /usvao/VAO/software/datascope/projects/net_nvo/trunk/src/java/net/nvo/Footer.java | f7b3fad0c5f88413f0e3adb59ac85d3221c51cda | [] | no_license | Schwarzam/usvirtualobservatory | b609bf21a09c187b70e311a4c857516284049c31 | 53fe6c14cc9312d048326acfa25377e3eac59858 | refs/heads/master | 2022-03-28T23:38:58.847018 | 2019-11-27T16:05:47 | 2019-11-27T16:05:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 987 | java | package net.nvo;
import net.ivoa.util.SettingsFilter;
import net.ivoa.util.Settings;
/** Generate a Footer for a web page */
public class Footer {
private String elementSeparator = "<hr noshade='noshade' />\n";
public void setSeparator(String separator) {
elementSeparator = separator;
}
public void print(java.io.PrintStream out) {
print(out,"footer");// footer is default footer id (has some style)
}
public void print(java.io.PrintStream out, String footerid) {
String[] footerFiles = Settings.getArray("FooterFiles");
System.out.println("<div id='"+footerid+"'>");
try {
for (String file: footerFiles) {
out.println(elementSeparator);
SettingsFilter.filter(file, true);
}
} catch (Exception e) {
e.printStackTrace(System.out);
// Carry on
}
System.out.println("</div><!-- id='"+footerid+"' -->");
System.out.println("</body>\n</html>");
}
}
| [
"usvirtualobservatory@5a1e9bf7-f4d4-f7d4-5b89-e7d39643c4b5"
] | usvirtualobservatory@5a1e9bf7-f4d4-f7d4-5b89-e7d39643c4b5 |
8581987f18da895b576d095089b92c1b9e172310 | 38ba9235a38462ce369225ebb0b1d759762f4440 | /src/main/java/configuration/Main.java | 4929fff832bc292bc60eb6aac773ebf1604cdd44 | [] | no_license | ginosian/CompetencyFramework | f8f39920631b3278714aaff121bf191d2b596c69 | 6a95a892079f610cc16bc007ba9a6898eabe9e99 | refs/heads/master | 2021-04-29T04:44:36.303324 | 2017-01-09T07:42:58 | 2017-01-09T07:42:58 | 77,993,528 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,317 | java | package configuration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import javax.faces.webapp.FacesServlet;
/**
* Created by Martha on 1/6/2017.
*/
@Configuration
@ComponentScan(basePackages={""})
@EnableAutoConfiguration
public class Main extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(new Class[] { Main.class, Initializer.class});
}
@Bean
public ServletRegistrationBean servletRegistrationBean() {
FacesServlet servlet = new FacesServlet();
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(servlet, "*.xhtml");
return servletRegistrationBean;
}
}
| [
"marta.ginosian@gmail.com"
] | marta.ginosian@gmail.com |
5f628f407135afe6c5c3bce4f78cae74b7cb86b8 | 8cc48c116ef4cc7fe91efec0606e3c667e150edc | /Castor_v2/src/org/nutz/castor/castor/String2SqlDate.java | e660b78fea4337ff7ba41f81d977e6eaa14e51e4 | [] | no_license | chengjf0526/nutzlib | d70e67791819544196c9b19ca219b09fd4a317e6 | ca891069f81feba7bfbac7a2ff651649aa465302 | refs/heads/master | 2020-12-27T00:19:51.691696 | 2011-03-08T13:32:07 | 2011-03-08T13:32:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 414 | java | package org.nutz.castor.castor;
import java.text.ParseException;
import org.nutz.lang.Lang;
public class String2SqlDate extends DateTimeCastor<String, java.sql.Date> {
@Override
public java.sql.Date cast(String src, Class<?> toType, String... args) {
try {
return new java.sql.Date(dateFormat.parse(src).getTime());
} catch (ParseException e) {
throw Lang.wrapThrow(e);
}
}
}
| [
"wendal1985@gmail.com"
] | wendal1985@gmail.com |
b6e73a9e548cbf166fbf9aad8c7d8f478d8e2c2f | 103151131957c2248daac96fa966abe9cd88cb50 | /TAUI/src/main/java/cn/com/aiton/utils/CheckGbt.java | 3211fd2b5696bd4d947f25c69798a0f9ab4a6d8b | [] | no_license | aitonjiaotong/TAUI_20160114 | e8329d85de5e4fe3f6bc1acf87b773351b64fba6 | 39c045eefe7ffbf02d6c2323cd0da9ac0cb42927 | refs/heads/master | 2021-01-10T14:56:37.866468 | 2016-01-14T02:02:02 | 2016-01-14T02:02:02 | 49,616,408 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,406 | java | package cn.com.aiton.utils;
import cn.com.aiton.domain.Message;
/**
* Created by Administrator on 14-2-14.
*/
public class CheckGbt {
public static Message check(byte[] bytes)
{
Message m = new Message();
if (bytes[0] == 0x86)
{
if (bytes[1] == 0x05)
{
// MessageBox.Show(fun+":国标通信协议错误类型中的其它错误原因!");
m.setBoo(false);
m.setMsg("国标通信协议错误类型中的其它错误原因");
m.setObj(""+0x05);
return m;
}
else if (bytes[1] == 0x01)
{
// MessageBox.Show(fun + ":国标通信协议错误类型中的消息长度太长!");
m.setBoo(false);
m.setMsg("国标通信协议错误类型中的消息长度太长");
m.setObj(""+0x01);
return m;
}
else if (bytes[1] == 0x02)
{
// MessageBox.Show(fun + ":国标通信协议错误类型中的消息类型错误!");
m.setBoo(false);
m.setMsg("国标通信协议错误类型中的消息类型错误");
m.setObj(""+0x02);
return m;
}
else if (bytes[1] == 0x03)
{
/// MessageBox.Show(fun + ":国标通信协议错误类型中的消息设置对象值超出规定的范围!");
m.setBoo(false);
m.setMsg("国标通信协议错误类型中的消息设置对象值超出规定的范围");
m.setObj(""+0x03);
return m;
}
else if (bytes[1] == 0x04)
{
// MessageBox.Show(fun + ":国标通信协议错误类型中的消息长度太短!");
m.setBoo(false);
m.setMsg("国标通信协议错误类型中的消息长度太短");
m.setObj(""+0x04);
return m;
}
else
{
// MessageBox.Show(fun + ":未知原因!");
m.setBoo(false);
m.setMsg("未知原因");
m.setObj("");
return m;
}
}
m.setBoo(true);
m.setMsg("检查数据正常");
m.setObj("");
return m;
}
}
| [
"zjb@aiton.com.cn"
] | zjb@aiton.com.cn |
12c0dcab235ae3317ff83cd16461a1ea7e628ea4 | 5610c181893e2a2480d14752a03b31c6e19b8a8c | /src/main/java/com/artarkatesoft/learncamel/file/CopyFilesRoute.java | a48e592f5e2a5dca3f608989329a830a59050db9 | [] | no_license | saksham103/learn-camel-simple-route | ca1faaae17ca84244d8159c74d403f5273b51d19 | 0645ff2b202c99322f0a57a65fd9aacd62e1275a | refs/heads/master | 2022-12-19T23:38:56.438800 | 2020-09-30T12:54:07 | 2020-09-30T12:54:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 498 | java | package com.artarkatesoft.learncamel.file;
import org.apache.camel.builder.RouteBuilder;
public class CopyFilesRoute extends RouteBuilder {
@Override
public void configure() throws Exception {
from("file:data/input?noop=true")
.to("log:?level=INFO&showBody=true&showHeaders=true")
.to("file:data/output")
.to("file:data/output_reserve");
from("file:data/input2?noop=true")
.to("file:data/output2");
}
}
| [
"d.art.shishkin@gmail.com"
] | d.art.shishkin@gmail.com |
b14690bf217fc99411e6c2235ce555eaf602a6d8 | 84b25978472f9de4774bd18b77c9cae2e4bce96a | /src/main/java/modularmachines/common/plugins/jei/CategoryUIDs.java | ba78f223cb3b186fde79aae80e02b8cb2c23b50b | [
"MIT"
] | permissive | Nedelosk/Modular-Machines | 34f507ecbbc32d1463390b0cbfe518e692004140 | 68cca6f76d34087c9289230810d77745b1d62937 | refs/heads/dev-1.10.2 | 2021-01-19T04:31:57.783518 | 2016-11-13T13:14:04 | 2016-11-13T13:14:04 | 35,362,688 | 6 | 1 | null | 2016-11-12T23:02:20 | 2015-05-10T08:10:58 | Java | UTF-8 | Java | false | false | 413 | java | package modularmachines.common.plugins.jei;
public class CategoryUIDs {
public static final String ALLOYSMELTER = "modularmachines.alloysmelter";
public static final String BOILER = "modularmachines.boiler";
public static final String PULVERIZER = "modularmachines.pulverizer";
public static final String LATHE = "modularmachines.lathe";
public static final String CRAFTING = "modularmachines.crafting";
}
| [
"nedelosk@gmail.com"
] | nedelosk@gmail.com |
4e34a8d05c1f4e7471b5439660d0fef5d5b1c979 | dfa5d7f16f171e6a52d92f24827ccaf6c5eccf54 | /modules/core/src/main/java/billiongoods/core/account/DuplicateAccountException.java | 6006845b5e3787f1c54a27cde0be2af26dcad03f | [] | no_license | Letractively/wisematches.temp | 4ebdbb74387fb32d1c171330864f2c60ece24108 | a1466a1ccc1f054398cd2aedc2aa44a72f21a4f9 | refs/heads/master | 2016-08-12T18:39:31.497465 | 2015-01-20T07:40:02 | 2015-01-20T07:40:02 | 45,893,186 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,002 | java | package billiongoods.core.account;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
/**
* This exception is thrown is you try register or modify an account and any of the account's attributes
* already registred.
*
* @author Sergey Klimenko (smklimenko@gmail.com)
*/
public class DuplicateAccountException extends AccountException {
private final Set<String> fieldNames;
public DuplicateAccountException(String... fieldNames) {
super("DuplicateAccount: " + Arrays.toString(fieldNames));
if (fieldNames != null) {
this.fieldNames = new HashSet<>(Arrays.asList(fieldNames));
} else {
this.fieldNames = null;
}
}
/**
* Returns the names of fields which already registered and can't be duplicate.
*
* @return the duplicate field names.
*/
public Set<String> getFieldNames() {
if (fieldNames != null) {
return Collections.unmodifiableSet(fieldNames);
}
return null;
}
}
| [
"smklimenko@localhost"
] | smklimenko@localhost |
35c1069fa6366dcc82dcdacdd06f3025326e2741 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_9667.java | e20889bb1afe2240acf9d4d9afd717f324e35495 | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 137 | java | @Override public void onFailedDownload(String fileName,boolean canceled){
updateButtonState(radialProgress,null,this,true,canceled);
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
f9990df2f371e20b0e5f74a8d87cc1c9aa3cd4fd | adc5797b1960a89039226772acab3deeddf02921 | /we-scim-service/src/main/java/com/wowsanta/handler/DomainEntityHandler.java | fc76ffe91a52bbfae30e6c8f18daca597e538c98 | [] | no_license | sol7442/wescim | 67ea8325ddaf0ee459844fb164aa3de0baa6857f | 327ca3d5ee9848cc372588cdd25c5dd0c377fe6f | refs/heads/master | 2021-01-04T05:37:27.008361 | 2020-04-09T10:08:01 | 2020-04-09T10:08:01 | 240,410,674 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,641 | java | package com.wowsanta.handler;
import java.io.File;
import com.wowsanta.scim.annotation.AnnotationHandler;
import com.wowsanta.scim.annotation.DOMAIN_ENTITY;
import com.wowsanta.scim.entity.EntityInfo;
import com.wowsanta.service.ServiceStructure;
import com.wowsanta.util.log.LOGGER;
public class DomainEntityHandler extends AnnotationHandler {
ServiceStructure structure = null;
public DomainEntityHandler(ServiceStructure structure) {
this.structure = structure;
}
@Override
public boolean visit(File root, File file) {
String class_name = createClassName(root,file);
try {
Class<?> clazz = Class.forName(class_name);
DOMAIN_ENTITY annotation = (DOMAIN_ENTITY) clazz.getAnnotation(DOMAIN_ENTITY.class);
if(annotation != null) {
EntityInfo entity = structure.getEntity(annotation.name());
if(entity == null) {
entity = new EntityInfo();
structure.addEntity(annotation.name(), entity);
}
EntityInfo domain_entity = new EntityInfo();
domain_entity.setName(annotation.name());
domain_entity.setClassName(class_name);
domain_entity.setImplClss(clazz);
entity.addDomainEntity(annotation.domain(),domain_entity);
}
} catch (ClassNotFoundException e) {
LOGGER.system.debug("CLASS NOT FOUND : {} ", class_name);
}
return false;
}
//
// private void make_searchService(EntityInfo entity) {
// entity.addRestfulService(EntityRestful_Delete_Service.builder()
// .name("search")
// .method(HttpMethod.post.toString())
// .url(getServiceUrl(entity, ""))
// .build());
// }
//
// private void make_deleteService(EntityInfo entity) {
// entity.addRestfulService(EntityRestful_Delete_Service.builder()
// .name("delete")
// .method(HttpMethod.delete.toString())
// .url(getServiceUrl(entity, ":id"))
// .build());
// }
//
// private void make_updateService(EntityInfo entity) {
// entity.addRestfulService(EntityRestful_Update_Service.builder()
// .name("update")
// .method(HttpMethod.patch.toString())
// .url(getServiceUrl(entity, ":id"))
// .build());
// }
//
// private void make_readService(EntityInfo entity) {
// entity.addRestfulService(EntityRestful_Read_Service.builder()
// .name("read")
// .method(HttpMethod.get.toString())
// .url(getServiceUrl(entity, ":id"))
// .build());
// }
//
// private void make_createService(EntityInfo entity) {
// entity.addRestfulService(EntityRestful_Create_Service.builder()
// .name("create")
// .method(HttpMethod.post.toString())
// .url(getServiceUrl(entity, null))
// .build());
// }
//
// private String getRealRepository(String repository) {
// String real_repository = (String)ServiceStructure.getInstance().getProperty(ServiceStructure.REPOSITORY,Constants.DEFATUL_REPOSITORY);
// if(repository.endsWith(Constants.DEFATUL_REPOSITORY)) {
// return real_repository;
// }
// return real_repository;
// }
public String getServiceUrl(EntityInfo entity, String params) {
StringBuffer buffer = new StringBuffer();
buffer.append("/");
buffer.append(entity.getName().replace("_", "/"));
buffer.append("s");
if(params != null) {
buffer.append("/").append(params);
}
return buffer.toString();
}
// private String getRealDomain(String entity_domain) {
// String real_dommain = (String)ServiceStructure.getInstance().getProperty(ServiceStructure.DOMAIN,Constants.DEFATUL_DOMAIN);
// if(entity_domain.endsWith(Constants.DEFATUL_DOMAIN)) {
// return real_dommain;
// }
// return entity_domain;
// }
}
| [
"yongsung.kim@gmail.com"
] | yongsung.kim@gmail.com |
80989ed111ca1bb2c869ab7421789774937d8d0a | db499cdbff20dce3c0b202fde3c32023e9febe58 | /app/src/main/java/in/wingstud/grocitoseller/model/PaymentPerModel.java | 632fc9d75ebe0dfbca82c2eefcd2c39fc7fac4da | [] | no_license | mukesh249/GrocitoSeller | c140028a9f2aab6664d4ad1a845bea2aaab5e6fd | 072b99b213bd948358cd4f4d0feffac41869ee99 | refs/heads/master | 2020-12-28T01:45:09.705182 | 2020-02-04T06:42:13 | 2020-02-04T06:42:13 | 238,140,845 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,113 | java | package in.wingstud.grocitoseller.model;
import java.io.Serializable;
/**
* Created by hemant on 25-08-2019.
*/
public class PaymentPerModel implements Serializable {
String order_date,total_commission,amount,transaction_id,created_at;
public String getOrder_date() {
return order_date;
}
public void setOrder_date(String order_date) {
this.order_date = order_date;
}
public String getTotal_commission() {
return total_commission;
}
public void setTotal_commission(String total_commission) {
this.total_commission = total_commission;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public String getTransaction_id() {
return transaction_id;
}
public void setTransaction_id(String transaction_id) {
this.transaction_id = transaction_id;
}
public String getCreated_at() {
return created_at;
}
public void setCreated_at(String created_at) {
this.created_at = created_at;
}
}
| [
"mukeshv249@gmail.com"
] | mukeshv249@gmail.com |
457484fc01fdabd90b002b715e8b85f73a52c07d | 7dbbe21b902fe362701d53714a6a736d86c451d7 | /BzenStudio-5.6/Source/com/zend/ide/desktop/dy.java | 0063ea45d6634c4bc57e99742a8aec6bfd65865f | [] | no_license | HS-matty/dev | 51a53b4fd03ae01981549149433d5091462c65d0 | 576499588e47e01967f0c69cbac238065062da9b | refs/heads/master | 2022-05-05T18:32:24.148716 | 2022-03-20T16:55:28 | 2022-03-20T16:55:28 | 196,147,486 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,603 | java | package com.zend.ide.desktop;
import com.zend.ide.util.bi;
import com.zend.ide.util.cr;
import com.zend.ide.util.cv;
import com.zend.ide.util.f.a;
import com.zend.ide.util.f.f;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.GraphicsEnvironment;
import java.awt.Image;
import java.awt.MediaTracker;
import java.util.Calendar;
import java.util.Locale;
import javax.swing.JPanel;
public class dy extends JPanel
{
private Image a = null;
private String b = "";
private Font c;
public dy(Image paramImage)
{
MediaTracker localMediaTracker = new MediaTracker(this);
this.a = paramImage;
localMediaTracker.addImage(this.a, 0);
try
{
localMediaTracker.waitForID(0);
}
catch (InterruptedException localInterruptedException)
{
}
int i = this.a.getWidth(this);
int j = this.a.getHeight(this);
setPreferredSize(new Dimension(i, j));
}
public void paintComponent(Graphics paramGraphics)
{
super.paintComponent(paramGraphics);
f localf = a.a.c();
Font localFont = a();
paramGraphics.setFont(localFont.deriveFont(1, 11.0F));
paramGraphics.drawImage(this.a, 0, 0, this);
String str1 = bi.a("BUILD_ID");
if (str1 == null)
str1 = "";
int i = 246;
paramGraphics.setColor(new Color(75, 175, 30));
if (a.a.a())
paramGraphics.drawString("", i, 141);
else
paramGraphics.drawString("Version 5.5.1 ", i, 141);
paramGraphics.setColor(new Color(153, 166, 176));
paramGraphics.setFont(localFont.deriveFont(1, 15.0F));
paramGraphics.drawString(a(localf.d()), i, 181);
paramGraphics.setColor(new Color(75, 90, 100));
paramGraphics.setFont(localFont.deriveFont(0, 10.0F));
paramGraphics.drawString(this.b, i, 38);
paramGraphics.drawString("Build " + str1, i, 206);
String str2 = localf.a;
if (localf.b())
{
String str3 = localf.b.substring(8, 16);
int k = localf.a().get(5);
int m = localf.a().get(2) + 1;
int n = localf.a().get(1);
str3 = k + "/" + m + "/" + n;
paramGraphics.drawString("Licensed to: " + str2, i, 220);
paramGraphics.drawString("Valid until " + str3, i, 234);
}
else
{
if (str2.length() > 21)
str2 = str2.substring(0, 18) + "...";
paramGraphics.drawString("Licensed to: " + str2, i, 220);
int j = localf.e;
if (j > 0)
paramGraphics.drawString(j + " User License", i, 234);
}
}
private Font a()
{
if ((this.c == null) && (cr.c() == 1))
{
String[] arrayOfString = arrayOfString = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(Locale.getDefault());
for (int i = 0; i < arrayOfString.length; i++)
{
if (!arrayOfString[i].equals("Tahoma"))
continue;
this.c = new Font("Tahoma", 0, 11);
}
}
if (this.c == null)
this.c = cv.e();
else if ((this.b != null) && (this.b.length() > 0) && (!this.c.canDisplay(this.b.charAt(0))))
this.c = cv.e();
return this.c;
}
private String a(int paramInt)
{
switch (paramInt)
{
case 1:
return "Professional Edition";
case 3:
return "Professional Edition";
case 2:
return "Enterprise Edition";
}
return "Standard Edition";
}
public void a(String paramString)
{
this.b = paramString;
repaint();
}
}
/* Location: C:\Program Files\Zend\ZendStudio-5.5.1\bin\ZendIDE.jar
* Qualified Name: com.zend.ide.desktop.dy
* JD-Core Version: 0.6.0
*/ | [
"byqdes@gmail.com"
] | byqdes@gmail.com |
0aada1745ee12e34b4cba7225aff1f79eb1409db | f3e4a11ed6d7578d57e93b008a87b2955ac61238 | /src/main/java/slimeknights/tconstruct/library/recipe/tinkerstation/modifier/OverslimeModifierRecipeBuilder.java | 6fcd783d97e83f21b3551e2e675ee8e2033fc03b | [
"MIT"
] | permissive | MuTBu/TinkersConstruct | ff258b82703fc4523bddd0efab2d8262a294cb00 | 3800876e06ed2d3365cd4bb44fedcabeaa18793e | refs/heads/1.16 | 2023-06-12T07:16:41.339299 | 2021-06-28T06:37:01 | 2021-06-28T06:37:01 | 380,930,813 | 0 | 0 | null | 2021-06-28T06:37:13 | 2021-06-28T06:37:12 | null | UTF-8 | Java | false | false | 2,297 | java | package slimeknights.tconstruct.library.recipe.tinkerstation.modifier;
import com.google.gson.JsonObject;
import lombok.RequiredArgsConstructor;
import net.minecraft.data.IFinishedRecipe;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.util.IItemProvider;
import net.minecraft.util.ResourceLocation;
import slimeknights.mantle.recipe.data.AbstractRecipeBuilder;
import slimeknights.tconstruct.tools.TinkerModifiers;
import javax.annotation.Nullable;
import java.util.Objects;
import java.util.function.Consumer;
/**
* Builder for overslime recipes
*/
@RequiredArgsConstructor(staticName = "modifier")
public class OverslimeModifierRecipeBuilder extends AbstractRecipeBuilder<OverslimeModifierRecipeBuilder> {
private final Ingredient ingredient;
private final int restoreAmount;
/** Creates a new builder for the given item */
public static OverslimeModifierRecipeBuilder modifier(IItemProvider item, int restoreAmount) {
return modifier(Ingredient.fromItems(item), restoreAmount);
}
@Override
public void build(Consumer<IFinishedRecipe> consumer) {
ItemStack[] stacks = ingredient.getMatchingStacks();
if (stacks.length == 0) {
throw new IllegalStateException("Empty ingredient not allowed");
}
build(consumer, Objects.requireNonNull(stacks[0].getItem().getRegistryName()));
}
@Override
public void build(Consumer<IFinishedRecipe> consumer, ResourceLocation id) {
if (ingredient == Ingredient.EMPTY) {
throw new IllegalStateException("Empty ingredient not allowed");
}
ResourceLocation advancementId = buildOptionalAdvancement(id, "modifiers");
consumer.accept(new FinishedRecipe(id, advancementId));
}
private class FinishedRecipe extends AbstractFinishedRecipe {
public FinishedRecipe(ResourceLocation ID, @Nullable ResourceLocation advancementID) {
super(ID, advancementID);
}
@Override
public void serialize(JsonObject json) {
json.add("ingredient", ingredient.serialize());
json.addProperty("restore_amount", restoreAmount);
}
@Override
public IRecipeSerializer<?> getSerializer() {
return TinkerModifiers.overslimeSerializer.get();
}
}
}
| [
"knightminer4@gmail.com"
] | knightminer4@gmail.com |
9ec79e3182ecb92793391ab93958cf35d74dba19 | 2ceb874289627a8c83f15a379f1e5750b0305200 | /live/src/main/java/com/me2me/live/listener/UpdateTopicTimeListener.java | 9b2237b48e17d8f459081f9880b330f4a2e71357 | [] | no_license | hushunjian/me2me-app | 73a691576d29565f5a51eed9025e256df6b5c9ce | 5da0a720b72193a041150fae1266fceb33ba8518 | refs/heads/master | 2023-01-07T15:59:26.013478 | 2021-04-03T09:50:07 | 2021-04-03T09:50:07 | 120,296,809 | 0 | 2 | null | 2022-12-16T07:54:57 | 2018-02-05T11:37:31 | Java | UTF-8 | Java | false | false | 1,135 | java | package com.me2me.live.listener;
import javax.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.google.common.eventbus.Subscribe;
import com.me2me.core.event.ApplicationEventBus;
import com.me2me.live.event.UpdateTopicTimeEvent;
import com.me2me.live.service.UpdateTopicTimeHandler;
@Component
@Slf4j
public class UpdateTopicTimeListener {
private final ApplicationEventBus applicationEventBus;
private final UpdateTopicTimeHandler updateTopicTimeHandler;
@Autowired
public UpdateTopicTimeListener(ApplicationEventBus applicationEventBus, UpdateTopicTimeHandler updateTopicTimeHandler){
this.applicationEventBus = applicationEventBus;
this.updateTopicTimeHandler = updateTopicTimeHandler;
}
@PostConstruct
public void init(){
this.applicationEventBus.register(this);
}
@Subscribe
public void updateTopicTime(UpdateTopicTimeEvent event){
updateTopicTimeHandler.updateTime(event.getTopicId(), event.getLongTime(), event.getOutTime());
}
}
| [
"hushunjian950420@163.com"
] | hushunjian950420@163.com |
5a8376c53d4ca7737bb4d2c9dc6e8fda2c3b0007 | b69a092c775780b725c90e1699c12f6d4ddc3f3b | /datarouter-storage/src/main/java/io/datarouter/storage/serialize/JsonDatabeanToolTests.java | cf2cad0e55fc8550ba8902e94b43dc639c1f9586 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | hoolatech/datarouter | a035e84e9dd5d79a5515f1015b10366a469fcb48 | 2ecc7e803895fbe8c5acffe875d4ddec24e7d14c | refs/heads/master | 2020-04-12T00:08:08.762832 | 2018-12-13T00:39:58 | 2018-12-13T00:39:58 | 128,131,618 | 0 | 0 | Apache-2.0 | 2018-12-17T21:02:20 | 2018-04-04T22:52:13 | Java | UTF-8 | Java | false | false | 5,175 | java | /**
* Copyright © 2009 HotPads (admin@hotpads.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.datarouter.storage.serialize;
import java.util.Date;
import java.util.List;
import java.util.function.Supplier;
import org.testng.Assert;
import org.testng.annotations.Test;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import io.datarouter.model.databean.DatabeanTool;
import io.datarouter.model.serialize.JsonDatabeanTool;
import io.datarouter.storage.test.node.basic.manyfield.ManyFieldBean;
import io.datarouter.storage.test.node.basic.manyfield.ManyFieldBean.ManyFieldTypeBeanFielder;
import io.datarouter.storage.test.node.basic.manyfield.ManyFieldBeanKey;
import io.datarouter.storage.test.node.basic.manyfield.TestEnum;
import io.datarouter.storage.test.node.basic.sorted.SortedBean;
import io.datarouter.storage.test.node.basic.sorted.SortedBean.SortedBeanFielder;
import io.datarouter.storage.test.node.basic.sorted.SortedBeanKey;
import io.datarouter.util.collection.CollectionTool;
import io.datarouter.util.collection.ListTool;
import io.datarouter.util.lang.ReflectionTool;
public class JsonDatabeanToolTests{
private final ManyFieldTypeBeanFielder fielder = new ManyFieldTypeBeanFielder();
private final SortedBeanFielder sortedBeanFielder = new SortedBeanFielder();
private static ManyFieldBean makeTestBean(){
ManyFieldBean bean = new ManyFieldBean(33333L);
bean.setBooleanField(false);
bean.setByteField((byte)-55);
bean.setCharacterField('Z');
bean.setDoubleField(-79.245);
bean.setFloatField(45.12345f);
bean.setIntegerField(-9876);
bean.setIntEnumField(TestEnum.fish);
bean.setLongDateField(new Date());
bean.setLongField(-87658765876L);
bean.setShortField((short)-30000);
bean.setStringEnumField(TestEnum.beast);
bean.setStringField("_%crazy-string\\asdf");
bean.setVarIntEnumField(TestEnum.cat);
bean.setVarIntField(5555);
return bean;
}
@Test
public void testRoundTrip(){
ManyFieldBeanKey keyIn = new ManyFieldBeanKey(12345L);
JsonObject keyJsonObject = JsonDatabeanTool.primaryKeyToJson(keyIn, fielder.getKeyFielder());
ManyFieldBeanKey keyOut = JsonDatabeanTool.primaryKeyFromJson(ManyFieldBeanKey.class, fielder.getKeyFielder(),
keyJsonObject);
Assert.assertEquals(keyOut, keyIn);
ManyFieldBean beanIn = makeTestBean();
JsonObject databeanJson = JsonDatabeanTool.databeanToJson(beanIn, fielder);
Supplier<ManyFieldBean> supplier = ReflectionTool.supplier(ManyFieldBean.class);
ManyFieldBean beanOut = JsonDatabeanTool.databeanFromJson(supplier, fielder, databeanJson);
Assert.assertTrue(beanIn.equalsAllPersistentFields(beanOut));
}
@Test
public void testBeanWithJson(){
ManyFieldBean beanIn = makeTestBean();
JsonObject databeanJson = JsonDatabeanTool.databeanToJson(beanIn, fielder);
JsonObject innerJson = new JsonObject();
innerJson.addProperty("snorkle", "bazooka");
databeanJson.add(ManyFieldBean.FieldKeys.stringField.getName(), innerJson);
beanIn.setStringField(innerJson.toString());
Supplier<ManyFieldBean> supplier = ReflectionTool.supplier(ManyFieldBean.class);
ManyFieldBean beanOut = JsonDatabeanTool.databeanFromJson(supplier, fielder, databeanJson);
Assert.assertTrue(beanIn.equalsAllPersistentFields(beanOut));
}
@Test
public void testMultiRoundTrip(){
SortedBeanKey key0 = new SortedBeanKey("a", "b", 0, "d");
SortedBeanKey key1 = new SortedBeanKey("a", "b", 1, "dasdf");
SortedBeanKey key2 = new SortedBeanKey("a", "basdf", 2, "sdsdsd");
List<SortedBeanKey> keysIn = ListTool.createArrayList(key0, key1, key2);
JsonArray jsonKeys = JsonDatabeanTool.primaryKeysToJson(keysIn, sortedBeanFielder.getKeyFielder());
List<SortedBeanKey> keysOut = JsonDatabeanTool.primaryKeysFromJson(SortedBeanKey.class, sortedBeanFielder
.getKeyFielder(), jsonKeys);
Assert.assertEquals(CollectionTool.size(keysOut), 3);
Assert.assertEquals(keysOut.toArray(), keysIn.toArray());
SortedBean bean0 = new SortedBean(key0, "1", 2L, null, 45.67d);
SortedBean bean1 = new SortedBean(key1, "ert", -987654L, "cheesetoast", -45.67d);
List<SortedBean> databeansIn = ListTool.createArrayList(bean0, bean1);
JsonArray jsonDatabeans = JsonDatabeanTool.databeansToJson(databeansIn, sortedBeanFielder);
List<SortedBean> databeansOut = JsonDatabeanTool.databeansFromJson(ReflectionTool.supplier(SortedBean.class),
sortedBeanFielder, jsonDatabeans);
Assert.assertEquals(CollectionTool.size(databeansOut), 2);
Assert.assertEquals(databeansOut.toArray(), databeansIn.toArray());
Assert.assertEquals(DatabeanTool.getKeys(databeansOut).toArray(), keysIn.subList(0,2).toArray());
}
}
| [
"cbonsart@hotpads.com"
] | cbonsart@hotpads.com |
95b077143e4d459faebb91c7f8373a148b834d5c | 09d0ddd512472a10bab82c912b66cbb13113fcbf | /TestApplications/TF-BETA-THERMATK-v5.7.1/DecompiledCode/Procyon/src/main/java/org/telegram/messenger/SmsReceiver.java | 9b652ebe52051639f2926caa8c5a87c5ce69ba94 | [] | no_license | sgros/activity_flow_plugin | bde2de3745d95e8097c053795c9e990c829a88f4 | 9e59f8b3adacf078946990db9c58f4965a5ccb48 | refs/heads/master | 2020-06-19T02:39:13.865609 | 2019-07-08T20:17:28 | 2019-07-08T20:17:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 366 | java | //
// Decompiled by Procyon v0.5.34
//
package org.telegram.messenger;
import android.content.Intent;
import android.content.Context;
import android.annotation.TargetApi;
import android.content.BroadcastReceiver;
@TargetApi(26)
public class SmsReceiver extends BroadcastReceiver
{
public void onReceive(final Context context, final Intent intent) {
}
}
| [
"crash@home.home.hr"
] | crash@home.home.hr |
43bb680c2b9dd0cea8f8cd24982806e71ec375fc | 5f83daae9881adb58eeafd431d1a7c165225f65c | /src/main/java/com/aerothinker/kms/service/mapper/ParaOtherMapper.java | 6df0eaf770a6eded68900ebb8977155bee10e32d | [] | no_license | bigjungle/kms2react | e6a72416daa31052aa5e9d8bca3c6c17ebcb60ed | df4292b6d6e68fc477642e721af3181cecb4e23f | refs/heads/master | 2020-04-24T01:24:04.016742 | 2019-02-20T04:01:46 | 2019-02-20T04:01:46 | 171,597,026 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,345 | java | package com.aerothinker.kms.service.mapper;
import com.aerothinker.kms.domain.*;
import com.aerothinker.kms.service.dto.ParaOtherDTO;
import org.mapstruct.*;
/**
* Mapper for the entity ParaOther and its DTO ParaOtherDTO.
*/
@Mapper(componentModel = "spring", uses = {ParaUserMapper.class})
public interface ParaOtherMapper extends EntityMapper<ParaOtherDTO, ParaOther> {
@Mapping(source = "createdUser.id", target = "createdUserId")
@Mapping(source = "createdUser.name", target = "createdUserName")
@Mapping(source = "modifiedUser.id", target = "modifiedUserId")
@Mapping(source = "modifiedUser.name", target = "modifiedUserName")
@Mapping(source = "verifiedUser.id", target = "verifiedUserId")
@Mapping(source = "verifiedUser.name", target = "verifiedUserName")
ParaOtherDTO toDto(ParaOther paraOther);
@Mapping(source = "createdUserId", target = "createdUser")
@Mapping(source = "modifiedUserId", target = "modifiedUser")
@Mapping(source = "verifiedUserId", target = "verifiedUser")
@Mapping(target = "kmsInfos", ignore = true)
ParaOther toEntity(ParaOtherDTO paraOtherDTO);
default ParaOther fromId(Long id) {
if (id == null) {
return null;
}
ParaOther paraOther = new ParaOther();
paraOther.setId(id);
return paraOther;
}
}
| [
"ccpitcmp@outlook.com"
] | ccpitcmp@outlook.com |
2b18532326c11e188f1c28c4cbeffa1585484d7f | 7af4696e1be38e22025a9662ba9591ba7fc83965 | /components/camel-google-drive/src/generated/java/org/apache/camel/component/google/drive/DriveRepliesEndpointConfigurationConfigurer.java | ac8038363fd3c4a8265af1dc996c64bea0a1bbbd | [
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-unknown",
"Apache-2.0"
] | permissive | aashnajena/camel | 740249630a720ae81294a43452c8789cdbf7bc00 | e03647b378e10c99b44aab2ef56e134289816dbf | refs/heads/master | 2021-03-12T03:06:31.216298 | 2020-07-19T23:51:13 | 2020-07-19T23:51:13 | 251,257,144 | 1 | 1 | Apache-2.0 | 2020-03-30T09:20:10 | 2020-03-30T09:20:09 | null | UTF-8 | Java | false | false | 5,195 | java | /* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.google.drive;
import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.component.google.drive.DriveRepliesEndpointConfiguration;
/**
* Generated by camel build tools - do NOT edit this file!
*/
@SuppressWarnings("unchecked")
public class DriveRepliesEndpointConfigurationConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
org.apache.camel.component.google.drive.DriveRepliesEndpointConfiguration target = (org.apache.camel.component.google.drive.DriveRepliesEndpointConfiguration) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "accesstoken":
case "AccessToken": target.setAccessToken(property(camelContext, java.lang.String.class, value)); return true;
case "apiname":
case "ApiName": target.setApiName(property(camelContext, org.apache.camel.component.google.drive.internal.GoogleDriveApiName.class, value)); return true;
case "applicationname":
case "ApplicationName": target.setApplicationName(property(camelContext, java.lang.String.class, value)); return true;
case "clientid":
case "ClientId": target.setClientId(property(camelContext, java.lang.String.class, value)); return true;
case "clientsecret":
case "ClientSecret": target.setClientSecret(property(camelContext, java.lang.String.class, value)); return true;
case "commentid":
case "CommentId": target.setCommentId(property(camelContext, java.lang.String.class, value)); return true;
case "content":
case "Content": target.setContent(property(camelContext, com.google.api.services.drive.model.CommentReply.class, value)); return true;
case "fileid":
case "FileId": target.setFileId(property(camelContext, java.lang.String.class, value)); return true;
case "methodname":
case "MethodName": target.setMethodName(property(camelContext, java.lang.String.class, value)); return true;
case "refreshtoken":
case "RefreshToken": target.setRefreshToken(property(camelContext, java.lang.String.class, value)); return true;
case "replyid":
case "ReplyId": target.setReplyId(property(camelContext, java.lang.String.class, value)); return true;
case "scopes":
case "Scopes": target.setScopes(property(camelContext, java.util.List.class, value)); return true;
default: return false;
}
}
@Override
public Map<String, Object> getAllOptions(Object target) {
Map<String, Object> answer = new CaseInsensitiveMap();
answer.put("AccessToken", java.lang.String.class);
answer.put("ApiName", org.apache.camel.component.google.drive.internal.GoogleDriveApiName.class);
answer.put("ApplicationName", java.lang.String.class);
answer.put("ClientId", java.lang.String.class);
answer.put("ClientSecret", java.lang.String.class);
answer.put("CommentId", java.lang.String.class);
answer.put("Content", com.google.api.services.drive.model.CommentReply.class);
answer.put("FileId", java.lang.String.class);
answer.put("MethodName", java.lang.String.class);
answer.put("RefreshToken", java.lang.String.class);
answer.put("ReplyId", java.lang.String.class);
answer.put("Scopes", java.util.List.class);
return answer;
}
@Override
public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
org.apache.camel.component.google.drive.DriveRepliesEndpointConfiguration target = (org.apache.camel.component.google.drive.DriveRepliesEndpointConfiguration) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "accesstoken":
case "AccessToken": return target.getAccessToken();
case "apiname":
case "ApiName": return target.getApiName();
case "applicationname":
case "ApplicationName": return target.getApplicationName();
case "clientid":
case "ClientId": return target.getClientId();
case "clientsecret":
case "ClientSecret": return target.getClientSecret();
case "commentid":
case "CommentId": return target.getCommentId();
case "content":
case "Content": return target.getContent();
case "fileid":
case "FileId": return target.getFileId();
case "methodname":
case "MethodName": return target.getMethodName();
case "refreshtoken":
case "RefreshToken": return target.getRefreshToken();
case "replyid":
case "ReplyId": return target.getReplyId();
case "scopes":
case "Scopes": return target.getScopes();
default: return null;
}
}
}
| [
"claus.ibsen@gmail.com"
] | claus.ibsen@gmail.com |
9942fa51e7bc6a8ae4713fc64ceeba27f750820f | 93e14ba08f0438d091978493b63b3d4b257aedbb | /src/main/java/com/cym/utils/JarUtil.java | 908978330f55927ed7bb6337512cbf57984d50e5 | [
"LicenseRef-scancode-mulanpsl-1.0-en",
"MulanPSL-1.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | cym1102/nginxWebUI | 8d45e399de62dfb96029ba7e37e87185b4eb25d9 | bfbf2200df4b338c89a15267a46dc840f4d8aaea | refs/heads/master | 2023-08-25T17:35:13.310216 | 2023-08-17T03:07:47 | 2023-08-17T03:07:47 | 264,408,495 | 1,762 | 291 | NOASSERTION | 2023-07-31T05:39:52 | 2020-05-16T10:04:14 | HTML | UTF-8 | Java | false | false | 1,098 | java | package com.cym.utils;
import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.security.CodeSource;
import java.security.ProtectionDomain;
public class JarUtil {
public static String getCurrentFilePath() {
ProtectionDomain protectionDomain = JarUtil.class.getProtectionDomain();
CodeSource codeSource = protectionDomain.getCodeSource();
URI location = null;
try {
location = (codeSource == null ? null : codeSource.getLocation().toURI());
} catch (URISyntaxException e) {
e.printStackTrace();
}
String path = (location == null ? null : location.getSchemeSpecificPart());
if (path == null) {
throw new IllegalStateException("Unable to determine code source archive");
}
File root = new File(path);
if (!root.exists()) {
throw new IllegalStateException("Unable to determine code source archive from " + root);
}
return root.getAbsolutePath();
}
public static File getCurrentFile() {
return new File(getCurrentFilePath());
}
public static void main(String[] args) {
System.out.println(getCurrentFilePath());
}
}
| [
"cym1102@qq.com"
] | cym1102@qq.com |
aefdfb7c53406f0fe156367a587c84c6d52444a6 | a0cd546101594e679544d24f92ae8fcc17013142 | /refactorit-core/src/main/java/net/sf/refactorit/ui/SearchingInterruptedException.java | 5351cb56b9e586d5ef52ed0418ea3fd0936e8d81 | [] | no_license | svn2github/RefactorIT | f65198bb64f6c11e20d35ace5f9563d781b7fe5c | 4b1fc1ebd06c8e192af9ccd94eb5c2d96f79f94c | refs/heads/master | 2021-01-10T03:09:28.310366 | 2008-09-18T10:17:56 | 2008-09-18T10:17:56 | 47,540,746 | 0 | 1 | null | null | null | null | WINDOWS-1252 | Java | false | false | 910 | java | /*
* Copyright 2001-2008 Aqris Software AS. All rights reserved.
*
* This program is dual-licensed under both the Common Development
* and Distribution License ("CDDL") and the GNU General Public
* License ("GPL"). You may elect to use one or the other of these
* licenses.
*/
package net.sf.refactorit.ui;
import net.sf.refactorit.utils.RefactorItInterruptedException;
/**
* <p>Title: </p>
* <p>Description: Thrown when user interrupts processing.
* For example in <code>JProgressDialog.run()</code> </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: AQRIS Software AS</p>
* @author Tõnis Vaga
* @version 1.0
*/
public class SearchingInterruptedException extends
RefactorItInterruptedException { //InterruptedException {
public SearchingInterruptedException() {
}
public SearchingInterruptedException(String p0) {
super(p0);
}
}
| [
"l950637@285b47d1-db48-0410-a9c5-fb61d244d46c"
] | l950637@285b47d1-db48-0410-a9c5-fb61d244d46c |
c980415d7b016599068e8f3b96b462cc395fbeaa | b0d24836683e636c390e497117ac86831abb5e1a | /tags/last release before refactoring/Andromeda/src/com/sc2mod/andromeda/program/MapRunner.java | d8557d3fc9137ee77de243cbf606096c8b61186d | [] | no_license | lukemshannonhill/andromeda | 1b1b884ea00a7a1dd45f25e8406bf44e89f31aee | 62107d28e70f99c63454a7670faff4d85c4e1eb2 | refs/heads/master | 2020-03-27T22:46:26.660518 | 2014-07-19T21:27:31 | 2014-07-19T21:27:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,928 | java | /**
* Andromeda, a galaxy extension language.
* Copyright (C) 2010 J. 'gex' Finis (gekko_tgh@gmx.de, sc2mod.com)
*
* Because of possible Plagiarism, Andromeda is not yet
* Open Source. You are not allowed to redistribute the sources
* in any form without my permission.
*
*/
package com.sc2mod.andromeda.program;
import java.io.File;
import java.io.IOException;
public class MapRunner {
private String params;
private String executablePath;
private Platform platform;
public MapRunner(Platform platform, Options options, ConfigHandler config) {
this.params = options.runParams;
this.platform = platform;
executablePath = config.getPropertyString("GENERAL", "sc2Executable", "");
}
public MapRunner(Platform platform, String sc2ExecutablePath, String params){
this.params = params;
this.platform = platform;
this.executablePath = sc2ExecutablePath;
}
public void test(File mapFile) throws IOException{
if(executablePath==""){
throw new IOException("No SC2Folder specified in the conf file");
}
if(mapFile==null){
throw new IOException("No map file to test specified!");
}
if(!mapFile.exists()){
throw new IOException("Map file to test does not exist!");
}
File f = new File(executablePath);
if(!f.exists()){
throw new IOException("Starcraft 2 executable does not exist.\n(" + f.getAbsolutePath() + ")");
}
String processString;
if(platform.isOSX){
processString = "open \"" + f.getAbsolutePath() + "\" --args " + " "+ params + " -run \"" + mapFile.getAbsolutePath() + "\"";
String[] cmd = {"/bin/bash", "-c", processString};
System.out.println(processString);
Runtime.getRuntime().exec(cmd);
} else {
processString = "\"" + f.getAbsolutePath() + "\"" + " "+ params + " -run \"" + mapFile.getAbsolutePath() + "\"";
Runtime.getRuntime().exec(processString);
}
}
}
| [
"gexicide@ba8a923f-d780-44b6-badb-29f948e90341"
] | gexicide@ba8a923f-d780-44b6-badb-29f948e90341 |
b67c54e245cb85ee0927aaed4e3962b0258af75a | dc0afaa5b63e1bf4ee195fa1bf56629a32d8d57a | /java/spring/first-db-router/src/main/java/me/test/action/TestAction.java | dffabb130944f0a84ab2989e3f969ef186bda399 | [] | no_license | btpka3/btpka3.github.com | 370e6954af485bd6aee35fa5944007aab131e416 | e5435d201641a2f21c632a28eae5ef408d2e799c | refs/heads/master | 2023-08-23T18:37:31.643843 | 2023-08-16T11:48:38 | 2023-08-16T11:48:38 | 8,571,000 | 19 | 19 | null | 2021-04-12T10:01:13 | 2013-03-05T03:08:08 | Java | UTF-8 | Java | false | false | 6,278 | java |
package me.test.action;
import java.util.Arrays;
import java.util.LinkedList;
import javax.annotation.Resource;
import javax.sql.DataSource;
import me.test.service.UpdateRecord;
import me.test.service.UserService;
import org.springframework.jdbc.datasource.init.DatabasePopulator;
import org.springframework.jdbc.datasource.init.DatabasePopulatorUtils;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("/test")
public class TestAction {
@Resource(name = "userService")
private UserService userService;
@Resource(name = "dataSource1")
private DataSource dataSource1;
@Resource(name = "dataSource2")
private DataSource dataSource2;
@Resource(name = "dbPop1")
private DatabasePopulator dbPop1;
@Resource(name = "dbPop2")
private DatabasePopulator dbPop2;
@RequestMapping(value = "/reset")
public String rest() {
DatabasePopulatorUtils.execute(dbPop1, dataSource1);
DatabasePopulatorUtils.execute(dbPop2, dataSource2);
return "redirect:/user/list.do";
}
// --------------------------------------------------- 由于DataSourceTransactionManager并为对 AbstractRoutingDataSource
// 编写特别的代码,不会造成切换数据库,因而会造成错误。
@RequestMapping(value = "/requiredTransSucceed")
public String requiredTransSucceed() {
/*
userService.multiUpdate(new LinkedList<UpdateRecord>(Arrays.asList(
new UpdateRecord(0, Propagation.REQUIRED, 1L, 1L, "--000", true), // 期待结果:更新成功
new UpdateRecord(1, Propagation.REQUIRED, 2L, 1L, "--111", true), // 期待结果:更新成功
new UpdateRecord(2, Propagation.REQUIRED, 1L, 2L, "--222", true), // 期待结果:更新成功
new UpdateRecord(3, Propagation.REQUIRED, 2L, 2L, "--333", true)) // 期待结果:更新成功
));
*/
userService.multiUpdate(new LinkedList<UpdateRecord>(Arrays.asList(
new UpdateRecord(0, Propagation.REQUIRED, 1L, 1L, "--000", true), // 期待结果:更新成功
new UpdateRecord(1, Propagation.REQUIRED, 3L, 4L, "--444", true), // 期待结果:更新成功
new UpdateRecord(2, Propagation.REQUIRED, 1L, 2L, "--222", true), // 期待结果:更新成功
new UpdateRecord(3, Propagation.REQUIRED, 3L, 5L, "--555", true)) // 期待结果:更新成功
));
return "redirect:/user/list.do";
}
@RequestMapping(value = "/requiredTransFailedAt0")
public String requiredTransFailedAt0() {
userService.multiUpdate(new LinkedList<UpdateRecord>(Arrays.asList(
new UpdateRecord(0, Propagation.REQUIRED, 1L, 1L, "--000", false),// 期待结果:更新失败
new UpdateRecord(1, Propagation.REQUIRED, 2L, 1L, "--111", true), // 期待结果:更新成功
new UpdateRecord(2, Propagation.REQUIRED, 1L, 2L, "--222", true), // 期待结果:更新失败
new UpdateRecord(3, Propagation.REQUIRED, 2L, 2L, "--333", true)) // 期待结果:更新成功
));
return "redirect:/user/list.do";
}
@RequestMapping(value = "/requiredTransFailedAt1")
public String requiredTransFailedAt1() {
userService.multiUpdate(new LinkedList<UpdateRecord>(Arrays.asList(
new UpdateRecord(0, Propagation.REQUIRED, 1L, 1L, "--000", true), // 期待结果:更新成功
new UpdateRecord(1, Propagation.REQUIRED, 2L, 1L, "--111", false),// 期待结果:更新失败
new UpdateRecord(2, Propagation.REQUIRED, 1L, 2L, "--222", true), // 期待结果:更新成功
new UpdateRecord(3, Propagation.REQUIRED, 2L, 2L, "--333", true)) // 期待结果:更新失败
));
return "redirect:/user/list.do";
}
// -------------------------------------------------- 以下由于是新开事务,因此都成功
@RequestMapping(value = "/requiresNewTransSucceed")
public String requiresNewTransSucceed() {
userService.multiUpdate(new LinkedList<UpdateRecord>(Arrays.asList(
new UpdateRecord(0, Propagation.REQUIRES_NEW, 1L, 1L, "--000", true), // 期待结果:更新成功
new UpdateRecord(1, Propagation.REQUIRES_NEW, 2L, 1L, "--111", true), // 期待结果:更新成功
new UpdateRecord(2, Propagation.REQUIRES_NEW, 1L, 2L, "--222", true), // 期待结果:更新成功
new UpdateRecord(3, Propagation.REQUIRES_NEW, 2L, 2L, "--333", true)) // 期待结果:更新成功
));
return "redirect:/user/list.do";
}
@RequestMapping(value = "/requiresNewTransFailedAt0")
public String requiresNewTransFailedAt0() {
userService.multiUpdate(new LinkedList<UpdateRecord>(Arrays.asList(
new UpdateRecord(0, Propagation.REQUIRES_NEW, 1L, 1L, "--000", false),// 期待结果:更新失败
new UpdateRecord(1, Propagation.REQUIRES_NEW, 2L, 1L, "--111", true), // 期待结果:更新成功
new UpdateRecord(2, Propagation.REQUIRES_NEW, 1L, 2L, "--222", true), // 期待结果:更新成功
new UpdateRecord(3, Propagation.REQUIRES_NEW, 2L, 2L, "--333", true)) // 期待结果:更新成功
));
return "redirect:/user/list.do";
}
@RequestMapping(value = "/requiresNewTransFailedAt1")
public String requiresNewTransFailedAt1() {
userService.multiUpdate(new LinkedList<UpdateRecord>(Arrays.asList(
new UpdateRecord(0, Propagation.REQUIRES_NEW, 1L, 1L, "--000", true), // 期待结果:更新失败,由于异常抛出
new UpdateRecord(1, Propagation.REQUIRES_NEW, 2L, 1L, "--111", false),// 期待结果:更新失败
new UpdateRecord(2, Propagation.REQUIRES_NEW, 1L, 2L, "--222", true), // 期待结果:更新成功
new UpdateRecord(3, Propagation.REQUIRES_NEW, 2L, 2L, "--333", true)) // 期待结果:更新成功
));
return "redirect:/user/list.do";
}
}
| [
"btpka3@163.com"
] | btpka3@163.com |
7b08f6d8a182f4be70bb2e5a8b370ae6cc76566f | 3220ededaa761760588966d6aab2b1cd1a94f1a7 | /SfQ/src/main/java/org/apache/camel/salesforce/dto/RecentlyViewed.java | efaf4138d68507bf69ef77901be9765b0114d26b | [] | no_license | cnduffield/OCPFuseSF | 25ba4383d19eaa99a2a61a9e514574c63f608bd2 | 4638cd1f4a02b0843a7560cf0171298b12b6330d | refs/heads/master | 2021-01-13T04:09:37.559426 | 2017-02-02T17:37:10 | 2017-02-02T17:37:10 | 78,051,686 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,849 | java | /*
* Salesforce DTO generated by camel-salesforce-maven-plugin
* Generated on: Fri Nov 11 19:02:42 ART 2016
*/
package org.apache.camel.salesforce.dto;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamConverter;
import org.apache.camel.component.salesforce.api.PicklistEnumConverter;
import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
import org.codehaus.jackson.annotate.JsonProperty;
/**
* Salesforce DTO for SObject RecentlyViewed
*/
@XStreamAlias("RecentlyViewed")
public class RecentlyViewed extends AbstractSObjectBase {
// LastName
private String LastName;
@JsonProperty("LastName")
public String getLastName() {
return this.LastName;
}
@JsonProperty("LastName")
public void setLastName(String LastName) {
this.LastName = LastName;
}
// FirstName
private String FirstName;
@JsonProperty("FirstName")
public String getFirstName() {
return this.FirstName;
}
@JsonProperty("FirstName")
public void setFirstName(String FirstName) {
this.FirstName = FirstName;
}
// Type
@XStreamConverter(PicklistEnumConverter.class)
private TypeEnum Type;
@JsonProperty("Type")
public TypeEnum getType() {
return this.Type;
}
@JsonProperty("Type")
public void setType(TypeEnum Type) {
this.Type = Type;
}
// Alias
private String Alias;
@JsonProperty("Alias")
public String getAlias() {
return this.Alias;
}
@JsonProperty("Alias")
public void setAlias(String Alias) {
this.Alias = Alias;
}
// UserRoleId
private String UserRoleId;
@JsonProperty("UserRoleId")
public String getUserRoleId() {
return this.UserRoleId;
}
@JsonProperty("UserRoleId")
public void setUserRoleId(String UserRoleId) {
this.UserRoleId = UserRoleId;
}
// RecordTypeId
private String RecordTypeId;
@JsonProperty("RecordTypeId")
public String getRecordTypeId() {
return this.RecordTypeId;
}
@JsonProperty("RecordTypeId")
public void setRecordTypeId(String RecordTypeId) {
this.RecordTypeId = RecordTypeId;
}
// IsActive
private Boolean IsActive;
@JsonProperty("IsActive")
public Boolean getIsActive() {
return this.IsActive;
}
@JsonProperty("IsActive")
public void setIsActive(Boolean IsActive) {
this.IsActive = IsActive;
}
// ProfileId
private String ProfileId;
@JsonProperty("ProfileId")
public String getProfileId() {
return this.ProfileId;
}
@JsonProperty("ProfileId")
public void setProfileId(String ProfileId) {
this.ProfileId = ProfileId;
}
// Title
private String Title;
@JsonProperty("Title")
public String getTitle() {
return this.Title;
}
@JsonProperty("Title")
public void setTitle(String Title) {
this.Title = Title;
}
// Email
private String Email;
@JsonProperty("Email")
public String getEmail() {
return this.Email;
}
@JsonProperty("Email")
public void setEmail(String Email) {
this.Email = Email;
}
// Phone
private String Phone;
@JsonProperty("Phone")
public String getPhone() {
return this.Phone;
}
@JsonProperty("Phone")
public void setPhone(String Phone) {
this.Phone = Phone;
}
// Language
@XStreamConverter(PicklistEnumConverter.class)
private LanguageEnum Language;
@JsonProperty("Language")
public LanguageEnum getLanguage() {
return this.Language;
}
@JsonProperty("Language")
public void setLanguage(LanguageEnum Language) {
this.Language = Language;
}
}
| [
"cnduffield@hotmail.com"
] | cnduffield@hotmail.com |
440cdd932460f19da3779ab9c2b4aecd82a78894 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project17/src/main/java/org/gradle/test/performance17_2/Production17_104.java | eca772475fb74452f20ccf1b5945197c2eb36797 | [] | no_license | gradle/performance-comparisons | b0d38db37c326e0ce271abebdb3c91769b860799 | e53dc7182fafcf9fedf07920cbbea8b40ee4eef4 | refs/heads/master | 2023-08-14T19:24:39.164276 | 2022-11-24T05:18:33 | 2022-11-24T05:18:33 | 80,121,268 | 17 | 15 | null | 2022-09-30T08:04:35 | 2017-01-26T14:25:33 | null | UTF-8 | Java | false | false | 305 | java | package org.gradle.test.performance17_2;
public class Production17_104 extends org.gradle.test.performance10_2.Production10_104 {
private final String property;
public Production17_104() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
| [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
e75656ba4810a8eaf598f54dfaee0f3a16a6ddb8 | 796ee4b352db7c510a80c20aeef3ef33a3c66a08 | /v1ch05/src/objectanalyzer/ObjectAnalyzerTest.java | 7ed3fed65883350856c0330ef5786133bda30934 | [] | no_license | aritrac/Refresher_Codes | 7830b416a24d56f0caf9c593ca2541d05e08b4a7 | 0319e8784f0f33711117f7cf4749ab8460961180 | refs/heads/master | 2021-03-20T07:24:31.809528 | 2020-03-15T06:13:01 | 2020-03-15T06:13:01 | 247,189,732 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 467 | java | package objectanalyzer;
import java.util.*;
/**
* This program uses reflection to spy on objects.
* @version 1.13 2018-03-16
* @author Cay Horstmann
*/
public class ObjectAnalyzerTest
{
public static void main(String[] args)
throws ReflectiveOperationException
{
var squares = new ArrayList<Integer>();
for (int i = 1; i <= 5; i++)
squares.add(i * i);
System.out.println(new ObjectAnalyzer().toString(squares));
}
}
| [
"aritrachatterjee2007@gmail.com"
] | aritrachatterjee2007@gmail.com |
e049bfc949b0ebe0985c3b6426271f4b9a0f4f2a | 5efbe1ce4035df0d4a7aa478ac37fa75aa68025c | /krvarma-android-samples/ExifInfo/src/com/varma/samples/exifinfo/PictureListActivity.java | 0e304623ce080672767bfe8ec0ce94eb25c0a141 | [] | no_license | dat0106/datkts0106 | 6ec70e6adb90ba36237d4225b5cba80fcbd30343 | 885c9bec5b5cd3c4d677d8d579cd91cf7fd6d2e5 | refs/heads/master | 2016-08-05T08:24:11.701355 | 2014-08-01T04:35:12 | 2014-08-01T04:35:59 | 15,329,353 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,835 | java | package com.varma.samples.exifinfo;
import android.app.ListActivity;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.provider.MediaStore;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;
public class PictureListActivity extends ListActivity {
private PictureCursorAdapter adapter = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Cursor pictures = getContentResolver().query(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI,null, null, null, null);
if(null != pictures)
{
pictures.moveToFirst();
adapter = new PictureCursorAdapter(this, R.layout.listitem, pictures);
setListAdapter(adapter);
}
}
@Override
protected void onListItemClick(ListView list, View view, int position, long id) {
super.onListItemClick(list, view, position, id);
String filepath = (String) view.getTag();
Intent intent = new Intent(this, ExifInfoActivity.class);
intent.putExtra(ExifInfoActivity.FILE_PATH_KEY, filepath);
startActivity(intent);
}
private class PictureCursorAdapter extends SimpleCursorAdapter{
public PictureCursorAdapter(Context context, int layout, Cursor c) {
super(context, layout, c,
new String[] { MediaStore.MediaColumns.DISPLAY_NAME, MediaStore.Images.ImageColumns.DATA, MediaStore.Images.ImageColumns.SIZE},
new int[] { R.id.displayname, R.id.path, R.id.size });
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
TextView title = (TextView)view.findViewById(R.id.displayname);
TextView path = (TextView)view.findViewById(R.id.path);
TextView size = (TextView)view.findViewById(R.id.size);
title.setText(cursor.getString(
cursor.getColumnIndex(MediaStore.MediaColumns.DISPLAY_NAME)));
path.setText(cursor.getString(
cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA)));
int sizeIndex = cursor.getColumnIndex(MediaStore.Images.ImageColumns.SIZE);
size.setText(android.text.format.Formatter.formatFileSize(PictureListActivity.this, cursor.getLong(sizeIndex)));
view.setTag(cursor.getString(cursor.getColumnIndex(MediaStore.MediaColumns.DATA)));
}
@Override
public View newView(Context context, Cursor cursor, ViewGroup parent) {
LayoutInflater inflater = LayoutInflater.from(context);
View v = inflater.inflate(R.layout.listitem, parent, false);
bindView(v, context, cursor);
return v;
}
}
} | [
"datkts0106@gmail.com@72380ea6-93d0-6362-9c75-ea5fc79de657"
] | datkts0106@gmail.com@72380ea6-93d0-6362-9c75-ea5fc79de657 |
6e32dd037eb5d3fd5fe5e19e96e9fbf5dad994dc | 56319e53f4155b0f0ae4ab249b1d3249fc8ddd98 | /apache-tomcat-8.0.39/converted/org/apache/tomcat/util/collections/MainForTestSynchronizedStack_testPopEmpty.java | fe63f94a47b4f06a31febf443850129821ba5f1c | [] | no_license | SnowOnion/J2mConvertedTestcases | 2f904e2f2754f859f6125f248d3672eb1a70abd1 | e74b0e4c08f12e5effeeb8581670156ace42640a | refs/heads/master | 2021-01-11T19:01:42.207334 | 2017-01-19T12:22:22 | 2017-01-19T12:22:22 | 79,295,183 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 453 | java | package org.apache.tomcat.util.collections;
import org.apache.tomcat.util.collections.TestSynchronizedStack;
public class MainForTestSynchronizedStack_testPopEmpty {
public static void main(String[] args) {
try {
TestSynchronizedStack objTestSynchronizedStack = new TestSynchronizedStack();
objTestSynchronizedStack.testPopEmpty();
} catch (Throwable e) {
e.printStackTrace();
}
}
}
| [
"snowonionlee@gmail.com"
] | snowonionlee@gmail.com |
570dec8a33b149cf3c31f9e8bd3d516e7d86ae6e | 6290cb2ec37c198ce3a57a39737f211bcf159f52 | /org/bouncycastle/asn1/x509/X509Extensions.java | 55dd8021e90d0c8ef3bf94762c054dca4f76ebb7 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | CXRAndCN/bcprov-jdk15on-lite | 009e0dc41e0800e0215fb513c3b8e043fadd1567 | f242e965472b0cb68ea542c93f0fe0eb5b5d03be | refs/heads/master | 2022-01-09T16:07:08.678026 | 2019-06-26T09:02:57 | 2019-06-26T09:02:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,120 | java | package org.bouncycastle.asn1.x509;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Vector;
import org.bouncycastle.asn1.ASN1Boolean;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.ASN1OctetString;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.ASN1TaggedObject;
import org.bouncycastle.asn1.DERSequence;
/**
* deprecated use {@link Extensions}
*/
public class X509Extensions
extends ASN1Object
{
/**
* NoRevAvail extension in attribute certificates.
* deprecated use X509Extension value.
*/
public static final ASN1ObjectIdentifier NoRevAvail = new ASN1ObjectIdentifier("2.5.29.56");
private Hashtable extensions = new Hashtable();
private Vector ordering = new Vector();
public static X509Extensions getInstance(
ASN1TaggedObject obj,
boolean explicit)
{
return getInstance(ASN1Sequence.getInstance(obj, explicit));
}
public static X509Extensions getInstance(
Object obj)
{
if (obj == null || obj instanceof X509Extensions)
{
return (X509Extensions)obj;
}
if (obj instanceof ASN1Sequence)
{
return new X509Extensions((ASN1Sequence)obj);
}
if (obj instanceof Extensions)
{
return new X509Extensions((ASN1Sequence)((Extensions)obj).toASN1Primitive());
}
if (obj instanceof ASN1TaggedObject)
{
return getInstance(((ASN1TaggedObject)obj).getObject());
}
throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
}
/**
* Constructor from ASN1Sequence.
*
* the extensions are a list of constructed sequences, either with (OID, OctetString) or (OID, Boolean, OctetString)
*/
public X509Extensions(
ASN1Sequence seq)
{
Enumeration e = seq.getObjects();
while (e.hasMoreElements())
{
ASN1Sequence s = ASN1Sequence.getInstance(e.nextElement());
if (s.size() == 3)
{
extensions.put(s.getObjectAt(0), new X509Extension(ASN1Boolean.getInstance(s.getObjectAt(1)), ASN1OctetString.getInstance(s.getObjectAt(2))));
}
else if (s.size() == 2)
{
extensions.put(s.getObjectAt(0), new X509Extension(false, ASN1OctetString.getInstance(s.getObjectAt(1))));
}
else
{
throw new IllegalArgumentException("Bad sequence size: " + s.size());
}
ordering.addElement(s.getObjectAt(0));
}
}
/**
* constructor from a table of extensions.
* <p>
* it's is assumed the table contains OID/String pairs.
*/
public X509Extensions(
Hashtable extensions)
{
this(null, extensions);
}
/**
* Constructor from a table of extensions with ordering.
* <p>
* It's is assumed the table contains OID/String pairs.
* deprecated use Extensions
*/
public X509Extensions(
Vector ordering,
Hashtable extensions)
{
Enumeration e;
if (ordering == null)
{
e = extensions.keys();
}
else
{
e = ordering.elements();
}
while (e.hasMoreElements())
{
this.ordering.addElement(ASN1ObjectIdentifier.getInstance(e.nextElement()));
}
e = this.ordering.elements();
while (e.hasMoreElements())
{
ASN1ObjectIdentifier oid = ASN1ObjectIdentifier.getInstance(e.nextElement());
X509Extension ext = (X509Extension)extensions.get(oid);
this.extensions.put(oid, ext);
}
}
/**
* return an Enumeration of the extension field's object ids.
*/
public Enumeration oids()
{
return ordering.elements();
}
/**
* return the extension represented by the object identifier
* passed in.
*
* @return the extension if it's present, null otherwise.
*/
public X509Extension getExtension(
ASN1ObjectIdentifier oid)
{
return (X509Extension)extensions.get(oid);
}
/**
* <pre>
* Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
*
* Extension ::= SEQUENCE {
* extnId EXTENSION.&id ({ExtensionSet}),
* critical BOOLEAN DEFAULT FALSE,
* extnValue OCTET STRING }
* </pre>
*/
public ASN1Primitive toASN1Primitive()
{
ASN1EncodableVector vec = new ASN1EncodableVector();
Enumeration e = ordering.elements();
while (e.hasMoreElements())
{
ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)e.nextElement();
X509Extension ext = (X509Extension)extensions.get(oid);
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(oid);
if (ext.isCritical())
{
v.add(ASN1Boolean.TRUE);
}
v.add(ext.getValue());
vec.add(new DERSequence(v));
}
return new DERSequence(vec);
}
public boolean equivalent(
X509Extensions other)
{
if (extensions.size() != other.extensions.size())
{
return false;
}
Enumeration e1 = extensions.keys();
while (e1.hasMoreElements())
{
Object key = e1.nextElement();
if (!extensions.get(key).equals(other.extensions.get(key)))
{
return false;
}
}
return true;
}
public ASN1ObjectIdentifier[] getExtensionOIDs()
{
return toOidArray(ordering);
}
public ASN1ObjectIdentifier[] getNonCriticalExtensionOIDs()
{
return getExtensionOIDs(false);
}
public ASN1ObjectIdentifier[] getCriticalExtensionOIDs()
{
return getExtensionOIDs(true);
}
private ASN1ObjectIdentifier[] getExtensionOIDs(boolean isCritical)
{
Vector oidVec = new Vector();
for (int i = 0; i != ordering.size(); i++)
{
Object oid = ordering.elementAt(i);
if (((X509Extension)extensions.get(oid)).isCritical() == isCritical)
{
oidVec.addElement(oid);
}
}
return toOidArray(oidVec);
}
private ASN1ObjectIdentifier[] toOidArray(Vector oidVec)
{
ASN1ObjectIdentifier[] oids = new ASN1ObjectIdentifier[oidVec.size()];
for (int i = 0; i != oids.length; i++)
{
oids[i] = (ASN1ObjectIdentifier)oidVec.elementAt(i);
}
return oids;
}
}
| [
"wkgcass@hotmail.com"
] | wkgcass@hotmail.com |
5046b657ceaae3ccf3c3d103b3f6b7939811a3f5 | 0c38cb15f368b4cef535dea2a5f20c219c4ec545 | /core/src/main/java/org/trimou/lambda/SpecCompliantLambda.java | f74e5e9222a0da311cc35810f120127fe2514e85 | [
"Apache-2.0"
] | permissive | trimou/trimou | f34d5c3e2c5db27cb3ad3c1e69e8a3cdb3b7579a | 4a017fd9af2cf33953078c7b90058d79847549ce | refs/heads/master | 2023-08-29T20:31:40.221523 | 2023-07-10T08:55:21 | 2023-07-10T08:55:21 | 10,064,418 | 62 | 21 | Apache-2.0 | 2023-07-10T08:54:21 | 2013-05-14T20:39:22 | Java | UTF-8 | Java | false | false | 1,089 | java | /*
* Copyright 2013 Martin Kouba
*
* 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.trimou.lambda;
/**
* A spec compliant {@link Lambda}.
* <p>
* Since 2.0 this abstract class is not needed anymore -
* {@link InputType#LITERAL} is the default and the return value is
* interpolated.
*
* @author Martin Kouba
* @see Lambda
* @deprecated This class will be removed in the next minor version.
*/
public abstract class SpecCompliantLambda extends InputLiteralLambda {
@Override
public boolean isReturnValueInterpolated() {
return true;
}
}
| [
"mkouba@redhat.com"
] | mkouba@redhat.com |
b2b7a4fd2085f7db16c499588868b38b73ba646a | fff8f77f810bbd5fb6b4e5f7a654568fd9d3098d | /src/main/java/com/google/android/gms/internal/measurement/zzhj.java | b53ff1a4a294e716f1d6a75a32105d010d00bda7 | [] | no_license | TL148/gorkiy | b6ac8772587e9e643d939ea399bf5e7a42e89f46 | da8fbd017277cf72020c8c800326954bb1a0cee3 | refs/heads/master | 2021-05-21T08:24:39.286900 | 2020-04-03T02:57:49 | 2020-04-03T02:57:49 | 252,618,229 | 0 | 0 | null | 2020-04-03T02:54:39 | 2020-04-03T02:54:39 | null | UTF-8 | Java | false | false | 624 | java | package com.google.android.gms.internal.measurement;
import java.util.Iterator;
import java.util.Map;
/* compiled from: com.google.android.gms:play-services-measurement-base@@17.2.3 */
final class zzhj extends zzhp {
private final /* synthetic */ zzhi zza;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
private zzhj(zzhi zzhi) {
super(zzhi, null);
this.zza = zzhi;
}
public final Iterator<Map.Entry<K, V>> iterator() {
return new zzhk(this.zza, null);
}
/* synthetic */ zzhj(zzhi zzhi, zzhh zzhh) {
this(zzhi);
}
}
| [
"itaysontesterlab@gmail.com"
] | itaysontesterlab@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.