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
3722d7fd8bac87a2e28d154fadacad087145fd10
20a68bc8842f2de6f241da165f99650639dcf3f8
/006Spring/SpringRESTClient/src/test/java/com/hef/service/SpittleServiceTest.java
af8b9f9bf63d17a48e29f46f88fed3b794fbdc14
[]
no_license
kinoko67/learning-area
6c7af64b677f60f0aa690348da7738615cf81711
6cf460938624833f6c7d586ffaae5c68fbbdae61
refs/heads/master
2023-02-17T14:17:11.059096
2019-10-23T05:39:13
2019-10-23T05:39:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,105
java
package com.hef.service; import com.hef.spittr.domain.Spitter; import com.hef.spittr.service.SpittleService; import config.RootConfig; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * @Date 2019-04-22 * @Author lifei */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {RootConfig.class}) public class SpittleServiceTest { @Autowired public SpittleService spittleService; @Test public void shouldNotNull(){ Assert.assertNotNull(spittleService); } @Test public void fetchSpitterByIdTest(){ Spitter spitter = spittleService.fetchSpitterById(1l); System.out.println(spitter); } @Test public void findSpitterByIdTest(){ Spitter spitter = spittleService.findSpitterById(1l); System.out.println(spitter); } @Test public void getSpitterByIdTest(){ Spitter spitter = spittleService.findSpitterById(1l); System.out.println(spitter); } @Test public void updateSpitter(){ Spitter spitter = spittleService.getSpitterById(1l); System.out.println(spitter); spitter.setFullName("FUT spitter03"); //spittleService.updateSpitter(spitter); //spittleService.updateSpitter(spitter); spittleService.updateSpitter(spitter); System.out.println("update Ok!"); Spitter spitter2 = spittleService.getSpitterById(1l); System.out.println(spitter2); } @Test public void deleteSpitterById(){ long id = 27l; /*Spitter spitter = spittleService.findSpitterById(id); System.out.println(spitter); Assert.assertNotNull(spitter); spittleService.deleteSpitterById(id);*/ Spitter spitter2 = spittleService.findSpitterById(id); System.out.println(spitter2); Assert.assertNull(spitter2); } @Test public void saveSpitter(){ Spitter spitter = new Spitter("rest save","rest", "rest", "rest@gmail.com", true); // Spitter saveSpitter = spittleService.saveSpitter(spitter); ResponseEntity<Spitter> responseEntity = spittleService.saveSpitterEntity(spitter); Spitter saveSpitter = responseEntity.getBody(); System.out.println(responseEntity.getHeaders().getLocation()); System.out.println(saveSpitter); } @Test public void saveSpitterAndGetLocation(){ Spitter spitter = new Spitter("rest save","rest", "rest", "rest@gmail.com", true); String location = spittleService.saveSpitterAndFetchLocation(spitter); System.out.println(location); } @Test public void findSpitterByIdByExchange(){ ResponseEntity<Spitter> res = spittleService.findSpitterByIdByExchange(1l); System.out.println(res.getBody()); System.out.println(res); } }
[ "hefrankeleyn@gamil.com" ]
hefrankeleyn@gamil.com
23320a60e1ac1d4dd3d18163c8c4a17acd4c35f2
8eaa9ab38e99efb77f5d1029f0b57e58aec79f33
/app/src/main/java/buscardxian/ncrf/jiege/buscardxian/tools/SqliteUtil.java
1237834b682206abc9b910179e6a43f067414735
[]
no_license
Spriteing/BusCardHeZe
9b9c90bea5ef3dc5ee6e9755c400eb25a0142be5
f3e883fa7a0439f3c425856a40f0986fd1674a42
refs/heads/master
2021-08-08T21:27:06.738483
2017-11-11T07:19:57
2017-11-11T07:19:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,940
java
package buscardxian.ncrf.jiege.buscardxian.tools; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; import java.util.ArrayList; import java.util.List; import buscardxian.ncrf.jiege.buscardxian.util.LineMsg_Util; import buscardxian.ncrf.jiege.buscardxian.util.SiteMsg_Util; import static buscardxian.ncrf.jiege.buscardxian.application.MyApplication.db; public class SqliteUtil { public static final String TAG="SqliteUtil"; /** * 把线路号存起来 * * @param db * @param LineWord * @param StationUpLast * @param StationDownLast */ public static void insertMsg(SQLiteDatabase db, String LineWord, String StationUpLast, String StationDownLast) { db.execSQL("insert into stationline(LineWord,StationUpLast,StationDownLast) values(?,?,?)", new String[]{LineWord, StationUpLast, StationDownLast}); } /** * 添加上行或者下行数据 * * @param db * @param linetype up:上行 else 下行 * @param StationName 站点名 * @param StationDULNo 线路号 */ public static void InsertLine(SQLiteDatabase db, String linetype, String StationName, String StationDULNo) { String sql; if (linetype.equals("up")) { sql = "insert into stationlines(StationName,StationDULNo) values(?,?)"; } else { sql = "insert into stationlinex(StationName,StationDULNo) values(?,?)"; } db.execSQL(sql, new String[]{StationName, StationDULNo}); } /** * 删除上行或者下行线路 * * @param db * @param linetype up:上行 else 下行 */ public static void DeleteLine(SQLiteDatabase db, String linetype) { String sql; if (linetype.equals("up")) { sql = "delete from stationlines"; } else { sql = "delete from stationlinex"; } db.execSQL(sql); } /** * 删除线路信息 * * @param db */ public static void DeleteLineNum(SQLiteDatabase db) { String sql = "delete from stationline"; db.execSQL(sql); } /** * @param db * @param id 要修改的id * @param context 要修改为的内容 */ public static void UpdateServletMsg(SQLiteDatabase db, String id, String context) { String msg= QueryServletMsg(id); if (msg.equals("")){ InsertServletMsg(db,id,context); }else { db.execSQL("update servletmsg set context=? where id=?",new String[]{context,id}); } } /** * 插入服务用语 * @param db * @param id * @param context 内容 */ public static void InsertServletMsg(SQLiteDatabase db, String id, String context) { db.execSQL("insert into servletmsg(id,context) values(?,?)", new String[]{id, context}); } /** * 查询服务用语 * @param id * @return */ public static String QueryServletMsg(String id) { Cursor cursor = db.rawQuery("select * from servletmsg where id=?", new String[]{id}); String msg = ""; while (cursor.moveToNext()) { msg=cursor.getString(cursor.getColumnIndex(cursor.getColumnName(1))); } return msg; } /** * 查询所有服务用语 * @param db * @return */ public static List<String> QueryAllServletMsg(SQLiteDatabase db) { Log.v("SqliteUtil","QueryAllServletMsg"); Cursor cursor = db.rawQuery("select * from servletmsg", null); List<String> list = new ArrayList<String>(); while (cursor.moveToNext()) { list.add(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(1)))); } return list; } /** * 查询上行或者下行数据 * * @param linetype up:上行 else 下行 * @param db * @return */ public static List<SiteMsg_Util> queryallLine(SQLiteDatabase db, String linetype) { List<SiteMsg_Util> list = new ArrayList<SiteMsg_Util>(); Cursor cursor; if (linetype.equals("up")) { cursor = db.rawQuery("select * from stationlines", null); } else { cursor = db.rawQuery("select * from stationlinex", null); } SiteMsg_Util msg_Util; while (cursor.moveToNext()) { msg_Util = new SiteMsg_Util(); msg_Util.setStationName(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(1)))); msg_Util.setStationDULNo(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(2)))); // msg_Util.setLongitude(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(3)))); // msg_Util.setLatitude(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(4)))); // msg_Util.setLongitudeout(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(5)))); // msg_Util.setLatitudeout(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(6)))); // msg_Util.setMicroDistance(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(7)))); list.add(msg_Util); } return list; } /** * 查询线路 * @param db * @return */ public static LineMsg_Util queryLine(SQLiteDatabase db) { LineMsg_Util util = new LineMsg_Util(); Cursor cursor = db.rawQuery("select * from stationline", null); while (cursor.moveToNext()) { util = new LineMsg_Util(); util.setLineWord(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(1)))); util.setStationUpLast(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(2)))); util.setStationDownLast(cursor.getString(cursor.getColumnIndex(cursor.getColumnName(3)))); } return util; } }
[ "2295360491@qq.com" ]
2295360491@qq.com
46d3ccfadb4f09081c542c20d772f9c651d648c9
95e944448000c08dd3d6915abb468767c9f29d3c
/sources/com/p280ss/android/ugc/gamora/editor/C44283cm.java
3df740d8cb4b1c161dc966cc91108f026093c980
[]
no_license
xrealm/tiktok-src
261b1faaf7b39d64bb7cb4106dc1a35963bd6868
90f305b5f981d39cfb313d75ab231326c9fca597
refs/heads/master
2022-11-12T06:43:07.401661
2020-07-04T20:21:12
2020-07-04T20:21:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
802
java
package com.p280ss.android.ugc.gamora.editor; import kotlin.jvm.internal.C7575l; import kotlin.jvm.internal.PropertyReference1; import kotlin.reflect.C7585d; import kotlin.reflect.C7599l; /* renamed from: com.ss.android.ugc.gamora.editor.cm */ final /* synthetic */ class C44283cm extends PropertyReference1 { /* renamed from: a */ public static final C7599l f114448a = new C44283cm(); C44283cm() { } public final String getName() { return "musicVolume"; } public final C7585d getOwner() { return C7575l.m23595a(EditVolumeState.class); } public final String getSignature() { return "getMusicVolume()Ljava/lang/Integer;"; } public final Object get(Object obj) { return ((EditVolumeState) obj).getMusicVolume(); } }
[ "65450641+Xyzdesk@users.noreply.github.com" ]
65450641+Xyzdesk@users.noreply.github.com
3258023ef6d5109a11282978d293051177695ffb
f28dce60491e33aefb5c2187871c1df784ccdb3a
/src/main/java/u/aly/an.java
17c8cd91f6ae62c467f472e003e261eebf7b55cf
[ "Apache-2.0" ]
permissive
JackChan1999/boohee_v5.6
861a5cad79f2bfbd96d528d6a2aff84a39127c83
221f7ea237f491e2153039a42941a515493ba52c
refs/heads/master
2021-06-11T23:32:55.977231
2017-02-14T18:07:04
2017-02-14T18:07:04
81,962,585
8
6
null
null
null
null
UTF-8
Java
false
false
2,008
java
package u.aly; import android.content.Context; import com.umeng.analytics.AnalyticsConfig; import com.umeng.analytics.b; import com.umeng.analytics.h; import u.aly.g.a; /* compiled from: ImLatent */ public class an implements x { private static an l = null; private final long a = 1296000000; private final long b = 129600000; private final int c = 1800000; private final int d = 10000; private h e; private ab f; private long g = 1296000000; private int h = 10000; private long i = 0; private long j = 0; private Context k; public static synchronized an a(Context context, ab abVar) { an anVar; synchronized (an.class) { if (l == null) { l = new an(context, abVar); l.a(g.a(context).b()); } anVar = l; } return anVar; } private an(Context context, ab abVar) { this.k = context; this.e = h.a(context); this.f = abVar; } public boolean a() { if (this.e.g() || this.f.f()) { return false; } long currentTimeMillis = System.currentTimeMillis() - this.f.o(); if (currentTimeMillis > this.g) { this.i = (long) b.a(this.h, c.a(this.k)); this.j = currentTimeMillis; return true; } else if (currentTimeMillis <= 129600000) { return false; } else { this.i = 0; this.j = currentTimeMillis; return true; } } public long b() { return this.i; } public long c() { return this.j; } public void a(a aVar) { this.g = aVar.a(1296000000); int b = aVar.b(0); if (b != 0) { this.h = b; } else if (AnalyticsConfig.sLatentWindow <= 0 || AnalyticsConfig.sLatentWindow > 1800000) { this.h = 10000; } else { this.h = AnalyticsConfig.sLatentWindow; } } }
[ "jackychan2040@gmail.com" ]
jackychan2040@gmail.com
3b94e9c6b5be74ac5b4664f5b2b4c200b8c37166
534c1934a8eed6a6b2ad3b866adfc6805b5f2984
/issue/src/main/java/com/ibm/entity/ReturnValue.java
f630db35b36a1f4f4b0c33e8ba77d1fe41eaeb29
[]
no_license
1291334282/eclipsegit
6869390bfdbe0d3d8aaaefc7b37ca5c4e8d3d817
7041cd46b83bfd41d4a0f4aeb23761bd6dff6f69
refs/heads/master
2023-01-13T22:24:38.250913
2020-11-27T03:05:23
2020-11-27T03:05:23
314,166,763
2
2
null
null
null
null
UTF-8
Java
false
false
4,194
java
package com.ibm.entity; import com.alibaba.fastjson.JSONObject; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @ApiModel(value = "返回信息", description = "返回响应信息") public class ReturnValue extends BaseResponse { public static final String STATUS_FAIL = "500"; public static final String STATUS_OK = "200"; public static final String MESSAGE_SUCCESS = "操作成功"; public static final String MESSAGE_ERROR = "操作失敗"; public static final String ERRCODE_NOERR = "0000"; public static final String ERRCODE_ERR = "9999"; //未配置简易流程 public static final String ERR_SIMPLE_PROCESS = "0001"; //子目录与主目录的基本编码不匹配 public static final String ERR_BASIC_CODE = "0002"; @ApiModelProperty(value = "操作成功或失败标志", name = "status", example = "200") protected String status = STATUS_OK; @ApiModelProperty(value = "操作错误代码", name = "errcode", example = "5399") protected String errcode = ""; @ApiModelProperty(value = "操作状态信息", name = "message", example = "操作成功") protected String message = MESSAGE_SUCCESS; @ApiModelProperty(value = "错误信息", name = "errmsg", example = "上送数据错误") protected String errmsg = ""; public ReturnValue(String status, String message) { this.status = status; this.message = message; } public ReturnValue() { } public ReturnValue(String status, String message, JSONObject data, String errcode, String errmsg) { super.setData(data); this.status = status; this.message = message; } public String getErrmsg() { return errmsg; } public ReturnValue setErrmsg(String errmsg) { this.errmsg = errmsg; return this; } public String getMessage() { return message; } public ReturnValue setMessage(String message) { this.message = message; return this; } public String getStatus() { return status; } public ReturnValue setStatus(String status) { this.status = status; return this; } /** * description: 返回成功报文无需返回业务数据 */ public static ReturnValue ok() { ReturnValue returnValue = new ReturnValue(); returnValue.setData(new JSONObject()); returnValue.errcode = ERRCODE_NOERR; return returnValue; } /** * description: 返回成功报文包含返回数据 */ public static ReturnValue ok(Object data) { ReturnValue response = new ReturnValue(); response.setStatus(STATUS_OK); response.setMessage(MESSAGE_SUCCESS); response.setData(data); response.setErrmsg(""); response.setErrcode(ERRCODE_NOERR); return response; } /** * description: 返回成功报文包含返回数据,自定义返回错误信息和错误码 */ public static ReturnValue ok(Object data, String errMsg, String errCode) { ReturnValue response = new ReturnValue(); response.setStatus(STATUS_OK); response.setMessage(MESSAGE_SUCCESS); response.setData(data); response.setErrmsg(errMsg); response.setErrcode(errCode); return response; } /** * description: 返回失败报文,自定义错误信息 */ public static ReturnValue fail(String errmsg) { return fail(errmsg, ERRCODE_ERR); } /** * description:返回失败报文,自定义错误代码和错误信息 */ public static ReturnValue fail(String errmsg, String errcode) { ReturnValue response = new ReturnValue(); response.setStatus(STATUS_FAIL); response.setMessage(MESSAGE_ERROR); response.setData(new JSONObject()); response.setErrmsg(errmsg); response.setErrcode(errcode); return response; } public String getErrcode() { return errcode; } public ReturnValue setErrcode(String errcode) { this.errcode = errcode; return this; } }
[ "email" ]
email
34025b2492ddfa5c1641c80a2ed31658c5a763b8
c34c16c923802c7bd63ba7666da7406ea179c8db
/百联-android-20210807/az/skWeiChatBaidu/src/main/java/com/ydd/zhichat/pay/sk/SKPayType.java
d0f1adbd29ba4487a8b7a5b5a67f1e0d5bac0c5a
[]
no_license
xeon-ye/bailian
36f322b40a4bc3a9f4cc6ad76e95efe3216258ed
ec84ac59617015a5b7529845f551d4fa136eef4e
refs/heads/main
2023-06-29T06:12:53.074219
2021-08-07T11:56:38
2021-08-07T11:56:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
296
java
package com.ydd.zhichat.pay.sk; public class SKPayType { public static final int UN_KNOW = -1; public static final int TRANSFER_BACK = 0; public static final int PAYMENT_SUCCESS = 1; public static final int RECEIPT_SUCCESS = 2; public static final int PAY_CERTIFICATE = 3; }
[ "xiexun6943@gmail.com" ]
xiexun6943@gmail.com
bf4fb574593dd753c2c0c2c7b4bb07ba1bc99825
1de0bd7e9bf278009bcccb892864b893883ed0cb
/.history/139.word-break_20190406155808.java
e7ab5377858e1be44bddb8720925a876e6d95f15
[]
no_license
zhejianusc/leetcode_vs_code
b90a6539ff3d610302df06284d9ef2c4b27c6cca
485565448adc98f90cc1135c7cd12cfdd3fde31c
refs/heads/master
2020-04-24T00:44:20.160179
2020-03-24T04:40:32
2020-03-24T04:40:32
171,574,685
0
0
null
null
null
null
UTF-8
Java
false
false
1,880
java
import java.util.Set; /* * @lc app=leetcode id=139 lang=java * * [139] Word Break * * https://leetcode.com/problems/word-break/description/ * * algorithms * Medium (34.13%) * Total Accepted: 317.6K * Total Submissions: 913.6K * Testcase Example: '"leetcode"\n["leet","code"]' * * Given a non-empty string s and a dictionary wordDict containing a list of * non-empty words, determine if s can be segmented into a space-separated * sequence of one or more dictionary words. * * Note: * * * The same word in the dictionary may be reused multiple times in the * segmentation. * You may assume the dictionary does not contain duplicate words. * * * Example 1: * * * Input: s = "leetcode", wordDict = ["leet", "code"] * Output: true * Explanation: Return true because "leetcode" can be segmented as "leet * code". * * * Example 2: * * * Input: s = "applepenapple", wordDict = ["apple", "pen"] * Output: true * Explanation: Return true because "applepenapple" can be segmented as "apple * pen apple". * Note that you are allowed to reuse a dictionary word. * * * Example 3: * * * Input: s = "catsandog", wordDict = ["cats", "dog", "sand", "and", "cat"] * Output: false * * */ class Solution { public boolean wordBreak(String s, List<String> wordDict) { int n = s.length(); Set<String> set = new HashSet<>(wordDict); return dfs(s, 0, set); } private boolean dfs(String s, int start, Set<String> set) { System.out.print(s); if(start == s.length()) return true; for(int i = start; i < s.length(); i++) { String cur = s.substring(start, i); if(set.contains(cur)) { if(dfs(s.substring(i + 1), i + 1, set)) { return true; } } } return false; } }
[ "jianzher@sina.com" ]
jianzher@sina.com
3696554e4f08f1b7e627039813760a26bdd9dce3
ef50e50e0b61db62d0476b5b7df3d5f5044a16a9
/game_theory/poker-nim-1/java/rishabh2631.java
a8ff5765c210759dbcd9b6faedb2022a35600f6e
[]
no_license
saketrule/Research_Project-HackerRank_CheckStyle
09fd6ef3a067926c754af693b13566cc55fe16ae
4334bcbc4620fb94fd3d63034a320756e7233ded
refs/heads/master
2021-01-22T13:03:08.055929
2017-09-12T12:11:19
2017-09-12T12:11:19
102,361,527
0
1
null
null
null
null
UTF-8
Java
false
false
684
java
import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; import java.util.Scanner.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc = new Scanner(System.in); int t=sc.nextInt(); while(t-->0) { int n=sc.nextInt(); int k=sc.nextInt(); int b=0; while(n-->0) { b^=sc.nextInt(); } if(b==0) System.out.println("Second"); else System.out.println("First"); } } }
[ "anonymoussaketjoshi@gmail.com" ]
anonymoussaketjoshi@gmail.com
a91c02915219b763daf68b5094a5abd830a59678
17c30fed606a8b1c8f07f3befbef6ccc78288299
/P9_8_0_0/src/main/java/com/android/server/wm/PointerEventDispatcher.java
a521293b8adaec120a516113013b146cf6d5b376
[]
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
2,411
java
package com.android.server.wm; import android.view.InputChannel; import android.view.InputEvent; import android.view.InputEventReceiver; import android.view.MotionEvent; import android.view.WindowManagerPolicy.PointerEventListener; import com.android.server.UiThread; import java.util.ArrayList; public class PointerEventDispatcher extends InputEventReceiver { ArrayList<PointerEventListener> mListeners = new ArrayList(); PointerEventListener[] mListenersArray = new PointerEventListener[0]; public PointerEventDispatcher(InputChannel inputChannel) { super(inputChannel, UiThread.getHandler().getLooper()); } public void onInputEvent(InputEvent event) { try { if ((event instanceof MotionEvent) && (event.getSource() & 2) != 0) { PointerEventListener[] listeners; MotionEvent motionEvent = (MotionEvent) event; synchronized (this.mListeners) { if (this.mListenersArray == null) { this.mListenersArray = new PointerEventListener[this.mListeners.size()]; this.mListeners.toArray(this.mListenersArray); } listeners = this.mListenersArray; } for (PointerEventListener onPointerEvent : listeners) { onPointerEvent.onPointerEvent(motionEvent); } } finishInputEvent(event, false); } catch (Throwable th) { finishInputEvent(event, false); } } public void registerInputEventListener(PointerEventListener listener) { synchronized (this.mListeners) { if (this.mListeners.contains(listener)) { throw new IllegalStateException("registerInputEventListener: trying to register" + listener + " twice."); } this.mListeners.add(listener); this.mListenersArray = null; } } public void unregisterInputEventListener(PointerEventListener listener) { synchronized (this.mListeners) { if (this.mListeners.contains(listener)) { this.mListeners.remove(listener); this.mListenersArray = null; } else { throw new IllegalStateException("registerInputEventListener: " + listener + " not registered."); } } } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
a3f24dc9c2350900a35213c2dcec6f4f47ad9b96
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/sagemath_android/src/org/sagemath/droid/views/OutputView.java
e07a25f3d7ab1529ac36feb1eef2bae113ccf441
[]
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
7,655
java
// isComment package org.sagemath.droid.views; import android.app.Activity; import android.content.Context; import android.os.Handler; import android.os.Parcelable; import android.util.AttributeSet; import android.util.Log; import android.util.SparseArray; import android.widget.LinearLayout; import com.squareup.otto.Subscribe; import org.sagemath.droid.events.InteractUpdateEvent; import org.sagemath.droid.events.ReplyEvent; import org.sagemath.droid.interacts.InteractView; import org.sagemath.droid.models.database.Cell; import org.sagemath.droid.models.gson.BaseReply; import org.sagemath.droid.models.gson.InteractReply; import org.sagemath.droid.states.InteractViewState; import org.sagemath.droid.states.OutputBlockState; import org.sagemath.droid.states.OutputViewState; import org.sagemath.droid.utils.BusProvider; /** * isComment */ public class isClassOrIsInterface extends LinearLayout { private static final String isVariable = "isStringConstant"; private OutputWebView isVariable; private InteractView isVariable; private Context isVariable; private Cell isVariable; public isConstructor(Context isParameter, AttributeSet isParameter) { super(isNameExpr, isNameExpr); this.isFieldAccessExpr = isNameExpr; isMethod(isNameExpr); isMethod(true); isMethod(true); } public void isMethod(Cell isParameter) { this.isFieldAccessExpr = isNameExpr; } public void isMethod() { isNameExpr.isMethod().isMethod(this); } @Override protected Parcelable isMethod() { Parcelable isVariable = super.isMethod(); OutputBlockState isVariable = null; InteractViewState isVariable = null; isNameExpr.isMethod(isNameExpr, "isStringConstant"); if (isNameExpr != null) { isNameExpr = new OutputBlockState(isNameExpr, isNameExpr.isMethod()); } if (isNameExpr != null) { isNameExpr = new InteractViewState(isNameExpr, isNameExpr.isMethod()); } if (isNameExpr == null && isNameExpr == null) { // isComment isNameExpr.isMethod(isNameExpr, "isStringConstant"); return isNameExpr; } if (isNameExpr == null) { // isComment isNameExpr.isMethod(isNameExpr, "isStringConstant"); return isNameExpr; } else { // isComment isNameExpr.isMethod(isNameExpr, "isStringConstant"); return new OutputViewState(isNameExpr, isNameExpr, isNameExpr); } } public void isMethod() { if (isNameExpr != null) { isNameExpr.isMethod(); } if (isNameExpr != null) { isNameExpr.isMethod(); } isNameExpr.isMethod().isMethod(this); } @Override protected void isMethod(Parcelable isParameter) { if (!(isNameExpr instanceof BaseSavedState)) { // isComment super.isMethod(isNameExpr); return; } isMethod(); if (isNameExpr instanceof OutputBlockState) { // isComment isMethod(); final OutputBlockState isVariable = (OutputBlockState) isNameExpr; super.isMethod(isNameExpr.isMethod()); // isComment isNameExpr.isMethod(new Runnable() { @Override public void isMethod() { String isVariable = isNameExpr.isMethod(); isNameExpr = isMethod(); isNameExpr.isMethod(isNameExpr); } }); } else if (isNameExpr instanceof OutputViewState) { // isComment OutputViewState isVariable = (OutputViewState) isNameExpr; super.isMethod(isNameExpr.isMethod()); final OutputBlockState isVariable = isNameExpr.isMethod(); final InteractViewState isVariable = isNameExpr.isMethod(); isNameExpr.isMethod(new Runnable() { @Override public void isMethod() { // isComment isNameExpr = isMethod(); isNameExpr.isMethod(isNameExpr.isMethod()); // isComment isNameExpr = new InteractView(isNameExpr); isNameExpr.isMethod(isNameExpr.isMethod()); isMethod(isNameExpr, isIntegerConstant); } }); } } // isComment // isComment @Override protected void isMethod(SparseArray<Parcelable> isParameter) { super.isMethod(isNameExpr); } @Override protected void isMethod(SparseArray<Parcelable> isParameter) { super.isMethod(isNameExpr); } @Subscribe public void isMethod(ReplyEvent isParameter) { isNameExpr.isMethod(isNameExpr, "isStringConstant" + isNameExpr.isMethod().isMethod()); BaseReply isVariable = isNameExpr.isMethod(); if (isNameExpr instanceof InteractReply) { UpdateResult isVariable = new UpdateResult(); isNameExpr.isFieldAccessExpr = (InteractReply) isNameExpr; isNameExpr.isMethod(isNameExpr); } else { UpdateResult isVariable = new UpdateResult(); isNameExpr.isFieldAccessExpr = isNameExpr; isNameExpr.isMethod(isNameExpr); } } @Subscribe public void isMethod(InteractUpdateEvent isParameter) { isNameExpr.isMethod(); } private Handler isVariable = new Handler(); public OutputWebView isMethod() { if (isNameExpr != null) return isNameExpr; else return isMethod(); } private OutputWebView isMethod() { isNameExpr.isMethod(isNameExpr, "isStringConstant"); OutputWebView isVariable = new OutputWebView(isNameExpr, isNameExpr); isNameExpr.isMethod(isNameExpr, "isStringConstant" + isNameExpr.isMethod()); isMethod(isNameExpr); isNameExpr = isNameExpr; return isNameExpr; } private class isClassOrIsInterface implements Runnable { private BaseReply isVariable; private InteractReply isVariable; @Override public void isMethod() { if (isNameExpr != null) { isNameExpr.isMethod(isNameExpr, "isStringConstant" + isNameExpr.isMethod()); OutputWebView isVariable = isMethod(); isNameExpr.isMethod(isNameExpr, "isStringConstant" + isNameExpr.isMethod()); isNameExpr.isMethod(isNameExpr); } if (isNameExpr != null) { isNameExpr = new InteractView(isNameExpr); isNameExpr.isMethod(isNameExpr); isNameExpr.isMethod(isNameExpr, "isStringConstant" + isNameExpr.isMethod().isMethod().isMethod().isMethod()); isMethod(isNameExpr, isIntegerConstant); } } } public void isMethod() { isMethod(); isNameExpr = null; } public void isMethod() { if (isNameExpr != null) { ((Activity) isNameExpr).isMethod(new Runnable() { @Override public void isMethod() { isNameExpr.isMethod(); } }); } } public void isMethod() { if (isNameExpr != null) { ((Activity) isNameExpr).isMethod(new Runnable() { @Override public void isMethod() { isNameExpr.isMethod(); } }); } } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
a4aa2169ab66c2fdc56be80e341d1154259f4030
9e38a0ee6afec32b318b6315bcbc2a7f0dcd07e5
/src/main/java/com/ucompass/ucompassadmin/repository/AuthorityRepository.java
a27c9b4978f048aaff20f969f22c7342a6963b3d
[]
no_license
brahim596/u_compass_admin
ff7ea48a249384156628181f54420a04281e6270
1ff1113fff55fd9fef6348b7375361a15fb055f4
refs/heads/master
2022-12-23T03:58:22.738115
2020-03-06T09:48:40
2020-03-06T09:49:34
245,382,785
0
0
null
2022-12-16T05:13:28
2020-03-06T09:46:55
Java
UTF-8
Java
false
false
318
java
package com.ucompass.ucompassadmin.repository; import com.ucompass.ucompassadmin.domain.Authority; import org.springframework.data.jpa.repository.JpaRepository; /** * Spring Data JPA repository for the {@link Authority} entity. */ public interface AuthorityRepository extends JpaRepository<Authority, String> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
f84134a144bcce9460aea2ab0d301e0ad138671b
0f77c5ec508d6e8b558f726980067d1058e350d7
/1_39_120042/com/ankamagames/wakfu/client/network/protocol/frame/fight/messageHandler/spectator/FighterTurnBeginMessageHandler.java
02ae9c294bdbf671ec342d3f5f6df851314d433e
[]
no_license
nightwolf93/Wakxy-Core-Decompiled
aa589ebb92197bf48e6576026648956f93b8bf7f
2967f8f8fba89018f63b36e3978fc62908aa4d4d
refs/heads/master
2016-09-05T11:07:45.145928
2014-12-30T16:21:30
2014-12-30T16:21:30
29,250,176
5
5
null
2015-01-14T15:17:02
2015-01-14T15:17:02
null
UTF-8
Java
false
false
1,150
java
package com.ankamagames.wakfu.client.network.protocol.frame.fight.messageHandler.spectator; import com.ankamagames.wakfu.client.network.protocol.frame.fight.messageHandler.*; import com.ankamagames.wakfu.client.network.protocol.message.game.serverToClient.fight.action.*; import com.ankamagames.wakfu.client.core.action.*; import com.ankamagames.framework.script.action.*; import com.ankamagames.wakfu.client.core.game.fight.*; import com.ankamagames.framework.kernel.core.common.message.*; final class FighterTurnBeginMessageHandler extends UsingFightMessageHandler<FighterTurnBeginMessage, Fight> { @Override public boolean onMessage(final FighterTurnBeginMessage msg) { final FighterTurnStartAction action = new FighterTurnStartAction(msg.getUniqueId(), msg.getFightActionType().getId(), msg.getActionId(), ((Fight)this.m_concernedFight).getId()); action.setInstigatorId(msg.getFighterId()); FightActionGroupManager.getInstance().addActionToPendingGroup((Fight)this.m_concernedFight, action); FightActionGroupManager.getInstance().executePendingGroup(this.m_concernedFight); return false; } }
[ "totomakers@hotmail.fr" ]
totomakers@hotmail.fr
6a0b5fcfbe5cb1ad646eb884387d5a3e4358f3ad
2c83fee25b1777e37cba87b4df3e15cb7fb94b25
/src/main/java/im/zhaojun/tencent/TencentServiceImpl.java
8fb6ef006c24a8e3098583ff81337919304225a0
[ "MIT" ]
permissive
bigsuperangel/zfile
2da8582e94e9b71c9a08deaae74ac61824702c25
d81d7950951697b01f84627682df5eef30b3eb03
refs/heads/master
2020-11-25T18:11:01.691365
2019-12-11T14:40:09
2019-12-11T14:40:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,624
java
package im.zhaojun.tencent; import cn.hutool.core.util.URLUtil; import com.qcloud.cos.COSClient; import com.qcloud.cos.ClientConfig; import com.qcloud.cos.auth.BasicCOSCredentials; import com.qcloud.cos.auth.COSCredentials; import com.qcloud.cos.model.COSObjectSummary; import com.qcloud.cos.model.ListObjectsRequest; import com.qcloud.cos.model.ObjectListing; import com.qcloud.cos.region.Region; import im.zhaojun.common.model.StorageConfig; import im.zhaojun.common.model.dto.FileItemDTO; import im.zhaojun.common.model.enums.FileTypeEnum; import im.zhaojun.common.model.enums.StorageTypeEnum; import im.zhaojun.common.service.FileService; import im.zhaojun.common.service.StorageConfigService; import im.zhaojun.common.util.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.net.URL; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; @Service public class TencentServiceImpl implements FileService { private static final Logger log = LoggerFactory.getLogger(TencentServiceImpl.class); @Resource private StorageConfigService storageConfigService; private static final String BUCKET_NAME_KEY = "bucket-name"; private static final String SECRET_ID_KEY = "secretId"; private static final String SECRET_KEY = "secretKey"; private static final String DOMAIN_KEY = "domain"; private static final String ENDPOINT_KEY = "endPoint"; @Value("${zfile.cache.timeout}") private Long timeout; private String bucketName; private String domain; private COSClient cosClient; private boolean isInitialized; @Override public void init() { try { Map<String, StorageConfig> stringStorageConfigMap = storageConfigService.selectStorageConfigMapByKey(StorageTypeEnum.TENCENT); String secretId = stringStorageConfigMap.get(SECRET_ID_KEY).getValue(); String secretKey = stringStorageConfigMap.get(SECRET_KEY).getValue(); String regionName = stringStorageConfigMap.get(ENDPOINT_KEY).getValue(); bucketName = stringStorageConfigMap.get(BUCKET_NAME_KEY).getValue(); domain = stringStorageConfigMap.get(DOMAIN_KEY).getValue(); COSCredentials cred = new BasicCOSCredentials(secretId, secretKey); Region region = new Region(regionName); ClientConfig clientConfig = new ClientConfig(region); cosClient = new COSClient(cred, clientConfig); isInitialized = true; } catch (Exception e) { log.debug(StorageTypeEnum.TENCENT.getDescription() + "初始化异常, 已跳过"); } } @Override public List<FileItemDTO> fileList(String path) { path = StringUtils.removeFirstSeparator(path); List<FileItemDTO> fileItemList = new ArrayList<>(); ObjectListing objectListing = cosClient.listObjects(new ListObjectsRequest().withBucketName(bucketName).withDelimiter("/").withPrefix(path)); for (COSObjectSummary s : objectListing.getObjectSummaries()) { FileItemDTO fileItemDTO = new FileItemDTO(); fileItemDTO.setName(s.getKey().substring(path.length())); fileItemDTO.setSize(s.getSize()); fileItemDTO.setTime(s.getLastModified()); fileItemDTO.setType(FileTypeEnum.FILE); fileItemDTO.setPath(path); fileItemDTO.setUrl(getDownloadUrl(StringUtils.concatUrl(path, fileItemDTO.getName()))); fileItemList.add(fileItemDTO); } for (String commonPrefix : objectListing.getCommonPrefixes()) { FileItemDTO fileItemDTO = new FileItemDTO(); fileItemDTO.setName(commonPrefix.substring(path.length(), commonPrefix.length() - 1)); fileItemDTO.setType(FileTypeEnum.FOLDER); fileItemDTO.setPath(path); fileItemList.add(fileItemDTO); } return fileItemList; } @Override public String getDownloadUrl(String path) { Date expirationDate = new Date(System.currentTimeMillis() + timeout * 1000); URL url = cosClient.generatePresignedUrl(bucketName, path, expirationDate); return URLUtil.complateUrl(domain, url.getFile()); } @Override public StorageTypeEnum getStorageTypeEnum() { return StorageTypeEnum.TENCENT; } @Override public boolean getIsInitialized() { return isInitialized; } }
[ "root@zhaojun.im" ]
root@zhaojun.im
cf58f9034b55706e0cc52149f87159bcb809cf7f
631afd8bb77a19ac0f0604c41176d11f63e90c7d
/kie-wb-common-stunner-core/kie-wb-common-stunner-api/kie-wb-common-stunner-client-api/src/main/java/org/kie/workbench/common/stunner/core/client/shape/view/event/TouchHandler.java
b4709cd05a6549e001acc9d11b4302ed7accae94
[]
no_license
tsurdilo/wirez
86aaf88fcf412cfa1b03a9cfa8e81503b52439bc
fd8963cdd0dd6ec916b051dc5759f23bd6fe2074
refs/heads/master
2020-12-29T03:07:36.637532
2016-10-04T01:44:36
2016-10-04T02:29:18
68,604,988
0
0
null
2016-09-19T12:46:45
2016-09-19T12:46:45
null
UTF-8
Java
false
false
456
java
package org.kie.workbench.common.stunner.core.client.shape.view.event; public abstract class TouchHandler extends AbstractViewHandler<TouchEvent> { @Override public ViewEventType getType() { return ViewEventType.TOUCH; } public abstract void start(TouchEvent event); public abstract void move(TouchEvent event); public abstract void end(TouchEvent event); public abstract void cancel(TouchEvent event); }
[ "roger600@gmail.com" ]
roger600@gmail.com
f911c037ef2db47658364fc95af6d3389fdd287f
01a2f4597a9910727beb8e989ec5c6192e24eb15
/vim/java_tags/jdk_src/com/sun/corba/se/spi/activation/RepositoryPackage/ServerDef.java
c30c4d4de5869f80ddb1a9bbd9e0a8b06494a39d
[]
no_license
qq1624646454/vicc_for_linux64
845d223a2b73c0e437cd9dfa33253e674fbc20eb
099ab6cfa6376216ee051a8c053f19ef3644b2f3
refs/heads/master
2021-01-02T00:57:46.681863
2018-01-17T00:55:12
2018-01-17T00:55:12
98,480,694
0
0
null
null
null
null
UTF-8
Java
false
false
1,132
java
package com.sun.corba.se.spi.activation.RepositoryPackage; /** * com/sun/corba/se/spi/activation/RepositoryPackage/ServerDef.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /HUDSON3/workspace/8-2-build-linux-amd64/jdk8u101/7261/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl * Wednesday, June 22, 2016 3:00:37 AM PDT */ public final class ServerDef implements org.omg.CORBA.portable.IDLEntity { public String applicationName = null; // serverName values. public String serverName = null; // Class name of server's main class. public String serverClassPath = null; // class path used to run the server. public String serverArgs = null; public String serverVmArgs = null; public ServerDef () { } // ctor public ServerDef (String _applicationName, String _serverName, String _serverClassPath, String _serverArgs, String _serverVmArgs) { applicationName = _applicationName; serverName = _serverName; serverClassPath = _serverClassPath; serverArgs = _serverArgs; serverVmArgs = _serverVmArgs; } // ctor } // class ServerDef
[ "493164984@qq.com" ]
493164984@qq.com
9fc234212677a9b44fddc8b5cc2cd9bb2fd3d660
8c60f2a5a20c10755b546500ba87fe26eb14d691
/es.uclm.mads.negocio.diagram/src/negocio/diagram/edit/helpers/ValorDirectoEditHelper.java
774b9ffac098244417a3048545900dfbfa6916a3
[]
no_license
tesorieror/negocio
948b3453f3ae3b64cfeec98bc7f40a898e4d0768
9dd1129c497e01b8e2e7f43b254c500f6f24047f
refs/heads/master
2021-01-20T01:57:23.376475
2015-03-19T20:54:25
2015-03-19T20:54:25
32,513,745
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package negocio.diagram.edit.helpers; /** * @generated */ public class ValorDirectoEditHelper extends NegocioBaseEditHelper { }
[ "tesorieror@gmail.com" ]
tesorieror@gmail.com
e130de21c6adf0ec5fc812dadcd36d9a29cdc4a8
c40efb977101232d91e99af0b78778bad3e0950a
/game_server/src/com/hifun/soul/gameserver/skill/effect/MagicRecoverValueEffector.java
5ae831298a6a1e7316fbeddc9616876e0f7f4b8a
[]
no_license
cietwwl/server
2bca79a17be6d5e6fee65e57d0df1fc753fb35e3
d18804f8c182eaa2509666aec10a2212ababc13c
refs/heads/master
2020-06-14T15:12:16.679591
2014-11-19T14:48:04
2014-11-19T14:48:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,745
java
package com.hifun.soul.gameserver.skill.effect; import java.util.List; import com.hifun.soul.gameserver.battle.Battle; import com.hifun.soul.gameserver.battle.IBattleUnit; import com.hifun.soul.gameserver.battle.context.IBattleContext; import com.hifun.soul.gameserver.battle.gem.EnergyType; import com.hifun.soul.gameserver.battle.gem.GemPosition; import com.hifun.soul.gameserver.battle.msg.ChessBoardSnap; import com.hifun.soul.gameserver.skill.EffectResult; import com.hifun.soul.gameserver.skill.ISkill; import com.hifun.soul.gameserver.skill.msg.GCBattleMagicChanged; /** * 法力恢复;<br> * 魔法值恢复一定的值;<br> * params[0] = 能量类型;<br> * params[1] = 增加的值;<br> * * @author crazyjohn * */ public class MagicRecoverValueEffector implements INoneAttackEffector { @Override public EffectResult effect(IBattleUnit attacker, IBattleUnit target, ISkill skill, int[] params, int combo, List<ChessBoardSnap> snaps, GemPosition selectedGem) { // 魔法类型 int type = params[0]; // 增加的魔法值 int value = params[1]; EnergyType enertyType = EnergyType.typeOf(type); if (enertyType == null) { return null; } IBattleContext context = attacker.getBattleContext(); if (context == null) { return null; } Battle battle = context.getBattle(); if (battle == null) { return null; } // 添加能量; attacker.addMagicEnergy(enertyType, value); // 发送魔法变化 GCBattleMagicChanged magicChangeMsg = new GCBattleMagicChanged(); magicChangeMsg.setTargetId(attacker.getUnitGuid()); magicChangeMsg.setTargetMagicChange(attacker.getCurrentMagicSnap()); battle.broadcastToBattleUnits(magicChangeMsg); return EffectResult.createNullEffect(); } }
[ "magicstoneljg@163.com" ]
magicstoneljg@163.com
a16c34ea42b5ceec371345a3e202efed7b8a3866
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2009-05-16/seasar2-2.4.36/s2jdbc-gen/s2jdbc-gen/src/main/java/org/seasar/extension/jdbc/gen/internal/model/ServiceTestModelFactoryImpl.java
864229961374739cb787d26d8d342bf7fc52d614
[ "Apache-2.0" ]
permissive
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
5,479
java
/* * Copyright 2004-2009 the Seasar Foundation and the Others. * * 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.seasar.extension.jdbc.gen.internal.model; import javax.annotation.Generated; import org.junit.Assert; import org.junit.runner.RunWith; import org.seasar.extension.jdbc.EntityMeta; import org.seasar.extension.jdbc.gen.model.ServiceTestModel; import org.seasar.extension.jdbc.gen.model.ServiceTestModelFactory; import org.seasar.extension.unit.S2TestCase; import org.seasar.framework.unit.Seasar2; /** * {@link ServiceTestModelFactory}の実装クラスです。 * * @author taedium */ public class ServiceTestModelFactoryImpl implements ServiceTestModelFactory { /** パッケージ名、デフォルトパッケージの場合は{@code null} */ protected String packageName; /** サービスクラス名のサフィックス */ protected String serviceClassNameSuffix; /** テストクラス名のサフィックス */ protected String testClassNameSuffix; /** 設定ファイルのパス */ protected String configPath; /** S2JUnit4を使用する場合{@code true}、S2Unitを使用する場合{@code false} */ protected boolean useS2junit4; /** クラスモデルのサポート */ protected ClassModelSupport classModelSupport = new ClassModelSupport(); /** 生成モデルのサポート */ protected GeneratedModelSupport generatedModelSupport = new GeneratedModelSupport(); /** * インスタンスを構築します。 * * @param packageName * パッケージ名、デフォルトパッケージの場合は{@code null} * @param serviceClassNameSuffix * サービスクラス名のサフィックス * @param testClassNameSuffix * テストクラス名のサフィックス * @param configPath * 設定ファイルのパス * @param useS2junit4 * S2JUnit4を使用する場合{@code true}、S2Unitを使用する場合{@code false} */ public ServiceTestModelFactoryImpl(String configPath, String packageName, String serviceClassNameSuffix, String testClassNameSuffix, boolean useS2junit4) { if (configPath == null) { throw new NullPointerException("configPath"); } if (serviceClassNameSuffix == null) { throw new NullPointerException("serviceClassNameSuffix"); } if (testClassNameSuffix == null) { throw new NullPointerException("testClassNameSuffix"); } this.configPath = configPath; this.packageName = packageName; this.serviceClassNameSuffix = serviceClassNameSuffix; this.testClassNameSuffix = testClassNameSuffix; this.useS2junit4 = useS2junit4; } public ServiceTestModel getServiceTestModel(EntityMeta entityMeta) { ServiceTestModel serviceTestModel = new ServiceTestModel(); serviceTestModel.setConfigPath(configPath); serviceTestModel.setPackageName(packageName); String shortServiceClassName = entityMeta.getEntityClass() .getSimpleName() + serviceClassNameSuffix; serviceTestModel.setShortServiceClassName(shortServiceClassName); serviceTestModel.setShortClassName(shortServiceClassName + testClassNameSuffix); serviceTestModel.setUseS2junit4(useS2junit4); doImportName(serviceTestModel, entityMeta); doGeneratedInfo(serviceTestModel, entityMeta); return serviceTestModel; } /** * インポート名を処理します。 * * @param serviceTestModel * サービステストモデル * @param entityMeta * エンティティメタデータ */ protected void doImportName(ServiceTestModel serviceTestModel, EntityMeta entityMeta) { classModelSupport.addImportName(serviceTestModel, Generated.class); if (useS2junit4) { classModelSupport.addImportName(serviceTestModel, RunWith.class); classModelSupport.addImportName(serviceTestModel, Seasar2.class); classModelSupport.addStaticImportName(serviceTestModel, Assert.class); } else { classModelSupport.addImportName(serviceTestModel, S2TestCase.class); } } /** * 生成情報を処理します。 * * @param serviceTestModel * サービステストモデル * @param entityMeta * エンティティメタデータ */ protected void doGeneratedInfo(ServiceTestModel serviceTestModel, EntityMeta entityMeta) { generatedModelSupport.fillGeneratedInfo(this, serviceTestModel); } }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
25b6756413a1e44df875a8fc47e3d449fffea1a3
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/100/org/apache/commons/math/geometry/Rotation_getQ0_498.java
de64594e6e6cce0cc6988a07c836f84a3136fe00
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
3,041
java
org apach common math geometri rotat dimension space rotat repres mathemat entiti matric ax angl cardan euler angl quaternion present higher level abstract user orient hide implement detail curiou quaternion intern represent user build rotat represent represent retriev code rotat code instanc constructor getter addit rotat built implicit set vector imag impli convert represent convert rotat matrix set cardan angl followong singl line code pre angl rotat matrix angl getangl rotat order rotationord xyz pre focu orient rotat underli represent built intern represent rotat oper basic transform dimension link vector3 vector3d vector dimension link vector3 vector3d vector depend applic mean vector vari semant rotat spacecraft attitud simul tool user vector fix earth direct rotat transform coordin coordin vector inerti frame coordin vector satellit frame rotat implicit defin relat frame telescop control applic rotat transform sight direct rest desir observ direct telescop point object interest rotat transform directionf rest topocentr frame sight direct topocentr frame approach combin telescop transform observ direct topocentr frame observ direct inerti frame take account observatori locat earth rotat exampl show rotat user push user specif definit provid method code project vector destin frame projectvectorintodestinationfram code code comput transform direct computetransformeddirect code simpler gener method link appli applyto vector3 vector3d appli applyto vector3 vector3d link appli invers applyinverseto vector3 vector3d appli invers applyinverseto vector3 vector3d rotat basic vectori oper rotat compos composit oper code code mean vector code code code code rotat addit vector rotat appli rotat previou notat appli code code code code result code code purpos method link appli applyto rotat appli applyto rotat link appli invers applyinverseto rotat appli invers applyinverseto rotat rotat guarante immut object version revis date vector3 vector3d rotat order rotationord rotat serializ scalar coordin quaternion scalar coordin quaternion getq0
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
b31ec8588aa79f42d68b40c3acb70b250a4f6b87
b286254d4f0c269d6b1bdd5736405abd93df0884
/competition/Competition/src/ProblemA2012.java
2b41829002a7b481444cfca571d456484230c39a
[]
no_license
joandrsn/workspaces
ceb1882a565ccb43467f6bcb2b870fc547a05cae
ffb67ab0ee6799eea8acc844f8a7a1d11ddd7acc
refs/heads/master
2021-05-27T16:16:20.532479
2013-11-22T09:27:56
2013-11-22T09:27:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
import java.util.Scanner; public class ProblemA2012 { public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ String justin = sc.nextLine(); String dentist = sc.nextLine(); if(justin.length() >= dentist.length()){ System.out.println("go"); }else System.out.println("no"); } } }
[ "mmedum@gmail.com" ]
mmedum@gmail.com
5a9d4f6637864821bce12764d181b0a83e28f619
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
/flakiness-predicter/input_data/original_tests/wildfly-wildfly/nonFlakyMethods/org.wildfly.clustering.web.infinispan.session.SimpleSessionMetaDataTestCase-setMaxInactiveInterval.java
30a356160f9f73d507e17adeca14ea27d2c40486
[ "BSD-3-Clause" ]
permissive
Taher-Ghaleb/FlakeFlagger
6fd7c95d2710632fd093346ce787fd70923a1435
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
refs/heads/main
2023-07-14T16:57:24.507743
2021-08-26T14:50:16
2021-08-26T14:50:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
197
java
@Test public void setMaxInactiveInterval(){ Duration duration=Duration.ZERO; this.metaData.setMaxInactiveInterval(duration); verify(this.creationMetaData).setMaxInactiveInterval(duration); }
[ "aalsha2@masonlive.gmu.edu" ]
aalsha2@masonlive.gmu.edu
9d5c2d1ea988f7bc4f990df4422738643932bb87
96670d2b28a3fb75d2f8258f31fc23d370af8a03
/reverse_engineered/sources/com/facebook/stetho/common/android/ViewUtil.java
b8c75118608a0af3dc046d871ed45756b3749571
[]
no_license
P79N6A/speedx
81a25b63e4f98948e7de2e4254390cab5612dcbd
800b6158c7494b03f5c477a8cf2234139889578b
refs/heads/master
2020-05-30T18:43:52.613448
2019-06-02T07:57:10
2019-06-02T08:15:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,541
java
package com.facebook.stetho.common.android; import android.annotation.TargetApi; import android.app.Activity; import android.content.Context; import android.content.ContextWrapper; import android.graphics.PointF; import android.os.Build.VERSION; import android.view.View; import android.view.ViewGroup; import android.view.ViewParent; import com.facebook.stetho.common.Predicate; import com.facebook.stetho.common.Util; public final class ViewUtil { private static class ViewCompat { private static final ViewCompat sInstance; @TargetApi(11) private static class ViewCompatHoneycomb extends ViewCompat { private ViewCompatHoneycomb() { } public float getAlpha(View view) { return view.getAlpha(); } } static { if (VERSION.SDK_INT >= 11) { sInstance = new ViewCompatHoneycomb(); } else { sInstance = new ViewCompat(); } } public static ViewCompat getInstance() { return sInstance; } protected ViewCompat() { } public float getAlpha(View view) { return 1.0f; } } private ViewUtil() { } private static boolean isHittable(View view) { if (view.getVisibility() == 0 && ViewCompat.getInstance().getAlpha(view) >= 0.001f) { return true; } return false; } public static View hitTest(View view, float f, float f2) { return hitTest(view, f, f2, null); } public static View hitTest(View view, float f, float f2, Predicate<View> predicate) { View hitTestImpl = hitTestImpl(view, f, f2, predicate, false); if (hitTestImpl == null) { return hitTestImpl(view, f, f2, predicate, true); } return hitTestImpl; } private static View hitTestImpl(View view, float f, float f2, Predicate<View> predicate, boolean z) { if (!isHittable(view) || !pointInView(view, f, f2)) { return null; } if (predicate != null && !predicate.apply(view)) { return null; } if (!(view instanceof ViewGroup)) { return view; } view = (ViewGroup) view; if (view.getChildCount() > 0) { PointF pointF = new PointF(); for (int childCount = view.getChildCount() - 1; childCount >= 0; childCount--) { View childAt = view.getChildAt(childCount); if (isTransformedPointInView(view, childAt, f, f2, pointF)) { childAt = hitTestImpl(childAt, pointF.x, pointF.y, predicate, z); if (childAt != null) { return childAt; } } } } if (!z) { view = null; } return view; } public static boolean pointInView(View view, float f, float f2) { return f >= 0.0f && f < ((float) (view.getRight() - view.getLeft())) && f2 >= 0.0f && f2 < ((float) (view.getBottom() - view.getTop())); } public static boolean isTransformedPointInView(ViewGroup viewGroup, View view, float f, float f2, PointF pointF) { Util.throwIfNull(viewGroup); Util.throwIfNull(view); float scrollX = (((float) viewGroup.getScrollX()) + f) - ((float) view.getLeft()); float scrollY = (((float) viewGroup.getScrollY()) + f2) - ((float) view.getTop()); boolean pointInView = pointInView(view, scrollX, scrollY); if (pointInView && pointF != null) { pointF.set(scrollX, scrollY); } return pointInView; } public static Activity tryGetActivity(View view) { if (view == null) { return null; } Activity tryGetActivity = tryGetActivity(view.getContext()); if (tryGetActivity != null) { return tryGetActivity; } ViewParent parent = view.getParent(); return parent instanceof View ? tryGetActivity((View) parent) : null; } private static Activity tryGetActivity(Context context) { for (Context context2 = context; context2 != null; context2 = ((ContextWrapper) context2).getBaseContext()) { if (context2 instanceof Activity) { return (Activity) context2; } if (!(context2 instanceof ContextWrapper)) { return null; } } return null; } }
[ "Gith1974" ]
Gith1974
8aa9da20ab6e40ec80a5293cfc690b9173fc51ab
6b1bdabd0ccb6c52d3029df4d614dba4c2a0381d
/JavaStudy/src/Exam/P182_3.java
a6b9939fcc909c72c3ebed174ffe6f79bf2f36f6
[]
no_license
kdw0230/JavaStudy
8209c1c17400b07b007ec39dd71979bf1adb1b4f
9e14a08ef98bb51ba9d09f06c102de0abe009e09
refs/heads/master
2020-04-28T19:41:11.682832
2019-03-29T06:56:48
2019-03-29T06:56:48
175,519,021
0
0
null
null
null
null
UTF-8
Java
false
false
446
java
package Exam; public class P182_3 { public static void main(String[] args) { int[][] array = { { 95, 86 }, { 83, 92, 96 }, { 78, 83, 93, 87, 88 } }; int sum = 0; double avg = 0.0; int count = 0; for(int i = 0 ; i<array.length ; i++) { for(int j = 0 ; j<array[i].length ; j++) { sum = sum+ array[i][j]; count++; } } avg=(double)sum/count; System.out.println(sum); System.out.println(avg); } }
[ "Student@DESKTOP-EF9PEQ2" ]
Student@DESKTOP-EF9PEQ2
dda2e7ff54f73f98cc5940240d5b3c518d1d8cf9
69ec2ce61fdb31b5f084bfbb13e378734c14c686
/org.osgi.test.cases.component/src/org/osgi/test/cases/component/tb6/ActDeactComponent.java
8fb31b12b249a95c824f74e0a0542c9742b635bf
[ "Apache-2.0" ]
permissive
henrykuijpers/osgi
f23750269f2817cb60e797bbafc29183e1bae272
063c29cb12eadaab59df75dfa967978c8052c4da
refs/heads/main
2023-02-02T08:51:39.266433
2020-12-23T12:57:12
2020-12-23T12:57:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,690
java
/* * Copyright (c) 1997-2009 ProSyst Software GmbH. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.osgi.test.cases.component.tb6; import java.util.Dictionary; import java.util.Enumeration; import java.util.Hashtable; import java.util.Iterator; import java.util.Map; import org.osgi.framework.BundleContext; import org.osgi.service.component.ComponentConstants; import org.osgi.service.component.ComponentContext; import org.osgi.test.cases.component.service.ComponentContextExposer; public class ActDeactComponent implements ComponentContextExposer { private Dictionary<String,Object> properties; private ComponentContext ctxt; public static final int ACTIVATE_CC = 1 << 0; public static final int DEACTIVATE_CC = 1 << 1; public static final int ACT = 1 << 2; public static final int DEACT = 1 << 3; public static final int ACT_CC = 1 << 4; public static final int DEACT_CC = 1 << 5; public static final int ACT_BC = 1 << 6; public static final int DEACT_BC = 1 << 7; public static final int ACT_MAP = 1 << 8; public static final int DEACT_MAP = 1 << 9; public static final int ACT_CC_BC_MAP = 1 << 10; public static final int DEACT_CC_BC_MAP = 1 << 11; public static final int DEACT_INT = 1 << 12; public static final int DEACT_CC_BC_MAP_INT = 1 << 13; protected void activate(ComponentContext ctxt) { this.ctxt = ctxt; properties = new Hashtable<>(); Dictionary<String,Object> props = ctxt.getProperties(); Enumeration<String> en = props.keys(); while (en.hasMoreElements()) { String key = en.nextElement(); properties.put(key, props.get(key)); } log(getComponentName() + " activate"); setDataBits(ACTIVATE_CC); } protected void deactivate(ComponentContext ctxt) { log(getComponentName() + " deactivate"); setDataBits(DEACTIVATE_CC); } protected void act() { properties = new Hashtable<>(); properties.put(ComponentConstants.COMPONENT_NAME, getName()); log(getComponentName() + " act"); setDataBits(ACT); } protected void deact() { log(getComponentName() + " deact"); setDataBits(DEACT); } protected void actCc(ComponentContext ctxt) { this.ctxt = ctxt; properties = new Hashtable<>(); Dictionary<String,Object> props = ctxt.getProperties(); Enumeration<String> en = props.keys(); while (en.hasMoreElements()) { String key = en.nextElement(); properties.put(key, props.get(key)); } log(getComponentName() + " actCc"); setDataBits(ACT_CC); } protected void deactCc(ComponentContext ctxt) { log(getComponentName() + " deactCc"); setDataBits(DEACT_CC); } protected void actBc(BundleContext bc) { properties = new Hashtable<>(); properties.put(ComponentConstants.COMPONENT_NAME, getName()); log(getComponentName() + " actBc"); setDataBits(ACT_BC); } protected void deactBc(BundleContext bc) { log(getComponentName() + " deactBc"); setDataBits(DEACT_BC); } protected void actMap(Map<String,Object> props) { properties = new Hashtable<>(); Iterator<String> it = props.keySet().iterator(); while (it.hasNext()) { String key = it.next(); properties.put(key, props.get(key)); } log(getComponentName() + " actMap"); setDataBits(ACT_MAP); } protected void deactMap(Map<String,Object> props) { log(getComponentName() + " deactMap"); setDataBits(DEACT_MAP); } protected void actCcBcMap(ComponentContext ctxt, BundleContext bc, Map<String,Object> map) { this.ctxt = ctxt; properties = new Hashtable<>(); Dictionary<String,Object> props = ctxt.getProperties(); Enumeration<String> en = props.keys(); while (en.hasMoreElements()) { String key = en.nextElement(); properties.put(key, props.get(key)); } log(getComponentName() + " actCcBcMap"); setDataBits(ACT_CC_BC_MAP); } protected void deactCcBcMap(ComponentContext ctxt, BundleContext bc, Map<String,Object> props) { log(getComponentName() + " deactCcBcMap"); setDataBits(DEACT_CC_BC_MAP); } protected void deactInt(int reason) { log(getComponentName() + " deactInt"); setDataBits(DEACT_INT | reason << 16); } protected void deactCcBcMapInt(ComponentContext ctxt, BundleContext bc, Map<String,Object> props, int reason) { log(getComponentName() + " deactCcBcMapInt"); setDataBits(DEACT_CC_BC_MAP_INT | reason << 16); } public Dictionary<String,Object> getProperties() { return properties; } private void setDataBits(int value) { if (properties == null) { return; } Object prop = properties.get("config.base.data"); int data = (prop instanceof Integer) ? ((Integer) prop).intValue() : 0; properties.put("config.base.data", Integer.valueOf(data | value)); } // Successors should override public String getName() { return "name.unknown"; } private String getComponentName() { return properties.get("component.name") + "@" + Integer.toHexString(System.identityHashCode(this)); } public ComponentContext getComponentContext() { return ctxt; } private static void log(String message) { System.out.println(message); } }
[ "hargrave@us.ibm.com" ]
hargrave@us.ibm.com
754ff2c394a583f495b7961c8566f2197953d1df
aedb97ef89a833a168f0592c61117a3e582d22a0
/test/net/ion/nsearcher/rest/formater/FormaterTest.java
0a34eaac4d02c4406e6b70dd029dd11db81e8076
[]
no_license
bleujin/ISearcher
ba78f6c92d0555faeda4cc236b31c616c6e63d62
7f44759dadb4c95176aab2972f949288771013c3
refs/heads/master
2021-01-17T11:39:59.535374
2017-12-29T16:10:22
2017-12-29T16:10:22
4,710,187
0
3
null
null
null
null
UTF-8
Java
false
false
1,598
java
package net.ion.nsearcher.rest.formater; import java.io.IOException; import java.io.OutputStream; import java.sql.ResultSet; import java.sql.SQLException; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.StreamingOutput; import net.ion.framework.db.DBController; import net.ion.framework.db.Rows; import net.ion.framework.rest.XMLHandler; import net.ion.framework.util.Debug; import net.ion.nsearcher.ISTestCase; import net.ion.nsearcher.util.MyWriter; public class FormaterTest extends ISTestCase{ public void testXMLFormater() throws Exception { TestRowsFormater xf = new TestRowsFormater(new WrapperXMLHander(new String[] { "pct_free", "pct_used" }, new String[] { "pct_free", "pct_used" }, "table_name")) ; DBController dc = createTestDBController() ; Rows rows = dc.createUserCommand("select * from user_tables").execQuery() ; StreamingOutput r = xf.outputStreaming(rows) ; Debug.debug(r) ; dc.destroySelf() ; } } class TestRowsFormater implements IRowsFormater { private XMLHandler handler ; public TestRowsFormater(XMLHandler handler) { this.handler = handler ; } public StreamingOutput outputStreaming(final ResultSet rows) throws SQLException{ return new StreamingOutput() { @Override public void write(OutputStream output) throws IOException, WebApplicationException { try { MyWriter writer = new MyWriter(output) ; writer.append(SearchXMLFormater.XML_HEADER) ; writer.write(handler.toXML(rows).toString()) ; } catch (SQLException e) { throw new IOException(e) ; } } }; } }
[ "bleujin@gmail.com" ]
bleujin@gmail.com
4b888d959d6c3a2a19f6822294f3f2ad954f24b5
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1183/src/main/java/module1183packageJava0/Foo11.java
ead79685f0113350cb78e575251dbe5cb189c355
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
374
java
package module1183packageJava0; import java.lang.Integer; public class Foo11 { Integer int0; public void foo0() { new module1183packageJava0.Foo10().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
4a833e7fdad9cb7283882e678d821f654a5cc420
410c4362a7d3cc3ca3c7eef852602a95665623f4
/src/com/wemall/foundation/service/impl/SysConfigService.java
5c284af06fa5dcf382e0f12d3c6bf7b6dd02564d
[]
no_license
King-Pan/Druglots
a83f2d774f04e7376ffeb649c50377c8bc2050ae
db7a0a9c83dc93a55de7641a6647b910d6bbd658
refs/heads/master
2020-06-29T01:07:13.291713
2019-08-03T16:08:14
2019-08-03T16:08:14
200,394,080
0
0
null
null
null
null
UTF-8
Java
false
false
5,599
java
package com.wemall.foundation.service.impl; import com.wemall.core.dao.IGenericDAO; import com.wemall.foundation.domain.Accessory; import com.wemall.foundation.domain.SysConfig; import com.wemall.foundation.service.ISysConfigService; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service @Transactional public class SysConfigService implements ISysConfigService { @Resource(name = "sysConfigDAO") private IGenericDAO<SysConfig> sysConfigDAO; public boolean delete(SysConfig shopConfig){ return false; } public SysConfig getSysConfig(){ List configs = this.sysConfigDAO.query( "select obj from SysConfig obj", null, -1, -1); if ((configs != null) && (configs.size() > 0)){ SysConfig sc = (SysConfig)configs.get(0); if (sc.getUploadFilePath() == null){ sc.setUploadFilePath("upload"); } if (sc.getSysLanguage() == null){ sc.setSysLanguage("zh_cn"); } if ((sc.getWebsiteName() == null) || (sc.getWebsiteName().equals(""))){ sc.setWebsiteName("Druglots"); } if ((sc.getCloseReason() == null) || (sc.getCloseReason().equals(""))){ sc.setCloseReason("系统维护中..."); } if ((sc.getTitle() == null) || (sc.getTitle().equals(""))){ sc.setTitle("Druglots多用户商城系统V2.0版"); } if ((sc.getImageSaveType() == null) || (sc.getImageSaveType().equals(""))){ sc.setImageSaveType("sidImg"); } if (sc.getImageFilesize() == 0){ sc.setImageFilesize(1024); } if (sc.getSmallWidth() == 0){ sc.setSmallWidth(160); } if (sc.getSmallHeight() == 0){ sc.setSmallHeight(160); } if (sc.getMiddleWidth() == 0){ sc.setMiddleWidth(300); } if (sc.getMiddleHeight() == 0){ sc.setMiddleHeight(300); } if (sc.getBigHeight() == 0){ sc.setBigHeight(1024); } if (sc.getBigWidth() == 0){ sc.setBigWidth(1024); } if ((sc.getImageSuffix() == null) || (sc.getImageSuffix().equals(""))){ sc.setImageSuffix("gif|jpg|jpeg|bmp|png|tbi"); } if (sc.getStoreImage() == null){ Accessory storeImage = new Accessory(); storeImage.setPath("resources/style/common/images"); storeImage.setName("store.jpg"); sc.setStoreImage(storeImage); } if (sc.getGoodsImage() == null){ Accessory goodsImage = new Accessory(); goodsImage.setPath("resources/style/common/images"); goodsImage.setName("good.jpg"); sc.setGoodsImage(goodsImage); } if (sc.getMemberIcon() == null){ Accessory memberIcon = new Accessory(); memberIcon.setPath("resources/style/common/images"); memberIcon.setName("member.jpg"); sc.setMemberIcon(memberIcon); } if ((sc.getSecurityCodeType() == null) || (sc.getSecurityCodeType().equals(""))){ sc.setSecurityCodeType("normal"); } if ((sc.getWebsiteCss() == null) || (sc.getWebsiteCss().equals(""))){ sc.setWebsiteCss("default"); } return sc; } SysConfig sc = new SysConfig(); sc.setUploadFilePath("upload"); sc.setWebsiteName("Druglots"); sc.setSysLanguage("zh_cn"); sc.setTitle("Druglots多用户商城系统V2.0版"); sc.setSecurityCodeType("normal"); sc.setEmailEnable(true); sc.setCloseReason("系统维护中..."); sc.setImageSaveType("sidImg"); sc.setImageFilesize(1024); sc.setSmallWidth(160); sc.setSmallHeight(160); sc.setMiddleHeight(300); sc.setMiddleWidth(300); sc.setBigHeight(1024); sc.setBigWidth(1024); sc.setImageSuffix("gif|jpg|jpeg|bmp|png|tbi"); sc.setComplaint_time(30); sc.setWebsiteCss("default"); Accessory goodsImage = new Accessory(); goodsImage.setPath("resources/style/common/images"); goodsImage.setName("good.jpg"); sc.setGoodsImage(goodsImage); Accessory storeImage = new Accessory(); storeImage.setPath("resources/style/common/images"); storeImage.setName("store.jpg"); sc.setStoreImage(storeImage); Accessory memberIcon = new Accessory(); memberIcon.setPath("resources/style/common/images"); memberIcon.setName("member.jpg"); sc.setMemberIcon(memberIcon); return sc; } public boolean save(SysConfig shopConfig){ try { this.sysConfigDAO.save(shopConfig); return true; } catch (Exception e){ e.printStackTrace(); } return false; } public boolean update(SysConfig shopConfig){ try { this.sysConfigDAO.update(shopConfig); return true; } catch (Exception e){ e.printStackTrace(); } return false; } }
[ "pwpw1218@gmail.com" ]
pwpw1218@gmail.com
90116a8c41875cade9e9461086044fce516dbd69
2b6a13d0ac570c82b6618099e0e9f8eca55daf24
/cooper-service/src/main/java/jdepend/service/remote/start/RemoteServiceStart.java
40036c280746b5eb578f206bb7dd1908b240d438
[ "Apache-2.0" ]
permissive
Grandlook/cooper
a18a5cf6ec1d195b7b0accf599e51781a31f5683
30ba9eec2e180c7ea28a55c7f16dea9d43495f6b
refs/heads/master
2020-12-11T02:02:12.339061
2014-05-18T12:49:26
2014-05-18T12:49:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,591
java
package jdepend.service.remote.start; import java.io.IOException; import java.rmi.Naming; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.rmi.server.UnicastRemoteObject; import jdepend.framework.config.PropertyConfigurator; import jdepend.framework.context.JDependContext; import jdepend.framework.exception.JDependException; import jdepend.framework.log.BusiLogUtil; import jdepend.framework.log.LogUtil; import jdepend.framework.persistent.ConnectionFactory; import jdepend.framework.util.JDependUtil; import jdepend.framework.util.VersionUtil; import jdepend.service.ServiceFactory; import jdepend.service.persistent.ServerConnectionProvider; import jdepend.service.remote.JDependRemoteService; import jdepend.service.remote.JDependSessionService; import jdepend.service.remote.analyzer.AnalyzerService; import jdepend.service.remote.score.ScoreRemoteService; import jdepend.service.remote.user.UserRemoteService; /** * 后台启动远程服务 * * @author wangdg * */ public final class RemoteServiceStart { private Registry registry; private JDependRemoteService service; /** * @param args * @throws JDependException */ public static void main(String[] args) throws JDependException { initEnv(args); RemoteServiceStart start = new RemoteServiceStart(); System.out.println("启动服务[版本:" + VersionUtil.getVersion() + " 构建时间:" + VersionUtil.getBuildDate() + "]。。。"); start.startService(); System.out.println("启动服务完成,按[q]或[Q]退出服务。。。"); int i; try { while (true) { i = System.in.read(); if ((char) i == 'q' || (char) i == 'Q') break; if (i == 13 || i == 10) continue; } System.out.println("停止服务。。。"); start.stopService(); System.exit(0); } catch (IOException e) { e.printStackTrace(); } } public static void initEnv(String[] args) { // 设置运行环境 JDependContext.setRunEnv(JDependContext.Server); // 设置workspacePath String workspacePath = JDependUtil.getArg(args, "-workspacePath"); if (workspacePath != null) { JDependContext.setWorkspacePath(args[2]); } else { JDependContext.setWorkspacePath(System.getProperty("user.dir")); } // 设置RunningPath JDependContext.setRunningPath(System.getProperty("user.dir")); // 设置ConnectionProvider ConnectionFactory.setProvider(new ServerConnectionProvider()); // 设置日志是否打印 PropertyConfigurator conf = new PropertyConfigurator(); BusiLogUtil.BUSINESSLOG = conf.isPrintBusiLog(); LogUtil.SYSTEMLOG = conf.isPrintSystemLog(); LogUtil.SYSTEMWARNING = conf.isPrintSystemWarning(); ServiceFactory.initClassList(); } public synchronized void startService() throws JDependException { try { // 创建远程服务端口 this.registry = LocateRegistry.createRegistry(1099); // 绑定Session服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("绑定Session服务"); JDependSessionService sessionService = ServiceFactory.createJDependSessionService(); Naming.rebind("rmi://localhost:1099/JDependSessionService", sessionService); // 绑定解析服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("绑定解析服务"); this.service = ServiceFactory.createJDependRemoteService(); Naming.rebind("rmi://localhost:1099/JDependRemoteService", service); // 分析器远程服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("分析器远程服务"); AnalyzerService analyzerService = ServiceFactory.createAnalyzerService(); Naming.rebind("rmi://localhost:1099/AnalyzerService", analyzerService); // 用户远程服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("用户远程服务"); UserRemoteService userRemoteService = ServiceFactory.createUserRemoteService(); Naming.rebind("rmi://localhost:1099/UserRemoteService", userRemoteService); // 分数远程服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("分数远程服务"); ScoreRemoteService scoreRemoteService = ServiceFactory.createScoreRemoteService(); Naming.rebind("rmi://localhost:1099/ScoreRemoteService", scoreRemoteService); } catch (Exception e) { throw new JDependException("启动远程服务错误!", e); } } public synchronized void stopService() throws JDependException { try { // 解除解析服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("解除解析服务"); Naming.unbind("rmi://localhost:1099/JDependRemoteService"); // 解除Session服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("解除Session服务"); Naming.unbind("rmi://localhost:1099/JDependSessionService"); // 解除分析器远程服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("解除分析器远程服务"); Naming.unbind("rmi://localhost:1099/AnalyzerService"); // 解除用户远程服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("解除用户远程服务"); Naming.unbind("rmi://localhost:1099/UserRemoteService"); // 解除分数远程服务 LogUtil.getInstance(RemoteServiceStart.class).systemLog("解除分数远程服务"); Naming.unbind("rmi://localhost:1099/ScoreRemoteService"); // 停止服务 UnicastRemoteObject.unexportObject(registry, true); } catch (Exception e) { throw new JDependException("解除解析服务绑定错误!", e); } } }
[ "wangdg@neusoft.com" ]
wangdg@neusoft.com
2e5e4c0520fb4cb9f680279e95592257342d6b21
e170a5a95004000696ef98f034f6bb14915cc1e9
/src/main/java/com/skysoft/sseries/uaa/application/web/rest/util/HeaderUtil.java
504f130b63bf4e35d1ea69e17252c08a91743105
[]
no_license
skysoftstudio/sseries-hcm
507bf64657b26947c11c94aeb8bd37034ad39dc2
7260aea037502c6832f6c47e3d8da907bc4a8da6
refs/heads/master
2020-04-02T11:01:00.608348
2018-10-23T17:07:09
2018-10-23T17:07:09
154,358,632
0
0
null
null
null
null
UTF-8
Java
false
false
1,671
java
package com.skysoft.sseries.uaa.application.web.rest.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpHeaders; /** * Utility class for HTTP headers creation. */ public final class HeaderUtil { private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class); private static final String APPLICATION_NAME = "sseriesHcmApp"; private HeaderUtil() { } public static HttpHeaders createAlert(String message, String param) { HttpHeaders headers = new HttpHeaders(); headers.add("X-" + APPLICATION_NAME + "-alert", message); headers.add("X-" + APPLICATION_NAME + "-params", param); return headers; } public static HttpHeaders createEntityCreationAlert(String entityName, String param) { return createAlert(APPLICATION_NAME + "." + entityName + ".created", param); } public static HttpHeaders createEntityUpdateAlert(String entityName, String param) { return createAlert(APPLICATION_NAME + "." + entityName + ".updated", param); } public static HttpHeaders createEntityDeletionAlert(String entityName, String param) { return createAlert(APPLICATION_NAME + "." + entityName + ".deleted", param); } public static HttpHeaders createFailureAlert(String entityName, String errorKey, String defaultMessage) { log.error("Entity processing failed, {}", defaultMessage); HttpHeaders headers = new HttpHeaders(); headers.add("X-" + APPLICATION_NAME + "-error", "error." + errorKey); headers.add("X-" + APPLICATION_NAME + "-params", entityName); return headers; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
172686a5c3afeaf2fa5d6a7c099810738963832b
14592d21bb11525b219a7cf528fa4264114fa2f2
/thinking_in_java/src/main/java/strings/Groups.java
10cb44731b3a5e58444039ff37fbab0f7e3ca3f1
[]
no_license
MABIY/learn_java
cf09648e3d666dfbe5eaa4187de50cbb3e70a790
617dd5ba68748f1adfec5146b52a3723ee42dac7
refs/heads/master
2021-10-07T15:54:06.827242
2021-09-22T07:16:47
2021-09-22T07:16:47
121,255,181
0
0
null
null
null
null
UTF-8
Java
false
false
1,026
java
package strings; import java.util.regex.Matcher; import java.util.regex.Pattern; import static net.lh.util.Print.print; import static net.lh.util.Print.printnb; /** * @author lh **/ public class Groups { static public final String POEM = "Twas brillig, and the slithy toves\n" + "Did gyre and gimble in the wabe.\n" + "All mimsy were the borogoves,\n" + "And the mome raths outgrabe.\n\n" + "Beware the Jabberwock, my son,\n" + "The jaws that bite, the claws that catch.\n" + "Beware the Jubjub bird, and shun\n" + "The frumious Bandersnatch."; public static void main(String[] args) { Matcher m = Pattern.compile("(?m)(\\S+)\\s+((\\S+)\\s+(\\S+))$").matcher(POEM); while (m.find()) { for (int i = 0; i <= m.groupCount(); i++) { printnb("[" + m.group(i) + "]"); } print(); } } }
[ "jyfc7879@gmail.com" ]
jyfc7879@gmail.com
482cc1b8f763ee27efbd52b190df7bd6c958461e
76d10cdcf53c58cfa0b3537fcd625dcca087f107
/src/main/java/net/canarymod/api/entity/EnderEye.java
c9c6d27fa49e5058d1da61d1d8b886d22d811151
[]
no_license
BluXDragon/CanaryLib
95ae2cd047b706c13fcbb54ff03e816b6cb2bbff
aed72cc76d7e703cb1beefc973d2b4d98c4b5d64
refs/heads/master
2021-01-18T10:25:45.981339
2013-06-26T03:12:48
2013-06-26T03:12:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
144
java
package net.canarymod.api.entity; /** * Ender Eye wrapper * * @author Jason (darkdiplomat) */ public interface EnderEye extends Entity {}
[ "darkdiplomat@visualillusionsent.net" ]
darkdiplomat@visualillusionsent.net
b45a1b3eb7c1d8c9132d05adfd359359b09c4083
54e0c671571f4d9de5dda44e3cc5337a9a638f3a
/src/main/java/crazypants/enderio/machine/farm/FarmersComune.java
d8daa92aeab5983430c3d93620496301b66ac2c4
[ "Unlicense", "WTFPL" ]
permissive
Myrninvollo/EnderIO
b31f41dd123b9422c0c43618565ef25ce3de1ec9
7647c57825a60d0223d19a76e639b9470304cdec
refs/heads/master
2021-01-18T00:26:09.065447
2014-06-25T08:45:42
2014-06-25T08:45:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,703
java
package crazypants.enderio.machine.farm; import java.util.ArrayList; import java.util.List; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; import crazypants.util.BlockCoord; public class FarmersComune implements IFarmerJoe { public static FarmersComune instance = new FarmersComune(); public static void joinComune(IFarmerJoe joe) { instance.farmers.add(joe); } public static void leaveComune(IFarmerJoe joe) { throw new UnsupportedOperationException("As if this would be implemented. The comune is for life!"); } private List<IFarmerJoe> farmers = new ArrayList<IFarmerJoe>(); @Override public boolean canHarvest(TileFarmStation farm, BlockCoord bc, Block block, int meta) { for (IFarmerJoe joe : farmers) { if(joe.canHarvest(farm, bc, block, meta)) { return true; } } return false; } @Override public IHarvestResult harvestBlock(TileFarmStation farm, BlockCoord bc, Block block, int meta) { // if(!block.canHarvestBlock(farm.getFakePlayer(), meta)) { // return null; // } for (IFarmerJoe joe : farmers) { if(joe.canHarvest(farm, bc, block, meta)) { return joe.harvestBlock(farm, bc, block, meta); } } return null; } @Override public boolean prepareBlock(TileFarmStation farm, BlockCoord bc, Block block, int meta) { for (IFarmerJoe joe : farmers) { if(joe.prepareBlock(farm, bc, block, meta)) { return true; } } return false; } @Override public boolean canPlant(ItemStack stack) { for (IFarmerJoe joe : farmers) { if(joe.canPlant(stack)) { return true; } } return false; } }
[ "crazypants.mc@gmail.com" ]
crazypants.mc@gmail.com
963814be8c284ff2356edfdd582db9db065593ba
e977c424543422f49a25695665eb85bfc0700784
/benchmark/icse15/1364415/buggy-version/lucene/dev/branches/branch_4x/solr/core/src/java/org/apache/solr/update/VersionInfo.java
b9aaae4f484a64426a4878ad801a2cbf4fe4b9c4
[]
no_license
amir9979/pattern-detector-experiment
17fcb8934cef379fb96002450d11fac62e002dd3
db67691e536e1550245e76d7d1c8dced181df496
refs/heads/master
2022-02-18T10:24:32.235975
2019-09-13T15:42:55
2019-09-13T15:42:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,868
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.solr.update; import java.io.IOException; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import org.apache.lucene.queries.function.FunctionValues; import org.apache.lucene.queries.function.ValueSource; import org.apache.lucene.util.BitUtil; import org.apache.lucene.util.BytesRef; import org.apache.solr.common.SolrException; import org.apache.solr.core.SolrCore; import org.apache.solr.schema.SchemaField; import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.util.RefCounted; public class VersionInfo { public static final String VERSION_FIELD="_version_"; private SolrCore core; private UpdateHandler updateHandler; private final VersionBucket[] buckets; private SchemaField versionField; private SchemaField idField; final ReadWriteLock lock = new ReentrantReadWriteLock(true); public VersionInfo(UpdateHandler updateHandler, int nBuckets) { this.updateHandler = updateHandler; this.core = updateHandler.core; versionField = core.getSchema().getFieldOrNull(VERSION_FIELD); idField = core.getSchema().getUniqueKeyField(); buckets = new VersionBucket[ BitUtil.nextHighestPowerOfTwo(nBuckets) ]; for (int i=0; i<buckets.length; i++) { buckets[i] = new VersionBucket(); } } public SchemaField getVersionField() { return versionField; } public void lockForUpdate() { lock.readLock().lock(); } public void unlockForUpdate() { lock.readLock().unlock(); } public void blockUpdates() { lock.writeLock().lock(); } public void unblockUpdates() { lock.writeLock().unlock(); } /*** // todo: initialize... use current time to start? // a clock that increments by 1 for every operation makes it easier to detect missing // messages, but raises other issues: // - need to initialize to largest thing in index or tlog // - when becoming leader, need to make sure it's greater than // - using to detect missing messages means we need to keep track per-leader, or make // sure a new leader starts off with 1 greater than the last leader. private final AtomicLong clock = new AtomicLong(); public long getNewClock() { return clock.incrementAndGet(); } // Named *old* to prevent accidental calling getClock and expecting a new updated clock. public long getOldClock() { return clock.get(); } ***/ /** We are currently using this time-based clock to avoid going back in time on a * server restart (i.e. we don't want version numbers to start at 1 again). */ // Time-based lamport clock. Good for introducing some reality into clocks (to the degree // that times are somewhat synchronized in the cluster). // Good if we want to relax some constraints to scale down to where only one node may be // up at a time. Possibly harder to detect missing messages (because versions are not contiguous. long vclock; long time; private final Object clockSync = new Object(); public long getNewClock() { synchronized (clockSync) { time = System.currentTimeMillis(); long result = time << 20; if (result <= vclock) { result = vclock + 1; } vclock = result; return vclock; } } public long getOldClock() { synchronized (clockSync) { return vclock; } } public void updateClock(long clock) { synchronized (clockSync) { vclock = Math.max(vclock, clock); } } public VersionBucket bucket(int hash) { // If this is a user provided hash, it may be poor in the right-hand bits. // Make sure high bits are moved down, since only the low bits will matter. // int h = hash + (hash >>> 8) + (hash >>> 16) + (hash >>> 24); // Assume good hash codes for now. int slot = hash & (buckets.length-1); return buckets[slot]; } public Long lookupVersion(BytesRef idBytes) { return updateHandler.ulog.lookupVersion(idBytes); } public Long getVersionFromIndex(BytesRef idBytes) { // TODO: we could cache much of this and invalidate during a commit. // TODO: most DocValues classes are threadsafe - expose which. RefCounted<SolrIndexSearcher> newestSearcher = core.getRealtimeSearcher(); try { SolrIndexSearcher searcher = newestSearcher.get(); long lookup = searcher.lookupId(idBytes); if (lookup < 0) return null; ValueSource vs = versionField.getType().getValueSource(versionField, null); Map context = ValueSource.newContext(searcher); vs.createWeight(context, searcher); FunctionValues fv = vs.getValues(context, searcher.getTopReaderContext().leaves().get((int)(lookup>>32))); long ver = fv.longVal((int)lookup); return ver; } catch (IOException e) { throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Error reading version from index", e); } finally { if (newestSearcher != null) { newestSearcher.decref(); } } } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
33d8d354d2aadd6941a1ab48012ef2ac5e2b25d8
ae69e30f8eb4ff2cd47e2336b2a2b31f271a3e5a
/Java/leetcode/weekly_contests/weekly_167/P_1292.java
da47cb54043226f30d1de8dfdb7eb7364baec8ed
[]
no_license
bdugersuren/CompetitiveProgramming
f35048ef8e5345c5219c992f2be8b84e1f7f1cb8
cd571222aabe3de952d90d6ddda055aa3b8c08d9
refs/heads/master
2023-05-12T00:45:15.065209
2021-05-14T13:24:53
2021-05-14T13:24:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,614
java
package leetcode.weekly_contests.weekly_167; public final class P_1292 { public static int maxSideLength(int[][] mat, int threshold) { if (mat.length == 0 || mat[0].length == 0) { return 0; } final int k = Math.min(mat.length, mat[0].length); int res = 0; for (int i = 0; i <= k; i++) { final int minSum = getMinSum(mat, i, threshold); if (minSum != Integer.MAX_VALUE) { res = i; } else { break; } } return res; } private static int getMinSum(int[][] mat, int k, int threshold) { final int n = mat.length; final int m = mat[0].length; int res = Integer.MAX_VALUE; if (k > n) { return res; } for (int i = 0; i < n - k + 1; i++) { for (int j = 0; j < m - k + 1; j++) { int sum = 0; for (int p = i; p < k + i; p++) { for (int q = j; q < k + j; q++) { sum += mat[p][q]; } } if (sum <= threshold) { res = Math.min(res, sum); } } } return res; } public static int maxSideLength2(int[][] mat, int threshold) { final int n = mat.length; final int m = mat[0].length; // Find prefix sum final int[][] prefixSum = new int[n + 1][m + 1]; for (int i = 1; i <= n; i++) { int sum = 0; for (int j = 1; j <= m; j++) { sum += mat[i - 1][j - 1]; prefixSum[i][j] = prefixSum[i - 1][j] + sum; } } // Start from largest side length for (int k = Math.min(n, m); k > 0; k--) { for (int i = 1; i + k <= n; i++) { for (int j = 1; j + k <= m; j++) { if (prefixSum[i + k][j + k] - prefixSum[i - 1][j + k] - prefixSum[i + k][j - 1] + prefixSum[i - 1][j - 1] <= threshold) { return k + 1; } } } } return 0; } public static void main(String[] args) { final int[][] matrix = { { 1, 1, 3, 2, 4, 3, 2 }, { 1, 1, 3, 2, 4, 3, 2 }, { 1, 1, 3, 2, 4, 3, 2 } }; System.out.println(maxSideLength(matrix, 4)); System.out.println(maxSideLength2(matrix, 4)); } private P_1292() {} }
[ "nirvana_rsc@yahoo.com" ]
nirvana_rsc@yahoo.com
999181e61e59b1013e7c0b389b65c3cc495803d6
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/88_jopenchart-de.progra.charting.model.DefaultChartDataModelConstraints-1.0-7/de/progra/charting/model/DefaultChartDataModelConstraints_ESTest.java
7c83921a1545c24abbce8764177a5325cad25230
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
694
java
/* * This file was automatically generated by EvoSuite * Fri Oct 25 22:52:28 GMT 2019 */ package de.progra.charting.model; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class DefaultChartDataModelConstraints_ESTest extends DefaultChartDataModelConstraints_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
0b598d37c7411cdb3d314fc504d07a7e7e6f730e
8b0ef6238edf1760358819eaa3cad3278bd2831f
/src/main/java/com/liujun/datastruct/base/sort/algorithm/implement/myself/QuickSortRandomPoint.java
1827140c24dc647ec9a2d1f78382545bcb7fc1d0
[]
no_license
kkzfl22/datastruct
3948c0e7b9a6d5d3f87b91f5682734af46dea61b
ed58a920d28a6c9e009a3545526469376775c4fc
refs/heads/master
2022-12-09T23:46:27.168301
2022-12-06T06:20:32
2022-12-06T06:20:32
152,508,771
112
64
null
2022-05-20T22:02:00
2018-10-11T00:48:28
Java
UTF-8
Java
false
false
2,273
java
package com.liujun.datastruct.base.sort.algorithm.implement.myself; import com.liujun.datastruct.base.sort.algorithm.SortInf; import java.util.concurrent.ThreadLocalRandom; /** * 快速排序的代码实现 * * <p>使用随机分区点的方法 * * @author liujun * @version 0.0.1 * @date 2019/10/28 */ public class QuickSortRandomPoint<T> implements SortInf<T> { @Override public void sort(T[] data) { if (data == null || data.length <= 1) { return; } if (!(data[0] instanceof Comparable)) { throw new IllegalArgumentException("data not implement compator interface"); } // 调用快速排序 this.quickSort(data, 0, data.length - 1); } private void quickSort(T[] data, int s, int t) { // 当前需操作元素仅一个,则退出 if (t - s < 1) { return; } int point = this.partition(data, s, t); quickSort(data, s, point - 1); quickSort(data, point + 1, t); } /** * 分区函数,在快速排序中使用的是原地分区,实现非常的巧妙 * * <p>函数需要返回分区点 * * @param data 原始数据 * @param s 开始位置 * @param t 结束位置 * @return 分区点的位置 */ private int partition(T[] data, int s, int t) { // 1,采用随机的方法采用分区点,进行分区 int countPoint = ThreadLocalRandom.current().nextInt(s, t); // 求得中位数后将,最后一个位置与中位数互换即可 swap(data, countPoint, t); // 当前的分区点 int midPoint = t; int i = s; for (int j = s; j <= t; j++) { // i < j ? -1 // 如果数据小于分区点,执行互换操作 if (((Comparable) data[j]).compareTo(data[midPoint]) < 0) { // 交换数据 swap(data, i, j); // i向后移动一位,指向分区点 i += 1; } } // 当结束后,将分区点的位置与i互换,即可完成 swap(data, i, midPoint); return i; } /** * 进行数据交换操作 * * @param data 原始数据 * @param src 原始位置 * @param target 目标位置 */ private void swap(T[] data, int src, int target) { T dataTmp = data[src]; data[src] = data[target]; data[target] = dataTmp; } }
[ "422134235@qq.com" ]
422134235@qq.com
ae31cba14342c8a6acc8efee8c779d678911dcb3
546ecd59d4e919d8c69a194b2199728ea8af1fce
/gameserver/src/com/aionemu/gameserver/dataholders/RecipeData.java
2f84a4f0455aa40e9ee316f2571e08aa4df7529f
[]
no_license
pandim/aion_unique
f56faa52b08d69ca1bc2f9721c77dc111dca2293
6b357703e331611e668229471e8409c4e4f7294f
refs/heads/master
2021-02-04T20:07:02.003416
2014-05-08T05:24:10
2014-05-08T05:24:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,424
java
/* * This file is part of aion-unique <aion-unique.org>. * * aion-unique 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. * * aion-unique 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 aion-unique. If not, see <http://www.gnu.org/licenses/>. */ package com.aionemu.gameserver.dataholders; import gnu.trove.TIntObjectHashMap; import java.util.ArrayList; import java.util.List; import javax.xml.bind.Unmarshaller; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import com.aionemu.gameserver.model.Race; import com.aionemu.gameserver.model.templates.recipe.RecipeTemplate; import com.aionemu.gameserver.skillengine.model.learn.SkillRace; /** * @author ATracer, MrPoke * */ @XmlRootElement(name = "recipe_templates") @XmlAccessorType(XmlAccessType.FIELD) public class RecipeData { @XmlElement(name = "recipe_template") protected List<RecipeTemplate> list; /** A map containing all goodslist templates */ private TIntObjectHashMap<RecipeTemplate> recipeData; private final TIntObjectHashMap<ArrayList<RecipeTemplate>> learnTemplates = new TIntObjectHashMap<ArrayList<RecipeTemplate>>(); void afterUnmarshal(Unmarshaller u, Object parent) { recipeData = new TIntObjectHashMap<RecipeTemplate>(); for(RecipeTemplate it : list) { recipeData.put(it.getId(), it); if (it.getAutolearn() == 0) continue; addTemplate(it); } list = null; } public RecipeTemplate getRecipeTemplateById(int id) { return recipeData.get(id); } private void addTemplate(RecipeTemplate template) { SkillRace race = template.getRace(); if(race == null) race = SkillRace.ALL; int hash = makeHash(race.ordinal(), template.getSkillid(), template.getSkillpoint()); ArrayList<RecipeTemplate> value = learnTemplates.get(hash); if(value == null) { value = new ArrayList<RecipeTemplate>(); learnTemplates.put(hash, value); } value.add(template); } public RecipeTemplate[] getRecipeIdFor(Race race, int skillId, int skillPoint) { List<RecipeTemplate> newRecipes = new ArrayList<RecipeTemplate>(); List<RecipeTemplate> raceSpecificTemplates = learnTemplates.get(makeHash(race.ordinal(), skillId, skillPoint)); List<RecipeTemplate> allRaceSpecificTemplates = learnTemplates.get(makeHash(SkillRace.ALL.ordinal(), skillId, skillPoint)); if (raceSpecificTemplates != null) newRecipes.addAll(raceSpecificTemplates); if (allRaceSpecificTemplates != null) newRecipes.addAll(allRaceSpecificTemplates); return newRecipes.toArray(new RecipeTemplate[newRecipes.size()]); } /** * @return recipeData.size() */ public int size() { return recipeData.size(); } private static int makeHash(int race, int skillId, int skillLevel) { int result = race << 8; result = (result | skillId) << 8; return result | skillLevel; } }
[ "jingxin191314@foxmail.com" ]
jingxin191314@foxmail.com
a8863e2d6853dc176651d19785306e34a9423e8c
890e08b2874e5accdcb3af28c0301167fa058896
/src/day9/AlertsTest.java
d82f54daa631362fc7d192061641c794d44e7a83
[]
no_license
PreethiSelenium123/VasudevaSelenium
06ffe6286f80bde6ce9ec6d7dbc23470187ed4bf
3f4b18d404b69090dba1e9445fe18d2414e1e7ef
refs/heads/master
2021-01-11T13:56:55.124540
2017-06-20T15:27:52
2017-06-20T15:27:52
94,907,092
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
package day9; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.firefox.FirefoxDriver; public class AlertsTest { public static void main(String[] args) { FirefoxDriver driver=new FirefoxDriver(); driver.get("http://ksrtc.in"); driver.manage().window().maximize(); driver.findElement(By.id("fromPlaceName")).sendKeys("HYDERABAD"); driver.findElement(By.id("searchBtn")).click(); Alert alt=driver.switchTo().alert(); System.out.println(alt.getText()); alt.accept(); //alt.dismiss(); } }
[ "vasu.584@gmail.com" ]
vasu.584@gmail.com
ca2239fc93946c2e18f4c49966ab520305dd5dc5
e5abd0951ba29057719e044b26571804eceb338e
/ExamPreparations/JavaOOPBasicFebruary2017/PawInc/src/app/AnimalCenterManager.java
af87a460cf722570a9c5fec89e4aae1f62709fa7
[]
no_license
tahirmuhammadcs/java-oop-basics
2d30a4fbf0f5e10792580a4fb090943c372e5daf
a72400afd466764b1335de3947b63e56a0c2cb92
refs/heads/master
2020-03-31T07:24:12.367245
2017-04-25T21:23:49
2017-04-25T21:23:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,281
java
package app; import app.animals.Animal; import app.animals.Cat; import app.animals.Dog; import app.centers.AdoptionCenter; import app.centers.CastrationCenter; import app.centers.CleansingCenter; import java.text.Collator; import java.util.*; import java.util.stream.Collectors; public class AnimalCenterManager { private Map<String, AdoptionCenter> adoptionCenters; private Map<String, CleansingCenter> cleansingCenters; private Map<String, CastrationCenter> castrationCenters; private Set<Animal> adoptedAnimals; private Set<Animal> cleanedAnimals; private List<Animal> castratedAnimals; public AnimalCenterManager() { this.adoptionCenters = new HashMap<>(); this.cleansingCenters = new HashMap<>(); this.castrationCenters = new HashMap<>(); this.adoptedAnimals = new TreeSet<>(); this.cleanedAnimals = new TreeSet<>(); this.castratedAnimals = new ArrayList<>(); } public void registerCleansingCenter(String name) { this.cleansingCenters.put(name, new CleansingCenter(name)); } public void registerAdoptionCenter(String name) { this.adoptionCenters.put(name, new AdoptionCenter(name)); } public void registerDog(String name, int age, int learnedCommands, String adoptionCenterName) { if (this.adoptionCenters.containsKey(adoptionCenterName)) { AdoptionCenter adoptionCenter = this.adoptionCenters.get(adoptionCenterName); Animal dog = new Dog(name, age, learnedCommands, adoptionCenterName); adoptionCenter.accept(dog); } } public void registerCat(String name, int age, int intelligenceCoefficient, String adoptionCenterName) { if (this.adoptionCenters.containsKey(adoptionCenterName)) { AdoptionCenter adoptionCenter = this.adoptionCenters.get(adoptionCenterName); Animal cat = new Cat(name, age, intelligenceCoefficient, adoptionCenterName); adoptionCenter.accept(cat); } } public void sendForCleansing(String adoptionCenterName, String cleansingCenterName) { if (this.adoptionCenters.containsKey(adoptionCenterName) && this.cleansingCenters.containsKey(cleansingCenterName)) { AdoptionCenter adoptionCenter = this.adoptionCenters.get(adoptionCenterName); CleansingCenter cleansingCenter = this.cleansingCenters.get(cleansingCenterName); adoptionCenter.sendForCleanse(cleansingCenter); } } public void cleanse(String cleansingCenterName) { if (this.cleansingCenters.containsKey(cleansingCenterName)) { CleansingCenter cleansingCenter = this.cleansingCenters.get(cleansingCenterName); Set<Animal> currentCleansedAnimals = cleansingCenter.cleanseAnimals(); for (Animal cleansedAnimal : currentCleansedAnimals) { String cleansedAnimalAdoptionCenter = cleansedAnimal.getAdoptionCenter(); if (this.adoptionCenters.containsKey(cleansedAnimalAdoptionCenter)) { AdoptionCenter adoptionCenter = this.adoptionCenters.get(cleansedAnimalAdoptionCenter); adoptionCenter.returnAnimal(cleansedAnimal); } } this.cleanedAnimals.addAll(currentCleansedAnimals); } } public void adopt(String adoptionCenterName) { if (this.adoptionCenters.containsKey(adoptionCenterName)) { AdoptionCenter adoptionCenter = this.adoptionCenters.get(adoptionCenterName); this.adoptedAnimals.addAll(adoptionCenter.adoptAnimals()); } } public void registerCastrationCenter(String castrationCenterName) { this.castrationCenters.put(castrationCenterName, new CastrationCenter(castrationCenterName)); } public void sendForCastration(String adoptionCenterName, String castrationCenterName) { if (this.castrationCenters.containsKey(castrationCenterName) && this.adoptionCenters.containsKey(adoptionCenterName)) { AdoptionCenter adoptionCenter = this.adoptionCenters.get(adoptionCenterName); CastrationCenter castrationCenter = this.castrationCenters.get(castrationCenterName); adoptionCenter.sendForCastration(castrationCenter); } } public void castrate(String castrationCenterName) { if (this.castrationCenters.containsKey(castrationCenterName)) { CastrationCenter castrationCenter = this.castrationCenters.get(castrationCenterName); Set<Animal> currentCastratedAnimals = castrationCenter.castrateAnimals(); for (Animal castratedAnimal : currentCastratedAnimals) { String castratedAnimalAdoptionCenter = castratedAnimal.getAdoptionCenter(); if (this.adoptionCenters.containsKey(castratedAnimalAdoptionCenter)) { AdoptionCenter adoptionCenter = this.adoptionCenters.get(castratedAnimalAdoptionCenter); adoptionCenter.returnAnimal(castratedAnimal); } } this.castratedAnimals.addAll(currentCastratedAnimals); } } public void castrationStatistics() { StringBuilder builder = new StringBuilder(); List<String> sortedAnimals = this.castratedAnimals.stream() .map(Animal::getName) .sorted(Collator.getInstance()) .collect(Collectors.toList()); builder.append("Paw Inc. Regular Castration Statistics\n") .append(String.format("Castration Centers: %d\n", this.castrationCenters.size())) .append("Castrated Animals: " + (sortedAnimals.size() > 0 ? sortedAnimals.toString().replace("[", "").replace("]", "") : "None")); System.out.println(builder.toString()); } public void printStatistics() { StringBuilder builder = new StringBuilder(); builder.append("Paw Incorporative Regular Statistics\n") .append(String.format("Adoption Centers: %d\n", this.adoptionCenters.size())) .append(String.format("Cleansing Centers: %d\n", this.cleansingCenters.size())) .append("Adopted Animals: " + (this.adoptedAnimals.size() > 0 ? this.adoptedAnimals.toString().replace("[", "").replace("]", "") : "None") + "\n") .append("Cleansed Animals: " + (this.cleanedAnimals.size() > 0 ? this.cleanedAnimals.toString().replace("[", "").replace("]", "") : "None") + "\n") .append(String.format("Animals Awaiting Adoption: %d\n", this.getAnimalsAwaitingAdoption())) .append(String.format("Animals Awaiting Cleansing: %d", this.getAnimalsAwaitingCleansing())); System.out.println(builder.toString()); } private int getAnimalsAwaitingAdoption() { int count = 0; for (AdoptionCenter adoptionCenter : this.adoptionCenters.values()) { count += adoptionCenter.countOfNonAdoptedAnimals(); } return count; } private int getAnimalsAwaitingCleansing() { int count = 0; for (CleansingCenter cleansingCenter : this.cleansingCenters.values()) { count += cleansingCenter.countOfNonCleansedAnimals(); } return count; } }
[ "gramovv@gmail.com" ]
gramovv@gmail.com
9e98380a641949db225c5bbf45e8b01a73dc9e86
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_cfr/com/google/security/zynamics/bindiff/project/matches/IAddressPair.java
6db3eaba099c9bd078ef5526046e9310876196f2
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
/* * Decompiled with CFR 0_115. */ package com.google.security.zynamics.bindiff.project.matches; import com.google.security.zynamics.bindiff.enums.ESide; import com.google.security.zynamics.zylib.disassembly.IAddress; public interface IAddressPair { public long getAddress(ESide var1); public IAddress getIAddress(ESide var1); }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
e6415be685b820fc376c211cd9fa2785682c6aab
d280800ca4ec277f7f2cdabc459853a46bf87a7c
/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/AbstractCommand.java
6b3de31802c4c4ae7c87e627cd89556eb3793d9a
[ "Apache-2.0" ]
permissive
qqqqqcjq/spring-boot-2.1.x
e5ca46d93eeb6a5d17ed97a0b565f6f5ed814dbb
238ffa349a961d292d859e6cc2360ad53b29dfd0
refs/heads/master
2023-03-12T12:50:11.619493
2021-03-01T05:32:52
2021-03-01T05:32:52
343,275,523
0
0
null
null
null
null
UTF-8
Java
false
false
1,817
java
/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.cli.command; import java.util.Collection; import java.util.Collections; import org.springframework.boot.cli.command.options.OptionHelp; /** * Abstract {@link Command} implementation. * * @author Phillip Webb * @author Dave Syer * @since 1.0.0 */ public abstract class AbstractCommand implements Command { private final String name; private final String description; /** * Create a new {@link AbstractCommand} instance. * @param name the name of the command * @param description the command description */ protected AbstractCommand(String name, String description) { this.name = name; this.description = description; } @Override public String getName() { return this.name; } @Override public String getDescription() { return this.description; } @Override public String getUsageHelp() { return null; } @Override public String getHelp() { return null; } @Override public Collection<OptionHelp> getOptionsHelp() { return Collections.emptyList(); } @Override public Collection<HelpExample> getExamples() { return null; } }
[ "caverspark@163.com" ]
caverspark@163.com
e4efa1072c9b8ec37597f3bc4b5c8f4564b9c665
b25e847523102664b7c7c9984df67130e6bec697
/src/com/antoinecronier/pokebattle/view/poketypeobjet/PokeTypeObjetCreateActivity.java
a752bb47ef3ad0abe139e96c4e064b7a3821fd09
[]
no_license
antoinecronier/pokeAndroid
ebe0e9804f3b8d77b609c7006d9c99adf379ea6e
8ffe8c777782ba7cb18fc96e789940cda778ad9f
refs/heads/master
2021-01-17T13:10:40.246374
2016-05-25T06:34:07
2016-05-25T06:34:07
59,842,113
0
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
/************************************************************************** * PokeTypeObjetCreateActivity.java, pokebattle Android * * Copyright 2016 * Description : * Author(s) : Harmony * Licence : * Last update : May 25, 2016 * **************************************************************************/ package com.antoinecronier.pokebattle.view.poketypeobjet; import com.antoinecronier.pokebattle.R; import com.antoinecronier.pokebattle.harmony.view.HarmonyFragmentActivity; import android.os.Bundle; /** * PokeTypeObjet create Activity. * * This only contains a PokeTypeObjetCreateFragment. * * @see android.app.Activity */ public class PokeTypeObjetCreateActivity extends HarmonyFragmentActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setNavigationBack(true); } @Override protected int getContentView() { return R.layout.activity_poketypeobjet_create; } @Override protected void onDestroy() { super.onDestroy(); } }
[ "antoine.cronier@tactfactory.com" ]
antoine.cronier@tactfactory.com
ef0b84f830bef880d1ad7ce7602ddd4199625f6f
0874d515fb8c23ae10bf140ee5336853bceafe0b
/l2j-universe-lindvior/Lindvior Source/commons/src/main/java/l2p/commons/data/xml/AbstractFileParser.java
c2f22cba9d051cdf0b6c37711ba86719cebfceab
[]
no_license
NotorionN/l2j-universe
8dfe529c4c1ecf0010faead9e74a07d0bc7fa380
4d05cbd54f5586bf13e248e9c853068d941f8e57
refs/heads/master
2020-12-24T16:15:10.425510
2013-11-23T19:35:35
2013-11-23T19:35:35
37,354,291
0
1
null
null
null
null
UTF-8
Java
false
false
1,037
java
package l2p.commons.data.xml; import java.io.File; import java.io.FileInputStream; /** * Author: VISTALL * Date: 20:52/30.11.2010 */ public abstract class AbstractFileParser<H extends AbstractHolder> extends AbstractParser<H> { protected AbstractFileParser(H holder) { super(holder); } public abstract File getXMLFile(); public abstract String getDTDFileName(); @Override protected final void parse() { File file = getXMLFile(); if (!file.exists()) { warn("file " + file.getAbsolutePath() + " not exists"); return; } File dtd = new File(file.getParent(), getDTDFileName()); if (!dtd.exists()) { info("DTD file: " + dtd.getName() + " not exists."); return; } initDTD(dtd); try { parseDocument(new FileInputStream(file), file.getName()); } catch (Exception e) { warn("Exception: " + e, e); } } }
[ "jmendezsr@gmail.com" ]
jmendezsr@gmail.com
345b32de454aa59456ae78faef7fb935a178113c
39b6f83641d1a80a48937c42beb6a73311aebc55
/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/NoClassInterceptors.java
c00667a79b5f40a1e887ee4f191af12b0ce98acd
[ "Apache-2.0" ]
permissive
quarkusio/quarkus
112ecda7236bc061920978ac49289da6259360f4
68af440f3081de7a26bbee655f74bb8b2c57c2d5
refs/heads/main
2023-09-04T06:39:33.043251
2023-09-04T05:44:43
2023-09-04T05:44:43
139,914,932
13,109
2,940
Apache-2.0
2023-09-14T21:31:23
2018-07-06T00:44:20
Java
UTF-8
Java
false
false
856
java
package io.quarkus.arc; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * If a business method or constructor is annotated {@code @NoClassInterceptors}, then interceptors * whose interceptor binding annotations are present on a class are ignored for this method or * constructor. In other words, the only interceptors that apply to such method/constructor are * interceptors declared directly on the method/constructor. * <p> * This annotation only applies to business method interceptors ({@code @AroundInvoke}) and * constructor lifecycle callback interceptors ({@code @AroundConstruct}). */ @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.METHOD, ElementType.CONSTRUCTOR }) public @interface NoClassInterceptors { }
[ "lthon@redhat.com" ]
lthon@redhat.com
4be342d810152d7fcad1f63ae7e3d92d0d9be34d
8ef2179ef743a8aadf41ce6bd6f652d28f2c0595
/Java Advanced/Sets And Maps Advanced/src/CountSymbols.java
0e8bb21430ad4c169217667c8273d37f97762220
[ "MIT" ]
permissive
mikaelparsekyan/Softuni-Task-Solutions
d511fcbd6e682ae6fc498c9c39b7dd1249a68dac
7344384d0894caa39e0488f33179bb3b25d78c57
refs/heads/master
2022-12-28T04:26:47.921734
2020-04-19T18:34:14
2020-04-19T18:34:14
197,333,233
0
0
MIT
2022-12-10T05:58:56
2019-07-17T06:57:30
Java
UTF-8
Java
false
false
825
java
import java.util.Map; import java.util.Scanner; import java.util.TreeMap; public class CountSymbols { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String input = scanner.nextLine(); Map<Character, Integer> characters = new TreeMap<>(); for (int i = 0; i < input.length(); i++) { char currentChar = input.charAt(i); if (characters.containsKey(currentChar)) { characters.put(currentChar, characters.get(currentChar) + 1); } else { characters.put(currentChar, 1); } } for (var entry : characters.entrySet()) { System.out.printf("%c: %d time/s%n",entry.getKey(), entry.getValue()); } } }
[ "mikael90@abv.bg" ]
mikael90@abv.bg
500385364281edb3c02186233a366f31083a8c40
00835535a677c8ffd17fcb718d8d279ee4cc30dc
/app/src/main/java/com/xgr/wonderful/entity/QiangYu.java
9fb7851268d7e4c6619164be583720aa20eba4b9
[]
no_license
lesliedou/Wonderful
587d3e5a9a059f3db4f668a56cf3cf9d1790f524
40f6b2b9e9cf090b4afc410225518ce5936569be
refs/heads/master
2021-05-30T03:23:44.908608
2015-10-07T08:49:04
2015-10-07T08:49:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,843
java
package com.xgr.wonderful.entity; import java.io.Serializable; import cn.bmob.v3.BmobObject; import cn.bmob.v3.datatype.BmobFile; import cn.bmob.v3.datatype.BmobRelation; public class QiangYu extends BmobObject implements Serializable { /** * qiang yu entity,每个列表item内容 * 2014/4/27 */ private static final long serialVersionUID = -6280656428527540320L; private User author; private String content; private BmobFile Contentfigureurl; private int love; private int hate; private int share; private int comment; private boolean isPass; private boolean myFav;//收藏 private boolean myLove;//赞 private BmobRelation relation; public BmobRelation getRelation() { return relation; } public void setRelation(BmobRelation relation) { this.relation = relation; } public User getAuthor() { return author; } public void setAuthor(User author) { this.author = author; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public BmobFile getContentfigureurl() { return Contentfigureurl; } public void setContentfigureurl(BmobFile contentfigureurl) { Contentfigureurl = contentfigureurl; } public int getLove() { return love; } public void setLove(int love) { this.love = love; } public int getHate() { return hate; } public void setHate(int hate) { this.hate = hate; } public int getShare() { return share; } public void setShare(int share) { this.share = share; } public int getComment() { return comment; } public void setComment(int comment) { this.comment = comment; } public boolean isPass() { return isPass; } public void setPass(boolean isPass) { this.isPass = isPass; } public boolean getMyFav() { return myFav; } public void setMyFav(boolean myFav) { this.myFav = myFav; } public boolean getMyLove() { return myLove; } public void setMyLove(boolean myLove) { this.myLove = myLove; } @Override public String toString() { return "QiangYu [author=" + author + ", content=" + content + ", Contentfigureurl=" + Contentfigureurl + ", love=" + love + ", hate=" + hate + ", share=" + share + ", comment=" + comment + ", isPass=" + isPass + ", myFav=" + myFav + ", myLove=" + myLove + ", relation=" + relation + "]"; } }
[ "1573876303@qq.com" ]
1573876303@qq.com
276826f01476cfabc5e8696e0a5dbb8c3373ebe5
5a0bfac7ad00c079fe8e0bdf1482f4271c46eeab
/app/src/main/wechat6.5.3/com/tencent/mm/protocal/c/mq.java
571306ec85fd66fc925d1aae0d59f565638f2d55
[]
no_license
newtonker/wechat6.5.3
8af53a870a752bb9e3c92ec92a63c1252cb81c10
637a69732afa3a936afc9f4679994b79a9222680
refs/heads/master
2020-04-16T03:32:32.230996
2017-06-15T09:54:10
2017-06-15T09:54:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,297
java
package com.tencent.mm.protocal.c; import a.a.a.b; import com.tencent.mm.ba.a; import java.util.LinkedList; public final class mq extends a { public arf moS; protected final int a(int i, Object... objArr) { if (i == 0) { a.a.a.c.a aVar = (a.a.a.c.a) objArr[0]; if (this.moS == null) { throw new b("Not all required fields were included: MemberName"); } else if (this.moS == null) { return 0; } else { aVar.dX(1, this.moS.aHr()); this.moS.a(aVar); return 0; } } else if (i == 1) { if (this.moS != null) { r0 = a.a.a.a.dU(1, this.moS.aHr()) + 0; } else { r0 = 0; } return r0; } else if (i == 2) { a.a.a.a.a aVar2 = new a.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (r0 = a.a(aVar2); r0 > 0; r0 = a.a(aVar2)) { if (!super.a(aVar2, this, r0)) { aVar2.bQL(); } } if (this.moS != null) { return 0; } throw new b("Not all required fields were included: MemberName"); } else if (i != 3) { return -1; } else { a.a.a.a.a aVar3 = (a.a.a.a.a) objArr[0]; mq mqVar = (mq) objArr[1]; int intValue = ((Integer) objArr[2]).intValue(); switch (intValue) { case 1: LinkedList zQ = aVar3.zQ(intValue); int size = zQ.size(); for (intValue = 0; intValue < size; intValue++) { byte[] bArr = (byte[]) zQ.get(intValue); a com_tencent_mm_protocal_c_arf = new arf(); a.a.a.a.a aVar4 = new a.a.a.a.a(bArr, unknownTagHandler); for (boolean z = true; z; z = com_tencent_mm_protocal_c_arf.a(aVar4, com_tencent_mm_protocal_c_arf, a.a(aVar4))) { } mqVar.moS = com_tencent_mm_protocal_c_arf; } return 0; default: return -1; } } } }
[ "zhangxhbeta@gmail.com" ]
zhangxhbeta@gmail.com
f9a6575a4ad08eb098ccf3a0e02f764fa94785bd
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_0c6902b4fa4280e33909f7465fbc15dfe78587a8/FrontEnd/19_0c6902b4fa4280e33909f7465fbc15dfe78587a8_FrontEnd_s.java
a081546aac7f42ce785fc28ebf08a686e9a28092
[]
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,873
java
/** * [[[copyright]]] */ package edu.cmu.sphinx.frontend; import edu.cmu.sphinx.util.SphinxProperties; import edu.cmu.sphinx.util.Timer; import java.io.IOException; /** * Pre-processes the audio into Features. The FrontEnd consists * of a series of processors. The FrontEnd connects all the processors * by the input and output points. * * <p>The input to the FrontEnd is an AudioSource. For an audio stream, * the <code>StreamAudioSource</code> should be used. The * input can also be a file containing a list of audio files, in which case * the <code>BatchFileAudioSource</code> can be used. * * <p>The output of the FrontEnd are Features, so a <code>FeatureSource</code> * is needed. * A typical sequence of calls to initialize the FrontEnd is: * <pre> * FrontEnd fe = new FrontEnd("frontend", context); * fe.setAudioSource(new StreamAudioSource(...)); * * // create the processors * Preemphasizer preemphasizer = new Preemphasizer * ("Preemphasizer", context, fe.getAudioSource()); * Windower windower = new Windower * ("HammingWindow", context, preemphasizer); * SpectrumAnalyzer spectrumAnalyzer = new SpectrumAnalyzer * ("FFT", context, windower); * MelFilterbank melFilterbank = new MelFilterbank * ("MelFilter", context, spectrumAnalyzer); * MelCepstrumProducer melCepstrum = new MelCepstrumProducer * ("MelCepstrum", context, melFilterbank); * CepstralMeanNormalizer cmn = new CepstralMeanNormalizer * ("CMN", context, melCepstrum); * * // FeatureExtractor implements FeatureSource * fe.setFeatureSource(new FeatureExtractor(name, context, cmn)); * </pre> * * <p>To obtain <code>Feature</code>(s) from the FrontEnd, you would use: * <pre> * fe.getFeatureFrame(10); * </pre> * which will return a <code>FeatureFrame</code> with 10 <code>Feature</code>s * in it. If there are only 5 more features before the end of segment, * * @see AudioSource * @see CepstralMeanNormalizer * @see Feature * @see FeatureExtractor * @see FeatureFrame * @see FeatureSource * @see MelCepstrumProducer * @see MelFilterbank * @see SpectrumAnalyzer * @see Windower */ public class FrontEnd extends DataProcessor { /** * The name of the SphinxProperty for sample rate in Hertz (i.e., * number of times per second), which has a default value of 8000. */ public static final String PROP_SAMPLE_RATE = "edu.cmu.sphinx.frontend.sampleRate"; /** * The name of the SphinxProperty for the number of bytes per frame, * which has a default value of 4000. */ public static final String PROP_BYTES_PER_AUDIO_FRAME = "edu.cmu.sphinx.frontend.bytesPerAudioFrame"; /** * The name of the SphinxProperty for window size in milliseconds, * which has a default value of 25.625F. */ public static final String PROP_WINDOW_SIZE_MS = "edu.cmu.sphinx.frontend.windowSizeInMs"; /** * The name of the SphinxProperty for window shift in milliseconds, * which has a default value of 10F. */ public static final String PROP_WINDOW_SHIFT_MS = "edu.cmu.sphinx.frontend.windowShiftInMs"; /** * The name of the SphinxProperty for the size of a cepstrum, which is * 13 by default. */ public static final String PROP_CEPSTRUM_SIZE = "edu.cmu.sphinx.frontend.cepstrumSize"; private AudioSource audioSource; private FeatureSource featureSource; /** * Constructs a default FrontEnd. * * @param name the name of this FrontEnd * @param context the context of this FrontEnd */ public FrontEnd(String name, String context) { super(name, context); } /** * Returns the AudioSource of this FrontEnd. The AudioSource of * the front end is where it gets its audio data. * * @return the AudioSource */ public AudioSource getAudioSource() { return audioSource; } /** * Sets the AudioSource of this FrontEnd. The AudioSource of * the front end is where it gets its audio data * * @param audioSource the AudioSource */ public void setAudioSource(AudioSource audioSource) { this.audioSource = audioSource; } /** * Returns the FeatureSource of this FrontEnd. * * @return the FeatureSource of this FrontEnd */ public FeatureSource getFeatureSource() { return featureSource; } /** * Sets the FeatureSource of this FrontEnd. * * @param featureSource the FeatureSource */ public void setFeatureSource(FeatureSource featureSource) { this.featureSource = featureSource; } /** * Returns the next N number of Features produced by this FrontEnd * as a single FeatureFrame. * The number of Features return maybe less than N, in which * case the last Feature will contain a Signal.SEGMENT_END signal. * However, the size of the FeatureFrame will still be N. * * @param numberFeatures the number of Features to return * * @return the next N number of Features in a FeatureFrame * * @see FeatureFrame */ public FeatureFrame getFeatureFrame(int numberFeatures) throws IOException { Feature[] features = new Feature[numberFeatures]; FeatureFrame featureFrame = new FeatureFrame(features); Feature feature = null; int i = 0; do { feature = featureSource.getFeature(); features[i++] = feature; if (feature.hasSegmentEndSignal()) { break; } } while (i < numberFeatures); return featureFrame; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7e7c2d8c03dfe0fc4782e99ee5b9dcacec162b55
aa2c6b79e66b090865520befda787d08aa863ab1
/rapid-common-test/src/main/java/com/github/rapid/common/test/util/MultiThreadTestUtils.java
4b5c161c10253770cae854611d6e7f7c580f9a1a
[]
no_license
imanutd/commons
39f8151e98ab8d363e7478f79bb481476702240a
31a09f3505d594fb8ebd8521e7a53ab77af36639
refs/heads/master
2020-05-17T17:14:12.443755
2019-04-26T02:23:24
2019-04-26T02:23:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,641
java
package com.github.rapid.common.test.util; import java.util.concurrent.CountDownLatch; /** * 多线程测试的工具类,可以根据指定的线程数并发的同时执行同一个task用于单元测试使用 * @author badqiu */ public class MultiThreadTestUtils { /** * 执行测试并等待执行结束,返回值为消耗时间 * * @param threadCount 线程数 * @param task 任务 * @return costTime * @throws InterruptedException */ public static long executeAndWait(int threadCount,final Runnable task) throws InterruptedException { CountDownLatch doneSignal = execute(threadCount, task); long startTime = System.currentTimeMillis(); doneSignal.await(); return System.currentTimeMillis() - startTime; } /** * 执行测试 * * @param threadCount * @param threadDemeon * @param task * @return 返回doneSignal */ public static CountDownLatch execute(int threadCount,final Runnable task) { final CountDownLatch startSignal = new CountDownLatch(1); final CountDownLatch startedSignal = new CountDownLatch(threadCount); final CountDownLatch doneSignal = new CountDownLatch(threadCount); for(int i = 0; i < threadCount; i++) { Thread t = new Thread(){ public void run() { startedSignal.countDown(); try { startSignal.await(); }catch(InterruptedException e) { return; } try { task.run(); }finally { doneSignal.countDown(); } } }; t.start(); } try { startedSignal.await(); } catch (InterruptedException e) { //ignore } startSignal.countDown(); return doneSignal; } }
[ "badqiu@gmail.com" ]
badqiu@gmail.com
2b33decdf4b7e80c5c60cad5c8aecd033ce11446
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/17/17_0657739897a0c4a67b9bdfd68e780c498348fb85/A/17_0657739897a0c4a67b9bdfd68e780c498348fb85_A_s.java
22b5c6b595523dc28abc0954950c2a5c2758a0ae
[]
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
243
java
public class A { public String meth1(String param1, Integer param2) { System.out.println(param1); return meth2("this is an arg to method2", 25); } public String meth2(String msg, Integer i) { return "class A::meth2"; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a76eb71c28ab307806bed6c36795022ffd8be1cc
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/factor/prime/Proth.java
32afb7586a46ddfe6dc16a8d15720bc6652b7f40
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,986
java
package irvine.factor.prime; import irvine.math.z.Z; /** * Implements the Proth primality test. * * @author Sean A. Irvine */ public class Proth extends AbstractPrime { /** * Test if the given number is prime. If the return value is false then the * number is definitely composite. If the return value is true then the number * is a definitely prime. If the test cannot be applied to the supplied * number then an ArithmeticException is thrown. * * @param n value to test * @return true if n is prime, false if n is composite * @exception ArithmeticException if test cannot be applied to <code>n</code> */ @Override public boolean isPrime(final Z n) { // handle even numbers if (n.compareTo(Z.TWO) < 0) { return false; } if (n.equals(Z.TWO)) { return true; } if (n.equals(Z.THREE)) { return true; } if (!n.testBit(0)) { return false; } // [n > 4 is odd] // let n = k*2^l+1, extract k and l final Z n1 = n.clearBit(0); final int l = n1.getLowestSetBit(); final Z n1r = n1.divide2(); final Z k = n1.shiftRight(l); // compare k with 2^l, test valid for k <= 2^l final Z l2 = Z.ONE.shiftLeft(l); if (k.compareTo(l2) > 0) { throw new ArithmeticException("Proth test not applicable"); } // if 3 does not divide k, then do this test first if (!k.mod(Z.THREE).equals(Z.ZERO)) { return Z.THREE.modPow(n1r, n).equals(n1); } // test for a perfect square since Jacobi search will fail on such numbers final Z s = n.sqrtAndRemainder()[1]; if (Z.ZERO.equals(s)) { return false; } // [ n > 4 is odd and square free and 3 | k ] // search for a quadratic nonresidue and perform test Z base = Z.THREE; while (true) { base = base.add(Z.TWO); if (base.jacobi(n) == -1 && !k.mod(base).equals(Z.ZERO)) { return base.modPow(n1r, n).equals(n1); // congruent -1 } } } }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
8133cb578d0c1dcdf0596f757980f1fafeb8541b
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/26/org/jfree/chart/axis/Axis_setVisible_325.java
bac32bbfa57faed6736337db6a56b4c4ff46a732
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,737
java
org jfree chart axi base ax free chart jfreechart subclass divid displai valu link axi valueaxi displai categori link categori axi categoryaxi axi cloneabl serializ set flag control axi visibl send link axi chang event axischangeev regist listen param flag flag visibl isvis set visibl setvis flag flag visibl visibl flag notifi listen notifylisten axi chang event axischangeev
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
de419ea1ce2fd1604cf4e57078f106c03685be98
961167bf92a35df31da22c25733828117acafdd2
/thymeleaf-benchmark04/src/main/java/org/thymeleaf/benchmarks/benchmark04/model/repositories/CustomerRepository.java
b4b25270e7f62310178896566d89607c04e22195
[ "Apache-2.0" ]
permissive
thymeleaf/thymeleaf-benchmarks
797b2adc1fe887de87634d3ae95d88a1139b9fcf
4a8bd18b072cd7aaa859a2df290bf917ffe7de1b
refs/heads/master
2023-08-29T21:16:27.351580
2021-02-12T19:17:07
2021-02-12T19:17:07
35,641,394
4
4
Apache-2.0
2022-12-16T07:39:45
2015-05-14T23:00:02
Java
UTF-8
Java
false
false
3,431
java
/* * ============================================================================= * * Copyright (c) 2011-2016, The THYMELEAF team (http://www.thymeleaf.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * ============================================================================= */ package org.thymeleaf.benchmarks.benchmark04.model.repositories; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.thymeleaf.benchmarks.benchmark04.model.CalendarUtil; import org.thymeleaf.benchmarks.benchmark04.model.Customer; public class CustomerRepository { private static final CustomerRepository INSTANCE = new CustomerRepository(); private final Map<Integer,Customer> customersById; public static CustomerRepository getInstance() { return INSTANCE; } private CustomerRepository() { super(); this.customersById = new LinkedHashMap<Integer, Customer>(); final Customer cust1 = new Customer(); cust1.setId(Integer.valueOf(1)); cust1.setName("James Cucumber"); cust1.setCustomerSince(CalendarUtil.calendarFor(2006, 4, 2, 13, 20)); this.customersById.put(cust1.getId(), cust1); final Customer cust2 = new Customer(); cust2.setId(Integer.valueOf(2)); cust2.setName("Anna Lettuce"); cust2.setCustomerSince(CalendarUtil.calendarFor(2005, 1, 30, 17, 14)); this.customersById.put(cust2.getId(), cust2); final Customer cust3 = new Customer(); cust3.setId(Integer.valueOf(3)); cust3.setName("Boris Tomato"); cust3.setCustomerSince(CalendarUtil.calendarFor(2008, 12, 2, 9, 53)); this.customersById.put(cust3.getId(), cust3); final Customer cust4 = new Customer(); cust4.setId(Integer.valueOf(4)); cust4.setName("Shannon Parsley"); cust4.setCustomerSince(CalendarUtil.calendarFor(2009, 3, 24, 10, 45)); this.customersById.put(cust4.getId(), cust4); final Customer cust5 = new Customer(); cust5.setId(Integer.valueOf(5)); cust5.setName("Susan Cheddar"); cust5.setCustomerSince(CalendarUtil.calendarFor(2007, 10, 1, 15, 02)); this.customersById.put(cust5.getId(), cust5); final Customer cust6 = new Customer(); cust6.setId(Integer.valueOf(6)); cust6.setName("George Garlic"); cust6.setCustomerSince(CalendarUtil.calendarFor(2010, 5, 18, 20, 30)); this.customersById.put(cust6.getId(), cust6); } public List<Customer> findAll() { return new ArrayList<Customer>(this.customersById.values()); } public Customer findById(final Integer id) { return this.customersById.get(id); } }
[ "daniel.fernandez@11thlabs.org" ]
daniel.fernandez@11thlabs.org
d92d75705b1fb6a2563bf25259e9f5f038699c62
7791973ca350994b734557803f91a3fd47ea1c02
/200 Days/Daily Stuff/Graphs/All Permutations of array contains duplicate.java
373d13551d5c54b1ad3b1ec02d52d2ea0579368c
[]
no_license
gupta29470/Practice
4713ae02a5ab84c6783d711d53df227d9060604a
81676b21fbf0191f8ded836d19f0c280b4bda1cd
refs/heads/master
2023-07-03T15:52:49.832892
2021-08-17T08:49:05
2021-08-17T08:49:05
357,317,997
0
0
null
null
null
null
UTF-8
Java
false
false
1,998
java
/* permutaions function: -> initialize left = 0 and right = array.length - 1 pass array, left and right in permutationsUtil function -> permutationsUtil function: -> if left is equal to right print current state of element -> else for loop for every element will be left to right: -> swap left and current index element -> call permutationsUtil function with (array, left + 1, right) recursively -> get original structure of array by swapping again left and current index element */ class AllPermutations { public static void main(String[] args) { int array[] = {1, 2, 3, 4, 5}; permutaions(array); } public static void permutaions(int array[]) { // initialize left = 0 and right = array.length - 1 int left = 0, right = array.length - 1; permutationsUtil(array, left, right); } public static void permutationsUtil(int array[], int left, int right) { // if left is equal to right print current state of element if (left == right) { printArray(array); } else{ // for loop for every element will be left to right: for (int index = left; index <= right; index++) { // swap left and current index element swap(array, left, index); // call permutationsUtil function with (array, left + 1, // right) recursively permutations(array, left + 1, right); // get original structure of array by swapping again // left and current index element swap(array, left, index); } } } public static void swap(int array[], int index1, int index2) { int temp = array[index1]; array[index1] = array[index2]; array[index2] = temp; } public static void printArray(int array[]) { for (int index = 0; index < array.length; index++) { System.out.print(array[index] + " "); } System.out.println(""); } }
[ "gupta29470@gmail.com" ]
gupta29470@gmail.com
e19febc59c61db22915efb4fccf9640fb0da9cd0
066dcf95d870eb4537f148c2ff74fbed6820630b
/src/API/amazon/mws/orders/model/MarketplaceIdList.java
9eebac320ab629afa4eeb1d1ad6665e9dd8209bb
[ "MIT" ]
permissive
VDuda/SyncRunner-Pub
0e24f864d24aa9d6112ba225156b7c765596186b
ab6b291178c08754b84f60d39e54b3ae889d476b
refs/heads/master
2022-11-17T03:43:38.054868
2022-08-11T15:02:11
2022-08-11T15:02:11
28,209,628
3
5
MIT
2022-10-22T16:10:55
2014-12-19T01:45:41
Java
UTF-8
Java
false
false
6,330
java
package API.amazon.mws.orders.model; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for MarketplaceIdList complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="MarketplaceIdList"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Id" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="50"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "MarketplaceIdList", propOrder = { "id" }) public class MarketplaceIdList { @XmlElement(name = "Id", required = true) protected List<String> id; /** * Default constructor * */ public MarketplaceIdList() { super(); } /** * Value constructor * */ public MarketplaceIdList(final List<String> id) { this.id = id; } /** * Gets the value of the id property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the id property. * * <p> * For example, to add a new item, do as follows: * <pre> * getId().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getId() { if (id == null) { id = new ArrayList<String>(); } return this.id; } public boolean isSetId() { return ((this.id!= null)&&(!this.id.isEmpty())); } public void unsetId() { this.id = null; } /** * Sets the value of the Id property. * * @param values * @return * this instance */ public MarketplaceIdList withId(String... values) { for (String value: values) { getId().add(value); } return this; } /** * Sets the value of the id property. * * @param id * allowed object is * {@link String } * */ public void setId(List<String> id) { this.id = id; } /** * * XML fragment representation of this object * * @return XML fragment for this object. Name for outer * tag expected to be set by calling method. This fragment * returns inner properties representation only */ public String toXMLFragment() { StringBuffer xml = new StringBuffer(); java.util.List<String> idList = getId(); for (String id : idList) { xml.append("<Id>"); xml.append(escapeXML(id)); xml.append("</Id>"); } return xml.toString(); } /** * * Escape XML special characters */ private String escapeXML(String string) { if (string == null) return "null"; StringBuffer sb = new StringBuffer(); int length = string.length(); for (int i = 0; i < length; ++i) { char c = string.charAt(i); switch (c) { case '&': sb.append("&amp;"); break; case '<': sb.append("&lt;"); break; case '>': sb.append("&gt;"); break; case '\'': sb.append("&#039;"); break; case '"': sb.append("&quot;"); break; default: sb.append(c); } } return sb.toString(); } /** * * JSON fragment representation of this object * * @return JSON fragment for this object. Name for outer * object expected to be set by calling method. This fragment * returns inner properties representation only * */ protected String toJSONFragment() { StringBuffer json = new StringBuffer(); boolean first = true; if (isSetId()) { if (!first) json.append(", "); json.append("\"Id\" : ["); java.util.List<String> idList = getId(); int idListIndex = 0; for (String id : idList) { if (idListIndex > 0) json.append(", "); json.append(quoteJSON(id)); ++idListIndex; } json.append("]"); first = false; } return json.toString(); } /** * * Quote JSON string */ private String quoteJSON(String string) { if (string == null) return "null"; StringBuffer sb = new StringBuffer(); sb.append("\""); int length = string.length(); for (int i = 0; i < length; ++i) { char c = string.charAt(i); switch (c) { case '"': sb.append("\\\""); break; case '\\': sb.append("\\\\"); break; case '/': sb.append("\\/"); break; case '\b': sb.append("\\b"); break; case '\f': sb.append("\\f"); break; case '\n': sb.append("\\n"); break; case '\r': sb.append("\\r"); break; case '\t': sb.append("\\t"); break; default: if (c < ' ') { sb.append("\\u" + String.format("%03x", Integer.valueOf(c))); } else { sb.append(c); } } } sb.append("\""); return sb.toString(); } }
[ "volod2010@gmail.com" ]
volod2010@gmail.com
5d6157796e9d760b44b57fbc7b3d206e642b5ef6
55ff7df8f1b7c4c2b34d2b6d23ec9ae807b14d63
/app/src/main/java/company/android/documentmanager/office/fc/hslf/record/ExHyperlinkAtom.java
b656660eeeeb90bc14c17b4991721bda24f98329
[]
no_license
venbrinoDev/DocumentManager
42ba1c375f9dcdbbbd3bb41b3bae93593642e196
f80d2489c6c074ecbdc604e1573477c90f1c6c30
refs/heads/master
2023-06-18T11:57:22.454322
2021-07-18T15:57:14
2021-07-18T15:57:14
387,053,739
0
0
null
null
null
null
UTF-8
Java
false
false
3,340
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 company.android.documentmanager.office.fc.hslf.record; import company.android.documentmanager.office.fc.util.LittleEndian; /** * Tne atom that holds metadata on a specific Link in the document. * (The actual link is held in a sibling CString record) * * @author Nick Burch */ public final class ExHyperlinkAtom extends RecordAtom { /** * Record header. */ private byte[] _header; /** * Record data. */ private byte[] _data; /** * Constructs a brand new link related atom record. */ protected ExHyperlinkAtom() { _header = new byte[8]; _data = new byte[4]; LittleEndian.putShort(_header, 2, (short)getRecordType()); LittleEndian.putInt(_header, 4, _data.length); // It is fine for the other values to be zero } /** * Constructs the link related atom record from its * source data. * * source the source data as a byte array. * start the start offset into the byte array. * len the length of the slice in the byte array. */ protected ExHyperlinkAtom(byte[] source, int start, int len) { // Get the header. _header = new byte[8]; System.arraycopy(source, start, _header, 0, 8); // Get the record data. _data = new byte[len - 8]; System.arraycopy(source, start + 8, _data, 0, len - 8); // Must be at least 4 bytes long if (_data.length < 4) { throw new IllegalArgumentException( "The length of the data for a ExHyperlinkAtom must be at least 4 bytes, but was only " + _data.length); } } /** * Gets the link number. This will match the one in the * InteractiveInfoAtom which uses the link. * @return the link number */ public int getNumber() { return LittleEndian.getInt(_data, 0); } /** * Sets the link number * number the link number. */ public void setNumber(int number) { LittleEndian.putInt(_data, 0, number); } /** * Gets the record type. * @return the record type. */ public long getRecordType() { return RecordTypes.ExHyperlinkAtom.typeID; } /** * * */ public void dispose() { _header = null; _data = null; } }
[ "teamdreamhub@gmail.com" ]
teamdreamhub@gmail.com
873de513018ebf779c192ed385282d57263acd1a
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/eclipse.jdt.ui/6140.java
bc73ed17e41b029a63eb910f061b3ba5a657d429
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
240
java
package return_in; public class A_test719 { public boolean foo() { /*[*/ if (foo()) return true; if (foo()) return true; else return /*]*/ false; } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
9129e1d039d0251ee6c1ca12613dc9c0b0d29614
fb2c417459fcf7e2a8991a847f7a95b625162403
/test-common/src/main/java/com/gentics/mesh/assertj/impl/BufferedImageAssert.java
83c1b6de688f6290fe4a69bda7db9382d2f37988
[ "Apache-2.0" ]
permissive
Zonarius/mesh
e0be4be57d246db020fee53c3ee5047d7ea65680
8c2d4f506e93387abc188f728b41e7a75a43b6c0
refs/heads/master
2020-04-07T18:26:57.243993
2018-11-21T23:04:53
2018-11-21T23:04:53
158,610,519
0
0
Apache-2.0
2018-11-21T21:53:48
2018-11-21T21:53:48
null
UTF-8
Java
false
false
1,462
java
package com.gentics.mesh.assertj.impl; import static org.junit.Assert.assertEquals; import java.awt.image.BufferedImage; import org.assertj.core.api.AbstractAssert; public class BufferedImageAssert extends AbstractAssert<BufferedImageAssert, BufferedImage> { public BufferedImageAssert(BufferedImage actual) { super(actual, BufferedImageAssert.class); } /** * Validates the image width and height. * * @param width * @param height * @return */ public BufferedImageAssert hasSize(int width, int height) { assertEquals("Image height did not match", width, actual.getWidth()); assertEquals("Image width did not match", height, actual.getHeight()); return this; } /** * Validate the pixels of the actual image with the given reference image. The pixel color will be reduced to a 8bit value. * * @param refImage * @return */ public BufferedImageAssert matches(BufferedImage refImage) { assertEquals("Image height did not match", refImage.getWidth(), actual.getWidth()); assertEquals("Image width did not match", refImage.getHeight(), actual.getHeight()); for (int x = 0; x < refImage.getWidth(); x++) { for (int y = 0; y < refImage.getHeight(); y++) { // Get 8bit pixel color int pixel = actual.getRGB(x, y); int pixelRef = refImage.getRGB(x, y); assertEquals("The 8bit pixel value of {" + x + "/" + y + "} did not match with the reference image", pixelRef, pixel); } } return this; } }
[ "j.schueth@gentics.com" ]
j.schueth@gentics.com
f6d1b58bd16b598303c3b84d4c121c211fbf0438
9208ba403c8902b1374444a895ef2438a029ed5c
/sources/com/google/android/gms/internal/cast/zzdx.java
f49bb3814552500ea4c820f01928edb6d223544e
[]
no_license
MewX/kantv-decompiled-v3.1.2
3e68b7046cebd8810e4f852601b1ee6a60d050a8
d70dfaedf66cdde267d99ad22d0089505a355aa1
refs/heads/main
2023-02-27T05:32:32.517948
2021-02-02T13:38:05
2021-02-02T13:44:31
335,299,807
0
0
null
null
null
null
UTF-8
Java
false
false
724
java
package com.google.android.gms.internal.cast; import android.os.RemoteException; import com.google.android.gms.common.api.Status; public final class zzdx extends zzdu { private final /* synthetic */ zzdv zzyt; protected zzdx(zzdv zzdv) { this.zzyt = zzdv; } public final void onDisconnected() throws RemoteException { zzdq.zzbe.d("onDisconnected", new Object[0]); this.zzyt.zzyq.zzb(); this.zzyt.setResult(new zzdy(Status.RESULT_SUCCESS)); } public final void onError(int i) throws RemoteException { zzdq.zzbe.d("onError: %d", Integer.valueOf(i)); this.zzyt.zzyq.zzb(); this.zzyt.setResult(new zzdy(Status.RESULT_INTERNAL_ERROR)); } }
[ "xiayuanzhong@gmail.com" ]
xiayuanzhong@gmail.com
3673c3756e8fb39bd9d0313859495f69eeb3fc40
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/13/org/apache/commons/lang3/ArrayUtils_removeAll_5411.java
986764721d48f0a6de58c0d37c341fc90f4e0527
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
6,703
java
org apach common lang3 oper arrai primit arrai code primit wrapper arrai code integ handl code input gracefulli except thrown code arrai input object arrai code element except method document behaviour thread safe threadsaf version arrai util arrayutil remov element posit arrai remain element shift left method return arrai element input arrai posit compon type return arrai input arrai input arrai code index bound except indexoutofboundsexcept thrown valid index pre arrai util arrayutil remov removeal arrai util arrayutil remov removeal arrai util arrayutil remov removeal arrai util arrayutil remov removeal arrai util arrayutil remov removeal arrai util arrayutil remov removeal pre param arrai arrai remov element code param indic posit element remov arrai exist element posit index bound except indexoutofboundsexcept index rang index index arrai length arrai code remov removeal arrai indic remov removeal object arrai clone indic
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
dc653145904987566a018e15390fdbd74203a9bb
1e7f68d62f0b9408054a7ddee252a02d94bf93fc
/CommModule/src/ca/uhn/hl7v2/model/v26/segment/ZL7.java
0681da4ad4e57c8527c7df252cdc4fb6c3825eb5
[]
no_license
sac10nikam/TX
8b296211601cddead3749e48876e3851e867b07d
e5a5286f1092ce720051036220e1780ba3408893
refs/heads/master
2021-01-15T16:00:19.517997
2013-01-21T09:38:09
2013-01-21T09:38:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,809
java
/* * This class is an auto-generated source file for a HAPI * HL7 v2.x standard structure class. * * For more information, visit: http://hl7api.sourceforge.net/ * * The contents of this file are subject to the Mozilla Public License Version 1.1 * (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.mozilla.org/MPL/ * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the * specific language governing rights and limitations under the License. * * The Original Code is "[file_name]". Description: * "[one_line_description]" * * The Initial Developer of the Original Code is University Health Network. Copyright (C) * 2012. All Rights Reserved. * * Contributor(s): ______________________________________. * * Alternatively, the contents of this file may be used under the terms of the * GNU General Public License (the "GPL"), in which case the provisions of the GPL are * applicable instead of those above. If you wish to allow use of your version of this * file only under the terms of the GPL and not to allow others to use your version * of this file under the MPL, indicate your decision by deleting the provisions above * and replace them with the notice and other provisions required by the GPL License. * If you do not delete the provisions above, a recipient may use your version of * this file under either the MPL or the GPL. * */ package ca.uhn.hl7v2.model.v26.segment; // import ca.uhn.hl7v2.model.v26.group.*; import ca.uhn.hl7v2.model.v26.datatype.*; import ca.uhn.hl7v2.HL7Exception; import ca.uhn.hl7v2.parser.ModelClassFactory; import ca.uhn.hl7v2.parser.DefaultModelClassFactory; import ca.uhn.hl7v2.model.AbstractMessage; import ca.uhn.hl7v2.model.Group; import ca.uhn.hl7v2.model.Type; import ca.uhn.hl7v2.model.AbstractSegment; import net.newel.android.Log; import ca.uhn.hl7v2.util.Constants; import ca.uhn.hl7v2.model.Varies; /** *<p>Represents an HL7 ZL7 message segment (${typeDescription}). * This segment has the following fields:</p> * <ul> * </ul> */ public class ZL7 extends AbstractSegment { private static final long serialVersionUID = 1L; /** * Creates a new ZL7 segment */ public ZL7(Group parent, ModelClassFactory factory) { super(parent, factory); init(factory); } private void init(ModelClassFactory factory) { } /** {@inheritDoc} */ protected Type createNewTypeWithoutReflection(int field) { switch (field) { default: return null; } } }
[ "nacrotic@hotmail.com" ]
nacrotic@hotmail.com
f6dda7f60977eae1e4e7299d8f2d90078613b344
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava0/Foo170.java
b7eb41ee180c447379b6ca802bc1e5d1032dc805
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
package applicationModulepackageJava0; public class Foo170 { public void foo0() { new applicationModulepackageJava0.Foo169().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
51a1a146fb871ca8fa33221894906238fcf5c18d
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/rds-20140815/src/main/java/com/aliyun/rds20140815/models/DestroyDBInstanceRequest.java
15920d517a789b06c2f7d2c918b28ac662279994
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
2,623
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.rds20140815.models; import com.aliyun.tea.*; public class DestroyDBInstanceRequest extends TeaModel { /** * <p>The client token that is used to ensure the idempotence of the request.</p> * <br> * <p>> You can use the client to generate the value, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.</p> */ @NameInMap("ClientToken") public String clientToken; /** * <p>The ID of the instance. You can call the [DescribeDBInstances](~~26232~~) operation to query the ID of the instance.</p> */ @NameInMap("DBInstanceId") public String DBInstanceId; @NameInMap("OwnerAccount") public String ownerAccount; @NameInMap("OwnerId") public Long ownerId; @NameInMap("ResourceOwnerAccount") public String resourceOwnerAccount; @NameInMap("ResourceOwnerId") public Long resourceOwnerId; public static DestroyDBInstanceRequest build(java.util.Map<String, ?> map) throws Exception { DestroyDBInstanceRequest self = new DestroyDBInstanceRequest(); return TeaModel.build(map, self); } public DestroyDBInstanceRequest setClientToken(String clientToken) { this.clientToken = clientToken; return this; } public String getClientToken() { return this.clientToken; } public DestroyDBInstanceRequest setDBInstanceId(String DBInstanceId) { this.DBInstanceId = DBInstanceId; return this; } public String getDBInstanceId() { return this.DBInstanceId; } public DestroyDBInstanceRequest setOwnerAccount(String ownerAccount) { this.ownerAccount = ownerAccount; return this; } public String getOwnerAccount() { return this.ownerAccount; } public DestroyDBInstanceRequest setOwnerId(Long ownerId) { this.ownerId = ownerId; return this; } public Long getOwnerId() { return this.ownerId; } public DestroyDBInstanceRequest setResourceOwnerAccount(String resourceOwnerAccount) { this.resourceOwnerAccount = resourceOwnerAccount; return this; } public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } public DestroyDBInstanceRequest setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; return this; } public Long getResourceOwnerId() { return this.resourceOwnerId; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
3560a2e77143509250529a5bc10e07a0e457f339
aa0590e0ddd3d54abdbc05d50f36318b6687a98d
/uranus/src/test/java/com/lotus/learn/thinkinginjava/holding/ListFeatures.java
e4f3cb685c356da2e128ea36775193b81976303d
[]
no_license
surmount1314/lotus
7d4fb311f3187292c6bbd36891c660dc7d0b807c
aca0926b3f240c6efae4b6d4116815272060d57b
refs/heads/master
2022-12-23T22:02:15.548613
2018-04-22T08:03:29
2018-04-22T08:03:29
130,483,115
0
0
null
2022-12-16T03:53:35
2018-04-21T14:49:38
Java
UTF-8
Java
false
false
3,207
java
package com.lotus.learn.thinkinginjava.holding; //: holding/ListFeatures.java import static com.lotus.learn.thinkinginjava.net.mindview.util.Print.print; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Random; import com.lotus.learn.thinkinginjava.typeinfo.pets.Cymric; import com.lotus.learn.thinkinginjava.typeinfo.pets.Hamster; import com.lotus.learn.thinkinginjava.typeinfo.pets.Mouse; import com.lotus.learn.thinkinginjava.typeinfo.pets.Pet; import com.lotus.learn.thinkinginjava.typeinfo.pets.Pets; public class ListFeatures { public static void main(String[] args) { Random rand = new Random(47); List<Pet> pets = Pets.arrayList(7); print("1: " + pets); Hamster h = new Hamster(); pets.add(h); // Automatically resizes print("2: " + pets); print("3: " + pets.contains(h)); pets.remove(h); // Remove by object Pet p = pets.get(2); print("4: " + p + " " + pets.indexOf(p)); Pet cymric = new Cymric(); print("5: " + pets.indexOf(cymric)); print("6: " + pets.remove(cymric)); // Must be the exact object: print("7: " + pets.remove(p)); print("8: " + pets); pets.add(3, new Mouse()); // Insert at an index print("9: " + pets); List<Pet> sub = pets.subList(1, 4); print("subList: " + sub); print("10: " + pets.containsAll(sub)); Collections.sort(sub); // In-place sort print("sorted subList: " + sub); // Order is not important in containsAll(): print("11: " + pets.containsAll(sub)); Collections.shuffle(sub, rand); // Mix it up print("shuffled subList: " + sub); print("12: " + pets.containsAll(sub)); List<Pet> copy = new ArrayList<Pet>(pets); sub = Arrays.asList(pets.get(1), pets.get(4)); print("sub: " + sub); copy.retainAll(sub); print("13: " + copy); copy = new ArrayList<Pet>(pets); // Get a fresh copy copy.remove(2); // Remove by index print("14: " + copy); copy.removeAll(sub); // Only removes exact objects print("15: " + copy); copy.set(1, new Mouse()); // Replace an element print("16: " + copy); copy.addAll(2, sub); // Insert a list in the middle print("17: " + copy); print("18: " + pets.isEmpty()); pets.clear(); // Remove all elements print("19: " + pets); print("20: " + pets.isEmpty()); pets.addAll(Pets.arrayList(4)); print("21: " + pets); Object[] o = pets.toArray(); print("22: " + o[3]); Pet[] pa = pets.toArray(new Pet[0]); print("23: " + pa[3].id()); } } /* * Output: 1: [Rat, Manx, Cymric, Mutt, Pug, Cymric, Pug] 2: [Rat, Manx, Cymric, Mutt, Pug, Cymric, Pug, Hamster] 3: true 4: Cymric 2 5: -1 6: false * 7: true 8: [Rat, Manx, Mutt, Pug, Cymric, Pug] 9: [Rat, Manx, Mutt, Mouse, Pug, Cymric, Pug] subList: [Manx, Mutt, Mouse] 10: true sorted subList: * [Manx, Mouse, Mutt] 11: true shuffled subList: [Mouse, Manx, Mutt] 12: true sub: [Mouse, Pug] 13: [Mouse, Pug] 14: [Rat, Mouse, Mutt, Pug, Cymric, * Pug] 15: [Rat, Mutt, Cymric, Pug] 16: [Rat, Mouse, Cymric, Pug] 17: [Rat, Mouse, Mouse, Pug, Cymric, Pug] 18: false 19: [] 20: true 21: [Manx, * Cymric, Rat, EgyptianMau] 22: EgyptianMau 23: 14 */// :~
[ "17420410@qq.com" ]
17420410@qq.com
644272daeec9577bcd31c06b132b79a197b03e9c
590cebae4483121569983808da1f91563254efed
/Router/eps2-src/failed-messages/src/main/java/ru/acs/fts/eps2/failedMessages/dispatch/ReceiptsMessageDispatcher.java
1f2f43daf919d4e82d0cbe1770d3ee89b858f4ab
[]
no_license
ke-kontur/eps
8b00f9c7a5f92edeaac2f04146bf0676a3a78e27
7f0580cd82022d36d99fb846c4025e5950b0c103
refs/heads/master
2020-05-16T23:53:03.163443
2014-11-26T07:00:34
2014-11-26T07:01:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,921
java
package ru.acs.fts.eps2.failedMessages.dispatch; import java.util.Calendar; import javax.jms.JMSException; import javax.jms.Message; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Required; import com.ibm.msg.client.jms.JmsConstants; import com.ibm.msg.client.wmq.v6.base.internal.MQC; import ru.acs.fts.eps2.failedMessages.exceptions.MessageDispatchException; import ru.acs.fts.eps2.failedMessages.persistence.entities.Envelope; import ru.acs.fts.eps2.failedMessages.persistence.services.MessageService; import ru.acs.fts.eps2.failedMessages.supplementary.Configurator; import ru.acs.fts.eps2.failedMessages.supplementary.MessageSender; public class ReceiptsMessageDispatcher implements IMessageDispatcher { private static final Logger log = LoggerFactory.getLogger( ReceiptsMessageDispatcher.class ); private MessageService _messageService; private MessageSender _messageSender; private Configurator _configurator; // @formatter:off @Required public void setMessageService( MessageService messageService ) { _messageService = messageService; } public MessageService getMessageService( ) { return _messageService; } @Required public void setMessageSender( MessageSender messageSender ) { _messageSender = messageSender; } public MessageSender getMessageSender( ) { return _messageSender; } @Required public void setConfigurator( Configurator configurator ) { _configurator = configurator; } public Configurator getConfigurator( ) { return _configurator; } // @formatter:on @Override public void dispatch( Message message ) throws MessageDispatchException { try { String corrId = message.getJMSCorrelationID( ); if ( null == corrId ) throw new NullPointerException( "CorrelationID входящего сообщения - null!" ); String envlelopeId = getEnvelopeId( corrId ); log.info( "Полученный CorrelationID = {}; EnvelopeID = {}", corrId, envlelopeId ); log.info( "Feedback = {}", message.getObjectProperty( JmsConstants.JMS_IBM_FEEDBACK ) ); Envelope envelope = _messageService.getMessage( envlelopeId ); if ( null != envelope ) { Calendar msgDate = getMessageDateTime( message ); /* if ( isCoa( message ) ) { envelope.setCoaDatetime( msgDate ); envelope.setCoaSaveDatetime( now ); log.info( "Обнаружен заголовок JMS_IBM_REPORT_COA." ); } if ( isCod( message ) ) { envelope.setCodDatetime( msgDate ); envelope.setCodSaveDatetime( now ); log.info( "Обнаружен заголовок JMS_IBM_REPORT_COD." ); } _messageService.mergeMessage( envelope ); */ _messageService.updateMessage( envlelopeId, msgDate, isCoa( message ), isCod( message ) ); log.info( "Конверт сохранен." ); } if ( isFullData( corrId ) ) { _messageSender.sendMessage( message, _configurator.getFullDataReportsQueue( ), _configurator.getFullDataReportsQueueManager( ) ); log.info( "Сообщение перенаправлено." ); } else log.info( "Сообщение не перенаправлено." ); } catch ( Exception exc ) { String errorMsg = String.format( "Не удалось обработать сообщение: %s\nСообщение вызвавщее проблему: %s", exc.getMessage( ), message.toString( ) ); log.error( errorMsg, exc ); throw new MessageDispatchException( errorMsg, exc ); } } private Calendar getMessageDateTime( Message message ) throws JMSException { StringBuilder sbDateTime = new StringBuilder( message.getStringProperty( JmsConstants.JMS_IBM_PUTDATE ) ); sbDateTime.append( message.getStringProperty( JmsConstants.JMS_IBM_PUTTIME ) ); int millis = Integer.valueOf( sbDateTime.substring( 14, 16 ) ) * 10; String dateTimeString = sbDateTime.substring( 0, 14 ); DateTimeFormatter formatter = DateTimeFormat.forPattern( "yyyyMMddHHmmss" ); DateTime dateTime = formatter.parseDateTime( dateTimeString ).plusMillis( millis ); return dateTime.toGregorianCalendar( ); } private String getEnvelopeId( String corrId ) { return new StringBuilder( corrId.substring( 3, 35 ) ).insert( 8, "-" ).insert( 13, "-" ).insert( 18, "-" ).insert( 23, "-" ).toString( ); } @SuppressWarnings( "unused" ) private boolean checkProperty( Message message, String propertyName ) { boolean result; try { result = null != message.getObjectProperty( propertyName ); } catch ( JMSException ex ) { result = false; } return result; } private boolean isFullData( String corrId ) { /* boolean result; try { Integer coa = message.getIntProperty( JmsConstants.JMS_IBM_REPORT_COA ); result = null != coa ? coa == MQC.MQRO_COA_WITH_FULL_DATA : false; } catch ( Exception ex ) { result = false; } if ( ! result ) { try { Integer cod = message.getIntProperty( JmsConstants.JMS_IBM_REPORT_COD ); result = null != cod ? cod == MQC.MQRO_COD_WITH_FULL_DATA : false; } catch ( Exception ex ) { result = false; } } return result; */ return corrId.charAt( 36 ) == '1'; } private boolean isCoa( Message message ) { boolean result; try { Integer feedback = message.getIntProperty( JmsConstants.JMS_IBM_FEEDBACK ); result = MQC.MQFB_COA == feedback; } catch ( Throwable ex ) { result = false; } return result; } private boolean isCod( Message message ) { boolean result; try { Integer feedback = message.getIntProperty( JmsConstants.JMS_IBM_FEEDBACK ); result = MQC.MQFB_COD == feedback; } catch ( Throwable ex ) { result = false; } return result; } }
[ "m@brel.me" ]
m@brel.me
c6c645e50ba33536efa5473320ab5110170060fc
f83f02b7073419251ac135bdb5893f6d0b20e64a
/workspace/Core Java Practice/src/Type_Variable/Assignment2.java
2a13d4d9e332b39cd91d79e59d558b8953652d5a
[]
no_license
sheel2006/Mylearning
e9aebdb470bb3b0117807b4d4a8d57ff601c1402
b5a00623e48f4a4495ddb8fe362ac685cdb51bf7
refs/heads/master
2020-03-12T06:25:36.721299
2018-04-22T06:17:49
2018-04-22T06:17:49
130,484,988
0
0
null
null
null
null
UTF-8
Java
false
false
496
java
package Type_Variable; public class Assignment2 { int a =10;//instance variable int b =20;//instance variable static void m1(){ // calling instance variable inside static block Assignment2 t = new Assignment2(); System.out.println(t.a); System.out.println(t.b); }// Method is completed object destroyed static void m2(){ Assignment2 t1 = new Assignment2(); System.out.println(t1.a); System.out.println(t1.b); } public static void main(String[] args) { m1(); m2(); } }
[ "sheel2006@gmail.com" ]
sheel2006@gmail.com
829ec30631e0a108bab4f5641476082382809693
49b57339d939ea3f498249d3aacca1dec543163b
/jadx-snap-new/sources/com/google/android/gms/internal/zzkg.java
9f032a57f9482e829f525685091a3ff9ea346a5b
[]
no_license
8secz-johndpope/snapchat-re
1655036c41518c3a2aaa0c2543dc49f4acb93eaf
04f5c5bb627d21f620088525fffcf5c99abd7ce5
refs/heads/master
2020-08-24T09:14:38.209745
2019-06-14T05:13:44
2019-06-14T05:13:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
262
java
package com.google.android.gms.internal; @zzabh public final class zzkg extends zzlg { private final zzkf zzbgt; public zzkg(zzkf zzkf) { this.zzbgt = zzkf; } public final void onAdClicked() { this.zzbgt.onAdClicked(); } }
[ "blevy@protonmail.com" ]
blevy@protonmail.com
407cb87f0ea0cabd2c620566869c9d2f5d25c104
958b13739d7da564749737cb848200da5bd476eb
/src/main/java/com/alipay/api/response/AlipayOpenEchoOfflineSendResponse.java
daa2c1bf60041fade557f50dc98b416a3eeb5a5a
[ "Apache-2.0" ]
permissive
anywhere/alipay-sdk-java-all
0a181c934ca84654d6d2f25f199bf4215c167bd2
649e6ff0633ebfca93a071ff575bacad4311cdd4
refs/heads/master
2023-02-13T02:09:28.859092
2021-01-14T03:17:27
2021-01-14T03:17:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
596
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.open.echo.offline.send response. * * @author auto create * @since 1.0, 2019-01-18 14:24:54 */ public class AlipayOpenEchoOfflineSendResponse extends AlipayResponse { private static final long serialVersionUID = 7739994165274972838L; /** * 10000 */ @ApiField("word") private String word; public void setWord(String word) { this.word = word; } public String getWord( ) { return this.word; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
3591e4b8bcbfdb433706ad2cb515484f6340b28e
d1199af17c9a3061be50b0f167ff2afa0e943004
/FastBiz/core/com/fastbiz/core/bootstrap/service/BootstrapServiceWrapper.java
777c6f33f3146719645c24a52890945c6d3170b8
[]
no_license
sala223/FastBiz
7259bdbf3ee46f6c26d5bc67c276e030e49c4305
031b445f3b11ac38f594aad48ad6557ae356031d
refs/heads/master
2021-01-19T21:28:30.434797
2012-12-18T11:24:14
2012-12-18T11:24:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,146
java
package com.fastbiz.core.bootstrap.service; import java.util.Iterator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.fastbiz.common.utils.Assert; import com.fastbiz.core.bootstrap.Application; import com.fastbiz.core.bootstrap.service.BootstrapServiceEvent.Level; import com.fastbiz.core.bootstrap.service.BootstrapServiceEvent.Lifecycle; public class BootstrapServiceWrapper implements BootstrapService{ private static final Logger LOG = LoggerFactory.getLogger(BootstrapServiceWrapper.class); protected BootstrapService service; public BootstrapServiceWrapper(BootstrapService service) { Assert.notNull(service); this.service = service; } @Override public void init(Application application){ try { LOG.info("Start to initialize bootstrap service {} ", service.getClass()); service.init(application); Iterator<ServiceEventListener> iterator = service.getServiceEventListeners(); while (iterator != null && iterator.hasNext()) { ServiceEventListener listener = iterator.next(); try { listener.onEvent(new BootstrapServiceEvent(service, Lifecycle.init, Level.info)); } catch (Throwable e) { String fmt = new String("Failed executing listener %s on initializing bootstrap service %s"); LOG.error(String.format(fmt, listener.getClass(), this.service), e); } } } catch (Throwable e) { fireServiceEvent(BootstrapServiceEvent.createInitErrorEvent(service, e)); } } @Override public void start(Application application){ try { LOG.info("Start to run bootstrap service {} ", service.getClass()); service.start(Application.getApplication()); Iterator<ServiceEventListener> iterator = service.getServiceEventListeners(); while (iterator != null && iterator.hasNext()) { ServiceEventListener listener = iterator.next(); try { listener.onEvent(new BootstrapServiceEvent(service, Lifecycle.start, Level.info)); } catch (Throwable e) { String fmt = new String("Failed executing listener %s on starting bootstrap service %s"); LOG.error(String.format(fmt, listener.getClass(), this.service), e); } } } catch (Throwable ex) { fireServiceEvent(BootstrapServiceEvent.createStartErrorEvent(service, ex)); } } @Override public void stop(Application application){ try { LOG.info("Start to stop service {} ", service.getClass()); service.stop(Application.getApplication()); Iterator<ServiceEventListener> iterator = service.getServiceEventListeners(); while (iterator != null && iterator.hasNext()) { ServiceEventListener listener = iterator.next(); try { listener.onEvent(new BootstrapServiceEvent(service, Lifecycle.start, Level.info)); } catch (Throwable e) { String fmt = new String("Failed executing listener %s on stopping bootstrap service %s"); LOG.error(String.format(fmt, listener.getClass(), this.service), e); } } } catch (Throwable e) { fireServiceEvent(BootstrapServiceEvent.createStopErrorEvent(service, e)); } } @Override public void addServiceEventListener(ServiceEventListener listener){ service.addServiceEventListener(listener); } @Override public Iterator<ServiceEventListener> getServiceEventListeners(){ return service.getServiceEventListeners(); } @Override public void fireServiceEvent(BootstrapServiceEvent event){ service.fireServiceEvent(event); } public BootstrapService unwrap(){ return service; } }
[ "sala223@msn.com" ]
sala223@msn.com
8aa65de9f3022f09f056051302516298a16d1ede
37448b103ea116f768e3acf6e61127c0758006ec
/samples/src/com/guangzhou/gov/view/Tab3Activity.java
e2e78a83f9027e0d3aea8d13099bf7c00105a3fc
[ "Apache-2.0" ]
permissive
chenjianping99/onlineAffairs
52aec0b86ad83d717471f658b61972d47d0c5c47
5731d79497a31c5dae93e8a9a4c2eeccd64bb08f
refs/heads/master
2021-01-01T18:43:02.362199
2015-01-05T03:04:24
2015-01-05T03:04:24
28,794,250
0
0
null
null
null
null
UTF-8
Java
false
false
8,328
java
package com.guangzhou.gov.view; import android.content.Context; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.util.TypedValue; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; import android.widget.ImageView; import android.widget.TextView; import com.guangzhou.gov.R; import com.guangzhou.gov.manager.UserManager; import com.guangzhou.gov.net.http.Http; import com.guangzhou.gov.net.http.HttpListener; import com.guangzhou.gov.net.http.HttpStatus; import com.guangzhou.gov.net.tools.HttpLog; import com.guangzhou.gov.util.Constant; /** * * @ClassName: IndexActivity2 * @author chenjianping * @date 2014-11-7 * */ public class Tab3Activity extends AbstractBaseActivity implements OnClickListener, HttpListener { public static final String CLOSE_TAG = "close"; public static final String LOGIN_TAG = "login"; private boolean mShouldClose = false; private boolean mShouldLogin = false; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); mContext = this; mShouldClose = getIntent().getBooleanExtra(CLOSE_TAG, false); mShouldLogin = getIntent().getBooleanExtra(LOGIN_TAG, false); checkIsLogin(); } private Http mHttp; private void checkIsLogin() { if (!mShouldLogin && UserManager.getInstance().mUser != null && UserManager.getInstance().mUser.getUserInfo() != null) { // already login, show person addMyinfoPage(); } else { mHttp = new Http(this); mHttp.setHttpListener(this); // show login pager addLoginView(); } } private MyInfoPageView myInfoPageView; private void addMyinfoPage() { myInfoPageView = new MyInfoPageView(mContext); setContentView(myInfoPageView); } private Context mContext; private FrameLayout mContentView; private void addLoginView() { mContentView = new FrameLayout(mContext); LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT, Gravity.CENTER); mContentView.setLayoutParams(params); setContentView(mContentView); mContentView.setBackgroundColor(Color.WHITE); addmTitle(); addLoginBody(); addLine(); } private void addLine() { View v = new View(mContext); LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, 1, Gravity.BOTTOM); v.setBackgroundColor(0xffd6d6d6); mContentView.addView(v, params); } /*private TextView mTitle; private void addmTitle() { mTitle = new TextView(mContext); mTitle.setTextColor(Color.WHITE); mTitle.setTextSize(TypedValue.COMPLEX_UNIT_PX, ViewUtils.getPXByWidth(60)); //mTitle.setTypeface(CircleContainer.sTypeface); mTitle.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT); mTitle.setText(R.string.login_title); Drawable a = getResources().getDrawable(R.drawable.login_title_icon); a.setBounds(0, 0, ViewUtils.getPXByHeight(108), ViewUtils.getPXByHeight(108)); mTitle.setCompoundDrawables(a, null, null, null); mTitle.setCompoundDrawablePadding(OnlineAffairsView.LEFT_MARGIN); mTitle.setPadding(OnlineAffairsView.LEFT_MARGIN, 0, 0, 0); LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, OnlineAffairsView.TITLE_H, Gravity.TOP); mTitle.setBackgroundColor(Constant.sBlueColor); mContentView.addView(mTitle, params); mTitle.setOnClickListener(this); }*/ private TextView mTitle; private ImageView mSearch; public static final int TITLE_H = ViewUtils.getPXByHeight(168); public static final int LEFT_MARGIN = ViewUtils.getPXByWidth(30); private void addmTitle() { mTitle = new TextView(mContext); mTitle.setTextColor(Color.WHITE); mTitle.setTextSize(TypedValue.COMPLEX_UNIT_PX, ViewUtils.getPXByWidth(60)); //mTitle.setTypeface(CircleContainer.sTypeface); mTitle.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT); mTitle.setText(R.string.title); Drawable a = getResources().getDrawable(R.drawable.name_icon); a.setBounds(0, 0, ViewUtils.getPXByHeight(108), ViewUtils.getPXByHeight(108)); mTitle.setCompoundDrawables(a, null, null, null); mTitle.setCompoundDrawablePadding(LEFT_MARGIN); mTitle.setPadding(LEFT_MARGIN, 0, 0, 0); LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, TITLE_H, Gravity.TOP); mTitle.setBackgroundColor(Constant.sBlueColor); mContentView.addView(mTitle, params); mSearch = new ImageView(mContext); mSearch.setImageResource(R.drawable.title_search); int w = ViewUtils.getPXByHeight(53); LayoutParams mSearchParams = new LayoutParams(w, w, Gravity.TOP | Gravity.RIGHT); mSearchParams.topMargin = (TITLE_H - w) / 2; mSearchParams.rightMargin = ViewUtils.getPXByWidth(80); mContentView.addView(mSearch, mSearchParams); } private EditText mTextName, mPassword; private Button mLoginBtn; private LayoutInflater mInflater; private void addLoginBody() { mInflater = LayoutInflater.from(this); View mLogin = mInflater.inflate(R.layout.login, mContentView, false); mTextName = (EditText) mLogin.findViewById(R.id.et_zh); mPassword = (EditText) mLogin.findViewById(R.id.et_mima); mLoginBtn = (Button) mLogin.findViewById(R.id.btn_login); int w = ViewUtils.getPXByWidth(850); LayoutParams mParams = new LayoutParams(w, w, Gravity.CENTER); mContentView.addView(mLogin, mParams); mLoginBtn.setOnClickListener(this); } @Override public void onClick(View v) { if (v == mLoginBtn) { String userNameValue = mTextName.getText().toString(); String passwordValue = mPassword.getText().toString(); if (mHttp != null && userNameValue.length() > 0 && userNameValue.length() > 0) { mHttp.doUserLogin("登录中...", userNameValue, passwordValue); //mHttp.doUserLogin("zhangzhang", "abc123456"); } else { /*Toast toast = Toast.makeText(mContext, "用户名和密码不能为空" , Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); toast.show();*/ MyToast.showToast(mContext, "用户名和密码不能为空" ); } } } @Override protected void onDestroy() { super.onDestroy(); } @Override public void onHttpError(HttpStatus mHs) { HttpLog.d(null, "Tab3Activity onHttpError"); /*Toast toast = Toast.makeText(mContext, "请检查您的网络连接" + mHs.error, Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); toast.show();*/ MyToast.showToast(mContext, "请检查您的网络连接" + mHs.error ); } @Override public void onSuccess(Object parent, HttpStatus mHttpStatus) { if (UserManager.getInstance().mUser != null && UserManager.getInstance().mUser.getUserInfo() != null) { /*Toast toast = Toast.makeText(mContext, "登录成功", Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); toast.show();*/ MyToast.showToast(mContext, "登录成功"); if (mShouldClose) { finish(); } else { addMyinfoPage(); } HttpLog.d(null, "UserInfo = " + UserManager.getInstance().mUser.getUserInfo().toString()); } else { /*Toast toast = Toast.makeText(mContext, "用户名或密码错误: ", Toast.LENGTH_LONG); toast.setGravity(Gravity.CENTER, 0, 0); toast.show();*/ MyToast.showToast(mContext, "用户名或密码错误"); } HttpLog.d(null, "Tab3Activity onSuccess"); } @Override public void onFail(HttpStatus mHs) { String msg = mHs.error; if (mHs.error.length() < 1) { msg = "登录失败,请检查网络"; } MyToast.showToast(mContext, msg); } @Override public void onBackPressed() { if (myInfoPageView != null) { if (myInfoPageView.ismIsFirstView()) { super.onBackPressed(); } } else { super.onBackPressed(); } } }
[ "=" ]
=
a8be29eff172588149fb7f5576819809b54b9563
cfa03c8cb47922a6a95141d4d4aee1885b0a35b5
/src/main/java/org/venuspj/ddd/model/repository/CrudRepository.java
028b285617e4a512d2d1bf09c14b3326fff5d220
[]
no_license
mizo432/venus-ddd
3f5ef8711ae8a5054fea4b3bb0653e4d05760b11
e84a3eb906fed56a8ba81bf2a96b89896dedec7e
refs/heads/develop
2021-07-15T03:08:38.691151
2020-05-06T10:51:30
2020-05-06T10:51:30
135,920,536
0
0
null
2020-02-24T15:24:24
2018-06-03T16:21:09
Java
UTF-8
Java
false
false
4,516
java
package org.venuspj.ddd.model.repository; import org.venuspj.ddd.model.entity.Entity; import org.venuspj.ddd.model.entity.EntityIdentifier; import org.venuspj.ddd.model.values.primitives.ListValue; import java.util.List; public interface CrudRepository<E extends Entity<E, EI>, EI extends EntityIdentifier<EI>> { /** * 識別子に該当するエンティティをリポジトリから取得する。 * * @param criteria 判断条件 * @return エンティティ * @throws EntityNotFoundRuntimeException エンティティが見つからなかった場合 * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ E resolve(EntityCriteria<E> criteria) throws EntityNotFoundRuntimeException; /** * 識別子に該当するエンティティをリポジトリから取得する。 * * @param identifier 判断条件 * @return エンティティ * @throws EntityNotFoundRuntimeException エンティティが見つからなかった場合 * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ E resolve(EI identifier) throws EntityNotFoundRuntimeException; /** * 識別子に該当するエンティティをリポジトリから取得する。 * * @param criteria 判断条件 * @return エンティティ * @throws EntityNotFoundRuntimeException エンティティが見つからなかった場合 * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ List<E> resolveAll(EntityCriteria<E> criteria) throws EntityNotFoundRuntimeException; /** * 指定した識別子のエンティティが存在するかを返す。 * * @param criteria 判断条件 * @return 存在する場合はtrue * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ boolean contains(EntityCriteria<E> criteria); /** * 指定した識別子のエンティティが存在するかを返す。 * * @param identifier 判断条件 * @return 存在する場合はtrue * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ boolean contains(EI identifier); /** * エンティティを保存する。 * * @param entities 保存する対象のエンティティ * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ void store(ListValue<E, ?> entities); /** * エンティティを保存する。 * * @param entity 保存する対象のエンティティ * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ void store(E entity); /** * 指定したエンティティを削除する。 * * @param entities エンティティ * @throws EntityNotFoundRuntimeException 指定された識別子を持つエンティティが見つからなかった場合 * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ void delete(ListValue<E, ?> entities) throws EntityNotFoundRuntimeException; /** * 指定した識別子のエンティティを削除する。 * * @param criteria 判断条件 * @throws IllegalArgumentException 複数件のエンティティが返された場合 * @throws EntityNotFoundRuntimeException 指定された識別子を持つエンティティが見つからなかった場合 * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ void delete(EntityCriteria<E> criteria) throws EntityNotFoundRuntimeException; /** * 指定した識別子のエンティティを削除する。 * * @param identifier 判断条件 * @throws IllegalArgumentException 複数件のエンティティが返された場合 * @throws EntityNotFoundRuntimeException 指定された識別子を持つエンティティが見つからなかった場合 * @throws RepositoryCouldNotAccessRuntimeException リポジトリにアクセスできない場合 */ void delete(EI identifier) throws EntityNotFoundRuntimeException; }
[ "hachirouuemon.mizoguchi@gmail.com" ]
hachirouuemon.mizoguchi@gmail.com
8f41ba3bff929522652bdaa3f0d0ee101e899f3a
4f00d990f611630595e75eb6efb02f0babe99b19
/JFramework/crypto/src/main/java/it/richkmeli/jframework/crypto/algorithm/bouncycastle/asn1/x509/SubjectPublicKeyInfo.java
1060d4f1cdb16e278ee9d49dc4e14de872ef8412
[ "Apache-2.0", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
whichbuffer/JFramework
9bd16cf2b304feb1f9d1d9a4fb95400b48e96c02
ef9f227c91d639eaf209a07727ea299a67757300
refs/heads/master
2022-12-27T02:09:28.988085
2020-08-08T23:01:42
2020-08-08T23:01:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,793
java
package it.richkmeli.jframework.crypto.algorithm.bouncycastle.asn1.x509; import it.richkmeli.jframework.crypto.algorithm.bouncycastle.asn1.*; import java.io.IOException; import java.util.Enumeration; /** * The object that contains the public key stored in a certificate. * <p> * The getEncoded() method in the public keys in the JCE produces a DER * encoded one of these. */ public class SubjectPublicKeyInfo extends ASN1Object { private AlgorithmIdentifier algId; private DERBitString keyData; public static SubjectPublicKeyInfo getInstance( ASN1TaggedObject obj, boolean explicit) { return getInstance(ASN1Sequence.getInstance(obj, explicit)); } public static SubjectPublicKeyInfo getInstance( Object obj) { if (obj instanceof SubjectPublicKeyInfo) { return (SubjectPublicKeyInfo) obj; } else if (obj != null) { return new SubjectPublicKeyInfo(ASN1Sequence.getInstance(obj)); } return null; } public SubjectPublicKeyInfo( AlgorithmIdentifier algId, ASN1Encodable publicKey) throws IOException { this.keyData = new DERBitString(publicKey); this.algId = algId; } public SubjectPublicKeyInfo( AlgorithmIdentifier algId, byte[] publicKey) { this.keyData = new DERBitString(publicKey); this.algId = algId; } /** * @deprecated use SubjectPublicKeyInfo.getInstance() */ public SubjectPublicKeyInfo( ASN1Sequence seq) { if (seq.size() != 2) { throw new IllegalArgumentException("Bad sequence size: " + seq.size()); } Enumeration e = seq.getObjects(); this.algId = AlgorithmIdentifier.getInstance(e.nextElement()); this.keyData = DERBitString.getInstance(e.nextElement()); } public AlgorithmIdentifier getAlgorithm() { return algId; } /** * @return alg ID. * @deprecated use getAlgorithm() */ public AlgorithmIdentifier getAlgorithmId() { return algId; } /** * for when the public key is an encoded object - if the bitstring * can't be decoded this routine throws an IOException. * * @return the public key as an ASN.1 primitive. * @throws IOException - if the bit string doesn't represent a DER * encoded object. */ public ASN1Primitive parsePublicKey() throws IOException { return ASN1Primitive.fromByteArray(keyData.getOctets()); } /** * for when the public key is an encoded object - if the bitstring * can't be decoded this routine throws an IOException. * * @return the public key as an ASN.1 primitive. * @throws IOException - if the bit string doesn't represent a DER * encoded object. * @deprecated use parsePublicKey */ public ASN1Primitive getPublicKey() throws IOException { return ASN1Primitive.fromByteArray(keyData.getOctets()); } /** * for when the public key is raw bits. * * @return the public key as the raw bit string... */ public DERBitString getPublicKeyData() { return keyData; } /** * Produce an object suitable for an ASN1OutputStream. * <pre> * SubjectPublicKeyInfo ::= SEQUENCE { * algorithm AlgorithmIdentifier, * publicKey BIT STRING } * </pre> */ public ASN1Primitive toASN1Primitive() { ASN1EncodableVector v = new ASN1EncodableVector(2); v.add(algId); v.add(keyData); return new DERSequence(v); } }
[ "richkmeli@gmail.com" ]
richkmeli@gmail.com
d092d2dc39b292bb93c7000a409a82ee78348567
6e57bdc0a6cd18f9f546559875256c4570256c45
/packages/apps/Gallery2/src/com/android/photos/GalleryActivity.java
51c78d64d55a41a207486d9d0d0431373d247f40
[]
no_license
dongdong331/test
969d6e945f7f21a5819cd1d5f536d12c552e825c
2ba7bcea4f9d9715cbb1c4e69271f7b185a0786e
refs/heads/master
2023-03-07T06:56:55.210503
2020-12-07T04:15:33
2020-12-07T04:15:33
134,398,935
2
1
null
2022-11-21T07:53:41
2018-05-22T10:26:42
null
UTF-8
Java
false
false
6,006
java
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.photos; import android.app.ActionBar; import android.app.ActionBar.Tab; import android.app.Activity; import android.app.Fragment; import android.app.FragmentTransaction; import android.content.Intent; import android.os.Bundle; import androidx.legacy.app.FragmentPagerAdapter; import androidx.viewpager.widget.ViewPager; import android.view.Menu; import android.view.MenuItem; import android.view.ViewGroup; import com.android.gallery3d.R; import java.util.ArrayList; public class GalleryActivity extends Activity implements MultiChoiceManager.Provider { private MultiChoiceManager mMultiChoiceManager; private ViewPager mViewPager; private TabsAdapter mTabsAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mMultiChoiceManager = new MultiChoiceManager(this); mViewPager = new ViewPager(this); mViewPager.setId(R.id.viewpager); setContentView(mViewPager); ActionBar ab = getActionBar(); ab.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); ab.setDisplayShowHomeEnabled(false); ab.setDisplayShowTitleEnabled(false); mTabsAdapter = new TabsAdapter(this, mViewPager); mTabsAdapter.addTab(ab.newTab().setText(R.string.tab_photos), PhotoSetFragment.class, null); mTabsAdapter.addTab(ab.newTab().setText(R.string.tab_albums), AlbumSetFragment.class, null); if (savedInstanceState != null) { ab.setSelectedNavigationItem(savedInstanceState.getInt("tab", 0)); } } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt("tab", getActionBar().getSelectedNavigationIndex()); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.gallery, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.menu_camera: // TODO: Call the correct Camera intent. throw new RuntimeException("Not implemented yet."); // Intent intent = new Intent(this, CameraActivity.class); // intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // startActivity(intent); // return true; default: return super.onOptionsItemSelected(item); } } public static class TabsAdapter extends FragmentPagerAdapter implements ActionBar.TabListener, ViewPager.OnPageChangeListener { private final GalleryActivity mActivity; private final ActionBar mActionBar; private final ViewPager mViewPager; private final ArrayList<TabInfo> mTabs = new ArrayList<TabInfo>(); static final class TabInfo { private final Class<?> clss; private final Bundle args; TabInfo(Class<?> _class, Bundle _args) { clss = _class; args = _args; } } public TabsAdapter(GalleryActivity activity, ViewPager pager) { super(activity.getFragmentManager()); mActivity = activity; mActionBar = activity.getActionBar(); mViewPager = pager; mViewPager.setAdapter(this); mViewPager.setOnPageChangeListener(this); } public void addTab(ActionBar.Tab tab, Class<?> clss, Bundle args) { TabInfo info = new TabInfo(clss, args); tab.setTag(info); tab.setTabListener(this); mTabs.add(info); mActionBar.addTab(tab); notifyDataSetChanged(); } @Override public int getCount() { return mTabs.size(); } @Override public Fragment getItem(int position) { TabInfo info = mTabs.get(position); return Fragment.instantiate(mActivity, info.clss.getName(), info.args); } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { } @Override public void onPageSelected(int position) { mActionBar.setSelectedNavigationItem(position); } @Override public void setPrimaryItem(ViewGroup container, int position, Object object) { super.setPrimaryItem(container, position, object); mActivity.mMultiChoiceManager.setDelegate((MultiChoiceManager.Delegate) object); } @Override public void onPageScrollStateChanged(int state) { } @Override public void onTabSelected(Tab tab, FragmentTransaction ft) { Object tag = tab.getTag(); for (int i = 0; i < mTabs.size(); i++) { if (mTabs.get(i) == tag) { mViewPager.setCurrentItem(i); } } } @Override public void onTabUnselected(Tab tab, FragmentTransaction ft) { } @Override public void onTabReselected(Tab tab, FragmentTransaction ft) { } } @Override public MultiChoiceManager getMultiChoiceManager() { return mMultiChoiceManager; } }
[ "dongdong331@163.com" ]
dongdong331@163.com
843b58a7de69148570be188ad045dcb799e7b265
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14263-86-10-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/InternalTemplateManager_ESTest.java
5933e90aca6165565f5d67be9bb16f3e6f322123
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
584
java
/* * This file was automatically generated by EvoSuite * Sun Apr 05 02:11:25 UTC 2020 */ package com.xpn.xwiki.internal.template; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class InternalTemplateManager_ESTest extends InternalTemplateManager_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
3874f4c7b2f94d945826125c69d77dab63c56024
801ea23bf1e788dee7047584c5c26d99a4d0b2e3
/com/planet_ink/coffee_mud/Abilities/Spells/Spell_LocateObject.java
c4e8ed94ce642575bb0b20f0e7e2f5e4880a066d
[ "Apache-2.0" ]
permissive
Tearstar/CoffeeMud
61136965ccda651ff50d416b6c6af7e9a89f5784
bb1687575f7166fb8418684c45f431411497cef9
refs/heads/master
2021-01-17T20:23:57.161495
2014-10-18T08:03:37
2014-10-18T08:03:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,337
java
package com.planet_ink.coffee_mud.Abilities.Spells; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.TrackingLibrary; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2014 Bo Zimmerman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ @SuppressWarnings({"unchecked","rawtypes"}) public class Spell_LocateObject extends Spell { @Override public String ID() { return "Spell_LocateObject"; } private final static String localizedName = CMLib.lang().L("Locate Object"); @Override public String name() { return localizedName; } @Override protected int canTargetCode(){return 0;} @Override public int classificationCode(){return Ability.ACODE_SPELL|Ability.DOMAIN_DIVINATION;} @Override public int abstractQuality(){ return Ability.QUALITY_INDIFFERENT;} @Override public boolean invoke(MOB mob, Vector commands, Physical givenTarget, boolean auto, int asLevel) { if(commands.size()<1) { mob.tell(L("Locate what?")); return false; } int minLevel=Integer.MIN_VALUE; int maxLevel=Integer.MAX_VALUE; String s=(String)commands.lastElement(); boolean levelAdjust=false; while((commands.size()>1) &&((CMath.s_int(s)>0) ||(s.startsWith(">")) ||(s.startsWith("<")))) { levelAdjust=true; boolean lt=true; if(s.startsWith(">")) { lt=false; s=s.substring(1); } else if(s.startsWith("<")) s=s.substring(1); final int levelFind=CMath.s_int(s); if(lt) maxLevel=levelFind; else minLevel=levelFind; commands.removeElementAt(commands.size()-1); if(commands.size()>1) s=(String)commands.lastElement(); else s=""; } final String what=CMParms.combine(commands,0); if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final int maxFound=1+(super.getXLEVELLevel(mob)); final boolean success=proficiencyCheck(mob,0,auto); if(success) { final CMMsg msg=CMClass.getMsg(mob,null,this,verbalCastCode(mob,null,auto),auto?"":L("^S<S-NAME> invoke(s) a divination, shouting '@x1'^?.",what)); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); final List<String> itemsFound=new Vector<String>(); final HashSet areas=new HashSet(); final HashSet areasTried=new HashSet(); Area A=null; int numAreas=(int)Math.round(CMath.mul(CMLib.map().numAreas(),0.90))+1; if(numAreas>CMLib.map().numAreas()) numAreas=CMLib.map().numAreas(); int tries=numAreas*numAreas; while((areas.size()<numAreas)&&(((--tries)>0))) { A=CMLib.map().getRandomArea(); if((A!=null)&&(!areasTried.contains(A))) { areasTried.add(A); if((CMLib.flags().canAccess(mob,A)) &&(!CMath.bset(A.flags(),Area.FLAG_INSTANCE_CHILD))) areas.add(A); else numAreas--; } } MOB inhab=null; Environmental item=null; Room room=null; ShopKeeper SK=null; final TrackingLibrary.TrackingFlags flags=new TrackingLibrary.TrackingFlags(); final List<Room> checkSet=CMLib.tracking().getRadiantRooms(mob.location(),flags,50+adjustedLevel(mob,asLevel)); for (final Room room2 : checkSet) { room=CMLib.map().getRoom(room2); if(!CMLib.flags().canAccess(mob,room)) continue; item=room.findItem(null,what); if((item!=null) &&(CMLib.flags().canBeLocated((Item)item))) { final String str=L("@x1 is in a place called '@x2'.",item.name(),room.displayText(mob)); itemsFound.add(str); } for(int i=0;i<room.numInhabitants();i++) { inhab=room.fetchInhabitant(i); if(inhab==null) break; item=inhab.findItem(what); SK=CMLib.coffeeShops().getShopKeeper(inhab); if((item==null)&&(SK!=null)) item=SK.getShop().getStock(what,mob); if((item instanceof Item) &&(CMLib.flags().canBeLocated((Item)item)) &&(((Item)item).phyStats().level()>minLevel) &&(((Item)item).phyStats().level()<maxLevel)) { final CMMsg msg2=CMClass.getMsg(mob,inhab,this,verbalCastCode(mob,null,auto),null); if(room.okMessage(mob,msg2)) { room.send(mob,msg2); final String str=L("@x1@x2 is being carried by @x3 in a place called '@x4'.",item.name(),((!levelAdjust)?"":("("+((Item)item).phyStats().level()+")")),inhab.name(),room.displayText(mob)); itemsFound.add(str); break; } } } if(itemsFound.size()>=maxFound) break; } if(itemsFound.size()==0) mob.tell(L("Your magic fails to focus on anything called '@x1'.",what)); else { while(itemsFound.size()>maxFound) itemsFound.remove(CMLib.dice().roll(1,itemsFound.size(),-1)); for(final String found : itemsFound) mob.tell(found); } } } else beneficialWordsFizzle(mob,null,L("<S-NAME> invoke(s) a divination, shouting '@x1', but there is no answer.",what)); // return whether it worked return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
b2af9b3dad319d789bdb0768365a33c060bc293e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_1cfc0fc54d937d5c04a407c31adb3097af9d2ea7/QuartzClassLoadHelper/2_1cfc0fc54d937d5c04a407c31adb3097af9d2ea7_QuartzClassLoadHelper_s.java
aeab72fe32c95f83d64f96056580a33f6c9930a1
[]
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,884
java
package org.red5.classloading; import java.io.InputStream; import java.net.URL; import org.quartz.spi.ClassLoadHelper; import org.red5.logging.Red5LoggerFactory; import org.red5.server.tomcat.TomcatLoader; import org.slf4j.Logger; /** * A <code>ClassLoadHelper</code> that determines the correct class loader to * use for a scheduler. * * @see org.quartz.spi.ClassLoadHelper * * @author Paul Gregoire (mondain@gmail.com) */ public class QuartzClassLoadHelper implements ClassLoadHelper { private static Logger log = Red5LoggerFactory.getLogger(TomcatLoader.class); private ClassLoader initClassLoader; /* ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); if (classLoader == null) { classLoader = this.getClass().getClassLoader(); result= classLoader.getResourceAsStream( name ); } else { result= classLoader.getResourceAsStream( name ); if (result == null) { classLoader = this.getClass().getClassLoader(); result= classLoader.getResourceAsStream( name ); } } */ /** * Called to give the ClassLoadHelper a chance to initialize itself, * including the opportunity to "steal" the class loader off of the calling * thread, which is the thread that is initializing Quartz. */ public void initialize() { initClassLoader = Thread.currentThread().getContextClassLoader(); log.debug("Initialized with classloader: {}", initClassLoader); } /** * Return the class with the given name. */ public Class<?> loadClass(String name) throws ClassNotFoundException { return getClassLoader().loadClass(name); } /** * Finds a resource with a given name. This method returns null if no * resource with this name is found. * @param name name of the desired resource * @return a java.net.URL object */ public URL getResource(String name) { return getClassLoader().getResource(name); } /** * Finds a resource with a given name. This method returns null if no * resource with this name is found. * @param name name of the desired resource * @return a java.io.InputStream object */ public InputStream getResourceAsStream(String name) { return getClassLoader().getResourceAsStream(name); } /** * Enable sharing of the class-loader with 3rd party (e.g. digester). * * @return the class-loader user be the helper. */ public ClassLoader getClassLoader() { log.debug("Class classloader: {} Thread classloader: {}", this.getClass().getClassLoader(), Thread.currentThread().getContextClassLoader()); return Thread.currentThread().getContextClassLoader(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8f4fa77b1452a8878f9b94d4c34343cad133122c
4a8d3f5c716e5d0bed5a64b800a10b8d1c62b1a8
/reversi/src/main/java/com/ue/reversi/ui/SingleModeAty.java
8851bdceeff75c735c5700cc79308d6c501127b7
[]
no_license
newPersonKing/android-
012578d82614af76f5d245108734e248c7142bb0
e66cd48fb6ebe3e55c12211a26444da059e77002
refs/heads/master
2020-03-29T01:14:33.092121
2018-09-19T02:11:22
2018-09-19T02:11:22
149,378,761
1
0
null
null
null
null
UTF-8
Java
false
false
5,056
java
package com.ue.reversi.ui; import com.hyphenate.easeui.game.AILevelDialog; import com.hyphenate.easeui.game.GameConstants; import com.hyphenate.easeui.game.base.BaseSingleModeAty; import com.hyphenate.easeui.game.iterface.OnAIChangedListener; import com.hyphenate.easeui.game.iterface.OnUndoListener; import com.ue.common.xsharedpref.XSharedPref; import com.ue.reversi.R; import com.ue.reversi.bean.ReversiMove; import com.ue.reversi.bean.Statistic; import com.ue.reversi.util.Algorithm; import com.ue.reversi.util.Rule; import com.ue.reversi.util.Util; import com.ue.reversi.widget.ReversiView; import static com.hyphenate.easeui.game.GameConstants.PREF_AP_DIFFICULTY; import static com.hyphenate.easeui.game.GameConstants.PREF_AP_IS_FIRST; import static java.lang.Thread.sleep; /** * 逻辑描述: * 进入本页面在获取等级和先后手数据进行初始化后即可开始游戏 * 游戏结束后点击新局重新初始化 * 点击等级按钮可以选择等级和先后手 */ public class SingleModeAty extends BaseSingleModeAty { private AILevelDialog mAILevelDialog; private byte[][] tmp = new byte[8][8]; private int sleepTime; private void aiPlay() { new Thread(new Runnable() { @Override public void run() { try { sleep(sleepTime); } catch (InterruptedException e) { e.printStackTrace(); } int legalMoves = Rule.getLegalMoves(((ReversiView) game_chessboard).getChessBoard(), ((ReversiView) game_chessboard).getOppoColor()).size(); if (legalMoves > 0) { Util.copyBinaryArray(((ReversiView) game_chessboard).getChessBoard(), tmp); final ReversiMove move = Algorithm.getGoodMove(tmp, difficulty, ((ReversiView) game_chessboard).getOppoColor(), difficulty); runOnUiThread(new Runnable() { @Override public void run() { game_chessboard.playChess(new int[]{move.x, move.y}); } }); } } }).start(); } public void updatePanel() { Statistic statistic = Rule.analyse(((ReversiView) game_chessboard).getChessBoard(), ((ReversiView) game_chessboard).getMyColor()); game_user_panel.setMyExtraTxt(" × " + statistic.PLAYER); game_user_panel.setOppoExtraTxt(" × " + statistic.AI); game_user_panel.updateFocus(game_chessboard.isMyTurn()); } @Override public void afterIPlayed(int[] data) { if (!game_chessboard.isMyTurn()) { aiPlay(); } } @Override public void afterOppoPlayed(int[] data) { if (!game_chessboard.isMyTurn()) { aiPlay(); } } @Override public void startGame() { game_chessboard.startGame(isIPlayFirst); updatePanel(); if (!game_chessboard.isMyTurn()) { aiPlay(); } } public void initUserInfo() { if (isIPlayFirst) { game_user_panel.setMyImage(firstPlayImage); game_user_panel.setOppoImage(lastPlayImage); } else { game_user_panel.setMyImage(lastPlayImage); game_user_panel.setOppoImage(firstPlayImage); } game_user_panel.setMyExtraTxt(" × " + 2); game_user_panel.setOppoExtraTxt(" × " + 2); game_user_panel.updateFocus(game_chessboard.isMyTurn()); game_chessboard.setOnUndoListener(new OnUndoListener() { @Override public void onUndo(int[] data) { if (!game_chessboard.isMyTurn()) { aiPlay(); } } }); } @Override public void chooseAILevel() { if (null == mAILevelDialog) { mAILevelDialog = AILevelDialog.newInstance(GameConstants.GAME_AP, new OnAIChangedListener() { @Override public void onAIChanged(int rDifficulty, boolean isFirst) { isIPlayFirst = isFirst; difficulty = rDifficulty; game_user_panel.setOppoName(NAME_OF_AI[difficulty]); sleepTime = difficulty >= 5 ? 0 : 2000; initUserInfo(); startGame(); mAILevelDialog.dismiss(); } }); } if (!mAILevelDialog.isVisible() && !isFinishing()) { mAILevelDialog.show(getSupportFragmentManager(), null); } } @Override public void initAtyRes() { setAtyRes(R.layout.rv_aty_single_m, R.drawable.game_black1, R.drawable.game_white1); difficulty = XSharedPref.getInt(PREF_AP_DIFFICULTY, 0); isIPlayFirst = XSharedPref.getBoolean(PREF_AP_IS_FIRST, true); sleepTime = difficulty >= 5 ? 0 : 2000; NAME_OF_AI = new String[]{"新手", "菜鸟", "入门", "棋手", "棋士", "棋圣"}; } }
[ "guoyong@emcc.net.com" ]
guoyong@emcc.net.com
b7578d097df01a25dd67ccacd101e6e55dd03d75
827b0c8e0a1d3b963b4cc4f5368a5af4f09302f9
/org.archstudio.xadl3.xlink/src/org/w3/xlink/util/XlinkAdapterFactory.java
7d11bfb56cc646b7d37d61e5e9fc18a63fcd9148
[]
no_license
rastegariyousef/ArchStudio
62e62e3b191800cd9a8daf2fbf7b15b71cd9e6ec
d1de2cf907909568561c9d04c75beeb5c28f008c
refs/heads/master
2021-01-15T16:41:20.961759
2012-10-15T06:14:43
2012-10-15T06:14:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,266
java
/** */ package org.w3.xlink.util; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; import org.eclipse.emf.ecore.EObject; import org.w3.xlink.*; /** * <!-- begin-user-doc --> * The <b>Adapter Factory</b> for the model. * It provides an adapter <code>createXXX</code> method for each class of the model. * <!-- end-user-doc --> * @see org.w3.xlink.XlinkPackage * @generated */ public class XlinkAdapterFactory extends AdapterFactoryImpl { /** * The cached model package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected static XlinkPackage modelPackage; /** * Creates an instance of the adapter factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public XlinkAdapterFactory() { if (modelPackage == null) { modelPackage = XlinkPackage.eINSTANCE; } } /** * Returns whether this factory is applicable for the type of the object. * <!-- begin-user-doc --> * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. * <!-- end-user-doc --> * @return whether this factory is applicable for the type of the object. * @generated */ @Override public boolean isFactoryForType(Object object) { if (object == modelPackage) { return true; } if (object instanceof EObject) { return ((EObject)object).eClass().getEPackage() == modelPackage; } return false; } /** * The switch that delegates to the <code>createXXX</code> methods. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected XlinkSwitch<Adapter> modelSwitch = new XlinkSwitch<Adapter>() { @Override public Adapter caseDocumentRoot(DocumentRoot object) { return createDocumentRootAdapter(); } @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); } }; /** * Creates an adapter for the <code>target</code>. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param target the object to adapt. * @return the adapter for the <code>target</code>. * @generated */ @Override public Adapter createAdapter(Notifier target) { return modelSwitch.doSwitch((EObject)target); } /** * Creates a new adapter for an object of class '{@link org.w3.xlink.DocumentRoot <em>Document Root</em>}'. * <!-- begin-user-doc --> * This default implementation returns null so that we can easily ignore cases; * it's useful to ignore a case when inheritance will catch all the cases anyway. * <!-- end-user-doc --> * @return the new adapter. * @see org.w3.xlink.DocumentRoot * @generated */ public Adapter createDocumentRootAdapter() { return null; } /** * Creates a new adapter for the default case. * <!-- begin-user-doc --> * This default implementation returns null. * <!-- end-user-doc --> * @return the new adapter. * @generated */ public Adapter createEObjectAdapter() { return null; } } //XlinkAdapterFactory
[ "sahendrickson@gmail.com" ]
sahendrickson@gmail.com
db318155933396c87b36406c269830ba3c69a53c
bcd7c93f89adac49a8ddbe699f19e798d3507b63
/SYTSB1/src/main/java/com/khnt/bpm/core/support/LimitActionInf.java
8cfb235faf1272368c5979cd5565ee5bffd72f7a
[]
no_license
gui-gui-maker/MyFrame
3b37d7770617fb4438c4f97d79e58421a970000b
b03b38a26d591f16dca07cf2b3d24f129c5833ef
refs/heads/master
2022-12-23T11:53:16.105726
2019-10-31T06:23:00
2019-10-31T06:23:00
218,462,486
1
0
null
2022-12-16T07:18:22
2019-10-30T06:56:36
Java
UTF-8
Java
false
false
656
java
package com.khnt.bpm.core.support; import java.util.Date; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.khnt.bpm.core.bean.Activity; /** * <p> * 流程活动对应的事件接口类-------------超时活动事件 * </p> */ public interface LimitActionInf { /** * 超时活动环节事件 * * @param activity * 活动对象 * @param limitDate * 超时时间 * @throws Exception */ @Transactional(propagation = Propagation.REQUIRES_NEW) public void limiAction(Activity activity, Date limitDate) throws Exception; }
[ "guidoz@163.com" ]
guidoz@163.com
a4d849fcc1c3cf39959a0309a8c8f2d904584828
8d935d44c34751b53895ce3383dde49073503251
/src/main/java/org/iii/ideas/catering_service/rest/excel/create/CSchoolIngredient.java
bdcb9fb4ee078af1c5e6a97d4ca39a45a6108983
[ "Apache-2.0" ]
permissive
NoahChian/Devops
b3483394b8e8189f4647a4ee41d8ceb8267eaebb
3d310dedfd1bd07fcda3d5f4f7ac45a07b90489f
refs/heads/master
2016-09-14T05:41:37.471624
2016-05-11T07:29:28
2016-05-11T07:29:28
58,521,704
0
0
null
null
null
null
UTF-8
Java
false
false
8,531
java
package org.iii.ideas.catering_service.rest.excel.create; import java.sql.Timestamp; import java.text.ParseException; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.apache.poi.util.StringUtil; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.iii.ideas.catering_service.dao.Supplier; import org.iii.ideas.catering_service.dao.ViewDishAndIngredient2; import org.iii.ideas.catering_service.dao.ViewDishAndIngredient2DAO; import org.iii.ideas.catering_service.rest.bo.IngredientAttributeBO; import org.iii.ideas.catering_service.util.CateringServiceUtil; import org.iii.ideas.catering_service.util.HibernateUtil; public class CSchoolIngredient implements IGenerateExcel { private static Logger log = Logger.getLogger(CSupplier.class); private int kid; private String begDate; private String endDate; public CSchoolIngredient(int kid, String begDate, String endDate) { this.kid = kid; this.begDate = begDate; this.endDate = endDate; } @Override public Map<String, Object[]> generateExcelData() throws ParseException { Map<String, Object[]> data = new TreeMap<String, Object[]>(); SessionFactory sessionFactory = HibernateUtil.buildSessionFactory(); Session session = sessionFactory.openSession(); /** edit by Joshua 2014/10/15 */ /* data.put("1", new Object[] { "供餐日期", "學校", "菜色名稱", "食材名稱", "進貨日期", "生產日期", "有效日期", "批號", "製造商", "供應商名稱","供應商統編", "食材認證標章", "認證號碼", "產品名稱", "重量(公斤)", "基改玉米", "基改黃豆", "加工品" }); */ /** modify by Ellis 20141126 * 新版xls將統編去除*/ // data.put("1", new Object[] { "供餐日期", "學校", "菜色名稱", "食材名稱", "進貨日期", "生產日期", "有效日期", "批號", "製造商", // "供應商名稱","食材認證標章", "認證號碼", "產品名稱", "重量(公斤)", "基改玉米", "基改黃豆", "加工品" }); /** modify by Ellis 20150826 * 新版xls (認證標章 >> 驗證標章 ) */ data.put("1", new Object[] { "供餐日期", "學校", "菜色名稱", "食材名稱", "進貨日期", "生產日期", "有效日期", "批號", "製造商", "供應商名稱","食材驗證標章", "驗證號碼", "產品名稱", "重量(公斤)", "基改玉米", "基改黃豆", "加工品" }); /* String HQL = "select distinct b.menuDate, s.schoolName, d.dishName, i.ingredientName, i.stockDate, i.manufactureDate, " + "i.expirationDate, i.lotNumber, i.manufacturer, i.supplierId, i.supplierCompanyId, i.sourceCertification, i.certificationId , " + "i.productName, i.ingredientQuantity, i.ingredientAttr " + "from School s,Batchdata b,Ingredientbatchdata i , Dish d , Schoolkitchen sk " + "where s.schoolId = b.schoolId " + " and b.batchDataId=i.batchDataId " + " and i.dishId= d.dishId " + " and b.kitchenId = :kitchenId " + " and d.kitchenId = b.kitchenId " + " and b.menuDate between :begDate and :endDate " + " and s.schoolId = sk.id.schoolId " + " order by b.menuDate, s.schoolName, d.dishName, i.ingredientName, i.stockDate, i.manufactureDate,i.expirationDate, i.lotNumber, i.brand, i.sourceCertification, i.certificationId"; */ /* String HQL = "select distinct v2.menudate, v2.schoolname , v2.dishname,v2.ingredientName,v2.stockDate,v2.manufactureDate," + "expirationDate,lotNumber,manufacturer,supplierName,sourceCertification,certificationId," + "productName,ingredientQuantity,ingredientAttr " + "from ViewDishAndIngredient2 v2 " + "where kitchenid = :kitchenId" + "and menudate between :begDate and :endDate "; log.debug("Download 學校食材 日期:" + begDate + "-" + endDate + " KitchenId:" + kid); Query ingredientFileQuery = session.createQuery(HQL); ingredientFileQuery.setParameter("kitchenId", kid); ingredientFileQuery.setParameter("begDate", begDate); ingredientFileQuery.setParameter("endDate", endDate); */ /**透過view取得食材資訊 無食材之菜色也會印出 modify by ellis 20141203 * */ ViewDishAndIngredient2DAO vdai2DAO = new ViewDishAndIngredient2DAO(session); List<ViewDishAndIngredient2> ingredientFileFormat = vdai2DAO.queryIngredients(kid, begDate, endDate); Iterator<ViewDishAndIngredient2> ingredientFileIterator = ingredientFileFormat.iterator(); int row = 2; while (ingredientFileIterator.hasNext()) { ViewDishAndIngredient2 obj = ingredientFileIterator.next(); //基改欄位處理 String gmcorn = ""; String gmbean = ""; String psfood = ""; if(!CateringServiceUtil.isNull(obj.getIngredientAttr())){ IngredientAttributeBO ingredientAttrBO = CateringServiceUtil.getIngredientAttrBo((Integer)obj.getIngredientAttr()); gmcorn = ingredientAttrBO.getGmcorn() == 1 ? "Y" : "N"; gmbean = ingredientAttrBO.getGmbean() == 1 ? "Y" : "N"; psfood = ingredientAttrBO.getPsfood() == 1 ? "Y" : "N"; } //日期處理 String stockDate = obj.getStockDate() == null ? "" : CateringServiceUtil.converTimestampToStr("yyyy/MM/dd", (Timestamp) obj.getStockDate()); String manufactureDate = obj.getManufactureDate() == null ? "" : CateringServiceUtil.converTimestampToStr( "yyyy/MM/dd", (Timestamp) obj.getManufactureDate()); String expirationDate = obj.getExpirationDate() == null ? "" : CateringServiceUtil.converTimestampToStr("yyyy/MM/dd", (Timestamp) obj.getExpirationDate()); //重量處理 //處理舊版無DishShowName可能為空的問題 add by ellis 2014/12/29 String dishName = ""; if("".equals(obj.getDishshowname())){ dishName = obj.getDishname(); }else{ dishName = obj.getDishshowname(); } String ingredientQuantity = StringUtils.isNotBlank((String) obj.getIngredientQuantity()) ? (String) obj.getIngredientQuantity() : "0"; data.put(String.valueOf(row), new Object[] { obj.getMenudate(), obj.getSchoolname(), dishName, obj.getIngredientName(), stockDate, manufactureDate,expirationDate, obj.getLotNumber(), obj.getManufacturer(), obj.getSupplierName(), obj.getSourceCertification(), obj.getCertificationId(), obj.getProductName(), ingredientQuantity, gmcorn, gmbean, psfood }); // Object[] obj = ingredientFileIterator.next(); // String stockDate = obj[4] == null ? "" : CateringServiceUtil.converTimestampToStr("yyyy/MM/dd", // (Timestamp) obj[4]); // String manufactureDate = obj[5] == null ? "" : CateringServiceUtil.converTimestampToStr( // "yyyy/MM/dd", (Timestamp) obj[5]); // String expirationDate = obj[6] == null ? "" : CateringServiceUtil.converTimestampToStr("yyyy/MM/dd", // (Timestamp) obj[6]); // Integer supplierId = (Integer) obj[9]; // String supplierCompanyId = (String) obj[10]; // String ingredientQuantity = StringUtils.isNotBlank((String) obj[14]) ? (String) obj[14] : "0"; // IngredientAttributeBO ingredientAttrBO = CateringServiceUtil.getIngredientAttrBo((Integer)obj[15]); // String gmcorn = ingredientAttrBO.getGmcorn() == 1 ? "Y" : "N"; // String gmbean = ingredientAttrBO.getGmbean() == 1 ? "Y" : "N"; // String psfood = ingredientAttrBO.getPsfood() == 1 ? "Y" : "N"; // Supplier supplier = HibernateUtil.querySupplierById(session, kid, supplierId); // String companyId = ""; // if (CateringServiceUtil.isEmpty(supplierCompanyId)) { // companyId = supplier == null ? "" : supplier.getCompanyId(); // } else { // companyId = supplierCompanyId; // } // String supplierName = ""; // if (CateringServiceUtil.isNull(supplier)) { // supplierName = ""; // } else { // supplierName = supplier.getSupplierName(); // } // /* // * data.put(String.valueOf(row), new Object[] { obj[0], obj[1], obj[2], obj[3], stockDate, manufactureDate, // expirationDate, obj[7], obj[8], companyId, obj[11], obj[12], obj[13], ingredientQuantity, gmcorn, gmbean, psfood }); // */ // // data.put(String.valueOf(row), new Object[] { obj[0], obj[1], obj[2], obj[3], stockDate, manufactureDate, // expirationDate, obj[7], obj[8],supplierName, obj[11], obj[12], obj[13], ingredientQuantity, gmcorn, gmbean, psfood }); row++; } session.close(); return data; } }
[ "noahjian@iii.org.tw" ]
noahjian@iii.org.tw
57c13316a0d221b4d80aec478447bbd13c75207b
d60bd7144cb4428a6f7039387c3aaf7b295ecc77
/ScootAppSource/android/support/v7/widget/gc.java
5bda4d3c68ac9d759d583e837b7f46a062cabe7c
[]
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
5,784
java
package android.support.v7.widget; import android.view.View; import java.util.ArrayList; final class gc { int a = Integer.MIN_VALUE; int b = Integer.MIN_VALUE; int c = 0; final int d; private ArrayList<View> f = new ArrayList(); private gc(StaggeredGridLayoutManager paramStaggeredGridLayoutManager, int paramInt) { this.d = paramInt; } int a(int paramInt) { if (this.a != Integer.MIN_VALUE) { paramInt = this.a; } while (this.f.size() == 0) { return paramInt; } a(); return this.a; } public View a(int paramInt1, int paramInt2) { View localView2 = null; View localView1 = null; int i; if (paramInt2 == -1) { i = this.f.size(); paramInt2 = 0; if (paramInt2 < i) { localView2 = (View)this.f.get(paramInt2); if (localView2.isFocusable()) { if (this.e.d(localView2) > paramInt1) {} for (int k = 1;; k = 0) { if (k != StaggeredGridLayoutManager.b(this.e)) { break label92; } paramInt2 += 1; localView1 = localView2; break; } } } label92: return localView1; } paramInt2 = this.f.size() - 1; localView1 = localView2; if (paramInt2 >= 0) { localView2 = (View)this.f.get(paramInt2); if (localView2.isFocusable()) { if (this.e.d(localView2) > paramInt1) { i = 1; label149: if (StaggeredGridLayoutManager.b(this.e)) { break label184; } } label184: for (int j = 1;; j = 0) { if (i != j) { break label190; } paramInt2 -= 1; localView1 = localView2; break; i = 0; break label149; } } } label190: return localView1; } void a() { Object localObject = (View)this.f.get(0); fz localfz = c((View)localObject); this.a = this.e.a.a((View)localObject); if (localfz.f) { localObject = this.e.f.f(localfz.e()); if ((localObject != null) && (((StaggeredGridLayoutManager.LazySpanLookup.FullSpanItem)localObject).b == -1)) { this.a -= ((StaggeredGridLayoutManager.LazySpanLookup.FullSpanItem)localObject).a(this.d); } } } void a(View paramView) { fz localfz = c(paramView); localfz.e = this; this.f.add(0, paramView); this.a = Integer.MIN_VALUE; if (this.f.size() == 1) { this.b = Integer.MIN_VALUE; } if ((localfz.c()) || (localfz.d())) { this.c += this.e.a.c(paramView); } } void a(boolean paramBoolean, int paramInt) { int i; if (paramBoolean) { i = b(Integer.MIN_VALUE); e(); if (i != Integer.MIN_VALUE) { break label32; } } label32: while (((paramBoolean) && (i < this.e.a.d())) || ((!paramBoolean) && (i > this.e.a.c()))) { return; i = a(Integer.MIN_VALUE); break; } int j = i; if (paramInt != Integer.MIN_VALUE) { j = i + paramInt; } this.b = j; this.a = j; } int b() { if (this.a != Integer.MIN_VALUE) { return this.a; } a(); return this.a; } int b(int paramInt) { if (this.b != Integer.MIN_VALUE) { paramInt = this.b; } while (this.f.size() == 0) { return paramInt; } c(); return this.b; } void b(View paramView) { fz localfz = c(paramView); localfz.e = this; this.f.add(paramView); this.b = Integer.MIN_VALUE; if (this.f.size() == 1) { this.a = Integer.MIN_VALUE; } if ((localfz.c()) || (localfz.d())) { this.c += this.e.a.c(paramView); } } fz c(View paramView) { return (fz)paramView.getLayoutParams(); } void c() { Object localObject = (View)this.f.get(this.f.size() - 1); fz localfz = c((View)localObject); this.b = this.e.a.b((View)localObject); if (localfz.f) { localObject = this.e.f.f(localfz.e()); if ((localObject != null) && (((StaggeredGridLayoutManager.LazySpanLookup.FullSpanItem)localObject).b == 1)) { int i = this.b; this.b = (((StaggeredGridLayoutManager.LazySpanLookup.FullSpanItem)localObject).a(this.d) + i); } } } void c(int paramInt) { this.a = paramInt; this.b = paramInt; } int d() { if (this.b != Integer.MIN_VALUE) { return this.b; } c(); return this.b; } void d(int paramInt) { if (this.a != Integer.MIN_VALUE) { this.a += paramInt; } if (this.b != Integer.MIN_VALUE) { this.b += paramInt; } } void e() { this.f.clear(); f(); this.c = 0; } void f() { this.a = Integer.MIN_VALUE; this.b = Integer.MIN_VALUE; } void g() { int i = this.f.size(); View localView = (View)this.f.remove(i - 1); fz localfz = c(localView); localfz.e = null; if ((localfz.c()) || (localfz.d())) { this.c -= this.e.a.c(localView); } if (i == 1) { this.a = Integer.MIN_VALUE; } this.b = Integer.MIN_VALUE; } void h() { View localView = (View)this.f.remove(0); fz localfz = c(localView); localfz.e = null; if (this.f.size() == 0) { this.b = Integer.MIN_VALUE; } if ((localfz.c()) || (localfz.d())) { this.c -= this.e.a.c(localView); } this.a = Integer.MIN_VALUE; } public int i() { return this.c; } } /* Location: D:\Android\dex2jar-2.0\classes-dex2jar.jar!\android\support\v7\widget\gc.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "vaquar.khan@gmail.com" ]
vaquar.khan@gmail.com
4112861c6333e3510d0e7cf80059e42d84e4f5ac
3f3c51248f812750a702e3349bcb29653942a886
/spring-context-support/src/main/java/org/springframework/cache/jcache/config/AbstractJCacheConfiguration.java
ff2b7ea75fdf5b36da9b39cfc76f5b6782527cad
[ "Apache-2.0" ]
permissive
sniper602/spring-framework-4.1
f17b05f36b640ab1beee38d75c3a8098e0168827
6628bade53173075024bd1104ce1f04743cd69c4
refs/heads/master
2020-09-12T06:56:36.349853
2018-11-24T02:53:14
2018-11-24T02:53:14
222,347,493
1
0
null
2019-11-18T02:31:24
2019-11-18T02:31:24
null
UTF-8
Java
false
false
2,381
java
/* * Copyright 2002-2014 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.cache.jcache.config; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.cache.annotation.AbstractCachingConfiguration; import org.springframework.cache.interceptor.CacheResolver; import org.springframework.cache.jcache.interceptor.DefaultJCacheOperationSource; import org.springframework.cache.jcache.interceptor.JCacheOperationSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Role; /** * Abstract JSR-107 specific {@code @Configuration} class providing common * structure for enabling JSR-107 annotation-driven cache management capability. * * @author Stephane Nicoll * @since 4.1 * @see JCacheConfigurer */ @Configuration public class AbstractJCacheConfiguration extends AbstractCachingConfiguration<JCacheConfigurer> { protected CacheResolver exceptionCacheResolver; @Override protected void useCachingConfigurer(JCacheConfigurer config) { super.useCachingConfigurer(config); this.exceptionCacheResolver = config.exceptionCacheResolver(); } @Bean(name = "jCacheOperationSource") @Role(BeanDefinition.ROLE_INFRASTRUCTURE) public JCacheOperationSource cacheOperationSource() { DefaultJCacheOperationSource source = new DefaultJCacheOperationSource(); if (this.cacheManager != null) { source.setCacheManager(this.cacheManager); } if (this.keyGenerator != null) { source.setKeyGenerator(this.keyGenerator); } if (this.cacheResolver != null) { source.setCacheResolver(this.cacheResolver); } if (this.exceptionCacheResolver != null) { source.setExceptionCacheResolver(this.exceptionCacheResolver); } return source; } }
[ "yemuyu240@163.com" ]
yemuyu240@163.com
860f97f6b6a046674b2ced0de7ad4a1af255cc43
75b8c7e55999662aca0122a8ad616c6140787dca
/VDM_stockFX/src/models/Enregistrable.java
b14f9e73e4a9454cfd7f0087c30eeb8d16dc0d55
[]
no_license
LittleNeko1/VDM_StockFX
f446b34270ed36b7b759e690bee9d99103565310
bb647507177d5305a0a51fc419885b4bca472912
refs/heads/master
2020-03-10T07:57:43.869940
2016-09-16T10:14:25
2016-09-16T10:14:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
658
java
package models; import org.bson.types.ObjectId; import javafx.scene.layout.VBox; /** * Interface exposant les méthodes attendues par les classes enregistrables. */ public interface Enregistrable { /** * Réalise l'enregistrement de l'objet dans la base de données. */ public void save(); /** * Lit les valeurs des champs du formulaire et les affecte aux attibuts de cet objet. * @param form le conteneur contenant les champs à lire. */ public void setForm(VBox form); /** * Retourne l'identifiant de l'objet en base de données. * @return l'identifiant de l'objet en base de données. */ public ObjectId get_id(); }
[ "dvd.brtrnd@gmail.com" ]
dvd.brtrnd@gmail.com
9071b68db58113f2f011ab4b817069aa657e6070
82a8f35c86c274cb23279314db60ab687d33a691
/duokan/reader/domain/cloud/fj.java
ded0cb5117d2292b19be3bdd88d5994d06c8c8e8
[]
no_license
QMSCount/DReader
42363f6187b907dedde81ab3b9991523cbf2786d
c1537eed7091e32a5e2e52c79360606f622684bc
refs/heads/master
2021-09-14T22:16:45.495176
2018-05-20T14:57:15
2018-05-20T14:57:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
482
java
package com.duokan.reader.domain.cloud; import java.util.Comparator; class fj implements Comparator { private fj() { } public /* synthetic */ int compare(Object obj, Object obj2) { return a((DkCloudNoteBookInfo) obj, (DkCloudNoteBookInfo) obj2); } public int a(DkCloudNoteBookInfo dkCloudNoteBookInfo, DkCloudNoteBookInfo dkCloudNoteBookInfo2) { return dkCloudNoteBookInfo2.getLastDate().compareTo(dkCloudNoteBookInfo.getLastDate()); } }
[ "lixiaohong@p2peye.com" ]
lixiaohong@p2peye.com
e3865bee760599bdd601db722f3cf952771dd38e
4b4c6ae7800aaa1bba9e76d3bdd8432792372d51
/Download-Java-Files/Defective/i-284-c-2-AddOrderCommand.java
985c9e0c6a942465750a4b052e7cd11e4408d3c4
[]
no_license
NorwinYu/UoN-Final-Year-Project-Public-Database
f3970f66833a490f603875bd5651ea785586662c
d5894251e9218fe20644e8c6ec04b2dd3ea3b424
refs/heads/master
2020-05-19T19:34:04.525379
2019-05-06T20:31:57
2019-05-06T20:31:57
185,180,424
1
4
null
null
null
null
UTF-8
Java
false
false
3,376
java
package seedu.address.logic.commands; import static java.util.Objects.requireNonNull; import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; import java.util.ArrayList; import java.util.List; import java.util.Optional; import seedu.address.logic.CommandHistory; import seedu.address.logic.Mode; import seedu.address.logic.commands.exceptions.CommandException; import seedu.address.model.Model; import seedu.address.model.menu.Code; import seedu.address.model.menu.MenuItem; import seedu.address.model.order.OrderItem; import seedu.address.model.table.TableNumber; /** * Adds an order to Orders. */ public class AddOrderCommand extends Command { public static final String COMMAND_WORD = "addToOrder"; public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds order item(s) to the selected table's order. " + "Parameters: ITEM_CODE QUANTITY [ITEM_CODE QUANTITY]...\n" + "Example: " + COMMAND_WORD + " W09 2 C18 1 C02 1"; public static final String MESSAGE_SUCCESS = "New order items added:\n%1$s"; public static final String MESSAGE_DUPLICATE_ORDER_ITEM = "Item [%1$s] already exists in table %2$s's order"; public static final String MESSAGE_INVALID_ITEM_CODE = "The item code [%1$s] is invalid"; private final List<Code> itemCodes; private final List<Integer> itemQuantities; /** * Creates an AddOrderCommand to add order items specified by the item codes and quantities. */ public AddOrderCommand(List<Code> itemCodes, List<Integer> itemQuantities) { requireAllNonNull(itemCodes, itemQuantities); this.itemCodes = itemCodes; this.itemQuantities = itemQuantities; } @Override public CommandResult execute(Mode mode, Model model, CommandHistory history) throws CommandException { requireNonNull(model); List<OrderItem> orderItems = new ArrayList<>(); TableNumber tableNumber = model.getSelectedTable().getTableNumber(); for (int i = 0; i < itemCodes.size(); i++) { Optional<MenuItem> itemOptional = model.getRestOrRant().getMenu().getItemFromCode(itemCodes.get(i)); if (!itemOptional.isPresent()) { throw new CommandException(String.format(MESSAGE_INVALID_ITEM_CODE, itemCodes.get(i))); } OrderItem orderItem = new OrderItem(tableNumber, itemCodes.get(i), itemQuantities.get(i)); if (model.hasOrderItem(orderItem)) { // add order items until encountering a duplicate throw new CommandException(String.format(MESSAGE_DUPLICATE_ORDER_ITEM, itemCodes.get(i), tableNumber.toString())); } model.addOrderItem(orderItem); orderItems.add(orderItem); } model.updateFilteredOrderItemList(orderItem -> orderItem.getTableNumber().equals(tableNumber)); model.updateOrders(); return new CommandResult(String.format(MESSAGE_SUCCESS, orderItems)); } @Override public boolean equals(Object other) { return other == this // short circuit if same object || (other instanceof AddOrderCommand // instanceof handles nulls && itemCodes.equals(((AddOrderCommand) other).itemCodes) && itemQuantities.equals(((AddOrderCommand) other).itemQuantities)); } }
[ "norwinyu@gmail.com" ]
norwinyu@gmail.com
a4e140602e3c7bbe54375d39173a3e0a797f2fdc
632cf200926ba5daf4aae86a578391bb095028bf
/dev-validator/src/main/java/cn/tomsnail/framwork/validator/LongValidator.java
6e65f6a1bbde02e378a0e64a10716e7503aa0463
[ "Apache-2.0" ]
permissive
magicgis/snail-dev
68ceef00f88a6a73e7b737984b17ef948af8a3f8
32bdb9ad2cd8957924d797eab9abe5717abf1246
refs/heads/master
2020-03-26T23:51:14.734791
2018-06-12T03:18:34
2018-06-12T03:18:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,338
java
package cn.tomsnail.framwork.validator; import java.util.Map; import cn.tomsnail.framwork.validator.exception.ParamValidatorException; /** * Long值验证 * @author yangsong * @version 0.0.1 * @status 正常 * @date 2016年9月21日 下午4:08:11 * @see */ public class LongValidator extends AValidator<Long> { @Override public Long getValidatorValue(Map<String, Object> valueMap, String key,String errorMsg) throws ParamValidatorException { if(valueMap==null||key==null){ throw new ParamValidatorException(this.getValidFaildMsg(errorMsg, "Map值或者Key值空异常")); } if(!doCustValidators(valueMap)){ throw new ParamValidatorException(this.getValidFaildMsg(errorMsg, "custvalidator error")); } String value = (String) valueMap.get(key); Long v = null; try{ v = Long.valueOf(value); }catch(NumberFormatException exception){ if(value==null||value.equals("")){ }else{ throw new ParamValidatorException(this.getValidFaildMsg(errorMsg, key+"的值不是Long类型"+value)); } } super.rule.validator(key,v,errorMsg); return v; } @Override public Long getValidatorValue(Map<String, Object> valueMap,String key) throws ParamValidatorException { return this.getValidatorValue(valueMap, key,""); } }
[ "449711478@qq.com" ]
449711478@qq.com
49ef5291b28ac3a1fffa597803c3cfb88aaad88d
09e03ba73062c62c1d3389cdecb94f68430cd82d
/web/rest/src/main/java/org/artifactory/rest/services/replication/UpdateReplicationService.java
d75e74cd2ec5bb83f6edf0df5118ed3b886900d9
[ "Apache-2.0" ]
permissive
alancnet/artifactory
1ee6183301b581e60f67691d7fa025b0fb44b118
7ac3ea76471a00543eaf60e82b554d8edd894c0f
refs/heads/master
2021-01-10T14:58:53.769805
2015-10-07T16:46:14
2015-10-07T16:46:14
43,829,862
3
6
null
2016-03-09T18:30:58
2015-10-07T16:38:51
Java
UTF-8
Java
false
false
3,776
java
package org.artifactory.rest.services.replication; import org.artifactory.api.rest.replication.ReplicationConfigRequest; import org.artifactory.descriptor.config.CentralConfigDescriptor; import org.artifactory.descriptor.replication.LocalReplicationDescriptor; import org.artifactory.descriptor.replication.RemoteReplicationDescriptor; import org.artifactory.rest.common.exception.BadRequestException; import org.artifactory.rest.common.util.RestUtils; import org.artifactory.rest.http.request.ArtifactoryRestRequest; import org.artifactory.rest.http.response.IResponse; import org.artifactory.rest.resource.replication.ReplicationConfigRequestHelper; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; /** * @author Chen Keinan */ @Component @Scope(BeanDefinition.SCOPE_PROTOTYPE) public class UpdateReplicationService extends BaseReplicationService { @Override public void execute(ArtifactoryRestRequest artifactoryRequest, IResponse artifactoryResponse) { ReplicationConfigRequest replicationRequest = (ReplicationConfigRequest) artifactoryRequest.getImodel(); String repoKey = artifactoryRequest.getPathParamByKey("repoKey"); // validate pro liccense verifyArtifactoryPro(); // validate repo key verifyRepositoryExists(repoKey); CentralConfigDescriptor descriptor = centralConfigService.getMutableDescriptor(); switch (RestUtils.repoType(repoKey)) { case LOCAL: // update Local replications updateLocalReplication(replicationRequest, repoKey, descriptor); break; case REMOTE: // update remote replications updateRemoteReplications(replicationRequest, repoKey, descriptor); break; default: throw new BadRequestException("Invalid repository"); } } /** * update remote replications * * @param replicationRequest - replication request model * @param repoKey - rep key * @param descriptor - config descriptor */ private void updateRemoteReplications(ReplicationConfigRequest replicationRequest, String repoKey, CentralConfigDescriptor descriptor) { RemoteReplicationDescriptor remoteReplication = descriptor.getRemoteReplication(repoKey); if (remoteReplication == null) { throw new BadRequestException("Could not find existing replication for update"); } ReplicationConfigRequestHelper.fillBaseReplicationDescriptor(replicationRequest, remoteReplication); ReplicationConfigRequestHelper.verifyBaseReplicationRequest(remoteReplication); centralConfigService.saveEditedDescriptorAndReload(descriptor); } /** * update local replications * * @param replicationRequest - replications request model * @param repoKey - repository key * @param descriptor - config descriptor */ private void updateLocalReplication(ReplicationConfigRequest replicationRequest, String repoKey, CentralConfigDescriptor descriptor) { LocalReplicationDescriptor localReplication = descriptor.getLocalReplication(repoKey); if (localReplication == null) { throw new BadRequestException("Could not find existing replication for update"); } ReplicationConfigRequestHelper.fillLocalReplicationDescriptor(replicationRequest, localReplication); ReplicationConfigRequestHelper.verifyLocalReplicationRequest(localReplication); centralConfigService.saveEditedDescriptorAndReload(descriptor); } }
[ "github@alanc.net" ]
github@alanc.net
cd073608efb47be5c5a5799918fbcbc2c88b5b42
94e641d91df0b7223a7d21cb0b1cef740e42542e
/server/src/test/java/io/crate/planner/selectivity/SelectivityFunctionsTest.java
c19176755fc281e971f4b0767edd9df11e4005d9
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
matriv/crate
1ab2ca139584c1b169247d67667f23fa13b2ef65
6a4f5ed0fde340ca7d81070e6c4bcda7e03cfaa8
refs/heads/master
2022-06-20T09:59:56.624647
2022-06-08T13:31:32
2022-06-08T20:22:26
488,165,839
1
0
Apache-2.0
2022-05-03T10:32:46
2022-05-03T10:32:45
null
UTF-8
Java
false
false
6,125
java
/* * Licensed to Crate.io GmbH ("Crate") under one or more contributor * license agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. Crate 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. * * However, if you have executed another commercial license agreement * with Crate these terms will supersede the license and you may use the * software solely pursuant to the terms of the relevant commercial agreement. */ package io.crate.planner.selectivity; import io.crate.common.collections.Lists2; import io.crate.data.Row1; import io.crate.expression.symbol.Symbol; import io.crate.metadata.ColumnIdent; import io.crate.statistics.ColumnStats; import io.crate.statistics.Stats; import io.crate.test.integration.CrateDummyClusterServiceUnitTest; import io.crate.testing.SqlExpressions; import io.crate.testing.T3; import io.crate.types.DataTypes; import org.hamcrest.Matchers; import org.junit.Test; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.IntStream; public class SelectivityFunctionsTest extends CrateDummyClusterServiceUnitTest { @Test public void test_eq_not_in_mcv_is_based_on_approx_distinct() { SqlExpressions expressions = new SqlExpressions(T3.sources(clusterService)); Symbol query = expressions.asSymbol("x = 10"); var statsByColumn = new HashMap<ColumnIdent, ColumnStats>(); var numbers = IntStream.range(1, 20_001) .boxed() .collect(Collectors.toList()); var columnStats = ColumnStats.fromSortedValues(numbers, DataTypes.INTEGER, 0, 20_000L); statsByColumn.put(new ColumnIdent("x"), columnStats); Stats stats = new Stats(20_000, 16, statsByColumn); assertThat(SelectivityFunctions.estimateNumRows(stats, query, null), Matchers.is(1L)); } @Test public void test_eq_null_value_is_always_0() { SqlExpressions expressions = new SqlExpressions(T3.sources(clusterService)); Symbol query = expressions.asSymbol("x = null"); var numbers = IntStream.range(1, 50) .boxed() .collect(Collectors.toList()); var columnStats = ColumnStats.fromSortedValues(numbers, DataTypes.INTEGER, 0, 20_000L); var statsByColumn = new HashMap<ColumnIdent, ColumnStats>(); statsByColumn.put(new ColumnIdent("x"), columnStats); Stats stats = new Stats(20_000, 16, statsByColumn); assertThat(SelectivityFunctions.estimateNumRows(stats, query, null), Matchers.is(0L)); } @Test public void test_column_eq_column_uses_approx_distinct_for_selectivity_approximation() { SqlExpressions expressions = new SqlExpressions(T3.sources(clusterService)); Symbol query = expressions.asSymbol("x = y"); var numbers = Lists2.concat( List.of(1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10), IntStream.range(11, 15).boxed().collect(Collectors.toList()) ); var columnStats = ColumnStats.fromSortedValues(numbers, DataTypes.INTEGER, 0, numbers.size()); var statsByColumn = Map.<ColumnIdent, ColumnStats>of(new ColumnIdent("x"), columnStats); Stats stats = new Stats(numbers.size(), 16, statsByColumn); assertThat(SelectivityFunctions.estimateNumRows(stats, query, null), Matchers.is(3L)); } @Test public void test_eq_value_that_is_present_in_mcv_uses_mcv_frequency_as_selectivity() { SqlExpressions expressions = new SqlExpressions(T3.sources(clusterService)); Symbol query = expressions.asSymbol("x = ?"); var numbers = Lists2.concat( List.of(1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10), IntStream.range(11, 15).boxed().collect(Collectors.toList()) ); var columnStats = ColumnStats.fromSortedValues(numbers, DataTypes.INTEGER, 0, numbers.size()); double frequencyOf10 = columnStats.mostCommonValues().frequencies()[0]; var statsByColumn = Map.<ColumnIdent, ColumnStats>of(new ColumnIdent("x"), columnStats); Stats stats = new Stats(numbers.size(), 16, statsByColumn); assertThat( SelectivityFunctions.estimateNumRows(stats, query, new Row1(10)), Matchers.is((long) (frequencyOf10 * numbers.size()))); } @Test public void test_not_reverses_selectivity_of_inner_function() { SqlExpressions expressions = new SqlExpressions(T3.sources(clusterService)); Symbol query = expressions.asSymbol("NOT (x = 10)"); var numbers = IntStream.range(1, 20_001) .boxed() .collect(Collectors.toList()); var columnStats = ColumnStats.fromSortedValues(numbers, DataTypes.INTEGER, 0, 20_000L); Stats stats = new Stats(20_000, 16, Map.of(new ColumnIdent("x"), columnStats)); assertThat(SelectivityFunctions.estimateNumRows(stats, query, null), Matchers.is(19999L)); } @Test public void test_col_is_null_uses_null_fraction_as_selectivity() { SqlExpressions expressions = new SqlExpressions(T3.sources(clusterService)); Symbol query = expressions.asSymbol("x is null"); var columnStats = ColumnStats.fromSortedValues(List.of(1, 2), DataTypes.INTEGER, 2, 4); assertThat(columnStats.nullFraction(), Matchers.is(0.5)); Stats stats = new Stats(100, 16, Map.of(new ColumnIdent("x"), columnStats)); assertThat(SelectivityFunctions.estimateNumRows(stats, query, null), Matchers.is(50L)); } }
[ "37929162+mergify[bot]@users.noreply.github.com" ]
37929162+mergify[bot]@users.noreply.github.com
a7d1fe8d1f32be093e446947e2ddb0ee2cd1f56e
7fb040c548b5179567a8861ecfc2dfe370b62039
/src/main/java/com/eyun/pay/security/oauth2/OAuth2SignatureVerifierClient.java
80fc34dbaa1b5a7af3c1b98db02106e420eddb22
[]
no_license
cloudshop/service-pay
cdecd653a256a4571269077d01a1e870fb842640
fca0a2b5aec0debdbe9066cd6ee217f89b3b306c
refs/heads/master
2020-08-08T14:16:51.423537
2018-05-13T20:25:46
2018-05-13T20:25:46
213,847,284
0
0
null
2019-10-23T03:49:29
2019-10-09T07:13:42
Java
UTF-8
Java
false
false
925
java
package com.eyun.pay.security.oauth2; import org.springframework.security.jwt.crypto.sign.SignatureVerifier; /** * Abstracts how to create a SignatureVerifier to verify JWT tokens with a public key. * Implementations will have to contact the OAuth2 authorization server to fetch the public key * and use it to build a SignatureVerifier in a server specific way. * * @see UaaSignatureVerifierClient */ public interface OAuth2SignatureVerifierClient { /** * Returns the SignatureVerifier used to verify JWT tokens. * Fetches the public key from the Authorization server to create * this verifier. * * @return the new verifier used to verify JWT signatures. * Will be null if we cannot contact the token endpoint. * @throws Exception if we could not create a SignatureVerifier or contact the token endpoint. */ SignatureVerifier getSignatureVerifier() throws Exception; }
[ "124599792@qq.com" ]
124599792@qq.com
94f4161a04b865fbe3ef11b93f3d462815ddeb8b
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/25_jni-inchi-net.sf.jniinchi.JniInchiOutput-0.5-9/net/sf/jniinchi/JniInchiOutput_ESTest.java
a0d86433df29f930f681b0cc7121a964ba3054bc
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
649
java
/* * This file was automatically generated by EvoSuite * Tue Oct 29 17:12:16 GMT 2019 */ package net.sf.jniinchi; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class JniInchiOutput_ESTest extends JniInchiOutput_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
d385549acf183eceabd60395338d97e7f7072d8b
a6fc24f7080af101f958166044f5b384d3fd4589
/spring-cloud-example-consumer-feign-8081/src/main/java/yyl/springcloud/ConsumerFeignApplication8081.java
36a232a86df87a34052ca83a1c350556517aaca3
[ "Apache-2.0" ]
permissive
Relucent/spring-cloud-example
1091f6a06e4b83063e9152ac5cceb1a07c1e4b39
f192eba880c9655c8a97d506a242324e94ab152e
refs/heads/master
2021-09-14T18:31:35.073142
2018-05-17T08:15:31
2018-05-17T08:15:31
106,269,960
1
1
null
null
null
null
UTF-8
Java
false
false
562
java
package yyl.springcloud; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.netflix.feign.EnableFeignClients; @SpringBootApplication @EnableEurekaClient @EnableFeignClients public class ConsumerFeignApplication8081 { public static void main(String[] args) { SpringApplication.run(ConsumerFeignApplication8081.class, args); System.out.println("(Startup success)"); } }
[ "relucent@163.com" ]
relucent@163.com
41e68128cd3f7e2bce936b62f6be0ba7262470b3
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/14/org/apache/commons/lang3/time/FastDateFormat_estimateLength_1268.java
a4ab0230abbfef101cbb4709e1c6174902dbca39
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,424
java
org apach common lang3 time fast date format fastdateformat fast thread safe version link java text simpl date format simpledateformat direct replac code simpl date format simpledateformat format situat multi thread server environ code simpl date format simpledateformat thread safe jdk version sun close bug rfe format support pattern compat simpl date format simpledateformat time zone year pattern java introduc pattern letter code 'z' repres time zone rfc822 format code code pattern letter jdk version addit pattern code zz' 'zz' made repres iso8601 full format time zone code code introduc minor incompat java gain function javadoc cite year pattern format number pattern letter year truncat digit interpret number start java pattern 'y' yyy' 'yyy' format '2003' '03' java version fast date format fastdateformat behavior java version fast date format fastdateformat format inherit doc inheritdoc estim length estimatelength
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
ab7b5897473b161ec65f846dba757d5513e43508
059eecdbc1e457e32d1580de0f9c9ad188669e0f
/D4S8/2021년 8월 2주/6조/고무오리.java
ef331945d02566389128b99f1b7dea10bb549a59
[]
no_license
S6-Daejeon4-Study/D4-Algo-Study
eb299233581a938a1f75018a336673aa8697c12f
fb50bae19814bd2ec4a6f193619b5519c19e7661
refs/heads/main
2023-08-29T06:17:14.903546
2021-10-24T11:31:46
2021-10-24T11:31:46
413,614,511
0
0
null
null
null
null
UTF-8
Java
false
false
1,230
java
package week_02; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Stack; public class 고무오리 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); //입력을 처리하기 위한 String 스택 생성. Stack<String> stack = new Stack<>(); //종료 문장이 들어오기 전까지 반복할 while문. while (true) { //한 줄씩 str에 저장. String str = br.readLine(); if (str.equals("고무오리")) { //고무오리를 받았는데 스택이 비어있으면 문제 추가. if (stack.size() == 0) { stack.push("문제"); stack.push("문제"); } else { //아니면 스택에서 문제 하나 제거. stack.pop(); } //문제를 입력받으면 스택에 저장. } else if (str.equals("문제")) { stack.push(str); //해당 문자열을 입력 받으면 while문 종료 } else if (str.equals("고무오리 디버깅 끝")) break; } //스택이 비어있으면 출력. if (stack.isEmpty()) System.out.println("고무오리야 사랑해"); else System.out.println("힝구"); } }
[ "determination9212@gmail.com" ]
determination9212@gmail.com
89e2627a7175312cd46efc14b9964090a30a4eb8
14937993ee7a79cc64535db7446fb0a56c343120
/src/com/rs2/model/config/MapIndex.java
a0c5228cc23bd225fc9fdda76a96f3045da6cf6e
[]
no_license
Rune-Status/mig5-orion06-log-viewer
a397fa546d6f395d787a4c398689193cc47e5278
17d7c4fbd2d717839e8a0c83b033df6962721e63
refs/heads/master
2020-11-25T08:57:10.673721
2019-12-17T09:40:26
2019-12-17T09:40:26
228,582,728
0
0
null
2019-12-17T10:26:46
2019-12-17T09:38:30
null
UTF-8
Java
false
false
927
java
package com.rs2.model.config; import java.io.*; import com.rs2.cache.Archive; import com.rs2.cache.Cache; import com.rs2.util.Stream; public class MapIndex { public static int[] regionId; public static int[] floorMap; public static int[] objectMap; public static int regionCount = 0; public static void unpack(){ Cache cache = Cache.getSingleton(); Stream stream2 = null; byte abyte2[] = null; try { abyte2 = new Archive(cache.getFile(0, 5)).getFile("map_index"); stream2 = new Stream(abyte2); } catch (IOException e) { e.printStackTrace(); } int j1; j1 = abyte2.length / 7; regionCount = j1; regionId = new int[j1]; floorMap = new int[j1]; objectMap = new int[j1]; for(int i2 = 0; i2 < j1; i2++){ regionId[i2] = stream2.readUnsignedWord(); floorMap[i2] = stream2.readUnsignedWord(); objectMap[i2] = stream2.readUnsignedWord(); stream2.readUnsignedByte(); } } }
[ "iano2k4@hotmail.com" ]
iano2k4@hotmail.com
bfbc9c9ae0b24ab4ad25517216c1367dd5a61e8a
3219c754b164db82e6007c3959a8f09040984330
/src/com/Main.java
0ef12c34b8661975ebd003e6b354497d84316d8c
[]
no_license
JarikDev/JL51collectionSortingComparableComparator
1ce8a026a925c97abf4e43c787e084ac726ca2e2
c9f525c5da66ef98be9a6831df98de6ff0ffd120
refs/heads/master
2020-04-03T16:22:59.962929
2018-10-30T15:07:54
2018-10-30T15:07:54
155,402,451
0
0
null
null
null
null
UTF-8
Java
false
false
714
java
package com; import java.util.Set; import java.util.TreeSet; class Person implements Comparable<Person> { int age; public Person(int age) { this.age = age; } @Override public int compareTo(Person p) { return this.age - p.age; } @Override public String toString() { return "Person{"+"age="+age+"}"; } } public class Main { public static void main(String[] args) { Set set = new TreeSet(); set.add(new Person(4)); set.add(new Person(2)); set.add(new Person(5)); set.add(new Person(1)); set.add(new Person(3)); for (Object o : set) { System.out.println(o); } } }
[ "sxln1@mail.ru" ]
sxln1@mail.ru
31b0ac5e6488fa7c235cbb002aca068d34452861
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app10/source/com/lp/sdk/yninterface/mmqiang/MMQiangUtil.java
2d38a52c5143d9e6c465bab670bb1de57b4973a7
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
8,074
java
package com.lp.sdk.yninterface.mmqiang; import android.annotation.SuppressLint; import android.content.Context; import android.os.Handler; import android.telephony.SmsManager; import android.text.TextUtils; import android.util.Base64; import com.lepeng.utils.L; import java.io.IOException; import java.io.InputStream; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.Random; import org.apache.http.message.BasicNameValuePair; import org.json.JSONObject; public class MMQiangUtil { public static final int MSG_FAIL = 0; public static final int MSG_SUCCESS = 1; private static final String TAG = "MMQiangUtil"; public MMQiangUtil() {} private static boolean doZydPreCharge(ZydQlSmsData paramZydQlSmsData, String[] paramArrayOfString, String paramString) { boolean bool2 = false; Object localObject = new ArrayList(); ((List)localObject).add(new BasicNameValuePair("myorderid", paramZydQlSmsData.getMyorderid())); ((List)localObject).add(new BasicNameValuePair("randnum", paramString)); paramString = HttpUtil.sendPost(paramArrayOfString[2], (List)localObject); if (Configs.debug) { L.i("zydQlResult3:" + paramString); } boolean bool1 = bool2; if (!TextUtils.isEmpty(paramString)) { paramString = new JSONObject(paramString); localObject = new ZydQlRechargeData(); JsonParser.parseJson2Object(localObject, paramString); bool1 = bool2; if (((ZydQlRechargeData)localObject).getStatus() == 0) { String str = sendZydQlPost(paramArrayOfString[3], ((ZydQlRechargeData)localObject).getReq()); if (Configs.debug) { L.i("zydQlResult4:" + str); } bool1 = bool2; if (!TextUtils.isEmpty(str)) { bool1 = bool2; if (str.indexOf("<SessionID>") != -1) { bool1 = bool2; if (str.indexOf("<CheckID>") != -1) { bool1 = bool2; if (str.indexOf("<TradeID>") != -1) { paramString = str.substring(str.indexOf("<SessionID>") + "<SessionID>".length(), str.lastIndexOf("</SessionID>")); localObject = str.substring(str.indexOf("<CheckID>") + "<CheckID>".length(), str.lastIndexOf("</CheckID>")); str = str.substring(str.indexOf("<TradeID>") + "<TradeID>".length(), str.lastIndexOf("</TradeID>")); ArrayList localArrayList = new ArrayList(); localArrayList.add(new BasicNameValuePair("myorderid", paramZydQlSmsData.getMyorderid())); localArrayList.add(new BasicNameValuePair("sessionid", paramString)); localArrayList.add(new BasicNameValuePair("checkid", (String)localObject)); localArrayList.add(new BasicNameValuePair("tradeid", str)); paramZydQlSmsData = HttpUtil.sendPost(paramArrayOfString[4], localArrayList); if (Configs.debug) { L.i("zydQlResult5:" + paramZydQlSmsData); } bool1 = bool2; if (!TextUtils.isEmpty(paramZydQlSmsData)) { paramZydQlSmsData = new JSONObject(paramZydQlSmsData); paramString = new ZydQlRechargeData(); JsonParser.parseJson2Object(paramString, paramZydQlSmsData); bool1 = bool2; if (paramString.getStatus() == 0) { paramZydQlSmsData = sendZydQlPost(paramArrayOfString[5], paramString.getReq()); if (Configs.debug) { L.i("zydQlResult6:" + paramZydQlSmsData); } bool1 = bool2; if (paramZydQlSmsData != null) { bool1 = true; } } } } } } } } } return bool1; } public static void doZydQlSms(Context paramContext, String paramString1, int paramInt, String paramString2, Handler paramHandler) { new MMQiangUtil.1(paramString1, paramInt, paramString2, paramContext, paramHandler).start(); } public static String getRandomImei() { return "86" + randomStr("0123456789", 13); } public static String getRandomImsi(MMQiangUtil.Provider paramProvider) { if (MMQiangUtil.Provider.CM == paramProvider) { return "46000" + randomStr("0123456789", 10); } if (MMQiangUtil.Provider.CU == paramProvider) { return "46001" + randomStr("0123456789", 10); } if (MMQiangUtil.Provider.CT == paramProvider) { return "46003" + randomStr("0123456789", 10); } return null; } public static String getValueFromUrlByKey(String paramString1, String paramString2) { if ((TextUtils.isEmpty(paramString1)) || (TextUtils.isEmpty(paramString2))) {} for (;;) { return null; try { String str = "?" + paramString2 + "="; paramString2 = "&" + paramString2 + "="; int i = Math.max(paramString1.indexOf(str), paramString1.indexOf(paramString2)); if (i != -1) { paramString1 = paramString1.substring(str.length() + i); i = paramString1.indexOf("&"); if (i != -1) { return paramString1.substring(0, i).trim(); } paramString1 = paramString1.trim(); return paramString1; } } catch (Exception paramString1) { paramString1.printStackTrace(); } } return null; } public static String randomStr(String paramString, int paramInt) { String str; if ((TextUtils.isEmpty(paramString)) || (paramInt < 0)) { str = ""; return str; } char[] arrayOfChar = paramString.toCharArray(); int j = arrayOfChar.length; Random localRandom = new Random(); paramString = ""; int i = 0; for (;;) { str = paramString; if (i >= paramInt) { break; } paramString = paramString + arrayOfChar[(Math.abs(localRandom.nextInt()) % j)]; i += 1; } } protected static void sendSms(Context paramContext, String paramString1, String paramString2) { paramContext = SmsManager.getDefault(); paramContext.sendMultipartTextMessage(paramString1, null, paramContext.divideMessage(paramString2), null, null); } @SuppressLint({"NewApi"}) private static String sendZydQlPost(String paramString1, String paramString2) { try { paramString2 = new String(Base64.decode(paramString2, 0)); paramString1 = (HttpURLConnection)new URL(paramString1).openConnection(); paramString1.setDoOutput(true); paramString1.setDoInput(true); paramString1.setUseCaches(false); paramString1.setInstanceFollowRedirects(true); paramString1.setRequestMethod("POST"); paramString1.setRequestProperty("Accept", "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2"); paramString1.setRequestProperty("Content-Type", "text/plain; charset=ISO-8859-1"); paramString1.connect(); Object localObject = new OutputStreamWriter(paramString1.getOutputStream(), "UTF-8"); ((OutputStreamWriter)localObject).append(paramString2); ((OutputStreamWriter)localObject).flush(); ((OutputStreamWriter)localObject).close(); int i = paramString1.getContentLength(); paramString1 = paramString1.getInputStream(); if (i != -1) { paramString2 = new byte[i]; localObject = new byte['Ȁ']; i = 0; for (;;) { int j = paramString1.read((byte[])localObject); if (j <= 0) { return new String(paramString2, "UTF-8"); } System.arraycopy(localObject, 0, paramString2, i, j); i += j; } } return null; } catch (IOException paramString1) { paramString1.printStackTrace(); } } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
cb328c3633a354e92222b02345d2a7c9662e1adf
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module0896_public/src/java/module0896_public/a/IFoo2.java
ad94e598045e365211453e29a0846522e34ccd2c
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
804
java
package module0896_public.a; import java.awt.datatransfer.*; import java.beans.beancontext.*; import java.io.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.awt.datatransfer.DataFlavor * @see java.beans.beancontext.BeanContext * @see java.io.File */ @SuppressWarnings("all") public interface IFoo2<Y> extends module0896_public.a.IFoo0<Y> { java.rmi.Remote f0 = null; java.nio.file.FileStore f1 = null; java.sql.Array f2 = null; String getName(); void setName(String s); Y get(); void set(Y e); }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
ee53a2e9e02fafc014082b627cc3ea2e63e9dbcf
23a210a857e1d8cda630f3ad40830e2fc8bb2876
/emp_7.3/emp/xtgl/com/montnets/emp/corpmanage/biz/CorpSpUserBindBiz.java
fccdb12fe9f6d275b8b71949d0b903dcd25c9f34
[]
no_license
zengyijava/shaoguang
415a613b20f73cabf9ab171f3bf64a8233e994f8
5d8ad6fa54536e946a15b5e7e7a62eb2e110c6b0
refs/heads/main
2023-04-25T07:57:11.656001
2021-05-18T01:18:49
2021-05-18T01:18:49
368,159,409
0
0
null
null
null
null
UTF-8
Java
false
false
3,194
java
package com.montnets.emp.corpmanage.biz; import java.sql.Connection; import java.util.List; import com.montnets.emp.common.biz.SuperBiz; import com.montnets.emp.common.context.EmpExecutionContext; import com.montnets.emp.corpmanage.dao.GenericLfSpCorpBindVoDAO; import com.montnets.emp.corpmanage.vo.LfSpCorpBindVo; import com.montnets.emp.entity.corp.GwUserproperty; import com.montnets.emp.entity.pasroute.GtPortUsed; import com.montnets.emp.entity.pasroute.LfSpDepBind; import com.montnets.emp.util.PageInfo; /** * * @author Administrator * */ public class CorpSpUserBindBiz extends SuperBiz { /** * * @param lfSpBusBindVo * @param pageInfo * @return * @throws Exception */ public List<LfSpCorpBindVo> getSpCorpBindVos(LfSpCorpBindVo lfSpBusBindVo, PageInfo pageInfo) throws Exception { return new GenericLfSpCorpBindVoDAO().findLfSpCorpBindVos( lfSpBusBindVo, pageInfo); } /** * * @return * @throws Exception */ public List<GtPortUsed> getUnBindEmpUserID() throws Exception { return new GenericLfSpCorpBindVoDAO().findUnBindEmpUserID(); } /** * 获取EMP账号 * @description * @param spType 1:EMP应用账号;2:EMP接入账号 * @return * @throws Exception * @author chentingsheng <cts314@163.com> * @datetime 2016-7-18 下午07:17:54 */ public List<GtPortUsed> getUnBindEmpUserID(int spType) throws Exception { return new GenericLfSpCorpBindVoDAO().findUnBindEmpUserID(spType); } /** * 获取未绑定彩信账号 * @return * @throws Exception */ public List<GtPortUsed> getUnBindEmpMMsUserID() throws Exception { return new GenericLfSpCorpBindVoDAO().findUnBindEmpMMsUserID(); } /** * * @return * @throws Exception */ public List<GtPortUsed> getUnBindDBUserID() throws Exception { return new GenericLfSpCorpBindVoDAO().findUnBindDBUserID(); } /** * * @return * @throws Exception */ public List<GtPortUsed> findAllEmpUserID() throws Exception { return new GenericLfSpCorpBindVoDAO().findAllEmpUserID(); } /** * * @return * @throws Exception */ public List<GtPortUsed> findAllDBServerUserID() throws Exception { return new GenericLfSpCorpBindVoDAO().findAllDBServerUserID(); } /** * 托管版EMP短信SP账号绑定,保存绑定关系和GwUserproperty * @param user * @param ipMac * @param corpCode * @return */ public int addLfSpDepBindList(List<LfSpDepBind> idList,List<GwUserproperty> gwUserpropertyList) { // 获取连接 Connection conn = null; //返回值 int resultRs = -1; try { //获取连接 conn = empTransDao.getConnection(); //开启事务 empTransDao.beginTransaction(conn); resultRs=empTransDao.save(conn, idList, LfSpDepBind.class); resultRs=empTransDao.save(conn, gwUserpropertyList, GwUserproperty.class); empTransDao.commitTransaction(conn); } catch (Exception e) { empTransDao.rollBackTransaction(conn); EmpExecutionContext.error(e, "托管版EMP短信SP账号绑定,保存绑定关系和GwUserproperty失败!"); resultRs = -1; } finally { empTransDao.closeConnection(conn); } return resultRs; } }
[ "2461418944@qq.com" ]
2461418944@qq.com
43be4d675786d43b9629d6bf13143ea86822759c
c8688db388a2c5ac494447bac90d44b34fa4132c
/sources/com/google/android/gms/internal/ads/zzdeq.java
97460aaba2a7a42eb53cce8139305d957a820254
[]
no_license
mred312/apk-source
98dacfda41848e508a0c9db2c395fec1ae33afa1
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
refs/heads/master
2023-03-06T05:53:50.863721
2021-02-23T13:34:20
2021-02-23T13:34:20
341,481,669
0
0
null
null
null
null
UTF-8
Java
false
false
1,170
java
package com.google.android.gms.internal.ads; import android.os.Bundle; /* compiled from: com.google.android.gms:play-services-ads@@19.5.0 */ public final class zzdeq implements zzdfj<Bundle> { /* renamed from: a */ private final String f15496a; /* renamed from: b */ private final String f15497b; /* renamed from: c */ private final String f15498c; /* renamed from: d */ private final String f15499d; /* renamed from: e */ private final Long f15500e; public zzdeq(String str, String str2, String str3, String str4, Long l) { this.f15496a = str; this.f15497b = str2; this.f15498c = str3; this.f15499d = str4; this.f15500e = l; } public final /* synthetic */ void zzs(Object obj) { Bundle bundle = (Bundle) obj; zzdnx.zza(bundle, "gmp_app_id", this.f15496a); zzdnx.zza(bundle, "fbs_aiid", this.f15497b); zzdnx.zza(bundle, "fbs_aeid", this.f15498c); zzdnx.zza(bundle, "apm_id_origin", this.f15499d); Long l = this.f15500e; if (l != null) { bundle.putLong("sai_timeout", l.longValue()); } } }
[ "mred312@gmail.com" ]
mred312@gmail.com
1e4102221d95cc9ac263d089c6b5f7164ff5e541
3360ea3e14a21a244e85e714b8a99eeca2203690
/examples/demo/domain/src/main/java/demoapp/dom/types/isis/markups/vm/IsisMarkupVm.java
cde7a746cde785f696032be5b01f07d9ab804d02
[ "Apache-2.0" ]
permissive
simhaonline/isis
10191bf897dff126af60519803f3b6080c832aa4
08bd8c557f8e2818f9a681d558acc986c7631e8b
refs/heads/master
2022-11-17T00:11:55.777790
2020-07-17T08:44:43
2020-07-17T08:44:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,433
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 demoapp.dom.types.isis.markups.vm; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.apache.isis.applib.annotation.DomainObject; import org.apache.isis.applib.annotation.Editing; import org.apache.isis.applib.annotation.MemberOrder; import org.apache.isis.applib.annotation.Nature; import org.apache.isis.applib.annotation.Optionality; import org.apache.isis.applib.annotation.Property; import org.apache.isis.applib.annotation.PropertyLayout; import org.apache.isis.applib.annotation.Title; import org.apache.isis.applib.annotation.Where; import org.apache.isis.applib.value.Markup; import lombok.Getter; import lombok.Setter; import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription; import demoapp.dom.types.isis.markups.holder.IsisMarkupHolder; //tag::class[] @XmlRootElement(name = "root") @XmlType @XmlAccessorType(XmlAccessType.FIELD) @DomainObject( nature=Nature.VIEW_MODEL, objectType = "demo.IsisMarkupVm" ) @lombok.NoArgsConstructor // <.> public class IsisMarkupVm implements HasAsciiDocDescription, IsisMarkupHolder { //end::class[] public IsisMarkupVm(Markup initialValue) { this.readOnlyProperty = initialValue; this.readWriteProperty = initialValue; } //tag::class[] public String title() { return "Markup view model"; } @MemberOrder(name = "read-only-properties", sequence = "1") @XmlElement(required = true) // <.> @Getter @Setter private Markup readOnlyProperty; @Property(editing = Editing.ENABLED) // <.> @PropertyLayout(hidden = Where.ALL_TABLES) @MemberOrder(name = "editable-properties", sequence = "1") @XmlElement(required = true) @Getter @Setter private Markup readWriteProperty; @Property(optionality = Optionality.OPTIONAL) // <.> @PropertyLayout(hidden = Where.ALL_TABLES) @MemberOrder(name = "optional-properties", sequence = "1") @Getter @Setter private Markup readOnlyOptionalProperty; @Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL) @PropertyLayout(hidden = Where.ALL_TABLES) @MemberOrder(name = "optional-properties", sequence = "2") @Getter @Setter private Markup readWriteOptionalProperty; } //end::class[]
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk