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
4b09229741041a12ee124d593355c9b5c72ce6fc
5d5561be1120bfe9311877353e1121ca3ccaa5d6
/java-study/java_20180802/src/chapter10/TryCatchFinallyRuntimeException.java
e8689f689081232afd826b1a8ac59d6231ddac03
[]
no_license
eldrk/java-programming-class
b88cc06bb62f4b9c816f81e5e9047f180a643fa5
a1d22161cf250e89468a0d5303700d9babbd5e1e
refs/heads/master
2020-04-09T11:09:33.733982
2018-12-04T04:58:33
2018-12-04T04:58:33
160,297,474
0
0
null
null
null
null
UTF-8
Java
false
false
833
java
package chapter10; public class TryCatchFinallyRuntimeException { public static void main(String[] args) { String data1 = null; String data2 = null; try { data1 = args[0]; data2 = args[1]; System.out.println(data1 + "\n" + data2); int value1 = Integer.parseInt(data1); int value2 = Integer.parseInt(data2); int result = value1 + value2; System.out.println(data1 + "+" + data2 + "=" +result); return; }catch(ArrayIndexOutOfBoundsException e) { System.out.println("실행 매개값이 수가 부족합니다."); // System.out.println("[실행 방법]"); // System.out.println("java TryCatchFinallyRuntimeExceptionExample num1 num2"); }catch(Exception e) { System.out.println("숫자로 변환할 수 없습니다."); }finally { System.out.println("다시 실행하세요"); } } }
[ "ubjaeeun@daum.net" ]
ubjaeeun@daum.net
0c3c5f3e1455de85c9d2a527601a8c2cdbbcb6b3
61a266287b4a492538319727e6fe0ad1fb3d890d
/platform-product/platform-product-edoc-biz/src/main/java/com/zynsun/platform/edoc/model/ArchivedManualModel.java
29f816fe58a74a0d946bbeeb91d08037befdcfc0
[]
no_license
superwy333/ashare_newArch
cfe8086ef5ee7898aba186193882bce49dbae11b
9ed5f21b96caf2eb8e28e819dfd4e3f557140d7a
refs/heads/master
2020-04-13T10:34:25.884461
2018-12-26T06:41:36
2018-12-26T06:45:38
163,144,822
0
0
null
null
null
null
UTF-8
Java
false
false
3,269
java
package com.zynsun.platform.edoc.model; import com.zynsun.openplatform.domain.PageModel; /** * Created by WZH on 2017/8/2. */ public class ArchivedManualModel extends PageModel { /** * 单证编号:<账套代码+凭证号码>确定唯一 */ private String edocNo; /** * 账套编号 */ private String vouBookcode; /** * 凭证号 */ private String vouNo; /** * 总账日期YYYYMM */ private String vouDate; /** * 日记账批名 */ private String vouBatchname; /** * 日记账名称 */ private String vouJournalname; /** * 制单人 */ private String vouMakerName; /** * 公司名称 */ private String vouCompanyname; private String vouDateStart; private String vouDateEnd; private String safeBoxCode; private String boxNo; private String recordsNo; private String vouPeriod; public String getEdocNo() { return edocNo; } public void setEdocNo(String edocNo) { this.edocNo = edocNo; } public String getVouBookcode() { return vouBookcode; } public void setVouBookcode(String vouBookcode) { this.vouBookcode = vouBookcode; } public String getVouNo() { return vouNo; } public void setVouNo(String vouNo) { this.vouNo = vouNo; } public String getVouDate() { return vouDate; } public void setVouDate(String vouDate) { this.vouDate = vouDate; } public String getVouBatchname() { return vouBatchname; } public void setVouBatchname(String vouBatchname) { this.vouBatchname = vouBatchname; } public String getVouJournalname() { return vouJournalname; } public void setVouJournalname(String vouJournalname) { this.vouJournalname = vouJournalname; } public String getVouMakerName() { return vouMakerName; } public void setVouMakerName(String vouMakerName) { this.vouMakerName = vouMakerName; } public String getVouCompanyname() { return vouCompanyname; } public void setVouCompanyname(String vouCompanyname) { this.vouCompanyname = vouCompanyname; } public String getVouDateStart() { return vouDateStart; } public void setVouDateStart(String vouDateStart) { this.vouDateStart = vouDateStart; } public String getVouDateEnd() { return vouDateEnd; } public void setVouDateEnd(String vouDateEnd) { this.vouDateEnd = vouDateEnd; } public String getBoxNo() { return boxNo; } public void setBoxNo(String boxNo) { this.boxNo = boxNo; } public String getRecordsNo() { return recordsNo; } public void setRecordsNo(String recordsNo) { this.recordsNo = recordsNo; } public String getVouPeriod() { return vouPeriod; } public void setVouPeriod(String vouPeriod) { this.vouPeriod = vouPeriod; } public String getSafeBoxCode() { return safeBoxCode; } public void setSafeBoxCode(String safeBoxCode) { this.safeBoxCode = safeBoxCode; } }
[ "121401769@qq.com" ]
121401769@qq.com
c91b7ef037402fb163960c5aae7ff84e539db645
70cbaeb10970c6996b80a3e908258f240cbf1b99
/WiFi万能钥匙dex1-dex2jar.jar.src/ct/ac.java
f71a90e8e859b73f899ce614bbb427aa083403d8
[]
no_license
nwpu043814/wifimaster4.2.02
eabd02f529a259ca3b5b63fe68c081974393e3dd
ef4ce18574fd7b1e4dafa59318df9d8748c87d37
refs/heads/master
2021-08-28T11:11:12.320794
2017-12-12T03:01:54
2017-12-12T03:01:54
113,553,417
2
1
null
null
null
null
UTF-8
Java
false
false
800
java
package ct; import org.apache.http.Header; import org.apache.http.HttpResponse; public final class ac { public int a = 1; public byte[] b = null; public int c = 0; public int d = 0; public HttpResponse e; public int f = 0; public final int a() { return this.a; } public final String a(String paramString) { if (this.e != null) { paramString = this.e.getFirstHeader(paramString); if (paramString == null) {} } for (paramString = paramString.getValue();; paramString = null) { return paramString; } } public final byte[] b() { return this.b; } } /* Location: /Users/hanlian/Downloads/WiFi万能钥匙dex1-dex2jar.jar!/ct/ac.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "lianh@jumei.com" ]
lianh@jumei.com
2946d745947072c55289c8f1054e132032fc8536
217e44b1dad361145b400f3c413d12e4342f7413
/javatest/src/D0_if_이론/D_if2_중첩if.java
62e4b237202d207637ba2ea926655464f905c591
[]
no_license
s02asy/study
7e5cc299edf2848aeba5a8fa7909fb06bd4b7f5d
55a1a6f9ae3a9bc83702c9679d239bbab7f4ede8
refs/heads/master
2023-08-15T14:15:31.652270
2021-09-06T08:56:55
2021-09-06T08:56:55
403,499,304
0
0
null
null
null
null
UHC
Java
false
false
1,191
java
package D0_if_이론; import java.util.Scanner; public class D_if2_중첩if { public static void main(String[] args) { /* 중첩 if === 조금전에 했던 로그인을 중첩if 로 다시 표현하기. === === 먼저 id 를 입력받고 , id 가 일치하면 그때 pw 를 입력받기. === * 1. Id를 입력받아 dbId와 일치할 경우에만 Pw를 입력할 수 있다. * 2. Id가 틀린 경우, "Id를 확인해주세요"라는 메세지를 출력한다. * 3. Pw가 틀린 경우, "Pw를 확인해주세요"라는 메세지를 출력한다. * 4. Id와 Pw와 모두 일치하는 경우, "로그인 성공"라는 메세지를 출력한다. */ Scanner scan = new Scanner(System.in); int join_id = 1234; int join_pw = 1111; System.out.print("ID 입력 : "); int log_id = scan.nextInt(); if (join_id == log_id) { System.out.print("Pw 입력 : "); int log_pw = scan.nextInt(); if (join_pw == log_pw) { System.out.println("로그인 성공!"); } if (join_pw != log_pw) { System.out.println("Pw를 확인해주세요."); } } if (join_id != log_id) { System.out.println("Id를 확인해주세요."); } } }
[ "A@DESKTOP-H0948LR" ]
A@DESKTOP-H0948LR
baef1581fe16fd141786bc58b03604330dd49894
dd949f215d968f2ee69bf85571fd63e4f085a869
/systems/css-2011-teams/red/subarchitectures/dialogue.sa/apis/dialogue/src/java/de/dfki/lt/tr/dialogue/cplan/LoggingTracer.java
c60981c84d244de2ca03d3de8ea5bc7b69a332fe
[]
no_license
marc-hanheide/cogx
a3fd395805f1b0ad7d713a05b9256312757b37a9
cb9a9c9cdfeba02afac6a83d03b7c6bb778edb95
refs/heads/master
2022-03-16T23:36:21.951317
2013-12-10T23:49:07
2013-12-10T23:49:07
219,460,352
1
2
null
null
null
null
UTF-8
Java
false
false
1,204
java
package de.dfki.lt.tr.dialogue.cplan; import org.apache.log4j.Logger; public class LoggingTracer implements RuleTracer { private int _ruleTracing = 0; private Logger logger = Logger.getLogger("TraceLogger"); public LoggingTracer(int bitmask) { setTracing(bitmask); } @Override public void traceMatch(DagEdge current, Rule r, Bindings bindings) { if ((_ruleTracing & DISPLAY_MATCHING) != 0) { StringBuilder sb = new StringBuilder(); sb.append("\nMATCH: "); r.appendMatches(sb).append("\n ").append(current); logger.info(sb.toString()); } } @Override public void traceBeforeApplication(DagEdge current, Rule r) { // TODO Auto-generated method stub if ((_ruleTracing & DISPLAY_MODIFICATION) != 0) { logger.info("\nAPPLY " + r.appendActions(new StringBuilder()).toString() + "\nTO " + current); } } @Override public void traceAfterApplication(DagEdge current, Rule r) { // TODO Auto-generated method stub if ((_ruleTracing & DISPLAY_MODIFICATION) != 0) { logger.info("GETS " + current); } } @Override public void setTracing(int bitmask) { _ruleTracing = bitmask; } }
[ "marc@hanheide.net" ]
marc@hanheide.net
448cdfec107677643c72b11574504fdfbd8a9807
b23f4fb8323a223abb26da107b589245142fce33
/Java编程思想【第4版】习题答案/object/ATNTest.java
ef6e16bcc69c135f27b80853f7269f57ff65b611
[]
no_license
leozhiyu/thinking-in-java
d9f61ccf6657026ae223c36aeb2a5e9a62c24b20
72440f4b4a11022adfa14dd839770843f59079db
refs/heads/master
2021-09-08T02:27:34.035030
2018-03-06T00:54:58
2018-03-06T00:54:58
112,142,580
1
0
null
null
null
null
UTF-8
Java
false
false
521
java
// TIJ4 Chapter Object, Exericise 3, page 90 // object/ATNTest.java // Find the code fragments involving ATypeName and turn them into a program // that compiles and runs. public class ATNTest { public static void main(String[] args) { class ATypeName { int i; double d; boolean b; void show() { System.out.println(i); System.out.println(d); System.out.println(b); } } ATypeName a = new ATypeName(); a.i = 3; a.d = 2.71828; a.b = false; a.show(); } }
[ "18779775257@163.com" ]
18779775257@163.com
7ce92c1efbc0c49cea737b2ee0820166a8174eca
8a465004173d02ec3199e55317c072e2cdf74139
/src/Algorithms/Mathmatics/GCD_and_LCM/GCD.java
569310426c1a80502a0c4c0529a6579c37dd376d
[]
no_license
ehabarman/Competitive-Programming-Tutorial
635b37645ab45ca6cbab8f80fe2d13549d2231a3
ad299a2d341a1398d0d07a8fffc83d79de0970b0
refs/heads/master
2020-03-28T04:15:05.095410
2019-01-27T08:03:51
2019-01-27T08:03:51
147,702,996
0
0
null
null
null
null
UTF-8
Java
false
false
6,423
java
package Algorithms.Mathmatics.GCD_and_LCM; import java.math.BigInteger; /** * @author ehab arman * @date 7-9-2018 */ public class GCD { private static final BigInteger TWO = new BigInteger("2"); public static final BigInteger RES = BigInteger.ONE; public static void main(String[] args){ } /** * calculate GCD using Euclidean algorithm * and return the result as long value */ public static long euclideanGCD(long a, long b) { return a == 0 ? b : euclideanGCD(b % a, a); } /** * * calculate GCD using Euclidean algorithm * and return the result as BigInteger * only suitable for huge numbers ( n > 10^30 ) * initial value of res is defined as static constant in class with name RES */ public static BigInteger binaryEuclideanGCD(BigInteger a, BigInteger b, BigInteger res){ int compare = a.compareTo(b); if ( compare == 0) return res.multiply(a); boolean first = a.mod(TWO).compareTo(BigInteger.ZERO)==0; boolean second = b.mod(TWO).compareTo(BigInteger.ZERO)==0; if ( first && second ) return binaryEuclideanGCD( a.divide(TWO),b.divide(TWO),res.multiply(TWO)); else if (first) return binaryEuclideanGCD(a.divide(TWO),b,res); else if (second) return binaryEuclideanGCD(a,b.divide(TWO),res); else if ( compare > 0) return binaryEuclideanGCD(a.subtract(b),b,res); else return binaryEuclideanGCD(a,b.subtract(a),res); } /** * calculate gcd of the array (arr[n]) using euclideanGCD n times * it returns result as long value */ public static long arrayGCD(long arr[]) { long result = arr[0]; for (int i = 1; i < arr.length; i++) result = euclideanGCD(arr[i], result); return result; } /** * this method is using to reduce large number in largeGCD to a small long number * can't used it out of this class */ private static long reduceB(long a, String b) { long result = 0; for (int i = 0; i < b.length(); i++) { result = (result * 10 + b.charAt(i) - '0') % a; } return result; } /** * this method return GCD(a,b) when b very large (10^12 <= b < 10^250) */ public static long largeGCD(long a, String b) { long num = reduceB(a, b); return euclideanGCD(num, a); } /** * this method is to calculate result of multiplying fractions n/d * input is the number fractions (N) * num[i]/den[i] = ith fraction * result printed on console within fucntion as n/d in it's simplest form */ public static void fractionsProductReduce(int n, long num[],long den[]){ int new_num = 1, new_den = 1; for (int i = 0; i < n; i++) { new_num *= num[i]; new_den *= den[i]; } long GCD = euclideanGCD(new_num, new_den); new_num /= GCD; new_den /= GCD; System.out.println(new_num + "/" +new_den); } /** * this method return minimum number of operations to make GCD of a given array equals one * * @param arr given array * @return return number of operations */ public static long minimumOpeationsForGCDToEqualOne(long arr[]) { long one = 0; int size = arr.length; for (int i = 0; i < size; i++) if (arr[i] == 1) one++; if (one != 0) return size - one; int minimum = Integer.MAX_VALUE; for (int i = 0; i < size; i++) { long g = arr[i]; for (int j = i + 1; j < size; j++) { g = euclideanGCD(arr[j], g); if (g == 1) { minimum = Math.min(minimum, j - i); break; } } } if (minimum == Integer.MAX_VALUE) return -1; else return size + minimum - 1; } /** * this method replace matrix elements with maxGCD of (GCD(col,row)) for each element */ public static void replaceMatrixElementsWithMaxGCD(long [][]mat, int row, int col) { long []rgcd = new long[row] ; long []cgcd = new long[col]; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { rgcd[i] = euclideanGCD(rgcd[i], mat[i][j]); cgcd[j] = euclideanGCD(cgcd[j], mat[i][j]); } } for (int i = 0; i < row; i++) for (int j = 0; j < col; j++) mat[i][j] = Math.max(rgcd[i], cgcd[j]); } /** * method return result of GCD between 2 numbers formed by repeating n x and y times * (ex:n,x,y = 12,2,3 -> GCD(1212,121212)) * @param n required number * @param x first repetitions * @param y second repetitions * @return return result as string */ public static String findGCDOfNRepeatitions(int n, long x, long y) { long g = euclideanGCD(x, y); String s =""; for (int i = 0; i < g; i++) s+=n; return s; } /** * This method counts number of pairs (A <= N, B <= N) such that gcd (A , B) is B * and return count number as result */ public static int countPairsWithGCDEqualsB(int n) { int k = n; int imin = 1; int ans = 0; while (imin <= n) { int imax = n / k; ans += k * (imax - imin + 1); imin = imax + 1; k = n / imin; } return ans; } /** * this method is given N and M * task is to find whether numbers 1 to N can be divided into two sets such that the absolute difference between the * sum of two sets is M and gcd of the sum of two sets is 1 * return true if splittable else false */ public static boolean isSplittable(int n, int m) { int totalSum = (n * (n + 1)) / 2; int sum1 = (totalSum + m) / 2; int sum2 = totalSum - sum1; if (totalSum < m) return false; if (sum1 + sum2 == totalSum && sum1 - sum2 == m) return (euclideanGCD(sum1, sum2) == 1); return false; } }
[ "ehabarman@gmail.com" ]
ehabarman@gmail.com
ff88b405384da9611cfbfffc64022942d7f47802
9e8b8d5949a35c55cfac8ebe4c7b6fed043dc267
/cluster-manager/src/main/java/com/codeabovelab/dm/cluman/batch/CreateContainerTasklet.java
3022b293b277d79c1e94766b6fbb01ad567f0acd
[]
no_license
awsautomation/Docker-Orchestration-master
5fac7dc060a6021371c95e4a5e52fb4c42d605f3
0c1544f4d2f6ceb869661b2f75e9216f990025ae
refs/heads/master
2021-08-28T11:40:05.834148
2020-02-06T15:45:19
2020-02-06T15:45:19
238,753,850
1
0
null
null
null
null
UTF-8
Java
false
false
3,469
java
package com.codeabovelab.dm.cluman.batch; import com.codeabovelab.dm.cluman.model.CreateContainerArg; import com.codeabovelab.dm.cluman.cluster.docker.management.result.CreateAndStartContainerResult; import com.codeabovelab.dm.cluman.cluster.docker.management.result.ProcessEvent; import com.codeabovelab.dm.cluman.cluster.docker.management.result.ResultCode; import com.codeabovelab.dm.cluman.configs.container.DefaultParser; import com.codeabovelab.dm.cluman.job.JobComponent; import com.codeabovelab.dm.cluman.job.JobContext; import com.codeabovelab.dm.cluman.job.JobParam; import com.codeabovelab.dm.cluman.model.ContainerSource; import com.codeabovelab.dm.cluman.model.ImageName; import com.codeabovelab.dm.cluman.model.NodesGroup; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.Assert; import java.util.Map; import java.util.function.Consumer; /** * Processor which create containers */ @JobComponent @Slf4j public class CreateContainerTasklet { @Autowired private NodesGroup nodesGroup; @Autowired private JobContext context; @Autowired private RollbackData rollback; @Autowired private DefaultParser parser; @JobParam private Map<String, Object> containersConfigs; public ProcessedContainer execute(ProcessedContainer item) { ContainerSource cs = item.getSrc(); createEnrichConfiguration(cs, item.getImage()); cs.setName(item.getName()); cs.setNode(item.getNode()); cs.setCluster(item.getCluster()); Assert.notNull(cs.getCluster(), "Cluster is null in " + item); cs.setImage(item.getImage()); cs.setImageId(item.getImageId()); context.fire("Create container \"{0}\" with \"{1}\" image on \"{2}\" node", cs.getName(), cs.getImage(), cs.getNode()); CreateContainerArg arg = new CreateContainerArg() .enrichConfigs(true) // add to API .container(cs) .watcher(new MessageProxy()); CreateAndStartContainerResult res = nodesGroup.getContainers().createContainer(arg); item = item.makeCopy().id(res.getContainerId()).name(res.getName()).build(); rollback.record(item, RollbackData.Action.CREATE); ResultCode code = res.getCode(); if (code != ResultCode.OK && code != ResultCode.NOT_MODIFIED) { throw new RuntimeException("On create " + arg + ", we got: " + res.getCode() + " " + res.getMessage()); } return item; } @SuppressWarnings("unchecked") protected ContainerSource createEnrichConfiguration(ContainerSource arg, String image) { try { String registryAndImageName = ImageName.withoutTag(image); if (containersConfigs != null) { Object configs = containersConfigs.get(registryAndImageName); if (configs != null && configs instanceof Map) { Map<String, Object> configsMap = (Map<String, Object>) configs; parser.parse(configsMap, arg); } } } catch (Exception e) { log.error("error during enriching arg from config"); } return arg; } private class MessageProxy implements Consumer<ProcessEvent> { @Override public void accept(ProcessEvent processEvent) { context.fire(processEvent.getMessage()); } } }
[ "tech_fur@outlook.com" ]
tech_fur@outlook.com
22f24c02e866f94d341aba370cd30a164d1826a3
c53ee32324d283c5b652d0db764af1a298dd988d
/660.remove-9.113737791.ac.java
d61fb7c4dffcf89c114a1c884d7a4edb56f8e6db
[]
no_license
zhuolikevin/leetcode-java
f5f984e3db99359e2e5df621f1896dfd57030a93
712c93bade63829ca13bd88a4ef0600f3439be6d
refs/heads/master
2020-12-29T00:59:04.999430
2017-08-15T17:58:12
2017-08-15T17:58:12
94,374,971
3
0
null
null
null
null
UTF-8
Java
false
false
456
java
/* * [660] Remove 9 * * https://leetcode.com/problems/remove-9 * * Hard (43.59%) * Total Accepted: * Total Submissions: * Testcase Example: '10' * * Can you solve this problem? 🤔 */ public class Solution { public int newInteger(int n) { int res = 0; int base = 1; while (n > 0) { res += n % 9 * base; n /= 9; base *= 10; } return res; } }
[ "lizhuogo@gmail.com" ]
lizhuogo@gmail.com
918933994847b9e5d24a7cf60081505ee1da213b
af10e43252529568b7e83ee161165f52dc35bb0f
/services/user-server/src/main/java/com/bsd/user/server/model/vo/UserDetailVO.java
1b5eb3ae3d13ba4bd4b55e86085569b4987eaef9
[ "MIT" ]
permissive
footprintes/open-platform
e7bf80b41128b968846fa28d54d2b8a4b77c03d2
affac45dbac7aa03070eec31ca97c3ebf2dca03b
refs/heads/master
2022-04-10T17:31:03.201219
2020-04-03T04:58:28
2020-04-03T04:58:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
855
java
package com.bsd.user.server.model.vo; import lombok.Data; import java.util.Date; /** * @Author: linrongxin * @Date: 2019/8/22 17:39 */ @Data public class UserDetailVO { /** * 用户ID */ private Long userId; /** * 昵称 */ private String nickname; /** * 头像 */ private String avatar; /** * 邮箱 */ private String email; /** * 手机号 */ private String mobile; /** * 注册时间 */ private Date registerTime; /** * 0-跨境知道 1-卖家成长 3-人工录入 */ private Integer source; /** * 用户来源 */ private String sourceStr; /** * 性别 (0 保密 1男 2女) */ private Integer sex; /** * 最后登录时间 */ private Date lastLoginTime; }
[ "futustar@qq.com" ]
futustar@qq.com
2603311ecfdd07ecf2727712a8d9201e6d7d6c19
308fdb87abe189280f75af51db110e01db7cbfdd
/src/com/company/hash/ClassPresident.java
2f17c1530c3b5bc8aede80c65a474e784703d361
[]
no_license
BeomjunLee/Algorithm
87fac7e6c8fe227d3bb0bf49ac66434fac5a1a32
cc1d48a18dc79a0adbfac54e2a12f088301b86f7
refs/heads/master
2023-05-30T19:31:56.871038
2021-06-15T10:11:15
2021-06-15T10:11:15
337,609,879
1
0
null
null
null
null
UTF-8
Java
false
false
2,484
java
package com.company.hash; import java.util.*; public class ClassPresident { /** * 1. 학급 회장(해쉬) * 설명 * 학급 회장을 뽑는데 후보로 기호 A, B, C, D, E 후보가 등록을 했습니다. * 투표용지에는 반 학생들이 자기가 선택한 후보의 기호(알파벳)가 쓰여져 있으며 선생님은 그 기호를 발표하고 있습니다. * 선생님의 발표가 끝난 후 어떤 기호의 후보가 학급 회장이 되었는지 출력하는 프로그램을 작성하세요. * 반드시 한 명의 학급회장이 선출되도록 투표결과가 나왔다고 가정합니다. * * 입력 * 첫 줄에는 반 학생수 N(5<=N<=50)이 주어집니다. * 두 번째 줄에 N개의 투표용지에 쓰여져 있던 각 후보의 기호가 선생님이 발표한 순서대로 문자열로 입력됩니다. * * 출력 * 학급 회장으로 선택된 기호를 출력합니다. * * 예시 입력 1 * * 15 * BACBACCACCBDEDE * 예시 출력 1 * C */ public static char solution(int num, String vote) { char result = 0; char[] votes = vote.toCharArray(); int max = 0; Map<Character, Integer> map = new HashMap<>(); map.put('A', 0); map.put('B', 0); map.put('C', 0); map.put('D', 0); map.put('E', 0); for (int i = 0; i < num; i++) { if(map.containsKey(votes[i])) { Integer value = map.get(votes[i]); map.put(votes[i], ++value); if (value > max) { max = value; result = votes[i]; } } } return result; } public static char solution2(int num, String vote) { char result = 0; int max = 0; Map<Character, Integer> map = new HashMap<>(); for (char c : vote.toCharArray()) { map.put(c, map.getOrDefault(c, 0) + 1); } for (char key : map.keySet()) { if (map.get(key) > max) { max = map.get(key); result = key; } } return result; } public static void main(String[] args) { Scanner scan = new Scanner(System.in); int num = scan.nextInt(); String vote = scan.next(); char result = solution(num, vote); System.out.println(result); } }
[ "qjawnswkd0717@gmail.com" ]
qjawnswkd0717@gmail.com
76096c44c123770bf2d971afad9b68a8f37a216c
dec6bd85db1d028edbbd3bd18fe0ca628eda012e
/netbeans-projects/ExeMultiplicacaoMatrizOMP/src/MultiplicacaoMatriz/MultiplicacaoMatriz_jomp.java
3780a029b9c6731e14de7585ecddcbde069a2bf0
[]
no_license
MatheusGrenfell/java-projects
21b961697e2c0c6a79389c96b588e142c3f70634
93c7bfa2e4f73a232ffde2d38f30a27f2a816061
refs/heads/master
2022-12-29T12:55:00.014296
2020-10-16T00:54:30
2020-10-16T00:54:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,364
java
package MultiplicacaoMatriz; import jomp.runtime.OMP; public class MultiplicacaoMatriz_jomp { public static void main(String[] args) { int matriz[][] = new int[4][4]; int matrizResult[][] = new int[4][4]; matriz[0][0] = 55; matriz[0][1] = 15; matriz[0][2] = 546; matriz[0][3] = 56; matriz[1][0] = 54; matriz[1][1] = 13; matriz[1][2] = 23; matriz[1][3] = 10; matriz[2][0] = 49; matriz[2][1] = 57; matriz[2][2] = 102; matriz[2][3] = 25; matriz[3][0] = 23; matriz[3][1] = 45; matriz[3][2] = 24; matriz[3][3] = 15; System.out.println("Matriz original: "); for (int i = 0; i < matriz.length; i++) { System.out.print("["); for (int y = 0; y < matriz.length; y++) { System.out.printf("%3d ", matriz[i][y]); } System.out.println("]"); } System.out.println(); OMP.setNumThreads(4); // OMP PARALLEL BLOCK BEGINS { __omp_Class0 __omp_Object0 = new __omp_Class0(); // shared variables __omp_Object0.matrizResult = matrizResult; __omp_Object0.matriz = matriz; __omp_Object0.args = args; // firstprivate variables try { jomp.runtime.OMP.doParallel(__omp_Object0); } catch (Throwable __omp_exception) { System.err.println("OMP Warning: Illegal thread exception ignored!"); System.err.println(__omp_exception); } // reduction variables // shared variables matrizResult = __omp_Object0.matrizResult; matriz = __omp_Object0.matriz; args = __omp_Object0.args; } // OMP PARALLEL BLOCK ENDS System.out.println(); System.out.println("Matriz multiplicada por 4: "); for (int i = 0; i < matrizResult.length; i++) { System.out.print("["); for (int y = 0; y < matrizResult.length; y++) { System.out.printf("%4d ", matrizResult[i][y]); } System.out.println("]"); } } // OMP PARALLEL REGION INNER CLASS DEFINITION BEGINS private static class __omp_Class0 extends jomp.runtime.BusyTask { // shared variables int[][] matrizResult; int[][] matriz; String[] args; // firstprivate variables // variables to hold results of reduction public void go(int __omp_me) throws Throwable { // firstprivate variables + init // private variables int myid; // reduction variables, init to default // OMP USER CODE BEGINS { for (int i = 0; i < matriz.length; i++) { myid = OMP.getThreadNum(); matrizResult[myid][i] = matriz[myid][i] * 4; System.out.println("Elemento da linha: " + myid + " coluna: " + i); } } // OMP USER CODE ENDS // call reducer // output to _rd_ copy if (jomp.runtime.OMP.getThreadNum(__omp_me) == 0) { } } } // OMP PARALLEL REGION INNER CLASS DEFINITION ENDS }
[ "caiohobus@gmail.com" ]
caiohobus@gmail.com
56dd5f2d4df96895881f3d28a49a9f7525a2e61c
419e0607d4bb1ff298faca921447ee4b35e5b894
/server/src/main/java/io/crate/exceptions/InvalidArgumentException.java
9fe277a415274c2fb0cc6fced38c0ff158c77a34
[ "LicenseRef-scancode-generic-cla", "Apache-2.0" ]
permissive
crate/crate
7af793e2f709b77a5addc617d6e9dbba452d4e68
8acb044a7cdbab048b045854d0466fccc2492550
refs/heads/master
2023-08-31T07:17:42.891453
2023-08-30T15:09:09
2023-08-30T17:13:14
9,342,529
3,540
639
Apache-2.0
2023-09-14T21:00:43
2013-04-10T09:17:16
Java
UTF-8
Java
false
false
1,621
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.exceptions; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.io.stream.StreamInput; import java.io.IOException; public class InvalidArgumentException extends ElasticsearchException implements CrateException { public InvalidArgumentException(String message) { super(message); } public <C, R> R accept(CrateExceptionVisitor<C, R> exceptionVisitor, C context) { return exceptionVisitor.visitCrateException(this, context); } public InvalidArgumentException(StreamInput in) throws IOException { super(in); } }
[ "37929162+mergify[bot]@users.noreply.github.com" ]
37929162+mergify[bot]@users.noreply.github.com
6554e181e78075c1ec4b12124c6e96e8cca924e8
954bd8c43237b879fdd659a0f4c207a6ec0da7ea
/java.labs/RetrieveData/src/main/java/de/mmx/etester/RetrieveData/wizardpage/ProjectPage.java
d0642d180426241e213ecec28f1d2355a84d8748
[]
no_license
bothmagic/marxenter-labs
5e85921ae5b964b9cd58c98602a0faf85be4264e
cf1040e4de8cf4fd13b95470d6846196e1c73ff4
refs/heads/master
2021-01-10T14:15:31.594790
2013-12-20T11:22:53
2013-12-20T11:22:53
46,557,821
2
0
null
null
null
null
UTF-8
Java
false
false
5,172
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package de.mmx.etester.RetrieveData.wizardpage; import de.mmx.etester.RetrieveData.etrest.LoadManager; import de.mmx.etester.RetrieveData.restdata.ETPackage; import de.mmx.etester.RetrieveData.restdata.Project; import de.mmx.etester.RetrieveData.restdata.Requirement; import java.util.ArrayList; import java.util.List; import javax.swing.ListSelectionModel; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import javax.swing.tree.TreePath; import org.ciscavate.cjwizard.WizardPage; import org.ciscavate.cjwizard.WizardSettings; /** * * @author marxma */ public class ProjectPage extends WizardPage { /** * Creates new form RequirementsPage */ public ProjectPage() { super("Anforderungen auswählen", "Anforderungen auswählen"); initComponents(); ttEtReq.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); } @Override public void updateSettings(WizardSettings settings) { super.updateSettings(settings); ArrayList<Requirement> reqs = new ArrayList<Requirement>(); int[] rows = ttEtReq.getSelectedRows(); for (int row : rows) { TreePath path = ttEtReq.getPathForRow(row); Object lastElem = path.getLastPathComponent(); if (lastElem instanceof Project) { for (ETPackage pkg: ((Project)lastElem).getReqPackage()) { collectReq(pkg, reqs); } } else if (lastElem instanceof ETPackage) { collectReq(((ETPackage)lastElem), reqs); } else if (lastElem instanceof Requirement) { collectReq(((Requirement)lastElem), reqs); } } settings.put("requirements", reqs); } @Override public void rendering(List<WizardPage> path, WizardSettings settings) { super.rendering(path, settings); setNextEnabled(false); ttEtReq.setTreeTableModel(new ProjectTreeTableModel()); ttEtReq.getSelectionModel().addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { setNextEnabled(ttEtReq.getSelectedRowCount() > 0); } }); } private void collectReq(ETPackage eTPackage, List<Requirement> collectedList) { LoadManager.getInstance().load(eTPackage, false); for (ETPackage pgk: eTPackage.getChildren()) { collectReq(pgk, collectedList); } for (Requirement r : eTPackage.getRequirements()) { collectReq(r, collectedList); } } private void collectReq(Requirement req, List<Requirement> collectedList) { collectedList.add(req); LoadManager.getInstance().load(req, false); for (Requirement r : req.getChildren()) { collectReq(r, collectedList); } } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); ttEtReq = new org.jdesktop.swingx.JXTreeTable(); jLabel3 = new javax.swing.JLabel(); jScrollPane1.setViewportView(ttEtReq); jLabel3.setText("Enterprise Tester Requirements"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3) .addGap(0, 293, Short.MAX_VALUE)) .addComponent(jScrollPane1)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE) .addContainerGap()) ); }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel3; private javax.swing.JScrollPane jScrollPane1; private org.jdesktop.swingx.JXTreeTable ttEtReq; // End of variables declaration//GEN-END:variables }
[ "markus.taubert@c8aec436-628a-29fb-4c76-4f2700b0ca23" ]
markus.taubert@c8aec436-628a-29fb-4c76-4f2700b0ca23
9104f013d5476812bcb7828cfbe2f2a45d76b995
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/4/org/apache/commons/lang3/text/StrBuilder_append_808.java
42ca86ae8c92629d8b1f90eea24b2fe4c4510811
[]
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
4,196
java
org apach common lang3 text build string constitu part provid flexibl power api string buffer stringbuff main differ string buffer stringbuff string builder stringbuild subclass direct access charact arrai addit method append separ appendwithsepar add arrai valu separ append pad appendpad add length pad charact append fix length appendfixedlength add fix width field builder char arrai tochararrai char getchar simpler wai rang charact arrai delet delet string replac search replac string left string leftstr string rightstr mid string midstr substr except builder string size clear empti isempti collect style api method view token astoken intern buffer sourc str token strtoken reader asread intern buffer sourc reader writer aswrit writer write directli intern buffer aim provid api mimic close string buffer stringbuff addit method note edg case invalid indic input alter individu method biggest output text 'null' control properti link set null text setnulltext string prior implement cloneabl implement clone method onward longer version str builder strbuilder char sequenc charsequ append serializ builder string append string builder code string valueof code param append enabl chain str builder strbuilder append append string valueof
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
f80b8b2fb4fc03e7bf78604d7a1a1e8e2458255a
edd03269302c9759806d4f85123ea7e5bccb9cbf
/core-java/src/test/java/org/baeldung/java/collections/CoreJavaCollectionsUnitTest.java
fb7bfe51a2750dcf4c1b6be4c6acd70adaad5e42
[]
no_license
susetech/tutorials
46291a2139b3098ec1d308942bc7d5b7d4094547
1ed7451225d578f223614870044246ee4dac38cb
refs/heads/master
2021-01-22T05:57:44.004033
2017-04-09T15:06:42
2017-04-09T15:06:42
81,725,936
2
0
null
2017-03-26T04:22:36
2017-02-12T12:57:55
XSLT
UTF-8
Java
false
false
2,260
java
package org.baeldung.java.collections; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.apache.commons.collections4.ListUtils; import org.junit.Test; import com.google.common.collect.ImmutableList; public class CoreJavaCollectionsUnitTest { // tests - @Test public final void givenUsingTheJdk_whenArrayListIsSynchronized_thenCorrect() { final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three")); final List<String> synchronizedList = Collections.synchronizedList(list); System.out.println("Synchronized List is: " + synchronizedList); } @Test(expected = UnsupportedOperationException.class) public final void givenUsingTheJdk_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() { final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three")); final List<String> unmodifiableList = Collections.unmodifiableList(list); unmodifiableList.add("four"); } @Test(expected = UnsupportedOperationException.class) public final void givenUsingGuava_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() { final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three")); final List<String> unmodifiableList = ImmutableList.copyOf(list); unmodifiableList.add("four"); } @Test(expected = UnsupportedOperationException.class) public final void givenUsingGuavaBuilder_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() { final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three")); final ImmutableList<Object> unmodifiableList = ImmutableList.builder().addAll(list).build(); unmodifiableList.add("four"); } @Test(expected = UnsupportedOperationException.class) public final void givenUsingCommonsCollections_whenUnmodifiableListIsCreatedFromOriginal_thenNoLongerModifiable() { final List<String> list = new ArrayList<String>(Arrays.asList("one", "two", "three")); final List<String> unmodifiableList = ListUtils.unmodifiableList(list); unmodifiableList.add("four"); } }
[ "hanriseldon@gmail.com" ]
hanriseldon@gmail.com
fd67ad7da0acff712bbfa5ff02eef67f41dd0d4e
46167791cbfeebc8d3ddc97112764d7947fffa22
/spring-boot/src/main/java/com/justexample/entity/Entity1375.java
a8b0b8e74976e9683e2c45c4145f4560d1804580
[]
no_license
kahlai/unrealistictest
4f668b4822a25b4c1f06c6b543a26506bb1f8870
fe30034b05f5aacd0ef69523479ae721e234995c
refs/heads/master
2023-08-25T09:32:16.059555
2021-11-09T08:17:22
2021-11-09T08:17:22
425,726,016
0
0
null
null
null
null
UTF-8
Java
false
false
1,134
java
package com.justexample.entity; import java.sql.Timestamp; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class Entity1375 { @Id private Long id; private String code; private String name; private String status; private int seq; private Timestamp createdDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public int getSeq() { return seq; } public void setSeq(int seq) { this.seq = seq; } public Timestamp getCreatedDate() { return createdDate; } public void setCreatedDate(Timestamp createdDate) { this.createdDate = createdDate; } }
[ "laikahhoe@gmail.com" ]
laikahhoe@gmail.com
94f8537768f2aef3df4922fd9930fe446f47a8b8
f787964b2eb70971c558892c37f3036dda7f5cb8
/.JETEmitters/src/org/talend/designer/codegen/translators/databases/mongodb/TMongoDBWriteConfFinallyJava.java
e2fc281a25a8e1ed593827bff0fbc6ca7cbd205f
[]
no_license
sharrake/SampleTalendWorkspace
1746e1600ec667efc8a929c8fc33ca1e3d1f09f5
b518c24aca165408eaef0353a7bb208ac4c9bd96
refs/heads/master
2021-01-10T04:19:48.039640
2015-11-23T11:16:36
2015-11-23T11:16:36
46,714,207
0
4
null
null
null
null
UTF-8
Java
false
false
3,448
java
package org.talend.designer.codegen.translators.databases.mongodb; import org.talend.core.model.process.INode; import org.talend.designer.codegen.config.CodeGeneratorArgument; import org.talend.core.model.process.ElementParameterParser; import java.util.List; import org.talend.core.model.metadata.IMetadataTable; import org.talend.core.model.process.IConnection; import org.talend.core.model.process.IConnectionCategory; import org.talend.core.model.utils.NodeUtil; import org.talend.core.model.process.EConnectionType; public class TMongoDBWriteConfFinallyJava { protected static String nl; public static synchronized TMongoDBWriteConfFinallyJava create(String lineSeparator) { nl = lineSeparator; TMongoDBWriteConfFinallyJava result = new TMongoDBWriteConfFinallyJava(); nl = null; return result; } public final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl; protected final String TEXT_1 = "\t\t\t\tif(resourceMap.get(\"finish_"; protected final String TEXT_2 = "\") == null){" + NL + "\t\t\t\t\tif(resourceMap.get(\"mongo_"; protected final String TEXT_3 = "\") != null){" + NL + "\t\t\t\t\t\t"; protected final String TEXT_4 = NL + "\t\t\t\t\t\t\tlog.info(\""; protected final String TEXT_5 = " - Closing the connection \" + ((com.mongodb.Mongo)resourceMap.get(\"mongo_"; protected final String TEXT_6 = "\")).getServerAddressList() + \".\");" + NL + "\t\t\t\t\t\t"; protected final String TEXT_7 = NL + "\t\t\t\t\t\t\t((com.mongodb.Mongo)resourceMap.get(\"mongo_"; protected final String TEXT_8 = "\")).close();" + NL + "\t\t\t\t\t\t"; protected final String TEXT_9 = NL + "\t\t\t\t\t\t\tlog.info(\""; protected final String TEXT_10 = " - The connection was closed successfully.\");" + NL + "\t\t\t\t\t\t"; protected final String TEXT_11 = NL + "\t\t\t\t\t}" + NL + "\t\t\t\t}" + NL + "\t\t\t"; protected final String TEXT_12 = NL; public String generate(Object argument) { final StringBuffer stringBuffer = new StringBuffer(); CodeGeneratorArgument codeGenArgument = (CodeGeneratorArgument) argument; INode node = (INode)codeGenArgument.getArgument(); String cid = node.getUniqueName(); String useExistingConn = ElementParameterParser.getValue(node,"__USE_EXISTING_CONNECTION__"); boolean isLog4jEnabled = ("true").equals(ElementParameterParser.getValue(node.getProcess(), "__LOG4J_ACTIVATE__")); String strJobCid=cid.replace("_Out",""); List<IMetadataTable> metadatas = node.getMetadataList(); if ((metadatas!=null)&&(metadatas.size()>0)) { IMetadataTable metadata = metadatas.get(0); if (metadata!=null) { if(!"true".equals(useExistingConn)){ stringBuffer.append(TEXT_1); stringBuffer.append(cid); stringBuffer.append(TEXT_2); stringBuffer.append(cid); stringBuffer.append(TEXT_3); if(isLog4jEnabled){ stringBuffer.append(TEXT_4); stringBuffer.append(cid); stringBuffer.append(TEXT_5); stringBuffer.append(cid); stringBuffer.append(TEXT_6); } stringBuffer.append(TEXT_7); stringBuffer.append(cid); stringBuffer.append(TEXT_8); if(isLog4jEnabled){ stringBuffer.append(TEXT_9); stringBuffer.append(cid); stringBuffer.append(TEXT_10); } stringBuffer.append(TEXT_11); } } } stringBuffer.append(TEXT_12); return stringBuffer.toString(); } }
[ "rakesh.ramotra@gmail.com" ]
rakesh.ramotra@gmail.com
3fbbe717a82f971fd3d48ac3d5bb379bc56b7bac
f6e3e448f7dcdfbe1fc88416698acdf19eab568e
/src/main/java/com/tom/fabriclibs/events/entity/HarvestCheckEvent.java
aa61dd6da83bdfb967fa36867daeedb3d98c2e41
[ "MIT" ]
permissive
tom5454/Toms-Fabric-Lib
d6ebec762b15d4d19bba43862a5fbc12ff32d3c3
c0b85201ac5e040721a000645bb1d721cb768686
refs/heads/master
2022-11-27T00:22:02.272946
2020-07-26T19:02:44
2020-07-26T19:02:44
281,626,270
1
1
null
null
null
null
UTF-8
Java
false
false
584
java
package com.tom.fabriclibs.events.entity; import net.minecraft.block.BlockState; import net.minecraft.entity.player.PlayerEntity; public class HarvestCheckEvent extends EntityEvent { private final BlockState state; private boolean success; public HarvestCheckEvent(PlayerEntity player, BlockState state, boolean success) { super(player); this.state = state; this.success = success; } public BlockState getTargetBlock() { return this.state; } public boolean canHarvest() { return this.success; } public void setCanHarvest(boolean success){ this.success = success; } }
[ "tom5454a@gmail.com" ]
tom5454a@gmail.com
3df6179cba213e2ed3cfc28e7dfd05f529dabf6f
2ccb4c6f253ec1e7418d468a664a2e31f62c3784
/app/src/main/java/com/bibinet/biunion/mvp/presenter/SearchActivityPresenter.java
837d7f8a55abe53d9ad764104494835cd8bb1014
[]
no_license
zhangyalong123feiyu/BiUnion
8207e1cae667a93a0ca62ceca7bddaaf60e6131b
5452c654c3efb929e714d0b8928eef902db4ce8a
refs/heads/master
2021-01-21T10:00:27.173330
2017-07-18T02:32:16
2017-07-18T02:32:19
91,677,294
2
0
null
null
null
null
UTF-8
Java
false
false
2,021
java
package com.bibinet.biunion.mvp.presenter; import android.util.Log; import com.bibinet.biunion.mvp.model.SearchActivityModel; import com.bibinet.biunion.mvp.view.SearchActivityView; import com.bibinet.biunion.project.bean.SearchResultBean; import com.bibinet.biunion.project.builder.MyCacheCallBack; import com.google.gson.Gson; /** * Created by bibinet on 2017-6-19. */ public class SearchActivityPresenter { private SearchActivityView searchActivityView; private SearchActivityModel searchActivityModel; public SearchActivityPresenter(SearchActivityView searchActivityView) { this.searchActivityView = searchActivityView; this.searchActivityModel=new SearchActivityModel(); } public void getSearchData(int pageNumb, String content, final boolean isLoadMore){ searchActivityView.showProgress(); searchActivityModel.searProjectInfoModel(pageNumb,content,new MyCacheCallBack(){ @Override public void onSuccess(String s) { super.onSuccess(s); Gson gson=new Gson(); SearchResultBean searchResultInfo = gson.fromJson(s, SearchResultBean.class); searchActivityView.onSearchSucess(searchResultInfo.getItems(),isLoadMore); searchActivityView.hideProgress(); } @Override public void onError(Throwable throwable, boolean b) { super.onError(throwable, b); searchActivityView.onSearchFailed(throwable.getMessage()); searchActivityView.hideProgress(); } @Override public boolean onCache(String s) { Gson gson=new Gson(); SearchResultBean searchResultInfo = gson.fromJson(s, SearchResultBean.class); searchActivityView.onSearchSucess(searchResultInfo.getItems(),isLoadMore); searchActivityView.hideProgress(); return super.onCache(s); } }); } }
[ "409812937@qq.com" ]
409812937@qq.com
25bdba8282d2f75f24f7555d68e0c0ad7095f137
a6c8086150ff47a4a3ad7723e8bf4351636f4707
/springboot-jpa-examples/src/main/java/com/example/springbootjpaexamples/example07/jpql/repository/User07Repository.java
36fee946f25e11e100c492321282eaf5e8431ba1
[]
no_license
gpgzy/springboot-course
994c4a27ac7b17b90038e7c9007768475c582f59
8ef0446f04364680b47561e4f418628821fb782b
refs/heads/master
2021-03-25T09:27:42.343321
2020-06-10T06:36:03
2020-06-10T06:36:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
833
java
package com.example.springbootjpaexamples.example07.jpql.repository; import com.example.springbootjpaexamples.example07.jpql.entity.User07; import com.example.springbootjpaexamples.repository.BaseRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface User07Repository extends BaseRepository<User07, Integer> { @Query("from User07 u where u.name=:name") List<User07> list(@Param("name") String name); List<User07> findByName(String name); @Modifying @Query("update User07 u set u.name=:newname where u.id=:id") int update(@Param("id") int id, @Param("newname") String name); }
[ "bwang0629@gmail.com" ]
bwang0629@gmail.com
bbbab1894a7f3b37efb16043fadc911bd96ae9ff
839865567c38f9bef925710d73e6094a142b95c8
/audit/.svn/pristine/da/da8641fc787b40d8f3132dab7923fdee9a84643a.svn-base
70bc7dde3ca5b34131a9569b89bbeee88c8238f1
[]
no_license
serenawanggit/learngit
7e598cfb7e55ffdaef1a5c3ece4e8c4d30ec1a49
60cbc6d016d0736aa520df4d2dd72a58d1f4aa9d
refs/heads/master
2021-09-05T09:34:40.457287
2018-01-26T03:33:03
2018-01-26T03:33:03
118,994,216
0
0
null
null
null
null
UTF-8
Java
false
false
1,053
package audit.model.assess; import java.io.Serializable; public class AsAccessSiteCheckReport implements Serializable{ /** * * AsAccessSiteCheckReport.java */ private static final long serialVersionUID = -9119518589134001872L; private Integer id; private Integer accessSpcialtyId; private String nodeName; private String content; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getAccessSpcialtyId() { return accessSpcialtyId; } public void setAccessSpcialtyId(Integer accessSpcialtyId) { this.accessSpcialtyId = accessSpcialtyId; } public String getNodeName() { return nodeName; } public void setNodeName(String nodeName) { this.nodeName = nodeName == null ? null : nodeName.trim(); } public String getContent() { return content; } public void setContent(String content) { this.content = content == null ? null : content.trim(); } }
[ "1416640422@qq.com" ]
1416640422@qq.com
3228c2327950ca589c05d433d48f92733830afda
b357cc8e82ef87548fe9c3b3f2ceb80693f225f3
/main/feature/src/boofcv/abst/feature/associate/AssociateDescTo2D.java
cbfc813e2a65923fb0768b4ad9da63cfe56dcd97
[ "Apache-2.0", "LicenseRef-scancode-takuya-ooura" ]
permissive
riskiNova/BoofCV
7806ef07586e28fbffd17537e741a71b11f0b381
16fff968dbbe07af4a9cb14395a89cde18ffb72e
refs/heads/master
2020-06-16T17:32:36.492220
2016-06-13T17:16:27
2016-06-13T17:16:27
75,079,845
1
0
null
2016-11-29T12:34:19
2016-11-29T12:34:19
null
UTF-8
Java
false
false
2,242
java
/* * Copyright (c) 2011-2013, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.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 boofcv.abst.feature.associate; import boofcv.struct.feature.AssociatedIndex; import boofcv.struct.feature.MatchScoreType; import georegression.struct.point.Point2D_F64; import org.ddogleg.struct.FastQueue; import org.ddogleg.struct.GrowQueue_I32; /** * Wrapper around {@link AssociateDescription} that allows it to be used inside of {@link AssociateDescription2D} * * @author Peter Abeles */ public class AssociateDescTo2D<D> implements AssociateDescription2D<D> { AssociateDescription<D> alg; public AssociateDescTo2D(AssociateDescription<D> alg) { this.alg = alg; } @Override public void setSource(FastQueue<Point2D_F64> location, FastQueue<D> descriptions) { alg.setSource(descriptions); } @Override public void setDestination(FastQueue<Point2D_F64> location, FastQueue<D> descriptions) { alg.setDestination(descriptions); } @Override public void associate() { alg.associate(); } @Override public FastQueue<AssociatedIndex> getMatches() { return alg.getMatches(); } @Override public GrowQueue_I32 getUnassociatedSource() { return alg.getUnassociatedSource(); } @Override public GrowQueue_I32 getUnassociatedDestination() { return alg.getUnassociatedDestination(); } @Override public void setThreshold(double score) { alg.setThreshold(score); } @Override public MatchScoreType getScoreType() { return alg.getScoreType(); } @Override public boolean uniqueSource() { return alg.uniqueSource(); } @Override public boolean uniqueDestination() { return alg.uniqueDestination(); } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
63c1471d9758452dab1295538718189a75437f82
8727b1cbb8ca63d30340e8482277307267635d81
/PolarWorld/src/com/game/toplist/structs/ArrowTop.java
bd27eb579e2167981b8419126559c7409c50f5cc
[]
no_license
taohyson/Polar
50026903ded017586eac21a7905b0f1c6b160032
b0617f973fd3866bed62da14f63309eee56f6007
refs/heads/master
2021-05-08T12:22:18.884688
2015-12-11T01:44:18
2015-12-11T01:44:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,118
java
package com.game.toplist.structs; import com.game.toplist.manager.TopListManager; /** * 弓箭排行数据 * * @author */ public class ArrowTop extends TopData{ private int arrowlv; private int starlv; private int bowlv; private int level; private int costgold; public ArrowTop(long topid, int arrowlv, int starlv, int bowlv, int level, int costgold) { super(topid); this.arrowlv = arrowlv; this.starlv = starlv; this.bowlv = bowlv; this.level = level; this.costgold = costgold; } public int getArrowlv() { return arrowlv; } public void setArrowlv(int arrowlv) { this.arrowlv = arrowlv; } public int getBowlv() { return bowlv; } public void setBowlv(int bowlv) { this.bowlv = bowlv; } public int getLevel() { return level; } public void setLevel(int level) { this.level = level; } public int getStarlv() { return starlv; } public void setStarlv(int starlv) { this.starlv = starlv; } public int getCostgold() { return costgold; } public void setCostgold(int costgold) { this.costgold = costgold; } @Override public boolean checkAddCondition() { return TopListManager.SYNC_ARROW <= arrowlv; } @Override public int compare(TopData otherTopData) { if (otherTopData instanceof ArrowTop) { ArrowTop othTop = (ArrowTop) otherTopData; if (othTop != null) { if (othTop.getArrowlv() > this.getArrowlv()) { return 1; } else if (othTop.getArrowlv() == this.getArrowlv()) { if (othTop.getStarlv() > this.getStarlv()) { return 1; } else if (othTop.getStarlv() == this.getStarlv()) { if (othTop.getBowlv() > this.getBowlv()) { return 1; } else if (othTop.getBowlv() == this.getBowlv()) { if (othTop.getLevel() > this.getLevel()) { return 1; } else if (othTop.getLevel() == this.getLevel()) { if (othTop.getCostgold() > this.getCostgold()) { return 1; } else if (othTop.getCostgold() == this.getCostgold()) { //return 1; return super.compare(otherTopData); } } } } } } } return -1; } }
[ "zhuyuanbiao@ZHUYUANBIAO.rd.com" ]
zhuyuanbiao@ZHUYUANBIAO.rd.com
f557b8ae061feb769e11b3a8e24acfac4e142ca7
553392b78d2110c70433af1acbb3bde9660fc860
/editor/src/com/kotcrab/vis/editor/serializer/json/GsonUtils.java
6d7f844f0e94a28e1ee4f6e3ae063e0636489f82
[ "Apache-2.0" ]
permissive
stbachmann/VisEditor
00b9ece7e587099e1c32786a1d05b04a0a02b5fa
0c5d052858753d2828c22e4b3ef16619e12b1f95
refs/heads/master
2021-01-18T00:04:05.249500
2016-06-08T20:06:31
2016-06-08T20:06:31
52,627,769
3
0
null
2016-02-26T19:32:40
2016-02-26T19:32:40
null
UTF-8
Java
false
false
1,606
java
/* * Copyright 2014-2016 See AUTHORS file. * * 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.kotcrab.vis.editor.serializer.json; import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonElement; import com.google.gson.JsonSerializationContext; /** @author Kotcrab */ public class GsonUtils { public static void appendClassProperty (JsonElement json, Object object, JsonSerializationContext context) { appendClassProperty(json, object, context, "@class"); } public static void appendClassProperty (JsonElement json, Object object, JsonSerializationContext context, String customMemberName) { json.getAsJsonObject().add(customMemberName, context.serialize(object.getClass())); } public static Class<?> readClassProperty (JsonElement json, JsonDeserializationContext context) { return readClassProperty(json, context, "@class"); } public static Class<?> readClassProperty (JsonElement json, JsonDeserializationContext context, String customMemberName) { return context.deserialize(json.getAsJsonObject().get(customMemberName), Class.class); } }
[ "kotcrab@gmail.com" ]
kotcrab@gmail.com
bb1d75aba09fcc9b1366843a86b0d7ebaa6c06de
a876372845fb60ed62193e794d7061321e662224
/annShop/src/main/java/cn/asmm/shop/protocol/usercollectdeleteResponse.java
89129b52205ee3967f688a88d632f09bbb05ace2
[]
no_license
datasheetA/AnnEcmobile
7ccd408655ff022b74618862f6bd1f73a388f866
e8cf98adc782692cead30cbe54f66f636d748073
refs/heads/master
2020-05-30T04:35:25.182945
2016-02-27T23:54:33
2016-02-27T23:54:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,113
java
package cn.asmm.shop.protocol; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import cn.asmm.activeandroid.Model; import cn.asmm.activeandroid.annotation.Column; import cn.asmm.activeandroid.annotation.Table; @Table(name = "usercollectdeleteResponse") public class usercollectdeleteResponse extends Model { @Column(name = "status") public STATUS status; public void fromJson(JSONObject jsonObject) throws JSONException { if(null == jsonObject){ return ; } JSONArray subItemArray; STATUS status = new STATUS(); status.fromJson(jsonObject.optJSONObject("status")); this.status = status; return ; } public JSONObject toJson() throws JSONException { JSONObject localItemObject = new JSONObject(); JSONArray itemJSONArray = new JSONArray(); if(null != status) { localItemObject.put("status", status.toJson()); } return localItemObject; } }
[ "luozhengan@vip.qq.com" ]
luozhengan@vip.qq.com
04c8ca44cc64e3655f385c7c5c060beedf7ff9e1
1031a2b073b83fe665ebda716e9a8b97378f6bcf
/ch11/src/Exercise/ex13/DatePrintExample.java
0f9b3a3994c39133f33890a483b8e0d41383585e
[]
no_license
nya49/Java-Lecture
7f0cc70c9ec140e97f8823f60c9491bf76c4560d
90777656f6acdc97ece34be9aaeb294fb096fd24
refs/heads/master
2020-04-28T19:51:11.734155
2019-05-30T07:35:58
2019-05-30T07:35:58
175,524,428
0
0
null
null
null
null
UTF-8
Java
false
false
322
java
package Exercise.ex13; import java.text.SimpleDateFormat; import java.util.Date; public class DatePrintExample { public static void main(String[] args) { Date now = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy년 MM월 dd일 E요일 hh시 mm분"); System.out.println(sdf.format(now)); } }
[ "nya49@naver.com" ]
nya49@naver.com
eb47db1e04d3ee2971e98c917a7c88b9369fbdb0
fd57ede0ba18642a730cc862c9e9059ec463320b
/data-binding/extensions/baseAdapters/src/main/java/android/databinding/adapters/AbsSpinnerBindingAdapter.java
6137e0cdbc99c6871589845ef086d2e135b3cbd4
[]
no_license
kailaisi/android-29-framwork
a0c706fc104d62ea5951ca113f868021c6029cd2
b7090eebdd77595e43b61294725b41310496ff04
refs/heads/master
2023-04-27T14:18:52.579620
2021-03-08T13:05:27
2021-03-08T13:05:27
254,380,637
1
1
null
2023-04-15T12:22:31
2020-04-09T13:35:49
C++
UTF-8
Java
false
false
2,695
java
/* * Copyright (C) 2015 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 android.databinding.adapters; import android.databinding.BindingAdapter; import android.widget.AbsSpinner; import android.widget.ArrayAdapter; import android.widget.SpinnerAdapter; import java.util.List; public class AbsSpinnerBindingAdapter { @BindingAdapter({"android:entries"}) public static <T extends CharSequence> void setEntries(AbsSpinner view, T[] entries) { if (entries != null) { SpinnerAdapter oldAdapter = view.getAdapter(); boolean changed = true; if (oldAdapter != null && oldAdapter.getCount() == entries.length) { changed = false; for (int i = 0; i < entries.length; i++) { if (!entries[i].equals(oldAdapter.getItem(i))) { changed = true; break; } } } if (changed) { ArrayAdapter<CharSequence> adapter = new ArrayAdapter<CharSequence>(view.getContext(), android.R.layout.simple_spinner_item, entries); adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); view.setAdapter(adapter); } } else { view.setAdapter(null); } } @BindingAdapter({"android:entries"}) public static <T> void setEntries(AbsSpinner view, List<T> entries) { if (entries != null) { SpinnerAdapter oldAdapter = view.getAdapter(); if (oldAdapter instanceof ObservableListAdapter) { ((ObservableListAdapter) oldAdapter).setList(entries); } else { view.setAdapter(new ObservableListAdapter<T>(view.getContext(), entries, android.R.layout.simple_spinner_item, android.R.layout.simple_spinner_dropdown_item, 0)); } } else { view.setAdapter(null); } } }
[ "541018378@qq.com" ]
541018378@qq.com
3cece5f3e60f080e86e126bafe20024380da3fd2
d88a94d23688c1ded00d2c4bd1bb82256e0944ce
/src/main/java/com/networkSerialization/ChatWithObj/Chatter0.java
0501335917aeb4f6bbf41fb5185729f8dfed11c6
[]
no_license
Ziem0/NetChat
70d99d8b00d518f35b8eb04015ca91cd12e732c2
99fc212936b6543ba4556f54c119ae18ff2e9bd4
refs/heads/master
2020-04-25T05:34:08.839271
2019-03-05T22:11:44
2019-03-05T22:11:44
172,547,835
0
0
null
null
null
null
UTF-8
Java
false
false
868
java
package com.networkSerialization.ChatWithObj; import java.io.*; import java.net.Socket; public abstract class Chatter0 { String name; BufferedReader br; public Chatter0(String name) { this.name = name; this.br = new BufferedReader(new InputStreamReader(System.in)); } public void chat(Socket client) throws IOException, ClassNotFoundException { try ( ObjectOutputStream out = new ObjectOutputStream(client.getOutputStream()); ObjectInputStream in = new ObjectInputStream(client.getInputStream())) { while (true) { if (in.available() > 0) { if (in.read() == 2) { Message0 msg = (Message0) in.readObject(); System.out.println(msg); } } if (br.ready()) { out.reset(); out.write(2); out.writeObject(new Message0(name, br.readLine())); } else { out.write(1); } } } } }
[ "andrzejewski.ziemo@gmail.com" ]
andrzejewski.ziemo@gmail.com
47a1d484e3d22b7b4d8a449e026b42fc0210b6b3
a306f79281c4eb154fbbddedea126f333ab698da
/com/facebook/FacebookRequestError.java
ce65dd615d34febe36191510f4048e6987780636
[]
no_license
pkcsecurity/decompiled-lightbulb
50828637420b9e93e9a6b2a7d500d2a9a412d193
314bb20a383b42495c04531106c48fd871115702
refs/heads/master
2022-01-26T18:38:38.489549
2019-05-11T04:27:09
2019-05-11T04:27:09
186,070,402
0
0
null
null
null
null
UTF-8
Java
false
false
7,846
java
package com.facebook; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.facebook.FacebookException; import com.facebook.FacebookServiceException; import com.facebook.internal.FacebookRequestErrorClassification; import java.net.HttpURLConnection; import org.json.JSONObject; public final class FacebookRequestError implements Parcelable { private static final String BODY_KEY = "body"; private static final String CODE_KEY = "code"; public static final Creator<FacebookRequestError> CREATOR = new Creator() { public FacebookRequestError createFromParcel(Parcel var1) { return new FacebookRequestError(var1, null); } public FacebookRequestError[] newArray(int var1) { return new FacebookRequestError[var1]; } }; private static final String ERROR_CODE_FIELD_KEY = "code"; private static final String ERROR_CODE_KEY = "error_code"; private static final String ERROR_IS_TRANSIENT_KEY = "is_transient"; private static final String ERROR_KEY = "error"; private static final String ERROR_MESSAGE_FIELD_KEY = "message"; private static final String ERROR_MSG_KEY = "error_msg"; private static final String ERROR_REASON_KEY = "error_reason"; private static final String ERROR_SUB_CODE_KEY = "error_subcode"; private static final String ERROR_TYPE_FIELD_KEY = "type"; private static final String ERROR_USER_MSG_KEY = "error_user_msg"; private static final String ERROR_USER_TITLE_KEY = "error_user_title"; static final FacebookRequestError.Range HTTP_RANGE_SUCCESS = new FacebookRequestError.Range(200, 299, null); public static final int INVALID_ERROR_CODE = -1; public static final int INVALID_HTTP_STATUS_CODE = -1; private final Object batchRequestResult; private final FacebookRequestError.Category category; private final HttpURLConnection connection; private final int errorCode; private final String errorMessage; private final String errorRecoveryMessage; private final String errorType; private final String errorUserMessage; private final String errorUserTitle; private final FacebookException exception; private final JSONObject requestResult; private final JSONObject requestResultBody; private final int requestStatusCode; private final int subErrorCode; private FacebookRequestError(int var1, int var2, int var3, String var4, String var5, String var6, String var7, boolean var8, JSONObject var9, JSONObject var10, Object var11, HttpURLConnection var12, FacebookException var13) { this.requestStatusCode = var1; this.errorCode = var2; this.subErrorCode = var3; this.errorType = var4; this.errorMessage = var5; this.requestResultBody = var9; this.requestResult = var10; this.batchRequestResult = var11; this.connection = var12; this.errorUserTitle = var6; this.errorUserMessage = var7; boolean var14; if(var13 != null) { this.exception = var13; var14 = true; } else { this.exception = new FacebookServiceException(this, var5); var14 = false; } FacebookRequestErrorClassification var16 = getErrorClassification(); FacebookRequestError.Category var15; if(var14) { var15 = FacebookRequestError.Category.OTHER; } else { var15 = var16.classify(var2, var3, var8); } this.category = var15; this.errorRecoveryMessage = var16.getRecoveryMessage(this.category); } public FacebookRequestError(int var1, String var2, String var3) { this(-1, var1, -1, var2, var3, (String)null, (String)null, false, (JSONObject)null, (JSONObject)null, (Object)null, (HttpURLConnection)null, (FacebookException)null); } private FacebookRequestError(Parcel var1) { this(var1.readInt(), var1.readInt(), var1.readInt(), var1.readString(), var1.readString(), var1.readString(), var1.readString(), false, (JSONObject)null, (JSONObject)null, (Object)null, (HttpURLConnection)null, (FacebookException)null); } // $FF: synthetic method FacebookRequestError(Parcel var1, Object var2) { this(var1); } FacebookRequestError(HttpURLConnection var1, Exception var2) { FacebookException var3; if(var2 instanceof FacebookException) { var3 = (FacebookException)var2; } else { var3 = new FacebookException(var2); } this(-1, -1, -1, (String)null, (String)null, (String)null, (String)null, false, (JSONObject)null, (JSONObject)null, (Object)null, var1, var3); } static FacebookRequestError checkResponseAndCreateError(JSONObject param0, Object param1, HttpURLConnection param2) { // $FF: Couldn't be decompiled } static FacebookRequestErrorClassification getErrorClassification() { // $FF: Couldn't be decompiled } public int describeContents() { return 0; } public Object getBatchRequestResult() { return this.batchRequestResult; } public FacebookRequestError.Category getCategory() { return this.category; } public HttpURLConnection getConnection() { return this.connection; } public int getErrorCode() { return this.errorCode; } public String getErrorMessage() { return this.errorMessage != null?this.errorMessage:this.exception.getLocalizedMessage(); } public String getErrorRecoveryMessage() { return this.errorRecoveryMessage; } public String getErrorType() { return this.errorType; } public String getErrorUserMessage() { return this.errorUserMessage; } public String getErrorUserTitle() { return this.errorUserTitle; } public FacebookException getException() { return this.exception; } public JSONObject getRequestResult() { return this.requestResult; } public JSONObject getRequestResultBody() { return this.requestResultBody; } public int getRequestStatusCode() { return this.requestStatusCode; } public int getSubErrorCode() { return this.subErrorCode; } public String toString() { StringBuilder var1 = new StringBuilder("{HttpStatus: "); var1.append(this.requestStatusCode); var1.append(", errorCode: "); var1.append(this.errorCode); var1.append(", subErrorCode: "); var1.append(this.subErrorCode); var1.append(", errorType: "); var1.append(this.errorType); var1.append(", errorMessage: "); var1.append(this.getErrorMessage()); var1.append("}"); return var1.toString(); } public void writeToParcel(Parcel var1, int var2) { var1.writeInt(this.requestStatusCode); var1.writeInt(this.errorCode); var1.writeInt(this.subErrorCode); var1.writeString(this.errorType); var1.writeString(this.errorMessage); var1.writeString(this.errorUserTitle); var1.writeString(this.errorUserMessage); } static class Range { private final int end; private final int start; private Range(int var1, int var2) { this.start = var1; this.end = var2; } // $FF: synthetic method Range(int var1, int var2, Object var3) { this(var1, var2); } boolean contains(int var1) { return this.start <= var1 && var1 <= this.end; } } public static enum Category { // $FF: synthetic field private static final FacebookRequestError.Category[] $VALUES = new FacebookRequestError.Category[]{LOGIN_RECOVERABLE, OTHER, TRANSIENT}; LOGIN_RECOVERABLE("LOGIN_RECOVERABLE", 0), OTHER("OTHER", 1), TRANSIENT("TRANSIENT", 2); private Category(String var1, int var2) {} } }
[ "josh@pkcsecurity.com" ]
josh@pkcsecurity.com
96989db05ba3b17312be9e572aa162e729239235
ae8d78faca8bd2ee6975258f77cac37b769c9272
/src/tech/aistar/entity/OrderStatus.java
c90130608c8726bad8aaf3fd361f07aafcd6a812
[ "Apache-2.0" ]
permissive
guancgsuccess/jdbc
39c377b0801046000a4c79dac464c35158d171de
002c2425e68dffd6277c074c37153003f841e470
refs/heads/master
2020-05-19T11:25:32.408531
2019-05-07T09:16:51
2019-05-07T09:16:51
184,992,142
0
0
Apache-2.0
2019-05-06T06:37:06
2019-05-05T06:56:52
Java
UTF-8
Java
false
false
171
java
package tech.aistar.entity; /** * @author success * @version 1.0 * @description:本类用来演示: * @date 2019/5/6 0006 */ public enum OrderStatus { A,B,C,D }
[ "849962874@qq.com" ]
849962874@qq.com
fe259fc6b9e9edffdb1ef0c7fdff2fb8538ee0e8
bd20db2baa4478b7099392d1fab37a2a66d23913
/Src-Bitmap-Scale/java/utility/BitmapScaler.java
8c09d8cf1befcd7699a643c3a297c1e2ec7ca178
[ "Apache-2.0" ]
permissive
Ygauraw/Android-Templates-And-Utilities
a51e01bc9c823744b0a9bc06e2a9af1f80e324ad
775e33dcd9f1bbe962bd5d7237a240b7448a996e
refs/heads/master
2020-12-25T11:32:09.277487
2015-01-28T23:22:47
2015-01-28T23:22:47
30,013,159
1
0
null
2015-01-29T09:29:32
2015-01-29T09:29:32
null
UTF-8
Java
false
false
1,263
java
package com.example.utility; import android.graphics.Bitmap; public class BitmapScaler { // scale and keep aspect ratio public static Bitmap scaleToFitWidth(Bitmap b, int width) { float factor = width / (float) b.getWidth(); return Bitmap.createScaledBitmap(b, width, (int) (b.getHeight() * factor), true); } // scale and keep aspect ratio public static Bitmap scaleToFitHeight(Bitmap b, int height) { float factor = height / (float) b.getHeight(); return Bitmap.createScaledBitmap(b, (int) (b.getWidth() * factor), height, true); } // scale and keep aspect ratio public static Bitmap scaleToFill(Bitmap b, int width, int height) { float factorH = height / (float) b.getWidth(); float factorW = width / (float) b.getWidth(); float factorToUse = (factorH > factorW) ? factorW : factorH; return Bitmap.createScaledBitmap(b, (int) (b.getWidth() * factorToUse), (int) (b.getHeight() * factorToUse), true); } // scale and don't keep aspect ratio public static Bitmap strechToFill(Bitmap b, int width, int height) { float factorH = height / (float) b.getHeight(); float factorW = width / (float) b.getWidth(); return Bitmap.createScaledBitmap(b, (int) (b.getWidth() * factorW), (int) (b.getHeight() * factorH), true); } }
[ "petr.nohejl@gmail.com" ]
petr.nohejl@gmail.com
2689ab23284925f2a1ac9a4e50f314e193c1947e
38c4451ab626dcdc101a11b18e248d33fd8a52e0
/tokens/lucene-3.6.2/contrib/analyzers/kuromoji/src/tools/java/org/apache/lucene/analysis/ja/util/ConnectionCostsBuilder.java
baf53f8c34f0c43c4c63763f3b83456e830611d7
[]
no_license
habeascorpus/habeascorpus-data
47da7c08d0f357938c502bae030d5fb8f44f5e01
536d55729f3110aee058ad009bcba3e063b39450
refs/heads/master
2020-06-04T10:17:20.102451
2013-02-19T15:19:21
2013-02-19T15:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,210
java
package TokenNamepackage org TokenNameIdentifier . TokenNameDOT apache TokenNameIdentifier . TokenNameDOT lucene TokenNameIdentifier . TokenNameDOT analysis TokenNameIdentifier . TokenNameDOT ja TokenNameIdentifier . TokenNameDOT util TokenNameIdentifier ; TokenNameSEMICOLON import TokenNameimport java TokenNameIdentifier . TokenNameDOT io TokenNameIdentifier . TokenNameDOT FileInputStream TokenNameIdentifier ; TokenNameSEMICOLON import TokenNameimport java TokenNameIdentifier . TokenNameDOT io TokenNameIdentifier . TokenNameDOT IOException TokenNameIdentifier ; TokenNameSEMICOLON import TokenNameimport java TokenNameIdentifier . TokenNameDOT io TokenNameIdentifier . TokenNameDOT InputStreamReader TokenNameIdentifier ; TokenNameSEMICOLON import TokenNameimport java TokenNameIdentifier . TokenNameDOT io TokenNameIdentifier . TokenNameDOT LineNumberReader TokenNameIdentifier ; TokenNameSEMICOLON import TokenNameimport java TokenNameIdentifier . TokenNameDOT nio TokenNameIdentifier . TokenNameDOT charset TokenNameIdentifier . TokenNameDOT Charset TokenNameIdentifier ; TokenNameSEMICOLON import TokenNameimport java TokenNameIdentifier . TokenNameDOT nio TokenNameIdentifier . TokenNameDOT charset TokenNameIdentifier . TokenNameDOT CharsetDecoder TokenNameIdentifier ; TokenNameSEMICOLON import TokenNameimport java TokenNameIdentifier . TokenNameDOT nio TokenNameIdentifier . TokenNameDOT charset TokenNameIdentifier . TokenNameDOT CodingErrorAction TokenNameIdentifier ; TokenNameSEMICOLON public TokenNamepublic class TokenNameclass ConnectionCostsBuilder TokenNameIdentifier { TokenNameLBRACE private TokenNameprivate ConnectionCostsBuilder TokenNameIdentifier ( TokenNameLPAREN ) TokenNameRPAREN { TokenNameLBRACE } TokenNameRBRACE public TokenNamepublic static TokenNamestatic ConnectionCostsWriter TokenNameIdentifier build TokenNameIdentifier ( TokenNameLPAREN String TokenNameIdentifier filename TokenNameIdentifier ) TokenNameRPAREN throws TokenNamethrows IOException TokenNameIdentifier { TokenNameLBRACE FileInputStream TokenNameIdentifier inputStream TokenNameIdentifier = TokenNameEQUAL new TokenNamenew FileInputStream TokenNameIdentifier ( TokenNameLPAREN filename TokenNameIdentifier ) TokenNameRPAREN ; TokenNameSEMICOLON Charset TokenNameIdentifier cs TokenNameIdentifier = TokenNameEQUAL Charset TokenNameIdentifier . TokenNameDOT forName TokenNameIdentifier ( TokenNameLPAREN "US-ASCII" TokenNameStringLiteral ) TokenNameRPAREN ; TokenNameSEMICOLON CharsetDecoder TokenNameIdentifier decoder TokenNameIdentifier = TokenNameEQUAL cs TokenNameIdentifier . TokenNameDOT newDecoder TokenNameIdentifier ( TokenNameLPAREN ) TokenNameRPAREN . TokenNameDOT onMalformedInput TokenNameIdentifier ( TokenNameLPAREN CodingErrorAction TokenNameIdentifier . TokenNameDOT REPORT TokenNameIdentifier ) TokenNameRPAREN . TokenNameDOT onUnmappableCharacter TokenNameIdentifier ( TokenNameLPAREN CodingErrorAction TokenNameIdentifier . TokenNameDOT REPORT TokenNameIdentifier ) TokenNameRPAREN ; TokenNameSEMICOLON InputStreamReader TokenNameIdentifier streamReader TokenNameIdentifier = TokenNameEQUAL new TokenNamenew InputStreamReader TokenNameIdentifier ( TokenNameLPAREN inputStream TokenNameIdentifier , TokenNameCOMMA decoder TokenNameIdentifier ) TokenNameRPAREN ; TokenNameSEMICOLON LineNumberReader TokenNameIdentifier lineReader TokenNameIdentifier = TokenNameEQUAL new TokenNamenew LineNumberReader TokenNameIdentifier ( TokenNameLPAREN streamReader TokenNameIdentifier ) TokenNameRPAREN ; TokenNameSEMICOLON String TokenNameIdentifier line TokenNameIdentifier = TokenNameEQUAL lineReader TokenNameIdentifier . TokenNameDOT readLine TokenNameIdentifier ( TokenNameLPAREN ) TokenNameRPAREN ; TokenNameSEMICOLON String TokenNameIdentifier [ TokenNameLBRACKET ] TokenNameRBRACKET dimensions TokenNameIdentifier = TokenNameEQUAL line TokenNameIdentifier . TokenNameDOT split TokenNameIdentifier ( TokenNameLPAREN "\s+" TokenNameStringLiteral ) TokenNameRPAREN ; TokenNameSEMICOLON assert TokenNameassert dimensions TokenNameIdentifier . TokenNameDOT length TokenNameIdentifier == TokenNameEQUAL_EQUAL 2 TokenNameIntegerLiteral ; TokenNameSEMICOLON int TokenNameint forwardSize TokenNameIdentifier = TokenNameEQUAL Integer TokenNameIdentifier . TokenNameDOT parseInt TokenNameIdentifier ( TokenNameLPAREN dimensions TokenNameIdentifier [ TokenNameLBRACKET 0 TokenNameIntegerLiteral ] TokenNameRBRACKET ) TokenNameRPAREN ; TokenNameSEMICOLON int TokenNameint backwardSize TokenNameIdentifier = TokenNameEQUAL Integer TokenNameIdentifier . TokenNameDOT parseInt TokenNameIdentifier ( TokenNameLPAREN dimensions TokenNameIdentifier [ TokenNameLBRACKET 1 TokenNameIntegerLiteral ] TokenNameRBRACKET ) TokenNameRPAREN ; TokenNameSEMICOLON assert TokenNameassert forwardSize TokenNameIdentifier > TokenNameGREATER 0 TokenNameIntegerLiteral && TokenNameAND_AND backwardSize TokenNameIdentifier > TokenNameGREATER 0 TokenNameIntegerLiteral ; TokenNameSEMICOLON ConnectionCostsWriter TokenNameIdentifier costs TokenNameIdentifier = TokenNameEQUAL new TokenNamenew ConnectionCostsWriter TokenNameIdentifier ( TokenNameLPAREN forwardSize TokenNameIdentifier , TokenNameCOMMA backwardSize TokenNameIdentifier ) TokenNameRPAREN ; TokenNameSEMICOLON while TokenNamewhile ( TokenNameLPAREN ( TokenNameLPAREN line TokenNameIdentifier = TokenNameEQUAL lineReader TokenNameIdentifier . TokenNameDOT readLine TokenNameIdentifier ( TokenNameLPAREN ) TokenNameRPAREN ) TokenNameRPAREN != TokenNameNOT_EQUAL null TokenNamenull ) TokenNameRPAREN { TokenNameLBRACE String TokenNameIdentifier [ TokenNameLBRACKET ] TokenNameRBRACKET fields TokenNameIdentifier = TokenNameEQUAL line TokenNameIdentifier . TokenNameDOT split TokenNameIdentifier ( TokenNameLPAREN "\s+" TokenNameStringLiteral ) TokenNameRPAREN ; TokenNameSEMICOLON assert TokenNameassert fields TokenNameIdentifier . TokenNameDOT length TokenNameIdentifier == TokenNameEQUAL_EQUAL 3 TokenNameIntegerLiteral ; TokenNameSEMICOLON int TokenNameint forwardId TokenNameIdentifier = TokenNameEQUAL Integer TokenNameIdentifier . TokenNameDOT parseInt TokenNameIdentifier ( TokenNameLPAREN fields TokenNameIdentifier [ TokenNameLBRACKET 0 TokenNameIntegerLiteral ] TokenNameRBRACKET ) TokenNameRPAREN ; TokenNameSEMICOLON int TokenNameint backwardId TokenNameIdentifier = TokenNameEQUAL Integer TokenNameIdentifier . TokenNameDOT parseInt TokenNameIdentifier ( TokenNameLPAREN fields TokenNameIdentifier [ TokenNameLBRACKET 1 TokenNameIntegerLiteral ] TokenNameRBRACKET ) TokenNameRPAREN ; TokenNameSEMICOLON int TokenNameint cost TokenNameIdentifier = TokenNameEQUAL Integer TokenNameIdentifier . TokenNameDOT parseInt TokenNameIdentifier ( TokenNameLPAREN fields TokenNameIdentifier [ TokenNameLBRACKET 2 TokenNameIntegerLiteral ] TokenNameRBRACKET ) TokenNameRPAREN ; TokenNameSEMICOLON costs TokenNameIdentifier . TokenNameDOT add TokenNameIdentifier ( TokenNameLPAREN forwardId TokenNameIdentifier , TokenNameCOMMA backwardId TokenNameIdentifier , TokenNameCOMMA cost TokenNameIdentifier ) TokenNameRPAREN ; TokenNameSEMICOLON } TokenNameRBRACE return TokenNamereturn costs TokenNameIdentifier ; TokenNameSEMICOLON } TokenNameRBRACE } TokenNameRBRACE
[ "pschulam@gmail.com" ]
pschulam@gmail.com
663eb846cb6ff8c3c16deb76096e00761fdd33b3
63b4643b2bae0fd6e94c6ae61b7cc4615c1fa2e2
/capture-library/src/main/java/com/github/jasonwangdev/capture/VideoCapture.java
8c8633ba77101aba488e06d095ca61722e5f2dfb
[]
no_license
JasonWangDev/capture-android
a7f82e2048d57ac0b81ea549830bd3412f2b7d20
edce75d9a1effbc9e5f921186c4cca344b4edeba
refs/heads/master
2020-12-03T00:20:07.252323
2017-07-02T21:37:39
2017-07-02T21:37:39
96,016,707
0
0
null
null
null
null
UTF-8
Java
false
false
4,679
java
package com.github.jasonwangdev.capture; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.Bitmap; import android.media.ThumbnailUtils; import android.net.Uri; import android.os.Build; import android.os.Environment; import android.provider.MediaStore; import android.support.v4.app.Fragment; import android.support.v4.content.FileProvider; import com.github.jasonwangdev.capture.utils.FileUtils; import com.github.jasonwangdev.capture.utils.HardwareUtils; import com.github.jasonwangdev.capture.utils.PermissionResult; import com.github.jasonwangdev.capture.utils.PermissionUtils; import java.io.File; import java.util.Date; import java.util.List; /** * Created by Jason on 2017/7/2. */ public class VideoCapture { private static final String CAMERA_HARDWARE = PackageManager.FEATURE_CAMERA; private static final String STORAGE_PERMISSIONS = Manifest.permission.WRITE_EXTERNAL_STORAGE; private static final String FOLDER_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES).getPath(); private static final String FILE_NAME_FORMAT = "VIDEO_%tC%<ty%<tm%<td-%<tL.mp4"; private static final int REQUEST_CAMERA = 0x02; private OnCaptureListener listener; private Fragment fragment; private File file; public void capture(Fragment fragment) { this.fragment = fragment; if (!HardwareUtils.checkHardware(fragment, CAMERA_HARDWARE)) { if (null != listener) listener.onCaptureError(Error.CAMERA_NOT_SUPPORT); return; } if (!PermissionUtils.checkPermission(fragment, STORAGE_PERMISSIONS)) PermissionUtils.requestPermission(fragment, STORAGE_PERMISSIONS); else startCapture(); } public Bitmap getThumbnail() { return file.exists() ? ThumbnailUtils.createVideoThumbnail(file.getPath(), MediaStore.Video.Thumbnails.MICRO_KIND) : null; } public void setOnCaptureListener(OnCaptureListener listener) { this.listener = listener; } public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { List<PermissionResult> permissionResults = PermissionUtils.getPermissionResults(fragment, requestCode, permissions, grantResults); for(PermissionResult permissionResult : permissionResults) { if (!permissionResult.isGrant()) { if (STORAGE_PERMISSIONS.equals(permissionResult.getPermission())) { if (null != listener) listener.onCaptureError(permissionResult.isChoseNeverAskAgain() ? Error.STORAGE_PERMISSION_NEVER_DENIED : Error.STORAGE_PERMISSION_DENIED); return; } } } startCapture(); } public void onActivityResult(int requestCode, int resultCode, Intent data) { if (REQUEST_CAMERA == requestCode) { // 部分裝置如三星手機設置 MediaStore.EXTRA_OUTPUT 參數時會有衝突,導致第三方攝影 APP 在 // 錄製完畢後無法正常返回,需要使用者按下 Back 鍵,也因此 resultCode 永遠為 Cancel ,所 // 改採用檔案是否存在來做為判斷基準 if (file.exists()) { if (null != listener) listener.onCaptured(file); } } } private void startCapture() { file = FileUtils.createFile(FOLDER_PATH, String.format(FILE_NAME_FORMAT, new Date().getTime())); if (null == file) { if (null != listener) listener.onCaptureError(Error.FILE_FAILED); } openCamera(); } private void openCamera() { if (null == fragment || null == file) return; Uri uri; try { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) uri = FileProvider.getUriForFile(fragment.getContext(), fragment.getContext().getPackageName() + ".fileProvider", file); else uri = Uri.fromFile(file); } catch (NullPointerException e) { return; } Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); intent.putExtra(MediaStore.EXTRA_OUTPUT, uri); fragment.startActivityForResult(intent, REQUEST_CAMERA); } }
[ "test@gmail.com" ]
test@gmail.com
9ff11453c34dc641857ce242c0d14148cd7c41f3
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/alibaba--druid/b01273ce00b466d8da7c4fb21eff77a2ce3919b8/after/OracleWallPermitTableTest.java
af746864c3a48993a4ada4d20a60de51526b2658
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,255
java
/* * Copyright 1999-2101 Alibaba Group Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.alibaba.druid.bvt.filter.wall.oracle; import junit.framework.TestCase; import org.junit.Assert; import com.alibaba.druid.wall.WallUtils; public class OracleWallPermitTableTest extends TestCase { public void test_permitTable() throws Exception { Assert.assertFalse(WallUtils.isValidateOracle("SELECT * FROM T UNION select * from TAB")); Assert.assertFalse(WallUtils.isValidateOracle("SELECT * FROM T UNION select * from tab")); Assert.assertFalse(WallUtils.isValidateOracle("SELECT * FROM T UNION select * from SYS.TAB")); Assert.assertFalse(WallUtils.isValidateOracle("SELECT * FROM T UNION select * from SYS.\"TAB\"")); Assert.assertFalse(WallUtils.isValidateOracle("SELECT * FROM T UNION select * from all_users")); } public void test_permitTable_subquery() throws Exception { Assert.assertTrue(WallUtils.isValidateOracle("select * from(select * from TAB) a")); Assert.assertTrue(WallUtils.isValidateOracle("select * from(select * from tab) a")); Assert.assertTrue(WallUtils.isValidateOracle("select * from(select * from SYS.TAB) a")); Assert.assertTrue(WallUtils.isValidateOracle("select * from(select * from SYS.\"TAB\") a")); } public void test_permitTable_join() throws Exception { Assert.assertTrue(WallUtils.isValidateOracle("select * from t1, TAB")); Assert.assertTrue(WallUtils.isValidateOracle("select * from t1, tab")); Assert.assertTrue(WallUtils.isValidateOracle("select * from t1, SYS.TAB")); Assert.assertTrue(WallUtils.isValidateOracle("select * from t1, SYS.\"TAB\"")); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
5d6db148bf496a61242bdd55da4e114e7e88a354
c6e62164f340a33226931c1960008a6e63063144
/src/main/java/com/coolplay/user/security/exception/AuthBusinessException.java
cbafb5cd255e8f45c55550814fabafdfc21e72ac
[]
no_license
bjmajiancheng/coolplay-user-service
b6d8b02b76e6cfd8e4932b2bab1300d0d30cbea4
7df9c64e058c44aafe427b18752384e442e115c4
refs/heads/master
2022-12-22T07:42:36.387909
2020-03-26T07:25:50
2020-03-26T07:25:50
215,578,530
0
0
null
2022-12-16T11:36:03
2019-10-16T15:10:58
Java
UTF-8
Java
false
false
493
java
package com.coolplay.user.security.exception; import com.coolplay.user.common.exception.BusinessException; /** * Created by cgj on 2016/4/10. */ public class AuthBusinessException extends BusinessException { @Override protected String getPropertiesPath() { return "/properties/business_code.properties"; } public AuthBusinessException(int errCode) { super(errCode); } public AuthBusinessException(String message) { super(message); } }
[ "majiancheng@davdian.com" ]
majiancheng@davdian.com
b378b621785aa569e40d12979c2797b8cf77f606
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
/external/glide/library/src/main/java/com/bumptech/glide/request/RequestListener.java
e3ceda891ffcaac916b58544bcb4fe8c37487b24
[ "BSD-2-Clause-Views" ]
permissive
mirek190/x86-android-5.0
9d1756fa7ff2f423887aa22694bd737eb634ef23
eb1029956682072bb7404192a80214189f0dc73b
refs/heads/master
2020-05-27T01:09:51.830208
2015-10-07T22:47:36
2015-10-07T22:47:36
41,942,802
15
20
null
2020-03-09T00:21:03
2015-09-05T00:11:19
null
UTF-8
Java
false
false
2,934
java
package com.bumptech.glide.request; import com.bumptech.glide.request.target.Target; /** * A class for monitoring the status of a request while images load. * * @param <T> The type of the model being loaded. * @param <R> The type of resource being loaded. */ public interface RequestListener<T, R> { /** * Called when an exception occurs during a load. Will only be called if we currently want to display an image * for the given model in the given target. It is recommended to create a single instance per activity/fragment * rather than instantiate a new object for each call to {@code Glide.load()} to avoid object churn. * * <p> * It is safe to reload this or a different model or change what is displayed in the target at this point. * For example: * <pre> * <code> * public void onException(Exception e, ModelType model, Target target) { * target.setPlaceholder(R.drawable.a_specific_error_for_my_exception); * Glide.load(model).into(target); * } * </code> * </pre> * </p> * * <p> * Note - if you want to reload this or any other model after an exception, you will need to include all * relevant builder calls (like centerCrop, placeholder etc). * </p> * * @param e The exception, or null * @param model The model we were trying to load when the exception occurred * @param target The {@link Target} we were trying to load the image into * @return True if the listener has handled updating the target for the given exception, false to allow * Glide's request to update the target. */ public abstract boolean onException(Exception e, T model, Target target, boolean isFirstImage); /** * Called when a load completes successfully, immediately after {@link Target#onResourceReady(Object)}. * * @param resource The resource that was loaded for the target. * @param model The specific model that was used to load the image. * @param target The target the model was loaded into. * @param isFromMemoryCache True if the load completed synchronously (useful for determining whether or not to * animate) * @param isFirstResource True if this is the first resource to in this load to be loaded into the target. For * example when loading a thumbnail and a fullsize image, this will be true for the first * image to load and false for the second. * @return True if the listener has handled setting the resource on the target (including any animations), false to * allow Glide's request to update the target (again including animations). */ public abstract boolean onResourceReady(R resource, T model, Target target, boolean isFromMemoryCache, boolean isFirstResource); }
[ "mirek190@gmail.com" ]
mirek190@gmail.com
e25b0c0675a18dcd1520fe74cec57c56007e8aef
cfc60fc1148916c0a1c9b421543e02f8cdf31549
/src/testcases/CWE134_Uncontrolled_Format_String/CWE134_Uncontrolled_Format_String__listen_tcp_printf_31.java
2bfd8f95c9907789e33d145dc49fb065564325bf
[ "LicenseRef-scancode-public-domain" ]
permissive
zhujinhua/GitFun
c77c8c08e89e61006f7bdbc5dd175e5d8bce8bd2
987f72fdccf871ece67f2240eea90e8c1971d183
refs/heads/master
2021-01-18T05:46:03.351267
2012-09-11T16:43:44
2012-09-11T16:43:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,422
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE134_Uncontrolled_Format_String__listen_tcp_printf_31.java Label Definition File: CWE134_Uncontrolled_Format_String.label.xml Template File: sources-sinks-31.tmpl.java */ /* * @description * CWE: 134 Uncontrolled Format String * BadSource: listen_tcp Read data using a listening tcp connection * GoodSource: A hardcoded string * Sinks: printf * GoodSink: dynamic printf format with string defined * BadSink : dynamic printf without validation * Flow Variant: 31 Data flow: make a copy of data within the same method * * */ package testcases.CWE134_Uncontrolled_Format_String; import testcasesupport.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.Socket; import java.net.ServerSocket; import java.util.logging.Logger; public class CWE134_Uncontrolled_Format_String__listen_tcp_printf_31 extends AbstractTestCase { public void bad() throws Throwable { String data_copy; { String data; Logger log_bad = Logger.getLogger("local-logger"); data = ""; /* init data */ /* Read data using a listening tcp connection */ ServerSocket listener = null; Socket sock = null; BufferedReader buffread = null; InputStreamReader instrread = null; try { /* read input from socket */ listener = new ServerSocket(39543); sock = listener.accept(); instrread = new InputStreamReader(sock.getInputStream()); buffread = new BufferedReader(instrread); data = buffread.readLine(); } catch( IOException ioe ) { log_bad.warning("Error with stream reading"); } finally { /* clean up stream reading objects */ try { if( buffread != null ) { buffread.close(); } } catch( IOException ioe ) { log_bad.warning("Error closing buffread"); } finally { try { if( instrread != null ) { instrread.close(); } } catch( IOException ioe ) { log_bad.warning("Error closing instrread"); } } /* clean up socket objects */ try { if( sock != null ) { sock.close(); } } catch( IOException e ) { log_bad.warning("Error closing sock"); } finally { try { if( listener != null ) { listener.close(); } } catch( IOException e ) { log_bad.warning("Error closing listener"); } } } data_copy = data; } { String data = data_copy; /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.printf(data); } } public void good() throws Throwable { goodG2B(); goodB2G(); } /* goodG2B() - use goodsource and badsink */ private void goodG2B() throws Throwable { String data_copy; { String data; java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger"); /* FIX: Use a hardcoded string */ data = "foo"; data_copy = data; } { String data = data_copy; /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.printf(data); } } /* goodB2G() - use badsource and goodsink */ private void goodB2G() throws Throwable { String data_copy; { String data; Logger log_bad = Logger.getLogger("local-logger"); data = ""; /* init data */ /* Read data using a listening tcp connection */ ServerSocket listener = null; Socket sock = null; BufferedReader buffread = null; InputStreamReader instrread = null; try { /* read input from socket */ listener = new ServerSocket(39543); sock = listener.accept(); instrread = new InputStreamReader(sock.getInputStream()); buffread = new BufferedReader(instrread); data = buffread.readLine(); } catch( IOException ioe ) { log_bad.warning("Error with stream reading"); } finally { /* clean up stream reading objects */ try { if( buffread != null ) { buffread.close(); } } catch( IOException ioe ) { log_bad.warning("Error closing buffread"); } finally { try { if( instrread != null ) { instrread.close(); } } catch( IOException ioe ) { log_bad.warning("Error closing instrread"); } } /* clean up socket objects */ try { if( sock != null ) { sock.close(); } } catch( IOException e ) { log_bad.warning("Error closing sock"); } finally { try { if( listener != null ) { listener.close(); } } catch( IOException e ) { log_bad.warning("Error closing listener"); } } } data_copy = data; } { String data = data_copy; /* FIX: explicitly defined string formatting */ System.out.printf("%s\n", data); } } /* Below is the main(). It is only used when building this testcase on its own for testing or for building a binary to use in testing binary analysis tools. It is not used when compiling all the testcases as one application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "amitf@chackmarx.com" ]
amitf@chackmarx.com
7d90134945ea3eaf89a5f6c04adc1a73abe4ec64
caa294ed781762ea51eae4363ef965e5bef9429f
/src/main/java/com/lee/mybatisplus/generator/extension/injector/methods/additional/AlwaysUpdateSomeColumnById.java
6be65c380a5f34566621b9222c8f00430bf356d8
[]
no_license
l848168/mybatis-generator
e854d877b9cb552aff87d6de284af09141954298
fecb19f476685208c0f797fd8a226c739c99c26a
refs/heads/master
2022-12-26T07:05:10.908962
2019-09-10T09:27:10
2019-09-10T09:27:10
207,206,709
0
0
null
2022-12-15T23:49:36
2019-09-09T02:23:20
Java
UTF-8
Java
false
false
3,110
java
/* * Copyright (c) 2011-2020, baomidou (jobob@qq.com). * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * <p> * https://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.lee.mybatisplus.generator.extension.injector.methods.additional; import com.lee.mybatisplus.generator.core.enums.SqlMethod; import com.lee.mybatisplus.generator.core.injector.AbstractMethod; import com.lee.mybatisplus.generator.core.metadata.TableFieldInfo; import com.lee.mybatisplus.generator.core.metadata.TableInfo; import com.lee.mybatisplus.generator.core.toolkit.sql.SqlScriptUtils; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Setter; import lombok.experimental.Accessors; import org.apache.ibatis.mapping.MappedStatement; import org.apache.ibatis.mapping.SqlSource; import java.util.function.Predicate; /** * 根据 ID 更新固定的那几个字段(但是不包含逻辑删除) * * <p> * 自己的通用 mapper 如下使用: * <pre> * int alwaysUpdateSomeColumnById(@Param(Constants.ENTITY) T entity); * </pre> * </p> * * <p> 如何筛选字段参考请 {@link InsertBatchSomeColumn} 里面的注释 </p> * * @author hubin * @since 2019-04-12 */ @NoArgsConstructor @AllArgsConstructor public class AlwaysUpdateSomeColumnById extends AbstractMethod { /** * mapper 对应的方法名 */ private static final String MAPPER_METHOD = "alwaysUpdateSomeColumnById"; /** * 字段筛选条件 */ @Setter @Accessors(chain = true) private Predicate<TableFieldInfo> predicate; @Override public MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) { SqlMethod sqlMethod = SqlMethod.UPDATE_BY_ID; final String additional = optlockVersion() + tableInfo.getLogicDeleteSql(true, false); String sqlSet = this.filterTableFieldInfo(tableInfo.getFieldList(), getPredicate(), i -> i.getSqlSet(true, ENTITY_DOT), NEWLINE); sqlSet = SqlScriptUtils.convertSet(sqlSet); String sql = String.format(sqlMethod.getSql(), tableInfo.getTableName(), sqlSet, tableInfo.getKeyColumn(), ENTITY_DOT + tableInfo.getKeyProperty(), additional); SqlSource sqlSource = languageDriver.createSqlSource(configuration, sql, modelClass); return addUpdateMappedStatement(mapperClass, modelClass, MAPPER_METHOD, sqlSource); } private Predicate<TableFieldInfo> getPredicate() { Predicate<TableFieldInfo> noLogic = t -> !t.isLogicDelete(); if (predicate != null) { return noLogic.and(predicate); } return noLogic; } }
[ "you@example.com" ]
you@example.com
4422c81e8990fdc294921ab63050fa5a35eb954f
632d5a2828145c4a644861e38d2238292c742cd4
/simplebook_cp_mybatis/src/main/java/com/company/book/BookClient.java
4a66f57436ffce480947448a11dbc5fd2f255508
[]
no_license
ejoo1109/springsource
18801995e5a799d93d4aba943e2676cc44446abd
c4e50849b64430927ceb94be6de5cfc3f41ac10c
refs/heads/master
2023-03-02T06:33:28.475931
2021-02-04T03:56:37
2021-02-04T03:56:37
325,456,514
0
0
null
null
null
null
UTF-8
Java
false
false
1,433
java
package com.company.book; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.company.domain.BookVO; import com.company.service.BookService; import lombok.extern.log4j.Log4j2; @Log4j2 public class BookClient { public static void main(String[] args) { log.info("BookClient 실행"); ApplicationContext ctx = new ClassPathXmlApplicationContext("book_config2.xml"); BookService service = (BookService) ctx.getBean("service"); //도서정보입력 BookVO insertVO = new BookVO(1006,"자바스크립트","정인용",28000); if(service.insertBook(insertVO)) { System.out.println("도서 입력 성공"); } //전체 리스트 가져오기 // List<BookVO> list = service.getList(); // for(BookVO vo:list) { // System.out.println(vo); // } // // 수정 // BookVO vo = new BookVO(); // vo.setCode(1007); // vo.setPrice(10000); // // if (service.updateBook(vo)) { // System.out.println("수정 성공"); // } else { // System.out.println("수정 실패"); // } // // // 삭제 // int deleteBook = 1006; // if (service.deleteBook(deleteBook)) { // System.out.println("삭제 성공"); // } else { // System.out.println("삭제 실패"); // } // // // 개별조회 // BookVO selectBook = service.getRow(1004); // System.out.println("개별조회 : " + selectBook.toString()); } }
[ "you@example.com" ]
you@example.com
c423ba50754e6031a81c42016f4fd39780460228
bd877324303e7a3814b047d8673bccba4a437cca
/src/com/kh/mb/member/model/exception/InsertFailException.java
b470ffd9505d882a8b62b46dd06d62f6128d5e79
[]
no_license
JY0819/myBatis
0aef0c7b28d80d759ad41f1f3d527a876eb4c85e
4c4b0014e0f6f8335d0346009689e0648b1b3a22
refs/heads/master
2020-04-17T03:08:18.511092
2019-01-22T01:29:08
2019-01-22T01:29:08
166,168,316
0
0
null
null
null
null
UTF-8
Java
false
false
164
java
package com.kh.mb.member.model.exception; public class InsertFailException extends Exception { public InsertFailException(String msg) { super(msg); } }
[ "user1@KH_C" ]
user1@KH_C
f609b3f9109bfaa2528fc281e65b069523482c5a
a164ade08549ff3dc6fa14901a035c9dd1933a3e
/src/main/java/com/demo/thalisson/service/mapper/ClienteMapper.java
0b28c0e8a34bab94828c5bb8cd3df8ced713a1c8
[]
no_license
salusou/demo-jhipster
4cad7a90bf20e8ff6686765d885fc49d8cf156f1
bbc6f6f8df4771ba2621158f4685409b36fbcf7c
refs/heads/main
2023-06-25T16:31:04.988069
2021-07-28T13:57:42
2021-07-28T13:57:42
390,366,717
0
0
null
2021-07-28T13:57:42
2021-07-28T13:45:44
Java
UTF-8
Java
false
false
487
java
package com.demo.thalisson.service.mapper; import com.demo.thalisson.domain.*; import com.demo.thalisson.service.dto.ClienteDTO; import org.mapstruct.*; /** * Mapper for the entity {@link Cliente} and its DTO {@link ClienteDTO}. */ @Mapper(componentModel = "spring", uses = { CompraMapper.class }) public interface ClienteMapper extends EntityMapper<ClienteDTO, Cliente> { @Mapping(target = "compra", source = "compra", qualifiedByName = "id") ClienteDTO toDto(Cliente s); }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
7b5393cf880976c8b538980f0688da336a4e4dc9
42cad3769d64dd35e497daa71cbab19467728d0d
/src/com/archos/mediacenter/utils/imageview/LoadTaskItem.java
0455d8fe7dc51f7fa13e7a0b741fc175d4270647
[ "Apache-2.0" ]
permissive
nova-video-player/aos-MediaLib
aa351b661a807107fbb6dcce87a34c67f29d9d2f
e21045b8907c232e06da0de52003a9f7f03314c9
refs/heads/v6.1
2023-08-24T16:44:14.324771
2023-08-22T06:19:25
2023-08-22T06:19:25
133,509,757
8
23
Apache-2.0
2023-09-12T16:54:10
2018-05-15T11:59:24
Java
UTF-8
Java
false
false
5,720
java
// Copyright 2017 Archos SA // // 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.archos.mediacenter.utils.imageview; import android.os.Message; import android.util.Log; import android.widget.ImageView; import com.archos.mediascraper.MultiLock; import java.lang.ref.WeakReference; import java.util.Map; /** * Provides context for a task */ public class LoadTaskItem implements Cloneable { // internal stuff passed on but not intended to be used /** internal reference to the target imageview, to get use {@link #getViewIfValid()}, don't modify */ /* default */ WeakReference<ImageView> weakView; /** internal key identifying the image, don't modify */ /* default */ String key; /** internal global map from imageview to key, don't modify */ /* default */ Map<ImageView, String> viewKeyMap; /** internal map used for thread interruption, may be null, don't modify */ /* default */ Map<ImageView, Thread> viewThreadMap; /** internal lock used for thread interruption, may be null, don't modify */ /* default */ MultiLock<ImageView> threadLock; /** internal Message object that gets send back to UI thread handler */ /* default */ Message reply; /** internal cache for images by {@link key}, null if cache disabled */ /* default */ BitmapMemoryCache cache; /** internal, true if debug sleep is configured */ /* default */ boolean sleep; /** internal reference to the processor of the current task */ /* default */ ImageProcessor imageProcessor; // part that is intended to be used by implementations /** object to load, this is of interest for IImageProcessor implementations */ public Object loadObject; /** result of loading objects, set subitems of this in {@link ImageProcessor#loadBitmap(LoadTaskItem)} */ public final LoadResult result = new LoadResult(); /** * @return the ImageView if the task is still valid, null otherwise */ /* default */ ImageView getViewIfValid() { ImageView ret = null; if (weakView != null && key != null) { ImageView view = weakView.get(); if (view != null) { String currentKey = viewKeyMap.get(view); if (key.equals(currentKey)) { ret = view; } } } return ret; } /** * @return true if this task item still needs processing, does not check thread interrupt status */ public boolean taskStillValid() { return getViewIfValid() != null; } /** adds this thread to the thread map & interrupts old thread that was mapped */ /* default */ void putThreadMapping() { if (viewThreadMap != null && weakView != null && key != null) { ImageView view = weakView.get(); if (view != null) { threadLock.lock(view); // only this thread can change viewThreadMap for view now try { String currentKey = viewKeyMap.get(view); if (key.equals(currentKey)) { Thread me = Thread.currentThread(); Thread other = viewThreadMap.put(view, me); // interrupt other thread that was working on this view if (other != null && other != me) { if (ImageViewSetter.DBG) { Log.d(ImageViewSetter.TAG, "LoadTaskItem#putThreadMapping interrupting thread working on " + currentKey); } other.interrupt(); } } } finally { threadLock.unlock(view); } } } } /** removes this thread from thread map */ /* default */ void removeThreadMapping() { if (viewThreadMap != null && weakView != null && key != null) { ImageView view = weakView.get(); if (view != null) { threadLock.lock(view); // only this thread can change viewThreadMap for view now try { String currentKey = viewKeyMap.get(view); if (key.equals(currentKey)) { // this thread is still the correct thread to work on view Thread me = Thread.currentThread(); Thread other = viewThreadMap.remove(view); // me and other should be the same, if not code is broken somewhere if (me != other) { Log.e(ImageViewSetter.TAG, "LoadTaskItem#removeThread() failed!"); } } } finally { threadLock.unlock(view); } } } } /** * @return this.clone() */ /* default */ LoadTaskItem duplicate() { try { return (LoadTaskItem) clone(); } catch (CloneNotSupportedException e) { Log.e(ImageViewSetter.TAG, "LoadTaskItem duplicate()", e); return null; } } }
[ "noury@archos.com" ]
noury@archos.com
dee73da90608f24d84a347f20b4003766ee98cea
f68012957a525271d820cdab67256cf460e31625
/com/drturner/leetcode/problem38/CountSay.java
390b497ec37b937b935d958242a1a833e4494845
[]
no_license
Turnarde/leetcode
d6091322d385dccdf4040a73ac7d8f9175129aa7
23ac7bd25aaf65faa460a66caf6fa2d83733fa0f
refs/heads/master
2021-05-18T07:08:08.484102
2020-07-18T01:24:38
2020-07-18T01:24:38
251,171,988
1
0
null
2020-07-18T01:24:39
2020-03-30T01:29:40
Java
UTF-8
Java
false
false
1,467
java
package com.drturner.leetcode.problem38; import java.util.HashMap; import java.util.LinkedList; import java.util.Queue; /** * ClassName: CountSay * Description: TO DO * Author: Drturner * Date: 2020/4/29 * Version: 1.0 */ public class CountSay { class Result{ private Character c; private Integer freq; public Result(Character c, Integer freq) { this.c = c; this.freq = freq; } } public String countAndSay(int n) { if (n==1) return "1"; String s=countAndSay(n-1); StringBuilder res=new StringBuilder(); Queue<Result> queue=new LinkedList<>(); int count=1; for (int i=0;i<s.length();i++){ if (i==s.length()-1){ Result map=new Result(s.charAt(i),count); queue.offer(map); break; } if (s.charAt(i)==s.charAt(i+1)){ count++; } else{ Result map=new Result(s.charAt(i),count); queue.offer(map); count=1; } } while (!queue.isEmpty()){ Result poll = queue.poll(); res.append(poll.freq).append(poll.c); } return res.toString(); } public static void main(String[] args) { CountSay countSay = new CountSay(); String s1 = countSay.countAndSay(5); System.out.println(s1); } }
[ "you@example.comliu" ]
you@example.comliu
ee89b36a120478b232909b7419937d90ecd78d58
83d56024094d15f64e07650dd2b606a38d7ec5f1
/Construccion/PROYECTO.SICC/MSG/ENTIDADES/src/es/indra/sicc/dtos/msg/DTODestinatarioMensaje.java
b185ac8207a84468a5a9057e452c1936c8592a6b
[]
no_license
cdiglesias/SICC
bdeba6af8f49e8d038ef30b61fcc6371c1083840
72fedb14a03cb4a77f62885bec3226dbbed6a5bb
refs/heads/master
2021-01-19T19:45:14.788800
2016-04-07T16:20:51
2016-04-07T16:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package es.indra.sicc.dtos.msg; import es.indra.sicc.cmn.negocio.auditoria.DTOAuditableSICC; public class DTODestinatarioMensaje extends DTOAuditableSICC { private Long oidTipoDestinatario; private Long oidMensaje; public DTODestinatarioMensaje() { } public void setOidTipoDestinatario(Long newOidTipoDestinatario) { oidTipoDestinatario = newOidTipoDestinatario; } public Long getOidTipoDestinatario() { return oidTipoDestinatario; } public Long getOidMensaje() { return oidMensaje; } public void setOidMensaje(Long oidMensaje) { this.oidMensaje = oidMensaje; } }
[ "hp.vega@hotmail.com" ]
hp.vega@hotmail.com
ed1ebc628ddc0504b72c5c5036278b180b888214
8700fa500c760a8049c65df590632783cd64940a
/testjava/TIJ4-code/strings/ReFlags.java
07c276d9484d60c392597d41cc14c221d2d5d44e
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
SrikanthParsha14/test
8ebac746f31d450b39eca1001525961497d962ba
8cee69e09c8557d53d8d30382cec8ea5c1f82f6e
refs/heads/master
2020-06-05T06:54:36.274446
2017-08-03T08:39:43
2017-08-03T08:39:43
192,351,172
1
0
MIT
2019-06-17T13:20:39
2019-06-17T13:20:38
null
UTF-8
Java
false
false
536
java
//: strings/ReFlags.java package strings; /* Added by Eclipse.py */ import java.util.regex.*; public class ReFlags { public static void main(String[] args) { Pattern p = Pattern.compile("^java", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE); Matcher m = p.matcher( "java has regex\nJava has regex\n" + "JAVA has pretty good regular expressions\n" + "Regular expressions are in Java"); while(m.find()) System.out.println(m.group()); } } /* Output: java Java JAVA *///:~
[ "quchunguang@gmail.com" ]
quchunguang@gmail.com
67360977c0d9d06cfe219964ab3352bb8d2f7521
df0d105e3bc11190c9f75b68014356d631094710
/src/main/java/com/zj/study/designpattern/pattern/behavioral/chainofresponsibility/ArticleApprover.java
4c5cbf1bc18f5a34ead385c4b36e139ab5419344
[]
no_license
zhaojian770627/javastudy
411109670f099be23142748e97346ccd62057c41
ca2613fbfc24bfc68254f3733b0d1409aecf3c94
refs/heads/master
2023-01-11T10:36:25.977810
2022-01-09T14:06:01
2022-01-09T14:06:01
162,666,475
0
0
null
2022-12-27T14:50:49
2018-12-21T04:40:01
Java
UTF-8
Java
false
false
507
java
package com.zj.study.designpattern.pattern.behavioral.chainofresponsibility; import org.apache.commons.lang3.StringUtils; public class ArticleApprover extends Approver { @Override public void deploy(Course course) { if (StringUtils.isNotEmpty(course.getArticle())) { System.out.println(course.getName() + "含有手记,批准"); if (approver != null) approver.deploy(course); } else { System.out.println(course.getName() + "不含有手记,不批准"); } } }
[ "zhaojian770627@163.com" ]
zhaojian770627@163.com
2f2b7c19d9a977bae89a021783eef4bd17cfdf0f
3fe8e5db53dc425afdb24303f2f6926cade14f04
/user/ezt_hall/src/main/java/com/eztcn/user/hall/fragment/dragonCard/MyPrivilegeGuideNumFragment.java
45a1e6b54ab37fc7dee763832e353e7335db0f89
[]
no_license
llorch19/ezt_user_code
087a9474a301d8d8fef7bd1172d6c836373c2faf
ee82f4bfbbd14c81976be1275dcd4fc49f6b1753
refs/heads/master
2021-06-01T09:40:19.437831
2016-08-10T02:33:35
2016-08-10T02:33:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,279
java
package com.eztcn.user.hall.fragment.dragonCard; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.eztcn.user.R; import com.eztcn.user.hall.activity.SelectAppointmentTimeActivity; import com.eztcn.user.hall.adapter.BaseRvAdapter; import com.eztcn.user.hall.fragment.BaseFragment; import com.eztcn.user.hall.utils.ToastUtils; import com.eztcn.user.hall.views.RecycleViewDivider; import java.util.ArrayList; import java.util.List; /** * @Author: lizhipeng * @Data: 16/6/7 上午10:16 * @Description: 指导挂号 */ public class MyPrivilegeGuideNumFragment extends BaseFragment { private RecyclerView mRecyclerView; private BaseRvAdapter mAdapter; private List<String> mDatas; public static MyPrivilegeGuideNumFragment newInstance() { MyPrivilegeGuideNumFragment fragment = new MyPrivilegeGuideNumFragment(); return fragment; } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.new_fragment_my_privilege, container, false); mRecyclerView = (RecyclerView) view.findViewById(R.id.new_my_privilege_fragment_list_view); mAdapter = new BaseRvAdapter(mRecyclerView.getContext(),R.layout.new_item_privilege_guide_num_rv, mDatas); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mRecyclerView.getContext()); linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL); mRecyclerView.setLayoutManager(linearLayoutManager); mRecyclerView.addItemDecoration(new RecycleViewDivider(getContext(), LinearLayoutManager.VERTICAL, 20)); mRecyclerView.setAdapter(mAdapter); //禁用上层ScrollView的滑动事件,解决嵌套冲突 mRecyclerView.setNestedScrollingEnabled(false); mInitOver = true; return view; } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); } @Override protected void onFragmentFirstResume() { showProgressDialog(""); new Handler().postDelayed(new Runnable() { public void run() { if (mInitOver) { mDatas = new ArrayList<>(); for (int i = 0; i < 100; i++) { mDatas.add("这是第====" + i + "====条"); } mAdapter.notifyDataSetChanged(mDatas); dismissProgressDialog(); //item 点击监听 mAdapter.setOnItemClickLitener(new BaseRvAdapter.OnItemClickLitener() { @Override public void onItemClick(View view, int position) { ToastUtils.shortToast(mContext,"咨询详情页面没写"); } }); } } }, 1000); //延迟1秒 } @Override public void onResume() { super.onResume(); } }
[ "liangxing@eztcn.com" ]
liangxing@eztcn.com
c21467b7ce5cd66b1aa71a28ec6e2bf094cd36af
59b62899bacc0aed8ffd7c74160f091d795a1760
/CT25-GameServer/java/ct25/xtreme/gameserver/model/quest/Event.java
eb96cf95979f11a940bc35a8afd6f54fba8bca73
[]
no_license
l2jmaximun/RenerFreya
2f8d303942a80cb3d9c7381e54af049a0792061b
c0c13f48003b96b38012d20539b35aba09e25ac7
refs/heads/master
2021-08-31T19:39:30.116727
2017-12-22T15:20:03
2017-12-22T15:20:03
114,801,613
0
0
null
null
null
null
UTF-8
Java
false
false
1,190
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package ct25.xtreme.gameserver.model.quest; import ct25.xtreme.gameserver.model.actor.instance.L2PcInstance; /** ** @author JIV ** */ public abstract class Event extends Quest { /** * @param questId * @param name * @param descr */ public Event(int questId, String name, String descr) { super(questId, name, descr); } public abstract boolean eventStart(); public abstract boolean eventStop(); public abstract boolean eventBypass(L2PcInstance activeChar, String bypass); }
[ "Rener@Rener-PC" ]
Rener@Rener-PC
c9a5d90d3b1f326219cfe8922184cd751302aa3c
5636e23ca013f1c6d1b88e1715ec038035013f12
/org.osgi.test.cases.component/src/org/osgi/test/cases/component/tb32/ConditionReferenceImpl.java
7efe448573ad6b8982108e10b5233d1222e4fe1f
[ "EPL-1.0", "Apache-2.0", "EPL-2.0", "CPL-1.0" ]
permissive
osgi/osgi
b897163557738fb40d03c368a3259b5e670a7d5a
0ec08abcda0a75a8efc99b5f4a178497f73f143c
refs/heads/main
2023-08-31T11:29:00.133907
2023-08-02T15:55:38
2023-08-02T15:55:38
255,701,604
76
36
Apache-2.0
2023-09-06T23:45:13
2020-04-14T19:09:53
Java
UTF-8
Java
false
false
2,049
java
/******************************************************************************* * Copyright (c) Contributors to the Eclipse Foundation * * 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. * * SPDX-License-Identifier: Apache-2.0 *******************************************************************************/ package org.osgi.test.cases.component.tb32; import java.util.Dictionary; import java.util.Hashtable; import java.util.Optional; import org.osgi.service.component.ComponentContext; import org.osgi.service.condition.Condition; import org.osgi.test.cases.component.service.BaseService; public class ConditionReferenceImpl implements BaseService { private final Condition serviceParam; private volatile Condition serviceField; private volatile Condition serviceComponent; public ConditionReferenceImpl() { this(null); } public ConditionReferenceImpl(Condition serviceParam) { this.serviceParam = serviceParam; } @SuppressWarnings("unused") private void activate(ComponentContext context) { this.serviceComponent = context .locateService("osgi.ds.satisfying.condition"); } public Dictionary<String,Object> getProperties() { final Dictionary<String,Object> props = new Hashtable<>(); Optional.ofNullable(serviceParam) .ifPresent(local -> props.put("serviceParam", local)); Optional.ofNullable(serviceField) .ifPresent(local -> props.put("serviceField", local)); Optional.ofNullable(serviceComponent) .ifPresent(local -> props.put("serviceComponent", local)); return props; } }
[ "hargrave@us.ibm.com" ]
hargrave@us.ibm.com
713c73b3e645b50a61795c42f4c21b2412805093
20eb62855cb3962c2d36fda4377dfd47d82eb777
/newEvaluatedBugs/Mockito_30_buggy/mutated/106/StackTraceFilter.java
0b388b7f1d1de7e4223e74387bb37805b4a01785
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,174
java
/* * Copyright (c) 2007 Mockito contributors * This program is made available under the terms of the MIT License. */ package org.mockito.internal.exceptions.base; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; public class StackTraceFilter implements Serializable { static final long serialVersionUID = -5499819791513105700L; public boolean isBad(StackTraceElement e) { boolean fromMockObject = e.getClassName().contains("$$EnhancerByMockitoWithCGLIB$$"); boolean fromOrgMockito = e.getClassName().startsWith("org.mockito."); boolean isRunner = e.getClassName().startsWith("org.mockito.runners."); boolean isInternalRunner = e.getClassName().startsWith("org.mockito.internal.runners."); return !isInternalRunner; } /** * Example how the filter works (+/- means good/bad): * [a+, b+, c-, d+, e+, f-, g+] -> [a+, b+, g+] * Basically removes all bad from the middle. If any good are in the middle of bad those are also removed. */ public StackTraceElement[] filter(StackTraceElement[] target, boolean keepTop) { //TODO: after 1.8 profile List<StackTraceElement> unfilteredStackTrace = Arrays.asList(target); int lastBad = -1; int firstBad = -1; for (int i = 0; i < unfilteredStackTrace.size(); i++) { if (!this.isBad(unfilteredStackTrace.get(i))) { continue; } lastBad = i; if (firstBad == -1) { firstBad = i; } } List<StackTraceElement> top; if (keepTop && firstBad != -1) { top = unfilteredStackTrace.subList(0, firstBad); } else { top = new LinkedList<StackTraceElement>(); } List<StackTraceElement> bottom = unfilteredStackTrace.subList(lastBad + 1, unfilteredStackTrace.size()); List<StackTraceElement> filtered = new ArrayList<StackTraceElement>(top); filtered.addAll(bottom); return filtered.toArray(new StackTraceElement[]{}); } }
[ "justinwm@163.com" ]
justinwm@163.com
9cc00ebe1615af735d59503c0eba1cc26fc71d24
41fab79642bf3a1600d72a98864719eca8f16748
/web-trade-admin/src/main/java/com/seamwhole/webtradeadmin/info/GoodsSpecification.java
20f371f7e1002c5a5623e2691a53443bb72bc3e7
[]
no_license
HuangRicher/ieshop
ad1a3f9bb0d9797b871efbbf2009dc7f53f71eb0
b2fa4887a235a63f9368421ec70a1c59cdc47d7b
refs/heads/master
2020-04-30T15:59:38.229048
2019-05-18T10:02:45
2019-05-18T10:02:45
176,936,000
1
1
null
null
null
null
UTF-8
Java
false
false
1,032
java
package com.seamwhole.webtradeadmin.info; public class GoodsSpecification { private Integer id; private Integer goodsId; private Integer specificationId; private String value; private String picUrl; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getGoodsId() { return goodsId; } public void setGoodsId(Integer goodsId) { this.goodsId = goodsId; } public Integer getSpecificationId() { return specificationId; } public void setSpecificationId(Integer specificationId) { this.specificationId = specificationId; } public String getValue() { return value; } public void setValue(String value) { this.value = value == null ? null : value.trim(); } public String getPicUrl() { return picUrl; } public void setPicUrl(String picUrl) { this.picUrl = picUrl == null ? null : picUrl.trim(); } }
[ "huangweibiao@instoms.cn" ]
huangweibiao@instoms.cn
8a11c289c3ced48c0cd5596bd46365f82f096d86
4627d514d6664526f58fbe3cac830a54679749cd
/results/evosuite5/time-org.joda.time.chrono.IslamicChronology-9/org/joda/time/chrono/IslamicChronology_ESTest.java
62cf3b8d9ffab6c26092bdcbb6621ee6363e4bd6
[]
no_license
STAMP-project/Cling-application
c624175a4aa24bb9b29b53f9b84c42a0f18631bd
0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5
refs/heads/master
2022-07-27T09:30:16.423362
2022-07-19T12:01:46
2022-07-19T12:01:46
254,310,667
2
2
null
2021-07-12T12:29:50
2020-04-09T08:11:35
null
UTF-8
Java
false
false
661
java
/* * This file was automatically generated by EvoSuite * Wed Jul 24 00:37:53 GMT 2019 */ package org.joda.time.chrono; 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 = false, useJEE = true) public class IslamicChronology_ESTest extends IslamicChronology_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2538d10eb6c0d2a9a329a54d13c8878df5dd7101
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_57c5050322afacad71c8155df974582190543022/package-info/4_57c5050322afacad71c8155df974582190543022_package-info_t.java
106f1816e73e4812f45f5a0f031c3591e13286da
[]
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
302
java
/* * Generated by src/saveVersion.sh */ @HadoopVersionAnnotation(version="1.2.2-SNAPSHOT", revision="", user="johnugeorge", date="Thu Jan 9 19:51:22 CST 2014", url="", srcChecksum="d8ebe93cabd61ff9c827aa9e9fba3e6c") package org.apache.hadoop;
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8f745544f506e443d871e25c87b80e6eaf14fba6
50c937c8a203a5ca3a26f70980173a5a898da9e3
/l2gw-core/highfive/gameserver/java/ru/l2gw/gameserver/model/ClanWarehouse.java
0eb6ae75e189da83e5d9ad8b14baa729dc963cb7
[]
no_license
gokusgit/hi5
b336cc8bf96b74cbd9419253444cf0a7df71a2fb
0345266a3cb3059b3e4e5ec31b59690af36e07fd
refs/heads/master
2020-07-10T23:33:14.500298
2019-08-26T07:41:18
2019-08-26T07:41:18
204,398,114
0
1
null
null
null
null
UTF-8
Java
false
false
1,016
java
package ru.l2gw.gameserver.model; import ru.l2gw.gameserver.model.instances.L2ItemInstance.ItemLocation; public final class ClanWarehouse extends Warehouse { private L2Clan _clan; public ClanWarehouse(L2Clan clan) { _clan = clan; } @Override public int getOwnerId() { return _clan.getClanId(); } @Override public L2Character getOwner() { return _clan.getLeader().getPlayer(); } @Override public ItemLocation getLocationType() { return ItemLocation.CLANWH; } @Override protected ItemLocation getBaseLocation() { return ItemLocation.CLANWH; } @Override protected ItemLocation getEquipLocation() { return ItemLocation.CLANWH; } @Override public String getLocationId() { return "0"; } @Override public byte getLocationId(@SuppressWarnings("unused") boolean dummy) { return 0; } @Override public void setLocationId(@SuppressWarnings("unused") L2Player dummy) {} @Override public final WarehouseType getWarehouseType() { return WarehouseType.CLAN; } }
[ "46629361+gokusgit@users.noreply.github.com" ]
46629361+gokusgit@users.noreply.github.com
cbb76456205832e77b31c1cd0ff0bb0d3948e95a
0b0cc171457f32b5259ac2e0891d617abdfc0e47
/src/org/apache/commons/io/FileCleaningTracker.java
966493d83694b162f318fd18838d18b4032500b0
[]
no_license
bobolicener/star-rod
24b403447b4bd82af1bca734c63ac38785748824
59235901ab024c5af267daebf92344b20538251a
refs/heads/master
2020-07-01T20:12:10.960817
2019-08-08T14:54:46
2019-08-08T14:54:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,468
java
package org.apache.commons.io; import java.io.File; import java.lang.ref.PhantomReference; import java.lang.ref.ReferenceQueue; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; public class FileCleaningTracker { ReferenceQueue<Object> q; final Collection<Tracker> trackers; final List<String> deleteFailures; volatile boolean exitWhenFinished; Thread reaper; public FileCleaningTracker() { q = new ReferenceQueue(); trackers = Collections.synchronizedSet(new HashSet()); deleteFailures = Collections.synchronizedList(new ArrayList()); exitWhenFinished = false; } public void track(File file, Object marker) { track(file, marker, (FileDeleteStrategy)null); } public void track(File file, Object marker, FileDeleteStrategy deleteStrategy) { if (file == null) { throw new NullPointerException("The file must not be null"); } addTracker(file.getPath(), marker, deleteStrategy); } public void track(String path, Object marker) { track(path, marker, (FileDeleteStrategy)null); } public void track(String path, Object marker, FileDeleteStrategy deleteStrategy) { if (path == null) { throw new NullPointerException("The path must not be null"); } addTracker(path, marker, deleteStrategy); } private synchronized void addTracker(String path, Object marker, FileDeleteStrategy deleteStrategy) { if (exitWhenFinished) { throw new IllegalStateException("No new trackers can be added once exitWhenFinished() is called"); } if (reaper == null) { reaper = new Reaper(); reaper.start(); } trackers.add(new Tracker(path, deleteStrategy, marker, q)); } public int getTrackCount() { return trackers.size(); } public List<String> getDeleteFailures() { return deleteFailures; } public synchronized void exitWhenFinished() { exitWhenFinished = true; if (reaper != null) { synchronized (reaper) { reaper.interrupt(); } } } private final class Reaper extends Thread { Reaper() { super(); setPriority(10); setDaemon(true); } public void run() { while ((!exitWhenFinished) || (trackers.size() > 0)) { try { FileCleaningTracker.Tracker tracker = (FileCleaningTracker.Tracker)q.remove(); trackers.remove(tracker); if (!tracker.delete()) { deleteFailures.add(tracker.getPath()); } tracker.clear(); } catch (InterruptedException e) {} } } } private static final class Tracker extends PhantomReference<Object> { private final String path; private final FileDeleteStrategy deleteStrategy; Tracker(String path, FileDeleteStrategy deleteStrategy, Object marker, ReferenceQueue<? super Object> queue) { super(queue); this.path = path; this.deleteStrategy = (deleteStrategy == null ? FileDeleteStrategy.NORMAL : deleteStrategy); } public String getPath() { return path; } public boolean delete() { return deleteStrategy.deleteQuietly(new File(path)); } } }
[ "gregory.degruy@gmail.com" ]
gregory.degruy@gmail.com
f1854846966e50cf6d6b1018987e58d7c1296616
a7cd09d987b24986e11c6332e6aa26e224379ed2
/qpid-jms-client/src/test/java/org/apache/qpid/jms/provider/failover/FailoverProviderClosedTest.java
d77b5d40ce0c756474f4ff9b11a8d05dfe0c22c9
[ "Apache-2.0" ]
permissive
zjpjohn/qpid-jms
a8009da9e7e9501dd4afd75cc41f3946aec60666
823dcdcde87147c872da99b7318cdb0daaea2a87
refs/heads/master
2021-01-15T13:33:17.827224
2016-08-11T17:07:16
2016-08-11T17:07:16
65,984,197
1
0
null
2016-08-18T09:27:55
2016-08-18T09:27:54
null
UTF-8
Java
false
false
5,514
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.qpid.jms.provider.failover; import java.io.IOException; import java.net.URI; import org.apache.qpid.jms.message.JmsInboundMessageDispatch; import org.apache.qpid.jms.message.JmsOutboundMessageDispatch; import org.apache.qpid.jms.meta.JmsConnectionInfo; import org.apache.qpid.jms.meta.JmsConsumerInfo; import org.apache.qpid.jms.meta.JmsSessionInfo; import org.apache.qpid.jms.meta.JmsTransactionId; import org.apache.qpid.jms.meta.JmsTransactionInfo; import org.apache.qpid.jms.provider.ProviderConstants.ACK_TYPE; import org.apache.qpid.jms.provider.ProviderFuture; import org.junit.Before; import org.junit.Test; /** * Test that methods of FailoverProvider all fail immediately when it is closed. */ public class FailoverProviderClosedTest extends FailoverProviderTestSupport { private FailoverProvider provider; private JmsConnectionInfo connection; private JmsSessionInfo session; private JmsConsumerInfo consumer; @Override @Before public void setUp() throws Exception { super.setUp(); provider = (FailoverProvider) FailoverProviderFactory.create(new URI("failover:(mock://localhost)")); provider.close(); connection = createConnectionInfo(); session = createSessionInfo(connection); consumer = createConsumerInfo(session); } @Test(timeout=30000) public void testMultipleCloseCalls() { provider.close(); } @Test(timeout=30000, expected=IOException.class) public void testConnect() throws Exception { provider.connect(); } @Test(timeout=30000, expected=IOException.class) public void testStart() throws Exception { provider.start(); } @Test(timeout=30000, expected=IOException.class) public void testCreateResource() throws Exception { ProviderFuture request = new ProviderFuture(); provider.create(connection, request); } @Test(timeout=30000, expected=IOException.class) public void testStartResource() throws Exception { ProviderFuture request = new ProviderFuture(); provider.start(session, request); } @Test(timeout=30000, expected=IOException.class) public void testStopResource() throws Exception { ProviderFuture request = new ProviderFuture(); provider.stop(session, request); } @Test(timeout=30000, expected=IOException.class) public void testDestroyResource() throws Exception { ProviderFuture request = new ProviderFuture(); provider.destroy(session, request); } @Test(timeout=30000, expected=IOException.class) public void testSend() throws Exception { ProviderFuture request = new ProviderFuture(); provider.send(new JmsOutboundMessageDispatch(), request); } @Test(timeout=30000, expected=IOException.class) public void testSessionAcknowledge() throws Exception { ProviderFuture request = new ProviderFuture(); provider.acknowledge(session.getId(), ACK_TYPE.ACCEPTED, request); } @Test(timeout=30000, expected=IOException.class) public void testAcknowledgeMessage() throws Exception { ProviderFuture request = new ProviderFuture(); provider.acknowledge(new JmsInboundMessageDispatch(1), ACK_TYPE.ACCEPTED, request); } @Test(timeout=30000, expected=IOException.class) public void testCommit() throws Exception { ProviderFuture request = new ProviderFuture(); JmsTransactionId txId = new JmsTransactionId(connection.getId(), 1); JmsTransactionInfo txInfo = new JmsTransactionInfo(session.getId(), txId); provider.commit(txInfo, request); } @Test(timeout=30000, expected=IOException.class) public void testRollback() throws Exception { ProviderFuture request = new ProviderFuture(); JmsTransactionId txId = new JmsTransactionId(connection.getId(), 1); JmsTransactionInfo txInfo = new JmsTransactionInfo(session.getId(), txId); provider.rollback(txInfo, request); } @Test(timeout=30000, expected=IOException.class) public void testRecover() throws Exception { ProviderFuture request = new ProviderFuture(); provider.recover(session.getId(), request); } @Test(timeout=30000, expected=IOException.class) public void testUnsubscribe() throws Exception { ProviderFuture request = new ProviderFuture(); provider.unsubscribe("subscription-name", request); } @Test(timeout=30000, expected=IOException.class) public void testMessagePull() throws Exception { ProviderFuture request = new ProviderFuture(); provider.pull(consumer.getId(), 1, request); } }
[ "tabish121@gmail.com" ]
tabish121@gmail.com
21d83e91377342050ab0766b4ed874e104f13d0d
1334b5e20fc50937144d65067f7a178785ed891d
/plugin_common/src/main/java/com/fengxing/mobile/plugin/common/utils/ColorTools.java
41ea376b45b4ae13bbca8f6507676cc6e034b774
[]
no_license
lovzc/CommonUtils
60e90361b85ae01dadb054d887ddfa66f6aa2d98
89266a87736cc8c744bd6680bb23904ce1de2e47
refs/heads/master
2021-03-29T10:09:16.190455
2019-03-14T05:21:16
2019-03-14T05:21:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
949
java
package com.fengxing.mobile.plugin.common.utils; import android.graphics.Color; import android.support.annotation.ColorInt; import android.support.v4.graphics.ColorUtils; public class ColorTools { /** * 判断颜色是否是亮色 * https://stackoverflow.com/questions/24260853/check-if-color-is-dark-or-light-in-android * 判断颜色的亮暗 * * @param color * @return */ public static boolean isColorDark(int color) { double darkness = 1 - (0.299 * Color.red(color) + 0.587 * Color.green(color) + 0.114 * Color.blue(color)) / 255; if (darkness < 0.5) { return false; // It's a light color } else { return true; // It's a dark color } } /** * 同上 * * @param color * @return */ public static boolean isLightColor(@ColorInt int color) { return ColorUtils.calculateLuminance(color) >= 0.5; } }
[ "f296016140@gmail.com" ]
f296016140@gmail.com
fbcd00aa6eb6eb5f3317f7b812030f64cc5bd17b
2bc2eadc9b0f70d6d1286ef474902466988a880f
/tags/mule-2.0.0-M2/transports/jms/src/test/java/org/mule/providers/jms/JmsConnectorTestCase.java
55c6df48bbf2c845ea607c9819c1810fa16db0d5
[]
no_license
OrgSmells/codehaus-mule-git
085434a4b7781a5def2b9b4e37396081eaeba394
f8584627c7acb13efdf3276396015439ea6a0721
refs/heads/master
2022-12-24T07:33:30.190368
2020-02-27T19:10:29
2020-02-27T19:10:29
243,593,543
0
0
null
2022-12-15T23:30:00
2020-02-27T18:56:48
null
UTF-8
Java
false
false
3,160
java
/* * $Id$ * -------------------------------------------------------------------------------------- * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package org.mule.providers.jms; import org.mule.tck.providers.AbstractConnectorTestCase; import org.mule.umo.provider.UMOConnector; import org.mule.util.object.SingletonObjectFactory; import com.mockobjects.dynamic.C; import com.mockobjects.dynamic.Mock; import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.ExceptionListener; import javax.jms.TextMessage; import org.apache.commons.collections.IteratorUtils; public class JmsConnectorTestCase extends AbstractConnectorTestCase { /* * (non-Javadoc) * * @see org.mule.tck.providers.AbstractConnectorTestCase#getConnectorName() */ // @Override public UMOConnector createConnector() throws Exception { JmsConnector newConnector = new JmsConnector(); newConnector.setName("TestConnector"); newConnector.setSpecification(JmsConstants.JMS_SPECIFICATION_11); Mock connectionFactory = new Mock(ConnectionFactory.class); Mock connection = new Mock(Connection.class); connectionFactory.expectAndReturn("createConnection", connection.proxy()); connection.expect("setExceptionListener", C.isA(ExceptionListener.class)); connection.expect("close"); connection.expect("start"); connection.expect("stop"); connection.expect("stop"); connection.expect("setClientID", "mule.TestConnector"); newConnector.setConnectionFactory(new SingletonObjectFactory(connectionFactory.proxy())); return newConnector; } public String getTestEndpointURI() { return "jms://test.queue"; } public Object getValidMessage() throws Exception { return getMessage(); } public static Object getMessage() throws Exception { Mock message = new Mock(TextMessage.class); message.expectAndReturn("getText", "Test JMS Message"); message.expectAndReturn("getText", "Test JMS Message"); message.expectAndReturn("getJMSCorrelationID", null); message.expectAndReturn("getJMSMessageID", "1234567890"); message.expectAndReturn("getJMSDeliveryMode", new Integer(1)); message.expectAndReturn("getJMSDestination", null); message.expectAndReturn("getJMSPriority", new Integer(4)); message.expectAndReturn("getJMSRedelivered", Boolean.FALSE); message.expectAndReturn("getJMSReplyTo", null); message.expectAndReturn("getJMSExpiration", new Long(0)); message.expectAndReturn("getJMSTimestamp", new Long(0)); message.expectAndReturn("getJMSType", null); message.expect("toString"); message.expectAndReturn("getPropertyNames", IteratorUtils.asEnumeration(IteratorUtils.emptyIterator())); return message.proxy(); } }
[ "tcarlson@bf997673-6b11-0410-b953-e057580c5b09" ]
tcarlson@bf997673-6b11-0410-b953-e057580c5b09
57d585f96e4768c117c72cd28120da2393c44084
79dbcbe32ea0839c5ba95b06dfc70b60f36b46db
/src/main/java/org/apache/ibatis/annotations/Results.java
53166f0b084c97e4b1032b1eb7f523d8f5f9965a
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
Yhongwu/mybatis-3.4-src
4df26684c056eb1bb9f5f192425888feaef8d5e7
18150d1538f420614953e11527e95830c5e93bab
refs/heads/master
2022-06-30T13:06:56.394448
2019-10-28T08:57:33
2019-10-28T08:57:33
213,336,726
0
0
Apache-2.0
2022-06-29T19:33:11
2019-10-07T08:54:52
Java
UTF-8
Java
false
false
1,143
java
/** * Copyright ${license.git.copyrightYears} the original author or authors. * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.ibatis.annotations; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * @author Clinton Begin */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface Results { /** * The name of the result map. */ String id() default ""; Result[] value() default {}; }
[ "hongwu39028@163.com" ]
hongwu39028@163.com
2ad363c46e5d777517ebdb6b5f7d415808554268
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_691da3c0e2153a9a1ffa4c8c390f94062ea594cb/AbstractCloudifyWidgetTest/14_691da3c0e2153a9a1ffa4c8c390f94062ea594cb_AbstractCloudifyWidgetTest_t.java
e1982ea1700baf90cad8eef724d13fc59ce6a9cc
[]
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
7,714
java
package org.cloudifysource.widget.test; import com.google.common.base.Predicate; import org.cloudifysource.widget.beans.JCloudsContext; import org.cloudifysource.widget.beans.TestContext; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Before; import org.junit.BeforeClass; import org.openqa.selenium.*; import org.openqa.selenium.support.ui.FluentWait; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; /** * User: sagib * Date: 06/01/13 * Time: 16:33 */ public class AbstractCloudifyWidgetTest { public static final int NUM_OF_SUITES = 2; protected static WebDriver webDriver; public static final String HOST = context().getTestConf().getHost(); private static AtomicInteger counter = new AtomicInteger(0); private static final int random = (int)(Math.random() * 1000); protected static String PASSWORD = "testTest1" + random + counter.get(); protected static String EMAIL = "test@test" + random + counter.get() + ".com"; protected static String NAME = "test" + random + counter.get(); private static Logger logger = LoggerFactory.getLogger(AbstractCloudifyWidgetTest.class); @BeforeClass public static void before(){ int i = counter.incrementAndGet(); logger.info("before class - starting webDriver counter is at: " + i); webDriver = context().getWebDriver(); webDriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); webDriver.get(HOST); dropSession(); if(i == 1) subscribe(EMAIL, PASSWORD, NAME); } @Before public void beforeMethod(){ logger.info("before method - log in if not logged in"); if(!isLoggedIn(EMAIL)){ String signinUrl = HOST + "/admin/signin"; if(!signinUrl.equals(webDriver.getCurrentUrl())) { webDriver.get(signinUrl); } logger.info("driver at " + webDriver.getCurrentUrl() + "trying to sign in"); login(EMAIL, PASSWORD); } } @AfterClass public static void after(){ logger.info("after class - counter at: " + counter.get()); if(counter.get() >= NUM_OF_SUITES) { logger.info("after class - closing webDriver"); webDriver.close(); } } protected void waitForElement(final By by) { logger.info("driver at " + webDriver.getCurrentUrl() + " waiting for " + by); FluentWait<By> fw = new FluentWait<By>(by); fw.withTimeout(30, TimeUnit.SECONDS); try{ fw.until(new Predicate<By>(){ @Override public boolean apply(By input) { try{ return webDriver.findElement(by).isDisplayed(); }catch(NoSuchElementException e){ return false; } } }); }catch (TimeoutException e){ logger.error("couldn't find " + by + " at " + webDriver.getCurrentUrl(), e); throw e; } } public static TestContext context(){ return TestContext.get(); } protected void login(String username, String password) { logger.info("driver at " + webDriver.getCurrentUrl() + " trying to login with " + username + ":" + password); dropSession(); By email = By.name("email"); By passwordElem = By.name("password"); By button = By.className("btn-primary"); waitForElement(email); waitForElement(passwordElem); waitForElement(button); webDriver.findElement(email).sendKeys(username); webDriver.findElement(passwordElem).sendKeys(password); logger.info("about to login cookies are : {}", webDriver.manage().getCookies()); webDriver.findElement(button).click(); } protected static void subscribe(String user, String password, String name) { webDriver.get(HOST + "/admin/signup"); logger.info("driver at " + webDriver.getCurrentUrl() + " trying to subscribe with " + user + ":" + password + " and " + name); webDriver.findElement(By.name("email")).sendKeys(user); webDriver.findElement(By.name("firstname")).sendKeys(name); webDriver.findElement(By.name("lastname")).sendKeys(name); webDriver.findElement(By.name("password")).sendKeys(password); webDriver.findElement(By.name("passwordConfirmation")).sendKeys(password); webDriver.findElement(By.className("btn-primary")).click(); } protected void logout() { logger.info("driver at " + webDriver.getCurrentUrl() + " trying to logout"); By logoutBy = By.id("logout"); waitForElement(logoutBy); webDriver.findElement(logoutBy).click(); } protected void assertUserIsLoggedIn() { assertUserIsLoggedIn(30); } protected void assertUserIsLoggedIn(int seconds) { logger.info("driver at " + webDriver.getCurrentUrl() + " asserting logged in"); FluentWait<By> fw = new FluentWait<By>(By.id("username")); fw.withTimeout(seconds, TimeUnit.SECONDS); try{ fw.until(new Predicate<By>() { @Override public boolean apply(By input) { try { return isLoggedIn(EMAIL); } catch (NoSuchElementException e) { return false; } } }); }catch (TimeoutException e){ logger.error("couldn't find username at " + webDriver.getCurrentUrl(), e); throw e; } } protected boolean isLoggedIn(String email) { WebElement username = webDriver.findElement(By.id("username")); return username != null && username.isDisplayed() && email!= null && email.equals(username.getText()); } protected void assertLoggedOut() { webDriver.get(HOST); logger.info("driver at " + webDriver.getCurrentUrl() + " asserting logged out"); Set<Cookie> cookies = null; try{ cookies = webDriver.manage().getCookies(); }catch (IllegalArgumentException e){} if(cookies != null){ Assert.assertFalse("authToken cookie is still defined", cookies.contains("authToken")); Assert.assertFalse("\"PLAY_SESSION cookie is still defined\"", cookies.contains("PLAY_SESSION")); } } protected String changePassword(String password, String newPassword) { logger.info("driver at " + webDriver.getCurrentUrl() + " trying to change password from: " + password + "to " + newPassword); webDriver.findElement(By.id("account")).click(); logger.info("driver at " + webDriver.getCurrentUrl()); waitForElement(By.id("oldPassword")); webDriver.findElement(By.id("oldPassword")).sendKeys(password); webDriver.findElement(By.id("newPassword")).sendKeys(newPassword); webDriver.findElement(By.id("confirmPassword")).sendKeys(newPassword); webDriver.findElement(By.className("btn-primary")).click(); waitForElement(By.className("alert-success")); return newPassword; } protected static void dropSession(){ webDriver.manage().deleteAllCookies(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b63a68ae81771fdfe41c0ce875f6c850b9bbe4bf
a4a51084cfb715c7076c810520542af38a854868
/src/main/java/com/shopee/app/instagram/h.java
fb2471eb559d2665ba09e4c9fb586eaf237423d7
[]
no_license
BharathPalanivelu/repotest
ddaf56a94eb52867408e0e769f35bef2d815da72
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
refs/heads/master
2020-09-30T18:55:04.802341
2019-12-02T10:52:08
2019-12-02T10:52:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,148
java
package com.shopee.app.instagram; public class h { /* renamed from: a reason: collision with root package name */ private String f17763a; /* renamed from: b reason: collision with root package name */ private String f17764b; /* renamed from: c reason: collision with root package name */ private String f17765c; /* renamed from: d reason: collision with root package name */ private int f17766d; /* renamed from: e reason: collision with root package name */ private int f17767e; public int a() { return this.f17766d; } public void a(int i) { this.f17766d = i; } public int b() { return this.f17767e; } public void b(int i) { this.f17767e = i; } public String c() { return this.f17763a; } public void a(String str) { this.f17763a = str; } public String d() { return this.f17765c; } public void b(String str) { this.f17765c = str; } public String e() { return this.f17764b; } public void c(String str) { this.f17764b = str; } }
[ "noiz354@gmail.com" ]
noiz354@gmail.com
9ffecc9aa898c180e832407823aa180c502131e8
f34602b407107a11ce0f3e7438779a4aa0b1833e
/professor/dvl/roadnet-client/src/main/java/com/roadnet/apex/IAdministrationServiceRetrieveCustomersWithXrsServiceUrlTransferErrorCodeFaultMessage.java
bc54468f6d4f17c3bb90bbcab40c2002cfbf150e
[]
no_license
ggmoura/treinar_11836
a447887dc65c78d4bd87a70aab2ec9b72afd5d87
0a91f3539ccac703d9f59b3d6208bf31632ddf1c
refs/heads/master
2022-06-14T13:01:27.958568
2020-04-04T01:41:57
2020-04-04T01:41:57
237,103,996
0
2
null
2022-05-20T21:24:49
2020-01-29T23:36:21
Java
UTF-8
Java
false
false
1,668
java
package com.roadnet.apex; import javax.xml.ws.WebFault; /** * This class was generated by Apache CXF 3.2.4 * 2020-03-15T13:07:01.817-03:00 * Generated source version: 3.2.4 */ @WebFault(name = "TransferErrorCode", targetNamespace = "http://roadnet.com/apex/DataContracts/") public class IAdministrationServiceRetrieveCustomersWithXrsServiceUrlTransferErrorCodeFaultMessage extends Exception { private com.roadnet.apex.datacontracts.TransferErrorCode transferErrorCode; public IAdministrationServiceRetrieveCustomersWithXrsServiceUrlTransferErrorCodeFaultMessage() { super(); } public IAdministrationServiceRetrieveCustomersWithXrsServiceUrlTransferErrorCodeFaultMessage(String message) { super(message); } public IAdministrationServiceRetrieveCustomersWithXrsServiceUrlTransferErrorCodeFaultMessage(String message, java.lang.Throwable cause) { super(message, cause); } public IAdministrationServiceRetrieveCustomersWithXrsServiceUrlTransferErrorCodeFaultMessage(String message, com.roadnet.apex.datacontracts.TransferErrorCode transferErrorCode) { super(message); this.transferErrorCode = transferErrorCode; } public IAdministrationServiceRetrieveCustomersWithXrsServiceUrlTransferErrorCodeFaultMessage(String message, com.roadnet.apex.datacontracts.TransferErrorCode transferErrorCode, java.lang.Throwable cause) { super(message, cause); this.transferErrorCode = transferErrorCode; } public com.roadnet.apex.datacontracts.TransferErrorCode getFaultInfo() { return this.transferErrorCode; } }
[ "gleidson.gmoura@gmail.com" ]
gleidson.gmoura@gmail.com
bbdc86149e62970ed1d23811e4e1f23f35c6c12d
8e0b4f580eb269b7d3c9061ed7f811ae56e1913f
/src/main/java/com/tomkasp/domain/util/CustomDateTimeSerializer.java
bae23551ffd1c8a46eb3d569e5b91c74342a7313
[ "MIT" ]
permissive
vrudikov/quartz-hipster-ui
e56fb6f88fa10225c2e69f2677fb6af36952916b
39ea20156d748e9f4679f5196c557b1f101acdb0
refs/heads/master
2021-01-17T11:25:04.254935
2015-06-18T20:01:24
2015-06-18T20:01:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
922
java
package com.tomkasp.domain.util; import java.io.IOException; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; /** * Custom Jackson serializer for displaying Joda DateTime objects. */ public class CustomDateTimeSerializer extends JsonSerializer<DateTime> { private static DateTimeFormatter formatter = DateTimeFormat .forPattern("yyyy-MM-dd'T'HH:mm:ss'Z'"); @Override public void serialize(DateTime value, JsonGenerator generator, SerializerProvider serializerProvider) throws IOException { generator.writeString(formatter.print(value.toDateTime(DateTimeZone.UTC))); } }
[ "tomkasp@gmail.com" ]
tomkasp@gmail.com
aaecaf84847be3f88eb7cd9088a12aa6a6bf5c58
1cf008cb24753757601e4ca72bf7bfbe75f1f073
/src/com/jsjf/service/activity/impl/DrMemberFavourableServiceImpl.java
b33aa7883a961970d2e22529f2ec9455cf6418df
[]
no_license
lslnx0307/system
22c8d919cf3be1ed40512d297b760663ec45d9cb
85907d6662d405912ca48678dc4c13447120cd21
refs/heads/master
2020-04-08T21:30:18.323733
2018-11-30T00:56:11
2018-11-30T00:56:11
159,746,917
0
0
null
null
null
null
UTF-8
Java
false
false
2,850
java
package com.jsjf.service.activity.impl; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.jsjf.common.BaseResult; import com.jsjf.common.PageInfo; import com.jsjf.common.Utils; import com.jsjf.dao.activity.DrActivityParameterDAO; import com.jsjf.dao.activity.DrMemberFavourableDAO; import com.jsjf.model.activity.DrActivityParameter; import com.jsjf.model.activity.DrMemberFavourable; import com.jsjf.model.system.SysUsersVo; import com.jsjf.service.activity.DrMemberFavourableService; @Service @Transactional public class DrMemberFavourableServiceImpl implements DrMemberFavourableService { @Autowired DrActivityParameterDAO drActivityParameterDAO; @Autowired DrMemberFavourableDAO drMemberFavourableDAO; @Override public void selectActivity(Integer uid, DrActivityParameter dap, SysUsersVo usersVo) throws Exception { dap.setSurplusQty(dap.getSurplusQty()-1);//修改剩余数量 //修改活动 drActivityParameterDAO.updateActivityParameter(dap); //插入发放的表dr_member_favourable DrMemberFavourable dmf = new DrMemberFavourable(dap.getId(), uid, dap.getType(), dap.getCode(), dap.getName(), dap.getAmount(), dap.getRaisedRates(), dap.getEnableAmount(), 0,Utils.getDayNumOfDate(1-dap.getDeadline()), null,"客服发放",usersVo.getUserKy().intValue(),1,dap.getProductDeadline(),dap.getMultiple()); drMemberFavourableDAO.insertIntoInfo(dmf); } @Override public BaseResult selectFavourableByParam(Map<String, Object> map, PageInfo pi) { map.put("offset",pi.getPageInfo().getOffset()); map.put("limit",pi.getPageInfo().getLimit()); List<DrMemberFavourable> list = drMemberFavourableDAO.getMemberFavourable(map); Integer total = drMemberFavourableDAO.getMemberFavourableTotal(map); map.clear(); pi.setTotal(total); pi.setRows(list); map.put("page", pi); BaseResult br = new BaseResult(); br.setMap(map); return br; } /** * 批量发放加息劵操作 */ @Override public void batchSelectActivity(Integer[] uids, DrActivityParameter dap, SysUsersVo usersVo) throws Exception{ for(Integer uid :uids){ dap.setSurplusQty(dap.getSurplusQty()-1);//修改剩余数量 //修改活动 drActivityParameterDAO.updateActivityParameter(dap); //插入发放的表dr_member_favourable DrMemberFavourable dmf = new DrMemberFavourable(dap.getId(), uid, dap.getType(), dap.getCode(), dap.getName(), dap.getAmount(), dap.getRaisedRates(), dap.getEnableAmount(), 0,Utils.getDayNumOfDate(1-dap.getDeadline()), null,"客服发放",usersVo.getUserKy().intValue(),1,dap.getProductDeadline(),dap.getMultiple()); drMemberFavourableDAO.insertIntoInfo(dmf); } } }
[ "184576454@qq.com" ]
184576454@qq.com
0ec655746e6c5c35dddddb57810c0378923a1fde
2c6e2ba03eb71ca45fe690ff6e4586f6e2fa0f17
/material/apks/banco/sources/com/google/android/gms/location/internal/zzh.java
639dcc9033ac75c7ffb114820838cc69483fa4c2
[]
no_license
lcrcastor/curso-mobile-2019
3088a196139b3e980ed6e09797a0bbf5efb6440b
7585fccb6437a17c841772c1d9fb0701d6c68042
refs/heads/master
2023-04-06T21:46:32.333236
2020-10-30T19:47:54
2020-10-30T19:47:54
308,680,747
0
1
null
2023-03-26T06:57:57
2020-10-30T16:08:31
Java
UTF-8
Java
false
false
4,397
java
package com.google.android.gms.location.internal; import android.app.PendingIntent; import android.os.Binder; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; public interface zzh extends IInterface { public static abstract class zza extends Binder implements zzh { /* renamed from: com.google.android.gms.location.internal.zzh$zza$zza reason: collision with other inner class name */ static class C0035zza implements zzh { private IBinder a; C0035zza(IBinder iBinder) { this.a = iBinder; } public IBinder asBinder() { return this.a; } public void zza(int i, PendingIntent pendingIntent) { Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.location.internal.IGeofencerCallbacks"); obtain.writeInt(i); if (pendingIntent != null) { obtain.writeInt(1); pendingIntent.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.a.transact(3, obtain, null, 1); } finally { obtain.recycle(); } } public void zza(int i, String[] strArr) { Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.location.internal.IGeofencerCallbacks"); obtain.writeInt(i); obtain.writeStringArray(strArr); this.a.transact(1, obtain, null, 1); } finally { obtain.recycle(); } } public void zzb(int i, String[] strArr) { Parcel obtain = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.location.internal.IGeofencerCallbacks"); obtain.writeInt(i); obtain.writeStringArray(strArr); this.a.transact(2, obtain, null, 1); } finally { obtain.recycle(); } } } public zza() { attachInterface(this, "com.google.android.gms.location.internal.IGeofencerCallbacks"); } public static zzh zzhb(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.location.internal.IGeofencerCallbacks"); return (queryLocalInterface == null || !(queryLocalInterface instanceof zzh)) ? new C0035zza(iBinder) : (zzh) queryLocalInterface; } public IBinder asBinder() { return this; } public boolean onTransact(int i, Parcel parcel, Parcel parcel2, int i2) { if (i != 1598968902) { switch (i) { case 1: parcel.enforceInterface("com.google.android.gms.location.internal.IGeofencerCallbacks"); zza(parcel.readInt(), parcel.createStringArray()); return true; case 2: parcel.enforceInterface("com.google.android.gms.location.internal.IGeofencerCallbacks"); zzb(parcel.readInt(), parcel.createStringArray()); return true; case 3: parcel.enforceInterface("com.google.android.gms.location.internal.IGeofencerCallbacks"); zza(parcel.readInt(), parcel.readInt() != 0 ? (PendingIntent) PendingIntent.CREATOR.createFromParcel(parcel) : null); return true; default: return super.onTransact(i, parcel, parcel2, i2); } } else { parcel2.writeString("com.google.android.gms.location.internal.IGeofencerCallbacks"); return true; } } } void zza(int i, PendingIntent pendingIntent); void zza(int i, String[] strArr); void zzb(int i, String[] strArr); }
[ "luis@MARK-2.local" ]
luis@MARK-2.local
1c7996c14c3cde0118f6a590e6b405f7a955c162
410df2b595462cec0dc095dcb2262c49ef6ddc3e
/app/src/main/java/org/chromium/blink/mojom/ObservedFeature.java
68bf49a23e9b5e8846fcdbf9896fa4fbb2ff1af4
[]
no_license
ipxbro/JokerChromium
e32d6e15b61aeb986687befe5d2ea6a50391391f
89931e2e5e356f58c33a3e160c53d347e3779fc4
refs/heads/master
2023-04-24T12:58:28.647237
2021-04-30T05:47:31
2021-04-30T05:47:31
567,083,021
0
0
null
2022-11-17T02:58:50
2022-11-17T02:58:47
null
UTF-8
Java
false
false
762
java
// ObservedFeature.java is auto generated by mojom_bindings_generator.py, do not edit // Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file is autogenerated by: // mojo/public/tools/bindings/mojom_bindings_generator.py // For: // third_party/blink/public/mojom/feature_observer/feature_observer.mojom // package org.chromium.blink.mojom; public interface ObservedFeature extends org.chromium.mojo.bindings.Interface { public interface Proxy extends ObservedFeature, org.chromium.mojo.bindings.Interface.Proxy { } Manager<ObservedFeature, ObservedFeature.Proxy> MANAGER = ObservedFeature_Internal.MANAGER; }
[ "joker@cerbook.com" ]
joker@cerbook.com
d860e96777a4629a2f55ed8da0c5438694a24893
f61a16bd96566073b446a254fff8ad3ec1201f5a
/advertising/src/main/java/org/im97mori/ble/advertising/ShortenedLocalNameAndroid.java
8cf72144ad3368665ff959c1bf11fb7db5a706cb
[ "MIT" ]
permissive
im97mori-github/AndroidBLEUtil
d7f768480c655120261c546a0d6cff40eca03b0a
9ceb62ada303f046e4f5721f525208b5a18ee421
refs/heads/master
2023-08-18T21:27:06.479576
2023-08-03T07:53:41
2023-08-03T07:53:41
195,750,369
3
2
null
null
null
null
UTF-8
Java
false
false
2,833
java
package org.im97mori.ble.advertising; import android.bluetooth.le.ScanRecord; import android.os.Parcel; import androidx.annotation.NonNull; import org.im97mori.ble.ByteArrayCreator; import java.util.Objects; /** * <p> * Shortened Local Name * <p> * <a href="https://www.bluetooth.com/specifications/assigned-numbers/generic-access-profile/">generic-access-profile</a> * </p> */ public class ShortenedLocalNameAndroid extends ShortenedLocalName implements AdvertisingDataInterfaceAndroid { /** * @see ByteArrayCreator */ public static final ByteArrayCreator<ShortenedLocalNameAndroid> CREATOR = new ByteArrayCreator<ShortenedLocalNameAndroid>() { /** * {@inheritDoc} */ @Override @NonNull public ShortenedLocalNameAndroid createFromParcel(@NonNull Parcel in) { return new ShortenedLocalNameAndroid(in); } /** * {@inheritDoc} */ @Override @NonNull public ShortenedLocalNameAndroid[] newArray(int size) { return new ShortenedLocalNameAndroid[size]; } /** * {@inheritDoc} */ @NonNull @Override public ShortenedLocalNameAndroid createFromByteArray(@NonNull byte[] values) { return new ShortenedLocalNameAndroid(values, 0, values.length - 1); } }; /** * @param data byte array from {@link ScanRecord#getBytes()} * @param offset data offset * @see #ShortenedLocalNameAndroid(byte[], int, int) */ public ShortenedLocalNameAndroid(@NonNull byte[] data, int offset) { this(data, offset, data[offset]); } /** * Constructor for Shortened Local Name * * @param data byte array from {@link ScanRecord#getBytes()} * @param offset data offset * @param length 1st octet of Advertising Data */ public ShortenedLocalNameAndroid(@NonNull byte[] data , int offset , int length) { super(data, offset, length); } /** * Constructor from parameters * * @param shortenedLocalName Shortened Local Name */ public ShortenedLocalNameAndroid(@NonNull String shortenedLocalName) { super(shortenedLocalName); } /** * Constructor from {@link Parcel} * * @param in Parcel */ private ShortenedLocalNameAndroid(@NonNull Parcel in) { super(Objects.requireNonNull(in.createByteArray()), 0, in.readInt()); } /** * {@inheritDoc} */ @Override public int describeContents() { return 0; } /** * {@inheritDoc} */ @Override public void writeToParcel(@NonNull Parcel dest, int flags) { dest.writeByteArray(getBytes()); dest.writeInt(getLength()); } }
[ "github@im97mori.org" ]
github@im97mori.org
3628133b8c98660c73b390a94ab1cb7fa47c107e
282ac1db767ec2b4eb5d0829fc3478eb909f348e
/framework/modules/idempotent-starter/src/main/java/ms/dew/idempotent/interceptor/IdempotentWebMvcConfigurer.java
061618eb4db613183d5d11e56857349386abef82
[ "Apache-2.0" ]
permissive
LiuHongcheng/dew
653166a21fdc96b0abda669592ed2959b4af2f18
6ad2d9db5b6e758331e1afc1cdf75bc618adf0c5
refs/heads/master
2020-05-19T17:27:14.741921
2019-10-30T07:01:39
2019-10-30T07:01:39
185,134,486
0
0
Apache-2.0
2019-05-06T06:13:41
2019-05-06T06:13:41
null
UTF-8
Java
false
false
2,225
java
/* * Copyright 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 * * 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 ms.dew.idempotent.interceptor; import ms.dew.idempotent.DewIdempotentConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; /** * Idempotent web mvc configurer. * * @author gudaoxuri */ @Configuration @ConditionalOnWebApplication @EnableConfigurationProperties(DewIdempotentConfig.class) @Order(10000) public class IdempotentWebMvcConfigurer extends WebMvcConfigurerAdapter { private static final Logger logger = LoggerFactory.getLogger(IdempotentWebMvcConfigurer.class); private DewIdempotentConfig dewIdempotentConfig; /** * Instantiates a new Idempotent web mvc configurer. * * @param dewIdempotentConfig the dew idempotent config */ public IdempotentWebMvcConfigurer(DewIdempotentConfig dewIdempotentConfig) { logger.info("Load Auto Configuration : {}", this.getClass().getName()); this.dewIdempotentConfig = dewIdempotentConfig; } @Override public void addInterceptors(InterceptorRegistry registry) { registry.addInterceptor(new IdempotentHandlerInterceptor(dewIdempotentConfig)).excludePathPatterns("/error/**"); super.addInterceptors(registry); } }
[ "i@sunisle.org" ]
i@sunisle.org
44138e3f23c1205f77a66346244c89aec282a415
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Cli-34/org.apache.commons.cli.OptionBuilder/BBC-F0-opt-20/tests/20/org/apache/commons/cli/OptionBuilder_ESTest_scaffolding.java
1937feee9a8da3562281eb97624c54fcb005aa5e
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
3,373
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Oct 21 03:14:15 GMT 2021 */ package org.apache.commons.cli; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class OptionBuilder_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.cli.OptionBuilder"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(OptionBuilder_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.cli.OptionBuilder", "org.apache.commons.cli.OptionValidator", "org.apache.commons.cli.Option" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(OptionBuilder_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.apache.commons.cli.OptionBuilder", "org.apache.commons.cli.Option", "org.apache.commons.cli.OptionValidator" ); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
c2c523d20199086dbf27b7e5dd823222633fb65e
fff3302fe8193d13360f12e5b13d376ef76cf4d6
/AppLock/com/google/android/gms/internal/zzbau.java
a4b4072ba3193eaa39adb090f2e6f7e77669eb2d
[]
no_license
shaolin-example-com-my-shopify-com/KidWatcher
2912950b7ca4773c3d29005b9d231ad6035b4912
f67a81b757043159ea358b7f9e4b16fd6be0e0c0
refs/heads/master
2022-04-25T17:19:28.800922
2020-04-30T02:53:20
2020-04-30T02:53:20
260,098,439
0
0
null
2020-04-30T02:51:49
2020-04-30T02:51:48
null
UTF-8
Java
false
false
832
java
package com.google.android.gms.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zza; import com.google.android.gms.common.internal.zzad; public class zzbau extends zza { public static final Creator<zzbau> CREATOR = new ev(); final int f11861a; final zzad f11862b; zzbau(int i, zzad com_google_android_gms_common_internal_zzad) { this.f11861a = i; this.f11862b = com_google_android_gms_common_internal_zzad; } public zzbau(zzad com_google_android_gms_common_internal_zzad) { this(1, com_google_android_gms_common_internal_zzad); } public zzad m15370a() { return this.f11862b; } public void writeToParcel(Parcel parcel, int i) { ev.m10691a(this, parcel, i); } }
[ "Nist@netcompany.com" ]
Nist@netcompany.com
78611cc01cdff99dac78ba474926ad4467c1ad65
56312b912e319dce6701989bbfb5f6b66d0eebf9
/src/main/java/br/com/eskinfotechweb/workshopmongodb/resources/PostResource.java
da1349e7d93c9100bbeb3ba0f48fe081f2372071
[]
no_license
eskokado/workshop-springboot2-mongodb
616591d71ae0b182e388d3698db5eee8dc247f43
6d83d28db86c2e9c45bb533c2a7fb70d17bbc076
refs/heads/master
2020-06-08T22:29:06.724707
2019-06-23T14:51:26
2019-06-23T14:51:26
193,317,729
0
0
null
null
null
null
UTF-8
Java
false
false
1,884
java
package br.com.eskinfotechweb.workshopmongodb.resources; import java.util.Date; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import br.com.eskinfotechweb.workshopmongodb.domain.Post; import br.com.eskinfotechweb.workshopmongodb.resources.util.URL; import br.com.eskinfotechweb.workshopmongodb.services.PostService; @RestController @RequestMapping(value = "/posts") public class PostResource { @Autowired private PostService service; @GetMapping("/{id}") public ResponseEntity<Post> findById(@PathVariable String id) { Post obj = service.findById(id); return ResponseEntity.ok().body(obj); } @GetMapping("/titlesearch") public ResponseEntity<List<Post>> findByTitle(@RequestParam(value = "text", defaultValue = "") String text) { text = URL.decodeParam(text); List<Post> list = service.findByTitle(text); return ResponseEntity.ok().body(list); } @RequestMapping(value="/fullsearch", method=RequestMethod.GET) public ResponseEntity<List<Post>> fullSearch( @RequestParam(value="text", defaultValue="") String text, @RequestParam(value="minDate", defaultValue="") String minDate, @RequestParam(value="maxDate", defaultValue="") String maxDate) { text = URL.decodeParam(text); Date min = URL.convertDate(minDate, new Date(0L)); Date max = URL.convertDate(maxDate, new Date()); List<Post> list = service.fullSearch(text, min, max); return ResponseEntity.ok().body(list); } }
[ "eskokado@gmail.com" ]
eskokado@gmail.com
2b079688a704c3750a2b4588e6d4bd32792eb95d
47eb5bf54da6c19ca175fc8938ca9b6a2b545dfa
/euicc-cs-profile/src/main/java/com/whty/euicc/profile/securityDomain/bean/Ts102226SIMFileAccessToolkitParameter.java
dcd8c87a36a82db648dd577c43a138e77d204a1b
[]
no_license
liszhu/whatever_ty
44ddb837f2de19cb980c28fe06e6634f9d6bd8cb
e02ef9e125cac9103848c776e420edcf0dcaed2f
refs/heads/master
2021-12-13T21:37:06.539805
2017-04-05T01:50:23
2017-04-05T01:50:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
561
java
package com.whty.euicc.profile.securityDomain.bean; import com.whty.euicc.profile.parent.JavaBean; /** * SecurityDomain子元素 * 结构类型:简单类型 * @author Administrator * */ public class Ts102226SIMFileAccessToolkitParameter extends JavaBean{ private String tag ="CA"; public String getTag() { return tag; } public void setTag(String tag) { this.tag = tag; } @Override public String toString() { return "Ts102226SIMFileAccessToolkitParameter [length=" + length + ", tag=" + tag + ", value=" + value + "]"; } }
[ "652241956@qq.com" ]
652241956@qq.com
2ec384699f4af5d85c066e1347e4189ca3beff22
377405a1eafa3aa5252c48527158a69ee177752f
/src/com/google/android/gms/wearable/WearableListenerService$a$4.java
d15d1fed900bfe613ef4cf7caffa3d7fd9e9847a
[]
no_license
apptology/AltFuelFinder
39c15448857b6472ee72c607649ae4de949beb0a
5851be78af47d1d6fcf07f9a4ad7f9a5c4675197
refs/heads/master
2016-08-12T04:00:46.440301
2015-10-25T18:25:16
2015-10-25T18:25:16
44,921,258
0
1
null
null
null
null
UTF-8
Java
false
false
601
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.google.android.gms.wearable; import com.google.android.gms.internal.kk; // Referenced classes of package com.google.android.gms.wearable: // WearableListenerService class adB implements Runnable { final kk adB; final adB adz; public void run() { adz.x.onPeerDisconnected(adB); } A(A a1, kk kk) { adz = a1; adB = kk; super(); } }
[ "rich.foreman@apptology.com" ]
rich.foreman@apptology.com
950e9c55675c862cb17ab2dafddd885576672e4f
930dd40fe6056610106935f63c508ab51e5b2034
/zapp-common/src/main/java/com/zfoo/app/zapp/common/protocol/cache/search/GetHotSearchAnswer.java
70aadf6c941148d29488de625ad55d296c9e3d5f
[ "Apache-2.0" ]
permissive
qzmfreedom/zapp
bcd8f8dacd226720c83e7c2da8244f959b175a50
da51773447545fce1f9949b014bcf827065ba66e
refs/heads/main
2023-08-25T02:33:51.732215
2021-10-20T09:55:38
2021-10-20T09:55:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,355
java
/* * Copyright (C) 2020 The zfoo Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and limitations under the License. */ package com.zfoo.app.zapp.common.protocol.cache.search; import com.zfoo.protocol.IPacket; import java.util.List; /** * @author jaysunxiao * @version 1.0 * @since 2020-08-11 11:15 */ public class GetHotSearchAnswer implements IPacket { public static final transient short PROTOCOL_ID = 3321; private List<String> searches; public static GetHotSearchAnswer valueOf(List<String> searches) { var ask = new GetHotSearchAnswer(); ask.searches = searches; return ask; } @Override public short protocolId() { return PROTOCOL_ID; } public List<String> getSearches() { return searches; } public void setSearches(List<String> searches) { this.searches = searches; } }
[ "jaysunxiao@gmail.com" ]
jaysunxiao@gmail.com
93098ba97d359670f0ab79b88ab655c687f78e4b
aa9626eecae0bfece1cb8e5a8c03b08a3b394dfc
/src/main/java/com/aoher/util/Sorting.java
fb92e0de6d2d0efe4dac3a6441bebcc54aef4924
[]
no_license
MrsMars/java-sorting
f325ffc4392a85aecff2d1b477bc013f07b85339
52b46687eb32c39e08f24a30f99ce57756cb3bbc
refs/heads/master
2021-05-21T20:44:58.673059
2020-04-03T17:15:20
2020-04-03T17:15:20
252,794,123
0
0
null
null
null
null
UTF-8
Java
false
false
5,184
java
package com.aoher.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.time.Duration; import java.time.LocalDateTime; import java.util.stream.IntStream; public class Sorting { private static final String LOGGER_TIME_FORMATTER = "{} time: {} millis"; private static final Logger log = LoggerFactory.getLogger(Sorting.class); public static void bubbleSort(int[] array) { LocalDateTime start = LocalDateTime.now(); boolean sorted = false; int temp; while (!sorted) { sorted = true; for (int i = 0; i < array.length - 1; i++) { if (array[i] > array[i + 1]) { temp = array[i]; array[i] = array[i + 1]; array[i + 1] = temp; sorted = false; } } } LocalDateTime end = LocalDateTime.now(); log.info(LOGGER_TIME_FORMATTER, "bubbleSort", getTime(start, end)); } public static void insertionSort(int[] array) { LocalDateTime start = LocalDateTime.now(); for (int i = 1; i < array.length; i++) { int current = array[i]; int j = i - 1; while (j >= 0 && current < array[j]) { array[j + 1] = array[i]; j--; } array[j + 1] = current; } LocalDateTime end = LocalDateTime.now(); log.info(LOGGER_TIME_FORMATTER, "insertionSort", getTime(start, end)); } public static void mergeSort(int[] array) { LocalDateTime start = LocalDateTime.now(); mergeSort(array, 0, array.length - 1); LocalDateTime end = LocalDateTime.now(); log.info(LOGGER_TIME_FORMATTER, "mergeSort", getTime(start, end)); } private static void mergeSort(int[] array, int left, int right) { if (right <= left) return; int mid = (left + right) / 2; mergeSort(array, left, mid); mergeSort(array, mid + 1, right); mergeSort(array, left, mid, right); } private static void mergeSort(int[] array, int left, int mid, int right) { // вычисляем длину int lengthLeft = mid - left + 1; int lengthRight = right - mid; // копируем отсортированные массивы во временные int[] leftArray = IntStream.range(0, lengthLeft).map(i -> array[left + i]).toArray(); int[] rightArray = IntStream.range(0, lengthRight).map(i -> array[mid + i + 1]).toArray(); // итераторы содержат текущий индекс временного подмассива int leftIndex = 0; int rightIndex = 0; // копируем из leftArray и rightArray обратно в массив for (int i = left; i < right + 1; i++) { // если остаются нескопированные элементы в R и L, копируем минимальный if (leftIndex < lengthLeft && rightIndex < lengthRight) { if (leftArray[leftIndex] < rightArray[rightIndex]) { array[i] = leftArray[leftIndex]; leftIndex++; } else { array[i] = rightArray[rightIndex]; rightIndex++; } } // если все элементы были скопированы из rightArray, скопировать остальные из leftArray else if (leftIndex < lengthLeft) { array[i] = leftArray[leftIndex]; leftIndex++; } // если все элементы были скопированы из leftArray, скопировать остальные из rightArray else if (rightIndex < lengthRight) { array[i] = rightArray[rightIndex]; rightIndex++; } } } public static void quickSort(int[] array) { LocalDateTime startT = LocalDateTime.now(); quickSort(array, 0, array.length - 1); LocalDateTime endT = LocalDateTime.now(); log.info(LOGGER_TIME_FORMATTER, "quickSort", getTime(startT, endT)); } private static void quickSort(int[] array, int begin, int end) { if (end <= begin) return; int pivot = partition(array, begin, end); quickSort(array, begin, pivot - 1); quickSort(array, pivot + 1, end); } private static int partition(int[] array, int begin, int end) { int counter = begin; for (int i = begin; i < end; i++) { if (array[i] < array[end]) { int temp = array[counter]; array[counter] = array[i]; array[i] = temp; counter++; } } int temp = array[end]; array[end] = array[counter]; array[counter] = temp; return counter; } private static long getTime(LocalDateTime start, LocalDateTime end) { return Duration.between(start, end).toMillis(); } private Sorting() { } }
[ "42183540+MrsMars@users.noreply.github.com" ]
42183540+MrsMars@users.noreply.github.com
68ab2ed52f1ae7ee6a5bea6c284895c713b58786
14b23b02386063c8c161620fe4c750c971958e9c
/p2p-dal/src/main/java/com/icebreak/p2p/daointerface/InvestmentDao.java
2f7111bca68afa2f04d6160a749a358e5af53219
[]
no_license
RalphSu/789
d6d60fa0ae6131871d2cd4782c547cc76f1e08f6
1a066f6d0429e8490df03e4e11063533cbcaa217
refs/heads/master
2021-01-24T04:55:32.398049
2016-03-13T09:28:41
2016-03-13T09:28:41
52,210,852
0
0
null
2016-02-21T14:40:36
2016-02-21T14:40:36
null
UTF-8
Java
false
false
530
java
package com.icebreak.p2p.daointerface; import java.util.List; import java.util.Map; import com.icebreak.p2p.dataobject.Investment; public interface InvestmentDao { /** * 根据条件查询 * @param params * @return */ public List<Investment> getByProperties(Map<String, Object> params); /** * 根据条件查询条数 * @param params * @return */ public long getCountByProperties(Map<String, Object> params); /** * 根据ID 查询 * @param id * @return */ public Investment getById(long id); }
[ "windofdusk@gmail.com" ]
windofdusk@gmail.com
1f1b1ee1413f76986e2ad1f06e751ee23a7c5f01
f9fc08c1baf3e7044813fc74fdc7534f200e7af8
/src/main/java/com/igomall/entity/StockLog.java
4b76f7f6da67da00ab4cb68f0fff85abccef9bec
[]
no_license
heyewei/boot-mall-v6
32f85edde245a40e3835104302e6183eecad1af1
33afd819fcd3cd9d65f38d1d2de27237f69742fe
refs/heads/master
2022-11-05T02:50:08.706656
2020-06-26T07:14:24
2020-06-26T07:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,652
java
package com.igomall.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; /** * Entity - 库存记录 * * @author BOOTX Team * @version 6.1 */ @Entity public class StockLog extends BaseEntity<Long> { private static final long serialVersionUID = 5550452675645134078L; /** * 类型 */ public enum Type { /** * 入库 */ STOCK_IN, /** * 出库 */ STOCK_OUT } /** * 类型 */ @Column(nullable = false, updatable = false) private StockLog.Type type; /** * 入库数量 */ @Column(nullable = false, updatable = false) private Integer inQuantity; /** * 出库数量 */ @Column(nullable = false, updatable = false) private Integer outQuantity; /** * 当前库存 */ @Column(nullable = false, updatable = false) private Integer stock; /** * 备注 */ @Column(updatable = false) private String memo; /** * SKU */ @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(nullable = false, updatable = false) private Sku sku; /** * 获取类型 * * @return 类型 */ public StockLog.Type getType() { return type; } /** * 设置类型 * * @param type * 类型 */ public void setType(StockLog.Type type) { this.type = type; } /** * 获取入库数量 * * @return 入库数量 */ public Integer getInQuantity() { return inQuantity; } /** * 设置入库数量 * * @param inQuantity * 入库数量 */ public void setInQuantity(Integer inQuantity) { this.inQuantity = inQuantity; } /** * 获取出库数量 * * @return 出库数量 */ public Integer getOutQuantity() { return outQuantity; } /** * 设置出库数量 * * @param outQuantity * 出库数量 */ public void setOutQuantity(Integer outQuantity) { this.outQuantity = outQuantity; } /** * 获取当前库存 * * @return 当前库存 */ public Integer getStock() { return stock; } /** * 设置当前库存 * * @param stock * 当前库存 */ public void setStock(Integer stock) { this.stock = stock; } /** * 获取备注 * * @return 备注 */ public String getMemo() { return memo; } /** * 设置备注 * * @param memo * 备注 */ public void setMemo(String memo) { this.memo = memo; } /** * 获取SKU * * @return SKU */ public Sku getSku() { return sku; } /** * 设置SKU * * @param sku * SKU */ public void setSku(Sku sku) { this.sku = sku; } }
[ "a12345678" ]
a12345678
4ce34f3d9c781615a8ef02fec11a990296c57ec1
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2017/8/RelationshipChainField.java
e72fb0ab372e3104833533093400a23694d2dc04
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
2,445
java
/* * Copyright (c) 2002-2017 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.consistency.repair; import org.neo4j.kernel.impl.store.record.Record; import org.neo4j.kernel.impl.store.record.RelationshipRecord; @SuppressWarnings( "boxing" ) public enum RelationshipChainField { FIRST_NEXT { @Override public long relOf( RelationshipRecord rel ) { return rel.getFirstNextRel(); } @Override public boolean endOfChain( RelationshipRecord rel ) { return rel.getFirstNextRel() == Record.NO_NEXT_RELATIONSHIP.intValue(); } }, FIRST_PREV { @Override public long relOf( RelationshipRecord rel ) { return rel.getFirstPrevRel(); } @Override public boolean endOfChain( RelationshipRecord rel ) { return rel.isFirstInFirstChain(); } }, SECOND_NEXT { @Override public long relOf( RelationshipRecord rel ) { return rel.getSecondNextRel(); } @Override public boolean endOfChain( RelationshipRecord rel ) { return rel.getSecondNextRel() == Record.NO_NEXT_RELATIONSHIP.intValue(); } }, SECOND_PREV { @Override public long relOf( RelationshipRecord rel ) { return rel.getSecondPrevRel(); } @Override public boolean endOfChain( RelationshipRecord rel ) { return rel.isFirstInSecondChain(); } }; public abstract long relOf( RelationshipRecord rel ); public abstract boolean endOfChain( RelationshipRecord rel ); }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
b3ad2530f99d44a6dcb3cdf6fd52c82f530eaa71
720ba343ce147af5b3881679e3b2aebd21d62910
/spring-base/src/main/java/com/example/demo/SpringBaseApplication.java
995498a072d1d9a51091e32c354857a749c32fb8
[]
no_license
tomlxq/ShowCase
698ffdaf16979c8197cba5a1f97c179b25617281
17717c3411c98ede281c75a747ff3583b82e5997
refs/heads/master
2021-01-20T10:10:49.638899
2018-11-22T16:31:56
2018-11-22T16:31:56
28,090,123
1
0
null
null
null
null
UTF-8
Java
false
false
316
java
package com.example.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringBaseApplication { public static void main(String[] args) { SpringApplication.run(SpringBaseApplication.class, args); } }
[ "21429503@qq.com" ]
21429503@qq.com
99783021f951954d6e513a1b99658232787ae213
c885ef92397be9d54b87741f01557f61d3f794f3
/results/Closure-114/com.google.javascript.jscomp.NameAnalyzer/BBC-F0-opt-90/tests/3/com/google/javascript/jscomp/NameAnalyzer_ESTest.java
ed9294af78a9062dc4936bfe3dc8301f6707adb4
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
7,004
java
/* * This file was automatically generated by EvoSuite * Wed Oct 13 18:13:53 GMT 2021 */ package com.google.javascript.jscomp; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import com.google.javascript.jscomp.AbstractCompiler; import com.google.javascript.jscomp.Compiler; import com.google.javascript.jscomp.NameAnalyzer; import com.google.javascript.jscomp.Normalize; import com.google.javascript.rhino.Node; 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) public class NameAnalyzer_ESTest extends NameAnalyzer_ESTest_scaffolding { @Test(timeout = 4000) public void test00() throws Throwable { Compiler compiler0 = new Compiler(); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, false); nameAnalyzer0.removeUnreferenced(); } @Test(timeout = 4000) public void test01() throws Throwable { NameAnalyzer nameAnalyzer0 = new NameAnalyzer((AbstractCompiler) null, true); Node node0 = new Node(0, 0, 0); // Undeclared exception! try { nameAnalyzer0.process(node0, node0); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("com.google.javascript.jscomp.NodeTraversal", e); } } @Test(timeout = 4000) public void test02() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = new Node(672, (-1724562901), 817); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, true); Node[] nodeArray0 = new Node[0]; Node node1 = new Node(1631, nodeArray0, 539, (-1060)); Node node2 = new Node((-1619990587), node1); Node node3 = new Node(114, node0, node2, 4095, 53); nameAnalyzer0.process(node1, node3); assertFalse(node3.isThrow()); } @Test(timeout = 4000) public void test03() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = new Node(2213); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, false); Node node1 = Node.newString("Jt8/HrAu\"PfBn"); Node node2 = new Node(108, node0, node1, (-180023783), 1); nameAnalyzer0.process(node0, node2); assertFalse(node0.isThis()); } @Test(timeout = 4000) public void test04() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = new Node((-1061), (-1061), (-1061)); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, false); Node node1 = new Node(119, node0, node0, 57, 2); nameAnalyzer0.process(node1, node1); assertFalse(node1.isNull()); } @Test(timeout = 4000) public void test05() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = Node.newString((-1166), "", (-1166), (-1166)); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, false); Node node1 = new Node(113, node0, 12, 15); nameAnalyzer0.process(node0, node1); assertEquals(12, Node.COLUMN_BITS); } @Test(timeout = 4000) public void test06() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = Node.newString((-1166), "", (-1166), (-1166)); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, false); Node node1 = new Node(49, node0); nameAnalyzer0.process(node0, node1); assertFalse(node0.wasEmptyNode()); } @Test(timeout = 4000) public void test07() throws Throwable { Compiler compiler0 = new Compiler(); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, false); Node node0 = Normalize.parseAndNormalizeTestCode(compiler0, "window"); Node node1 = new Node(4, node0); nameAnalyzer0.process(node0, node1); assertEquals(43, Node.IS_CONSTANT_NAME); } @Test(timeout = 4000) public void test08() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = new Node((-1161)); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, false); Node node1 = new Node(118, node0, node0, (-1722469031), 679); nameAnalyzer0.process(node0, node1); assertFalse(node1.isCase()); } @Test(timeout = 4000) public void test09() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = new Node((-1075), (-1075), (-1075)); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, true); Node node1 = new Node(37, node0, node0, node0); // Undeclared exception! try { compiler0.parseTestCode("o7"); // fail("Expecting exception: IllegalArgumentException"); // Unstable assertion } catch(IllegalArgumentException e) { // // Multiple entries with same key: author=NOT_IMPLEMENTED and author=AUTHOR // verifyException("com.google.common.collect.ImmutableMap", e); } } @Test(timeout = 4000) public void test10() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = Node.newString(147, "kZC)(O8*d-`AtTL|1", (-1827), 147); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, true); Node node1 = new Node(474, node0, node0, node0, 1754, 132); Node node2 = new Node(0, node1); nameAnalyzer0.process(node0, node2); assertFalse(node0.isAdd()); } @Test(timeout = 4000) public void test11() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = Normalize.parseAndNormalizeTestCode(compiler0, "com.google.javascript.jscomp.NameAnalyzer$FindDependencyScopes"); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, true); nameAnalyzer0.process(node0, node0); String string0 = nameAnalyzer0.getHtmlReport(); assertEquals("<html><body><style type=\"text/css\">body, td, p {font-family: Arial; font-size: 83%} ul {margin-top:2px; margin-left:0px; padding-left:1em;} li {margin-top:3px; margin-left:24px; padding-left:0px;padding-bottom: 4px}</style>OVERALL STATS<ul><li>Total Names: 2</li>\n<li>Total Classes: 0</li>\n<li>Total Static Functions: 2</li>\n<li>Referenced Names: 2</li>\n<li>Referenced Classes: 0</li>\n<li>Referenced Functions: 2</li>\n</ul>ALL NAMES<ul>\n<li><a name=\"Function\">Function</a><ul></li></ul></li><li><a name=\"window\">window</a><ul></li></ul></li></ul></body></html>", string0); } @Test(timeout = 4000) public void test12() throws Throwable { Compiler compiler0 = new Compiler(); Node node0 = Node.newString(1941, ""); NameAnalyzer nameAnalyzer0 = new NameAnalyzer(compiler0, true); nameAnalyzer0.process(node0, node0); nameAnalyzer0.process(node0, node0); assertFalse(node0.isCast()); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
fb5a388fb4459b6e698a922ca36011fb9b5e89db
76875917925793ea446a1b1536606633a3272653
/evo-boot-webflux/src/main/java/com/tazine/evo/webflux/api/MonoApiDemo.java
db70b503036c416d84f25709d7fcb70990025545
[ "MIT" ]
permissive
BookFrank/EVO-World
01555355c434fac65406e158ffa5f7aebf3ff7dc
3d27ae414f0281668024838a4c64db4bdd4a6377
refs/heads/master
2022-06-22T05:56:43.648597
2020-05-05T15:44:32
2020-05-05T15:44:32
147,456,884
1
1
MIT
2022-06-21T02:58:35
2018-09-05T03:54:10
Java
UTF-8
Java
false
false
267
java
package com.tazine.evo.webflux.api; import reactor.core.publisher.Mono; /** * @author jiaer.ly * @date 2020/04/23 */ public class MonoApiDemo { public static void main(String[] args) { Mono.just("success").subscribe(System.out::println); } }
[ "bookfrank@foxmail.com" ]
bookfrank@foxmail.com
773643a11f3fdea88ed5f6a147033ef26111f826
881ec42c677f2d954fdc2317ad582c88fb87c752
/stsworkspace/DataTypes/src/com/skilldistillery/datatypes/labs/BitPrinter.java
4443f6f53ab65f91578aab59d14b4cea94e559cf
[]
no_license
stoprefresh/archive
f51119220fbcb4bccc82306c0483903502f1859e
0bde3917fb9cb7e002d3abb18088fee9df4371ec
refs/heads/master
2022-12-21T20:33:08.251833
2019-10-17T14:13:10
2019-10-17T14:13:10
215,808,299
0
0
null
2022-12-16T09:52:36
2019-10-17T14:08:48
Java
UTF-8
Java
false
false
1,508
java
package com.skilldistillery.datatypes.labs; public class BitPrinter { public static void main(String[] args) { BitPrinter bp = new BitPrinter(); System.out.println("3.14 is \t\t" + bp.getDataAsBits("3.14")); System.out.println("129 is \t\t" + bp.getDataAsBits("129")); } public String getDataAsBits(String input){ String output = null; if(input == null || input.isEmpty()){ return null; } try { output = getBits(Integer.parseInt(input)); } catch (NumberFormatException e) { try { output = getBits(Double.parseDouble(input)); } catch (NumberFormatException e1) { //must be a char output = getBits(input.charAt(0)); } } return output; } public String padZeroes(int length, String str){ return String.format("%"+length+"s", str).replace(" ", "0"); } private String getBits(int input){ String output = padZeroes(Integer.BYTES * 8, Integer.toBinaryString(input)); return output; } private String getBits(char input){ String output = null; String b = Integer.toBinaryString(input); if (b.length() < 16) { output = "00000000000000000".substring(0, 16 - b.length()).concat(b); } else { output = b.substring(b.length() - 16); } return output; } private String getBits(double input){ String output = padZeroes(Double.BYTES * 8, Long.toBinaryString(Double.doubleToRawLongBits(input))); return output; } }
[ "marsigliamiguel@protonmail.com" ]
marsigliamiguel@protonmail.com
e208f5c5a05d316c5a8e980d397acb498af8c495
aa23c80733abfdada3a4700a54234491baba1817
/project/hs-engine-history/src/main/java/com/neusoft/hs/domain/history/framework/HistoryArchiveExecution.java
855f3a76696ffce64a3ff559b213f72814ea228a
[]
no_license
lixiangqi-github/hospital
de9cf3ae2e8b1370debf256dd9e980cb6b6ec888
7bbb4e9a45f234d3c116c179ce83b302de3670bc
refs/heads/master
2021-05-16T03:59:50.958735
2017-09-30T09:14:46
2017-09-30T09:14:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package com.neusoft.hs.domain.history.framework; import com.neusoft.hs.platform.exception.HsException; public class HistoryArchiveExecution extends HsException { public HistoryArchiveExecution() { super(); } public HistoryArchiveExecution(String arg0, Object... params) { super(arg0, params); } public HistoryArchiveExecution(String arg0, Throwable arg1, Object... params) { super(arg0, arg1, params); } public HistoryArchiveExecution(Throwable arg0) { super(arg0); } }
[ "wangdg@neusoft.com" ]
wangdg@neusoft.com
6b5206cee27b49c6b03110c3f1f4a65c6bd6ff4c
e06ce4de4e7405195cef027a2786819799b79243
/src/main/java/za/co/sindi/jms/util/CloseUtils.java
461ad7bdc3fa54b220c75b0d4befea7010aa84ff
[ "Apache-2.0" ]
permissive
TheEliteGentleman/JMSManager
f143a6134db3d16b0a6de27a1d5fb22fb49776f7
5c9c440a7ed34e7e8b5b397b371252cd5dad1baa
refs/heads/master
2021-01-17T18:52:42.956795
2016-06-21T14:54:22
2016-06-21T14:54:22
61,641,945
0
0
null
null
null
null
UTF-8
Java
false
false
1,730
java
/** * */ package za.co.sindi.jms.util; import java.util.logging.Level; import java.util.logging.Logger; import javax.jms.Connection; import javax.jms.JMSException; import javax.jms.MessageConsumer; import javax.jms.MessageProducer; import javax.jms.Session; /** * @author Buhake Sindi * @since 03 July 2012 * */ public final class CloseUtils { private static final Logger logger = Logger.getLogger(CloseUtils.class.getName()); /** * Hidden for good reason. */ private CloseUtils() { //NOOP } public static void closeConnection(Connection connection) { if (connection != null) { try { connection.close(); } catch (JMSException e) { // TODO Auto-generated catch block logger.log(Level.WARNING, e.getLocalizedMessage(), e); } finally { connection = null; //Free resources. } } } public static void closeSession(Session session) { if (session != null) { try { session.close(); } catch (JMSException e) { // TODO Auto-generated catch block logger.log(Level.WARNING, e.getLocalizedMessage(), e); } finally { session = null; } } } public static void closeMessageProducer(MessageProducer producer) { if (producer != null) { try { producer.close(); } catch (JMSException e) { // TODO Auto-generated catch block logger.log(Level.WARNING, e.getLocalizedMessage(), e); } finally { producer = null; } } } public static void closeMessageConsumer(MessageConsumer consumer) { if (consumer != null) { try { consumer.close(); } catch (JMSException e) { // TODO Auto-generated catch block logger.log(Level.WARNING, e.getLocalizedMessage(), e); } finally { consumer = null; } } } }
[ "buhake.sindi@sgits.co.za" ]
buhake.sindi@sgits.co.za
7f622b4631a15ab2c11d0edd1cc86e47150f733b
25cfbbb243aef9514848b160b0e8d7ba31d44a7d
/src/main/java/com/tencentcloudapi/tke/v20180525/models/DescribePrometheusAgentsResponse.java
5be336d2b50fc755d4cc0315f947b114adf3c9f6
[ "Apache-2.0" ]
permissive
feixueck/tencentcloud-sdk-java
ceaf3c493eec493878c0373f5d07f6fe34fa5f7b
ebdfb9cf12ce7630f53b387e2ac8d17471c6c7d0
refs/heads/master
2021-08-17T15:37:34.198968
2021-01-08T01:30:26
2021-01-08T01:30:26
240,156,902
0
0
Apache-2.0
2021-01-08T02:57:29
2020-02-13T02:04:37
Java
UTF-8
Java
false
false
3,109
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.tke.v20180525.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class DescribePrometheusAgentsResponse extends AbstractModel{ /** * 被关联集群信息 */ @SerializedName("Agents") @Expose private PrometheusAgentOverview [] Agents; /** * 被关联集群总量 */ @SerializedName("Total") @Expose private Long Total; /** * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get 被关联集群信息 * @return Agents 被关联集群信息 */ public PrometheusAgentOverview [] getAgents() { return this.Agents; } /** * Set 被关联集群信息 * @param Agents 被关联集群信息 */ public void setAgents(PrometheusAgentOverview [] Agents) { this.Agents = Agents; } /** * Get 被关联集群总量 * @return Total 被关联集群总量 */ public Long getTotal() { return this.Total; } /** * Set 被关联集群总量 * @param Total 被关联集群总量 */ public void setTotal(Long Total) { this.Total = Total; } /** * Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public String getRequestId() { return this.RequestId; } /** * Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamArrayObj(map, prefix + "Agents.", this.Agents); this.setParamSimple(map, prefix + "Total", this.Total); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tenent.com" ]
tencentcloudapi@tenent.com
13f735099bb563a8ee1e28810e530774bfa6c4a8
5a13f24c35c34082492ef851fb91d404827b7ddb
/src/main/java/com/alipay/api/domain/KoubeiMarketingCampaignUserAssetQueryModel.java
2edc8387dc7ec1dc3d068646314630d4cf933aa3
[]
no_license
featherfly/alipay-sdk
69b2f2fc89a09996004b36373bd5512664521bfd
ba2355a05de358dc15855ffaab8e19acfa24a93b
refs/heads/master
2021-01-22T11:03:20.304528
2017-09-04T09:39:42
2017-09-04T09:39:42
102,344,436
1
0
null
null
null
null
UTF-8
Java
false
false
1,479
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 用户口碑优惠资产查询接口 * * @author auto create * @since 1.0, 2017-08-08 19:56:13 */ public class KoubeiMarketingCampaignUserAssetQueryModel extends AlipayObject { private static final long serialVersionUID = 5676318686889432144L; /** * 页码 */ @ApiField("page_num") private Long pageNum; /** * 每页显示数目(最大查询50) */ @ApiField("page_size") private Long pageSize; /** * 查询范围:用户所有资产(USER_ALL_ASSET),用户指定商户可用资产(USER_MERCHANT_ASSET),用户指定门店可用资产(USER_SHOP_ASSET);指定USER_SHOP_ASSET必须传递shopid */ @ApiField("scope") private String scope; /** * 门店id,如果查询范围是门店,门店id不能为空 */ @ApiField("shop_id") private String shopId; public Long getPageNum() { return this.pageNum; } public void setPageNum(Long pageNum) { this.pageNum = pageNum; } public Long getPageSize() { return this.pageSize; } public void setPageSize(Long pageSize) { this.pageSize = pageSize; } public String getScope() { return this.scope; } public void setScope(String scope) { this.scope = scope; } public String getShopId() { return this.shopId; } public void setShopId(String shopId) { this.shopId = shopId; } }
[ "zhongj@cdmhzx.com" ]
zhongj@cdmhzx.com
9aa8198cfd1bf8c646fb5916b1b2cdfbaad944f2
d33d2e0bb711a6178c54f766130ec15debf02aae
/java/com/project/ccs/postransaction/adjusment/JspAdjusmentItem.java
a02ad4a8f9a2f6287c6d0d654ad93004fc0d7f71
[]
no_license
devmanager-oxy/oxyapp_apotek
1f22cf87291b21b81fda32cf6a063ae0865883c7
89e770d4d06a74c611987f2a2537ad9d28ced84f
refs/heads/master
2022-12-26T10:52:22.400708
2020-10-12T00:55:23
2020-10-12T00:55:23
302,225,390
0
0
null
null
null
null
UTF-8
Java
false
false
2,642
java
package com.project.ccs.postransaction.adjusment; import javax.servlet.http.*; import com.project.util.jsp.*; public class JspAdjusmentItem extends JSPHandler implements I_JSPInterface, I_JSPType { private AdjusmentItem adjusmentItem; public static final String JSP_NAME_ADJUSMENTITEM = "JSP_NAME_ADJUSMENTITEM"; public static final int JSP_ADJUSMENT_ITEM_ID = 0; public static final int JSP_ADJUSMENT_ID = 1; public static final int JSP_ITEM_MASTER_ID = 2; public static final int JSP_QTY_SYSTEM = 3; public static final int JSP_QTY_REAL = 4; public static final int JSP_PRICE = 5; public static final int JSP_AMOUNT = 6; public static final int JSP_TYPE = 7; public static final int JSP_QTY_BALANCE = 8; public static String[] colNames = { "JSP_ADJUSMENT_ITEM_ID", "JSP_ADJUSMENT_ID", "JSP_ITEM_MASTER_ID", "JSP_QTY_SYSTEM", "JSP_QTY_REAL", "JSP_PRICE", "JSP_AMOUNT","JSP_TYPE","QTY_BALANCE" }; public static int[] fieldTypes = { TYPE_LONG, TYPE_LONG, TYPE_LONG, TYPE_FLOAT, TYPE_FLOAT, TYPE_FLOAT, TYPE_FLOAT, TYPE_INT, TYPE_FLOAT }; public JspAdjusmentItem() { } public JspAdjusmentItem(AdjusmentItem adjusmentItem) { this.adjusmentItem = adjusmentItem; } public JspAdjusmentItem(HttpServletRequest request, AdjusmentItem adjusmentItem) { super(new JspAdjusmentItem(adjusmentItem), request); this.adjusmentItem = adjusmentItem; } public String getFormName() { return JSP_NAME_ADJUSMENTITEM; } public int[] getFieldTypes() { return fieldTypes; } public String[] getFieldNames() { return colNames; } public int getFieldSize() { return colNames.length; } public AdjusmentItem getEntityObject() { return adjusmentItem; } public void requestEntityObject(AdjusmentItem adjusmentItem) { try { this.requestParam(); adjusmentItem.setAdjusmentId(getLong(JSP_ADJUSMENT_ID)); adjusmentItem.setItemMasterId(getLong(JSP_ITEM_MASTER_ID)); adjusmentItem.setQtyReal(getDouble(JSP_QTY_REAL)); adjusmentItem.setQtySystem(getDouble(JSP_QTY_SYSTEM)); adjusmentItem.setPrice(getDouble(JSP_PRICE)); adjusmentItem.setAmount(getDouble(JSP_AMOUNT)); adjusmentItem.setQtyBalance(getDouble(JSP_QTY_BALANCE)); adjusmentItem.setType(getInt(JSP_TYPE)); } catch (Exception e) { System.out.println("Error on requestEntityObject : " + e.toString()); } } }
[ "devmgr@oxysystem.com" ]
devmgr@oxysystem.com
1c9b53c57319a13674d9071e885dd806d6b722ba
69fc3bcd65ef7c35b99686cd7f5806789f5b8d80
/src/main/java/org/yx/http/HttpHolder.java
50ebf441283bd1aa24a639b934821ac0fa7d876e
[]
no_license
malachun/sumk
07ef29fcdf72de5d06830566cbe1c379d5360323
c77d3d6e1bd6c32c959d5bbc8833b262763d5eb1
refs/heads/master
2021-01-12T16:14:54.146118
2016-10-15T04:54:26
2016-10-15T04:54:26
71,958,950
2
0
null
2016-10-26T02:39:36
2016-10-26T02:39:36
null
UTF-8
Java
false
false
1,310
java
package org.yx.http; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; public class HttpHolder { private static Map<String, Class<?>> pojoMap = new ConcurrentHashMap<String, Class<?>>(); private static Map<String, HttpInfo> actMap = new ConcurrentHashMap<String, HttpInfo>(); /** * 根据方法的全名,获取参数列表 * * @param method * classFullName.method * @return null表示方法不存在,或者参数为空 */ public static Class<?> getArgType(String method) { String m = getArgClassName(method); return pojoMap.get(m); } private static String getArgClassName(String method) { int k = method.lastIndexOf("."); return method.substring(0, k) + "_" + method.substring(k + 1); } /** * 根据soaName获取MethodInfo * * @param method * @return */ public static HttpInfo getHttpInfo(String name) { return actMap.get(name); } public static void putActInfo(String name, HttpInfo actInfo) { actMap.putIfAbsent(name, actInfo); } public static Set<String> actSet() { return actMap.keySet(); } /** * 获取所有的http接口 * * @return */ public static String[] acts() { return actMap.keySet().toArray(new String[0]); } }
[ "Administrator@youxia" ]
Administrator@youxia
ff6e6ebee1affc9ae3f22e7f64972b30445893e6
11b9a30ada6672f428c8292937dec7ce9f35c71b
/src/main/java/com/sun/org/apache/xerces/internal/impl/validation/ValidationState.java
76a180e3eea7c8a4379d05f6b4bebf673c757bd0
[]
no_license
bogle-zhao/jdk8
5b0a3978526723b3952a0c5d7221a3686039910b
8a66f021a824acfb48962721a20d27553523350d
refs/heads/master
2022-12-13T10:44:17.426522
2020-09-27T13:37:00
2020-09-27T13:37:00
299,039,533
0
0
null
null
null
null
UTF-8
Java
false
false
7,337
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 2001, 2002,2004 The Apache Software Foundation. * * 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. * <p> *  版权所有2001,2002,2004 Apache软件基金会。 * *  根据Apache许可证2.0版("许可证")授权;您不能使用此文件,除非符合许可证。您可以通过获取许可证的副本 * *  http://www.apache.org/licenses/LICENSE-2.0 * *  除非适用法律要求或书面同意,否则根据许可证分发的软件按"原样"分发,不附带任何明示或暗示的担保或条件。请参阅管理许可证下的权限和限制的特定语言的许可证。 * */ package com.sun.org.apache.xerces.internal.impl.validation; import com.sun.org.apache.xerces.internal.util.SymbolTable; import com.sun.org.apache.xerces.internal.impl.dv.ValidationContext; import com.sun.org.apache.xerces.internal.xni.NamespaceContext; import java.util.ArrayList; import java.util.Locale; /** * Implementation of ValidationContext inteface. Used to establish an * environment for simple type validation. * * @xerces.internal * * <p> *  实现ValidationContext接口。用于建立简单类型验证的环境。 * *  @ xerces.internal * * * @author Elena Litani, IBM * @version $Id: ValidationState.java,v 1.7 2010-11-01 04:39:53 joehw Exp $ */ public class ValidationState implements ValidationContext { // // private data // private boolean fExtraChecking = true; private boolean fFacetChecking = true; private boolean fNormalize = true; private boolean fNamespaces = true; private EntityState fEntityState = null; private NamespaceContext fNamespaceContext = null; private SymbolTable fSymbolTable = null; private Locale fLocale = null; private ArrayList<String> fIdList; private ArrayList<String> fIdRefList; // // public methods // public void setExtraChecking(boolean newValue) { fExtraChecking = newValue; } public void setFacetChecking(boolean newValue) { fFacetChecking = newValue; } public void setNormalizationRequired (boolean newValue) { fNormalize = newValue; } public void setUsingNamespaces (boolean newValue) { fNamespaces = newValue; } public void setEntityState(EntityState state) { fEntityState = state; } public void setNamespaceSupport(NamespaceContext namespace) { fNamespaceContext = namespace; } public void setSymbolTable(SymbolTable sTable) { fSymbolTable = sTable; } /** * return null if all IDREF values have a corresponding ID value; * otherwise return the first IDREF value without a matching ID value. * <p> *  如果所有IDREF值都具有对应的ID值,则返回null;否则返回没有匹配ID值的第一个IDREF值。 * */ public String checkIDRefID () { if (fIdList == null) { if (fIdRefList != null) { return fIdRefList.get(0); } } if (fIdRefList != null) { String key; for (int i = 0; i < fIdRefList.size(); i++) { key = fIdRefList.get(i); if (!fIdList.contains(key)) { return key; } } } return null; } public void reset () { fExtraChecking = true; fFacetChecking = true; fNamespaces = true; fIdList = null; fIdRefList = null; fEntityState = null; fNamespaceContext = null; fSymbolTable = null; } /** * The same validation state can be used to validate more than one (schema) * validation roots. Entity/Namespace/Symbol are shared, but each validation * root needs its own id/idref tables. So we need this method to reset only * the two tables. * <p> *  相同的验证状态可以用于验证多个(模式)验证根。实体/命名空间/符号是共享的,但每个验证根需要自己的id / idref表。所以我们需要这个方法只重置两个表。 */ public void resetIDTables() { fIdList = null; fIdRefList = null; } // // implementation of ValidationContext methods // // whether to do extra id/idref/entity checking public boolean needExtraChecking() { return fExtraChecking; } // whether to validate against facets public boolean needFacetChecking() { return fFacetChecking; } public boolean needToNormalize (){ return fNormalize; } public boolean useNamespaces() { return fNamespaces; } // entity public boolean isEntityDeclared (String name) { if (fEntityState !=null) { return fEntityState.isEntityDeclared(getSymbol(name)); } return false; } public boolean isEntityUnparsed (String name) { if (fEntityState !=null) { return fEntityState.isEntityUnparsed(getSymbol(name)); } return false; } // id public boolean isIdDeclared(String name) { if (fIdList == null) return false; return fIdList.contains(name); } public void addId(String name) { if (fIdList == null) fIdList = new ArrayList(); fIdList.add(name); } // idref public void addIdRef(String name) { if (fIdRefList == null) fIdRefList = new ArrayList(); fIdRefList.add(name); } // get symbols public String getSymbol (String symbol) { if (fSymbolTable != null) return fSymbolTable.addSymbol(symbol); // if there is no symbol table, we return java-internalized string, // because symbol table strings are also java-internalzied. // this guarantees that the returned string from this method can be // compared by reference with other symbol table string. -SG return symbol.intern(); } // qname, notation public String getURI(String prefix) { if (fNamespaceContext !=null) { return fNamespaceContext.getURI(prefix); } return null; } // Locale public void setLocale(Locale locale) { fLocale = locale; } public Locale getLocale() { return fLocale; } }
[ "zhaobo@MacBook-Pro.local" ]
zhaobo@MacBook-Pro.local
9162cb9db80d9c45be7ee11e98563d685edd392b
26bb15d40208d378a58c2f8646e8d17e2520fc72
/java-basic/examples/bitcamp/java100/Test21/Ex8/Test21_8_My.java
ef6ddd8270f79a89617527dfeceb44c4f3de5306
[]
no_license
dazzul94/bitcamp
ee7dbd9a926befed5828ba4d4be4173fdcbf218e
6d0b1fd4d796203fcf0111b69251a7f58554ffaa
refs/heads/master
2021-09-11T08:24:31.944955
2018-04-06T07:43:57
2018-04-06T07:43:57
104,423,438
0
0
null
null
null
null
UTF-8
Java
false
false
2,566
java
// ## 키보드로부터 입력 받기 - 연습4 // - 다음과 같이 사용자로부터 이름, 이메일, 전화를 입력받아 출력하시오! // - 실행 예) // 이름? 홍길동 // 이메일? hong@test.com // 전화? 1111-1111 // 저장하시겠습니까?(y/n) y // 저장하였습니다. // 계속입력하시겠습니까?(y/n) y // 이름? 임꺽정 // 이메일? leem@test.com // 전화? 1111-1112 // 저장하시겠습니까?(y/n) y // 저장하였습니다. // 계속입력하시겠습니까?(y/n) y // 이름? 유관순 // 이메일? yoo@test.com // 전화? 1111-1113 // 저장하시겠습니까?(y/n) n // 저장 취소하였습니다. // 계속입력하시겠습니까?(y/n) y // 이름? 안중근 // 이메일? ahn@test.com // 전화? 1111-1114 // 저장하시겠습니까?(y/n) y // 저장하였습니다. // 계속입력하시겠습니까?(y/n) n // ------------------------------ // 홍길동 hong@test.com 1111-1111 // 임꺽정 leem@test.com 1111-1112 // 안중근 ahn@test.com 1111-1114 // > package bitcamp.java100.Test21.Ex8; import java.io.Console; import java.util.ArrayList; public class Test21_8_My { static class User { String name; String email; String number; String save; String contin; } public static void main(String[] args) { Console console = System.console(); if (console == null) { System.err.println("콘솔을 지원하지 않습니다"); System.exit(1); //JVM을 종료한다 } User user1 = new User(); User user2 = new User(); User user3 = new User(); User user4 = new User(); ArrayList<User> list = new ArrayList<>(); list.add(user1); list.add(user2); list.add(user3); list.add(user4); user1.name = console.readLine("이름? "); user1.email = console.readLine("이메일? "); user1.number = console.readLine("핸드폰번호? "); user1.save = console.readLine("저장하시겠습니까? (y/n) "); if (user1.save.equals("y")) { System.out.println("저장하였습니다"); } else if (user1.save.equals("n")) { System.out.println("저장 취소하였습니다"); list.remove(user1); } user1.contin = console.readLine("계속 입력하시겠습니까? (y/n) "); if (user1.contin.equals("n"))//->break; {} for(User a : list) { System.out.println(a); } } }
[ "dazzul@naver.com" ]
dazzul@naver.com
9a1be17f17d0476045382c08381bd70d8244b612
f9217add588cf1c67e5832d438124368f00b5c3b
/src/main/java/w/fujiko/util/common/sourcepath/ProductFilesDirectorySourcePath.java
622a5d2719c4c3d4050b0f3d5a1e50dd5e0dade8
[]
no_license
wekenche/winsgatePractice2
6150a7ce929863d0592f364bf4a249d399d52941
cd7a9f6ef0555c97da12f08b6909d1d65507ae6b
refs/heads/master
2020-04-21T16:14:24.218477
2019-02-08T06:36:26
2019-02-08T06:36:26
169,694,302
0
0
null
null
null
null
UTF-8
Java
false
false
472
java
package w.fujiko.util.common.sourcepath; public class ProductFilesDirectorySourcePath extends DefaultCustomerCompanyDocsDirectorySourcePath { private static final String DIRECTORY = "/home/storage/documents/product"; public ProductFilesDirectorySourcePath(String directory){ super(directory); } public ProductFilesDirectorySourcePath(){ super(DIRECTORY); } public static String getBasePath(){ return DIRECTORY; } }
[ "louiem@windsgate.com" ]
louiem@windsgate.com
3c6ea9fd11770d0278eabaf23ff18d4917083b0a
7df40f6ea2209b7d48979465fd8081ec2ad198cc
/TOOLS/server/com/wurmonline/server/questions/ChangeAppearanceQuestion.java
2ca652aa8237ce08c82d3473ebf0c65491bfbbbb
[ "IJG" ]
permissive
warchiefmarkus/WurmServerModLauncher-0.43
d513810045c7f9aebbf2ec3ee38fc94ccdadd6db
3e9d624577178cd4a5c159e8f61a1dd33d9463f6
refs/heads/master
2021-09-27T10:11:56.037815
2021-09-19T16:23:45
2021-09-19T16:23:45
252,689,028
0
0
null
2021-09-19T16:53:10
2020-04-03T09:33:50
Java
UTF-8
Java
false
false
6,791
java
/* */ package com.wurmonline.server.questions; /* */ /* */ import com.wurmonline.server.creatures.Creature; /* */ import com.wurmonline.server.items.Item; /* */ import com.wurmonline.server.players.Player; /* */ import java.io.IOException; /* */ import java.util.Properties; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public final class ChangeAppearanceQuestion /* */ extends Question /* */ { /* */ private Item mirror; /* */ private byte gender; /* */ /* */ public ChangeAppearanceQuestion(Creature aResponder, Item aItem) { /* 27 */ super(aResponder, "Golden Mirror", "This mirror allows you to change your gender and alter your appearance.", 51, aResponder.getWurmId()); /* 28 */ this.mirror = aItem; /* 29 */ this.gender = Byte.MAX_VALUE; /* */ } /* */ /* */ /* */ private void handleGenderChange() { /* 34 */ if (getResponder().getSex() != this.gender) { /* */ /* 36 */ Player player = (Player)getResponder(); /* */ /* */ try { /* 39 */ player.getSaveFile().setFace(0L); /* */ } /* 41 */ catch (IOException ex) { /* */ /* 43 */ player.getCommunicator().sendAlertServerMessage("Something went wrong changing your gender. You remain as you were.", (byte)3); /* 44 */ logger.warning("Error setting face for player " + player.getName() + ": " + ex.getMessage()); /* */ return; /* */ } /* 47 */ player.setVisible(false); /* 48 */ getResponder().setSex(this.gender, false); /* 49 */ if (player.getCurrentTile() != null) /* 50 */ player.getCurrentTile().setNewFace((Creature)player); /* 51 */ getResponder().setModelName("Human"); /* 52 */ player.setVisible(true); /* 53 */ getResponder().getCommunicator().sendNewFace(getResponder().getWurmId(), getResponder().getFace()); /* 54 */ getResponder().getCommunicator().sendSafeServerMessage("You feel a strange sensation as Vynora's power alters your body. You are now " + ((this.gender == 1) ? "female" : "male") + ".", (byte)2); /* */ } /* */ else { /* */ /* 58 */ getResponder().getCommunicator().sendSafeServerMessage("Your gender remains the same."); /* 59 */ } this.mirror.setAuxData((byte)1); /* 60 */ this.mirror.sendUpdate(); /* 61 */ getResponder().getCommunicator().sendSafeServerMessage("The mirror's glow diminishes slightly as some of the magic is used.", (byte)2); /* 62 */ getResponder().getCommunicator().sendCustomizeFace(getResponder().getFace(), this.mirror.getWurmId()); /* */ } /* */ /* */ /* */ private void sendConfirmation() { /* 67 */ if (this.mirror.getAuxData() == 1) /* */ return; /* 69 */ StringBuilder buf = new StringBuilder(); /* 70 */ buf.append(getBmlHeader()); /* 71 */ buf.append("harray{text{text=''}}text{type='bold';text='Are you sure? This mirror will not allow you to make this choice again.'}harray{text{text=''}}"); /* 72 */ if (this.gender == getResponder().getSex()) { /* 73 */ buf.append("radio{group='confirm';id='yes';text='Yes, I wish to remain " + ((this.gender == 1) ? "female" : "male") + "';}"); /* */ } else { /* 75 */ buf.append("radio{group='confirm';id='yes';text='Yes, I wish to become " + ((this.gender == 1) ? "female" : "male") + "';}"); /* 76 */ } buf.append("radio{group='confirm';id='no';text='No, I do not wish to make this decision now.'}"); /* 77 */ buf.append("harray{text{text=''}}"); /* 78 */ buf.append(createAnswerButton2("Next")); /* 79 */ getResponder().getCommunicator().sendBml(300, 250, true, true, buf.toString(), 200, 200, 200, this.title); /* */ } /* */ /* */ /* */ /* */ public void answer(Properties answers) { /* 85 */ if (this.mirror.getOwnerId() != getResponder().getWurmId()) { /* */ /* 87 */ getResponder().getCommunicator().sendAlertServerMessage("You are no longer in possession of this mirror.", (byte)3); /* */ return; /* */ } /* 90 */ if (answers.getProperty("confirm", "").equals("yes")) { /* 91 */ handleGenderChange(); /* 92 */ } else if (answers.getProperty("gender", "").equals("male") || answers.getProperty("gender", "").equals("female")) { /* */ /* 94 */ ChangeAppearanceQuestion question = new ChangeAppearanceQuestion(getResponder(), this.mirror); /* 95 */ if (answers.getProperty("gender").equals("male")) { /* 96 */ question.gender = 0; /* */ } else { /* 98 */ question.gender = 1; /* 99 */ } question.sendConfirmation(); /* */ } else { /* */ /* 102 */ getResponder().getCommunicator().sendSafeServerMessage("You put the mirror away, leaving your body as it was.", (byte)2); /* */ } /* */ } /* */ /* */ /* */ public void sendQuestion() { /* 108 */ if (this.mirror.getAuxData() == 1) /* */ return; /* 110 */ StringBuilder buf = new StringBuilder(); /* 111 */ buf.append(getBmlHeader()); /* 112 */ buf.append("harray{text{text=''}}text{text='Before you may change your appearance, you must choose to select a new gender or keep your current one.'}harray{text{text=''}}text{type='bold';text='What will your gender be?'}"); /* */ /* 114 */ buf.append(femaleOption()); /* 115 */ buf.append(maleOption()); /* 116 */ buf.append("harray{text{text=''}}"); /* 117 */ buf.append(createAnswerButton2("Next")); /* 118 */ getResponder().getCommunicator().sendBml(300, 250, true, true, buf.toString(), 200, 200, 200, this.title); /* */ } /* */ /* */ /* */ private final String maleOption() { /* 123 */ if (getResponder().getSex() == 0) /* 124 */ return "harray{text{text=''}radio{ group='gender'; id='male';text='Male (current)';selected='true'}}"; /* 125 */ return "harray{text{text=''}radio{ group='gender'; id='male';text='Male'}}"; /* */ } /* */ /* */ /* */ private final String femaleOption() { /* 130 */ if (getResponder().getSex() == 1) /* 131 */ return "harray{text{text=''}radio{ group='gender'; id='female';text='Female (current)';selected='true'}}"; /* 132 */ return "harray{text{text=''}radio{ group='gender'; id='female';text='Female'}}"; /* */ } /* */ } /* Location: C:\Users\leo\Desktop\server.jar!\com\wurmonline\server\questions\ChangeAppearanceQuestion.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "warchiefmarkus@gmail.com" ]
warchiefmarkus@gmail.com
e2175d5ab84cc3fa693109358acf1d1b0d138e1a
46123905f26ccee9f79d2c9bdb68a181e2cfe37f
/src/main/java/com/vilderlee/datastructure/dp/IsSubsequence.java
cbda1e072b5c910b2be045dbf94a736f71c71b4b
[ "Apache-2.0" ]
permissive
vilderlee/code
d5f1dbeb275d74e18acca4e3e6aba9b779f5bace
90b0c4471943fd0fbde6b8e43d1940cc070a9d88
refs/heads/master
2022-06-24T00:22:00.502572
2021-09-28T07:22:24
2021-09-28T07:22:24
164,537,647
0
0
Apache-2.0
2022-06-22T18:41:41
2019-01-08T02:17:36
Java
UTF-8
Java
false
false
1,494
java
package com.vilderlee.datastructure.dp; /** * 类说明: * <p> * 给定字符串 s 和 t ,判断 s 是否为 t 的子序列。 * <p> * 你可以认为 s 和 t 中仅包含英文小写字母。字符串 t 可能会很长(长度 ~= 500,000),而 s 是个短字符串(长度 <=100)。 * <p> * 字符串的一个子序列是原始字符串删除一些(也可以不删除)字符而不改变剩余字符相对位置形成的新字符串。 * (例如,"ace"是"abcde"的一个子序列,而"aec"不是)。 * <p> * 示例 1: * s = "abc", t = "ahbgdc" * <p> * 返回 true. * <p> * 示例 2: * s = "axc", t = "ahbgdc" * <p> * 返回 false. * * <pre> * Modify Information: * Author Date Description * ============ ============= ============================ * VilderLee 2020/1/21 Create this file * </pre> */ public class IsSubsequence { public boolean isSubsequence(String s, String t) { boolean[][] dp = new boolean[s.length() + 1][t.length() + 1]; dp[0][0] = true; for (int i = 0; i < t.length(); i++) { dp[0][i] = true; } for (int i = 1; i < s.length(); i++) { for (int j = i; j < t.length(); j++) { if (s.charAt(i)==s.charAt(j)){ dp[i][j] = dp[i-1][j-1]; }else { dp[i][j] = dp[i][j - 1]; } } } return dp[s.length()][t.length()]; } }
[ "1010434086@qq.com" ]
1010434086@qq.com
8e485fe7aaf6cb1096ae61cde5934932339a1494
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_026ce2a5ca2ba5aeb021eeb8d79010170046b602/DocumentManager/18_026ce2a5ca2ba5aeb021eeb8d79010170046b602_DocumentManager_s.java
7294d7e9ea116e1af8fe2f761aff7133c1c74898
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,704
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package gui; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.util.Scanner; import net.infonode.docking.*; import net.infonode.docking.util.*; /** * * @author John-Paul */ public class DocumentManager { int lastIndex; TabWindow Documents; StringViewMap Views = new StringViewMap(); /** * Manage documents. * @param views View map. * @param documents Document tab manager. */ public DocumentManager(StringViewMap views, TabWindow documents) { lastIndex = 0; Views = views; Documents = documents; } /** * Create a new document. */ public void New() { lastIndex++; String id = "document-" + lastIndex; Views.addView(id, new View("<new document>", null, new SchemeTextArea())); Documents.addTab(Views.getView(id)); Views.getView(id).getComponent().requestFocusInWindow(); } /** * Load a file. * @param file The file to load. * @return If the load worked. */ public boolean Load(File file) { lastIndex++; String id = "document-" + lastIndex; String filename = file.getName(); try { if (!file.exists()) file.createNewFile(); // Get the new content. Scanner scanner = new Scanner(file); StringBuilder content = new StringBuilder(); String NL = System.getProperty("line.separator"); while (scanner.hasNextLine()) { content.append(scanner.nextLine()); content.append(NL); } SchemeTextArea ss = new SchemeTextArea(content.toString()); ss.myFile = file; Views.addView(id, new View(filename, null, ss)); Documents.addTab(Views.getView(id)); Views.getView(id).getComponent().requestFocusInWindow(); return true; } catch(IOException ex) { ex.printStackTrace(); return false; } } /** * Set the file used by a view. (For Save As) * @param view The view to set. * @param file The file to associate with that view. */ public void SetFile(View view, File file) { if (Views.contains(view)) { SchemeTextArea ss = (SchemeTextArea) view.getComponent(); ss.myFile = file; view.setName(file.getName()); } } /** * Get the file from a view. * @param view The view to get. * @return The file. */ public File GetFile(View view) { if (Views.contains(view)) { SchemeTextArea ss = (SchemeTextArea) view.getComponent(); return ss.myFile; } return null; } /** * Check if the active view has a file. * * @param view The view to check. * @return True if it has a file already. */ public boolean HasFile(View view) { if (Views.contains(view)) { SchemeTextArea ss = (SchemeTextArea) view.getComponent(); return ss.myFile != null; } return false; } /** * Save the file contained in the given view. * * @param view The view to save. * @return If the save worked. */ public boolean Save(View view) { if (Views.contains(view)) { SchemeTextArea ss = (SchemeTextArea) view.getComponent(); if (ss.myFile == null) return false; try { Writer out = new OutputStreamWriter(new FileOutputStream(ss.myFile)); out.write(ss.getText()); out.flush(); out.close(); return true; } catch(FileNotFoundException ex) { return false; } catch(IOException ex) { return false; } } return false; } /** * Check if a view is empty. * @param view The view to check. * @return True/false. */ public boolean IsEmpty(View view) { return !Views.contains(view) || ((SchemeTextArea) view.getComponent()).getText().length() == 0; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
6a8461354b57cae2639c79ca506d76e7904262a9
80c64d3aadff0448746f776b2f8f18cbaa3b859a
/NoobCraft/src/net/minecraft/client/model/ModelLeashKnot.java
cfe51df6319b959477609d380ea71f7eb75553f1
[]
no_license
lee0xp/noobcraft
0df52908026a7a20d482b64669c6ac5401a30458
1b5074a8811e4b6236b8b1a4df2498e15c8f12a0
refs/heads/master
2021-01-23T12:20:47.369896
2015-05-04T13:23:34
2015-05-04T13:23:34
35,021,763
2
2
null
null
null
null
UTF-8
Java
false
false
1,906
java
package net.minecraft.client.model; import net.minecraft.entity.Entity; public class ModelLeashKnot extends ModelBase { public ModelRenderer field_110723_a; private static final String __OBFID = "CL_00000843"; public ModelLeashKnot() { this(0, 0, 32, 32); } public ModelLeashKnot(int p_i46365_1_, int p_i46365_2_, int p_i46365_3_, int p_i46365_4_) { this.textureWidth = p_i46365_3_; this.textureHeight = p_i46365_4_; this.field_110723_a = new ModelRenderer(this, p_i46365_1_, p_i46365_2_); this.field_110723_a.addBox(-3.0F, -6.0F, -3.0F, 6, 8, 6, 0.0F); this.field_110723_a.setRotationPoint(0.0F, 0.0F, 0.0F); } /** * Sets the models various rotation angles then renders the model. */ public void render(Entity p_78088_1_, float p_78088_2_, float p_78088_3_, float p_78088_4_, float p_78088_5_, float p_78088_6_, float p_78088_7_) { this.setRotationAngles(p_78088_2_, p_78088_3_, p_78088_4_, p_78088_5_, p_78088_6_, p_78088_7_, p_78088_1_); this.field_110723_a.render(p_78088_7_); } /** * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how * "far" arms and legs can swing at most. */ public void setRotationAngles(float p_78087_1_, float p_78087_2_, float p_78087_3_, float p_78087_4_, float p_78087_5_, float p_78087_6_, Entity p_78087_7_) { super.setRotationAngles(p_78087_1_, p_78087_2_, p_78087_3_, p_78087_4_, p_78087_5_, p_78087_6_, p_78087_7_); this.field_110723_a.rotateAngleY = p_78087_4_ / (180F / (float)Math.PI); this.field_110723_a.rotateAngleX = p_78087_5_ / (180F / (float)Math.PI); } }
[ "lee@lee0xp.de" ]
lee@lee0xp.de
db99375ebb6a833801202fb20b1c0cfb05de5f84
3f480d487f5e88acf6b64e1e424f64e2b0705d53
/net/minecraft/client/LoadingScreenRenderer.java
b8182b283439181670d31a9ea504b85d07f089d1
[]
no_license
a3535ed54a5ee6917a46cfa6c3f12679/bde748d8_obsifight_client_2016
2aecdb987054e44db89d6a7c101ace1bb047f003
cc65846780c262dc8568f1d18a14aac282439c66
refs/heads/master
2021-04-30T11:46:25.656946
2018-02-12T15:10:50
2018-02-12T15:10:50
121,261,090
0
0
null
null
null
null
UTF-8
Java
false
false
6,755
java
package net.minecraft.client; import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.shader.Framebuffer; import net.minecraft.util.IProgressUpdate; import net.minecraft.util.MinecraftError; import org.lwjgl.opengl.GL11; public class LoadingScreenRenderer implements IProgressUpdate { private String field_73727_a = ""; private Minecraft mc; private String currentlyDisplayedText = ""; private long field_73723_d = Minecraft.getSystemTime(); private boolean field_73724_e; private ScaledResolution field_146587_f; private Framebuffer field_146588_g; private static final String __OBFID = "CL_00000655"; public LoadingScreenRenderer(Minecraft p_i1017_1_) { this.mc = p_i1017_1_; this.field_146587_f = new ScaledResolution(p_i1017_1_, p_i1017_1_.displayWidth, p_i1017_1_.displayHeight); this.field_146588_g = new Framebuffer(p_i1017_1_.displayWidth, p_i1017_1_.displayHeight, false); this.field_146588_g.setFramebufferFilter(9728); } public void resetProgressAndMessage(String p_73721_1_) { this.field_73724_e = false; this.func_73722_d(p_73721_1_); } public void displayProgressMessage(String p_73720_1_) { this.field_73724_e = true; this.func_73722_d(p_73720_1_); } public void func_73722_d(String p_73722_1_) { this.currentlyDisplayedText = p_73722_1_; if(!this.mc.running) { if(!this.field_73724_e) { throw new MinecraftError(); } } else { GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); if(OpenGlHelper.isFramebufferEnabled()) { int var2 = this.field_146587_f.getScaleFactor(); GL11.glOrtho(0.0D, (double)(this.field_146587_f.getScaledWidth() * var2), (double)(this.field_146587_f.getScaledHeight() * var2), 0.0D, 100.0D, 300.0D); } else { ScaledResolution var3 = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); GL11.glOrtho(0.0D, var3.getScaledWidth_double(), var3.getScaledHeight_double(), 0.0D, 100.0D, 300.0D); } GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glTranslatef(0.0F, 0.0F, -200.0F); } } public void resetProgresAndWorkingMessage(String p_73719_1_) { if(!this.mc.running) { if(!this.field_73724_e) { throw new MinecraftError(); } } else { this.field_73723_d = 0L; this.field_73727_a = p_73719_1_; this.setLoadingProgress(-1); this.field_73723_d = 0L; } } public void setLoadingProgress(int p_73718_1_) { if(!this.mc.running) { if(!this.field_73724_e) { throw new MinecraftError(); } } else { long var2 = Minecraft.getSystemTime(); if(var2 - this.field_73723_d >= 100L) { this.field_73723_d = var2; ScaledResolution var4 = new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight); int var5 = var4.getScaleFactor(); int var6 = var4.getScaledWidth(); int var7 = var4.getScaledHeight(); if(OpenGlHelper.isFramebufferEnabled()) { this.field_146588_g.framebufferClear(); } else { GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT); } this.field_146588_g.bindFramebuffer(false); GL11.glMatrixMode(GL11.GL_PROJECTION); GL11.glLoadIdentity(); GL11.glOrtho(0.0D, var4.getScaledWidth_double(), var4.getScaledHeight_double(), 0.0D, 100.0D, 300.0D); GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GL11.glTranslatef(0.0F, 0.0F, -200.0F); if(!OpenGlHelper.isFramebufferEnabled()) { GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); } Tessellator var8 = Tessellator.instance; this.mc.getTextureManager().bindTexture(Gui.optionsBackground); float var9 = 32.0F; var8.startDrawingQuads(); var8.setColorOpaque_I(4210752); var8.addVertexWithUV(0.0D, (double)var7, 0.0D, 0.0D, (double)((float)var7 / var9)); var8.addVertexWithUV((double)var6, (double)var7, 0.0D, (double)((float)var6 / var9), (double)((float)var7 / var9)); var8.addVertexWithUV((double)var6, 0.0D, 0.0D, (double)((float)var6 / var9), 0.0D); var8.addVertexWithUV(0.0D, 0.0D, 0.0D, 0.0D, 0.0D); var8.draw(); if(p_73718_1_ >= 0) { byte var10 = 100; byte var11 = 2; int var12 = var6 / 2 - var10 / 2; int var13 = var7 / 2 + 16; GL11.glDisable(GL11.GL_TEXTURE_2D); var8.startDrawingQuads(); var8.setColorOpaque_I(8421504); var8.addVertex((double)var12, (double)var13, 0.0D); var8.addVertex((double)var12, (double)(var13 + var11), 0.0D); var8.addVertex((double)(var12 + var10), (double)(var13 + var11), 0.0D); var8.addVertex((double)(var12 + var10), (double)var13, 0.0D); var8.setColorOpaque_I(8454016); var8.addVertex((double)var12, (double)var13, 0.0D); var8.addVertex((double)var12, (double)(var13 + var11), 0.0D); var8.addVertex((double)(var12 + p_73718_1_), (double)(var13 + var11), 0.0D); var8.addVertex((double)(var12 + p_73718_1_), (double)var13, 0.0D); var8.draw(); GL11.glEnable(GL11.GL_TEXTURE_2D); } GL11.glEnable(GL11.GL_BLEND); OpenGlHelper.glBlendFunc(770, 771, 1, 0); this.mc.fontRenderer.drawStringWithShadow(this.currentlyDisplayedText, (var6 - this.mc.fontRenderer.getStringWidth(this.currentlyDisplayedText)) / 2, var7 / 2 - 4 - 16, 16777215); this.mc.fontRenderer.drawStringWithShadow(this.field_73727_a, (var6 - this.mc.fontRenderer.getStringWidth(this.field_73727_a)) / 2, var7 / 2 - 4 + 8, 16777215); this.field_146588_g.unbindFramebuffer(); if(OpenGlHelper.isFramebufferEnabled()) { this.field_146588_g.framebufferRender(var6 * var5, var7 * var5); } this.mc.func_147120_f(); try { Thread.yield(); } catch (Exception var14) { ; } } } } public void func_146586_a() {} }
[ "unknowlk@tuta.io" ]
unknowlk@tuta.io
57f14ad22da6fe4f8891a031cc1b40a4c9d5dd2e
f570108cb787f278b58fb090791047192c72ae34
/app/src/main/java/com/wensoft/ojeku/CustomLibrary/NonScrollGridView.java
4d2147e822482de5f7daaaaebe1bda45361da891
[]
no_license
pahlevikun/ojekita
e36111a0ff2feb4ec0ea8afe6e4214471eabc5a3
01b31ad0755ae0457cc4021351ca865121143f13
refs/heads/master
2021-03-27T11:33:53.047332
2017-04-19T14:06:23
2017-04-19T14:06:23
85,324,196
0
0
null
null
null
null
UTF-8
Java
false
false
1,266
java
package com.wensoft.ojeku.customlibrary; /** * Created by farhan on 4/2/17. */ import android.content.Context; import android.util.AttributeSet; import android.widget.GridView; public class NonScrollGridView extends GridView { public NonScrollGridView(Context context) { super(context); } public NonScrollGridView(Context context, AttributeSet attrs) { super(context, attrs); } public NonScrollGridView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int heightSpec; if (getLayoutParams().height == LayoutParams.WRAP_CONTENT) { // The great Android "hackatlon", the love, the magic. // The two leftmost bits in the height measure spec have // a special meaning, hence we can't use them to describe height. heightSpec = MeasureSpec.makeMeasureSpec( Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); } else { // Any other height should be respected as is. heightSpec = heightMeasureSpec; } super.onMeasure(widthMeasureSpec, heightSpec); } }
[ "pahlevi.kun@gmail.com" ]
pahlevi.kun@gmail.com
f1d7abc2c71d060e1fd264104df5c41f87cc11e2
a2188e295eea25ab083805896cf9cfce9351a539
/model/FHIRSubstanceStatus.java
57706ca36b444c2f1e56dcf68d580dc543edcbeb
[]
no_license
tkalatz/hl7_FHIR_entity_objects
f10f2b4cdeead51251c74a5aa0de408c8ec5931f
d9fd5b699be03fad71e6cf376620351f23f1025c
refs/heads/main
2023-02-23T06:30:37.743094
2021-01-10T18:03:23
2021-01-10T18:03:23
320,611,784
0
0
null
null
null
null
UTF-8
Java
false
false
1,861
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2020.12.11 at 03:47:56 PM EET // package org.hl7.fhir; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; /** * If the element is present, it must have either a @value, an @id, or extensions * * <p>Java class for FHIRSubstanceStatus complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="FHIRSubstanceStatus"> * &lt;complexContent> * &lt;extension base="{http://hl7.org/fhir}Element"> * &lt;attribute name="value" type="{http://hl7.org/fhir}FHIRSubstanceStatus-list" /> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "FHIRSubstanceStatus") public class FHIRSubstanceStatus extends Element { @XmlAttribute(name = "value") protected FHIRSubstanceStatusList value; /** * Gets the value of the value property. * * @return * possible object is * {@link FHIRSubstanceStatusList } * */ public FHIRSubstanceStatusList getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link FHIRSubstanceStatusList } * */ public void setValue(FHIRSubstanceStatusList value) { this.value = value; } }
[ "tkalatz@gmail.com" ]
tkalatz@gmail.com
91bfe630d6b68022550a337a086afbf03fb99fd1
724c5eda96935c04e35b00f60f31fd21f06d4750
/src/ru/progwards/java1_2/lessons/abstractnum/Pyramid.java
5a54b6c38509f123c5d7891809c45d6e41dae286
[]
no_license
Borislove/java1
4678befb4d61edc1cff1c107f0116639c10d0eeb
1731926600af4f771ab9a323f105d7cda951c4c7
refs/heads/master
2022-02-28T03:22:37.223989
2022-02-14T02:23:56
2022-02-14T02:23:56
226,931,612
3
1
null
2020-10-20T11:39:21
2019-12-09T17:42:34
Java
UTF-8
Java
false
false
620
java
package ru.progwards.java1_2.lessons.abstractnum; public class Pyramid extends Figure3D { public Pyramid(Number segment) { super(segment); } /*6 Реализовать класс Pyramid, переопределяющий метод public Number volume(), который будет возвращать объем пирамиды, с основанием квадрат, и высотой равной стороне квадрата по формуле Segment*Segment*Segment/3;*/ @Override public Number volume() { return ((segment.mul(segment.mul(segment)))); } }
[ "abirme@yandex.ru" ]
abirme@yandex.ru