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
5a54f919af00ff29f37066f58092228920107ded
f1a4e131a1301419ec1d361139bc43401fb204a4
/tablayout/src/main/java/com/daqsoft/tablayout/utils/FragmentChangeManager.java
3a9842056ff981a4c60595a5bc3c828728f7c5b8
[]
no_license
1976222027/BaseAndroid
a18cd1e094ee25343e7872cd4f84b77bf54af23a
ce13d42828b7e06becdbba37f3e54d6ed7c801e4
refs/heads/master
2020-07-08T13:07:29.969732
2019-08-21T09:56:17
2019-08-21T09:56:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,599
java
package com.daqsoft.tablayout.utils; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import java.util.ArrayList; public class FragmentChangeManager { private FragmentManager mFragmentManager; private int mContainerViewId; /** Fragment切换数组 */ private ArrayList<Fragment> mFragments; /** 当前选中的Tab */ private int mCurrentTab; public FragmentChangeManager(FragmentManager fm, int containerViewId, ArrayList<Fragment> fragments) { this.mFragmentManager = fm; this.mContainerViewId = containerViewId; this.mFragments = fragments; initFragments(); } /** 初始化fragments */ private void initFragments() { for (Fragment fragment : mFragments) { mFragmentManager.beginTransaction().add(mContainerViewId, fragment).hide(fragment).commit(); } setFragments(0); } /** 界面切换控制 */ public void setFragments(int index) { for (int i = 0; i < mFragments.size(); i++) { FragmentTransaction ft = mFragmentManager.beginTransaction(); Fragment fragment = mFragments.get(i); if (i == index) { ft.show(fragment); } else { ft.hide(fragment); } ft.commit(); } mCurrentTab = index; } public int getCurrentTab() { return mCurrentTab; } public Fragment getCurrentFragment() { return mFragments.get(mCurrentTab); } }
[ "760375443@qq.com" ]
760375443@qq.com
379b06bbb9aa3ea33466672bc92f2c9ee4276c4a
947edc58e161933b70d595242d4663a6d0e68623
/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/entity/SysQywxApplicationAuthorizer.java
0053bd748f59312296d11679c9b5ad174c398501
[]
no_license
jieke360/pig6
5a5de28b0e4785ff8872e7259fc46d1f5286d4d9
8413feed8339fab804b11af8d3fbab406eb80b68
refs/heads/master
2023-02-04T12:39:34.279157
2020-12-31T03:57:43
2020-12-31T03:57:43
325,705,631
0
0
null
null
null
null
UTF-8
Java
false
false
6,422
java
/* * Copyright (c) 2018-2025, lengleng All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the pig4cloud.com developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: lengleng (wangiegie@gmail.com) */ package com.pig4cloud.pigx.admin.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.activerecord.Model; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import java.io.Serializable; import java.time.LocalDateTime; /** * 企业微信第三方应用开发接入授权企业信息 * * @author gaoxiao * @date 2020-04-23 11:39:08 */ @Data @TableName("sys_qywx_application_authorizer") @EqualsAndHashCode(callSuper = true) @ApiModel(value = "企业微信第三方应用开发接入授权企业信息") public class SysQywxApplicationAuthorizer extends Model<SysQywxApplicationAuthorizer> { private static final long serialVersionUID = 1L; /** * */ @TableId @ApiModelProperty(value="") private Integer id; /** * 企业微信永久授权码,最长为512字节 */ @ApiModelProperty(value="企业微信永久授权码,最长为512字节") private String permanentCode; /** * 授权方(企业)access_token,最长为512字节 */ @ApiModelProperty(value="授权方(企业)access_token,最长为512字节") private String accessToken; /** * access_token过期时间 */ @ApiModelProperty(value="access_token过期时间") private String accessTokenExpiresTime; /** * jssdk生成签名所需的jsapi_ticket(企业) */ @ApiModelProperty(value="jssdk生成签名所需的jsapi_ticket(企业)") private String corpJsapiTick; /** * jssdk生成签名所需的jsapi_ticket\r\n(应用)         刷新规则同access_token */ @ApiModelProperty(value="jssdk生成签名所需的jsapi_ticket\r\n(应用)         刷新规则同access_token") private String jsapiTicket; /** * access_token过期时间 */ @ApiModelProperty(value="access_token过期时间") private String jsExpiresTime; /** * 第三方应用的suiteId */ @ApiModelProperty(value="第三方应用的suiteId") private String suiteId; /** * 授权方企业微信id */ @ApiModelProperty(value="授权方企业微信id") private String authCorpid; /** * 授权方企业名称 */ @ApiModelProperty(value="授权方企业名称") private String authCorpName; /** * 授权方企业类型,认证号:verified, 注册号:unverified */ @ApiModelProperty(value="授权方企业类型,认证号:verified, 注册号:unverified") private String authCorpType; /** * 授权方企业方形头像 */ @ApiModelProperty(value="授权方企业方形头像") private String authCorpSquareLogoUrl; /** * 授权方企业用户规模 */ @ApiModelProperty(value="授权方企业用户规模") private Integer authCorpUserMax; /** * 授权方企业的主体名称(仅认证过的企业有)' */ @ApiModelProperty(value="授权方企业的主体名称(仅认证过的企业有)'") private String authCorpFullName; /** * 企业类型,1. 企业; 2. 政府以及事业单位; 3. 其他组织, 4.团队号 */ @ApiModelProperty(value="企业类型,1. 企业; 2. 政府以及事业单位; 3. 其他组织, 4.团队号") private Integer authSubjectType; /** * 认证到期时间 */ @ApiModelProperty(value="认证到期时间") private String authVerifiedEndTime; /** * 授权企业在微工作台(原企业号)的二维码,可用于关注微工作台 */ @ApiModelProperty(value="授权企业在微工作台(原企业号)的二维码,可用于关注微工作台") private String authCorpWxqrcode; /** * 企业规模。当企业未设置该属性时,值为空 */ @ApiModelProperty(value="企业规模。当企业未设置该属性时,值为空") private String authCorpScale; /** * 企业所属行业。当企业未设置该属性时,值为空 */ @ApiModelProperty(value="企业所属行业。当企业未设置该属性时,值为空") private String authCorpIndustry; /** * 企业所属子行业。当企业未设置该属性时,值为空 */ @ApiModelProperty(value="企业所属子行业。当企业未设置该属性时,值为空") private String authCorpSubIndustry; /** * 企业所在地信息, 为空时表示未知 */ @ApiModelProperty(value="企业所在地信息, 为空时表示未知") private String authLocation; /** * 授权信息 */ @ApiModelProperty(value="授权信息") private String authInfo; /** * 授权管理员的信息 */ @ApiModelProperty(value="授权管理员的信息") private String authUserInfo; /** * 代理服务商企业信息 */ @ApiModelProperty(value="代理服务商企业信息") private String dealerCorpInfo; /** * 创建时间 */ @ApiModelProperty(value="创建时间") private String createDate; /** * 更新时间 */ @ApiModelProperty(value="更新时间") private String updateDate; /** * 企业通讯录的access_token */ @ApiModelProperty(value="企业通讯录的access_token") private String addressAccessToken; /** * 企业通讯录的access_token过期时间 */ @ApiModelProperty(value="企业通讯录的access_token过期时间") private String addressAccessTokenTime; }
[ "qdgaoxiao@163.com" ]
qdgaoxiao@163.com
fa3ec6c1210b6f5eab0121f716408d966e633b9b
79351f8acc7b001ffe22809329a7b030d85d6482
/src/unluac/decompile/Disassembler.java
7081ac3f91919078f40306b6afafdc9703527068
[ "MIT" ]
permissive
viruscamp/unluac
d05c3eb6ee32c9b4b8fc9e4ba9d1f786fa4c98f9
328c83e9bc70e21a5d92fb2330eaddecee40f9c3
refs/heads/master
2022-10-28T15:57:39.102973
2022-08-06T13:23:11
2022-08-06T13:23:11
41,617,656
92
58
null
null
null
null
UTF-8
Java
false
false
5,410
java
package unluac.decompile; import unluac.assemble.Directive; import unluac.parse.LAbsLineInfo; import unluac.parse.LFunction; import unluac.parse.LLocal; import unluac.parse.LUpvalue; import unluac.util.StringUtils; public class Disassembler { private final LFunction function; private final Code code; private final String name; private final String parent; public Disassembler(LFunction function) { this(function, "main", null); } private Disassembler(LFunction function, String name, String parent) { this.function = function; this.code = new Code(function); this.name = name; this.parent = parent; } public void disassemble(Output out) { disassemble(out, 0, 0); } private void disassemble(Output out, int level, int index) { if(parent == null) { out.println(".version\t" + function.header.version.getName()); out.println(); for(Directive directive : function.header.lheader_type.get_directives()) { directive.disassemble(out, function.header, function.header.lheader); } out.println(); if(function.header.opmap != function.header.version.getOpcodeMap()) { OpcodeMap opmap = function.header.opmap; for(int opcode = 0; opcode < opmap.size(); opcode++) { Op op = opmap.get(opcode); if(op != null) { out.println(Directive.OP.token + "\t" + opcode + "\t" + op.name); } } out.println(); } } String fullname; if(parent == null) { fullname = name; } else { fullname = parent + "/" + name; } out.println(".function\t" + fullname); out.println(); for(Directive directive : function.header.function.get_directives()) { directive.disassemble(out, function.header, function); } out.println(); if(function.locals.length > 0) { for(int local = 1; local <= function.locals.length; local++) { LLocal l = function.locals[local - 1]; out.println(".local\t" + l.name.toPrintString() + "\t" + l.start + "\t" + l.end); } out.println(); } if(function.upvalues.length > 0) { for(int upvalue = 1; upvalue <= function.upvalues.length; upvalue++) { LUpvalue u = function.upvalues[upvalue - 1]; out.println(".upvalue\t" + StringUtils.toPrintString(u.name) + "\t" + u.idx + "\t" + u.instack); } out.println(); } if(function.constants.length > 0) { for(int constant = 1; constant <= function.constants.length; constant++) { out.println(".constant\tk" + (constant - 1) + "\t" + function.constants[constant - 1].toPrintString()); } out.println(); } boolean[] label = new boolean[function.code.length]; for(int line = 1; line <= function.code.length; line++) { Op op = code.op(line); if(op != null && op.hasJump()) { int target = code.target(line); if(target >= 1 && target <= label.length) { label[target - 1] = true; } } } int abslineinfoindex = 0; for(int line = 1; line <= function.code.length; line++) { if(label[line - 1]) { out.println(".label\t" + "l" + line); } if(function.abslineinfo != null && abslineinfoindex < function.abslineinfo.length && function.abslineinfo[abslineinfoindex].pc == line - 1) { LAbsLineInfo info = function.abslineinfo[abslineinfoindex++]; out.println(".abslineinfo\t" + info.pc + "\t" + info.line); } if(line <= function.lines.length) { out.print(".line\t" + function.lines[line - 1] + "\t"); } Op op = code.op(line); String cpLabel = null; if(op != null && op.hasJump()) { int target = code.target(line); if(target >= 1 && target <= code.length) { cpLabel = "l" + target; } } if(op == null) { out.println(Op.defaultToString(code.codepoint(line), function.header.version, code.getExtractor())); } else { out.println(op.codePointToString(code.codepoint(line), code.getExtractor(), cpLabel)); } //out.println("\t" + code.opcode(line) + " " + code.A(line) + " " + code.B(line) + " " + code.C(line) + " " + code.Bx(line) + " " + code.sBx(line) + " " + code.codepoint(line)); } for(int line = function.code.length + 1; line <= function.lines.length; line++) { if(function.abslineinfo != null && abslineinfoindex < function.abslineinfo.length && function.abslineinfo[abslineinfoindex].pc == line - 1) { LAbsLineInfo info = function.abslineinfo[abslineinfoindex++]; out.println(".abslineinfo\t" + info.pc + "\t" + info.line); } out.println(".line\t" + function.lines[line - 1]); } if(function.abslineinfo != null) { while(abslineinfoindex < function.abslineinfo.length) { LAbsLineInfo info = function.abslineinfo[abslineinfoindex++]; out.println(".abslineinfo\t" + info.pc + "\t" + info.line); } } out.println(); int subindex = 0; for(LFunction child : function.functions) { new Disassembler(child, "f" + subindex, fullname).disassemble(out, level + 1, subindex); subindex++; } } }
[ "devnull@localhost" ]
devnull@localhost
0853b21a8ae6885e06f9579dc05d49f43baa7077
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project495/src/main/java/org/gradle/test/performance/largejavamultiproject/project495/p2478/Production49565.java
ee58d8a552be4dc00eb1bf49e69d0588d572ea0f
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,063
java
package org.gradle.test.performance.largejavamultiproject.project495.p2478; import org.gradle.test.performance.largejavamultiproject.project495.p2477.Production49556; public class Production49565 { private Production49556 property0; public Production49556 getProperty0() { return property0; } public void setProperty0(Production49556 value) { property0 = value; } private Production49560 property1; public Production49560 getProperty1() { return property1; } public void setProperty1(Production49560 value) { property1 = value; } private Production49564 property2; public Production49564 getProperty2() { return property2; } public void setProperty2(Production49564 value) { property2 = value; } private String property3; public String getProperty3() { return property3; } public void setProperty3(String value) { property3 = value; } private String property4; public String getProperty4() { return property4; } public void setProperty4(String value) { property4 = value; } private String property5; public String getProperty5() { return property5; } public void setProperty5(String value) { property5 = value; } private String property6; public String getProperty6() { return property6; } public void setProperty6(String value) { property6 = value; } private String property7; public String getProperty7() { return property7; } public void setProperty7(String value) { property7 = value; } private String property8; public String getProperty8() { return property8; } public void setProperty8(String value) { property8 = value; } private String property9; public String getProperty9() { return property9; } public void setProperty9(String value) { property9 = value; } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
6c94bb2972cb822b860e5e61a1d65d1aad16e29d
ef44d044ff58ebc6c0052962b04b0130025a102b
/com.freevisiontech.fvmobile_source_from_JADX/sources/android/support/p001v4/view/AccessibilityDelegateCompat.java
c989dac30ae3001686765480b46453393b0b3dc5
[]
no_license
thedemoncat/FVShare
e610bac0f2dc394534ac0ccec86941ff523e2dfd
bd1e52defaec868f0d1f9b4f2039625c8ff3ee4a
refs/heads/master
2023-08-06T04:11:16.403943
2021-09-25T10:11:13
2021-09-25T10:11:13
410,232,121
2
0
null
null
null
null
UTF-8
Java
false
false
7,957
java
package android.support.p001v4.view; import android.os.Build; import android.os.Bundle; import android.support.annotation.RequiresApi; import android.support.p001v4.view.accessibility.AccessibilityNodeInfoCompat; import android.support.p001v4.view.accessibility.AccessibilityNodeProviderCompat; import android.view.View; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeProvider; /* renamed from: android.support.v4.view.AccessibilityDelegateCompat */ public class AccessibilityDelegateCompat { private static final View.AccessibilityDelegate DEFAULT_DELEGATE = new View.AccessibilityDelegate(); private static final AccessibilityDelegateBaseImpl IMPL; final View.AccessibilityDelegate mBridge = IMPL.newAccessibilityDelegateBridge(this); /* renamed from: android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateBaseImpl */ static class AccessibilityDelegateBaseImpl { AccessibilityDelegateBaseImpl() { } public View.AccessibilityDelegate newAccessibilityDelegateBridge(final AccessibilityDelegateCompat compat) { return new View.AccessibilityDelegate() { public boolean dispatchPopulateAccessibilityEvent(View host, AccessibilityEvent event) { return compat.dispatchPopulateAccessibilityEvent(host, event); } public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) { compat.onInitializeAccessibilityEvent(host, event); } public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { compat.onInitializeAccessibilityNodeInfo(host, AccessibilityNodeInfoCompat.wrap(info)); } public void onPopulateAccessibilityEvent(View host, AccessibilityEvent event) { compat.onPopulateAccessibilityEvent(host, event); } public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child, AccessibilityEvent event) { return compat.onRequestSendAccessibilityEvent(host, child, event); } public void sendAccessibilityEvent(View host, int eventType) { compat.sendAccessibilityEvent(host, eventType); } public void sendAccessibilityEventUnchecked(View host, AccessibilityEvent event) { compat.sendAccessibilityEventUnchecked(host, event); } }; } public AccessibilityNodeProviderCompat getAccessibilityNodeProvider(View.AccessibilityDelegate delegate, View host) { return null; } public boolean performAccessibilityAction(View.AccessibilityDelegate delegate, View host, int action, Bundle args) { return false; } } @RequiresApi(16) /* renamed from: android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateApi16Impl */ static class AccessibilityDelegateApi16Impl extends AccessibilityDelegateBaseImpl { AccessibilityDelegateApi16Impl() { } public View.AccessibilityDelegate newAccessibilityDelegateBridge(final AccessibilityDelegateCompat compat) { return new View.AccessibilityDelegate() { public boolean dispatchPopulateAccessibilityEvent(View host, AccessibilityEvent event) { return compat.dispatchPopulateAccessibilityEvent(host, event); } public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) { compat.onInitializeAccessibilityEvent(host, event); } public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { compat.onInitializeAccessibilityNodeInfo(host, AccessibilityNodeInfoCompat.wrap(info)); } public void onPopulateAccessibilityEvent(View host, AccessibilityEvent event) { compat.onPopulateAccessibilityEvent(host, event); } public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child, AccessibilityEvent event) { return compat.onRequestSendAccessibilityEvent(host, child, event); } public void sendAccessibilityEvent(View host, int eventType) { compat.sendAccessibilityEvent(host, eventType); } public void sendAccessibilityEventUnchecked(View host, AccessibilityEvent event) { compat.sendAccessibilityEventUnchecked(host, event); } public AccessibilityNodeProvider getAccessibilityNodeProvider(View host) { AccessibilityNodeProviderCompat provider = compat.getAccessibilityNodeProvider(host); if (provider != null) { return (AccessibilityNodeProvider) provider.getProvider(); } return null; } public boolean performAccessibilityAction(View host, int action, Bundle args) { return compat.performAccessibilityAction(host, action, args); } }; } public AccessibilityNodeProviderCompat getAccessibilityNodeProvider(View.AccessibilityDelegate delegate, View host) { AccessibilityNodeProvider provider = delegate.getAccessibilityNodeProvider(host); if (provider != null) { return new AccessibilityNodeProviderCompat(provider); } return null; } public boolean performAccessibilityAction(View.AccessibilityDelegate delegate, View host, int action, Bundle args) { return delegate.performAccessibilityAction(host, action, args); } } static { if (Build.VERSION.SDK_INT >= 16) { IMPL = new AccessibilityDelegateApi16Impl(); } else { IMPL = new AccessibilityDelegateBaseImpl(); } } /* access modifiers changed from: package-private */ public View.AccessibilityDelegate getBridge() { return this.mBridge; } public void sendAccessibilityEvent(View host, int eventType) { DEFAULT_DELEGATE.sendAccessibilityEvent(host, eventType); } public void sendAccessibilityEventUnchecked(View host, AccessibilityEvent event) { DEFAULT_DELEGATE.sendAccessibilityEventUnchecked(host, event); } public boolean dispatchPopulateAccessibilityEvent(View host, AccessibilityEvent event) { return DEFAULT_DELEGATE.dispatchPopulateAccessibilityEvent(host, event); } public void onPopulateAccessibilityEvent(View host, AccessibilityEvent event) { DEFAULT_DELEGATE.onPopulateAccessibilityEvent(host, event); } public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event) { DEFAULT_DELEGATE.onInitializeAccessibilityEvent(host, event); } public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) { DEFAULT_DELEGATE.onInitializeAccessibilityNodeInfo(host, info.unwrap()); } public boolean onRequestSendAccessibilityEvent(ViewGroup host, View child, AccessibilityEvent event) { return DEFAULT_DELEGATE.onRequestSendAccessibilityEvent(host, child, event); } public AccessibilityNodeProviderCompat getAccessibilityNodeProvider(View host) { return IMPL.getAccessibilityNodeProvider(DEFAULT_DELEGATE, host); } public boolean performAccessibilityAction(View host, int action, Bundle args) { return IMPL.performAccessibilityAction(DEFAULT_DELEGATE, host, action, args); } }
[ "nl.ruslan@yandex.ru" ]
nl.ruslan@yandex.ru
127489caefe39c6d0be50ba04f2db5f2f93b3175
e0a77f146b8602bb329a14013075b2e7247b4d0e
/disanxuetangparent/src/main/java/com/shengzhe/disan/xuetangparent/utils/HtmlJumpUtil.java
698f04c8f908ae8e07dab6e7a09fdf0f0fc6a904
[]
no_license
led-os/3rdedu_android
526ee66ee91bf357e670da9136745a08d54354f9
7ba4b3d8d1536591dc263f6eca5842ebde10a7cf
refs/heads/master
2021-10-10T19:44:55.466911
2019-01-16T05:11:22
2019-01-16T05:11:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,509
java
package com.shengzhe.disan.xuetangparent.utils; import android.app.Activity; import android.content.Intent; import android.net.Uri; import com.baidu.mapapi.model.LatLng; import com.main.disanxuelib.util.AppManager; import com.main.disanxuelib.util.BaseStringUtils; import com.main.disanxuelib.util.SystemInfoUtil; import com.main.disanxuelib.view.banner.BannerBean; import com.shengzhe.disan.xuetangparent.mvp.activity.CommWebActivity; import java.net.URISyntaxException; /** * Created by Html跳转公共处理 on 2017/12/29. */ public class HtmlJumpUtil { /***** * 服务协议 */ public static void fwxyActivity(){ Activity activity = AppManager.getAppManager().currentActivity(); Intent intent = new Intent(activity, CommWebActivity.class); intent.putExtra(StringUtils.ACTIVITY_title,"服务协议"); intent.putExtra(StringUtils.WEB_TYPE,StringUtils.WEB_TYPE_fileHtml5); intent.putExtra(StringUtils.url,"user_agreement.html"); activity.startActivity(intent); } /***** * 关于我们 */ public static void gywmActivity(){ Activity activity = AppManager.getAppManager().currentActivity(); Intent intent = new Intent(activity, CommWebActivity.class); intent.putExtra(StringUtils.ACTIVITY_title,"关于我们"); intent.putExtra(StringUtils.WEB_TYPE,StringUtils.WEB_TYPE_fileHtml5); intent.putExtra(StringUtils.url,"info.html"); activity.startActivity(intent); } /***** * 首页banner点击 */ public static void bannerActivity(BannerBean banner){ Activity activity = AppManager.getAppManager().currentActivity(); Intent intent = new Intent(activity, CommWebActivity.class); intent.putExtra(StringUtils.ACTIVITY_title,banner.getAdName()); intent.putExtra(StringUtils.WEB_TYPE,StringUtils.WEB_TYPE_url); intent.putExtra(StringUtils.url,banner.getPicLink()); activity.startActivity(intent); } /**** * 用户协议 */ public static void yhxyActivity(){ Activity activity = AppManager.getAppManager().currentActivity(); Intent intent = new Intent(activity, CommWebActivity.class); intent.putExtra(StringUtils.ACTIVITY_title,"第三学堂服务协议"); intent.putExtra(StringUtils.WEB_TYPE,StringUtils.WEB_TYPE_fileHtml5); intent.putExtra(StringUtils.url,"user_agreement.html"); activity.startActivity(intent); } /***** * 第三方地图跳转 * @param mapName * @param address */ public static void gotoMapsActivity(String mapName, LatLng latLng,String name,String address) { Activity activity = AppManager.getAppManager().currentActivity(); Intent intent = null; switch (mapName){ case BaseStringUtils.MapBaiDu: // 百度:http://lbsyun.baidu.com/index.php?title=uri/api/android intent = new Intent(); intent.setData(Uri.parse("baidumap://map/marker?location="+latLng.latitude+","+latLng.longitude+"&title="+name+"&content="+address+"&traffic=on")); break; case BaseStringUtils.MapGaoDe: //高德:http://lbs.amap.com/api/amap-mobile/guide/android/route intent = new Intent("android.intent.action.VIEW", android.net.Uri.parse("androidamap://viewMap?sourceApplication="+ SystemInfoUtil.getApplicationName()+"&poiname="+address+"&lat="+latLng.latitude+"&lon="+latLng.longitude+"&dev=0")); intent.setPackage("com.autonavi.minimap"); break; case BaseStringUtils.MapTenXun: //腾讯:http://lbs.qq.com/uri_v1/guide-route.html //腾讯 bus:公交, :drive: 步行:walk try { intent = Intent.getIntent("qqmap://map/geocoder?coord="+latLng.latitude+","+latLng.longitude); } catch (URISyntaxException e) { e.printStackTrace(); } break; case BaseStringUtils.MapGuGe: //google d:行车 w:步行 b:骑行 Uri gmmIntentUri = Uri.parse("google.navigation:q=" + address + "&mode=d"); intent = new Intent(Intent.ACTION_VIEW, gmmIntentUri); intent.setPackage("com.google.android.apps.maps"); break; } activity.startActivity(intent); } }
[ "13120850176@163.com" ]
13120850176@163.com
ffa6f3670421b7babc0d2ee142b6046d7acd3acc
5e0ec9c4ad9a381aa4605eea1f80bf41a26df28b
/dataset/syllables/ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f/005/src/test/java/introclassJava/syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005BlackboxTest.java
6a5eae4464864de7b915f8dbfc9f46d82bcacfde
[]
no_license
dufaux/IntroClassJava
8d763bf225e8c4eec8426b919309f2ae0dc40c78
a6ac9c2d4d71621d4841bfd308a51c3eb4511606
refs/heads/master
2021-01-14T14:18:57.699360
2015-09-23T15:00:46
2015-09-23T15:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,150
java
package introclassJava; import org.junit.Test; import static org.junit.Assert.assertEquals; public class syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005BlackboxTest { @Test(timeout=1000) public void test1() throws Exception { syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005 mainClass = new syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005(); String expected = "Please enter a string > The number of syllables is 0."; mainClass.scanner = new java.util.Scanner("khd"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test2() throws Exception { syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005 mainClass = new syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005(); String expected = "Please enter a string > The number of syllables is 6."; mainClass.scanner = new java.util.Scanner("aeiouy"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test3() throws Exception { syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005 mainClass = new syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005(); String expected = "Please enter a string > The number of syllables is 5."; mainClass.scanner = new java.util.Scanner("here and there"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test4() throws Exception { syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005 mainClass = new syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005(); String expected = "Please enter a string > The number of syllables is 1."; mainClass.scanner = new java.util.Scanner("bbbbbbb a"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test5() throws Exception { syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005 mainClass = new syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005(); String expected = "Please enter a string > The number of syllables is 0."; mainClass.scanner = new java.util.Scanner("9876543210"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test6() throws Exception { syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005 mainClass = new syllables_ca5057661022789c0b40bc1574ab8b0826b3d22f70de1a10b2d2122137774c6aec73fe789a94b2362628481da623120033956bd376b41b825a72dbd8b50aff2f_005(); String expected = "Please enter a string > The number of syllables is 3."; mainClass.scanner = new java.util.Scanner("1 a 2 e 3 $#@ u"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
023397674ef5714181f7aa24fdcf981488ecfd9e
823d7d304b7914041137f5c8f82c10d357d6c604
/Thesis/GrammartestSet/extractedTestGrammar/ExtractedredcodeListener.java
20fb016e22b34ebb91c8ae5304da6574541d2dfe
[]
no_license
grammarhoard/2014-butrus-testing
2a0496e6c6638e65021383d487a051c31036090d
df714500c0a983ef3ea6210e68f0849e9c4519b0
refs/heads/master
2021-01-16T19:58:02.667452
2014-08-17T08:56:37
2014-08-17T08:56:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,318
java
// Generated from Extractedredcode.g4 by ANTLR 4.1 package extractedTestGrammar; import org.antlr.v4.runtime.misc.NotNull; import org.antlr.v4.runtime.tree.ParseTreeListener; /** * This interface defines a complete listener for a parse tree produced by * {@link ExtractedredcodeParser}. */ public interface ExtractedredcodeListener extends ParseTreeListener { /** * Enter a parse tree produced by {@link ExtractedredcodeParser#modifier}. * @param ctx the parse tree */ void enterModifier(@NotNull ExtractedredcodeParser.ModifierContext ctx); /** * Exit a parse tree produced by {@link ExtractedredcodeParser#modifier}. * @param ctx the parse tree */ void exitModifier(@NotNull ExtractedredcodeParser.ModifierContext ctx); /** * Enter a parse tree produced by {@link ExtractedredcodeParser#file}. * @param ctx the parse tree */ void enterFile(@NotNull ExtractedredcodeParser.FileContext ctx); /** * Exit a parse tree produced by {@link ExtractedredcodeParser#file}. * @param ctx the parse tree */ void exitFile(@NotNull ExtractedredcodeParser.FileContext ctx); /** * Enter a parse tree produced by {@link ExtractedredcodeParser#line}. * @param ctx the parse tree */ void enterLine(@NotNull ExtractedredcodeParser.LineContext ctx); /** * Exit a parse tree produced by {@link ExtractedredcodeParser#line}. * @param ctx the parse tree */ void exitLine(@NotNull ExtractedredcodeParser.LineContext ctx); /** * Enter a parse tree produced by {@link ExtractedredcodeParser#number}. * @param ctx the parse tree */ void enterNumber(@NotNull ExtractedredcodeParser.NumberContext ctx); /** * Exit a parse tree produced by {@link ExtractedredcodeParser#number}. * @param ctx the parse tree */ void exitNumber(@NotNull ExtractedredcodeParser.NumberContext ctx); /** * Enter a parse tree produced by {@link ExtractedredcodeParser#instruction}. * @param ctx the parse tree */ void enterInstruction(@NotNull ExtractedredcodeParser.InstructionContext ctx); /** * Exit a parse tree produced by {@link ExtractedredcodeParser#instruction}. * @param ctx the parse tree */ void exitInstruction(@NotNull ExtractedredcodeParser.InstructionContext ctx); /** * Enter a parse tree produced by {@link ExtractedredcodeParser#comment}. * @param ctx the parse tree */ void enterComment(@NotNull ExtractedredcodeParser.CommentContext ctx); /** * Exit a parse tree produced by {@link ExtractedredcodeParser#comment}. * @param ctx the parse tree */ void exitComment(@NotNull ExtractedredcodeParser.CommentContext ctx); /** * Enter a parse tree produced by {@link ExtractedredcodeParser#mmode}. * @param ctx the parse tree */ void enterMmode(@NotNull ExtractedredcodeParser.MmodeContext ctx); /** * Exit a parse tree produced by {@link ExtractedredcodeParser#mmode}. * @param ctx the parse tree */ void exitMmode(@NotNull ExtractedredcodeParser.MmodeContext ctx); /** * Enter a parse tree produced by {@link ExtractedredcodeParser#opcode}. * @param ctx the parse tree */ void enterOpcode(@NotNull ExtractedredcodeParser.OpcodeContext ctx); /** * Exit a parse tree produced by {@link ExtractedredcodeParser#opcode}. * @param ctx the parse tree */ void exitOpcode(@NotNull ExtractedredcodeParser.OpcodeContext ctx); }
[ "eenassbutrus@gmail.com" ]
eenassbutrus@gmail.com
29f34bf35c03e0b31bcb1122c1593ce50c2def8e
c46f99dbb1ea967302d4ba6f974928c43e0b7eb1
/src/xlsx4j/java/org/xlsx4j/sml/STParameterType.java
33a867499029b7e9cd4fed586c971bc22d1cddd6
[ "Apache-2.0" ]
permissive
manivannans/docx4j
688320ebde87c6f6d7cd43f32d475eb635d5e9c1
777c78a844b98e15c3d472fedd3b3e01e6017327
refs/heads/master
2020-12-25T00:50:18.304299
2012-05-29T03:59:59
2012-05-29T03:59:59
4,479,085
3
0
null
null
null
null
UTF-8
Java
false
false
2,038
java
/* * Copyright 2010, Plutext Pty Ltd. * * This file is part of docx4j. docx4j is 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.xlsx4j.sml; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for ST_ParameterType. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="ST_ParameterType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="prompt"/> * &lt;enumeration value="value"/> * &lt;enumeration value="cell"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "ST_ParameterType") @XmlEnum public enum STParameterType { /** * Prompt on Refresh * */ @XmlEnumValue("prompt") PROMPT("prompt"), /** * Value * */ @XmlEnumValue("value") VALUE("value"), /** * Parameter From Cell * */ @XmlEnumValue("cell") CELL("cell"); private final String value; STParameterType(String v) { value = v; } public String value() { return value; } public static STParameterType fromValue(String v) { for (STParameterType c: STParameterType.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "jason@plutext.org" ]
jason@plutext.org
87d943d0a4ff814233fd879253a3c454b353bd6f
d60bd7144cb4428a6f7039387c3aaf7b295ecc77
/ScootAppSource/com/google/android/gms/common/internal/e.java
695b9b8b68520b94c3cf87593652d992c0585da1
[]
no_license
vaquarkhan/Scoot-mobile-app
4f58f628e7e2de0480f7c41998cdc38100dfef12
befcfb58c1dccb047548f544dea2b2ee187da728
refs/heads/master
2020-06-10T19:14:25.985858
2016-12-08T04:39:10
2016-12-08T04:39:10
75,902,491
1
0
null
null
null
null
UTF-8
Java
false
false
1,122
java
package com.google.android.gms.common.internal; import android.content.Context; import android.os.IBinder; import android.os.IInterface; import android.os.Looper; import com.google.android.gms.common.api.m; import com.google.android.gms.common.api.s; import com.google.android.gms.common.api.t; public final class e<T extends IInterface> extends aq<T> { private final m<T> d; public e(Context paramContext, Looper paramLooper, int paramInt, s params, t paramt, ai paramai, m<T> paramm) { super(paramContext, paramLooper, paramInt, paramai, params, paramt); this.d = paramm; } protected String a() { return this.d.a(); } protected void a(int paramInt, T paramT) { this.d.a(paramInt, paramT); } protected T b(IBinder paramIBinder) { return this.d.a(paramIBinder); } protected String b() { return this.d.b(); } public m<T> f() { return this.d; } } /* Location: D:\Android\dex2jar-2.0\classes-dex2jar.jar!\com\google\android\gms\common\internal\e.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "vaquar.khan@gmail.com" ]
vaquar.khan@gmail.com
6be458c36ba83811cf91824d8daa02ba518a94b1
47b0b40828854a1566e39afb261646407faa85ca
/src/NetworkElements/OpticalPath.java
b9e63eeba436fe7de9e3400c60ebf322eedde31b
[]
no_license
LenkayHuang/AE-RWA-simulation
a4930047565b806e60fb87f95e8ab06b2ac32d7d
ba3898c2b980c2a717fa44d5c1c330a6e23eaff6
refs/heads/master
2021-01-20T22:18:47.327740
2016-05-31T13:41:47
2016-05-31T13:41:47
60,093,150
0
0
null
null
null
null
GB18030
Java
false
false
393
java
package NetworkElements; import java.util.List; /** * 光网络业务路径,用于算路和路由。 * */ public class OpticalPath { private List<OpticalNode> singlePath; public List<OpticalNode> getSinglePath() { return singlePath; } public void setSinglePath(List<OpticalNode> singlePath) { this.singlePath = singlePath; } }
[ "826080529@qq.com" ]
826080529@qq.com
abf7818959191af62164177efa6867a705a205aa
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/agc024/A/3168230.java
a275f01d036facbdd213d76f50f98875cf003959
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Java
false
false
378
java
import java.util.*; import java.awt.*; public class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); long K = sc.nextLong(); if (K % 2 == 0) { System.out.println(A-B); } else { System.out.println(B-A); } } }
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com
36a118f5fc4702c2bbb3ca97e776e6c7cac97aa9
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
/sources/com/uxcam/internals/C3304jo.java
2f9abcd24659fa0cbad7401d54a92d1259df1e79
[]
no_license
sengeiou/KnowAndGo-android-thunkable
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
39e809d0bbbe9a743253bed99b8209679ad449c9
refs/heads/master
2023-01-01T02:20:01.680570
2020-10-22T04:35:27
2020-10-22T04:35:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
271
java
package com.uxcam.internals; /* renamed from: com.uxcam.internals.jo */ public class C3304jo extends C3286ja { public C3304jo() { super(new C3277ir("trak")); } /* renamed from: a */ public static String m2329a() { return "trak"; } }
[ "joshuahj.tsao@gmail.com" ]
joshuahj.tsao@gmail.com
e8325ac58e76426cc9c9d5768f6b03d464b0483a
f2d2f8ceded9051c61bbdb9dcb89292a6d90530b
/kwok-app/src/main/com/kwoksys/action/issues/IssueListExportAction.java
758a1d3eb9a9ed8d459f6b11baa9fc8caf380b97
[]
no_license
roliannetropia/kwok
7becc6ee54f33fc84bf68a57d8ce340cf1809a66
8074b853b1b4c8d74dee71771b24fb56d5abbbb1
refs/heads/master
2016-09-06T15:36:58.750644
2015-03-15T23:51:28
2015-03-15T23:51:28
30,286,995
0
0
null
null
null
null
UTF-8
Java
false
false
1,846
java
/* * ==================================================================== * Copyright 2005-2011 Wai-Lun Kwok * * http://www.kwoksys.com/LICENSE * * 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.kwoksys.action.issues; import com.kwoksys.biz.reports.types.IssueReport; import com.kwoksys.biz.reports.writers.CsvReportWriter; import com.kwoksys.biz.reports.writers.ReportWriter; import com.kwoksys.biz.system.core.configs.ConfigManager; import com.kwoksys.framework.http.RequestContext; import com.kwoksys.framework.http.ResponseContext; import com.kwoksys.framework.session.SessionManager; import com.kwoksys.framework.struts2.Action2; /** * Action class for issue list export. */ public class IssueListExportAction extends Action2 { public String execute() throws Exception { IssueReport report = new IssueReport(requestContext, SessionManager.ISSUE_SEARCH_CRITERIA_MAP); ResponseContext responseContext = new ResponseContext(response); responseContext.setAttachementName(ConfigManager.app.getIssuesExportFilename()); ReportWriter reportWriter = new CsvReportWriter(); reportWriter.init(responseContext, report); report.populateData(reportWriter); return reportWriter.close(); } }
[ "tropia.rolianne@notes.bdo" ]
tropia.rolianne@notes.bdo
5bde80fb2bd8b4479e12988a2d7227c44d460009
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-11-04-tempmail/sources/com/google/android/gms/internal/ads/a8.java
cefd64ad9c9755719749f0b4be6227ee14d5311f
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
534
java
package com.google.android.gms.internal.ads; /* compiled from: com.google.android.gms:play-services-ads@@19.2.0 */ final /* synthetic */ class a8 implements Runnable { /* renamed from: b reason: collision with root package name */ private final zzbdi f3529b; /* renamed from: c reason: collision with root package name */ private final int f3530c; a8(zzbdi zzbdi, int i) { this.f3529b = zzbdi; this.f3530c = i; } public final void run() { this.f3529b.G(this.f3530c); } }
[ "zteeed@minet.net" ]
zteeed@minet.net
e42cd20a4dfe73a323de40ce69edd6b74ead60a2
b47ff5c1d105cd3c9866cd299f75634cbe7c2d71
/src/main/java/net/sourceforge/jenesis4java/Case.java
cc6574327c0c9f778d71f768fb5f294651c078d2
[]
no_license
andyglick/jenesis4java
3ac70b791fd6108e298a33cc8686c8be4b183890
ddfe78d64df818b3c6ca865dc0e9d7166af50920
refs/heads/master
2023-08-15T16:09:33.695138
2015-11-16T06:31:47
2015-11-16T06:31:47
52,171,705
0
5
null
2022-11-09T20:57:55
2016-02-20T19:37:28
Java
UTF-8
Java
false
false
2,070
java
package net.sourceforge.jenesis4java; /* * #%L * Jenesis 4 Java Code Generator * %% * Copyright (C) 2000 - 2015 jenesis4java * %% * This program 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. * * 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 Lesser Public License for more details. * * You should have received a copy of the GNU General Lesser Public * License along with this program. If not, see * <http://www.gnu.org/licenses/lgpl-3.0.html>. * #L% */ /** * Copyright (C) 2008, 2010 Richard van Nieuwenhoven - ritchie [at] gmx [dot] at * Copyright (C) 2000, 2001 Paul Cody Johnston - pcj@inxar.org <br> * This file is part of Jenesis4java. Jenesis4java 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.<br> * Jenesis4java 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.<br> * You should have received a copy of the GNU Lesser General Public License * along with Jenesis4java. If not, see <http://www.gnu.org/licenses/>. */ /** * <code>Statement</code> subinterface for the <code>case</code> construct in a * <code>switch</code>. */ public interface Case extends Statement, Block { /** * Gets the constant expression for this condition. */ Expression getConstant(); /** * Sets the constant expression for this condition. */ Case setConstant(Expression expr); }
[ "ritchie@gmx.at" ]
ritchie@gmx.at
7f56f02cb6f874cc41c94555884cbd4e0c9e136a
3b0be1780ff44267939dc41702c8af6dd9b5ccdc
/Library/src/org/peterbjornx/pgl2/terrain/TerrainSource.java
5960f72d6bf1d009010f45493c0a807b576a4093
[]
no_license
peterbjornx/PGLEngine2_LWJGL
950c840071b14b6f4f163703829eb177317948f8
260a52313ff6308811892fe25acd3874ca7921c8
refs/heads/master
2019-01-02T03:12:19.637322
2011-06-21T21:43:27
2011-06-21T21:43:27
1,880,104
3
0
null
null
null
null
UTF-8
Java
false
false
471
java
package org.peterbjornx.pgl2.terrain; import org.lwjgl.util.Color; import org.peterbjornx.pgl2.texture.Texture2D; /** * Created by IntelliJ IDEA. * User: Peter * Date: 6/14/11 * Time: 10:36 PM * Computer: Peterbjornx-PC.rootdomain.asn.local (192.168.178.27) */ public interface TerrainSource { int[][] getHeightMap(); Color[][] getColorMap(); int[][] getTextureMap(); Texture2D getTexture(int id); int getTileSize(); int getSideSize(); }
[ "peterbosc@gmail.com" ]
peterbosc@gmail.com
21a418c6ab327450597d1c45df3305743ec279b3
17c30fed606a8b1c8f07f3befbef6ccc78288299
/Mate10_8_1_0/src/main/java/com/android/server/pm/HwCustHwPackageManagerServiceImpl.java
ac102e11ba09ac5ba73df00a56bdf1ac5d17bceb
[]
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
1,418
java
package com.android.server.pm; import android.content.Context; import android.os.Binder; import android.os.SystemProperties; import android.provider.Settings.Secure; import android.provider.SettingsEx.Systemex; public class HwCustHwPackageManagerServiceImpl extends HwCustHwPackageManagerService { private static final boolean IS_COTA_FEATURE = SystemProperties.getBoolean("ro.config.hw_cota", false); private static final boolean IS_HOTA_RESTORE_THEME = SystemProperties.getBoolean("ro.config.hw_hotaRestoreTheme", false); private static final boolean IS_REGIONAL_PHONE_FEATURE = SystemProperties.getBoolean("ro.config.region_phone_feature", false); private static final String TAG = "HwCustHwPackageManagerServiceImpl"; public boolean isReginalPhoneFeature() { return IS_REGIONAL_PHONE_FEATURE; } public boolean isSupportThemeRestore() { return (IS_REGIONAL_PHONE_FEATURE || IS_COTA_FEATURE) ? true : IS_HOTA_RESTORE_THEME; } public void changeTheme(String path, Context context) { String themePath = Systemex.getString(context.getContentResolver(), "hw_def_theme"); if (path != null && (path.equals(themePath) ^ 1) != 0) { long identity = Binder.clearCallingIdentity(); Secure.putString(context.getContentResolver(), "isUserChangeTheme", "true"); Binder.restoreCallingIdentity(identity); } } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
352665a4228807ebb4b267895affc34e25b74f25
b4122def5470534fc15cb94929c13b6730ea3bda
/DimensionAnalyze/src/test/java/ClassTest.java
d48c419cd921790a546c283a66bd20c943aa338e
[]
no_license
LiuEnqi260570/Groupping
352649a4b581d3989914532c54b2c37e3bad8863
b43742db22b138169000996c1e3130cb81a2e787
refs/heads/master
2020-04-11T03:07:54.283905
2019-02-21T01:26:30
2019-02-21T01:26:30
161,468,312
0
0
null
null
null
null
UTF-8
Java
false
false
168
java
import java.net.URL; /** * @Auther: lyd * @Date: 2018/7/30 17:49 * @Description: */ public class ClassTest { public static void main(String[] args) { } }
[ "test@runoob.com" ]
test@runoob.com
9fb76e12d7f1857d2319397c7b865f9f48fdf161
c00385b1fd498097984d090f26586c2eb50573ec
/src/main/java/com/spartann/foodplus/common/io/NetworkMessageHandler.java
f13426f9f5b3a72c2da9a1b37a02d4c74f349129
[]
no_license
Spartannnn/FoodPlus
59371af7f3929eda0925ef72e646893224be8660
2235b26355aa734a1a867f9ad0a03729923e134d
refs/heads/master
2022-11-29T18:12:12.693403
2020-08-06T22:31:33
2020-08-06T22:31:33
280,930,584
0
0
null
null
null
null
UTF-8
Java
false
false
1,007
java
package com.spartann.foodplus.common.io; import com.spartann.foodplus.FoodPlusMod; import net.minecraftforge.fml.LogicalSide; import net.minecraftforge.fml.network.NetworkEvent; import net.minecraftforge.fml.network.PacketDistributor; import java.util.function.Supplier; public class NetworkMessageHandler { public static void onMessageReceived(final ParticleMessage message, Supplier<NetworkEvent.Context> ctxSupplier) { NetworkEvent.Context ctx = ctxSupplier.get(); LogicalSide sideReceived = ctx.getDirection().getReceptionSide(); ctx.setPacketHandled(true); if (sideReceived != LogicalSide.SERVER) { return; } ctx.enqueueWork(() -> processMessage(message)); } private static void processMessage(ParticleMessage message) { ParticleMessage response = new ParticleMessage(message.getPosition(), message.getDestination()); FoodPlusMod.CHANNEL_INSTANCE.send(PacketDistributor.PLAYER.noArg(), response); } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
3daf81f3874aecd095f61e98370b2c8c459f4049
3fca26512f6a59b5dff835d3c46b2a4f8ff6c463
/src/main/java/com/swordfall/invoking/HttpUrlConnectionToInterface.java
ba8533ebb67a978ae26df41c7ccfe3a05cae3c87
[]
no_license
xiaoduozhou/JavaInvokingHttpInterface
cf3b51681b48b482e251baab38e2db1b52b143f8
dc7f1823b64e6d3a6a5f12f6429df73cf9fbe9f2
refs/heads/master
2020-08-23T23:34:05.782261
2019-04-28T07:23:23
2019-04-28T07:23:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,425
java
package com.swordfall.invoking; import java.io.*; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; /** * @Author: Yang JianQiu * @Date: 2019/4/26 11:34 * jdk类HttpURLConnection调用第三方http接口 * * 通常分get和post两种方式 * * 参考资料: * http://www.cnblogs.com/angusbao/p/7727649.html */ public class HttpUrlConnectionToInterface { /** * 以post或get方式调用对方接口方法, * @param pathUrl */ public static void doPostOrGet(String pathUrl, String data){ OutputStreamWriter out = null; BufferedReader br = null; String result = ""; try { URL url = new URL(pathUrl); //打开和url之间的连接 HttpURLConnection conn = (HttpURLConnection) url.openConnection(); //请求方式 conn.setRequestMethod("POST"); //conn.setRequestMethod("GET"); //设置通用的请求属性 conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"); conn.setRequestProperty("Content-Type", "application/json;charset=utf-8"); //DoOutput设置是否向httpUrlConnection输出,DoInput设置是否从httpUrlConnection读入,此外发送post请求必须设置这两个 conn.setDoOutput(true); conn.setDoInput(true); /** * 下面的三句代码,就是调用第三方http接口 */ //获取URLConnection对象对应的输出流 out = new OutputStreamWriter(conn.getOutputStream(), "UTF-8"); //发送请求参数即数据 out.write(data); //flush输出流的缓冲 out.flush(); /** * 下面的代码相当于,获取调用第三方http接口后返回的结果 */ //获取URLConnection对象对应的输入流 InputStream is = conn.getInputStream(); //构造一个字符流缓存 br = new BufferedReader(new InputStreamReader(is)); String str = ""; while ((str = br.readLine()) != null){ result += str; } System.out.println(result); //关闭流 is.close(); //断开连接,disconnect是在底层tcp socket链接空闲时才切断,如果正在被其他线程使用就不切断。 conn.disconnect(); } catch (Exception e) { e.printStackTrace(); }finally { try { if (out != null){ out.close(); } if (br != null){ br.close(); } } catch (IOException e) { e.printStackTrace(); } } } public static void main(String[] args) { /** *手机信息查询接口:http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=手机号      *      http://api.showji.com/Locating/www.showji.com.aspx?m=手机号&output=json&callback=querycallback */ doPostOrGet("https://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel=15658183565", ""); } }
[ "2506597416@qq.com" ]
2506597416@qq.com
e29b5ff961095b006aa794df33903bd102f0bff2
9d864f5a053b29d931b4c2b4f773e13291189d27
/src/search/elasticsearch/impl/src/java/org/sakaiproject/search/elasticsearch/filter/impl/SearchSecurityFilter.java
51126761327ceba09a553f867180f3b31de5a2e3
[]
no_license
kyeddlapalli/sakai-cle
b1bd1e4431d8d96b6b650bfe9454eacd3e7042b2
1f06c7ac69c7cbe731c8d175d557313d0fb34900
refs/heads/master
2021-01-18T10:57:25.449065
2014-01-12T21:18:15
2014-01-12T21:18:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,469
java
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/search/trunk/elasticsearch/impl/src/java/org/sakaiproject/search/elasticsearch/filter/impl/SearchSecurityFilter.java $ * $Id: SearchSecurityFilter.java 120867 2013-03-06 22:27:02Z jbush@rsmart.com $ *********************************************************************************** * * Copyright (c) 2006, 2007, 2008, 2009 The Sakai Foundation * * Licensed under the Educational Community 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.osedu.org/licenses/ECL-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.sakaiproject.search.elasticsearch.filter.impl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.sakaiproject.component.api.ComponentManager; import org.sakaiproject.entity.api.EntityManager; import org.sakaiproject.search.api.EntityContentProducer; import org.sakaiproject.search.api.SearchIndexBuilder; import org.sakaiproject.search.api.SearchResult; import org.sakaiproject.search.api.TermFrequency; import org.sakaiproject.search.elasticsearch.Messages; import org.sakaiproject.search.elasticsearch.filter.SearchItemFilter; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** * @author ieb */ public class SearchSecurityFilter implements SearchItemFilter { private static final Log log = LogFactory .getLog(SearchSecurityFilter.class); private SearchIndexBuilder searchIndexBuilder = null; private EntityManager entityManager = null; private SearchItemFilter nextFilter = null; public void init() { } private Object load(ComponentManager cm, String name) { Object o = cm.get(name); if (o == null) { log.error("Cant find Spring component named " + name); //$NON-NLS-1$ } return o; } /** * @return Returns the nextFilter. */ public SearchItemFilter getNextFilter() { return nextFilter; } /** * @param nextFilter * The nextFilter to set. */ public void setNextFilter(SearchItemFilter nextFilter) { this.nextFilter = nextFilter; } /** * @return Returns the searchIndexBuilder. */ public SearchIndexBuilder getSearchIndexBuilder() { return searchIndexBuilder; } /** * @param searchIndexBuilder * The searchIndexBuilder to set. */ public void setSearchIndexBuilder(SearchIndexBuilder searchIndexBuilder) { this.searchIndexBuilder = searchIndexBuilder; } public SearchResult filter(SearchResult result) { String reference = result.getReference(); EntityContentProducer ecp = searchIndexBuilder .newEntityContentProducer(reference); if (ecp == null || !ecp.canRead(reference)) { result = new CensoredSearchResult(); } if (nextFilter == null) { return result; } return nextFilter.filter(result); } public class CensoredSearchResult implements SearchResult { public float getScore() { return 0; } public String getId() { return ""; //$NON-NLS-1$ } public String[] getFieldNames() { return new String[0]; } public String[] getValues(String string) { return new String[0]; } public Map<String, String[]> getValueMap() { return new HashMap<String, String[]>(); } public String getUrl() { return ""; //$NON-NLS-1$ } public String getTitle() { return Messages.getString("SearchSecurityFilter.5"); //$NON-NLS-1$ } public int getIndex() { return 0; } public String getSearchResult() { return ""; //$NON-NLS-1$ } public String getReference() { return ""; //$NON-NLS-1$ } public TermFrequency getTerms() throws IOException { return new TermFrequency() { int[] freq = new int[0]; String[] terms = new String[0]; public int[] getFrequencies() { return freq; } public String[] getTerms() { return terms; } }; } public String getTool() { return ""; //$NON-NLS-1$ } public void toXMLString(StringBuilder sb) { sb.append("<result"); //$NON-NLS-1$ sb.append(" index=\"0\" "); //$NON-NLS-1$ sb.append(" score=\"0\" "); //$NON-NLS-1$ sb.append(" sid=\"\" "); //$NON-NLS-1$ sb.append(" reference=\"\" "); //$NON-NLS-1$ sb.append(" title=\"\" "); //$NON-NLS-1$ sb.append(" tool=\"\" "); //$NON-NLS-1$ sb.append(" url=\"\" />"); //$NON-NLS-1$ } public String getSiteId() { return ""; //$NON-NLS-1$ } public boolean isCensored() { return true; } public void setUrl(String newUrl) { // TODO Auto-generated method stub } public boolean hasPortalUrl() { log.debug("hasPortalUrl(" + getReference()); return false; } } /** * @return the entityManager */ public EntityManager getEntityManager() { return entityManager; } /** * @param entityManager the entityManager to set */ public void setEntityManager(EntityManager entityManager) { this.entityManager = entityManager; } }
[ "noah@botimer.net" ]
noah@botimer.net
ec885d4924a92957b87151ea57e72cc336286a0a
097df92ce1bfc8a354680725c7d10f0d109b5b7d
/com/amazon/ws/emr/hadoop/fs/shaded/com/google/inject/internal/util/$MapMaker$NullOutputExceptionReference.java
75cd9a0fe79dcf55e342748dfa5ce2035e735bce
[]
no_license
cozos/emrfs-hadoop
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
ba5dfa631029cb5baac2f2972d2fdaca18dac422
refs/heads/master
2022-10-14T15:03:51.500050
2022-10-06T05:38:49
2022-10-06T05:38:49
233,979,996
2
2
null
2022-10-06T05:41:46
2020-01-15T02:24:16
Java
UTF-8
Java
false
false
744
java
package com.amazon.ws.emr.hadoop.fs.shaded.com.google.inject.internal.util; class $MapMaker$NullOutputExceptionReference<K, V> implements .MapMaker.ValueReference<K, V> { final String message; $MapMaker$NullOutputExceptionReference(String message) { this.message = message; } public V get() { return null; } public .MapMaker.ValueReference<K, V> copyFor(.MapMaker.ReferenceEntry<K, V> entry) { return this; } public V waitForValue() { throw new .NullOutputException(message); } } /* Location: * Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.google.inject.internal.util..MapMaker.NullOutputExceptionReference * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */
[ "Arwin.tio@adroll.com" ]
Arwin.tio@adroll.com
359b2e67f941fb40d4cf0adc5a1d9d08c7cfe2af
6952304298d66aedb06b0db8687a3c2a8a250630
/JaydeStudy/src_javase/main/java/net/jayde/study/kodejava/example/util/regex/AppendReplacementExample.java
67c9742260aa3c4b6652c61ef8bc80e3c7008d9b
[]
no_license
jaydezhou/JavaCS
fe16aa2a5d5505456d67f1b1be9f9af24b5997de
033d77c41c3f03bd1cd6d2f9ca7c9f5ece97a960
refs/heads/master
2022-12-20T20:23:52.412789
2019-12-20T09:07:03
2019-12-20T09:07:03
119,678,202
0
0
null
null
null
null
UTF-8
Java
false
false
1,296
java
package net.jayde.study.kodejava.example.util.regex; import java.util.regex.Matcher; import java.util.regex.Pattern; public class AppendReplacementExample { public static void main(String[] args) { // // Create a Pattern instance // Pattern pattern = Pattern.compile("[Pp]en"); // // Create matcher object // String input = "Please use your Pen to answer the question, " + "black pen is prefered."; Matcher matcher = pattern.matcher(input); StringBuffer sb = new StringBuffer(); // // Find and replace the text that match the pattern // while (matcher.find()) { matcher.appendReplacement(sb, "pencil"); } // // This method reads characters from the input sequence, // starting at the append position, and appends them to // the given string buffer. It is intended to be invoked // after one or more invocations of the appendReplacement // method in order to copy the remainder of the input // sequence. // matcher.appendTail(sb); System.out.println("Input : " + input); System.out.println("Output: " + sb.toString()); } }
[ "jayde@sohu.com" ]
jayde@sohu.com
81c508a13f141dfa92a3b0f4ee7a3fb53c2eb4f7
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.socialplatform-base/sources/X/AnonymousClass07o.java
8b90128711460b2f438dbf98f05816d0a1ea2cb2
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
379
java
package X; import androidx.annotation.NonNull; /* renamed from: X.07o reason: invalid class name */ public class AnonymousClass07o { public final C003307q A00 = new C003307q(); public void A01(@NonNull AnonymousClass057 r1) { } public void A02(@NonNull AnonymousClass057 r1) { } @NonNull public C003307q A00() { return this.A00; } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
c00a9c12d7daca7b1d275914c72931eff8e4a291
392e624ea2d6886bf8e37167ebbda0387e7e4a9a
/uxcrm-ofbiz/generated-entity/src/main/java/org/apache/ofbiz/marketing/opportunity/SalesOpportunityCompetitor.java
289cb630b0698a0583f582922d4fdbdff3476d7d
[ "Apache-2.0" ]
permissive
yuri0x7c1/uxcrm
11eee75f3a9cffaea4e97dedc8bc46d8d92bee58
1a0bf4649bee0a3a62e486a9d6de26f1d25d540f
refs/heads/master
2018-10-30T07:29:54.123270
2018-08-26T18:25:35
2018-08-26T18:25:35
104,251,350
0
0
null
null
null
null
UTF-8
Java
false
false
2,366
java
package org.apache.ofbiz.marketing.opportunity; import lombok.experimental.FieldNameConstants; import java.io.Serializable; import lombok.Getter; import lombok.Setter; import java.sql.Timestamp; import org.apache.ofbiz.entity.GenericValue; import java.util.List; import java.util.ArrayList; /** * Sales Opportunity Competitor */ @FieldNameConstants public class SalesOpportunityCompetitor implements Serializable { public static final long serialVersionUID = 5954643535225248768L; public static final String NAME = "SalesOpportunityCompetitor"; /** * Sales Opportunity Id */ @Getter @Setter private String salesOpportunityId; /** * Competitor Party Id */ @Getter @Setter private String competitorPartyId; /** * Position Enum Id */ @Getter @Setter private String positionEnumId; /** * Strengths */ @Getter @Setter private String strengths; /** * Weaknesses */ @Getter @Setter private String weaknesses; /** * Last Updated Stamp */ @Getter @Setter private Timestamp lastUpdatedStamp; /** * Last Updated Tx Stamp */ @Getter @Setter private Timestamp lastUpdatedTxStamp; /** * Created Stamp */ @Getter @Setter private Timestamp createdStamp; /** * Created Tx Stamp */ @Getter @Setter private Timestamp createdTxStamp; public SalesOpportunityCompetitor(GenericValue value) { salesOpportunityId = (String) value.get(FIELD_SALES_OPPORTUNITY_ID); competitorPartyId = (String) value.get(FIELD_COMPETITOR_PARTY_ID); positionEnumId = (String) value.get(FIELD_POSITION_ENUM_ID); strengths = (String) value.get(FIELD_STRENGTHS); weaknesses = (String) value.get(FIELD_WEAKNESSES); lastUpdatedStamp = (Timestamp) value.get(FIELD_LAST_UPDATED_STAMP); lastUpdatedTxStamp = (Timestamp) value.get(FIELD_LAST_UPDATED_TX_STAMP); createdStamp = (Timestamp) value.get(FIELD_CREATED_STAMP); createdTxStamp = (Timestamp) value.get(FIELD_CREATED_TX_STAMP); } public static SalesOpportunityCompetitor fromValue( org.apache.ofbiz.entity.GenericValue value) { return new SalesOpportunityCompetitor(value); } public static List<SalesOpportunityCompetitor> fromValues( List<GenericValue> values) { List<SalesOpportunityCompetitor> entities = new ArrayList<>(); for (GenericValue value : values) { entities.add(new SalesOpportunityCompetitor(value)); } return entities; } }
[ "yuri0x7c1@gmail.com" ]
yuri0x7c1@gmail.com
a815ab3182358e6964d8009ff89e3fc724ec165d
3108900a12c2749d97ccce5d4d5c957c76035768
/day01_基础加强/src/com/annotation/RefkectTest2.java
b2b2612c55326445d76e8e8369f9dbb49b63c67e
[]
no_license
yjj1029/JavaWeb-ReStudy
c817dee423abe33dd60b1eb6e32cd6dd99ce270e
113c5395c76f2b71b754b9f98994913b7c83bf97
refs/heads/master
2022-12-25T13:24:41.521021
2020-09-28T07:47:50
2020-09-28T07:47:50
292,853,786
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
package com.annotation; import java.lang.annotation.Annotation; import java.lang.reflect.Method; @Pro2(className ="cn.itcast.annotation.Demo1",methodName ="show" ) public class RefkectTest2 { public static void main(String[] args) throws Exception { Class cl=RefkectTest2.class; Pro2 pro2= (Pro2) cl.getAnnotation(Pro2.class); String className=pro2.className(); String methodName=pro2.methodName(); System.out.println(className+"111111"); System.out.println(methodName+"22222"); Class demo1=Class.forName(className); Method show=demo1.getMethod(methodName); Object o=demo1.newInstance(); show.invoke(o); } }
[ "924621887@qq.com" ]
924621887@qq.com
e0a6e931ed8eb0e70cd72ae5563f96595eee3164
4aa90348abcb2119011728dc067afd501f275374
/app/src/main/java/com/tencent/mm/plugin/appbrand/widget/picker/a$1.java
dded6348d9dc1bdbc93b8196537e9140754d51ad
[]
no_license
jambestwick/HackWechat
0d4ceb2d79ccddb45004ca667e9a6a984a80f0f6
6a34899c8bfd50d19e5a5ec36a58218598172a6b
refs/heads/master
2022-01-27T12:48:43.446804
2021-12-29T10:36:30
2021-12-29T10:36:30
249,366,791
0
0
null
2020-03-23T07:48:32
2020-03-23T07:48:32
null
UTF-8
Java
false
false
323
java
package com.tencent.mm.plugin.appbrand.widget.picker; import android.view.View; import android.view.View.OnClickListener; class a$1 implements OnClickListener { final /* synthetic */ a kcO; a$1(a aVar) { this.kcO = aVar; } public final void onClick(View view) { this.kcO.hide(); } }
[ "malin.myemail@163.com" ]
malin.myemail@163.com
6bb7bbae4479bed69ad336f28b8a017973d22754
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/46/1988.java
3f8d7ff8219337afd667e5b7b509535e4b17c038
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,199
java
package <missing>; public class GlobalMembers { public static int Main() { int[][] a = new int[100][100]; int row; int col; int i = 0; int j = 0; int left = 0; int right = 0; int up = 0; int down = 0; int x = 0; String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { row = Integer.parseInt(tempVar); } String tempVar2 = ConsoleInput.scanfRead(); if (tempVar2 != null) { col = Integer.parseInt(tempVar2); } down = row; right = col; for (; i < row; i++) { for (j = 0; j < col; j++) { String tempVar3 = ConsoleInput.scanfRead(); if (tempVar3 != null) { a[i][j] = Integer.parseInt(tempVar3); } } } i = 0,j = 0; for (; ;) { for (; j < right; j++) { System.out.printf("%d\n",a[i][j]); x++; } j--; if (x >= col * row) { break; } i++; for (; i < down; i++) { System.out.printf("%d\n",a[i][j]); x++; } i--; if (x >= col * row) { break; } j--; for (; j >= left; j--) { System.out.printf("%d\n",a[i][j]); x++; } j++; if (x >= col * row) { break; } i--; for (; i > up; i--) { System.out.printf("%d\n",a[i][j]); x++; } if (x >= col * row) { break; } i++; j++; right--; left++; up++; down--; } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
403e5b5ac8d05f6026b0a2b081b2c08f2acbdce0
18540414f6d55e64738d03ef33754874df731be0
/app/src/main/java/ru/danilashamin/routetracker/storage/dao/BaseDao.java
bf57a2cc6a8ccf2cc9648040672cff8cbe32985a
[]
no_license
danilashamin/RouteTracker
88c158162f6d66448a682d800f4e3ceb07bd7045
99c28c9e49a63692a65dd17841933687a1dd9a42
refs/heads/master
2022-09-21T18:58:56.570940
2020-06-01T08:49:00
2020-06-01T08:49:00
239,043,076
0
0
null
null
null
null
UTF-8
Java
false
false
461
java
package ru.danilashamin.routetracker.storage.dao; import androidx.room.Delete; import androidx.room.Insert; import androidx.room.Update; import java.util.List; import io.reactivex.Single; interface BaseDao<T> { @Insert Single<Long> add(T t); @Insert Single<List<Long>> add(List<T> items); @Update Single<Integer> update(T t); @Delete Single<Integer> delete(T t); @Delete Single<Integer> delete(List<T> items); }
[ "=" ]
=
30ac3f134a566d87fe38146b10828e786978a496
1420ba90b0617caef56cd4dbb385b22924f001eb
/tour-android/app/src/main/java/cn/xmzt/www/nim/uikit/common/ui/popupmenu/PopupMenuListView.java
6b449439f37790a040fc07f5e5cb84961a86fa81
[]
no_license
similar718/tour_p
7a4dbf5267b2bb119887791b0a09416ac6071642
2bb766983fe397c90437608a3dbee482ffda7ad0
refs/heads/master
2020-11-26T06:32:22.172843
2019-12-20T03:30:59
2019-12-20T03:30:59
228,989,138
0
0
null
null
null
null
UTF-8
Java
false
false
1,488
java
package cn.xmzt.www.nim.uikit.common.ui.popupmenu; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; public class PopupMenuListView extends ListView { public PopupMenuListView(Context context) { super(context); } public PopupMenuListView(Context context, AttributeSet attrs) { super(context, attrs); } public PopupMenuListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int maxWidth = meathureWidthByChilds() + getPaddingLeft() + getPaddingRight(); super.onMeasure(MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.EXACTLY), heightMeasureSpec); } public int meathureWidthByChilds() { int maxWidth = 0; View view = null; for (int i = 0; i < getAdapter().getCount(); i++) { view = getAdapter().getView(i, view, this); if (view != null) { view.setLayoutParams(new ViewGroup.LayoutParams(0, 0)); view.measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED); if (view.getMeasuredWidth() > maxWidth) { maxWidth = view.getMeasuredWidth(); } } } return maxWidth; } }
[ "1170214556@qq.com" ]
1170214556@qq.com
febfa9dce3196dc964d2578be39eee2d481efd00
a0caa255f3dbe524437715adaee2094ac8eff9df
/src/main/java/p000/C0615ws.java
3a812efc6d0dbd82f5cf7dc94959879e7c7600cd
[]
no_license
AndroidTVDeveloper/com.google.android.tvlauncher
16526208b5b48fd48931b09ed702fe606fe7d694
0f959c41bbb5a93e981145f371afdec2b3e207bc
refs/heads/master
2021-01-26T07:47:23.091351
2020-02-26T20:58:19
2020-02-26T20:58:19
243,363,961
0
1
null
null
null
null
UTF-8
Java
false
false
537
java
package p000; import java.util.HashMap; import java.util.Map; /* renamed from: ws */ /* compiled from: PG */ public final class C0615ws { /* renamed from: a */ public final Map f10727a = new HashMap(); public C0615ws() { new HashMap(); } /* access modifiers changed from: package-private */ /* renamed from: a */ public final void mo6087a(C0534ts tsVar, C0607wk wkVar) { Map map = this.f10727a; if (wkVar.equals(map.get(tsVar))) { map.remove(tsVar); } } }
[ "eliminater74@gmail.com" ]
eliminater74@gmail.com
2cb356a1d7339f57e65a0139a00da31804136152
516fb367430d4c1393f4cd726242618eca862bda
/sources/com/facebook/ads/internal/view/g.java
a126ca65b7a8952ff92c0fbac37558636d0cd71f
[]
no_license
cmFodWx5YWRhdjEyMTA5/Gaana2
75d6d6788e2dac9302cff206a093870e1602921d
8531673a5615bd9183c9a0466325d0270b8a8895
refs/heads/master
2020-07-22T15:46:54.149313
2019-06-19T16:11:11
2019-06-19T16:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,793
java
package com.facebook.ads.internal.view; import android.content.Context; import android.content.Intent; import android.content.res.Configuration; import android.os.Bundle; import android.text.TextUtils; import android.view.MotionEvent; import android.widget.ImageView; import android.widget.ImageView.ScaleType; import com.facebook.ads.AudienceNetworkActivity; import com.facebook.ads.internal.adapters.a.h; import com.facebook.ads.internal.o.c; import com.facebook.ads.internal.s.a.k; import com.facebook.ads.internal.s.a.w; import com.facebook.ads.internal.t.a; import com.facebook.ads.internal.view.c.d; import com.facebook.ads.internal.view.c.e; import com.facebook.ads.internal.view.component.a.b; import java.util.HashMap; import java.util.Map; public class g extends i { private final com.facebook.ads.internal.adapters.a.g e; private final a f; private final w g = new w(); private final a.a h; private long i; public g(Context context, com.facebook.ads.internal.adapters.a.g gVar, c cVar, a.a aVar) { super(context, cVar, aVar); this.e = gVar; this.h = new a.a() { public void a() { if (!g.this.g.b()) { g.this.g.a(); Map hashMap = new HashMap(); g.this.f.a(hashMap); hashMap.put("touch", k.a(g.this.g.e())); g.this.b.a(g.this.e.c(), hashMap); if (g.this.getAudienceNetworkListener() != null) { g.this.getAudienceNetworkListener().a("com.facebook.ads.interstitial.impression.logged"); } } } }; this.f = new a(this, 100, this.h); this.f.a(gVar.f()); } private void setUpContent(int i) { h hVar = (h) this.e.d().get(0); ImageView imageView = new ImageView(getContext()); imageView.setScaleType(ScaleType.CENTER); imageView.setAdjustViewBounds(true); d a = new d(imageView).a(hVar.c().i(), hVar.c().h()); a.a(new e() { public void a(boolean z) { if (z) { g.this.f.a(); } } }); a.a(hVar.c().g()); b a2 = com.facebook.ads.internal.view.component.a.c.a(new com.facebook.ads.internal.view.component.a.d.a(getContext(), this.b, getAudienceNetworkListener(), this.e, imageView, this.f, this.g).a(a).b(i).a()); a(a2, a2.a(), i); } public void a(Intent intent, Bundle bundle, AudienceNetworkActivity audienceNetworkActivity) { super.a(audienceNetworkActivity, this.e); setUpContent(audienceNetworkActivity.getResources().getConfiguration().orientation); this.i = System.currentTimeMillis(); } public void a(Bundle bundle) { } public void a(boolean z) { } public void b(boolean z) { } public void onConfigurationChanged(Configuration configuration) { removeAllViews(); setUpContent(configuration.orientation); super.onConfigurationChanged(configuration); } public void onDestroy() { if (this.e != null) { com.facebook.ads.internal.l.b.a(com.facebook.ads.internal.l.a.a(this.i, com.facebook.ads.internal.l.a.a.XOUT, this.e.e())); if (!TextUtils.isEmpty(this.e.c())) { Map hashMap = new HashMap(); this.f.a(hashMap); hashMap.put("touch", k.a(this.g.e())); this.b.i(this.e.c(), hashMap); } } this.f.c(); super.onDestroy(); } public boolean onInterceptTouchEvent(MotionEvent motionEvent) { this.g.a(motionEvent, this, this); return super.onInterceptTouchEvent(motionEvent); } }
[ "master@master.com" ]
master@master.com
270121b254871bee3efbac2778c329cbbadfcb3d
2c103f10d9601ad41da8dd48535bbfbbba989a80
/mobile/collect_app/src/main/java/org/sdrc/dgacg/collect/android/widgets/SelectOneImageMapWidget.java
40091a359aa083eed317f4495ff3347f224ab9ed
[ "Apache-2.0" ]
permissive
SDRC-India/dga
85f74f4a0b1e9135c17b20c384e199392570bcfb
bae223b94117f8f8248f39a866dd4853f246d392
refs/heads/master
2023-01-14T02:10:32.582236
2019-10-10T07:54:48
2019-10-10T07:54:48
96,404,569
1
1
null
2023-01-05T23:18:18
2017-07-06T08:01:41
Java
UTF-8
Java
false
false
1,794
java
/* * Copyright 2018 Nafundi * * 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.sdrc.dgacg.collect.android.widgets; import android.content.Context; import android.webkit.WebView; import org.javarosa.core.model.data.IAnswerData; import org.javarosa.core.model.data.SelectOneData; import org.javarosa.core.model.data.helper.Selection; import org.javarosa.form.api.FormEntryPrompt; /** * A widget which is responsible for multi select questions represented by * an svg map. You can use maps of the world, countries, human body etc. */ public class SelectOneImageMapWidget extends SelectImageMapWidget { public SelectOneImageMapWidget(Context context, FormEntryPrompt prompt) { super(context, prompt); if (prompt.getAnswerValue() != null) { selections.add((Selection) prompt.getAnswerValue().getValue()); refreshSelectedItemsLabel(); } } @Override protected void highlightSelections(WebView view) { if (!selections.isEmpty()) { view.loadUrl("javascript:addSelectedArea('" + selections.get(0).getValue() + "')"); } } @Override public IAnswerData getAnswer() { return selections.isEmpty() ? null : new SelectOneData(selections.get(0)); } }
[ "ratikanta@sdrc.co.in" ]
ratikanta@sdrc.co.in
d3e1cda0067123d14db628796335f10dd872fdb9
e3990e8c3b1e0b8824a0a19bf9d12e48441def7a
/ebean-api/src/main/java/io/ebean/MergeOptionsBuilder.java
98173ed8d425480fc8523f612cc12edbe01b5252
[ "Apache-2.0" ]
permissive
ebean-orm/ebean
13c9c465f597dd2cf8b3e54e4b300543017c9dee
bfe94786de3c3b5859aaef5afb3a7572e62275c4
refs/heads/master
2023-08-22T12:57:34.271133
2023-08-22T11:43:41
2023-08-22T11:43:41
5,793,895
1,199
224
Apache-2.0
2023-09-11T14:05:26
2012-09-13T11:49:56
Java
UTF-8
Java
false
false
2,346
java
package io.ebean; import java.util.LinkedHashSet; import java.util.Set; /** * Builds a MergeOptions which is immutable and thread safe. */ public class MergeOptionsBuilder { private static final MOptions DEFAULT_OPTIONS = new MOptions(); private Set<String> paths = new LinkedHashSet<>(); private boolean clientGeneratedIds; private boolean deletePermanent; /** * Return the default options. */ public static MergeOptions defaultOptions() { return DEFAULT_OPTIONS; } /** * Add a path that will included in the merge. * * @param path The path relative to the root type. * @return The builder to chain another addPath() or build(). */ public MergeOptionsBuilder addPath(String path) { paths.add(path); return this; } /** * Set to true if Id values are supplied by the client. * <p> * This would be the case when for example a mobile creates data in it's own local database * and then sync's. In this case often the id values are UUID. */ public MergeOptionsBuilder setClientGeneratedIds() { this.clientGeneratedIds = true; return this; } /** * Set that deletions should use delete permanent (rather than default which allows soft deletes). */ public MergeOptionsBuilder setDeletePermanent() { this.deletePermanent = true; return this; } /** * Build and return the MergeOptions instance. */ public MergeOptions build() { return new MOptions(paths, clientGeneratedIds, deletePermanent); } private static class MOptions implements MergeOptions { private final boolean clientGeneratedIds; private final boolean deletePermanent; private final Set<String> paths; private MOptions(){ this.clientGeneratedIds = false; this.paths = new LinkedHashSet<>(); this.deletePermanent = false; } private MOptions(Set<String> paths, boolean clientGeneratedIds, boolean deletePermanent) { this.paths = paths; this.clientGeneratedIds = clientGeneratedIds; this.deletePermanent = deletePermanent; } @Override public Set<String> paths() { return paths; } @Override public boolean isClientGeneratedIds() { return clientGeneratedIds; } @Override public boolean isDeletePermanent() { return deletePermanent; } } }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
e53864b9129d053f65432c25f3c04c22231194d8
95c49f466673952b465e19a5ee3ae6eff76bee00
/src/main/java/com/igexin/p645b/p646a/p648b/p649a/p650a/p651a/AbstractC5696b.java
4ce75ec2a4bdb7db8364e5abff5a299647026440
[]
no_license
Phantoms007/zhihuAPK
58889c399ae56b16a9160a5f48b807e02c87797e
dcdbd103436a187f9c8b4be8f71bdf7813b6d201
refs/heads/main
2023-01-24T01:34:18.716323
2020-11-25T17:14:55
2020-11-25T17:14:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
package com.igexin.p645b.p646a.p648b.p649a.p650a.p651a; /* renamed from: com.igexin.b.a.b.a.a.a.b */ public interface AbstractC5696b extends AbstractC5695a { /* renamed from: a */ void mo39638a(Exception exc); }
[ "seasonpplp@qq.com" ]
seasonpplp@qq.com
809ab6c78c2b64911f9223e7f888966f15d70fc2
128da67f3c15563a41b6adec87f62bf501d98f84
/com/emt/proteus/duchampopt/__tcf_313988.java
b0fcc150e39b7aecb6fe16ee0d39e150d0b9be45
[]
no_license
Creeper20428/PRT-S
60ff3bea6455c705457bcfcc30823d22f08340a4
4f6601fb0dd00d7061ed5ee810a3252dcb2efbc6
refs/heads/master
2020-03-26T03:59:25.725508
2018-08-12T16:05:47
2018-08-12T16:05:47
73,244,383
0
0
null
null
null
null
UTF-8
Java
false
false
1,644
java
/* */ package com.emt.proteus.duchampopt; /* */ /* */ import com.emt.proteus.runtime.api.Env; /* */ import com.emt.proteus.runtime.api.Frame; /* */ import com.emt.proteus.runtime.api.Function; /* */ import com.emt.proteus.runtime.api.ImplementedFunction; /* */ import com.emt.proteus.runtime.library.strings._ZNSsD1Ev; /* */ /* */ public final class __tcf_313988 extends ImplementedFunction /* */ { /* */ public static final int FNID = 1305; /* 12 */ public static final Function _instance = new __tcf_313988(); /* 13 */ public final Function resolve() { return _instance; } /* */ /* 15 */ public __tcf_313988() { super("__tcf_313988", 1, false); } /* */ /* */ public int execute(int paramInt) /* */ { /* 19 */ call(paramInt); /* 20 */ return 0; /* */ } /* */ /* */ public int execute(Env paramEnv, Frame paramFrame, int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4) /* */ { /* 25 */ int i = paramFrame.getI32(paramArrayOfInt[paramInt4]); /* 26 */ paramInt4 += 2; /* 27 */ paramInt3--; /* 28 */ call(i); /* 29 */ return paramInt4; /* */ } /* */ /* */ /* */ /* */ /* */ public static void call(int paramInt) /* */ { /* */ try /* */ { /* 39 */ _ZNSsD1Ev.call(465596); /* 40 */ return; /* */ } /* */ finally {} /* */ } /* */ } /* Location: /home/jkim13/Desktop/emediatrack/codejar_s.jar!/com/emt/proteus/duchampopt/__tcf_313988.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "kimjoey79@gmail.com" ]
kimjoey79@gmail.com
85790e16125d47295571ad50faba9e96a9b68420
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_0000b621a6adbcc2f53d186261db71bacbd780ac/DetailTlv/4_0000b621a6adbcc2f53d186261db71bacbd780ac_DetailTlv_t.java
398875a0c900e769a4bd11edbb28cf0fe7a265a1
[]
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,097
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.icq.message.usrinfo; import java.io.*; import net.java.sip.communicator.impl.protocol.icq.message.common.*; import net.kano.joscar.*; /** * Tlv set in command for changis user account info stored on server * @author Damian Minkov */ public class DetailTlv implements Writable { private byte[] data = new byte[0]; private int type; public DetailTlv(int type) { this.type = type; } public void write(OutputStream out) throws IOException { LEBinaryTools.writeUShort(out, type); LEBinaryTools.writeUShort(out, data.length); out.write(data); } public long getWritableLength() { return 4 + data.length; } public void writeUInt(long number) { byte[] tmp = LEBinaryTools.getUInt(number); byte[] newData = new byte[data.length + tmp.length]; System.arraycopy(data, 0, newData, 0, data.length); System.arraycopy(tmp, 0, newData, data.length, tmp.length); data = newData; } public void writeUShort(int number) { byte[] tmp = LEBinaryTools.getUShort(number); byte[] newData = new byte[data.length + tmp.length]; System.arraycopy(data, 0, newData, 0, data.length); System.arraycopy(tmp, 0, newData, data.length, tmp.length); data = newData; } public void writeUByte(int number) { byte[] tmp = LEBinaryTools.getUByte(number); byte[] newData = new byte[data.length + tmp.length]; System.arraycopy(data, 0, newData, 0, data.length); System.arraycopy(tmp, 0, newData, data.length, tmp.length); data = newData; } public void writeString(String str) { if(str == null) str = "";// empty string so length will be 0 and nothing to be writen byte[] tmp = BinaryTools.getAsciiBytes(str); // save the string length before we process the string bytes writeUShort(tmp.length); byte[] newData = new byte[data.length + tmp.length]; System.arraycopy(data, 0, newData, 0, data.length); System.arraycopy(tmp, 0, newData, data.length, tmp.length); data = newData; } public String toString() { StringBuffer result = new StringBuffer(); ByteArrayOutputStream out = new ByteArrayOutputStream(); try { write(out); } catch(IOException ex) { ex.printStackTrace(); return null; } byte[] arrOut = out.toByteArray(); for(int i = 0; i < arrOut.length; i++) { byte temp = arrOut[i]; result.append(Integer.toHexString(temp&0xFF)).append(' '); } return result.toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ff52f6e6e206755e0246a47373b51523d168d652
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.socialplatform-base/sources/X/C13381zU.java
27495303e7b2c708831cb4dc08f3b81dbb62a4c5
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
1,668
java
package X; import java.util.concurrent.atomic.AtomicReference; /* renamed from: X.1zU reason: invalid class name and case insensitive filesystem */ public final class C13381zU<T, R> extends AtomicReference<AbstractC12271xB> implements AbstractC12721yD<T>, AbstractC12271xB { public static final long serialVersionUID = 3258103020495908596L; public final AbstractC12721yD<? super R> downstream; public final AbstractC13031yl<? super T, ? extends AbstractC12761yH<? extends R>> mapper; @Override // X.AbstractC12721yD public final void onError(Throwable th) { this.downstream.onError(th); } @Override // X.AbstractC12721yD public final void onSuccess(T t) { try { Object apply = this.mapper.apply(t); AnonymousClass219.A01(apply, "The single returned by the mapper is null"); AbstractC12761yH r2 = (AbstractC12761yH) apply; if (!EnumC12511xi.isDisposed((AbstractC12271xB) get())) { r2.AAb(new C13371zT(this, this.downstream)); } } catch (Throwable th) { C12261xA.A00(th); this.downstream.onError(th); } } public C13381zU(AbstractC12721yD<? super R> r1, AbstractC13031yl<? super T, ? extends AbstractC12761yH<? extends R>> r2) { this.downstream = r1; this.mapper = r2; } @Override // X.AbstractC12721yD public final void A8A(AbstractC12271xB r2) { if (EnumC12511xi.setOnce(this, r2)) { this.downstream.A8A(this); } } @Override // X.AbstractC12271xB public final void dispose() { EnumC12511xi.dispose(this); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
adc768ddded24b6203efdcdf51570a86fe3f3543
493e6a95449c9c07ccecf10fc296f22f76a84580
/app/src/main/java/com/example/baitap4_3/FragmentB.java
f30b1dd7b1c60ac0580cb0dd82c51848e78b587a
[]
no_license
chiuthuy/baitap4_3
a7c9185eb8c42ee4d3ee2c3950c26dd554fe4cb8
142224fa4fb70122be304668f74ed95805f9f479
refs/heads/master
2021-02-18T14:20:27.613929
2020-03-05T15:53:14
2020-03-05T15:53:14
245,205,060
0
0
null
null
null
null
UTF-8
Java
false
false
1,135
java
package com.example.baitap4_3; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; public class FragmentB extends Fragment { TextView txtb; EditText edb; Button btnb; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view=inflater.inflate(R.layout.fragment_b,container,false); txtb=view.findViewById(R.id.txtB); edb=view.findViewById(R.id.edB); btnb=view.findViewById(R.id.btnB); btnb.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { TextView txta=(TextView) getActivity().findViewById(R.id.txtA); txta.setText(edb.getText().toString()); } }); return view; } }
[ "=" ]
=
cbce3ccd4b4630ed7b3d4a3bc04118dcb4b69190
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/MATH-51b-5-1-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/apache/commons/math/analysis/solvers/BaseSecantSolver_ESTest_scaffolding.java
4284481c7dd36a507fdd9652e4c7dad11ff29bf2
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
5,198
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Oct 29 05:42:46 UTC 2021 */ package org.apache.commons.math.analysis.solvers; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class BaseSecantSolver_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.analysis.solvers.BaseSecantSolver"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(BaseSecantSolver_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math.exception.MathIllegalStateException", "org.apache.commons.math.util.Incrementor", "org.apache.commons.math.exception.NumberIsTooSmallException", "org.apache.commons.math.exception.NullArgumentException", "org.apache.commons.math.exception.util.ExceptionContext", "org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils", "org.apache.commons.math.exception.NonMonotonousSequenceException", "org.apache.commons.math.util.FastMath", "org.apache.commons.math.util.MathUtils", "org.apache.commons.math.analysis.solvers.UnivariateRealSolver", "org.apache.commons.math.exception.NotStrictlyPositiveException", "org.apache.commons.math.analysis.solvers.IllinoisSolver", "org.apache.commons.math.exception.NotFiniteNumberException", "org.apache.commons.math.analysis.DifferentiableUnivariateRealFunction", "org.apache.commons.math.analysis.UnivariateRealFunction", "org.apache.commons.math.analysis.SinFunction", "org.apache.commons.math.analysis.solvers.BaseSecantSolver$1", "org.apache.commons.math.exception.NotPositiveException", "org.apache.commons.math.analysis.solvers.RegulaFalsiSolver", "org.apache.commons.math.exception.MathIllegalArgumentException", "org.apache.commons.math.analysis.QuinticFunction$1", "org.apache.commons.math.analysis.solvers.AbstractUnivariateRealSolver", "org.apache.commons.math.exception.MathUserException", "org.apache.commons.math.analysis.solvers.BaseAbstractUnivariateRealSolver", "org.apache.commons.math.exception.DimensionMismatchException", "org.apache.commons.math.analysis.solvers.PegasusSolver", "org.apache.commons.math.exception.MathIllegalNumberException", "org.apache.commons.math.analysis.solvers.BracketedUnivariateRealSolver", "org.apache.commons.math.analysis.solvers.BaseSecantSolver", "org.apache.commons.math.analysis.solvers.BaseSecantSolver$Method", "org.apache.commons.math.analysis.SinFunction$1", "org.apache.commons.math.analysis.solvers.AllowedSolution", "org.apache.commons.math.exception.NumberIsTooLargeException", "org.apache.commons.math.exception.MathInternalError", "org.apache.commons.math.analysis.solvers.BaseUnivariateRealSolver", "org.apache.commons.math.exception.TooManyEvaluationsException", "org.apache.commons.math.analysis.SincFunction", "org.apache.commons.math.analysis.XMinus5Function$1", "org.apache.commons.math.exception.util.Localizable", "org.apache.commons.math.analysis.Expm1Function", "org.apache.commons.math.exception.MaxCountExceededException", "org.apache.commons.math.analysis.MonitoredFunction", "org.apache.commons.math.exception.MathArithmeticException", "org.apache.commons.math.analysis.Expm1Function$1", "org.apache.commons.math.analysis.QuinticFunction", "org.apache.commons.math.exception.util.LocalizedFormats", "org.apache.commons.math.exception.util.ExceptionContextProvider", "org.apache.commons.math.analysis.XMinus5Function", "org.apache.commons.math.exception.NoBracketingException", "org.apache.commons.math.exception.util.ArgUtils" ); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
8ac815d56fc1187be311ac1f3f09da6e14fa4e28
ca3745d4f1ee888cff5af10eb8321ddeaf812590
/src/com/wsj/Util/UserServiceException.java
0a0010d0d10c17441c38375061806cac9a2772c7
[]
no_license
Wang-Shuaijie/Project_bookstore
84f7e06e5acd4aff3c1cb83f5c1e29fa746d8a5c
b12b96f9772aec5e9d38d28f38e67d97bab3f56f
refs/heads/master
2020-04-29T06:25:35.332954
2019-03-16T02:19:22
2019-03-16T02:20:35
175,915,615
1
0
null
null
null
null
UTF-8
Java
false
false
313
java
package com.wsj.Util; public class UserServiceException extends Exception{ private static final long serialVersionUID = 1L; public UserServiceException(String msg) { super(msg); } public UserServiceException(String msg,Exception e) { super(msg, e); } public UserServiceException() { super(); } }
[ "2283613941@qq.com" ]
2283613941@qq.com
c48c8d0a5d8a29f867da825041c8190d95f74488
5714e7075baaa2ed98fe9cc10dfa0e5110a98d5e
/support/cas-server-support-rest-tokens/src/main/java/org/apereo/cas/config/CasRestTokensConfiguration.java
30ffe646ed0b40ea36782b5c0e783c5976040f92
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
hunybei/cas
5646d3a2e7496b400c2d89f6a970a8e841e3067a
6553eace018407336b14c6c016783525d1a7e5eb
refs/heads/master
2020-03-27T20:21:27.270060
2018-09-01T09:41:58
2018-09-01T09:41:58
147,062,720
2
0
Apache-2.0
2018-09-02T07:03:25
2018-09-02T07:03:25
null
UTF-8
Java
false
false
2,368
java
package org.apereo.cas.config; import org.apereo.cas.CentralAuthenticationService; import org.apereo.cas.configuration.CasConfigurationProperties; import org.apereo.cas.rest.factory.TicketGrantingTicketResourceEntityResponseFactory; import org.apereo.cas.rest.plan.ServiceTicketResourceEntityResponseFactoryConfigurer; import org.apereo.cas.rest.plan.ServiceTicketResourceEntityResponseFactoryPlan; import org.apereo.cas.services.ServicesManager; import org.apereo.cas.ticket.registry.TicketRegistrySupport; import org.apereo.cas.token.TokenTicketBuilder; import org.apereo.cas.tokens.JWTServiceTicketResourceEntityResponseFactory; import org.apereo.cas.tokens.JWTTicketGrantingTicketResourceEntityResponseFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * This is {@link CasRestTokensConfiguration}. * * @author Misagh Moayyed * @since 5.2.0 */ @Configuration("casRestTokensConfiguration") @EnableConfigurationProperties(CasConfigurationProperties.class) public class CasRestTokensConfiguration implements ServiceTicketResourceEntityResponseFactoryConfigurer { @Autowired @Qualifier("centralAuthenticationService") private CentralAuthenticationService centralAuthenticationService; @Autowired @Qualifier("tokenTicketBuilder") private TokenTicketBuilder tokenTicketBuilder; @Autowired @Qualifier("servicesManager") private ServicesManager servicesManager; @Autowired @Qualifier("defaultTicketRegistrySupport") private TicketRegistrySupport ticketRegistrySupport; @Bean public TicketGrantingTicketResourceEntityResponseFactory ticketGrantingTicketResourceEntityResponseFactory() { return new JWTTicketGrantingTicketResourceEntityResponseFactory(this.servicesManager, tokenTicketBuilder); } @Override public void configureEntityResponseFactory(final ServiceTicketResourceEntityResponseFactoryPlan plan) { plan.registerFactory(new JWTServiceTicketResourceEntityResponseFactory(centralAuthenticationService, tokenTicketBuilder, ticketRegistrySupport, servicesManager)); } }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
666c446d8095d00455b72bf9429d0457d55aa982
e463036bded7c86cfef24dbda9a37d582b197c29
/P3/partion25/sub23.java
fb33f4bc95ce296ca1b646dd168e478e54caf1c5
[]
no_license
Himatsubu/JRThrash
f05d446ec4e4d5f717aca63b9bca8db2237177d9
1f11080a86f3ac9a11a463b2237af87e60d66db3
refs/heads/master
2020-04-15T13:36:39.096625
2017-02-21T06:30:47
2017-02-21T06:30:47
59,081,414
0
0
null
null
null
null
UTF-8
Java
false
false
1,156
java
import net.njlab.sample.annotation.*; public class sub23 extends Thread{ final float[] T = new float[484]; final float[] V = new float[484]; final float[] U = new float[484]; final float[] result = new float[484]; @JRThrashUnroll(unrollNum=4, loopVariableName="j",unrollType=JRThrashUnroll.copyLoopVar) public void run(){ int k,j; float dt,dx,dy,r1,r2,r3,r4,YY; dx=0.2f; dy=0.05f; r1=0.00125f; r2=0.005f; r3=0.0125f; r4=0.2f; // 次の時間での温度の計算 for (k = 18; k <= 20; k++){ for (j = 14; j <= 17; j++){ result[j*21+k]= T[j*21+k]-r1*U[j*21+k]*(T[(j+1)*21+k]-T[(j-1)*21+k]) -r2*V[j*21+k]*(T[j*21+k+1]-T[j*21+k-1]) +r3*(T[(j+1)*21+k]-2.0f*T[j*21+k]+T[(j-1)*21+k]) +r4*(T[j*21+k+1]-2.0f*T[j*21+k]+T[j*21+k-1]); } } /* uu[j][k]= u[j][k]+r1*(u[j+1][k]-2.0f*u[j][k]+u[j-1][k]) +r2*(u[j][k+1]-2.0f*u[j][k]+u[j][k-1])+dt*q[j][k]; sub[i].u[3]=u[j*21+k]; sub[i].u[1]=u[j*21+k-1]; sub[i].u[5]=u[j*21+k+1]; sub[i].u[2]=u[(j-1)*21+k]; sub[i].u[4]=u[(j+1)*21+k]; */ } }
[ "keitaro.871@gmail.com" ]
keitaro.871@gmail.com
6b0fa8647814bd745e53ffb4ec50ef064bdcb382
493004baf3d0c60b40202b0b331807c7f7cde2c4
/src/com/mobile/meishang/utils/view/pulltorefresh/XFooterView.java
685d5770efb4c9b1fd80c94bdf4138248b9a565e
[]
no_license
zhangbin131421/Meishang
5d50e4f58d02dbcebec9e21aee31c73b963cffaf
51e6d17d5c7ac8e43a53c85fe6dac1c90a8b8bab
refs/heads/master
2021-01-21T23:33:51.313009
2015-06-28T10:47:55
2015-06-28T10:47:55
34,308,491
0
1
null
null
null
null
UTF-8
Java
false
false
4,276
java
package com.mobile.meishang.utils.view.pulltorefresh; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.view.animation.Animation; import android.view.animation.RotateAnimation; import android.widget.LinearLayout; import android.widget.TextView; import com.mobile.meishang.R; public class XFooterView extends LinearLayout { public final static int STATE_NORMAL = 0; public final static int STATE_READY = 1; public final static int STATE_LOADING = 2; private final int ROTATE_ANIM_DURATION = 180; private View mLayout; private View mProgressBar; private TextView mHintView; // private ImageView mHintImage; private Animation mRotateUpAnim; private Animation mRotateDownAnim; private int mState = STATE_NORMAL; public XFooterView(Context context) { super(context); initView(context); } public XFooterView(Context context, AttributeSet attrs) { super(context, attrs); initView(context); } private void initView(Context context) { mLayout = LayoutInflater.from(context) .inflate(R.layout.layout_pullrefresh_footer, null); mLayout.setLayoutParams(new LinearLayout.LayoutParams( LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); addView(mLayout); mProgressBar = mLayout.findViewById(R.id.footer_progressbar); mHintView = (TextView) mLayout.findViewById(R.id.footer_hint_text); // mHintImage = (ImageView) mLayout.findViewById(R.id.footer_arrow); mRotateUpAnim = new RotateAnimation(0.0f, 180.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); mRotateUpAnim.setDuration(ROTATE_ANIM_DURATION); mRotateUpAnim.setFillAfter(true); mRotateDownAnim = new RotateAnimation(180.0f, 0.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f); mRotateDownAnim.setDuration(ROTATE_ANIM_DURATION); mRotateDownAnim.setFillAfter(true); } /** * Set footer view state * * @see #STATE_LOADING * @see #STATE_NORMAL * @see #STATE_READY * * @param state */ public void setState(int state) { if (state == mState) return; if (state == STATE_LOADING) { // mHintImage.clearAnimation(); // mHintImage.setVisibility(View.INVISIBLE); mProgressBar.setVisibility(View.VISIBLE); mHintView.setVisibility(View.INVISIBLE); } else { mHintView.setVisibility(View.VISIBLE); // mHintImage.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.INVISIBLE); } switch (state) { case STATE_NORMAL: // if (mState == STATE_READY) { // mHintImage.startAnimation(mRotateDownAnim); // } // if (mState == STATE_LOADING) { // mHintImage.clearAnimation(); // } mHintView.setText(R.string.footer_hint_load_normal); break; case STATE_READY: if (mState != STATE_READY) { // mHintImage.clearAnimation(); // mHintImage.startAnimation(mRotateUpAnim); mHintView.setText(R.string.footer_hint_load_ready); } break; case STATE_LOADING: break; } mState = state; } /** * Set footer view bottom margin. * * @param margin */ public void setBottomMargin(int margin) { if (margin < 0) return; LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mLayout .getLayoutParams(); lp.bottomMargin = margin; mLayout.setLayoutParams(lp); } /** * Get footer view bottom margin. * * @return */ public int getBottomMargin() { LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mLayout .getLayoutParams(); return lp.bottomMargin; } /** * normal status */ public void normal() { mHintView.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.GONE); } /** * loading status */ public void loading() { mHintView.setVisibility(View.GONE); mProgressBar.setVisibility(View.VISIBLE); } /** * hide footer when disable pull load more */ public void hide() { LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mLayout .getLayoutParams(); lp.height = 0; mLayout.setLayoutParams(lp); } /** * show footer */ public void show() { LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) mLayout .getLayoutParams(); lp.height = LayoutParams.WRAP_CONTENT; mLayout.setLayoutParams(lp); } }
[ "zhangbin131421@163.com" ]
zhangbin131421@163.com
d586bf0fd52077bfe3883ce8db5bbfd1afc9e458
62a18caaf370a9d161058a622a359321425b7033
/src/farruh/edu/jumbocs/datastructures/singlylinkedlist/SinglyLinkedList.java
752ad24657c66b505859b2b55a0740f9578463d7
[]
no_license
farruhha/jumbocs
01e69b04a5ecc93388e28eef3d55bb4ab6b965e1
2a2731746bddc738adfbff78acecc08bc6a90f68
refs/heads/master
2021-09-12T04:50:32.950433
2018-04-14T15:39:31
2018-04-14T15:39:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,117
java
package farruh.edu.jumbocs.datastructures.singlylinkedlist; public class SinglyLinkedList<E> { /* * size() Returns the number of elements * isEmpty() Returns true if the list is empty and false otherwise * first() Returns (but does not remove) the first element in the list * last() Returns (but does not remove) the last element in the list * addFirst(e) Adds a new element to the front of the list * addLast(e) Adds a new element to the end of the list * removeFirst() Removes and returns the first element of the list*/ private static class Node<E> { private E element; private Node<E> next; public Node(E e, Node<E> n) { element = e; next = n; } public E getElement() { return element; } public Node<E> getNext() { return next; } public void setNext(Node<E> n) { next = n; } } private Node<E> head = null; private Node<E> tail = null; private int size = 0; public SinglyLinkedList() { } public int size() { return size; } public boolean isEmpty() { return size == 0; } public E first() { if (isEmpty()) { return null; } return head.getElement(); } public E last() { if (isEmpty()) { return null; } return tail.getElement(); } public void addFirst(E e){ head = new Node<>(e,head); if (size == 0){ tail = head; } size++; } public void addLast(E e){ Node<E> newest = new Node<>(e,null); if (isEmpty()){ head = newest; } else{ tail.setNext(newest); } tail = newest; size++; } public E removeFirst(){ if (isEmpty()){ return null; } E answer = head.getElement(); head = head.getNext(); size--; if (size == 0) { tail = null; } return answer; } }
[ "germany-2013@mail.ru" ]
germany-2013@mail.ru
73e37b4a5abceb1cc7d5715017223184ab3d811f
92e7a62c54bcf24de97b5d4c1bb15b99f775bed2
/OpenConcerto/src/org/openconcerto/utils/i18n/VariantKey.java
816656591ec5214b39e12f647ad8de062b3fdce4
[]
no_license
trespe/openconcerto
4a9c294006187987f64dbf936f167d666e6c5d52
6ccd5a7b56cd75350877842998c94434083fb62f
refs/heads/master
2021-01-13T02:06:29.609413
2015-04-10T08:35:31
2015-04-10T08:35:31
33,717,537
3
0
null
null
null
null
UTF-8
Java
false
false
885
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved. * * The contents of this file are subject to the terms of the GNU General Public License Version 3 * only ("GPL"). You may not use this file except in compliance with the License. You can obtain a * copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each file. */ package org.openconcerto.utils.i18n; /** * A variant of a noun. Each locale is free to create them as necessary, some frequently used ones * are defined in {@link Grammar}. * * @author Sylvain */ public interface VariantKey { String getID(); }
[ "guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b" ]
guillaume.maillard@gmail.com@658cf4a1-8b1b-4573-6053-fb3ec553790b
c22b8ba365e3b10e72f566561bf5afe6c75618e6
4aaf90e58f42cfdb8b2086ec71f2883d2f1a4acc
/src/test/java/tk/mybatis/enums/springboot/LabelValue.java
85be7d5a29c53dbebd09ac7509de8a04efedda64
[]
no_license
songzxDev/mybatis-enum
f5c1734c2e68a2dd48043740950eddb866d3eb7f
99ee91b2c1697cea9bb2fc78eb0f0712512e9055
refs/heads/master
2020-04-20T14:46:35.876017
2019-01-27T03:33:02
2019-01-27T03:33:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
141
java
package tk.mybatis.enums.springboot; /** * @author liuzh */ public interface LabelValue { String getLabel(); Integer getValue(); }
[ "abel533@gmail.com" ]
abel533@gmail.com
01dcf24c2509e0ab93ac5bf3e2252069b82a0263
87601ac01b7dd128734bdb7dd1b745c9d28fd452
/src/main/java/io/github/nucleuspowered/nucleus/modules/kit/KitModule.java
a7fca99a1abad601e3d9848ac9f8bb5aeff55e8a
[ "MIT", "Apache-2.0" ]
permissive
Stonebound/Nucleus
5b0b4d39531a5308ea1343dd44602784008bb154
4c7f7142c8359682e197092718eb016b02c49444
refs/heads/sponge-api/7
2021-05-08T00:44:19.328774
2017-10-18T18:41:59
2017-10-18T18:41:59
107,713,822
0
0
null
2017-10-20T18:39:49
2017-10-20T18:39:49
null
UTF-8
Java
false
false
1,535
java
/* * This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file * at the root of this project for more details. */ package io.github.nucleuspowered.nucleus.modules.kit; import io.github.nucleuspowered.nucleus.Nucleus; import io.github.nucleuspowered.nucleus.api.service.NucleusKitService; import io.github.nucleuspowered.nucleus.internal.qsml.module.ConfigurableModule; import io.github.nucleuspowered.nucleus.modules.kit.config.KitConfigAdapter; import io.github.nucleuspowered.nucleus.modules.kit.handlers.KitHandler; import org.spongepowered.api.Sponge; import uk.co.drnaylor.quickstart.annotations.ModuleData; @ModuleData(id = KitModule.ID, name = "Kit") public class KitModule extends ConfigurableModule<KitConfigAdapter> { public static final String ID = "kit"; @Override protected void performPreTasks() throws Exception { super.performPreTasks(); try { KitHandler kitHandler = new KitHandler(); plugin.registerReloadable(kitHandler::reload); serviceManager.registerService(KitHandler.class, kitHandler); Sponge.getServiceManager().setProvider(plugin, NucleusKitService.class, kitHandler); } catch (Exception ex) { Nucleus.getNucleus().getLogger().warn("Could not load the kits module for the reason below."); ex.printStackTrace(); throw ex; } } @Override public KitConfigAdapter createAdapter() { return new KitConfigAdapter(); } }
[ "git@drnaylor.co.uk" ]
git@drnaylor.co.uk
d4f0bcfb79029c30354a72d91fbd032b6dcfb9ea
aadce671c213fbd6f75637d8fd8fa6efef7c56ae
/everything-bean/src/main/java/com/daltao/bean/BeanInfo.java
1800055aa0850e13aa83cbd2cc5c3b1bb90e4a22
[]
no_license
taodaling/everything
424d891af2567a07c5c8fcce32c77e2f73139776
0c6fc7456dac8eb6b1a09e1ee5674030b0e3c8c2
refs/heads/master
2022-06-22T01:24:25.819000
2020-06-18T10:32:18
2020-06-18T10:32:18
156,957,505
0
0
null
2022-06-10T19:57:14
2018-11-10T07:15:45
Java
UTF-8
Java
false
false
2,797
java
package com.daltao.bean; import com.daltao.cache.Cache; import com.daltao.cache.ConcurrentReferenceCache; import com.daltao.cache.LazyInitCache; import com.daltao.collection.UnmodifiableArrayIterator; import com.daltao.util.ReflectionUtils; import java.lang.reflect.Method; import java.sql.Ref; import java.util.*; public final class BeanInfo { private Class beanClass; private Attribute[] attributes; private Map<String, Attribute> attributeMap; private static Cache<Class, BeanInfo> cache = new LazyInitCache<>(new ConcurrentReferenceCache(), BeanInfo::new); private BeanInfo(Class beanClass) { this.beanClass = beanClass; Map<String, Class> setterMap = new LinkedHashMap<>(); Map<String, Class> getterMap = new LinkedHashMap<>(); for (Method method : beanClass.getMethods()) { if (method.getName().startsWith("set")) { Class[] paramTypes = method.getParameterTypes(); if (paramTypes.length == 1) { setterMap.put(ReflectionUtils.getSetterAttributeName(method.getName()), paramTypes[0]); } } else if (method.getName().startsWith("get")) { Class[] paramTypes = method.getParameterTypes(); if (paramTypes.length == 0) { getterMap.put(ReflectionUtils.getGetterAttributeName(method.getName()), paramTypes[0]); } } } attributeMap = new LinkedHashMap<>(); for (Map.Entry<String, Class> entry : setterMap.entrySet()) { String name = entry.getKey(); Class type = entry.getValue(); attributeMap.put(name, new Attribute(name, type, getterMap.containsKey(name), true)); } for (Map.Entry<String, Class> entry : getterMap.entrySet()) { String name = entry.getKey(); Class type = entry.getValue(); if (attributeMap.containsKey(name)) { continue; } attributeMap.put(name, new Attribute(name, type, true, false)); } attributes = attributeMap.values().toArray(new Attribute[attributes.length]); Arrays.sort(attributes); } public Iterator<Attribute> iterator() { return new UnmodifiableArrayIterator(attributes, 0, attributes.length); } public int getAttributeNumber() { return attributes.length; } public Attribute getAttribute(int i) { return attributes[i]; } public Attribute getAttribute(String name) { return attributeMap.get(name); } public static BeanInfo getInstance(Class beanClass) { return cache.get(beanClass); } }
[ "taodaling@gmail.com" ]
taodaling@gmail.com
79fe8bef5cc7d459a39523c1ffd17e303a94f83a
573b9c497f644aeefd5c05def17315f497bd9536
/src/main/java/com/alipay/api/domain/KoubeiItemExtitemInfoQueryModel.java
a99f03a4e8b488a6b8c01fce186f9f74953e7ff9
[ "Apache-2.0" ]
permissive
zzzyw-work/alipay-sdk-java-all
44d72874f95cd70ca42083b927a31a277694b672
294cc314cd40f5446a0f7f10acbb5e9740c9cce4
refs/heads/master
2022-04-15T21:17:33.204840
2020-04-14T12:17:20
2020-04-14T12:17:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
611
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 外部商品(关联品类,品牌)单个查询 * * @author auto create * @since 1.0, 2017-09-27 17:56:42 */ public class KoubeiItemExtitemInfoQueryModel extends AlipayObject { private static final long serialVersionUID = 7699977857413738946L; /** * 商品编码 */ @ApiField("goods_id") private String goodsId; public String getGoodsId() { return this.goodsId; } public void setGoodsId(String goodsId) { this.goodsId = goodsId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
beea2ce990c3ddfc30ec7a66fc0242bbed67c23a
c82deda73cb8af591ae3232915fd3ae831b286ae
/hedera-node/src/test/java/com/hedera/services/queries/crypto/GetAccountBalanceAnswerTest.java
093da57392f2216a99878bb524f2427bab6487aa
[ "Apache-2.0" ]
permissive
BitBondtmUK/hedera-services
1ca57a7c0335f731b1136f03d838469670e1a154
a0f349b0b7ed88370ffc471148462ba4d1d9ba0e
refs/heads/master
2022-12-03T18:12:17.603960
2020-08-26T04:37:35
2020-08-26T04:37:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,366
java
package com.hedera.services.queries.crypto; /*- * ‌ * Hedera Services Node * ​ * Copyright (C) 2018 - 2020 Hedera Hashgraph, 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. * ‍ */ import static com.hederahashgraph.api.proto.java.HederaFunctionality.CryptoGetAccountBalance; import static org.junit.jupiter.api.Assertions.*; import com.hedera.services.context.primitives.StateView; import com.hedera.services.state.merkle.MerkleEntityId; import com.hedera.services.txns.validation.OptionValidator; import com.hedera.test.factories.accounts.MapValueFactory; import com.hederahashgraph.api.proto.java.AccountID; import com.hederahashgraph.api.proto.java.ContractID; import com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceQuery; import com.hederahashgraph.api.proto.java.CryptoGetAccountBalanceResponse; import com.hederahashgraph.api.proto.java.Query; import com.hederahashgraph.api.proto.java.QueryHeader; import com.hederahashgraph.api.proto.java.Response; import com.hederahashgraph.api.proto.java.ResponseCodeEnum; import com.hederahashgraph.api.proto.java.ResponseType; import com.hedera.services.state.merkle.MerkleAccount; import com.swirlds.fcmap.FCMap; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.platform.runner.JUnitPlatform; import org.junit.runner.RunWith; import static org.mockito.BDDMockito.*; import static com.hedera.services.state.merkle.MerkleEntityId.fromContractId; import static com.hedera.test.utils.IdUtils.*; import static com.hederahashgraph.api.proto.java.ResponseCodeEnum.*; @RunWith(JUnitPlatform.class) class GetAccountBalanceAnswerTest { private FCMap accounts; private StateView view; private OptionValidator optionValidator; private String idLit = "0.0.12345"; private long balance = 1_234L; private MerkleAccount accountV = MapValueFactory.newAccount().balance(balance).get(); private MerkleAccount contractV = MapValueFactory.newContract().balance(balance).get(); private GetAccountBalanceAnswer subject; @BeforeEach private void setup() { accounts = mock(FCMap.class); given(accounts.get(MerkleEntityId.fromAccountId(asAccount(idLit)))).willReturn(accountV); given(accounts.get(fromContractId(asContract(idLit)))).willReturn(contractV); view = new StateView(StateView.EMPTY_TOPICS_SUPPLIER, () -> accounts); optionValidator = mock(OptionValidator.class); subject = new GetAccountBalanceAnswer(optionValidator); } @Test public void requiresNothing() { // setup: CryptoGetAccountBalanceQuery costAnswerOp = CryptoGetAccountBalanceQuery.newBuilder() .setHeader(QueryHeader.newBuilder().setResponseType(ResponseType.COST_ANSWER)) .build(); Query costAnswerQuery = Query.newBuilder().setCryptogetAccountBalance(costAnswerOp).build(); CryptoGetAccountBalanceQuery answerOnlyOp = CryptoGetAccountBalanceQuery.newBuilder() .setHeader(QueryHeader.newBuilder().setResponseType(ResponseType.ANSWER_ONLY)) .build(); Query answerOnlyQuery = Query.newBuilder().setCryptogetAccountBalance(answerOnlyOp).build(); // expect: assertFalse(subject.requiresNodePayment(costAnswerQuery)); assertFalse(subject.requiresNodePayment(answerOnlyQuery)); assertFalse(subject.needsAnswerOnlyCost(answerOnlyQuery)); assertFalse(subject.needsAnswerOnlyCost(costAnswerQuery)); } @Test public void hasNoPayment() { // expect: assertFalse(subject.extractPaymentFrom(mock(Query.class)).isPresent()); } @Test public void syntaxCheckRequiresId() { // given: CryptoGetAccountBalanceQuery op = CryptoGetAccountBalanceQuery.newBuilder().build(); Query query = Query.newBuilder().setCryptogetAccountBalance(op).build(); // when: ResponseCodeEnum status = subject.checkValidity(query, view); // expect: assertEquals(INVALID_ACCOUNT_ID, status); } @Test public void syntaxCheckValidatesCidIfPresent() { // setup: ContractID cid = asContract(idLit); // given: CryptoGetAccountBalanceQuery op = CryptoGetAccountBalanceQuery.newBuilder() .setContractID(cid) .build(); Query query = Query.newBuilder().setCryptogetAccountBalance(op).build(); // and: given(optionValidator.queryableContractStatus(cid, accounts)).willReturn(CONTRACT_DELETED); // when: ResponseCodeEnum status = subject.checkValidity(query, view); // expect: assertEquals(CONTRACT_DELETED, status); } @Test public void getsValidity() { // given: Response response = Response.newBuilder().setCryptogetAccountBalance( CryptoGetAccountBalanceResponse.newBuilder() .setHeader(subject.answerOnlyHeader(RESULT_SIZE_LIMIT_EXCEEDED))).build(); // expect: assertEquals(RESULT_SIZE_LIMIT_EXCEEDED, subject.extractValidityFrom(response)); } @Test public void requiresOkMetaValidity() { // setup: AccountID id = asAccount(idLit); // given: CryptoGetAccountBalanceQuery op = CryptoGetAccountBalanceQuery.newBuilder() .setAccountID(id) .build(); Query query = Query.newBuilder().setCryptogetAccountBalance(op).build(); // when: Response response = subject.responseGiven(query, view, PLATFORM_NOT_ACTIVE); ResponseCodeEnum status = response.getCryptogetAccountBalance() .getHeader() .getNodeTransactionPrecheckCode(); // expect: assertEquals(PLATFORM_NOT_ACTIVE, status); assertEquals(id, response.getCryptogetAccountBalance().getAccountID()); } @Test public void syntaxCheckValidatesIdIfPresent() { // setup: AccountID id = asAccount(idLit); // given: CryptoGetAccountBalanceQuery op = CryptoGetAccountBalanceQuery.newBuilder() .setAccountID(id) .build(); Query query = Query.newBuilder().setCryptogetAccountBalance(op).build(); // and: given(optionValidator.queryableAccountStatus(id, accounts)) .willReturn(ACCOUNT_DELETED); // when: ResponseCodeEnum status = subject.checkValidity(query, view); // expect: assertEquals(ACCOUNT_DELETED, status); } @Test public void answersWithAccountBalance() { // setup: AccountID id = asAccount(idLit); // given: CryptoGetAccountBalanceQuery op = CryptoGetAccountBalanceQuery.newBuilder() .setAccountID(id) .build(); Query query = Query.newBuilder().setCryptogetAccountBalance(op).build(); // when: Response response = subject.responseGiven(query, view, OK); ResponseCodeEnum status = response.getCryptogetAccountBalance() .getHeader() .getNodeTransactionPrecheckCode(); long answer = response.getCryptogetAccountBalance().getBalance(); // expect: assertTrue(response.getCryptogetAccountBalance().hasHeader(), "Missing response header!"); assertEquals(OK, status); assertEquals(balance, answer); assertEquals(id, response.getCryptogetAccountBalance().getAccountID()); } @Test public void recognizesFunction() { // expect: assertEquals(CryptoGetAccountBalance, subject.canonicalFunction()); } }
[ "michael.tinker@hedera.com" ]
michael.tinker@hedera.com
f28dfb142a847c59508450407da6cd59c113ee79
11cfcbe5780d5aa0bed591ca915395edf312288f
/InterfaceFiguras/src/interfacefiguras/InterfaceFiguras.java
bde89a04a4bf1f9303412d91bef8c05ddd6cbea3
[]
no_license
Osvimil/NetbeansMac
7b47dc4979661254650a88f55d221605e7c199e1
0073400ed8b219f600ddc1a5ef99c62ecbf2e628
refs/heads/master
2020-04-16T11:46:28.742706
2019-01-13T20:44:28
2019-01-13T20:44:28
165,550,841
0
0
null
null
null
null
UTF-8
Java
false
false
1,119
java
package interfacefiguras; import java.util.ArrayList; import java.util.List; public class InterfaceFiguras { public static void main(String[] args) { Cuadrado cuadrado1 = new Cuadrado(20f); Cuadrado cuadrado2 = new Cuadrado(30f); Circulo circulo1 = new Circulo(12.34f); Circulo circulo2 = new Circulo(10.11f); Rectangulo rect1 = new Rectangulo(8f,10f); Rectangulo rect2 = new Rectangulo(4f,8f); List<Figura> figurillas = new ArrayList<Figura>(); figurillas.add(cuadrado1); figurillas.add(cuadrado2); figurillas.add(circulo1); figurillas.add(circulo2); figurillas.add(rect1); figurillas.add(rect2); float areaTotal=0; for(Figura recorredor: figurillas){ areaTotal = areaTotal + recorredor.area(); } System.out.println("Se tiene un total de: "+figurillas.size()+" figuras y un area total de: " +areaTotal+" unidades cuadradas"); } }
[ "oswaldoadidas@hotmail.com" ]
oswaldoadidas@hotmail.com
47be27587c076a2edf364fe4f094804fd517c5dc
995f73d30450a6dce6bc7145d89344b4ad6e0622
/P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/com/android/server/NativeDaemonEvent.java
8ca37d584820b66a601bb159f363749b10c9c2c5
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,015
java
package com.android.server; import com.google.android.collect.Lists; import java.io.FileDescriptor; import java.util.ArrayList; public class NativeDaemonEvent { public static final String SENSITIVE_MARKER = "{{sensitive}}"; private final int mCmdNumber; private final int mCode; private FileDescriptor[] mFdList; private final String mLogMessage; private final String mMessage; private String[] mParsed = null; private final String mRawEvent; private NativeDaemonEvent(int cmdNumber, int code, String message, String rawEvent, String logMessage, FileDescriptor[] fdList) { this.mCmdNumber = cmdNumber; this.mCode = code; this.mMessage = message; this.mRawEvent = rawEvent; this.mLogMessage = logMessage; this.mFdList = fdList; } public int getCmdNumber() { return this.mCmdNumber; } public int getCode() { return this.mCode; } public String getMessage() { return this.mMessage; } public FileDescriptor[] getFileDescriptors() { return this.mFdList; } @Deprecated public String getRawEvent() { return this.mRawEvent; } public String toString() { return this.mLogMessage; } public boolean isClassContinue() { int i = this.mCode; return i >= 100 && i < 200; } public boolean isClassOk() { int i = this.mCode; return i >= 200 && i < 300; } public boolean isClassServerError() { int i = this.mCode; return i >= 400 && i < 500; } public boolean isClassClientError() { int i = this.mCode; return i >= 500 && i < 600; } public boolean isClassUnsolicited() { return isClassUnsolicited(this.mCode); } private static boolean isClassUnsolicited(int code) { return (code >= 600 && code < 700) || (code >= 800 && code < 910); } public void checkCode(int code) { if (this.mCode != code) { throw new IllegalStateException("Expected " + code + " but was: " + this); } } public static NativeDaemonEvent parseRawEvent(String rawEvent, FileDescriptor[] fdList) { String logMessage; String[] parsed = rawEvent.split(" "); if (parsed.length >= 2) { try { int code = Integer.parseInt(parsed[0]); int skiplength = parsed[0].length() + 1; int cmdNumber = -1; if (!isClassUnsolicited(code)) { if (parsed.length >= 3) { try { cmdNumber = Integer.parseInt(parsed[1]); skiplength += parsed[1].length() + 1; } catch (NumberFormatException e) { throw new IllegalArgumentException("problem parsing cmdNumber", e); } } else { throw new IllegalArgumentException("Insufficient arguemnts"); } } if (parsed.length <= 2 || !parsed[2].equals(SENSITIVE_MARKER)) { logMessage = rawEvent; } else { skiplength += parsed[2].length() + 1; logMessage = parsed[0] + " " + parsed[1] + " {}"; } return new NativeDaemonEvent(cmdNumber, code, rawEvent.substring(skiplength), rawEvent, logMessage, fdList); } catch (NumberFormatException e2) { throw new IllegalArgumentException("problem parsing code", e2); } } else { throw new IllegalArgumentException("Insufficient arguments"); } } public static String[] filterMessageList(NativeDaemonEvent[] events, int matchCode) { ArrayList<String> result = Lists.newArrayList(); for (NativeDaemonEvent event : events) { if (event.getCode() == matchCode) { result.add(event.getMessage()); } } return (String[]) result.toArray(new String[result.size()]); } public String getField(int n) { if (this.mParsed == null) { this.mParsed = unescapeArgs(this.mRawEvent); } int n2 = n + 2; String[] strArr = this.mParsed; if (n2 > strArr.length) { return null; } return strArr[n2]; } public static String[] unescapeArgs(String rawEvent) { ArrayList<String> parsed = new ArrayList<>(); int length = rawEvent.length(); int current = 0; boolean quoted = false; if (rawEvent.charAt(0) == '\"') { quoted = true; current = 0 + 1; } while (current < length) { char terminator = quoted ? '\"' : ' '; int wordEnd = current; while (wordEnd < length && rawEvent.charAt(wordEnd) != terminator) { if (rawEvent.charAt(wordEnd) == '\\') { wordEnd++; } wordEnd++; } if (wordEnd > length) { wordEnd = length; } String word = rawEvent.substring(current, wordEnd); current += word.length(); if (!quoted) { word = word.trim(); } else { current++; } parsed.add(word.replace("\\\\", "\\").replace("\\\"", "\"")); int nextSpace = rawEvent.indexOf(32, current); int nextQuote = rawEvent.indexOf(" \"", current); if (nextQuote <= -1 || nextQuote > nextSpace) { quoted = false; if (nextSpace > -1) { current = nextSpace + 1; } } else { quoted = true; current = nextQuote + 2; } } return (String[]) parsed.toArray(new String[parsed.size()]); } }
[ "dstmath@163.com" ]
dstmath@163.com
16cb7a048872549d0664e723242a1eab9ec484b8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_9e04cf0d80ddcba07486d0969043aa6f2f7590a9/MainActivity/4_9e04cf0d80ddcba07486d0969043aa6f2f7590a9_MainActivity_s.java
e67878a1e99249ee63f7357797d94149714fe091
[]
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,962
java
package com.couchbase.liteservandroid; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.widget.TextView; import com.couchbase.lite.CouchbaseLiteException; import com.couchbase.lite.Database; import com.couchbase.lite.Manager; import com.couchbase.lite.View; import com.couchbase.lite.javascript.JavaScriptViewCompiler; import com.couchbase.lite.listener.LiteListener; import java.io.IOException; public class MainActivity extends Activity { private static final int DEFAULT_LISTEN_PORT = 5984; private static final String DATABASE_NAME = "cblite-test"; private static final String LISTEN_PORT_PARAM_NAME = "listen_port"; public static String TAG = "LiteServ"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Register the JavaScript view compiler View.setCompiler(new JavaScriptViewCompiler()); try { int port = startCBLListener(getListenPort()); showListenPort(port); } catch (Exception e) { TextView listenPortTextView = (TextView)findViewById(R.id.listen_port_textview); listenPortTextView.setText(String.format("Error starting LiteServ")); Log.e(TAG, "Error starting LiteServ", e); } } private void showListenPort(int listenPort) { Log.d(TAG, "listenPort: " + listenPort); TextView listenPortTextView = (TextView)findViewById(R.id.listen_port_textview); listenPortTextView.setText(String.format("Listening on port: %d. Db: %s", listenPort, DATABASE_NAME)); } private int startCBLListener(int suggestedListenPort) throws IOException, CouchbaseLiteException { Manager manager = startCBLite(); startDatabase(manager, DATABASE_NAME); LiteListener listener = new LiteListener(manager, suggestedListenPort); int port = listener.getListenPort(); Thread thread = new Thread(listener); thread.start(); return port; } protected Manager startCBLite() throws IOException { Manager manager; manager = new Manager(getFilesDir(), Manager.DEFAULT_OPTIONS); return manager; } protected void startDatabase(Manager manager, String databaseName) throws CouchbaseLiteException { Database database = manager.getDatabase(databaseName); database.open(); } private int getListenPort() { return getIntent().getIntExtra(LISTEN_PORT_PARAM_NAME, DEFAULT_LISTEN_PORT); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3d637dad4bfc3eeec5afb888a9291695aa84eb96
bb3ac3ed1c3a787aabd0d118abd1e523c9b53cb4
/src/nez/runtime/MemoTable.java
b42ffb1dd443b411a7a8a0961f513996f4f4aa6a
[]
no_license
peg4d/nez
ba18ed55caed70b903de3be2feac0b3bba212afa
49c69c5cbeb203cd43cff139a014223e49945a8b
refs/heads/master
2016-09-05T21:15:36.467308
2015-04-02T08:39:29
2015-04-02T08:39:29
25,847,889
4
8
null
2015-04-02T08:39:30
2014-10-28T01:38:52
Java
UTF-8
Java
false
false
4,993
java
package nez.runtime; import java.util.HashMap; import nez.main.Recorder; public abstract class MemoTable { public abstract MemoTable newMemoTable(long len, int w, int n); abstract void setMemo(long pos, int memoPoint, boolean failed, Object result, int consumed, int stateValue); abstract MemoEntry getMemo(long pos, int memoPoint); abstract MemoEntry getMemo2(long pos, int memoPoint, int stateValue); int CountStored; int CountUsed; int CountInvalidated; void initStat() { this.CountStored = 0; this.CountUsed = 0; this.CountInvalidated = 0; } public static MemoTable newNullTable(long len, int w, int n) { return new NullTable(len, w, n); } public static MemoTable newElasticTable(long len, int w, int n) { return new ElasticTable(len, w, n); } public static MemoTable newPackratHashTable(int len, int w, int n) { return new PackratHashTable(len, w, n); } public void record(Recorder rec) { rec.setText("M.TableType", this.getClass().getSimpleName()); rec.setCount("M.MemoStored", this.CountStored); rec.setRatio("M.MemoHit", this.CountUsed, this.CountStored); rec.setCount("M.Invalidated", this.CountInvalidated); } } class NullTable extends MemoTable { @Override public MemoTable newMemoTable(long len, int w, int n) { return this; } NullTable(long len, int w, int n) { this.initStat(); } @Override void setMemo(long pos, int memoPoint, boolean failed, Object result, int consumed, int stateValue) { this.CountStored += 1; } @Override MemoEntry getMemo(long pos, int id) { return null; } @Override MemoEntry getMemo2(long pos, int id, int stateValue) { return null; } } class ElasticTable extends MemoTable { private MemoEntryKey[] memoArray; private final int shift; ElasticTable(long len, int w, int n) { this.memoArray = new MemoEntryKey[w * n + 1]; for(int i = 0; i < this.memoArray.length; i++) { this.memoArray[i] = new MemoEntryKey(); this.memoArray[i].key = -1; } this.shift = (int)(Math.log(n) / Math.log(2.0)) + 1; this.initStat(); } @Override public MemoTable newMemoTable(long len, int w, int n) { return new ElasticTable(len, w, n); } final long longkey(long pos, int memoPoint, int shift) { return ((pos << shift) | memoPoint) & Long.MAX_VALUE; } @Override void setMemo(long pos, int memoPoint, boolean failed, Object result, int consumed, int stateValue) { long key = longkey(pos, memoPoint, shift); int hash = (int)(key % memoArray.length); MemoEntryKey m = this.memoArray[hash]; m.key = key; m.failed = failed; m.result = result; m.consumed = consumed; m.stateValue = stateValue; this.CountStored += 1; } @Override final MemoEntry getMemo(long pos, int memoPoint) { long key = longkey(pos, memoPoint, shift); int hash = (int)(key % memoArray.length); MemoEntryKey m = this.memoArray[hash]; if(m.key == key) { this.CountUsed += 1; return m; } return null; } @Override final MemoEntry getMemo2(long pos, int memoPoint, int stateValue) { long key = longkey(pos, memoPoint, shift); int hash = (int)(key % memoArray.length); MemoEntryKey m = this.memoArray[hash]; if(m.key == key) { if(m.stateValue == stateValue) { this.CountUsed += 1; return m; } this.CountInvalidated += 1; } return null; } } class PackratHashTable extends MemoTable { HashMap<Long, MemoEntryList> memoMap; private MemoEntryList UnusedMemo = null; PackratHashTable(long len, int w, int n) { this.memoMap = new HashMap<Long, MemoEntryList>(w * n); } @Override public MemoTable newMemoTable(long len, int w, int n) { return new PackratHashTable(len, w, n); } private final MemoEntryList newMemo() { if(UnusedMemo != null) { MemoEntryList m = this.UnusedMemo; this.UnusedMemo = m.next; return m; } else { return new MemoEntryList(); } } protected final void unusedMemo(MemoEntryList m) { MemoEntryList s = m; while(m.next != null) { m = m.next; } m.next = this.UnusedMemo; UnusedMemo = s; } @Override protected MemoEntry getMemo(long pos, int memoPoint) { MemoEntryList m = this.memoMap.get(pos); while(m != null) { if(m.memoPoint == memoPoint) { this.CountUsed += 1; return m; } m = m.next; } return m; } @Override protected MemoEntry getMemo2(long pos, int memoPoint, int stateValue) { MemoEntryList m = this.memoMap.get(pos); while(m != null) { if(m.memoPoint == memoPoint) { if(m.stateValue == stateValue) { this.CountUsed += 1; return m; } this.CountInvalidated += 1; } m = m.next; } return m; } @Override void setMemo(long pos, int memoPoint, boolean failed, Object result, int consumed, int stateValue) { MemoEntryList m = newMemo(); m.failed = failed; m.memoPoint = memoPoint; m.stateValue = stateValue; m.result = result; m.consumed = consumed; Long key = pos; m.next = this.memoMap.get(key); this.memoMap.put(key, m); this.CountStored += 1; } }
[ "kimio@konohascript.org" ]
kimio@konohascript.org
1b429ad3b7a438d9035240f38dca40a732c50a5e
c66123ace7d2c870b7f6b1620cb34a8a1fb05994
/src/main/java/big/domain/factories/MyClass9Builder.java
aca043dbd9a3f9b0d38144bb0eb283408922f71f
[]
no_license
jtrentes/jtr_test
843fada2c6533dcc09796b32df3b2acb0570083e
1f25f588297cbf86b199bad0b59275d55cef35a1
refs/heads/master
2020-04-18T07:43:28.087451
2013-08-06T09:27:29
2013-08-06T09:27:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
package big.domain.factories; import big.domain.MyClass9; public class MyClass9Builder { private MyClass9 myclass9; public MyClass9Builder attribute (String attribute) { myclass9.setAttribute (attribute); return this; } public MyClass9 build () { return myclass9; } public MyClass9Builder id (Long id) { myclass9.setId (id); return this; } public MyClass9Builder initMyClass9 () { myclass9 = new MyClass9(); return this; } }
[ "tomcat7@ks313184.kimsufi.com" ]
tomcat7@ks313184.kimsufi.com
53e07d2907fc9ad02446965c1179ed23dedb8a38
0cc6e6c16bf427ca9afba6b835d1eb406702e8c8
/Core/java/com/l2jserver/gameserver/model/zone/L2ZoneForm.java
f14bdad322114b08df9d75562a774e54ea08207b
[]
no_license
Kryspo/blaion
a19087d1533d763d977d4dcc8235a2d1a61890b8
7e34627b01f30aacc290b87e1ad69e81b9e9cc33
refs/heads/master
2020-03-21T15:01:15.618199
2018-06-28T07:35:50
2018-06-28T07:35:50
138,689,668
1
0
null
null
null
null
UTF-8
Java
false
false
2,016
java
/* * 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 com.l2jserver.gameserver.model.zone; import com.l2jserver.gameserver.idfactory.IdFactory; import com.l2jserver.gameserver.instancemanager.ZoneManager; import com.l2jserver.gameserver.model.L2ItemInstance; /** * Abstract base class for any zone form * @author durgus */ public abstract class L2ZoneForm { protected static final int STEP = 10; public abstract boolean isInsideZone(int x, int y, int z); public abstract boolean intersectsRectangle(int x1, int x2, int y1, int y2); public abstract double getDistanceToZone(int x, int y); public abstract int getLowZ(); // Support for the ability to extract the z coordinates of zones. public abstract int getHighZ(); // New fishing patch makes use of that to get the Z for the hook // landing coordinates. protected boolean lineSegmentsIntersect(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2) { return java.awt.geom.Line2D.linesIntersect(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2); } public abstract void visualizeZone(int z); protected final void dropDebugItem(int itemId, int num, int x, int y, int z) { L2ItemInstance item = new L2ItemInstance(IdFactory.getInstance().getNextId(), itemId); item.setCount(num); item.spawnMe(x, y, z + 5); ZoneManager.getInstance().getDebugItems().add(item); } public abstract int[] getRandomPoint(); }
[ "cristianleon48@gmail.com" ]
cristianleon48@gmail.com
252e658e386ab9619a7854793626e0750481689a
022980735384919a0e9084f57ea2f495b10c0d12
/src/ext-lltnxp/ext-impl/src/com/sgs/portlet/document/delegate/pmlfiletypedelegate/service/base/PmlFileTypeDelegateLocalServiceBaseImpl.java
987c156ff9155245c558dee2f4b4ea0e20ccdb32
[]
no_license
thaond/nsscttdt
474d8e359f899d4ea6f48dd46ccd19bbcf34b73a
ae7dacc924efe578ce655ddfc455d10c953abbac
refs/heads/master
2021-01-10T03:00:24.086974
2011-02-19T09:18:34
2011-02-19T09:18:34
50,081,202
0
0
null
null
null
null
UTF-8
Java
false
false
4,560
java
package com.sgs.portlet.document.delegate.pmlfiletypedelegate.service.base; import com.liferay.portal.PortalException; import com.liferay.portal.SystemException; import com.liferay.portal.kernel.dao.orm.DynamicQuery; import com.sgs.portlet.document.delegate.pmlfiletypedelegate.model.PmlFileTypeDelegate; import com.sgs.portlet.document.delegate.pmlfiletypedelegate.service.PmlFileTypeDelegateLocalService; import com.sgs.portlet.document.delegate.pmlfiletypedelegate.service.PmlFileTypeDelegateService; import com.sgs.portlet.document.delegate.pmlfiletypedelegate.service.persistence.PmlFileTypeDelegatePersistence; import java.util.List; public abstract class PmlFileTypeDelegateLocalServiceBaseImpl implements PmlFileTypeDelegateLocalService { @javax.annotation.Resource(name = "com.sgs.portlet.document.delegate.pmlfiletypedelegate.service.PmlFileTypeDelegateLocalService.impl") protected PmlFileTypeDelegateLocalService pmlFileTypeDelegateLocalService; @javax.annotation.Resource(name = "com.sgs.portlet.document.delegate.pmlfiletypedelegate.service.PmlFileTypeDelegateService.impl") protected PmlFileTypeDelegateService pmlFileTypeDelegateService; @javax.annotation.Resource(name = "com.sgs.portlet.document.delegate.pmlfiletypedelegate.service.persistence.PmlFileTypeDelegatePersistence.impl") protected PmlFileTypeDelegatePersistence pmlFileTypeDelegatePersistence; public PmlFileTypeDelegate addPmlFileTypeDelegate( PmlFileTypeDelegate pmlFileTypeDelegate) throws SystemException { pmlFileTypeDelegate.setNew(true); return pmlFileTypeDelegatePersistence.update(pmlFileTypeDelegate, false); } public PmlFileTypeDelegate createPmlFileTypeDelegate( long fileTypeDelegateId) { return pmlFileTypeDelegatePersistence.create(fileTypeDelegateId); } public void deletePmlFileTypeDelegate(long fileTypeDelegateId) throws PortalException, SystemException { pmlFileTypeDelegatePersistence.remove(fileTypeDelegateId); } public void deletePmlFileTypeDelegate( PmlFileTypeDelegate pmlFileTypeDelegate) throws SystemException { pmlFileTypeDelegatePersistence.remove(pmlFileTypeDelegate); } public List<Object> dynamicQuery(DynamicQuery dynamicQuery) throws SystemException { return pmlFileTypeDelegatePersistence.findWithDynamicQuery(dynamicQuery); } public List<Object> dynamicQuery(DynamicQuery dynamicQuery, int start, int end) throws SystemException { return pmlFileTypeDelegatePersistence.findWithDynamicQuery(dynamicQuery, start, end); } public PmlFileTypeDelegate getPmlFileTypeDelegate(long fileTypeDelegateId) throws PortalException, SystemException { return pmlFileTypeDelegatePersistence.findByPrimaryKey(fileTypeDelegateId); } public List<PmlFileTypeDelegate> getPmlFileTypeDelegates(int start, int end) throws SystemException { return pmlFileTypeDelegatePersistence.findAll(start, end); } public int getPmlFileTypeDelegatesCount() throws SystemException { return pmlFileTypeDelegatePersistence.countAll(); } public PmlFileTypeDelegate updatePmlFileTypeDelegate( PmlFileTypeDelegate pmlFileTypeDelegate) throws SystemException { pmlFileTypeDelegate.setNew(false); return pmlFileTypeDelegatePersistence.update(pmlFileTypeDelegate, true); } public PmlFileTypeDelegateLocalService getPmlFileTypeDelegateLocalService() { return pmlFileTypeDelegateLocalService; } public void setPmlFileTypeDelegateLocalService( PmlFileTypeDelegateLocalService pmlFileTypeDelegateLocalService) { this.pmlFileTypeDelegateLocalService = pmlFileTypeDelegateLocalService; } public PmlFileTypeDelegateService getPmlFileTypeDelegateService() { return pmlFileTypeDelegateService; } public void setPmlFileTypeDelegateService( PmlFileTypeDelegateService pmlFileTypeDelegateService) { this.pmlFileTypeDelegateService = pmlFileTypeDelegateService; } public PmlFileTypeDelegatePersistence getPmlFileTypeDelegatePersistence() { return pmlFileTypeDelegatePersistence; } public void setPmlFileTypeDelegatePersistence( PmlFileTypeDelegatePersistence pmlFileTypeDelegatePersistence) { this.pmlFileTypeDelegatePersistence = pmlFileTypeDelegatePersistence; } }
[ "nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e" ]
nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e
0dd7083ce4e0168eb83f288e7c150ee8fccbc3bd
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/com/afollestad/date/managers/DatePickerLayoutManager$mediumFont$1.java
ef9578fc99104ffb2f7915654258bef0ffe49c37
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
924
java
package com.afollestad.date.managers; import android.graphics.Typeface; import com.afollestad.date.util.TypefaceHelper; import kotlin.Metadata; import kotlin.jvm.functions.Function0; import kotlin.jvm.internal.Lambda; @Metadata(mo51341bv = {1, 0, 3}, mo51342d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, mo51343d2 = {"<anonymous>", "Landroid/graphics/Typeface;", "invoke"}, mo51344k = 3, mo51345mv = {1, 1, 15}) /* compiled from: DatePickerLayoutManager.kt */ final class DatePickerLayoutManager$mediumFont$1 extends Lambda implements Function0<Typeface> { public static final DatePickerLayoutManager$mediumFont$1 INSTANCE = new DatePickerLayoutManager$mediumFont$1(); DatePickerLayoutManager$mediumFont$1() { super(0); } public final Typeface invoke() { return TypefaceHelper.INSTANCE.create("sans-serif-medium"); } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
c934f40282b6d307bb2c7c061a0a9443669185ed
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_5feae2ee995583994569d56e638eaae777eb7de6/SlingFunctions/3_5feae2ee995583994569d56e638eaae777eb7de6_SlingFunctions_t.java
1c1b16a6e12b7a7bc5ddc48f1b95e1f8c3333992
[]
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,317
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.sling.scripting.jsp.taglib; import java.util.Iterator; import org.apache.sling.api.adapter.Adaptable; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceResolver; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Class containing the TagLib Functions for Sling. */ public class SlingFunctions { /** * The SLF4J Logger. */ private static final Logger log = LoggerFactory .getLogger(SlingFunctions.class); /** * Adapt the adaptable to the adapter class. * * @param adaptable * the adaptable instance * @param adapter * the class to which to adapt the adaptable * @return the adapted class instance */ public static Object adaptTo(Adaptable adaptable, String adapter) throws ClassNotFoundException { log.trace("adaptTo"); Object adapted = null; if (adaptable != null) { log.debug("Adapting {} to class {}", adaptable, adapter); try { Class<?> adapterClass = loadClass(adapter); adapted = adaptable.adaptTo(adapterClass); } catch (ClassNotFoundException e) { log.error("Could not load class " + adapter, e); } } else { log.warn("Null adaptable specified"); } return adapted; } /** * Searches for resources using the given query formulated in the given * language. * * @param resourceResolver * @param query * The query string to use to find the resources. * @param language * The language in which the query is formulated. * @return An Iterator of Resource objects matching the query. */ public static Iterator<Resource> findResources( ResourceResolver resourceResolver, String query, String language) { log.trace("findResources"); Iterator<Resource> resources = null; if (resourceResolver != null) { log.debug("Finding resources with query {} of type {}", query, language); resources = resourceResolver.findResources(query, language); } else { log.warn("Null resolver specified"); } return resources; } /** * Loads the Class for the name from the current thread's classload. * * @param className * The name of the class to load * @return the class * @throws ClassNotFoundException * a class with the specified name could not be found */ private static Class<?> loadClass(String className) throws ClassNotFoundException { return Thread.currentThread().getContextClassLoader() .loadClass(className); } /** * Gets the resource at the relative path to the provided resource. * * @param base * the resource relative to which to find the path * @param path * the relative path at which to find the resource * @return the resource */ public static Resource getRelativeResource(Resource base, String path) { log.trace("getRelativeResource"); Resource relative = null; if (base != null) { log.debug("Getting relative resource of {} at path {}", base.getPath(), path); relative = base.getResourceResolver().getResource(base, path); } else { log.warn("Null base resource specified"); } return relative; } /** * Method allow for the retrieval of resources. * * @param resolver * the current resource resolver * @param path * the path of the resource to retrieve * @return the resource at the path or null */ public static final Resource getResource(ResourceResolver resolver, String path) { log.trace("getResource"); log.debug("Getting resource at path {}", path); if(resolver == null){ throw new IllegalArgumentException("Null resource resolver"); } return resolver.getResource(path); } /** * Method for allowing the invocation of the Sling Resource listChildren * method. * * @param resource * the resource of which to list the children * @return the children of the resource * @see org.apache.sling.api.resource.Resource#listChildren() */ public static final Iterator<Resource> listChildren(Resource resource) { log.trace("listChildren"); Iterator<Resource> children = null; if (resource != null) { log.debug("Listing children at path {}", resource.getPath()); children = resource.listChildren(); } else { log.warn("Null resource specified"); } return children; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
90e1810a0bf17fc961e47765b22e54f164caa203
68349c585289cc3ef81998d79a67607eb6bb7520
/app/src/main/java/com/wd/winddots/adapter/employee/EmployeeApplyAdapter.java
147aef33aae9cc724739b6d4037593476c113769
[]
no_license
BooksCup/WindDots
9b0feb141724618a8aa93d30f13442d9507de5f4
d72cd0d1a17f97ae8dee85d7debdef2a30596a3d
refs/heads/master
2023-04-03T08:55:54.076503
2021-04-08T06:02:41
2021-04-08T06:02:41
340,230,253
0
0
null
null
null
null
UTF-8
Java
false
false
3,561
java
package com.wd.winddots.adapter.employee; import android.content.Context; import android.widget.TextView; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.wd.winddots.R; import com.wd.winddots.cons.Constant; import com.wd.winddots.entity.UserApply; import com.wd.winddots.utils.VolleyUtil; import com.wd.winddots.view.LoadingDialog; import com.wd.winddots.view.dialog.ConfirmDialog; import java.util.HashMap; import java.util.List; import java.util.Map; import androidx.annotation.Nullable; /** * 用户申请 * * @author zhou */ public class EmployeeApplyAdapter extends BaseQuickAdapter<UserApply, BaseViewHolder> { private VolleyUtil mVolleyUtil; private LoadingDialog mDialog; private Context mContext; public EmployeeApplyAdapter(Context context, int layoutResId, @Nullable List<UserApply> userApplyList) { super(layoutResId, userApplyList); mContext = context; mVolleyUtil = VolleyUtil.getInstance(mContext); mDialog = LoadingDialog.getInstance(mContext); } @Override protected void convert(BaseViewHolder helper, final UserApply userApply) { helper.setText(R.id.tv_name, userApply.getName()).setText(R.id.tv_phone, userApply.getPhone()); TextView agreeTv = helper.getView(R.id.tv_agree); TextView refuseTv = helper.getView(R.id.tv_refuse); agreeTv.setOnClickListener(view -> { // 同意 operateUserApply(userApply.getId(), Constant.OPERATE_STATUS_AGREE, helper.getLayoutPosition()); }); refuseTv.setOnClickListener(view -> { // 拒绝 final ConfirmDialog mConfirmDialog = new ConfirmDialog(mContext, "拒绝申请", "是否拒绝\"" + userApply.getName() + "\"", "是", "否"); mConfirmDialog.setOnDialogClickListener(new ConfirmDialog.OnDialogClickListener() { @Override public void onOkClick() { operateUserApply(userApply.getId(), Constant.OPERATE_STATUS_REFUSE, helper.getLayoutPosition()); } @Override public void onCancelClick() { mConfirmDialog.dismiss(); } }); // 点击空白处消失 mConfirmDialog.setCancelable(false); mConfirmDialog.show(); }); } private void operateUserApply(final String applyId, final String operateStatus, final int position) { mDialog.show(); final String url = Constant.APP_BASE_URL + "userApply/" + applyId; Map<String, String> paramMap = new HashMap<>(); paramMap.put("operateStatus", operateStatus); mVolleyUtil.httpPutRequest(url, paramMap, response -> { mDialog.dismiss(); getData().remove(position); notifyDataSetChanged(); if (null != employeeApplyListener) { employeeApplyListener.updateUserApplyNumber(getData().size()); } }, volleyError -> { mDialog.dismiss(); mVolleyUtil.handleCommonErrorResponse(mContext, volleyError); }); } public interface EmployeeApplyListener { void updateUserApplyNumber(int userApplyNumber); } public void setEmployeeApplyListener(EmployeeApplyListener employeeApplyListener) { this.employeeApplyListener = employeeApplyListener; } private EmployeeApplyListener employeeApplyListener; }
[ "812809680@qq.com" ]
812809680@qq.com
ab79d5e7293efcb8c0e823f5c5e32b0f8775f823
18c70f2a4f73a9db9975280a545066c9e4d9898e
/mirror-cmdb/ums-cmdb-cdn/src/main/java/com/aspire/ums/cdn/CmdbCdnAdaptApplication.java
41083672b3e182094927dcf1b9645f2217fe9225
[]
no_license
iu28igvc9o0/cmdb_aspire
1fe5d8607fdacc436b8a733f0ea44446f431dfa8
793eb6344c4468fe4c61c230df51fc44f7d8357b
refs/heads/master
2023-08-11T03:54:45.820508
2021-09-18T01:47:25
2021-09-18T01:47:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,168
java
package com.aspire.ums.cdn; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; import org.springframework.cloud.netflix.feign.EnableFeignClients; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.transaction.annotation.EnableTransactionManagement; /** * * 项目名称: ums-cmdb-cdn * <p/> * * 类名: CmdbCdnAdaptApplication * <p/> * * 类功能描述: CDN接入CMDB * <p/> * * @author pengguihua * * @date 2019年9月2日 * * @version V1.0 * <br/> * * <b>Copyright(c)</b> 2019 卓望公司-版权所有 * */ @EnableScheduling @EnableFeignClients @EnableDiscoveryClient @EnableTransactionManagement(proxyTargetClass = true) @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class CmdbCdnAdaptApplication { public static void main(String[] args) throws Exception { SpringApplication.run(CmdbCdnAdaptApplication.class, args); } }
[ "jiangxuwen7515@163.com" ]
jiangxuwen7515@163.com
7d044a765943d5768472be13e77b3017f20386ed
243a31a30a60dbf7521e2e0d780177b5851d3b71
/spring-concurrent-modules/core-java-concurrency-basic/src/test/java/com/tom/concurrent/stopping/StopThreadManualTest.java
cb3a2d56fe5a751bb188571ffc0337edb1d26b71
[]
no_license
tomlxq/tutorials
db6c5524d0324631c4b5d9338ed9e20b9efa87f7
3bd7739e89b6d5dff3e4518c0b8fe98425600809
refs/heads/master
2020-12-19T07:13:42.578910
2020-07-19T16:23:10
2020-07-19T16:23:10
235,655,480
0
0
null
2020-06-13T02:00:22
2020-01-22T20:00:48
Java
UTF-8
Java
false
false
1,696
java
package com.tom.concurrent.stopping; import com.jayway.awaitility.Awaitility; import org.junit.Test; import java.util.concurrent.TimeUnit; import static com.jayway.awaitility.Awaitility.await; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class StopThreadManualTest { @Test public void whenStoppedThreadIsStopped() throws InterruptedException { int interval = 5; ControlSubThread controlSubThread = new ControlSubThread(interval); controlSubThread.start(); // Give things a chance to get set up Thread.sleep(interval); assertTrue(controlSubThread.isRunning()); assertFalse(controlSubThread.isStopped()); // Stop it and make sure the flags have been reversed controlSubThread.stop(); await().until(() -> assertTrue(controlSubThread.isStopped())); } @Test public void whenInterruptedThreadIsStopped() throws InterruptedException { int interval = 50; ControlSubThread controlSubThread = new ControlSubThread(interval); controlSubThread.start(); // Give things a chance to get set up Thread.sleep(interval); assertTrue(controlSubThread.isRunning()); assertFalse(controlSubThread.isStopped()); // Stop it and make sure the flags have been reversed controlSubThread.interrupt(); // Wait less than the time we would normally sleep, and make sure we exited. Awaitility.await() .pollDelay(2, TimeUnit.MILLISECONDS) .atMost(interval / 10, TimeUnit.MILLISECONDS) .until(controlSubThread::isStopped); } }
[ "21429503@qq.com" ]
21429503@qq.com
be033e86efa71f9c63f136a226a3df3573af160e
c1a03ccee4b6c842e0595c645862fb83df2b7755
/src/main/java/com/ep/book/springboot/domain/posts/Posts.java
b37e0639a4a178c56e860cc5204ab835ae0b5d70
[]
no_license
eastperson/SpringBootAWS
ae4229f3055833bbadb3f9f8accee31a2b27dfe0
83b7a73c49780d0c4fe1c23b80da3b909d8a588c
refs/heads/master
2023-02-25T14:46:13.064558
2021-01-28T13:30:51
2021-01-28T13:30:51
330,106,887
0
0
null
null
null
null
UTF-8
Java
false
false
1,810
java
package com.ep.book.springboot.domain.posts; import com.ep.book.springboot.domain.BaseTimeEntity; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import javax.persistence.*; // Entity 쿨래스는 Setter 메서드를 만들지 않는다. // 이유는 set의 기능을 활용할 때는 명확한 의도와 목적이 있어야 하고, 그 의도가 메서드명에 반영이 되어있어야 하기 때문이다. // 기본적인 구조는 생성자를 통해 값을 채우는 것이다. @Getter @NoArgsConstructor // 주요 어노테이션을 클래스에 가깝게 작성한다. // 기본값으로 클래스의 카멜케이스 이름을 언더스코어 네이밍으로 테이블 이름을 매칭한다. @Entity public class Posts extends BaseTimeEntity { // PK 필드를 나타낸다. @Id // PK의 생성 규칙을 나타낸다. // 스프링 부트 2.0에서는 GenerationType.IDENTITY옵션을 추가하면 auto_increment가 된다. @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; // Column은 굳이 선언하지 않아도 클래스의 필드는 모두 칼럼이 된다. // @Column은 타입을 설정할 수 있다. // bigint @Column(length = 500, nullable = false) private String title; @Column(columnDefinition = "TEXT",nullable = false) private String content; private String author; // 빌드를 생성자에 적용하면 해당 생성자에 한해서만 빌드 패턴으 구현된다. @Builder public Posts(String title, String content, String author) { this.title = title; this.content = content; this.author = author; } public void update(String title, String content) { this.title = title; this.content = content; } }
[ "kjuioqq8@gmail.com" ]
kjuioqq8@gmail.com
6a319cc05144a62b3b3ef99d04e86b48058a4a4b
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/schnatterer_nusic/nusic-core-api/src/main/java/info/schnatterer/nusic/core/ReleaseService.java
e2e3486b3a3e39f460eef4c75dbc01b76342b23f
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,149
java
// isComment package info.schnatterer.nusic.core; import info.schnatterer.nusic.data.model.Artist; import info.schnatterer.nusic.data.model.Release; import java.util.List; /** * isComment */ public interface isClassOrIsInterface { int isMethod(Release isParameter) throws ServiceException; /** * isComment */ void isMethod(List<Release> isParameter) throws ServiceException; /** * isComment */ void isMethod(List<Release> isParameter, boolean isParameter) throws ServiceException; /** * isComment */ long isMethod(Release isParameter) throws ServiceException; /** * isComment */ List<Release> isMethod(long isParameter) throws ServiceException; /** * isComment */ List<Release> isMethod() throws ServiceException; /** * isComment */ List<Release> isMethod(boolean isParameter) throws ServiceException; /** * isComment */ List<Release> isMethod() throws ServiceException; /** * isComment */ void isMethod() throws ServiceException; List<Release> isMethod() throws ServiceException; }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
6c54db12a7124cae41da76f7349d576dad53fe8b
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/web-v8pub/src/main/java/com/smate/web/v8pub/service/journal/JournalService.java
8281fd2a400f1b5098df5cf1f9b44bdf949412c4
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
1,166
java
package com.smate.web.v8pub.service.journal; import com.smate.web.v8pub.exception.ServiceException; import com.smate.web.v8pub.po.journal.JournalPO; /** * sns 冗余期刊Service * * @author tsz * */ public interface JournalService { /** * 根据id得到期刊 * * @param jid * @return * @throws ServiceException */ JournalPO getById(Long jid) throws ServiceException; /** * 根据名字 查找单个期刊 * * @param jname * @param issn * @param psnId * @return * @throws ServiceException */ JournalPO findJournalByNameIssn(String jname, String issn, Long psnId) throws ServiceException; /** * 保存普通期刊信息 * * @param journalPO * @throws ServiceException */ void save(JournalPO journalPO) throws ServiceException; /** * 在成果录入过程中通过ajax添加期刊. * * @param name * @param issn * @return * @throws ServiceException */ String ajaxAddJournalByPubEnter(String name, String issn) throws ServiceException; /** * 查找影响因子 * * @param jid * @return */ String findImpactFactorsByJid(Long jid); }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
24334b53c805205c897f04637e312e45ec915183
ba9375cd1003cfa631e2b8dacdb6f02cde782d9d
/bson/src/test/unit/org/bson/codecs/pojo/entities/NestedSelfReferentialGenericHolderModel.java
4374ba920775679abf2eae2bed7ec3a387845497
[ "Apache-2.0" ]
permissive
will-wangv/mongo-java-driver
b352fb7ecc834c0b2de40f571159e0ed19f6e010
4311d95791c2313d102e4509850044966e73d77d
refs/heads/master
2020-08-29T07:52:23.208633
2019-10-22T20:18:30
2019-10-24T17:06:16
217,973,671
1
0
Apache-2.0
2019-10-28T06:36:52
2019-10-28T05:39:56
Java
UTF-8
Java
false
false
1,987
java
/* * Copyright 2008-present MongoDB, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.bson.codecs.pojo.entities; public final class NestedSelfReferentialGenericHolderModel { private NestedSelfReferentialGenericModel<Boolean, Long, Double> nested; public NestedSelfReferentialGenericHolderModel() { } public NestedSelfReferentialGenericHolderModel(final NestedSelfReferentialGenericModel<Boolean, Long, Double> nested) { this.nested = nested; } public NestedSelfReferentialGenericModel<Boolean, Long, Double> getNested() { return nested; } public void setNested(final NestedSelfReferentialGenericModel<Boolean, Long, Double> nested) { this.nested = nested; } @Override public boolean equals(final Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } NestedSelfReferentialGenericHolderModel that = (NestedSelfReferentialGenericHolderModel) o; if (nested != null ? !nested.equals(that.nested) : that.nested != null) { return false; } return true; } @Override public int hashCode() { return nested != null ? nested.hashCode() : 0; } @Override public String toString() { return "NestedSelfReferentialGenericHolderModel{" + "nested=" + nested + "}"; } }
[ "ross.lawley@gmail.com" ]
ross.lawley@gmail.com
4a958561bf773fbd778c1d9f8f57bb02b433fe54
0c7593635096b848070e4a785c58ad8922b037d7
/pipeline-12/code/org/software/sphere/society/platform/pipeline/lang/code/actionnode/Speak.java
f1420674df40ac3c86311cc76429f0d14183ec19
[]
no_license
yanchangyou/pipeline
58a798e4ac6f8fcf729be703e16911eee8132728
6cb10723d7ed74ba54e5d62ef0f2c7061ec1e486
refs/heads/master
2016-09-05T21:13:30.940576
2010-02-05T09:46:11
2010-02-05T09:46:11
22,836,834
1
0
null
null
null
null
GB18030
Java
false
false
1,295
java
package org.software.sphere.society.platform.pipeline.lang.code.actionnode; import org.software.sphere.society.platform.pipeline.exception.lang.core.CoreException; import org.software.sphere.society.platform.pipeline.lang.code.mediumnode.MediumNode; import org.software.sphere.society.platform.pipeline.lang.core.Contentable; import org.software.sphere.society.platform.pipeline.lang.core.Skillable; import org.software.sphere.society.platform.pipeline.lang.core.Speakable; /** * 说<br> * 包括内容---data * * @author yanchangyou@gmail.com * @date : 2008-12-26 下午02:50:04 * @file : Speak.java * @version : 0.1 */ public class Speak extends ActionNode implements Contentable { /** * 说的内容 */ private MediumNode medium; /** * 具体的行为 * @param speaker * @throws CoreException */ public void justDoIt(Speakable speaker) throws CoreException { speaker.speak(this); } /** * 抽象的行为 */ public void justDoIt(Skillable skill) throws CoreException { justDoIt((Speakable)skill); } public Contentable getSpeakContent() { return getMedium(); } public MediumNode getMedium() { return medium; } public void setMedium(MediumNode medium) { this.medium = medium; } }
[ "yanchangyou@gmail.com@43c07c84-ada0-11dd-b268-c5ee67e421db" ]
yanchangyou@gmail.com@43c07c84-ada0-11dd-b268-c5ee67e421db
d6acd1fca51341d0f6f2b930c84580d64fd794db
e44af3813abbfd6f9e8672d21317264ec31b226b
/secondUber/src/main/java/com/app/comic/ui/Activity/DestinationBooking/RidesActivity.java
866aca78ab6b51080b78fc6699db5d0ff213fb6b
[ "MIT" ]
permissive
imalpasha/share_ride
b7105af05040f19cda91dbf225b37341c22b6d90
e552bc93913b35e9dbeaad5f8c1b469d507a4a9c
refs/heads/master
2021-01-13T04:37:56.958834
2017-01-20T01:36:05
2017-01-20T01:36:05
79,406,072
0
0
null
null
null
null
UTF-8
Java
false
false
1,406
java
package com.app.comic.ui.Activity.DestinationBooking; import android.os.Bundle; import android.support.v4.app.FragmentManager; import com.app.comic.MainFragmentActivity; import com.app.comic.R; import com.app.comic.ui.Activity.FragmentContainerActivity; import butterknife.ButterKnife; //import android.view.WindowManager; public class RidesActivity extends MainFragmentActivity implements FragmentContainerActivity { //@InjectView(R.id.btnLogin) Button btnLogin; private FragmentManager fragmentManager; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ButterKnife.inject(this); FragmentManager fragmentManager = getSupportFragmentManager(); fragmentManager.beginTransaction().replace(R.id.main_content, RidesFragment.newInstance()).commit(); setTitle("Rides"); // [END shared_tracker] } /*@Override public void onBackPressed() { int count = getFragmentManager().getBackStackEntryCount(); if (count == 0) { super.onBackPressed(); this.finish(); } else { getFragmentManager().popBackStack(); } }*/ @Override public void onResume() { super.onResume(); } @Override public int getFragmentContainerId() { return R.id.main_activity_fragment_container; } }
[ "imalpasha@gmail.com" ]
imalpasha@gmail.com
1b70f8156ad87fa3560899ba546189ae0bfbe2b0
9c574a837a57108fcf4f455cf3312743ee433c88
/src/main/java/com/jhipster/fuse/web/rest/errors/ErrorConstants.java
fec8fed56e2a7706ec0dfa5087531ffef1f48431
[]
no_license
thetlwinoo/jhipster-fuse
eb692ce632534c54a35816da68f57e7f18bbe89b
9b0aeb5247668c1c8c5a31dddafa5024515ecf02
refs/heads/master
2020-05-07T12:12:53.447580
2019-04-10T03:20:16
2019-04-10T03:20:16
180,493,356
0
0
null
null
null
null
UTF-8
Java
false
false
1,218
java
package com.jhipster.fuse.web.rest.errors; import java.net.URI; public final class ErrorConstants { public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure"; public static final String ERR_VALIDATION = "error.validation"; public static final String PROBLEM_BASE_URL = "https://www.jhipster.tech/problem"; public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message"); public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation"); public static final URI PARAMETERIZED_TYPE = URI.create(PROBLEM_BASE_URL + "/parameterized"); public static final URI ENTITY_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/entity-not-found"); public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password"); public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used"); public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used"); public static final URI EMAIL_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-found"); private ErrorConstants() { } }
[ "thetlwinoo85@yahoo.com" ]
thetlwinoo85@yahoo.com
4e3469b148e3ed2e02ea3c0de45eb26e8bb952c2
e7c7e1d5cf102112b8f5a0765bb9a10a68f15ff1
/src/test/org/codehaus/groovy/ast/VariableExpressionTest.java
650a2b4ae3275f46e7058a125165d9d0e9101547
[ "CC-BY-2.5", "Apache-2.0", "BSD-3-Clause", "MIT" ]
permissive
shayaanmunshi/groovy
6189c4ca6437ab507e76c94f307fa7591610e870
855cfbb677a3d167e69b39269546b0e63af0ea87
refs/heads/master
2022-12-01T10:14:13.076270
2020-07-30T17:55:24
2020-07-30T17:55:24
283,911,787
1
0
Apache-2.0
2020-07-31T01:18:26
2020-07-31T01:18:25
null
UTF-8
Java
false
false
3,896
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.codehaus.groovy.ast; import junit.framework.TestCase; import org.codehaus.groovy.ast.expr.VariableExpression; /** * Tests the VariableExpressionNode */ public class VariableExpressionTest extends TestCase { public void testPrimitiveOriginType() { VariableExpression boolExpression = new VariableExpression("fo", ClassHelper.boolean_TYPE); VariableExpression intExpression = new VariableExpression("foo", ClassHelper.int_TYPE); assertEquals(boolExpression.getOriginType().getName(), "boolean"); assertEquals(intExpression.getOriginType().getName(), "int"); } public void testNonPrimitiveOriginType() { VariableExpression boolExpression = new VariableExpression("foo", ClassHelper.Boolean_TYPE); VariableExpression intExpression = new VariableExpression("foo", ClassHelper.Integer_TYPE); assertEquals(boolExpression.getOriginType().getName(), "java.lang.Boolean"); assertEquals(intExpression.getOriginType().getName(), "java.lang.Integer"); } public void testPrimitiveOriginTypeConstructorVariableExpression() { VariableExpression boolExpression = new VariableExpression("foo", ClassHelper.boolean_TYPE); VariableExpression intExpression = new VariableExpression("foo", ClassHelper.int_TYPE); VariableExpression newBoolExpression = new VariableExpression(boolExpression); VariableExpression newIntExpression = new VariableExpression(intExpression); assertEquals(newBoolExpression.getOriginType().getName(), "boolean"); assertEquals(newIntExpression.getOriginType().getName(), "int"); } public void testPrimitiveOriginTypeConstructorParameter() { Parameter boolParameter = new Parameter(ClassHelper.boolean_TYPE, "foo"); Parameter intParameter = new Parameter(ClassHelper.int_TYPE, "foo"); VariableExpression newBoolExpression = new VariableExpression(boolParameter); VariableExpression newIntExpression = new VariableExpression(intParameter); assertEquals(newBoolExpression.getOriginType().getName(), "boolean"); assertEquals(newIntExpression.getOriginType().getName(), "int"); } public void testPrimitiveOriginTypeConstructorDynVariable() { DynamicVariable dynVariable = new DynamicVariable("foo", false); assertEquals(dynVariable.getOriginType().getName(), "java.lang.Object"); } public void testIsDynamicTypedExplicitObject() { VariableExpression intExpression = new VariableExpression("foo", new ClassNode(Object.class)); assertFalse(intExpression.isDynamicTyped()); } public void testIsDynamicTyped_DYNMAMIC_TYPE() { VariableExpression intExpression = new VariableExpression("foo", ClassHelper.DYNAMIC_TYPE); assertTrue(intExpression.isDynamicTyped()); } public void testIsDynamicTyped_DynamicVariable() { VariableExpression intExpression = new VariableExpression(new DynamicVariable("foo", false)); assertTrue(intExpression.isDynamicTyped()); } }
[ "paulk@asert.com.au" ]
paulk@asert.com.au
eab0fa7ec8ec46572a8ed6d5aad7acc7b2759ec4
e6c0a1ef6e10ed8a995239a3151a1fd8503445c5
/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/RegistrationBean.java
091cd8c45cec9276cb46d09e77e0ac316eeac30b
[ "Apache-2.0" ]
permissive
AndyZhang1105/spring-boot-2.0.4.RELEASE
672eb9a475ae8da45b0a72acc7f18a488eb7bbb9
38631aef899f61efbf18f96b2683fd7b261dab39
refs/heads/master
2022-11-06T19:48:33.621471
2019-09-05T12:36:55
2019-09-05T12:36:55
277,287,824
1
0
Apache-2.0
2020-07-05T11:30:39
2020-07-05T11:30:38
null
UTF-8
Java
false
false
2,823
java
/* * Copyright 2012-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.springframework.boot.web.servlet; import javax.servlet.ServletContext; import javax.servlet.ServletException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.core.Ordered; import org.springframework.util.StringUtils; /** * Base class for Servlet 3.0+ based registration beans. * * @author Phillip Webb * @see ServletRegistrationBean * @see FilterRegistrationBean * @see DelegatingFilterProxyRegistrationBean * @see ServletListenerRegistrationBean * @since 1.4.0 */ public abstract class RegistrationBean implements ServletContextInitializer, Ordered { private static final Log logger = LogFactory.getLog(RegistrationBean.class); private int order = Ordered.LOWEST_PRECEDENCE; private boolean enabled = true; @Override public final void onStartup(ServletContext servletContext) throws ServletException { String description = getDescription(); if (!isEnabled()) { logger.info(StringUtils.capitalize(description) + " was not registered (disabled)"); return; } register(description, servletContext); } /** * Return a description of the registration. For example "Servlet resourceServlet" * * @return a description of the registration */ protected abstract String getDescription(); /** * Register this bean with the servlet context. * * @param description a description of the item being registered * @param servletContext the servlet context */ protected abstract void register(String description, ServletContext servletContext); /** * Flag to indicate that the registration is enabled. * * @param enabled the enabled to set */ public void setEnabled(boolean enabled) { this.enabled = enabled; } /** * Return if the registration is enabled. * * @return if enabled (default {@code true}) */ public boolean isEnabled() { return this.enabled; } /** * Set the order of the registration bean. * * @param order the order */ public void setOrder(int order) { this.order = order; } /** * Get the order of the registration bean. * * @return the order */ @Override public int getOrder() { return this.order; } }
[ "877635632@qq.com" ]
877635632@qq.com
11917ed17743f3192eaeff56dcfac18f5db0b31f
62facca7abeba0952509e45154e3d272ab6afdb0
/scw-core/src/main/java/scw/aop/MethodInterceptorAccept.java
3df21aa6cca818f06b101d1c5a20355ed88259a3
[]
no_license
wangscript007/scw
42375aed26fe9e8c956895eb7c686567d71095fa
f08161fccc449debaa2bec8edb5939edfec960e0
refs/heads/master
2023-03-02T16:44:34.893227
2021-02-06T10:26:14
2021-02-06T10:26:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
167
java
package scw.aop; import scw.core.reflect.MethodInvoker; public interface MethodInterceptorAccept { boolean isAccept(MethodInvoker invoker, Object[] args); }
[ "247044007@qq.com" ]
247044007@qq.com
e909bd3e45879bc693045d37fa9e9de8f378eb3d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_d748e986714500d5966e586dfcfc67d01426243f/ORServeGatewayManagerImpl/5_d748e986714500d5966e586dfcfc67d01426243f_ORServeGatewayManagerImpl_t.java
e610f890adb84b4dae0526060ffc5c5b4fdfbaf2
[]
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,417
java
package com.dreamoval.motech.omp.manager.orserve; import com.dreamoval.motech.core.model.GatewayRequest; import com.dreamoval.motech.core.model.GatewayResponse; import com.dreamoval.motech.core.model.MStatus; import com.dreamoval.motech.core.service.MotechContext; import com.dreamoval.motech.core.util.MotechException; import com.dreamoval.motech.omp.manager.GatewayManager; import com.dreamoval.motech.omp.manager.GatewayMessageHandler; import com.outreachcity.orserve.messaging.SMSMessenger; import com.outreachcity.orserve.messaging.SMSMessengerSoap; import java.net.URL; import java.util.Set; import javax.xml.namespace.QName; import java.net.MalformedURLException; import java.util.Date; import org.apache.log4j.Logger; /** * Handles all interactions with the OutReach Server message gateway * * @author Kofi A. Asamoah (yoofi@dreamoval.com) * @date Jul 15, 2009 */ public class ORServeGatewayManagerImpl implements GatewayManager { private String productCode; private String senderId; private GatewayMessageHandler messageHandler; private static Logger logger = Logger.getLogger(ORServeGatewayManagerImpl.class); /** * * @see GatewayManager.send */ public Set<GatewayResponse> sendMessage(GatewayRequest messageDetails, MotechContext context) { String gatewayResponse; if(messageDetails == null) return null; logger.info("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http://www.outreachcity.com/orserve/messaging/smsmessenger.asmx?WSDL"); } catch ( MalformedURLException e ) { logger.error("Error creating web service client", e); throw new MotechException(e.getMessage()); } logger.info("Calling sendMessage method of ORServe message gateway"); logger.debug(messageDetails); try{ SMSMessenger messenger = new SMSMessenger(wsdlURL, new QName("http://www.outreachcity.com/ORServe/Messaging/", "SMSMessenger")); SMSMessengerSoap soap = messenger.getSMSMessengerSoap(); gatewayResponse = soap.sendMessage(messageDetails.getMessage(), messageDetails.getRecipientsNumber(), getSenderId(), getProductCode(), String.valueOf(messageDetails.getGatewayRequestDetails().getNumberOfPages())); } catch(Exception ex){ logger.error("Error sending message", ex); throw new MotechException(ex.getMessage()); } messageDetails.setDateSent(new Date()); logger.info("Parsing gateway response"); return messageHandler.parseMessageResponse(messageDetails, gatewayResponse, context); } /** * * @see GatewayManager.getMessageStatus */ public String getMessageStatus(GatewayResponse response) { String gatewayResponse; logger.info("Checking message delivery status"); logger.info("Building ORServe message gateway webservice proxy class"); URL wsdlURL = null; try { wsdlURL = new URL("http://www.outreachcity.com/orserve/messaging/smsmessenger.asmx?WSDL"); } catch ( MalformedURLException e ) { logger.error("Error creating web service client", e); gatewayResponse = e.getMessage(); } SMSMessenger messenger = new SMSMessenger(wsdlURL, new QName("http://www.outreachcity.com/ORServe/Messaging/", "SMSMessenger")); SMSMessengerSoap soap = messenger.getSMSMessengerSoap(); logger.info("Calling getMessageStatus method of ORServe message gateway"); try{ gatewayResponse = soap.getMessageStatus(response.getGatewayMessageId(), productCode); } catch(Exception ex){ logger.error("Error querying message", ex); gatewayResponse = ex.getMessage(); } return gatewayResponse; } public MStatus mapMessageStatus(GatewayResponse response) { return messageHandler.parseMessageStatus(response.getResponseText()); } /** * @return the productCode */ public String getProductCode() { return productCode; } /** * @param productCode the productCode to set */ public void setProductCode(String productCode) { logger.debug("Setting ORServeGatewayManagerImpl.productCode"); logger.debug(productCode); this.productCode = productCode; } /** * @return the senderId */ public String getSenderId() { return senderId; } /** * @param senderId the senderId to set */ public void setSenderId(String senderId) { logger.debug("Setting ORServeGatewayManagerImpl.senderId"); logger.debug(senderId); this.senderId = senderId; } /** * @return the messageHandler */ public GatewayMessageHandler getMessageHandler() { return messageHandler; } /** * @param messageHandler the messageHandler to set */ public void setMessageHandler(GatewayMessageHandler messageHandler) { logger.debug("Setting SMSMessagingServiceImpl.handler:"); logger.debug(messageHandler); this.messageHandler = messageHandler; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b09df3a065375e23f357f174a74702010f7e9b51
fd3e4cc20a58c2a46892b3a38b96d5e2303266d8
/src/main/java/com/tencent/mm/sdk/modelbiz/JumpToBizProfile.java
b2363112513035873aeeb8fa142056c2315c8679
[]
no_license
makewheels/AnalyzeBusDex
42ef50f575779b66bd659c096c57f94dca809050
3cb818d981c7bc32c3cbd8c046aa78cd38b20e8a
refs/heads/master
2021-10-22T07:16:40.087139
2019-03-09T03:11:05
2019-03-09T03:11:05
173,123,231
0
0
null
null
null
null
UTF-8
Java
false
false
2,156
java
package com.tencent.mm.sdk.modelbiz; import android.os.Bundle; import com.tencent.mm.sdk.modelbase.BaseReq; import com.tencent.mm.sdk.p048b.C1052b; public class JumpToBizProfile { public static final int JUMP_TO_HARD_WARE_BIZ_PROFILE = 1; public static final int JUMP_TO_NORMAL_BIZ_PROFILE = 0; public static class Req extends BaseReq { private static final int EXT_MSG_LENGTH = 1024; private static final String TAG = "MicroMsg.SDK.JumpToBizProfile.Req"; public String extMsg; public int profileType = 0; public String toUserName; public boolean checkArgs() { if (this.toUserName == null || this.toUserName.length() == 0) { C1052b.m7515b(TAG, "checkArgs fail, toUserName is invalid"); return false; } else if (this.extMsg != null && this.extMsg.length() > EXT_MSG_LENGTH) { C1052b.m7515b(TAG, "ext msg is not null, while the length exceed 1024 bytes"); return false; } else if (this.profileType != 1 || (this.extMsg != null && this.extMsg.length() != 0)) { return true; } else { C1052b.m7515b(TAG, "scene is jump to hardware profile, while extmsg is null"); return false; } } public void fromBundle(Bundle bundle) { super.fromBundle(bundle); this.toUserName = bundle.getString("_wxapi_jump_to_biz_profile_req_to_user_name"); this.extMsg = bundle.getString("_wxapi_jump_to_biz_profile_req_ext_msg"); } public int getType() { return 7; } public void toBundle(Bundle bundle) { super.toBundle(bundle); bundle.putString("_wxapi_jump_to_biz_profile_req_to_user_name", this.toUserName); bundle.putString("_wxapi_jump_to_biz_profile_req_ext_msg", this.extMsg); bundle.putInt("_wxapi_jump_to_biz_profile_req_scene", 0); bundle.putInt("_wxapi_jump_to_biz_profile_req_profile_type", this.profileType); } } }
[ "spring@qbserver.cn" ]
spring@qbserver.cn
45351bf4304bef37cebb379c61e615a5bd3f2e74
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_c8f4552cb716615ec69d0c1d0b9afe48e578880c/TextFile/9_c8f4552cb716615ec69d0c1d0b9afe48e578880c_TextFile_t.java
2c2b66053b7a5d252f4fb14239c952a9e0d6cdcc
[]
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
6,701
java
/* * Copyright (c) 2006-2010 Chris Smith, Shane Mc Cormack, Gregory Holmes * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.dmdirc.util; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List; /** * Allows reading and writing to a plain text file via a list of lines. * * @author chris */ public class TextFile { /** The file we're dealing with. */ private File file; /** The input stream we're dealing with. */ private InputStream is; /** The lines we've read from the file. */ private List<String> lines; /** The charset to use to read the file. */ private final Charset charset; /** * Creates a new instance of TextFile for the specified file, and uses the * default charset. * * @param filename The file to be read/written */ public TextFile(final String filename) { this(new File(filename)); } /** * Creates a new instance of TextFile for the specified File, and uses the * default charset. * * @param file The file to read */ public TextFile(final File file) { this(file, Charset.defaultCharset()); } /** * Creates a new instance of TextFile for an input stream, and uses the * default charset. * * @param is The input stream to read from */ public TextFile(final InputStream is) { this(is, Charset.defaultCharset()); } /** * Creates a new instance of TextFile for the specified File, which is to * be read using the specified charset. * * @param file The file to read * @param charset The charset to read the file in * @since 0.6.3m1 */ public TextFile(final File file, final Charset charset) { if (file == null) { throw new NullPointerException("file"); } this.file = file; this.charset = charset; } /** * Creates a new instance of TextFile for an input stream, which is to * be read using the specified charset. * * @param is The input stream to read from * @param charset The charset to read the file in * @since 0.6.3m1 */ public TextFile(final InputStream is, final Charset charset) { if (is == null) { throw new NullPointerException("is"); } this.is = is; this.charset = charset; } /** * Retrieves the contents of the file as a list of lines. If getLines() or * readLines() has previously been called, a cached version is returned. * * @return A list of lines in the file * @throws IOException if an I/O exception occurs */ public List<String> getLines() throws IOException { if (lines == null) { readLines(); } return lines; } /** * Reads the contents of the file into this TextFile's line cache. * * @throws IOException If an I/O exception occurs */ public void readLines() throws IOException { BufferedReader reader = null; InputStreamReader inputReader = null; InputStream inputStream = null; try { inputStream = file == null ? is : new FileInputStream(file); inputReader = new InputStreamReader(inputStream, charset); reader = new BufferedReader(inputReader); lines = new ArrayList<String>(); String line; while ((line = reader.readLine()) != null) { lines.add(line); } } finally { StreamUtil.close(reader); StreamUtil.close(inputReader); StreamUtil.close(inputStream); } } /** * Determines if this file is writable or not. * * @return True if the file is writable, false otherwise */ public boolean isWritable() { return file != null; } /** * Writes the specified list of lines to the file. * * @param lines The lines to be written * @throws IOException if an I/O exception occurs */ public void writeLines(final List<String> lines) throws IOException { if (file == null) { throw new UnsupportedOperationException("Cannot write to TextFile " + "opened with an InputStream"); } BufferedWriter writer = null; try { writer = new BufferedWriter(new FileWriter(file)); for (String line : lines) { writer.write(line); writer.newLine(); } } finally { StreamUtil.close(writer); } } /** * Retrieves the File for this TextFile, if there is one. * * @return This TextFile's file, or null */ public File getFile() { return file; } /** * Deletes the file associated with this textfile, if there is one. */ public void delete() { if (file == null) { throw new UnsupportedOperationException("Cannot delete TextFile " + "opened with an InputStream"); } file.delete(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
53a80ee7d5ed32e06aaf27d8141d859300a147ee
dda37dfa08effbf8c2309c8137e626b7a65e21fe
/src/main/java/sort/test.java
314464b93e1189ef80507a9c08737e9b6d3d8415
[]
no_license
418593566/DataStructure
b8b9fa198324cd118bb1a72c110d1377bc777711
a24eb4d739d42879b6f866d8394045e9232a4ab9
refs/heads/master
2023-04-07T21:03:59.640636
2021-04-16T08:24:46
2021-04-16T08:24:46
326,636,838
0
0
null
null
null
null
UTF-8
Java
false
false
1,666
java
package sort; import org.junit.Test; import java.util.Arrays; public class test { @Test public void test1() { int[] arr = new int[]{1, 5, 44, -8, 33, 51}; int minValue = 0; int minIndex = 0; for (int i = 1; i < arr.length; i++) { minIndex = i - 1; minValue = arr[i]; while (minIndex >= 0 && minValue < arr[minIndex]) { arr[minIndex + 1] = arr[minIndex]; minIndex--; } arr[minIndex + 1] = minValue; } System.out.println(Arrays.toString(arr)); } @Test public void test2() { int[] arr = new int[]{1, 5, 44, -8, 33, 51}; int minValue = 0; int minIndex = 0; for (int i = 0; i < arr.length - 1; i++) { minIndex = i; minValue = arr[i]; for (int j = i + 1; j < arr.length; j++) { if (minValue > arr[j]) { minValue = arr[j]; minIndex = j; } } arr[minIndex] = arr[i]; arr[i] = minValue; } System.out.println(Arrays.toString(arr)); } @Test public void test3() { int[] arr = new int[]{1, 5, 44, -8, 33, 51}; int temp = 0; for (int i = 0; i < arr.length - 1; i++) { for (int j = 0; j < arr.length - 1 - i; j++) { if (arr[j] > arr[j + 1]) { temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } System.out.println(Arrays.toString(arr)); } }
[ "you@example.com" ]
you@example.com
f9806848c36b96200a353e770d65303a150efb63
31cbaeb08aea56bdc5cd6e5d808c53ad4029eb1d
/jobserver-common/src/main/java/io/github/melin/spark/jobserver/core/dao/TableLineageDao.java
bb38201e7778894a5c7b4b39dd8d9b33e0d80905
[]
no_license
melin/spark-jobserver
135c1fee0a44c06453a1569db7f04b7960c0331a
e4b2107437f8a2cedc2d80855a33fe2e12634140
refs/heads/master
2023-09-01T15:06:25.148311
2023-05-20T10:13:30
2023-05-20T10:13:30
531,090,699
36
9
null
2023-08-26T16:39:22
2022-08-31T13:12:08
JavaScript
UTF-8
Java
false
false
364
java
package io.github.melin.spark.jobserver.core.dao; import io.github.melin.spark.jobserver.core.entity.TableLineage; import com.gitee.melin.bee.core.hibernate5.HibernateBaseDaoImpl; import org.springframework.stereotype.Repository; /** * huaixin 2022/3/28 11:57 AM */ @Repository public class TableLineageDao extends HibernateBaseDaoImpl<TableLineage, Long> { }
[ "libinsong1204@gmail.com" ]
libinsong1204@gmail.com
739d2746afa9961fd38cab481470851477acd787
f0568343ecd32379a6a2d598bda93fa419847584
/modules/dfp_appengine/src/main/java/com/google/api/ads/dfp/jaxws/v201308/RateCardActionError.java
2b0e41920e43445b7a3bab79eb0b5c8dc294882a
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
1,691
java
package com.google.api.ads.dfp.jaxws.v201308; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * * An error lists all error reasons associated with performing action * on {@link RateCard} objects. * * * <p>Java class for RateCardActionError complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="RateCardActionError"> * &lt;complexContent> * &lt;extension base="{https://www.google.com/apis/ads/publisher/v201308}ApiError"> * &lt;sequence> * &lt;element name="reason" type="{https://www.google.com/apis/ads/publisher/v201308}RateCardActionError.Reason" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RateCardActionError", propOrder = { "reason" }) public class RateCardActionError extends ApiError { protected RateCardActionErrorReason reason; /** * Gets the value of the reason property. * * @return * possible object is * {@link RateCardActionErrorReason } * */ public RateCardActionErrorReason getReason() { return reason; } /** * Sets the value of the reason property. * * @param value * allowed object is * {@link RateCardActionErrorReason } * */ public void setReason(RateCardActionErrorReason value) { this.reason = value; } }
[ "jradcliff@google.com" ]
jradcliff@google.com
fe7e1803ca746c0d248c57685be1ac47f4bee521
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_1/src/b/c/h/g/Calc_1_1_12768.java
683fb37a26cdfff91f11cdc94e1bb8860e8d6a71
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.c.h.g; public class Calc_1_1_12768 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
[ "christian.halstrick@sap.com" ]
christian.halstrick@sap.com
c354055ab792ffae44de2af6d7a4de707ce530b5
8b0ae134884d6f84217587194a2a0f775866ef55
/Vivo_y93/src/main/java/com/vivo/alphaindex/VivoComparatorString.java
dae74aa6c88a04fae12da13ac7fb292bcf8abbc8
[]
no_license
wanbing/VivoFramework
69032750f376178d27d0d1ac170cf89bba907cc7
8d31381ecc788afb023960535bafbfa3b7df7d9b
refs/heads/master
2023-05-11T16:57:04.582985
2019-02-27T04:43:44
2019-02-27T04:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
723
java
package com.vivo.alphaindex; import java.util.Comparator; public class VivoComparatorString implements Comparator { public int compare(Object arg0, Object arg1) { String letter0 = (String) arg0; String letter1 = (String) arg1; if (isTaLanguage(letter1) && isTaLanguage(letter0)) { letter0 = NameNormalizer.normalize(letter0); letter1 = NameNormalizer.normalize(letter1); } return letter0.compareTo(letter1); } public boolean isTaLanguage(String letter) { if ((letter.charAt(0) < 2944 || letter.charAt(0) > 3071) && (letter.charAt(0) < 1536 || letter.charAt(0) > 1791)) { return false; } return true; } }
[ "lygforbs0@gmail.com" ]
lygforbs0@gmail.com
660bb8c83c0f132ceeb9504d2eb2eb3a0390e6c3
790040ed9bf5d8133f64f7a6e6cbc7a56f4818b4
/fuente/forseti/sets/JBancosIdsSet.java
5e7049cad69eb4861fcb9ee8236307a12578e8cf
[]
no_license
njmube/forseti
7f60acf43bb2d240cdce2b59b9f9f42e859f8827
2a7bf7b0460c8837c2bc43b1adea6127a42eb4b1
refs/heads/master
2021-01-11T20:08:03.946857
2016-07-18T19:36:18
2016-07-18T19:36:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,201
java
/* Forseti, El ERP Gratuito para PyMEs Copyright (C) 2015 Gabriel Gutiérrez Fuentes. This program 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. 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package forseti.sets; import java.sql.SQLException; import javax.servlet.http.HttpServletRequest; import forseti.JManejadorSet; public class JBancosIdsSet extends JManejadorSet { public JBancosIdsSet(HttpServletRequest request, String usuario, String tipo, String entidad) { m_Select = " * FROM view_bancos_movimientos_modulo_ids"; String sql = "select * from view_bancos_movimientos_modulo_ids('" + usuario + "','" + tipo + "','" + entidad + "') as ( id_usuario varchar, tipo smallint, id smallint, cuenta varchar)"; setSQL(sql); m_PageSize = 50; this.request = request; } public view_bancos_movimientos_modulo_ids getRow(int row) { return (view_bancos_movimientos_modulo_ids)m_Rows.elementAt((getFloorRow() + row)); } public view_bancos_movimientos_modulo_ids getAbsRow(int row) { return (view_bancos_movimientos_modulo_ids)m_Rows.elementAt(row); } @SuppressWarnings("unchecked") protected void BindRow() { try { view_bancos_movimientos_modulo_ids pNode = new view_bancos_movimientos_modulo_ids(); pNode.setID_Usuario(m_RS.getString("ID_Usuario")); pNode.setTipo(m_RS.getByte("Tipo")); pNode.setID(m_RS.getByte("ID")); pNode.setCuenta(m_RS.getString("Cuenta")); m_Rows.addElement(pNode); } catch(SQLException e) { e.printStackTrace(); throw new RuntimeException(e.toString()); } } }
[ "g.gutierrez.f@forseti.org.mx" ]
g.gutierrez.f@forseti.org.mx
cd7edb3007047b08ee790c354b42b1283b9b1742
db8d430fdb17310b39c6ee3350f7688d520ddab4
/product-service/src/main/java/org/efbiz/product/config/model/ProductConfigOption.java
c735c38c61cbbcd6f872759bae6929b53b6ebbfe
[ "Apache-2.0" ]
permissive
efbiz/efbiz-service
c3d4bb650bce6bc1295589b989e44228db9c84d7
142087cdd078e5b5081cd05643948ae726662c1e
refs/heads/master
2021-01-19T13:55:45.101238
2017-11-19T14:01:47
2017-11-19T14:01:47
88,115,051
0
0
null
null
null
null
UTF-8
Java
false
false
1,237
java
package org.efbiz.product.config.model; import com.google.gson.Gson; import java.io.Serializable; import java.math.BigDecimal; import org.efbiz.product.config.model.ProductConfigOptionKey; public class ProductConfigOption extends ProductConfigOptionKey implements Serializable { private String configOptionName; private String description; private BigDecimal sequenceNum; private static final long serialVersionUID = 1L; public String getConfigOptionName() { return configOptionName; } public void setConfigOptionName(String configOptionName) { this.configOptionName = configOptionName == null ? null : configOptionName.trim(); } public String getDescription() { return description; } public void setDescription(String description) { this.description = description == null ? null : description.trim(); } public BigDecimal getSequenceNum() { return sequenceNum; } public void setSequenceNum(BigDecimal sequenceNum) { this.sequenceNum = sequenceNum; } @Override public String toString() { Gson gson = new Gson(); return gson.toJson(this); } }
[ "thanos_t@163.com" ]
thanos_t@163.com
b3873e190b33f0c919d73afaa63ca2f2b825b385
fbd43bd37149a8ea548af6c2948bcde11c450669
/src/main/java/com/vaadin/testbench/HasSearchContext.java
1eeef5dd448dcf989c2e89aadbfcdfccd6294789
[ "Apache-2.0" ]
permissive
EqualInformation/dashboard-demo-1
58845d29daea6ff8a6e0cf520f6ea0732a3ff7d0
ef5fd5c6d3bf46a7e77988ef97540e98a7db7c3d
refs/heads/master
2021-01-10T17:15:46.710328
2015-12-26T06:29:56
2015-12-26T06:29:56
48,572,780
0
1
null
null
null
null
UTF-8
Java
false
false
911
java
/** * Copyright (C) 2012 Vaadin Ltd * * This program is available under Commercial Vaadin Add-On License 3.0 * (CVALv3). * * See the file licensing.txt distributed with this software for more * information about licensing. * * You should have received a copy of the license along with this program. * If not, see <http://vaadin.com/license/cval-3>. */ package com.vaadin.testbench; import org.openqa.selenium.SearchContext; /** * Interface for classes providing a {@link SearchContext}, i.e. if a class can * provide a search context while not directly implementing the * {@link SearchContext} interface, this interface should be implemented * */ public interface HasSearchContext { /** * Get a reference or a new instance of the SearchContext applicable to this * class * * @return a {@link SearchContext} instance */ public SearchContext getContext(); }
[ "bpupadhyaya@gmail.com" ]
bpupadhyaya@gmail.com
bc10df86f7a07aea0753e0596fb915a26dc0e52f
5cb5d1fc80c1f68ade44f0a26a02d1aeb118c64d
/ink-trade/ink-trade-service/src/main/java/com/ink/trade/service/check/MchBankCheck.java
79b7801c4d697336bd16bb86b2580dd3631a7571
[]
no_license
gspandy/zx-parent
4350d1ef851d05eabdcf8c6c7049a46593e3c22e
5cdc52e645537887e86e5cbc117139ca1a56f55d
refs/heads/master
2023-08-31T15:29:50.763388
2016-08-11T09:17:29
2016-08-11T09:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,271
java
package com.ink.trade.service.check; import org.springframework.beans.factory.annotation.Autowired; import com.ink.base.log.util.YinkerLogger; import com.ink.basic.core.manager.IBankcardBinManager; import com.ink.basic.core.po.BankcardBin; import com.ink.trade.core.exception.orderfail.BankUnsupportException; import com.ink.trade.core.manager.IMchBankManager; public class MchBankCheck extends TradeCheck { private YinkerLogger LOGGER=YinkerLogger.getLogger(MchBankCheck.class); @Autowired private IMchBankManager mchBankManager; @Autowired private IBankcardBinManager bankCardBinManager; @Override public void operateCheck(Order order) { BankcardBin bankcardBin = bankCardBinManager.getByCardBin(order.getCardNo()); if (bankcardBin == null) { LOGGER.error("根据cardbin将银行卡解析银行简码失败,卡号:"+order.getCardNo()); throw new BankUnsupportException(); } //查询商户银行列表 if (!mchBankManager.isBankSupport(order.getMerchantId(), bankcardBin.getBankSimpleCode())) { throw new BankUnsupportException(); } } public IMchBankManager getMchBankManager() { return mchBankManager; } public void setMchBankManager(IMchBankManager mchBankManager) { this.mchBankManager = mchBankManager; } }
[ "zxzhouxiang123@163.com" ]
zxzhouxiang123@163.com
f8b677cbf271e434a9b1e003f23d698809aace7c
cb3cd1a1b277209d66b7ef49342232a2c4ebf49c
/dal/src/main/java/com/maiziyun/boss/dal/paging/RolePageQueryPage.java
9d2c34ff8b1a544af5753fa40fe1e5fd45ccae1b
[]
no_license
ZuoShouShiJie/boss
29d41b26abcf185af831ab3d4e9f43bfc4948010
1023a9f61996226550b87883a38b17a727a9208c
refs/heads/master
2020-03-29T04:45:22.647923
2018-09-20T03:41:42
2018-09-20T03:41:47
149,546,642
0
0
null
null
null
null
UTF-8
Java
false
false
903
java
package com.maiziyun.boss.dal.paging; import com.maiziyun.boss.dal.paging.BasePage; import com.maiziyun.boss.dal.dataobject.RoleDO; /** * The table BOSS_ROLE BOSS_ROLE */ public class RolePageQueryPage extends BasePage<RoleDO>{ /** * nameQuery . */ private String nameQuery; /** * codeQuery . */ private String codeQuery; /** * Set nameQuery . */ public void setNameQuery(String nameQuery){ this.nameQuery = nameQuery; } /** * Get nameQuery . * * @return the string */ public String getNameQuery(){ return nameQuery; } /** * Set codeQuery . */ public void setCodeQuery(String codeQuery){ this.codeQuery = codeQuery; } /** * Get codeQuery . * * @return the string */ public String getCodeQuery(){ return codeQuery; } }
[ "1079728294@qq.com" ]
1079728294@qq.com
b45386ad4e08b219b6fea4adca713996cdeff0ef
40133f741288926194ff77686b9d3c78cb3b31b7
/app/src/main/java/com/omelchenkoaleks/makephoto/MakePhotoActivity.java
dcd4b5ad4fec88c7bb808dd850181050465d7faa
[]
no_license
omelchenkoaleks/MakePhoto
c9be05007556b92dfd5acc463ae6df20546d4c86
0e658ab696fb018204edb23e81308fcf9bd78543
refs/heads/master
2020-03-30T09:25:07.433419
2018-10-01T11:36:48
2018-10-01T11:36:48
151,074,560
0
0
null
null
null
null
UTF-8
Java
false
false
5,457
java
package com.omelchenkoaleks.makephoto; import android.app.Activity; import android.content.pm.ActivityInfo; import android.content.res.Configuration; import android.hardware.Camera; import android.os.Bundle; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.Button; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; public class MakePhotoActivity extends Activity implements SurfaceHolder.Callback, View.OnClickListener, Camera.PictureCallback, Camera.PreviewCallback, Camera.AutoFocusCallback { private Camera camera; private SurfaceHolder surfaceHolder; private SurfaceView preview; private Button shotBtn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // если хотим, чтобы приложение постоянно имело портретную ориентацию setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); // если хотим, чтобы приложение было полноэкранным getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); // и без заголовка requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_make_photo); preview = findViewById(R.id.surfaceViewMain); surfaceHolder = preview.getHolder(); surfaceHolder.addCallback(this); surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); shotBtn = (Button) findViewById(R.id.makePhoto); shotBtn.setText("Shot"); shotBtn.setOnClickListener(this); } @Override protected void onResume() { super.onResume(); camera = Camera.open(); } @Override protected void onPause() { super.onPause(); if (camera != null) { camera.setPreviewCallback(null); camera.stopPreview(); camera.release(); camera = null; } } @Override public void onAutoFocus(boolean b, Camera camera) { if (b) { // если удалось сфокусироваться, делаем снимок camera.takePicture(null, null, null, this); } } @Override public void onPictureTaken(byte[] bytes, Camera camera) { // сохраняем полученные jpg в папке /sdcard/CameraExample/ // имя файла - System.currentTimeMillis() try { File saveDir = new File("/sdcard/CameraExample/"); if (!saveDir.exists()) { saveDir.mkdirs(); } FileOutputStream os = new FileOutputStream(String.format("/sdcard/CameraExample/%d.jpg", System.currentTimeMillis())); os.write(bytes); os.close(); } catch (Exception e) { } // после того, как снимок сделан, показ превью отключается. необходимо включить его camera.startPreview(); } @Override public void onPreviewFrame(byte[] bytes, Camera camera) { // здесь можно обрабатывать изображение, показываемое в preview } @Override public void surfaceCreated(SurfaceHolder surfaceHolder) { try { camera.setPreviewDisplay(surfaceHolder); camera.setPreviewCallback(this); } catch (IOException ex) { ex.printStackTrace(); } Camera.Size previewSize = camera.getParameters().getPreviewSize(); float aspect = (float) previewSize.width / previewSize.height; int previewSurfaceWidth = preview.getWidth(); int previewSurfaceHeight = preview.getHeight(); ViewGroup.LayoutParams lp = preview.getLayoutParams(); // здесь корректируем размер отображаемого preview, чтобы не было искажений if (this.getResources().getConfiguration().orientation != Configuration.ORIENTATION_LANDSCAPE) { // портретный вид camera.setDisplayOrientation(90); lp.height = previewSurfaceHeight; lp.width = (int) (previewSurfaceHeight / aspect); ; } else { // ландшафтный camera.setDisplayOrientation(0); lp.width = previewSurfaceWidth; lp.height = (int) (previewSurfaceWidth / aspect); } preview.setLayoutParams(lp); camera.startPreview(); } @Override public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) { } @Override public void surfaceDestroyed(SurfaceHolder surfaceHolder) { } @Override public void onClick(View view) { if (view == shotBtn) { // либо делаем снимок непосредственно здесь // либо включаем обработчик автофокуса //camera.takePicture(null, null, null, this); camera.autoFocus(this); } } }
[ "omelchenkoaleks@gmail.com" ]
omelchenkoaleks@gmail.com
1b063c3b446759f0e81384449cec47da693b12b6
37992a7083efea148c66381a2e7c988f59de712b
/cppk/nsi_ptk/src/main/java/ru/ppr/nsi/dao/ExemptionDao.java
6212871f4eafe3b5bf39915dfe2eef50e6f5f73c
[]
no_license
RVC3/PTK
5ab897d6abee1f7f7be3ba49c893b97e719085e9
1052b2bfa8f565c96a85d5c5928ed6c938a20543
refs/heads/master
2022-12-22T22:11:40.231298
2020-07-01T09:45:38
2020-07-01T09:45:38
259,278,530
0
0
null
null
null
null
UTF-8
Java
false
false
7,503
java
package ru.ppr.nsi.dao; import android.database.Cursor; import android.text.TextUtils; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; import ru.ppr.database.cache.QueryCache; import ru.ppr.logger.Logger; import ru.ppr.nsi.NsiDaoSession; import ru.ppr.nsi.entity.Exemption; /** * DAO для таблицы НСИ <i>Exemptions</i>. * * @author Aleksandr Brazhkin */ public class ExemptionDao extends BaseEntityDao<Exemption, Integer> { private static final String TAG = Logger.makeLogTag(ExemptionDao.class); public static final String TABLE_NAME = "Exemptions"; public static class Properties { public static final String ExemptionExpressCode = "ExemptionExpressCode"; public static final String NewExemptionExpressCode = "NewExemptionExpressCode"; public static final String RegionOkatoCode = "RegionOkatoCode"; public static final String ExemptionOrganizationCode = "ExemptionOrganizationCode"; public static final String Percentage = "Percentage"; public static final String ChildTicketAvailable = "ChildTicketAvailable"; public static final String MassRegistryAvailable = "MassRegistryAvailable"; public static final String CppkRegistryBan = "CppkRegistryBan"; public static final String Presale7000WithPlace = "Presale7000WithPlace"; public static final String Presale6000Once = "Presale6000Once"; public static final String Presale6000Abonement = "Presale6000Abonement"; public static final String Leavy = "Leavy"; public static final String RequireSnilsNumber = "RequireSnilsNumber"; public static final String RequireSocialCard = "RequireSocialCard"; public static final String NotRequireFIO = "NotRequireFIO"; public static final String NotRequireDocumentNumber = "NotRequireDocumentNumber"; public static final String IsRegionOnly = "IsRegionOnly"; public static final String ActiveFromDate = "ActiveFromDate"; public static final String ActiveTillDate = "ActiveTillDate"; public static final String ExemptionGroupCode = "ExemptionGroupCode"; public static final String Name = "Name"; public static final String Code = "Code"; public static final String IsTakeProcessingFee = "IsTakeProcessingFee"; } private SimpleDateFormat simpleDateFormat; public ExemptionDao(NsiDaoSession nsiDaoSession, QueryCache queryCache) { super(nsiDaoSession, queryCache); simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()); simpleDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); } @Override String getTableName() { return TABLE_NAME; } @Override public Exemption fromCursor(Cursor cursor) { Exemption out = new Exemption(); int index = cursor.getColumnIndex(ExemptionDao.Properties.NewExemptionExpressCode); if (index != -1) out.setNewExemptionExpressCode(cursor.getInt(index)); index = cursor.getColumnIndex(BaseEntityDao.Properties.VersionId); out.setVersionId(cursor.getInt(index)); index = cursor.getColumnIndex(ExemptionDao.Properties.RegionOkatoCode); if (index != -1) if (!cursor.isNull(index)) out.setRegionOkatoCode(cursor.getString(index)); else out.setRegionOkatoCode(null); index = cursor.getColumnIndex(ExemptionDao.Properties.ExemptionOrganizationCode); if (index != -1) out.setExemptionOrganizationCode(cursor.getString(index)); index = cursor.getColumnIndex(ExemptionDao.Properties.IsTakeProcessingFee); if (index != -1) out.setIsTakeProcessingFee(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.Percentage); if (index != -1) out.setPercentage(cursor.getInt(index)); index = cursor.getColumnIndex(ExemptionDao.Properties.ChildTicketAvailable); if (index != -1) out.setChildTicketAvailable(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.MassRegistryAvailable); if (index != -1) out.setMassRegistryAvailable(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.CppkRegistryBan); if (index != -1) out.setCppkRegistryBan(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.Presale7000WithPlace); if (index != -1) out.setPresale7000WithPlace(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.Presale6000Once); if (index != -1) out.setPresale6000Once(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.Presale6000Abonement); if (index != -1) out.setPresale6000Abonement(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.Leavy); if (index != -1) out.setLeavy(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.RequireSnilsNumber); if (index != -1) out.setRequireSnilsNumber(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.RequireSocialCard); if (index != -1) out.setRequireSocialCard(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.NotRequireFIO); if (index != -1) out.setNotRequireFIO(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.NotRequireDocumentNumber); if (index != -1) out.setNotRequireDocumentNumber(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.IsRegionOnly); if (index != -1) out.setRegionOnly(cursor.getInt(index) == 1); index = cursor.getColumnIndex(ExemptionDao.Properties.ActiveFromDate); if (index != -1) out.setActiveFromDate(parseDate(cursor.getString(index))); index = cursor.getColumnIndex(ExemptionDao.Properties.ActiveTillDate); if (index != -1) out.setActiveTillDate(parseDate(cursor.getString(index))); index = cursor.getColumnIndex(ExemptionDao.Properties.ExemptionGroupCode); if (index != -1) if (!cursor.isNull(index)) out.setExemptionGroupCode(cursor.getInt(index)); index = cursor.getColumnIndex(ExemptionDao.Properties.Name); if (index != -1) out.setName(cursor.getString(index)); index = cursor.getColumnIndex(ExemptionDao.Properties.Code); if (index != -1) out.setCode(cursor.getInt(index)); index = cursor.getColumnIndex(ExemptionDao.Properties.ExemptionExpressCode); if (index != -1) out.setExemptionExpressCode(cursor.getInt(index)); return out; } private synchronized Date parseDate(String dateString) { Date date = null; if (TextUtils.isEmpty(dateString)) { return date; } try { date = simpleDateFormat.parse(dateString); } catch (ParseException e) { Logger.error(TAG, e); } return date; } }
[ "kopanevartem@mail.ru" ]
kopanevartem@mail.ru
ca495e073bc30893008c314e85f27b859851df17
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/elastic--elasticsearch/38aeba438d6d14e2af913b7bcb0d8fee3dc1ffa2/after/TransportInfo.java
ac46bb366d545cea5973703252ed2176a7e210ab
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,473
java
/* * Licensed to Elastic Search and Shay Banon under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Elastic Search licenses this * file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.elasticsearch.transport; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; import org.elasticsearch.common.io.stream.Streamable; import org.elasticsearch.common.transport.BoundTransportAddress; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; import java.io.IOException; import java.io.Serializable; /** * @author kimchy (shay.banon) */ public class TransportInfo implements Streamable, Serializable, ToXContent { private BoundTransportAddress address; TransportInfo() { } public TransportInfo(BoundTransportAddress address) { this.address = address; } @Override public void toXContent(XContentBuilder builder, Params params) throws IOException { builder.startObject("transport"); builder.field("bound_address", address.boundAddress().toString()); builder.field("publish_address", address.publishAddress().toString()); builder.endObject(); } public static TransportInfo readTransportInfo(StreamInput in) throws IOException { TransportInfo info = new TransportInfo(); info.readFrom(in); return info; } @Override public void readFrom(StreamInput in) throws IOException { address = BoundTransportAddress.readBoundTransportAddress(in); } @Override public void writeTo(StreamOutput out) throws IOException { address.writeTo(out); } public BoundTransportAddress address() { return address; } public BoundTransportAddress getAddress() { return address(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
fcb0112750e9a131db6e043088b24cf12c55e6fc
62e334192393326476756dfa89dce9f0f08570d4
/tk_code/interview/interview-common/src/main/java/com/huatu/tiku/interview/util/MyX509TrustManager.java
e019a0a5205edde3d378a6da509d891fa1e6466c
[]
no_license
JellyB/code_back
4796d5816ba6ff6f3925fded9d75254536a5ddcf
f5cecf3a9efd6851724a1315813337a0741bd89d
refs/heads/master
2022-07-16T14:19:39.770569
2019-11-22T09:22:12
2019-11-22T09:22:12
223,366,837
1
2
null
2022-06-30T20:21:38
2019-11-22T09:15:50
Java
UTF-8
Java
false
false
664
java
package com.huatu.tiku.interview.util; import javax.net.ssl.X509TrustManager; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; /** * @Author ZhenYang * @Date Created in 2018/1/12 16:52 * @Description 自定义信任管理器 */ public class MyX509TrustManager implements X509TrustManager { public void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { } public void checkServerTrusted(X509Certificate[] arg0, String arg1) throws CertificateException { } public X509Certificate[] getAcceptedIssuers() { return null; } }
[ "jelly_b@126.com" ]
jelly_b@126.com
ca7d5367e0e192adcf4dbd11f9db00c7340f0488
e08314b8c22df72cf3aa9e089624fc511ff0d808
/src/selfdefine/com/ces/component/sdzycyljyxx/dao/SdzycyljyxxDao.java
8aef6bea458f3bc40a12111b5afba1e8d101926b
[]
no_license
quxiongwei/qhzyc
46acd4f6ba41ab3b39968071aa114b24212cd375
4b44839639c033ea77685b98e65813bfb269b89d
refs/heads/master
2020-12-02T06:38:21.581621
2017-07-12T02:06:10
2017-07-12T02:06:10
96,864,946
0
3
null
null
null
null
UTF-8
Java
false
false
250
java
package com.ces.component.sdzycyljyxx.dao; import com.ces.component.trace.dao.base.TraceShowModuleStringIDDao; import com.ces.xarch.core.entity.StringIDEntity; public interface SdzycyljyxxDao extends TraceShowModuleStringIDDao<StringIDEntity> { }
[ "qu.xiongwei@cesgroup.com.cn" ]
qu.xiongwei@cesgroup.com.cn
efaf40e1b2032a28f1611f535de94837533664ef
9fb404066fa8da452488970427ff69781ae5ab2b
/THIRD_LIBS/HBLCommon/src/com/howbuy/lib/entity/AbsLoadList.java
d764026c029db16785be50724f21b7a8ca828618
[]
no_license
heatork/piggy
572fa60771001dc585aa414594a135f07ee6784f
24a2945fd779a8b555eb29a065e78f3d6bebcba5
refs/heads/master
2020-12-27T15:27:10.139374
2015-04-04T14:43:06
2015-04-04T14:43:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,006
java
package com.howbuy.lib.entity; import java.util.ArrayList; import java.util.List; import android.os.Parcelable; /** * @author rexy 840094530@qq.com * @date 2013-12-9 下午11:22:16 * @param <T> * @param <K> */ public abstract class AbsLoadList<T, K> extends AbsLoadItem implements Parcelable{ protected int mTotal = 0; protected final List<T> mList = new ArrayList<T>(); public AbsLoadList(){ } public int getTotalNum() { return mTotal; } public void setTotalNum(int total_number) { this.mTotal = total_number; } public int size() { return mList.size(); } public T getItem(int pos) { return mList.get(pos); } public List<T> getItems() { return mList; } public void addItem(T value) { mList.add(value); } public void addItem(T value, boolean isEnd) { if (isEnd) { mList.add(value); } else { mList.add(0, value); } } public boolean addItem(T value, int index) { if (index >= 0 && index < size()) { mList.add(index, value); return true; } return false; } public boolean insertItem(T item, int where) { if (where < 0 || where > size()) { return false; } else { mList.add(where, item); return true; } } public int indexOf(Object item) { return mList.indexOf(item); } public boolean setItem( int index,T value) { if (index >= 0 && index < size()) { mList.set(index, value); return true; } return false; } public T remove(int which){ if (which >= 0 && which < size()) { return mList.remove(which); } return null; } public boolean remove(T item){ return mList.remove(item); } public void replaceAll(K valueList) { clear(); addItems(valueList); } public void clear() { mList.clear(); mTotal=0; } public void addItems(List<T> list,boolean isEnd){ if(isEnd){ mList.addAll(list); }else{ mList.addAll(0,list); } } @Override public int describeContents() { return 0; } public abstract void addItems(K valueList); }
[ "liaojiejie8@gmail.com" ]
liaojiejie8@gmail.com
42739be8a3906a1beed856fb22180ca8fd5b3464
5bfcdd2005650356bdb8d3e62f429a9a151569dd
/src/main/java/com/tulane/leetcode/one/LeetCode_127.java
3dd869c1016f902bc9f9d65cc34ffda5f4c3f44e
[]
no_license
Tureen/arith
59baa7fb6872a64ee117b30aa44c475aca7bd371
628807c0fa72657c3872e642edbbae8f76f758a5
refs/heads/master
2022-06-24T02:33:33.912982
2021-03-10T06:28:37
2021-03-10T06:28:37
218,268,026
0
0
null
2021-04-26T19:38:01
2019-10-29T11:09:06
Java
UTF-8
Java
false
false
3,187
java
package com.tulane.leetcode.one; import java.util.*; import java.util.stream.Collectors; /** * Created by Tulane * 2019/11/30 */ public class LeetCode_127 { public static void main(String[] args) { List<String> wordList = Arrays.asList("hot","dot","dog","lot","log"); new LeetCode_127().ladderLength("hit", "cog", wordList); } public int ladderLength(String beginWord, String endWord, List<String> wordList) { Set<String> wordSet = new HashSet<>(wordList); Set<String> beginSet = new HashSet<>(); Set<String> endSet = new HashSet<>(); Set<String> visited = new HashSet<>(); if(!wordSet.contains(endWord)) return 0; beginSet.add(beginWord); endSet.add(endWord); visited.add(beginWord); visited.add(endWord); int level = 0; while(!beginSet.isEmpty() && !endSet.isEmpty()){ level++; if(beginSet.size() > endSet.size()){ Set<String> tmp = beginSet; beginSet = endSet; endSet = tmp; } Set<String> tmp = new HashSet<>(); for (String begin : beginSet) { for (String word : wordSet) { if(!validate(word, begin)) continue; if(endSet.contains(word)) return level + 1; if(visited.contains(word)) continue; visited.add(word); tmp.add(word); } } beginSet = tmp; } return 0; } private boolean validate(String word, String begin){ int index = 0; for (int i = 0; i < word.length(); i++) { if(word.charAt(i) != begin.charAt(i)){ index++; if(index > 1) return false; } } return true; } public int ladderLength1(String beginWord, String endWord, List<String> wordList) { Set<char[]> wordSet = new HashSet<>(wordList).stream().map(String::toCharArray).collect(Collectors.toSet()); Queue<char[]> queue = new LinkedList<>(); queue.offer(beginWord.toCharArray()); wordSet.remove(beginWord.toCharArray()); int level = 1; while(!queue.isEmpty()){ level++; int size = queue.size(); for (int i = 0; i < size; i++) { char[] chars = queue.poll(); Iterator<char[]> iterator = wordSet.iterator(); while(iterator.hasNext()){ char[] newChars = iterator.next(); if(!validate1(newChars, chars)) continue; if(String.valueOf(newChars).equals(endWord)) return level; queue.offer(newChars); iterator.remove(); } } } return 0; } private boolean validate1(char[] newChars, char[] oldChars){ int index = 0; for (int i = 0; i < oldChars.length; i++) { if(newChars[i] != oldChars[i]){ index++; if(index > 1) return false; } } return true; } }
[ "dpzhuming@szeastroc.com" ]
dpzhuming@szeastroc.com
1400e2045ffdb06a684dc8221c1aafe5a92ad34f
83593598f21cba234f08eca4dec44d2f73a6052d
/prj/bank/web-pingan-b2bic/src/main/java/cn/com/agree/eteller/generic/interceptor/LoginInterceptor.java
92efbd33589d881e76532934ea2a04d2047bbe24
[ "Apache-2.0" ]
permissive
bigstar18/prjs
23a04309a51b0372ddf6c391ee42270e640ec13c
c29da4d0892ce43e074d9e9831f1eedf828cd9d8
refs/heads/master
2021-05-31T19:55:16.217893
2016-06-24T02:35:31
2016-06-24T02:35:31
42,025,473
0
2
null
null
null
null
UTF-8
Java
false
false
1,010
java
package cn.com.agree.eteller.generic.interceptor; import cn.com.agree.eteller.generic.vo.LoginUser; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.interceptor.AbstractInterceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.apache.struts2.ServletActionContext; public class LoginInterceptor extends AbstractInterceptor { private static final long serialVersionUID = 677089508318175138L; private HttpServletRequest req; private HttpSession session; public String intercept(ActionInvocation invocation) throws Exception { this.req = ServletActionContext.getRequest(); this.session = this.req.getSession(); LoginUser user = (LoginUser)this.session.getAttribute("user"); if (user == null) { return "login"; } user.setLoginTime(System.currentTimeMillis()); String result = invocation.invoke(); return result; } }
[ "hxx@hxx-PC" ]
hxx@hxx-PC
cdfc28f42b24eac89e0331c4185112a2f392417e
43cfe6a70b464c19d0c492201f173e8f752353e4
/src/main/java/io/jboot/core/mq/JbootmqMessageListener.java
8bb76a6170a8a7b14ab7334fec4467f78c471037
[ "Apache-2.0" ]
permissive
fxdm41202425/jboot
4864205ec1495ef598a8fae803dcdf11a944543d
d15bc3321a002fbb85fd56f4b640e90105b6dca9
refs/heads/master
2021-08-17T10:06:06.026188
2017-11-21T02:59:10
2017-11-21T02:59:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
879
java
/** * Copyright (c) 2015-2017, Michael Yang 杨福海 (fuhai999@gmail.com). * <p> * Licensed under the GNU Lesser General Public License (LGPL) ,Version 3.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.gnu.org/licenses/lgpl-3.0.txt * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.jboot.core.mq; public interface JbootmqMessageListener { /** * @param channel of topic * @param message topic message */ void onMessage(String channel, Object message); }
[ "fuhai999@gmail.com" ]
fuhai999@gmail.com
6729155766015c93e3df2e50b133b56edfada3fb
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/130/907/CWE190_Integer_Overflow__short_rand_add_15.java
2dced6e9e92e124f28f8dadae6b832cfd14d3ecf
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
6,819
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__short_rand_add_15.java Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-15.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: rand Set data to result of rand() * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: add * GoodSink: Ensure there will not be an overflow before adding 1 to data * BadSink : Add 1 to data, which can cause an overflow * Flow Variant: 15 Control flow: switch(6) and switch(7) * * */ public class CWE190_Integer_Overflow__short_rand_add_15 extends AbstractTestCase { public void bad() throws Throwable { short data; switch (6) { case 6: /* POTENTIAL FLAW: Use a random value */ data = (short)((new java.security.SecureRandom()).nextInt(1+Short.MAX_VALUE-Short.MIN_VALUE)+Short.MIN_VALUE); break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; break; } switch (7) { case 7: /* POTENTIAL FLAW: if data == Short.MAX_VALUE, this will overflow */ short result = (short)(data + 1); IO.writeLine("result: " + result); break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); break; } } /* goodG2B1() - use goodsource and badsink by changing the first switch to switch(5) */ private void goodG2B1() throws Throwable { short data; switch (5) { case 6: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; break; default: /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; break; } switch (7) { case 7: /* POTENTIAL FLAW: if data == Short.MAX_VALUE, this will overflow */ short result = (short)(data + 1); IO.writeLine("result: " + result); break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); break; } } /* goodG2B2() - use goodsource and badsink by reversing the blocks in the first switch */ private void goodG2B2() throws Throwable { short data; switch (6) { case 6: /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; break; } switch (7) { case 7: /* POTENTIAL FLAW: if data == Short.MAX_VALUE, this will overflow */ short result = (short)(data + 1); IO.writeLine("result: " + result); break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); break; } } /* goodB2G1() - use badsource and goodsink by changing the second switch to switch(8) */ private void goodB2G1() throws Throwable { short data; switch (6) { case 6: /* POTENTIAL FLAW: Use a random value */ data = (short)((new java.security.SecureRandom()).nextInt(1+Short.MAX_VALUE-Short.MIN_VALUE)+Short.MIN_VALUE); break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; break; } switch (8) { case 7: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); break; default: /* FIX: Add a check to prevent an overflow from occurring */ if (data < Short.MAX_VALUE) { short result = (short)(data + 1); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too large to perform addition."); } break; } } /* goodB2G2() - use badsource and goodsink by reversing the blocks in the second switch */ private void goodB2G2() throws Throwable { short data; switch (6) { case 6: /* POTENTIAL FLAW: Use a random value */ data = (short)((new java.security.SecureRandom()).nextInt(1+Short.MAX_VALUE-Short.MIN_VALUE)+Short.MIN_VALUE); break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; break; } switch (7) { case 7: /* FIX: Add a check to prevent an overflow from occurring */ if (data < Short.MAX_VALUE) { short result = (short)(data + 1); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too large to perform addition."); } break; default: /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); break; } } public void good() throws Throwable { goodG2B1(); goodG2B2(); goodB2G1(); goodB2G2(); } /* 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); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
bc26b0e4be22e85deb021d7c7c28cf0d2d864099
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project2/src/main/java/org/gradle/test/performance2_4/Production2_376.java
c6b84bdfb921526464cae71c877265dbc0d29f5d
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
300
java
package org.gradle.test.performance2_4; public class Production2_376 extends org.gradle.test.performance1_4.Production1_376 { private final String property; public Production2_376() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
b7f3e5393b5e2516c723e1f443d71cd2a0757968
ef0c1514e9af6de3ba4a20e0d01de7cc3a915188
/sdk/cognitiveservices/ms-azure-cs-contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/APIError.java
4c3c68fde0248416a86440eba9a86b4cb45d4a81
[ "MIT", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-unknown-license-reference", "LGPL-2.1-or-later", "CC0-1.0", "BSD-3-Clause", "UPL-1.0", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-generic-cla" ]
permissive
Azure/azure-sdk-for-java
0902d584b42d3654b4ce65b1dad8409f18ddf4bc
789bdc6c065dc44ce9b8b630e2f2e5896b2a7616
refs/heads/main
2023-09-04T09:36:35.821969
2023-09-02T01:53:56
2023-09-02T01:53:56
2,928,948
2,027
2,084
MIT
2023-09-14T21:37:15
2011-12-06T23:33:56
Java
UTF-8
Java
false
false
927
java
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.models; import com.fasterxml.jackson.annotation.JsonProperty; /** * Error information returned by the API. */ public class APIError { /** * The error property. */ @JsonProperty(value = "Error") private Error error; /** * Get the error value. * * @return the error value */ public Error error() { return this.error; } /** * Set the error value. * * @param error the error value to set * @return the APIError object itself. */ public APIError withError(Error error) { this.error = error; return this; } }
[ "jianghaolu@users.noreply.github.com" ]
jianghaolu@users.noreply.github.com
18f1fb9fc9b06c7541ec3cb083d2110211098698
ceeacb5157b67b43d40615daf5f017ae345816db
/generated/sdk/iothub/azure-resourcemanager-iothub-generated/src/main/java/module-info.java
c330731a754982fbe43bbcf7bfcd6bc013ccf567
[ "LicenseRef-scancode-generic-cla" ]
no_license
ChenTanyi/autorest.java
1dd9418566d6b932a407bf8db34b755fe536ed72
175f41c76955759ed42b1599241ecd876b87851f
refs/heads/ci
2021-12-25T20:39:30.473917
2021-11-07T17:23:04
2021-11-07T17:23:04
218,717,967
0
0
null
2020-11-18T14:14:34
2019-10-31T08:24:24
Java
UTF-8
Java
false
false
777
java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. module com.azure.resourcemanager.iothub.generated { requires transitive com.azure.core.management; exports com.azure.resourcemanager.iothub.generated; exports com.azure.resourcemanager.iothub.generated.fluent; exports com.azure.resourcemanager.iothub.generated.fluent.models; exports com.azure.resourcemanager.iothub.generated.models; opens com.azure.resourcemanager.iothub.generated.fluent.models to com.azure.core, com.fasterxml.jackson.databind; opens com.azure.resourcemanager.iothub.generated.models to com.azure.core, com.fasterxml.jackson.databind; }
[ "actions@github.com" ]
actions@github.com