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
e1ceb145f87fdf3054117694a45f9a48c03bf4d0
0e151996606e14ecac603ab8299d1b124c51c66f
/src/main/java/org/bian/dto/CRCreditRiskModelSpecificationCaptureOutputModel.java
895a1c327766f96c8bcbb86d19d2707ee5776fe4
[ "Apache-2.0" ]
permissive
bianapis/sd-credit-risk-models-v3
ecd2ee21e7509e33b2fa84a776bbfecba0bb00bc
799ae82b0e9c438199c8a912f4551ca8fde7d8b4
refs/heads/master
2022-12-27T13:06:53.982795
2020-10-04T14:56:47
2020-10-04T14:56:47
301,147,730
0
0
null
null
null
null
UTF-8
Java
false
false
6,890
java
package org.bian.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; /** * CRCreditRiskModelSpecificationCaptureOutputModel */ public class CRCreditRiskModelSpecificationCaptureOutputModel { private String creditRiskModelSpecificationParameterType = null; private String creditRiskModelSpecificationSelectedOption = null; private String creditRiskModelSpecificationVersion = null; private String creditRiskModelSpecificationStatus = null; private String creditRiskModelSpecificationUsageLog = null; private String creditRiskModelSpecificationFeedback = null; private String creditRiskModelSpecificationCaptureActionTaskReference = null; private Object creditRiskModelSpecificationCaptureActionTaskRecord = null; private String captureRecordReference = null; private Object captureResponseRecord = null; /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: A Classification value that distinguishes between designs according to the type of business services and/or aspect within Credit Risk Model Specification . Eg Product Design, Campaign Design, Risk Model Design etc. * @return creditRiskModelSpecificationParameterType **/ public String getCreditRiskModelSpecificationParameterType() { return creditRiskModelSpecificationParameterType; } public void setCreditRiskModelSpecificationParameterType(String creditRiskModelSpecificationParameterType) { this.creditRiskModelSpecificationParameterType = creditRiskModelSpecificationParameterType; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: A selected optional business service as subject matter of design * @return creditRiskModelSpecificationSelectedOption **/ public String getCreditRiskModelSpecificationSelectedOption() { return creditRiskModelSpecificationSelectedOption; } public void setCreditRiskModelSpecificationSelectedOption(String creditRiskModelSpecificationSelectedOption) { this.creditRiskModelSpecificationSelectedOption = creditRiskModelSpecificationSelectedOption; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The version of Credit Risk Model Specification * @return creditRiskModelSpecificationVersion **/ public String getCreditRiskModelSpecificationVersion() { return creditRiskModelSpecificationVersion; } public void setCreditRiskModelSpecificationVersion(String creditRiskModelSpecificationVersion) { this.creditRiskModelSpecificationVersion = creditRiskModelSpecificationVersion; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The status of Credit Risk Model Specification * @return creditRiskModelSpecificationStatus **/ public String getCreditRiskModelSpecificationStatus() { return creditRiskModelSpecificationStatus; } public void setCreditRiskModelSpecificationStatus(String creditRiskModelSpecificationStatus) { this.creditRiskModelSpecificationStatus = creditRiskModelSpecificationStatus; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Reference to the log of (usage) ativities/events of Credit Risk Model Specification * @return creditRiskModelSpecificationUsageLog **/ public String getCreditRiskModelSpecificationUsageLog() { return creditRiskModelSpecificationUsageLog; } public void setCreditRiskModelSpecificationUsageLog(String creditRiskModelSpecificationUsageLog) { this.creditRiskModelSpecificationUsageLog = creditRiskModelSpecificationUsageLog; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: Information about reactions to a design which is used as a basis for improvement for the Credit Risk Model Specification. * @return creditRiskModelSpecificationFeedback **/ public String getCreditRiskModelSpecificationFeedback() { return creditRiskModelSpecificationFeedback; } public void setCreditRiskModelSpecificationFeedback(String creditRiskModelSpecificationFeedback) { this.creditRiskModelSpecificationFeedback = creditRiskModelSpecificationFeedback; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to a Credit Risk Model Specification instance capture service call * @return creditRiskModelSpecificationCaptureActionTaskReference **/ public String getCreditRiskModelSpecificationCaptureActionTaskReference() { return creditRiskModelSpecificationCaptureActionTaskReference; } public void setCreditRiskModelSpecificationCaptureActionTaskReference(String creditRiskModelSpecificationCaptureActionTaskReference) { this.creditRiskModelSpecificationCaptureActionTaskReference = creditRiskModelSpecificationCaptureActionTaskReference; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: The capture service call consolidated processing record * @return creditRiskModelSpecificationCaptureActionTaskRecord **/ public Object getCreditRiskModelSpecificationCaptureActionTaskRecord() { return creditRiskModelSpecificationCaptureActionTaskRecord; } public void setCreditRiskModelSpecificationCaptureActionTaskRecord(Object creditRiskModelSpecificationCaptureActionTaskRecord) { this.creditRiskModelSpecificationCaptureActionTaskRecord = creditRiskModelSpecificationCaptureActionTaskRecord; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the structured input transaction/record * @return captureRecordReference **/ public String getCaptureRecordReference() { return captureRecordReference; } public void setCaptureRecordReference(String captureRecordReference) { this.captureRecordReference = captureRecordReference; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: Details of the capture action service response * @return captureResponseRecord **/ public Object getCaptureResponseRecord() { return captureResponseRecord; } public void setCaptureResponseRecord(Object captureResponseRecord) { this.captureResponseRecord = captureResponseRecord; } }
[ "spabandara@Virtusa.com" ]
spabandara@Virtusa.com
849873dccd138dacea04a6bd41d4b78a25aa04d9
0a375f0f32f84d688e5383fc316492702616f6fa
/src/ZOJ/Accepted/P1099_HTML.java
b5596e332b09086b473c1b55e9f347c373e5170d
[]
no_license
WesleyCastilho/onlinejudge_java
fef61c5740f40eeed13f9ecce45eacdd0c9009a0
1e35296f0121cd577664bfadd0bc4a142834ea1f
refs/heads/master
2023-08-13T19:21:07.875557
2021-09-28T18:53:01
2021-09-28T18:53:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,457
java
package ZOJ.Accepted; /** * @author Teerapat Phokhonwong * @Onlinejudge: ZOJ * @Problem: 1099 HTML * @Link: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=99 * @Timelimit: 2 Seconds * @Status: Accepted * @Submission: 2015-06-05 23:21:42 * @Runtime: 36 ms * @Solution: * @Note: */ import java.util.Scanner; public class P1099_HTML { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String hr = "--------------------------------------------------------------------------------"; boolean checkElement = false; String line = ""; String word = ""; while (sc.hasNext()) { word = sc.next(); line += " " + word; line = line.trim(); if (word.equals("<br>")) { System.out.println(); line = ""; checkElement = true; continue; } else if (word.equals("<hr>")) { System.out.println((checkElement ? hr : "\n" + hr)); line = ""; checkElement = true; continue; } else if (line.length() > 80) { System.out.print("\n" + word); line = word; } else { System.out.print((line.contains(" ") ? " " + word : word)); } checkElement = false; } System.out.println(); } }
[ "boombarm@gmail.com" ]
boombarm@gmail.com
25cf792889a00bf00c32760fbc195a8dd6a30eb4
c8688db388a2c5ac494447bac90d44b34fa4132c
/sources/com/google/android/gms/internal/ads/C2033in.java
81b195f48d246d5b521d920e41114f923f5324cc
[]
no_license
mred312/apk-source
98dacfda41848e508a0c9db2c395fec1ae33afa1
d3ca7c46cb8bf701703468ddc88f25ba4fb9d975
refs/heads/master
2023-03-06T05:53:50.863721
2021-02-23T13:34:20
2021-02-23T13:34:20
341,481,669
0
0
null
null
null
null
UTF-8
Java
false
false
1,147
java
package com.google.android.gms.internal.ads; import com.google.android.gms.ads.internal.zzp; import java.util.Map; import org.json.JSONObject; /* renamed from: com.google.android.gms.internal.ads.in */ /* compiled from: com.google.android.gms:play-services-ads@@19.5.0 */ final class C2033in implements zzame<zzcpi> { C2033in() { } public final /* synthetic */ JSONObject zzj(Object obj) { zzcpi zzcpi = (zzcpi) obj; JSONObject jSONObject = new JSONObject(); JSONObject jSONObject2 = new JSONObject(); JSONObject jSONObject3 = new JSONObject(); jSONObject2.put("base_url", zzcpi.zzgoh.zzvu()); jSONObject2.put("signals", zzcpi.zzgoi); jSONObject3.put("body", zzcpi.zzgok.f14675c); jSONObject3.put("headers", zzp.zzkq().zzj((Map<String, ?>) zzcpi.zzgok.f14674b)); jSONObject3.put("response_code", zzcpi.zzgok.f14673a); jSONObject3.put("latency", zzcpi.zzgok.f14676d); jSONObject.put("request", jSONObject2); jSONObject.put("response", jSONObject3); jSONObject.put("flags", zzcpi.zzgoh.zzvx()); return jSONObject; } }
[ "mred312@gmail.com" ]
mred312@gmail.com
614574dc9e3d7798b45bf8986eb561069825c4d0
bead5c9388e0d70156a08dfe86d48f52cb245502
/Learning_Thingkin_in_Java/chapter_6/c_6_2/c_6_2_2/Dinner.java
04e9b4b7a6319f5befb72232a4bd26fb8f9458b8
[]
no_license
LinZiYU1996/Learning-Java
bd96e2af798c09bc52a56bf21e13f5763bb7a63d
a0d9f538c9d373c3a93ccd890006ce0e5e1f2d5d
refs/heads/master
2020-11-28T22:22:56.135760
2020-05-03T01:24:57
2020-05-03T01:24:57
229,930,586
0
0
null
null
null
null
UTF-8
Java
false
false
652
java
package chapter_6.c_6_2.c_6_2_2; /** * @Author: Mr.Lin * @Description: * @Date: Create in 17:16 2019/12/26 */ public class Dinner { public static void main(String[] args) { Cookie x = new Cookie(); x.bite(); // 这里能用是因为在同一个包下 //! x.bite(); // Can’t access } // 您可以创建一个Cookie对象,因为它的构造函数是公共的,而类是公共的。 (好 // 稍后再看公共类的概念。)但是,bite()成员是 // 在Dinner.java中无法访问,因为bite()仅在包数字甜点中提供访问权限, // 因此编译器会阻止您使用它。 }
[ "2669093302@qq.com" ]
2669093302@qq.com
6923bc1ba6f5a809eece366af3780be19ea4b1e2
af3f299c46c3a5e1ecfbe72ab5b62fb5ead42f58
/src/main/java/com/hbase/dml/HBaseDML.java
8bedaa37ee7bb3b888fd8e1993aed95c9e280f4c
[]
no_license
fuxiaofengfu/hbase-learn
553214ff15bc64e9cbd95ac23e082ebccf7bbcd3
d68ba4484196c8bcacd63e0d842bbccd983f03c3
refs/heads/master
2021-05-13T21:45:05.047724
2018-01-17T01:48:25
2018-01-17T01:48:25
116,470,388
0
0
null
null
null
null
UTF-8
Java
false
false
1,488
java
package com.hbase.dml; import com.hbase.util.HBaseConnectionUtil; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.util.Bytes; import java.io.IOException; public class HBaseDML { public static boolean addColumn(String tableName,String familyName){ Connection connection = null; Admin admin = null; try { connection = HBaseConnectionUtil.getConnection(); admin = connection.getAdmin(); TableName tn = TableName.valueOf(tableName); if (!admin.tableExists(tn)) return false; HColumnDescriptor hColumnDescriptor = new HColumnDescriptor(familyName); admin.addColumn(tn,hColumnDescriptor); return true; } catch (IOException e) { e.printStackTrace(); }finally { HBaseConnectionUtil.close(connection,admin); } return false; } /** * 删除列 * @return */ public static boolean deleteColumn(String tableName,String family){ Connection connection = null; Admin admin = null; try { connection = HBaseConnectionUtil.getConnection(); admin = connection.getAdmin(); TableName tn = TableName.valueOf(tableName); if (!admin.tableExists(tn)) return true; admin.deleteColumn(tn, Bytes.toBytes(family)); return true; } catch (IOException e) { e.printStackTrace(); }finally { HBaseConnectionUtil.close(connection,admin); } return false; } }
[ "fuxiaofeng1107@163.com" ]
fuxiaofeng1107@163.com
c2eee80b9a697911008e4d32458bdaac97ae0099
9394ec36a35e33e7e63a679c1902beed30903001
/cSRC_PerCap/MinDues/Software/src/org/afscme/enterprise/codes/CategoryData.java
e396d7e64e5f3a99c0854916a3109c52e6c0403b
[]
no_license
mfengafscme/mDuesPerCap_new
a2256aeb2bf8c34d90b24b34cce93878320f7ec8
e8b4763cb1c50ce22881134b52d201197a08c9e5
refs/heads/master
2020-03-06T19:19:50.668199
2018-03-27T17:48:47
2018-03-27T17:48:47
127,025,416
0
0
null
null
null
null
UTF-8
Java
false
false
960
java
package org.afscme.enterprise.codes; import java.io.Serializable; /** * Represents a Code Type Category, e.g. Members */ public class CategoryData implements Serializable { /** * primary key */ protected Integer pk; /** * category name */ protected String name; /** Getter for property name. * @return Value of property name. */ public String getName() { return name; } /** Setter for property name. * @param name New value of property name. */ public void setName(String name) { this.name = name; } /** Getter for property pk. * @return Value of property pk. */ public Integer getPk() { return pk; } /** Setter for property pk. * @param pk New value of property pk. */ public void setPk(Integer pk) { this.pk = pk; } public String toString() { return "pk: " + pk + ", name: " + name; } }
[ "32712375+mfengafscme@users.noreply.github.com" ]
32712375+mfengafscme@users.noreply.github.com
3005c96e71ca91c56c7e3bd73165a5bc315f5ec4
f4e15ee34808877459d81fd601d6be03bdfb4a9d
/org/apache/http/protocol/ResponseServer.java
e410cab4f0012b26344f00eb5d452b5f9bfcbf65
[]
no_license
Lianite/wurm-server-reference
369081debfa72f44eafc6a080002c4a3970f8385
e4dd8701e4af13901268cf9a9fa206fcb5196ff0
refs/heads/master
2023-07-22T16:06:23.426163
2020-04-07T23:15:35
2020-04-07T23:15:35
253,933,452
0
0
null
null
null
null
UTF-8
Java
false
false
842
java
// // Decompiled by Procyon v0.5.30 // package org.apache.http.protocol; import java.io.IOException; import org.apache.http.HttpException; import org.apache.http.HttpResponse; import org.apache.http.annotation.Immutable; import org.apache.http.HttpResponseInterceptor; @Immutable public class ResponseServer implements HttpResponseInterceptor { public void process(final HttpResponse response, final HttpContext context) throws HttpException, IOException { if (response == null) { throw new IllegalArgumentException("HTTP request may not be null"); } if (!response.containsHeader("Server")) { final String s = (String)response.getParams().getParameter("http.origin-server"); if (s != null) { response.addHeader("Server", s); } } } }
[ "jdraco6@gmail.com" ]
jdraco6@gmail.com
eb76e86e0a4acccd4e9a679480938f4023a099aa
8f5d3d144cf98de0b0c535526eb65db0702d4ffc
/main/java/dqr/blocks/decorate/render/DqmTileEntityRenderHasiraueQ.java
cb92b9feaa1d51a115356621b4ee8f6402f332ac
[]
no_license
azelDqm/MC1.7.10_DQRmod
54c0790b80c11a8ae591f17d233adc95f1b7e41a
bfec0e17fcade9d4616ac29b5abcbb12aa562d2a
refs/heads/master
2020-04-16T02:26:44.596119
2020-04-06T08:58:47
2020-04-06T08:58:47
57,311,023
6
2
null
null
null
null
UTF-8
Java
false
false
1,498
java
package dqr.blocks.decorate.render; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dqr.blocks.decorate.model.DqmModelHasiraue; import dqr.blocks.decorate.tileEntity.DqmTileEntityHasiraueQ; @SideOnly(Side.CLIENT) public class DqmTileEntityRenderHasiraueQ extends TileEntitySpecialRenderer { private DqmModelHasiraue model = new DqmModelHasiraue(); public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8) { DqmTileEntityHasiraueQ var9 = (DqmTileEntityHasiraueQ)var1; GL11.glPushMatrix(); GL11.glTranslatef((float)var2 + 0.5F, (float)var4 + 1.5F, (float)var6 + 0.5F); GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); if (var9.getBlockMetadata() == 1) { GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); } if (var9.getBlockMetadata() == 2) { GL11.glRotatef(-180.0F, 0.0F, 1.0F, 0.0F); } if (var9.getBlockMetadata() == 3) { GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F); } this.bindTexture(new ResourceLocation("dqr:textures/model/HasiraQ.png")); GL11.glPushMatrix(); this.model.modelRender(0.0625F); GL11.glPopMatrix(); GL11.glPopMatrix(); } }
[ "azel.dqm@gmail.com" ]
azel.dqm@gmail.com
bbd30cd9c83e653946b4bb11f92bc733cdaa55a7
fec4a09f54f4a1e60e565ff833523efc4cc6765a
/Dependencies/work/decompile-00fabbe5/net/minecraft/world/entity/ai/goal/PathfinderGoalWrapped.java
38b08ed4106b9ed135fa454f3f50fdc43de75272
[]
no_license
DefiantBurger/SkyblockItems
012d2082ae3ea43b104ac4f5bf9eeb509889ec47
b849b99bd4dc52ae2f7144ddee9cbe2fd1e6bf03
refs/heads/master
2023-06-23T17:08:45.610270
2021-07-27T03:27:28
2021-07-27T03:27:28
389,780,883
0
0
null
null
null
null
UTF-8
Java
false
false
1,830
java
package net.minecraft.world.entity.ai.goal; import java.util.EnumSet; import javax.annotation.Nullable; public class PathfinderGoalWrapped extends PathfinderGoal { private final PathfinderGoal goal; private final int priority; private boolean isRunning; public PathfinderGoalWrapped(int i, PathfinderGoal pathfindergoal) { this.priority = i; this.goal = pathfindergoal; } public boolean a(PathfinderGoalWrapped pathfindergoalwrapped) { return this.C_() && pathfindergoalwrapped.h() < this.h(); } @Override public boolean a() { return this.goal.a(); } @Override public boolean b() { return this.goal.b(); } @Override public boolean C_() { return this.goal.C_(); } @Override public void c() { if (!this.isRunning) { this.isRunning = true; this.goal.c(); } } @Override public void d() { if (this.isRunning) { this.isRunning = false; this.goal.d(); } } @Override public void e() { this.goal.e(); } @Override public void a(EnumSet<PathfinderGoal.Type> enumset) { this.goal.a(enumset); } @Override public EnumSet<PathfinderGoal.Type> i() { return this.goal.i(); } public boolean g() { return this.isRunning; } public int h() { return this.priority; } public PathfinderGoal j() { return this.goal; } public boolean equals(@Nullable Object object) { return this == object ? true : (object != null && this.getClass() == object.getClass() ? this.goal.equals(((PathfinderGoalWrapped) object).goal) : false); } public int hashCode() { return this.goal.hashCode(); } }
[ "joseph.cicalese@gmail.com" ]
joseph.cicalese@gmail.com
eabaff64248b4e0f68cc23819edb82974b89c86b
13cbb329807224bd736ff0ac38fd731eb6739389
/com/sun/xml/internal/bind/v2/runtime/Name.java
ed9340141a5cf7f6a2c67a3a8fb22865b95399f2
[]
no_license
ZhipingLi/rt-source
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
refs/heads/master
2023-07-14T15:00:33.100256
2021-09-01T04:49:04
2021-09-01T04:49:04
401,933,858
0
0
null
null
null
null
UTF-8
Java
false
false
1,401
java
package com.sun.xml.internal.bind.v2.runtime; import javax.xml.namespace.QName; public final class Name extends Object implements Comparable<Name> { public final String nsUri; public final String localName; public final short nsUriIndex; public final short localNameIndex; public final short qNameIndex; public final boolean isAttribute; Name(int paramInt1, int paramInt2, String paramString1, int paramInt3, String paramString2, boolean paramBoolean) { this.qNameIndex = (short)paramInt1; this.nsUri = paramString1; this.localName = paramString2; this.nsUriIndex = (short)paramInt2; this.localNameIndex = (short)paramInt3; this.isAttribute = paramBoolean; } public String toString() { return '{' + this.nsUri + '}' + this.localName; } public QName toQName() { return new QName(this.nsUri, this.localName); } public boolean equals(String paramString1, String paramString2) { return (paramString2.equals(this.localName) && paramString1.equals(this.nsUri)); } public int compareTo(Name paramName) { int i = this.nsUri.compareTo(paramName.nsUri); return (i != 0) ? i : this.localName.compareTo(paramName.localName); } } /* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\com\sun\xml\internal\bind\v2\runtime\Name.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.0.7 */
[ "michael__lee@yeah.net" ]
michael__lee@yeah.net
5ad97225800309f8c80eb3e0ebf2e756394f2a6a
f1cb0ba1a39ee8f1f96e8385119d3a182105e4a6
/impl/v1_19_R2/src/main/java/de/derfrzocker/feature/impl/v1_19_R2/value/heightmap/HeightmapType.java
744b1364fbd5c3b606ea9f54ca64de6f132bec81
[ "MIT" ]
permissive
DerFrZocker/Ore-Control
70dd8c130d3f0db6aedf61c42e60f37f757427ed
f30f636033fe4147eee96c0b645c7724868f99e1
refs/heads/main
2023-08-31T01:34:50.808982
2023-08-24T10:16:57
2023-08-24T10:16:57
194,907,949
19
13
MIT
2023-08-24T10:16:59
2019-07-02T17:33:56
Java
UTF-8
Java
false
false
1,425
java
/* * MIT License * * Copyright (c) 2019 - 2022 Marvin (DerFrZocker) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * */ package de.derfrzocker.feature.impl.v1_19_R2.value.heightmap; import de.derfrzocker.feature.api.ValueType; import net.minecraft.world.level.levelgen.Heightmap; public abstract class HeightmapType implements ValueType<HeightmapValue, HeightmapType, Heightmap.Types> { }
[ "derrieple@gmail.com" ]
derrieple@gmail.com
39fed7c7e310ce486b61d3a65248f4fa175be9a5
a840a5e110b71b728da5801f1f3e591f6128f30e
/src/main/java/com/google/security/zynamics/binnavi/Gui/CriteriaDialog/Conditions/Selection/CSelectionCriteriumPanel.java
ca19aefcad4a3a8e8b1796ac9422265384498c78
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
tpltnt/binnavi
0a25d2fde2c6029aeef4fcfec8eead5c8e51f4b4
598c361d618b2ca964d8eb319a686846ecc43314
refs/heads/master
2022-10-20T19:38:30.080808
2022-07-20T13:01:37
2022-07-20T13:01:37
107,143,332
0
0
Apache-2.0
2023-08-20T11:22:53
2017-10-16T15:02:35
Java
UTF-8
Java
false
false
3,042
java
/* Copyright 2011-2016 Google Inc. 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.google.security.zynamics.binnavi.Gui.CriteriaDialog.Conditions.Selection; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JComboBox; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.border.TitledBorder; /** * Panel shown in the criteria dialog when Selection state criteria nodes are selected. */ public final class CSelectionCriteriumPanel extends JPanel { /** * The criterium edited in this panel. */ private final CSelectionCriterium m_criterium; /** * Allows the user to select the selection state. */ private final JComboBox<SelectionState> selectionStateBox = new JComboBox<SelectionState>(); /** * Updates the GUI on user input. */ private final InternalComboboxListener selectionStateBoxListener = new InternalComboboxListener(); /** * Creates a new panel object. * * @param criterium The criterium edited in this panel. */ public CSelectionCriteriumPanel(final CSelectionCriterium criterium) { super(new BorderLayout()); m_criterium = criterium; selectionStateBox.addActionListener(selectionStateBoxListener); initPanel(); } /** * Creates the GUI of the panel. */ private void initPanel() { final JPanel mainPanel = new JPanel(new BorderLayout()); mainPanel.setBorder(new TitledBorder("Edit Selection Condition")); final JPanel comboPanel = new JPanel(new BorderLayout()); comboPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); selectionStateBox.addItem(SelectionState.SELECTED); selectionStateBox.addItem(SelectionState.UNSELECTED); comboPanel.add(selectionStateBox, BorderLayout.CENTER); mainPanel.add(comboPanel, BorderLayout.NORTH); add(mainPanel, BorderLayout.CENTER); } /** * Frees allocated resources. */ public void dispose() { selectionStateBox.removeActionListener(selectionStateBoxListener); } /** * Returns the selection state selected by the user. * * @return The selection state selected by the user. */ public SelectionState getSelectionState() { return (SelectionState) selectionStateBox.getSelectedItem(); } /** * Updates the GUI on user input. */ private class InternalComboboxListener implements ActionListener { @Override public void actionPerformed(final ActionEvent event) { m_criterium.notifyListeners(); } } }
[ "cblichmann@google.com" ]
cblichmann@google.com
8ce968951a4830956ae966c0f608b99a5ba81afd
c53797052bd953a7efa9a84a4e876eecedbd6913
/java-advance-effective-java/src/main/java/name/fw/effectivejava/examples/chapter02/item06/Stack.java
215cce792ee4e98eeb3df21fb2aa400802d8e61e
[]
no_license
katlog/TestJava
30519bdb172f3d907ccec1a6a6ef220c901f931f
4e6ed17f1d67418ae2b9bb351b85f0b3ee8f89a9
refs/heads/master
2022-12-26T16:58:06.675341
2022-02-13T18:43:57
2022-02-13T18:43:57
158,736,284
3
1
null
2022-12-14T20:30:04
2018-11-22T18:13:38
Java
UTF-8
Java
false
false
758
java
// Can you spot the "memory leak"? package name.fw.effectivejava.examples.chapter02.item06; import java.util.Arrays; public class Stack { private Object[] elements; private int size = 0; private static final int DEFAULT_INITIAL_CAPACITY = 16; public Stack() { elements = new Object[DEFAULT_INITIAL_CAPACITY]; } public void push(Object e) { ensureCapacity(); elements[size++] = e; } public Object pop() { if (size == 0) throw new EmptyStackException(); return elements[--size]; } /** * Ensure space for at least one more element, roughly doubling the capacity * each time the array needs to grow. */ private void ensureCapacity() { if (elements.length == size) elements = Arrays.copyOf(elements, 2 * size + 1); } }
[ "1375049265@qq.com" ]
1375049265@qq.com
46aa85eca8e552cec8d4305eef3a76400dde634a
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app49/source/com/google/android/gms/drive/internal/n.java
e4c16abcf9f8412d5e5436c71ea5cbfb8e01bc69
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
719
java
package com.google.android.gms.drive.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.c; public final class n implements Parcelable.Creator<OnChangesResponse> { public n() {} static void a(OnChangesResponse paramOnChangesResponse, Parcel paramParcel, int paramInt) { int i = c.a(paramParcel); c.a(paramParcel, 1, paramOnChangesResponse.a); c.a(paramParcel, 2, paramOnChangesResponse.b, paramInt, false); c.b(paramParcel, 3, paramOnChangesResponse.c, false); c.a(paramParcel, 4, paramOnChangesResponse.d, paramInt, false); c.a(paramParcel, 5, paramOnChangesResponse.e); c.a(paramParcel, i); } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
048db784d9c0491a2d87a616cd525ea615ece955
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Shopkick_com.shopkick.app/javafiles/com/crashlytics/android/core/CrashlyticsCore$Builder.java
e7ba68384242afb0e4d0f89c0f7c551715942fd9
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
6,436
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.crashlytics.android.core; // Referenced classes of package com.crashlytics.android.core: // CrashlyticsCore, CrashlyticsListener, PinningInfoProvider public static class CrashlyticsCore$Builder { public CrashlyticsCore build() { if(delay < 0.0F) //* 0 0:aload_0 //* 1 1:getfield #22 <Field float delay> //* 2 4:fconst_0 //* 3 5:fcmpg //* 4 6:ifge 14 delay = 1.0F; // 5 9:aload_0 // 6 10:fconst_1 // 7 11:putfield #22 <Field float delay> return new CrashlyticsCore(delay, listener, pinningInfoProvider, disabled); // 8 14:new #6 <Class CrashlyticsCore> // 9 17:dup // 10 18:aload_0 // 11 19:getfield #22 <Field float delay> // 12 22:aload_0 // 13 23:getfield #29 <Field CrashlyticsListener listener> // 14 26:aload_0 // 15 27:getfield #31 <Field PinningInfoProvider pinningInfoProvider> // 16 30:aload_0 // 17 31:getfield #24 <Field boolean disabled> // 18 34:invokespecial #34 <Method void CrashlyticsCore(float, CrashlyticsListener, PinningInfoProvider, boolean)> // 19 37:areturn } public CrashlyticsCore$Builder delay(float f) { if(f > 0.0F) //* 0 0:fload_1 //* 1 1:fconst_0 //* 2 2:fcmpg //* 3 3:ifle 32 { if(delay <= 0.0F) //* 4 6:aload_0 //* 5 7:getfield #22 <Field float delay> //* 6 10:fconst_0 //* 7 11:fcmpl //* 8 12:ifgt 22 { delay = f; // 9 15:aload_0 // 10 16:fload_1 // 11 17:putfield #22 <Field float delay> return this; // 12 20:aload_0 // 13 21:areturn } else { throw new IllegalStateException("delay already set."); // 14 22:new #37 <Class IllegalStateException> // 15 25:dup // 16 26:ldc1 #39 <String "delay already set."> // 17 28:invokespecial #42 <Method void IllegalStateException(String)> // 18 31:athrow } } else { throw new IllegalArgumentException("delay must be greater than 0"); // 19 32:new #44 <Class IllegalArgumentException> // 20 35:dup // 21 36:ldc1 #46 <String "delay must be greater than 0"> // 22 38:invokespecial #47 <Method void IllegalArgumentException(String)> // 23 41:athrow } } public CrashlyticsCore$Builder disabled(boolean flag) { disabled = flag; // 0 0:aload_0 // 1 1:iload_1 // 2 2:putfield #24 <Field boolean disabled> return this; // 3 5:aload_0 // 4 6:areturn } public CrashlyticsCore$Builder listener(CrashlyticsListener crashlyticslistener) { if(crashlyticslistener != null) //* 0 0:aload_1 //* 1 1:ifnull 28 { if(listener == null) //* 2 4:aload_0 //* 3 5:getfield #29 <Field CrashlyticsListener listener> //* 4 8:ifnonnull 18 { listener = crashlyticslistener; // 5 11:aload_0 // 6 12:aload_1 // 7 13:putfield #29 <Field CrashlyticsListener listener> return this; // 8 16:aload_0 // 9 17:areturn } else { throw new IllegalStateException("listener already set."); // 10 18:new #37 <Class IllegalStateException> // 11 21:dup // 12 22:ldc1 #51 <String "listener already set."> // 13 24:invokespecial #42 <Method void IllegalStateException(String)> // 14 27:athrow } } else { throw new IllegalArgumentException("listener must not be null."); // 15 28:new #44 <Class IllegalArgumentException> // 16 31:dup // 17 32:ldc1 #53 <String "listener must not be null."> // 18 34:invokespecial #47 <Method void IllegalArgumentException(String)> // 19 37:athrow } } public CrashlyticsCore$Builder pinningInfo(PinningInfoProvider pinninginfoprovider) { if(pinninginfoprovider != null) //* 0 0:aload_1 //* 1 1:ifnull 28 { if(pinningInfoProvider == null) //* 2 4:aload_0 //* 3 5:getfield #31 <Field PinningInfoProvider pinningInfoProvider> //* 4 8:ifnonnull 18 { pinningInfoProvider = pinninginfoprovider; // 5 11:aload_0 // 6 12:aload_1 // 7 13:putfield #31 <Field PinningInfoProvider pinningInfoProvider> return this; // 8 16:aload_0 // 9 17:areturn } else { throw new IllegalStateException("pinningInfoProvider already set."); // 10 18:new #37 <Class IllegalStateException> // 11 21:dup // 12 22:ldc1 #58 <String "pinningInfoProvider already set."> // 13 24:invokespecial #42 <Method void IllegalStateException(String)> // 14 27:athrow } } else { throw new IllegalArgumentException("pinningInfoProvider must not be null."); // 15 28:new #44 <Class IllegalArgumentException> // 16 31:dup // 17 32:ldc1 #60 <String "pinningInfoProvider must not be null."> // 18 34:invokespecial #47 <Method void IllegalArgumentException(String)> // 19 37:athrow } } private float delay; private boolean disabled; private CrashlyticsListener listener; private PinningInfoProvider pinningInfoProvider; public CrashlyticsCore$Builder() { // 0 0:aload_0 // 1 1:invokespecial #19 <Method void Object()> delay = -1F; // 2 4:aload_0 // 3 5:ldc1 #20 <Float -1F> // 4 7:putfield #22 <Field float delay> disabled = false; // 5 10:aload_0 // 6 11:iconst_0 // 7 12:putfield #24 <Field boolean disabled> // 8 15:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
0145cc07506e7ddc304ab110f92f32c2c4a04aaa
27511a2f9b0abe76e3fcef6d70e66647dd15da96
/src/com/instagram/creation/photo/crop/v.java
856d42da8090c7b1ff4faaf057ce445649e35839
[]
no_license
biaolv/com.instagram.android
7edde43d5a909ae2563cf104acfc6891f2a39ebe
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
refs/heads/master
2022-05-09T15:05:05.412227
2016-07-21T03:48:36
2016-07-21T03:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
package com.instagram.creation.photo.crop; public abstract interface v { public abstract void a(CropImageView paramCropImageView); public abstract void a(boolean paramBoolean); public abstract void b(CropImageView paramCropImageView); } /* Location: * Qualified Name: com.instagram.creation.photo.crop.v * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
8d771de4b1aa58a5ab98b4eba07093946979e8b3
92225460ebca1bb6a594d77b6559b3629b7a94fa
/src/com/kingdee/eas/fdc/sellhouse/app/AbstractCompensateSchemeEditUIHandler.java
89bde3c8058014d791363f507773e45ac31f31e9
[]
no_license
yangfan0725/sd
45182d34575381be3bbdd55f3f68854a6900a362
39ebad6e2eb76286d551a9e21967f3f5dc4880da
refs/heads/master
2023-04-29T01:56:43.770005
2023-04-24T05:41:13
2023-04-24T05:41:13
512,073,641
0
1
null
null
null
null
UTF-8
Java
false
false
383
java
/** * output package name */ package com.kingdee.eas.fdc.sellhouse.app; import com.kingdee.bos.Context; import com.kingdee.eas.framework.batchHandler.RequestContext; import com.kingdee.eas.framework.batchHandler.ResponseContext; /** * output class name */ public abstract class AbstractCompensateSchemeEditUIHandler extends com.kingdee.eas.framework.app.BillEditUIHandler { }
[ "yfsmile@qq.com" ]
yfsmile@qq.com
965fc01be38b3547f61783b5f1f213477bb91bda
71c4e3fe1217d49194a4332fed7069ecf990b378
/src/main/java/ru/elcoder/leetcode/MeetingRoomsSolution.java
42cec2c210c0386a0f26870cee3dd17598bece8a
[]
no_license
xuthus/leetcode-java
610c8957927d99a3d38bea4c98506405e615a9c0
7aa359b3145c15acb4a7a33c63d41b111ed5adbf
refs/heads/master
2023-01-23T07:21:53.271172
2023-01-16T06:57:54
2023-01-16T06:57:54
90,063,882
1
0
null
2021-04-02T04:34:33
2017-05-02T18:13:37
Java
UTF-8
Java
false
false
743
java
package ru.elcoder.leetcode; import ru.elcoder.leetcode.models.DifficultyLevel; import ru.elcoder.leetcode.models.Leetcode; import java.util.Arrays; import java.util.Comparator; @Leetcode( difficulty = DifficultyLevel.Easy, number = 252, title = "Meeting Rooms", url = "https://leetcode.com/problems/meeting-rooms/" ) public class MeetingRoomsSolution { public boolean canAttendMeetings(int[][] intervals) { if (intervals.length < 2) return true; Arrays.sort(intervals, Comparator.comparingInt(i -> i[0])); for (int i = 0; i < intervals.length - 1; i++) if (intervals[i][1] > intervals[i + 1][0]) return false; return true; } }
[ "xuthus@yandex.ru" ]
xuthus@yandex.ru
a0a63c662d22c855c847f79a85a2353e9703f5de
896683aaf6dd5d4c092175a2141a0f15404fcd38
/JavaPracticeGit/src/thread/chapter3/s2/section5/ThreadAJoin.java
afec2f79420a43a0335470be5dbc7de232c11c98
[]
no_license
WoodZzzzz/java
3d776d35ff81f681c8a2d63c78a816de976b560e
26d68157636a0c51303eb6417fce0f932d97a4f9
refs/heads/master
2020-03-08T07:25:03.830889
2018-08-31T10:59:26
2018-08-31T10:59:26
127,993,812
1
0
null
null
null
null
UTF-8
Java
false
false
595
java
package thread.chapter3.s2.section5; public class ThreadAJoin extends Thread { private ThreadB b; public ThreadAJoin(ThreadB b) { this.b = b; } public void run() { try { synchronized (b) { b.start(); b.join(); Thread.sleep(10000); } } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void main(String[] args) throws InterruptedException { ThreadB b = new ThreadB(); ThreadAJoin a = new ThreadAJoin(b); a.start(); Thread.sleep(1000); ThreadC c = new ThreadC(b); c.start(); } }
[ "772005736@qq.com" ]
772005736@qq.com
4809b7d6fc5655c1bb0093a6c92ec10053d13ff3
65cb301ea7faccd978b3bec8224e9f8ba079f1c4
/jstarcraft-core-common/src/test/java/com/jstarcraft/core/common/instant/LunarDateTestCase.java
be52433eaaee1f0fa2f78414fb8bad703a94108b
[ "Apache-2.0" ]
permissive
talen0702/jstarcraft-core
4ee9fa53b36b6b0f48a0e81f102ac89a11dea061
4a403deec72817aad224bad55d431fd596e80fbe
refs/heads/master
2020-09-21T09:37:17.422860
2020-04-30T02:08:18
2020-04-30T02:08:18
224,755,857
0
0
Apache-2.0
2020-04-30T02:08:20
2019-11-29T01:38:54
null
UTF-8
Java
false
false
2,077
java
package com.jstarcraft.core.common.instant; import java.time.LocalDate; import org.junit.Assert; import org.junit.Test; public class LunarDateTestCase { @Test public void testLeap() { LunarDate.getDaySize(1900, true, 8); try { LunarDate.getDaySize(2010, true, 8); Assert.fail(); } catch (IllegalArgumentException exception) { } } @Test public void testGetDaySize() { Assert.assertEquals(30, LunarDate.getDaySize(2010, false, 1)); Assert.assertEquals(29, LunarDate.getDaySize(2010, false, 2)); Assert.assertEquals(30, LunarDate.getDaySize(2020, false, 4)); Assert.assertEquals(29, LunarDate.getDaySize(2020, true, 4)); Assert.assertEquals(30, LunarDate.getDaySize(2020, false, 5)); } @Test public void testLunar() { Assert.assertEquals(LocalDate.of(1900, 1, 31), new LunarDate(1900, false, 1, 1).getDate()); Assert.assertEquals(LocalDate.of(2010, 2, 14), new LunarDate(2010, false, 1, 1).getDate()); // 测试阴历闰月的情况 Assert.assertEquals(LocalDate.of(2020, 5, 23), new LunarDate(2020, true, 4, 1).getDate()); Assert.assertEquals(LocalDate.of(2020, 6, 21), new LunarDate(2020, false, 5, 1).getDate()); Assert.assertEquals(LocalDate.of(2010, 2, 14), new LunarDate(2010, false, 1, 1).getDate()); Assert.assertEquals(LocalDate.of(2011, 1, 4), new LunarDate(2010, false, 12, 1).getDate()); // 测试阴历索引的情况 Assert.assertEquals(LocalDate.of(2020, 4, 23), new LunarDate(2020, 4, 1).getDate()); Assert.assertEquals(LocalDate.of(2020, 5, 23), new LunarDate(2020, 5, 1).getDate()); Assert.assertEquals(LocalDate.of(2020, 6, 21), new LunarDate(2020, 6, 1).getDate()); Assert.assertEquals(4, new LunarDate(2020, 4, 1).getIndex()); Assert.assertEquals(5, new LunarDate(2020, 5, 1).getIndex()); Assert.assertEquals(6, new LunarDate(2020, 6, 1).getIndex()); } }
[ "Birdy@LAPTOP-QRG8T75T" ]
Birdy@LAPTOP-QRG8T75T
277be58b0d604a9e8b888a3f7221913b70ac7275
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--intellij-community/95433b0e9a2c4dacd6bc653e6a784a836a86d3ca/after/GitReferenceValidator.java
15250e83376d418b549d166d704ed6b0a1893153
[]
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
4,047
java
/* * Copyright 2000-2008 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package git4idea.ui; import com.intellij.openapi.project.Project; import com.intellij.openapi.vcs.VcsException; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.DocumentAdapter; import git4idea.GitRevisionNumber; import git4idea.actions.GitShowAllSubmittedFilesAction; import javax.swing.*; import javax.swing.event.DocumentEvent; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * The class setups validation for references in the text fields. */ public class GitReferenceValidator { /** * The result of last validation */ private boolean myLastResult; /** * The text that was used for last valiation */ private String myLastResultText = null; /** * The project */ private final Project myProject; /** * The git root dropdown */ private final JComboBox myGitRoot; /** * The text field that contains object reference */ private final JTextField myTextField; /** * The button that initate validation action */ private final JButton myButton; /** * A constructor from fields * * @param project the project to use * @param textField the text field that contains object reference * @param button the button that inititates validation action * @param statusChanged the action that is ivoked when validation status changed */ public GitReferenceValidator(final Project project, final JComboBox gitRoot, final JTextField textField, final JButton button, final Runnable statusChanged) { myProject = project; myGitRoot = gitRoot; myTextField = textField; myButton = button; myGitRoot.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { myLastResult = false; myLastResultText = null; } }); myTextField.getDocument().addDocumentListener(new DocumentAdapter() { protected void textChanged(final DocumentEvent e) { // note that checkOkButton is called in other listener myButton.setEnabled(myTextField.getText().trim().length() != 0); } }); myButton.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent e) { final String revisionExpression = myTextField.getText(); myLastResultText = revisionExpression; myLastResult = false; try { GitRevisionNumber revision = GitRevisionNumber.resolve(myProject, gitRoot(), revisionExpression); GitShowAllSubmittedFilesAction.showSubmittedFiles(myProject, revision.asString(), gitRoot()); myLastResult = true; } catch (VcsException ex) { GitUIUtil.showOperationError(myProject, ex, "Validating revision: " + revisionExpression); } if (statusChanged != null) { statusChanged.run(); } } }); myButton.setEnabled(myTextField.getText().length() != 0); } /** * @return true if the reference is known to be invalid */ public boolean isInvalid() { final String revisionExpression = myTextField.getText(); return revisionExpression.equals(myLastResultText) && !myLastResult; } /** * @return currently selected git root */ private VirtualFile gitRoot() { return (VirtualFile)myGitRoot.getSelectedItem(); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
25d8ad336488abb700d7e4d708a96b4138318dc0
b61d77856710270a898eab3000f480d3db2b7998
/GEOMETIC_POLICE_STATION/src/Project/KmlCreator.java
37696eb5470e7473fda312ed8f185de8ca45e5a1
[]
no_license
pratyushjava/Tracking_Of_GPS_enabled_Device
343b0b4e6e4baeffacdcf9d4480e6d7e306e32ab
7b2924f2b819c6311d10a646e91aba6ff6ac24f1
refs/heads/master
2021-01-22T22:08:02.215288
2017-03-19T21:46:41
2017-03-19T21:46:41
85,508,461
0
1
null
null
null
null
UTF-8
Java
false
false
4,700
java
package Project; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.io.RandomAccessFile; public class KmlCreator { //operational data members PrintWriter pw1; PrintWriter pw2; static File file1; File file2; //device data members int id; double longitude; double latitude; double altitude; double velocity; //method to generate kml file by id KmlCreator(int intwt_id,double dbllongitude,double dbllatitude,double dblaltitude,double dblvelocity) { this.id=intwt_id; this.longitude=dbllongitude; this.latitude=dbllatitude; this.altitude=dblaltitude; this.velocity=dblvelocity; try { file1=new File("c:/DEVICES_LOCATION"); if(!file1.isDirectory()) { file1.mkdir(); } file1=new File("c:/DEVICES_LOCATION/"+id+".kml"); file2=new File("c:/DEVICES_LOCATION/alldevice.kml"); } catch (Exception e) { e.printStackTrace(); } if(!file1.exists()) { createKml(); } else { updateKml(); } if(!file2.exists()) { createUniversalKml(intwt_id); } else { updateUniversalKml(intwt_id); } } //method to generate Universal kml file private void createUniversalKml(int id) { try { pw2=new PrintWriter(new FileWriter("c:/DEVICES_LOCATION/alldevice.kml"),true); } catch (IOException e) { e.printStackTrace(); } String str="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+ "<kml xmlns=\"http://earth.google.com/kml/2.1\">"+ "<Document>"+ "<NetworkLink>"+ "<Link>"+ "<href>"+id+".kml</href>"+ "<refreshMode>onInterval</refreshMode>"+ "<refreshInterval>1</refreshInterval>"+ "</Link>"+ "</NetworkLink>"+ "</Document>"+ "</kml>"; pw2.println(str); pw2.flush(); pw2.close(); } private void updateUniversalKml(int id) { RandomAccessFile randfile; if(!PoliceStation.getAllWalTkiList().contains(id)) { try { randfile = new RandomAccessFile(file2,"rwd"); randfile.seek(randfile.length()-19); byte[] b=new byte[19]; randfile.readFully(b); randfile.seek(randfile.length()-19); String str="<NetworkLink>" + "<Link>"+ "<href>"+id+".kml</href>"+ "<refreshMode>onInterval</refreshMode>"+ "<refreshInterval>1</refreshInterval>"+ "</Link>"+ "</NetworkLink>"; randfile.writeBytes(str); randfile.write(b); randfile.close(); System.out.println("1 file updated"); } catch (Exception e) { e.printStackTrace(); } } } //method to create new kml file void createKml() { try { pw1=new PrintWriter(new FileWriter("c:/DEVICES_LOCATION/"+id+".kml"),true); } catch (IOException e) { e.printStackTrace(); } String str="<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+ "<kml xmlns=\"http://www.opengis.net/kml/2.2\" xmlns:gx=\"http://www.google.com/kml/ext/2.2\" xmlns:kml=\"http://www.opengis.net/kml/2.2\" xmlns:atom=\"http://www.w3.org/2005/Atom\">"+ "<Document>"+ "<name>"+id+".kml</name>"+ "<Style id=\"sn_ylw-pushpin\">"+ "<IconStyle>"+ "<scale>1.1</scale>"+ "<Icon>"+ "<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>"+ "</Icon>"+ "<hotSpot x=\"20\" y=\"2\" xunits=\"pixels\" yunits=\"pixels\"/>"+ "</IconStyle>"+ "<LineStyle>"+ "<color>ff13e1f3</color>"+ "<width>5</width>"+ "</LineStyle>"+ "</Style>"+ "<StyleMap id=\"msn_ylw-pushpin\">"+ "<Pair>"+ "<key>normal</key>"+ "<styleUrl>#sn_ylw-pushpin</styleUrl>"+ "</Pair>"+ "</StyleMap>"+ "<Placemark>"+ "<name>"+id+"</name>"+ "<description>Starting Point and Velocity:"+velocity+"</description>"+ "<Point>"+ "<coordinates>"+longitude+","+latitude+","+altitude+"</coordinates>"+ "</Point>"+ "</Placemark>"+ "<Placemark>"+ "<styleUrl>#msn_ylw-pushpin</styleUrl>"+ "<LineString>"+ "<tessellate>1</tessellate>"+ "<coordinates>"+longitude+","+latitude+","+altitude+"</coordinates>"+ "</LineString>"+ "</Placemark>"+ "</Document>"+ "</kml>"; pw1.println(str); pw1.flush(); pw1.close(); System.out.println("1 file created"); } //method to update old kml file void updateKml() { RandomAccessFile randfile; try { randfile = new RandomAccessFile(file1,"rwd"); randfile.seek(randfile.length()-58); byte[] b=new byte[58]; randfile.readFully(b); randfile.seek(randfile.length()-58); randfile.writeBytes(" "+longitude+","+latitude+","+altitude); randfile.write(b); randfile.close(); System.out.println("1 file updated"); } catch (Exception e) { e.printStackTrace(); } } }
[ "pratyus@g.clemson.edu" ]
pratyus@g.clemson.edu
2369fe23a4c6268a099ec965a83c172558aede44
18c70f2a4f73a9db9975280a545066c9e4d9898e
/mirror-ops/ops-api/src/main/java/com/aspire/mirror/ops/api/domain/OpsPipelineInstanceQueryParam.java
802481a43f333c6a16c527ebc7b8113cb86c9722
[]
no_license
iu28igvc9o0/cmdb_aspire
1fe5d8607fdacc436b8a733f0ea44446f431dfa8
793eb6344c4468fe4c61c230df51fc44f7d8357b
refs/heads/master
2023-08-11T03:54:45.820508
2021-09-18T01:47:25
2021-09-18T01:47:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,632
java
/** * * 项目名: ops-api * <p/> * * 文件名: OpsPipelineInstanceQueryParam.java * <p/> * * 功能描述: TODO * <p/> * * @author pengguihua * * @date 2019年11月2日 * * @version V1.0 * <p/> * *<b>Copyright(c)</b> 2019 卓望公司-版权所有<br/> * */ package com.aspire.mirror.ops.api.domain; import java.util.*; import org.apache.commons.lang.StringUtils; import org.springframework.format.annotation.DateTimeFormat; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Getter; import lombok.Setter; /** * * 项目名称: ops-api * <p/> * * 类名: OpsPipelineInstanceQueryParam * <p/> * * 类功能描述: TODO * <p/> * * @author pengguihua * * @date 2019年11月2日 * * @version V1.0 * <br/> * * <b>Copyright(c)</b> 2019 卓望公司-版权所有 * */ @Setter @Getter public class OpsPipelineInstanceQueryParam extends AbstractPageListQueryParam { private static final String DEFAULT_ORDER_COLUMN = "pipeline_instance_id"; private static final String DEFAULT_ORDER_TYPE = "DESC"; @JsonProperty("pipeline_instance_id_list") protected List<Long> pipelineInstanceIdList; @JsonProperty("pipeline_instance_name") protected String pipelineInstanceName; @JsonProperty("operator") protected String operator; // 操作发起人 @JsonProperty("trigger_way") protected Integer triggerWay; @JsonProperty("status") protected Integer status; // 作业当前状态 @JsonIgnore protected Integer bizClassify; // 业务分类 @JsonProperty("start_time") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") protected Date startTime; @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") @JsonProperty("end_time") protected Date endTime; @JsonProperty("pipeline_instance_id") protected Long pipelineInstanceId; public OpsPipelineInstanceQueryParam() { super.orderColumn = DEFAULT_ORDER_COLUMN; super.orderType = DEFAULT_ORDER_TYPE; } @Override public void setOrderType(String orderType) { if (StringUtils.isNotEmpty(orderType)) { super.orderType = orderType; return; } } // public static final String[] orderNameArray = new String [] {"start_time", "end_time", "status", "trigger_way"}; @Override public void setOrderColumn(String orderColumn) { if (StringUtils.isNotEmpty(orderColumn)) { super.orderColumn = orderColumn; } } }
[ "jiangxuwen7515@163.com" ]
jiangxuwen7515@163.com
943750acbd645fee27aee447a6e8d940f29db065
fdb300f6009033b35903b778b4e8163e2c06d7fe
/dao/src/main/java/com/hertfordshire/dao/psql/EmailVerificationDao.java
b2e2e9446cb3f24e269d964da49f700e5765bcd0
[]
no_license
obinnamaduabum/lims_backend
97e682b248aac2bd1db4125cdd9c8dba86176729
9fd12893219a5bf3b65f1afca7f6c46f0c82712d
refs/heads/master
2023-05-01T14:57:23.468791
2020-08-22T19:53:05
2020-08-22T19:53:05
369,449,452
0
0
null
null
null
null
UTF-8
Java
false
false
405
java
package com.hertfordshire.dao.psql; import com.hertfordshire.model.psql.EmailVerificationToken; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository public interface EmailVerificationDao extends JpaRepository<EmailVerificationToken, Long> { EmailVerificationToken findByTokenAndTokenExpired(String token, boolean expired); }
[ "you@example.com" ]
you@example.com
00986cbb8bd5001309c6127b98f0f49b4cef3b60
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/3/org/jfree/chart/title/TextTitle_getToolTipText_387.java
7c7404afac14b6d211a12058209aa94f8aaaf856
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
1,128
java
org jfree chart titl chart titl displai text string automat wrap requir text titl texttitl titl return tool tip text tool tip text possibl code code string tool tip text gettooltiptext tool tip text tooltiptext
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
23cc9dbb52f3cfe83f0397c86e4d7e4b980bf6f0
8d21614a1fd31793f5840d9210add8ab73d68309
/QuanLyThietBi/src/main/java/com/tampro/controller/ProductStockController.java
fea9e4af0b886bb3032bfb7a7713e3c4f8c84639
[]
no_license
xomrayno1/QuanLyThietBi
4a187c057cc5c42e8117e5be958f01f46dd5185a
52dcc4fc0256c933ca6263896d6d68ad3f4cf1ba
refs/heads/main
2023-01-12T03:48:55.815629
2020-11-16T13:50:13
2020-11-16T13:50:13
305,800,392
0
0
null
null
null
null
UTF-8
Java
false
false
3,370
java
package com.tampro.controller; import java.util.Collections; import java.util.Comparator; import java.util.List; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import com.tampro.dto.InventoryDTO; import com.tampro.dto.ProductDTO; import com.tampro.dto.ProductStockDTO; import com.tampro.service.InventoryService; import com.tampro.service.ProductService; import com.tampro.service.ProductStockService; import com.tampro.utils.Constant; import com.tampro.utils.Paging; @Controller @RequestMapping("/product-stock") public class ProductStockController { @Autowired ProductStockService productStockService; @Autowired ProductService productService; @Autowired InventoryService inventoryService; @GetMapping(value = {"/list/","/list"}) public String redirect() { return "redirect:/product-stock/list/1"; } @RequestMapping("/list/{page}") public String listInvoice(Model model,@ModelAttribute("searchForm") ProductStockDTO productStockDTO,@PathVariable("page") int page ,HttpSession session) { Paging paging = new Paging(10); paging.setIndexPage(page); List<ProductStockDTO> list = productStockService.getAll(productStockDTO, paging); model.addAttribute("list", list); model.addAttribute("pageInfo", paging); if(session.getAttribute(Constant.MSG_ERROR) != null) { System.out.println(session.getAttribute(Constant.MSG_ERROR)); model.addAttribute(Constant.MSG_ERROR, session.getAttribute(Constant.MSG_ERROR)); session.removeAttribute(Constant.MSG_ERROR); } if(session.getAttribute(Constant.MSG_SUCCESS) != null) { model.addAttribute(Constant.MSG_SUCCESS, session.getAttribute(Constant.MSG_SUCCESS)); session.removeAttribute(Constant.MSG_SUCCESS); } innitSelect(model); return "product-stock-list"; } public void innitSelect(Model model) { List<ProductDTO> list = productService.getAll(null, null); Collections.sort(list,new Comparator<ProductDTO>() { public int compare(ProductDTO o1, ProductDTO o2) { // TODO Auto-generated method stub return o1.getName().compareTo(o2.getName()); } }); model.addAttribute("listProduct", list); List<InventoryDTO> listInven = inventoryService.getAll(null, null); Collections.sort(listInven,new Comparator<InventoryDTO>() { public int compare(InventoryDTO o1, InventoryDTO o2) { // TODO Auto-generated method stub return o1.getName().compareTo(o2.getName()); } }); model.addAttribute("listInven", listInven); } @GetMapping(value = {"/delete/{id}"}) public String deleteProduct(Model model,@PathVariable("id")int id,HttpSession session) { ProductStockDTO productStockDTO = productStockService.findById(id); try { productStockService.delete(productStockDTO); session.setAttribute(Constant.MSG_SUCCESS, "Xóa thành công"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); session.setAttribute(Constant.MSG_ERROR, "Xóa thất bại"); } return "redirect:/product-stock/list/1"; } }
[ "xomrayno5" ]
xomrayno5
94447e17dba4b583dd655b7aae3fd26a78cf947e
04b1803adb6653ecb7cb827c4f4aa616afacf629
/chrome/android/javatests/src/org/chromium/chrome/browser/TabTest.java
98e549348bc13c3c658fa6215166e9b4c2ebdaa4
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
Java
false
false
5,722
java
// Copyright 2015 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. package org.chromium.chrome.browser; import android.app.Activity; import android.support.test.InstrumentationRegistry; import android.support.test.filters.SmallTest; import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.chromium.base.test.util.CallbackHelper; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.Feature; import org.chromium.base.test.util.RetryOnFailure; import org.chromium.chrome.browser.tab.EmptyTabObserver; import org.chromium.chrome.browser.tab.SadTab; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabObserver; import org.chromium.chrome.browser.tabmodel.TabSelectionType; import org.chromium.chrome.test.ChromeActivityTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.util.ApplicationTestUtils; import org.chromium.chrome.test.util.ChromeTabUtils; import org.chromium.components.security_state.ConnectionSecurityLevel; import org.chromium.content_public.browser.test.util.Criteria; import org.chromium.content_public.browser.test.util.CriteriaHelper; import org.chromium.content_public.browser.test.util.TestThreadUtils; /** * Tests for Tab class. */ @RunWith(ChromeJUnit4ClassRunner.class) @RetryOnFailure @CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE}) public class TabTest { @Rule public ChromeActivityTestRule<ChromeActivity> mActivityTestRule = new ChromeActivityTestRule<>(ChromeActivity.class); private Tab mTab; private CallbackHelper mOnTitleUpdatedHelper; private final TabObserver mTabObserver = new EmptyTabObserver() { @Override public void onTitleUpdated(Tab tab) { mOnTitleUpdatedHelper.notifyCalled(); } }; private boolean isShowingSadTab() throws Exception { return TestThreadUtils.runOnUiThreadBlocking(() -> SadTab.isShowing(mTab)); } @Before public void setUp() throws Exception { mActivityTestRule.startMainActivityOnBlankPage(); mTab = mActivityTestRule.getActivity().getActivityTab(); mTab.addObserver(mTabObserver); mOnTitleUpdatedHelper = new CallbackHelper(); } @Test @SmallTest @Feature({"Tab"}) public void testTabContext() throws Throwable { Assert.assertFalse("The tab context cannot be an activity", mTab.getContentView().getContext() instanceof Activity); Assert.assertNotSame("The tab context's theme should have been updated", mTab.getContentView().getContext().getTheme(), mActivityTestRule.getActivity().getApplication().getTheme()); } @Test @SmallTest @Feature({"Tab"}) public void testTitleDelayUpdate() throws Throwable { final String oldTitle = "oldTitle"; final String newTitle = "newTitle"; mActivityTestRule.loadUrl("data:text/html;charset=utf-8,<html><head><title>" + oldTitle + "</title></head><body/></html>"); Assert.assertEquals("title does not match initial title", oldTitle, mTab.getTitle()); int currentCallCount = mOnTitleUpdatedHelper.getCallCount(); mActivityTestRule.runJavaScriptCodeInCurrentTab("document.title='" + newTitle + "';"); mOnTitleUpdatedHelper.waitForCallback(currentCallCount); Assert.assertEquals("title does not update", newTitle, mTab.getTitle()); } /** * Verifies a Tab's contents is restored when the Tab is foregrounded * after its contents have been destroyed while backgrounded. * Note that document mode is explicitly disabled, as the document activity * may be fully recreated if its contents is killed while in the background. */ @Test @SmallTest @Feature({"Tab"}) public void testTabRestoredIfKilledWhileActivityStopped() throws Exception { // Ensure the tab is showing before stopping the activity. TestThreadUtils.runOnUiThreadBlocking(() -> mTab.show(TabSelectionType.FROM_NEW)); Assert.assertFalse(mTab.needsReload()); Assert.assertFalse(mTab.isHidden()); Assert.assertFalse(isShowingSadTab()); // Stop the activity and simulate a killed renderer. ApplicationTestUtils.fireHomeScreenIntent(InstrumentationRegistry.getTargetContext()); TestThreadUtils.runOnUiThreadBlocking( () -> ChromeTabUtils.simulateRendererKilledForTesting(mTab, false)); CriteriaHelper.pollUiThread(new Criteria() { @Override public boolean isSatisfied() { return mTab.isHidden(); } }); Assert.assertTrue(mTab.needsReload()); Assert.assertFalse(isShowingSadTab()); ApplicationTestUtils.launchChrome(InstrumentationRegistry.getTargetContext()); // The tab should be restored and visible. CriteriaHelper.pollUiThread(new Criteria() { @Override public boolean isSatisfied() { return !mTab.isHidden(); } }); Assert.assertFalse(mTab.needsReload()); Assert.assertFalse(isShowingSadTab()); } @Test @SmallTest @Feature({"Tab"}) public void testTabSecurityLevel() { TestThreadUtils.runOnUiThreadBlocking( (Runnable) () -> Assert.assertEquals( ConnectionSecurityLevel.NONE, mTab.getSecurityLevel())); } }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
57e262742e601c024b1f546a720cd07a63d0f9bb
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
/ant_cluster/7793/tar_2.java
a004dc4c99bf4bcada8cae3937d779e1d9b93476
[]
no_license
martinezmatias/GenPat-data-C3
63cfe27efee2946831139747e6c20cf952f1d6f6
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
refs/heads/master
2022-04-25T17:59:03.905613
2020-04-15T14:41:34
2020-04-15T14:41:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,766
java
/* * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact apache@apache.org. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.tools.ant.types; import org.apache.tools.ant.Project; /* * * @author thomas.haas@softwired-inc.com */ public class CommandlineJava { private Commandline vmCommand = new Commandline(); private Commandline javaCommand = new Commandline(); private Path classpath = null; private String vmVersion; public CommandlineJava() { setVm("java"); setVmversion(org.apache.tools.ant.Project.getJavaVersion()); } public Commandline.Argument createArgument() { return javaCommand.createArgument(); } public Commandline.Argument createVmArgument() { return vmCommand.createArgument(); } public void setVm(String vm) { vmCommand.setExecutable(vm); } public void setVmversion(String value) { vmVersion = value; } public void setClassname(String classname) { javaCommand.setExecutable(classname); } public Path createClasspath(Project p) { if (classpath == null) { classpath = new Path(p); } return classpath; } public String getVmversion() { return vmVersion; } public String[] getCommandline() { int size = vmCommand.size() + javaCommand.size(); if (classpath != null && classpath.size() > 0) { size += 2; } String[] result = new String[size]; System.arraycopy(vmCommand.getCommandline(), 0, result, 0, vmCommand.size()); if (classpath != null && classpath.size() > 0) { result[vmCommand.size()] = "-classpath"; result[vmCommand.size()+1] = classpath.toString(); } System.arraycopy(javaCommand.getCommandline(), 0, result, result.length-javaCommand.size(), javaCommand.size()); return result; } public String toString() { return Commandline.toString(getCommandline()); } public int size() { int size = vmCommand.size() + javaCommand.size(); if (classpath != null && classpath.size() > 0) { size += 2; } return size; } }
[ "375833274@qq.com" ]
375833274@qq.com
df6b5e9c0bfde955dd1d3bd2d7e45163b45e6b36
3b33d6e3c2067446ecb2475f68de74328a6ea66a
/CrowdFundingWorkspace/crowd-funding-project-workspace/modules/crowd-funding-database/crowd-funding-database-service/src/main/java/com/crowd/funding/database/model/impl/HistoryLogRegistrationBaseImpl.java
4f7e2e9b341d3f3bd9a4437c2ef777bbba806cfc
[]
no_license
Sumit9727/QuickDaan_LifeRay1
bbeced3e386f732be861073106848b4237e967ba
96320146033f182ab32f13a54bdc7a2306986b53
refs/heads/master
2020-09-18T11:21:16.519127
2019-11-26T09:04:17
2019-11-26T09:04:17
224,142,985
0
0
null
null
null
null
UTF-8
Java
false
false
1,987
java
/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.crowd.funding.database.model.impl; import aQute.bnd.annotation.ProviderType; import com.crowd.funding.database.model.HistoryLogRegistration; import com.crowd.funding.database.service.HistoryLogRegistrationLocalServiceUtil; /** * The extended model base implementation for the HistoryLogRegistration service. Represents a row in the &quot;cf_history_log_details&quot; database table, with each column mapped to a property of this class. * * <p> * This class exists only as a container for the default extended model level methods generated by ServiceBuilder. Helper methods and all application logic should be put in {@link HistoryLogRegistrationImpl}. * </p> * * @author Brian Wing Shun Chan * @see HistoryLogRegistrationImpl * @see HistoryLogRegistration * @generated */ @ProviderType public abstract class HistoryLogRegistrationBaseImpl extends HistoryLogRegistrationModelImpl implements HistoryLogRegistration { /* * NOTE FOR DEVELOPERS: * * Never modify or reference this class directly. All methods that expect a history log registration model instance should use the {@link HistoryLogRegistration} interface instead. */ @Override public void persist() { if (this.isNew()) { HistoryLogRegistrationLocalServiceUtil.addHistoryLogRegistration(this); } else { HistoryLogRegistrationLocalServiceUtil.updateHistoryLogRegistration(this); } } }
[ "rohit@prakat.in" ]
rohit@prakat.in
65c02a96202a08b986459a6897d9291b328e5a66
17ff6945de2a4aed04eb8da96b7c995034c0febb
/src/main/java/com/mycompany/dashboard/system/domain/SmsTemplate.java
b7f751d704db35daafc03ef74d1e1bacfa958dba
[]
no_license
elliottlin2020/xf
ec4b0fcebc30877359ebadeba166f069a92cc23e
1fbe4395b5b9119c004477aa5aeb267bf6830232
refs/heads/main
2023-06-11T09:49:25.329636
2021-07-01T15:32:35
2021-07-01T15:32:35
382,079,051
0
0
null
null
null
null
UTF-8
Java
false
false
3,505
java
package com.mycompany.dashboard.system.domain; import com.baomidou.mybatisplus.annotation.*; import com.diboot.core.binding.annotation.*; import com.mycompany.dashboard.domain.AbstractAuditingEntity; import com.mycompany.dashboard.domain.enumeration.MessageSendType; /** * 消息模板 */ @TableName(value = "sms_template") public class SmsTemplate extends AbstractAuditingEntity { private static final long serialVersionUID = 1L; @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 模板标题 */ @TableField(value = "name") private String name; /** * 模板CODE */ @TableField(value = "code") private String code; /** * 模板类型 */ @TableField(value = "type") private MessageSendType type; /** * 模板内容 */ @TableField(value = "content") private String content; /** * 模板测试json */ @TableField(value = "test_json") private String testJson; // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove public Long getId() { return id; } public void setId(Long id) { this.id = id; } public SmsTemplate id(Long id) { this.id = id; return this; } public String getName() { return this.name; } public SmsTemplate name(String name) { this.name = name; return this; } public void setName(String name) { this.name = name; } public String getCode() { return this.code; } public SmsTemplate code(String code) { this.code = code; return this; } public void setCode(String code) { this.code = code; } public MessageSendType getType() { return this.type; } public SmsTemplate type(MessageSendType type) { this.type = type; return this; } public void setType(MessageSendType type) { this.type = type; } public String getContent() { return this.content; } public SmsTemplate content(String content) { this.content = content; return this; } public void setContent(String content) { this.content = content; } public String getTestJson() { return this.testJson; } public SmsTemplate testJson(String testJson) { this.testJson = testJson; return this; } public void setTestJson(String testJson) { this.testJson = testJson; } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof SmsTemplate)) { return false; } return id != null && id.equals(((SmsTemplate) o).id); } @Override public int hashCode() { // see https://vladmihalcea.com/how-to-implement-equals-and-hashcode-using-the-jpa-entity-identifier/ return getClass().hashCode(); } // prettier-ignore @Override public String toString() { return "SmsTemplate{" + "id=" + getId() + ", name='" + getName() + "'" + ", code='" + getCode() + "'" + ", type='" + getType() + "'" + ", content='" + getContent() + "'" + ", testJson='" + getTestJson() + "'" + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3f9dc6d1148a24444da19d167e9870a37a24cef1
7aa947e6cfccad8adf66d72aea11563e63a391b3
/src/com/channel/v2/ChannelWriter.java
94aad35d2a50ff43f4c2104951a6076d58bcfcaf
[]
no_license
huiliang2liu/android_channel
1809ac77cb46c4d879eb78170199685433fa06c9
4b76bd7a3549e795a78e9341878ff20730cede4f
refs/heads/master
2022-07-16T04:23:39.547702
2020-05-09T09:25:54
2020-05-09T09:25:54
262,529,732
0
0
null
null
null
null
UTF-8
Java
false
false
4,740
java
package com.channel.v2; import com.channel.json.JSONObject; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; public final class ChannelWriter { private ChannelWriter() { super(); } /** * write channel with channel fixed id * * @param apkFile apk file * @param channel channel * @throws IOException * @throws SignatureNotFoundException */ public static void put(final File apkFile, final String channel) throws IOException, SignatureNotFoundException { put(apkFile, channel, false); } /** * write channel with channel fixed id * * @param apkFile apk file * @param channel channel * @param lowMemory if need low memory operation, maybe a little slower * @throws IOException * @throws SignatureNotFoundException */ public static void put(final File apkFile, final String channel, final boolean lowMemory) throws IOException, SignatureNotFoundException { put(apkFile, channel, null, lowMemory); } /** * write channel & extra info with channel fixed id * * @param apkFile apk file * @param channel channel (nullable) * @param extraInfo extra info (don't use {@link ChannelReader#CHANNEL_KEY PayloadReader.CHANNEL_KEY} as your key) * @throws IOException * @throws SignatureNotFoundException */ public static void put(final File apkFile, final String channel, final Map<String, String> extraInfo) throws IOException, SignatureNotFoundException { put(apkFile, channel, extraInfo, false); } /** * write channel & extra info with channel fixed id * * @param apkFile apk file * @param channel channel (nullable) * @param extraInfo extra info (don't use {@link ChannelReader#CHANNEL_KEY PayloadReader.CHANNEL_KEY} as your key) * @param lowMemory if need low memory operation, maybe a little slower * @throws IOException * @throws SignatureNotFoundException */ public static void put(final File apkFile, final String channel, final Map<String, String> extraInfo, final boolean lowMemory) throws IOException, SignatureNotFoundException { final Map<String, String> newData = new HashMap<String, String>(); final Map<String, String> existsData = ChannelReader.getMap(apkFile); if (existsData != null) { newData.putAll(existsData); } if (extraInfo != null) { // can't use extraInfo.remove(ChannelReader.CHANNEL_KEY); newData.putAll(extraInfo); } if (channel != null && channel.length() > 0) { newData.put(ChannelReader.CHANNEL_KEY, channel); } final JSONObject jsonObject = new JSONObject(newData); putRaw(apkFile, jsonObject.toString(), lowMemory); } /** * write custom content with channel fixed id <br/> * NOTE: {@link ChannelReader#get(File)} and {@link ChannelReader#getMap(File)} may be affected * * @param apkFile apk file * @param string custom content * @throws IOException * @throws SignatureNotFoundException */ public static void putRaw(final File apkFile, final String string) throws IOException, SignatureNotFoundException { putRaw(apkFile, string, false); } /** * write custom content with channel fixed id<br/> * NOTE: {@link ChannelReader#get(File)} and {@link ChannelReader#getMap(File)} may be affected * * @param apkFile apk file * @param string custom content * @param lowMemory if need low memory operation, maybe a little slower * @throws IOException * @throws SignatureNotFoundException */ public static void putRaw(final File apkFile, final String string, final boolean lowMemory) throws IOException, SignatureNotFoundException { PayloadWriter.put(apkFile, ApkUtil.APK_CHANNEL_BLOCK_ID, string, lowMemory); } /** * remove channel id content * * @param apkFile apk file * @throws IOException * @throws SignatureNotFoundException */ public static void remove(final File apkFile) throws IOException, SignatureNotFoundException { remove(apkFile, false); } /** * remove channel id content * * @param apkFile apk file * @param lowMemory if need low memory operation, maybe a little slower * @throws IOException * @throws SignatureNotFoundException */ public static void remove(final File apkFile, final boolean lowMemory) throws IOException, SignatureNotFoundException { PayloadWriter.remove(apkFile, ApkUtil.APK_CHANNEL_BLOCK_ID, lowMemory); } }
[ "825378291@qq.com" ]
825378291@qq.com
00ab703322f1a2fb884f82d3c5beaaf11c0768ca
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/plugin/backup/h/n.java
bd76f2481d7e627a769f49beaf1525ec247943f6
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
3,597
java
package com.tencent.mm.plugin.backup.h; import f.a.a.b; import java.util.LinkedList; public final class n extends com.tencent.mm.bk.a { public String ID; public long hbV; public long hbW; public long hbX; public m hbY; public long hbZ; public int hca; protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (f.a.a.c.a)paramVarArgs[0]; if (this.ID == null) { throw new b("Not all required fields were included: ID"); } if (this.ID != null) { paramVarArgs.g(1, this.ID); } paramVarArgs.T(2, this.hbV); paramVarArgs.T(3, this.hbW); paramVarArgs.T(4, this.hbX); if (this.hbY != null) { paramVarArgs.fV(5, this.hbY.boi()); this.hbY.a(paramVarArgs); } paramVarArgs.T(6, this.hbZ); paramVarArgs.fT(7, this.hca); return 0; } if (paramInt == 1) { if (this.ID == null) { break label551; } } label551: for (paramInt = f.a.a.b.b.a.h(1, this.ID) + 0;; paramInt = 0) { int i = paramInt + f.a.a.a.S(2, this.hbV) + f.a.a.a.S(3, this.hbW) + f.a.a.a.S(4, this.hbX); paramInt = i; if (this.hbY != null) { paramInt = i + f.a.a.a.fS(5, this.hbY.boi()); } return paramInt + f.a.a.a.S(6, this.hbZ) + f.a.a.a.fQ(7, this.hca); if (paramInt == 2) { paramVarArgs = new f.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = com.tencent.mm.bk.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bk.a.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.cJS(); } } if (this.ID != null) { break; } throw new b("Not all required fields were included: ID"); } if (paramInt == 3) { Object localObject1 = (f.a.a.a.a)paramVarArgs[0]; n localn = (n)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); switch (paramInt) { default: return -1; case 1: localn.ID = ((f.a.a.a.a)localObject1).vHC.readString(); return 0; case 2: localn.hbV = ((f.a.a.a.a)localObject1).vHC.rZ(); return 0; case 3: localn.hbW = ((f.a.a.a.a)localObject1).vHC.rZ(); return 0; case 4: localn.hbX = ((f.a.a.a.a)localObject1).vHC.rZ(); return 0; case 5: paramVarArgs = ((f.a.a.a.a)localObject1).IC(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { Object localObject2 = (byte[])paramVarArgs.get(paramInt); localObject1 = new m(); localObject2 = new f.a.a.a.a((byte[])localObject2, unknownTagHandler); for (boolean bool = true; bool; bool = ((m)localObject1).a((f.a.a.a.a)localObject2, (com.tencent.mm.bk.a)localObject1, com.tencent.mm.bk.a.a((f.a.a.a.a)localObject2))) {} localn.hbY = ((m)localObject1); paramInt += 1; } case 6: localn.hbZ = ((f.a.a.a.a)localObject1).vHC.rZ(); return 0; } localn.hca = ((f.a.a.a.a)localObject1).vHC.rY(); return 0; } return -1; } } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes5-dex2jar.jar!/com/tencent/mm/plugin/backup/h/n.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
52ca9684413015a0232133ea320b1fbb936ca1ca
74972621ea8faf7e24b8228c8c5992e3ffb15041
/LivroAndroidCap08-IntentFilter/app/src/main/java/br/livro/android/cap8/receiver/ExemploReceiver.java
b109ce1723c92b8397a567a7c52896914a8b35ee
[ "MIT" ]
permissive
luciano/studying_android
6c0ea0cf9f65c92ade65b7f220e7b18c08c48c65
c4ed2f5257d8de5fb4209346c4ba4dd6dbb6f733
refs/heads/master
2021-04-29T17:07:49.091133
2020-09-08T22:13:41
2020-09-08T22:13:41
121,661,229
0
0
null
null
null
null
UTF-8
Java
false
false
796
java
package br.livro.android.cap8.receiver; import android.content.Context; import android.content.Intent; import android.content.BroadcastReceiver; import android.widget.Toast; /** * Exemplo de como receber o broadcast de uma Intent * * @author ricardo * */ public class ExemploReceiver extends BroadcastReceiver { @Override public void onReceive(Context c, Intent intent) { // Voce tem 5 segundos para executar este código // Se precisar voce tem 2 opções classicas // 1) Criar uma Notification para chamar a atençao // 2) Utilizar um Service e disparar um processamento demorado // E lembre-se, aqui no receiver voce precisa ser rapido Toast.makeText(c, "BroadcastReceiver chamado com sucesso !!!", Toast.LENGTH_SHORT).show(); } }
[ "luciano.tj2011@gmail.com" ]
luciano.tj2011@gmail.com
16a4a49da230bc52ef7e1a03cfa9f3206cc939bf
ddbb70f9e2caa272c05a8fa54c5358e2aeb507ad
/rimlog/src/main/java/com/rimdev/rimlog/entities/RelationType.java
b768545363e759679d4b22e9f9ff5088a2b3ef18
[]
no_license
ahmedhamed105/rimdev
1e1aad2c4266dd20e402c566836b9db1f75d4643
c5737a7463f0b80b49896a52f93acbb1e1823509
refs/heads/master
2023-02-05T15:18:20.829487
2021-04-04T08:10:19
2021-04-04T08:10:19
228,478,954
1
0
null
2023-01-11T19:57:52
2019-12-16T21:27:44
JavaScript
UTF-8
Java
false
false
3,091
java
package com.rimdev.rimlog.entities; import java.io.Serializable; import java.util.Collection; import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; import com.fasterxml.jackson.annotation.JsonIgnore; /** * * @author ahmed.elemam */ @Entity @Table(name = "relation_type", catalog = "rim_user", schema = "rim_user") @XmlRootElement @NamedQueries({ @NamedQuery(name = "RelationType.findAll", query = "SELECT r FROM RelationType r") , @NamedQuery(name = "RelationType.findById", query = "SELECT r FROM RelationType r WHERE r.id = :id") , @NamedQuery(name = "RelationType.findByRtype", query = "SELECT r FROM RelationType r WHERE r.rtype = :rtype")}) public class RelationType implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "ID", nullable = false) private Integer id; @Basic(optional = false) @Column(name = "Rtype", nullable = false, length = 450) private String rtype; @OneToMany(cascade = CascadeType.ALL, mappedBy = "relationtypeID") private Collection<RelationComp> relationCompCollection; public RelationType() { } public RelationType(Integer id) { this.id = id; } public RelationType(Integer id, String rtype) { this.id = id; this.rtype = rtype; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getRtype() { return rtype; } public void setRtype(String rtype) { this.rtype = rtype; } @XmlTransient @JsonIgnore public Collection<RelationComp> getRelationCompCollection() { return relationCompCollection; } public void setRelationCompCollection(Collection<RelationComp> relationCompCollection) { this.relationCompCollection = relationCompCollection; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof RelationType)) { return false; } RelationType other = (RelationType) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "entity.RelationType[ id=" + id + " ]"; } }
[ "ahmed.elemam@its.ws" ]
ahmed.elemam@its.ws
98beca24c04f2ce7178885ab05a5019168f88078
fc6cd796c73dc8ad8acd6aaa3ffe76cc4a15e877
/app/src/main/java/india/evayadesk/com/evayadesk/ui/activities/PriceActivity.java
fe7f1dfc8d9817b827ccf8d9025a4130fdf53bca
[]
no_license
bhargavaroyal/evayadesk
68336d707df909094b6e280c2c43417f45e0f2f1
6533a2b0fcb06b9e10f85253153ceaaacf693aea
refs/heads/master
2021-01-10T18:47:17.439392
2016-05-27T12:25:25
2016-05-27T12:25:25
59,397,389
0
0
null
null
null
null
UTF-8
Java
false
false
787
java
package india.evayadesk.com.evayadesk.ui.activities; import android.os.Bundle; import india.evayadesk.com.evayadesk.R; /** * Created by bhargavagugamsetty on 17/05/16. */ public class PriceActivity extends BaseActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_price); setActionbarTitle(getString(R.string.price), true, R.id.price_tb); } @Override protected void onResume() { super.onResume(); } @Override protected void onPause() { super.onPause(); } @Override protected void onStop() { super.onStop(); } @Override protected void onDestroy() { super.onDestroy(); } }
[ "bhargavaroyal@gmail.com" ]
bhargavaroyal@gmail.com
8e4fed2c821b4cc604a7fd3f0d7d4d732d515ec2
d5f09c7b0e954cd20dd613af600afd91b039c48a
/sources/com/sdsmdg/harjot/vectormaster/BuildConfig.java
c669996451a18491c059bf3c4e076933151dacca
[]
no_license
t0HiiBwn/CoolapkRelease
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
a6a2b03e32cde0e5163016e0078391271a8d33ab
refs/heads/main
2022-07-29T23:28:35.867734
2021-03-26T11:41:18
2021-03-26T11:41:18
345,290,891
5
2
null
null
null
null
UTF-8
Java
false
false
403
java
package com.sdsmdg.harjot.vectormaster; public final class BuildConfig { public static final String APPLICATION_ID = "com.sdsmdg.harjot.vectormaster"; public static final String BUILD_TYPE = "release"; public static final boolean DEBUG = false; public static final String FLAVOR = ""; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; }
[ "test@gmail.com" ]
test@gmail.com
1c91db32f86263e6583f3589211252975e6bfcc6
dcde031e6577be47c4ead1fb2c6e317e94253838
/src/rosetta/MDC_DIM_MILLI_L_PER_MIN_PER_KG.java
e7595f1dd4ed0fd07cbfd5128508c3a95626637c
[ "BSD-2-Clause" ]
permissive
EDS-APHP-legacy/LightICE
6ab49e920405b6ac9616de6c1eb48704e6046a39
04d1c27bccd5c64df46d8182b8f4490b98540b3e
refs/heads/master
2022-06-12T21:22:31.131234
2018-05-31T09:53:16
2018-05-31T09:53:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
158
java
package rosetta; public class MDC_DIM_MILLI_L_PER_MIN_PER_KG { public static final String VALUE = "MDC_DIM_MILLI_L_PER_MIN_PER_KG"; }
[ "julien.dubiel@aphp.fr" ]
julien.dubiel@aphp.fr
ac90ee2434a98e7e2abccef87e4fc4bf8091c9a2
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/56/org/apache/commons/math/linear/RealVectorFormat_getAvailableLocales_122.java
6a524d12681a45fab6f573c96855a8630f48dcfe
[]
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
812
java
org apach common math linear format vector compon list format prefix suffix separ replac user defin string number format compon configur white space pars time prefix suffix separ specif separ includ space charact format time input string pars error vector return pars posit pars close curli brace trail space version revis date real vector format realvectorformat set local real vector format set link number format numberformat set real vector format local local local getavailablelocal number format numberformat local getavailablelocal
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
516a6b097e5b9f0d87626a0069d9ece58dcfcf03
8df30366e02eda0fdfc13171e9aa93e9c4180647
/spring-samples-demo/spring-boot-samples-demo-imooc/imooc-coding-261/springboot-image-upload/src/main/java/com/imooc/service/impl/FastDFSServiceImpl.java
77901e3b5f7e052ab4e3be94947a3865255dc281
[]
no_license
FutureWL/spring-samples
d9ab92614b5d238d321101c5e2c09e1e2b989d24
718da85c5397e8441f69293b3aaaf47b7e05130a
refs/heads/master
2023-03-06T15:35:45.645062
2020-10-03T02:07:24
2020-10-03T02:07:24
160,497,481
1
0
null
null
null
null
UTF-8
Java
false
false
1,592
java
package com.imooc.service.impl; import com.github.tobato.fastdfs.domain.fdfs.StorePath; import com.github.tobato.fastdfs.service.FastFileStorageClient; import com.imooc.service.FastDFSService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; @Service public class FastDFSServiceImpl implements FastDFSService { @Autowired private FastFileStorageClient fastFileStorageClient; @Override public String upload(MultipartFile file) throws Exception { // String fileName = file.getOriginalFilename(); if(file != null) { String fileName = file.getOriginalFilename(); // 判断文件名不为空 if(StringUtils.isNotBlank(fileName)) { // 组装文件名 String fileNameArr[] = fileName.split("\\."); String suffix = fileNameArr[fileNameArr.length - 1]; if (!suffix.equalsIgnoreCase("png") && !suffix.equalsIgnoreCase("jpg") && !suffix.equalsIgnoreCase("jpeg")) { return null; } StorePath storePath = fastFileStorageClient.uploadFile(file.getInputStream(), file.getSize(), suffix, null); String path = storePath.getFullPath(); return path; } } return null; } }
[ "624263934@qq.com" ]
624263934@qq.com
13cc112e303d11eb1a1dd4730c144ae8cd4a4567
6b57b3ddc69491c9f107623de067af69c10c27de
/SpringBoot-Rabbit-Sender/src/test/java/com/study/Sender/SpringBootRabbitSenderApplicationTests.java
eb15bfd070e8e2fca4e13d8af84d0a0c87d2a49f
[]
no_license
chenquan1992/SpringBoot-Rabbit-MQ
2b62b8f2d1ff06b14e9603282fecf1dbfe37b6e7
13a503da6e0b1e73fe307c74a6e6aa9bdc13ac56
refs/heads/master
2020-04-14T19:46:12.452707
2019-01-04T06:54:33
2019-01-04T06:54:34
164,070,308
0
0
null
null
null
null
UTF-8
Java
false
false
566
java
package com.study.Sender; import com.study.Sender.service.HelloSender; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class SpringBootRabbitSenderApplicationTests { @Test public void contextLoads() { } @Autowired private HelloSender helloSender; @Test public void testRabbit() { helloSender.send(); } }
[ "12345678" ]
12345678
bc630c8f1c6d50f03a4803fdb5ff08734869d5eb
704507754a9e7f300dfab163e97cd976b677661b
/src/org/omg/PortableServer/RequestProcessingPolicy.java
612fd2589c29465018ab5c27fd9760e2203b58b1
[]
no_license
ossaw/jdk
60e7ca5e9f64541d07933af25c332e806e914d2a
b9d61d6ade341b4340afb535b499c09a8be0cfc8
refs/heads/master
2020-03-27T02:23:14.010857
2019-08-07T06:32:34
2019-08-07T06:32:34
145,785,700
0
0
null
null
null
null
UTF-8
Java
false
false
646
java
package org.omg.PortableServer; /** * org/omg/PortableServer/RequestProcessingPolicy.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from * c:/re/workspace/8-2-build-windows-amd64-cygwin/jdk8u144/9417/corba/src/share/classes/org/omg/PortableServer/poa.idl * Friday, July 21, 2017 9:58:52 PM PDT */ /** * This policy specifies how requests are processed by the created POA. The * default is USE_ACTIVE_OBJECT_MAP_ONLY. */ public interface RequestProcessingPolicy extends RequestProcessingPolicyOperations, org.omg.CORBA.Policy, org.omg.CORBA.portable.IDLEntity {} // interface RequestProcessingPolicy
[ "jianghao7625@gmail.com" ]
jianghao7625@gmail.com
a45514cae2fbc6f4de234dc0f35b565921216010
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14462-14-22-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/platform/wiki/creationjob/internal/steps/ProvisionWikiStep_ESTest_scaffolding.java
71e05de12ae95f7de150f89d7e023ad1b328a159
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
472
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Apr 09 06:51:28 UTC 2020 */ package org.xwiki.platform.wiki.creationjob.internal.steps; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class ProvisionWikiStep_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
975c5e1f4d2c2688c8a765b8479c0e4123927909
b3d9e98f353eaba1cf92e3f1fc1ccd56e7cecbc5
/xy-games/game-logic/trunk/src/main/java/com/cai/game/tdz/TDZType.java
67f5ce1d88948700654f20585873e358a87ffc07
[]
no_license
konser/repository
9e83dd89a8ec9de75d536992f97fb63c33a1a026
f5fef053d2f60c7e27d22fee888f46095fb19408
refs/heads/master
2020-09-29T09:17:22.286107
2018-10-12T03:52:12
2018-10-12T03:52:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
896
java
package com.cai.game.tdz; import java.util.HashMap; import java.util.Map; import com.cai.common.constant.GameConstants; public enum TDZType { DEFAULT(-1) { @Override public TDZTable createTable() { return new TDZTable(); } }, TDZ_SX(GameConstants.GAME_TYPE_TDZ_SHAN_XI) { @Override public TDZTable createTable() { return new TDZTable(); } }; private final int value; TDZType(int value) { this.value = value; } public int getValue() { return this.value; } // 创建推对子桌子 public abstract TDZTable createTable(); public static TDZType getType(int typeValue) { return maps.get(typeValue); } private static final Map<Integer, TDZType> maps = new HashMap<>(); static { TDZType[] temp = TDZType.values(); for (int i = 0; i < temp.length; i++) { maps.put(temp[i].value, temp[i]); } } }
[ "905202059@qq.com" ]
905202059@qq.com
d67c92631708c94d853438ac51448f818ed8107e
821be0c597a1ea191e428cb28a97a57326f6e657
/app/src/main/java/com/lenovo/launcher/components/XAllAppFace/XBlackboard.java
19672304ca9a6d0fd8a80427f7ef7772aad46226
[]
no_license
caozhongzheng/LeLauncher_3.6.5
2a1b70768fcd49b05eb00d83d232e1b161ce5134
d703c0df7fc88b39da148e2b5ffc840ce5730b18
refs/heads/master
2021-01-06T20:33:56.370837
2018-03-02T14:13:25
2018-03-02T14:13:25
123,587,014
2
0
null
null
null
null
UTF-8
Java
false
false
3,796
java
package com.lenovo.launcher.components.XAllAppFace; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; import android.util.FloatMath; import android.util.Log; import com.lenovo.launcher.components.XAllAppFace.slimengine.BaseDrawableGroup; import com.lenovo.launcher.components.XAllAppFace.slimengine.DrawableItem; import com.lenovo.launcher.components.XAllAppFace.slimengine.IController; import com.lenovo.launcher.components.XAllAppFace.slimengine.IDisplayProcess; import com.lenovo.launcher.components.XAllAppFace.slimengine.XContext; /** * 黑板 * @author zhaoxy * */ public class XBlackboard extends DrawableItem { private BaseDrawableGroup classroom; private float targetAlpha = 1; private float targetTempAlpha = 1; private float currentAlpha = 1; private AlphaController mAlphaController; public XBlackboard(XContext context, BaseDrawableGroup classroom, float targetAlpha) { super(context); this.classroom = classroom; this.targetAlpha = targetAlpha; this.mAlphaController = new AlphaController(); } public void setClassroom(BaseDrawableGroup classroom) { hide(); this.classroom = classroom; } @Override public void setAlpha(float alpha) { this.targetAlpha = alpha; if (getParent() != null) { super.setAlpha(targetAlpha); invalidate(); } } public void setTargetAlpha(float alpha) { this.targetAlpha = alpha; } private void setSuperAlpha(float alpha) { super.setAlpha(alpha); } public void show() { show(false); } public void show(boolean toFront) { show(toFront, true); } public void show(boolean toFront, boolean anim) { if (this.classroom != null) { if (anim) { setSuperAlpha(0); } targetTempAlpha = targetAlpha; this.classroom.addItem(this); this.resize(new RectF(0, 0, getParent().getWidth(), getParent().getHeight())); if (toFront) { this.classroom.bringChildToFront(this); } else { this.classroom.bringChildToBack(this); } if (anim) { mAlphaController.startAlphaAnim(); } else { setSuperAlpha(targetTempAlpha); } } } public void hide() { if (this.classroom != null) { targetTempAlpha = 0; mAlphaController.startAlphaAnim(); } } @Override public void onDraw(IDisplayProcess c) { if (getAlpha() > 0) { getPaint().setColor(Color.BLACK); getPaint().setStyle(Paint.Style.FILL); updateFinalAlpha(); c.drawRect(0, 0, getWidth(), getHeight(), getPaint()); } } private class AlphaController implements IController { protected boolean alphaAnimActivate = false; protected void startAlphaAnim() { registerIController(this); alphaAnimActivate = true; } protected void stopAlphaAnim() { alphaAnimActivate = false; unregisterIController(this); } @Override public void update(long timeDelta) { if (alphaAnimActivate) { float delta = targetTempAlpha - getAlpha(); if (Math.abs(delta) < 0.0001f) { setSuperAlpha(targetTempAlpha); stopAlphaAnim(); } else { setSuperAlpha(getAlpha() + delta * .135f); } invalidate(); } } } }
[ "caozhongzheng@peersafe.cn" ]
caozhongzheng@peersafe.cn
de450e3b4764d0fda2332408f90f8176ea2b8624
204ed7097c2eca124ba44a4b8ec32825bc61dcd0
/nms-core-definition/src/java/com/yuep/nms/core/common/smcore/model/UserCustom.java
fe6fc99a7a44dde7df3ed20ec0f4d1efa4052909
[]
no_license
frankggyy/YUEP
8ee9a7d547f8fa471fda88a42c9e3a31ad3f94d2
827115c99b84b9cbfbc501802b18c06c62c1c507
refs/heads/master
2016-09-16T13:49:11.258476
2011-08-31T13:30:34
2011-08-31T13:30:34
2,299,133
0
0
null
null
null
null
GB18030
Java
false
false
2,444
java
/* * $Id: UserCustom.java, 2011-3-24 上午11:29:13 sufeng Exp $ * * Copyright (c) 2010 Wuhan Yangtze Communications Industry Group Co.,Ltd * All rights reserved. * * This software is copyrighted and owned by YCIG or the copyright holder * specified, unless otherwise noted, and may not be reproduced or distributed * in whole or in part in any form or medium without express written permission. */ package com.yuep.nms.core.common.smcore.model; import java.io.Serializable; import java.util.Map; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import org.hibernate.annotations.Type; import com.yuep.nms.core.common.base.def.DisplayNameGetter; /** * <p> * Title: UserCustom * </p> * <p> * Description:用户个性化信息,键值对方式存储 * </p> * * @author sufeng * created 2011-3-24 上午11:29:13 * modified [who date description] * check [who date description] */ @Entity public class UserCustom implements Serializable,DisplayNameGetter{ private static final long serialVersionUID = -7377858933792372868L; /** * 用户名 */ @Id private String userName; /** * 该用户的个性化信息,键值对 */ @Column(name = "customInfo", columnDefinition = "text") @Type(type = "com.yuep.core.db.usertype.MapUserType") private Map<String,String> customInfo; /** * 用户 * @return */ public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } /** * 个性化信息 * @return */ public Map<String, String> getCustomInfo() { return customInfo; } public void setCustomInfo(Map<String, String> customInfo) { this.customInfo = customInfo; } @Override public String toString() { StringBuilder sb=new StringBuilder(); sb.append(userName); if(customInfo!=null && customInfo.size()>0){ for(Map.Entry<String, String> entry : customInfo.entrySet()){ sb.append(",").append(entry.getKey()).append("=").append(entry.getValue()); } } return sb.toString(); } @Override public String getDisplayName() { return userName; } }
[ "wanghu-520@163.com" ]
wanghu-520@163.com
8d9dfdaff872bc7c9cb4dbf225fa4a1a2ee795e3
29acc5b6a535dfbff7c625f5513871ba55554dd2
/aws-java-sdk-inspector/src/main/java/com/amazonaws/services/inspector/model/transform/ListAssessmentsRequestMarshaller.java
1eda53d12b1ef6a1bc5fd4ba6ee39ef21d4c8706
[ "JSON", "Apache-2.0" ]
permissive
joecastro/aws-sdk-java
b2d25f6a503110d156853836b49390d2889c4177
fdbff1d42a73081035fa7b0f172b9b5c30edf41f
refs/heads/master
2021-01-21T16:52:46.982971
2016-01-11T22:55:28
2016-01-11T22:55:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,224
java
/* * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.inspector.model.transform; import static com.amazonaws.util.StringUtils.UTF8; import static com.amazonaws.util.StringUtils.COMMA_SEPARATOR; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.OutputStreamWriter; import java.io.StringWriter; import java.io.Writer; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.List; import java.util.regex.Pattern; import com.amazonaws.AmazonClientException; import com.amazonaws.Request; import com.amazonaws.DefaultRequest; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.inspector.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.util.BinaryUtils; import com.amazonaws.util.StringUtils; import com.amazonaws.util.StringInputStream; import com.amazonaws.util.json.*; /** * ListAssessmentsRequest Marshaller */ public class ListAssessmentsRequestMarshaller implements Marshaller<Request<ListAssessmentsRequest>, ListAssessmentsRequest> { public Request<ListAssessmentsRequest> marshall( ListAssessmentsRequest listAssessmentsRequest) { if (listAssessmentsRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(...)"); } Request<ListAssessmentsRequest> request = new DefaultRequest<ListAssessmentsRequest>( listAssessmentsRequest, "AmazonInspector"); request.addHeader("X-Amz-Target", "InspectorService.ListAssessments"); request.setHttpMethod(HttpMethodName.POST); request.setResourcePath(""); try { StringWriter stringWriter = new StringWriter(); JSONWriter jsonWriter = new JSONWriter(stringWriter); jsonWriter.object(); java.util.List<String> applicationArnsList = listAssessmentsRequest .getApplicationArns(); if (applicationArnsList != null) { jsonWriter.key("applicationArns"); jsonWriter.array(); for (String applicationArnsListValue : applicationArnsList) { if (applicationArnsListValue != null) { jsonWriter.value(applicationArnsListValue); } } jsonWriter.endArray(); } if (listAssessmentsRequest.getFilter() != null) { jsonWriter.key("filter"); AssessmentsFilterJsonMarshaller.getInstance().marshall( listAssessmentsRequest.getFilter(), jsonWriter); } if (listAssessmentsRequest.getNextToken() != null) { jsonWriter.key("nextToken").value( listAssessmentsRequest.getNextToken()); } if (listAssessmentsRequest.getMaxResults() != null) { jsonWriter.key("maxResults").value( listAssessmentsRequest.getMaxResults()); } jsonWriter.endObject(); String snippet = stringWriter.toString(); byte[] content = snippet.getBytes(UTF8); request.setContent(new StringInputStream(snippet)); request.addHeader("Content-Length", Integer.toString(content.length)); request.addHeader("Content-Type", "application/x-amz-json-1.1"); } catch (Throwable t) { throw new AmazonClientException( "Unable to marshall request to JSON: " + t.getMessage(), t); } return request; } }
[ "aws@amazon.com" ]
aws@amazon.com
f28a81ad1b7880ae3880b5d59407db05875bcf00
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/7/7_df28cb6616adf4f853d2df66b0cbbd63aaae01eb/Ouya/7_df28cb6616adf4f853d2df66b0cbbd63aaae01eb_Ouya_t.java
05521625bd4d0ddb2eace5e5c252b7f308bef9fa
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,584
java
package com.badlogic.gdx.controllers.mappings; import java.lang.reflect.Field; import com.badlogic.gdx.controllers.Controller; /** * Button and axis indices for the OUYA {@link Controller}. * @author mzechner * */ public class Ouya { public static final String ID = "OUYA Game Controller"; public static final int BUTTON_O; public static final int BUTTON_U; public static final int BUTTON_Y; public static final int BUTTON_A; public static final int BUTTON_DPAD_UP; public static final int BUTTON_DPAD_DOWN; public static final int BUTTON_DPAD_RIGHT; public static final int BUTTON_DPAD_LEFT; public static final int BUTTON_L1; public static final int BUTTON_L2; public static final int BUTTON_L3; public static final int BUTTON_R1; public static final int BUTTON_R2; public static final int BUTTON_R3; public static final int AXIS_LEFT_X; public static final int AXIS_LEFT_Y; public static final int AXIS_LEFT_TRIGGER; public static final int AXIS_RIGHT_X; public static final int AXIS_RIGHT_Y; public static final int AXIS_RIGHT_TRIGGER; /** whether the app is running on a real Ouya device **/ public static final boolean runningOnOuya; static { boolean isOuya = false; try { Class<?> buildClass = Class.forName("android.os.Build"); Field deviceField = buildClass.getDeclaredField("DEVICE"); Object device = deviceField.get(null); isOuya = "ouya_1_1".equals(device) || "cardhu".equals(device); } catch(Exception e) { } runningOnOuya = isOuya; if(isOuya) { BUTTON_O = 96; BUTTON_U = 99; BUTTON_Y = 100; BUTTON_A = 97; BUTTON_DPAD_UP = 19; BUTTON_DPAD_DOWN = 20; BUTTON_DPAD_RIGHT = 22; BUTTON_DPAD_LEFT = 21; BUTTON_L1 = 104; BUTTON_L2 = 102; BUTTON_L3 = 106; BUTTON_R1 = 105; BUTTON_R2 = 103; BUTTON_R3 = 107; AXIS_LEFT_X = 0; AXIS_LEFT_Y = 1; AXIS_LEFT_TRIGGER = 2; AXIS_RIGHT_X = 3; AXIS_RIGHT_Y = 4; AXIS_RIGHT_TRIGGER = 5; } else { BUTTON_O = 96; BUTTON_U = 97; BUTTON_Y = 98; BUTTON_A = 99; BUTTON_DPAD_UP = 104; BUTTON_DPAD_DOWN = 105; BUTTON_DPAD_RIGHT = 108; BUTTON_DPAD_LEFT = 109; BUTTON_L1 = 110; BUTTON_L2 = 100; BUTTON_L3 = 102; BUTTON_R1 = 106; BUTTON_R2 = 101; BUTTON_R3 = 103; AXIS_LEFT_X = 0; AXIS_LEFT_Y = 1; AXIS_LEFT_TRIGGER = 2; AXIS_RIGHT_X = 3; AXIS_RIGHT_Y = 4; AXIS_RIGHT_TRIGGER = 5; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a24caa7452cbf052456742d98f89111bd9dbdc4e
fb4e73b936ed10af52e7e971b7a0a39a805a86a9
/src/main/java/com/angkorteam/fintech/popup/PenaltyChargePopup.java
7ecd571e328793ec9d54c453df0356b612b841d0
[ "Apache-2.0" ]
permissive
Nkengnji/fintech
c82b67eea16d4fcc3d8aa6beb99b0fa6b943077d
84131d2fdf1d9e8dd55f5d22c65da45009b11859
refs/heads/master
2023-04-30T16:41:59.851714
2018-06-06T14:03:38
2018-06-06T14:03:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,257
java
package com.angkorteam.fintech.popup; import java.util.Map; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.model.Model; import org.apache.wicket.model.PropertyModel; import com.angkorteam.fintech.ddl.AccGLAccount; import com.angkorteam.fintech.ddl.MCharge; import com.angkorteam.fintech.dto.enums.AccountType; import com.angkorteam.fintech.dto.enums.AccountUsage; import com.angkorteam.fintech.dto.enums.ChargeType; import com.angkorteam.fintech.dto.enums.ProductPopup; import com.angkorteam.fintech.layout.Size; import com.angkorteam.fintech.layout.UIBlock; import com.angkorteam.fintech.layout.UIContainer; import com.angkorteam.fintech.layout.UIRow; import com.angkorteam.fintech.provider.SingleChoiceProvider; import com.angkorteam.framework.wicket.ajax.markup.html.form.AjaxButton; import com.angkorteam.framework.wicket.markup.html.form.Form; import com.angkorteam.framework.wicket.markup.html.form.select2.Option; import com.angkorteam.framework.wicket.markup.html.form.select2.Select2SingleChoice; public class PenaltyChargePopup extends PopupPanel { protected Form<Void> form; protected AjaxButton okayButton; protected UIRow row1; protected UIBlock chargeBlock; protected UIContainer chargeIContainer; protected PropertyModel<Option> chargeValue; protected SingleChoiceProvider chargeProvider; protected Select2SingleChoice<Option> chargeField; protected UIBlock accountBlock; protected UIContainer accountIContainer; protected PropertyModel<Option> accountValue; protected SingleChoiceProvider accountProvider; protected Select2SingleChoice<Option> accountField; protected String currencyCode; protected ProductPopup productPopup; public PenaltyChargePopup(String name, Map<String, Object> model, ProductPopup productPopup, String currencyCode) { super(name, model); this.currencyCode = currencyCode; this.productPopup = productPopup; } @Override protected void initData() { this.chargeValue = new PropertyModel<>(this.model, "chargeValue"); this.chargeProvider = new SingleChoiceProvider(MCharge.NAME, MCharge.Field.ID, MCharge.Field.NAME); if (this.productPopup == ProductPopup.Saving || this.productPopup == ProductPopup.Fixed || this.productPopup == ProductPopup.Recurring) { this.chargeProvider.applyWhere("charge_applies_to_enum", MCharge.Field.CHARGE_APPLIES_TO_ENUM + " = " + ChargeType.SavingDeposit.getLiteral()); } else if (this.productPopup == ProductPopup.Loan) { this.chargeProvider.applyWhere("charge_applies_to_enum", MCharge.Field.CHARGE_APPLIES_TO_ENUM + " = " + ChargeType.Loan.getLiteral()); } this.chargeProvider.applyWhere("currency_code", MCharge.Field.CURRENCY_CODE + " = '" + this.currencyCode + "'"); this.chargeProvider.applyWhere("is_penalty", MCharge.Field.IS_PENALTY + " = 1"); this.chargeProvider.applyWhere("is_active", MCharge.Field.IS_ACTIVE + " = 1"); this.accountValue = new PropertyModel<>(this.model, "accountValue"); this.accountProvider = new SingleChoiceProvider(AccGLAccount.NAME, AccGLAccount.Field.ID, AccGLAccount.Field.NAME); this.accountProvider.applyWhere("account_usage", AccGLAccount.Field.ACCOUNT_USAGE + " = " + AccountUsage.Detail.getLiteral()); this.accountProvider.applyWhere("classification_enum", AccGLAccount.Field.CLASSIFICATION_ENUM + " = " + AccountType.Income.getLiteral()); } @Override protected void initComponent() { this.form = new Form<>("form"); add(this.form); this.okayButton = new AjaxButton("okayButton"); this.okayButton.setOnSubmit(this::okayButtonSubmit); this.okayButton.setOnError(this::okayButtonError); this.form.add(this.okayButton); this.row1 = UIRow.newUIRow("row1", this.form); this.chargeBlock = this.row1.newUIBlock("chargeBlock", Size.Six_6); this.chargeIContainer = this.chargeBlock.newUIContainer("chargeIContainer"); this.chargeField = new Select2SingleChoice<>("chargeField", this.chargeValue, this.chargeProvider); this.chargeIContainer.add(this.chargeField); this.chargeIContainer.newFeedback("chargeFeedback", this.chargeField); this.accountBlock = this.row1.newUIBlock("accountBlock", Size.Six_6); this.accountIContainer = this.accountBlock.newUIContainer("accountIContainer"); this.accountField = new Select2SingleChoice<>("accountField", this.accountValue, this.accountProvider); this.accountIContainer.add(this.accountField); this.accountIContainer.newFeedback("accountFeedback", this.accountField); } @Override protected void configureMetaData() { this.accountField.setLabel(Model.of("Account")); this.chargeField.setLabel(Model.of("Charge")); } protected boolean okayButtonSubmit(AjaxButton ajaxButton, AjaxRequestTarget target) { this.window.setSignalId(ajaxButton.getId()); this.window.close(target); return true; } protected boolean okayButtonError(AjaxButton ajaxButton, AjaxRequestTarget target) { target.add(this.form); return true; } }
[ "pkayjava@gmail.com" ]
pkayjava@gmail.com
fd311e37a4d0c2f1b2c247f3c1d361ca108a224b
1aef4669e891333de303db570c7a690c122eb7dd
/src/main/java/com/alipay/api/domain/SsdataDataserviceDtevalDataanalysisSendModel.java
0dd79625ba1266f0231b745cb37cd655bcf25375
[ "Apache-2.0" ]
permissive
fossabot/alipay-sdk-java-all
b5d9698b846fa23665929d23a8c98baf9eb3a3c2
3972bc64e041eeef98e95d6fcd62cd7e6bf56964
refs/heads/master
2020-09-20T22:08:01.292795
2019-11-28T08:12:26
2019-11-28T08:12:26
224,602,331
0
0
Apache-2.0
2019-11-28T08:12:26
2019-11-28T08:12:25
null
UTF-8
Java
false
false
1,540
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-02-06 12:07:51 */ public class SsdataDataserviceDtevalDataanalysisSendModel extends AlipayObject { private static final long serialVersionUID = 6673691685411154231L; /** * 业务编号, 唯一流水标识 */ @ApiField("biz_number") private String bizNumber; /** * 业务来源,暂只支持上数来源数据流入 */ @ApiField("biz_source") private String bizSource; /** * 授权采集数据,爬取的完整数据加部分业务标识信息 */ @ApiField("data_content") private String dataContent; /** * 处理业务类型,包括运营商、公积金等 */ @ApiField("process_biz_type") private String processBizType; public String getBizNumber() { return this.bizNumber; } public void setBizNumber(String bizNumber) { this.bizNumber = bizNumber; } public String getBizSource() { return this.bizSource; } public void setBizSource(String bizSource) { this.bizSource = bizSource; } public String getDataContent() { return this.dataContent; } public void setDataContent(String dataContent) { this.dataContent = dataContent; } public String getProcessBizType() { return this.processBizType; } public void setProcessBizType(String processBizType) { this.processBizType = processBizType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
b7002dcb2d6217a1c410ad2e704181282c01a073
a006be286d4482aecf4021f62edd8dd9bb600040
/src/main/java/com/alipay/api/domain/AlipayMarketingCampaignRuleCrowdQueryModel.java
de4f03f3020935e5eb97ac79fb52a8965fb80e1e
[]
no_license
zero-java/alipay-sdk
16e520fbd69974f7a7491919909b24be9278f1b1
aac34d987a424497d8e8b1fd67b19546a6742132
refs/heads/master
2021-07-19T12:34:20.765988
2017-12-13T07:43:24
2017-12-13T07:43:24
96,759,166
0
0
null
2017-07-25T02:02:45
2017-07-10T09:20:13
Java
UTF-8
Java
false
false
775
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 圈人规则详情查询 * * @author auto create * @since 1.0, 2016-12-19 15:27:43 */ public class AlipayMarketingCampaignRuleCrowdQueryModel extends AlipayObject { private static final long serialVersionUID = 3343928545715129141L; /** * 签约商户下属机构唯一编号 */ @ApiField("mpid") private String mpid; /** * 所要查询的规则id */ @ApiField("ruleid") private String ruleid; public String getMpid() { return this.mpid; } public void setMpid(String mpid) { this.mpid = mpid; } public String getRuleid() { return this.ruleid; } public void setRuleid(String ruleid) { this.ruleid = ruleid; } }
[ "443683059a" ]
443683059a
0ac07e2faf9b9ead8f10b9bb26c90e444f23f591
d4929eb690c796b9e24c54cd641d7b56c411efdd
/com.oalam.examples.jpa.entity/test/jpa/entity/elementary/ex07/CreditCardTest.java
fd0b4c4c091cd79e05131fe95f43992d29bf4dfb
[]
no_license
oalam/cours
4efc03b8ef8cdc5aa61536bd1fbeb02ff7f24f39
bd2779c3d1b5cabf91cb98eefeda1134cbfb3c76
refs/heads/master
2020-05-21T13:17:14.388476
2012-12-04T11:24:39
2012-12-04T11:24:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,913
java
package jpa.entity.elementary.ex07; import static jpa.entity.Constants.PERSISTENCE_UNIT_NAME; import org.junit.AfterClass; import static org.junit.Assert.assertNotNull; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.EntityTransaction; import javax.persistence.Persistence; import java.sql.SQLException; /** * * * * * -- * Test class that creates a Customer */ public class CreditCardTest { // ====================================== // = Attributes = // ====================================== private static EntityManagerFactory emf; private static EntityManager em; private static EntityTransaction tx; // ====================================== // = Lifecycle Methods = // ====================================== @BeforeClass public static void initEntityManager() throws Exception { emf = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME); em = emf.createEntityManager(); } @AfterClass public static void closeEntityManager() throws SQLException { em.close(); emf.close(); } @Before public void initTransaction() { tx = em.getTransaction(); } // ====================================== // = Unit tests = // ====================================== @Test public void createCreditCard() throws Exception { CreditCard creditCard = new CreditCard("123412341234", "12/12", 1253, CreditCardType.AMERICAN_EXPRESS); tx.begin(); em.persist(creditCard); tx.commit(); assertNotNull("ID should not be null", creditCard.getNumber()); } }
[ "bailet.thomas@gmail.com" ]
bailet.thomas@gmail.com
142024daf4cbaee5d6605f2cafab6824ee75b54f
d1bd1246f161b77efb418a9c24ee544d59fd1d20
/android/framework/trunk/src/org/javenstudio/cocoka/worker/work/Scheduler.java
50880987d15b0c769ba566524d66b11dbf4b24c0
[]
no_license
navychen2003/javen
f9a94b2e69443291d4b5c3db5a0fc0d1206d2d4a
a3c2312bc24356b1c58b1664543364bfc80e816d
refs/heads/master
2021-01-20T12:12:46.040953
2015-03-03T06:14:46
2015-03-03T06:14:46
30,912,222
0
1
null
2023-03-20T11:55:50
2015-02-17T10:24:28
Java
UTF-8
Java
false
false
4,822
java
package org.javenstudio.cocoka.worker.work; import java.util.concurrent.atomic.AtomicInteger; import org.javenstudio.cocoka.worker.AbstractTask; import org.javenstudio.cocoka.worker.Constants; import org.javenstudio.cocoka.worker.TaskQueue; import org.javenstudio.cocoka.worker.TaskQueueHelper; import org.javenstudio.cocoka.worker.queue.AdvancedQueueFactory; import org.javenstudio.common.util.Logger; public final class Scheduler { private static Logger LOG = Logger.getLogger(Scheduler.class); static final AtomicInteger sWorkflowIdGenerator = new AtomicInteger(1); static final AtomicInteger sWorkIdGenerator = new AtomicInteger(1); public static int newWorkflowID() { return sWorkflowIdGenerator.getAndIncrement(); } public static int newWorkID() { return sWorkIdGenerator.getAndIncrement(); } private final AdvancedQueueFactory mFactory; private final TaskQueue mQueue; public Scheduler() { this(TaskQueueHelper.getDefaultFactory()); } public Scheduler(AdvancedQueueFactory factory) { mFactory = factory; mQueue = new TaskQueue(factory, null); } public final TaskQueue getQueue() { return mQueue; } public final AdvancedQueueFactory getQueueFactory() { return mFactory; } public Workflow newWorkflow(String name) { return new Workflow(name); } public final void post(final Work work) throws InterruptedException, WorkException { if (work == null) throw new NullPointerException("work is null"); checkThread(); synchronized (work) { if (work.mWorkflow != null) throw new WorkException("work: "+work+" must posted by its workflow"); mQueue.post(work); } } public final void post(final Workflow flow) throws InterruptedException, WorkException { if (flow == null) throw new NullPointerException("workflow is null"); checkThread(); if (flow.mStatus != Workflow.STATUS_STARTADD) throw new WorkException("workflow: "+flow+" already posted"); synchronized (flow) { flow.mStatus = Workflow.STATUS_STARTRUN; mQueue.post(new AbstractTask() { public String getName() { return flow.getName(); } public void onRun() { onStartWorkflow(flow); } }); } } private final void postAtTimeOrDelayed(final Work work, long uptimeMillis, long delayMillis) throws InterruptedException, WorkException { if (work == null) throw new NullPointerException("work is null"); checkThread(); synchronized (work) { if (work.mWorkflow != null) throw new WorkException("work: "+work+" must posted by its workflow"); if (uptimeMillis > 0) { mQueue.postAtTime(work, uptimeMillis); } else if (delayMillis > 0) { mQueue.postDelayed(work, delayMillis); } else mQueue.post(work); } } private final void postAtTimeOrDelayed(final Workflow flow, long uptimeMillis, long delayMillis) throws InterruptedException, WorkException { if (flow == null) throw new NullPointerException("workflow is null"); checkThread(); if (flow.mStatus != Workflow.STATUS_STARTADD) throw new WorkException("workflow: "+flow+" already posted"); synchronized (flow) { flow.mStatus = Workflow.STATUS_STARTRUN; AbstractTask task = new AbstractTask() { public String getName() { return flow.getName(); } public void onRun() { onStartWorkflow(flow); } }; if (uptimeMillis > 0) { mQueue.postAtTime(task, uptimeMillis); } else if (delayMillis > 0) { mQueue.postDelayed(task, delayMillis); } else { mQueue.post(task); } } } public final void postAtTime(final Work work, long uptimeMillis) throws InterruptedException, WorkException { postAtTimeOrDelayed(work, uptimeMillis, 0); } public final void postAtTime(final Workflow flow, long uptimeMillis) throws InterruptedException, WorkException { postAtTimeOrDelayed(flow, uptimeMillis, 0); } public final void postDelayed(final Work work, long delayMillis) throws InterruptedException, WorkException { postAtTimeOrDelayed(work, 0, delayMillis); } public final void postDelayed(final Workflow flow, long delayMillis) throws InterruptedException, WorkException { postAtTimeOrDelayed(flow, 0, delayMillis); } private void onStartWorkflow(final Workflow flow) { if (LOG.isDebugEnabled()) LOG.debug("start workflow: " + flow); for (int i=0; i < flow.getWorkSize(); i++) { Work work = flow.getWork(i); try { mQueue.postAfter(work, work.mAfter); } catch (InterruptedException e) { } } } private void checkThread() { String threadName = Thread.currentThread().getName(); if (threadName.startsWith(Constants.THREAD_PREFIX)) throw new RuntimeException("Cannot post new work from Worker thread: "+threadName); } }
[ "navychen2003@hotmail.com" ]
navychen2003@hotmail.com
d7e4e714a3ed7f84b6665d13543f3a8cb0976f1f
d3bf4dfd7b48597f13f656a1f28eca1e79c1cb2a
/smipay-service/src/main/java/com/smi/pay/dao/OrderDao.java
2e1400c2a1e2a5ba1d019fabf345611c76c540b8
[]
no_license
zengchi/project
6a5b0d71ec6e7bcc8d32380509b34d9eebbe1ed7
a72c4aabb260bca8d2e340f2262d2f6c53f98898
refs/heads/master
2021-04-08T14:37:56.661873
2017-12-23T02:42:31
2017-12-23T02:42:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
492
java
package com.smi.pay.dao; import com.smi.pay.model.Order; import java.util.List; import java.util.Map; public interface OrderDao { int deleteByPrimaryKey(Integer id); int insert(Order order); int update(Order order); Order load(Integer id); Order getByNO(String billNo); Order getLikeNO(String billNo); List getAll(Map filter); /** * 根据序列号查询订单详情 * * @param reqNo * 请求序列号 * @return */ Order getByReqNo(String reqNo); }
[ "32216688+henry90821@users.noreply.github.com" ]
32216688+henry90821@users.noreply.github.com
ca6f1ea6a639758433c8476b47a1d5f97bc4f713
9856541e29e2597f2d0a7ef4729208190d9bbebe
/spring-beans/src/main/java/org/springframework/beans/factory/xml/DelegatingEntityResolver.java
2fbfe5381b1c99478ebe3268f7bfe44b9f478721
[ "Apache-2.0" ]
permissive
lakeslove/springSourceCodeTest
74bffc0756fa5ea844278827d86a085b9fe4c14e
25caac203de57c4b77268be60df2dcb2431a03e1
refs/heads/master
2020-12-02T18:10:14.048955
2017-07-07T00:41:55
2017-07-07T00:41:55
96,483,747
1
0
null
null
null
null
UTF-8
Java
false
false
3,266
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.beans.factory.xml; import java.io.IOException; import org.xml.sax.EntityResolver; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.springframework.util.Assert; /** * {@link EntityResolver} implementation that delegates to a {@link BeansDtdResolver} * and a {@link PluggableSchemaResolver} for DTDs and XML schemas, respectively. * * @author Rob Harrop * @author Juergen Hoeller * @author Rick Evans * @since 2.0 * @see BeansDtdResolver * @see PluggableSchemaResolver */ public class DelegatingEntityResolver implements EntityResolver { /** Suffix for DTD files */ public static final String DTD_SUFFIX = ".dtd"; /** Suffix for schema definition files */ public static final String XSD_SUFFIX = ".xsd"; private final EntityResolver dtdResolver; private final EntityResolver schemaResolver; /** * Create a new DelegatingEntityResolver that delegates to * a default {@link BeansDtdResolver} and a default {@link PluggableSchemaResolver}. * <p>Configures the {@link PluggableSchemaResolver} with the supplied * {@link ClassLoader}. * @param classLoader the ClassLoader to use for loading * (can be {@code null}) to use the default ClassLoader) */ public DelegatingEntityResolver(ClassLoader classLoader) { this.dtdResolver = new BeansDtdResolver(); this.schemaResolver = new PluggableSchemaResolver(classLoader); } /** * Create a new DelegatingEntityResolver that delegates to * the given {@link EntityResolver EntityResolvers}. * @param dtdResolver the EntityResolver to resolve DTDs with * @param schemaResolver the EntityResolver to resolve XML schemas with */ public DelegatingEntityResolver(EntityResolver dtdResolver, EntityResolver schemaResolver) { Assert.notNull(dtdResolver, "'dtdResolver' is required"); Assert.notNull(schemaResolver, "'schemaResolver' is required"); this.dtdResolver = dtdResolver; this.schemaResolver = schemaResolver; } @Override public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { if (systemId != null) { if (systemId.endsWith(DTD_SUFFIX)) { return this.dtdResolver.resolveEntity(publicId, systemId); } else if (systemId.endsWith(XSD_SUFFIX)) { return this.schemaResolver.resolveEntity(publicId, systemId); } } return null; } @Override public String toString() { return "EntityResolver delegating " + XSD_SUFFIX + " to " + this.schemaResolver + " and " + DTD_SUFFIX + " to " + this.dtdResolver; } }
[ "lakeslove@126.com" ]
lakeslove@126.com
119d992dc0d20586ea7aba5d744193a533bab0eb
a7397709e9ff6eca5a8117b4479bcc64a4e41d4b
/components/visual-panels/usermgr/src/java/vpanels/app/usermgr/com/oracle/solaris/vp/panels/usermgr/client/swing/NumericDocument.java
fc8ee1b085dc66153728e3f14361e176dc4b9bb9
[]
no_license
alhazred/userland
6fbd28d281c08cf76f59e41e1331fe49fea6bcf2
72ea01e9a0ea237c9a960b3533273dc0afe06ff2
refs/heads/master
2020-05-17T10:17:16.836583
2013-03-04T07:36:23
2013-03-04T07:36:23
8,550,473
2
0
null
null
null
null
UTF-8
Java
false
false
1,572
java
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License (the "License"). * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. * See the License for the specific language governing permissions * and limitations under the License. * * When distributing Covered Code, include this CDDL HEADER in each * file and include the License file at usr/src/OPENSOLARIS.LICENSE. * If applicable, add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your own identifying * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. */ package com.oracle.solaris.vp.panels.usermgr.client.swing; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.PlainDocument; /** * The {@code NumericDocument} class is a custom Document that restricts * the characters in the {@code HintTextField} to numeric values. */ public class NumericDocument extends PlainDocument { // // PlainDocument Methods // @Override public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { // strip out non-numeric characters str = str.replaceAll("\\D+", ""); super.insertString(offs, str, a); } }
[ "a.eremin@nexenta.com" ]
a.eremin@nexenta.com
06941d9cdb535865ea87ef9acd71931c86d4f2bf
54c21b5af8c7a0c2d965fbd6f9df643033e83f38
/src/main/java/threadcoreknowledge/singleton/Singleton6.java
a3a7676c6f690519d9eddbb733add24dd9b872f5
[]
no_license
somepeopleHavingDream/concurrency_in_practice
5866775748d22182d8b89d42742e57a41b151481
b7faf52889c69901dd917952f8ed1ddbfc5f929b
refs/heads/master
2022-08-29T13:31:32.128008
2022-08-12T10:30:22
2022-08-12T10:30:22
208,407,120
5
0
null
null
null
null
UTF-8
Java
false
false
541
java
package threadcoreknowledge.singleton; /** * 双重检查(推荐面试使用) * * @author yangxin * 2019/10/04 18:12 */ public class Singleton6 { private volatile static Singleton6 instance; private Singleton6() { } public synchronized static Singleton6 getInstance() { if (instance == null) { synchronized (Singleton6.class) { if (instance == null) { instance = new Singleton6(); } } } return instance; } }
[ "1393003255@qq.com" ]
1393003255@qq.com
6d33064f3a5f7a1d2ec57be3156c5752807fa01e
1717658d60f8ca5400c8ad0bc49116e94e6164fa
/src/main/java/me/carbou/mathieu/tictactoe/Main.java
babe3f1e6c4277974ec84538d61504c835cc0cf5
[ "Apache-2.0" ]
permissive
mathieucarbou/tic-tac-toe
98a07b84d4677d8d46a27c2a640bf3bd43a8abc4
58ddb6e7bb4a5bd4010b445dc258f362b68e02ee
refs/heads/master
2020-06-02T12:05:27.103074
2015-07-13T21:21:03
2015-07-13T21:21:03
38,764,425
0
0
null
null
null
null
UTF-8
Java
false
false
3,924
java
/** * Copyright (C) 2015 Mathieu Carbou (mathieu@carbou.me) * * 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 me.carbou.mathieu.tictactoe; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Stage; import com.guestful.jaxrs.filter.cache.CacheControlFeature; import com.guestful.jaxrs.filter.cors.CorsFilter; import com.guestful.jaxrs.filter.jsend.JSendFeature; import com.guestful.jaxrs.json.JsonProvider; import com.guestful.jaxrs.security.filter.SecurityFeature; import com.guestful.jersey.GApplication; import com.guestful.jersey.container.Container; import com.guestful.json.JsonMapper; import com.guestful.logback.LogbackConfigurator; import com.mycila.guice.ext.service.ServiceModule; import me.carbou.mathieu.tictactoe.rest.*; import org.glassfish.jersey.filter.LoggingFilter; import org.glassfish.jersey.jsonp.JsonProcessingFeature; import org.glassfish.jersey.message.DeflateEncoder; import org.glassfish.jersey.message.GZipEncoder; import org.glassfish.jersey.oauth1.signature.OAuth1SignatureFeature; import org.glassfish.jersey.server.ServerProperties; import org.glassfish.jersey.server.filter.EncodingFilter; import org.glassfish.jersey.server.filter.HttpMethodOverrideFilter; import org.jvnet.hk2.guice.bridge.api.GuiceBridge; import org.jvnet.hk2.guice.bridge.api.GuiceIntoHK2Bridge; /** * @author Mathieu Carbou (mathieu.carbou@gmail.com) */ public class Main extends GApplication { @Override public void configure(Container container) { LogbackConfigurator.configure(Thread.currentThread().getContextClassLoader().getResource("envs/" + Env.NAME + "/logback.xml")); container .setPort(Env.PORT) .setMaxWorkers(Env.WORKERS) .setContextPath("/"); } @Override public void initialize() { // guice Injector injector = Guice.createInjector(Stage.PRODUCTION, new ServiceModule()); GuiceBridge.getGuiceBridge().initializeGuiceBridge(getServiceLocator()); getServiceLocator().getService(GuiceIntoHK2Bridge.class).bridgeGuiceInjector(injector); property(ServerProperties.WADL_FEATURE_DISABLE, true); property(ServerProperties.APPLICATION_NAME, Env.MODULE); // server registerClasses(LifecycleListener.class); // content processing registerClasses(JsonProcessingFeature.class); register(new JsonProvider(injector.getInstance(JsonMapper.class))); register(OAuth1SignatureFeature.class); // filters register(new CorsFilter() .setAllowedOrigins("*") .setAllowedHeaders("X-Requested-With,Content-Type,Accept,Origin,X-HTTP-Method-Override,Authorization") .setAllowedMethods("GET,POST,PUT,DELETE")); registerClasses( LoggingFilter.class, HttpMethodOverrideFilter.class, SecurityFeature.class, JSendFeature.class, CacheControlFeature.class, GZipEncoder.class, DeflateEncoder.class, EncodingFilter.class ); registerClasses( StaticResource.class, UserResource.class, GameResource.class, ApiResource.class, AppDirectResource.class ); } public static void main(String... args) throws Exception { new Main().run(args); } }
[ "mathieu.carbou@gmail.com" ]
mathieu.carbou@gmail.com
d718eddb9a8903eb34aecfbd63b9ee9b0974c0b0
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project82/src/main/java/org/gradle/test/performance82_5/Production82_480.java
0bfe123225bbbe7a28f571c98bf67f32e0826e92
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance82_5; public class Production82_480 extends org.gradle.test.performance16_5.Production16_480 { private final String property; public Production82_480() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
839e4805ec26e40ecf2e7a2ca84638f56bcd76b0
d9e3bf027a7f1e81044f4a765c9139e1bfbdf0df
/endtoenddemo/src/main/java/sg/edu/iss/endtoenddemo/controller/DepartmentController.java
37cb24ec7b80f0a46a285506aa54f2a3cbf12a29
[]
no_license
Sarah-Wai/SA50
4ab7288f2bc6294ab14a4133ca539e3b25ac0ec6
382a5a84282243e89e5c26f1e6590ec729da4b7b
refs/heads/master
2022-11-07T08:45:13.172021
2020-06-28T19:05:31
2020-06-28T19:05:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,994
java
package sg.edu.iss.endtoenddemo.controller; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import sg.edu.iss.endtoenddemo.domain.Department; import sg.edu.iss.endtoenddemo.service.DepartmentService; import sg.edu.iss.endtoenddemo.service.DepartmentServiceImpl; @Controller @RequestMapping(value = "/dept") public class DepartmentController { @Autowired private DepartmentService dservice; @Autowired public void setDepartmentService(DepartmentServiceImpl dserviceImpl) { this.dservice = dserviceImpl; } @RequestMapping(value = "/list") public String list(Model model) { model.addAttribute("dlist", dservice.findAll()); return "department-list"; } @RequestMapping(value = "/add") public String addForm(Model model) { model.addAttribute("department", new Department()); return "department-form"; } @RequestMapping(value = "/edit/{id}") public String editForm(@PathVariable("id") Integer id, Model model) { model.addAttribute("department", dservice.findDepartmentById(id)); return "department-form"; } @RequestMapping(value = "/save") public String saveDepartment(@ModelAttribute("department") @Valid Department department, BindingResult bindingResult, Model model) { if (bindingResult.hasErrors()) { return "department-form"; } dservice.saveDepartment(department); return "forward:/dept/list"; } @RequestMapping(value = "/delete/{id}") public String deleteDepartment(@PathVariable("id") Integer id) { dservice.deleteDepartment(dservice.findDepartmentById(id)); return "forward:/dept/list"; } }
[ "suria.r.asai@gmail.com" ]
suria.r.asai@gmail.com
b40cdec3ae79d2dd919d7e697ff83f17e89fc24e
eb330cdbb8f7e10fa900529e5079080447a73461
/cascading-expression/src/test/java/cascading/operation/expression/ScriptTest.java
80bca335dfae5e5a2bd16ba6b23f609fb9e52dc6
[ "Apache-2.0" ]
permissive
cwensel/cascading
20cdf1259db5b3cd8d7f7cb524ba0eba29cad5fb
f2785118ce7be0abd4fe102e94a0f20fb97aa4f0
refs/heads/4.5
2023-08-23T23:51:22.326915
2023-07-31T02:47:07
2023-07-31T02:47:07
121,672
165
71
NOASSERTION
2023-07-20T22:43:13
2009-02-04T17:52:06
Java
UTF-8
Java
false
false
6,595
java
/* * Copyright (c) 2007-2022 The Cascading Authors. All Rights Reserved. * * Project and contact information: https://cascading.wensel.net/ * * This file is part of the Cascading 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 cascading.operation.expression; import cascading.CascadingTestCase; import cascading.flow.FlowProcess; import cascading.operation.ConcreteCall; import cascading.tuple.Fields; import cascading.tuple.Tuple; import cascading.tuple.TupleEntry; import org.junit.Test; /** * */ public class ScriptTest extends CascadingTestCase { public ScriptTest() { } @Test public void testSimpleScript() { Class returnType = Long.class; String[] names = new String[]{"a", "b"}; Class[] types = new Class[]{long.class, int.class}; assertEquals( 3l, evaluate( "return a + b;", returnType, names, types, getEntry( 1, 2 ) ) ); assertEquals( 3l, evaluate( "return a + b;", returnType, names, types, getEntry( 1.0, 2.0 ) ) ); assertEquals( 3l, evaluate( "return a + b;", returnType, names, types, getEntry( "1", 2.0 ) ) ); returnType = Double.class; types = new Class[]{double.class, int.class}; assertEquals( 3d, evaluate( "return a + b;", returnType, names, types, getEntry( 1, 2 ) ) ); assertEquals( 3d, evaluate( "return a + b;", returnType, names, types, getEntry( 1.0, 2.0 ) ) ); assertEquals( 3d, evaluate( "return a + b;", returnType, names, types, getEntry( "1", 2.0 ) ) ); returnType = Boolean.TYPE; names = new String[]{"a", "b"}; types = new Class[]{String.class, int.class}; assertEquals( true, evaluate( "return (a != null) && (b > 0);", returnType, names, types, getEntry( "1", 2.0 ) ) ); names = new String[]{"$0", "$1"}; types = new Class[]{String.class, int.class}; assertEquals( true, evaluate( "return ($0 != null) && ($1 > 0);", returnType, names, types, getEntry( "1", 2.0 ) ) ); names = new String[]{"a", "b", "c"}; types = new Class[]{float.class, String.class, String.class}; assertEquals( true, evaluate( "return b.equals(\"1\") && (a == 2.0) && c.equals(\"2\");", returnType, names, types, getEntry( 2.0, "1", "2" ) ) ); names = new String[]{"a", "b", "$2"}; types = new Class[]{float.class, String.class, String.class}; assertEquals( true, evaluate( "return b.equals(\"1\") && (a == 2.0) && $2.equals(\"2\");", returnType, names, types, getEntry( 2.0, "1", "2" ) ) ); String script = ""; script += "boolean first = b.equals(\"1\");\n"; script += "return first && (a == 2.0) && $2.equals(\"2\");\n"; assertEquals( true, evaluate( script, returnType, names, types, getEntry( 2.0, "1", "2" ) ) ); } @Test public void testSimpleScriptTyped() { Class returnType = Long.class; String[] names = new String[]{"a", "b"}; Class[] types = new Class[]{long.class, int.class}; assertEquals( 3l, evaluate( "return a + b;", returnType, getEntry( names, types, 1L, 2 ) ) ); returnType = Double.class; types = new Class[]{double.class, int.class}; assertEquals( 3d, evaluate( "return a + b;", returnType, getEntry( names, types, 1.0d, 2 ) ) ); returnType = Boolean.TYPE; names = new String[]{"a", "b"}; types = new Class[]{String.class, float.class}; assertEquals( true, evaluate( "return (a != null) && (b > 0);", returnType, getEntry( names, types, "1", 2.0 ) ) ); names = new String[]{"$0", "$1"}; types = new Class[]{String.class, float.class}; assertEquals( true, evaluate( "return ($0 != null) && ($1 > 0);", returnType, getEntry( names, types, "1", 2.0 ) ) ); names = new String[]{"a", "b", "c"}; types = new Class[]{float.class, String.class, String.class}; assertEquals( true, evaluate( "return b.equals(\"1\") && (a == 2.0) && c.equals(\"2\");", returnType, getEntry( names, types, 2.0, "1", "2" ) ) ); names = new String[]{"a", "b", "$2"}; types = new Class[]{float.class, String.class, String.class}; assertEquals( true, evaluate( "return b.equals(\"1\") && (a == 2.0) && $2.equals(\"2\");", returnType, getEntry( names, types, 2.0, "1", "2" ) ) ); String script = ""; script += "boolean first = b.equals(\"1\");\n"; script += "return first && (a == 2.0) && $2.equals(\"2\");\n"; assertEquals( true, evaluate( script, returnType, getEntry( names, types, 2.0, "1", "2" ) ) ); } private Object evaluate( String expression, Class returnType, String[] names, Class[] types, TupleEntry tupleEntry ) { ScriptFunction function = new ScriptFunction( new Fields( "result" ), expression, returnType, names, types ); ConcreteCall<ExpressionOperation.Context> call = new ConcreteCall<ExpressionOperation.Context>( tupleEntry.getFields(), function.getFieldDeclaration() ); function.prepare( FlowProcess.NULL, call ); return function.evaluate( call.getContext(), tupleEntry ); } private Object evaluate( String expression, Class returnType, TupleEntry tupleEntry ) { ScriptFunction function = new ScriptFunction( new Fields( "result" ), expression, returnType ); ConcreteCall<ExpressionOperation.Context> call = new ConcreteCall<ExpressionOperation.Context>( tupleEntry.getFields(), function.getFieldDeclaration() ); function.prepare( FlowProcess.NULL, call ); return function.evaluate( call.getContext(), tupleEntry ); } private TupleEntry getEntry( Comparable lhs, Comparable rhs ) { Fields fields = new Fields( "a", "b" ); Tuple parameters = new Tuple( lhs, rhs ); return new TupleEntry( fields, parameters ); } private TupleEntry getEntry( String[] names, Class[] types, Object... values ) { Fields fields = new Fields( names ).applyTypes( types ); Tuple parameters = new Tuple( values ); return new TupleEntry( fields, parameters ); } private TupleEntry getEntry( Comparable f, Comparable s, Comparable t ) { Fields fields = new Fields( "a", "b", "c" ); Tuple parameters = new Tuple( f, s, t ); return new TupleEntry( fields, parameters ); } }
[ "chris@wensel.net" ]
chris@wensel.net
1f69845fb9d410ef6632dc3aee684b68c8dfac63
e7461315af5fa60038c7b4284a8adcea92da4806
/src/test/java/com/github/marschall/memoryfilesystem/MacOsMemoryFileSystemTest.java
41d5d53b54f71f136d6eda9df9fb845a8b1d737f
[]
no_license
marschall/memoryfilesystem
a3194fc90353cb07316a82f7919e2a360fa8a93c
09dfbd91f58cebfca876f3be05d1c5565d546249
refs/heads/master
2023-05-24T16:54:20.170381
2023-05-14T17:41:01
2023-05-14T17:41:01
7,135,155
239
36
null
2023-05-13T08:43:06
2012-12-12T18:12:30
Java
UTF-8
Java
false
false
7,821
java
package com.github.marschall.memoryfilesystem; import static com.github.marschall.memoryfilesystem.FileExistsMatcher.exists; import static com.github.marschall.memoryfilesystem.IsSameFileMatcher.isSameFile; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.not; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.IOException; import java.lang.annotation.Retention; import java.lang.annotation.Target; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.nio.channels.NonWritableChannelException; import java.nio.file.DirectoryStream; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.InvalidPathException; import java.nio.file.Path; import java.nio.file.PathMatcher; import java.nio.file.StandardOpenOption; import java.text.Normalizer; import java.text.Normalizer.Form; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.junit.jupiter.api.extension.RegisterExtension; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; class MacOsMemoryFileSystemTest { private static final String DISPLAY_NAME = "native: {0}"; @RegisterExtension final MacOsFileSystemExtension extension = new MacOsFileSystemExtension(); private FileSystem fileSystem; FileSystem getFileSystem(boolean useDefault) { if (this.fileSystem == null) { if (useDefault) { this.fileSystem = FileSystems.getDefault(); } else { this.fileSystem = this.extension.getFileSystem(); } } return this.fileSystem; } static List<Object[]> fileSystems() { String osName = (String) System.getProperties().get("os.name"); boolean isMac = osName.startsWith("Mac"); if (isMac) { return Arrays.asList(new Object[]{true}, new Object[]{false}); } else { return Collections.singletonList(new Object[]{false}); } } @Target(METHOD) @Retention(RUNTIME) @ParameterizedTest(name = DISPLAY_NAME) @MethodSource("fileSystems") @interface CompatibilityTest { } @CompatibilityTest void macOsNormalization(boolean useDefault) throws IOException { FileSystem fileSystem = this.getFileSystem(useDefault); String aUmlaut = "\u00C4"; Path aPath = fileSystem.getPath(aUmlaut); String normalized = Normalizer.normalize(aUmlaut, Form.NFD); Path nPath = fileSystem.getPath(normalized); Path createdFile = null; try { createdFile = Files.createFile(aPath); assertEquals(1, createdFile.getFileName().toString().length()); assertEquals(1, createdFile.toAbsolutePath().getFileName().toString().length()); assertEquals(1, createdFile.toRealPath().getFileName().toString().length()); assertThat(aPath, exists()); assertThat(nPath, exists()); assertThat(aPath, isSameFile(nPath)); assertThat(nPath, isSameFile(aPath)); assertThat(aPath, equalTo(nPath)); } finally { if (createdFile != null) { Files.delete(createdFile); } } } @CompatibilityTest void macOsComparison(boolean useDefault) throws IOException { FileSystem fileSystem = this.getFileSystem(useDefault); Path aLower = fileSystem.getPath("a"); Path aUpper = fileSystem.getPath("A"); assertThat(aLower, not(equalTo(aUpper))); Path createdFile = null; try { createdFile = Files.createFile(aLower); assertThat(aLower, exists()); assertThat(aUpper, exists()); assertThat(aLower, isSameFile(aUpper)); } finally { if (createdFile != null) { Files.delete(createdFile); } } } @CompatibilityTest void forbiddenCharacters(boolean useDefault) { char c = 0; assertThrows(InvalidPathException.class, () -> this.getFileSystem(useDefault).getPath(c + ".txt"), "0x00 should be forbidden"); } @CompatibilityTest void notForbiddenCharacters(boolean useDefault) throws IOException { for (int i = 1; i < 128; ++i) { char c = (char) i; if (c != '/') { Path path = this.getFileSystem(useDefault).getPath(c + ".txt"); assertNotNull(path); try { Files.createFile(path); } finally { Files.delete(path); } } } } @CompatibilityTest void macOsPaths(boolean useDefault) { FileSystem fileSystem = this.getFileSystem(useDefault); String aUmlaut = "\u00C4"; String normalized = Normalizer.normalize(aUmlaut, Form.NFD); assertEquals(1, aUmlaut.length()); assertEquals(2, normalized.length()); Path aPath = fileSystem.getPath("/" + aUmlaut); Path nPath = fileSystem.getPath("/" + normalized); assertEquals(1, aPath.getName(0).toString().length()); assertThat(aPath, equalTo(nPath)); } @CompatibilityTest void caseInsensitivePatterns(boolean useDefault) throws IOException { FileSystem fileSystem = this.extension.getFileSystem(); Path child1 = fileSystem.getPath("child1"); Files.createFile(child1); try { boolean found = false; try (DirectoryStream<Path> stream = Files.newDirectoryStream(fileSystem.getPath(""))) { PathMatcher regexMatcher = fileSystem.getPathMatcher("regex:CHILD.*"); PathMatcher globMatcher = fileSystem.getPathMatcher("glob:CHILD*"); for (Path path : stream) { assertTrue(regexMatcher.matches(path)); assertTrue(globMatcher.matches(path)); found = true; } } assertTrue(found); } finally { if (useDefault) { Files.delete(child1); } } } @CompatibilityTest void channelOnDirectoryReading(boolean useDefault) throws IOException { for (String path : new String[] {"child1", "/"}) { FileSystem fileSystem = this.getFileSystem(useDefault); Path directory = fileSystem.getPath(path); boolean created = false; if (!Files.exists(directory)) { Files.createDirectory(directory); created = true; } try (FileChannel channel = FileChannel.open(directory, StandardOpenOption.READ)) { channel.force(true); assertTrue(channel.isOpen()); assertEquals(0, channel.position()); channel.position(1L); assertEquals(1L, channel.position()); assertThrows(IOException.class, () -> channel.read(ByteBuffer.allocate(1))); assertThrows(NonWritableChannelException.class, () -> channel.write(ByteBuffer.allocate(1))); assertThrows(NonWritableChannelException.class, () -> channel.lock()); // TODO // assertThrows(OverlappingFileLockException.class, () -> channel.lock(0L, 1L, true)); assertThrows(NonWritableChannelException.class, () -> channel.lock(0L, 1L, false)); assertThrows(NonWritableChannelException.class, () -> channel.truncate(5L)); } finally { if (created) { Files.delete(directory); } } } } @CompatibilityTest void channelOnDirectoryWriting(boolean useDefault) throws IOException { FileSystem fileSystem = this.getFileSystem(useDefault); Path child1 = fileSystem.getPath("child1"); Files.createDirectory(child1); try { assertThrows(IOException.class, () -> FileChannel.open(child1, StandardOpenOption.WRITE)); } finally { if (useDefault) { Files.delete(child1); } } } }
[ "philippe.marschall@gmail.com" ]
philippe.marschall@gmail.com
b22240b049ba7a2ff403656a2ba10ad6362aa791
b73536e93ef45bd162b523a28351db8cfb484e8f
/JonsTools/src/main/java/uk/ac/soton/ecs/jsh2/mediaeval13/placing/indexing/LuceneQSIFTBuilder.java
cacc7c5728910c2fd921b719ab90320e1c4aadea
[]
no_license
daviesjamie/soton-mediaeval2013
ff76d36f765b6e938b36e10ab6d3286ad322f08d
e6e4bdc750e5bdd76d1293665728ebc306507843
refs/heads/master
2021-10-10T02:26:02.993613
2021-10-04T15:08:26
2021-10-04T15:08:26
11,001,582
0
0
null
2021-10-04T15:08:27
2013-06-27T16:09:15
Java
UTF-8
Java
false
false
2,697
java
package uk.ac.soton.ecs.jsh2.mediaeval13.placing.indexing; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Map.Entry; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.BytesWritable; import org.apache.hadoop.io.Text; import org.apache.lucene.analysis.core.WhitespaceAnalyzer; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field.Store; import org.apache.lucene.document.LongField; import org.apache.lucene.document.TextField; import org.apache.lucene.index.IndexWriter; import org.apache.lucene.index.IndexWriterConfig; import org.apache.lucene.store.Directory; import org.apache.lucene.store.SimpleFSDirectory; import org.apache.lucene.util.Version; import org.openimaj.feature.local.list.MemoryLocalFeatureList; import org.openimaj.hadoop.sequencefile.TextBytesSequenceFileUtility; import org.openimaj.image.feature.local.keypoints.quantised.QuantisedKeypoint; /** * This builds a lucene index from quantised SIFT visual terms (pulling data * straight from the hdfs). No idea how well it will work... * * @author Jonathon Hare (jsh2@ecs.soton.ac.uk) */ public class LuceneQSIFTBuilder { public static void main(String[] args) throws IOException { final Path[] paths = TextBytesSequenceFileUtility.getFilePaths( "hdfs://seurat/data/mediaeval/placing/sift1x-quant1m.seq/", "part-m"); final String indexPath = "/Volumes/SSD/mediaeval13/visual.lucene"; final WhitespaceAnalyzer a = new WhitespaceAnalyzer(Version.LUCENE_43); final IndexWriterConfig iwc = new IndexWriterConfig(Version.LUCENE_43, a); iwc.setRAMBufferSizeMB(512); Directory directory; directory = new SimpleFSDirectory(new File(indexPath)); final IndexWriter indexWriter = new IndexWriter(directory, iwc); for (final Path path : paths) { System.out.println("Processing " + path); final TextBytesSequenceFileUtility sequenceFile = new TextBytesSequenceFileUtility(path.toString(), true); for (final Entry<Text, BytesWritable> entry : sequenceFile) { final List<QuantisedKeypoint> keys = MemoryLocalFeatureList.read(new ByteArrayInputStream(entry .getValue().getBytes()), QuantisedKeypoint.class); final StringBuilder sb = new StringBuilder(); for (final QuantisedKeypoint kp : keys) { sb.append(kp.id); sb.append(" "); } final Document doc = new Document(); doc.add(new LongField("id", Long.parseLong(entry.getKey().toString()), Store.YES)); doc.add(new TextField("qsift", sb.toString(), Store.YES)); indexWriter.addDocument(doc); } sequenceFile.close(); } indexWriter.commit(); indexWriter.close(); } }
[ "jsh2@ecs.soton.ac.uk" ]
jsh2@ecs.soton.ac.uk
588fa4400b176faf3e08e11af4e9cac7790fe144
d63b589621c33478c1996647baf36090d7437474
/modeshape-integration-tests/src/test/java/org/modeshape/test/integration/sequencer/CndSequencerIntegrationTest.java
46f4adee900d48d3a2f415842ad7bda27b2ca91d
[]
no_license
sourcesense/modeshape-stone
583cef9d7796504325d203e4886c347a08ab2f4f
48cb1811da80b21307f8df36f986f8861a80de42
refs/heads/master
2020-04-06T06:50:37.609140
2011-05-04T13:46:45
2011-05-04T13:46:45
1,644,461
7
0
null
null
null
null
UTF-8
Java
false
false
3,964
java
/* * ModeShape (http://www.modeshape.org) * See the COPYRIGHT.txt file distributed with this work for information * regarding copyright ownership. Some portions may be licensed * to Red Hat, Inc. under one or more contributor license agreements. * See the AUTHORS.txt file in the distribution for a full listing of * individual contributors. * * ModeShape is free software. Unless otherwise indicated, all code in ModeShape * is licensed to you under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * ModeShape is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.modeshape.test.integration.sequencer; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.notNullValue; import static org.junit.Assert.assertThat; import javax.jcr.Node; import org.junit.After; import org.junit.Before; import org.junit.Test; public class CndSequencerIntegrationTest extends AbstractSequencerTest { /** * {@inheritDoc} * * @see org.modeshape.test.integration.sequencer.AbstractSequencerTest#getResourcePathToConfigurationFile() */ @Override protected String getResourcePathToConfigurationFile() { return "config/configRepositoryForCndSequencing.xml"; } /** * {@inheritDoc} * * @see org.modeshape.test.integration.AbstractSingleUseModeShapeTest#getRepositoryName() */ @Override protected String getRepositoryName() { return "Content"; } @Before @Override public void beforeEach() throws Exception { super.beforeEach(); } @After @Override public void afterEach() throws Exception { super.afterEach(); } @Test public void shouldSequenceJsr283CndFile() throws Exception { // print = true; uploadFile("sequencers/cnd/jsr_283_builtins.cnd", "/files/"); waitUntilSequencedNodesIs(1); Thread.sleep(200); // wait a bit while the new content is indexed // printSubgraph(assertNode("/")); // Find the sequenced node ... String path = "/sequenced/cnd/jsr_283_builtins.cnd"; Node cnd = assertNode(path, "nt:unstructured"); printSubgraph(cnd); Node file1 = assertNode(path + "/nt:activity", "nt:nodeType", "mode:derived"); assertThat(file1, is(notNullValue())); printQuery("SELECT * FROM [nt:nodeType]", 34); printQuery("SELECT * FROM [nt:propertyDefinition]", 86); printQuery("SELECT * FROM [nt:childNodeDefinition]", 10); } @Test public void shouldSequenceJsr283CndFileBelowSequencedPath() throws Exception { // print = true; uploadFile("sequencers/cnd/jsr_283_builtins.cnd", "/files/a/b"); waitUntilSequencedNodesIs(1); Thread.sleep(200); // wait a bit while the new content is indexed // printSubgraph(assertNode("/")); // Find the sequenced node ... String path = "/sequenced/cnd/a/b/jsr_283_builtins.cnd"; Node cnd = assertNode(path, "nt:unstructured"); printSubgraph(cnd); Node file1 = assertNode(path + "/nt:activity", "nt:nodeType", "mode:derived"); assertThat(file1, is(notNullValue())); printQuery("SELECT * FROM [nt:nodeType]", 34); printQuery("SELECT * FROM [nt:propertyDefinition]", 86); printQuery("SELECT * FROM [nt:childNodeDefinition]", 10); } }
[ "s.tripodi@4640d916-c1fb-4d7c-b558-95081f1cb651" ]
s.tripodi@4640d916-c1fb-4d7c-b558-95081f1cb651
460a3fd92c0f1d18016e2da7660e40ffad6a9e95
8c54ca1af646eef7ce802f9c8dafdf7e710861c2
/src/main/main/java/com/admaroc/tecdoc/services/tecdocdata/AccessoryListsCriteriaServices.java
c2e26a531180031ef79669ccdc6f8c0170e319c6
[]
no_license
papsukis/tecdoc
4f12433c92e6a435c4ca25b920bbb29db9ca86bc
0fd586f51a2d54601b053f262905c96695672045
refs/heads/master
2020-04-01T04:09:49.059919
2018-12-08T10:14:07
2018-12-08T10:15:31
152,851,665
0
0
null
null
null
null
UTF-8
Java
false
false
340
java
package com.admaroc.tecdoc.services.tecdocdata; import com.admaroc.tecdoc.tecdocdata.model.AccessoryListsCriteria; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; @Service public interface AccessoryListsCriteriaServices { }
[ "ali.belemlih@gmail.com" ]
ali.belemlih@gmail.com
37fc2a9c70c23bac6679d3248f3205da994d0ca4
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/26/org/jfree/chart/ChartPanel_getReshowDelay_1919.java
a94f8e5416122f76d3f66bb47b746756e2413a35
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,854
java
org jfree chart swing gui compon displai link free chart jfreechart object panel regist chart receiv notif compon chart chart redrawn automat notif receiv chart panel chartpanel panel jpanel return reshow tooltip delai insid chart panel integ repres reshow delai millisecond javax swing tool tip manag tooltipmanag reshow delai getreshowdelai reshow delai getreshowdelai tool tip reshow delai owntooltipreshowdelai
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
8bf2ee826ed641db3a4f7b9f9df7b2c5e2208edf
995f73d30450a6dce6bc7145d89344b4ad6e0622
/Mate20-9.0/src/main/java/android/support/v4/graphics/TypefaceCompatApi21Impl.java
57195551d1f1ddf0ed4c4af10d74e356a66781c9
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,024
java
package android.support.v4.graphics; import android.content.Context; import android.graphics.Typeface; import android.os.CancellationSignal; import android.os.ParcelFileDescriptor; import android.support.annotation.NonNull; import android.support.annotation.RequiresApi; import android.support.annotation.RestrictTo; import android.support.v4.provider.FontsContractCompat; import android.system.ErrnoException; import android.system.Os; import android.system.OsConstants; import java.io.File; import java.io.FileInputStream; import java.io.IOException; @RequiresApi(21) @RestrictTo({RestrictTo.Scope.LIBRARY_GROUP}) class TypefaceCompatApi21Impl extends TypefaceCompatBaseImpl { private static final String TAG = "TypefaceCompatApi21Impl"; TypefaceCompatApi21Impl() { } private File getFile(ParcelFileDescriptor fd) { try { String path = Os.readlink("/proc/self/fd/" + fd.getFd()); if (OsConstants.S_ISREG(Os.stat(path).st_mode)) { return new File(path); } return null; } catch (ErrnoException e) { return null; } } /* JADX WARNING: Code restructure failed: missing block: B:27:0x0047, code lost: r6 = th; */ /* JADX WARNING: Code restructure failed: missing block: B:28:0x0048, code lost: r7 = null; */ /* JADX WARNING: Code restructure failed: missing block: B:32:0x004c, code lost: r7 = move-exception; */ /* JADX WARNING: Code restructure failed: missing block: B:33:0x004d, code lost: r9 = r7; r7 = r6; r6 = r9; */ /* JADX WARNING: Code restructure failed: missing block: B:42:0x005f, code lost: r4 = th; */ /* JADX WARNING: Code restructure failed: missing block: B:43:0x0060, code lost: r5 = null; */ /* JADX WARNING: Code restructure failed: missing block: B:47:0x0064, code lost: r5 = move-exception; */ /* JADX WARNING: Code restructure failed: missing block: B:48:0x0065, code lost: r9 = r5; r5 = r4; r4 = r9; */ /* JADX WARNING: Removed duplicated region for block: B:42:0x005f A[ExcHandler: all (th java.lang.Throwable)] */ public Typeface createFromFontInfo(Context context, CancellationSignal cancellationSignal, @NonNull FontsContractCompat.FontInfo[] fonts, int style) { ParcelFileDescriptor pfd; Throwable th; Throwable th2; FileInputStream fis; Throwable th3; Throwable th4; if (fonts.length < 1) { return null; } try { pfd = context.getContentResolver().openFileDescriptor(findBestInfo(fonts, style).getUri(), "r", cancellationSignal); File file = getFile(pfd); if (file != null) { if (file.canRead()) { Typeface createFromFile = Typeface.createFromFile(file); if (pfd != null) { pfd.close(); } return createFromFile; } } fis = new FileInputStream(pfd.getFileDescriptor()); Typeface createFromInputStream = super.createFromInputStream(context, fis); fis.close(); if (pfd != null) { pfd.close(); } return createFromInputStream; } catch (IOException e) { return null; } if (th3 != null) { try { fis.close(); } catch (Throwable th5) { } } else { fis.close(); } throw th4; throw th2; if (pfd != null) { if (th != null) { try { pfd.close(); } catch (Throwable th6) { th.addSuppressed(th6); } } else { pfd.close(); } } throw th2; throw th4; } }
[ "dstmath@163.com" ]
dstmath@163.com
b4109d457db8327d80f3e8bd347d2ce2222504be
3022597c1b2c9f0ef6026ee49712efa3d76a7e8b
/Vanilla-Music/app/src/main/java/ch/blinkenlights/android/vanilla/ui/FancyMenuItem.java
86258a2a386cc4c9f5fe626fad219de5ad6771b4
[]
no_license
AsepMo/Android-Sketsa
efbedbe516a699dadbdcd2efad234cbcb43b39ce
dd818898ff4163128d28d4956b31137297e24e91
refs/heads/main
2023-08-27T03:00:10.327382
2021-11-07T05:20:33
2021-11-07T05:20:33
425,307,854
0
0
null
2021-11-06T17:47:09
2021-11-06T17:37:24
Java
UTF-8
Java
false
false
5,988
java
/* * Copyright (C) 2018 Adrian Ulrich <adrian@blinkenlights.ch> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package ch.blinkenlights.android.vanilla.ui; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.graphics.PorterDuff; import android.view.ContextMenu; import android.view.MenuItem; import android.view.ActionProvider; import android.view.SubMenu; import android.view.View; import android.content.res.ColorStateList; import android.graphics.PorterDuff.Mode; import android.graphics.BlendMode; public class FancyMenuItem implements MenuItem { private int mId; private int mIconRes; private CharSequence mTitle; private Intent mIntent; private boolean mSpacer; private Drawable mIcon; private Context mContext; FancyMenuItem(Context context, int id) { mContext = context; mId = id; } /** * Returns whether or not this is a spacer * * @return true if this is a spacer */ public boolean isSpacer() { return mSpacer; } public FancyMenuItem setIsSpacer(boolean spacer) { mSpacer = spacer; return this; } @Override public CharSequence getTitle() { return mTitle; } @Override public Drawable getIcon() { if (mIconRes != 0) return mContext.getResources().getDrawable(mIconRes); return mIcon; } @Override public FancyMenuItem setIcon(Drawable drawable) { mIcon = drawable; return this; } @Override public FancyMenuItem setIcon(int res) { mIconRes = res; return this; } @Override public FancyMenuItem setIntent(Intent intent) { mIntent = intent; return this; } @Override public FancyMenuItem setTitle(CharSequence title) { mTitle = title; return this; } @Override public FancyMenuItem setTitle(int title) { return setTitle(mContext.getResources().getString(title)); } @Override public Intent getIntent() { return mIntent; } @Override public int getItemId() { return mId; } // Dummy functions to satisfy MenuItem interface. @Override public ActionProvider getActionProvider() { return null; } @Override public CharSequence getTitleCondensed() { return null; } @Override public ContextMenu.ContextMenuInfo getMenuInfo() { return null; } @Override public FancyMenuItem setActionProvider(ActionProvider actionProvider) { return this; } @Override public FancyMenuItem setActionView(int view) { return this; } @Override public FancyMenuItem setAlphabeticShortcut(char alphaChar) { return this; } @Override public FancyMenuItem setCheckable(boolean checkable) { return this; } @Override public FancyMenuItem setChecked(boolean checked) { return this; } @Override public FancyMenuItem setEnabled(boolean enabled) { return this; } @Override public FancyMenuItem setNumericShortcut(char numericChar) { return this; } @Override public FancyMenuItem setOnActionExpandListener(MenuItem.OnActionExpandListener listener) { return this; } @Override public FancyMenuItem setOnMenuItemClickListener(MenuItem.OnMenuItemClickListener menuItemClickListener) { return this; } @Override public FancyMenuItem setShortcut(char numericChar, char alphaChar) { return this; } @Override public FancyMenuItem setShowAsActionFlags(int actionEnum) { return this; } @Override public FancyMenuItem setTitleCondensed(CharSequence text) { return this; } @Override public FancyMenuItem setVisible(boolean visible) { return this; } @Override public MenuItem setActionView(View view) { return this; } @Override public SubMenu getSubMenu() { return null; } @Override public View getActionView() { return null; } @Override public boolean collapseActionView() { return false; } @Override public boolean expandActionView() { return false; } @Override public boolean hasSubMenu() { return false; } @Override public boolean isActionViewExpanded() { return false; } @Override public boolean isCheckable() { return false; } @Override public boolean isChecked() { return false; } @Override public boolean isEnabled() { return true; } @Override public boolean isVisible() { return true; } @Override public char getAlphabeticShortcut() { return 0; } @Override public char getNumericShortcut() { return 0; } @Override public int getGroupId() { return 0; } @Override public int getOrder() { return 0; } @Override public void setShowAsAction(int actionEnum) { } @Override public ColorStateList getIconTintList() { return null; } @Override public PorterDuff.Mode getIconTintMode() { return null; } @Override public BlendMode getIconTintBlendMode() { return null; } @Override public MenuItem setIconTintMode(PorterDuff.Mode tintMode) { return null; } @Override public MenuItem setIconTintBlendMode(BlendMode blendMode) { return null; } }
[ "asepmo.story@gmail.com" ]
asepmo.story@gmail.com
a35042b4dd918375fb6fc0bc9cfe79616b92fd9c
05898f49058aa863a3bb2163a45f57f429e8ed9e
/src/main/java/com/baizhi/entity/Company.java
24d3f2fd77cce96aa5ccc95dd0f8458de621cf4b
[]
no_license
wazk2008/springboot11
09025d9cc358a522509ef09d3650ba5a02d80cae
a7c34b19a26efb9b869e5c66ef9db82826425848
refs/heads/master
2020-05-07T09:47:26.775471
2019-04-09T15:28:52
2019-04-09T15:28:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,469
java
package com.baizhi.entity; import cn.afterturn.easypoi.excel.annotation.Excel; import cn.afterturn.easypoi.excel.annotation.ExcelIgnore; import java.util.Date; public class Company { // @Excel(name = "编号") @ExcelIgnore private String id; @Excel(name = "名称") private String name; @Excel(name = "地址") private String address; @Excel(name = "注册日期",exportFormat="yyyy-MM-dd HH:mm:ss",width = 30) private Date bir; @Excel(name = "logo",type = 2 ,width = 40 , height = 20,imageType = 1) private String logo; public Company() { } public Company(String id, String name, String address, Date bir, String logo) { this.id = id; this.name = name; this.address = address; this.bir = bir; this.logo = logo; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public Date getBir() { return bir; } public void setBir(Date bir) { this.bir = bir; } public String getLogo() { return logo; } public void setLogo(String logo) { this.logo = logo; } }
[ "test@qq.com" ]
test@qq.com
a06d867009b26cd426815505aecc5faad73fedc3
bb40dfb03e6cde85de4ecb1d26e1d8402a676832
/shopping2-product-microservice/src/main/java/com/gagan/shopping2productmicroservice/config/AspectLogger.java
1eb618a7fcf5f24780f7ce253b3b87edd7387b60
[]
no_license
Gagandeep39/spring-microservice-shopping-hysterix-swagger-security-profiling-thymleaf
b97e6289a3010b51c61e1741a29b56f0fdc311e4
3815ff5a6629f92f7b3b7ea50465145d3e195bbc
refs/heads/master
2022-05-27T02:04:25.910902
2020-05-03T18:52:59
2020-05-03T18:52:59
259,148,209
1
0
null
null
null
null
UTF-8
Java
false
false
1,552
java
/** * @author Gagandeep Singh * @email singh.gagandeep3911@gmail.com * @create date 2020-04-24 12:15:51 * @modify date 2020-04-24 12:15:51 * @desc Logger */ package com.gagan.shopping2productmicroservice.config; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; @Aspect @Component public class AspectLogger { static Logger logger = LoggerFactory.getLogger(AspectLogger.class); @Pointcut("execution(* com.gagan.*.*.*.*(..)))") public void everyWhere() {} @Before("everyWhere()") public void logBefore(JoinPoint point) { logger.debug("@Before class: " + point.getTarget().getClass().getSimpleName()); logger.debug("@Before method: " + point.getSignature().toShortString()); logger.debug("Arguments: "); Object[] objects = point.getArgs(); for (Object object : objects) { logger.debug("->" + object); } } @AfterReturning(pointcut = "everyWhere()", returning = "result") public void logAfter(JoinPoint point, Object result) { logger.debug("@AfterReturning class: " + point.getTarget().getClass().getSimpleName()); logger.debug("@AfterReturning method: " + point.getSignature().toShortString()); logger.debug("->Returning Value: " + result); } }
[ "singh.gagandeep3911@gmail.com" ]
singh.gagandeep3911@gmail.com
1fb7f0ecf5a6763767bf800037e66f8b49dc64ec
cdfd9f6f6abe406ad2088f07fa527639344b06c2
/gomint-server/src/main/java/io/gomint/server/enchant/Enchantment.java
a31ad34a4f67f2eb89927165aaf3c0d9b01cfff7
[ "BSD-3-Clause" ]
permissive
NullPointer-Nico-zz/GoMint
dd2991d02e44862e392e17233cb776db7b926de0
2808bbf9286a6d989e71ece527fcaae67f9c8dde
refs/heads/master
2022-12-04T02:51:35.228548
2020-08-28T13:50:05
2020-08-28T13:50:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,660
java
/* * Copyright (c) 2017, GoMint, BlackyPaw and geNAZt * * This code is licensed under the BSD license found in the * LICENSE file in the root directory of this source tree. */ package io.gomint.server.enchant; import io.gomint.server.inventory.item.ItemStack; /** * @author geNAZt * @version 1.0 */ public class Enchantment implements io.gomint.enchant.Enchantment { private final short maxLevel; private short level; /** * Create new enchantment * * @param maxLevel which should be used to cap enchantment */ Enchantment( short maxLevel ) { this.maxLevel = maxLevel; } void setLevel( short level ) { this.level = level; } public short getMaxLevel() { return maxLevel; } @Override public short getLevel() { return this.level; } /** * Get the minimum ability needed to apply this enchantment on the given level * * @param level of enchantment * @return minimum needed enchant ability */ public byte getMinEnchantAbility( short level ) { return 0; } /** * Get the maximum ability needed to apply this enchantment on the given level * * @param level of enchantment * @return maximum needed enchant ability */ public byte getMaxEnchantAbility( short level ) { return 0; } /** * Check if the item can apply this enchantment * * @param itemStack which wants this enchantment applied * @return true when it can be applied, false otherwise */ public boolean canBeApplied( ItemStack itemStack ) { return true; } }
[ "fabian.fassbender42@googlemail.com" ]
fabian.fassbender42@googlemail.com
82383259a4fd5dc38fd4669ee3d07fc1ea877ba3
13ff7e1297b0afb829c19cf3a3ceb7c3496d8338
/ripple-bouncycastle/src/main/java/org/ripple/bouncycastle/crypto/tls/DefaultTlsSignerCredentials.java
9b24989932682111b1f67a6b44f36f9de7a21995
[ "LicenseRef-scancode-unknown-license-reference", "MIT", "ISC" ]
permissive
xuejue/radarj
78c2587e75ae8da6d37f5558768dcc5970f927d4
a4df68465e20d0ee9fce3a85e37c661eb2cec436
refs/heads/master
2020-06-19T13:25:26.057524
2016-05-12T08:45:28
2016-05-12T08:45:28
196,725,163
4
0
null
2019-07-13T13:32:15
2019-07-13T13:32:15
null
UTF-8
Java
false
false
2,401
java
package org.ripple.bouncycastle.crypto.tls; import java.io.IOException; import org.ripple.bouncycastle.crypto.CryptoException; import org.ripple.bouncycastle.crypto.params.AsymmetricKeyParameter; import org.ripple.bouncycastle.crypto.params.DSAPrivateKeyParameters; import org.ripple.bouncycastle.crypto.params.ECPrivateKeyParameters; import org.ripple.bouncycastle.crypto.params.RSAKeyParameters; public class DefaultTlsSignerCredentials implements TlsSignerCredentials { protected TlsContext context; protected Certificate certificate; protected AsymmetricKeyParameter privateKey; protected TlsSigner signer; public DefaultTlsSignerCredentials(TlsContext context, Certificate certificate, AsymmetricKeyParameter privateKey) { if (certificate == null) { throw new IllegalArgumentException("'certificate' cannot be null"); } if (certificate.isEmpty()) { throw new IllegalArgumentException("'certificate' cannot be empty"); } if (privateKey == null) { throw new IllegalArgumentException("'privateKey' cannot be null"); } if (!privateKey.isPrivate()) { throw new IllegalArgumentException("'privateKey' must be private"); } if (privateKey instanceof RSAKeyParameters) { this.signer = new TlsRSASigner(); } else if (privateKey instanceof DSAPrivateKeyParameters) { this.signer = new TlsDSSSigner(); } else if (privateKey instanceof ECPrivateKeyParameters) { this.signer = new TlsECDSASigner(); } else { throw new IllegalArgumentException("'privateKey' type not supported: " + privateKey.getClass().getName()); } this.signer.init(context); this.context = context; this.certificate = certificate; this.privateKey = privateKey; } public Certificate getCertificate() { return certificate; } public byte[] generateCertificateSignature(byte[] md5andsha1) throws IOException { try { return signer.generateRawSignature(privateKey, md5andsha1); } catch (CryptoException e) { throw new TlsFatalAlert(AlertDescription.internal_error); } } }
[ "boncrypto@gmail.com" ]
boncrypto@gmail.com
4cea91d4eeb61f0e2021b5074b8ea282588f2d27
5c328b73629d43c47a5695158162cd0814dc1dc3
/java/org/apache/tomcat/dbcp/pool2/impl/GenericKeyedObjectPoolMXBean.java
ec205d7814f7bd1ab4a1291a5a01faed86e44631
[ "bzip2-1.0.6", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "CPL-1.0", "CDDL-1.0", "Zlib", "EPL-1.0", "LZMA-exception" ]
permissive
cxyroot/Tomcat8Src
8cd56d0850c0f59d4709474f761a984b7caadaf6
14608ee22b05083bb8d5dc813f46447cb4baba76
refs/heads/master
2023-07-25T12:44:07.797728
2022-12-06T14:46:22
2022-12-06T14:46:22
223,338,251
2
0
Apache-2.0
2023-07-07T21:16:21
2019-11-22T06:27:01
Java
UTF-8
Java
false
false
7,978
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.tomcat.dbcp.pool2.impl; import java.util.List; import java.util.Map; /** * Defines the methods that will be made available via JMX. * * NOTE: This interface exists only to define those attributes and methods that * will be made available via JMX. It must not be implemented by clients * as it is subject to change between major, minor and patch version * releases of commons pool. Clients that implement this interface may * not, therefore, be able to upgrade to a new minor or patch release * without requiring code changes. * * @param <K> The type of keys maintained by the pool. * * @since 2.0 */ public interface GenericKeyedObjectPoolMXBean<K> { // Expose getters for configuration settings /** * See {@link GenericKeyedObjectPool#getBlockWhenExhausted()} * @return See {@link GenericKeyedObjectPool#getBlockWhenExhausted()} */ boolean getBlockWhenExhausted(); /** * See {@link GenericKeyedObjectPool#getFairness()} * @return See {@link GenericKeyedObjectPool#getFairness()} */ boolean getFairness(); /** * See {@link GenericKeyedObjectPool#getLifo()} * @return See {@link GenericKeyedObjectPool#getLifo()} */ boolean getLifo(); /** * See {@link GenericKeyedObjectPool#getMaxIdlePerKey()} * @return See {@link GenericKeyedObjectPool#getMaxIdlePerKey()} */ int getMaxIdlePerKey(); /** * See {@link GenericKeyedObjectPool#getMaxTotal()} * @return See {@link GenericKeyedObjectPool#getMaxTotal()} */ int getMaxTotal(); /** * See {@link GenericKeyedObjectPool#getMaxTotalPerKey()} * @return See {@link GenericKeyedObjectPool#getMaxTotalPerKey()} */ int getMaxTotalPerKey(); /** * See {@link GenericKeyedObjectPool#getMaxWaitMillis()} * @return See {@link GenericKeyedObjectPool#getMaxWaitMillis()} */ long getMaxWaitMillis(); /** * See {@link GenericKeyedObjectPool#getMinEvictableIdleTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMinEvictableIdleTimeMillis()} */ long getMinEvictableIdleTimeMillis(); /** * See {@link GenericKeyedObjectPool#getMinIdlePerKey()} * @return See {@link GenericKeyedObjectPool#getMinIdlePerKey()} */ int getMinIdlePerKey(); /** * See {@link GenericKeyedObjectPool#getNumActive()} * @return See {@link GenericKeyedObjectPool#getNumActive()} */ int getNumActive(); /** * See {@link GenericKeyedObjectPool#getNumIdle()} * @return See {@link GenericKeyedObjectPool#getNumIdle()} */ int getNumIdle(); /** * See {@link GenericKeyedObjectPool#getNumTestsPerEvictionRun()} * @return See {@link GenericKeyedObjectPool#getNumTestsPerEvictionRun()} */ int getNumTestsPerEvictionRun(); /** * See {@link GenericKeyedObjectPool#getTestOnCreate()} * @return See {@link GenericKeyedObjectPool#getTestOnCreate()} * @since 2.2 */ boolean getTestOnCreate(); /** * See {@link GenericKeyedObjectPool#getTestOnBorrow()} * @return See {@link GenericKeyedObjectPool#getTestOnBorrow()} */ boolean getTestOnBorrow(); /** * See {@link GenericKeyedObjectPool#getTestOnReturn()} * @return See {@link GenericKeyedObjectPool#getTestOnReturn()} */ boolean getTestOnReturn(); /** * See {@link GenericKeyedObjectPool#getTestWhileIdle()} * @return See {@link GenericKeyedObjectPool#getTestWhileIdle()} */ boolean getTestWhileIdle(); /** * See {@link GenericKeyedObjectPool#getTimeBetweenEvictionRunsMillis()} * @return See {@link GenericKeyedObjectPool#getTimeBetweenEvictionRunsMillis()} */ long getTimeBetweenEvictionRunsMillis(); /** * See {@link GenericKeyedObjectPool#isClosed()} * @return See {@link GenericKeyedObjectPool#isClosed()} */ boolean isClosed(); // Expose getters for monitoring attributes /** * See {@link GenericKeyedObjectPool#getNumActivePerKey()} * @return See {@link GenericKeyedObjectPool#getNumActivePerKey()} */ Map<String,Integer> getNumActivePerKey(); /** * See {@link GenericKeyedObjectPool#getBorrowedCount()} * @return See {@link GenericKeyedObjectPool#getBorrowedCount()} */ long getBorrowedCount(); /** * See {@link GenericKeyedObjectPool#getReturnedCount()} * @return See {@link GenericKeyedObjectPool#getReturnedCount()} */ long getReturnedCount(); /** * See {@link GenericKeyedObjectPool#getCreatedCount()} * @return See {@link GenericKeyedObjectPool#getCreatedCount()} */ long getCreatedCount(); /** * See {@link GenericKeyedObjectPool#getDestroyedCount()} * @return See {@link GenericKeyedObjectPool#getDestroyedCount()} */ long getDestroyedCount(); /** * See {@link GenericKeyedObjectPool#getDestroyedByEvictorCount()} * @return See {@link GenericKeyedObjectPool#getDestroyedByEvictorCount()} */ long getDestroyedByEvictorCount(); /** * See {@link GenericKeyedObjectPool#getDestroyedByBorrowValidationCount()} * @return See {@link GenericKeyedObjectPool#getDestroyedByBorrowValidationCount()} */ long getDestroyedByBorrowValidationCount(); /** * See {@link GenericKeyedObjectPool#getMeanActiveTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMeanActiveTimeMillis()} */ long getMeanActiveTimeMillis(); /** * See {@link GenericKeyedObjectPool#getMeanIdleTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMeanIdleTimeMillis()} */ long getMeanIdleTimeMillis(); /** * See {@link GenericKeyedObjectPool#getMaxBorrowWaitTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMaxBorrowWaitTimeMillis()} */ long getMeanBorrowWaitTimeMillis(); /** * See {@link GenericKeyedObjectPool#getMaxBorrowWaitTimeMillis()} * @return See {@link GenericKeyedObjectPool#getMaxBorrowWaitTimeMillis()} */ long getMaxBorrowWaitTimeMillis(); /** * See {@link GenericKeyedObjectPool#getCreationStackTrace()} * @return See {@link GenericKeyedObjectPool#getCreationStackTrace()} */ String getCreationStackTrace(); /** * See {@link GenericKeyedObjectPool#getNumWaiters()} * @return See {@link GenericKeyedObjectPool#getNumWaiters()} */ int getNumWaiters(); /** * See {@link GenericKeyedObjectPool#getNumWaitersByKey()} * @return See {@link GenericKeyedObjectPool#getNumWaitersByKey()} */ Map<String,Integer> getNumWaitersByKey(); /** * See {@link GenericKeyedObjectPool#listAllObjects()} * @return See {@link GenericKeyedObjectPool#listAllObjects()} */ Map<String,List<DefaultPooledObjectInfo>> listAllObjects(); }
[ "1076675153@qq.com" ]
1076675153@qq.com
d64065ee1787e3c1eefe8a435cb2f8ad890fe560
c4b9942d6e45eeba8d211d2cf7327804b6cbb984
/3.JavaMultithreading/src/com/javarush/task/task28/task2805/MyThread.java
1f4a896daea98975a5bf7d358fed1815540e7e77
[]
no_license
sabonv/JRushTasks
0db05ae4862f50e8916ed5462e178f9eb08035a1
1bcabed0dd42f46c43ea583b1283ba8d699227d4
refs/heads/master
2021-01-22T19:31:06.143779
2018-01-16T16:27:43
2018-01-16T16:27:43
85,204,939
0
0
null
null
null
null
UTF-8
Java
false
false
2,318
java
package com.javarush.task.task28.task2805; import java.util.concurrent.atomic.AtomicInteger; /** * Created by v.usov on 20.11.2017. */ public class MyThread extends Thread { public static AtomicInteger priorT = new AtomicInteger(1); //public AtomicInteger priorG = new AtomicInteger(this.getThreadGroup().getMaxPriority()); public MyThread() { if (priorT.get() < 10) setPriority(priorT.getAndIncrement()); else { setPriority(priorT.get()); priorT.set(1); } } public MyThread(Runnable target) { super(target); if (priorT.get() < 10) setPriority(priorT.getAndIncrement()); else { setPriority(priorT.get()); priorT.set(1); } } public MyThread(ThreadGroup group, Runnable target) { super(group, target); if (priorT.get() < 10) setPriority(priorT.getAndIncrement()); else { setPriority(priorT.get()); priorT.set(1); } } public MyThread(String name) { super(name); if (priorT.get() < 10) setPriority(priorT.getAndIncrement()); else { setPriority(priorT.get()); priorT.set(1); } } public MyThread(ThreadGroup group, String name) { super(group, name); if (priorT.get() < 10) setPriority(priorT.getAndIncrement()); else { setPriority(priorT.get()); priorT.set(1); } } public MyThread(Runnable target, String name) { super(target, name); if (priorT.get() < 10) setPriority(priorT.getAndIncrement()); else { setPriority(priorT.get()); priorT.set(1); } } public MyThread(ThreadGroup group, Runnable target, String name) { super(group, target, name); if (priorT.get() < 10) setPriority(priorT.getAndIncrement()); else { setPriority(priorT.get()); priorT.set(1); } } public MyThread(ThreadGroup group, Runnable target, String name, long stackSize) { super(group, target, name, stackSize); if (priorT.get() < 10) setPriority(priorT.getAndIncrement()); else { setPriority(priorT.get()); priorT.set(1); } } }
[ "znakomiymne@list.ru" ]
znakomiymne@list.ru
78bec07c33f41f039f0dad82846e7b0d9f28b8ec
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Spring/Spring11111.java
067baf11cab97c14bcf7def0eb0bc0302699d31b
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,035
java
private static <T, S extends Publisher<T>> S readWithMessageReaders( ReactiveHttpInputMessage inputMessage, BodyExtractor.Context context, ResolvableType elementType, Function<HttpMessageReader<T>, S> readerFunction, Function<UnsupportedMediaTypeException, S> unsupportedError, Supplier<S> empty) { if (VOID_TYPE.equals(elementType)) { return empty.get(); } MediaType contentType = contentType(inputMessage); List<HttpMessageReader<?>> messageReaders = context.messageReaders(); return messageReaders.stream() .filter(r -> r.canRead(elementType, contentType)) .findFirst() .map(BodyExtractors::<T>cast) .map(readerFunction) .orElseGet(() -> { List<MediaType> supportedMediaTypes = messageReaders.stream() .flatMap(reader -> reader.getReadableMediaTypes().stream()) .collect(Collectors.toList()); UnsupportedMediaTypeException error = new UnsupportedMediaTypeException(contentType, supportedMediaTypes); return unsupportedError.apply(error); }); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
8571fd05150c761ef6c16847d45627bfae99ca26
369f3f3c85bc488c3956661d81600d39ff2ebe26
/Stream-example/src/main/java/com/ankamma/stream/Product.java
522925dc6e5e3c966c991ebcaf972c3e0544d32c
[]
no_license
Apallapu/Java8PractiseExample
aa66bd99398baf4107b5a15e190d87a2d5574331
d36bc5ccc39fcb1e7b3802a0a9cef7ea0c46a357
refs/heads/master
2020-04-05T15:54:21.674232
2018-11-10T18:33:28
2018-11-10T18:33:28
156,989,090
0
0
null
null
null
null
UTF-8
Java
false
false
534
java
package com.ankamma.stream; public class Product { private int id; private String name; private float price; public Product(int id, String name, float price) { this.id = id; this.name = name; this.price = price; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public float getPrice() { return price; } public void setPrice(float price) { this.price = price; } }
[ "ankamma.java@gmail.com" ]
ankamma.java@gmail.com
224bbc3fd6195521b422ba8cb4a9fbd98ade2577
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/16/16_a9aa5abafa4061d12a5c0d4635e0060d18e84f46/AndroidCameraConfiguration/16_a9aa5abafa4061d12a5c0d4635e0060d18e84f46_AndroidCameraConfiguration_s.java
160312f0bdfcb53342dff129f3254b5deb50adf2
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,597
java
/* AndroidCameraConf.java Copyright (C) 2011 Belledonne Communications, Grenoble, France 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.linphone.mediastream.video.capture.hwconf; import java.util.List; import org.linphone.mediastream.Version; import android.hardware.Camera.Size; /** * Entry point for accessing hardware cameras configuration. * Different SDK implementations are delegated to specific AndroidCameraConfN versions. * */ public class AndroidCameraConfiguration { public static AndroidCamera[] retrieveCameras() { initCamerasCache(); return camerasCache; } public static boolean hasSeveralCameras() { initCamerasCache(); return camerasCache.length > 1; } public static boolean hasFrontCamera() { initCamerasCache(); for (AndroidCamera cam: camerasCache) { if (cam.frontFacing) return true; } return false; } private static AndroidCameraConfiguration.AndroidCamera[] camerasCache; private static void initCamerasCache() { // cache already filled ? if (camerasCache != null) return; if (Version.sdk() < 9) camerasCache = AndroidCameraConfiguration.probeCamerasSDK5(); else camerasCache = AndroidCameraConfiguration.probeCamerasSDK9(); } static AndroidCamera[] probeCamerasSDK5() { return AndroidCameraConfigurationReader5.probeCameras(); } static AndroidCamera[] probeCamerasSDK9() { return AndroidCameraConfigurationReader9.probeCameras(); } /** * Default: no front; rear=0; default=rear * @author Guillaume Beraudo * */ static public class AndroidCamera { public AndroidCamera(int i, boolean f, int o, List<Size> r) { this.id = i; this.frontFacing = f; this.orientation = o; this.resolutions = r; } public int id; public boolean frontFacing; // false => rear facing public int orientation; public List<Size> resolutions; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1e32c3fe27c3a1a44f4bb541b832f452eea54506
2b5aaaf43b5a5b3602e20c948c0f2d58583860ed
/mstar-server/src/test/java/com/wincom/mstar/tests/HistoryAIDayRepositorySelectByIdAndTsRangeTest.java
74e85ce7c4f1e18626cb5337df8508c4680f80ed
[ "Apache-2.0" ]
permissive
xtwxy/cassandra-tests
2bb2350bf325eba9353d6d632ffe3e4076e213e4
346023aad17d37f1d140879b6808092e04d0e1eb
refs/heads/master
2021-01-19T11:34:27.120908
2017-04-17T21:31:12
2017-04-17T21:31:12
82,253,594
0
0
null
null
null
null
UTF-8
Java
false
false
1,643
java
package com.wincom.mstar.tests; import java.util.Date; import java.util.HashSet; import java.util.Set; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.springframework.cassandra.core.CqlTemplate; import com.datastax.driver.core.querybuilder.Delete; import com.datastax.driver.core.querybuilder.Insert; import com.datastax.driver.core.querybuilder.QueryBuilder; import com.wincom.mstar.domain.HistoryAI; import com.wincom.mstar.repository.HistoryAIDayRepository; import com.wincom.mstar.tests.util.AppContextLoader; public class HistoryAIDayRepositorySelectByIdAndTsRangeTest { int count = 0; @Test public void test() { Set<Integer> id = new HashSet<>(); id.add(1); Iterable<HistoryAI> rs = repository.findByIdAndDateRange(id, new Date(Long.valueOf(0)), new Date(System.currentTimeMillis())); rs.forEach(x -> count += 1); Assert.assertEquals(1, count); } @Before public void setUp() { ctxLoader = new AppContextLoader(); cql = ctxLoader.getContext().getBean(CqlTemplate.class); repository = ctxLoader.getContext().getBean(HistoryAIDayRepository.class); Insert insert = QueryBuilder.insertInto("history_ai_day") .value("id", 1) .value("ts", System.currentTimeMillis()) .value("value", Math.random()); cql.execute(insert); } @After public void tearDown() { Delete.Where delete = QueryBuilder.delete() .from("history_ai_day") .where(QueryBuilder.eq("id", 1)); cql.execute(delete); ctxLoader.closeContext(); } private HistoryAIDayRepository repository; private CqlTemplate cql; private AppContextLoader ctxLoader; }
[ "xtwxy@hotmail.com" ]
xtwxy@hotmail.com
fa867728f711c258b6d6eb91ada1ca53aa9e1913
6a123b6cf379a555cc68e92d0d640380133d0ea5
/custom/gpcommerce/gpcommercefacades/src/com/gp/commerce/facades/process/email/context/GPCSROrderApprovalEmailContext.java
b45dafabb45700b829e5da20e5e3a33766747c2e
[]
no_license
Myzenvei/Docs
c9357221bc306dc754b322350fc676dee1972e39
45809ee928669142073354e1126e7444dedd4730
refs/heads/master
2020-06-30T17:23:52.981874
2019-07-15T09:39:19
2019-07-15T09:39:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,140
java
/* * Copyright (c) 2018 Georgia-Pacific. All rights reserved. * This software is the confidential and proprietary information of Georgia-Pacific. */ package com.gp.commerce.facades.process.email.context; //com.gp.commerce.facades.process.email.context.GPCSROrderApprovalEmailContext import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import de.hybris.platform.acceleratorservices.email.EmailService; import de.hybris.platform.acceleratorservices.model.cms2.pages.EmailPageModel; import de.hybris.platform.acceleratorservices.model.email.EmailAddressModel; import de.hybris.platform.acceleratorservices.site.strategies.SiteChannelValidationStrategy; import de.hybris.platform.orderprocessing.model.OrderProcessModel; public class GPCSROrderApprovalEmailContext extends OrderNotificationEmailContext { private static final String CSR_ORDER_NOTIFY_EMAIL = "CSR_ORDER_NOTIFY_EMAIL"; private static final String DELIMITER = ","; private static final String CSR_EMAIL="csr.email"; public static final String ORDER_FRAUD_TYPE="orderFraudType"; private static final Logger LOG = Logger.getLogger(GPCSROrderApprovalEmailContext.class); @Resource(name = "emailService") private EmailService emailService; private SiteChannelValidationStrategy siteChannelValidationStrategy; @Override public void init(final OrderProcessModel businessProcessModel, final EmailPageModel emailPageModel) { super.init(businessProcessModel, emailPageModel); final String csrEmail = getConfigurationService().getConfiguration().getString(CSR_EMAIL); if(LOG.isDebugEnabled()) { LOG.debug("FailedOrderContext | CSR email is configured to email address : " +csrEmail); } final List<EmailAddressModel> toEmailList = new ArrayList<>(); EmailAddressModel toCsrEmail; if(StringUtils.isNotBlank(csrEmail)) { if(StringUtils.contains(csrEmail, DELIMITER)) { final String[] csrRecipientEmails = StringUtils.split(csrEmail, DELIMITER); for (final String csrRecipient : csrRecipientEmails) { toCsrEmail= getEmailService().getOrCreateEmailAddressForEmail(csrRecipient, StringUtils.EMPTY); toEmailList.add(toCsrEmail); } } else { toCsrEmail= getEmailService().getOrCreateEmailAddressForEmail(csrEmail, StringUtils.EMPTY); toEmailList.add(toCsrEmail); } } if(null!=businessProcessModel.getFraudType()) { put(ORDER_FRAUD_TYPE,businessProcessModel.getFraudType()); }else { put(ORDER_FRAUD_TYPE,""); } put(EMAIL,csrEmail); put(CSR_ORDER_NOTIFY_EMAIL, true); } public SiteChannelValidationStrategy getSiteChannelValidationStrategy() { return siteChannelValidationStrategy; } public void setSiteChannelValidationStrategy(SiteChannelValidationStrategy siteChannelValidationStrategy) { this.siteChannelValidationStrategy = siteChannelValidationStrategy; } public EmailService getEmailService() { return emailService; } public void setEmailService(EmailService emailService) { this.emailService = emailService; } }
[ "shikhgupta@deloitte.com" ]
shikhgupta@deloitte.com
127c61f40eb1804764c1ae83139dd90aae709e9c
b9b51ae6bb0ca7e423d3e7d94c2cd02ee2708668
/src/main/java/com/experts/core/biller/statemachine/api/auth/SecurityConstants.java
9f7ec7cb2077d8a5458411fae93f5a7feb46ba30
[]
no_license
expertsleads1987/billers-latest
2be313849c9cfc5aa95a6d4eb51cf275b197f4e1
64b6f5dbeff379a59aded0339a93829d444b6460
refs/heads/master
2022-10-17T09:25:19.921571
2018-09-15T14:07:10
2018-09-15T14:07:10
148,882,161
0
4
null
2022-10-05T19:11:21
2018-09-15T08:00:51
JavaScript
UTF-8
Java
false
false
415
java
package com.experts.core.biller.statemachine.api.auth; public class SecurityConstants { public static final String SECRET = "SecretKeyToGenJWTs"; public static final long EXPIRATION_TIME = 864_000_000; // 10 days public static final String TOKEN_PREFIX = "Bearer "; public static final String HEADER_STRING = "Authorization"; public static final String SIGN_UP_URL = "/users/sign-up"; }
[ "yousef.ataya@experts.ps" ]
yousef.ataya@experts.ps
d6851abced01dc2deb51cbf1980d497b017f6c41
2f1a9177b5816e80dbbb897fb909606a8f77c3eb
/extlib/com.ibm.xsp.extlib.controls/src/com/ibm/xsp/extlib/util/debug/DumpContext.java
b79fbd05752c8db5abcc89a51d569366ef6ad2d2
[]
no_license
residori/xspstarterkit
76caa60ecc3cd7780a3cff2433e671c0f84354d5
7d6fcce101edd35a5fe3c6df99c894f9570023a1
refs/heads/master
2020-12-26T09:50:59.653003
2014-06-16T19:47:34
2014-06-16T19:47:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,377
java
/* ***************************************************************** */ /* Licensed Materials - Property of IBM */ /* */ /* Copyright IBM Corp. 1985, 2013 All Rights Reserved */ /* */ /* US Government Users Restricted Rights - Use, duplication or */ /* disclosure restricted by GSA ADP Schedule Contract with */ /* IBM Corp. */ /* */ /* ***************************************************************** */ package com.ibm.xsp.extlib.util.debug; import java.util.HashMap; import java.util.Map; /** * Context being used when dumping properties. */ public class DumpContext { private Map<String,Object> properties = new HashMap<String, Object>(); public DumpContext() { } public Object getProperty(String name) { return properties.get(name); } public void putProperty(String name, Object value) { properties.put(name,value); } public Map<String,Object> getProperties() { return properties; } public boolean shouldUseBeanProperties(Object o) { return false; } }
[ "nathan.freeman@redpilldevelopment.com" ]
nathan.freeman@redpilldevelopment.com
ca0a8502324feb6af25f3ca7c1024117b03f5c95
82ada8f2b9753c7d97d720b396c6bda044fdf988
/base-framework/src/main/java/com/dingtai/android/library/video/api/impl/GetMediaChannelsListAsynCall.java
29e1ce56d68930bdab36401aa4a78c241d37aa6a
[]
no_license
xyyou123/dingtai-base-framework
f0dc377647b92df15c0d3f66942c5582eaefe506
c983c4d9c4e8456c5dec9681ee347f0f2cfb484c
refs/heads/master
2022-04-23T16:03:40.978218
2020-04-19T19:43:42
2020-04-19T19:44:12
257,085,196
0
0
null
null
null
null
UTF-8
Java
false
false
2,118
java
package com.dingtai.android.library.video.api.impl; import com.alibaba.fastjson.JSONObject; import com.dingtai.android.library.resource.Resource; import com.dingtai.android.library.video.api.VideoApi; import com.dingtai.android.library.video.db.VideoChannelModelDao; import com.dingtai.android.library.video.model.VideoChannelModel; import com.lnr.android.base.framework.data.asyn.CallResultDecodeBase64; import com.lnr.android.base.framework.data.asyn.core.AbstractAsynCall; import com.lnr.android.base.framework.data.asyn.core.AsynParams; import com.lnr.android.base.framework.uitl.JsonUtil; import java.util.List; import javax.inject.Inject; import io.reactivex.Observable; import io.reactivex.functions.Function; import io.reactivex.schedulers.Schedulers; /** * author:lnr * date:2018-11-14 */ public class GetMediaChannelsListAsynCall extends AbstractAsynCall<List<VideoChannelModel>> { private static final String URL = "base"; @Inject public GetMediaChannelsListAsynCall(){} @Override public Observable<List<VideoChannelModel>> call(AsynParams params) { String ParentID = params.get("ParentID"); if(ParentID == null) { ParentID = "00000000-0000-0000-0000-000000000000"; } String StID = Resource.API.STID; return http().call(VideoApi.class, URL) .getMediaChannelsList(ParentID, StID) .map(new CallResultDecodeBase64<JSONObject>()) .map(new Function<JSONObject, List<VideoChannelModel>>() { @Override public List<VideoChannelModel> apply(JSONObject object) throws Exception { List<VideoChannelModel> mediaChannels = JsonUtil.parseArray(object.getString("MediaChannels"), VideoChannelModel.class); VideoChannelModelDao dao = database().call(VideoChannelModelDao.class); dao.deleteAll(); dao.saveInTx(mediaChannels); return mediaChannels; } }) .subscribeOn(Schedulers.io()); } }
[ "zndx0502050105@163.com" ]
zndx0502050105@163.com
7cacf60b2e48529ab323dca03aff0e92f256f87d
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
/fileshare/common/eu.agno3.fileshare.api/src/main/java/eu/agno3/fileshare/exceptions/PolicyNotFulfilledException.java
f5ea2c93a5c47f4fc6560916e1e3dfa4febf0d3e
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
AgNO3/code
d17313709ee5db1eac38e5811244cecfdfc23f93
b40a4559a10b3e84840994c3fd15d5f53b89168f
refs/heads/main
2023-07-28T17:27:53.045940
2021-09-17T14:25:01
2021-09-17T14:31:41
407,567,058
0
2
null
null
null
null
UTF-8
Java
false
false
1,181
java
/** * © 2015 AgNO3 Gmbh & Co. KG * All right reserved. * * Created: 19.03.2015 by mbechler */ package eu.agno3.fileshare.exceptions; import eu.agno3.fileshare.model.PolicyViolation; /** * @author mbechler * */ public class PolicyNotFulfilledException extends SecurityException { /** * */ private static final long serialVersionUID = 5098461301283418904L; private PolicyViolation violation; /** * */ public PolicyNotFulfilledException () {} /** * @param msg * @param t */ public PolicyNotFulfilledException ( String msg, Throwable t ) { super(msg, t); } /** * @param msg */ public PolicyNotFulfilledException ( String msg ) { super(msg); } /** * @param cause */ public PolicyNotFulfilledException ( Throwable cause ) { super(cause); } /** * @param violation */ public PolicyNotFulfilledException ( PolicyViolation violation ) { this.violation = violation; } /** * @return the violation */ public PolicyViolation getViolation () { return this.violation; } }
[ "bechler@agno3.eu" ]
bechler@agno3.eu
eeb0185859e852f87f1ba993f33155a9ac0c5211
cade452d239f949868cb3a88413abd46ecb8f0b6
/grpc-spring-test/spring-grpc-server/src/main/java/temp/spring/server/LogGrpcInterceptor.java
9f851021c5b42bafb4285b18e910dc66b955170b
[]
no_license
liwen666/springcloud_new
fb9b06efeb91a9d0fb1da8bb6c5e2abd6e4ac656
8b55a705afc6c2b36c586a29faba83f0ecc5bc84
refs/heads/master
2023-02-15T05:11:13.585071
2023-01-31T04:15:52
2023-01-31T04:15:52
176,225,728
0
1
null
2022-12-14T20:39:19
2019-03-18T07:19:09
HTML
UTF-8
Java
false
false
1,907
java
/* * Copyright (c) 2016-2020 Michael Zhang <yidongnan@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package temp.spring.server; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import io.grpc.Metadata; import io.grpc.ServerCall; import io.grpc.ServerCallHandler; import io.grpc.ServerInterceptor; /** * @author Michael (yidongnan@gmail.com) * @since 2016/12/6 */ public class LogGrpcInterceptor implements ServerInterceptor { private static final Logger log = LoggerFactory.getLogger(LogGrpcInterceptor.class); @Override public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT, RespT> serverCall, Metadata metadata, ServerCallHandler<ReqT, RespT> serverCallHandler) { log.info(serverCall.getMethodDescriptor().getFullMethodName()); return serverCallHandler.startCall(serverCall, metadata); } }
[ "1438131288@qq.com" ]
1438131288@qq.com
a9722ae3ba0db843a83555d958be75b96b3c5dde
48fd0b689f9cdb660ad06a191107e14d47542fd8
/Ada34/src/BendAjacentLogicStep.java
0e47c1695fd35197d5997bc038e0a8b884e90a28
[ "MIT" ]
permissive
chiendarrendor/AlbertsAdalogicalAenigmas
3dfc6616d47c361ad6911e2ee4e3a3ec24bb6b75
c6f91d4718999089686f3034a75a11b312fa1458
refs/heads/master
2022-08-28T11:34:02.261386
2022-07-08T22:45:24
2022-07-08T22:45:24
115,220,665
1
1
null
null
null
null
UTF-8
Java
false
false
1,316
java
import grid.logic.LogicStatus; import grid.logic.LogicStep; import grid.puzzlebits.Direction; import grid.solverrecipes.singleloopflatten.EdgeState; import java.awt.Point; public class BendAjacentLogicStep implements LogicStep<Board> { int x; int y; public BendAjacentLogicStep(int x, int y) { this.x = x; this.y = y; } @Override public LogicStatus apply(Board thing) { LogicStatus result = LogicStatus.STYMIED; if (thing.getCellType(x,y) != CellType.BEND) return LogicStatus.STYMIED; for (Direction d : Direction.orthogonals()) { if (thing.getEdge(x,y,d) != EdgeState.PATH) continue; Point np = d.delta(x,y,1); switch(thing.getCellType(np.x,np.y)) { case TERMINAL: break; case STRAIGHT: break; case BEND: return LogicStatus.CONTRADICTION; case NOTBEND: break; case UNKNOWN: thing.setCellType(np.x,np.y,CellType.NOTBEND); result = LogicStatus.LOGICED; break; case NOTTERMINAL: thing.setCellType(np.x,np.y,CellType.STRAIGHT); result = LogicStatus.LOGICED; break; } } return result; } }
[ "chiendarrendor@yahoo.com" ]
chiendarrendor@yahoo.com
21d448267058d621471ded9ac51894885780bcdc
63d9e7683582b52fd1edbee460f35f797e892ad4
/src/main/java/gw/lang/reflect/IConstructorHandler.java
8054904878dc8fbf2bd216ec5dc23e59519b3f48
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
driedtoast/gosu-lang
2f1c9c08b7c2fdb10554645ee9634ec65281c60b
eb1b962b723adfe198d4e41e089add039646519b
refs/heads/master
2023-07-31T12:25:17.094738
2011-08-22T20:48:30
2011-08-22T20:48:30
2,251,131
0
1
null
null
null
null
UTF-8
Java
false
false
216
java
package gw.lang.reflect; /** * Works in conjunction with IConstructorInfo. * * Copyright 2010 Guidewire Software, Inc. */ public interface IConstructorHandler { public Object newInstance( Object... args ); }
[ "driedtoast@gmail.com" ]
driedtoast@gmail.com
9949656a3ae5d20f4c9c3285bacf4a5e679c2587
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-openanalytics-open/src/main/java/com/aliyuncs/openanalytics_open/model/v20180619/GetAllowIPRequest.java
8c696c4cc5bb8f55b08aa8a4a1e046df94a44dc7
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
1,879
java
/* * 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.aliyuncs.openanalytics_open.model.v20180619; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.openanalytics_open.Endpoint; /** * @author auto create * @version */ public class GetAllowIPRequest extends RpcAcsRequest<GetAllowIPResponse> { private String networkType; private String product; public GetAllowIPRequest() { super("openanalytics-open", "2018-06-19", "GetAllowIP", "openanalytics"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getNetworkType() { return this.networkType; } public void setNetworkType(String networkType) { this.networkType = networkType; if(networkType != null){ putBodyParameter("NetworkType", networkType); } } public String getProduct() { return this.product; } public void setProduct(String product) { this.product = product; if(product != null){ putBodyParameter("Product", product); } } @Override public Class<GetAllowIPResponse> getResponseClass() { return GetAllowIPResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
20c8b4a31f95e561eb0dd814e6d9767a642f08f2
726b8d7bb5f201b4635d8fdda5d5141650c4e58d
/Spring4_MVC_CURD/src/java/com/model/Test.java
c3413ee95ab35b98da17eaedf80380b94a8e6931
[]
no_license
shoumitro-cse/spring-small-projects
865441698f6711a964d5e15b0a3ef5f2330d0caa
48cd4b8dcf162d46c846d2496c72bf81a6963e39
refs/heads/main
2023-03-25T11:59:23.105208
2021-03-20T20:16:42
2021-03-20T20:16:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,469
java
//package com.model; // //import java.util.List; //import org.springframework.context.ApplicationContext; //import org.springframework.context.support.ClassPathXmlApplicationContext; // //public class Test { // // //// This setion can not work because applicationContext can't find. this file can't exit src folder // public static void main(String[] args) { // // ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml"); // // EmployeeModel dao = (EmployeeModel) ctx.getBean("edao"); // // EmployeeBean emp1 = new EmployeeBean(101, "Samir Pal", 2000f); // dao.saveEmployeeByPreparedStatement(emp1); // // List<EmployeeBean> list = dao.getAllEmployees(); // for (EmployeeBean e : list) { // System.out.println("Name : " + e.getName()); // } // //// dao1.update(new EmployeeBean(101,"Raj",90000)); // //// dao1.save(new EmployeeBean(101,"Rahim",32000)); // // //// int status1 = dao.updateEmployee(new EmployeeBean(101,"Sonoo",15000)); //// System.out.println(status1); //// //// //// EmployeeBean e=new EmployeeBean(); //// e.setId(101); //// int status2=dao.deleteEmployee(e); //// System.out.println(status2); // // //// List<Employee> list = dao.getAllEmployeesRowMapper(); //// for(EmployeeBean e : list) //// System.out.println("Name : "+e.getName()); // } // //}
[ "shoumitro26@gmail.com" ]
shoumitro26@gmail.com
ed61e669071a1cd62feff151759bff42608a83ee
7df84ffd084caff7f89e4f9bfe4ea92531148568
/src/com/thinkinginjava/concurrency/example/chapter21_2/ex21_2_6/package-info.java
ec7bfdea37bedca6d491766ef34dce9550730636
[]
no_license
MonikaSophin/myproject
ece1fb8d0406867a67b5e2b53291973e20843c9e
679ae00ff5533f7d502b1e4fead60eff462ced1d
refs/heads/master
2022-06-25T22:50:55.316203
2020-12-02T07:22:07
2020-12-02T07:22:07
152,444,035
0
1
null
2022-06-21T03:27:24
2018-10-10T15:12:07
Java
UTF-8
Java
false
false
140
java
package com.thinkinginjava.concurrency.example.chapter21_2.ex21_2_6; /** * page 660 * -- chapter_21 并发 * * 21.2.6 优先级 */
[ "43468391+MonikaSophin@users.noreply.github.com" ]
43468391+MonikaSophin@users.noreply.github.com
3312b8c2fee5a69096c0729b6148e277e756df3a
70e207ac63da49eddd761a6e3a901e693f4ec480
/net.certware.hazard.stpa.ui/xtend-gen/net/certware/hazard/stpa/ui/contentassist/HazardAnalysisProposalProvider.java
cf8a672badd9fb841aa0d59e6a4b81ddd2441b8e
[ "Apache-2.0" ]
permissive
arindam7development/CertWare
43be650539963b1efef4ce4cad164f23185d094b
cbbfdb6012229444d3c0d7e64c08ac2a15081518
refs/heads/master
2020-05-29T11:38:08.794116
2016-03-29T13:56:37
2016-03-29T13:56:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
407
java
/** * generated by Xtext */ package net.certware.hazard.stpa.ui.contentassist; import net.certware.hazard.stpa.ui.contentassist.AbstractHazardAnalysisProposalProvider; /** * see http://www.eclipse.org/Xtext/documentation.html#contentAssist on how to customize content assistant */ @SuppressWarnings("all") public class HazardAnalysisProposalProvider extends AbstractHazardAnalysisProposalProvider { }
[ "mrb@certware.net" ]
mrb@certware.net
def2009b0ba09b4d76a7f0db4028a8c818040506
94f1926e49d8609a932ba09e2cd9263be0f1c11f
/UWS-MTPP/src/guisanboot/data/ISCSISessionObj.java
39b1e940cde007e714e44ec04913a550440aba35
[]
no_license
zhbaics/UWS-MTPP
a47dfe5e844b656c62c4b6255091d6c32446cef7
21f0d19cabb92a9763d3258fb494c11464c8caf7
refs/heads/master
2021-01-18T14:05:07.662220
2015-09-07T01:11:21
2015-09-07T01:11:21
42,024,137
5
1
null
null
null
null
UTF-8
Java
false
false
2,015
java
/* * ISCSISessionObj.java * * Created on 2008/7/7, AM�11:46 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package guisanboot.data; /** * * @author zjj */ public class ISCSISessionObj { private String initor; private String initor_ip; private String tgt_ip; private int tid; private String right; /** Creates a new instance of ISCSISessionObj */ public ISCSISessionObj() { } public ISCSISessionObj( String initor, String initor_ip, String tgt_ip, int tid, String right ){ this.initor = initor; this.initor_ip = initor_ip; this.tgt_ip = tgt_ip; this.tid = tid; this.right = right; } public String getInitor() { return initor; } public void setInitor(String initor) { this.initor = initor; } public String getInitor_ip() { return initor_ip; } public void setInitor_ip(String initor_ip) { this.initor_ip = initor_ip; } public String getTgt_ip() { return tgt_ip; } public void setTgt_ip(String tgt_ip) { this.tgt_ip = tgt_ip; } public int getTid() { return tid; } public void setTid(int tid) { this.tid = tid; } public String getRight() { return right; } public void setRight(String right) { this.right = right; } public String prtMe(){ StringBuffer buf = new StringBuffer(); buf.append(this.initor); buf.append(" "+this.initor_ip); buf.append(" "+this.tgt_ip); buf.append(" "+this.tid ); buf.append(" "+this.right ); return buf.toString(); } }
[ "1026074303@qq.com" ]
1026074303@qq.com
cd3177298ee2945bc5b8a1cb90a0d04c8a622027
c6d8dd7aba171163214253a3da841056ea2f6c87
/serenity-screenplay-webdriver/src/test/java/net/serenitybdd/screenplay/webtests/integration/actions/SelectTest.java
88114d0df2d2c5c867a1b30f36444140fdddf0ef
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
serenity-bdd/serenity-core
602b8369f9527bea21a30104a45ba9b6e4d48238
ab6eaa5018e467b43e4f099e7682ce2924a9b12f
refs/heads/main
2023-09-01T22:37:02.079831
2023-09-01T17:24:41
2023-09-01T17:24:41
26,201,720
738
656
NOASSERTION
2023-09-08T14:33:06
2014-11-05T03:44:57
HTML
UTF-8
Java
false
false
3,499
java
package net.serenitybdd.screenplay.webtests.integration.actions; import net.serenitybdd.junit.runners.SerenityRunner; import net.serenitybdd.screenplay.actions.SelectFromOptions; import net.serenitybdd.screenplay.questions.SelectedValue; import net.serenitybdd.screenplay.targets.Target; import net.serenitybdd.screenplay.ui.PageElement; import net.serenitybdd.screenplay.webtests.integration.ScreenplayInteractionTestBase; import org.junit.Test; import org.junit.runner.RunWith; import org.openqa.selenium.By; import static org.assertj.core.api.Assertions.assertThat; @RunWith(SerenityRunner.class) public class SelectTest extends ScreenplayInteractionTestBase { private final static Target COLOR_DROPDOWN = PageElement.withNameOrId("color"); @Test public void selectFromADropdownUsingATarget() { dina.attemptsTo(SelectFromOptions.byVisibleText("Red").from(COLOR_DROPDOWN)); assertThat(dina.asksFor(SelectedValue.of(COLOR_DROPDOWN))).isEqualTo("red"); } @Test public void selectFromADropdownUsingCSS() { dina.attemptsTo(SelectFromOptions.byVisibleText("Red").from("#color")); assertThat(dina.asksFor(SelectedValue.of(COLOR_DROPDOWN))).isEqualTo("red"); } @Test public void selectFromADropdownUsingALocator() { dina.attemptsTo(SelectFromOptions.byVisibleText("Red").from(By.id("color"))); assertThat(dina.asksFor(SelectedValue.of(COLOR_DROPDOWN))).isEqualTo("red"); } @Test public void selectFromADropdownByValue() { dina.attemptsTo(SelectFromOptions.byValue("red").from(COLOR_DROPDOWN)); assertThat(dina.asksFor(SelectedValue.of(COLOR_DROPDOWN))).isEqualTo("red"); } @Test public void selectFromADropdownByIndex() { dina.attemptsTo(SelectFromOptions.byIndex(1).from(COLOR_DROPDOWN)); assertThat(dina.asksFor(SelectedValue.of(COLOR_DROPDOWN))).isEqualTo("green"); } // // @Test // public void clickOnAButtonUsingASelector() { // // assertThat(dina.asksFor(Text.of(BUTTON_STATE))).isEqualTo("Unclicked"); // // dina.attemptsTo(Click.on("#button")); // // assertThat(dina.asksFor(Text.of(BUTTON_STATE))).isEqualTo("Clicked"); // } // // @Test // public void clickOnAButtonUsingAByLocator() { // // assertThat(dina.asksFor(Text.of(BUTTON_STATE))).isEqualTo("Unclicked"); // // dina.attemptsTo(Click.on(By.id("button"))); // // assertThat(dina.asksFor(Text.of(BUTTON_STATE))).isEqualTo("Clicked"); // } // // @Test // public void clickOnACheckbox() { // // assertThat(dina.asksFor(SelectedStatus.of(CHECKBOX))).isFalse(); // // dina.attemptsTo(Click.on(CHECKBOX)); // // assertThat(dina.asksFor(SelectedStatus.of(CHECKBOX))).isTrue(); // } // // @Test // public void clickOnAButtonWaitingForItToBeEnabled() { // // assertThat(dina.asksFor(Text.of(DELAYED_BUTTON_STATE))).isEqualTo("Unclicked"); // // dina.attemptsTo(Click.on("#delayed-button").afterWaitingUntilEnabled()); // // assertThat(dina.asksFor(Text.of(DELAYED_BUTTON_STATE))).isEqualTo("Clicked"); // } // // @Test // public void clickOnAButtonWaitingForItToBePresent() { // // assertThat(dina.asksFor(Text.of(INVISIBLE_BUTTON_STATE))).isEqualTo("Unclicked"); // // dina.attemptsTo(Click.on("#invisible-button").afterWaitingUntilPresent()); // // assertThat(dina.asksFor(Text.of(INVISIBLE_BUTTON_STATE))).isEqualTo("Clicked"); // } }
[ "john.smart@wakaleo.com" ]
john.smart@wakaleo.com
b2fa232836813a6dba384fff041eb79d214bcf3a
394cb0380194e2ece2e49a5a3519f13bbcadfa0d
/android/app/src/main/java/com/appbillingmodel2_dev_6374/MainActivity.java
22130ca26b67e1c694bb48735a35ae0be3c53e14
[]
no_license
crowdbotics-apps/appbillingmodel2-dev-6374
58be58fdd28dc25e35f104921e88e700501ac7c0
0920a490c61683af452f8b7e37e429b0206f123f
refs/heads/master
2022-11-12T02:34:32.044450
2020-06-22T11:47:54
2020-06-22T11:47:54
274,122,377
0
0
null
null
null
null
UTF-8
Java
false
false
395
java
package com.appbillingmodel2_dev_6374; import com.facebook.react.ReactActivity; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. * This is used to schedule rendering of the component. */ @Override protected String getMainComponentName() { return "appbillingmodel2_dev_6374"; } }
[ "team@crowdbotics.com" ]
team@crowdbotics.com
71f9fc4b5243c5e71f62e3de776fdbc92aeb5ae9
7af846ccf54082cd1832c282ccd3c98eae7ad69a
/ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_13/Foo15.java
b650a240c4bc88b01af0d14802177acd6b32bfeb
[]
no_license
Kadanza/TestModules
821f216be53897d7255b8997b426b359ef53971f
342b7b8930e9491251de972e45b16f85dcf91bd4
refs/heads/master
2020-03-25T08:13:09.316581
2018-08-08T10:47:25
2018-08-08T10:47:25
143,602,647
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package taxi.nicecode.com.ftmap.generated.package_13; public class Foo15 { public void foo0(){ new Foo14().foo5(); } public void foo1(){ foo0(); } public void foo2(){ foo1(); } public void foo3(){ foo2(); } public void foo4(){ foo3(); } public void foo5(){ foo4(); } }
[ "1" ]
1
d823eb4923b48c02c19d1e066e3de5fdffe35c0d
bb0a69d4a2a17f3148d0ec2cd5e6e1da73427197
/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/ReportObservation.java
1072eb0a0814ad7370ea5da240c7d0e83ae0039f
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
JasmineHAPI/hapi-fhir
de577d8451aa7e921deb7be675549486934d0ba9
96d6fa1b8a0c42f6797bd2e5ac3578904a6b5f03
refs/heads/master
2020-12-26T14:24:11.069062
2016-03-15T14:03:22
2016-03-15T14:03:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,640
java
package ca.uhn.fhir.parser; import ca.uhn.fhir.model.api.annotation.Child; import ca.uhn.fhir.model.api.annotation.Description; import ca.uhn.fhir.model.api.annotation.Extension; import ca.uhn.fhir.model.api.annotation.ResourceDef; import ca.uhn.fhir.model.dstu2.resource.Observation; import ca.uhn.fhir.model.primitive.BooleanDt; import ca.uhn.fhir.model.primitive.StringDt; import ca.uhn.fhir.util.ElementUtil; @ResourceDef(name = "Observation", id = "reportobservation") public class ReportObservation extends Observation { private static final long serialVersionUID = 1L; /** * Each extension is defined in a field. Any valid HAPI Data Type can be used for the field type. Note that the * [name=""] attribute in the @Child annotation needs to match the name for the bean accessor and mutator methods. */ @Child(name = "mandatory", order = 0) @Extension(url = "#mandatory", definedLocally = true, isModifier = false) @Description(shortDefinition = "The report observation is mandatory or not") private BooleanDt mandatory; @Child(name = "readOnly", order = 1) @Extension(url = "#readOnly", definedLocally = true, isModifier = false) @Description(shortDefinition = "The report observation is read only or not") private BooleanDt readOnly; @Child(name = "defaultCursor", order = 2) @Extension(url = "#defaultCursor", definedLocally = true, isModifier = false) @Description(shortDefinition = "The report observation is default cursor or not") private BooleanDt defaultCursor; @Child(name = "sectionContentId", order = 3) @Extension(url = "#sectionContentId", definedLocally = true, isModifier = false) @Description(shortDefinition = "The primary key of the report section content") private StringDt sectionContentId; /** * It is important to override the isEmpty() method, adding a check for any newly added fields. */ @Override public boolean isEmpty() { return super.isEmpty() && ElementUtil.isEmpty(mandatory, readOnly, defaultCursor, sectionContentId); } /******** * Accessors and mutators follow * * IMPORTANT: Each extension is required to have an getter/accessor and a stter/mutator. You are highly recommended * to create getters which create instances if they do not already exist, since this is how the rest of the HAPI * FHIR API works. ********/ /** Getter for mandatory */ public BooleanDt getMandatory() { if (mandatory == null) { mandatory = new BooleanDt(false); } return mandatory; } /** Setter for mandatory */ public ReportObservation setMandatory(Boolean isMandatory) { mandatory = new BooleanDt(isMandatory); return this; } /** Getter for readOnly */ public BooleanDt getReadOnly() { if (readOnly == null) { readOnly = new BooleanDt(false); } return readOnly; } /** Setter for readOnly */ public ReportObservation setReadOnly(Boolean isReadOnly) { readOnly = new BooleanDt(isReadOnly); return this; } /** Getter for defaultCursor */ public BooleanDt getDefaultCursor() { if (defaultCursor == null) { defaultCursor = new BooleanDt(false); } return defaultCursor; } /** Setter for defaultCursor */ public ReportObservation setDefaultCursor(Boolean isDefaultCursor) { defaultCursor = new BooleanDt(isDefaultCursor); return this; } /** Getter for sectionContentId */ public StringDt getSectionContentId() { if (sectionContentId == null) { sectionContentId = new StringDt(); } return sectionContentId; } /** Setter for sectionContentId */ public ReportObservation setSectionContentId(String sectionContentId) { this.sectionContentId = new StringDt(sectionContentId); return this; } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
b169df949ab11fd27de29f0df9fcc5c81d91e66e
e78d233c910fe87351380f4f483f4fad468ce1aa
/src/main/java/com/swingfrog/summer/util/ThreadCountUtil.java
70d10d9c432097e6f65aa75f3a0a904c812059a5
[ "Apache-2.0" ]
permissive
SwingFrog/Summer
665f9bacd514dbb77f05fa2800d3ae044dbea612
554af9af5b8f526e2f45bb1ce17a5eff11cbe482
refs/heads/master
2023-06-22T13:34:37.957151
2023-03-16T05:29:57
2023-03-16T05:29:57
160,478,462
568
154
Apache-2.0
2023-06-14T22:29:58
2018-12-05T07:30:01
Java
UTF-8
Java
false
false
479
java
package com.swingfrog.summer.util; public class ThreadCountUtil { public static int ioDenseness(int threadCount) { if (threadCount <= 0) { threadCount = Runtime.getRuntime().availableProcessors() * 2; } return threadCount; } public static int cpuDenseness(int threadCount) { if (threadCount <= 0) { threadCount = Runtime.getRuntime().availableProcessors() + 1; } return threadCount; } }
[ "swingfrog@qq.com" ]
swingfrog@qq.com
4f845e316fb2d1ba982e3879a29e0a6a3ad739b7
9ed51c91154e25c5533a9e1ca09323aa0e286cd1
/src/main/java/com/teamium/service/GroupService.java
371ee913fad9e9f1e711cd7daec3271c448eab7f
[]
no_license
Arpitvarshney29/Teamium
89274df6dce311557eaa8031914321bba0747f90
1f9e12d47e23f638f5d55a67c8f21093392bc630
refs/heads/master
2022-07-07T12:09:26.478632
2020-03-02T07:13:08
2020-03-02T07:13:08
244,298,607
0
0
null
null
null
null
UTF-8
Java
false
false
7,818
java
package com.teamium.service; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.teamium.domain.Group; import com.teamium.domain.prod.resources.staff.StaffMember; import com.teamium.dto.GroupDTO; import com.teamium.dto.StaffMemberDTO; import com.teamium.exception.NotFoundException; import com.teamium.exception.UnauthorizedException; import com.teamium.exception.UnprocessableEntityException; import com.teamium.repository.GroupRepository; /** * Service to manage group configuration * * @author Nishant * */ @Service public class GroupService { private GroupRepository groupRepository; private StaffMemberService staffMemberService; private AuthenticationService authenticationService; private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired public GroupService(GroupRepository groupRepository, StaffMemberService staffMemberService, AuthenticationService authenticationService) { this.groupRepository = groupRepository; this.staffMemberService = staffMemberService; this.authenticationService = authenticationService; } /** * To save or update GroupDTO * * @param groupDTO * @return GroupDTO */ public GroupDTO saveOrUpdate(GroupDTO groupDTO) { logger.info(" Inside GroupService: saveOrUpdateGroup GroupDTO: " + groupDTO.toString()); if (!authenticationService.isAdmin()) { logger.warn("Invalid role"); throw new UnauthorizedException("Invalid role"); } validateGroupDTO(groupDTO); Group group = null; Group groupByName = groupRepository.findByName(groupDTO.getName()); if (groupDTO.getId() != null) { group = findById(groupDTO.getId()); if (groupByName != null && (group.getId() != groupByName.getId())) { logger.error("Group already exist with given name."); throw new UnprocessableEntityException("Group already exist with given name."); } } else if (groupByName != null) { logger.error("Group already exist with given name."); throw new UnprocessableEntityException("Group already exist with given name."); } Set<StaffMember> members = validateGroupMembers(groupDTO.getGroupMembers(), group == null ? null : group.getGroupMembers()); group = new Group(groupDTO.getId(), groupDTO.getName(), groupDTO.getColorTheme(), groupDTO.isDynamic(), members); return new GroupDTO(groupRepository.save(group)); } /** * To add staff member on a group. * * @param groupId * @param staffMemberId * @return GroupDTO */ public GroupDTO addStaffMemberToGroup(long groupId, long staffMemberId) { logger.info( " Inside GroupService: addStaffMemberToGroup groupId: " + groupId + "staffMemberId:" + staffMemberId); Group group = findById(groupId); StaffMember staffMember = staffMemberService.findById(staffMemberId); group.addGroupMamber(staffMember); logger.info(" Returning from GroupService: addStaffMemberToGroup groupId: " + groupId + "staffMemberId:" + staffMemberId); return new GroupDTO(groupRepository.save(group)); } /** * To remove a staff member from group. * * @param groupId * @param staffMemberId * @return GroupDTO */ public GroupDTO removeStaffMemberFromGroup(long groupId, long staffMemberId) { logger.info(" Inside GroupService: removeStaffMemberFromGroup groupId: " + groupId + "staffMemberId:" + staffMemberId); Group group = findById(groupId); StaffMember staffMember = staffMemberService.findById(staffMemberId); group.removeGroupMamber(staffMember); logger.info(" Returning from GroupService: removeStaffMemberFromGroup groupId: " + groupId + "staffMemberId:" + staffMemberId); return new GroupDTO(groupRepository.save(group)); } /** * To get list of GroupDTO. * * @return list of GroupDTO */ public List<GroupDTO> getAllGroups() { return groupRepository.findAllGroups(); } /** * To validate and handle group members. * * @param staffMemberDTOs * @param dbGroupMembers * @return */ private Set<StaffMember> validateGroupMembers(Set<StaffMemberDTO> staffMemberDTOs, Set<StaffMember> dbGroupMembers) { logger.info(" Inside GroupService: validateGroupMembers GroupDTO: "); AtomicBoolean isRemove = new AtomicBoolean(false); if (dbGroupMembers != null) { Set<StaffMember> members = new HashSet<>(); Set<StaffMember> dbLines = dbGroupMembers; if (staffMemberDTOs != null && !staffMemberDTOs.isEmpty()) { members = staffMemberDTOs.stream().map(dto -> { // removing members not present in dto if (dbLines != null && !dbLines.isEmpty()) { dbLines.removeIf(dt -> { isRemove.set(true); staffMemberDTOs.forEach(dt1 -> { if (dt1.getId() != null && dt.getId() != null && dt1.getId().equals(dt.getId())) { isRemove.set(false); return; } }); return isRemove.get(); }); } StaffMember staffMember = staffMemberService.findById(dto.getId()); if (staffMember == null) { logger.error("Invalid group member.With id:" + dto.getId()); throw new UnprocessableEntityException("Invalid group member."); } return staffMember; }).collect(Collectors.toSet()); } return members; } else { Set<StaffMember> groupMenbers = new HashSet<>(); staffMemberDTOs.forEach(member -> { StaffMember staffMember = staffMemberService.findById(member.getId()); if (staffMember == null) { throw new UnprocessableEntityException("Invalid group member"); } else { groupMenbers.add(staffMember); } }); return groupMenbers; } } /** * To validate GroupDTO * * @param GroupDTO */ private void validateGroupDTO(GroupDTO groupDTO) { logger.info(" Inside GroupService: validateGroupDTO GroupDTO: " + groupDTO.toString()); if (StringUtils.isBlank(groupDTO.getName())) { logger.error("Group name can not be empty."); throw new UnprocessableEntityException("Group name can not be empty."); } if (groupDTO.getGroupMembers().isEmpty()) { logger.error("Please add atleast one group member"); throw new UnprocessableEntityException("Please add atleast one group member."); } logger.info("Returning after validating groupDTO"); } /** * To delete Group by id. * * @param id */ public void deleteGroupById(long id) { logger.info("Inside GroupService: deleteGroupById:" + id); if (!authenticationService.isAdmin()) { logger.warn("Invalid role"); throw new UnauthorizedException("Invalid role"); } findById(id); groupRepository.delete(id); logger.info("Successfully deleted"); } /** * To find Group by id. * * @param id * @return Group */ public Group findById(long id) { logger.info("Inside GroupService: findById:" + id); Group group = groupRepository.findOne(id); if (group == null) { logger.error("Invalid Group id."); throw new NotFoundException("Invalid Group id."); } return group; } /** * To find GroupDTO by id. * * @param id * @return GroupDTO */ public GroupDTO findGroupDTOById(long id) { logger.info("Inside GroupService: findGroupDTOById:" + id); GroupDTO groupDTO = new GroupDTO(findById(id)); logger.info("Returning after geting GroupDTO by id"); return groupDTO; } /** * To get Group by name. * * @param name * @return */ public Group findByName(String name) { if (StringUtils.isBlank(name)) { throw new UnprocessableEntityException("Name can not be empty or null"); } return groupRepository.findByName(name); } }
[ "nishant.kumar@wittybrains.com" ]
nishant.kumar@wittybrains.com
5d28d21a9381c76258d3b9049a2b30cb8d15f9a0
dd5372efb0c7b488126063c0710014a642fa77db
/puzzler-core/src/main/java/com/github/skapral/puzzler/core/source/AssertPuzzleSourceProducesNoPuzzles.java
5140d460f06d79cd227979372f6cd901d254c81a
[ "MIT" ]
permissive
skapral/puzzlerbot
1b538b82f8efcccc7ba857e119f91c09aca0421a
9990d2485084b2b6fae280a8d3a61ac0dbde9ca6
refs/heads/master
2021-07-17T20:28:40.290003
2020-01-14T19:28:24
2020-01-14T19:31:53
134,487,043
20
4
MIT
2021-07-15T02:24:10
2018-05-22T23:34:56
Java
UTF-8
Java
false
false
2,006
java
/*- * =========================================================================== * puzzler-core * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Copyright (C) 2019 Kapralov Sergey * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * ============================================================================ */ package com.github.skapral.puzzler.core.source; import com.github.skapral.puzzler.core.PuzzleSource; /** * Assertion that passes only if the puzzle source under test provides * zero puzzles. * * @author Kapralov Sergey */ public class AssertPuzzleSourceProducesNoPuzzles extends AssertPuzzleSourceProducesCertainPuzzles { /** * Ctor. * * @param puzzleSource Puzzle source under test. */ public AssertPuzzleSourceProducesNoPuzzles(PuzzleSource puzzleSource) { super( puzzleSource ); } }
[ "skapralov@mail.ru" ]
skapralov@mail.ru
0dc29d58e071a9c42a87df1fb05cd408b5ecebce
e787c556a822380e6a9d1fe9dd162fac288684f3
/services/scheduler-service/scheduler-rest-model/src/main/java/com/thinkbiganalytics/scheduler/rest/model/ScheduleIdentifier.java
3063e0ae1ff1ea5b3fbc4aae4faba7778d2d1d7f
[ "WTFPL", "CDDL-1.0", "MIT", "CC0-1.0", "EPL-1.0", "PostgreSQL", "BSD-3-Clause", "LGPL-2.1-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-protobuf", "OFL-1.1" ]
permissive
rohituppalapati/kylo-source
82bd8e788a14a33edcff8ac6306245c230e90665
cc794fb8a128a1bb6453e029ab7f6354e75c863e
refs/heads/master
2022-12-28T08:14:32.280826
2019-08-13T18:16:31
2019-08-13T18:16:31
200,886,840
0
0
Apache-2.0
2022-12-16T03:26:58
2019-08-06T16:23:27
Java
UTF-8
Java
false
false
1,580
java
package com.thinkbiganalytics.scheduler.rest.model; /*- * #%L * thinkbig-scheduler-rest-model * %% * Copyright (C) 2017 ThinkBig Analytics * %% * 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. * #L% */ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** * a schedule identifier for the user interface representing both JobIdentifier and TriggerIdentifiers */ @JsonIgnoreProperties(ignoreUnknown = true) public class ScheduleIdentifier { private String name; private String group = "DEFAULT"; public ScheduleIdentifier() { super(); } public ScheduleIdentifier(@JsonProperty("name") String name, @JsonProperty("group") String group) { this.name = name; this.group = group; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getGroup() { return group; } public void setGroup(String group) { this.group = group; } }
[ "rohituppalapati@Rohits-MacBook-Pro.local" ]
rohituppalapati@Rohits-MacBook-Pro.local
3eb922669f73279997448ecaf14760d1fe42a3bc
de01cb554c2292b0fbb79b4d5413a2f6414ea472
/algorithms/Hard/759.employee-free-time.java
209cf604ae6eac694c2a1ef4d419dc8ae9979b0c
[]
no_license
h4hany/yeet-the-leet
98292017eadd3dde98a079aafcd7648aa98701b4
563d779467ef5a7cc85cbe954eeaf3c1f5463313
refs/heads/master
2022-12-10T08:35:39.830260
2020-09-02T23:12:15
2020-09-02T23:12:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,858
java
/* * @lc app=leetcode id=759 lang=java * * [759] Employee Free Time * * https://leetcode.com/problems/employee-free-time/description/ * * algorithms * Hard (66.42%) * Total Accepted: 42K * Total Submissions: 63.2K * Testcase Example: '[[[1,2],[5,6]],[[1,3]],[[4,10]]]' * * We are given a list schedule of employees, which represents the working time * for each employee. * * Each employee has a list of non-overlapping Intervals, and these intervals * are in sorted order. * * Return the list of finite intervals representing common, positive-length * free time for all employees, also in sorted order. * * (Even though we are representing Intervals in the form [x, y], the objects * inside are Intervals, not lists or arrays. For example, schedule[0][0].start * = 1, schedule[0][0].end = 2, and schedule[0][0][0] is not defined).  Also, * we wouldn't include intervals like [5, 5] in our answer, as they have zero * length. * * * Example 1: * * * Input: schedule = [[[1,2],[5,6]],[[1,3]],[[4,10]]] * Output: [[3,4]] * Explanation: There are a total of three employees, and all common * free time intervals would be [-inf, 1], [3, 4], [10, inf]. * We discard any intervals that contain inf as they aren't finite. * * * Example 2: * * * Input: schedule = [[[1,3],[6,7]],[[2,4]],[[2,5],[9,12]]] * Output: [[5,6],[7,9]] * * * * Constraints: * * * 1 <= schedule.length , schedule[i].length <= 50 * 0 <= schedule[i].start < schedule[i].end <= 10^8 * * */ /* // Definition for an Interval. class Interval { public int start; public int end; public Interval() {} public Interval(int _start, int _end) { start = _start; end = _end; } }; */ class Solution { public List<Interval> employeeFreeTime(List<List<Interval>> schedule) { } }
[ "kevin.wkmiao@gmail.com" ]
kevin.wkmiao@gmail.com
495ce447d76fafaa3050ee44cf31f931b07bb544
211625e24b05db18390958c3ea179bbb593dba4a
/src/main/java/com/dbs/jhipster/demo/monolithapplication/service/dto/PasswordChangeDTO.java
e3d5420acb6af112f158cd2258af03d83d26b080
[]
no_license
rajeevjha2k4/jhipster-sample-demo-mvn-application
da7b446d83ced6c7ee8d71c49a51c1b34726d86d
bd4b5429ebeaeb8fdd2bb4e7308a68cd25f3cb94
refs/heads/master
2020-04-07T11:34:22.652448
2018-11-20T04:42:28
2018-11-20T04:42:28
158,331,881
0
0
null
null
null
null
UTF-8
Java
false
false
885
java
package com.dbs.jhipster.demo.monolithapplication.service.dto; /** * A DTO representing a password change required data - current and new password. */ public class PasswordChangeDTO { private String currentPassword; private String newPassword; public PasswordChangeDTO() { // Empty constructor needed for Jackson. } public PasswordChangeDTO(String currentPassword, String newPassword) { this.currentPassword = currentPassword; this.newPassword = newPassword; } public String getCurrentPassword() { return currentPassword; } public void setCurrentPassword(String currentPassword) { this.currentPassword = currentPassword; } public String getNewPassword() { return newPassword; } public void setNewPassword(String newPassword) { this.newPassword = newPassword; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech