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
703bc20699795373364d0110d84e4fddfa6e7a26
c9b8db6ceff0be3420542d0067854dea1a1e7b12
/web/KoreanAir/src/main/java/com/ke/css/cimp/fwb/fwb13/Rule_SHIPPER_STATE_PROVINCE.java
82eb1e141df32f7b18f34236d3710ede4486ab2a
[ "Apache-2.0" ]
permissive
ganzijo/portfolio
12ae1531bd0f4d554c1fcfa7d68953d1c79cdf9a
a31834b23308be7b3a992451ab8140bef5a61728
refs/heads/master
2021-04-15T09:25:07.189213
2018-03-22T12:11:00
2018-03-22T12:11:00
126,326,291
0
0
null
null
null
null
UTF-8
Java
false
false
2,250
java
package com.ke.css.cimp.fwb.fwb13; /* ----------------------------------------------------------------------------- * Rule_SHIPPER_STATE_PROVINCE.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.5 * Produced : Tue Mar 06 10:35:29 KST 2018 * * ----------------------------------------------------------------------------- */ import java.util.ArrayList; final public class Rule_SHIPPER_STATE_PROVINCE extends Rule { public Rule_SHIPPER_STATE_PROVINCE(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_SHIPPER_STATE_PROVINCE parse(ParserContext context) { context.push("SHIPPER_STATE_PROVINCE"); boolean parsed = true; int s0 = context.index; ParserAlternative a0 = new ParserAlternative(s0); ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); parsed = false; { int s1 = context.index; ParserAlternative a1 = new ParserAlternative(s1); parsed = true; if (parsed) { boolean f1 = true; @SuppressWarnings("unused") int c1 = 0; for (int i1 = 0; i1 < 9 && f1; i1++) { Rule rule = Rule_Typ_Text.parse(context); if ((f1 = rule != null)) { a1.add(rule, context.index); c1++; } } parsed = true; } if (parsed) { as1.add(a1); } context.index = s1; } ParserAlternative b = ParserAlternative.getBest(as1); parsed = b != null; if (parsed) { a0.add(b.rules, b.end); context.index = b.end; } Rule rule = null; if (parsed) { rule = new Rule_SHIPPER_STATE_PROVINCE(context.text.substring(a0.start, a0.end), a0.rules); } else { context.index = s0; } context.pop("SHIPPER_STATE_PROVINCE", parsed); return (Rule_SHIPPER_STATE_PROVINCE)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "whdnfka111@gmail.com" ]
whdnfka111@gmail.com
a476787dad0df7b4d4c64de2fcb4874d32a77f69
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
/codebase/dataset/t1/2275_frag2.java
3f0f0380823148b84ed2423e3c8db48b93135772
[]
no_license
rayhan-ferdous/code2vec
14268adaf9022d140a47a88129634398cd23cf8f
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
refs/heads/master
2022-03-09T08:40:18.035781
2022-02-27T23:57:44
2022-02-27T23:57:44
140,347,552
0
1
null
null
null
null
UTF-8
Java
false
false
538
java
public org.omg.CORBA.portable.OutputStream _invoke(String method, org.omg.CORBA.portable.InputStream _input, org.omg.CORBA.portable.ResponseHandler handler) throws org.omg.CORBA.SystemException { org.omg.CORBA.portable.OutputStream _out = null; java.lang.Integer opsIndex = (java.lang.Integer) m_opsHash.get(method); if (null == opsIndex) throw new org.omg.CORBA.BAD_OPERATION(method + " not found"); switch(opsIndex.intValue()) { case 0: { try {
[ "aaponcseku@gmail.com" ]
aaponcseku@gmail.com
3d3ad013341382b4d9fc76659b4ef6ec14be426d
b98514eaefbc30b7b573922bd09887162d31aedd
/app/src/main/java/cn/flyrise/feep/collaboration/matter/MatterListFragment.java
40f70d15ef306667500260729805c311e624b5e0
[]
no_license
mofangwan23/LimsOA
c7a6c664531fcd8b950aed62d02f8a5fe6ca233c
37da27081432a719fddd1a7784f9a2f29274a083
refs/heads/main
2023-05-29T22:25:44.839145
2021-06-18T09:41:17
2021-06-18T09:41:17
363,003,883
3
2
null
null
null
null
UTF-8
Java
false
false
7,069
java
package cn.flyrise.feep.collaboration.matter; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.support.v4.app.Fragment; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import cn.flyrise.android.protocol.entity.AssociationKnowledgeListRequest; import cn.flyrise.android.protocol.entity.AssociationListResponse; import cn.flyrise.android.protocol.entity.MatterListRequest; import cn.flyrise.feep.R; import cn.flyrise.feep.collaboration.matter.adpater.MatterListAdapter; import cn.flyrise.feep.collaboration.matter.model.DirectoryNode; import cn.flyrise.feep.collaboration.matter.model.Matter; import cn.flyrise.feep.collaboration.matter.model.MatterPageInfo; import cn.flyrise.feep.core.base.views.LoadMoreRecyclerView; import cn.flyrise.feep.core.common.utils.CommonUtil; import cn.flyrise.feep.core.network.FEHttpClient; import cn.flyrise.feep.core.network.RepositoryException; import cn.flyrise.feep.core.network.callback.ResponseCallback; import java.util.List; /** * Created by klc on 2017/5/12. */ public class MatterListFragment extends Fragment { private boolean isLoading; private static final int PAGE_SIZE = 20; private LoadMoreRecyclerView mRecyclerView; private SwipeRefreshLayout mSwipeRefreshLayout; private Handler mHandler = new Handler(Looper.getMainLooper()); private MatterPageInfo mPageInfo; private int mMatterType; private DirectoryNode node; private List<Matter> mSelectedAssociations; private MatterListAdapter mAdapter; public static MatterListFragment newInstance(int matterType) { Bundle args = new Bundle(); MatterListFragment fragment = new MatterListFragment(); fragment.setMatterType(matterType); fragment.setArguments(args); return fragment; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View contentView = inflater.inflate(R.layout.fragment_matter_list, container, false); initViewsAndListener(contentView); return contentView; } public void setMatterType(int matterType) { this.mMatterType = matterType; } public void setKnowledgePageInfo(DirectoryNode node, MatterPageInfo pageInfo) { this.node = node; this.mPageInfo = pageInfo; if (pageInfo.currentPage != 0) { mAdapter.setAssociationList(mPageInfo.dataList); } else { showLoading(); requestList(++pageInfo.currentPage); } } private void initViewsAndListener(View contentView) { View emptyView = contentView.findViewById(R.id.ivEmptyView); if (mMatterType == MatterListActivity.MATTER_KNOWLEDGE) { TextView tvHint = emptyView.findViewById(R.id.empty_hint); tvHint.setText(R.string.common_empty_file_hint); } mSwipeRefreshLayout = (SwipeRefreshLayout) contentView.findViewById(R.id.swipeRefreshLayout); mSwipeRefreshLayout.setColorSchemeResources(R.color.login_btn_defulit); mRecyclerView = (LoadMoreRecyclerView) contentView.findViewById(R.id.recyclerView); mRecyclerView.setItemAnimator(new DefaultItemAnimator()); mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); mRecyclerView.setAdapter(mAdapter = new MatterListAdapter()); mAdapter.setSelectedAssociations(mSelectedAssociations); mAdapter.setEmptyView(emptyView); mAdapter.setOnItemClickListener(new MatterListAdapter.OnAssociationCheckChangeListener() { @Override public void onAssociationAdd(Matter association) { MatterListActivity activity = (MatterListActivity) getActivity(); activity.addSelectedAssociation(association); } @Override public void onAssociationDelete(Matter deletedAssociation) { MatterListActivity activity = (MatterListActivity) getActivity(); activity.removeSelectedAssociation(deletedAssociation); } }); mRecyclerView.setOnLoadMoreListener(() -> { if (!isLoading && hasMoreData()) { isLoading = true; requestList(++mPageInfo.currentPage); } else { mAdapter.removeFooterView(); } }); mSwipeRefreshLayout.setOnRefreshListener(() -> { if (mPageInfo != null) { requestList(mPageInfo.currentPage = 1); } else { mSwipeRefreshLayout.setRefreshing(false); } }); if (mMatterType != MatterListActivity.MATTER_KNOWLEDGE) { showLoading(); mPageInfo = new MatterPageInfo(); requestList(mPageInfo.currentPage = 1); } } public void showLoading() { mSwipeRefreshLayout.post(() -> mSwipeRefreshLayout.setRefreshing(true)); } public boolean hasMoreData() { return mPageInfo.hasMore; } public void deleteAssociation(Matter association) { mAdapter.deleteSelectedAssociation(association); } public void addAssociation(Matter association) { mAdapter.addSelectedAssociation(association); } public void setSelectedAssociations(List<Matter> associations) { this.mSelectedAssociations = associations; } public void notifyDataSetChange() { this.mAdapter.notifyDataSetChanged(); } private void requestList(int page) { if (mMatterType == MatterListActivity.MATTER_KNOWLEDGE) { AssociationKnowledgeListRequest request = new AssociationKnowledgeListRequest(node.id, node.attr, "", String.valueOf(mPageInfo.currentPage), PAGE_SIZE + ""); FEHttpClient.getInstance().post(request, responseCallback); } else { MatterListRequest request = new MatterListRequest("", page, PAGE_SIZE, mMatterType); FEHttpClient.getInstance().post(request, responseCallback); } } public ResponseCallback responseCallback = new ResponseCallback<AssociationListResponse>() { @Override public void onCompleted(AssociationListResponse response) { isLoading = false; mHandler.postDelayed(() -> mSwipeRefreshLayout.setRefreshing(false), 1000); AssociationListResponse.Result result = response.getResult(); if (result != null) { mPageInfo.hasMore = result.getTotalPage() > mPageInfo.currentPage; List<Matter> associationList = result.getAssociationList(); if (CommonUtil.nonEmptyList(associationList)) { for (int i = 0, n = associationList.size(); i < n; i++) { associationList.get(i).matterType = mMatterType; } } if (mPageInfo.currentPage == 1) { mAdapter.setAssociationList(associationList); mPageInfo.dataList = associationList; } else { mAdapter.addAssociationList(associationList); } if (hasMoreData()) { mAdapter.setFooterView(cn.flyrise.feep.core.R.layout.core_refresh_bottom_loading); } else { mAdapter.removeFooterView(); } } } @Override public void onFailure(RepositoryException repositoryException) { mRecyclerView.scrollLastItem2Bottom(mAdapter); isLoading = false; mHandler.postDelayed(() -> mSwipeRefreshLayout.setRefreshing(false), 1000); } }; @Override public void onDestroy() { super.onDestroy(); if (mHandler != null) { mHandler.removeCallbacksAndMessages(null); } } }
[ "mofangwan23@gmail.com" ]
mofangwan23@gmail.com
687fed4c57eb65e2cd997bf0bdd0a9769abc8f32
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/24/24_4eb2fea10ec0985554499c054920d234eb4404f7/MediatedBannerAdViewController/24_4eb2fea10ec0985554499c054920d234eb4404f7_MediatedBannerAdViewController_t.java
162fee4686794c253cf254562bf5e5e50f30cc5d
[]
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,168
java
/* * Copyright 2013 APPNEXUS 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 com.appnexus.opensdk; import com.appnexus.opensdk.utils.Clog; import android.app.Activity; import android.view.View; public class MediatedBannerAdViewController implements Displayable { AdView owner; int width; int height; String uid; String className; String param; Class<?> c; MediatedBannerAdView mAV; View placeableView; public MediatedBannerAdViewController(AdView owner, AdResponse response) { width = response.getWidth(); height = response.getHeight(); uid = response.getMediatedUID(); className = response.getMediatedViewClassName(); param = response.getParameter(); try { c = Class.forName(className); } catch (ClassNotFoundException e) { Clog.e(Clog.mediationLogTag, Clog.getString(R.string.class_not_found_exception)); return; } try { mAV = (MediatedBannerAdView) c.newInstance(); } catch (InstantiationException e) { Clog.e(Clog.mediationLogTag, Clog.getString(R.string.instantiation_exception)); return; } catch (IllegalAccessException e) { Clog.e(Clog.mediationLogTag, Clog.getString(R.string.illegal_access_exception)); return; } placeableView = mAV.requestAd((Activity)owner.getContext(), param, uid, width, height, owner); } @Override public View getView() { return placeableView; } @Override public boolean failed() { // TODO Auto-generated method stub // Will spawn an ad request with the fail url and await further instruction return false; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
24204775c5d8616f8aefb9e7c7d785493a9237ee
e4178cd5b13e31e35d07667658a7e7cc5e7a884d
/src/lbs/goodplace/com/View/main/MainIHaveView.java
c9b50848e5cb9e80a94ed34c954e3adc06adf5da
[]
no_license
itman83/ShopMall-Android
7285d14b6215a0f53bdf4fafc57f7e5b20bf0adf
ee52fdab6a24379180bc762ae1fbf6199c7cb897
refs/heads/master
2020-12-31T06:22:54.926454
2014-01-23T12:09:57
2014-01-23T12:10:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,020
java
package lbs.goodplace.com.View.main; import java.util.ArrayList; import java.util.List; import lbs.goodplace.com.R; import lbs.goodplace.com.controls.RefreshListView; import lbs.goodplace.com.controls.RefreshListView.OnRefreshListener; import android.content.Context; import android.graphics.Color; import android.view.LayoutInflater; import android.widget.ArrayAdapter; import android.widget.LinearLayout; public class MainIHaveView extends LinearLayout { private Context mContext; private RefreshListView mListview; public MainIHaveView(final Context context) { super(context); this.mContext = context; LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); inflater.inflate(R.layout.mainihave_view, this); mListview = (RefreshListView)findViewById(R.id.ihaveListview); mListview.setCacheColorHint(Color.WHITE) ; //一定要SetAdapter先会有“下拉刷新”果个头(set个空的Adapter都得) mListview.setAdapter(new ArrayAdapter<String>(mContext, android.R.layout.simple_expandable_list_item_1,getData())); mListview.setonRefreshListener(new OnRefreshListener() { @Override public void onRefreshData() { initData(); } @Override public void loadNextPageData() { // TODO Auto-generated method stub } }); // setListviewHead(); } /** * 控制列表头 */ private void setListviewHead(){ //列表头 if (mListview.getCount() > 1) { //1是因为有HEADVIEW mListview.hideHeadView(); } else { mListview.setHeadViewVisible(); } } /** * 初始化 按钮数据 */ private void initData() { } private List<String> getData(){ List<String> data = new ArrayList<String>(); data.add("测试数据1"); data.add("测试数据2"); data.add("测试数据3"); data.add("测试数据4"); return data; } }
[ "Kingsleyyau@gmail.com" ]
Kingsleyyau@gmail.com
b998e580ddbcfa62fbeea233c8eb3cdd172eb113
c454a46ca3831dd5df13ae6a3ff6b31bd0dd06de
/workspace/02-ServiceBuilder/02-ServiceBuilder-api/src/main/java/com/liferay/curso/service/BarService.java
25363127c43c71a1237da50e5cb8e08043420d44
[]
no_license
victorherrerocazurro/CursoLiferayNalandaJulio2018
d44f75414bde4c8e358b353c04ef40c209e52c33
e5c5bca170d789a6d8ee7da1fa48443d427fdc31
refs/heads/master
2020-03-23T22:08:56.829387
2018-07-26T11:59:29
2018-07-26T11:59:29
142,156,277
0
0
null
null
null
null
UTF-8
Java
false
false
2,391
java
/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.liferay.curso.service; import aQute.bnd.annotation.ProviderType; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.kernel.jsonwebservice.JSONWebService; import com.liferay.portal.kernel.security.access.control.AccessControlled; import com.liferay.portal.kernel.service.BaseService; import com.liferay.portal.kernel.spring.osgi.OSGiBeanProperties; import com.liferay.portal.kernel.transaction.Isolation; import com.liferay.portal.kernel.transaction.Transactional; /** * Provides the remote service interface for Bar. Methods of this * service are expected to have security checks based on the propagated JAAS * credentials because this service can be accessed remotely. * * @author Brian Wing Shun Chan * @see BarServiceUtil * @see com.liferay.curso.service.base.BarServiceBaseImpl * @see com.liferay.curso.service.impl.BarServiceImpl * @generated */ @AccessControlled @JSONWebService @OSGiBeanProperties(property = { "json.web.service.context.name=foo", "json.web.service.context.path=Bar"}, service = BarService.class) @ProviderType @Transactional(isolation = Isolation.PORTAL, rollbackFor = { PortalException.class, SystemException.class}) public interface BarService extends BaseService { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this interface directly. Always use {@link BarServiceUtil} to access the bar remote service. Add custom service methods to {@link com.liferay.curso.service.impl.BarServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. */ /** * Returns the OSGi service identifier. * * @return the OSGi service identifier */ public java.lang.String getOSGiServiceIdentifier(); }
[ "victorherrerocazurro@gmail.com" ]
victorherrerocazurro@gmail.com
872ef75c41e4586481f8469d1a760dfb48f12ce1
7400115347e23e5da7e467360c248f72e572d628
/gomint-api/src/main/java/io/gomint/world/block/BlockWoodenSlab.java
c23ea34941f728834f125e356160decafdeca304
[ "BSD-3-Clause" ]
permissive
hanbule/GoMint
44eaf0ec20ff0eeaaf757de9d6540de786deead9
a5a5b937d145598e59febdb2cca0fe2eb58dd1ee
refs/heads/master
2022-12-15T14:35:23.310316
2020-08-22T13:40:46
2020-08-22T13:40:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
574
java
/* * Copyright (c) 2018 Gomint team * * This code is licensed under the BSD license found in the * LICENSE file in the root directory of this source tree. */ package io.gomint.world.block; import io.gomint.world.block.data.LogType; /** * @author geNAZt * @version 1.0 */ public interface BlockWoodenSlab extends BlockSlab { /** * Get the type of wood * * @return type of wood */ LogType getWoodType(); /** * Set the type of wood * * @param logType for this block */ void setWoodType( LogType logType); }
[ "fabian.fassbender42@googlemail.com" ]
fabian.fassbender42@googlemail.com
c9b994642ec47aa518595eb68c5af65c0b9f0371
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/protocal/C35972w.java
7f1310a365dd136da58a4ded9d8423fceae03160
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,092
java
package com.tencent.p177mm.protocal; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.p177mm.protocal.C4836l.C4832b; import com.tencent.p177mm.protocal.C4836l.C4833c; import com.tencent.p177mm.protocal.C4836l.C4834d; import com.tencent.p177mm.protocal.C4836l.C4835e; import com.tencent.p177mm.protocal.protobuf.bwd; import com.tencent.p177mm.protocal.protobuf.bwe; import org.xwalk.core.XWalkCoreWrapper; /* renamed from: com.tencent.mm.protocal.w */ public final class C35972w { /* renamed from: com.tencent.mm.protocal.w$a */ public static class C23477a extends C4834d implements C4832b { public bwd vyK = new bwd(); public C23477a() { AppMethodBeat.m2504i(80000); AppMethodBeat.m2505o(80000); } /* renamed from: ZT */ public final byte[] mo5742ZT() { AppMethodBeat.m2504i(XWalkCoreWrapper.INVOKE_RUNTIME_ID_CONTEXT_CHANGED); this.vyK.setBaseRequest(C4836l.m7194a(this)); byte[] toByteArray = this.vyK.toByteArray(); AppMethodBeat.m2505o(XWalkCoreWrapper.INVOKE_RUNTIME_ID_CONTEXT_CHANGED); return toByteArray; } public final int getCmdId() { return 42; } /* renamed from: ZU */ public final int mo5743ZU() { return 131; } } /* renamed from: com.tencent.mm.protocal.w$b */ public static class C30257b extends C4835e implements C4833c { public bwe vyL = new bwe(); public C30257b() { AppMethodBeat.m2504i(80002); AppMethodBeat.m2505o(80002); } /* renamed from: P */ public final int mo5744P(byte[] bArr) { AppMethodBeat.m2504i(XWalkCoreWrapper.INVOKE_RUNTIME_ID_HAS_FEATURE); this.vyL = (bwe) new bwe().parseFrom(bArr); C4836l.m7195a(this, this.vyL.getBaseResponse()); int i = this.vyL.getBaseResponse().Ret; AppMethodBeat.m2505o(XWalkCoreWrapper.INVOKE_RUNTIME_ID_HAS_FEATURE); return i; } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
69b7afb4b4b6f5d5693efc3810851445ac07cd6f
949bfdb25752857abe8e919915d305b1bc936d44
/haox-kerb/kerb-client/src/main/java/org/apache/kerberos/kerb/client/preauth/token/TokenContext.java
cb3f3d4190f1b441223ec6d749d5ebd0e31f6a95
[ "Apache-2.0" ]
permissive
deepika087/haox
91293c8917629f860b7af4981b937d76131cf6a4
a8d6b62142e169d23d0c308ce2728e614d3258c1
refs/heads/master
2021-07-20T21:13:13.873458
2017-10-28T23:34:30
2017-10-28T23:34:30
108,691,180
0
0
null
2017-10-28T23:21:36
2017-10-28T23:21:36
null
UTF-8
Java
false
false
196
java
package org.apache.kerberos.kerb.client.preauth.token; import org.haox.token.KerbToken; public class TokenContext { public boolean usingIdToken = true; public KerbToken token = null; }
[ "drankye@gmail.com" ]
drankye@gmail.com
d69a384069a0b1afe5bda92387fb2a8b6964ea75
a28e617ffcf07a384ea65d5c64575ad2f28c593b
/extensions/proxy/src/main/java/uk/co/tfd/sm/proxy/InputStreamHolder.java
217088f8f641bc805181a38e4552807d6529d19e
[ "Apache-2.0" ]
permissive
danjung/sparsemapcontent
63938f9027bf5fb6c57b11bb95e1ffa22deeee20
ef66f954e19bee75754192961b93b2a9163dbf54
refs/heads/master
2021-01-16T17:02:24.599630
2012-06-21T21:47:07
2012-06-21T21:47:07
4,388,989
1
0
null
null
null
null
UTF-8
Java
false
false
173
java
package uk.co.tfd.sm.proxy; import java.io.InputStream; public interface InputStreamHolder { InputStream getStream(); String getMimeType(); String getFileName(); }
[ "ieb@tfd.co.uk" ]
ieb@tfd.co.uk
3915298fd779de7107de123f97225dc7e2dbfc48
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_7444ab7fab5f0a8ec33a7c6b4730d3274acfe6b2/DebugInfo/2_7444ab7fab5f0a8ec33a7c6b4730d3274acfe6b2_DebugInfo_t.java
c6047e0af3f0427be5c9db97d6e431394e322f6d
[]
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
580
java
package edu.wpi.first.wpilibj.templates.debugging; /** * This is an abstract DebugInfo class, use various other classes in the * debugging package if you want to create one of these. * * @author daboross */ public abstract class DebugInfo extends DebugOutput { protected abstract String key(); protected abstract String message(); protected abstract boolean isConsole(); protected abstract boolean isDashboard(); protected abstract int debugLevel(); protected void debug() { RobotDebugger.pushInfo(this); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
07846ae1c713de98be9b775d7d83a3ff4111f9d0
6b1bd439c4146dc2545cb53e0ee612f7393b7c89
/RenuGit/CardShuffler/src/main/java/com/shuffler/service/ShufflerImplementation1.java
2c84aa4cdc9cd2c4df8adebde9e893d4c6c75d2a
[]
no_license
krishh13/CustomerPortal
939caeb886f6829508d190a744b4448d69d88c7e
acfc465dd3eaef22b9af24fef92f917ce000bb76
refs/heads/master
2020-04-04T06:53:06.424976
2018-11-01T18:55:29
2018-11-01T18:55:29
155,760,390
0
0
null
null
null
null
UTF-8
Java
false
false
317
java
package com.shuffler.service; import java.util.Collections; import java.util.List; import org.springframework.stereotype.Component; @Component public class ShufflerImplementation1 implements Shuffler { @Override public List<String> shuffle(List<String> list) { Collections.shuffle(list); return list; } }
[ "reddygari.saikrishna@gmail.com" ]
reddygari.saikrishna@gmail.com
d9c03aa1acadf9ff3d248a538bd7baa82f66e722
7c588e2c0580263ed0250a1bf1a48da5da9284b9
/app/src/main/java/com/example/jh/testmvpplugin/register/RegisterActivity.java
667fbee85d15e3a9c5ba036f54befb7a91648cb7
[]
no_license
jinhuizxc/TestMVPPlugin
25fabe830722202121500624081de8162e367f61
892dc3c2394f778cd91468a30560baffbef56f16
refs/heads/master
2021-01-20T03:35:01.605804
2017-04-27T05:48:23
2017-04-27T05:48:23
89,560,409
0
0
null
null
null
null
UTF-8
Java
false
false
292
java
package com.example.jh.testmvpplugin.register; import com.example.jh.testmvpplugin.mvp.MVPBaseActivity; /** * MVPPlugin * 邮箱 784787081@qq.com */ public class RegisterActivity extends MVPBaseActivity<RegisterContract.View, RegisterPresenter> implements RegisterContract.View { }
[ "hui.jin@boatchina.net" ]
hui.jin@boatchina.net
32d3050fe311788af55c85011a717103a9fca886
d6ff89ae061592fee66873a62834409b9b096bcc
/mini-pms-24-b-client/app/src/main/java/com/eomcs/pms/dao/mariadb/ProjectDaoImpl.java
bfc192cc23f885ddc6fd70c3745942727bc5cc6c
[]
no_license
eomcs/eomcs-java-project-2021
a2f7dbffc78b2112769a2c8a0a29eccf6184a040
5a592d4e95c302b2a0da98ef10f3cb6c70511464
refs/heads/master
2023-06-12T20:13:09.070353
2021-07-08T07:01:06
2021-07-08T07:01:06
314,989,117
3
4
null
null
null
null
UTF-8
Java
false
false
3,336
java
package com.eomcs.pms.dao.mariadb; import java.util.HashMap; import java.util.List; import org.apache.ibatis.session.SqlSession; import com.eomcs.pms.dao.ProjectDao; import com.eomcs.pms.domain.Member; import com.eomcs.pms.domain.Project; public class ProjectDaoImpl implements ProjectDao { SqlSession sqlSession; public ProjectDaoImpl(SqlSession sqlSession) throws Exception { this.sqlSession = sqlSession; } @Override public int insert(Project project) throws Exception { // 1) 프로젝트 정보를 입력한다. int count = sqlSession.insert("ProjectMapper.insert", project); // 2) 프로젝트의 팀원 정보를 입력한다. // for (Member member : project.getMembers()) { // insertMember(project.getNo(), member.getNo()); // } insertMembers(project.getNo(), project.getMembers()); return count; } @Override public List<Project> findByKeyword(String item, String keyword) throws Exception { HashMap<String,Object> params = new HashMap<>(); params.put("item", item); params.put("keyword", keyword); return sqlSession.selectList("ProjectMapper.findByKeyword", params); } @Override public List<Project> findByKeywords(String title, String owner, String member) throws Exception { HashMap<String,Object> params = new HashMap<>(); params.put("title", title); params.put("owner", owner); params.put("member", member); return sqlSession.selectList("ProjectMapper.findByKeywords", params); } @Override public Project findByNo(int no) throws Exception { return sqlSession.selectOne("ProjectMapper.findByNo", no); } @Override public int update(Project project) throws Exception { // 1) 프로젝트 정보를 변경한다. int count = sqlSession.update("ProjectMapper.update", project); // 2) 프로젝트의 기존 멤버를 모두 삭제한다. deleteMembers(project.getNo()); // 3) 프로젝트 멤버를 추가한다. // for (Member member : project.getMembers()) { // insertMember(project.getNo(), member.getNo()); // } insertMembers(project.getNo(), project.getMembers()); return count; } @Override public int delete(int no) throws Exception { // 1) 프로젝트에 소속된 팀원 정보 삭제 deleteMembers(no); // 2) 프로젝트 삭제 return sqlSession.delete("ProjectMapper.delete", no); } @Override public int insertMember(int projectNo, int memberNo) throws Exception { HashMap<String,Object> params = new HashMap<>(); params.put("projectNo", projectNo); params.put("memberNo", memberNo); return sqlSession.insert("ProjectMapper.insertMember", params); } @Override public int insertMembers(int projectNo, List<Member> members) throws Exception { HashMap<String,Object> params = new HashMap<>(); params.put("projectNo", projectNo); params.put("members", members); return sqlSession.insert("ProjectMapper.insertMembers", params); } @Override public List<Member> findAllMembers(int projectNo) throws Exception { return sqlSession.selectList("ProjectMapper.findAllMembers", projectNo); } @Override public int deleteMembers(int projectNo) throws Exception { return sqlSession.delete("ProjectMapper.deleteMembers", projectNo); } }
[ "jinyoung.eom@gmail.com" ]
jinyoung.eom@gmail.com
5e778acda469a6d566c4dc9bab81656c9c3e0a6d
7791973ca350994b734557803f91a3fd47ea1c02
/Strings/smallestwindowinastring.java
b0b753bf26ae8f34bc20663fe9480ea72f4e84ea
[]
no_license
gupta29470/Practice
4713ae02a5ab84c6783d711d53df227d9060604a
81676b21fbf0191f8ded836d19f0c280b4bda1cd
refs/heads/master
2023-07-03T15:52:49.832892
2021-08-17T08:49:05
2021-08-17T08:49:05
357,317,997
0
0
null
null
null
null
UTF-8
Java
false
false
3,113
java
public class smallestwindowinastring { static final int no_of_chars = 256; // Function to find smallest window containing // all characters of 'pat' static String findSubString(String str, String pat) { int len1 = str.length(); int len2 = pat.length(); // check if string's length is less than pattern's // length. If yes then no such window can exist if (len1 < len2) { System.out.println("No such window exists"); return ""; } int hash_pat[] = new int[no_of_chars]; int hash_str[] = new int[no_of_chars]; // store occurrence ofs characters of pattern for (int i = 0; i < len2; i++) hash_pat[pat.charAt(i)]++; int start = 0, start_index = -1, min_len = Integer.MAX_VALUE; // start traversing the string int count = 0; // count of characters for (int j = 0; j < len1 ; j++) { // count occurrence of characters of string hash_str[str.charAt(j)]++; // If string's char matches with pattern's char // then increment count if (hash_pat[str.charAt(j)] != 0 && hash_str[str.charAt(j)] <= hash_pat[str.charAt(j)] ) count++; // if all the characters are matched if (count == len2) { // Try to minimize the window i.e., check if // any character is occurring more no. of times // than its occurrence in pattern, if yes // then remove it from starting and also remove // the useless characters. while ( hash_str[str.charAt(start)] > hash_pat[str.charAt(start)] || hash_pat[str.charAt(start)] == 0) { if (hash_str[str.charAt(start)] > hash_pat[str.charAt(start)]) hash_str[str.charAt(start)]--; start++; } // update window size int len_window = j - start + 1; if (min_len > len_window) { min_len = len_window; start_index = start; } } } // If no window found if (start_index == -1) { System.out.println("No such window exists"); return ""; } // Return substring starting from start_index // and length min_len return str.substring(start_index, start_index + min_len); } // Driver Method public static void main(String[] args) { String str = "this is a test string"; String pat = "tist"; System.out.print("Smallest window is :\n " + findSubString(str, pat)); } }
[ "gupta29470@gmail.com" ]
gupta29470@gmail.com
d42d54c91d63d36bd2e63c3ead38af7cb98df401
95091380a1271516ef5758768a15e1345de75ef1
/src/org/omg/PortableServer/POAPackage/InvalidPolicy.java
81626e58b20b69e4766f9d17656c0449ea5d5cfc
[]
no_license
auun/jdk-source-learning
575c52b5b2fddb2451eea7b26356513d3e6adf0e
0a48a0ce87d08835bd9c93c0e957a3f3e354ef1c
refs/heads/master
2020-07-20T21:55:15.886061
2019-09-06T06:06:56
2019-09-06T06:06:56
206,714,837
0
0
null
null
null
null
UTF-8
Java
false
false
792
java
package org.omg.PortableServer.POAPackage; /** * org/omg/PortableServer/POAPackage/InvalidPolicy.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /build/java8-openjdk/src/jdk8u-jdk8u222-b05/corba/src/share/classes/org/omg/PortableServer/poa.idl * Tuesday, June 18, 2019 10:26:12 AM CEST */ public final class InvalidPolicy extends org.omg.CORBA.UserException { public short index = (short)0; public InvalidPolicy () { super(InvalidPolicyHelper.id()); } // ctor public InvalidPolicy (short _index) { super(InvalidPolicyHelper.id()); index = _index; } // ctor public InvalidPolicy (String $reason, short _index) { super(InvalidPolicyHelper.id() + " " + $reason); index = _index; } // ctor } // class InvalidPolicy
[ "guanglaihe@gmail.com" ]
guanglaihe@gmail.com
785f270fe182734a1d22434770ddb2a363af9a54
c8c9523fada3abd62c900d326b4d114f88cd46d4
/02_Source/DIASORIN_OA_SYSTEM/src/main/java/com/diasorin/oa/dao/impl/AuthorityManagementDaoImpl.java
3fb05067d8b6db8fb8d5825a43f604b2baeeda53
[]
no_license
Richard1112/DiaSorin-2016
1695f2e64e450d1464154da6388d5602339dba31
4bc3eeb4589ee8e8a823745ed172eefcc39b50e5
refs/heads/master
2021-01-10T15:27:25.793940
2016-01-05T03:26:12
2016-01-05T03:26:12
48,982,713
0
0
null
null
null
null
UTF-8
Java
false
false
3,974
java
package com.diasorin.oa.dao.impl; import java.util.ArrayList; import java.util.List; import javax.persistence.Query; import org.springframework.stereotype.Component; import org.springframework.util.StringUtils; import com.diasorin.oa.common.QueryResult; import com.diasorin.oa.dao.AuthorityManagementDao; import com.diasorin.oa.model.SysEmployeeAuthority; import com.diasorin.oa.model.SysEmployeeRole; @Component public class AuthorityManagementDaoImpl extends BaseDaoImpl implements AuthorityManagementDao { @Override public QueryResult<SysEmployeeRole> roleListQuery(String roleName, int first, int count) throws Exception { try { String sql = " "; List<String> param = new ArrayList<String>(); if (StringUtils.hasText(roleName)) { sql += " and o.roleName like ? "; param.add("%"+roleName+"%"); } QueryResult<SysEmployeeRole> qs = getScrollData( SysEmployeeRole.class, first, count, sql, param.toArray()); return qs; } catch(Exception e) { throw e; } } @Override public SysEmployeeRole getRoleInfo(String roleId) throws Exception { try { String sql = " "; List<String> param = new ArrayList<String>(); sql += " and o.roleCode = ? "; param.add(roleId); QueryResult<SysEmployeeRole> qs = getScrollData(SysEmployeeRole.class, sql, param.toArray()); if (qs.getResultlist().size() > 0) { return qs.getResultlist().get(0); } return null; } catch(Exception e) { throw e; } } @SuppressWarnings("rawtypes") @Override public String getMaxRoleCode() throws Exception { try { String sqlString = "select max(roleCode) as maxCode from t_sys_employee_role "; Query query = em.createNativeQuery(sqlString); List list = query.getResultList(); if (list == null || list.size() == 0) { return null; } else { return list.get(0).toString(); } } catch (Exception e) { throw e; } } @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public List<SysEmployeeAuthority> getAuthorityList(int start, int result) throws Exception { try { String sqlString = "select " + "deptCode, " + "roleCode " + "from t_sys_employee_authority " + "group by deptCode,roleCode "; Query query = em.createNativeQuery(sqlString); query.setFirstResult(start).setMaxResults(result); List list = query.getResultList(); String[] fields = { "deptCode", "roleCode" }; List resultList = bindDataToDTO(list, new SysEmployeeAuthority(), fields); return resultList; } catch (Exception e) { throw e; } } @Override public Long getAuthorityListCount() throws Exception { try { String sqlString = "select count(*) from (select " + "deptCode, " + "roleCode " + "from t_sys_employee_authority " + "group by deptCode,roleCode) a "; Query query = em.createNativeQuery(sqlString); return Long.valueOf(query.getSingleResult().toString()); } catch (Exception e) { throw e; } } @SuppressWarnings({ "unchecked", "rawtypes" }) @Override public List<SysEmployeeAuthority> getAuthorityListByCondition( String deptId, String roleId) throws Exception { try { List<String> param = new ArrayList<String>(); String sqlString = "select " + "? as deptCode, " + "? as roleCode, " + "b.controlId, " + "IFNULL(a.authority, '') as authority " + "from t_sys_module_info b " + "left join t_sys_employee_authority a on a.controlId = b.controlId and a.deptCode = ? and a.roleCode = ?" +""; Query query = em.createNativeQuery(sqlString); param.add(deptId); param.add(roleId); param.add(deptId); param.add(roleId); setQueryParams(query, param.toArray()); List list = query.getResultList(); String[] fields = { "deptCode", "roleCode","controlId","authority" }; List resultList = bindDataToDTO(list, new SysEmployeeAuthority(), fields); return resultList; } catch (Exception e) { throw e; } } }
[ "79544198@qq.com" ]
79544198@qq.com
80ae833a3f1a7ef31745ac3f90a4e0c337772c5b
8022511ad71cf4b1eccbc4ce6ce6af1dd7c88bec
/oim-swing/src/main/java/com/oim/common/annotation/Parameter.java
086f844abe2f2117243f4118567c37c600934a36
[]
no_license
softfn/im-for-pc
f5411d88c172adbda75099582ae70dcd18e08958
e34a62c337e1b7f0c0fd39286353a8c71d5864ad
refs/heads/master
2020-07-16T23:53:31.585700
2016-11-17T01:59:15
2016-11-17T01:59:15
73,938,576
1
1
null
null
null
null
UTF-8
Java
false
false
506
java
package com.oim.common.annotation; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Documented @Target(ElementType.PARAMETER) @Retention(RetentionPolicy.RUNTIME) public @interface Parameter { String value() default ""; String type() default "json"; public static final String TYPE_JSON="json"; public static final String TYPE_BEAN="bean"; }
[ "softfn@hotmail.com" ]
softfn@hotmail.com
f71037c641986eb02f81ec90d9ef3a98fa61b1c3
b308232b5f9a1acd400fe15b45780e348048fccd
/Billing/src/main/java/com/param/billing/unit/controller/UnitServiceTariffMasterController.java
8079f1cdf1cfd85f7d59356c918b278e9b092841
[]
no_license
PravatKumarPradhan/his
2aae12f730b7d652b9590ef976b12443fc2c2afb
afb2b3df65c0bc1b1864afc1f958ca36a2562e3f
refs/heads/master
2022-12-22T20:43:44.895342
2018-07-31T17:04:26
2018-07-31T17:04:26
143,041,254
1
0
null
2022-12-16T03:59:53
2018-07-31T16:43:36
HTML
UTF-8
Java
false
false
2,499
java
package com.param.billing.unit.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.param.billing.unit.service.IUnitServiceTariffMasterService; import com.param.global.common.ICommonConstants; import com.param.global.common.Response; import com.param.global.dto.UnitServiceTariffMasterDto; @Controller @RequestMapping(value="api/unit") @SuppressWarnings({"rawtypes","unchecked"}) public class UnitServiceTariffMasterController implements ICommonConstants{ @Autowired IUnitServiceTariffMasterService iUnitServiceTariffMasterService; @RequestMapping(value="/getMasterServiceListByMultipleParameters", method = RequestMethod.POST , consumes = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Response getMasterServiceListByMultipleParameters(@RequestBody UnitServiceTariffMasterDto unitServiceTariffMasterDto){ try{ return iUnitServiceTariffMasterService.getMasterServiceListByMultipleParameters(unitServiceTariffMasterDto); }catch(Exception e){ e.printStackTrace(); } return new Response(ERROR, null, null, null,null); } @RequestMapping(value="/saveUnitServiceTariffMaster", method = RequestMethod.POST , consumes = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Response saveUnitServiceTariffMaster(@RequestBody UnitServiceTariffMasterDto unitServiceTariffMasterDto){ try{ return iUnitServiceTariffMasterService.saveUnitServiceTariffMaster(unitServiceTariffMasterDto); }catch(Exception e){ e.printStackTrace(); } return new Response(ERROR, null, null, null,null); } @RequestMapping(value="/getBasePriceOfServicesFromTariffMasterByServiceList", method = RequestMethod.POST , consumes = MediaType.APPLICATION_JSON_VALUE) public @ResponseBody Response getBasePriceOfServicesFromTariffMasterByServiceList(@RequestBody UnitServiceTariffMasterDto unitServiceTariffMasterDto){ try{ return iUnitServiceTariffMasterService.getBasePriceOfServicesFromTariffMasterByServiceList(unitServiceTariffMasterDto); }catch(Exception e){ e.printStackTrace(); } return new Response(ERROR, null, null, null,null); } }
[ "pkp751989@gmail.com" ]
pkp751989@gmail.com
ae5808fbf5280e322fe266a536760e683c76788d
31d41174d056e5d7bd926e773b3d2a7edd107aea
/src/main/java/com/sztouyun/advertisingsystem/model/system/HistoricalParamConfig.java
2b6f70e23b9b2b40ee1a8a863975e87889cbaa40
[]
no_license
foxbabe/ads
76ed0bb60ca93c9bb2ef0feec4dfdf60adf8a6bb
713d8abd599830180ad37dbc07892dae470e07e5
refs/heads/master
2020-04-07T07:57:31.790305
2018-11-08T03:06:26
2018-11-08T03:06:26
158,195,619
1
0
null
2018-11-19T09:31:47
2018-11-19T09:31:46
null
UTF-8
Java
false
false
960
java
package com.sztouyun.advertisingsystem.model.system; import com.sztouyun.advertisingsystem.model.BaseRecordModel; import lombok.Data; import javax.persistence.Column; import javax.persistence.Entity; import java.util.Date; @Entity @Data public class HistoricalParamConfig extends BaseRecordModel { /** * 所属分组 */ @Column(nullable = false) private Integer configGroup; /** * 参数类型 */ @Column(nullable = false) private Integer type; /** * 比较符 */ @Column(name = "comparison_type") private Integer comparisonType; /** * 标准值 */ @Column(nullable = false) private Double value; /** * 单位 */ private Integer unit; @Column(nullable = false) private Date updatedTime; /** * 配置所属方ID */ @Column(nullable = false, columnDefinition = "varchar(36) default ''") private String objectId; }
[ "lihf@sina.cn" ]
lihf@sina.cn
9e3372bfcb49bfb249b2a3afe3106563278328f6
217d96db536ff284fc1b168bf640104f00ba1ad5
/rifidi/trunk/org.rifidi.prototyper.items/src/org/rifidi/prototyper/items/service/DuplicateItemException.java
185203b80c6d39978329eb3309784611ee57df9b
[]
no_license
TranscendsLLC/emulator
d5b94965b8ebd894707c093334c51aabf30d0075
a46c42cd2e86aafc213df7585dc923895a589446
refs/heads/master
2021-01-14T12:31:10.876450
2010-10-01T21:28:07
2010-10-01T21:28:07
43,608,652
1
1
null
null
null
null
UTF-8
Java
false
false
883
java
/** * */ package org.rifidi.prototyper.items.service; /** * Thrown if two instances of an item are registered * * @author Kyle Neumeier - kyle@pramari.com * */ public class DuplicateItemException extends Exception { /** * */ private static final long serialVersionUID = 1L; /** * */ public DuplicateItemException() { // TODO Auto-generated constructor stub } /** * @param arg0 */ public DuplicateItemException(String arg0) { super(arg0); // TODO Auto-generated constructor stub } /** * @param arg0 */ public DuplicateItemException(Throwable arg0) { super(arg0); // TODO Auto-generated constructor stub } /** * @param arg0 * @param arg1 */ public DuplicateItemException(String arg0, Throwable arg1) { super(arg0, arg1); // TODO Auto-generated constructor stub } }
[ "kyle@70ba6d20-ffbb-44b8-b480-e27427137dba" ]
kyle@70ba6d20-ffbb-44b8-b480-e27427137dba
176dfd6272f518c854974ddf219c011e9507eb05
5827680a971ec56d5636d1ee112793b870f91122
/[FINAL]/[FSXPlanner]/src/flightsim/simconnect/recv/SimConnectException.java
139d975c699c6fa353da4b43e3646ab05c858d7c
[]
no_license
bily/fsxp
61185fad6d87a1b0bc6d98dbdb8a02bd7e83c0cb
39f1ff19a2fd5b86e764602baf543298d985b303
refs/heads/master
2021-01-20T04:33:10.510213
2012-08-12T07:28:23
2012-08-12T07:28:23
7,416,727
3
4
null
null
null
null
UTF-8
Java
false
false
1,852
java
package flightsim.simconnect.recv; import flightsim.simconnect.Messages; public enum SimConnectException { NONE, ERROR, SIZE_MISMATCH, UNRECOGNIZED_ID, UNOPENED, VERSION_MISMATCH, TOO_MANY_GROUPS, NAME_UNRECOGNIZED, TOO_MANY_EVENT_NAMES, EVENT_ID_DUPLICATE, TOO_MANY_MAPS, TOO_MANY_OBJECTS, TOO_MANY_REQUESTS, WEATHER_INVALID_PORT, WEATHER_INVALID_METAR, WEATHER_UNABLE_TO_GET_OBSERVATION, WEATHER_UNABLE_TO_CREATE_STATION, WEATHER_UNABLE_TO_REMOVE_STATION, INVALID_DATA_TYPE, INVALID_DATA_SIZE, DATA_ERROR, INVALID_ARRAY, CREATE_OBJECT_FAILED, LOAD_FLIGHTPLAN_FAILED, OPERATION_INVALID_FOR_OJBECT_TYPE, ILLEGAL_OPERATION, ALREADY_SUBSCRIBED, INVALID_ENUM, DEFINITION_ERROR, DUPLICATE_ID, DATUM_ID, OUT_OF_BOUNDS, /** @since 0.5 */ ALREADY_CREATED, /** @since 0.5 */ OBJECT_OUTSIDE_REALITY_BUBBLE, /** @since 0.5 */ OBJECT_CONTAINER, /** @since 0.5 */ OBJECT_AI, /** @since 0.5 */ OBJECT_ATC, /** @since 0.5 */ OBJECT_SCHEDULE; public static final SimConnectException type(int i) { SimConnectException[] values = values(); if ((i > values.length) || (i < 0)) return NONE; // default else return values[i]; } /** * Returns a localised message giving the reason of the error * @since 0.2 * @return exception cause message */ public String getLocalisedMessage() { return Messages.get("Simconnect_exception_" + ordinal()); //$NON-NLS-1$ } /** * Returns a string in english giving the reason of the error * @return exception cause message * @since 0.2 */ public String getMessage() { return Messages.getDefault("Simconnect_exception_" + ordinal()); //$NON-NLS-1$ } }
[ "evandrix@gmail.com" ]
evandrix@gmail.com
8d3c58634da722f0b2590aa8bcabc40badfbb922
20c2e98f2cbaaf417aaa7f5e7e6474755946ca0f
/server/src/src/main/java/org/apollo/game/model/region/Region.java
5c8526a409e36d61793eef130c9bf57d541d29f8
[ "ISC" ]
permissive
Rune-Status/Bickets-aj8
596f8c70e0c6ee1cb9f26c58d7437d17c7b17540
3b6963c825500422f1e6590fbd06e271a1d7dfd8
refs/heads/master
2020-05-01T06:43:43.921008
2015-02-25T13:25:33
2015-02-25T13:25:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,443
java
package org.apollo.game.model.region; import java.util.Arrays; import java.util.HashSet; import java.util.Set; import java.util.stream.Collectors; import org.apollo.game.model.Entity; import org.apollo.game.model.Entity.EntityCategory; import org.apollo.game.model.Position; /** * Represents a single region. * * @author Ryley Kimmel <ryley.kimmel@live.com> */ public final class Region { /** * The size of one side of the region array. */ public static final int SIZE = 256; /** * The size of a region. */ public static final int REGION_SIZE = 64; /** * The maximum level a floor can be. */ public static final int MAXIMUM_HEIGHT_LEVEL = 4; /** * The tiles within the region. */ private final Tile[][] tiles = new Tile[MAXIMUM_HEIGHT_LEVEL][REGION_SIZE * REGION_SIZE]; /** * A set of entities within this region. */ private final Set<Entity> entities = new HashSet<>(); /** * Constructs a new {@link Region}. */ protected Region() { for (int height = 0; height < MAXIMUM_HEIGHT_LEVEL; height++) { for (int regionId = 0; regionId < REGION_SIZE * REGION_SIZE; regionId++) { tiles[height][regionId] = new Tile(); } } } /** * Adds an {@link Entity} to this region. * * @param entity The entity to add. */ public void addEntity(Entity entity) { entities.add(entity); } /** * Removes an {@link Entity} from this region. * * @param entity The entity to remove. */ public void removeEntity(Entity entity) { entities.remove(entity); } /** * Tests whether or not the {@link #entities} {@link Set} contains the * specified {@link Entity}. * * @param entity The entity. * @return {@code true} if and only if the entities set contains the * specified entity otherwise {@code false}. */ public boolean contains(Entity entity) { return entities.contains(entity); } /** * Gets the entities within this region. * * @return A {@link Set} of entities in this region. */ @SuppressWarnings("unchecked") public <T extends Entity> Set<T> getEntities() { return (Set<T>) entities; } /** * Gets the entities of the specified {@link EntityCategory} within this * region. * * @param category The category of entity to get. * @return A {@link Set} of entities in this region. */ public <T extends Entity> Set<T> getEntities(EntityCategory category) { Set<T> entities = getEntities(); return entities.stream().filter(e -> e.getCategory() == category).collect(Collectors.toSet()); } /** * Gets the entities on the specified {@link Position}. * * @param position The position. * @return A {@link Set} of entities on the specified position. */ public <T extends Entity> Set<T> getEntities(Position position) { Set<T> entities = getEntities(); return entities.stream().filter(e -> e.getPosition().equals(position)).collect(Collectors.toSet()); } /** * Gets the entities on the specified {@link Position} if they meet the * specified {@link EntityCategory}. * * @param position The position. * @param category The category of the entity. * @return A {@link Set} of entities on the specified position. */ public <T extends Entity> Set<T> getEntities(Position position, EntityCategory category) { Set<T> entities = getEntities(position); return entities.stream().filter(e -> e.getCategory() == category).collect(Collectors.toSet()); } /** * Gets a single tile in this region from the specified height, x and y * coordinates. * * @param height The height. * @param x The x coordinate. * @param y The y coordinate. * @return The tile in this region for the specified attributes. */ public Tile getTile(int height, int x, int y) { return tiles[height][x + y * REGION_SIZE]; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (entities == null ? 0 : entities.hashCode()); result = prime * result + Arrays.hashCode(tiles); return result; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } Region other = (Region) obj; if (entities == null) { if (other.entities != null) { return false; } } else if (!entities.equals(other.entities)) { return false; } if (!Arrays.deepEquals(tiles, other.tiles)) { return false; } return true; } }
[ "ryley.kimmel@live.com" ]
ryley.kimmel@live.com
f0aadd95edb93f6edcfce86da2c3ff692e5f8058
bb256f53aafe978dd8a6e0fb21594f97c8d9ba02
/src/day_50_Inheritance/StaticBlockDemo.java
f89c292856a8f68d102c4dec3ed219c646a4f5d9
[]
no_license
tumacho-hub/java-programming
ad8432e68636e267994035aa95aa0ee68270e000
438ded3444546710533c5a1c6c72516131134aa1
refs/heads/master
2023-08-14T17:24:06.387578
2021-10-22T03:25:24
2021-10-22T03:25:24
372,034,206
0
0
null
null
null
null
UTF-8
Java
false
false
2,402
java
package day_50_Inheritance; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class StaticBlockDemo { static int num; static List<String> carModels; static { System.out.println("Static initializer block"); num = 10; carModels = new ArrayList<>(); carModels.addAll(Arrays.asList("Abarth", "Alfa Romeo", "Aston Martin", "Audi", "Bentley", "BMW", "Bugatti", "Cadillac", "Chevrolet", "Chrysler", "Citroën", "Dacia", "Daewoo", "Daihatsu", "Dodge", "Donkervoort", "DS", "Ferrari", "Fiat", "Fisker", "Ford", "Honda", "Hummer", "Hyundai", "Infiniti", "Iveco", "Jaguar", "Jeep", "Kia", "KTM", "Lada", "Lamborghini", "Lancia", "Land Rover", "Landwind", "Lexus", "Lotus", "Maserati", "Maybach", "Mazda", "McLaren", "Mercedes-Benz", "MG", "Mini", "Mitsubishi", "Morgan", "Nissan", "Opel", "Peugeot", "Porsche", "Renault", "Rolls-Royce", "Rover", "Saab", "Seat", "Skoda", "Smart", "SsangYong", "Subaru", "Suzuki", "Tesla", "Toyota", "Volkswagen", "Volvo")); } { System.out.println("Initializer block"); } // below i have a constructor with no arguments public StaticBlockDemo(){ System.out.println("Constructor method"); num += 5; } public StaticBlockDemo(int value){ System.out.println("Overload it constructor - value = "+ value); num = value; } }
[ "jorgeareszuma86@gmail.com" ]
jorgeareszuma86@gmail.com
03acae08ea2578ed8f9e68a9ac5453066b48e69e
24d8cf871b092b2d60fc85d5320e1bc761a7cbe2
/JFreeChart/rev91-1269/left-branch-1269/tests/org/jfree/chart/renderer/xy/junit/XYBoxAndWhiskerRendererTests.java
bb8be9cf64a1570eba453f174bc90ad8accd7f94
[]
no_license
joliebig/featurehouse_fstmerge_examples
af1b963537839d13e834f829cf51f8ad5e6ffe76
1a99c1788f0eb9f1e5d8c2ced3892d00cd9449ad
refs/heads/master
2016-09-05T10:24:50.974902
2013-03-28T16:28:47
2013-03-28T16:28:47
9,080,611
3
2
null
null
null
null
UTF-8
Java
false
false
3,751
java
package org.jfree.chart.renderer.xy.junit; import java.awt.Color; import java.awt.GradientPaint; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.jfree.chart.renderer.xy.XYBoxAndWhiskerRenderer; import org.jfree.util.PublicCloneable; public class XYBoxAndWhiskerRendererTests extends TestCase { public static Test suite() { return new TestSuite(XYBoxAndWhiskerRendererTests.class); } public XYBoxAndWhiskerRendererTests(String name) { super(name); } public void testEquals() { XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer(); XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer(); assertEquals(r1, r2); r1.setPaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.red)); assertFalse(r1.equals(r2)); r2.setPaint(new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.red)); assertEquals(r1, r2); r1.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green, 3.0f, 4.0f, Color.red)); assertFalse(r1.equals(r2)); r2.setArtifactPaint(new GradientPaint(1.0f, 2.0f, Color.green, 3.0f, 4.0f, Color.red)); assertEquals(r1, r2); r1.setBoxWidth(0.55); assertFalse(r1.equals(r2)); r2.setBoxWidth(0.55); assertEquals(r1, r2); r1.setFillBox(!r1.getFillBox()); assertFalse(r1.equals(r2)); r2.setFillBox(!r2.getFillBox()); assertEquals(r1, r2); r1.setBoxPaint(Color.yellow); assertFalse(r1.equals(r2)); r2.setBoxPaint(Color.yellow); assertEquals(r1, r2); r1.setBoxPaint(null); assertFalse(r1.equals(r2)); r2.setBoxPaint(null); assertEquals(r1, r2); } public void testHashcode() { XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer(); XYBoxAndWhiskerRenderer r2 = new XYBoxAndWhiskerRenderer(); assertTrue(r1.equals(r2)); int h1 = r1.hashCode(); int h2 = r2.hashCode(); assertEquals(h1, h2); } public void testCloning() { XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer(); XYBoxAndWhiskerRenderer r2 = null; try { r2 = (XYBoxAndWhiskerRenderer) r1.clone(); } catch (CloneNotSupportedException e) { System.err.println("Failed to clone."); } assertTrue(r1 != r2); assertTrue(r1.getClass() == r2.getClass()); assertTrue(r1.equals(r2)); } public void testPublicCloneable() { XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer(); assertTrue(r1 instanceof PublicCloneable); } public void testSerialization() { XYBoxAndWhiskerRenderer r1 = new XYBoxAndWhiskerRenderer(); XYBoxAndWhiskerRenderer r2 = null; try { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(r1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray()) ); r2 = (XYBoxAndWhiskerRenderer) in.readObject(); in.close(); } catch (Exception e) { System.out.println(e.toString()); } assertEquals(r1, r2); } }
[ "joliebig@fim.uni-passau.de" ]
joliebig@fim.uni-passau.de
4a4a13ff469dcb875bd612df09750be78e5247c4
fd8fadf30b2e357c1f432a303115ce5bf30ff57c
/src/h/nodelist_t.java
883a10e011b28810c87ed8e8c25a8a4a37424000
[]
no_license
lixinlin/plantuml-code
6642e452ae8e6834942593a7ecd42f44418b8b6b
f558a8ec50f9ec617528dede774c3f46f1aac5ae
refs/heads/master
2021-06-28T02:24:29.085869
2019-09-22T11:20:25
2019-09-22T11:20:25
214,447,468
0
0
null
2021-02-03T19:33:31
2019-10-11T13:45:25
Java
UTF-8
Java
false
false
2,347
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * Project Info: http://plantuml.com * * If you like this project or if you find it useful, you can support us at: * * http://plantuml.com/patreon (only 1$ per month!) * http://plantuml.com/paypal * * This file is part of Smetana. * Smetana is a partial translation of Graphviz/Dot sources from C to Java. * * (C) Copyright 2009-2020, Arnaud Roques * * This translation is distributed under the same Licence as the original C program: * ************************************************************************* * Copyright (c) 2011 AT&T Intellectual Property * 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 * * Contributors: See CVS logs. Details at http://www.graphviz.org/ ************************************************************************* * * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0] * * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. * * You may obtain a copy of the License at * * http://www.eclipse.org/legal/epl-v10.html * * 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 h; import java.util.Arrays; import java.util.List; import smetana.core.__ptr__; //2 cvnwgrhim9meq1d0au3lunrpz public interface nodelist_t extends __ptr__ { public static List<String> DEFINITION = Arrays.asList( "typedef struct", "{", "nodelistitem_t *first", "nodelistitem_t *last", "int sz", "}", "nodelist_t"); } // typedef struct { // nodelistitem_t *first; // nodelistitem_t *last; // int sz; // } nodelist_t;
[ "arnaud_roques@2bfd43ce-aac2-44f9-bcbc-61bf0d4e0ab5" ]
arnaud_roques@2bfd43ce-aac2-44f9-bcbc-61bf0d4e0ab5
b4d9932c6f788d6d1243b82480e2366a61a28075
1daccb857396a58bb87e5a8bbc79123e261910a5
/jse/src/bank/AccountService.java
1d69ed3c6c7cefb6126e49600de84bfc55a29d46
[]
no_license
WoojungLee/jse
7a0271da10224015270ea6c6c6672cfd65949244
7ee33e29de0c753672e23b6b8cb94809fd282baa
refs/heads/master
2021-01-10T14:37:02.048876
2016-02-17T09:06:34
2016-02-17T09:06:34
51,723,425
0
0
null
null
null
null
UTF-8
Java
false
false
278
java
package bank; public interface AccountService { // DB에서 CRUD(create, read, update, delete) // 1. 통장개설 // 2. 입금 public String deposit(int money); // 3. 출금 public String withdraw(int money); // 4. 잔액조회 public String search(); }
[ "user@user-PC" ]
user@user-PC
cac1e789a1adecca6b8e79272c7719901cfc7378
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/com/ali/auth/third/login/UTConstants.java
1a755a17ba158fb1452a60aa0f77cee3fb0f0114
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
1,478
java
package com.ali.auth.third.login; public class UTConstants { public static final String E_AUTO_LOGIN_FAILURE = "auto_login_failure".toUpperCase(); public static final String E_AUTO_LOGIN_SUCCESS = "auto_login_success".toUpperCase(); public static final String E_COOOPERATION_BIND = "COOPERATION_TB_BIND"; public static final String E_COOOPERATION_ERROR = "COOPERATION_SYSTEM_ERROR"; public static final String E_COOOPERATION_LOGIN = "COOPERATION_TB_LOGIN"; public static final String E_COOOPERATION_TRUST = "COOPERATION_TRUST_LOGIN"; public static final String E_GENERATE_TAOBAO_SIGN = "GENERATE_TOPAPPLINK_TOKEN"; public static final String E_H5_LOGIN_CANCEL = "h5_login_cancel".toUpperCase(); public static final String E_H5_LOGIN_FAILURE = "h5_login_failure".toUpperCase(); public static final String E_H5_LOGIN_SUCCESS = "h5_login_success".toUpperCase(); public static final String E_H5_OPERATION_BIND_FAILURE = "h5_bind_failure".toUpperCase(); public static final String E_IV_LOGIN_FAILURE = "iv_login_failure".toUpperCase(); public static final String E_SSO_TOKEN_LOGIN = "SSO_TOKEN_LOGIN"; public static final String E_TB_LOGIN_CANCEL = "tb_login_cancel".toUpperCase(); public static final String E_TB_LOGIN_FAILURE = "tb_login_failure".toUpperCase(); public static final String E_TB_LOGIN_SUCCESS = "tb_login_success".toUpperCase(); public static final String E_TOP_TOKEN_LOGIN = "TOP_TOKEN_LOGIN"; }
[ "test@gmail.com" ]
test@gmail.com
3e00402c94bf81befd862396dbe11380b3b7a7d0
4682b0efc3824333c858ac3823297e2a4b37fa05
/play-services-core/src/main/java/org/microg/gms/maps/markup/CircleImpl.java
1dd8d40dd5a36057133e1bdf5494d13116764c40
[ "Apache-2.0" ]
permissive
julienschmidt/android_packages_apps_GmsCore
a29c2505ab8e7064021026802613490fd8845a95
611fe016a0c529bc738155d2dcdb1f69dd6a830e
refs/heads/master
2023-08-15T03:45:20.464877
2015-10-10T05:21:08
2015-10-10T05:21:08
38,508,731
1
1
null
2015-07-03T20:02:01
2015-07-03T20:02:01
null
UTF-8
Java
false
false
4,447
java
/* * Copyright 2013-2015 microG Project Team * * 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.microg.gms.maps.markup; import android.os.RemoteException; import com.google.android.gms.maps.model.CircleOptions; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.internal.ICircleDelegate; import org.microg.gms.maps.GmsMapsTypeHelper; import org.oscim.layers.vector.geometries.CircleDrawable; import org.oscim.layers.vector.geometries.Drawable; import org.oscim.layers.vector.geometries.Style; import org.oscim.map.Map; public class CircleImpl extends ICircleDelegate.Stub implements DrawableMarkup { private final String id; private final CircleOptions options; private final MarkupListener listener; private boolean removed = false; public CircleImpl(String id, CircleOptions options, MarkupListener listener) { this.id = id; this.listener = listener; this.options = options == null ? new CircleOptions() : options; } @Override public void remove() throws RemoteException { listener.remove(this); removed = true; } @Override public String getId() { return id; } @Override public void setCenter(LatLng center) throws RemoteException { options.center(center); listener.update(this); } @Override public LatLng getCenter() throws RemoteException { return options.getCenter(); } @Override public void setRadius(double radius) throws RemoteException { options.radius(radius); listener.update(this); } @Override public double getRadius() throws RemoteException { return options.getRadius(); } @Override public void setStrokeWidth(float width) throws RemoteException { options.strokeWidth(width); listener.update(this); } @Override public float getStrokeWidth() throws RemoteException { return options.getStrokeWidth(); } @Override public void setStrokeColor(int color) throws RemoteException { options.strokeColor(color); listener.update(this); } @Override public int getStrokeColor() throws RemoteException { return options.getStrokeColor(); } @Override public void setFillColor(int color) throws RemoteException { options.fillColor(color); listener.update(this); } @Override public int getFillColor() throws RemoteException { return options.getFillColor(); } @Override public void setZIndex(float zIndex) throws RemoteException { options.zIndex(zIndex); listener.update(this); } @Override public float getZIndex() { return options.getZIndex(); } @Override public void setVisible(boolean visible) throws RemoteException { options.visible(visible); listener.update(this); } @Override public boolean isVisible() { return options.isVisible(); } @Override public boolean equalsRemote(ICircleDelegate other) throws RemoteException { return other != null && other.getId().equals(getId()); } @Override public int hashCodeRemote() throws RemoteException { return id.hashCode(); } @Override public boolean onClick() { return listener.onClick(this); } @Override public Drawable getDrawable(Map map) { if (!isVisible() || removed) return null; return new CircleDrawable( GmsMapsTypeHelper.fromLatLng(options.getCenter()), options.getRadius() / 1000.0, Style.builder() .strokeColor(options.getStrokeColor()) .fillAlpha(1) .fillColor(options.getFillColor()) .strokeWidth(options.getStrokeWidth()).build()); } }
[ "github@rvin.mooo.com" ]
github@rvin.mooo.com
9b85d54ba73c178b78d10a2606c51b74b91a2531
aa6997aba1475b414c1688c9acb482ebf06511d9
/src/com/sun/org/apache/xml/internal/security/encryption/XMLCipherParameters.java
acd9adf4d4d92316caf0d7525ab8f161258f62cc
[]
no_license
yueny/JDKSource1.8
eefb5bc88b80ae065db4bc63ac4697bd83f1383e
b88b99265ecf7a98777dd23bccaaff8846baaa98
refs/heads/master
2021-06-28T00:47:52.426412
2020-12-17T13:34:40
2020-12-17T13:34:40
196,523,101
4
2
null
null
null
null
UTF-8
Java
false
false
2,533
java
/* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.sun.org.apache.xml.internal.security.encryption; /** * Constants */ public interface XMLCipherParameters { String AES_128 = "http://www.w3.org/2001/04/xmlenc#aes128-cbc"; String AES_256 = "http://www.w3.org/2001/04/xmlenc#aes256-cbc"; String AES_192 = "http://www.w3.org/2001/04/xmlenc#aes192-cbc"; String RSA_1_5 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5"; String RSA_OAEP = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"; String DIFFIE_HELLMAN = "http://www.w3.org/2001/04/xmlenc#dh"; String TRIPLEDES_KEYWRAP = "http://www.w3.org/2001/04/xmlenc#kw-tripledes"; String AES_128_KEYWRAP = "http://www.w3.org/2001/04/xmlenc#kw-aes128"; String AES_256_KEYWRAP = "http://www.w3.org/2001/04/xmlenc#kw-aes256"; String AES_192_KEYWRAP = "http://www.w3.org/2001/04/xmlenc#kw-aes192"; String SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1"; String SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"; String SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512"; String RIPEMD_160 = "http://www.w3.org/2001/04/xmlenc#ripemd160"; String XML_DSIG = "http://www.w3.org/2000/09/xmldsig#"; String N14C_XML = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"; String N14C_XML_CMMNTS = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"; String EXCL_XML_N14C = "http://www.w3.org/2001/10/xml-exc-c14n#"; String EXCL_XML_N14C_CMMNTS = "http://www.w3.org/2001/10/xml-exc-c14n#WithComments"; }
[ "yueny09@163.com" ]
yueny09@163.com
de28a522976fb2a07e4a3633c505baa8eeab0775
4aa9b944c5d72b78009a91f8094d2e4ef9200180
/src/test/java/com/kelaskoding/CatatPengeluaranApiApplicationTests.java
8baff28e66656d17c143db2605d12c215c852ec5
[]
no_license
hendrosteven/spring-demo-expenses-api
f3c94e70f531aaa635ba9272817d25839996362d
fc1754b3714a0233116d87cafbb1b92f5b99fe7a
refs/heads/master
2022-12-06T08:13:03.583096
2020-08-17T09:04:25
2020-08-17T09:04:25
287,984,534
0
0
null
null
null
null
UTF-8
Java
false
false
220
java
package com.kelaskoding; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class CatatPengeluaranApiApplicationTests { @Test void contextLoads() { } }
[ "hendro.steven@gmail.com" ]
hendro.steven@gmail.com
7629cf8eade3d699a320a8030885c5b82caced69
995f73d30450a6dce6bc7145d89344b4ad6e0622
/P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/ohos/nfc/tag/NfcFTag.java
845c2d35eadb68d04eeb39d0cac25af34e0addc1
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,179
java
package ohos.nfc.tag; import java.util.Optional; import ohos.aafwk.content.IntentParams; public class NfcFTag extends TagManager { private static final String EXTRA_PMM = "pmm"; private static final String EXTRA_SC = "systemcode"; private byte[] mPMm = null; private byte[] mSystemCode = null; public static Optional<NfcFTag> getInstance(TagInfo tagInfo) { if (!tagInfo.isProfileSupported(4)) { return Optional.empty(); } return Optional.of(new NfcFTag(tagInfo)); } public NfcFTag(TagInfo tagInfo) { super(tagInfo, 4); IntentParams orElse; if (tagInfo.isProfileSupported(4) && (orElse = tagInfo.getProfileExtras(4).orElse(null)) != null) { if (orElse.getParam(EXTRA_SC) instanceof byte[]) { this.mSystemCode = (byte[]) orElse.getParam(EXTRA_SC); } if (orElse.getParam(EXTRA_PMM) instanceof byte[]) { this.mPMm = (byte[]) orElse.getParam(EXTRA_PMM); } } } public byte[] getSystemCode() { return this.mSystemCode; } public byte[] getPMm() { return this.mPMm; } }
[ "dstmath@163.com" ]
dstmath@163.com
316c14527d20d3fbe3f7516389f2ff70bfa52180
30057e353957920564ee07722427c3ff434d322f
/ProblemSolving/src/com/basics/string/RepeatedDNASequence.java
82c61839d095d2be889a157b19a0031be1f1e9f1
[]
no_license
mmanjunath998/Problem-Solving
a7f4e541b150ad3d28e545b7c990d47b020c79a9
32f21921f05ff351a6cdc52fe72e954633d9036a
refs/heads/master
2020-09-09T15:06:46.232130
2019-12-04T08:04:58
2019-12-04T08:04:58
221,479,218
0
0
null
null
null
null
UTF-8
Java
false
false
1,342
java
package com.basics.string; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; public class RepeatedDNASequence { public static void main(String[] args){ String str = "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT"; System.out.println(find(str, 10)); } public static List<String> find(String str, int k){ Set<String> result = new HashSet<>(); Set<String> visited = new HashSet<>(); for(int i=0; i<=str.length()-k; i++){ String sub = str.substring(i, i+k); if(visited.contains(sub)){ result.add(sub); }else{ visited.add(sub); } } return new ArrayList<>(result); } public static List<String> findDNA(String str, int k){ Set<String> res = new HashSet<String>(); Set<String> visited = new HashSet<String>(); for(int i=0; i<str.length()-k; i++){ String sub = str.substring(i, i+k); if(visited.contains(sub)){ res.add(sub); }else{ visited.add(sub); } } return new ArrayList<>(res); } public static boolean compareString(String str, int p1, int p2, int k){ for(int i=0; i<k; i++){ if(str.charAt(p1+i) != str.charAt(p1+i)){ return false; } } return true; } /* * 1: scan through the str i to n * 2: for every i scan j = i+k to n * 3: if we match found then compare twoStrings from * * * */ }
[ "manjunath@bytemark.co" ]
manjunath@bytemark.co
5e6b2ed1386348552940e0ead0eb8457fbb41165
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_c7cffd05d023e1e8ed34788abc7f8593cca44dc4/ExtendsTest/5_c7cffd05d023e1e8ed34788abc7f8593cca44dc4_ExtendsTest_t.java
87648c7f91b13024357009f6d938f388b368eae1
[]
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,694
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.wicket.security; import java.net.MalformedURLException; import org.apache.wicket.ISessionFactory; import org.apache.wicket.Request; import org.apache.wicket.Response; import org.apache.wicket.Session; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.security.actions.ActionFactory; import org.apache.wicket.security.hive.HiveMind; import org.apache.wicket.security.hive.config.PolicyFileHiveFactory; import org.apache.wicket.security.pages.MockHomePage; import org.apache.wicket.security.pages.MockLoginPage; import org.apache.wicket.security.strategies.StrategyFactory; import org.apache.wicket.security.swarm.SwarmWebApplication; import org.apache.wicket.security.swarm.actions.SwarmActionFactory; import org.apache.wicket.security.swarm.strategies.SwarmStrategyFactory; import org.apache.wicket.util.tester.WicketTester; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Test if everything still works if we don't inherit from {@link SwarmWebApplication} but * simply implement all the required interfaces. This simply runs all the tet from * {@link GeneralTest} and if we don't get a {@link ClassCastException} or something like * that everythings works ok. * @author marrink */ public class ExtendsTest extends GeneralTest { private static final class TestApplication extends WebApplication implements WaspApplication, ISessionFactory { private ActionFactory actionFactory; private StrategyFactory strategyFactory; /** * */ public TestApplication() { super(); setSessionFactory(this); } protected Object getHiveKey() { // if we were using servlet-api 2.5 we could get the contextpath from the // servletcontext return "test"; } protected void setUpHive() { PolicyFileHiveFactory factory = new PolicyFileHiveFactory(); try { factory.addPolicyFile(getServletContext().getResource("WEB-INF/policy.hive")); factory.setAlias("TestPrincipal", "org.apache.wicket.security.hive.authorization.TestPrincipal"); factory.setAlias("myPackage", "org.apache.wicket.security.pages"); } catch (MalformedURLException e) { log.error(e.getMessage(), e); } HiveMind.registerHive(getHiveKey(), factory); } public Class getHomePage() { return MockHomePage.class; } public Class getLoginPage() { return MockLoginPage.class; } public Session newSession(Request request, Response response) { return new WaspSession(this, request); } /** * @see org.apache.wicket.security.WaspApplication#getActionFactory() */ public ActionFactory getActionFactory() { return actionFactory; } /** * @see org.apache.wicket.security.WaspApplication#getStrategyFactory() */ public StrategyFactory getStrategyFactory() { return strategyFactory; } /** * @see org.apache.wicket.security.WaspWebApplication#setupActionFactory() */ protected void setupActionFactory() { if (actionFactory == null) actionFactory = new SwarmActionFactory(); else throw new IllegalStateException("Can not initialize ActionFactory more then once"); } /** * @see org.apache.wicket.security.WaspWebApplication#setupStrategyFactory() */ protected void setupStrategyFactory() { if (strategyFactory == null) strategyFactory = new SwarmStrategyFactory(getHiveKey()); else throw new IllegalStateException("Can not initialize StrategyFactory more then once"); } /** * triggers the setup of the factories and the hive. Please remember to call * super.init when you override this method. * @see org.apache.wicket.security.WaspWebApplication#init() */ protected void init() { setupActionFactory(); setUpHive(); setupStrategyFactory(); } /** * Destroys the strategy factory and the action factory. In that order. If you * override ths method you must call super.destroy(). * @see Application#onDestroy() */ protected void onDestroy() { StrategyFactory factory = getStrategyFactory(); if (factory != null) factory.destroy(); ActionFactory factory2 = getActionFactory(); if (factory2 != null) factory2.destroy(); } } private static final Logger log = LoggerFactory.getLogger(ExtendsTest.class); /** * @see junit.framework.TestCase#setUp() */ protected void setUp() throws Exception { mock = new WicketTester(application = new TestApplication(), "src/test/java/" + getClass().getPackage().getName().replace('.', '/')); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f1965b283e36b14dfc89d7ca8abe79cea559a37d
379299e5540f04452ad17f23931fa724f58cfbdc
/sql-processor/src/main/java/org/sqlproc/engine/type/SqlCharType.java
9cc8198c8bc84fa889b4066921484b99793a5bc0
[]
no_license
hudec/sql-processor
e9e7d8162f27e36b0d2cc4885c796acdf5e667b0
83aaf54d634673d3903abec57a91fc6b6fc8bd28
refs/heads/master
2023-08-29T01:35:17.719273
2020-03-09T11:49:29
2020-03-09T11:49:29
1,592,013
22
9
null
2022-12-16T05:14:46
2011-04-09T16:55:26
Java
UTF-8
Java
false
false
513
java
package org.sqlproc.engine.type; /** * The META type CHARACTER. * * @author <a href="mailto:Vladimir.Hudec@gmail.com">Vladimir Hudec</a> */ public abstract class SqlCharType extends SqlDefaultType { /** * {@inheritDoc} */ @Override public Class<?>[] getClassTypes() { return new Class[] { Character.class, char.class }; } /** * {@inheritDoc} */ @Override public String[] getMetaTypes() { return new String[] { "CHARACTER", "CHAR" }; } }
[ "Vladimir.Hudec@gmail.com" ]
Vladimir.Hudec@gmail.com
7986fdc601c952bf46042baed2db4376728d0697
aa623c778fd88082cf59f442ad3cb671253ffc37
/src/main/java/com/tencentcloudapi/dayu/v20180709/models/DescribeCCIpAllowDenyResponse.java
21951c15eb2125cf0418a0785c5627befb73e765
[ "Apache-2.0" ]
permissive
zjm9109/tencentcloud-sdk-java
1eac89cedd70c8111c300d050f2c2f2ab1839189
a31d2d50f75dc740457289db0bf93ed8b3994c73
refs/heads/master
2020-09-30T10:32:57.836303
2019-12-05T14:18:17
2019-12-05T14:18:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,029
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * 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.tencentcloudapi.dayu.v20180709.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DescribeCCIpAllowDenyResponse extends AbstractModel{ /** * 该字段被RecordList字段替代了,请不要使用 */ @SerializedName("Data") @Expose private KeyValue [] Data; /** * 记录数 */ @SerializedName("Total") @Expose private Long Total; /** * 返回黑/白名单的记录, "Key":"ip"时,"Value":值表示ip; "Key":"domain"时, "Value":值表示域名; "Key":"type"时,"Value":值表示黑白名单类型(white为白名单,block为黑名单); "Key":"protocol"时,"Value":值表示CC防护的协议(http或https); */ @SerializedName("RecordList") @Expose private KeyValueRecord [] RecordList; /** * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * 获取该字段被RecordList字段替代了,请不要使用 * @return Data 该字段被RecordList字段替代了,请不要使用 */ public KeyValue [] getData() { return this.Data; } /** * 设置该字段被RecordList字段替代了,请不要使用 * @param Data 该字段被RecordList字段替代了,请不要使用 */ public void setData(KeyValue [] Data) { this.Data = Data; } /** * 获取记录数 * @return Total 记录数 */ public Long getTotal() { return this.Total; } /** * 设置记录数 * @param Total 记录数 */ public void setTotal(Long Total) { this.Total = Total; } /** * 获取返回黑/白名单的记录, "Key":"ip"时,"Value":值表示ip; "Key":"domain"时, "Value":值表示域名; "Key":"type"时,"Value":值表示黑白名单类型(white为白名单,block为黑名单); "Key":"protocol"时,"Value":值表示CC防护的协议(http或https); * @return RecordList 返回黑/白名单的记录, "Key":"ip"时,"Value":值表示ip; "Key":"domain"时, "Value":值表示域名; "Key":"type"时,"Value":值表示黑白名单类型(white为白名单,block为黑名单); "Key":"protocol"时,"Value":值表示CC防护的协议(http或https); */ public KeyValueRecord [] getRecordList() { return this.RecordList; } /** * 设置返回黑/白名单的记录, "Key":"ip"时,"Value":值表示ip; "Key":"domain"时, "Value":值表示域名; "Key":"type"时,"Value":值表示黑白名单类型(white为白名单,block为黑名单); "Key":"protocol"时,"Value":值表示CC防护的协议(http或https); * @param RecordList 返回黑/白名单的记录, "Key":"ip"时,"Value":值表示ip; "Key":"domain"时, "Value":值表示域名; "Key":"type"时,"Value":值表示黑白名单类型(white为白名单,block为黑名单); "Key":"protocol"时,"Value":值表示CC防护的协议(http或https); */ public void setRecordList(KeyValueRecord [] RecordList) { this.RecordList = RecordList; } /** * 获取唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public String getRequestId() { return this.RequestId; } /** * 设置唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } /** * 内部实现,用户禁止调用 */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamArrayObj(map, prefix + "Data.", this.Data); this.setParamSimple(map, prefix + "Total", this.Total); this.setParamArrayObj(map, prefix + "RecordList.", this.RecordList); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
73db86584541d2947c2be8c70f4cad1673fabae8
1d27d2a1723e08b5d6c4ee874f7100787c5f0d6f
/04.DbAppsIntroduction-Exercise/src/p09_increase_age_stored_procedure/Main.java
472c18f3b8dfa4a94b840d915f011ee94898b625
[]
no_license
AleksandarBoev/Software-University-Databases-Frameworks-Hibernate-and-Spring-Data
87e0ecfd51734cbe76c9e39bb0eae1f1dfdc01e3
23728e724fc145a0ab0f617287919c565a3cbe8a
refs/heads/master
2020-04-02T21:12:24.658526
2018-12-18T16:52:05
2018-12-18T16:52:05
154,790,922
0
1
null
null
null
null
UTF-8
Java
false
false
1,570
java
package p09_increase_age_stored_procedure; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.sql.*; import java.util.Properties; /* Stored procedure code: DELIMITER $$ CREATE PROCEDURE usp_get_older(minionId INT) BEGIN UPDATE minions SET age = age + 1 WHERE id = minionId; END$$ */ public class Main { public static void main(String[] args) throws SQLException, IOException { Properties credentials = new Properties(); credentials.setProperty("user", "root"); credentials.setProperty("password", ""); Connection connectionToDb = DriverManager.getConnection( "jdbc:mysql://127.0.0.1/minions_db", credentials ); PreparedStatement sqlCallProcedure = connectionToDb.prepareStatement( "CALL usp_get_older(?)" ); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); Integer minionId = Integer.parseInt(reader.readLine()); reader.close(); sqlCallProcedure.setInt(1, minionId); sqlCallProcedure.execute(); PreparedStatement sqlGetCertainMinion = connectionToDb.prepareStatement( "SELECT name, age FROM minions WHERE id = ?" ); sqlGetCertainMinion.setInt(1, minionId); ResultSet resultSet = sqlGetCertainMinion.executeQuery(); while (resultSet.next()) { System.out.printf("%s %d", resultSet.getString("name"), resultSet.getInt("age")); } connectionToDb.close(); } }
[ "aleksandarboev95@gmail.com" ]
aleksandarboev95@gmail.com
7b1f4581bf3dea445350f0f0902055821be93182
51c3050325d2584824915efba70f003dd943ffa6
/pulltorefresh/src/main/java/com/hankkin/library/RefreshListHeader.java
3cf17a15f174082befd5071a96f22625d00dab1d
[]
no_license
beyond-snail/xywf
2fff68e7e47238b8bae2256968adae52261844c2
87888ba76d1a8b3d86276a55aff625eeea406042
refs/heads/master
2021-05-06T07:04:48.164434
2018-10-29T08:23:16
2018-10-29T08:23:16
113,928,842
0
0
null
null
null
null
UTF-8
Java
false
false
4,284
java
package com.hankkin.library; import com.handmark.pulltorefresh.library.R; import android.content.Context; import android.graphics.drawable.AnimationDrawable; import android.util.AttributeSet; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.animation.Animation; import android.view.animation.RotateAnimation; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; public class RefreshListHeader extends LinearLayout { private LinearLayout mContainer; private ImageView mArrowImageView; private ImageView mProgressBar; private TextView mHintTextView; private int mState = STATE_NORMAL; private Animation mRotateUpAnim; private Animation mRotateDownAnim; protected AnimationDrawable mFooterChrysanthemumAd; private final int ROTATE_ANIM_DURATION = 180; public final static int STATE_NORMAL = 0; public final static int STATE_READY = 1; public final static int STATE_REFRESHING = 2; public RefreshListHeader(Context context) { super(context); initView(context); } /** * @param context * @param attrs */ public RefreshListHeader(Context context, AttributeSet attrs) { super(context, attrs); initView(context); } private void initView(Context context) { LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, 0); mContainer = (LinearLayout) LayoutInflater.from(context).inflate(R.layout.xlistview_header1, null); addView(mContainer, lp); setGravity(Gravity.BOTTOM); mArrowImageView = (ImageView) findViewById(R.id.xlistview_header_arrow); mHintTextView = (TextView) findViewById(R.id.xlistview_header_hint_textview); mProgressBar = (ImageView) findViewById(R.id.xlistview_header_progressbar); mFooterChrysanthemumAd = (AnimationDrawable) mProgressBar.getDrawable(); mRotateUpAnim = new RotateAnimation(0.0f, -180.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); mRotateUpAnim.setDuration(ROTATE_ANIM_DURATION); mRotateUpAnim.setFillAfter(true); mRotateDownAnim = new RotateAnimation(-180.0f, 0.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); mRotateDownAnim.setDuration(ROTATE_ANIM_DURATION); mRotateDownAnim.setFillAfter(true); } public void setState(int state) { if (state == mState) return; if (state == STATE_REFRESHING) { mArrowImageView.clearAnimation(); mArrowImageView.setVisibility(View.INVISIBLE); mProgressBar.setVisibility(View.VISIBLE); mFooterChrysanthemumAd.start(); } else { mArrowImageView.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.INVISIBLE); mFooterChrysanthemumAd.stop(); } switch (state) { case STATE_NORMAL: if (mState == STATE_READY) { mArrowImageView.startAnimation(mRotateDownAnim); } if (mState == STATE_REFRESHING) { mArrowImageView.clearAnimation(); } mHintTextView.setText(R.string.xlistview_header_hint_normal); break; case STATE_READY: if (mState != STATE_READY) { mArrowImageView.clearAnimation(); mArrowImageView.startAnimation(mRotateUpAnim); mHintTextView.setText(R.string.xlistview_header_hint_ready); } break; case STATE_REFRESHING: mHintTextView.setText(R.string.xlistview_header_hint_loading); mFooterChrysanthemumAd.start(); break; default: } mState = state; } public void setVisiableHeight(int height) { if (height < 0) height = 0; LayoutParams lp = (LayoutParams) mContainer.getLayoutParams(); lp.height = height; mContainer.setLayoutParams(lp); } public int getVisiableHeight() { return mContainer.getHeight(); } }
[ "wu15979937502" ]
wu15979937502
2a8d97c9ca73e5c4ffc7fd55019c06e4b8935088
062a70522c8821e57b618fa20b872fb161fc533c
/src/main/java/com/gestankbratwurst/eproaddons/addons/customitems/CustomItemTask.java
99e62d53db581a50b8aee9c38a14b5912481abc5
[]
no_license
Flo0/EproAddons
b119977cb125cd947857939dd9033286338b6fad
84f36f2ca56d62c0bd2ccd8f9570185553fc08aa
refs/heads/master
2023-01-20T21:37:53.646660
2020-11-28T19:25:08
2020-11-28T19:25:08
316,806,533
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
package com.gestankbratwurst.eproaddons.addons.customitems; /******************************************************* * Copyright (C) Gestankbratwurst suotokka@gmail.com * * This file is part of EproAddons and was created at the 23.11.2020 * * EproAddons can not be copied and/or distributed without the express * permission of the owner. * */ public interface CustomItemTask { boolean isDone(); void tick(); }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
c042cf3166106ee9fdd17b83bc0bf50aba0abca0
c84211b58757f75d6b4b586fb0d21b836ec06b2e
/src/main/java/com/test/entity/Fruit88.java
9778c872858a781aec1701124d31d3f4b34d8a79
[]
no_license
stuartwdouglas/jcon-crud
b935d51b51353e565ac448daa1ad16d76fa8f007
25039371a7242951090a7feda51e2485e415e743
refs/heads/main
2023-08-24T01:18:55.216263
2021-10-07T11:36:41
2021-10-07T11:36:41
413,622,405
0
0
null
null
null
null
UTF-8
Java
false
false
1,132
java
package com.test.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.SequenceGenerator; import javax.persistence.Table; @Entity @Table(name = "known_fruits88") public class Fruit88 { @Id @SequenceGenerator( name = "fruitsSequence88", sequenceName = "known_fruits_id_seq88", allocationSize = 1, initialValue = 4) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "fruitsSequence88") private Integer id; @Column(length = 40, unique = true) private String name; public Fruit88() { } public Fruit88(String name) { this.name = name; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
7873775bc39d477507cbe462988daecd144e97dd
88483bbcd6b6b3038233d0a7ebda6c493e4ef589
/JavaEE Framework/SSM2017案例/ssm_case/src/main/java/com/gs/bean/Cash.java
36dd35bb396555c0b5b691c59b68082ed4414d57
[]
no_license
tjy1985001/Teaching
5760eab3cd3e6c4cd1332c80fcf8098c160a7deb
31e090c866493443b5a944c043fbfb2f1c90c372
refs/heads/master
2020-06-06T22:37:51.921889
2018-12-10T03:45:51
2018-12-10T03:45:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,663
java
package com.gs.bean; import java.math.BigDecimal; import java.sql.Timestamp; /** * Created by Administrator on 2017/12/4. */ public class Cash { private Long id; private BigDecimal money; private Timestamp cashTime; private String cashCustomer; private Long cashType; private Long payType; private Long userId; private Timestamp createTime; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public BigDecimal getMoney() { return money; } public void setMoney(BigDecimal money) { this.money = money; } public Timestamp getCashTime() { return cashTime; } public void setCashTime(Timestamp cashTime) { this.cashTime = cashTime; } public String getCashCustomer() { return cashCustomer; } public void setCashCustomer(String cashCustomer) { this.cashCustomer = cashCustomer; } public Long getCashType() { return cashType; } public void setCashType(Long cashType) { this.cashType = cashType; } public Long getPayType() { return payType; } public void setPayType(Long payType) { this.payType = payType; } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public Timestamp getCreateTime() { return createTime; } public void setCreateTime(Timestamp createTime) { this.createTime = createTime; } }
[ "847315251@qq.com" ]
847315251@qq.com
a21060b1924d20e9e7f38c51ea63ca369f1146cf
e0f13e1839adb80398fa8fd1b2df9d2d24b7fcfa
/chaos-test/src/main/java/cn/amos/chaos/test/dao/entity/UserGroupEntity.java
5fdb54a2f1f4cdbbc8d52d4907a960392cb82673
[]
no_license
AmosWang0626/chaos
617d41490d62bb7c7ac1743148b452bf17480842
4736fb9dc89d3ebd25ebbba4c377da9434a6d1ed
refs/heads/master
2023-06-23T09:23:18.242936
2023-02-23T14:44:58
2023-02-23T14:44:58
118,746,909
1
0
null
2023-06-14T22:32:56
2018-01-24T10:01:04
Java
UTF-8
Java
false
false
1,364
java
package cn.amos.chaos.test.dao.entity; import lombok.*; import lombok.experimental.Accessors; import javax.persistence.*; import java.io.Serializable; import java.util.Objects; /** * DESCRIPTION: user & group * * @author <a href="mailto:amos.wang@xiaoi.com">amos.wang</a> * @date 2019/11/27 */ @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Accessors(chain = true) @Builder @Entity @Table(name = "DEV_USER_GROUP") @IdClass(UserGroupIds.class) public class UserGroupEntity implements Serializable { @Id @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "user_id") private UserEntity user; @Id @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "group_id") private GroupEntity group; private Integer type; @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof UserGroupEntity)) return false; UserGroupEntity that = (UserGroupEntity) o; return Objects.equals(user.getId(), that.user.getId()) && Objects.equals(group.getId(), that.group.getId()) && Objects.equals(type, that.type); } @Override public int hashCode() { if (user == null || group == null) { return super.hashCode(); } return Objects.hash(user.getId(), group.getId(), type); } }
[ "1833063210@qq.com" ]
1833063210@qq.com
470b309c7bc43d29daa2fad145a3edba4eac33e1
1b523bf1b3bfd9782227ca394ac20143baf4974c
/official/chapter05/phoneme/phoneme_modify_src/midp_src/src/test/common/i3test/com/sun/midp/util/FailTest.java
1d6e0faa312eb42a91508ead7687722bb14234e9
[]
no_license
Joyounger/armlinuxbook
66c80192a2d4ea068bba2e21c92067705da08949
b7fea1d8c235cbd1f4551b5495bbacc777d91916
refs/heads/master
2021-05-06T10:17:58.433025
2018-03-31T09:14:02
2018-03-31T09:14:02
114,165,147
1
1
null
null
null
null
UTF-8
Java
false
false
1,610
java
/* * * * Copyright 1990-2008 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version * 2 only, as published by the Free Software Foundation. * * 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 version 2 for more details (a copy is * included at /legal/license.txt). * * You should have received a copy of the GNU General Public License * version 2 along with this work; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA * * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa * Clara, CA 95054 or visit www.sun.com if you need additional * information or have any questions. */ package com.sun.midp.util; import com.sun.midp.i3test.TestCase; /** * An i3test that fails. Useful for ensuring that i3test runs that include a * failure report their exit status properly. Note that this class doesn't * follow the typical naming conventions, so it isn't included as part of the * normal test run. To invoke it, you must name the class explicitly on the * i3test command line. */ public class FailTest extends TestCase { public void runTests() { declare("testFail"); fail("testFail has failed as expected"); } }
[ "942510346@qq.com" ]
942510346@qq.com
f724fbcc20eba785049fdf4c8aac30a2197aa7ff
82059ed835572ae804ba3d6603abe20ff9a3aa85
/entities/src/test/java/de/kisner/otrcast/model/xml/cut/TestXmlFileName.java
599126ff215f6175b7f556bba2d7e3ae0f82854f
[]
no_license
thorsten-k/otrcast
e5db7cfaffae93abb27223aed83f097f638b3eb2
6bb283d5eefc41908f22f939fd972a4c42d3356e
refs/heads/master
2023-07-22T23:34:14.574435
2023-07-09T06:46:05
2023-07-09T06:46:05
39,729,765
0
6
null
2023-01-03T13:14:29
2015-07-26T15:12:51
Java
UTF-8
Java
false
false
770
java
package de.kisner.otrcast.model.xml.cut; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import de.kisner.otrcast.test.OtrXmlTestBootstrap; public class TestXmlFileName extends AbstractXmlCutTest<FileName> { final static Logger logger = LoggerFactory.getLogger(TestXmlFileName.class); public TestXmlFileName(){super(FileName.class);} public static FileName create(boolean withChildren){return (new TestXmlFileName()).build(withChildren);} public FileName build(boolean withChilds) { FileName xml = new FileName(); xml.setValue("myFile.mp4"); return xml; } public static void main(String[] args) { OtrXmlTestBootstrap.init(); TestXmlFileName test = new TestXmlFileName(); test.saveReferenceXml(); } }
[ "t.kisner@web.de" ]
t.kisner@web.de
714e3665ac570df5c76d79aa5c74b9d62b91f4ee
5708880334865933b337dd1d8aa33fab682966c8
/chapter-0523/src/main/java/com/gupaoedu/michael/business/qualification/service/LotteryQualifyService.java
24876c02d2af118ac947cb71046feaf96cc29e13
[]
no_license
EvanLeung08/eshare-learning-materials
2c281425dec9272f763c81c14defe8846f5d1e9f
9ee92c9fd38a03c4b8f3d354715cea055e3dfa8b
refs/heads/master
2020-04-15T12:54:07.969892
2019-01-08T16:44:41
2019-01-08T16:44:41
164,691,741
2
0
null
null
null
null
UTF-8
Java
false
false
423
java
package com.gupaoedu.michael.business.qualification.service; import com.gupaoedu.michael.business.draw.domain.valobj.DrawLotteryContext; /** * 腾讯课堂搜索 咕泡学院 * 加群获取视频:608583947 * 风骚的Michael 老师 */ public interface LotteryQualifyService { /** * 资格判断 * @param context * @return */ boolean checkLotteryCondition(DrawLotteryContext context); }
[ "10856214@163.com" ]
10856214@163.com
73914a375ab4b66d66bd0536714f4df3ec17cf76
45bcb90c060c335bc18877c6154a158f67967148
/pvmanager/datasource-graphene/src/main/java/org/diirt/datasource/graphene/ScatterGraph2DFunction.java
f6275fe424eb91b6d8afb433c8584cb2ca2eac02
[ "MIT" ]
permissive
gcarcassi/diirt
fee958d4606fe1c619ab28dde2d39bfdb68ccb5f
f2a7caa176f3f76f24c7cfa844029168e9634bb2
refs/heads/master
2020-04-05T22:58:09.892003
2017-06-02T15:23:44
2017-06-02T15:23:44
50,449,601
0
0
null
2016-01-26T18:27:46
2016-01-26T18:27:45
null
UTF-8
Java
false
false
3,338
java
/** * Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT * All rights reserved. Use is subject to license terms. See LICENSE.TXT */ package org.diirt.datasource.graphene; import java.awt.image.BufferedImage; import java.util.List; import org.diirt.graphene.Point2DDataset; import org.diirt.graphene.ScatterGraph2DRenderer; import org.diirt.graphene.ScatterGraph2DRendererUpdate; import org.diirt.datasource.QueueCollector; import org.diirt.datasource.ReadFunction; import org.diirt.vtype.VImage; import org.diirt.vtype.VTable; import org.diirt.vtype.ValueUtil; import static org.diirt.datasource.graphene.ArgumentExpressions.*; /** * @author shroffk * */ public class ScatterGraph2DFunction implements ReadFunction<Graph2DResult> { private ReadFunction<? extends VTable> tableData; private ReadFunctionArgument<String> xColumnName; private ReadFunctionArgument<String> yColumnName; private ReadFunctionArgument<String> tooltipColumnName; private ScatterGraph2DRenderer renderer = new ScatterGraph2DRenderer(300, 200); private VImage previousImage; private final QueueCollector<ScatterGraph2DRendererUpdate> rendererUpdateQueue = new QueueCollector<>( 100); public ScatterGraph2DFunction(ReadFunction<?> tableData, ReadFunction<?> xColumnName, ReadFunction<?> yColumnName, ReadFunction<?> tooltipColumnName) { this.tableData = new CheckedReadFunction<>(tableData, "Data", VTable.class); this.xColumnName = stringArgument(xColumnName, "X Column"); this.yColumnName = stringArgument(yColumnName, "Y Column"); this.tooltipColumnName = stringArgument(tooltipColumnName, "Tooltip Column"); } public QueueCollector<ScatterGraph2DRendererUpdate> getRendererUpdateQueue() { return rendererUpdateQueue; } @Override public Graph2DResult readValue() { VTable vTable = tableData.readValue(); xColumnName.readNext(); yColumnName.readNext(); tooltipColumnName.readNext(); // Table and columns must be available if (vTable == null || xColumnName.isMissing() || yColumnName.isMissing()) { return null; } // Prepare new dataset Point2DDataset dataset = DatasetConversions.point2DDatasetFromVTable(vTable, xColumnName.getValue(), yColumnName.getValue()); List<ScatterGraph2DRendererUpdate> updates = rendererUpdateQueue .readValue(); for (ScatterGraph2DRendererUpdate scatterGraph2DRendererUpdate : updates) { renderer.update(scatterGraph2DRendererUpdate); } if (renderer.getImageHeight() == 0 && renderer.getImageWidth() == 0) { return null; } BufferedImage image = new BufferedImage(renderer.getImageWidth(), renderer.getImageHeight(), BufferedImage.TYPE_3BYTE_BGR); renderer.draw(image.createGraphics(), dataset); previousImage = ValueUtil.toVImage(image); return new Graph2DResult(vTable, previousImage, new GraphDataRange(renderer.getXPlotRange(), renderer.getXPlotRange(), renderer.getXAggregatedRange()), new GraphDataRange( renderer.getYPlotRange(), renderer.getYPlotRange(), renderer.getYAggregatedRange()), -1); } }
[ "gabriele.carcassi@gmail.com" ]
gabriele.carcassi@gmail.com
b7011c0f91f87d96bcc756c050579d5d0fdcfe75
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/aweme/newfollow/p1424vh/UpLoadRecoverItemViewHolder_ViewBinding.java
d18428062eee7fb0bcc5aa5bee1e6f81dc010179
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,134
java
package com.p280ss.android.ugc.aweme.newfollow.p1424vh; import android.view.View; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; import butterknife.Unbinder; import butterknife.internal.Utils; import com.p280ss.android.ugc.aweme.base.p308ui.RemoteImageView; import com.zhiliaoapp.musically.df_live_zego_link.R; /* renamed from: com.ss.android.ugc.aweme.newfollow.vh.UpLoadRecoverItemViewHolder_ViewBinding */ public class UpLoadRecoverItemViewHolder_ViewBinding implements Unbinder { /* renamed from: a */ private UpLoadRecoverItemViewHolder f89378a; public void unbind() { UpLoadRecoverItemViewHolder upLoadRecoverItemViewHolder = this.f89378a; if (upLoadRecoverItemViewHolder != null) { this.f89378a = null; upLoadRecoverItemViewHolder.mCoverImage = null; upLoadRecoverItemViewHolder.mTextView = null; upLoadRecoverItemViewHolder.mProgressBar = null; upLoadRecoverItemViewHolder.mIvClose = null; upLoadRecoverItemViewHolder.mIvRefresh = null; return; } throw new IllegalStateException("Bindings already cleared."); } public UpLoadRecoverItemViewHolder_ViewBinding(UpLoadRecoverItemViewHolder upLoadRecoverItemViewHolder, View view) { this.f89378a = upLoadRecoverItemViewHolder; upLoadRecoverItemViewHolder.mCoverImage = (RemoteImageView) Utils.findRequiredViewAsType(view, R.id.a4j, "field 'mCoverImage'", RemoteImageView.class); upLoadRecoverItemViewHolder.mTextView = (TextView) Utils.findRequiredViewAsType(view, R.id.e8a, "field 'mTextView'", TextView.class); upLoadRecoverItemViewHolder.mProgressBar = (ProgressBar) Utils.findRequiredViewAsType(view, R.id.e8c, "field 'mProgressBar'", ProgressBar.class); upLoadRecoverItemViewHolder.mIvClose = (ImageView) Utils.findRequiredViewAsType(view, R.id.b7g, "field 'mIvClose'", ImageView.class); upLoadRecoverItemViewHolder.mIvRefresh = (ImageView) Utils.findRequiredViewAsType(view, R.id.bbg, "field 'mIvRefresh'", ImageView.class); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
5c3c28328a224f873fc7797f0b5323154e554974
6482753b5eb6357e7fe70e3057195e91682db323
/com/google/common/primitives/Primitives.java
78b5a7e1e631625e868c74fad416541b04a8470c
[]
no_license
TheShermanTanker/Server-1.16.3
45cf9996afa4cd4d8963f8fd0588ae4ee9dca93c
48cc08cb94c3094ebddb6ccfb4ea25538492bebf
refs/heads/master
2022-12-19T02:20:01.786819
2020-09-18T21:29:40
2020-09-18T21:29:40
296,730,962
0
1
null
null
null
null
UTF-8
Java
false
false
2,654
java
package com.google.common.primitives; import java.util.Collections; import java.util.HashMap; import com.google.common.base.Preconditions; import java.util.Set; import java.util.Map; import com.google.common.annotations.GwtIncompatible; @GwtIncompatible public final class Primitives { private static final Map<Class<?>, Class<?>> PRIMITIVE_TO_WRAPPER_TYPE; private static final Map<Class<?>, Class<?>> WRAPPER_TO_PRIMITIVE_TYPE; private Primitives() { } private static void add(final Map<Class<?>, Class<?>> forward, final Map<Class<?>, Class<?>> backward, final Class<?> key, final Class<?> value) { forward.put(key, value); backward.put(value, key); } public static Set<Class<?>> allPrimitiveTypes() { return (Set<Class<?>>)Primitives.PRIMITIVE_TO_WRAPPER_TYPE.keySet(); } public static Set<Class<?>> allWrapperTypes() { return (Set<Class<?>>)Primitives.WRAPPER_TO_PRIMITIVE_TYPE.keySet(); } public static boolean isWrapperType(final Class<?> type) { return Primitives.WRAPPER_TO_PRIMITIVE_TYPE.containsKey(Preconditions.<Class<?>>checkNotNull(type)); } public static <T> Class<T> wrap(final Class<T> type) { Preconditions.<Class<T>>checkNotNull(type); final Class<T> wrapped = (Class<T>)Primitives.PRIMITIVE_TO_WRAPPER_TYPE.get(type); return (wrapped == null) ? type : wrapped; } public static <T> Class<T> unwrap(final Class<T> type) { Preconditions.<Class<T>>checkNotNull(type); final Class<T> unwrapped = (Class<T>)Primitives.WRAPPER_TO_PRIMITIVE_TYPE.get(type); return (unwrapped == null) ? type : unwrapped; } static { final Map<Class<?>, Class<?>> primToWrap = (Map<Class<?>, Class<?>>)new HashMap(16); final Map<Class<?>, Class<?>> wrapToPrim = (Map<Class<?>, Class<?>>)new HashMap(16); add(primToWrap, wrapToPrim, Boolean.TYPE, Boolean.class); add(primToWrap, wrapToPrim, Byte.TYPE, Byte.class); add(primToWrap, wrapToPrim, Character.TYPE, Character.class); add(primToWrap, wrapToPrim, Double.TYPE, Double.class); add(primToWrap, wrapToPrim, Float.TYPE, Float.class); add(primToWrap, wrapToPrim, Integer.TYPE, Integer.class); add(primToWrap, wrapToPrim, Long.TYPE, Long.class); add(primToWrap, wrapToPrim, Short.TYPE, Short.class); add(primToWrap, wrapToPrim, Void.TYPE, Void.class); PRIMITIVE_TO_WRAPPER_TYPE = Collections.unmodifiableMap((Map)primToWrap); WRAPPER_TO_PRIMITIVE_TYPE = Collections.unmodifiableMap((Map)wrapToPrim); } }
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
864abccdcb53e4b2fff6c58ca51385beb224541f
18e42a09d7f5dacc1bbeeae4c22284c60cc88b1f
/xstream/src/test/com/thoughtworks/acceptance/ConcurrentTypesTest.java
0d6d16246fe57213b571a2faa77ac32d0d678ee7
[ "BSD-3-Clause" ]
permissive
x-stream/xstream
ab7f586f1d682902bbf96f3be2b953df98ff32c3
289ae780001c31d7d5d75e0d58608c13f44549a2
refs/heads/master
2023-08-30T19:33:58.497180
2023-04-22T16:03:39
2023-04-22T16:03:39
32,219,624
818
270
NOASSERTION
2023-05-02T23:36:09
2015-03-14T15:57:12
Java
UTF-8
Java
false
false
5,549
java
/* * Copyright (C) 2012, 2015, 2017, 2018, 2021, 2022 XStream Committers. * All rights reserved. * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * * Created on 17. July 2018 by Joerg Schaible, renamed from Concurrent15TypesTest */ package com.thoughtworks.acceptance; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; import com.thoughtworks.acceptance.objects.Original; import com.thoughtworks.acceptance.objects.Replaced; import com.thoughtworks.xstream.converters.collections.MapConverter; public class ConcurrentTypesTest extends AbstractAcceptanceTest { public void testConcurrentHashMap() { final ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>(); map.put("walnes", "joe"); final String xml = xstream.toXML(map); final String expected = "" + "<concurrent-hash-map>\n" + " <entry>\n" + " <string>walnes</string>\n" + " <string>joe</string>\n" + " </entry>\n" + "</concurrent-hash-map>"; assertEquals(xml, expected); final ConcurrentHashMap<String, String> out = xstream.fromXML(xml); assertEquals("{walnes=joe}", out.toString()); } public static class DerivedConcurrentHashMap extends ConcurrentHashMap<Object, Object> { private static final long serialVersionUID = 1L; } public void testDerivedConcurrentHashMap() { xstream.alias("derived-map", DerivedConcurrentHashMap.class); xstream.registerConverter(new MapConverter(xstream.getMapper(), DerivedConcurrentHashMap.class)); final Map<Object, Object> map = new DerivedConcurrentHashMap(); map.put("test", "JUnit"); final String xml = "" + "<derived-map>\n" + " <entry>\n" + " <string>test</string>\n" + " <string>JUnit</string>\n" + " </entry>\n" + "</derived-map>"; assertBothWays(map, xml); } public void testAtomicBoolean() { final AtomicBoolean atomicBoolean = new AtomicBoolean(); assertBothWays(atomicBoolean, "<atomic-boolean>" + atomicBoolean + "</atomic-boolean>"); } public void testAtomicBooleanWithOldFormat() { assertEquals(new AtomicBoolean(true).toString(), xstream.fromXML("" // + "<java.util.concurrent.atomic.AtomicBoolean>\n" // + " <value>1</value>\n" // + "</java.util.concurrent.atomic.AtomicBoolean>").toString()); } public void testAtomicInteger() { final AtomicInteger atomicInteger = new AtomicInteger(42); assertBothWays(atomicInteger, "<atomic-int>" + atomicInteger + "</atomic-int>"); } public void testAtomicIntegerWithOldFormat() { assertEquals(new AtomicInteger(42).toString(), xstream.fromXML("" // + "<java.util.concurrent.atomic.AtomicInteger>\n" // + " <value>42</value>\n" // + "</java.util.concurrent.atomic.AtomicInteger>").toString()); } public void testAtomicLong() { final AtomicLong atomicLong = new AtomicLong(42); assertBothWays(atomicLong, "<atomic-long>" + atomicLong + "</atomic-long>"); } public void testAtomicLongWithOldFormat() { assertEquals(new AtomicInteger(42).toString(), xstream.fromXML("" // + "<java.util.concurrent.atomic.AtomicLong>\n" // + " <value>42</value>\n" // + "</java.util.concurrent.atomic.AtomicLong>").toString()); } public void testAtomicReference() { final AtomicReference<String> atomicRef = new AtomicReference<>("test"); assertBothWays(atomicRef, ("" // + "<atomic-reference>\n" // + " <value class='string'>test</value>\n" // + "</atomic-reference>").replace('\'', '"')); } @SuppressWarnings("unchecked") public void testAtomicReferenceWithOldFormat() { assertEquals(new AtomicReference<String>("test").get(), ((AtomicReference<String>)xstream.fromXML("" // + "<java.util.concurrent.atomic.AtomicReference>\n" // + " <value class='string'>test</value>\n" // + "</java.util.concurrent.atomic.AtomicReference>")).get()); } public void testAtomicReferenceWithAlias() { xstream.aliasField("junit", AtomicReference.class, "value"); final AtomicReference<String> atomicRef = new AtomicReference<>("test"); assertBothWays(atomicRef, ("" // + "<atomic-reference>\n" // + " <junit class='string'>test</junit>\n" // + "</atomic-reference>").replace('\'', '"')); } public void testAtomicReferenceWithReplaced() { xstream.alias("original", Original.class); xstream.alias("replaced", Replaced.class); final AtomicReference<Original> atomicRef = new AtomicReference<>(new Original("test")); assertBothWays(atomicRef, ("" // + "<atomic-reference>\n" // + " <value class='original' resolves-to='replaced'>\n" + " <replacedValue>TEST</replacedValue>\n" + " </value>\n" // + "</atomic-reference>").replace('\'', '"')); } }
[ "joerg.schaible@gmx.de" ]
joerg.schaible@gmx.de
4ba9ee4b40a791b121e0f788d0a5a09b78abb935
88d031ad952813de055b5b7dfc9653acf045425d
/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/convert/QueryMapperUnitTests.java
cf304a4b70fe8e3219eb6ec1bc0575058acbd28c
[]
no_license
whirlwind-match/spring-data-mongodb
4efa5de37a32f0a7ecae719cc5e2e47d76c5511d
ba9abd1dd06d9c25d47d1edb8350c308ad91ec9f
refs/heads/master
2021-01-18T10:41:21.887142
2012-06-20T10:23:32
2012-06-20T10:24:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,138
java
/* * Copyright (c) 2011 by the original author(s). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.data.mongodb.core.convert; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import static org.springframework.data.mongodb.core.query.Criteria.*; import static org.springframework.data.mongodb.core.query.Query.*; import java.math.BigInteger; import java.util.Arrays; import org.bson.types.ObjectId; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.MongoDbFactory; import org.springframework.data.mongodb.core.Person; import org.springframework.data.mongodb.core.mapping.MongoMappingContext; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.query.BasicQuery; import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Query; import com.mongodb.BasicDBList; import com.mongodb.BasicDBObject; import com.mongodb.DBObject; import com.mongodb.QueryBuilder; /** * Unit tests for {@link QueryMapper}. * * @author Oliver Gierke */ @RunWith(MockitoJUnitRunner.class) @SuppressWarnings("unused") public class QueryMapperUnitTests { QueryMapper mapper; MongoMappingContext context; @Mock MongoDbFactory factory; @Before public void setUp() { context = new MongoMappingContext(); MappingMongoConverter converter = new MappingMongoConverter(factory, context); converter.afterPropertiesSet(); mapper = new QueryMapper(converter); } @Test public void translatesIdPropertyIntoIdKey() { DBObject query = new BasicDBObject("foo", "value"); MongoPersistentEntity<?> entity = context.getPersistentEntity(Sample.class); DBObject result = mapper.getMappedObject(query, entity); assertThat(result.get("_id"), is(notNullValue())); assertThat(result.get("foo"), is(nullValue())); } @Test public void convertsStringIntoObjectId() { DBObject query = new BasicDBObject("_id", new ObjectId().toString()); DBObject result = mapper.getMappedObject(query, null); assertThat(result.get("_id"), is(instanceOf(ObjectId.class))); } @Test public void handlesBigIntegerIdsCorrectly() { DBObject dbObject = new BasicDBObject("id", new BigInteger("1")); DBObject result = mapper.getMappedObject(dbObject, null); assertThat(result.get("_id"), is((Object) "1")); } @Test public void handlesObjectIdCapableBigIntegerIdsCorrectly() { ObjectId id = new ObjectId(); DBObject dbObject = new BasicDBObject("id", new BigInteger(id.toString(), 16)); DBObject result = mapper.getMappedObject(dbObject, null); assertThat(result.get("_id"), is((Object) id)); } /** * @see DATAMONGO-278 */ @Test public void translates$NeCorrectly() { Criteria criteria = where("foo").ne(new ObjectId().toString()); DBObject result = mapper.getMappedObject(criteria.getCriteriaObject(), context.getPersistentEntity(Sample.class)); Object object = result.get("_id"); assertThat(object, is(instanceOf(DBObject.class))); DBObject dbObject = (DBObject) object; assertThat(dbObject.get("$ne"), is(instanceOf(ObjectId.class))); } /** * @see DATAMONGO-326 */ @Test public void handlesEnumsCorrectly() { Query query = query(where("foo").is(Enum.INSTANCE)); DBObject result = mapper.getMappedObject(query.getQueryObject(), null); Object object = result.get("foo"); assertThat(object, is(instanceOf(String.class))); } @Test public void handlesEnumsInNotEqualCorrectly() { Query query = query(where("foo").ne(Enum.INSTANCE)); DBObject result = mapper.getMappedObject(query.getQueryObject(), null); Object object = result.get("foo"); assertThat(object, is(instanceOf(DBObject.class))); Object ne = ((DBObject) object).get("$ne"); assertThat(ne, is(instanceOf(String.class))); assertThat(ne.toString(), is(Enum.INSTANCE.name())); } @Test public void handlesEnumsIn$InCorrectly() { Query query = query(where("foo").in(Enum.INSTANCE)); DBObject result = mapper.getMappedObject(query.getQueryObject(), null); Object object = result.get("foo"); assertThat(object, is(instanceOf(DBObject.class))); Object in = ((DBObject) object).get("$in"); assertThat(in, is(instanceOf(BasicDBList.class))); BasicDBList list = (BasicDBList) in; assertThat(list.size(), is(1)); assertThat(list.get(0), is(instanceOf(String.class))); assertThat(list.get(0).toString(), is(Enum.INSTANCE.name())); } /** * @see DATAMONGO-373 */ @Test public void handlesNativelyBuiltQueryCorrectly() { DBObject query = new QueryBuilder().or(new BasicDBObject("foo", "bar")).get(); mapper.getMappedObject(query, null); } /** * @see DATAMONGO-369 */ @Test public void handlesAllPropertiesIfDBObject() { DBObject query = new BasicDBObject(); query.put("foo", new BasicDBObject("$in", Arrays.asList(1, 2))); query.put("bar", new Person()); DBObject result = mapper.getMappedObject(query, null); assertThat(result.get("bar"), is(notNullValue())); } /** * @see DATAMONGO-429 */ @Test public void transformsArraysCorrectly() { Query query = new BasicQuery("{ 'tags' : { '$all' : [ 'green', 'orange']}}"); DBObject result = mapper.getMappedObject(query.getQueryObject(), null); assertThat(result, is(query.getQueryObject())); } class Sample { @Id private String foo; } class BigIntegerId { @Id private BigInteger id; } enum Enum { INSTANCE; } }
[ "info@olivergierke.de" ]
info@olivergierke.de
90f3cf7080e299001ff4d06c158d632175c23081
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/tinder/chat/view/ae.java
e799c62ad65f28aa5ad897ff6d45172a25aab4f1
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
304
java
package com.tinder.chat.view; import rx.functions.Action1; final /* synthetic */ class ae implements Action1 { /* renamed from: a */ static final Action1 f43649a = new ae(); private ae() { } public void call(Object obj) { ChatInputBoxContainer.e((Throwable) obj); } }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
90e090a40f5c30cf384420b545f316b4fca5ce01
baee3ef7cc98badf8a87e9f74ddd1a6d70b096b0
/.urionlinejudge/src/GRAPH/MillasToChicago.java
9f8133bde1e3ac97021684e26d3bc4a9e399254d
[]
no_license
groverinho/Java
eb4863737888d552ac313e23f0e7e2fd2dc45aa7
0b0c612eb03cf27b8310448bcf72da4565be0af6
refs/heads/master
2021-12-25T11:32:46.222179
2021-09-10T22:48:14
2021-09-10T22:48:14
47,481,887
2
0
null
null
null
null
UTF-8
Java
false
false
1,598
java
package GRAPH; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; public class MillasToChicago { public static void main(String[] args) { Scanner entrada = new Scanner(System.in); while (true) { int nodo = entrada.nextInt();//cantidad de nodos if (nodo== 0) break; int n = entrada.nextInt();//cantidad de vertices - conexiones double [][] matrizAdyacencia = new double[nodo][nodo]; // inicio todas las posiciones de mi matriz en 0 for (int i = 0; i < matrizAdyacencia.length; i++) for (int j = 0; j < matrizAdyacencia.length; j++) matrizAdyacencia[i][j]=0.0; //cargamos inicio, fin y pesos hasta n (cant de conexiones) for (int i = 0; i < n; i++) { int a = entrada.nextInt(); int b = entrada.nextInt(); int peso = entrada.nextInt(); matrizAdyacencia[a-1][b-1]=peso/100.0; matrizAdyacencia[b-1][a-1]=peso/100.0; } double[][]nueva = floyd(matrizAdyacencia,nodo); // for (int i = 0; i < matrizAdyacencia.length; i++) // { // for (int j = 0; j < matrizAdyacencia.length; j++) // { // System.out.print(matrizAdyacencia[i][j]+"\t"); // } // System.out.println(); // } System.out.printf("%.6f percent\n",nueva[0][nodo-1]*100.0); } } //algoritmo de floyd-warshall static double[][] floyd (double w[][],int n) { for (int k = 0; k < n; k++) { for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if(i!=j) w[i][j]=Math.max(w[i][j],w[i][k]*w[k][j]);//anadimos ruta minima en la posision } } } return w; } }
[ "grover_ariel@hotmail.com" ]
grover_ariel@hotmail.com
75742f8cda1353652b18d39164dfa187baff1e0e
91934389484a2a6afba2782d6a3915b913e1a6c9
/moco-core/src/main/java/com/github/dreamhead/moco/extractor/FormsRequestExtractor.java
d4b51e06b328167941331c28e2e578d5d254be8a
[ "MIT" ]
permissive
edgevagrant/moco
7ce1f1936578b6da72d9d80735d8e427fcfa4da4
9b3ab80f6b45612c80fc172b9814051f76e6c79d
refs/heads/master
2021-01-14T12:14:41.397409
2013-12-10T23:04:16
2013-12-10T23:04:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,914
java
package com.github.dreamhead.moco.extractor; import com.github.dreamhead.moco.RequestExtractor; import com.google.common.base.Optional; import com.google.common.collect.ImmutableMap; import io.netty.handler.codec.http.FullHttpRequest; import io.netty.handler.codec.http.multipart.Attribute; import io.netty.handler.codec.http.multipart.HttpPostRequestDecoder; import io.netty.handler.codec.http.multipart.InterfaceHttpData; import java.io.IOException; import java.util.List; import java.util.Map; import static com.google.common.base.Optional.absent; import static com.google.common.base.Optional.of; import static com.google.common.collect.ImmutableMap.copyOf; import static com.google.common.collect.Maps.newHashMap; public class FormsRequestExtractor implements RequestExtractor { public Optional<ImmutableMap<String, String>> extract(FullHttpRequest request) { HttpPostRequestDecoder decoder = null; try { decoder = new HttpPostRequestDecoder(request); return of(doExtractForms(decoder)); } catch (HttpPostRequestDecoder.IncompatibleDataDecoderException idde) { return absent(); } catch (IOException e) { throw new RuntimeException(e); } finally { if (decoder != null) { decoder.destroy(); } } } private ImmutableMap<String, String> doExtractForms(HttpPostRequestDecoder decoder) throws IOException { List<InterfaceHttpData> bodyHttpDatas = decoder.getBodyHttpDatas(); Map<String, String> forms = newHashMap(); for (InterfaceHttpData data : bodyHttpDatas) { if (data.getHttpDataType() == InterfaceHttpData.HttpDataType.Attribute) { Attribute attribute = (Attribute) data; forms.put(attribute.getName(), attribute.getValue()); } } return copyOf(forms); } }
[ "dreamhead.cn@gmail.com" ]
dreamhead.cn@gmail.com
1873fc68caee9c6647862804bf4c829033a564f3
9282591635f3cf5a640800f2b643cd57048ed29f
/app/src/main/java/com/android/p2pflowernet/project/view/fragments/mine/setting/feedback/FeedBackPopupWindow.java
15ed25d22dba532cc3a36b980f4794afc493d6e9
[]
no_license
AHGZ/B2CFlowerNetProject
de5dcbf2cbb67809b00f86639d592309d84b3283
b1556c4b633fa7c0c1463af94db9f91285070714
refs/heads/master
2020-03-09T17:27:14.889919
2018-04-10T09:36:33
2018-04-10T09:36:33
128,908,791
1
0
null
null
null
null
UTF-8
Java
false
false
3,380
java
package com.android.p2pflowernet.project.view.fragments.mine.setting.feedback; import android.content.Context; import android.graphics.drawable.ColorDrawable; import android.support.v4.app.FragmentActivity; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.WindowManager; import android.widget.Button; import android.widget.EditText; import android.widget.PopupWindow; import android.widget.RelativeLayout; import android.widget.TextView; import com.android.p2pflowernet.project.R; /** * Created by caishen on 2017/11/24. * by-- */ public class FeedBackPopupWindow extends PopupWindow { private FragmentActivity mContext; private View view; public FeedBackPopupWindow(FragmentActivity activity, String tvType, String tvReply, String etFeedback, String loginName) { this.mContext = activity; this.view = LayoutInflater.from(mContext).inflate(R.layout.feedback_popup_window, null); Button btn_cancle = (Button) view.findViewById(R.id.btn_cancle); TextView tv_reply = (TextView) view.findViewById(R.id.tv_reply); TextView tv_num_text = (TextView) view.findViewById(R.id.tv_num_text); TextView tv_type = (TextView) view.findViewById(R.id.tv_type); EditText et_feedback = (EditText) view.findViewById(R.id.et_feedback); TextView tv_login_name = (TextView) view.findViewById(R.id.tv_login_name); tv_login_name.setText(loginName); tv_type.setText(tvType); tv_num_text.setText(etFeedback.length() + "/100字"); tv_reply.setText(tvReply); et_feedback.setText(etFeedback); btn_cancle.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); // 设置外部可点击 this.setOutsideTouchable(true); // mMenuView添加OnTouchListener监听判断获取触屏位置如果在选择框外面则销毁弹出框 this.view.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { int height = view.findViewById(R.id.id_pop_layout).getTop(); int y = (int) event.getY(); if (event.getAction() == MotionEvent.ACTION_UP) { if (y < height) { dismiss(); } } return true; } }); /* 设置弹出窗口特征 */ // 设置视图 this.setContentView(this.view); WindowManager wm = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); int width = wm.getDefaultDisplay().getWidth(); int height = wm.getDefaultDisplay().getHeight(); // 设置弹出窗体的宽和高 this.setHeight(height * 2 / 3); this.setWidth(RelativeLayout.LayoutParams.MATCH_PARENT); // 设置弹出窗体可点击 this.setFocusable(true); // 实例化一个ColorDrawable颜色为半透明 ColorDrawable dw = new ColorDrawable(0xb0000000); // 设置弹出窗体的背景 this.setBackgroundDrawable(dw); // 设置弹出窗体显示时的动画,从底部向上弹出 this.setAnimationStyle(R.style.take_photo_anim); } }
[ "18911005030@163.com" ]
18911005030@163.com
9c335a4f5e721629ef6176cda024606ad05f9825
800391064d513694784e8d41c67b934fc9f885f3
/src/com/jdon/util/ClassUtil.java
b949ad0e51be634ba58903f9d49c2467b737ae17
[ "Apache-2.0" ]
permissive
aduan/jdonframework
3322088502205706de66398bcfe31e74402539cb
1a4ef2db995f9a851e387746eb8466a3189a283a
refs/heads/master
2021-01-18T08:56:26.212888
2013-04-27T06:07:33
2013-04-27T06:07:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,504
java
/* * Copyright 2003-2009 the original author or authors. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.jdon.util; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class ClassUtil { public static Class[] getParentAllInterfaces(Class pojoClass) { Class[] interfaces = null; try { List interfacesL = new ArrayList(); while (pojoClass != null) { for (int i = 0; i < pojoClass.getInterfaces().length; i++) { Class ifc = pojoClass.getInterfaces()[i]; // not add jdk interface if (!ifc.getName().startsWith("java.")) interfacesL.add(ifc); } pojoClass = pojoClass.getSuperclass(); } if (interfacesL.size() == 0) { throw new Exception(); } interfaces = (Class[]) interfacesL.toArray(new Class[interfacesL.size()]); } catch (Exception e) { } return interfaces; } public static Class[] getAllInterfaces(Class clazz) { if (clazz == null) { return new Class[0]; } List<Class> classList = new ArrayList<Class>(); while (clazz != null) { Class[] interfaces = clazz.getInterfaces(); for (Class interf : interfaces) { if (!classList.contains(interf)) { classList.add(interf); } Class[] superInterfaces = getAllInterfaces(interf); for (Class superIntf : superInterfaces) { if (!classList.contains(superIntf)) { classList.add(superIntf); } } } clazz = clazz.getSuperclass(); } return classList.toArray(new Class[classList.size()]); } public static Field[] getAllDecaredFields(Class clazz) { List<Field> fields = new ArrayList<Field>(); // fields.addAll(Arrays.asList(clazz.getDeclaredFields())); Class[] superClasses = getAllSuperclasses(clazz); for (Class superClass : superClasses) { fields.addAll(Arrays.asList(superClass.getDeclaredFields())); } return fields.toArray(new Field[fields.size()]); } public static Class finddAnnotationForMethod(Class clazz, Class annotationClass) { Class[] superClasses = getAllSuperclasses(clazz); if (superClasses != null) for (Class superClass : superClasses) { if (superClass.isAnnotationPresent(annotationClass)) { return superClass; } } superClasses = getParentAllInterfaces(clazz); if (superClasses != null) for (Class superClass : superClasses) { if (superClass.isAnnotationPresent(annotationClass)) { return superClass; } } return null; } public static Method finddAnnotationForMethod(Method m, Class annotationClass) { try { Class[] superClasses = getAllSuperclasses(m.getDeclaringClass()); if (superClasses != null) for (Class superClass : superClasses) { for (Method ms : superClass.getDeclaredMethods()) { if (ms.isAnnotationPresent(annotationClass)) { if (ms.getName() == m.getName()) { return ms; } } } } superClasses = getParentAllInterfaces(m.getDeclaringClass()); if (superClasses != null) for (Class superClass : superClasses) { for (Method ms : superClass.getDeclaredMethods()) { if (ms.isAnnotationPresent(annotationClass)) { if (ms.getName() == m.getName()) { return ms; } } } } } catch (SecurityException e) { e.printStackTrace(); } return null; } public static Method[] getAllDecaredMethods(Class clazz) { List<Method> methods = new ArrayList<Method>(); // fields.addAll(Arrays.asList(clazz.getDeclaredFields())); Class[] superClasses = getAllSuperclasses(clazz); for (Class superClass : superClasses) { methods.addAll(Arrays.asList(superClass.getDeclaredMethods())); } // superClasses = getParentAllInterfaces(clazz); // for (Class superClass : superClasses) { // methods.addAll(Arrays.asList(superClass.getDeclaredMethods())); // } return methods.toArray(new Method[methods.size()]); } public static Class[] getAllSuperclasses(Class cls) { if (cls == null) { return new Class[0]; } List<Class> classList = new ArrayList<Class>(); Class superClass = cls; while (superClass != null && !Object.class.equals(superClass) && !Class.class.equals(superClass)) { classList.add(superClass); superClass = superClass.getSuperclass(); } return classList.toArray(new Class[classList.size()]); } public static Field getDecaredField(Class clazz, String name) throws NoSuchFieldException { Field field = null; Class[] superClasses = getAllSuperclasses(clazz); for (Class superClass : superClasses) { try { field = superClass.getDeclaredField(name); break; } catch (NoSuchFieldException e) { // ignore } } if (field == null) { throw new NoSuchFieldException("No such declared field " + name + " in " + clazz); } return field; } }
[ "banq@163.com" ]
banq@163.com
cf8bdf58a32c4cbd9fdab941e6fcd26cf047ec9b
f4bb30d1ba864dfcc2a6b2e646f740693760a973
/javaenhance/src/cn/itcast/day3/MyAdvice.java
c5523efb20ec5ed66436a2050968faec7c7fa175
[]
no_license
zhaoccx/JavaBase
762e3a075aec5e369774fb4937692614fcca8c66
152d71eec8b7af444a2c5fc410a6bdbb3b576d4f
refs/heads/master
2020-12-13T07:45:35.219768
2017-10-25T13:04:37
2017-10-25T13:04:37
26,492,779
0
0
null
null
null
null
UTF-8
Java
false
false
529
java
package cn.itcast.day3; import java.lang.reflect.Method; public class MyAdvice implements Advice { long beginTime = 0; @Override public void afterMethod(Method method) { System.out.println("从传智播客毕业上班啦!"); long endTime = System.currentTimeMillis(); System.out.println(method.getName() + " running time of " + (endTime - beginTime)); } @Override public void beforeMethod(Method method) { System.out.println("到传智播客来学习啦!"); beginTime = System.currentTimeMillis(); } }
[ "zhaoccx@hotmail.com" ]
zhaoccx@hotmail.com
be67a350b0c9593451c62109af1de0e934e797d9
e9ad092dfc4efe87fe49e3d3083482311f765731
/dans-wicket/src/main/java/nl/knaw/dans/common/wicket/behavior/IncludeJsOrCssBehavior.java
3b49bf6c873766fb0bab81d47c308759bdd18d1c
[ "Apache-2.0" ]
permissive
DANS-KNAW/dccd-legacy-libs
e0f863cc5953dcceb9b91d4eb6ffdd0d37831bbb
687d2e434359ad80af0b192748475ec4a76529c4
refs/heads/master
2021-01-01T19:35:17.114074
2019-09-03T13:58:30
2019-09-03T13:58:30
37,195,178
0
1
Apache-2.0
2020-10-13T06:53:30
2015-06-10T12:15:06
Java
UTF-8
Java
false
false
3,032
java
/******************************************************************************* * Copyright 2015 DANS - Data Archiving and Networked Services * * 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 nl.knaw.dans.common.wicket.behavior; import org.apache.wicket.ResourceReference; import org.apache.wicket.behavior.AbstractBehavior; import org.apache.wicket.markup.html.IHeaderResponse; import org.apache.wicket.markup.html.resources.CompressedResourceReference; /** * <p> * Behavior that adds an included css or JS resource to component (e.g., a page). The scope is a class in * the same package as where the resource resides. Typically, the scope is the class object of a wicket * page or panel and the resource is CSS- or JavaScript file that is included in the source code in the * same package as the class. The HTML-template of the class can then refer to the resource without a * prefixed path. * </p> * <p> * Example: * * <pre> * JAVA FILE: * * public class MyPage extends Page { * * public MyPage() { * add(new IncludeResourceBehavior(MyPage.class, "myjavascript.js"); * // ... etc * * HTML-TEMPLATE MyPage.html: * * &lt;html&gt; * &lt;head&gt; * &lt;script type="text/javascript" src="myjavascript.js"&gt; * * &lt;-- etc --&gt; * </pre> */ public class IncludeJsOrCssBehavior extends AbstractBehavior { private static final long serialVersionUID = 5261628952131156563L; private final Class<?> scope; private final String resource; public IncludeJsOrCssBehavior(Class<?> scope, String resource) { if (!resource.endsWith(".js") && !resource.endsWith(".css")) { throw new IllegalArgumentException("Only JavaScript or CSS resources can be rendered"); } this.scope = scope; this.resource = resource; } @Override public void renderHead(IHeaderResponse response) { final ResourceReference ref = new CompressedResourceReference(scope, resource); if (resource.endsWith(".js")) { response.renderJavascriptReference(ref); } else if (resource.endsWith(".css")) { response.renderCSSReference(ref); } else { throw new RuntimeException("Only know how to render JavaScript or CSS references"); } } }
[ "jan.van.mansum@dans.knaw.nl" ]
jan.van.mansum@dans.knaw.nl
517d272cc885257299930b5bf11e18d71d3d44c8
49b4cb79c910a17525b59d4b497a09fa28a9e3a8
/parserValidCheck/src/main/java/com/ke/css/cimp/fwb/fwb7/Rule_Hid_Goods_data_Identifier_S.java
11eda4b5085f914a04f3f6747fd7e727e49b921e
[]
no_license
ganzijo/koreanair
a7d750b62cec2647bfb2bed4ca1bf8648d9a447d
e980fb11bc4b8defae62c9d88e5c70a659bef436
refs/heads/master
2021-04-26T22:04:17.478461
2018-03-06T05:59:32
2018-03-06T05:59:32
124,018,887
0
0
null
null
null
null
UTF-8
Java
false
false
2,359
java
package com.ke.css.cimp.fwb.fwb7; /* ----------------------------------------------------------------------------- * Rule_Hid_Goods_data_Identifier_S.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.5 * Produced : Tue Mar 06 10:38:08 KST 2018 * * ----------------------------------------------------------------------------- */ import java.util.ArrayList; final public class Rule_Hid_Goods_data_Identifier_S extends Rule { public Rule_Hid_Goods_data_Identifier_S(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_Hid_Goods_data_Identifier_S parse(ParserContext context) { context.push("Hid_Goods_data_Identifier_S"); boolean parsed = true; int s0 = context.index; ParserAlternative a0 = new ParserAlternative(s0); ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); parsed = false; { int s1 = context.index; ParserAlternative a1 = new ParserAlternative(s1); parsed = true; if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { Rule rule = Terminal_StringValue.parse(context, "S"); if ((f1 = rule != null)) { a1.add(rule, context.index); c1++; } } parsed = c1 == 1; } if (parsed) { as1.add(a1); } context.index = s1; } ParserAlternative b = ParserAlternative.getBest(as1); parsed = b != null; if (parsed) { a0.add(b.rules, b.end); context.index = b.end; } Rule rule = null; if (parsed) { rule = new Rule_Hid_Goods_data_Identifier_S(context.text.substring(a0.start, a0.end), a0.rules); } else { context.index = s0; } context.pop("Hid_Goods_data_Identifier_S", parsed); return (Rule_Hid_Goods_data_Identifier_S)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "wrjo@wrjo-PC" ]
wrjo@wrjo-PC
ccfc596936c432f6e32c7ef55e44ed902b9ed880
fba8af31d5d36d8a6cf0c341faed98b6cd5ec0cb
/src/main/java/com/alipay/api/response/AlipayEcardEduCardGetResponse.java
d1ce77ac03b8fa5858523b550f4b0ad11a54b52e
[ "Apache-2.0" ]
permissive
planesweep/alipay-sdk-java-all
b60ea1437e3377582bd08c61f942018891ce7762
637edbcc5ed137c2b55064521f24b675c3080e37
refs/heads/master
2020-12-12T09:23:19.133661
2020-01-09T11:04:31
2020-01-09T11:04:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,270
java
package com.alipay.api.response; import java.util.List; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; import com.alipay.api.domain.EduOneCardDepositCardQueryResult; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.ecard.edu.card.get response. * * @author auto create * @since 1.0, 2019-03-08 15:29:11 */ public class AlipayEcardEduCardGetResponse extends AlipayResponse { private static final long serialVersionUID = 3142436285679687952L; /** * 用户是否首次充值标记 */ @ApiField("first_deposit_flag") private Boolean firstDepositFlag; /** * 校园一卡通历史充值卡信息查询结果对象 */ @ApiListField("onecard") @ApiField("edu_one_card_deposit_card_query_result") private List<EduOneCardDepositCardQueryResult> onecard; public void setFirstDepositFlag(Boolean firstDepositFlag) { this.firstDepositFlag = firstDepositFlag; } public Boolean getFirstDepositFlag( ) { return this.firstDepositFlag; } public void setOnecard(List<EduOneCardDepositCardQueryResult> onecard) { this.onecard = onecard; } public List<EduOneCardDepositCardQueryResult> getOnecard( ) { return this.onecard; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
4d5c276638063462e2abce0eb18ea6f3a91b7de1
cb5310ae9cb5a81c191a3e2f358b94f463b2fa6b
/cocoatouch/src/main/java/org/robovm/apple/uikit/UISplitViewControllerDelegateAdapter.java
1eac073bd790d09bacda8ac028b0e019ad83d801
[ "Apache-2.0" ]
permissive
jiangwh/robovm
a3da6d97083eab70ddeb4942d5bafa82d231aec2
a58b3a1928a60ea132b41cd0e51fae5550e224f5
refs/heads/master
2020-12-25T04:47:23.403516
2014-07-17T00:35:34
2014-07-17T00:35:34
21,945,788
1
0
null
null
null
null
UTF-8
Java
false
false
3,428
java
/* * Copyright (C) 2014 Trillian Mobile AB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.robovm.apple.uikit; /*<imports>*/ import java.io.*; import java.nio.*; import java.util.*; import org.robovm.objc.*; import org.robovm.objc.annotation.*; import org.robovm.objc.block.*; import org.robovm.rt.*; import org.robovm.rt.bro.*; import org.robovm.rt.bro.annotation.*; import org.robovm.rt.bro.ptr.*; import org.robovm.apple.foundation.*; import org.robovm.apple.coreanimation.*; import org.robovm.apple.coregraphics.*; import org.robovm.apple.coredata.*; import org.robovm.apple.coreimage.*; /*</imports>*/ /*<javadoc>*/ /*</javadoc>*/ /*<annotations>*//*</annotations>*/ /*<visibility>*/public/*</visibility>*/ class /*<name>*/UISplitViewControllerDelegateAdapter/*</name>*/ extends /*<extends>*/NSObject/*</extends>*/ /*<implements>*/implements UISplitViewControllerDelegate/*</implements>*/ { /*<ptr>*/ /*</ptr>*/ /*<bind>*/ /*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*//*</constructors>*/ /*<properties>*/ /*</properties>*/ /*<members>*//*</members>*/ /*<methods>*/ @NotImplemented("splitViewController:willHideViewController:withBarButtonItem:forPopoverController:") public void willHideViewController(UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem, UIPopoverController pc) { throw new UnsupportedOperationException(); } @NotImplemented("splitViewController:willShowViewController:invalidatingBarButtonItem:") public void willShowViewController(UISplitViewController svc, UIViewController aViewController, UIBarButtonItem barButtonItem) { throw new UnsupportedOperationException(); } @NotImplemented("splitViewController:popoverController:willPresentViewController:") public void willPresentViewController(UISplitViewController svc, UIPopoverController pc, UIViewController aViewController) { throw new UnsupportedOperationException(); } /** * @since Available in iOS 5.0 and later. */ @NotImplemented("splitViewController:shouldHideViewController:inOrientation:") public boolean shouldHideViewController(UISplitViewController svc, UIViewController vc, UIInterfaceOrientation orientation) { throw new UnsupportedOperationException(); } /** * @since Available in iOS 7.0 and later. */ @NotImplemented("splitViewControllerSupportedInterfaceOrientations:") public @MachineSizedUInt long getSupportedInterfaceOrientations(UISplitViewController splitViewController) { throw new UnsupportedOperationException(); } /** * @since Available in iOS 7.0 and later. */ @NotImplemented("splitViewControllerPreferredInterfaceOrientationForPresentation:") public UIInterfaceOrientation name(UISplitViewController splitViewController) { throw new UnsupportedOperationException(); } /*</methods>*/ }
[ "niklas@therning.org" ]
niklas@therning.org
2a4867e133d777796e64306ca7d78a6a1be6d561
00abc1aec703a1d48c393bf853be907fc44280f5
/yeb-generator/src/main/java/com/ming/service/impl/AdminServiceImpl.java
8ee8fd03326b53c94d8610664e5dd84ac4d634a6
[]
no_license
xiaoming-master/yeb
81c5f96e70881c5d9cff1b521f74a27c56115d24
843750239e67c1f92969a7990ac304c952e33593
refs/heads/master
2023-06-24T09:27:42.757753
2021-07-24T17:30:08
2021-07-24T17:30:08
387,009,042
0
0
null
null
null
null
UTF-8
Java
false
false
450
java
package com.ming.service.impl; import com.ming.pojo.Admin; import com.ming.mapper.AdminMapper; import com.ming.service.IAdminService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** * <p> * 服务实现类 * </p> * * @author zhanglishen * @since 2021-07-17 */ @Service public class AdminServiceImpl extends ServiceImpl<AdminMapper, Admin> implements IAdminService { }
[ "1186927930@qq.com" ]
1186927930@qq.com
513a3a523a05472148ee1f9f1f5d5e408e9f7817
5d7eceb50fcc79fa09ca9f34d665ec8223cbbc09
/JxSmartHome/src/com/jinxin/datan/net/protocol/DefaultResponseJosn.java
30fa93552f16939ba3eb6556d58c3dfcbbedf66b
[]
no_license
WonderFannn/WFJxSmartHome
253abbae09bf84d63db55ba7f6b0df41ea806286
7d1168741b626da9e9ca128694d622f86e725a99
refs/heads/master
2021-01-01T18:40:37.713436
2018-02-02T02:33:55
2018-02-02T02:33:55
98,402,240
0
0
null
null
null
null
UTF-8
Java
false
false
2,227
java
package com.jinxin.datan.net.protocol; import java.io.InputStream; import org.json.JSONException; import org.json.JSONObject; import com.jinxin.datan.net.module.RemoteJsonResultInfo; import com.jinxin.datan.net.protocol.ResponseJson; import com.jinxin.datan.toolkit.task.Task; import com.jinxin.jxsmarthome.constant.ControlDefine; import com.jinxin.jxsmarthome.util.CommUtil; import com.jinxin.record.SharedDB; public class DefaultResponseJosn extends ResponseJson { private Task task = null; private byte[] requestBytes; public DefaultResponseJosn(Task task, byte[] requestBytes) { this.task = task; this.requestBytes = requestBytes; } @Override public void response(InputStream in) throws Exception { if (in != null) { boolean isSuccess = false; RemoteJsonResultInfo _resultInfo = null; String result = ""; try { JSONObject jsonObject = this.getJsonObjectFromIn(in); _resultInfo = this.readResultInfo(jsonObject); if (_resultInfo.validResultCode.equals(ControlDefine.CONNECTION_SUCCESS)) { // 具体的解析工作在这里实现 // 提示:任务中途检测任务是否被中止,同时可以直接返回任务取消数据(如有必要) if (this.task.ismTryCancel()) { return; } //////////////////////具体解析区//////////////////////// result = jsonObject.getString("serviceContent"); String _processTime = this.getJsonString(jsonObject, "processTime"); String _account = CommUtil.getCurrentLoginAccount(); //////////////////////具体解析完成//////////////////////// isSuccess = true; SharedDB.saveStrDB(_account, ControlDefine.KEY_CUSTOMER_AREA, _processTime); } } catch (JSONException e) { e.printStackTrace(); isSuccess = false; } catch (Exception e) { e.printStackTrace(); isSuccess = false; } finally { if (isSuccess) { this.task.callback(result); } else { this.task.onError(_resultInfo.validResultInfo); } this.closeInputStream(in); } } } @Override public byte[] toOutputBytes() { return this.requestBytes; } }
[ "sail032@live.cn" ]
sail032@live.cn
d60380766d1294b8b081c97b8658896e8c2da077
ef5aae9cf3ccd3912bcb35c7b17a9dc7be3bdad0
/mockserver-core/src/main/java/org/mockserver/client/serialization/model/HttpRequestDTO.java
fb2ccc5ba4f2d73c8479ab73dbdd5a84ee40a88a
[ "Apache-2.0" ]
permissive
DragosCoros/mockserver
b4ed9cfd67fd83a02be90926ac71c3c5b8d8fb5c
593dfbc4c891eb541996580915b580b2644a7dfa
refs/heads/master
2020-12-07T15:16:58.895353
2015-06-08T07:51:14
2015-06-08T07:51:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,246
java
package org.mockserver.client.serialization.model; import com.google.common.base.Function; import com.google.common.collect.Lists; import org.mockserver.model.*; import java.util.ArrayList; import java.util.List; import static org.mockserver.model.NottableString.string; /** * @author jamesdbloom */ public class HttpRequestDTO extends NotDTO { private NottableString method = string(""); private NottableString path = string(""); private List<ParameterDTO> queryStringParameters = new ArrayList<ParameterDTO>(); private BodyDTO body; private List<CookieDTO> cookies = new ArrayList<CookieDTO>(); private List<HeaderDTO> headers = new ArrayList<HeaderDTO>(); public HttpRequestDTO(HttpRequest httpRequest) { this(httpRequest, false); } public HttpRequestDTO(HttpRequest httpRequest, Boolean not) { super(not); if (httpRequest != null) { method = httpRequest.getMethod(); path = httpRequest.getPath(); headers = Lists.transform(httpRequest.getHeaders(), new Function<Header, HeaderDTO>() { public HeaderDTO apply(Header header) { return new HeaderDTO(header, header.getNot()); } }); cookies = Lists.transform(httpRequest.getCookies(), new Function<Cookie, CookieDTO>() { public CookieDTO apply(Cookie cookie) { return new CookieDTO(cookie, cookie.getNot()); } }); queryStringParameters = Lists.transform(httpRequest.getQueryStringParameters(), new Function<Parameter, ParameterDTO>() { public ParameterDTO apply(Parameter parameter) { return new ParameterDTO(parameter, parameter.getNot()); } }); body = BodyDTO.createDTO(httpRequest.getBody()); } } public HttpRequestDTO() { } public HttpRequest buildObject() { return new HttpRequest() .withMethod(method) .withPath(path) .withHeaders(Lists.transform(headers, new Function<HeaderDTO, Header>() { public Header apply(HeaderDTO header) { return Not.not(header.buildObject(), header.getNot()); } })) .withCookies(Lists.transform(cookies, new Function<CookieDTO, Cookie>() { public Cookie apply(CookieDTO cookie) { return Not.not(cookie.buildObject(), cookie.getNot()); } })) .withQueryStringParameters(Lists.transform(queryStringParameters, new Function<ParameterDTO, Parameter>() { public Parameter apply(ParameterDTO parameter) { return Not.not(parameter.buildObject(), parameter.getNot()); } })) .withBody((body != null ? Not.not(body.buildObject(), body.getNot()) : null)); } public NottableString getMethod() { return method; } public HttpRequestDTO setMethod(NottableString method) { this.method = method; return this; } public NottableString getPath() { return path; } public HttpRequestDTO setPath(NottableString path) { this.path = path; return this; } public List<ParameterDTO> getQueryStringParameters() { return queryStringParameters; } public HttpRequestDTO setQueryStringParameters(List<ParameterDTO> queryStringParameters) { this.queryStringParameters = queryStringParameters; return this; } public BodyDTO getBody() { return body; } public HttpRequestDTO setBody(BodyDTO body) { this.body = body; return this; } public List<HeaderDTO> getHeaders() { return headers; } public HttpRequestDTO setHeaders(List<HeaderDTO> headers) { this.headers = headers; return this; } public List<CookieDTO> getCookies() { return cookies; } public HttpRequestDTO setCookies(List<CookieDTO> cookies) { this.cookies = cookies; return this; } }
[ "jamesdbloom@gmail.com" ]
jamesdbloom@gmail.com
707da917b16c14c5d516ace9425f39c089dbc387
b55222a71d1275387d538fb9c0cf03116a611922
/jOOQ/src/main/java/org/jooq/util/ase/ASEFactory.java
139a74c696a9a2dd10797522674c8aca8b207da7
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
monolithic/jOOQ
e05625873b5a9d46010554064294d5aa199865b2
300c4b8693fdaa31adf15d6e9b7e153ef2c5ffeb
refs/heads/master
2021-01-18T10:26:27.727927
2013-02-20T16:54:58
2013-02-20T16:54:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,870
java
/** * Copyright (c) 2009-2013, Lukas Eder, lukas.eder@gmail.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * . Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * . Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * . Neither the name of the "jOOQ" nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.jooq.util.ase; import org.jooq.SQLDialect; import org.jooq.impl.Factory; /** * A {@link SQLDialect#ASE} specific factory * * @author Lukas Eder */ public class ASEFactory extends Factory { /** * No instances */ private ASEFactory() { } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
f2682a30d8a7b0e111d0566bfcda29c30bd720bf
e56f9768a96892f70eeb02ef41af587fc81316b9
/src/main/java/au/net/electronichealth/ns/cdapackage/xsd/esignature/_2012/ApproverType.java
11e34af9fa576ee35041754a798487c8fd424382
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
AuDigitalHealth/esignature-java
bfae3c8fc2030e8be24d2aaaaa143b012d7dfe01
282e27ccc67590fa693df4f8c1685d8daa2417c5
refs/heads/master
2023-03-01T04:07:26.333609
2021-02-10T03:16:49
2021-02-10T03:16:49
337,603,406
0
0
null
null
null
null
UTF-8
Java
false
false
2,601
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.02.28 at 12:13:11 PM EST // package au.net.electronichealth.ns.cdapackage.xsd.esignature._2012; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ApproverType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="ApproverType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="personId" type="{http://www.w3.org/2001/XMLSchema}anyURI"/> * &lt;element name="personName" type="{http://ns.electronichealth.net.au/cdaPackage/xsd/eSignature/2012}PersonNameType"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "ApproverType", propOrder = { "personId", "personName" }) public class ApproverType { @XmlElement(required = true) @XmlSchemaType(name = "anyURI") protected String personId; @XmlElement(required = true) protected PersonNameType personName; /** * Gets the value of the personId property. * * @return * possible object is * {@link String } * */ public String getPersonId() { return personId; } /** * Sets the value of the personId property. * * @param value * allowed object is * {@link String } * */ public void setPersonId(String value) { this.personId = value; } /** * Gets the value of the personName property. * * @return * possible object is * {@link PersonNameType } * */ public PersonNameType getPersonName() { return personName; } /** * Sets the value of the personName property. * * @param value * allowed object is * {@link PersonNameType } * */ public void setPersonName(PersonNameType value) { this.personName = value; } }
[ "peter.ball@digitalhealth.gov.au" ]
peter.ball@digitalhealth.gov.au
a9b2def97b51977682bf78e604febd5b8dca0369
a744882fb7cf18944bd6719408e5a9f2f0d6c0dd
/sourcecode7/src/sun/net/dns/ResolverConfiguration.java
a490de4ea293ad914314dbaa99a27719efb277fc
[ "Apache-2.0" ]
permissive
hanekawasann/learn
a39b8d17fd50fa8438baaa5b41fdbe8bd299ab33
eef678f1b8e14b7aab966e79a8b5a777cfc7ab14
refs/heads/master
2022-09-13T02:18:07.127489
2020-04-26T07:58:35
2020-04-26T07:58:35
176,686,231
0
0
Apache-2.0
2022-09-01T23:21:38
2019-03-20T08:16:05
Java
UTF-8
Java
false
false
3,964
java
/* * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package sun.net.dns; import java.util.List; /** * The configuration of the client resolver. * * <p>A ResolverConfiguration is a singleton that represents the * configuration of the client resolver. The ResolverConfiguration * is opened by invoking the {@link #open() open} method. * * @since 1.4 */ public abstract class ResolverConfiguration { private static final Object lock = new Object(); private static ResolverConfiguration provider; protected ResolverConfiguration() { } /** * Opens the resolver configuration. * * @return the resolver configuration */ public static ResolverConfiguration open() { synchronized (lock) { if (provider == null) { provider = new sun.net.dns.ResolverConfigurationImpl(); } return provider; } } /** * Returns a list corresponding to the domain search path. The * list is ordered by the search order used for host name lookup. * Each element in the list returns a {@link java.lang.String} * containing a domain name or suffix. * * @return list of domain names */ public abstract List<String> searchlist(); /** * Returns a list of name servers used for host name lookup. * Each element in the list returns a {@link java.lang.String} * containing the textual representation of the IP address of * the name server. * * @return list of the name servers */ public abstract List<String> nameservers(); /** * Options representing certain resolver variables of * a {@link ResolverConfiguration}. */ public static abstract class Options { /** * Returns the maximum number of attempts the resolver * will connect to each name server before giving up * and returning an error. * * @return the resolver attempts value or -1 is unknown */ public int attempts() { return -1; } /** * Returns the basic retransmit timeout, in milliseconds, * used by the resolver. The resolver will typically use * an exponential backoff algorithm where the timeout is * doubled for every retransmit attempt. The basic * retransmit timeout, returned here, is the initial * timeout for the exponential backoff algorithm. * * @return the basic retransmit timeout value or -1 * if unknown */ public int retrans() { return -1; } } /** * Returns the {@link #Options} for the resolver. * * @return options for the resolver */ public abstract Options options(); }
[ "763803382@qq.com" ]
763803382@qq.com
5245562a703c01dbd1ec6721c9b17b9cf5ee97f9
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module0323_public/tests/more/src/java/module0323_public_tests_more/a/Foo1.java
c971a0999299a388d65f1b48136489eab534f9cb
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,635
java
package module0323_public_tests_more.a; import java.util.zip.*; import javax.annotation.processing.*; import javax.lang.model.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.awt.datatransfer.DataFlavor * @see java.beans.beancontext.BeanContext * @see java.io.File */ @SuppressWarnings("all") public abstract class Foo1<T> extends module0323_public_tests_more.a.Foo0<T> implements module0323_public_tests_more.a.IFoo1<T> { java.rmi.Remote f0 = null; java.nio.file.FileStore f1 = null; java.sql.Array f2 = null; public T element; public static Foo1 instance; public static Foo1 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module0323_public_tests_more.a.Foo0.create(input); } public String getName() { return module0323_public_tests_more.a.Foo0.getInstance().getName(); } public void setName(String string) { module0323_public_tests_more.a.Foo0.getInstance().setName(getName()); return; } public T get() { return (T)module0323_public_tests_more.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (T)element; module0323_public_tests_more.a.Foo0.getInstance().set(this.element); } public T call() throws Exception { return (T)module0323_public_tests_more.a.Foo0.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
705e1d7648bfcedab2c1bf4a1dc1fde339b08c2a
dd590f7bf803948880058bdd2610bcf14eb69bac
/mymeishinew/src/main/java/commeishi/shanjing/mymeishi/utils/HtmlText.java
fc814488b1c54ecf44afe310138982e090c1037b
[]
no_license
cuiwenju2017/jtlife-food
f3b9784469f321c88fddd773ffb58849df73d901
c148eb6760727f9741e591ac049065a4178e7bb3
refs/heads/master
2020-08-26T15:50:01.775544
2019-10-23T13:16:26
2019-10-23T13:16:26
217,061,111
0
0
null
null
null
null
UTF-8
Java
false
false
1,162
java
package commeishi.shanjing.mymeishi.utils; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * 过滤掉html标签的工具类 */ public class HtmlText { public static String delHTMLTag(String htmlStr) { String regEx_script = "<script[^>]*?>[\\s\\S]*?<\\/script>"; //定义script的正则表达式 String regEx_style = "<style[^>]*?>[\\s\\S]*?<\\/style>"; //定义style的正则表达式 String regEx_html = "<[^>]+>"; //定义HTML标签的正则表达式 Pattern p_script = Pattern.compile(regEx_script, Pattern.CASE_INSENSITIVE); Matcher m_script = p_script.matcher(htmlStr); htmlStr = m_script.replaceAll(""); //过滤script标签 Pattern p_style = Pattern.compile(regEx_style, Pattern.CASE_INSENSITIVE); Matcher m_style = p_style.matcher(htmlStr); htmlStr = m_style.replaceAll(""); //过滤style标签 Pattern p_html = Pattern.compile(regEx_html, Pattern.CASE_INSENSITIVE); Matcher m_html = p_html.matcher(htmlStr); htmlStr = m_html.replaceAll(""); //过滤html标签 return htmlStr.trim(); //返回文本字符串 } }
[ "1755140651@qq.com" ]
1755140651@qq.com
04762371dec1ec58ecc6c029ce9ae96bb7c21c61
fea683c0ec66ff872b001f39fba4bd0f5a772176
/jpuppeteer-cdp/src/main/java/jpuppeteer/cdp/cdp/entity/page/PrintToPDFResponse.java
73d9145920e12b6fdce195c819a382a80fee40ef
[]
no_license
affjerry/jpuppeteer
c343f64636eabdf5c3da52b6c0d660054d837894
5dbd900862035b4403b975f91f1b18938b19f08b
refs/heads/master
2023-08-15T23:45:39.292666
2020-05-27T01:48:41
2020-05-27T01:48:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
369
java
package jpuppeteer.cdp.cdp.entity.page; /** */ @lombok.Setter @lombok.Getter @lombok.ToString public class PrintToPDFResponse { /** * Base64-encoded pdf data. Empty if |returnAsStream| is specified. */ private String data; /** * A handle of the stream that holds resulting PDF data. */ private String stream; }
[ "jarvis.xu@vipshop.com" ]
jarvis.xu@vipshop.com
aceee79b4c5a18c20a6e282af7bcbe5f769ed984
cf0f34937b476ecde5ebcca7e2119bcbb27cfbf2
/src/com/sdses/struts/pos/action/T30500Action.java
bd41e159bb767c0920b35dedb93cf92f07b764b5
[]
no_license
Deron84/xxxTest
b5f38cc2dfe3fe28b01634b58b1236b7ec5b4854
302b807f394e31ac7350c5c006cb8dc334fc967f
refs/heads/master
2022-02-01T03:32:54.689996
2019-07-23T11:04:09
2019-07-23T11:04:09
198,212,201
0
0
null
null
null
null
UTF-8
Java
false
false
5,384
java
package com.sdses.struts.pos.action; import java.util.ArrayList; import java.util.List; import com.huateng.common.Constants; import com.huateng.common.ErrorCode; import com.huateng.struts.system.action.BaseAction; import com.huateng.system.util.BeanUtils; import com.huateng.system.util.ContextUtil; import com.sdses.bo.pos.T30500BO; import com.sdses.po.TblVegeCodeInfo; /** * Title:机构维护 * * Description: * * Copyright: Copyright (c) 2010-6-7 * * Company: Shanghai Huateng Software Systems Co., Ltd. * * @author * * @version 1.0 */ public class T30500Action extends BaseAction { private static final long serialVersionUID = 1L; // // //菜品编码表BO private T30500BO t30500BO = (T30500BO) ContextUtil.getBean("T30500BO"); //菜品编码 private String vegCode; //菜品名称 private String vegName; // 菜品列表 private String vegDataList; @Override protected String subExecute() { try { if ("add".equals(getMethod())) { rspCode = add(); } else if ("delete".equals(getMethod())) { rspCode = delete(); } else if ("update".equals(getMethod())) { rspCode = update(); } } catch (Exception e) { log("操作员编号:" + operator.getOprId() + ",对机构的维护操作" + getMethod() + "失败,失败原因为:" + e.getMessage()); } return rspCode; } /** * 添加机构信息 * @throws Exception */ private String add() throws Exception { TblVegeCodeInfo vegeCodeInfo = new TblVegeCodeInfo(); vegeCodeInfo.setVegCode(vegCode); vegeCodeInfo.setVegName(vegName); // 判断菜品编码是否存在 if (t30500BO.get(getVegCode()) != null) { return ErrorCode.T30500_01; } // 判断菜品名称是否存在 List<Object[]> lists = t30500BO.findListByName(vegName); if (lists != null && lists.size() > 0) { return ErrorCode.T30500_02; } t30500BO.add(vegeCodeInfo); return Constants.SUCCESS_CODE; } /** * * //TODO 删除所选的条目信息 * * @return * @throws Exception * @author hanyongqing */ @SuppressWarnings("unchecked") private String delete() throws Exception { String sql2 = " select * from VEGE_CODE_FOR_MCHT t where t.Vege_Code = '" + getVegCode() + "'"; List<Object[]> dataList2 = commQueryDAO.findBySQLQuery(sql2); //是否存在此条记录 if (dataList2.size() > 0) { return ErrorCode.T30500_04; } String sql = "select VEGE_CODE,VEGE_NAME from vege_code_base where VEGE_CODE = '" + getVegCode() + "' "; List<Object[]> dataList = commQueryDAO.findBySQLQuery(sql); //是否存在此条记录 if (dataList.size() <= 0) { return ErrorCode.T30500_03; } TblVegeCodeInfo vegeCodeInfo = new TblVegeCodeInfo(); for (Object[] obj : dataList) { vegeCodeInfo.setVegCode(obj[0].toString()); vegeCodeInfo.setVegName(obj[1].toString()); } //删除机构信息 t30500BO.delete(vegeCodeInfo); // reloadOprBrhInfo(); return Constants.SUCCESS_CODE; } /** * * //TODO 更新菜品信息 * * @return * @throws Exception */ private String update() throws Exception { jsonBean.parseJSONArrayData(getVegDataList()); int len = jsonBean.getArray().size(); List<TblVegeCodeInfo> vegeInfoList = new ArrayList<TblVegeCodeInfo>(); for (int i = 0; i < len; i++) { jsonBean.setObject(jsonBean.getJSONDataAt(i)); TblVegeCodeInfo vegeInfo = new TblVegeCodeInfo(); BeanUtils.setObjectWithPropertiesValue(vegeInfo, jsonBean, true); String sql2 = " select * from VEGE_CODE_FOR_MCHT t where t.Vege_Code = '" + vegeInfo.getVegCode() + "'"; List<Object[]> dataList2 = commQueryDAO.findBySQLQuery(sql2); //是否存在此条记录 if (dataList2.size() > 0) { return "该菜品已经使用,无法修改"; } //判断机构名称是否存在 List<Object[]> lists = t30500BO.findListByName(vegeInfo.getVegName()); if (lists != null && lists.size() > 0) { return ErrorCode.T30500_02; } vegeInfoList.add(vegeInfo); } t30500BO.update(vegeInfoList); return Constants.SUCCESS_CODE; } public String getVegCode() { return vegCode; } public void setVegCode(String vegCode) { this.vegCode = vegCode; } public String getVegName() { return vegName; } public void setVegName(String vegName) { this.vegName = vegName; } public static long getSerialversionuid() { return serialVersionUID; } public T30500BO getT30500BO() { return t30500BO; } public void setT30500BO(T30500BO t30500bo) { t30500BO = t30500bo; } public String getVegDataList() { return vegDataList; } public void setVegDataList(String vegDataList) { this.vegDataList = vegDataList; } }
[ "weijx@inspur.com" ]
weijx@inspur.com
36a83db80599d2e0b68dbcde73d76b5aa4951a57
fc7c1e3e88775217e89245c31e7a333e4c75c38f
/water-java-core/src/main/java/jp/gr/java_conf/kgd/library/water/java/core/value/IntColor3Trait.java
948ab31f1f1224384ba6e2fef01f15d7c04c36ee
[ "MIT" ]
permissive
t-kgd/library-water
a76bbee205802bd25fd27404cc58e3c6f26d51fc
e19822eb5d7a0414d1056852ea3ae90e1e24467b
refs/heads/master
2016-09-11T02:58:39.515546
2015-07-09T08:01:38
2015-07-09T08:01:38
38,787,571
0
0
null
null
null
null
UTF-8
Java
false
false
5,552
java
/* * The MIT License * * Copyright 2015 misakura. * * 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 jp.gr.java_conf.kgd.library.water.java.core.value; /** * 値の型を{@link Integer}に特化し、デフォルトの挙動を定めた{@link IntColor3}。 * * デフォルトの挙動を定めたものであり、原則としてインターフェース部分に使ってはいけません。 * * @author misakura */ public interface IntColor3Trait extends ObjectColor3<Integer>, NumberColor3 { /** * この色の赤成分にあたる値を返す。 * * デフォルトの実装では、{@link #getRedAsInt()}に委譲し、得られた値を静的キャストして返します。 * * @return {@inheritDoc} */ @Override default long getRedAsLong() { return (long) getRedAsInt(); } /** * この色の緑成分にあたる値を返す。 * * デフォルトの実装では、{@link #getGreenAsInt()}に委譲し、得られた値を静的キャストして返します。 * * @return {@inheritDoc} */ @Override default long getGreenAsLong() { return (long) getGreenAsInt(); } /** * この色の青成分にあたる値を返す。 * * デフォルトの実装では、{@link #getBlueAsInt()}に委譲し、得られた値を静的キャストして返します。 * * @return {@inheritDoc} */ @Override default long getBlueAsLong() { return (long) getBlueAsInt(); } /** * この色の赤成分にあたる値を返す。 * * デフォルトの実装では、{@link #getRedAsInt()}に委譲し、得られた値を静的キャストして返します。 * * @return {@inheritDoc} */ @Override default double getRedAsDouble() { return (double) getRedAsInt(); } /** * この色の緑成分にあたる値を返す。 * * デフォルトの実装では、{@link #getGreenAsInt()}に委譲し、得られた値を静的キャストして返します。 * * @return {@inheritDoc} */ @Override default double getGreenAsDouble() { return (double) getGreenAsInt(); } /** * この色の青成分にあたる値を返す。 * * デフォルトの実装では、{@link #getBlueAsInt()}に委譲し、得られた値を静的キャストして返します。 * * @return {@inheritDoc} */ @Override default double getBlueAsDouble() { return (double) getBlueAsInt(); } /** * この色の赤成分にあたる値を返す。 * * 得られる値が防御的にコピーされたものであるかどうかは実装依存です。<br> * デフォルトの実装では、{@link #getRedAsInt()}に委譲し、得られた値をボックス化して返します。(つまり、防御的コピーを行います。) * * @return {@inheritDoc} * @deprecated このインターフェースを直接操作する場合は{@link #getRedAsInt()}を使うべきです。 */ @Deprecated @Override default Integer getRed() { return getRedAsInt(); } /** * この色の緑成分にあたる値を返す。 * * 得られる値が防御的にコピーされたものであるかどうかは実装依存です。<br> * デフォルトの実装では、{@link #getGreenAsInt()}に委譲し、得られた値をボックス化して返します。(つまり、防御的コピーを行います。) * * @return {@inheritDoc} * @deprecated このインターフェースを直接操作する場合は{@link #getGreenAsInt()}を使うべきです。 */ @Deprecated @Override default Integer getGreen() { return getGreenAsInt(); } /** * この色の青成分にあたる値を返す。 * * 得られる値が防御的にコピーされたものであるかどうかは実装依存です。<br> * デフォルトの実装では、{@link #getBlueAsInt()}に委譲し、得られた値をボックス化して返します。(つまり、防御的コピーを行います。) * * @return {@inheritDoc} * @deprecated このインターフェースを直接操作する場合は{@link #getBlueAsInt()}を使うべきです。 */ @Deprecated @Override default Integer getBlue() { return getBlueAsInt(); } }
[ "t-kgd@users.noreply.github.com" ]
t-kgd@users.noreply.github.com
dc160f11d2310981f7c1a86752a6679c690401bb
75c2211a6fefd167f382dac301e1b46617c917e1
/expected-output/random/random8/sll/Input_withCos1.java
019b8d9d042cf3e933f0a80508244fe656e45195
[]
no_license
star-finder/jpf-costar
0f87d88f420eace4b1b1c93ad44e764346b09f19
b3f4d4893019a42b6c3f50e4294fd3ab6f2b5f88
refs/heads/master
2022-11-25T01:31:09.822003
2019-07-04T01:46:55
2019-07-04T01:46:55
105,350,745
2
1
null
2022-11-15T08:38:39
2017-09-30T07:20:18
Java
UTF-8
Java
false
false
6,821
java
package random.sll; import org.junit.Test; import gov.nasa.jpf.util.test.TestJPF; public class Input_withCos1 extends TestJPF { @Test public void test_withCos1() throws Exception { Input obj = new Input(); random.sll.Node root = new random.sll.Node(); random.sll.Node next_2 = null; int elem_1 = 6; root.elem = elem_1; root.next = next_2; obj.withCos(root); } @Test public void test_withCos2() throws Exception { Input obj = new Input(); random.sll.Node root = new random.sll.Node(); random.sll.Node next_2 = new random.sll.Node(); random.sll.Node next_4 = new random.sll.Node(); random.sll.Node next_6 = new random.sll.Node(); random.sll.Node next_8 = new random.sll.Node(); random.sll.Node next_10 = new random.sll.Node(); random.sll.Node next_12 = null; int elem_9 = -7; int elem_11 = -29; int elem_3 = 12; int elem_1 = 9; int elem_7 = 15; int elem_5 = -4; root.elem = elem_1; root.next = next_2; next_2.elem = elem_3; next_2.next = next_4; next_4.elem = elem_5; next_4.next = next_6; next_6.elem = elem_7; next_6.next = next_8; next_8.elem = elem_9; next_8.next = next_10; next_10.elem = elem_11; next_10.next = next_12; obj.withCos(root); } @Test public void test_withCos3() throws Exception { Input obj = new Input(); random.sll.Node root = new random.sll.Node(); random.sll.Node next_2 = new random.sll.Node(); random.sll.Node next_4 = new random.sll.Node(); random.sll.Node next_6 = new random.sll.Node(); random.sll.Node next_8 = new random.sll.Node(); random.sll.Node next_10 = new random.sll.Node(); random.sll.Node next_12 = new random.sll.Node(); random.sll.Node next_14 = null; int elem_13 = -20; int elem_9 = 31; int elem_11 = 25; int elem_3 = -2; int elem_1 = 12; int elem_7 = 16; int elem_5 = 28; root.elem = elem_1; root.next = next_2; next_2.elem = elem_3; next_2.next = next_4; next_4.elem = elem_5; next_4.next = next_6; next_6.elem = elem_7; next_6.next = next_8; next_8.elem = elem_9; next_8.next = next_10; next_10.elem = elem_11; next_10.next = next_12; next_12.elem = elem_13; next_12.next = next_14; obj.withCos(root); } @Test public void test_withCos4() throws Exception { Input obj = new Input(); random.sll.Node root = new random.sll.Node(); random.sll.Node next_2 = new random.sll.Node(); random.sll.Node next_4 = null; int elem_3 = 14; int elem_1 = 1; root.elem = elem_1; root.next = next_2; next_2.elem = elem_3; next_2.next = next_4; obj.withCos(root); } @Test public void test_withCos5() throws Exception { Input obj = new Input(); random.sll.Node root = new random.sll.Node(); random.sll.Node next_2 = new random.sll.Node(); random.sll.Node next_4 = new random.sll.Node(); random.sll.Node next_6 = new random.sll.Node(); random.sll.Node next_8 = null; int elem_3 = -23; int elem_1 = 24; int elem_7 = -27; int elem_5 = -24; root.elem = elem_1; root.next = next_2; next_2.elem = elem_3; next_2.next = next_4; next_4.elem = elem_5; next_4.next = next_6; next_6.elem = elem_7; next_6.next = next_8; obj.withCos(root); } @Test public void test_withCos6() throws Exception { Input obj = new Input(); random.sll.Node root = new random.sll.Node(); random.sll.Node next_2 = new random.sll.Node(); random.sll.Node next_4 = new random.sll.Node(); random.sll.Node next_6 = null; int elem_3 = -15; int elem_1 = 13; int elem_5 = 6; root.elem = elem_1; root.next = next_2; next_2.elem = elem_3; next_2.next = next_4; next_4.elem = elem_5; next_4.next = next_6; obj.withCos(root); } @Test public void test_withCos7() throws Exception { Input obj = new Input(); random.sll.Node root = new random.sll.Node(); random.sll.Node next_2 = new random.sll.Node(); random.sll.Node next_4 = new random.sll.Node(); random.sll.Node next_6 = new random.sll.Node(); random.sll.Node next_8 = new random.sll.Node(); random.sll.Node next_10 = new random.sll.Node(); random.sll.Node next_12 = new random.sll.Node(); random.sll.Node next_14 = new random.sll.Node(); random.sll.Node next_16 = null; int elem_13 = -28; int elem_9 = -22; int elem_11 = -28; int elem_15 = -24; int elem_3 = 1; int elem_1 = -12; int elem_7 = 5; int elem_5 = -12; root.elem = elem_1; root.next = next_2; next_2.elem = elem_3; next_2.next = next_4; next_4.elem = elem_5; next_4.next = next_6; next_6.elem = elem_7; next_6.next = next_8; next_8.elem = elem_9; next_8.next = next_10; next_10.elem = elem_11; next_10.next = next_12; next_12.elem = elem_13; next_12.next = next_14; next_14.elem = elem_15; next_14.next = next_16; obj.withCos(root); } @Test public void test_withCos8() throws Exception { Input obj = new Input(); random.sll.Node root = new random.sll.Node(); random.sll.Node next_2 = new random.sll.Node(); random.sll.Node next_4 = new random.sll.Node(); random.sll.Node next_6 = new random.sll.Node(); random.sll.Node next_8 = new random.sll.Node(); random.sll.Node next_10 = new random.sll.Node(); random.sll.Node next_12 = new random.sll.Node(); random.sll.Node next_14 = new random.sll.Node(); random.sll.Node next_16 = new random.sll.Node(); random.sll.Node next_18 = null; int elem_13 = -21; int elem_9 = 3; int elem_11 = 5; int elem_17 = -9; int elem_15 = -18; int elem_3 = 19; int elem_1 = 29; int elem_7 = 21; int elem_5 = -10; root.elem = elem_1; root.next = next_2; next_2.elem = elem_3; next_2.next = next_4; next_4.elem = elem_5; next_4.next = next_6; next_6.elem = elem_7; next_6.next = next_8; next_8.elem = elem_9; next_8.next = next_10; next_10.elem = elem_11; next_10.next = next_12; next_12.elem = elem_13; next_12.next = next_14; next_14.elem = elem_15; next_14.next = next_16; next_16.elem = elem_17; next_16.next = next_18; obj.withCos(root); } @Test public void test_withCos9() throws Exception { Input obj = new Input(); random.sll.Node root = null; obj.withCos(root); } @Test public void test_withCos10() throws Exception { Input obj = new Input(); random.sll.Node root = new random.sll.Node(); random.sll.Node next_2 = new random.sll.Node(); random.sll.Node next_4 = new random.sll.Node(); random.sll.Node next_6 = new random.sll.Node(); random.sll.Node next_8 = new random.sll.Node(); random.sll.Node next_10 = null; int elem_9 = 7; int elem_3 = -12; int elem_1 = 13; int elem_7 = -7; int elem_5 = 13; root.elem = elem_1; root.next = next_2; next_2.elem = elem_3; next_2.next = next_4; next_4.elem = elem_5; next_4.next = next_6; next_6.elem = elem_7; next_6.next = next_8; next_8.elem = elem_9; next_8.next = next_10; obj.withCos(root); } }
[ "longph1989@gmail.com" ]
longph1989@gmail.com
957378f16130081ef676dd43f57682f40f9821f3
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Jetty/Jetty3387.java
91a4ea3cac080e6cd38a724d2fc129659443236c
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,181
java
@Test public void testReadEarlyEOF() throws Exception { _in.addContent(new TContent("AB")); _in.addContent(new TContent("CD")); _in.earlyEOF(); Assert.assertThat(_in.isFinished(), Matchers.equalTo(false)); Assert.assertThat(_in.available(), Matchers.equalTo(2)); Assert.assertThat(_in.isFinished(), Matchers.equalTo(false)); Assert.assertThat(_in.read(), Matchers.equalTo((int)'A')); Assert.assertThat(_in.read(), Matchers.equalTo((int)'B')); Assert.assertThat(_in.read(), Matchers.equalTo((int)'C')); Assert.assertThat(_in.isFinished(), Matchers.equalTo(false)); Assert.assertThat(_in.read(), Matchers.equalTo((int)'D')); try { _in.read(); Assert.fail(); } catch (EOFException eof) { Assert.assertThat(_in.isFinished(), Matchers.equalTo(true)); } Assert.assertThat(_history.poll(), Matchers.equalTo("Content succeeded AB")); Assert.assertThat(_history.poll(), Matchers.equalTo("Content succeeded CD")); Assert.assertThat(_history.poll(), Matchers.nullValue()); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
7159acb8dda4e59f9f9fb4160841297040a9864b
8091dc59cc76869befe9b0a8f350fbc56c2836e5
/sql12/app/src/main/java/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/ConnectionPropertiesController.java
52422ca444804a780df0c573145477077876b829
[]
no_license
igorhvr/squirrel-sql
4560c39c9221f04a49487b5f3d66b1559a32c21a
3457d91b397392e1a9649ffb00cbfd093e453654
refs/heads/master
2020-04-05T08:32:51.484469
2011-08-10T18:59:26
2011-08-10T18:59:26
2,188,276
2
5
null
null
null
null
UTF-8
Java
false
false
2,475
java
package net.sourceforge.squirrel_sql.client.gui.db.aliasproperties; /* * Copyright (C) 2009 Rob Manning * manningr@users.sourceforge.net * * Based on initial work from Colin Bell * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ import java.awt.Component; import net.sourceforge.squirrel_sql.client.IApplication; import net.sourceforge.squirrel_sql.client.gui.db.ISQLAliasExt; import net.sourceforge.squirrel_sql.fw.util.StringManager; import net.sourceforge.squirrel_sql.fw.util.StringManagerFactory; /** * This dialog allows the user to review and maintain connection properties for an alias. */ public class ConnectionPropertiesController implements IAliasPropertiesPanelController { /** * Internationalized strings for this class. */ private static final StringManager s_stringMgr = StringManagerFactory.getStringManager(ConnectionPropertiesController.class); private ConnectionPropertiesPanel _propsPnl; private ISQLAliasExt _alias; public static interface i18n { // i18n[ConnectionPropertiesController.title=Connection] String TITLE = s_stringMgr.getString("ConnectionPropertiesController.title"); // i18n[ConnectionPropertiesController.hint=Set session connection properties for this Alias] String HINT = s_stringMgr.getString("ConnectionPropertiesController.hint"); } public ConnectionPropertiesController(ISQLAliasExt alias, IApplication app) { _alias = alias; _propsPnl = new ConnectionPropertiesPanel(alias.getConnectionProperties()); } public Component getPanelComponent() { return _propsPnl; } public void applyChanges() { _alias.setConnectionProperties(_propsPnl.getSQLAliasConnectionProperties()); } public String getTitle() { return i18n.TITLE; } public String getHint() { return i18n.HINT; } }
[ "manningr@0ceafaf9-a5ae-48a7-aaeb-8ec3e0f2870c" ]
manningr@0ceafaf9-a5ae-48a7-aaeb-8ec3e0f2870c
e2e435496fb4df2081fbeb371a1a62212e38e3e6
a20aba21d0150c4a98c7f71997cfff06db3d1468
/generators/hibernate/tests/org.obeonetwork.dsl.entity.gen.java.hibernate.tests/src/inheritance_associations/org/obeonetwork/sample/inheritanceassociations/IClass101ENDDao.java
3579e02e50ad5604a4fdb0cc25c5bfce7954cda9
[]
no_license
MathieuVenisse/InformationSystem
1bf159a775b956c7ff23adba66690c25ad18a161
d677a80c97145ed16f7616ab6c553c4c632116e1
refs/heads/master
2021-01-20T21:20:11.482505
2012-12-04T14:07:55
2012-12-04T14:07:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,798
java
package org.obeonetwork.sample.inheritanceassociations; // Start of user code for import import java.util.Collection; import org.obeonetwork.fwk.dao.exception.DaoException; import org.obeonetwork.sample.inheritanceassociations.Class101END; // End of user code for import /** * This class provides the data access layer to the Class_1_01_END entity class.<br/> * This is the interface which represent the contrat of the DAO access. */ public interface IClass101ENDDao { /** * Create a new element. * @param class101END Element to create. * @throws DaoException If a Dao problem occurs. */ public void createClass101END(Class101END class101END) throws DaoException; /** * Update an existing element. * @param class101END Element to update. * If the element has an id, it may use it. * @throws DaoException If a Dao problem occurs. */ public void updateClass101END(Class101END class101END) throws DaoException; /** * Delete an element. * Only id can be used to find which element must be deleted. * @param class101END Element which will be delete. * @throws DaoException If a Dao problem occurs. */ public void deleteClass101END(Class101END class101END) throws DaoException; /** * Find all elements. * @return A list with all elements, without any filter. * @throws DaoException If a Dao problem occurs. */ public Collection<Class101END> findAllClass101ENDs() throws DaoException; /** * Find one entity by its primary key. * @param id The PK of the entity. * @return The entity found. * @throws DaoException If a Dao problem occurs. */ public Class101END findClass101ENDById(String id) throws DaoException; //Start of user code for technicals dao access api //End of user code for technical dao access api }
[ "goulwen.lefur@obeo.fr" ]
goulwen.lefur@obeo.fr
1751d7d28a211df14c0d5eb7b4316deadaeb28de
a43d4202628ecb52e806d09f0f3dc1f5bab3ef4f
/src/main/java/pnc/mesadmin/dto/GetSkillInfo/GetSkillInfoResB.java
211a63c5df90e53d46fd877788a9d910fc5712fe
[]
no_license
pnc-mes/base
b88583929e53670340a704f848e4e9e2027f1334
162135b8752b4edc397b218ffd26664929f6920d
refs/heads/main
2023-01-07T22:06:10.794300
2020-10-27T07:47:20
2020-10-27T07:47:20
307,621,190
0
0
null
null
null
null
UTF-8
Java
false
false
1,196
java
package pnc.mesadmin.dto.GetSkillInfo; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.io.Serializable; /** * 公司名称:驭航信息技术(上海)有限公司 * 系统名称:PNC-MES管理系统 * 子系统名称:获取序号管理信息DTO返回业务数据实体类Body * 创建人:ZC * 创建时间:2017-06-07 * 修改人: * 修改时间: */ public class GetSkillInfoResB implements Serializable{ @JsonProperty("MsgCode") private String MsgCode; @JsonProperty("MsgDes") private String MsgDes; @JsonProperty("Data") private GetSkillInfoResD Data; @JsonIgnore public String getMsgCode() { return MsgCode; } @JsonIgnore public void setMsgCode(String msgCode) { MsgCode = msgCode; } @JsonIgnore public String getMsgDes() { return MsgDes; } @JsonIgnore public void setMsgDes(String msgDes) { MsgDes = msgDes; } @JsonIgnore public GetSkillInfoResD getData() { return Data; } @JsonIgnore public void setData(GetSkillInfoResD data) { Data = data; } }
[ "95887577@qq.com" ]
95887577@qq.com
247316a3b727a9fd899306efb83aad9a618bc5c6
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/budejie/sources/com/google/gson/internal/Streams.java
e7fa0308460816ef6da7638bfa6e5488ec11779a
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
2,700
java
package com.google.gson.internal; import com.google.gson.JsonElement; import com.google.gson.JsonIOException; import com.google.gson.JsonNull; import com.google.gson.JsonParseException; import com.google.gson.JsonSyntaxException; import com.google.gson.internal.bind.TypeAdapters; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.io.Writer; public final class Streams { private static final class AppendableWriter extends Writer { private final Appendable appendable; private final CurrentWrite currentWrite = new CurrentWrite(); static class CurrentWrite implements CharSequence { char[] chars; CurrentWrite() { } public int length() { return this.chars.length; } public char charAt(int i) { return this.chars[i]; } public CharSequence subSequence(int i, int i2) { return new String(this.chars, i, i2 - i); } } AppendableWriter(Appendable appendable) { this.appendable = appendable; } public void write(char[] cArr, int i, int i2) throws IOException { this.currentWrite.chars = cArr; this.appendable.append(this.currentWrite, i, i + i2); } public void write(int i) throws IOException { this.appendable.append((char) i); } public void flush() { } public void close() { } } private Streams() { throw new UnsupportedOperationException(); } public static JsonElement parse(JsonReader jsonReader) throws JsonParseException { Object obj = 1; try { jsonReader.peek(); obj = null; return (JsonElement) TypeAdapters.JSON_ELEMENT.read(jsonReader); } catch (Throwable e) { if (obj != null) { return JsonNull.INSTANCE; } throw new JsonSyntaxException(e); } catch (Throwable e2) { throw new JsonSyntaxException(e2); } catch (Throwable e22) { throw new JsonIOException(e22); } catch (Throwable e222) { throw new JsonSyntaxException(e222); } } public static void write(JsonElement jsonElement, JsonWriter jsonWriter) throws IOException { TypeAdapters.JSON_ELEMENT.write(jsonWriter, jsonElement); } public static Writer writerForAppendable(Appendable appendable) { return appendable instanceof Writer ? (Writer) appendable : new AppendableWriter(appendable); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
f95c233e2ebdab510837efb2d216a62b8dcedbd7
73ea34707ec3b36824ef026eb06b31e36ce8b91a
/src/org/lynxlake/_11JavaAdvancedWorkshopGameDemo/gameApp/models/tanks/Tank.java
19bc7b816173cd87ff309d70c2434fbe008417c4
[]
no_license
plamen911/java-advanced
72fb5d2d0f40a0b835cb892311e9210604aa2e55
310def9ae534909158a0c09dd1f88ebc814ce9be
refs/heads/master
2021-01-12T04:40:50.023548
2017-05-03T09:12:11
2017-05-03T09:12:11
77,708,419
0
0
null
null
null
null
UTF-8
Java
false
false
848
java
package org.lynxlake._11JavaAdvancedWorkshopGameDemo.gameApp.models.tanks; import javafx.scene.canvas.GraphicsContext; import javafx.scene.image.Image; import javafx.scene.image.ImageView; public abstract class Tank { private int x; private int y; private ImageView currentImage; public Tank(int x, int y) { this.x = x; this.y = y; } public abstract void draw(GraphicsContext graphicsContext); public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } public void setY(int y) { this.y = y; } public ImageView getCurrentImage() { return currentImage; } public void setCurrentImage(Image currentImage) { this.currentImage = new ImageView(currentImage); } }
[ "1" ]
1
237c0ad8f007ce011f1d9fb1ee216fe117c5e771
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/ca4af156d60d34af82dedb36f7e4c786183ce8c9/before/MethodChainsSearchService.java
7baa7435cd74503c1faad35776979a13211ffed7
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,923
java
package com.intellij.codeInsight.completion.methodChains.search; import com.intellij.compilerOutputIndex.impl.MethodIncompleteSignature; import com.intellij.compilerOutputIndex.impl.MethodsUsageIndex; import com.intellij.compilerOutputIndex.impl.UsageIndexValue; import com.intellij.compilerOutputIndex.impl.bigram.BigramMethodsUsageIndex; import com.intellij.openapi.project.Project; import com.intellij.psi.PsiManager; import org.jetbrains.annotations.NotNull; import java.util.HashMap; import java.util.Map; import java.util.SortedSet; import java.util.TreeSet; /** * @author Dmitry Batkovich <dmitry.batkovich@jetbrains.com> */ public class MethodChainsSearchService { private final static SortedSet EMPTY_SORTED_SET = new TreeSet(); private final MethodsUsageIndex myMethodsUsageIndex; private final BigramMethodsUsageIndex myBigramMethodsUsageIndex; private final Project myProject; public MethodChainsSearchService(final Project project) { myMethodsUsageIndex = MethodsUsageIndex.getInstance(project); myBigramMethodsUsageIndex = BigramMethodsUsageIndex.getInstance(project); myProject = project; } public Project getProject() { return myProject; } @NotNull @SuppressWarnings("unchecked") public SortedSet<UsageIndexValue> getBigram(final MethodIncompleteSignature methodIncompleteSignature) { final TreeSet<UsageIndexValue> value = myBigramMethodsUsageIndex.getValues(methodIncompleteSignature); if (value != null) { return value; } return EMPTY_SORTED_SET; } @NotNull @SuppressWarnings("unchecked") public SortedSet<UsageIndexValue> getMethods(final String targetQName) { final TreeSet<UsageIndexValue> value = myMethodsUsageIndex.getValues(targetQName); if (value != null) { return value; } return EMPTY_SORTED_SET; } public PsiManager getPsiManager() { return PsiManager.getInstance(getProject()); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
19ea3ad20095cf956207424d1e037c94d4df2ded
5ae3038438f9866f476797d1ef87d71c0a781f3a
/health_api/src/main/java/com/itheima/health/entity/Result.java
3c2123aaaac5c6956b5d50236e0d951f12410eef
[]
no_license
syngebee/health
7415e1765857609f439793d66fcf891ef6f32201
4414640ab8ec0f5ab43394de14f0179578d47057
refs/heads/master
2023-01-30T07:09:50.245082
2020-12-08T03:37:59
2020-12-08T03:37:59
301,422,932
1
1
null
null
null
null
UTF-8
Java
false
false
1,004
java
package com.itheima.health.entity; import java.io.Serializable; /** * 封装返回结果 */ public class Result implements Serializable{ private boolean flag;//执行结果,true为执行成功 false为执行失败 private String message;//返回结果信息 private Object data;//返回数据 public Result(boolean flag, String message) { super(); this.flag = flag; this.message = message; } public Result(boolean flag, String message, Object data) { this.flag = flag; this.message = message; this.data = data; } public boolean isFlag() { return flag; } public void setFlag(boolean flag) { this.flag = flag; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public Object getData() { return data; } public void setData(Object data) { this.data = data; } }
[ "zs@bjpowernode.com" ]
zs@bjpowernode.com
bfc9a1fde7b0341a14155593d446b2e2eba53e6a
3901c526aa4ac0f3e08a47cafa749c4fe6e014bf
/app/src/main/java/android/org/rajawali3d/loader/awd/BlockSkeleton.java
f2dfa7f8b48eefb36785f9c5c09fdc25a9d82af0
[]
no_license
dharmendrahike/Camera
574d27ac4d3315bdebe7218ae9475610b3626042
60a6bdc7ea8bebbba7f937564a29be23dc357629
refs/heads/master
2021-08-14T09:41:57.404175
2017-11-15T07:36:42
2017-11-15T07:36:42
110,798,435
0
0
null
null
null
null
UTF-8
Java
false
false
2,104
java
/* package android.org.rajawali3d.loader.awd; import android.org.rajawali3d.animation.mesh.SkeletalAnimationFrame.SkeletonJoint; import android.org.rajawali3d.loader.LoaderAWD.AWDLittleEndianDataInputStream; import android.org.rajawali3d.loader.LoaderAWD.BlockHeader; import android.org.rajawali3d.math.Matrix4; */ /** * Specifies the joint hierarchy and inverse-bind-pose matrices. * The skeleton itself is not bound to any particular mesh; it is * only assigned geometry by instances of BlockAnimator, where present. * * @author Ian Thomas (toxicbakery@gmail.com) * @author Bernard Gorman (bernard.gorman@gmail.com) * *//* public class BlockSkeleton extends ABlockParser { protected SkeletonJoint[] mJoints; protected String mLookupName; protected int mNumJoints; private final Matrix4 transformMatrix = new Matrix4(); // extract the inverse-bind-pose matrices for each joint in the skeleton public void parseBlock(AWDLittleEndianDataInputStream dis, BlockHeader blockHeader) throws Exception { // Lookup name mLookupName = dis.readVarString(); // Number of skeleton joints mNumJoints = dis.readUnsignedShort(); // Skeleton attribute list (unused) dis.readProperties(null); // Skeleton joint parsing mJoints = new SkeletonJoint[mNumJoints]; for(int i = 0; i < mNumJoints; i++) { int jointID = dis.readUnsignedShort(); int parentID = dis.readUnsignedShort() - 1; String lookupName = dis.readVarString(); dis.readMatrix3D(transformMatrix, blockHeader.globalPrecisionMatrix, false); // skip joint & user properties dis.readProperties(null); dis.readProperties(null); // construct joint and add to list SkeletonJoint joint = new SkeletonJoint(); joint.setParentIndex(parentID); joint.setName(lookupName); joint.setIndex(jointID); // this is the INVERSE bind-pose matrix, take note for BlockAnimator joint.setMatrix(transformMatrix.getDoubleValues()); mJoints[i] = joint; } // skip User properties section dis.readProperties(null); } public SkeletonJoint[] getJoints() { return mJoints; } } */
[ "dharmendra@hike.in" ]
dharmendra@hike.in
62f1eebea1d283d242b4fac18ca66ce534ad0b60
87c3c335023681d1c906892f96f3a868b3a6ee8e
/HTML5/dev/simplivity-citrixplugin-service/src/main/java/com/vmware/pbm/PbmCapabilityVendorNamespaceInfo.java
3fdebe08507a815c9038b4945e9e41433d55216b
[ "Apache-2.0" ]
permissive
HewlettPackard/SimpliVity-Citrix-VCenter-Plugin
19d2b7655b570d9515bf7e7ca0cf1c823cbf5c61
504cbeec6fce27a4b6b23887b28d6a4e85393f4b
refs/heads/master
2023-08-09T08:37:27.937439
2020-04-30T06:15:26
2020-04-30T06:15:26
144,329,090
0
1
Apache-2.0
2020-04-07T07:27:53
2018-08-10T20:24:34
Java
UTF-8
Java
false
false
1,095
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2019.06.12 at 09:16:35 AM EDT // package com.vmware.pbm; import com.vmware.vim25.DynamicData; /** * */ @SuppressWarnings("all") public class PbmCapabilityVendorNamespaceInfo extends DynamicData { public PbmCapabilitySchemaVendorInfo vendorInfo; public PbmCapabilityNamespaceInfo namespaceInfo; public PbmCapabilitySchemaVendorInfo getVendorInfo() { return vendorInfo; } public void setVendorInfo(PbmCapabilitySchemaVendorInfo vendorInfo) { this.vendorInfo = vendorInfo; } public PbmCapabilityNamespaceInfo getNamespaceInfo() { return namespaceInfo; } public void setNamespaceInfo(PbmCapabilityNamespaceInfo namespaceInfo) { this.namespaceInfo = namespaceInfo; } }
[ "anuanusha471@gmail.com" ]
anuanusha471@gmail.com
7e0f16bfaa492366cbd32b0c656fb691aa0b3bde
f8bc1ccf953e9b6f9c6c81ead3f8fd6cdf8b14a3
/src/main/java/io/jboot/app/config/support/nacos/NacosConfigIniter.java
e996e70dd84fffc175cff06f48958068e0bd8b70
[ "Apache-2.0" ]
permissive
hankss/jboot
cc71e9e0a913ab2ef7962d7febee8f81a806b1e4
a158336f1b30cb1d4008fe283f6ccd2e1703d551
refs/heads/master
2022-11-19T07:57:01.680187
2020-07-15T09:08:33
2020-07-15T09:08:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,954
java
/** * Copyright (c) 2015-2020, Michael Yang 杨福海 (fuhai999@gmail.com). * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.jboot.app.config.support.nacos; import com.alibaba.nacos.api.config.ConfigService; import com.alibaba.nacos.api.config.listener.Listener; import io.jboot.app.config.JbootConfigManager; import java.util.concurrent.Executor; /** * @author michael yang (fuhai999@gmail.com) * @Date: 2020/2/9 */ public class NacosConfigIniter { private NacosConfigManager manager; private JbootConfigManager configManager; public NacosConfigIniter(NacosConfigManager manager, JbootConfigManager configManager) { this.manager = manager; this.configManager = configManager; } public void initListener(ConfigService configService, NacosServerConfig config) { try { configService.addListener(config.getDataId(), config.getGroup() , new Listener() { @Override public Executor getExecutor() { return null; } @Override public void receiveConfigInfo(String configInfo) { manager.doReceiveConfigInfo(configManager, configInfo); } }); } catch (Exception e) { e.printStackTrace(); } } }
[ "fuhai999@gmail.com" ]
fuhai999@gmail.com
ae616ae55a625053d59790797a098397f094a9cb
39bef83f3a903f49344b907870feb10a3302e6e4
/Android Studio Projects/bf.io.openshop/src/com/facebook/share/widget/AppInviteDialog$WebFallbackHandler.java
aed7b94721d0c920217dcc0d35f44e7535c84e03
[]
no_license
Killaker/Android
456acf38bc79030aff7610f5b7f5c1334a49f334
52a1a709a80778ec11b42dfe9dc1a4e755593812
refs/heads/master
2021-08-19T06:20:26.551947
2017-11-24T22:27:19
2017-11-24T22:27:19
111,960,738
0
0
null
null
null
null
UTF-8
Java
false
false
622
java
package com.facebook.share.widget; import com.facebook.share.model.*; import com.facebook.internal.*; private class WebFallbackHandler extends ModeHandler { public boolean canShow(final AppInviteContent appInviteContent) { return AppInviteDialog.access$500(); } public AppCall createAppCall(final AppInviteContent appInviteContent) { final AppCall baseAppCall = AppInviteDialog.this.createBaseAppCall(); DialogPresenter.setupAppCallForWebFallbackDialog(baseAppCall, AppInviteDialog.access$300(appInviteContent), AppInviteDialog.access$400()); return baseAppCall; } }
[ "ema1986ct@gmail.com" ]
ema1986ct@gmail.com
4b0ad9c5c2877139484cb26bdf7c06ff70f1520b
c2d782fc19a27ce8b6c2f5a924d6f3c66f85e013
/src/Dynamic_Programming/LongestPalidromicSubSequenceByLCS.java
fc84b310aec5d0786a820cbd178c78ba90e689ef
[]
no_license
ravicode/github
5fe94e553e2a6c953bde484ee4458a35602820bc
9e97a9655212456bd1149229a8d6b0a38c4f3f3a
refs/heads/master
2021-01-01T04:40:16.943559
2016-04-23T20:20:01
2016-04-23T20:20:01
56,939,062
0
1
null
null
null
null
UTF-8
Java
false
false
1,063
java
package Dynamic_Programming; import java.util.Stack; /*This problem is close to the Longest Common Subsequence (LCS) problem. In fact, we can use LCS as a subroutine to solve this problem. Following is the two step solution that uses LCS. 1) Reverse the given sequence and store the reverse in another array say rev[0..n-1] 2) LCS of the given sequence and rev[] will be the longest palindromic sequence. This solution is also a O(n^2) solution.*/ public class LongestPalidromicSubSequenceByLCS { public static void main(String[] args) { char ch1[] = "BDCABA".toCharArray(); char ch2[] = "ABACDB".toCharArray(); //it is reverse of ch1 Stack<Character> backTrack=new Stack<Character>(); int arr[][] = new int[ch1.length + 1][ch2.length + 1]; boolean arrBoolean[][] = new boolean[ch1.length + 1][ch2.length + 1]; LongestCommonSubsequence.printLcsLength(ch1, ch2, arr, arrBoolean); System.out.println("length of LCS=" + arr[ch1.length][ch2.length]); LongestCommonSubsequence.printLCS(ch1, ch2, backTrack, arr, arrBoolean); } }
[ "ravi.ters@gmail.com" ]
ravi.ters@gmail.com
c1e85a2364067ab464430ac169df1108d688e4ba
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/zuiyou/sources/cn/xiaochuankeji/tieba/ui/my/mypost/a.java
d0b91f75146d4e913c5ee5ab4a32d5fb3f3972b2
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
134
java
package cn.xiaochuankeji.tieba.ui.my.mypost; public class a { public long a; public a(long j) { this.a = j; } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
1fd0e1af364f1836942d2c99c9ab923f7ff17fb0
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/branches/sigar-maven/code/base/dso-spring/tests.unit/com/tctest/spring/bean/CounterSaverMixinAdvisor.java
bbdb9035c67bde82cc3d5a6151c30636510aba26
[]
no_license
sirinath/Terracotta
fedfc2c4f0f06c990f94b8b6c3b9c93293334345
00a7662b9cf530dfdb43f2dd821fa559e998c892
refs/heads/master
2021-01-23T05:41:52.414211
2015-07-02T15:21:54
2015-07-02T15:21:54
38,613,711
1
0
null
null
null
null
UTF-8
Java
false
false
438
java
/* * All content copyright (c) 2003-2008 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. */ package com.tctest.spring.bean; import org.springframework.aop.support.DefaultIntroductionAdvisor; public class CounterSaverMixinAdvisor extends DefaultIntroductionAdvisor { public CounterSaverMixinAdvisor() { super(new CounterSaverMixin(), CounterSaver.class); } }
[ "jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
jvoegele@7fc7bbf3-cf45-46d4-be06-341739edd864
d7f4dcafb1353e4754ea9f57eb34ed1d95422b06
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/eipanycast-20200309/src/main/java/com/aliyun/eipanycast20200309/models/AssociateAnycastEipAddressResponse.java
f252b50334301f5329c6e637012efee97183d19e
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,484
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.eipanycast20200309.models; import com.aliyun.tea.*; public class AssociateAnycastEipAddressResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("statusCode") @Validation(required = true) public Integer statusCode; @NameInMap("body") @Validation(required = true) public AssociateAnycastEipAddressResponseBody body; public static AssociateAnycastEipAddressResponse build(java.util.Map<String, ?> map) throws Exception { AssociateAnycastEipAddressResponse self = new AssociateAnycastEipAddressResponse(); return TeaModel.build(map, self); } public AssociateAnycastEipAddressResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public AssociateAnycastEipAddressResponse setStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } public Integer getStatusCode() { return this.statusCode; } public AssociateAnycastEipAddressResponse setBody(AssociateAnycastEipAddressResponseBody body) { this.body = body; return this; } public AssociateAnycastEipAddressResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
c14533517af09289b27549ea4c105f756b4c5cb1
a23b0c79672b59b7fee2f0730269318d8959ee18
/src/main/java/org/elasticsearch/rest/action/cat/RestFielddataAction.java
b4d5e9833cb69b80127f4bbdadfe6d87e6aaf4e8
[ "Apache-2.0" ]
permissive
lemonJun/ESHunt
1d417fc3605be8c5b384c66a5b623dea6ba77a6a
d66ed11d64234e783f67699e643daa77c9d077e3
refs/heads/master
2021-01-19T08:30:47.171304
2017-04-09T06:08:58
2017-04-09T06:08:58
87,639,997
1
0
null
null
null
null
UTF-8
Java
false
false
5,636
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch 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.elasticsearch.rest.action.cat; import com.carrotsearch.hppc.ObjectLongMap; import com.carrotsearch.hppc.ObjectLongOpenHashMap; import org.elasticsearch.action.admin.cluster.node.stats.NodeStats; import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsRequest; import org.elasticsearch.action.admin.cluster.node.stats.NodesStatsResponse; import org.elasticsearch.client.Client; import org.elasticsearch.common.Table; import org.elasticsearch.common.inject.Inject; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.rest.*; import org.elasticsearch.rest.action.support.RestResponseListener; import org.elasticsearch.rest.action.support.RestTable; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import static org.elasticsearch.rest.RestRequest.Method.GET; /** * Cat API class to display information about the size of fielddata fields per node */ public class RestFielddataAction extends AbstractCatAction { @Inject public RestFielddataAction(Settings settings, RestController controller, Client client) { super(settings, controller, client); controller.registerHandler(GET, "/_cat/fielddata", this); controller.registerHandler(GET, "/_cat/fielddata/{fields}", this); } @Override void doRequest(final RestRequest request, final RestChannel channel, final Client client) { final NodesStatsRequest nodesStatsRequest = new NodesStatsRequest(); nodesStatsRequest.clear(); nodesStatsRequest.indices(true); String[] fields = request.paramAsStringArray("fields", null); nodesStatsRequest.indices().fieldDataFields(fields == null ? new String[] { "*" } : fields); client.admin().cluster().nodesStats(nodesStatsRequest, new RestResponseListener<NodesStatsResponse>(channel) { @Override public RestResponse buildResponse(NodesStatsResponse nodeStatses) throws Exception { return RestTable.buildResponse(buildTable(request, nodeStatses), channel); } }); } @Override void documentation(StringBuilder sb) { sb.append("/_cat/fielddata\n"); sb.append("/_cat/fielddata/{fields}\n"); } @Override Table getTableWithHeader(RestRequest request) { Table table = new Table(); table.startHeaders().addCell("id", "desc:node id").addCell("host", "alias:h;desc:host name").addCell("ip", "desc:ip address").addCell("node", "alias:n;desc:node name").addCell("total", "text-align:right;desc:total field data usage").endHeaders(); return table; } private Table buildTable(final RestRequest request, final NodesStatsResponse nodeStatses) { Set<String> fieldNames = new HashSet<>(); Map<NodeStats, ObjectLongMap<String>> nodesFields = new HashMap<>(); // Collect all the field names so a new table can be built for (NodeStats ns : nodeStatses.getNodes()) { ObjectLongOpenHashMap<String> fields = ns.getIndices().getFieldData().getFields(); nodesFields.put(ns, fields); if (fields != null) { for (String key : fields.keys().toArray(String.class)) { fieldNames.add(key); } } } // The table must be rebuilt because it has dynamic headers based on the fields Table table = new Table(); table.startHeaders().addCell("id", "desc:node id").addCell("host", "alias:h;desc:host name").addCell("ip", "desc:ip address").addCell("node", "alias:n;desc:node name").addCell("total", "text-align:right;desc:total field data usage"); // The table columns must be built dynamically since the number of fields is unknown for (String fieldName : fieldNames) { table.addCell(fieldName, "text-align:right;desc:" + fieldName + " field"); } table.endHeaders(); for (Map.Entry<NodeStats, ObjectLongMap<String>> statsEntry : nodesFields.entrySet()) { table.startRow(); // add the node info and field data total before each individual field NodeStats ns = statsEntry.getKey(); table.addCell(ns.getNode().id()); table.addCell(ns.getNode().getHostName()); table.addCell(ns.getNode().getHostAddress()); table.addCell(ns.getNode().getName()); table.addCell(ns.getIndices().getFieldData().getMemorySize()); ObjectLongMap<String> fields = statsEntry.getValue(); for (String fieldName : fieldNames) { table.addCell(new ByteSizeValue(fields == null ? 0L : fields.getOrDefault(fieldName, 0L))); } table.endRow(); } return table; } }
[ "506526593@qq.com" ]
506526593@qq.com
e81953fcd7b35b2f17c8659e117e9bf1d832fc5a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_257c87a88ecdfa8def9079133a9ad8e801ddc3be/ObjectMapperTest/2_257c87a88ecdfa8def9079133a9ad8e801ddc3be_ObjectMapperTest_s.java
bcb6589606b9eae8c7bdc7184c1e522ded5dac0f
[]
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,583
java
package de.caluga.test.mongo.suite; import com.mongodb.BasicDBObject; import com.mongodb.DBObject; import de.caluga.morphium.Morphium; import de.caluga.morphium.ObjectMapperImpl; import org.bson.types.ObjectId; import org.junit.Test; import java.util.Date; /** * User: Stpehan Bösebeck * Date: 26.03.12 * Time: 14:04 * <p/> * TODO: Add documentation here */ public class ObjectMapperTest extends MongoTest { @Test public void testCreateCamelCase() throws Exception { ObjectMapperImpl om = new ObjectMapperImpl(); assert (om.createCamelCase("this_is_a_test", false).equals("thisIsATest")) : "Error camil case translation not working"; assert (om.createCamelCase("a_test_this_is", true).equals("ATestThisIs")) : "Error - capitalized String wrong"; } @Test public void testConvertCamelCase() throws Exception { ObjectMapperImpl om = new ObjectMapperImpl(); assert (om.convertCamelCase("thisIsATest").equals("this_is_a_test")) : "Conversion failed!"; } @Test public void testGetCollectionName() throws Exception { ObjectMapperImpl om = new ObjectMapperImpl(); assert (om.getCollectionName(CachedObject.class).equals("cached_object")) : "Cached object test failed"; assert (om.getCollectionName(UncachedObject.class).equals("uncached_object")) : "Uncached object test failed"; } @Test public void testMarshall() throws Exception { ObjectMapperImpl om = new ObjectMapperImpl(); UncachedObject o = new UncachedObject(); o.setCounter(12345); o.setValue("This \" is $ test"); DBObject dbo = om.marshall(o); System.out.println("Marshalling was: " + dbo.toString()); assert (dbo.toString().equals("{ \"value\" : \"This \\\" is $ test\" , \"counter\" : 12345 , \"_id\" : null }")) : "String creation failed?" + dbo.toString(); } @Test public void testUnmarshall() throws Exception { ObjectMapperImpl om = new ObjectMapperImpl(); BasicDBObject dbo = new BasicDBObject(); dbo.put("counter", 12345); dbo.put("value", "A test"); om.unmarshall(UncachedObject.class, dbo); } @Test public void testGetId() throws Exception { ObjectMapperImpl om = new ObjectMapperImpl(); UncachedObject o = new UncachedObject(); o.setCounter(12345); o.setValue("This \" is $ test"); o.setMongoId(new ObjectId(new Date())); ObjectId id = om.getId(o); assert (id.equals(o.getMongoId())) : "IDs not equal!"; } @Test public void testIsEntity() throws Exception { ObjectMapperImpl om = new ObjectMapperImpl(); assert (om.isEntity(UncachedObject.class)) : "Uncached Object no Entity?=!?=!?"; assert (om.isEntity(new UncachedObject())) : "Uncached Object no Entity?=!?=!?"; assert (!om.isEntity("")) : "String is an Entity?"; } @Test public void testGetValue() throws Exception { ObjectMapperImpl om = new ObjectMapperImpl(); UncachedObject o = new UncachedObject(); o.setCounter(12345); o.setValue("This \" is $ test"); assert (om.getValue(o, "counter").equals(12345)) : "Value not ok!"; } @Test public void testSetValue() throws Exception { ObjectMapperImpl om = new ObjectMapperImpl(); UncachedObject o = new UncachedObject(); o.setCounter(12345); om.setValue(o, "A test", "value"); assert ("A test".equals(o.getValue())) : "Value not set"; } @Test public void complexObjectTest() { ObjectMapperImpl om = new ObjectMapperImpl(); UncachedObject o = new UncachedObject(); o.setCounter(12345); o.setValue("Embedded value"); Morphium.get().store(o); ComplexObject co = new ComplexObject(); co.setEinText("Ein text"); co.setEmbed(o); ObjectId embedId = o.getMongoId(); o = new UncachedObject(); o.setCounter(12345); o.setValue("Referenced value"); // o.setMongoId(new ObjectId(new Date())); Morphium.get().store(o); co.setRef(o); co.setId(new ObjectId(new Date())); String st = co.toString(); System.out.println("Referenced object: " + om.marshall(o).toString()); DBObject marshall = om.marshall(co); System.out.println("Complex object: " + marshall.toString()); //Unmarshalling stuff co = om.unmarshall(ComplexObject.class, marshall); co.getEmbed().setMongoId(embedId); //need to set ID manually, as it won't be stored! String st2 = co.toString(); assert (st.equals(st2)) : "Strings not equal?\n" + st + "\n" + st2; } @Test public void nullValueTests() { ObjectMapperImpl om = new ObjectMapperImpl(); ComplexObject o=new ComplexObject(); o.setTrans("TRANSIENT"); DBObject obj=null; try { obj= om.marshall(o); } catch(IllegalArgumentException e) { //good, ein_text is null - should trigger this exception! } assert(obj==null):"NotNull constraint not enforced! "+obj.toString(); o.setEinText("Ein Text"); obj=om.marshall(o); assert(!obj.containsField("trans")):"Transient field used?!?!?"; assert(obj.containsField("null_value")):"Null value not set"; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4df333d08970a524e4f25d6285c1dc682493459e
890af51efbc9b8237e0fd09903f78fe2bb9caadd
/general/storage/com/hd/agent/storage/dao/AdjustmentsMapper.java
af5019b574419fa00b4a918ee9a0ac01ebdc0989
[]
no_license
1045907427/project
815fb0c5b4b44bf5d8365acfde61b6f68be6e52a
6eaecf09cd3414295ccf91454f62cf4d619cdbf2
refs/heads/master
2020-04-14T19:17:54.310613
2019-01-14T10:49:11
2019-01-14T10:49:11
164,052,678
0
5
null
null
null
null
UTF-8
Java
false
false
4,072
java
package com.hd.agent.storage.dao; import com.hd.agent.common.util.PageMap; import com.hd.agent.storage.model.Adjustments; import com.hd.agent.storage.model.AdjustmentsDetail; import org.apache.ibatis.annotations.Param; import java.math.BigDecimal; import java.util.List; import java.util.Map; /** * 库存调账单dao * @author chenwei */ public interface AdjustmentsMapper { /** * 添加调账单基本信息 * @param adjustments * @return * @author chenwei * @date May 24, 2013 */ public int addAdjustments(Adjustments adjustments); /** * 添加调整单明细信息 * @param adjustmentsDetail * @return * @author chenwei * @date May 24, 2013 */ public int addAdjustmentsDetail(AdjustmentsDetail adjustmentsDetail); /** * 获取调账单列表 * @param pageMap * @return * @author chenwei * @date May 25, 2013 */ public List showAdjustmentsList(PageMap pageMap); /** * 获取调账单数量 * @param pageMap * @return * @author chenwei * @date May 25, 2013 */ public int showAdjustmentsCount(PageMap pageMap); /** * 获取调账单信息 * @param id * @return * @author chenwei * @date May 25, 2013 */ public Adjustments getAdjustmentsInfo(@Param("id")String id); /** * 根据调账单编号获取调账单明细列表 * @param adjustmentsid * @param storageid * @return * @author chenwei * @date May 25, 2013 */ public List getAdjustmentsDetailList(@Param("adjustmentsid")String adjustmentsid, @Param("storageid")String storageid); /** * 删除调账单 * @param id * @return * @author chenwei * @date May 25, 2013 */ public int deleteAdjustments(@Param("id")String id); /** * 删除调账单明细 * @param adjustmentsid * @return * @author chenwei * @date May 25, 2013 */ public int deleteAdjustmentsDetail(@Param("adjustmentsid")String adjustmentsid); /** * 修改调账单 * @param adjustments * @return * @author chenwei * @date May 27, 2013 */ public int editAdjustments(Adjustments adjustments); /** * 通过盘点单编号,获取调账单信息 * @param checkListid * @return * @author chenwei * @date May 28, 2013 */ public Adjustments getAdjustmentsByCheckListid(String checkListid); /** * 审核调账单 * @param id * @param userid * @param username * @return * @author chenwei * @date May 28, 2013 */ public int auditAdjustments(@Param("id")String id,@Param("userid")String userid,@Param("username")String username,@Param("businessdate")String businessdate); /** * 反审调账单 * @param id * @return * @author chenwei * @date May 28, 2013 */ public int oppauditAdjustments(@Param("id")String id); /** * 导出调账单 * @param pageMap * @return * @author panxiaoxiao * @date Apr 29, 2014 */ public List<Map<String, Object>> getAdjustmentListExport(PageMap pageMap); /** * 获取调账单列表<br/> * map中参数:<br/> * dataSql:数据权限<br/> * idarrs: 编号字符串组,类似 1,2,3<br/> * status: 表示状态3<br/> * statusarr: 表示状态,类似 1,2,3<br/> * billtype : 单据类型1报益单2报损单<br/> * @param map * @return * @author zhanghonghui * @date 2013-10-16 */ public List showAdjustmentsListBy(Map map); /** * 更新打印次数 * @param adjustments * @return * @author zhanghonghui * @date 2015年1月9日 */ public int updateOrderPrinttimes(Adjustments adjustments); /** * 更新调账单明细相关的商品批次编号 * @param id * @param summarybatchid * @return * @author chenwei * @date 2015年10月28日 */ public int updateAdjustmentsDetailSummarybatchid(@Param("id")String id,@Param("summarybatchid")String summarybatchid,@Param("price")BigDecimal price); /** * 获取报溢调账单生成凭证的数据 * @param list * @return java.util.List * @throws * @author luoqiang * @date Jan 03, 2018 */ public List getAdjustmentsSumData(@Param("list")List list,@Param("billtype")String billtype); }
[ "1045907427@qq.com" ]
1045907427@qq.com
b5e4e13500bb53c136a7e0cd323fd0a91b342251
c7419e15724c8f6d147522e252b07c168f853a2c
/src/main/java/net/consensys/eventeum/integration/broadcast/BlockchainEventBroadcaster.java
9bdc8001f0c9155dcc8cf23b160c4d7000f846c4
[ "Apache-2.0" ]
permissive
azeem-r00t/eventeum
3a34b413bf7716e4cea26bc3d2fb929b69e91153
7358ea3b2c04ca60743daed5caf74f92e9229416
refs/heads/master
2020-03-19T02:35:45.507529
2018-06-04T16:05:51
2018-06-04T16:05:51
135,642,562
0
0
Apache-2.0
2018-06-04T16:05:52
2018-05-31T22:49:34
Java
UTF-8
Java
false
false
747
java
package net.consensys.eventeum.integration.broadcast; import net.consensys.eventeum.dto.block.BlockDetails; import net.consensys.eventeum.dto.event.ContractEventDetails; /** * An interface for a class that broadcasts etheruem blockchain details to the wider system. * * @author Craig Williams <craig.williams@consensys.net> */ public interface BlockchainEventBroadcaster { /** * Broadcast details of a new block that has been mined. * @param block */ void broadcastNewBlock(BlockDetails block); /** * Broadcasts details of a new smart contract event that has been emitted from the ethereum blockchain. * @param eventDetails */ void broadcastContractEvent(ContractEventDetails eventDetails); }
[ "craigwilliams84@googlemail.com" ]
craigwilliams84@googlemail.com
e05258671a7ef2da56ed8043d4af14739b71bdb5
8fa221482da055f4c8105b590617a27595826cc3
/sources/com/google/android/gms/games/internal/api/zzcg.java
7257538360fba8f27aae2c75fd6992ff53462184
[]
no_license
TehVenomm/sauceCodeProject
4ed2f12393e67508986aded101fa2db772bd5c6b
0b4e49a98d14b99e7d144a20e4c9ead408694d78
refs/heads/master
2023-03-15T16:36:41.544529
2018-10-08T03:44:58
2018-10-08T03:44:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,194
java
package com.google.android.gms.games.internal.api; import android.os.RemoteException; import com.google.android.gms.common.api.Api.zzb; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.internal.zzn; import com.google.android.gms.games.internal.GamesClientImpl; import com.google.android.gms.games.snapshot.SnapshotContents; import com.google.android.gms.games.snapshot.SnapshotMetadataChange; final class zzcg extends zzcn { private /* synthetic */ SnapshotMetadataChange zzhhz; private /* synthetic */ String zzhib; private /* synthetic */ String zzhic; private /* synthetic */ SnapshotContents zzhid; zzcg(zzcb zzcb, GoogleApiClient googleApiClient, String str, String str2, SnapshotMetadataChange snapshotMetadataChange, SnapshotContents snapshotContents) { this.zzhib = str; this.zzhic = str2; this.zzhhz = snapshotMetadataChange; this.zzhid = snapshotContents; super(googleApiClient); } protected final /* synthetic */ void zza(zzb zzb) throws RemoteException { ((GamesClientImpl) zzb).zza((zzn) this, this.zzhib, this.zzhic, this.zzhhz, this.zzhid); } }
[ "gabrielbrazs@gmail.com" ]
gabrielbrazs@gmail.com
50d1b50309453cb0699d6e80d60b6f121a4a325f
3386dd7e7be492cfb06912215e5ef222bbc7ce34
/autocomment_netbeans/spooned/org/jbpm/query/jpa/data/JaxbQuerySerializationTest.java
c06af43f0f7c49a9b82a6eb9e06885411eba0be5
[ "Apache-2.0" ]
permissive
nerzid/autocomment
cc1d3af05045bf24d279e2f824199ac8ae51b5fd
5803cf674f5cadfdc672d4957d46130a3cca6cd9
refs/heads/master
2021-03-24T09:17:16.799705
2016-09-28T14:32:21
2016-09-28T14:32:21
69,360,519
0
1
null
null
null
null
UTF-8
Java
false
false
2,576
java
/** * Copyright 2015 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * 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.jbpm.query.jpa.data; import java.util.ArrayList; import java.io.ByteArrayInputStream; import java.util.HashSet; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import java.util.List; import javax.xml.bind.Marshaller; import java.util.Set; import java.io.StringWriter; import javax.xml.bind.Unmarshaller; public class JaxbQuerySerializationTest extends AbstractQuerySerializationTest { Set<Class> extraClasses = new HashSet<Class>(); @Override public <T> T testRoundTrip(T input) throws Exception { String xmlStr = convertJaxbObjectToString(input); logger.debug(xmlStr); return ((T) (convertStringToJaxbObject(xmlStr, input.getClass()))); } public String convertJaxbObjectToString(Object object) throws JAXBException { List<Class> classes = new ArrayList<Class>(); classes.add(object.getClass()); classes.addAll(extraClasses); Marshaller marshaller = JAXBContext.newInstance(classes.toArray(new Class[classes.size()])).createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); StringWriter stringWriter = new StringWriter(); marshaller.marshal(object, stringWriter); String output = stringWriter.toString(); return output; } public Object convertStringToJaxbObject(String xmlStr, Class clazz) throws JAXBException { List<Class> classes = new ArrayList<Class>(); classes.add(clazz); classes.addAll(extraClasses); Unmarshaller unmarshaller = JAXBContext.newInstance(classes.toArray(new Class[classes.size()])).createUnmarshaller(); ByteArrayInputStream xmlStrInputStream = new ByteArrayInputStream(xmlStr.getBytes()); Object jaxbObj = unmarshaller.unmarshal(xmlStrInputStream); return jaxbObj; } @Override void addSerializableClass(Class objClass) { JaxbQuerySerializationTest.this.extraClasses.add(objClass); } }
[ "nerzid@gmail.com" ]
nerzid@gmail.com
cc8cd94c7c3da652ae9aba60b1a4fe1a1406b17e
ba005c6729aed08554c70f284599360a5b3f1174
/lib/selenium-server-standalone-3.4.0/org/apache/http/conn/OperatedClientConnection.java
ca717ff1b4d952d4d637216f46d7d56fe364266a
[]
no_license
Viral-patel703/Testyourbond-aut0
f6727a6da3b1fbf69cc57aeb89e15635f09e249a
784ab7a3df33d0efbd41f3adadeda22844965a56
refs/heads/master
2020-08-09T00:27:26.261661
2017-11-07T10:12:05
2017-11-07T10:12:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
858
java
package org.apache.http.conn; import java.io.IOException; import java.net.Socket; import org.apache.http.HttpClientConnection; import org.apache.http.HttpHost; import org.apache.http.HttpInetConnection; import org.apache.http.params.HttpParams; @Deprecated public abstract interface OperatedClientConnection extends HttpClientConnection, HttpInetConnection { public abstract HttpHost getTargetHost(); public abstract boolean isSecure(); public abstract Socket getSocket(); public abstract void opening(Socket paramSocket, HttpHost paramHttpHost) throws IOException; public abstract void openCompleted(boolean paramBoolean, HttpParams paramHttpParams) throws IOException; public abstract void update(Socket paramSocket, HttpHost paramHttpHost, boolean paramBoolean, HttpParams paramHttpParams) throws IOException; }
[ "VIRUS-inside@users.noreply.github.com" ]
VIRUS-inside@users.noreply.github.com
91f4660f185483aec2aafa2c6c6361021c728bd9
bc12106d1c0a727cac074bcdfd85f1ed08846519
/src/main/java/com/example/mbenben/studydemo/anim/swipbackhelper/view/SwipeBackPage.java
ee72e8d6ec2eb563dc0a6b323c2a3c612fa55f3a
[]
no_license
zhiaixinyang/PersonalCollect
35810b03683725f437006da3613089aa94a436bf
5f70cfa12275b2c492af66454b6c039a861f3f10
refs/heads/master
2021-01-11T20:00:14.080510
2018-12-15T09:10:12
2018-12-15T09:10:12
79,442,513
59
11
null
null
null
null
UTF-8
Java
false
false
3,605
java
package com.example.mbenben.studydemo.anim.swipbackhelper.view; import android.annotation.TargetApi; import android.app.Activity; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.view.ViewGroup; /** * Created by Mr.Jude on 2015/8/3. * 每个滑动页面的管理 */ public class SwipeBackPage { //仅为判断是否需要将mSwipeBackLayout注入进去 private boolean mEnable = true; private boolean mRelativeEnable = false; Activity mActivity; SwipeBackLayout mSwipeBackLayout; RelateSlider slider; SwipeBackPage(Activity activity){ this.mActivity = activity; } //页面的回调用于配置滑动效果 void onCreate(){ mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); mActivity.getWindow().getDecorView().setBackgroundColor(Color.TRANSPARENT); mSwipeBackLayout = new SwipeBackLayout(mActivity); mSwipeBackLayout.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); slider = new RelateSlider(this); } void onPostCreate(){ handleLayout(); } @TargetApi(11) public SwipeBackPage setSwipeRelateEnable(boolean enable){ mRelativeEnable = enable; slider.setEnable(enable); return this; } public SwipeBackPage setSwipeRelateOffset(int offset){ slider.setOffset(offset); return this; } //是否可滑动关闭 public SwipeBackPage setSwipeBackEnable(boolean enable) { mEnable = enable; mSwipeBackLayout.setEnableGesture(enable); handleLayout(); return this; } private void handleLayout(){ if (mEnable||mRelativeEnable){ mSwipeBackLayout.attachToActivity(mActivity); }else { mSwipeBackLayout.removeFromActivity(mActivity); } } //可滑动的范围。百分比。200表示为左边200px的屏幕 public SwipeBackPage setSwipeEdge(int swipeEdge){ mSwipeBackLayout.setEdgeSize(swipeEdge); return this; } //可滑动的范围。百分比。0.2表示为左边20%的屏幕 public SwipeBackPage setSwipeEdgePercent(float swipeEdgePercent){ mSwipeBackLayout.setEdgeSizePercent(swipeEdgePercent); return this; } //对横向滑动手势的敏感程度。0为迟钝 1为敏感 public SwipeBackPage setSwipeSensitivity(float sensitivity){ mSwipeBackLayout.setSensitivity(mActivity, sensitivity); return this; } //底层阴影颜色 public SwipeBackPage setScrimColor(int color){ mSwipeBackLayout.setScrimColor(color); return this; } //触发关闭Activity百分比 public SwipeBackPage setClosePercent(float percent){ mSwipeBackLayout.setScrollThreshold(percent); return this; } public SwipeBackPage setDisallowInterceptTouchEvent(boolean disallowIntercept){ mSwipeBackLayout.setDisallowInterceptTouchEvent(disallowIntercept); return this; } public SwipeBackPage addListener(SwipeListener listener){ mSwipeBackLayout.addSwipeListener(listener); return this; } public SwipeBackPage removeListener(SwipeListener listener){ mSwipeBackLayout.removeSwipeListener(listener); return this; } public SwipeBackLayout getSwipeBackLayout() { return mSwipeBackLayout; } public void scrollToFinishActivity() { mSwipeBackLayout.scrollToFinishActivity(); } }
[ "1024624013@qq.com" ]
1024624013@qq.com
b2b38000e65ff103e46806ccf0a33082c0a79385
acdddd8fd8b8cb78c33bec70b480436a7dbb11d9
/src/com/itap/jira/agile/Board.java
406a4f479f39451e549b25db1f7cceaa8b962183
[]
no_license
ynrani/iTAP
d72f77a2db9f5e96ad015a7095cf1c647282fff7
c5d4e369de7add21e443950c5b57721128669405
refs/heads/master
2021-01-02T14:29:45.970058
2020-02-09T03:57:08
2020-02-09T03:57:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,748
java
/** * jira-client - a simple JIRA REST client * Copyright (c) 2013 Bob Carroll (bob.carroll@alum.rit.edu) * <p> * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * <p> * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * <p> * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package com.itap.jira.agile; import com.itap.jira.Field; import com.itap.jira.JiraException; import com.itap.jira.RestClient; import net.sf.json.JSONObject; import java.util.List; /** * Represents an Agile Board. * * @author pldupont */ public class Board extends AgileResource { private String type; /** * Creates a Board from a JSON payload. * * @param restclient REST client instance * @param json JSON payload */ protected Board(RestClient restclient, JSONObject json) throws JiraException { super(restclient, json); } /** * Retrieves the given rapid view. * * @param restclient REST client instance * @param id Internal JIRA ID of the rapid view * @return a rapid view instance * @throws JiraException when the retrieval fails */ public static Board get(RestClient restclient, long id) throws JiraException { return AgileResource.get(restclient, Board.class, RESOURCE_URI + "board/" + id); } /** * Retrieves all boards visible to the session user. * * @param restclient REST client instance * @return a list of boards * @throws JiraException when the retrieval fails */ public static List<Board> getAll(RestClient restclient) throws JiraException { return AgileResource.list(restclient, Board.class, RESOURCE_URI + "board"); } @Override protected void deserialize(JSONObject json) throws JiraException { super.deserialize(json); type = Field.getString(json.get("type")); } /** * @return The board type. */ public String getType() { return this.type; } /** * @return All sprints related to the current board. * @throws JiraException when the retrieval fails */ public List<Sprint> getSprints() throws JiraException { return Sprint.getAll(getRestclient(), getId()); } /** * @return All issues in the Board backlog. * @throws JiraException when the retrieval fails */ public List<Issue> getBacklog() throws JiraException { return AgileResource.list(getRestclient(), Issue.class, RESOURCE_URI + "board/" + getId() + "/backlog", "issues"); } /** * @return All issues without epic in the Board . * @throws JiraException when the retrieval fails */ public List<Issue> getIssuesWithoutEpic() throws JiraException { return AgileResource.list(getRestclient(), Issue.class, RESOURCE_URI + "board/" + getId() + "/epic/none/issue", "issues"); } /** * @return All epics associated to the Board. * @throws JiraException when the retrieval fails */ public List<Epic> getEpics() throws JiraException { return AgileResource.list(getRestclient(), Epic.class, RESOURCE_URI + "board/" + getId() + "/epic"); } }
[ "bnrani@yahoo.com" ]
bnrani@yahoo.com
615e3b2ca12e9fce8a91d07f68a8ba7f066aef2e
553ee734ba4d0959294debb16b02a217bd1e634a
/BaseProcessor/src/main/java/net/sunxu/mybatis/automapper/processor/mapper/mapper/HandlerForDecorator.java
67332e8aa88215c612ad5ccb3d79210fe3d9179c
[ "MIT" ]
permissive
sunxuia/MyBatisAutoMapper
f235b265729d295fa391dfa95d7c2ae5eef8edd6
3e7475ffe57710bcd3532905ade9069c14f2ebb4
refs/heads/master
2021-07-01T05:45:12.109248
2019-11-02T12:53:57
2019-11-02T12:53:57
219,153,441
0
0
MIT
2021-04-22T18:43:37
2019-11-02T12:52:33
Java
UTF-8
Java
false
false
267
java
package net.sunxu.mybatis.automapper.processor.mapper.mapper; import net.sunxu.mybatis.automapper.processor.mapper.MapperElementsCreator; interface HandlerForDecorator { MapperElementsCreator decorate(MapperElementsCreator provider, MapperModel mapperModel); }
[ "ntsunxu@163.com" ]
ntsunxu@163.com
06d5853d780b60390688592eea358c10329f8c34
9127e73fb9ff6ca5fed8af9317a3a31ee2da3532
/app/src/main/java/com/zhongyou/meettvapplicaion/utils/SizeUtils.java
09bf8a14ea565cbf73bb0b4b6cee2167ebe66e82
[]
no_license
woyl/zy_tv
3e156ad0dc5982d9d994cbacddb4cc1d11a82003
ddd1b98695817c18687d0f3e0b18291a09d29f27
refs/heads/master
2023-01-19T01:59:33.987412
2020-11-26T04:59:18
2020-11-26T04:59:18
316,114,199
1
0
null
null
null
null
UTF-8
Java
false
false
3,723
java
package com.zhongyou.meettvapplicaion.utils; import android.app.Activity; import android.util.DisplayMetrics; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; /** * @author luopan@centerm.com * @date 2019-11-22 10:24. */ public class SizeUtils { Activity mActivity; public SizeUtils(Activity mActivity) { this.mActivity = mActivity; } /** * px转sp * * @param px * @return */ public float pxToSp(int px) { float sp; DisplayMetrics dm = new DisplayMetrics(); dm = mActivity.getResources().getDisplayMetrics(); int ppi = dm.densityDpi; sp = (float) (px * 160 / ppi); return sp; } public DisplayMetrics screenSize() { DisplayMetrics dm = new DisplayMetrics(); mActivity.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm; } public void setLayoutSize(View view, int wdith, int height) { ViewGroup.LayoutParams lt = view.getLayoutParams(); lt.height = height * screenHeight() / 1334; lt.width = wdith * screenWidth() / 750; view.setLayoutParams(lt); } public void setViewMatchParent(View view){ ViewGroup.LayoutParams lt = view.getLayoutParams(); lt.height = DisplayUtil.getHeight(mActivity); lt.width = DisplayUtil.getWidth(mActivity); view.setLayoutParams(lt); } public void setLayoutSizeHeight(View view, int height) { ViewGroup.LayoutParams lt = view.getLayoutParams(); lt.height = height; view.setLayoutParams(lt); } public void setLayoutSizeWidht(View view, int widht) { ViewGroup.LayoutParams lt = view.getLayoutParams(); lt.width = widht * screenWidth() / 750; view.setLayoutParams(lt); } public void setTextSize(TextView view, int size) { view.setTextSize(pxToSp(size * screenWidth() / 750) + 3); } public void setButtonTextSize(Button view, int size) { view.setTextSize(pxToSp(size * screenWidth() / 750) + 3); } public void setRelativeLayoutMargin( View view, int left, int top, int right, int bottom) { RelativeLayout navigationLl = new RelativeLayout(mActivity); RelativeLayout.LayoutParams lt = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); navigationLl.setLayoutParams(lt); lt.setMargins(left * screenWidth() / 750, top * screenHeight() / 1334, right * screenWidth() / 750, bottom * screenHeight() / 1334); view.setLayoutParams(lt); } public void setRelativeLayoutMargin( View view, int left, int top, int right, int bottom, int a) { RelativeLayout navigationLl = new RelativeLayout(mActivity); RelativeLayout.LayoutParams lt = new RelativeLayout.LayoutParams( RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); navigationLl.setLayoutParams(lt); lt.setMargins(left * screenWidth() / 750, top * screenHeight() / 1334, right * screenWidth() / 750, bottom * screenHeight() / 1334); view.setLayoutParams(lt); } public void setLinearLayoutMargin( LinearLayout viewGroup, View view, int left, int top, int right, int bottom) { LinearLayout.LayoutParams lt = new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT); viewGroup.setLayoutParams(lt); lt.setMargins(left * screenWidth() / 750, top * screenHeight() / 1334, right * screenWidth() / 750, bottom * screenHeight() / 1334); view.setLayoutParams(lt); } //得到屏幕宽 public int screenWidth() { return screenSize().widthPixels; } //得到屏幕的高 public int screenHeight() { return screenSize().heightPixels; } }
[ "676051397@qq.com" ]
676051397@qq.com
cd6b297d93707f0971d5c1bb3535fa2ac31eede8
61389bbb3a1c71e5e10101985913be0b52fcae87
/usage/src/main/java/com/ning/billing/usage/timeline/categories/CategoryAndMetrics.java
c1ba8b5fcd932700a5e135dd4840c3c2963f4204
[ "Apache-2.0" ]
permissive
pengfanhust/killbill
513de990b701d4bc98ecaa90eb054fc2b24eb10f
9acd2ea2745a96b35a9a4bb0648364ac04fa08c9
refs/heads/master
2021-01-18T12:07:57.489859
2012-10-28T20:19:28
2012-10-28T20:19:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,142
java
/* * Copyright 2010-2012 Ning, Inc. * * Ning licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.ning.billing.usage.timeline.categories; import java.util.HashSet; import java.util.List; import java.util.Set; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; public class CategoryAndMetrics implements Comparable<CategoryAndMetrics> { @JsonProperty private final String eventCategory; @JsonProperty private final Set<String> metrics = new HashSet<String>(); public CategoryAndMetrics(final String eventCategory) { this.eventCategory = eventCategory; } @JsonCreator public CategoryAndMetrics(@JsonProperty("eventCategory") final String eventCategory, @JsonProperty("metrics") final List<String> metrics) { this.eventCategory = eventCategory; this.metrics.addAll(metrics); } public void addMetric(final String metric) { metrics.add(metric); } public String getEventCategory() { return eventCategory; } public Set<String> getMetrics() { return metrics; } @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("CategoryAndMetrics"); sb.append("{eventCategory='").append(eventCategory).append('\''); sb.append(", metrics=").append(metrics); sb.append('}'); return sb.toString(); } @Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } final CategoryAndMetrics that = (CategoryAndMetrics) o; if (!eventCategory.equals(that.eventCategory)) { return false; } if (!metrics.equals(that.metrics)) { return false; } return true; } @Override public int hashCode() { int result = eventCategory.hashCode(); result = 31 * result + metrics.hashCode(); return result; } @Override public int compareTo(final CategoryAndMetrics o) { final int categoryComparison = eventCategory.compareTo(o.getEventCategory()); if (categoryComparison != 0) { return categoryComparison; } else { if (metrics.size() > o.getMetrics().size()) { return 1; } else if (metrics.size() < o.getMetrics().size()) { return -1; } else { return 0; } } } }
[ "pierre@mouraf.org" ]
pierre@mouraf.org