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
d3593b8c3324e4f7daf450843006a54069df9b3e
cc9786a30f6ee7da04400adc7253fd10dc9ece89
/vms-infrastructure/vms-upms/src/main/java/com/dreamcc/system/mapper/SysDictDataMapper.java
9ece6d4692acb35f64dd85383c346e7c0742e422
[ "Apache-2.0" ]
permissive
dreamcc0817/vms
a079a378f8db0cb4ec4e7c76a1e17aba61fb5cb1
5b87ec212eec544cf4a33f943effa82c3a05307e
refs/heads/master
2022-07-02T10:59:46.293705
2021-12-08T03:29:34
2021-12-08T03:29:34
227,776,188
21
13
Apache-2.0
2022-06-17T02:44:39
2019-12-13T06:56:00
Java
UTF-8
Java
false
false
2,440
java
package com.dreamcc.system.mapper; import com.dreamcc.system.api.domain.SysDictData; import org.apache.ibatis.annotations.Param; import java.util.List; /** * 字典表 数据层 * * @author ruoyi */ public interface SysDictDataMapper { /** * 根据条件分页查询字典数据 * * @param dictData 字典数据信息 * @return 字典数据集合信息 */ public List<SysDictData> selectDictDataList(SysDictData dictData); /** * 根据字典类型查询字典数据 * * @param dictType 字典类型 * @return 字典数据集合信息 */ public List<SysDictData> selectDictDataByType(String dictType); /** * 根据字典类型和字典键值查询字典数据信息 * * @param dictType 字典类型 * @param dictValue 字典键值 * @return 字典标签 */ public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue); /** * 根据字典数据ID查询信息 * * @param dictCode 字典数据ID * @return 字典数据 */ public SysDictData selectDictDataById(Long dictCode); /** * 查询字典数据 * * @param dictType 字典类型 * @return 字典数据 */ public int countDictDataByType(String dictType); /** * 通过字典ID删除字典数据信息 * * @param dictCode 字典数据ID * @return 结果 */ public int deleteDictDataById(Long dictCode); /** * 批量删除字典数据信息 * * @param dictCodes 需要删除的字典数据ID * @return 结果 */ public int deleteDictDataByIds(Long[] dictCodes); /** * 新增字典数据信息 * * @param dictData 字典数据信息 * @return 结果 */ public int insertDictData(SysDictData dictData); /** * 修改字典数据信息 * * @param dictData 字典数据信息 * @return 结果 */ public int updateDictData(SysDictData dictData); /** * 同步修改字典类型 * * @param oldDictType 旧字典类型 * @param newDictType 新旧字典类型 * @return 结果 */ public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); }
[ "dreamcc0817@gmail.com" ]
dreamcc0817@gmail.com
f06bae2e08be863285d0bf8654d30d8d77a4d5ad
6baa09045c69b0231c35c22b06cdf69a8ce227d6
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201607/cm/PolicyData.java
8bd08b7c2ec9432eeba095d451ea3dc56079889f
[ "Apache-2.0" ]
permissive
remotejob/googleads-java-lib
f603b47117522104f7df2a72d2c96ae8c1ea011d
a330df0799de8d8de0dcdddf4c317d6b0cd2fe10
refs/heads/master
2020-12-11T01:36:29.506854
2016-07-28T22:13:24
2016-07-28T22:13:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,039
java
/** * PolicyData.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.adwords.axis.v201607.cm; /** * Approval and policy information attached to an entity. */ public class PolicyData implements java.io.Serializable { /* List of disapproval reasons attached to the entity. */ private com.google.api.ads.adwords.axis.v201607.cm.DisapprovalReason[] disapprovalReasons; /* Indicates that this instance is a subtype of PolicyData. * Although this field is returned in the response, it * is ignored on input * and cannot be selected. Specify xsi:type instead. */ private java.lang.String policyDataType; public PolicyData() { } public PolicyData( com.google.api.ads.adwords.axis.v201607.cm.DisapprovalReason[] disapprovalReasons, java.lang.String policyDataType) { this.disapprovalReasons = disapprovalReasons; this.policyDataType = policyDataType; } /** * Gets the disapprovalReasons value for this PolicyData. * * @return disapprovalReasons * List of disapproval reasons attached to the entity. */ public com.google.api.ads.adwords.axis.v201607.cm.DisapprovalReason[] getDisapprovalReasons() { return disapprovalReasons; } /** * Sets the disapprovalReasons value for this PolicyData. * * @param disapprovalReasons * List of disapproval reasons attached to the entity. */ public void setDisapprovalReasons(com.google.api.ads.adwords.axis.v201607.cm.DisapprovalReason[] disapprovalReasons) { this.disapprovalReasons = disapprovalReasons; } public com.google.api.ads.adwords.axis.v201607.cm.DisapprovalReason getDisapprovalReasons(int i) { return this.disapprovalReasons[i]; } public void setDisapprovalReasons(int i, com.google.api.ads.adwords.axis.v201607.cm.DisapprovalReason _value) { this.disapprovalReasons[i] = _value; } /** * Gets the policyDataType value for this PolicyData. * * @return policyDataType * Indicates that this instance is a subtype of PolicyData. * Although this field is returned in the response, it * is ignored on input * and cannot be selected. Specify xsi:type instead. */ public java.lang.String getPolicyDataType() { return policyDataType; } /** * Sets the policyDataType value for this PolicyData. * * @param policyDataType * Indicates that this instance is a subtype of PolicyData. * Although this field is returned in the response, it * is ignored on input * and cannot be selected. Specify xsi:type instead. */ public void setPolicyDataType(java.lang.String policyDataType) { this.policyDataType = policyDataType; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof PolicyData)) return false; PolicyData other = (PolicyData) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.disapprovalReasons==null && other.getDisapprovalReasons()==null) || (this.disapprovalReasons!=null && java.util.Arrays.equals(this.disapprovalReasons, other.getDisapprovalReasons()))) && ((this.policyDataType==null && other.getPolicyDataType()==null) || (this.policyDataType!=null && this.policyDataType.equals(other.getPolicyDataType()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getDisapprovalReasons() != null) { for (int i=0; i<java.lang.reflect.Array.getLength(getDisapprovalReasons()); i++) { java.lang.Object obj = java.lang.reflect.Array.get(getDisapprovalReasons(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); } } } if (getPolicyDataType() != null) { _hashCode += getPolicyDataType().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(PolicyData.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201607", "PolicyData")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("disapprovalReasons"); elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201607", "disapprovalReasons")); elemField.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201607", "DisapprovalReason")); elemField.setMinOccurs(0); elemField.setNillable(false); elemField.setMaxOccursUnbounded(true); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("policyDataType"); elemField.setXmlName(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201607", "PolicyData.Type")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "jradcliff@users.noreply.github.com" ]
jradcliff@users.noreply.github.com
7393c641bb26b31c6211701835c0b269e6565c35
29972e1f132bee13f6190a12cbefb382f09f461c
/ncuxywka-web/src/main/java/com/github/bogdanovmn/ncuxywka/web/pages/user/UserController.java
574e418af054225a5f1a5de7b77bf1eb9bb3e938
[]
no_license
bogdanovmn/ncuxywka
16757695aecdab3a048a74f28f0ae0711258b711
76c1b29c429fe11800b5689feb03b4a0e3c2964e
refs/heads/master
2022-01-10T19:55:16.305426
2022-01-04T17:55:43
2022-01-04T17:55:43
138,436,563
0
0
null
null
null
null
UTF-8
Java
false
false
1,310
java
package com.github.bogdanovmn.ncuxywka.web.pages.user; import com.github.bogdanovmn.common.spring.menu.MenuItem; import com.github.bogdanovmn.common.spring.mvc.ViewTemplate; import com.github.bogdanovmn.ncuxywka.web.infrastructure.AbstractVisualController; import com.github.bogdanovmn.ncuxywka.web.infrastructure.MainMenuItem; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @Controller @RequestMapping("/users") class UserController extends AbstractVisualController { @Autowired private UserService userService; @GetMapping("{userId}") ModelAndView user(@PathVariable Integer userId) { UserPage userPage = userService.userView(userId); return new ViewTemplate("user") .with("user", userPage) .with("canSendPersonalMessage", !isGuest() && !getUser().getId().equals(userId)) .with("isCurrentUser", !isGuest() && !getUser().getId().equals(userId)) .with("jsPlotRequired", true) .modelAndView(); } @Override protected MenuItem currentMenuItem() { return MainMenuItem.NONE; } }
[ "bogdanovmn@gmail.com" ]
bogdanovmn@gmail.com
1a67303e07fd151557cb08bd0f956a2daecbe5f7
dc16d5ab381f823dfb24eb5ba7a051b499f617bd
/main/recognition/test/boofcv/abst/tracker/TestTld_to_TrackerObjectRectangle.java
e6e278fb8e623368e1525b2fb39933b60b0b318b
[ "Apache-2.0" ]
permissive
tom-adsfund/BoofCV
702b65f1df6b90ac1f6bc3241f9d05169d532df4
a29c80dedcf4ea92b80f259ca879c599f199e8f7
refs/heads/master
2021-01-17T21:21:52.274709
2013-12-02T19:58:10
2013-12-02T19:58:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
773
java
package boofcv.abst.tracker; import boofcv.alg.tracker.tld.TldConfig; import boofcv.alg.tracker.tld.TldTracker; import boofcv.struct.image.ImageDataType; import boofcv.struct.image.ImageType; import boofcv.struct.image.ImageUInt8; /** * @author Peter Abeles */ public class TestTld_to_TrackerObjectRectangle extends TextureGrayTrackerObjectRectangleTests { public TestTld_to_TrackerObjectRectangle() { tolScale = 0.15; } @Override public TrackerObjectQuad<ImageUInt8> create(ImageType<ImageUInt8> imageTypee) { Class ct = ImageDataType.typeToClass(imageType.getDataType()); TldConfig config = new TldConfig(false,ct); config.trackerFeatureRadius = 10; TldTracker tracker = new TldTracker(config); return new Tld_to_TrackerObjectQuad(tracker); } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
d047754187150b12b2b2c4cddc5577ce2f75d3bd
f25b4066b3ffa872fdeeade4c043a24ab832b878
/01.fragments/06.fragments_with_rx/app/src/main/java/info/juanmendez/android/recyclerview/ui/detail/WebViewFragment.java
3627ae3fd48ca0c256883ec5579ada1fc1adc207
[]
no_license
juanmendez/android_dev
3a135cdbb1ddd6fec228773b820cf272961bfd6f
c6b4f91502e60d85d7fbe404d158b85f8d00dc9d
refs/heads/master
2022-03-03T19:23:22.263583
2019-11-12T21:21:32
2019-11-12T21:21:32
33,037,890
1
2
null
null
null
null
UTF-8
Java
false
false
2,700
java
package info.juanmendez.android.recyclerview.ui.detail; import android.os.Build; import android.os.Bundle; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.WebView; /** * WebViewFragment support for android.support.v4.app.Fragment * This demo has been tested for SDK 10 and 22. * * @Author @juanmendezinfo * @see <a href="http://www.juanmendez.info/2015/09/webviewfragment-which-supports.html">details</a> */ public class WebViewFragment extends Fragment { private WebView mWebView; private boolean mIsWebViewAvailable; private boolean mRotated = false; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { setRetainInstance(true); if( mWebView == null ) { mWebView = new WebView(getActivity()); } return mWebView; } /** * let us know if the webView has been rotated. * @return */ public boolean rotated() { return mRotated; } /** * Called when the fragment is visible to the user and actively running. Resumes the WebView. */ @Override public void onPause() { super.onPause(); if (honeyOrHigher()) mWebView.onPause(); mRotated = true; } /** * Called when the fragment is no longer resumed. Pauses the WebView. */ @Override public void onResume() { if (honeyOrHigher()) mWebView.onResume(); super.onResume(); } private boolean honeyOrHigher(){ return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB; } /** * Called when the WebView has been detached from the fragment. * The WebView is no longer available after this time. */ @Override public void onDestroyView() { mIsWebViewAvailable = false; if( mWebView != null ) { ViewGroup parentViewGroup = (ViewGroup) mWebView.getParent(); if (parentViewGroup != null) { parentViewGroup.removeView(mWebView); } } super.onDestroyView(); } /** * Called when the fragment is no longer in use. Destroys the internal state of the WebView. */ @Override public void onDestroy() { if (mWebView != null) { mWebView.destroy(); mWebView = null; } super.onDestroy(); } /** * Gets the WebView. */ public WebView getWebView() { return mIsWebViewAvailable ? mWebView : null; } }
[ "contact@juanmendez.info" ]
contact@juanmendez.info
80f0d9691387aae7755e5beebf9ee8885fffa9d9
f0ac4982507a8398637467b9e95aa875068e818e
/app/src/main/java/com/huawei/smart/server/fragment/PowerFragment.java
63cd4f15173d8137d1f2631372ce4962b90c3582
[]
no_license
IamFive/SmartServer_Android
5c29b3fafc9071a0fb9506ba7e77d55b99d86792
02934476d697046ebce958351615188ea77a539b
refs/heads/master
2020-03-30T03:20:00.307051
2018-09-28T03:57:39
2018-09-28T03:57:39
150,675,127
0
0
null
2018-09-28T02:32:55
2018-09-28T02:32:55
null
UTF-8
Java
false
false
3,115
java
package com.huawei.smart.server.fragment; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v7.widget.LinearLayoutManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import com.huawei.smart.server.BaseFragment; import com.huawei.smart.server.R; import com.huawei.smart.server.activity.HardwareActivity; import com.huawei.smart.server.adapter.PowerListAdapter; import com.huawei.smart.server.redfish.RRLB; import com.huawei.smart.server.redfish.RedfishResponseListener; import com.huawei.smart.server.redfish.constants.ResourceState; import com.huawei.smart.server.redfish.model.Power; import com.huawei.smart.server.utils.WidgetUtils; import com.huawei.smart.server.widget.EnhanceRecyclerView; import com.scwang.smartrefresh.layout.api.RefreshLayout; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import okhttp3.Response; public class PowerFragment extends BaseFragment { @BindView(R.id.power_supply_list) EnhanceRecyclerView mRecyclerView; @BindView(R.id.empty_view) TextView emptyView; private PowerListAdapter adapter; @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_power, container, false); this.initialize(view); initializeView(); return view; } private void initializeView() { this.adapter = new PowerListAdapter(getActivity(), new ArrayList<Power.PowerSupply>()); mRecyclerView.setAdapter(adapter); mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false)); mRecyclerView.addItemDecoration(WidgetUtils.newDividerItemDecoration(this.getContext())); mRecyclerView.setEmptyView(emptyView); onRefresh(null); } public void onRefresh(RefreshLayout refreshLayout) { activity.getRedfishClient().chassis().getPower(RRLB.<Power>create(activity) .callback(new RedfishResponseListener.Callback<Power>() { @Override public void onResponse(Response okHttpResponse, Power power) { final List<Power.PowerSupply> powerSupplies = power.getPowerSupplies(); final List<Power.PowerSupply> filtered = new ArrayList<>(); for (Power.PowerSupply powerSupply : powerSupplies) { if (powerSupply.getStatus() != null && !powerSupply.getStatus().getState().equals(ResourceState.Absent)) { filtered.add(powerSupply); } } ((HardwareActivity) activity).updateTabTitle(2, R.string.hardware_tab_power, filtered.size()); adapter.resetItems(filtered); finishRefreshing(true); } }).build()); } }
[ "iampurse@vip.qq.com" ]
iampurse@vip.qq.com
a560c892fbd259014aa1b83659d208df030c9913
31ffad5858dd9d7a94d88404b78884156d0ead25
/Day2/Demos/src/com/java/infinite/day2/Demo.java
de508b54c6f7a289ee89bfa4004c105a6f312678
[]
no_license
PrasananTrainer03/InfiniteTraining
f8929a7f47156b51f4acc372051fad402b7ca1ae
1ef7f849ecbfc46534fc33ceef9b2adf6f4898a7
refs/heads/master
2023-07-10T06:29:34.270657
2021-08-25T04:26:46
2021-08-25T04:26:46
380,897,879
3
2
null
null
null
null
UTF-8
Java
false
false
291
java
package com.java.infinite.day2; public class Demo { int n; public static void main(String[] args) { Demo obj1 = new Demo(); obj1.n=12; Demo obj2 = obj1; obj2.n=13; System.out.println(obj1.n); System.out.println(obj1.hashCode()); System.out.println(obj2.hashCode()); } }
[ "prassup.dotnet@gmail.com" ]
prassup.dotnet@gmail.com
65dd8c5f1ec4814857c068b23929a87d65575ffd
ba7cab056c31fded038d49ccee0c1c9c54a6f3d4
/dist/gameserver/data/scripts/npc/model/MeloInstance.java
a6cd72a3efa7ac3a22af9566b735861de33b22b1
[]
no_license
MaicoSautner/l2script-teste
48052f6408be26038e692f48b38f1582a3eded06
196979a27575fd3ff48c28d416f2d820ba02059e
refs/heads/master
2022-07-26T09:08:00.639245
2020-05-22T02:12:02
2020-05-22T02:16:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,679
java
package npc.model; import l2s.commons.collections.MultiValueSet; import l2s.gameserver.model.Player; import l2s.gameserver.model.instances.NpcInstance; import l2s.gameserver.model.quest.Quest; import l2s.gameserver.model.quest.QuestState; import l2s.gameserver.templates.npc.NpcTemplate; import l2s.gameserver.utils.ItemFunctions; //By Evil_dnk public final class MeloInstance extends NpcInstance { public MeloInstance(int objectId, NpcTemplate template, MultiValueSet<String> set) { super(objectId, template, set); } @Override public void onBypassFeedback(Player player, String command) { if(command.equalsIgnoreCase("change_fo_sp")) { if(player.getInventory().getCountOf(45610) > 0) { player.addExpAndSp(0, 14000000); ItemFunctions.addItem(player, 45941, 1, true); ItemFunctions.deleteItem(player, 45610, 1, true); return; } else if(player.getInventory().getCountOf(45611) > 0) { player.addExpAndSp(0, 14000000); ItemFunctions.addItem(player, 45941, 1, true); ItemFunctions.deleteItem(player, 45611, 1, true); return; } else if(player.getInventory().getCountOf(45612) > 0) { player.addExpAndSp(0, 14000000); ItemFunctions.addItem(player, 45941, 1, true); ItemFunctions.deleteItem(player, 45612, 1, true); return; } else if(player.getInventory().getCountOf(45613) > 0) { player.addExpAndSp(0, 14000000); ItemFunctions.addItem(player, 45941, 1, true); ItemFunctions.deleteItem(player, 45613, 1, true); return; } else { showChatWindow(player, "default/34018-2.htm", false); return; } } else super.onBypassFeedback(player, command); } }
[ "As69839314" ]
As69839314
991f840ad804a4f1622f0714e7feae8af0e26cb3
68a19507f18acff18aa4fa67d6611f5b8ac8913c
/hg-standard/hg-system/src/main/java/hg/system/common/util/EntityConvertUtils.java
057b3f38a563b7b03486a505cc4743711befb810
[]
no_license
ksksks2222/pl-workspace
cf0d0be2dfeaa62c0d4d5437f85401f60be0eadd
6146e3e3c2384c91cac459d25b27ffeb4f970dcd
refs/heads/master
2021-09-13T08:59:17.177105
2018-04-27T09:46:42
2018-04-27T09:46:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,821
java
package hg.system.common.util; import java.util.ArrayList; import java.util.List; import org.hibernate.Hibernate; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.serializer.ValueFilter; public class EntityConvertUtils { private final static ValueFilter valueFilter = new ValueFilter() { @Override public Object process(Object source, String name, Object value) { if (!Hibernate.isInitialized(value)) { return null; } return value; } }; /** * 将实体转换为DTO * * @param entity * @param clazz * @return */ public static <T> T convertEntityToDto(Object entity, Class<T> clazz) { if (entity == null || clazz == null) return null; String json = JSON.toJSONString(entity, valueFilter); return JSON.parseObject(json, clazz); } /** * 将DTO转换为实体 * * @param dto * @param clazz * @return */ public static <T> T convertDtoToEntity(Object dto, Class<T> clazz) { if (dto == null || clazz == null) return null; String json = JSON.toJSONString(dto, valueFilter); return JSON.parseObject(json, clazz); } /** * 将实体转换为DTO集合 * * @param entity * @param clazz * @return */ public static <T> List<T> convertEntityToDtoList(List<?> entityList, Class<T> clazz) { List<T> list = new ArrayList<T>(); for (Object entity : entityList) { list.add(convertEntityToDto(entity, clazz)); } return list; } /** * 将DTO转换为实体集合 * * @param dtoList * @param clazz * @return */ public static <T> List<T> convertDtoToEntityList(List<?> dtoList, Class<T> clazz) { List<T> list = new ArrayList<T>(); for (Object dto : dtoList) { list.add(convertDtoToEntity(dto, clazz)); } return list; } }
[ "cangsong6908@gmail.com" ]
cangsong6908@gmail.com
c29fe783af20a47d168713c129c25fc5057b5291
194ef52b7d20eaa211881179ed94846bfc532efe
/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/xla/BroadcastHelper.java
1d8b4fe476b1e96166e37dea3f8f8cf9ef491708
[ "Apache-2.0" ]
permissive
chenkelmann/java
f037f5a1dc07547531043059add9b6b8021441a3
8282569c98cd933985bea807ad43501fed5b6911
refs/heads/master
2022-09-09T20:06:44.965876
2020-05-29T09:23:59
2020-05-29T09:23:59
267,619,881
2
0
Apache-2.0
2020-05-28T15:00:18
2020-05-28T15:00:17
null
UTF-8
Java
false
false
2,880
java
/* Copyright 2018 The TensorFlow Authors. 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. =======================================================================*/ // This class has been generated, DO NOT EDIT! package org.tensorflow.op.xla; import org.tensorflow.Operand; import org.tensorflow.Operation; import org.tensorflow.OperationBuilder; import org.tensorflow.Output; import org.tensorflow.op.RawOp; import org.tensorflow.op.Scope; import org.tensorflow.op.annotation.Endpoint; import org.tensorflow.op.annotation.Operator; import org.tensorflow.types.family.TNumber; import org.tensorflow.types.family.TType; /** * Helper operator for performing XLA-style broadcasts * <p> * Broadcasts `lhs` and `rhs` to the same rank, by adding size 1 dimensions to * whichever of `lhs` and `rhs` has the lower rank, using XLA's broadcasting rules * for binary operators. * * @param <T> data type for {@code lhsOutput()} output */ @Operator(group = "xla") public final class BroadcastHelper<T extends TType> extends RawOp { /** * Factory method to create a class wrapping a new BroadcastHelper operation. * * @param scope current scope * @param lhs the LHS input tensor * @param rhs the RHS input tensor * @param broadcastDims an XLA-style broadcast dimension specification * @return a new instance of BroadcastHelper */ @Endpoint(describeByClass = true) public static <T extends TType, U extends TNumber> BroadcastHelper<T> create(Scope scope, Operand<T> lhs, Operand<T> rhs, Operand<U> broadcastDims) { OperationBuilder opBuilder = scope.env().opBuilder("XlaBroadcastHelper", scope.makeOpName("BroadcastHelper")); opBuilder.addInput(lhs.asOutput()); opBuilder.addInput(rhs.asOutput()); opBuilder.addInput(broadcastDims.asOutput()); opBuilder = scope.applyControlDependencies(opBuilder); return new BroadcastHelper<T>(opBuilder.build()); } /** * the broadcasted LHS tensor */ public Output<T> lhsOutput() { return lhsOutput; } /** * the broadcasted RHS tensor */ public Output<T> rhsOutput() { return rhsOutput; } private Output<T> lhsOutput; private Output<T> rhsOutput; private BroadcastHelper(Operation operation) { super(operation); int outputIdx = 0; lhsOutput = operation.output(outputIdx++); rhsOutput = operation.output(outputIdx++); } }
[ "karl.lessard@gmail.com" ]
karl.lessard@gmail.com
f987dee8f9d955d3703159dc65aa640e2b887185
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module1971_public/tests/unittests/src/java/module1971_public_tests_unittests/a/Foo1.java
5c373dd1f03e20095011409da7ad777ca052f0a5
[ "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,745
java
package module1971_public_tests_unittests.a; import javax.naming.directory.*; import javax.net.ssl.*; import javax.rmi.ssl.*; /** * 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 javax.annotation.processing.Completion * @see javax.lang.model.AnnotatedConstruct * @see javax.management.Attribute */ @SuppressWarnings("all") public abstract class Foo1<B> extends module1971_public_tests_unittests.a.Foo0<B> implements module1971_public_tests_unittests.a.IFoo1<B> { javax.naming.directory.DirContext f0 = null; javax.net.ssl.ExtendedSSLSession f1 = null; javax.rmi.ssl.SslRMIClientSocketFactory f2 = null; public B element; public static Foo1 instance; public static Foo1 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module1971_public_tests_unittests.a.Foo0.create(input); } public String getName() { return module1971_public_tests_unittests.a.Foo0.getInstance().getName(); } public void setName(String string) { module1971_public_tests_unittests.a.Foo0.getInstance().setName(getName()); return; } public B get() { return (B)module1971_public_tests_unittests.a.Foo0.getInstance().get(); } public void set(Object element) { this.element = (B)element; module1971_public_tests_unittests.a.Foo0.getInstance().set(this.element); } public B call() throws Exception { return (B)module1971_public_tests_unittests.a.Foo0.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
e31f4e9810311f16cf7c4d5f60477977fb4b1e0c
558667608651dfd5778e3cc1131e9eaf5f1be8d7
/smali/net/slidingmenu/tools/b/a/a/b/c.java
3cdd5b6a43d470f5b39d9699114dcce1b8a14b10
[]
no_license
gambol/chunqingaikan
0cd6b0d3ca855f2d1a5ad22f7be3c46f8b1e6984
25fa70619ab484e61124465a0b4bdec1cdb5bf62
refs/heads/master
2021-01-10T11:13:41.624112
2015-03-04T14:08:40
2015-03-04T14:08:40
36,016,628
1
0
null
null
null
null
UTF-8
Java
false
false
377
java
package net.slidingmenu.tools.b.a.a.b; class c { void a() { int a; a=0;// .class public interface abstract Lnet/slidingmenu/tools/b/a/a/b/c; a=0;// .super Ljava/lang/Object; a=0;// a=0;// a=0;// # virtual methods a=0;// .method public abstract a()Lorg/json/JSONObject; a=0;// .end method a=0;// a=0;// .method public abstract a(Lorg/json/JSONObject;)Z a=0;// .end method }}
[ "zhenbao.zhou@qunar.com" ]
zhenbao.zhou@qunar.com
aed08a152f8e54bd2734a5aed648492c1d65b58c
eb9b7c8caef80635b6c1c63d6e1c6cb68c35479a
/Prof Materials/Lab/Lab_11/Lab_11_MVC/src/main/java/edu/mum/domain/UserCredentials.java
0da0f97070d4707bb0a0152eb7b287f0677b9f8e
[]
no_license
lukpheakdey/Enterprise-Architecture-EA
55640c34da02a05dc7e1e99f484fcbb132fd4f12
440d7d8ac59f0c778c9d109f2d0f6e1a689384d5
refs/heads/master
2020-06-08T07:26:37.240644
2019-06-22T03:35:00
2019-06-22T03:35:00
193,185,600
1
0
null
null
null
null
UTF-8
Java
false
false
2,111
java
package edu.mum.domain; import java.util.ArrayList; import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.OneToMany; import javax.persistence.OneToOne; import javax.validation.constraints.Size; import org.hibernate.validator.constraints.NotEmpty; @Entity(name = "Authentication") public class UserCredentials { @Id @Column(name = "USER", nullable = false, unique = true, length = 127) String userName; @Column(name = "PASSWORD", nullable = false, length = 32) String password; @Column( nullable = true, length = 32) String verifyPassword; Boolean enabled; @OneToOne(mappedBy="userCredentials", cascade = {CascadeType.PERSIST, CascadeType.MERGE}) private User user; @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL) @JoinTable ( name="credential_authority", joinColumns={@JoinColumn(name="credential_id")}, inverseJoinColumns={ @JoinColumn(name="authority_id", unique=true)} ) List<Authority> authority = new ArrayList<Authority>(); public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getVerifyPassword() { return verifyPassword; } public void setVerifyPassword(String verifyPassword) { this.verifyPassword = verifyPassword; } public Boolean getEnabled() { return enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public List<Authority> getAuthority() { return authority; } public void setAuthority(List<Authority> authority) { this.authority = authority; } }
[ "luk.pheakdey@gmail.com" ]
luk.pheakdey@gmail.com
ee723a032dd0a0a92ce7911f7ce774eb2e70cee9
0aa86649d76910216c6466a34c27c7aca55522b6
/trunk/red5 project/zjRed5/src/org/red5/server/net/rtmp/event/AudioData.java
c96095be4a38bd36d2c79a4cf9935dfea5289a4b
[]
no_license
BGCX261/zjcomeon-svn-to-git
13533e2f316ec5c418a5dd55b502fa28e5b96929
a507e11fd7c4255ad6e168cba652cfa809f6a6af
refs/heads/master
2021-01-22T01:28:07.463252
2015-08-25T15:23:52
2015-08-25T15:23:52
41,490,520
1
0
null
null
null
null
UTF-8
Java
false
false
3,476
java
package org.red5.server.net.rtmp.event; /* * RED5 Open Source Flash Server - http://www.osflash.org/red5 * * Copyright (c) 2006-2009 by respective authors (see below). 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. * * 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.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import org.apache.mina.core.buffer.IoBuffer; import org.red5.server.api.stream.IStreamPacket; import org.red5.server.stream.IStreamData; public class AudioData extends BaseEvent implements IStreamData, IStreamPacket { private static final long serialVersionUID = -4102940670913999407L; protected IoBuffer data; /** * Data type */ private byte dataType = TYPE_AUDIO_DATA; /** Constructs a new AudioData. */ public AudioData() { this(IoBuffer.allocate(0).flip()); } public AudioData(IoBuffer data) { super(Type.STREAM_DATA); setData(data); } /** * Create audio data event with given data buffer * @param data Audio data * @param copy true to use a copy of the data or false to use reference */ public AudioData(IoBuffer data, boolean copy) { super(Type.STREAM_DATA); if (copy) { byte[] array = new byte[data.limit()]; data.mark(); data.get(array); data.reset(); setData(array); } else { setData(data); } } /** {@inheritDoc} */ @Override public byte getDataType() { return dataType; } public void setDataType(byte dataType) { this.dataType = dataType; } /** {@inheritDoc} */ public IoBuffer getData() { return data; } public void setData(IoBuffer data) { this.data = data; } public void setData(byte[] data) { this.data = IoBuffer.allocate(data.length); this.data.put(data).flip(); } /** {@inheritDoc} */ @Override public String toString() { return String.format("Audio - ts: %s length: %s", getTimestamp(), (data != null ? data.limit() : '0')); } /** {@inheritDoc} */ @Override protected void releaseInternal() { if (data != null) { data.free(); data = null; } } @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); byte[] byteBuf = (byte[]) in.readObject(); if (byteBuf != null) { data = IoBuffer.allocate(0); data.setAutoExpand(true); SerializeUtils.ByteArrayToByteBuffer(byteBuf, data); } } @Override public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); if (data != null) { out.writeObject(SerializeUtils.ByteBufferToByteArray(data)); } else { out.writeObject(null); } } }
[ "you@example.com" ]
you@example.com
36f0e3c475caaa24c072fc21fdbb65ff044cb9ef
d0094eec897f6cf935fae911d85366d6da216535
/src/main/java/com/vmware/vim25/CreateDiskFromSnapshotRequestType.java
6432464935a78755c4f55bef86e8e4901a34b37d
[ "BSD-3-Clause" ]
permissive
darkedges/vijava
9e09798f8cfc61ec28a7a214e260f464c26e4531
c65a731a25aa41d96e032271496f2464a8aa6fe9
refs/heads/main
2023-04-20T10:41:43.931180
2021-05-22T00:03:58
2021-05-22T00:03:58
369,026,457
0
0
null
null
null
null
UTF-8
Java
false
false
6,246
java
package com.vmware.vim25; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for CreateDiskFromSnapshotRequestType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="CreateDiskFromSnapshotRequestType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="_this" type="{urn:vim25}ManagedObjectReference"/> * &lt;element name="id" type="{urn:vim25}ID"/> * &lt;element name="datastore" type="{urn:vim25}ManagedObjectReference"/> * &lt;element name="snapshotId" type="{urn:vim25}ID"/> * &lt;element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="profile" type="{urn:vim25}VirtualMachineProfileSpec" maxOccurs="unbounded" minOccurs="0"/> * &lt;element name="crypto" type="{urn:vim25}CryptoSpec" minOccurs="0"/> * &lt;element name="path" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CreateDiskFromSnapshotRequestType", propOrder = { "_this", "id", "datastore", "snapshotId", "name", "profile", "crypto", "path" }) public class CreateDiskFromSnapshotRequestType { @XmlElement(required = true) protected ManagedObjectReference _this; @XmlElement(required = true) protected ID id; @XmlElement(required = true) protected ManagedObjectReference datastore; @XmlElement(required = true) protected ID snapshotId; @XmlElement(required = true) protected String name; protected List<VirtualMachineProfileSpec> profile; protected CryptoSpec crypto; protected String path; /** * Gets the value of the this property. * * @return * possible object is * {@link ManagedObjectReference } * */ public ManagedObjectReference getThis() { return _this; } /** * Sets the value of the this property. * * @param value * allowed object is * {@link ManagedObjectReference } * */ public void setThis(ManagedObjectReference value) { this._this = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link ID } * */ public ID getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link ID } * */ public void setId(ID value) { this.id = value; } /** * Gets the value of the datastore property. * * @return * possible object is * {@link ManagedObjectReference } * */ public ManagedObjectReference getDatastore() { return datastore; } /** * Sets the value of the datastore property. * * @param value * allowed object is * {@link ManagedObjectReference } * */ public void setDatastore(ManagedObjectReference value) { this.datastore = value; } /** * Gets the value of the snapshotId property. * * @return * possible object is * {@link ID } * */ public ID getSnapshotId() { return snapshotId; } /** * Sets the value of the snapshotId property. * * @param value * allowed object is * {@link ID } * */ public void setSnapshotId(ID value) { this.snapshotId = value; } /** * Gets the value of the name property. * * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Gets the value of the profile property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the profile property. * * <p> * For example, to add a new item, do as follows: * <pre> * getProfile().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link VirtualMachineProfileSpec } * * */ public List<VirtualMachineProfileSpec> getProfile() { if (profile == null) { profile = new ArrayList<VirtualMachineProfileSpec>(); } return this.profile; } /** * Gets the value of the crypto property. * * @return * possible object is * {@link CryptoSpec } * */ public CryptoSpec getCrypto() { return crypto; } /** * Sets the value of the crypto property. * * @param value * allowed object is * {@link CryptoSpec } * */ public void setCrypto(CryptoSpec value) { this.crypto = value; } /** * Gets the value of the path property. * * @return * possible object is * {@link String } * */ public String getPath() { return path; } /** * Sets the value of the path property. * * @param value * allowed object is * {@link String } * */ public void setPath(String value) { this.path = value; } }
[ "nirving@darkedges.com" ]
nirving@darkedges.com
1fd307d6ca6a455307b705433da2b8ee734dcbb2
c56971071a42ef8dc401b40652e569685e5dbd8f
/03-opencsv/src/main/java/com/opencsv/bean/AbstractFieldMap.java
6b47913891f45d6ba758e9119dcf6240a9d757d0
[ "Apache-2.0" ]
permissive
uptonking/tablesaw
b0b2cd9f991c9bf7a9df56dadd04f8b73d4440e4
fe15b10e5c0ecd693d4448d67c00e5b7d4c07bdf
refs/heads/master
2020-04-11T05:52:27.899587
2018-03-22T16:36:34
2018-03-22T16:36:34
124,328,361
1
0
null
null
null
null
UTF-8
Java
false
false
3,310
java
/* * Copyright 2018 Andrew Rucker Jones. * * 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.opencsv.bean; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.ListIterator; import java.util.Locale; import java.util.SortedMap; import java.util.TreeMap; import org.apache.commons.lang3.ObjectUtils; /** * A base class to collect all generalized components of a {@link FieldMap}. * May be used by all as a base class for their own implementations of * {@link FieldMap}. * * @param <I> The initializer type used to build the many-to-one mapping * @param <K> Type of the field identifier (key) * @param <C> Type of the ComplexFieldMapEntry used * * @author Andrew Rucker Jones * @since 4.2 */ abstract public class AbstractFieldMap<I, K, C extends ComplexFieldMapEntry<I, K>> implements FieldMap<I, K, C> { /** The locale for error messages. */ protected Locale errorLocale; /** * A map for all simple, that is one-to-one, mappings represented in this * {@link FieldMap}. */ protected final SortedMap<K, BeanField> simpleMap = new TreeMap<>(); /** * A list of entries representing all complex, that is many-to-one, mappings * represented in this {@link FieldMap}. */ protected final List<C> complexMapList = new ArrayList<>(); /** * Initializes this {@link FieldMap}. * * @param errorLocale The locale to be used for error messages */ public AbstractFieldMap(final Locale errorLocale) { this.errorLocale = ObjectUtils.defaultIfNull(errorLocale, Locale.getDefault()); } @Override public BeanField get(final K key) { BeanField f = simpleMap.get(key); final ListIterator<C> iterator = complexMapList.listIterator(); while(f == null && iterator.hasNext()) { final ComplexFieldMapEntry r = iterator.next(); if(r.contains(key)) { f = r.getBeanField(); } } return f; } @Override public BeanField put(final K key, final BeanField value) { return simpleMap.put(key, value); } @Override public Collection<BeanField> values() { final List<BeanField> l = new ArrayList<>(simpleMap.size() + complexMapList.size()); l.addAll(simpleMap.values()); for(ComplexFieldMapEntry r : complexMapList) { l.add(r.getBeanField()); } return l; } @Override public void setErrorLocale(final Locale errorLocale) { this.errorLocale = ObjectUtils.defaultIfNull(errorLocale, Locale.getDefault()); for(ComplexFieldMapEntry e : complexMapList) { e.setErrorLocale(this.errorLocale); } } }
[ "jinyaoo86@gmail.com" ]
jinyaoo86@gmail.com
460587a235413ae5f47680a42dd086f2a35093c5
206a6b3a9b7a9bf889c56d5cbc8234fb442ff0b3
/src/main/java/com/jfinal/plugin/ehcache/CacheName.java
5e0b101f8369fe3deaa8a7f6ccfb817ee0c9d94e
[ "Apache-2.0" ]
permissive
kinbod/jfinal
a9c587ea1e8c7d53e30ca80e86e2a69eda26a80d
6923e49db6d0e3d69f169dfb1c93d4793a5bfa3b
refs/heads/master
2021-09-03T18:13:54.022330
2018-01-11T01:42:40
2018-01-11T01:42:40
104,415,359
0
0
Apache-2.0
2018-01-11T01:42:41
2017-09-22T01:13:02
Java
UTF-8
Java
false
false
1,430
java
/** * Copyright (c) 2011-2017, James Zhan 詹波 (jfinal@126.com). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.jfinal.plugin.ehcache; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * CacheName can configure CacheInterceptor's cache name or EvictInterceptor's evict cache name. * <p> * The order of CacheInterceptor searching for CacheName annotation:<br> * 1: Action method of current invocation<br> * 2: Controller of the current invocation<br> * CacheInterceptor will use the actionKey as the cache name If the CacheName annotation not found. */ @Inherited @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD}) public @interface CacheName { String value(); }
[ "jfinal@126.com" ]
jfinal@126.com
34f9dc77bfe33a8f2325e378b42b26e1e08b6ce7
fe94bb01bbaf452ab1752cb3c1d1e4ecf297b9be
/src/main/java/com/opencart/entity/dao/OcProductOptionDaoImpl.java
f45339b2f30fe42b3dab18cb5ba08ad3f610e2ec
[]
no_license
gmai2006/opencart
9d3b037f09294973112bafbadd22d5edd8457de5
dba44adabf4b8eab3bdb07062c887ba0a2a5405f
refs/heads/master
2020-12-31T06:13:33.113098
2018-01-24T07:35:45
2018-01-24T07:35:45
80,637,392
0
0
null
null
null
null
UTF-8
Java
false
false
2,536
java
/************************************************************************* * * DATASCIENCE9 LLC CONFIDENTIAL * __________________ * * [2018] Datascience9 LLC * All Rights Reserved. * * NOTICE: All information contained herein is, and remains * the property of Datascience9 LLC and its suppliers, * if any. The intellectual and technical concepts contained * herein are proprietary to Datascience9 LLC * and its suppliers and may be covered by U.S. and Foreign Patents, * patents in process, and are protected by trade secret or copyright law. * Dissemination of this information or reproduction of this material * is strictly forbidden unless prior written permission is obtained * from Datascience9 LLC. * @author Paul Mai - Datascience9 LLC */ package com.opencart.entity.dao; import static java.util.Objects.requireNonNull; import java.util.List; import com.opencart.entity.*; import javax.inject.Inject; import com.google.inject.persist.Transactional; import javax.persistence.EntityManager; import javax.persistence.Query; import com.google.inject.Provider; public class OcProductOptionDaoImpl implements OcProductOptionDao { private final Provider<EntityManager> entityManagerProvider; @Inject public OcProductOptionDaoImpl (final Provider<EntityManager> entityManagerProvider) { requireNonNull(entityManagerProvider); this.entityManagerProvider = entityManagerProvider; } @Override public List<OcProductOption> select(int maxResult) { final EntityManager em = entityManagerProvider.get(); Query query = em.createQuery("select a from OcProductOption a", OcProductOption.class).setMaxResults(maxResult); return query.getResultList(); } @Override public List<OcProductOption> selectAll() { final EntityManager em = entityManagerProvider.get(); Query query = em.createQuery("select a from OcProductOption a", OcProductOption.class); return query.getResultList(); } @Override @Transactional public OcProductOption create(OcProductOption e) { final EntityManager em = entityManagerProvider.get(); em.persist(e); return e; } @Transactional public OcProductOption update(OcProductOption e) { final EntityManager em = entityManagerProvider.get(); return em.merge(e); } @Override @Transactional public void delete(OcProductOption e) { final EntityManager em = entityManagerProvider.get(); em.remove(e); } }
[ "gmai2006@gmail.com" ]
gmai2006@gmail.com
7842123e4c1a2fb16a798952f70b33e0cf3c9a8f
1b7c0afaa88978171266acf3b2a53615111784c0
/src/main/java/daily/y2016/m06/d28/a1/rpc/example/TestRpcImpl.java
9d553c4878941a07856786a9f685ba2f6dcdda8c
[]
no_license
huyuxiang/niostudy
0b483b4f80242da1c9037844bf176b6cd043e015
70468366684e01c7f4104bf8b979ff2909f06c83
refs/heads/master
2020-04-13T21:40:50.445467
2016-10-10T03:38:21
2016-10-10T03:38:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
189
java
package daily.y2016.m06.d28.a1.rpc.example; public class TestRpcImpl implements TestRpc { @Override public int test(byte[] data) { System.out.println("invoke test"); return 1; } }
[ "1678907570@qq.com" ]
1678907570@qq.com
352e8baa9fa51eaf23629de6430c23a36a04f84b
53f5a941261609775dc3eedf0cb487956b734ab0
/com.samsung.app.watchmanager/sources/com/samsung/android/app/twatchmanager/model/InstallPack.java
976de599a20dee3768359bba42a19a4a3cc0ed4b
[]
no_license
ThePBone/BudsProAnalysis
4a3ede6ba6611cc65598d346b5a81ea9c33265c0
5b04abcae98d1ec8d35335d587b628890383bb44
refs/heads/master
2023-02-18T14:24:57.731752
2021-01-17T12:44:58
2021-01-17T12:44:58
322,783,234
16
1
null
null
null
null
UTF-8
Java
false
false
1,671
java
package com.samsung.android.app.twatchmanager.model; public class InstallPack { public String apkName; public String appName; public String installerPackage; public boolean keepApk; public int mVersionCode; public String packName; public String path; public boolean reinstall; public String signature; public InstallPack(String str, String str2, String str3, int i) { this(str, str2, str3, false); this.mVersionCode = i; } public InstallPack(String str, String str2, String str3, boolean z) { this(str, str2, str3, z, "com.samsung.android.app.watchmanager"); } public InstallPack(String str, String str2, String str3, boolean z, String str4) { this.mVersionCode = 0; this.path = null; this.keepApk = false; this.signature = null; this.reinstall = false; this.apkName = str; this.packName = str2; this.path = str3; this.keepApk = z; this.installerPackage = str4; } public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof InstallPack)) { return false; } return ((InstallPack) obj).packName.equalsIgnoreCase(this.packName); } public int hashCode() { return this.packName.hashCode(); } public String toString() { return "[ packName : " + this.packName + ", mVersionCode : " + this.mVersionCode + " apkName : " + this.apkName + " , path : " + this.path + ", installerPackage:" + this.installerPackage + " ]"; } }
[ "thebone.main@gmail.com" ]
thebone.main@gmail.com
73cc5a82cbd3ac0c8722ae050c394b0db8393737
905ac94bc7a06fc51c492e9a47627fc2d5cc1ad7
/pairs/TaRGeT 4.0 AfterAddTC4/bin/com/motorola/btc/research/target/pm/common/.svn/text-base/TreeViewContentProvider.java.svn-base
6c256e66e4e623e31b1b23ba270471f8aa82c9b9
[]
no_license
JeffersonAlmeida/workspace
7ffe9524357074dfa1614f367e585dbcd684ccf5
c0fa1e6ac6ed09299d8f70865a8e5d22bbbc75fe
refs/heads/master
2016-08-12T20:29:24.859382
2013-03-11T12:45:47
2013-03-11T12:45:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,083
/* * @(#)TreeViewContentProvider.java * * (c) COPYRIGHT 2005 MOTOROLA INC. * MOTOROLA CONFIDENTIAL PROPIETARY * Template ID and version: IL93-TMP-01-0112 Version 1.10 * * REVISION HISTORY: * Author Date CR Number Brief Description * ------- ------------ ---------- ---------------------------- * dhq348 - LIBkk11577 Initial creation. * dhq348 Jan 17, 2007 LIBkk11577 Rework of inspection LX133710. */ package com.motorola.btc.research.target.pm.common; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; import org.eclipse.ui.IViewSite; /** * <pre> * CLASS: * Abstract class that implements an abstract content provider for a tree view. * * RESPONSIBILITIES: * Handle contents to a tree view GUI component. * * USAGE: * Extend this class and implement the <code>initialize()</code> and <code>getVSite()</code> * methods. All public methods must not be directly called. The platform * is responsible to do that. * </pre> */ public abstract class TreeViewContentProvider implements IStructuredContentProvider, ITreeContentProvider { /** * The root of all the tree. It is necessary because it is not possible to know previously how * many root the trees that will use this content provider will have. So each root has to be * added as a child of this superRoor node. */ protected TreeObject superRoot; /** * Manages any input change. * * @param v The viewer * @param oldInput The current input. * @param newInput The input that will be created. */ public void inputChanged(Viewer v, Object oldInput, Object newInput) { } /** * Disposes the current object. */ public void dispose() { } /** * Returns all the children of <code>parent</code>. * * @param parent The node which children will be returned. * @return The array with the children. */ public Object[] getElements(Object parent) { Object[] result = new Object[0]; if (parent.equals(getVSite())) { if (superRoot == null) { initialize(); } result = getChildren(superRoot); } else { result = getChildren(parent); } return result; } /** * Returns the parent node of <code>child</code>. * * @param The child which parent will be returned. * @return The parent of <code>child</code>. */ public Object getParent(Object child) { return ((TreeObject) child).getParent(); } /** * Returns all the children of <code>parent</code>. * * @param parent The node which children will be returned. * @return The array with the children. */ public Object[] getChildren(Object parent) { return ((TreeObject) parent).getChildren(); } /** * Checks if the node <code>parent</code> has at least one child. * * @param parent The node which will be verified. * @return <b>true</b> if <code>parent</code> has at least one child or <b>false</b> * otherwise. */ public boolean hasChildren(Object parent) { return ((TreeObject) parent).hasChildren(); } /** * Abstract method that initializes the content provider. */ public abstract void initialize(); /** * Gets the value of <code>superRoot</code> attribute. * * @return Returns The superRoot value. */ public TreeObject getSuperRoot() { return superRoot; } /** * Abstract method that returns the specific content provider site. * * @return The specific content provider site. */ public abstract IViewSite getVSite(); }
[ "jefferson.almeida.comp@gmail.com" ]
jefferson.almeida.comp@gmail.com
cc2021941427b6db6984cab7204ffa74757d7525
4ce81a8acd8ea34dc90d7790422707e2015a8103
/src/com/marakana/android/parser/BaseFeedParser.java
6c7ec7a1cb6b368bb673e164710c1971ea8d6383
[]
no_license
twitter-university/ParserLib
7f9689752b86789b1abd7a029d88088c2474fc8a
5ad3d20fdde9823deeaad3665076c7d0b0f4d5d2
refs/heads/master
2021-01-10T02:25:11.896124
2012-11-02T18:39:27
2012-11-02T18:39:27
4,105,272
0
0
null
null
null
null
UTF-8
Java
false
false
862
java
package com.marakana.android.parser; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; public abstract class BaseFeedParser implements FeedParser { // names of the XML tags static final String CHANNEL = "channel"; static final String PUB_DATE = "pubDate"; static final String DESCRIPTION = "description"; static final String LINK = "link"; static final String TITLE = "title"; static final String ITEM = "item"; private final URL feedUrl; protected BaseFeedParser(String feedUrl){ try { this.feedUrl = new URL(feedUrl); } catch (MalformedURLException e) { throw new RuntimeException(e); } } protected InputStream getInputStream() { try { return feedUrl.openConnection().getInputStream(); } catch (IOException e) { throw new RuntimeException(e); } } }
[ "marko@marakana.com" ]
marko@marakana.com
c7837851d9cab24d2a331cf82b7bf9f4d8f0fec7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_38570e679409b1ac79b8ac25e54da94bb990caa5/AbstractProductListFrontResource/16_38570e679409b1ac79b8ac25e54da94bb990caa5_AbstractProductListFrontResource_t.java
8cf681422e4fe86e7a248f471199e0d16e2d37bf
[]
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,375
java
/* * Copyright (c) 2012, Mayocat <hello@mayocat.org> * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ package org.mayocat.shop.catalog.front.resource; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.UUID; import javax.inject.Inject; import javax.inject.Provider; import org.mayocat.configuration.ConfigurationService; import org.mayocat.context.WebContext; import org.mayocat.image.model.Image; import org.mayocat.image.model.Thumbnail; import org.mayocat.image.store.ThumbnailStore; import org.mayocat.localization.EntityLocalizationService; import org.mayocat.model.Attachment; import org.mayocat.shop.catalog.front.builder.ProductContextBuilder; import org.mayocat.shop.catalog.model.Product; import org.mayocat.shop.catalog.store.CollectionStore; import org.mayocat.shop.front.builder.PaginationContextBuilder; import org.mayocat.shop.front.resources.AbstractFrontResource; import org.mayocat.shop.front.util.FrontContextHelper; import org.mayocat.store.AttachmentStore; import org.mayocat.url.EntityURLFactory; import com.google.common.base.Predicates; import com.google.common.collect.Collections2; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import static org.mayocat.shop.front.util.FrontContextHelper.isEntityFeaturedImage; import static org.mayocat.shop.front.util.FrontContextHelper.isThumbnailOfAttachment; /** * Base class for front resources with product lists. * * @version $Id$ */ public class AbstractProductListFrontResource extends AbstractFrontResource { @Inject protected ConfigurationService configurationService; @Inject protected Provider<AttachmentStore> attachmentStore; @Inject protected Provider<ThumbnailStore> thumbnailStore; @Inject protected Provider<CollectionStore> collectionStore; @Inject protected WebContext context; @Inject protected EntityURLFactory urlFactory; @Inject protected EntityLocalizationService entityLocalizationService; protected Map<String, Object> createProductListContext(List<Product> products) { final Map<String, Object> productsContext = Maps.newHashMap(); final List<Map<String, Object>> productsListContext = Lists.newArrayList(); java.util.Collection<UUID> featuredImageIds = Collections2.transform(products, FrontContextHelper.ENTITY_FEATURED_IMAGE); List<UUID> ids = new ArrayList<>(Collections2.filter(featuredImageIds, Predicates.notNull())); List<Attachment> allImages; List<Thumbnail> allThumbnails; if (ids.isEmpty()) { allImages = Collections.emptyList(); allThumbnails = Collections.emptyList(); } else { allImages = this.attachmentStore.get().findByIds(ids); allThumbnails = this.thumbnailStore.get().findAllForIds(ids); } ProductContextBuilder builder = new ProductContextBuilder(urlFactory, configurationService, entityLocalizationService, this.context.getTheme().getDefinition()); for (final Product product : products) { java.util.Collection<Attachment> attachments = Collections2.filter(allImages, isEntityFeaturedImage(product)); List<Image> images = new ArrayList<>(); for (final Attachment attachment : attachments) { java.util.Collection<Thumbnail> thumbnails = Collections2.filter(allThumbnails, isThumbnailOfAttachment(attachment)); Image image = new Image(entityLocalizationService.localize(attachment), new ArrayList<>(thumbnails)); images.add(image); } List<org.mayocat.shop.catalog.model.Collection> productCollections = collectionStore.get().findAllForProduct(product); product.setCollections(productCollections); if (productCollections.size() > 0) { // Here we take the first collection in the list, but in the future we should have the featured // collection as the parent entity of this product product.setFeaturedCollection(productCollections.get(0)); } Map<String, Object> productContext = builder.build(entityLocalizationService.localize(product), images); productsListContext.add(productContext); } productsContext.put("list", productsListContext); return productsContext; } protected Map<String, Object> createProductListContext(int currentPage, Integer totalPages, List<Product> products, PaginationContextBuilder.UrlBuilder urlBuilder) { Map<String, Object> productsContext = createProductListContext(products); PaginationContextBuilder paginationContextBuilder = new PaginationContextBuilder(); productsContext.put("pagination", paginationContextBuilder.build(currentPage, totalPages, urlBuilder)); return productsContext; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ead1619c2b1f0a6c7afb92488117bf6164fb22ed
7ce370b237e933871e9d1c24aabe674e8e26659b
/project/giving-batch/src/generated/com/virginmoneygiving/paymentmanagement/service/messages/FindLastGiftAidClaimedRequest.java
e9567134f4e930a17bca4132bfd373c271947c29
[]
no_license
ankurmitujjain/virginmoney
16c21fb7ba03b70f8fab02f6543e6531c275cfab
2355ea70b25ac00c212f8968f072365a53ef0cbc
refs/heads/master
2020-12-31T04:42:42.191330
2009-09-18T06:40:02
2009-09-18T06:40:02
57,319,348
0
0
null
null
null
null
UTF-8
Java
false
false
1,823
java
package com.virginmoneygiving.paymentmanagement.service.messages; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Header" type="{http://www.virginmoneygiving.com/type/header/}MessageHeader"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "header" }) @XmlRootElement(name = "findLastGiftAidClaimedRequest", namespace = "http://www.virginmoneygiving.com/type/payment-management/operations/") public class FindLastGiftAidClaimedRequest { @XmlElement(name = "Header", namespace = "http://www.virginmoneygiving.com/type/payment-management/operations/", required = true) protected MessageHeader header; /** * Gets the value of the header property. * * @return * possible object is * {@link MessageHeader } * */ public MessageHeader getHeader() { return header; } /** * Sets the value of the header property. * * @param value * allowed object is * {@link MessageHeader } * */ public void setHeader(MessageHeader value) { this.header = value; } }
[ "ankurmitujjain@60e5a148-1378-11de-b480-edb48bd02f47" ]
ankurmitujjain@60e5a148-1378-11de-b480-edb48bd02f47
dbca2958b455c19db443df2f8f09219f8d302b23
1a83a3737292b48cd16158d2aa6a8389d6c4f38e
/bin/platform/ext/workflow/testsrc/de/hybris/platform/workflow/services/internal/impl/ActionsFromWorkflowTemplateFactoryTest.java
e8a512d2dd0458c65906a1fd5c9d2e539c97edf9
[]
no_license
NathanKun/Hybris123
026803ba53302a1e56f2e4c79dec33948021d24c
7b52d802856bd265403548924f40cff1ed8d9658
refs/heads/master
2021-01-25T00:48:23.674949
2018-03-01T10:41:30
2018-03-01T10:41:30
123,303,717
0
1
null
null
null
null
UTF-8
Java
false
false
3,003
java
/* * [y] hybris Platform * * Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.workflow.services.internal.impl; import de.hybris.bootstrap.annotations.UnitTest; import de.hybris.platform.servicelayer.model.ModelService; import de.hybris.platform.workflow.WorkflowActionService; import de.hybris.platform.workflow.model.WorkflowActionModel; import de.hybris.platform.workflow.model.WorkflowActionTemplateModel; import de.hybris.platform.workflow.model.WorkflowModel; import de.hybris.platform.workflow.model.WorkflowTemplateModel; import java.util.Arrays; import java.util.Collections; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; @UnitTest public class ActionsFromWorkflowTemplateFactoryTest { private final ActionsFromWorkflowTemplateFactory factory = new ActionsFromWorkflowTemplateFactory(); @Mock private ModelService modelService; @Mock private WorkflowActionService workflowActionService; @Before public void prepare() { MockitoAnnotations.initMocks(this); factory.setModelService(modelService); factory.setWorkflowActionService(workflowActionService); } @Test public void testWorkflowTemplateFactoryEmpty() { final WorkflowModel workFlow = Mockito.mock(WorkflowModel.class); final WorkflowTemplateModel workTemplate = Mockito.mock(WorkflowTemplateModel.class); Assert.assertEquals(Collections.EMPTY_LIST, factory.create(workFlow, workTemplate)); Mockito.verifyNoMoreInteractions(modelService); } @Test public void testActionsFromWorkflowTemplateFactoryEmpty() { final WorkflowActionModel actionResult = new WorkflowActionModel(); final WorkflowModel workFlow = Mockito.mock(WorkflowModel.class); final WorkflowTemplateModel workTemplate = Mockito.mock(WorkflowTemplateModel.class); final WorkflowActionTemplateModel actionOne = Mockito.mock(WorkflowActionTemplateModel.class); final WorkflowActionTemplateModel actionTwo = Mockito.mock(WorkflowActionTemplateModel.class); Mockito.when(workTemplate.getActions()).thenReturn(Arrays.asList(actionOne, actionTwo)); Mockito.when( workflowActionService.createWorkflowAction(Mockito.any(WorkflowActionTemplateModel.class), Mockito.any(WorkflowModel.class))).thenReturn(actionResult); Assert.assertEquals(Arrays.asList(actionResult, actionResult), factory.create(workFlow, workTemplate)); Mockito.verify(workflowActionService).createWorkflowAction(actionOne, workFlow); Mockito.verify(workflowActionService).createWorkflowAction(actionTwo, workFlow); Mockito.verify(modelService, Mockito.times(2)).save(actionResult); } }
[ "nathanhejunyang@gmail.com" ]
nathanhejunyang@gmail.com
2855a7ebcc1205018521df0981246e91bd17a252
8237cf4b0fdd903ff6f41d96c9322a9899ed7fcb
/core/src/main/java/com/axellience/vuegwt/core/client/vnode/VNodeDirective.java
82c286d468108d1132051158b434d61ed404efeb
[ "MIT" ]
permissive
athyberg/vue-gwt
038398c3a1045b8fe2a6c5c99257a28f1907b0ce
fc9f8e7d61a7dd37326018e5078aeaba04ebbb84
refs/heads/master
2020-03-21T06:20:46.731070
2018-06-07T19:40:43
2018-06-07T19:40:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,265
java
package com.axellience.vuegwt.core.client.vnode; import jsinterop.annotations.JsOverlay; import jsinterop.annotations.JsPackage; import jsinterop.annotations.JsProperty; import jsinterop.annotations.JsType; import jsinterop.base.JsPropertyMap; /** * @author Adrien Baron */ @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Object") public final class VNodeDirective { @JsProperty protected String name; @JsProperty protected Object value; @JsProperty protected Object oldValue; @JsProperty protected Object expression; @JsProperty protected String arg; @JsProperty protected JsPropertyMap modifiers; @JsOverlay public final String getName() { return name; } @JsOverlay public final VNodeDirective setName(String name) { this.name = name; return this; } @JsOverlay public final Object getValue() { return value; } @JsOverlay public final VNodeDirective setValue(Object value) { this.value = value; return this; } @JsOverlay public final Object getOldValue() { return oldValue; } @JsOverlay public final VNodeDirective setOldValue(Object oldValue) { this.oldValue = oldValue; return this; } @JsOverlay public final Object getExpression() { return expression; } @JsOverlay public final VNodeDirective setExpression(Object expression) { this.expression = expression; return this; } @JsOverlay public final String getArg() { return arg; } @JsOverlay public final VNodeDirective setArg(String arg) { this.arg = arg; return this; } @JsOverlay public final JsPropertyMap getModifiers() { return modifiers; } @JsOverlay public final VNodeDirective setModifiers(JsPropertyMap modifiers) { this.modifiers = modifiers; return this; } @JsOverlay public final VNodeDirective modifier(String name, boolean modifier) { if (this.modifiers == null) this.modifiers = JsPropertyMap.of(); this.modifiers.set(name, modifier); return this; } }
[ "adrien.baron@axellience.com" ]
adrien.baron@axellience.com
df64126fc435e8b79e0fb5a9c30eb50d475ac99e
a89a777f30193df52d8207f100c8e41552eabc12
/extended/src/main/java/io/kubernetes/client/extended/generic/options/CreateOptions.java
76556fb10bd29e225d6cb592d229ed666424e8d6
[ "Apache-2.0" ]
permissive
MrGirl/java
b574c765448b5a90a45e59fbae4ced178ff6e7cd
a1724574b9ddbf5df836d7aaf33c98548d5d313a
refs/heads/master
2022-11-19T18:00:11.981386
2020-07-17T20:38:50
2020-07-17T20:38:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
994
java
/* Copyright 2020 The Kubernetes 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 io.kubernetes.client.extended.generic.options; public class CreateOptions { private String dryRun; private String fieldManager; public String getDryRun() { return dryRun; } public void setDryRun(String dryRun) { this.dryRun = dryRun; } public String getFieldManager() { return fieldManager; } public void setFieldManager(String fieldManager) { this.fieldManager = fieldManager; } }
[ "291271447@qq.com" ]
291271447@qq.com
1292cdd8045e1ba016121512ef0230d425ef6a37
f8d31528e4dca2a6340b434bffd5ba6a2cacafcd
/jdk9src/src/main/java/org/omg/PortableInterceptor/INACTIVE.java
caa4d8939d7bd91346c6f1a3ad4675c374ff574e
[]
no_license
uptonking/jdksrc
1871ad9c312845f6873d741db2f13837f046232d
d628a733240986c59d96185acef84283e1b5aff5
refs/heads/master
2021-09-15T00:10:18.103059
2018-03-03T12:31:24
2018-03-03T12:31:24
109,384,307
0
0
null
null
null
null
UTF-8
Java
false
false
552
java
package org.omg.PortableInterceptor; /** * org/omg/PortableInterceptor/INACTIVE.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /build/openjdk-9-argm_o/openjdk-9-9~b114/src/corba/src/java.corba/share/classes/org/omg/PortableInterceptor/Interceptors.idl * Thursday, April 14, 2016 7:54:06 PM UTC */ public interface INACTIVE { /** Object adapter state that causes all requests to be discarded. * This state indicates that the adapter is shutting down. */ public static final short value = (short)(3); }
[ "jinyaoo86@gmail.com" ]
jinyaoo86@gmail.com
b24f79e5f98888a3624c3ff6d4b62b2f84aecea9
c2bcf9b067adce41099c8da494438f2ce194d629
/application/src/main/java/org/thingsboard/server/actors/plugin/ValidationCallback.java
707afa50ddfd4862297b1fbb4bb97a5a918d8e4d
[ "Apache-2.0" ]
permissive
ghaseminya/thingsboard
57a739b18b69f93e59a002a5a7dab5b50ac392b5
6a51eda9452139bc34734b6539132ca2b90effa6
refs/heads/master
2020-12-30T17:11:25.185075
2017-05-09T13:38:41
2017-05-09T13:38:41
91,065,542
1
0
null
2017-05-12T07:47:46
2017-05-12T07:47:46
null
UTF-8
Java
false
false
1,636
java
/** * Copyright © 2016-2017 The Thingsboard Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.thingsboard.server.actors.plugin; import com.hazelcast.util.function.Consumer; import org.thingsboard.server.extensions.api.exception.UnauthorizedException; import org.thingsboard.server.extensions.api.plugins.PluginCallback; import org.thingsboard.server.extensions.api.plugins.PluginContext; /** * Created by ashvayka on 21.02.17. */ public class ValidationCallback implements PluginCallback<Boolean> { private final PluginCallback<?> callback; private final Consumer<PluginContext> action; public ValidationCallback(PluginCallback<?> callback, Consumer<PluginContext> action) { this.callback = callback; this.action = action; } @Override public void onSuccess(PluginContext ctx, Boolean value) { if (value) { action.accept(ctx); } else { onFailure(ctx, new UnauthorizedException()); } } @Override public void onFailure(PluginContext ctx, Exception e) { callback.onFailure(ctx, e); } }
[ "ashvayka@thingsboard.io" ]
ashvayka@thingsboard.io
11d37eb1b0fba3b574ada60120120c716eb5e4d6
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/dji/midware/data/model/P3/DataSimulatorGetPushMainControllerReturnParams.java
f3c0d34088e9245b09b3987b958ad033fbc0d98e
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
1,214
java
package dji.midware.data.model.P3; import android.support.annotation.Keep; import dji.fieldAnnotation.EXClassNullAway; import dji.midware.data.manager.P3.DataBase; @Keep @EXClassNullAway public class DataSimulatorGetPushMainControllerReturnParams extends DataBase { private static DataSimulatorGetPushMainControllerReturnParams instance; public static synchronized DataSimulatorGetPushMainControllerReturnParams getInstance() { DataSimulatorGetPushMainControllerReturnParams dataSimulatorGetPushMainControllerReturnParams; synchronized (DataSimulatorGetPushMainControllerReturnParams.class) { if (instance == null) { instance = new DataSimulatorGetPushMainControllerReturnParams(); } dataSimulatorGetPushMainControllerReturnParams = instance; } return dataSimulatorGetPushMainControllerReturnParams; } /* access modifiers changed from: protected */ public boolean isChanged(byte[] data) { return true; } public int getDroneType() { return ((Integer) get(0, 1, Integer.class)).intValue(); } /* access modifiers changed from: protected */ public void doPack() { } }
[ "michael@districtrace.com" ]
michael@districtrace.com
47870c902df393c5aa877fdca5811d374608d281
17e8438486cb3e3073966ca2c14956d3ba9209ea
/dso/tags/2.4.8/code/base/services-tests/tests.unit/com/tctest/WorkQueueTest2.java
d91ec9e9a360bd66edd29334e3bf96844780a537
[]
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
526
java
/* * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. */ package com.tctest; public class WorkQueueTest2 extends TransparentTestBase { private static final int NODE_COUNT = 2; public void doSetUp(TransparentTestIface t) throws Exception { t.getTransparentAppConfig().setClientCount(NODE_COUNT); t.initializeTestRunner(); } protected Class getApplicationClass() { return WorkQueueTestApp.class; } }
[ "hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864" ]
hhuynh@7fc7bbf3-cf45-46d4-be06-341739edd864
b2aef0936c4e61b64e2b509af5f0ee1643d843fb
75adc426717866b8c05b9d569610a7f23c50e639
/vertx-kafka/src/main/java/com/edgar/vertx/kafka/ProducerStartVerticle.java
fdecb6ad1cb43eb871518402c6ce3688619164ee
[]
no_license
edgar615/vertx-study
7466312e0deaee59361f7bf5d796061abc487643
ec004eccad3c6fe36050892c8858e8a6d5ca842f
refs/heads/master
2020-04-12T09:32:07.163244
2018-01-31T07:43:24
2018-01-31T07:43:24
53,409,712
4
1
null
null
null
null
UTF-8
Java
false
false
2,233
java
package com.edgar.vertx.kafka; import io.vertx.core.AbstractVerticle; import io.vertx.core.Vertx; import io.vertx.kafka.client.common.PartitionInfo; import io.vertx.kafka.client.producer.KafkaProducer; import io.vertx.kafka.client.producer.KafkaProducerRecord; import io.vertx.kafka.client.producer.RecordMetadata; import java.util.HashMap; import java.util.Map; /** * Created by edgar on 17-3-11. */ public class ProducerStartVerticle extends AbstractVerticle { public static void main(String[] args) { Vertx.vertx().deployVerticle(ProducerStartVerticle.class.getName()); } @Override public void start() throws Exception { Map<String, String> config = new HashMap<>(); config.put("bootstrap.servers", "localhost:9092"); config.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer"); config.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer"); config.put("acks", "1"); // use producer for interacting with Apache Kafka KafkaProducer<String, String> producer = KafkaProducer.create(vertx, config); for (int i = 0; i < 5; i++) { // only topic and message value are specified, round robin on destination partitions KafkaProducerRecord<String, String> record = KafkaProducerRecord.create("test", "message_" + i); //You can call the partitionsFor to get information about partitions for a specified topic: producer.partitionsFor("test", ar -> { if (ar.succeeded()) { for (PartitionInfo partitionInfo : ar.result()) { System.out.println(partitionInfo); } } }); producer.write(record, done -> { if (done.succeeded()) { RecordMetadata recordMetadata = done.result(); System.out.println("Message " + record.value() + " written on topic=" + recordMetadata.getTopic() + ", partition=" + recordMetadata.getPartition() + ", offset=" + recordMetadata.getOffset()); } }); } producer.close(res -> { if (res.succeeded()) { System.out.println("Producer is now closed"); } else { System.out.println("close failed"); } }); } }
[ "edgar615@gmail.com" ]
edgar615@gmail.com
344eb15dad1d0916c25b2306c8f7de75c68f5197
84e48328319d275e7f12fad214e4b425fdeb430e
/com/planet_ink/coffee_tools/InFileFind.java
45ad98b4b21e7fbd04a1f0ebd0c0de9ab96226af
[ "Apache-2.0" ]
permissive
bozimmerman/CoffeeTools
523efd54fa3569fe2c16f56e0ead40a9781a4d4f
ca9fb83010f371390ca4dfb5554fa94d28f233ca
refs/heads/master
2021-01-23T12:43:44.406923
2017-05-26T08:49:32
2017-05-26T08:49:32
93,187,622
2
1
null
null
null
null
UTF-8
Java
false
false
3,982
java
package com.planet_ink.coffee_tools; /* Copyright 2017-2017 Bo Zimmerman 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. */ import java.io.*; import java.util.*; public class InFileFind { public InFileFind() { } private static class BufferedRandomAccessFile { private long length; private byte[] buf; final RandomAccessFile rF; private volatile long posStart=-1; private volatile int bufLength = -1; //private final char codeName; private static final int[] codeNum = { 0 }; public BufferedRandomAccessFile(final String fileName, final int bufferSize) throws IOException { rF = new RandomAccessFile(fileName,"r"); length = rF.length(); buf = new byte[bufferSize]; synchronized(codeNum) { //codeName = (char)((int)'A' + codeNum[0]); codeNum[0]++; } } public long length() { return length; } public int get(long pos) throws IOException { if((pos<0)||(pos >= length)) throw new IOException("Index out of range!"); if((pos >= posStart)&&(pos < posStart + bufLength)) { return buf[(int)(pos - posStart)]; } //long oldPosStart = posStart; //int oldLength = bufLength; if((pos < posStart)&&(pos > posStart - (buf.length/2))) { posStart = posStart - (buf.length/2); if(posStart < 0) posStart = 0; } else posStart = pos; rF.seek(posStart); bufLength = buf.length; if(posStart + bufLength >= length) bufLength = (int)(length - posStart); //System.out.println(codeName+": "+oldPosStart+"-"+oldLength+" : "+pos+" : "+posStart +"-"+bufLength); rF.readFully(buf,0,bufLength); return buf[(int)(pos - posStart)]; } } public static long fileFile(final String parentFileName, final String subFileName) throws IOException { final int BUFFER_SIZE = 65536 * 1024; BufferedRandomAccessFile pF = new BufferedRandomAccessFile(parentFileName,BUFFER_SIZE); BufferedRandomAccessFile sF = new BufferedRandomAccessFile(subFileName,BUFFER_SIZE); long[] sFmap=new long[256]; Arrays.fill(sFmap, -1); int fillRemains = 256; sF.get(0); // preload from the front for(long j = sF.length()-1; j >= 0 && (fillRemains>0); j--) { if(sFmap[sF.get(j) & 0xff]<0) { sFmap[sF.get(j) & 0xff]=j; fillRemains--; } } long i = 0; long DOT_PACE=pF.length() / 80; long NEXT_DOT = DOT_PACE; while(i<pF.length()) { long j = 0; while(j < sF.length() && i+j < pF.length() && pF.get(i+j) == sF.get(j)) { //match j++; } if(j == sF.length()) { System.out.println("!"); return i; } else { //shift if(i+sF.length() < pF.length()) { long k=sFmap[pF.get(i+sF.length()) & 0xff]; if(k >= 0) j=k; } i += sF.length()-j; while(i>NEXT_DOT) { NEXT_DOT += DOT_PACE; System.out.print("."); } } } System.out.println("!"); return -1; } public static void main(String[] args) { if(args.length<2) { System.err.println("Usage: InFileFind [PARENT FILE] [SUB FILE]"); System.exit(-1); } try { String parentFileName=args[0]; String subFileName=args[1]; long pos = InFileFind.fileFile(parentFileName, subFileName); if(pos < 0) System.out.println("Not found"); else System.out.println("Found at index "+pos); } catch(Exception e) { e.printStackTrace(); } } }
[ "bo@zimmers.net" ]
bo@zimmers.net
b2b647017ac9a520e0b6e54be548f22dd47341dd
21bcd1da03415fec0a4f3fa7287f250df1d14051
/sources/androidx/constraintlayout/solver/p014h/C0691r.java
7c3b9f502c1919448cdba698042a71d8c1378180
[]
no_license
lestseeandtest/Delivery
9a5cc96bd6bd2316a535271ec9ca3865080c3ec8
bc3fae8f30804a2520e6699df92c2e6a4a0a7cfc
refs/heads/master
2022-04-24T12:14:22.396398
2020-04-25T21:50:29
2020-04-25T21:50:29
258,875,870
0
1
null
null
null
null
UTF-8
Java
false
false
3,106
java
package androidx.constraintlayout.solver.p014h; import androidx.constraintlayout.solver.p014h.C0667e.C0670c; import java.util.ArrayList; /* renamed from: androidx.constraintlayout.solver.h.r */ /* compiled from: Snapshot */ public class C0691r { /* renamed from: a */ private int f2934a; /* renamed from: b */ private int f2935b; /* renamed from: c */ private int f2936c; /* renamed from: d */ private int f2937d; /* renamed from: e */ private ArrayList<C0692a> f2938e = new ArrayList<>(); /* renamed from: androidx.constraintlayout.solver.h.r$a */ /* compiled from: Snapshot */ static class C0692a { /* renamed from: a */ private C0667e f2939a; /* renamed from: b */ private C0667e f2940b; /* renamed from: c */ private int f2941c; /* renamed from: d */ private C0670c f2942d; /* renamed from: e */ private int f2943e; public C0692a(C0667e eVar) { this.f2939a = eVar; this.f2940b = eVar.mo3546k(); this.f2941c = eVar.mo3536c(); this.f2942d = eVar.mo3545j(); this.f2943e = eVar.mo3521a(); } /* renamed from: a */ public void mo3782a(C0677h hVar) { hVar.mo3599a(this.f2939a.mo3547l()).mo3530a(this.f2940b, this.f2941c, this.f2942d, this.f2943e); } /* renamed from: b */ public void mo3783b(C0677h hVar) { this.f2939a = hVar.mo3599a(this.f2939a.mo3547l()); C0667e eVar = this.f2939a; if (eVar != null) { this.f2940b = eVar.mo3546k(); this.f2941c = this.f2939a.mo3536c(); this.f2942d = this.f2939a.mo3545j(); this.f2943e = this.f2939a.mo3521a(); return; } this.f2940b = null; this.f2941c = 0; this.f2942d = C0670c.STRONG; this.f2943e = 0; } } public C0691r(C0677h hVar) { this.f2934a = hVar.mo3596X(); this.f2935b = hVar.mo3597Y(); this.f2936c = hVar.mo3593U(); this.f2937d = hVar.mo3688q(); ArrayList c = hVar.mo3637c(); int size = c.size(); for (int i = 0; i < size; i++) { this.f2938e.add(new C0692a((C0667e) c.get(i))); } } /* renamed from: a */ public void mo3780a(C0677h hVar) { hVar.mo3705x(this.f2934a); hVar.mo3707y(this.f2935b); hVar.mo3699u(this.f2936c); hVar.mo3679m(this.f2937d); int size = this.f2938e.size(); for (int i = 0; i < size; i++) { ((C0692a) this.f2938e.get(i)).mo3782a(hVar); } } /* renamed from: b */ public void mo3781b(C0677h hVar) { this.f2934a = hVar.mo3596X(); this.f2935b = hVar.mo3597Y(); this.f2936c = hVar.mo3593U(); this.f2937d = hVar.mo3688q(); int size = this.f2938e.size(); for (int i = 0; i < size; i++) { ((C0692a) this.f2938e.get(i)).mo3783b(hVar); } } }
[ "zsolimana@uaedomain.local" ]
zsolimana@uaedomain.local
ad5b8cd8c923fa9e0f3f31f922099f9bfe762573
483e79b0b8e92abf41e312b225ca26a0d2a033e2
/gradebookng/tool/src/java/org/sakaiproject/gradebookng/tool/actions/SetStudentNameOrderAction.java
70c6aede158492f5fe2f1b3d51bdc9f347afc582
[ "LicenseRef-scancode-generic-cla", "ECL-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
alvaedu/NYUsakai11
6fcfbd6cafa390891406d02ab6ff776d7d92b573
2434f320c49072d23af77062ea763228374f4c25
refs/heads/master
2020-03-23T12:53:31.449804
2018-07-19T05:51:31
2018-07-19T05:51:31
141,588,375
0
0
null
null
null
null
UTF-8
Java
false
false
1,262
java
package org.sakaiproject.gradebookng.tool.actions; import com.fasterxml.jackson.databind.JsonNode; import org.apache.wicket.ajax.AjaxRequestTarget; import org.sakaiproject.gradebookng.business.model.GbStudentNameSortOrder; import org.sakaiproject.gradebookng.tool.model.GradebookUiSettings; import org.sakaiproject.gradebookng.tool.pages.GradebookPage; import java.io.Serializable; public class SetStudentNameOrderAction extends InjectableAction implements Serializable { private static final long serialVersionUID = 1L; public SetStudentNameOrderAction() { } @Override public ActionResponse handleEvent(JsonNode params, AjaxRequestTarget target) { final String orderParam = params.get("orderby").asText(); final GbStudentNameSortOrder nameSortOrder = GbStudentNameSortOrder.valueOf(orderParam.toUpperCase()); final GradebookPage gradebookPage = (GradebookPage)target.getPage(); final GradebookUiSettings settings = gradebookPage.getUiSettings(); settings.setNameSortOrder(nameSortOrder); // save settings gradebookPage.setUiSettings(settings); // refresh the page target.appendJavaScript("location.reload();"); return new EmptyOkResponse(); } }
[ "mark@dishevelled.net" ]
mark@dishevelled.net
5eeb887febbce86356aaa2572b47611ffe265591
d33478e56c878f384ff98e0371bf07e8f6b65a7e
/kin-conf-diamond/src/main/java/org/kin/conf/diamond/entity/ConfMsg.java
ba41efae7eea7bffc65d9cf7c26c5e80f1142954
[ "Apache-2.0" ]
permissive
huangjianqin/kin-conf
41617cd6a768651b443d279d867363d2c836a838
edb0f8775565ef362ad6598761e63f2dd6371248
refs/heads/master
2022-05-22T05:25:46.653694
2022-03-30T14:28:59
2022-03-30T14:28:59
210,383,872
0
0
null
null
null
null
UTF-8
Java
false
false
1,510
java
package org.kin.conf.diamond.entity; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; /** * @author huangjianqin * @date 2019/7/12 */ @TableName(autoResultMap = true) public class ConfMsg implements Serializable { /** id */ private Integer id; /** 配置变化时间 */ private Long changeTime; /** 所属项目AppName */ private String appName; /** 项目应用环境 */ private String env; /** 配置Key */ @TableField(value = "k") private String key; /** 配置Value */ @TableField(value = "v") private String value; //setter && getter public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Long getChangeTime() { return changeTime; } public void setChangeTime(Long changeTime) { this.changeTime = changeTime; } public String getAppName() { return appName; } public void setAppName(String appName) { this.appName = appName; } public String getEnv() { return env; } public void setEnv(String env) { this.env = env; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getValue() { return value; } public void setValue(String value) { this.value = value; } }
[ "18814127639@163.com" ]
18814127639@163.com
8a84dea5595ca6058c3f38b4adcdcc3df67ed98a
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_52ee97796f7cc18c8445eca67b8ff70ede191a78/SecuredActions/13_52ee97796f7cc18c8445eca67b8ff70ede191a78_SecuredActions_s.java
0490bb2cc3b4ebeca16de0703fee261ae05857c1
[]
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,087
java
/* * Copyright (C) 2010 Pavel Stastny * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package cz.incad.kramerius.security; /** * Secured actions enum */ public enum SecuredActions { // common user actions READ("read"), // Admin actions IMPORT( "import"), CONVERT( "convert"), REPLICATIONRIGHTS( "replicationrights"), ENUMERATOR( "enumerator"), REINDEX( "reindex"), REPLIKATOR_PERIODICALS( "replikator_periodicals"), REPLIKATOR_MONOGRAPHS( "replikator_monographs"), DELETE( "delete"), EXPORT( "export"), SETPRIVATE( "setprivate"), SETPUBLIC( "setpublic"), ADMINISTRATE( "administrate"), EDITOR("editor"), MANAGE_LR_PROCESS("manage_lr_process"), // editace informaci na uvodni strance EDIT_INFO_TEXT("edit_info_text"), // editace uzivatelu USERSADMIN("rightsadmin"), USERSSUBADMIN("rightssubadmin"); private String formalName; private SecuredActions(String formalName) { this.formalName = formalName; } public String getFormalName() { return formalName; } public static SecuredActions findByFormalName(String fname) { SecuredActions[] vals = values(); for (SecuredActions act : vals) { if (act.getFormalName().equals(fname)) { return act; } } return null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
0d6792b84f7d7ff4152cd13ba86ff9d0098ade21
efe303975317cf6550d4cf275cdae24c4610ce8e
/_ EduardAPI/src/net/eduard/api/lib/game/Sounds.java
81cdfcd31176e807ffaf82ec9fe1e32091559a94
[]
no_license
SrOpala/plugins
9f430f0534e942e613c130540b25d5ce134ca8e7
e9ccf33b137a2e09c537fab729d759608cf42eb2
refs/heads/master
2020-04-17T18:05:24.586204
2018-12-17T03:57:24
2018-12-17T03:57:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,791
java
package net.eduard.api.lib.game; import java.util.Map; import org.bukkit.Location; import org.bukkit.Sound; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import net.eduard.api.lib.storage.Storable; /** * Representa um som sendo configurado, Tipo, Volume, Tom * @author Eduard * @version 2.0 * @since 1.0 * */ public class Sounds implements Storable { private Sound sound; private float volume; private float pitch; public Sounds() { this(Sound.values()[0], 2, 1); } public Sounds(Sound sound) { this(sound, 2, 1); } public Sounds(Sound sound, float volume, float pitch) { super(); this.sound = sound; this.volume = volume; this.pitch = pitch; } public static Sounds create(String sound) { try { return new Sounds(Sound.valueOf(sound)); } catch (Exception e) { return new Sounds(Sound.values()[0]); } } public Sounds create(Location location) { location.getWorld().playSound(location, sound, volume, pitch); return this; } public Sounds create(Entity entity) { if (entity instanceof Player){ Player p = (Player) entity; p.playSound(p.getLocation(), sound, volume, pitch); return this; } return create(entity.getLocation()); } public Sound getSound() { return sound; } public void setSound(Sound sound) { this.sound = sound; } public float getVolume() { return volume; } public void setVolume(float volume) { this.volume = volume; } public float getPitch() { return pitch; } public void setPitch(float pitch) { this.pitch = pitch; } @Override public Object restore(Map<String, Object> map) { // TODO Auto-generated method stub return null; } @Override public void store(Map<String, Object> map, Object object) { // TODO Auto-generated method stub } }
[ "eduardkiller@hotmail.com" ]
eduardkiller@hotmail.com
1f0a0025d3565ef02372c70d266755d236289749
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/boot/svg/p708a/p709a/aoh.java
3aae05efced2ed90f46f2828e5100ae2da202c16
[]
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
4,906
java
package com.tencent.p177mm.boot.svg.p708a.p709a; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Paint.Cap; import android.graphics.Paint.Join; import android.graphics.Paint.Style; import android.graphics.Path; import android.os.Looper; import com.tencent.p177mm.plugin.appbrand.jsapi.C33250az; import com.tencent.p177mm.svg.C5163c; import com.tencent.p177mm.svg.WeChatSVGRenderC2Java; import com.tencent.smtt.sdk.WebView; /* renamed from: com.tencent.mm.boot.svg.a.a.aoh */ public final class aoh extends C5163c { private final int height = C33250az.CTRL_INDEX; private final int width = C33250az.CTRL_INDEX; /* renamed from: a */ public final int mo10620a(int i, Object... objArr) { switch (i) { case 0: return C33250az.CTRL_INDEX; case 1: return C33250az.CTRL_INDEX; case 2: Canvas canvas = (Canvas) objArr[0]; Looper looper = (Looper) objArr[1]; C5163c.m7881h(looper); C5163c.m7880g(looper); Paint k = C5163c.m7883k(looper); k.setFlags(385); k.setStyle(Style.FILL); Paint k2 = C5163c.m7883k(looper); k2.setFlags(385); k2.setStyle(Style.STROKE); k.setColor(WebView.NIGHT_MODE_COLOR); k2.setStrokeWidth(1.0f); k2.setStrokeCap(Cap.BUTT); k2.setStrokeJoin(Join.MITER); k2.setStrokeMiter(4.0f); k2.setPathEffect(null); C5163c.m7876a(k2, looper).setStrokeWidth(1.0f); k2 = C5163c.m7876a(k, looper); k2.setColor(-1); canvas.save(); Paint a = C5163c.m7876a(k2, looper); Path l = C5163c.m7884l(looper); l.moveTo(125.0608f, 0.0f); l.cubicTo(144.336f, 0.0f, 153.9712f, 0.0f, 164.3472f, 3.28f); l.cubicTo(175.6752f, 7.4032f, 184.5968f, 16.3248f, 188.72f, 27.6528f); l.cubicTo(192.0f, 38.0272f, 192.0f, 47.6656f, 192.0f, 66.9392f); l.lineTo(192.0f, 125.0608f); l.cubicTo(192.0f, 144.336f, 192.0f, 153.9712f, 188.72f, 164.3472f); l.cubicTo(184.5968f, 175.6752f, 175.6752f, 184.5968f, 164.3472f, 188.7184f); l.cubicTo(153.9712f, 192.0f, 144.336f, 192.0f, 125.0608f, 192.0f); l.lineTo(66.9392f, 192.0f); l.cubicTo(47.664f, 192.0f, 38.0272f, 192.0f, 27.6528f, 188.7184f); l.cubicTo(16.3248f, 184.5968f, 7.4032f, 175.6752f, 3.28f, 164.3472f); l.cubicTo(0.0f, 153.9712f, 0.0f, 144.336f, 0.0f, 125.0608f); l.lineTo(0.0f, 66.9392f); l.cubicTo(0.0f, 47.6656f, 0.0f, 38.0272f, 3.28f, 27.6528f); l.cubicTo(7.4032f, 16.3248f, 16.3248f, 7.4032f, 27.6528f, 3.28f); l.cubicTo(38.0272f, 0.0f, 47.664f, 0.0f, 66.9392f, 0.0f); l.lineTo(125.0608f, 0.0f); l.close(); WeChatSVGRenderC2Java.setFillType(l, 2); canvas.drawPath(l, a); canvas.restore(); k2 = C5163c.m7876a(k, looper); k2.setColor(419430400); canvas.save(); k = C5163c.m7876a(k2, looper); l = C5163c.m7884l(looper); l.moveTo(125.0608f, 0.0f); l.cubicTo(144.336f, 0.0f, 153.9712f, 0.0f, 164.3472f, 3.28f); l.cubicTo(175.6752f, 7.4032f, 184.5968f, 16.3248f, 188.72f, 27.6528f); l.cubicTo(192.0f, 38.0272f, 192.0f, 47.6656f, 192.0f, 66.9392f); l.lineTo(192.0f, 125.0608f); l.cubicTo(192.0f, 144.336f, 192.0f, 153.9712f, 188.72f, 164.3472f); l.cubicTo(184.5968f, 175.6752f, 175.6752f, 184.5968f, 164.3472f, 188.7184f); l.cubicTo(153.9712f, 192.0f, 144.336f, 192.0f, 125.0608f, 192.0f); l.lineTo(66.9392f, 192.0f); l.cubicTo(47.664f, 192.0f, 38.0272f, 192.0f, 27.6528f, 188.7184f); l.cubicTo(16.3248f, 184.5968f, 7.4032f, 175.6752f, 3.28f, 164.3472f); l.cubicTo(0.0f, 153.9712f, 0.0f, 144.336f, 0.0f, 125.0608f); l.lineTo(0.0f, 66.9392f); l.cubicTo(0.0f, 47.6656f, 0.0f, 38.0272f, 3.28f, 27.6528f); l.cubicTo(7.4032f, 16.3248f, 16.3248f, 7.4032f, 27.6528f, 3.28f); l.cubicTo(38.0272f, 0.0f, 47.664f, 0.0f, 66.9392f, 0.0f); l.lineTo(125.0608f, 0.0f); l.close(); WeChatSVGRenderC2Java.setFillType(l, 2); canvas.drawPath(l, k); canvas.restore(); C5163c.m7882j(looper); break; } return 0; } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
f55c5c3953e497f9da138b2964e534ebb7648d08
5f3eeb5a68baaeef490ccbea1213805b209d8c50
/src/main/java/be/pxl/ja2/jpa/model/MedicalFile.java
9d5375005a7b13abe28bc53e207655fa2cbe3ba4
[]
no_license
JeroenPAE/JA2_introductie_JPA
15d7aed14ee648a1f26d4c7a2a396508d859bbd1
25c1fa5963d0d4da8d61fee33fb0e5c848335a6a
refs/heads/master
2021-01-26T21:03:42.706094
2020-04-26T15:15:20
2020-04-26T15:15:20
243,464,951
0
0
null
2020-02-27T08:09:14
2020-02-27T08:09:13
null
UTF-8
Java
false
false
604
java
package be.pxl.ja2.jpa.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class MedicalFile { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private double weight; private int height; public Long getId() { return id; } public double getWeight() { return weight; } public void setWeight(double weight) { this.weight = weight; } public int getHeight() { return height; } public void setHeight(int height) { this.height = height; } }
[ "custersnele@gmail.com" ]
custersnele@gmail.com
b0ae9fe595e938c63ec34350bfd459e46b609af1
eebe7ea49de7cccdb44b6ec1d56e79d4ec3726e3
/2020.01/2020.01.07 - CODE FESTIVAL 2016 Final/DPairCards.java
299b47aef563849a00bdabdda1fcf97b43e34393
[]
no_license
m1kit/cc-archive
6dfbe702680230240491a7af4e7ad63f372df312
66ba7fb9e5b1c61af4a016f800d6c90f6f594ed2
refs/heads/master
2021-06-28T21:54:02.658741
2020-09-08T09:38:58
2020-09-08T09:38:58
150,690,803
0
0
null
null
null
null
UTF-8
Java
false
false
1,128
java
package dev.mikit.atcoder; import dev.mikit.atcoder.lib.io.LightScanner; import dev.mikit.atcoder.lib.io.LightWriter; import dev.mikit.atcoder.lib.debug.Debug; public class DPairCards { private static final int MOD = (int) 1e9 + 7; public void solve(int testNumber, LightScanner in, LightWriter out) { int n = in.ints(), m = in.ints(), ans = 0; int[] cnt = new int[100_001], total = new int[m], pairs = new int[m]; for (int i = 0; i < n; i++) cnt[in.ints()]++; for (int i = 0; i < m; i++) { for (int j = i; j <= 100_000; j += m) { total[i] += cnt[j]; pairs[i] += cnt[j] / 2; } } for (int i = 0; i <= m / 2; i++) { if (i * 2 % m == 0) ans += total[i] / 2; else { ans += Math.min(total[i], total[m - i]); if (total[i] > total[m - i]) ans += Math.min((total[i] - total[m - i]) / 2, pairs[i]); if (total[i] < total[m - i]) ans += Math.min((total[m - i] - total[i]) / 2, pairs[m - i]); } } out.ans(ans).ln(); } }
[ "mikihito0906@gmail.com" ]
mikihito0906@gmail.com
0468ae7e4e9bde50fb2a313337a612160516d48a
5a9cab8d0be9bfc2ca538b5a207e022892279edb
/server/src/main/java/com/cezarykluczynski/stapi/server/video_release/endpoint/VideoReleaseSoapEndpoint.java
49cec65c240ca8ffd524b4d63e4b5a281947dce5
[ "MIT" ]
permissive
mklucz/stapi
c27dffed3e82a8482d657876d072f6b24748c4bb
b929f8334253f16e349a7d303ff6f758df52dbce
refs/heads/master
2020-03-07T14:30:45.304073
2018-03-11T15:12:22
2018-03-11T15:12:22
127,528,344
0
0
MIT
2018-03-31T12:04:49
2018-03-31T12:02:42
Groovy
UTF-8
Java
false
false
1,521
java
package com.cezarykluczynski.stapi.server.video_release.endpoint; import com.cezarykluczynski.stapi.client.v1.soap.VideoReleaseBaseRequest; import com.cezarykluczynski.stapi.client.v1.soap.VideoReleaseBaseResponse; import com.cezarykluczynski.stapi.client.v1.soap.VideoReleaseFullRequest; import com.cezarykluczynski.stapi.client.v1.soap.VideoReleaseFullResponse; import com.cezarykluczynski.stapi.client.v1.soap.VideoReleasePortType; import com.cezarykluczynski.stapi.server.video_release.reader.VideoReleaseSoapReader; import org.springframework.stereotype.Service; import javax.jws.WebParam; @Service public class VideoReleaseSoapEndpoint implements VideoReleasePortType { public static final String ADDRESS = "/v1/soap/videoRelease"; private final VideoReleaseSoapReader videoReleaseSoapReader; public VideoReleaseSoapEndpoint(VideoReleaseSoapReader videoReleaseSoapReader) { this.videoReleaseSoapReader = videoReleaseSoapReader; } @Override public VideoReleaseBaseResponse getVideoReleaseBase(@WebParam(partName = "request", name = "VideoReleaseBaseRequest", targetNamespace = "http://stapi.co/api/v1/soap/videoRelease") VideoReleaseBaseRequest request) { return videoReleaseSoapReader.readBase(request); } @Override public VideoReleaseFullResponse getVideoReleaseFull(@WebParam(partName = "request", name = "VideoReleaseFullRequest", targetNamespace = "http://stapi.co/api/v1/soap/videoRelease") VideoReleaseFullRequest request) { return videoReleaseSoapReader.readFull(request); } }
[ "cezary.kluczynski@gmail.com" ]
cezary.kluczynski@gmail.com
cbe95589d395430af63e18e1d7794700be20d192
8bdda30bbcea1990fb56c2a083ca2a5693ca9b13
/sources/com/google/android/gms/games/event/Event.java
480aa2c7f54edab0fcb707784f48c8b947b6bfe7
[]
no_license
yusato0378/aa
b14e247470efaf28efcc847433eff4aeb7790be6
ffc764c33c6f423d8dd6b1837446583d96a67e05
refs/heads/master
2021-01-10T01:10:49.084058
2016-01-09T12:02:01
2016-01-09T12:02:01
49,321,731
1
0
null
null
null
null
UTF-8
Java
false
false
1,059
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) package com.google.android.gms.games.event; import android.database.CharArrayBuffer; import android.net.Uri; import android.os.Parcelable; import com.google.android.gms.common.data.Freezable; import com.google.android.gms.games.Player; public interface Event extends Parcelable, Freezable { public abstract String getDescription(); public abstract void getDescription(CharArrayBuffer chararraybuffer); public abstract String getEventId(); public abstract String getFormattedValue(); public abstract void getFormattedValue(CharArrayBuffer chararraybuffer); public abstract Uri getIconImageUri(); public abstract String getIconImageUrl(); public abstract String getName(); public abstract void getName(CharArrayBuffer chararraybuffer); public abstract Player getPlayer(); public abstract long getValue(); public abstract boolean isVisible(); }
[ "yu0378@gmail.com" ]
yu0378@gmail.com
368973ba9ca5b0b1cc397c3aef5233865624c835
aae4c654a0feb22d91b720e7e978fb2dc2389e02
/src/test/java/frigo/filter/CubicBSplineTest.java
c3fa651aee08e3d7fad33752e39242a0d9662586
[]
no_license
FrigoCoder/Frigo
a6d41c7c067d52f46c23a46a64e5776ebd416efa
6ef109f6a33e0699ce2fbe1a67f35736441eb3b0
refs/heads/master
2020-04-02T07:21:01.437965
2018-07-29T09:47:21
2018-07-29T09:47:21
154,168,950
0
0
null
null
null
null
UTF-8
Java
false
false
279
java
package frigo.filter; import static frigo.filter.KernelTestUtil.assertKernelEquals; import org.junit.Test; public class CubicBSplineTest { @Test public void testCubicBSpline () { assertKernelEquals(new CubicBSpline(), new BCCubicSpline(1, 0), 0.25); } }
[ "none@none" ]
none@none
d0a09411365e1b54094ba8060ee2a963fbcaa5b0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_d1a521d1036c0fdc251164ace8633ff4f33815ab/ScreenStack/12_d1a521d1036c0fdc251164ace8633ff4f33815ab_ScreenStack_t.java
7ff81aef887e2f7900566e8edd77bb5865cf21d9
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,334
java
/* * This file is part of SpoutAPI. * * Copyright (c) 2011-2012, SpoutDev <http://www.spout.org/> * SpoutAPI is licensed under the SpoutDev License Version 1. * * SpoutAPI 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 3 of the License, or * (at your option) any later version. * * In addition, 180 days after any changes are published, you can use the * software, incorporating those changes, under the terms of the MIT license, * as described in the SpoutDev License Version 1. * * SpoutAPI 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, * the MIT license and the SpoutDev License Version 1 along with this program. * If not, see <http://www.gnu.org/licenses/> for the GNU Lesser General Public * License and see <http://www.spout.org/SpoutDevLicenseV1.txt> for the full license, * including the MIT license. */ package org.spout.api.gui; import java.util.Iterator; import java.util.LinkedList; import org.spout.api.signal.SignalSubscriberObject; import org.spout.api.tickable.Tickable; public class ScreenStack extends SignalSubscriberObject implements Tickable, Runnable { LinkedList<Screen> screens = new LinkedList<Screen>(); LinkedList<Screen> visibleScreens = null; public ScreenStack(FullScreen root) { screens.add(root); dirty(); } public void openScreen(Screen screen) { synchronized (screens) { screens.add(screen); } dirty(); } public void closeTopScreen() { synchronized (screens) { screens.removeLast(); } dirty(); } public void closeScreen(Screen screen) { synchronized (screens) { if (screen == screens.getFirst()) { Screen second = screens.get(1); if (!(second instanceof FullScreen)) { throw new IllegalStateException("The lowest screen must be instance of FullScreen!"); } } screens.remove(screen); } dirty(); } /** * Gets an ordered list of visible screens * The first item in the list is the bottom-most fullscreen, the last item in the list is the top-most fullscreen/popupscreen. * @return */ public LinkedList<Screen> getVisibleScreens() { if (visibleScreens == null) { visibleScreens = new LinkedList<Screen>(); synchronized (screens) { Iterator<Screen> iter = screens.descendingIterator(); Screen next = null; while (iter.hasNext()) { next = iter.next(); visibleScreens.addFirst(next); if (next instanceof FullScreen) { break; } } } } synchronized (visibleScreens) { return visibleScreens; } } private void dirty() { if (visibleScreens == null) { return; } synchronized (visibleScreens) { visibleScreens = null; } } @Override public void onTick(float dt) { for (Screen screen:getVisibleScreens()) { screen.tick(dt); } } @Override public void run() { tick(50f); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
def19b22efd730e16a3adc9d37a54cf19e0dd288
1006d2754c0fd1383efa8247dea71383b43066c4
/core/api/src/main/java/io/novaordis/gld/api/todiscard/ContentType.java
369128749d66607411ea7b0dff55b76a74f8ce75
[ "Apache-2.0" ]
permissive
ovidiuf/gld
b1658988cb35a604d8dbd1bf49d9a01822ee52ce
1366e9e8149704b71df4db85e29040afa0549f6f
refs/heads/master
2021-09-04T18:52:11.470159
2018-01-21T09:39:51
2018-01-21T09:39:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,484
java
/* * Copyright (c) 2015 Nova Ordis LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.novaordis.gld.api.todiscard; import io.novaordis.utilities.UserErrorException; @Deprecated public enum ContentType { KEYVALUE, JMS, TEST; /** * @throws java.lang.IllegalArgumentException on null argument. * @throws UserErrorException */ public static ContentType fromString(String s) throws UserErrorException { if (s == null) { throw new IllegalArgumentException("null content type"); } String ucs = s.toUpperCase(); // next rid of dashes (to allow for 'key-value') ucs = ucs.replace("-", ""); try { return ContentType.valueOf(ucs); } catch(Exception e) { // we're fine for now, we'll try alternatives before completely bailing out } throw new UserErrorException("unknown content type '" + s + "'"); } }
[ "ovidiu@novaordis.com" ]
ovidiu@novaordis.com
b0dcd4e2942c5095e9030c376670dfd110317b67
9d2809ee4669e3701884d334c227c68a24c5787f
/virtualwealthcenter/virtualwealth-core/src/test/java/com/mockuai/virtualwealthcenter/core/service/action/virtualwealth/AcceptAuthonTest.java
8c9930f8e820995c617e8c05320c46fe3daef84f
[]
no_license
vinfai/hy_project
5370367876fe6bcb4109f2af9391b9d817c320b5
8fd99f23cf83b1b3f7bec9560fbd2edc46621d0b
refs/heads/master
2021-01-19T00:58:26.436196
2017-03-01T16:47:22
2017-03-01T16:49:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
445
java
package com.mockuai.virtualwealthcenter.core.service.action.virtualwealth; import com.mockuai.virtualwealthcenter.core.BaseActionTest; public class AcceptAuthonTest extends BaseActionTest{ public AcceptAuthonTest(String className) { super(ListWealthAccountBatchActionTest.class.getName()); // TODO Auto-generated constructor stub } @Override protected String getCommand() { // TODO Auto-generated method stub return null; } }
[ "1147478866@qq.com" ]
1147478866@qq.com
ea684b0196738902f810cc1e1b71fcd8b54422a5
a544e72077128a61c64a008b8fcd3e2ba3d3ad1a
/IdeaProjects/Cap7/src/main/java/Cap7/Exercicio3.java
fe7221f8ce8cbb854edb0de26cfc597eed43390b
[]
no_license
ghmc91/IdeaProjects
ecbcfb0ee72f64a52ef254774d10d4a289fb8fde
a7608d8c97ebae043f9f7260be973ef8128a030b
refs/heads/master
2020-03-10T14:13:20.192671
2019-03-13T18:11:43
2019-03-13T18:11:43
129,420,895
0
0
null
null
null
null
UTF-8
Java
false
false
1,725
java
package Cap7; import opennlp.tools.sentdetect.SentenceDetectorME; import opennlp.tools.sentdetect.SentenceModel; import opennlp.tools.util.InvalidFormatException; import opennlp.tools.util.Span; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; public class Exercicio3 { public static void main(String[] args) { SentenceModel model = null; String text = null; try { InputStream inputStream = new FileInputStream("nlp_models/en-sent.bin"); model = new SentenceModel(inputStream); Path text1_path = Paths.get("nlp_files", "text1.txt"); Charset charset = Charset.forName("ISO-8859-1"); List<String> lines = Files.readAllLines(text1_path,charset); text = lines.toString(); }catch (FileNotFoundException e){ e.printStackTrace(); }catch (InvalidFormatException e){ e.printStackTrace(); }catch (IOException e){ e.printStackTrace(); } if (model == null){ System.out.println("Modelo não foi carregado"); } SentenceDetectorME detector = new SentenceDetectorME(model); Span[] spans = detector.sentPosDetect(text); String sentences[] = detector.sentDetect(text); double[] probs = detector.getSentenceProbabilities(); for (int i = 0; i < sentences.length; i++){ System.out.println(probs[i] + " - " + sentences); System.out.println(); } } }
[ "gustavo_martins1991@hotmail.com" ]
gustavo_martins1991@hotmail.com
a1f90fa1a7e253dea56f875240736af640f56228
5d76b555a3614ab0f156bcad357e45c94d121e2d
/src-v3/com/google/android/gms/games/multiplayer/turnbased/TurnBasedMatchBuffer.java
ce66cb688eb01275f61dbdfce0d1c5e647986f05
[]
no_license
BinSlashBash/xcrumby
8e09282387e2e82d12957d22fa1bb0322f6e6227
5b8b1cc8537ae1cfb59448d37b6efca01dded347
refs/heads/master
2016-09-01T05:58:46.144411
2016-02-15T13:23:25
2016-02-15T13:23:25
51,755,603
5
1
null
null
null
null
UTF-8
Java
false
false
674
java
package com.google.android.gms.games.multiplayer.turnbased; import com.google.android.gms.common.data.C0796d; import com.google.android.gms.common.data.DataHolder; public final class TurnBasedMatchBuffer extends C0796d<TurnBasedMatch> { public TurnBasedMatchBuffer(DataHolder dataHolder) { super(dataHolder); } protected /* synthetic */ Object m2894c(int i, int i2) { return getEntry(i, i2); } protected TurnBasedMatch getEntry(int rowIndex, int numChildren) { return new TurnBasedMatchRef(this.BB, rowIndex, numChildren); } protected String getPrimaryDataMarkerColumn() { return "external_match_id"; } }
[ "binslashbash@otaking.top" ]
binslashbash@otaking.top
8185e2cb71e2e27699e5091d65322500eed4c50b
5bc9d8f92f38967cc9ecc03000c0606dbbb38f74
/sca4j/modules/tags/sca4j-modules-parent-pom-0.1.0/extension/binding/sca4j-binding-jms/src/main/java/org/sca4j/binding/jms/runtime/host/standalone/JMSMessageListenerInvoker.java
04cbd9d6dad47fa39aa13e8ac126dd75f1093475
[]
no_license
codehaus/service-conduit
795332fad474e12463db22c5e57ddd7cd6e2956e
4687d4cfc16f7a863ced69ce9ca81c6db3adb6d2
refs/heads/master
2023-07-20T00:35:11.240347
2011-08-24T22:13:28
2011-08-24T22:13:28
36,342,601
2
0
null
null
null
null
UTF-8
Java
false
false
4,806
java
/* * SCA4J * Copyright (c) 2008-2012 Service Symphony Limited * * This proprietary software may be used only in connection with the SCA4J license * (the ?License?), a copy of which is included in the software or may be obtained * at: http://www.servicesymphony.com/licenses/license.html. * * Software distributed under the License is distributed on an as is basis, without * warranties or conditions of any kind. See the License for the specific language * governing permissions and limitations of use of the software. This software is * distributed in conjunction with other software licensed under different terms. * See the separate licenses for those programs included in the distribution for the * permitted and restricted uses of such software. * */ package org.sca4j.binding.jms.runtime.host.standalone; import javax.jms.Connection; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.ServerSessionPool; import javax.jms.Session; import org.sca4j.binding.jms.common.SCA4JJmsException; import org.sca4j.binding.jms.common.TransactionType; import org.sca4j.binding.jms.runtime.JMSObjectFactory; import org.sca4j.binding.jms.runtime.ResponseMessageListener; import org.sca4j.binding.jms.runtime.tx.TransactionHandler; import org.sca4j.host.work.WorkScheduler; /** * * A container class used to support MessageListener with ServerSessionPool. * */ public class JMSMessageListenerInvoker implements MessageListener { /** Request JMS object factory*/ private JMSObjectFactory requestJMSObjectFactory = null; /** Response JMS object factory*/ private JMSObjectFactory responseJMSObjectFactory; /** ResponseMessageListenerImpl invoked by this invoker */ private ResponseMessageListener messageListener = null; /** Transaction Type */ private TransactionType transactionType; /** Transaction Handler*/ private TransactionHandler transactionHandler; /** WorkScheduler passed to serverSessionPool */ private WorkScheduler workScheduler; public JMSMessageListenerInvoker(JMSObjectFactory requestJMSObjectFactory, JMSObjectFactory responseJMSObjectFactory, ResponseMessageListener messageListener, TransactionType transactionType, TransactionHandler transactionHandler, WorkScheduler workScheduler) { this.requestJMSObjectFactory = requestJMSObjectFactory; this.responseJMSObjectFactory = responseJMSObjectFactory; this.messageListener = messageListener; this.transactionType = transactionType; this.transactionHandler = transactionHandler; this.workScheduler = workScheduler; } public void start(int receiverCount) { ServerSessionPool serverSessionPool = createServerSessionPool(receiverCount); try { Connection connection = requestJMSObjectFactory.getConnection(); connection.createConnectionConsumer(requestJMSObjectFactory .getDestination(), null, serverSessionPool, 1); connection.start(); } catch (JMSException e) { throw new SCA4JJmsException("Error when register Listener",e); } } private StandaloneServerSessionPool createServerSessionPool(int receiverCount) { return new StandaloneServerSessionPool(requestJMSObjectFactory, transactionHandler, this, transactionType,workScheduler,receiverCount); } public void stop() { requestJMSObjectFactory.close(); responseJMSObjectFactory.close(); } public void onMessage(Message message) { try { Session responseSession = responseJMSObjectFactory.createSession(); if (transactionType == TransactionType.GLOBAL) { transactionHandler.enlist(responseSession); } Destination responseDestination = responseJMSObjectFactory .getDestination(); messageListener.onMessage(message, responseSession, responseDestination); if (transactionType == TransactionType.GLOBAL) { transactionHandler.commit(); }else if(transactionType == TransactionType.LOCAL){ responseSession.commit(); } responseJMSObjectFactory.recycle(); } catch (JMSException e) { throw new SCA4JJmsException("Error when invoking Listener",e); } catch (RuntimeException e) { try{ if (transactionType == TransactionType.GLOBAL) { transactionHandler.rollback(); } }catch(Exception ne){ //ignore } throw e; } } }
[ "meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e" ]
meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e
9df1a7ceaa3480a79e294e3f6b6f8ed254008f38
471a1d9598d792c18392ca1485bbb3b29d1165c5
/jadx-MFP/src/main/java/com/myfitnesspal/feature/home/model/HeroCardTwoButtonLayout.java
d16c5b9305bbc6e5977dc1dc9714db936f6f7b5a
[]
no_license
reed07/MyPreferencePal
84db3a93c114868dd3691217cc175a8675e5544f
365b42fcc5670844187ae61b8cbc02c542aa348e
refs/heads/master
2020-03-10T23:10:43.112303
2019-07-08T00:39:32
2019-07-08T00:39:32
129,635,379
2
0
null
null
null
null
UTF-8
Java
false
false
934
java
package com.myfitnesspal.feature.home.model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class HeroCardTwoButtonLayout extends HeroCardLayoutBase { @SerializedName("button_deeplink_1") @Expose private String buttonDeeplink1; @SerializedName("button_deeplink_2") @Expose private String buttonDeeplink2; @SerializedName("button_text_1") @Expose private String buttonText1; @SerializedName("button_text_2") @Expose private String buttonText2; public boolean hasImage() { return false; } public String getButtonText1() { return this.buttonText1; } public String getButtonText2() { return this.buttonText2; } public String getButtonDeeplink1() { return this.buttonDeeplink1; } public String getButtonDeeplink2() { return this.buttonDeeplink2; } }
[ "anon@ymous.email" ]
anon@ymous.email
85cc787a3728c1b257ce62955708631580d000e6
0b637a01dfed1702c1e21ed6365bf505a4b006dc
/src/main/java/rx/operators/suppressing/TakeWhile.java
73f5b12cd2b9cfa8d35e436499cad6ac2c3896df
[]
no_license
ArekLopus/RxJavaTest
964b93d8ddf08e1151134a899934df7cfa2fed7b
83fa5759316838c001e4c9cc7d62cd6b11ee647f
refs/heads/master
2021-07-06T09:11:14.157305
2019-07-05T07:39:39
2019-07-05T07:39:39
195,362,560
0
0
null
2020-10-13T14:22:30
2019-07-05T07:39:10
Java
UTF-8
Java
false
false
727
java
package rx.operators.suppressing; import io.reactivex.Observable; //-Returns an Observable that emits items emitted by the source ObservableSource so long as each item satisfied a specified condition, // and then completes as soon as this condition is not satisfied. //-takeWhile does not operate by default on a particular Scheduler. public class TakeWhile { public TakeWhile() { Observable.just("One", "Two", "Three", "Four") .takeWhile(e -> e.length() < 4) .subscribe(s -> System.out.println(s + ", thread: " + Thread.currentThread().getName())); System.out.println("--- Main Thread Finished ---"); } public static void main(String[] args) { new TakeWhile(); } }
[ "abc@example.com" ]
abc@example.com
f6a2b2ed61a5499a90bda616b8d526f03b43bf05
5b7b57c14b91d3d578855abebae59549048b1fd9
/AppCommon/src/main/java/com/trade/eight/moudle/trade/activity/VoucherRuleAct.java
2318b4f0bbb7fa39cc807267f17f447a393d6faf
[]
no_license
xanhf/8yuan
8c4f50fa7c95ae5f0dfb282f67a7b1c39b0b4711
a8b7f351066f479b3bc8a6037036458008e1624c
refs/heads/master
2021-05-14T19:58:44.462393
2017-11-16T10:31:29
2017-11-16T10:31:55
114,601,135
0
0
null
null
null
null
UTF-8
Java
false
false
893
java
package com.trade.eight.moudle.trade.activity; import android.os.Bundle; import com.easylife.ten.lib.R; import com.trade.eight.base.BaseActivity; /** * Created by fangzhu on 16/6/24. */ public class VoucherRuleAct extends BaseActivity { private int from = FROMVOUCHER; public static final int FROMVOUCHER = 0;// 来着优惠券 public static final int FROMREDPACKET = 1;// 来自我的红包 @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); from = getIntent().getIntExtra("from", FROMVOUCHER); if (from == FROMVOUCHER) { setContentView(R.layout.act_voucher_rule); setAppCommonTitle("使用规则"); } else if (from == FROMREDPACKET) { setContentView(R.layout.act_redpacket_rule); setAppCommonTitle("红包说明"); } } }
[ "enricozhang@126.com" ]
enricozhang@126.com
56508e979c7db65a0a9ee5a6ddeece61a226900a
671daf60cdb46250214da19132bb7f21dbc29612
/android/src/com/android/tools/idea/res/AndroidClassWithOnlyInnerClassesBase.java
f27906a541816fae1a7377c260003b73e8d4fb71
[ "Apache-2.0" ]
permissive
JetBrains/android
3732f6fe3ae742182c2684a13ea8a1e6a996c9a1
9aa80ad909cf4b993389510e2c1efb09b8cdb5a0
refs/heads/master
2023-09-01T14:11:56.555718
2023-08-31T16:50:03
2023-08-31T16:53:27
60,701,247
947
255
Apache-2.0
2023-09-05T12:44:24
2016-06-08T13:46:48
Kotlin
UTF-8
Java
false
false
5,066
java
/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.tools.idea.res; import com.android.ide.common.resources.ResourceRepository; import com.google.common.base.Verify; import com.intellij.ide.highlighter.JavaFileType; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.ModificationTracker; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiClass; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiFileFactory; import com.intellij.psi.PsiJavaFile; import com.intellij.psi.PsiManager; import com.intellij.psi.PsiNameHelper; import com.intellij.psi.util.CachedValue; import com.intellij.psi.util.CachedValueProvider; import com.intellij.psi.util.CachedValuesManager; import java.util.Collection; import org.jetbrains.android.augment.AndroidLightClassBase; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** * Base class for light classes that only contain inner classes, like {@code R} or {@code Manifest}. */ public abstract class AndroidClassWithOnlyInnerClassesBase extends AndroidLightClassBase { private static final Logger LOG = Logger.getInstance(AndroidClassWithOnlyInnerClassesBase.class); @NotNull protected final CachedValue<PsiClass[]> myClassCache; @NotNull protected final String myShortName; @NotNull protected final PsiJavaFile myFile; @Nullable private final String myPackageName; public AndroidClassWithOnlyInnerClassesBase(@NotNull String shortName, @Nullable String packageName, @NotNull PsiManager psiManager, @NotNull Collection<String> modifiers) { super(psiManager, modifiers); Project project = getProject(); myShortName = shortName; myPackageName = packageName; myClassCache = CachedValuesManager.getManager(project).createCachedValue(() -> { if (LOG.isDebugEnabled()) { LOG.debug("Recomputing inner classes of " + this.getClass()); } PsiClass[] innerClasses = doGetInnerClasses(); ModificationTracker dependencies = getInnerClassesDependencies(); // When ResourceRepositoryManager's caches are dropped, new instances of repositories are created and the old ones // stop incrementing their modification count. We need to make sure the CachedValue doesn't hold on to any particular repository // instance and instead reads the modification count of the "current" instance. Verify.verify(!(dependencies instanceof ResourceRepository), "Resource repository leaked in a CachedValue."); return CachedValueProvider.Result.create(innerClasses, dependencies); }); PsiFileFactory factory = PsiFileFactory.getInstance(project); myFile = (PsiJavaFile)factory.createFileFromText(shortName + ".java", JavaFileType.INSTANCE, "// This class is generated on-the-fly by the IDE."); // We need to set the package name of the file, otherwise Util#checkReference will highlight all references to the class. This name is // sometimes shown in "quick documentation" for the R class itself, but is not considered when resolving references etc., where // getQualifiedName is what matters and needs to stay up-to-date with the manifest etc. if (packageName == null || !PsiNameHelper.getInstance(project).isQualifiedName(packageName)) { packageName = "_"; } myFile.setPackageName(packageName); } @Nullable public String getPackageName() { return myPackageName; } @NotNull protected abstract PsiClass[] doGetInnerClasses(); /** * Dependencies (as defined by {@link CachedValueProvider.Result#getDependencyItems()}) for the cached set of inner classes computed by * {@link #doGetInnerClasses()}. */ @NotNull protected abstract ModificationTracker getInnerClassesDependencies(); @Nullable @Override public final PsiClass getContainingClass() { return null; } @NotNull @Override public PsiClass[] getInnerClasses() { return myClassCache.getValue(); } @Override @NotNull public final String getName() { return myShortName; } @NotNull @Override public final PsiFile getContainingFile() { return myFile; } @Override public TextRange getTextRange() { return super.getTextRange(); } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
52b4a3a7e7938b3f33741964f4f37946c2f5764c
2b3e0c89b9ef2d01a1014723eb2659330f29c0c1
/Core Service Java Client/src/com/sdltridion/contentmanager/coreservice/_2012/ReClassify.java
9d9bc2a0f174a0f36e2865095f8c96c7535c0b1e
[]
no_license
mitza13/yet-another-tridion-blog
def0263f9797e62239956733da1682c2ebc08aec
a803ec3772d02dbfc76a21e7a5d44cc9ec87aac3
refs/heads/master
2021-01-20T04:28:52.805980
2018-04-06T14:54:57
2018-04-06T14:54:57
42,700,739
2
1
null
null
null
null
UTF-8
Java
false
false
4,024
java
package com.sdltridion.contentmanager.coreservice._2012; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import com.microsoft.schemas._2003._10.serialization.arrays.ArrayOfstring; import com.sdltridion.contentmanager.r6.ReadOptions; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;element name="keywordIdsToRemove" type="{http://schemas.microsoft.com/2003/10/Serialization/Arrays}ArrayOfstring" minOccurs="0"/> * &lt;element name="keywordIdsToAdd" type="{http://schemas.microsoft.com/2003/10/Serialization/Arrays}ArrayOfstring" minOccurs="0"/> * &lt;element name="readOptions" type="{http://www.sdltridion.com/ContentManager/R6}ReadOptions" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "id", "keywordIdsToRemove", "keywordIdsToAdd", "readOptions" }) @XmlRootElement(name = "ReClassify") public class ReClassify { @XmlElement(nillable = true) protected String id; @XmlElement(nillable = true) protected ArrayOfstring keywordIdsToRemove; @XmlElement(nillable = true) protected ArrayOfstring keywordIdsToAdd; @XmlElement(nillable = true) protected ReadOptions readOptions; /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the keywordIdsToRemove property. * * @return * possible object is * {@link ArrayOfstring } * */ public ArrayOfstring getKeywordIdsToRemove() { return keywordIdsToRemove; } /** * Sets the value of the keywordIdsToRemove property. * * @param value * allowed object is * {@link ArrayOfstring } * */ public void setKeywordIdsToRemove(ArrayOfstring value) { this.keywordIdsToRemove = value; } /** * Gets the value of the keywordIdsToAdd property. * * @return * possible object is * {@link ArrayOfstring } * */ public ArrayOfstring getKeywordIdsToAdd() { return keywordIdsToAdd; } /** * Sets the value of the keywordIdsToAdd property. * * @param value * allowed object is * {@link ArrayOfstring } * */ public void setKeywordIdsToAdd(ArrayOfstring value) { this.keywordIdsToAdd = value; } /** * Gets the value of the readOptions property. * * @return * possible object is * {@link ReadOptions } * */ public ReadOptions getReadOptions() { return readOptions; } /** * Sets the value of the readOptions property. * * @param value * allowed object is * {@link ReadOptions } * */ public void setReadOptions(ReadOptions value) { this.readOptions = value; } }
[ "mitza13@538b63c4-fdea-668c-0068-65d03cfa36e6" ]
mitza13@538b63c4-fdea-668c-0068-65d03cfa36e6
24f60535158231f05d7bf76c1cc7195dd643282f
d8eba63b264175d2ab82f237d324b94e95467bc8
/client/src/Class444.java
f3ea403b2e83c8dbee62535a05d4ae9f26c69515
[]
no_license
DukeCharles/revision-718-client
9eb164611d5ced1a3d35cf7ffeebc97582b4e7e5
f3d100436bdfed1001063d0dad54aa80f0742c14
refs/heads/main
2023-06-19T08:38:17.328798
2021-07-21T02:32:47
2021-07-21T02:32:47
387,969,320
0
0
null
null
null
null
UTF-8
Java
false
false
1,919
java
/* Class444 - Decompiled by JODE * Visit http://jode.sourceforge.net/ */ import java.io.IOException; public class Class444 { public static Class444 aClass444_5602; public static Class444 aClass444_5603; public static Class444 aClass444_5604 = new Class444("LIVE", 0); public static Class444 aClass444_5605; static Class444 aClass444_5606; public String aString5607; public int anInt5608; static { aClass444_5603 = new Class444("BUILDLIVE", 3); aClass444_5602 = new Class444("RC", 1); aClass444_5605 = new Class444("WIP", 2); aClass444_5606 = new Class444("INTBETA", 4); } Class444(String string, int i) { aString5607 = string; anInt5608 = i * -1854515921; } public static Class444 method5888(int i, byte i_0_) { try { Class444[] class444s = Class408.method4965((byte) 16); for (int i_1_ = 0; i_1_ < class444s.length; i_1_++) { Class444 class444 = class444s[i_1_]; if (i == class444.anInt5608 * 1286017487) return class444; } return null; } catch (RuntimeException runtimeexception) { throw Class346.method4175(runtimeexception, new StringBuilder().append("si.f(").append(')').toString()); } } public static void executeScript(ScriptEnvironment script) { try { Class203.method1908(script, 200000, (short) 3156); } catch (RuntimeException runtimeexception) { throw Class346.method4175(runtimeexception, new StringBuilder().append("si.b(").append(')').toString()); } } static void method5890(byte i) { try { if (Class78.aFileOutputStream731 != null) { try { Class78.aFileOutputStream731.close(); } catch (IOException ioexception) { /* empty */ } } Class78.aFileOutputStream731 = null; } catch (RuntimeException runtimeexception) { throw Class346.method4175(runtimeexception, new StringBuilder().append("si.i(").append(')').toString()); } } }
[ "charles.simon.morin@gmail.com" ]
charles.simon.morin@gmail.com
ccddbc5f2c0a6864710bae5a45f2ca5dc4adf9be
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/google/android/gms/internal/measurement/zzja.java
da619cba7535847f9a569ef903d78721c2e7157d
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
693
java
package com.google.android.gms.internal.measurement; import android.content.ComponentName; import com.tencent.matrix.trace.core.AppMethodBeat; final class zzja implements Runnable { zzja(zziw paramzziw) { } public final void run() { AppMethodBeat.i(69345); zzii.zza(this.zzapn.zzape, new ComponentName(this.zzapn.zzape.getContext(), "com.google.android.gms.measurement.AppMeasurementService")); AppMethodBeat.o(69345); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes4-dex2jar.jar * Qualified Name: com.google.android.gms.internal.measurement.zzja * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
d044a7c62134fe9dee5da50c16708efe580e0019
e50bfd98f7e1273a2471a3342a7480d4fdf5daeb
/src/main/java/ru/m2mcom/redtree/config/SecurityConfiguration.java
d05b98668e30cc3e144221dba445d088d9d3e43f
[]
no_license
BulkSecurityGeneratorProject/RedTree
6480df36cf4a63785194046890573df0cd222489
704eb1d42cf70e3fd61a42c5892e5fa6647137bb
refs/heads/master
2022-12-17T10:44:03.526613
2017-07-28T15:16:16
2017-07-28T15:16:16
296,523,324
0
0
null
2020-09-18T05:32:33
2020-09-18T05:32:33
null
UTF-8
Java
false
false
5,070
java
package ru.m2mcom.redtree.config; import ru.m2mcom.redtree.security.*; import ru.m2mcom.redtree.security.jwt.*; import io.github.jhipster.security.*; import org.springframework.beans.factory.BeanInitializationException; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.security.data.repository.query.SecurityEvaluationContextExtension; import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; import org.springframework.web.filter.CorsFilter; import javax.annotation.PostConstruct; @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) public class SecurityConfiguration extends WebSecurityConfigurerAdapter { private final AuthenticationManagerBuilder authenticationManagerBuilder; private final UserDetailsService userDetailsService; private final TokenProvider tokenProvider; private final CorsFilter corsFilter; public SecurityConfiguration(AuthenticationManagerBuilder authenticationManagerBuilder, UserDetailsService userDetailsService, TokenProvider tokenProvider, CorsFilter corsFilter) { this.authenticationManagerBuilder = authenticationManagerBuilder; this.userDetailsService = userDetailsService; this.tokenProvider = tokenProvider; this.corsFilter = corsFilter; } @PostConstruct public void init() { try { authenticationManagerBuilder .userDetailsService(userDetailsService) .passwordEncoder(passwordEncoder()); } catch (Exception e) { throw new BeanInitializationException("Security configuration failed", e); } } @Bean public Http401UnauthorizedEntryPoint http401UnauthorizedEntryPoint() { return new Http401UnauthorizedEntryPoint(); } @Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } @Override public void configure(WebSecurity web) throws Exception { web.ignoring() .antMatchers(HttpMethod.OPTIONS, "/**") .antMatchers("/app/**/*.{js,html}") .antMatchers("/i18n/**") .antMatchers("/content/**") .antMatchers("/swagger-ui/index.html") .antMatchers("/test/**") .antMatchers("/h2-console/**"); } @Override protected void configure(HttpSecurity http) throws Exception { http .addFilterBefore(corsFilter, UsernamePasswordAuthenticationFilter.class) .exceptionHandling() .authenticationEntryPoint(http401UnauthorizedEntryPoint()) .and() .csrf() .disable() .headers() .frameOptions() .disable() .and() .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .authorizeRequests() .antMatchers("/api/register").permitAll() .antMatchers("/api/activate").permitAll() .antMatchers("/api/authenticate").permitAll() .antMatchers("/api/account/reset_password/init").permitAll() .antMatchers("/api/account/reset_password/finish").permitAll() .antMatchers("/api/profile-info").permitAll() .antMatchers("/api/**").authenticated() .antMatchers("/management/health").permitAll() .antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN) .antMatchers("/v2/api-docs/**").permitAll() .antMatchers("/swagger-resources/configuration/ui").permitAll() .antMatchers("/swagger-ui/index.html").hasAuthority(AuthoritiesConstants.ADMIN) .and() .apply(securityConfigurerAdapter()); } private JWTConfigurer securityConfigurerAdapter() { return new JWTConfigurer(tokenProvider); } @Bean public SecurityEvaluationContextExtension securityEvaluationContextExtension() { return new SecurityEvaluationContextExtension(); } }
[ "alexr@nr-online.com" ]
alexr@nr-online.com
cccd3b7b058af227e55b884509a031534f889cfb
4b8b83e997c046771c2ba8949d1f8744958e36e9
/app/src/main/java/jadx/core/dex/visitors/regions/ProcessTryCatchRegions.java
683eea50ff91bf40de4a7522d3d160e5206f6842
[ "Apache-2.0", "LicenseRef-scancode-free-unknown" ]
permissive
vaginessa/show-java
978fcf3cfc5e875e3f5f81ad9e47ceb2d60b2dc2
31f540fb9e13a74e0a0ead27715888f022bff14c
refs/heads/master
2021-01-18T04:09:53.521444
2015-12-09T20:58:32
2015-12-09T20:58:32
42,273,420
0
0
Apache-2.0
2019-01-18T07:06:51
2015-09-10T22:12:08
Java
UTF-8
Java
false
false
5,676
java
package jadx.core.dex.visitors.regions; import jadx.core.dex.attributes.AType; import jadx.core.dex.nodes.BlockNode; import jadx.core.dex.nodes.IBranchRegion; import jadx.core.dex.nodes.IContainer; import jadx.core.dex.nodes.IRegion; import jadx.core.dex.nodes.MethodNode; import jadx.core.dex.regions.AbstractRegion; import jadx.core.dex.regions.Region; import jadx.core.dex.regions.TryCatchRegion; import jadx.core.dex.regions.loops.LoopRegion; import jadx.core.dex.trycatch.CatchAttr; import jadx.core.dex.trycatch.ExceptionHandler; import jadx.core.dex.trycatch.SplitterBlockAttr; import jadx.core.dex.trycatch.TryCatchBlock; import jadx.core.utils.BlockUtils; import jadx.core.utils.ErrorsCounter; import jadx.core.utils.RegionUtils; import jadx.core.utils.exceptions.JadxRuntimeException; import java.util.BitSet; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Extract blocks to separate try/catch region */ public class ProcessTryCatchRegions extends AbstractRegionVisitor { private static final Logger LOG = LoggerFactory.getLogger(ProcessTryCatchRegions.class); public static void process(MethodNode mth) { if (mth.isNoCode() || mth.isNoExceptionHandlers()) { return; } final Map<BlockNode, TryCatchBlock> tryBlocksMap = new HashMap<BlockNode, TryCatchBlock>(2); searchTryCatchDominators(mth, tryBlocksMap); IRegionIterativeVisitor visitor = new IRegionIterativeVisitor() { @Override public boolean visitRegion(MethodNode mth, IRegion region) { boolean changed = checkAndWrap(mth, tryBlocksMap, region); return changed && !tryBlocksMap.isEmpty(); } }; DepthRegionTraversal.traverseIncludingExcHandlers(mth, visitor); } private static void searchTryCatchDominators(MethodNode mth, Map<BlockNode, TryCatchBlock> tryBlocksMap) { Set<TryCatchBlock> tryBlocks = new HashSet<TryCatchBlock>(); // collect all try/catch blocks for (BlockNode block : mth.getBasicBlocks()) { CatchAttr c = block.get(AType.CATCH_BLOCK); if (c != null) { tryBlocks.add(c.getTryBlock()); } } // for each try block search nearest dominator block for (TryCatchBlock tb : tryBlocks) { if (tb.getHandlersCount() == 0) { LOG.warn("No exception handlers in catch block, method: {}", mth); continue; } BitSet bs = new BitSet(mth.getBasicBlocks().size()); for (ExceptionHandler excHandler : tb.getHandlers()) { SplitterBlockAttr splitter = excHandler.getHandlerBlock().get(AType.SPLITTER_BLOCK); if (splitter != null) { BlockNode block = splitter.getBlock(); bs.set(block.getId()); } } List<BlockNode> domBlocks = BlockUtils.bitSetToBlocks(mth, bs); BlockNode domBlock; if (domBlocks.size() != 1) { domBlock = BlockUtils.getTopBlock(domBlocks); if (domBlock == null) { throw new JadxRuntimeException( "Exception block dominator not found, method:" + mth + ". bs: " + domBlocks); } } else { domBlock = domBlocks.get(0); } TryCatchBlock prevTB = tryBlocksMap.put(domBlock, tb); if (prevTB != null) { ErrorsCounter.methodError(mth, "Failed to process nested try/catch"); } } } private static boolean checkAndWrap(MethodNode mth, Map<BlockNode, TryCatchBlock> tryBlocksMap, IRegion region) { // search dominator blocks in this region (don't need to go deeper) for (Map.Entry<BlockNode, TryCatchBlock> entry : tryBlocksMap.entrySet()) { BlockNode dominator = entry.getKey(); if (region.getSubBlocks().contains(dominator)) { TryCatchBlock tb = tryBlocksMap.get(dominator); if (!wrapBlocks(region, tb, dominator)) { ErrorsCounter.methodError(mth, "Can't wrap try/catch for " + region); } tryBlocksMap.remove(dominator); return true; } } return false; } /** * Extract all block dominated by 'dominator' to separate region and mark as try/catch block */ private static boolean wrapBlocks(IRegion replaceRegion, TryCatchBlock tb, BlockNode dominator) { if (replaceRegion == null) { return false; } if (replaceRegion instanceof LoopRegion) { LoopRegion loop = (LoopRegion) replaceRegion; return wrapBlocks(loop.getBody(), tb, dominator); } if (replaceRegion instanceof IBranchRegion) { return wrapBlocks(replaceRegion.getParent(), tb, dominator); } Region tryRegion = new Region(replaceRegion); List<IContainer> subBlocks = replaceRegion.getSubBlocks(); for (IContainer cont : subBlocks) { if (RegionUtils.hasPathThroughBlock(dominator, cont)) { if (isHandlerPath(tb, cont)) { break; } tryRegion.getSubBlocks().add(cont); } } if (tryRegion.getSubBlocks().isEmpty()) { return false; } TryCatchRegion tryCatchRegion = new TryCatchRegion(replaceRegion, tryRegion); tryRegion.setParent(tryCatchRegion); tryCatchRegion.setTryCatchBlock(tb.getCatchAttr().getTryBlock()); // replace first node by region IContainer firstNode = tryRegion.getSubBlocks().get(0); if (!replaceRegion.replaceSubBlock(firstNode, tryCatchRegion)) { return false; } subBlocks.removeAll(tryRegion.getSubBlocks()); // fix parents for tryRegion sub blocks for (IContainer cont : tryRegion.getSubBlocks()) { if (cont instanceof AbstractRegion) { AbstractRegion aReg = (AbstractRegion) cont; aReg.setParent(tryRegion); } } return true; } private static boolean isHandlerPath(TryCatchBlock tb, IContainer cont) { for (ExceptionHandler h : tb.getHandlers()) { if (RegionUtils.hasPathThroughBlock(h.getHandlerBlock(), cont)) { return true; } } return false; } }
[ "niranjan94@yahoo.com" ]
niranjan94@yahoo.com
21a5b5387d4b911fd9201922f03bdb86caad8c2b
1809008250f9383b72c2ac24e2e384bae69419e1
/src/main/java/org/kordamp/jsr377/converter/DateConverter.java
c408d37c0da60d02b4cd56c197af6ed5b1efe3fe
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
tschulte/jsr377-converters
9ebb4323547bd0f7549cf3a1a7601ce4fda041ac
108ce2bd9a0c93398be66e16bab4adccf70dd539
refs/heads/master
2020-03-30T04:44:00.709233
2018-09-28T13:40:57
2018-09-28T13:40:57
150,759,373
0
0
Apache-2.0
2018-09-28T15:21:05
2018-09-28T15:21:05
null
UTF-8
Java
false
false
2,724
java
/* * Copyright 2015-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.kordamp.jsr377.converter; import org.kordamp.jsr377.formatter.DateFormatter; import org.kordamp.jsr377.formatter.Formatter; import javax.application.converter.ConversionException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Calendar; import java.util.Date; /** * @author Andres Almiray */ public class DateConverter extends AbstractFormattingConverter<Date> { @Override protected Date convertFromObject(Object value) throws ConversionException { if (null == value) { return null; } else if (value instanceof CharSequence) { return convertFromString(String.valueOf(value).trim()); } else if (value instanceof LocalDate) { return convertFromLocalDate((LocalDate) value); } else if (value instanceof LocalDateTime) { return convertFromLocalDate(((LocalDateTime) value).toLocalDate()); } else if (value instanceof Date) { return (Date) value; } else if (value instanceof Calendar) { return ((Calendar) value).getTime(); } else if (value instanceof Number) { return new Date(((Number) value).longValue()); } else { throw illegalValue(value, Date.class); } } protected Date convertFromString(String str) { if (isBlank(str)) { return null; } try { return new Date(Long.parseLong(str)); } catch (NumberFormatException nfe) { // ignore, let's try parsing the date in a locale specific format } try { return new SimpleDateFormat().parse(str); } catch (ParseException e) { throw illegalValue(str, Date.class, e); } } protected Date convertFromLocalDate(LocalDate value) { return new Date(value.toEpochDay()); } @Override protected Formatter<Date> resolveFormatter(String format) { return isBlank(format) ? null : new DateFormatter(format); } }
[ "aalmiray@gmail.com" ]
aalmiray@gmail.com
af21ae8f58a1cea8b66f80d127ab10a61942390a
cb4a7d111ca44fa127c994781fbaab83526ec4e9
/gainde-demo/gainde-integral-ejb/gainde-integral-ressources/gainde-integral-rc-ejb/src/main/java/sn/com/douane/ejb/rc/model/daoImpl/OperateurDaoImpl.java
190a32e71b677c38d3b5b3e518de4143dca9349f
[]
no_license
jasmineconseil/applicationBlanche
56d6493cdf68ae870ddd3584dbc1d4e95df6f402
a23247ec783d9cb856c538aacb20f76c6eed5307
refs/heads/master
2020-12-26T00:06:23.151181
2014-03-11T11:07:03
2014-03-11T11:07:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
319
java
package sn.com.douane.ejb.rc.model.daoImpl; import javax.ejb.Stateless; import sn.com.douane.ejb.rc.model.dao.IOperateurDao; import sn.com.douane.ejb.rc.model.entities.Operateur; @Stateless(name="IOperateurDao") public class OperateurDaoImpl extends GenericDaoImpl<Operateur> implements IOperateurDao{ }
[ "contact@jasforge.com" ]
contact@jasforge.com
8554534b73e9838d8ce41209b269a8aef04ee142
f9450dc88cbd160e47895f9f0bad0932aa81c7b3
/src/java/main/org/apache/zookeeper/server/quorum/RemotePeerBean.java
cd94eeb0ff48fa6bf9cfaa89721102f3dcd59018
[ "Apache-2.0" ]
permissive
2395383177/zookeeper-release-3.4.6
5e44825ea994597cd9264c0879742d9d59b14d32
cb54a6326cf56459e76282ade0a47ffd5715b96f
refs/heads/master
2022-03-18T15:18:56.699663
2019-12-01T03:03:44
2019-12-01T03:03:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,593
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.zookeeper.server.quorum; import org.apache.zookeeper.jmx.ZKMBeanInfo; import org.apache.zookeeper.server.quorum.QuorumPeer; /** * A remote peer bean only provides limited information about the remote peer, * and the peer cannot be managed remotely. * 远程选举Mbean */ public class RemotePeerBean implements RemotePeerMXBean,ZKMBeanInfo { private QuorumPeer.QuorumServer peer; public RemotePeerBean(QuorumPeer.QuorumServer peer){ this.peer=peer; } @Override public String getName() { return "replica."+peer.id; } @Override public boolean isHidden() { return false; } @Override public String getQuorumAddress() { return peer.addr.getHostName()+":"+peer.addr.getPort(); } }
[ "chenhaiyang@ruubypay.com" ]
chenhaiyang@ruubypay.com
bb4377c74dc0f68444134e6d2d74f31eefbe9678
842857cb89ecc4a5f0ef0323e652aa4c90e347a4
/pos/trabalhos/web/fiapbank/fiapbank-persistencia/src/main/java/br/com/fiapbank/persistencia/dao/FuncionarioDao.java
6168f5160b42f3a1653af03d272f6c9664d307e1
[]
no_license
r3wa/my-studies
964fde36f7c35ef7c7974f7a535a22f557344b5c
65197c11e62189158021d00209dcc9c9ae1f482c
refs/heads/master
2020-12-11T07:17:29.496206
2013-07-30T11:51:29
2013-07-30T11:51:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
611
java
/** * */ package br.com.fiapbank.persistencia.dao; import br.com.fiapbank.dominio.Funcionario; /** * @author robson.oliveira * */ public interface FuncionarioDao extends GenericaDao<Funcionario> { /** * Retorna o funcionario autenticado através da senha e login * * * @param funcionario {@link Funcionario} a ser autenticado * @return {@link Funcionario} autenticado da base ou null caso autenticacao falhe * @throws DaoException quando ocorre algum erro no banco */ public Funcionario getFuncionarioAutenticado(Funcionario funcionario)throws DaoException; }
[ "robson.o.d@e9df6f47-f091-bbda-6991-b925dddbb531" ]
robson.o.d@e9df6f47-f091-bbda-6991-b925dddbb531
5af2562f6954388a4a85d8a30c54107e036a5499
708dc80c41814b3590ceaf582bd32c63aa006e04
/juneau-microservice/juneau-microservice-test/src/test/java/org/apache/juneau/rest/test/TestMicroservice.java
517a9314853a5e71ccac1af67eaea11845f40f66
[ "Apache-2.0" ]
permissive
shalithasuranga/juneau
bbb60c443062cee659c9061ad29e8924db9e0a50
77e48588b6175b881f591379d58e5d890d430523
refs/heads/master
2020-04-04T10:15:15.149584
2018-11-06T06:33:32
2018-11-06T06:33:32
155,848,126
0
1
Apache-2.0
2018-11-06T06:33:33
2018-11-02T10:05:07
Java
UTF-8
Java
false
false
6,472
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.juneau.rest.test; import java.io.*; import java.net.*; import java.security.*; import java.util.*; import javax.net.ssl.*; import org.apache.http.*; import org.apache.http.client.*; import org.apache.http.conn.ssl.*; import org.apache.http.impl.client.*; import org.apache.http.protocol.*; import org.apache.juneau.internal.*; import org.apache.juneau.microservice.*; import org.apache.juneau.parser.*; import org.apache.juneau.rest.client.*; import org.apache.juneau.serializer.*; /** * Utility class for starting up the tests microservice. * @author james.bognar */ public class TestMicroservice { static RestMicroservice microservice; static URI microserviceURI; // Reusable HTTP clients that get created and shut down with the microservice. public static RestClient DEFAULT_CLIENT, DEFAULT_CLIENT_DEBUG; public static RestClient DEFAULT_CLIENT_PLAINTEXT; /** * Starts the microservice. * @return <jk>true</jk> if the service started, <jk>false</jk> if it's already started. * If this returns <jk>false</jk> then don't call stopMicroservice()!. */ public static boolean startMicroservice() { if (microservice != null) return false; try { Locale.setDefault(Locale.US); microservice = new RestMicroservice() .setConfig("juneau-microservice-test.cfg", false) .setManifestContents( "Test-Entry: test-value" ); microserviceURI = microservice.start().getURI(); DEFAULT_CLIENT = client().json().build(); DEFAULT_CLIENT_DEBUG = client().json().debug().build(); DEFAULT_CLIENT_PLAINTEXT = client().plainText().build(); return true; } catch (Throwable e) { System.err.println(e); // NOT DEBUG return false; } } /** * Returns the URI of the microservice. * @return The URI of the microservice. */ public static URI getURI() { if (microservice == null) startMicroservice(); return microserviceURI; } /** * Stops the microservice. */ public static void stopMicroservice() { try { microservice.stop(); microservice = null; DEFAULT_CLIENT.closeQuietly(); DEFAULT_CLIENT_PLAINTEXT.closeQuietly(); } catch (Exception e) { System.err.println(e); // NOT DEBUG } } /** * Create a new HTTP client. */ public static RestClientBuilder client() { try { final RequestLine[] currentRequest = new RequestLine[1]; final StatusLine[] currentResponse = new StatusLine[1]; return RestClient.create() .json() .rootUrl(microserviceURI) .retryHandler( new HttpRequestRetryHandler() { @Override public boolean retryRequest(IOException exception, int executionCount, HttpContext context) { System.err.println("*** ERROR ***"); TestMicroservice.jettyDump(currentRequest[0], currentResponse[0]); return (executionCount < 3); } } ) .addInterceptorFirst(new org.apache.http.HttpRequestInterceptor() { @Override public void process(HttpRequest r, HttpContext c) throws HttpException, IOException { currentRequest[0] = r.getRequestLine(); } }) .addInterceptorFirst(new org.apache.http.HttpResponseInterceptor() { @Override public void process(HttpResponse r, HttpContext c) throws HttpException, IOException { currentResponse[0] = r.getStatusLine(); } }) .noTrace() ; } catch (Exception e) { throw new RuntimeException(e); } } /** * Create a new HTTP client using the specified serializer and parser. */ public static RestClientBuilder client(Serializer s, Parser p) { return client().serializer(s).parser(p); } /** * Create a new HTTP client using the specified serializer and parser. */ public static RestClientBuilder client(Class<? extends Serializer> s, Class<? extends Parser> p) { return client().serializer(s).parser(p); } // TODO - Why is this needed? static SSLConnectionSocketFactory getSSLSocketFactory() throws Exception { SSLContext sslContext = SSLContext.getInstance("SSL"); TrustManager tm = new SimpleX509TrustManager(true); sslContext.init(null, new TrustManager[]{tm}, new SecureRandom()); return new SSLConnectionSocketFactory(sslContext, new NoopHostnameVerifier()); } public static CloseableHttpClient createHttpClient() { try { return HttpClients.custom().setSSLSocketFactory(getSSLSocketFactory()).setRedirectStrategy(new LaxRedirectStrategy()).build(); } catch (Exception e) { throw new RuntimeException(e); } } private static int dumpCount = 0; public static void jettyDump(RequestLine rl, StatusLine sl) { try { String dump = microservice.getServer().dump(); FileWriter fw = new FileWriter(microservice.getConfig().getString("Logging/logDir") + "/jetty-thread-dump-"+(dumpCount++)+".log"); fw.append("RequestLine = [" + rl + "]\n"); fw.append("StatusLine = [" + sl + "]\n"); IOUtils.pipe(dump, fw); fw.flush(); fw.close(); } catch (Exception e) { e.printStackTrace(); } } }
[ "jamesbognar@apache.org" ]
jamesbognar@apache.org
13e14b0e7d91986ed88b91d941c81f8a4798be42
d85eea278f53c2d60197a0b479c074b5a52bdf1e
/Services/msk-so-cash-pooling/src/main/java/com/msk/so/bean/ISO151416ReceiveInfoRestResult.java
e29002d375abdc227debbd9aab80e0212449eb12
[]
no_license
YuanChenM/xcdv1.5
baeaab6e566236d0f3e170ceae186b6d2999c989
77bf0e90102f5704fe186140e1792396b7ade91d
refs/heads/master
2021-05-26T04:51:12.441499
2017-08-14T03:06:07
2017-08-14T03:06:07
100,221,981
1
2
null
null
null
null
UTF-8
Java
false
false
1,844
java
package com.msk.so.bean; import com.msk.core.entity.BaseEntity; /** * 订单明细查询接口Result * * @author li_huiqian * @version 1.0 */ public class ISO151416ReceiveInfoRestResult extends BaseEntity { private static final long serialVersionUID = 4570294248353861876L; /** 收货地址省份 */ private String receiverProvince; /** 收货地址市 */ private String receiverCity; /** 收货地址区 */ private String receiverDistrict; /** 收货人详细地址 */ private String receiverAddr; /** 备注 */ private String remark; /** 备注2 */ private String remark2; /** 备注3 */ private String remark3; /** 备注4 */ private String remark4; public String getReceiverProvince() { return receiverProvince; } public void setReceiverProvince(String receiverProvince) { this.receiverProvince = receiverProvince; } public String getReceiverCity() { return receiverCity; } public void setReceiverCity(String receiverCity) { this.receiverCity = receiverCity; } public String getReceiverDistrict() { return receiverDistrict; } public void setReceiverDistrict(String receiverDistrict) { this.receiverDistrict = receiverDistrict; } public String getReceiverAddr() { return receiverAddr; } public void setReceiverAddr(String receiverAddr) { this.receiverAddr = receiverAddr; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getRemark2() { return remark2; } public void setRemark2(String remark2) { this.remark2 = remark2; } public String getRemark3() { return remark3; } public void setRemark3(String remark3) { this.remark3 = remark3; } public String getRemark4() { return remark4; } public void setRemark4(String remark4) { this.remark4 = remark4; } }
[ "yuan_chen1@hoperun.com" ]
yuan_chen1@hoperun.com
9cf2b502e9169a15109380dc51534e58b78faa84
6e47715760eec5e49af7aa631a8aa879913b4520
/app/src/cn/dressbook/ui/zxing/Contents.java
2aeb07bdc5933068d0c966b72d25eedfd96eb140
[]
no_license
yuandonghua/DressBook
65db02eb77a7e2fc9a56a2c700ad7ed89e5fbf42
f2870142e3bdcab003fc48ef90d84619d3991174
refs/heads/master
2021-01-17T18:21:18.076691
2016-09-19T14:21:32
2016-09-19T14:21:32
68,613,330
1
1
null
null
null
null
UTF-8
Java
false
false
3,194
java
package cn.dressbook.ui.zxing; import android.provider.ContactsContract; /** * The set of constants to use when sending Barcode Scanner an Intent which requests a barcode * to be encoded. * * @author dswitkin@google.com (Daniel Switkin) */ public final class Contents { private Contents() { } public static final class Type { /** * Plain text. Use Intent.putExtra(DATA, string). This can be used for URLs too, but string * must include "http://" or "https://". */ public static final String TEXT = "TEXT_TYPE"; /** * An email type. Use Intent.putExtra(DATA, string) where string is the email address. */ public static final String EMAIL = "EMAIL_TYPE"; /** * Use Intent.putExtra(DATA, string) where string is the phone number to call. */ public static final String PHONE = "PHONE_TYPE"; /** * An SMS type. Use Intent.putExtra(DATA, string) where string is the number to SMS. */ public static final String SMS = "SMS_TYPE"; /** * A contact. Send a request to encode it as follows: * {@code * import android.provider.Contacts; * * Intent intent = new Intent(Intents.Encode.ACTION); * intent.putExtra(Intents.Encode.TYPE, CONTACT); * Bundle bundle = new Bundle(); * bundle.putString(ContactsContract.Intents.Insert.NAME, "Jenny"); * bundle.putString(ContactsContract.Intents.Insert.PHONE, "8675309"); * bundle.putString(ContactsContract.Intents.Insert.EMAIL, "jenny@the80s.com"); * bundle.putString(ContactsContract.Intents.Insert.POSTAL, "123 Fake St. San Francisco, CA 94102"); * intent.putExtra(Intents.Encode.DATA, bundle); * } */ public static final String CONTACT = "CONTACT_TYPE"; /** * A geographic location. Use as follows: * Bundle bundle = new Bundle(); * bundle.putFloat("LAT", latitude); * bundle.putFloat("LONG", longitude); * intent.putExtra(Intents.Encode.DATA, bundle); */ public static final String LOCATION = "LOCATION_TYPE"; private Type() { } } public static final String URL_KEY = "URL_KEY"; public static final String NOTE_KEY = "NOTE_KEY"; /** * When using Type.CONTACT, these arrays provide the keys for adding or retrieving multiple * phone numbers and addresses. */ public static final String[] PHONE_KEYS = { ContactsContract.Intents.Insert.PHONE, ContactsContract.Intents.Insert.SECONDARY_PHONE, ContactsContract.Intents.Insert.TERTIARY_PHONE }; public static final String[] PHONE_TYPE_KEYS = { ContactsContract.Intents.Insert.PHONE_TYPE, ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE, ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE }; public static final String[] EMAIL_KEYS = { ContactsContract.Intents.Insert.EMAIL, ContactsContract.Intents.Insert.SECONDARY_EMAIL, ContactsContract.Intents.Insert.TERTIARY_EMAIL }; public static final String[] EMAIL_TYPE_KEYS = { ContactsContract.Intents.Insert.EMAIL_TYPE, ContactsContract.Intents.Insert.SECONDARY_EMAIL_TYPE, ContactsContract.Intents.Insert.TERTIARY_EMAIL_TYPE }; }
[ "1348474384@qq.com" ]
1348474384@qq.com
be6bd102d17824393e8aeb89b986b4f700d350f7
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_1c63da7700e783e79f03a9710110c02e61197cc5/MetaBugsListPage/7_1c63da7700e783e79f03a9710110c02e61197cc5_MetaBugsListPage_s.java
6c8059793191cf387257179d976b0923c0ced181
[]
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,418
java
/* * Copyright (C) 2010 BloatIt. This file is part of BloatIt. BloatIt is free * software: you can redistribute it and/or modify it under the terms of the GNU * Affero General Public License as published by the Free Software Foundation, * either version 3 of the License, or (at your option) any later version. * BloatIt 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 Affero General Public License for more * details. You should have received a copy of the GNU Affero General Public * License along with BloatIt. If not, see <http://www.gnu.org/licenses/>. */ package com.bloatit.web.linkable.metabugreport; import static com.bloatit.framework.webserver.Context.tr; import java.util.List; import com.bloatit.framework.exceptions.highlevel.ShallNotPassException; import com.bloatit.framework.exceptions.lowlevel.RedirectException; import com.bloatit.framework.exceptions.lowlevel.UnauthorizedOperationException; import com.bloatit.framework.meta.MetaBug; import com.bloatit.framework.meta.MetaBugManager; import com.bloatit.framework.webserver.Context; import com.bloatit.framework.webserver.annotations.ParamContainer; import com.bloatit.framework.webserver.components.HtmlDiv; import com.bloatit.framework.webserver.components.HtmlLink; import com.bloatit.framework.webserver.components.HtmlRenderer; import com.bloatit.framework.webserver.components.HtmlSpan; import com.bloatit.framework.webserver.components.HtmlTitleBlock; import com.bloatit.framework.webserver.components.advanced.HtmlClearer; import com.bloatit.framework.webserver.components.meta.XmlNode; import com.bloatit.framework.webserver.components.renderer.HtmlMarkdownRenderer; import com.bloatit.model.Member; import com.bloatit.web.HtmlTools; import com.bloatit.web.linkable.members.MembersTools; import com.bloatit.web.pages.IndexPage; import com.bloatit.web.pages.master.Breadcrumb; import com.bloatit.web.pages.master.MasterPage; import com.bloatit.web.pages.master.TwoColumnLayout; import com.bloatit.web.url.MemberPageUrl; import com.bloatit.web.url.MembersListPageUrl; import com.bloatit.web.url.MetaBugDeleteActionUrl; import com.bloatit.web.url.MetaBugEditPageUrl; import com.bloatit.web.url.MetaBugsListPageUrl; @ParamContainer("meta/bug/list") public final class MetaBugsListPage extends MasterPage { private final MetaBugsListPageUrl url; public MetaBugsListPage(final MetaBugsListPageUrl url) { super(url); this.url = url; } @Override protected void doCreate() throws RedirectException { final TwoColumnLayout layout = new TwoColumnLayout(true); final HtmlTitleBlock pageTitle = new HtmlTitleBlock("Bugs list", 1); List<MetaBug> bugList = MetaBugManager.getOpenBugs(); for(MetaBug bug: bugList) { HtmlDiv bugBox = new HtmlDiv("meta_bug_box"); HtmlDiv editBox = new HtmlDiv("float_right"); bugBox.add(editBox); bugBox.add(new HtmlMarkdownRenderer(bug.getDescription())); editBox.add(new MetaBugEditPageUrl(bug.getId()).getHtmlLink(tr("edit"))); editBox.addText(" - "); editBox.add(new MetaBugDeleteActionUrl(bug.getId()).getHtmlLink(tr("delete"))); pageTitle.add(bugBox); } layout.addLeft(pageTitle); layout.addRight(new SideBarBugReportBlock(url)); add(layout); } @Override protected String getPageTitle() { return "Members list"; } @Override public boolean isStable() { return true; } private final class MemberRenderer implements HtmlRenderer<Member> { public MemberRenderer() { } @Override public XmlNode generate(final Member member) { final MemberPageUrl memberUrl = new MemberPageUrl(member); try { final HtmlDiv box = new HtmlDiv("member_box"); box.add(new HtmlDiv("float_right").add(MembersTools.getMemberAvatar(member))); final HtmlDiv textBox = new HtmlDiv("member_text"); HtmlLink htmlLink; htmlLink = memberUrl.getHtmlLink(member.getDisplayName()); final HtmlSpan karma = new HtmlSpan("karma"); karma.addText(HtmlTools.compressKarma(member.getKarma())); textBox.add(htmlLink); textBox.add(karma); box.add(textBox); box.add(new HtmlClearer()); return box; } catch (final UnauthorizedOperationException e) { session.notifyError(Context.tr("An error prevented us from displaying user information. Please notify us.")); throw new ShallNotPassException("User cannot access user information", e); } } } @Override protected Breadcrumb getBreadcrumb() { return MetaBugsListPage.generateBreadcrumb(); } public static Breadcrumb generateBreadcrumb() { final Breadcrumb breadcrumb = IndexPage.generateBreadcrumb(); breadcrumb.pushLink(new MembersListPageUrl().getHtmlLink(tr("Members"))); return breadcrumb; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
d2304b75fa4d177f6dd9f493833b4ea2ad24dbee
4dd1c230120e879e8c05ce16ee7ba8948b259117
/platform/util/src/com/intellij/util/ui/JBImageIcon.java
8d8bc6e40b0054aef3f482889d555f5fb2c4113e
[ "Apache-2.0" ]
permissive
svenefftinge/intellij-community
a8ac506e8ce0913546caef41eac05cf747684660
c53dc6257161a33992cba54c9992a886ce4b0f74
refs/heads/master
2023-07-26T21:02:38.731232
2014-07-17T10:43:45
2014-07-17T10:43:45
21,939,352
0
0
Apache-2.0
2023-07-15T08:52:32
2014-07-17T11:28:53
null
UTF-8
Java
false
false
1,141
java
/* * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intellij.util.ui; import javax.swing.*; import java.awt.*; import java.awt.image.ImageObserver; /** * HiDPI-aware image icon * * @author Konstantin Bulenkov */ public class JBImageIcon extends ImageIcon { public JBImageIcon(Image image) { super(image); } @Override public final synchronized void paintIcon(final Component c, final Graphics g, final int x, final int y) { final ImageObserver observer = getImageObserver(); UIUtil.drawImage(g, getImage(), x, y, observer == null ? c : observer); } }
[ "kb@jetbrains.com" ]
kb@jetbrains.com
458b65a6acf51ac884bee6a1c70edf60fd1b5e6f
17c30fed606a8b1c8f07f3befbef6ccc78288299
/Mate10_8_1_0/src/main/java/android/app/RecoverableSecurityException.java
de148d53c75c6ff60f7fe26e11efcbc4823b22e0
[]
no_license
EggUncle/HwFrameWorkSource
4e67f1b832a2f68f5eaae065c90215777b8633a7
162e751d0952ca13548f700aad987852b969a4ad
refs/heads/master
2020-04-06T14:29:22.781911
2018-11-09T05:05:03
2018-11-09T05:05:03
157,543,151
1
0
null
2018-11-14T12:08:01
2018-11-14T12:08:01
null
UTF-8
Java
false
false
4,780
java
package android.app; import android.R; import android.app.AlertDialog.Builder; import android.app.PendingIntent.CanceledException; import android.content.Context; import android.content.DialogInterface; import android.graphics.drawable.Icon; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import android.util.Log; import com.android.internal.util.Preconditions; public final class RecoverableSecurityException extends SecurityException implements Parcelable { public static final Creator<RecoverableSecurityException> CREATOR = new Creator<RecoverableSecurityException>() { public RecoverableSecurityException createFromParcel(Parcel source) { return new RecoverableSecurityException(source); } public RecoverableSecurityException[] newArray(int size) { return new RecoverableSecurityException[size]; } }; private static final String TAG = "RecoverableSecurityException"; private final RemoteAction mUserAction; private final CharSequence mUserMessage; public static class LocalDialog extends DialogFragment { public Dialog onCreateDialog(Bundle savedInstanceState) { RecoverableSecurityException e = (RecoverableSecurityException) getArguments().getParcelable(RecoverableSecurityException.TAG); return new Builder(getActivity()).setMessage(e.mUserMessage).setPositiveButton(e.mUserAction.getTitle(), new -$Lambda$CTFS8-1U0ymoTt8ccmb1hIh486s(e)).setNegativeButton((int) R.string.cancel, null).create(); } static /* synthetic */ void lambda$-android_app_RecoverableSecurityException$LocalDialog_8830(RecoverableSecurityException e, DialogInterface dialog, int which) { try { e.mUserAction.getActionIntent().send(); } catch (CanceledException e2) { Log.e(RecoverableSecurityException.TAG, "onCreateDialog()"); } } } public RecoverableSecurityException(Parcel in) { this(new SecurityException(in.readString()), in.readCharSequence(), (RemoteAction) RemoteAction.CREATOR.createFromParcel(in)); } public RecoverableSecurityException(Throwable cause, CharSequence userMessage, RemoteAction userAction) { super(cause.getMessage()); this.mUserMessage = (CharSequence) Preconditions.checkNotNull(userMessage); this.mUserAction = (RemoteAction) Preconditions.checkNotNull(userAction); } @Deprecated public RecoverableSecurityException(Throwable cause, CharSequence userMessage, CharSequence userActionTitle, PendingIntent userAction) { this(cause, userMessage, new RemoteAction(Icon.createWithResource("android", 17302727), userActionTitle, userActionTitle, userAction)); } public CharSequence getUserMessage() { return this.mUserMessage; } public RemoteAction getUserAction() { return this.mUserAction; } @Deprecated public void showAsNotification(Context context) { NotificationManager nm = (NotificationManager) context.getSystemService(NotificationManager.class); String channelId = "RecoverableSecurityException_" + this.mUserAction.getActionIntent().getCreatorUid(); nm.createNotificationChannel(new NotificationChannel(channelId, TAG, 3)); showAsNotification(context, channelId); } public void showAsNotification(Context context, String channelId) { ((NotificationManager) context.getSystemService(NotificationManager.class)).notify(TAG, this.mUserAction.getActionIntent().getCreatorUid(), new Notification.Builder(context, channelId).setSmallIcon(17302724).setContentTitle(this.mUserAction.getTitle()).setContentText(this.mUserMessage).setContentIntent(this.mUserAction.getActionIntent()).setCategory(Notification.CATEGORY_ERROR).build()); } public void showAsDialog(Activity activity) { Fragment dialog = new LocalDialog(); Bundle args = new Bundle(); args.putParcelable(TAG, this); dialog.setArguments(args); String tag = "RecoverableSecurityException_" + this.mUserAction.getActionIntent().getCreatorUid(); FragmentManager fm = activity.getFragmentManager(); FragmentTransaction ft = fm.beginTransaction(); Fragment old = fm.findFragmentByTag(tag); if (old != null) { ft.remove(old); } ft.add(dialog, tag); ft.commitAllowingStateLoss(); } public int describeContents() { return 0; } public void writeToParcel(Parcel dest, int flags) { dest.writeString(getMessage()); dest.writeCharSequence(this.mUserMessage); this.mUserAction.writeToParcel(dest, flags); } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
649be0ef6f55f4c15807d01e7c9d27569452f754
a3d6556180e74af7b555f8d47d3fea55b94bcbda
/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityIncognitoMetricTest.java
1d5004f9f6da68851d84eb2a1bcd79e97130ba7c
[ "BSD-3-Clause" ]
permissive
chromium/chromium
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
refs/heads/main
2023-08-24T00:35:12.585945
2023-08-23T22:01:11
2023-08-23T22:01:11
120,360,765
17,408
7,102
BSD-3-Clause
2023-09-10T23:44:27
2018-02-05T20:55:32
null
UTF-8
Java
false
false
5,500
java
// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.customtabs; import static org.junit.Assert.assertEquals; import android.content.Intent; import androidx.test.core.app.ApplicationProvider; import androidx.test.filters.MediumTest; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestRule; import org.junit.runner.RunWith; import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.chrome.browser.IntentHandler; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.incognito.IncognitoDataTestUtils; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.util.browser.Features; import org.chromium.chrome.test.util.browser.Features.EnableFeatures; import org.chromium.net.test.EmbeddedTestServerRule; import java.util.concurrent.TimeoutException; /** * Instrumentation tests for metrics collected by {@link CustomTabActivity} launched in incognito * mode. */ @RunWith(ChromeJUnit4ClassRunner.class) @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class CustomTabActivityIncognitoMetricTest { private static final String UMA_KEY = "CustomTabs.IncognitoCCTCallerId"; private static final String FIRST_PARTY_UMA_KEY = "CustomTabs.ClientAppId.Incognito"; private static final String TEST_PAGE = "/chrome/test/data/android/google.html"; private String mTestPage; @Rule public IncognitoCustomTabActivityTestRule mCustomTabActivityTestRule = new IncognitoCustomTabActivityTestRule(); @Rule public TestRule mProcessor = new Features.InstrumentationProcessor(); @Rule public EmbeddedTestServerRule mEmbeddedTestServerRule = new EmbeddedTestServerRule(); @Before public void setUp() throws TimeoutException { mTestPage = mEmbeddedTestServerRule.getServer().getURL(TEST_PAGE); // Ensuring native is initialized before we access the CCT_INCOGNITO feature flag. IncognitoDataTestUtils.fireAndWaitForCctWarmup(); } private Intent createMinimalIncognitoCustomTabIntent() { return CustomTabsIntentTestUtils.createMinimalIncognitoCustomTabIntent( ApplicationProvider.getApplicationContext(), mTestPage); } @Test @MediumTest @EnableFeatures({ChromeFeatureList.CCT_INCOGNITO}) public void recordsHistogram_1P() { assertEquals(0, RecordHistogram.getHistogramTotalCountForTesting(UMA_KEY)); Intent intent = createMinimalIncognitoCustomTabIntent(); mCustomTabActivityTestRule.startCustomTabActivityWithIntent(intent); assertEquals(1, RecordHistogram.getHistogramTotalCountForTesting(UMA_KEY)); assertEquals(1, RecordHistogram.getHistogramValueCountForTesting( UMA_KEY, IntentHandler.IncognitoCCTCallerId.GOOGLE_APPS)); } @Test @MediumTest @EnableFeatures({ChromeFeatureList.CCT_INCOGNITO}) public void recordsHistogram_ReaderMode_WithExtra() { assertEquals(0, RecordHistogram.getHistogramTotalCountForTesting(UMA_KEY)); Intent intent = createMinimalIncognitoCustomTabIntent(); CustomTabIntentDataProvider.addReaderModeUIExtras(intent); IncognitoCustomTabIntentDataProvider.addIncognitoExtrasForChromeFeatures( intent, IntentHandler.IncognitoCCTCallerId.READER_MODE); mCustomTabActivityTestRule.startCustomTabActivityWithIntent(intent); assertEquals(1, RecordHistogram.getHistogramTotalCountForTesting(UMA_KEY)); assertEquals(1, RecordHistogram.getHistogramValueCountForTesting( UMA_KEY, IntentHandler.IncognitoCCTCallerId.READER_MODE)); } @Test @MediumTest @EnableFeatures({ChromeFeatureList.CCT_INCOGNITO, ChromeFeatureList.CCT_INCOGNITO_AVAILABLE_TO_THIRD_PARTY}) public void recordsHistogram_Other() { assertEquals(0, RecordHistogram.getHistogramTotalCountForTesting(UMA_KEY)); Intent intent = createMinimalIncognitoCustomTabIntent(); // Remove the first party override to emulate third party mCustomTabActivityTestRule.setRemoveFirstPartyOverride(); mCustomTabActivityTestRule.startCustomTabActivityWithIntent(intent); assertEquals(1, RecordHistogram.getHistogramTotalCountForTesting(UMA_KEY)); assertEquals(1, RecordHistogram.getHistogramValueCountForTesting( UMA_KEY, IntentHandler.IncognitoCCTCallerId.OTHER_APPS)); } @Test @MediumTest @EnableFeatures({ChromeFeatureList.CCT_INCOGNITO, ChromeFeatureList.CCT_INCOGNITO_AVAILABLE_TO_THIRD_PARTY}) public void doesNotRecordThirdPartySpecificHistogram() { assertEquals(0, RecordHistogram.getHistogramTotalCountForTesting(FIRST_PARTY_UMA_KEY)); Intent intent = createMinimalIncognitoCustomTabIntent(); // Remove the first party override to emulate third party mCustomTabActivityTestRule.setRemoveFirstPartyOverride(); mCustomTabActivityTestRule.startCustomTabActivityWithIntent(intent); assertEquals(0, RecordHistogram.getHistogramTotalCountForTesting(FIRST_PARTY_UMA_KEY)); } }
[ "chromium-scoped@luci-project-accounts.iam.gserviceaccount.com" ]
chromium-scoped@luci-project-accounts.iam.gserviceaccount.com
ceccb309ef2483a10535ab1e76229b60b4f189a9
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE129_Improper_Validation_of_Array_Index/s03/CWE129_Improper_Validation_of_Array_Index__getQueryString_Servlet_array_write_no_check_53a.java
58265cc88cd78bc574038a6303c0a1fef54fc2f6
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
5,108
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE129_Improper_Validation_of_Array_Index__getQueryString_Servlet_array_write_no_check_53a.java Label Definition File: CWE129_Improper_Validation_of_Array_Index.label.xml Template File: sources-sinks-53a.tmpl.java */ /* * @description * CWE: 129 Improper Validation of Array Index * BadSource: getQueryString_Servlet Parse id param out of the URL query string (without using getParameter()) * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: array_write_no_check * GoodSink: Write to array after verifying index * BadSink : Write to array without any verification of index * Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package * * */ package testcases.CWE129_Improper_Validation_of_Array_Index.s03; import testcasesupport.*; import javax.servlet.http.*; import java.util.StringTokenizer; import java.util.logging.Level; public class CWE129_Improper_Validation_of_Array_Index__getQueryString_Servlet_array_write_no_check_53a extends AbstractTestCaseServlet { public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data; data = Integer.MIN_VALUE; /* initialize data in case id is not in query string */ /* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParam) */ { StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "&"); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); /* a token will be like "id=33" */ if(token.startsWith("id=")) /* check if we have the "id" parameter" */ { try { data = Integer.parseInt(token.substring(3)); /* set data to the int 33 */ } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception reading id from query string", exceptNumberFormat); } break; /* exit while loop */ } } } (new CWE129_Improper_Validation_of_Array_Index__getQueryString_Servlet_array_write_no_check_53b()).badSink(data , request, response); } public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable { goodG2B(request, response); goodB2G(request, response); } /* goodG2B() - use goodsource and badsink */ private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; (new CWE129_Improper_Validation_of_Array_Index__getQueryString_Servlet_array_write_no_check_53b()).goodG2BSink(data , request, response); } /* goodB2G() - use badsource and goodsink */ private void goodB2G(HttpServletRequest request, HttpServletResponse response) throws Throwable { int data; data = Integer.MIN_VALUE; /* initialize data in case id is not in query string */ /* POTENTIAL FLAW: Parse id param out of the URL querystring (without using getParam) */ { StringTokenizer tokenizer = new StringTokenizer(request.getQueryString(), "&"); while (tokenizer.hasMoreTokens()) { String token = tokenizer.nextToken(); /* a token will be like "id=33" */ if(token.startsWith("id=")) /* check if we have the "id" parameter" */ { try { data = Integer.parseInt(token.substring(3)); /* set data to the int 33 */ } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception reading id from query string", exceptNumberFormat); } break; /* exit while loop */ } } } (new CWE129_Improper_Validation_of_Array_Index__getQueryString_Servlet_array_write_no_check_53b()).goodB2GSink(data , request, response); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
7411d0bbcf2a0111d98b8f7607326616f0ae8c79
a6ef45d45bb791f900e9d1817e6d5b4edaf79983
/Instantiable/Worldgen/CustomBlockTypeBigTree.java
05cb2d890156d5958959449bf45cf66e16530cf3
[]
no_license
thePalindrome/DragonAPI
04c4097cc59766c970fb291c7f067aef3fc44f5e
1980f1eef7b75245b30accee2d01d4d7816340b0
refs/heads/master
2020-11-28T16:20:57.342699
2019-12-23T05:06:37
2019-12-23T05:06:37
229,866,246
0
0
null
2019-12-24T03:54:08
2019-12-24T03:54:07
null
UTF-8
Java
false
false
1,251
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2017 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.DragonAPI.Instantiable.Worldgen; import net.minecraft.block.Block; import Reika.DragonAPI.Instantiable.Data.Immutable.BlockKey; public final class CustomBlockTypeBigTree extends ModifiableBigTree { private final BlockKey wood; private final BlockKey leaves; public CustomBlockTypeBigTree(boolean updates, Block log, Block leaf) { this(updates, new BlockKey(log), new BlockKey(leaf)); } public CustomBlockTypeBigTree(boolean updates, BlockKey log, BlockKey leaf) { super(updates); wood = log; leaves = leaf; } @Override public Block getLogBlock(int x, int y, int z) { return wood.blockID; } @Override public int getLogMetadata(int x, int y, int z) { return wood.metadata; } @Override public Block getLeafBlock(int x, int y, int z) { return leaves.blockID; } @Override public int getLeafMetadata(int x, int y, int z) { return leaves.metadata; } }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
3f8c599814a78b24e3bb62ee83bee1bfa19dbd8e
015fa633ea034d2be6aaa92aa3e1c663b38877e9
/src/main/java/oop/others/interfase_use/interfases_I_fabricas/Implementation2Factory.java
0732f803c8304288ee66b868f865f910dcc14cfa
[]
no_license
programming-practices/java-core
b510a5104f417e670d74b94d62b6beff8d829b44
7680e92adc6bb9310ecc401b3768fc66b3ee66c2
refs/heads/main
2023-03-15T09:44:59.469839
2021-03-01T11:53:50
2021-03-01T11:53:50
303,077,639
1
0
null
null
null
null
UTF-8
Java
false
false
308
java
package OOP.Others.interfase_use.interfases_I_fabricas; class Implementation2Factory implements ServiceFactory { @Override public void metod1() { } @Override public void metod2() { } @Override public Service getService() { return new Implementation2(); } }
[ "tsyupryk.roman@gmail.com" ]
tsyupryk.roman@gmail.com
0a88553b06d7aa30d9747d82775a098d42873a43
48f4ee839300f711933e86ffbb2354530b538fc4
/test/oneTransportTest/app/src/main/java/net/uk/onetransport/android/test/onetransporttest/tests/bucks/provider/BucksEventInsertTest.java
d0bb2df86465d4c59c80c9c8ec81327e3788aa50
[]
no_license
oneTRANSPORT/android-one-transport-sdk
370ea5f26a73f65d3c85da4d27bac99a815e408e
86e78c256db19986c7b0ae83f8fb4991ad5b735b
refs/heads/master
2021-01-12T18:14:35.133354
2016-11-01T08:45:00
2016-11-01T08:45:00
71,344,449
0
0
null
null
null
null
UTF-8
Java
false
false
2,817
java
/* Copyright 2016 InterDigital Communications, 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 net.uk.onetransport.android.test.onetransporttest.tests.bucks.provider; import android.content.Context; import android.os.SystemClock; import android.util.Log; import com.interdigital.android.dougal.resource.callback.DougalCallback; import net.uk.onetransport.android.county.bucks.events.Event; import net.uk.onetransport.android.county.bucks.events.EventRetriever; import net.uk.onetransport.android.county.bucks.provider.BucksContentHelper; import net.uk.onetransport.android.test.onetransporttest.RunnerFragment; import net.uk.onetransport.android.test.onetransporttest.RunnerTask; import net.uk.onetransport.android.test.onetransporttest.tests.OneTransportTest; public class BucksEventInsertTest extends OneTransportTest { @Override public void start(RunnerTask runnerTask) throws Exception { insertEvents(runnerTask); } public void startAsync(DougalCallback dougalCallback) { ((RunnerFragment) dougalCallback).setCurrentTest("BUCKS event insert"); dougalCallback.getResponse(null, new Exception("Not implemented")); } private void insertEvents(RunnerTask runnerTask) throws Exception { runnerTask.setCurrentTest("BUCKS event insert"); Context context = runnerTask.getContext(); // This is only needed if new CIs are created during the running of the tests. BucksContentHelper.deleteFromProvider(context, BucksContentHelper.DATA_TYPE_EVENT); Event[] events = new EventRetriever(context).retrieve(); if (events == null || events.length == 0) { runnerTask.report("BUCKS event insert ... FAILED.", COLOUR_FAILED); return; } // Insert the same thing twice to check for a working UNIQUE ON CONFLICT IGNORE index. BucksContentHelper.insertIntoProvider(context, events); BucksContentHelper.insertIntoProvider(context, events); Event[] events1 = BucksContentHelper.getEvents(context); if (events.length == events1.length) { runnerTask.report("BUCKS event insert ... PASSED.", COLOUR_PASSED); return; } runnerTask.report("BUCKS event insert ... FAILED.", COLOUR_FAILED); } }
[ "dr.paul.thomas@gmail.com" ]
dr.paul.thomas@gmail.com
c48b2a2e2302aca7db76ae704aad2d1b5e6fe2cd
f88191eab3b367f136826a1aaa764c4828a841d6
/examples/imv-example/src/main/java/de/hsbremen/tc/tnc/im/example/FileImv.java
3e2c622bb9d2a81028759cd4cfa3476e3f8d4787
[ "BSD-3-Clause" ]
permissive
trusthsbremen/jtnc
f64990e7924fdca29218abe58b8ed11edbd49fa4
08a5cee2423dcd1be759bf4a67719dd57096c64e
refs/heads/master
2021-07-04T14:48:06.009636
2019-07-03T19:53:04
2019-07-03T19:53:04
41,857,243
3
1
NOASSERTION
2021-06-07T17:51:16
2015-09-03T11:55:32
Java
UTF-8
Java
false
false
3,207
java
/** * The BSD 3-Clause License ("BSD New" or "BSD Simplified") * * Copyright © 2015 Trust HS Bremen and its Contributors. All rights * reserved. * * See the CONTRIBUTORS file distributed with this work for additional * information regarding copyright ownership. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. 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. * * 3. Neither the name of the copyright holder 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 HOLDER * 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 de.hsbremen.tc.tnc.im.example; import org.ietf.nea.pa.serialize.reader.bytebuffer.PaReaderFactory; import org.ietf.nea.pa.serialize.writer.bytebuffer.PaWriterFactory; import org.trustedcomputinggroup.tnc.ifimv.IMVConnection; import de.hsbremen.tc.tnc.im.adapter.ImParameter; import de.hsbremen.tc.tnc.im.adapter.connection.ImvConnectionAdapterFactoryIetf; import de.hsbremen.tc.tnc.im.adapter.imv.ImvAdapterIetf; import de.hsbremen.tc.tnc.im.adapter.tnccs.TncsAdapterFactoryIetf; import de.hsbremen.tc.tnc.im.evaluate.example.file.FileImvEvaluatorFactory; import de.hsbremen.tc.tnc.im.session.DefaultImSessionManager; import de.hsbremen.tc.tnc.im.session.DefaultImvSessionFactory; import de.hsbremen.tc.tnc.im.session.ImvSession; /** * Custom file IMV. * * */ public class FileImv extends ImvAdapterIetf { /** * Creates the file IMV. */ public FileImv() { super(new ImParameter(), new TncsAdapterFactoryIetf(), new DefaultImvSessionFactory(), new DefaultImSessionManager<IMVConnection, ImvSession>(3000), new FileImvEvaluatorFactory("/validation/file_imv.properties"), // testing needed because the component is of type testing new ImvConnectionAdapterFactoryIetf( PaWriterFactory.createTestingDefault()), PaReaderFactory.createTestingDefault()); } }
[ "carl-heinz.genzel@hs-bremen.de" ]
carl-heinz.genzel@hs-bremen.de
b072febb0f1f7fa76dda71a7f3c8594fba973f95
84125a032c2b2e150f62616c15f0089016aca05d
/src/comp/prep2019/less1000/Prob2.java
d0a041bcaf2899fb078e5d295310117c900e58b7
[]
no_license
achowdhury80/leetcode
c577acc1bc8bce3da0c99e12d6d447c74fbed5c3
5ec97794cc5617cd7f35bafb058ada502ee7d802
refs/heads/master
2023-02-06T01:08:49.888440
2023-01-22T03:23:37
2023-01-22T03:23:37
115,574,715
1
0
null
null
null
null
UTF-8
Java
false
false
738
java
package comp.prep2019.less1000; import comp.prep2019.ListNode; public class Prob2 { /** * o(N) * @param l1 * @param l2 * @return */ public ListNode addTwoNumbers(ListNode l1, ListNode l2) { ListNode dummy = new ListNode(-1); ListNode cur = dummy; int carry = 0; while(l1 != null || l2 != null) { int sum = carry; if (l1 != null) { sum += l1.val; l1 = l1.next; } if (l2 != null) { sum += l2.val; l2 = l2.next; } carry = sum / 10; cur.next = new ListNode(sum % 10); cur = cur.next; } if (carry > 0) cur.next = new ListNode(carry); return dummy.next; } }
[ "aychowdh@microsoft.com" ]
aychowdh@microsoft.com
1ce490cfa9ab8366dce491a4c7e323b05cfa9abb
7e3e88f04f8db8e0322308a2e0bc8dd7b61bc9b9
/src/main/java/br/com/dominio/security/jwt/TokenProvider.java
534cb4fc0acea797a2d8f42188e45863e11145ba
[]
no_license
robsonlira/jhipster-person-app
548ae8dadff91c371c52ff2a452cefa0553e6417
bc6a0ddee0db0a77e9d4e83d85ca44617143493d
refs/heads/main
2023-06-14T07:37:40.793000
2021-07-11T15:43:36
2021-07-11T15:43:36
384,723,110
0
0
null
2021-07-11T15:43:37
2021-07-10T14:55:42
Java
UTF-8
Java
false
false
4,062
java
package br.com.dominio.security.jwt; import io.jsonwebtoken.*; import io.jsonwebtoken.io.Decoders; import io.jsonwebtoken.security.Keys; import java.nio.charset.StandardCharsets; import java.security.Key; import java.util.*; import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.User; import org.springframework.stereotype.Component; import org.springframework.util.ObjectUtils; import tech.jhipster.config.JHipsterProperties; @Component public class TokenProvider { private final Logger log = LoggerFactory.getLogger(TokenProvider.class); private static final String AUTHORITIES_KEY = "auth"; private final Key key; private final JwtParser jwtParser; private final long tokenValidityInMilliseconds; private final long tokenValidityInMillisecondsForRememberMe; public TokenProvider(JHipsterProperties jHipsterProperties) { byte[] keyBytes; String secret = jHipsterProperties.getSecurity().getAuthentication().getJwt().getBase64Secret(); if (!ObjectUtils.isEmpty(secret)) { log.debug("Using a Base64-encoded JWT secret key"); keyBytes = Decoders.BASE64.decode(secret); } else { log.warn( "Warning: the JWT key used is not Base64-encoded. " + "We recommend using the `jhipster.security.authentication.jwt.base64-secret` key for optimum security." ); secret = jHipsterProperties.getSecurity().getAuthentication().getJwt().getSecret(); keyBytes = secret.getBytes(StandardCharsets.UTF_8); } key = Keys.hmacShaKeyFor(keyBytes); jwtParser = Jwts.parserBuilder().setSigningKey(key).build(); this.tokenValidityInMilliseconds = 1000 * jHipsterProperties.getSecurity().getAuthentication().getJwt().getTokenValidityInSeconds(); this.tokenValidityInMillisecondsForRememberMe = 1000 * jHipsterProperties.getSecurity().getAuthentication().getJwt().getTokenValidityInSecondsForRememberMe(); } public String createToken(Authentication authentication, boolean rememberMe) { String authorities = authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.joining(",")); long now = (new Date()).getTime(); Date validity; if (rememberMe) { validity = new Date(now + this.tokenValidityInMillisecondsForRememberMe); } else { validity = new Date(now + this.tokenValidityInMilliseconds); } return Jwts .builder() .setSubject(authentication.getName()) .claim(AUTHORITIES_KEY, authorities) .signWith(key, SignatureAlgorithm.HS512) .setExpiration(validity) .compact(); } public Authentication getAuthentication(String token) { Claims claims = jwtParser.parseClaimsJws(token).getBody(); Collection<? extends GrantedAuthority> authorities = Arrays .stream(claims.get(AUTHORITIES_KEY).toString().split(",")) .filter(auth -> !auth.trim().isEmpty()) .map(SimpleGrantedAuthority::new) .collect(Collectors.toList()); User principal = new User(claims.getSubject(), "", authorities); return new UsernamePasswordAuthenticationToken(principal, token, authorities); } public boolean validateToken(String authToken) { try { jwtParser.parseClaimsJws(authToken); return true; } catch (JwtException | IllegalArgumentException e) { log.info("Invalid JWT token."); log.trace("Invalid JWT token trace.", e); } return false; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
7ca573a4d3aaf7e406a62fd9c804aa17f4af0f96
ca6c8aab859af2a4ad9360b94bd88c6cbf6394d2
/src/main/java/utils/net/CountingInputStream.java
d5af29629d07b4ae32e09ef4d74cd0888526f440
[]
no_license
amicom/Work-In-Progress
8255b50bcb946e27c39aa066185c93df50349d56
1d2471a5367f956292d4a57f349b962284eed62c
refs/heads/master
2021-01-10T14:28:32.223326
2015-11-08T18:27:01
2015-11-08T18:27:01
43,629,615
0
0
null
null
null
null
UTF-8
Java
false
false
1,168
java
/** * Copyright (c) 2009 - 2012 AppWork UG(haftungsbeschränkt) <e-mail@appwork.org> * <p/> * This file is part of org.appwork.utils.net * <p/> * This software is licensed under the Artistic License 2.0, * see the LICENSE file or http://www.opensource.org/licenses/artistic-license-2.0.php * for details */ package utils.net; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; /** * @author daniel * */ public class CountingInputStream extends FilterInputStream implements CountingConnection { private long count = 0; public CountingInputStream(final InputStream in) { super(in); } @Override public int read() throws IOException { final int ret = super.read(); if (ret != -1) { this.count++; } return ret; } @Override public int read(final byte[] b, final int off, final int len) throws IOException { final int ret = super.read(b, off, len); if (ret != -1) { this.count += ret; } return ret; } @Override public long transferedBytes() { return this.count; } }
[ "amicom.pro@gmail.com" ]
amicom.pro@gmail.com
5b4a1aba454ed2275d7d179e77a43e734662a509
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a023/A023023Test.java
8b656a4f137ca9c4e9c322819c127ddddbfa6f3c
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a023; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A023023Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
b08a5a7839e74ac30eef391aa286aad18c4ac729
04f503868d44a1083cda0b03c90260b2f480c65c
/app/src/main/java/receiver/HReceiver.java
c594f18d3353615f4b15e5db3449d97bdca5a78d
[]
no_license
Helen403/HelenTT
af1609dcdae1c0a7d3d126f0f3946ca66cee2cbb
7e1e457e9f9b6029698873a4177fbde3243bb6e7
refs/heads/master
2021-01-25T06:30:39.661396
2017-06-07T03:24:28
2017-06-07T03:24:28
93,588,164
0
0
null
null
null
null
UTF-8
Java
false
false
7,378
java
package receiver; import android.content.Context; import android.content.Intent; import android.text.TextUtils; import android.util.Log; import android.widget.Toast; import com.xiaomi.mipush.sdk.ErrorCode; import com.xiaomi.mipush.sdk.MiPushClient; import com.xiaomi.mipush.sdk.MiPushCommandMessage; import com.xiaomi.mipush.sdk.MiPushMessage; import com.xiaomi.mipush.sdk.PushMessageReceiver; import com.zhy.http.okhttp.OkHttpUtils; import com.zhy.http.okhttp.callback.StringCallback; import java.util.List; import HConstants.HConstants; import Utils.DButils; import activity.RemindActivity; import okhttp3.Call; /** * Created by Helen on 2017/5/25. */ public class HReceiver extends PushMessageReceiver { private String mRegId; private long mResultCode = -1; private String mReason; private String mCommand; private String mMessage; private String mTopic; private String mAlias; private String mUserAccount; private String mStartTime; private String mEndTime; //onReceivePassThroughMessage用来接收服务器发送的透传消息 @Override public void onReceivePassThroughMessage(Context context, MiPushMessage message) { mMessage = message.getContent(); if (!TextUtils.isEmpty(message.getTopic())) { mTopic = message.getTopic(); } else if (!TextUtils.isEmpty(message.getAlias())) { mAlias = message.getAlias(); } else if (!TextUtils.isEmpty(message.getUserAccount())) { mUserAccount = message.getUserAccount(); } Toast.makeText(context, "66666", Toast.LENGTH_SHORT).show(); Intent intent = new Intent(context, RemindActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); } // onNotificationMessageClicked用来接收服务器发来的通知栏消息(用户点击通知栏时触发) @Override public void onNotificationMessageClicked(Context context, MiPushMessage message) { mMessage = message.getContent(); if (!TextUtils.isEmpty(message.getTopic())) { mTopic = message.getTopic(); } else if (!TextUtils.isEmpty(message.getAlias())) { mAlias = message.getAlias(); } else if (!TextUtils.isEmpty(message.getUserAccount())) { mUserAccount = message.getUserAccount(); } Log.d("Helen", "用来接收服务器发来的通知栏消息(用户点击通知栏时触发)"); Log.d("Helen", "用来接收服务器发送的透传消息"); Intent intent = new Intent(context, RemindActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); Log.d("Helen", "666"); } //onNotificationMessageArrived用来接收服务器发来的通知栏消息(消息到达客户端时触发,并且可以接收应用在前台时不弹出通知的通知消息) @Override public void onNotificationMessageArrived(Context context, MiPushMessage message) { mMessage = message.getContent(); if (!TextUtils.isEmpty(message.getTopic())) { mTopic = message.getTopic(); } else if (!TextUtils.isEmpty(message.getAlias())) { mAlias = message.getAlias(); } else if (!TextUtils.isEmpty(message.getUserAccount())) { mUserAccount = message.getUserAccount(); } Log.d("Helen", "用来接收服务器发来的通知栏消息(消息到达客户端时触发,并且可以接收应用在前台时不弹出通知的通知消息)"); Log.d("Helen", "用来接收服务器发来的通知栏消息"); Intent intent = new Intent(context, RemindActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); Log.d("Helen", "666"); Toast.makeText(context, "接受到", Toast.LENGTH_SHORT).show(); } //onCommandResult用来接收客户端向服务器发送命令消息后返回的响应 @Override public void onCommandResult(Context context, MiPushCommandMessage message) { String command = message.getCommand(); List<String> arguments = message.getCommandArguments(); String cmdArg1 = ((arguments != null && arguments.size() > 0) ? arguments.get(0) : null); String cmdArg2 = ((arguments != null && arguments.size() > 1) ? arguments.get(1) : null); if (MiPushClient.COMMAND_REGISTER.equals(command)) { if (message.getResultCode() == ErrorCode.SUCCESS) { mRegId = cmdArg1; } } else if (MiPushClient.COMMAND_SET_ALIAS.equals(command)) { if (message.getResultCode() == ErrorCode.SUCCESS) { mAlias = cmdArg1; } } else if (MiPushClient.COMMAND_UNSET_ALIAS.equals(command)) { if (message.getResultCode() == ErrorCode.SUCCESS) { mAlias = cmdArg1; } } else if (MiPushClient.COMMAND_SUBSCRIBE_TOPIC.equals(command)) { if (message.getResultCode() == ErrorCode.SUCCESS) { mTopic = cmdArg1; } } else if (MiPushClient.COMMAND_UNSUBSCRIBE_TOPIC.equals(command)) { if (message.getResultCode() == ErrorCode.SUCCESS) { mTopic = cmdArg1; } } else if (MiPushClient.COMMAND_SET_ACCEPT_TIME.equals(command)) { if (message.getResultCode() == ErrorCode.SUCCESS) { mStartTime = cmdArg1; mEndTime = cmdArg2; } } Log.d("Helen", "用来接收客户端向服务器发送命令消息后返回的响应"); } //onReceiveRegisterResult用来接受客户端向服务器发送注册命令消息后返回的响应。 @Override public void onReceiveRegisterResult(Context context, MiPushCommandMessage message) { String command = message.getCommand(); List<String> arguments = message.getCommandArguments(); String cmdArg1 = ((arguments != null && arguments.size() > 0) ? arguments.get(0) : null); String cmdArg2 = ((arguments != null && arguments.size() > 1) ? arguments.get(1) : null); if (MiPushClient.COMMAND_REGISTER.equals(command)) { if (message.getResultCode() == ErrorCode.SUCCESS) { mRegId = cmdArg1; } } Log.d("Helen", "用来接受客户端向服务器发送注册命令消息后返回的响应。"); if (DButils.get(HConstants.KEY.RegId) == null || !DButils.get(HConstants.KEY.RegId).equals(mRegId)) { OkHttpUtils .get() .url(HConstants.URL.updateRegId) .addParams("userCode", "1") .addParams("regId", mRegId) .build() .execute(new StringCallback() { @Override public void onError(Call call, Exception e, int id) { Log.d("Helen", "失败"); } @Override public void onResponse(String response, int id) { Log.d("Helen", response); } }); DButils.put("HConstants.KEY.RegId", mRegId); } } }
[ "852568775@qq.com" ]
852568775@qq.com
6b00288824376c8f04a763f420624513b5e12dbf
164dd2f34109deb0b2ef322a6de9fe3ab0670aed
/cocoatouch/src/main/java/org/robovm/apple/gamekit/GKFriendRequestComposeViewControllerDelegateAdapter.java
29b931b17d6498375d2b8e35d4fb8b64820a0619
[ "Apache-2.0" ]
permissive
glenndmello/robovm
9e0863559854d0ed30f51e9f405a76c9ad97ca9e
c73408eafff49f780d00f3e4f9fb0ee10732ffa3
refs/heads/master
2020-12-24T08:32:05.788722
2015-03-10T21:30:20
2015-03-10T21:30:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,866
java
/* * Copyright (C) 2013-2015 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.gamekit; /*<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.uikit.*; /*</imports>*/ /*<javadoc>*/ /*</javadoc>*/ /*<annotations>*//*</annotations>*/ /*<visibility>*/public/*</visibility>*/ class /*<name>*/GKFriendRequestComposeViewControllerDelegateAdapter/*</name>*/ extends /*<extends>*/NSObject/*</extends>*/ /*<implements>*/implements GKFriendRequestComposeViewControllerDelegate/*</implements>*/ { /*<ptr>*/ /*</ptr>*/ /*<bind>*/ /*</bind>*/ /*<constants>*//*</constants>*/ /*<constructors>*//*</constructors>*/ /*<properties>*/ /*</properties>*/ /*<members>*//*</members>*/ /*<methods>*/ /** * @since Available in iOS 4.2 and later. */ @NotImplemented("friendRequestComposeViewControllerDidFinish:") public void didFinish(GKFriendRequestComposeViewController viewController) { throw new UnsupportedOperationException(); } /*</methods>*/ }
[ "blueriverteam@gmail.com" ]
blueriverteam@gmail.com
1f901ebe357fad21aff1b635e97b3e958ae91a41
59cf0f731703b58e7833e94735c59a165ac94454
/src/main/java/com/labbol/smeri/api/task/token/request/GetTaskRequest.java
44581db764009b5c52f316d649507207b7137d43
[]
no_license
labbolframework/smeri_tms_sdk
ae152477733f476d6e5d74c9974d15fc53b2bf26
9e42732e14b483eb6bbbca5b585edb253a1b7033
refs/heads/master
2021-04-22T17:26:35.435168
2020-05-10T10:49:32
2020-05-10T10:49:32
249,864,925
0
0
null
null
null
null
UTF-8
Java
false
false
916
java
package com.labbol.smeri.api.task.token.request; import com.labbol.api.support.exception.APIRuleException; import com.labbol.api.support.request.AbstractAPIRequest; import com.labbol.api.support.utils.RequestCheckUtils; import com.labbol.smeri.api.task.token.response.GetTaskResponse; /** * @author PengFei */ public class GetTaskRequest extends AbstractAPIRequest<GetTaskResponse> { private String tokenId; public GetTaskRequest() { super("/v1.0/service_task/getTask", "GET"); } @Override public Class<GetTaskResponse> getResponseClass() { return GetTaskResponse.class; } public String getTokenId() { return tokenId; } public void setTokenId(String tokenId) { this.tokenId = tokenId; httpRequest.addParam("tokenId", tokenId); } @Override public void check() throws APIRuleException { RequestCheckUtils.checkNotEmpty(tokenId, "tokenId"); } }
[ "yl1430834495@163.com" ]
yl1430834495@163.com
19bc68974c83786244852fc2a0b6da025e69de63
5d886e65dc224924f9d5ef4e8ec2af612529ab93
/sources/com/android/systemui/appops/AppOpItem.java
293421f16265cb4b8cfce9b59e38d8c3046f4a5f
[]
no_license
itz63c/SystemUIGoogle
99a7e4452a8ff88529d9304504b33954116af9ac
f318b6027fab5deb6a92e255ea9b26f16e35a16b
refs/heads/master
2022-05-27T16:12:36.178648
2020-04-30T04:21:56
2020-04-30T04:21:56
260,112,526
3
1
null
null
null
null
UTF-8
Java
false
false
963
java
package com.android.systemui.appops; public class AppOpItem { private int mCode; private String mPackageName; private String mState; private int mUid; public AppOpItem(int i, int i2, String str, long j) { this.mCode = i; this.mUid = i2; this.mPackageName = str; StringBuilder sb = new StringBuilder(); sb.append("AppOpItem("); sb.append("Op code="); sb.append(i); String str2 = ", "; sb.append(str2); sb.append("UID="); sb.append(i2); sb.append(str2); sb.append("Package name="); sb.append(str); sb.append(")"); this.mState = sb.toString(); } public int getCode() { return this.mCode; } public int getUid() { return this.mUid; } public String getPackageName() { return this.mPackageName; } public String toString() { return this.mState; } }
[ "itz63c@statixos.com" ]
itz63c@statixos.com
9c1fe132659f4a1ff8c6bc42298d4e8bf33dbdc0
42d8d098d933607716f9f573f41ade204c0464e2
/gen/org/hedhman/pony/idea/generated/psi/PonyClassDef.java
fcf2f5a000578af44e0e12414907bd395befebfb
[ "Apache-2.0" ]
permissive
niclash/pony-idea-plugin
772913d53fac4883fb31fe6391aa07ccd8cffa3f
581899af671e8ef97805156f70bbe52e85b8f171
refs/heads/master
2022-11-16T22:52:01.771306
2020-05-20T06:42:25
2020-05-20T06:42:25
261,061,571
5
1
null
null
null
null
UTF-8
Java
false
false
840
java
/* Copyright Niclas Hedhman, 2020. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"). See LICENSE.txt*/ package org.hedhman.pony.idea.generated.psi; import java.util.List; import org.jetbrains.annotations.*; import com.intellij.psi.PsiElement; import org.hedhman.pony.idea.completion.PonyNamedElement; public interface PonyClassDef extends PonyNamedElement { @NotNull PonyAnnotations getAnnotations(); @Nullable PonyCap getCap(); @NotNull PonyClassName getClassName(); @NotNull PonyClassType getClassType(); @Nullable PonyDocString getDocString(); @NotNull PonyMembers getMembers(); @NotNull PonyTypeDecl getTypeDecl(); @Nullable PonyTypeparams getTypeparams(); String getClassDef(); PsiElement getNameIdentifier(); PsiElement setName(String newName); }
[ "niclas@hedhman.org" ]
niclas@hedhman.org
e409a757813260ac6126093559d9ac0b0bdef063
afd3866f5d269d028f6918fdb5063cd4b5114d68
/atomKeo/.svn/pristine/53/53f2dd8266c7a60b9a751e692ad5889f45bf1fdb.svn-base
d24ca55ca65bc08db783fd09b6c3466de153e893
[]
no_license
vikkymahdrey/AtomKeo
d503bb6e64f345d452e7da8f2eddbd78bbb35b98
44770dd749cb0779c27ed34d36ade22c94710b27
refs/heads/master
2021-01-25T05:56:56.826325
2017-02-02T09:42:25
2017-02-02T09:42:25
80,709,773
0
0
null
null
null
null
UTF-8
Java
false
false
1,044
package com.agiledge.atom.entities; import java.io.Serializable; import javax.persistence.*; import java.math.BigInteger; /** * The persistent class for the noshow_config database table. * */ @Entity @Table(name="noshow_config") @NamedQuery(name="NoshowConfig.findAll", query="SELECT n FROM NoshowConfig n") public class NoshowConfig implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy=GenerationType.AUTO) private int id; private BigInteger count; private BigInteger days; private String type; public NoshowConfig() { } public int getId() { return this.id; } public void setId(int id) { this.id = id; } public BigInteger getCount() { return this.count; } public void setCount(BigInteger count) { this.count = count; } public BigInteger getDays() { return this.days; } public void setDays(BigInteger days) { this.days = days; } public String getType() { return this.type; } public void setType(String type) { this.type = type; } }
[ "vikky@unizentechnologies.com" ]
vikky@unizentechnologies.com
be2029e40eb749c491c14fad7b308f39d2811e44
7b1350b01db9cc3151a94e30cdacc4913c6368df
/JFinalUIB/weiXin/little/ant/weixin/bo/message/RecevieEventSubscribe.java
0a28bdae671fb4b8dbb291722d4ce4f0eba4ffa6
[]
no_license
Axuduo/jfinalUIB_yihuan
64ab58a8d0db4c48562b51c94e3549abc8a67ed5
54e63090e87372c0aa5f5123dd116a8fe9a88644
refs/heads/master
2021-05-31T01:38:22.369553
2016-02-09T08:10:33
2016-02-09T08:10:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
163
java
package little.ant.weixin.bo.message; /** * 关注/取消关注事件 * @author 董华健 */ public class RecevieEventSubscribe extends RecevieEventBase { }
[ "81391276@qq.com" ]
81391276@qq.com
28f3c54ffeb73438174346937f740e43eaf8e039
cba90e0a598d40a69df192bfd58ff966132a6357
/src/test/java/com/jiotms/tmsreactapp/domain/ProductItemTest.java
4d1083146f49baaf5c3a1ba5779dbad9fa9906e6
[]
no_license
harjeet-me/tmsreactapp
698b4a52f856b1e0ed67cb22a254d0dc96ed7a5d
0d09803b25e451f92399b3f4219d61725d89b597
refs/heads/master
2023-01-07T10:24:02.191197
2020-11-01T06:18:24
2020-11-01T06:18:24
309,032,074
0
0
null
2020-11-01T05:58:03
2020-11-01T05:45:44
Java
UTF-8
Java
false
false
773
java
package com.jiotms.tmsreactapp.domain; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import com.jiotms.tmsreactapp.web.rest.TestUtil; public class ProductItemTest { @Test public void equalsVerifier() throws Exception { TestUtil.equalsVerifier(ProductItem.class); ProductItem productItem1 = new ProductItem(); productItem1.setId(1L); ProductItem productItem2 = new ProductItem(); productItem2.setId(productItem1.getId()); assertThat(productItem1).isEqualTo(productItem2); productItem2.setId(2L); assertThat(productItem1).isNotEqualTo(productItem2); productItem1.setId(null); assertThat(productItem1).isNotEqualTo(productItem2); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
fcb50be4357aa54e699968a687fe228376f915d9
d2e0d363da6c746f1067905e7e7ba6b017c73cf3
/src/main/java/com/liangxunwang/unimanager/model/Role.java
694cfb07e0bf488d0559e1dfb1f91de1442bb767
[]
no_license
eryiyi/TreeHmManager
7c9fab2657e2da98d651d5488141bdcc98adaa59
2e9a39823f88dfb8b5402d6e17b800e221cbdf85
refs/heads/master
2020-12-12T23:47:25.315205
2017-03-13T09:15:04
2017-03-13T09:15:04
51,736,242
0
2
null
null
null
null
UTF-8
Java
false
false
818
java
package com.liangxunwang.unimanager.model; public class Role { private String id; private String name; private String permissions; private String type; // 默认0顶级管理员 // 1是县级 // 2是市级 // 3是省级 // 4是全国 public String getType() { return type; } public void setType(String type) { this.type = type; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPermissions() { return permissions; } public void setPermissions(String permissions) { this.permissions = permissions; } }
[ "826321978@qq.com" ]
826321978@qq.com
93932fe52566c6b56bd0ed99ea2ac081d7d06611
31e028b9bbbb6bb0ed9f508bcdab5f90ce36ce97
/spring-boot-forum-master/src/main/java/com/qingwenwei/persistence/model/User.java
c6f6001b35fcf4b030e234b2e19becd1cc481adf
[]
no_license
1367356/springBootForum
01fa9d85697e05bc5b3d6ac2fca2f16dccdf4e97
1318fd9f91aaeb0eff8244a722e55d6eb4a1e24e
refs/heads/master
2020-03-09T06:31:53.065351
2018-04-15T02:10:39
2018-04-15T02:10:39
128,641,682
1
1
null
null
null
null
UTF-8
Java
false
false
3,196
java
package com.qingwenwei.persistence.model; import java.io.Serializable; import java.sql.Timestamp; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Set; public class User implements Serializable { private static final long serialVersionUID = 1L; // constants public static String USER = "USER"; //两种用户 public static String ADMIN = "ADMIN"; private Long id; private String username; private String password; private String email; private String confirmationToken; private Long activated; private Timestamp dateCreated; private String avatarLocation; private String bio; private String roles; public User() { } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String userName) { this.username = userName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getConfirmationToken() { return confirmationToken; } public void setConfirmationToken(String confirmationToken) { this.confirmationToken = confirmationToken; } public Long getActivated() { return activated; } public void setActivated(Long activated) { this.activated = activated; } public static void setUSER(String USER) { User.USER = USER; } public static void setADMIN(String ADMIN) { User.ADMIN = ADMIN; } public static long getSerialVersionUID() { return serialVersionUID; } public static String getUSER() { return USER; } public static String getADMIN() { return ADMIN; } public Timestamp getDateCreated() { return dateCreated; } public void setDateCreated(Timestamp dateCreated) { this.dateCreated = dateCreated; } public String getAvatarLocation() { return avatarLocation; } public void setAvatarLocation(String avatarLocation) { this.avatarLocation = avatarLocation; } public String getBio() { return bio; } public void setBio(String bio) { this.bio = bio; } public String getRoles() { return roles; } public void setRoles(String roles) { this.roles = roles; } //赋予该用户的角色 public Set<String> getRolesSet() { if (null == roles) { return null; } return Collections.unmodifiableSet( new HashSet<String>(Arrays.asList(getRoles().split(",")))); } public void addRole(String role) { String currRoles = this.getRoles(); if (null == currRoles || this.getRoles().contains(role)) { return; } this.setRoles(currRoles + "," + role); } public void activated(boolean activated) { this.setActivated(activated == true ? 1L : 0L); } @Override public String toString() { return "User [id=" + id + ", username=" + username + ", password=" + password + ", email=" + email + ", confirmationToken=" + confirmationToken + ", activated=" + activated + ", dateCreated=" + dateCreated + ", avatarLocation=" + avatarLocation + ", bio=" + bio + ", roles=" + roles + "]"; } }
[ "1185978642@qq.com" ]
1185978642@qq.com
0efb39b2713669a477eb8d12b4f012ad5dd0c85a
d00be105055225808a242cd6bd8411b376c4f4e1
/src/net/java/sip/communicator/impl/protocol/jabber/extensions/mailnotification/NewMailNotificationIQ.java
cbbd10a013d4ffd6586c554597bb3bdf226fd55c
[]
no_license
zhiji6/sip-comm-jn
bae7d463353de91a5e95bfb4ea5bb85e42c7609c
8259cf641bd4d868481c0ef4785a5ce75aac098d
refs/heads/master
2020-04-29T02:52:02.743960
2010-11-08T19:48:29
2010-11-08T19:48:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,653
java
/* * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client. * * Distributable under LGPL license. * See terms of license at gnu.org. */ package net.java.sip.communicator.impl.protocol.jabber.extensions.mailnotification; import org.jivesoftware.smack.packet.*; import net.java.sip.communicator.util.*; /** * A straightforward IQ extension. A <tt>NewMailNotification</tt> object is * created via the <tt>NewMailNotificationProvider</tt>. It contains the * information we need in order to determine whether there are new mails waiting * for us on the mail server. * * @author Matthieu Helleringer * @author Alain Knaebel * @author Emil Ivov */ public class NewMailNotificationIQ extends IQ { /** * Logger for this class */ private static final Logger logger = Logger.getLogger(NewMailNotificationIQ.class); /** * The name space for new mail notification packets. */ public static final String NAMESPACE = "google:mail:notify"; /** * The name of the element that Google use to transport new mail * notifications. */ public static final String ELEMENT_NAME = "new-mail"; /** * Returns the sub-element XML section of the IQ packet. * * @return the child element section of the IQ XML */ @Override public String getChildElementXML() { if (logger.isTraceEnabled()) logger.trace("NewMailNotification.getChildElementXML usage"); return "<iq type='"+"result"+"' "+ "from='"+getFrom()+"' "+ "to='"+getTo()+"' "+ "id='"+getPacketID()+"' />"; } }
[ "barata7@gmail.com" ]
barata7@gmail.com
46e97e8723e2b7ee80dab48841498d700d2004d0
30a438f1df1aaaa9864aaff622598c411f2f50a2
/src/main/java/com/noreg/margareta/service/InvalidPasswordException.java
4d182ae06fb75e33f826406a413d28a851ba7adc
[]
no_license
bukodi/mrg-ui2
89094259692f7b65ad30f3dafa063fb619340393
8c8811c928f3c2c4e036366efba36de9db63f50e
refs/heads/main
2023-05-07T13:48:50.819399
2021-06-02T20:28:14
2021-06-02T20:28:14
373,294,705
0
0
null
null
null
null
UTF-8
Java
false
false
243
java
package com.noreg.margareta.service; public class InvalidPasswordException extends RuntimeException { private static final long serialVersionUID = 1L; public InvalidPasswordException() { super("Incorrect password"); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
83ca0c145a2dad6d50e5d363810a5fd4c5388314
46167791cbfeebc8d3ddc97112764d7947fffa22
/spring-boot/src/main/java/com/justexample/entity/Entity0059.java
af8d5d443214aa9e121d2ac4376702258b8735dd
[]
no_license
kahlai/unrealistictest
4f668b4822a25b4c1f06c6b543a26506bb1f8870
fe30034b05f5aacd0ef69523479ae721e234995c
refs/heads/master
2023-08-25T09:32:16.059555
2021-11-09T08:17:22
2021-11-09T08:17:22
425,726,016
0
0
null
null
null
null
UTF-8
Java
false
false
1,134
java
package com.justexample.entity; import java.sql.Timestamp; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class Entity0059 { @Id private Long id; private String code; private String name; private String status; private int seq; private Timestamp createdDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public int getSeq() { return seq; } public void setSeq(int seq) { this.seq = seq; } public Timestamp getCreatedDate() { return createdDate; } public void setCreatedDate(Timestamp createdDate) { this.createdDate = createdDate; } }
[ "laikahhoe@gmail.com" ]
laikahhoe@gmail.com
5c91681fe4c1e9be50abdff09ec763c0408df484
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
/bin/modules/backoffice-framework/backoffice/web/testsrc/com/hybris/backoffice/workflow/renderer/predicates/StartWorkflowActionPredicateTest.java
d06cca901b207318f5c2a219bf3cc5d9ec046604
[]
no_license
jp-developer0/hybrisTrail
82165c5b91352332a3d471b3414faee47bdb6cee
a0208ffee7fee5b7f83dd982e372276492ae83d4
refs/heads/master
2020-12-03T19:53:58.652431
2020-01-02T18:02:34
2020-01-02T18:02:34
231,430,332
0
4
null
2020-08-05T22:46:23
2020-01-02T17:39:15
null
UTF-8
Java
false
false
1,379
java
/* * Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved */ package com.hybris.backoffice.workflow.renderer.predicates; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.when; import de.hybris.platform.workflow.WorkflowStatus; import de.hybris.platform.workflow.model.WorkflowModel; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import com.hybris.backoffice.workflow.WorkflowFacade; @RunWith(MockitoJUnitRunner.class) public class StartWorkflowActionPredicateTest { @Mock private WorkflowFacade facade; @Mock private WorkflowModel workflow; @InjectMocks private StartWorkflowActionPredicate predicate; @Test public void testPredicateWhenWorkflowCanBeStarted() { //given when(facade.getWorkflowStatus(workflow)).thenReturn(WorkflowStatus.PLANNED); when(facade.canBeStarted(workflow)).thenReturn(true); //when final boolean result = predicate.test(workflow); //then assertThat(result).isTrue(); } @Test public void testPredicateWhenWorkflowCannotBeStarted() { //given when(facade.getWorkflowStatus(workflow)).thenReturn(WorkflowStatus.TERMINATED); //when final boolean result = predicate.test(workflow); //then assertThat(result).isFalse(); } }
[ "juan.gonzalez.working@gmail.com" ]
juan.gonzalez.working@gmail.com
7b97ef7b7e07091f22efd61522406ea352f81910
e96172bcad99d9fddaa00c25d00a319716c9ca3a
/plugin/src/main/java/com/intellij/java/impl/refactoring/replaceConstructorWithBuilder/ParameterData.java
b01246c231fc3e384d18979bc4747e53ccb81490
[ "Apache-2.0" ]
permissive
consulo/consulo-java
8c1633d485833651e2a9ecda43e27c3cbfa70a8a
a96757bc015eff692571285c0a10a140c8c721f8
refs/heads/master
2023-09-03T12:33:23.746878
2023-08-29T07:26:25
2023-08-29T07:26:25
13,799,330
5
4
Apache-2.0
2023-01-03T08:32:23
2013-10-23T09:56:39
Java
UTF-8
Java
false
false
4,748
java
/* * Copyright 2000-2009 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * User: anna * Date: 04-Feb-2009 */ package com.intellij.java.impl.refactoring.replaceConstructorWithBuilder; import com.intellij.java.language.psi.*; import consulo.logging.Logger; import consulo.util.lang.Comparing; import com.intellij.java.language.psi.codeStyle.JavaCodeStyleManager; import com.intellij.java.language.psi.codeStyle.VariableKind; import com.intellij.java.language.psi.util.PropertyUtil; import com.intellij.java.impl.refactoring.util.RefactoringUtil; import java.util.Map; public class ParameterData { private final String myParameterName; private final PsiType myType; private String myFieldName; private String mySetterName; private String myDefaultValue; private boolean myInsertSetter = true; private static final Logger LOG = Logger.getInstance(ParameterData.class); public ParameterData(String parameterName, PsiType type) { myParameterName = parameterName; myType = type; } public static void createFromConstructor(final PsiMethod constructor, final Map<String, ParameterData> result) { for (PsiParameter parameter : constructor.getParameterList().getParameters()) { initParameterData(parameter, result); } final PsiMethod chainedConstructor = RefactoringUtil.getChainedConstructor(constructor); if (chainedConstructor != null) { final PsiCodeBlock constructorBody = constructor.getBody(); LOG.assertTrue(constructorBody != null); final PsiStatement thisStatement = constructorBody.getStatements()[0]; final PsiExpression thisExpression = ((PsiExpressionStatement)thisStatement).getExpression(); final PsiExpression[] args = ((PsiMethodCallExpression)thisExpression).getArgumentList().getExpressions(); int i = 0; for (final PsiParameter parameter : chainedConstructor.getParameterList().getParameters()) { if (!parameter.isVarArgs()) { final PsiExpression arg = args[i]; final ParameterData parameterData = initParameterData(parameter, result); if (!(arg instanceof PsiReferenceExpression && ((PsiReferenceExpression)arg).resolve() instanceof PsiParameter)) { parameterData.setDefaultValue(arg.getText()); } i++; } } } } private static ParameterData initParameterData(PsiParameter parameter, Map<String, ParameterData> result) { JavaCodeStyleManager styleManager = JavaCodeStyleManager.getInstance(parameter.getProject()); final String paramName = parameter.getName(); final String pureParamName = styleManager.variableNameToPropertyName(paramName, VariableKind.PARAMETER); String uniqueParamName = pureParamName; ParameterData parameterData = result.get(uniqueParamName); int i = 0; while (parameterData != null) { if (!Comparing.equal(parameter.getType(), parameterData.getType())) { uniqueParamName = pureParamName + i++; parameterData = result.get(uniqueParamName); } else { break; } } if (parameterData == null) { parameterData = new ParameterData(paramName, parameter.getType()); parameterData.setFieldName(styleManager.suggestVariableName(VariableKind.FIELD, uniqueParamName, null, parameter.getType()).names[0]); parameterData.setSetterName(PropertyUtil.suggestSetterName(uniqueParamName)); result.put(uniqueParamName, parameterData); } return parameterData; } public PsiType getType() { return myType; } public String getFieldName() { return myFieldName; } public String getSetterName() { return mySetterName; } public String getParamName() { return myParameterName; } public String getDefaultValue() { return myDefaultValue; } public boolean isInsertSetter() { return myInsertSetter; } public void setFieldName(String fieldName) { myFieldName = fieldName; } public void setSetterName(String setterName) { mySetterName = setterName; } public void setDefaultValue(String defaultValue) { myDefaultValue = defaultValue; } public void setInsertSetter(boolean insertSetter) { myInsertSetter = insertSetter; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
0a636e2e440c5fc09827f9134dd694328e9a8e59
18b731ab437622d5936e531ece88c3dd0b2bb2ea
/PBTD-Search/src/com/yh/search/tv/action/TvUrlJsonAction.java
1934965fe1ebada8adfa0201cc7aebb6012ad8d1
[]
no_license
harry0102/bai_project
b6c130e7235d220f2f0d4294a3f87b58f77cd265
674c6ddff7cf5dae514c69d2639d4b0245c0761f
refs/heads/master
2021-10-07T20:32:15.985439
2018-12-05T06:50:11
2018-12-05T06:50:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,638
java
package com.yh.search.tv.action; import java.io.IOException; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts2.ServletActionContext; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Namespace; import org.apache.struts2.convention.annotation.ParentPackage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import com.opensymphony.xwork2.ActionSupport; import com.yh.search.tv.bean.TvSubSearchItem; import com.yh.search.tv.service.TvUrlJsonService; import lombok.Setter; import net.sf.json.JSONArray; import net.sf.json.JSONObject; /** * 手机端根据id获取搜索列表 * * @author 程先生 * */ @SuppressWarnings("all") @ParentPackage("struts-default") @Namespace("") @Controller("tvUrlJsonAction") @Scope("prototype") @Action("tvUrlJsonAction") public class TvUrlJsonAction extends ActionSupport{ @Autowired private TvUrlJsonService urlJsonService; @Setter private String seriesId; /** * 影片相关推荐 * 获取某个影片的相关推荐影片 * 接口名:getRelativeSeries */ public String getRelativeSeries() throws IOException { JSONObject json = new JSONObject(); HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); response.setContentType("text/html;charset=utf-8"); String cht_id=request.getParameter("cht_id")==null?"":request.getParameter("cht_id").toString();//鉴权成功返回值(base64加密) String proj_id=request.getParameter("proj_id")==null?"":request.getParameter("proj_id").toString();//运营平台生成的项目ID String group_id=request.getParameter("group_id")==null?"":request.getParameter("group_id").toString();//mac try { if (seriesId != null && !"".equals(seriesId)) { List<TvSubSearchItem> result = urlJsonService.getSubSearch(seriesId); if (result.size() != 0) { json.accumulate("code", 1); json.accumulate("message", "成功"); json.accumulate("data", JSONArray.fromObject(result)); } else { json.accumulate("code", 0); json.accumulate("message", "无数据"); } }else{ json.accumulate("code", 0); json.accumulate("message", "无数据"); } } catch (Exception e) { e.printStackTrace(); json.accumulate("code", 0); json.accumulate("message", "访问超时"); } response.getWriter().write(json.toString()); return null; } }
[ "750460470@qq.com" ]
750460470@qq.com
d598e815a1c92f880625782237bb1655a3550b9d
fd6d7a71860f047d623f77c7c776036281e0c6ff
/app/src/main/java/zblibrary/demo/DEMO/DemoListActivity.java
2e67d4a37cc4df0481499b7622c7e67e05913a49
[ "Apache-2.0" ]
permissive
TommyLemon/Android-ZBLibrary
37c1cabf22b64bd3fc0300345bceb257eb891539
2e628f482eeb150c14c0a0cdd9c42c1fc6794236
refs/heads/master
2023-08-19T09:08:11.686347
2023-08-09T03:44:37
2023-08-09T03:44:37
41,105,450
5,791
1,516
Apache-2.0
2022-08-02T08:39:35
2015-08-20T16:03:53
Java
UTF-8
Java
false
false
6,692
java
/*Copyright ©2015 TommyLemon(https://github.com/TommyLemon) 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 zblibrary.demo.DEMO; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.GridView; import java.util.ArrayList; import java.util.List; import zblibrary.demo.R; import zblibrary.demo.util.TestUtil; import zuo.biao.library.base.BaseListActivity; import zuo.biao.library.interfaces.AdapterCallBack; import zuo.biao.library.interfaces.OnBottomDragListener; import zuo.biao.library.model.Entry; import zuo.biao.library.ui.GridAdapter; /** 使用方法:复制>粘贴>改名>改代码 */ /**列表Activity示例 * @author Lemon * @warn 这里列表显示组件lvBaseList是GridView,如果是lvBaseList是ListView就改成ListView * @use toActivity(DemoListActivity.createIntent(...)); */ public class DemoListActivity extends BaseListActivity<Entry<String, String>, GridView, GridAdapter> implements OnBottomDragListener { // private static final String TAG = "DemoListActivity"; //启动方法<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< public static final String INTENT_RANGE = "INTENT_RANGE"; public static final String RESULT_CLICKED_ITEM = "RESULT_CLICKED_ITEM"; /**启动这个Activity的Intent * @param context * @return */ public static Intent createIntent(Context context, int range) { return new Intent(context, DemoListActivity.class).putExtra(INTENT_RANGE, range); } //启动方法>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> private int range = 0; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //TODO demo_list_activity改为你所需要的layout文件;传this是为了底部左右滑动手势 setContentView(R.layout.demo_list_activity, this); intent = getIntent(); range = intent.getIntExtra(INTENT_RANGE, range); // initCache(this);//初始化缓存,Entry<String, String>替换成不带类型的类才可使用,原因看 .CacheCallBack //功能归类分区方法,必须调用<<<<<<<<<< initView(); initData(); initEvent(); //功能归类分区方法,必须调用>>>>>>>>>> onRefresh(); } //UI显示区(操作UI,但不存在数据获取或处理代码,也不存在事件监听代码)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @Override public void initView() {//必须在onCreate方法内调用 super.initView(); } @Override public void setList(final List<Entry<String, String>> list) { //示例代码<<<<<<<<<<<<<<< setList(new AdapterCallBack<GridAdapter>() { @Override public void refreshAdapter() { adapter.refresh(list); } @Override public GridAdapter createAdapter() { return new GridAdapter(context); } }); //示例代码>>>>>>>>>>>>>>> } //UI显示区(操作UI,但不存在数据获取或处理代码,也不存在事件监听代码)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> //Data数据区(存在数据获取或处理代码,但不存在事件监听代码)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @Override public void initData() {//必须在onCreate方法内调用 super.initData(); //示例代码<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< tvBaseTitle.setText("" + lvBaseList.getClass().getSimpleName()); showShortToast("range = " + range); //示例代码>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> } @Override public void getListAsync(int page) { showProgressDialog(R.string.loading); List<Entry<String, String>> list = new ArrayList<Entry<String, String>>(); for (int i = 0; i < 6; i++) { list.add(new Entry<String, String>(getPictureUrl(i + 6*page), "联系人" + i + 6*page)); } onLoadSucceed(page, list); } /**获取图片地址,仅供测试用 * @param userId * @return */ private String getPictureUrl(int userId) { return TestUtil.getPicture(userId % 6); } //Data数据区(存在数据获取或处理代码,但不存在事件监听代码)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> //Event事件区(只要存在事件监听代码就是)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @Override public void initEvent() {//必须在onCreate方法内调用 super.initEvent(); //如果adapter类型是zuo.biao.library.base.BaseAdapter,这两句就不用写了 lvBaseList.setOnItemClickListener(this); lvBaseList.setOnItemLongClickListener(this); } @Override public void onDragBottom(boolean rightToLeft) { if (rightToLeft) { return; } finish(); } //示例代码:ItemView点击和长按事件处理 <<<<<<<<<<<<<<<<<<< @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // //如果lvBaseList有headerView或footerView <<<<<<<<<<<<<<< // position -= lvBaseList.getHeaderViewsCount();//ListView的方法,GridView没有 // if (position < 0 || adapter == null || position >= adapter.getCount()) { // return; // } // //如果lvBaseList有headerView或footerView >>>>>>>>>>>>>>> showShortToast("选择了 " + adapter.getItem(position).getValue()); setResult(RESULT_OK, new Intent().putExtra(RESULT_CLICKED_ITEM, position)); finish(); } @Override public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) { showShortToast("长按了 " + position); return true; } //示例代码:ItemView点击和长按事件处理 >>>>>>>>>>>>>>>>>>> //生命周期、onActivityResult<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //生命周期、onActivityResult>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> //Event事件区(只要存在事件监听代码就是)>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> //内部类,尽量少用<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< //内部类,尽量少用>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> }
[ "1184482681@qq.com" ]
1184482681@qq.com
a9b4f467460a19adf4a208699052dba3ec76a6c1
4b9f1981e67913b9fae4b3f5fb5f29cb1be4ca0f
/src/com/bvan/oop/lessons3_4/shape/Rectangle.java
6077285a0fecf083304798c9d0a7c368924f8ca5
[]
no_license
bohdanvan/javaoop-group44
0a39d3d6058ce3041f5b679568677bd6a2eef65a
88e14dd7e29d24dc38c062bd4b8160b9e72c92c0
refs/heads/master
2021-01-13T15:55:32.712634
2018-10-24T11:18:39
2018-10-24T11:18:39
76,787,824
0
0
null
null
null
null
UTF-8
Java
false
false
1,130
java
package com.bvan.oop.lessons3_4.shape; /** * @author bvanchuhov */ public class Rectangle implements Shape { private final double width; private final double height; public Rectangle(double width, double height) { checkWidth(width); checkHeight(height); this.width = width; this.height = height; } private void checkHeight(double height) { if (height <= 0) { throw new IllegalArgumentException("not positive height: " + height); } } private void checkWidth(double width) { if (width <= 0) { throw new IllegalArgumentException("not positive width: " + width); } } public double getPerimeter() { return 2 * (width + height); } public double getArea() { return width * height; } public double getWidth() { return width; } public double getHeight() { return height; } @Override public String toString() { return "Rectangle{" + "a=" + width + ", b=" + height + '}'; } }
[ "bodya.van@gmail.com" ]
bodya.van@gmail.com
a6a3ea96ffddc90536435a99bc983a16bd2137a9
b1b93a4defa773b73862c525b423ed6f7abcaa62
/jbpm-gwt/jbpm-gwt-core/src/test/java/org/jbpm/integration/console/LocalTaskServiceTest.java
4a03b59c5126b928a77b6c82fdf7be3aa59808d3
[]
no_license
dunnlow/jbpm-2
0d1ff82ec494202d2fbec41cffb592b60edbc402
e7321b9807c666437bdf1c712dd4edf7f00bb9d7
refs/heads/master
2021-01-18T05:36:16.035150
2013-03-10T15:42:42
2013-03-10T15:42:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,007
java
package org.jbpm.integration.console; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.fail; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import org.jboss.bpm.console.client.model.TaskRef; import org.jbpm.process.audit.JPAProcessInstanceDbLog; import org.jbpm.process.audit.ProcessInstanceLog; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; import org.kie.runtime.StatefulKnowledgeSession; import org.kie.runtime.process.NodeInstance; import bitronix.tm.resource.jdbc.PoolingDataSource; public class LocalTaskServiceTest { private static PoolingDataSource pds; @BeforeClass public static void setup() { pds = new PoolingDataSource(); pds.setUniqueName("jdbc/jbpm-local-ds"); pds.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource"); pds.setMaxPoolSize(5); pds.setAllowLocalTransactions(true); pds.getDriverProperties().put("user", "sa"); pds.getDriverProperties().put("password", ""); pds.getDriverProperties().put("url", "jdbc:h2:mem:test;DB_CLOSE_DELAY=-1"); pds.getDriverProperties().put("driverClassName", "org.h2.Driver"); pds.init(); System.setProperty("jbpm.conf.dir", "./src/test/resources/local"); System.setProperty("jbpm.console.directory","./src/test/resources"); } @AfterClass public static void tearDown() { pds.close(); System.clearProperty("jbpm.conf.dir"); System.clearProperty("jbpm.console.directory"); } @Test public void testNewInstance() throws Exception { StatefulKnowledgeSession session = StatefulKnowledgeSessionUtil.getStatefulKnowledgeSession(); JPAProcessInstanceDbLog.setEnvironment(session.getEnvironment()); TaskManagement taskMgmt = new TaskManagement(); Map<String, Object> params = new HashMap<String, Object>(); String definitionId = "UserTaskLocal"; ProcessInstanceLog processInstance = CommandDelegate.startProcess(definitionId, params); Collection<NodeInstance> activeNodes = CommandDelegate.getActiveNodeInstances(processInstance.getId()); assertNotNull(activeNodes); List<TaskRef> tasks = taskMgmt.getAssignedTasks("Tony Stark"); assertNotNull(tasks); assertEquals(1, tasks.size()); try { taskMgmt.completeTask(tasks.get(0).getId(), new HashMap(), "Tony Stark"); fail("Should fail"); } catch (Exception e) { } tasks = taskMgmt.getAssignedTasks("Tony Stark"); assertNotNull(tasks); assertEquals(1, tasks.size()); // abort process instance to clean up session.abortProcessInstance(processInstance.getProcessInstanceId()); } }
[ "mswiders@redhat.com" ]
mswiders@redhat.com
7c63a6c13afda91f1ae89641e9ecca94ed690edd
843475616d8acbe9846fa5784af01348668e6a54
/lint/src/main/java/com/app/perlint/dom/PercentDomExtender.java
8df7671e9a56920fc2c34ef06f93fd14917e3284
[]
no_license
fengxiaocan/PercentLayout
7b3e9cb90002adda6a9665c582f3fa6990d59cf1
eaa4353dd19ab198e14d6ceae503f12cd1de9904
refs/heads/master
2022-11-12T22:41:50.446652
2020-06-29T10:28:06
2020-06-29T10:28:06
275,763,757
0
0
null
null
null
null
UTF-8
Java
false
false
5,033
java
/* * Copyright (C) 2019 Cricin * * 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.app.perlint.dom; import com.intellij.openapi.extensions.ExtensionPoint; import com.intellij.openapi.extensions.Extensions; import com.intellij.util.xml.GenericAttributeValue; import com.intellij.util.xml.reflect.DomExtender; import com.intellij.util.xml.reflect.DomExtenderEP; import com.intellij.util.xml.reflect.DomExtensionsRegistrar; import org.jetbrains.android.dom.AndroidDomElement; import org.jetbrains.android.dom.AttributeProcessingUtil; import org.jetbrains.android.dom.resources.ResourceValue; import org.jetbrains.android.facet.AndroidFacet; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Set; import javax.annotation.Nonnull; /** * 元素节点解析器 */ @SuppressWarnings("unchecked") public final class PercentDomExtender extends DomExtender<AndroidDomElement>{ private static HashMap<Object,Class> sValueClasses=new HashMap<>(); static{ try{ Class legacyAttributeFormatClass=Class.forName("org.jetbrains.android.dom.attrs.AttributeFormat"); sValueClasses.put(Enum.valueOf(legacyAttributeFormatClass,"Boolean"),boolean.class); sValueClasses.put(Enum.valueOf(legacyAttributeFormatClass,"Reference"),ResourceValue.class); sValueClasses.put(Enum.valueOf(legacyAttributeFormatClass,"Dimension"),ResourceValue.class); sValueClasses.put(Enum.valueOf(legacyAttributeFormatClass,"Color"),ResourceValue.class); } catch(ClassNotFoundException ignore){ } try{ Class.forName("com.android.ide.common.rendering.api.AttributeFormat"); sValueClasses.put(com.android.ide.common.rendering.api.AttributeFormat.BOOLEAN,boolean.class); sValueClasses.put(com.android.ide.common.rendering.api.AttributeFormat.REFERENCE,ResourceValue.class); sValueClasses.put(com.android.ide.common.rendering.api.AttributeFormat.DIMENSION,ResourceValue.class); sValueClasses.put(com.android.ide.common.rendering.api.AttributeFormat.COLOR,ResourceValue.class); } catch(ClassNotFoundException ignore){ } } @Override public boolean supportsStubs(){ return false; } private static Class getValueClass(Object format){ Class cls=sValueClasses.get(format); return cls==null ? String.class : cls; } @Override public void registerExtensions(@Nonnull AndroidDomElement element,@Nonnull final DomExtensionsRegistrar registrar){ final AndroidFacet facet=AndroidFacet.getInstance(element); if(facet==null){ return; } AttributeProcessingUtil.AttributeProcessor callback=(xmlName,attrDef,parentStyleableName)->{ Set<?> formats=attrDef.getFormats(); Class valueClass=formats.size()==1 ? getValueClass(formats.iterator().next()) : String.class; registrar.registerAttributeChildExtension(xmlName,GenericAttributeValue.class); return registrar.registerGenericAttributeValueChildExtension(xmlName,valueClass); }; try{ PercentAttrProcessing.registerPercentAttributes(facet,element,callback); } catch(Exception ignore){ } } public static void install(){ ExtensionPoint<DomExtenderEP> point=Extensions.getRootArea().getExtensionPoint(DomExtenderEP.EP_NAME); String clazzName=PercentDomExtender.class.getCanonicalName(); DomExtenderEP androidDomExtenderEp=null; DomExtenderEP[] eps=point.getExtensions(); for(DomExtenderEP ep: eps){ if(clazzName.equals(ep.extenderClassName)){ return;// already registered } if(ep.extenderClassName.endsWith("AndroidDomExtender")){ androidDomExtenderEp=ep; } } if(androidDomExtenderEp!=null){ DomExtenderEP ep=new DomExtenderEP(); ep.setPluginDescriptor(androidDomExtenderEp.getPluginDescriptor()); ep.domClassName=AndroidDomElement.class.getCanonicalName(); ep.extenderClassName=PercentDomExtender.class.getCanonicalName(); try{ Field field=ep.getClass().getDeclaredField("myExtender"); field.setAccessible(true); field.set(ep,new PercentDomExtender()); point.registerExtension(ep); } catch(Exception ignore){ } } } }
[ "fengxiaocan@gmail.com" ]
fengxiaocan@gmail.com
883b23d0ebad87fb8fb182c57d847fda1bf66dbd
429e99a677707673b828434f273c11c647ccfb62
/src/main/java/me/egg82/btorce/services/Configuration.java
6f21368370d8d5c89e366c92affa7c564916a86d
[ "MIT" ]
permissive
antichown/BruteTorce-Java
d2bf68f11c7f40696b9ee88efda4ee055a45c8a4
3fd10a738effe7cc2124524ce4c50acbb23c1a7e
refs/heads/master
2021-10-09T21:57:42.944843
2019-01-04T00:37:20
2019-01-04T00:37:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
283
java
package me.egg82.btorce.services; import ninja.egg82.configuration.AbstractConfiguration; import ninja.leaping.configurate.ConfigurationNode; public class Configuration extends AbstractConfiguration { public Configuration(ConfigurationNode root) { super(root); } }
[ "phantom_zero@ymail.com" ]
phantom_zero@ymail.com