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
88ed1eede30321d6ec309ca09136b70b2c93a833
bce863c3e2a75a6bee647b1096a9791b0129bd2e
/intellij/astava/src/main/java/astava/tree/StatementDomVisitor.java
b6eb6c628b37fe78bd59493fd13eb34aae69e713
[ "MIT" ]
permissive
jakobehmsen/astava
a15bcc56a824be11cf47104c4ced765288f19d76
f80f740ed31fcab94c0e0e7a2ebfc01a6c93e26f
refs/heads/master
2016-09-10T18:04:17.059260
2015-11-26T21:01:03
2015-11-26T21:01:03
31,459,193
3
1
null
null
null
null
UTF-8
Java
false
false
4,639
java
package astava.tree; import org.objectweb.asm.tree.MethodNode; import java.util.List; import java.util.Map; public interface StatementDomVisitor { void visitVariableDeclaration(String type, String name); void visitVariableAssignment(String name, ExpressionDom value); void visitFieldAssignment(ExpressionDom target, String name, String type, ExpressionDom value); void visitStaticFieldAssignment(String typeName, String name, String type, ExpressionDom value); void visitIncrement(String name, int amount); void visitReturnValue(ExpressionDom expression); void visitBlock(List<StatementDom> statements); void visitIfElse(ExpressionDom condition, StatementDom ifTrue, StatementDom ifFalse); void visitBreakCase(); void visitReturn(); void visitInvocation(int invocation, ExpressionDom target, String type, String name, String descriptor, List<ExpressionDom> arguments); void visitNewInstance(String type, List<String> parameterTypes, List<ExpressionDom> arguments); void visitLabel(String name); void visitGoTo(String name); void visitSwitch(ExpressionDom expression, Map<Integer, StatementDom> cases, StatementDom defaultBody); void visitASM(MethodNode methodNode); void visitMethodBody(); void visitThrow(ExpressionDom expression); void visitTryCatch(StatementDom tryBlock, List<CodeDom> catchBlocks); void visitMark(Object label); void visitGoTo(Object label); void visitArrayStore(ExpressionDom expression, ExpressionDom index, ExpressionDom value); void visitSwitch(ExpressionDom expression, Object dflt, int[] keys, Object[] labels); void visitIfJump(ExpressionDom condition, Object label); class Default implements StatementDomVisitor { @Override public void visitVariableDeclaration(String type, String name) { } @Override public void visitVariableAssignment(String name, ExpressionDom value) { } @Override public void visitFieldAssignment(ExpressionDom target, String name, String type, ExpressionDom value) { } @Override public void visitStaticFieldAssignment(String typeName, String name, String type, ExpressionDom value) { } @Override public void visitIncrement(String name, int amount) { } @Override public void visitReturnValue(ExpressionDom expression) { } @Override public void visitBlock(List<StatementDom> statements) { } @Override public void visitIfElse(ExpressionDom condition, StatementDom ifTrue, StatementDom ifFalse) { } @Override public void visitBreakCase() { } @Override public void visitReturn() { } @Override public void visitInvocation(int invocation, ExpressionDom target, String type, String name, String descriptor, List<ExpressionDom> arguments) { } @Override public void visitNewInstance(String type, List<String> parameterTypes, List<ExpressionDom> arguments) { } @Override public void visitLabel(String name) { } @Override public void visitGoTo(String name) { } @Override public void visitSwitch(ExpressionDom expression, Map<Integer, StatementDom> cases, StatementDom defaultBody) { } @Override public void visitASM(MethodNode methodNode) { } @Override public void visitMethodBody() { } @Override public void visitThrow(ExpressionDom expression) { } @Override public void visitTryCatch(StatementDom tryBlock, List<CodeDom> catchBlocks) { } @Override public void visitMark(Object label) { } @Override public void visitGoTo(Object label) { } @Override public void visitArrayStore(ExpressionDom expression, ExpressionDom index, ExpressionDom value) { } @Override public void visitSwitch(ExpressionDom expression, Object dflt, int[] keys, Object[] labels) { } @Override public void visitIfJump(ExpressionDom condition, Object label) { } } public static abstract class Return<T> extends Default { private T result; public void setResult(T result) { this.result = result; } public T returnFrom(StatementDom statement) { statement.accept(this); return result; } } }
[ "jakobehmsen.github@gmail.com" ]
jakobehmsen.github@gmail.com
a34e4df40d81c2a4caa7cefbf472db8cd7f419dc
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mobileqqi/classes.jar/LBS_V2_PROTOCOL/GPS_V2.java
d048739a897447712fd5ed648b8892e7143f37a6
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,320
java
package LBS_V2_PROTOCOL; import com.qq.taf.jce.JceInputStream; import com.qq.taf.jce.JceOutputStream; import com.qq.taf.jce.JceStruct; public final class GPS_V2 extends JceStruct { public int eType = 2; public int iAlt = -10000000; public int iLat = 900000000; public int iLon = 900000000; public GPS_V2() {} public GPS_V2(int paramInt1, int paramInt2, int paramInt3, int paramInt4) { this.iLat = paramInt1; this.iLon = paramInt2; this.eType = paramInt3; this.iAlt = paramInt4; } public void readFrom(JceInputStream paramJceInputStream) { this.iLat = paramJceInputStream.read(this.iLat, 0, true); this.iLon = paramJceInputStream.read(this.iLon, 1, true); this.eType = paramJceInputStream.read(this.eType, 2, true); this.iAlt = paramJceInputStream.read(this.iAlt, 3, false); } public void writeTo(JceOutputStream paramJceOutputStream) { paramJceOutputStream.write(this.iLat, 0); paramJceOutputStream.write(this.iLon, 1); paramJceOutputStream.write(this.eType, 2); paramJceOutputStream.write(this.iAlt, 3); } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mobileqqi\classes2.jar * Qualified Name: LBS_V2_PROTOCOL.GPS_V2 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
5959305977136e712d02a5c5d442bd834124f70e
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2018/8/InternalSchemaActions.java
b6be17502405a73c4bf1bee4aac12d03ad8c8bb3
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
2,222
java
/* * Copyright (c) 2002-2018 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.kernel.impl.coreapi.schema; import org.neo4j.graphdb.Label; import org.neo4j.graphdb.RelationshipType; import org.neo4j.graphdb.schema.ConstraintDefinition; import org.neo4j.graphdb.schema.IndexDefinition; import org.neo4j.internal.kernel.api.exceptions.KernelException; /** * Implementations are used to configure {@link IndexCreatorImpl} and {@link BaseNodeConstraintCreator} for re-use * by both the graph database and the batch inserter. */ public interface InternalSchemaActions { IndexDefinition createIndexDefinition( Label label, String... propertyKey ); void dropIndexDefinitions( IndexDefinition indexDefinition ); ConstraintDefinition createPropertyUniquenessConstraint( IndexDefinition indexDefinition ); ConstraintDefinition createNodeKeyConstraint( IndexDefinition indexDefinition ); ConstraintDefinition createPropertyExistenceConstraint( Label label, String... propertyKey ); ConstraintDefinition createPropertyExistenceConstraint( RelationshipType type, String propertyKey ); void dropPropertyUniquenessConstraint( Label label, String[] properties ); void dropNodeKeyConstraint( Label label, String[] properties ); void dropNodePropertyExistenceConstraint( Label label, String[] properties ); void dropRelationshipPropertyExistenceConstraint( RelationshipType type, String propertyKey ); String getUserMessage( KernelException e ); void assertInOpenTransaction(); }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
28f2e44854c291b55c85edbdfb62698546bccc14
809b0e78d1665230a2c3df179501fd6d4f3e089a
/datastructure-amazonQuestions/datastrucuture/src/com/practise/array/order/MaximumRectangularAreaInhistogram.java
773e7d48d65d9851f73602ae5a6994b4ab5a92b6
[]
no_license
vinay25788/datastructure-amazonQuestions
c4b67cbd783c9990e7335c1dce1225b4bce988a5
7de42100f3b70492984b98aebc9fd44dfa17a415
refs/heads/master
2020-05-20T04:25:02.347694
2020-01-19T08:23:13
2020-01-19T08:23:13
185,382,625
0
0
null
null
null
null
UTF-8
Java
false
false
999
java
package com.practise.array.order; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Hashtable; import java.util.Stack; public class MaximumRectangularAreaInhistogram { public static void main(String[] args) { HashMap<Integer,String > map ; Hashtable<String,String> table; Collections.synchronizedMap(m) Collection<Integer> c; int a[]= {6, 2, 5, 4, 5, 1, 6}; int b[]= {2,1,2,3,1}; maxArea(b); } public static void maxArea(int[] a) { Stack<Integer> st = new Stack<>(); //st.push(0); int max=0; int i=0; while(i<a.length) { if(st.isEmpty()== true || a[st.peek()]<= a[i]) st.push(i++); else { int tp = st.pop(); int area=a[tp]*(st.isEmpty() == true?i:i-st.peek()-1); if(max<area) max = area; } } while(st.isEmpty()== false) { int tp = st.pop(); int area=a[tp]*(st.isEmpty() == true?i:i-st.peek()-1); if(max<area) max = area; } System.out.println(max); } }
[ "vinay25788@gmail.com" ]
vinay25788@gmail.com
2189a2757f72496adc9f5d836f8fa5eaa64a544a
c94f888541c0c430331110818ed7f3d6b27b788a
/saastest16/java/src/main/java/com/antgroup/antchain/openapi/saastest16/models/QueryDemoGatewayCheckRequest.java
99eb513358cabffd3e84fc0bedbb5fda9dc14c08
[ "MIT", "Apache-2.0" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
1,070
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.saastest16.models; import com.aliyun.tea.*; public class QueryDemoGatewayCheckRequest extends TeaModel { // OAuth模式下的授权token @NameInMap("auth_token") public String authToken; @NameInMap("product_instance_id") public String productInstanceId; public static QueryDemoGatewayCheckRequest build(java.util.Map<String, ?> map) throws Exception { QueryDemoGatewayCheckRequest self = new QueryDemoGatewayCheckRequest(); return TeaModel.build(map, self); } public QueryDemoGatewayCheckRequest setAuthToken(String authToken) { this.authToken = authToken; return this; } public String getAuthToken() { return this.authToken; } public QueryDemoGatewayCheckRequest setProductInstanceId(String productInstanceId) { this.productInstanceId = productInstanceId; return this; } public String getProductInstanceId() { return this.productInstanceId; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
f611c195cc3ebc1fd0bb9599123250f10f40a496
ebc47f4dc01b19c70c9469023418a4beedc05fb0
/BGTAOECCMS/src/com/gta/oec/cms/util/ThreadLocalUtils.java
c4d883e87c682014bc2fb45612452e4e0379cf3a
[]
no_license
witnesslq/OEC_MOOC
39b088a81c35aca9ec279805f772f702f98a2791
d0af6485717f8325ae1245c7dda26d7923ca5ef8
refs/heads/master
2021-01-21T22:10:34.992690
2014-05-04T05:31:35
2014-05-04T05:31:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
665
java
/** * ThreadLocalUtils.java V1.0 2014-3-6 上午8:30:56 * * Copyright GTA Information System Co. ,Ltd. All rights reserved. * * Modification history(By Time Reason): * * Description: */ package com.gta.oec.cms.util; import javax.servlet.http.HttpServletRequest; public class ThreadLocalUtils { public static final ThreadLocal<HttpServletRequest> REQUEST_THREAD_LOCAL = new ThreadLocal<HttpServletRequest>() ; public static HttpServletRequest getRequest(){ return REQUEST_THREAD_LOCAL.get(); } public static void setReques(HttpServletRequest request) { REQUEST_THREAD_LOCAL.set(request); } }
[ "jianshaosky@126.com" ]
jianshaosky@126.com
2f13b5730df81d340c37fd575fbafbd02e9b48a6
21e3d5f861e3bb2b7d64aa9c914f300a542235cb
/src/main/java/io/growing/graphql/model/SubscriptionsQueryRequest.java
474e23202b21b64f99f53dc2833c40e86c768851
[ "MIT" ]
permissive
okpiaoxuefeng98/growingio-graphql-javasdk
d274378dad69d971fe14207f74d7a3135959460b
97a75faf337446fa16536a42a3b744f7fc992fb4
refs/heads/master
2023-02-04T15:38:13.627500
2020-12-24T07:25:32
2020-12-24T07:25:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,958
java
package io.growing.graphql.model; import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperation; import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLOperationRequest; import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; @javax.annotation.Generated( value = "com.kobylynskyi.graphql.codegen.GraphQLCodegen", date = "2020-12-22T15:45:58+0800" ) public class SubscriptionsQueryRequest implements GraphQLOperationRequest { private static final GraphQLOperation OPERATION_TYPE = GraphQLOperation.QUERY; private static final String OPERATION_NAME = "subscriptions"; private Map<String, Object> input = new LinkedHashMap<>(); public SubscriptionsQueryRequest() { } public void setProjectId(String projectId) { this.input.put("projectId", projectId); } public void setType(SubscriptionTypeDto type) { this.input.put("type", type); } @Override public GraphQLOperation getOperationType() { return OPERATION_TYPE; } @Override public String getOperationName() { return OPERATION_NAME; } @Override public Map<String, Object> getInput() { return input; } @Override public String toString() { return Objects.toString(input); } public static class Builder { private String projectId; private SubscriptionTypeDto type; public Builder() { } public Builder setProjectId(String projectId) { this.projectId = projectId; return this; } public Builder setType(SubscriptionTypeDto type) { this.type = type; return this; } public SubscriptionsQueryRequest build() { SubscriptionsQueryRequest obj = new SubscriptionsQueryRequest(); obj.setProjectId(projectId); obj.setType(type); return obj; } } }
[ "dreamylost@outlook.com" ]
dreamylost@outlook.com
000cd723c57fae4c39ae17f37fc2e239a568449b
73308ecf567af9e5f4ef8d5ff10f5e9a71e81709
/jaso78130/src/main/java/com/example/jaso78130/ExceptionControllerAdvice.java
0fc99d8a710d9b041367aef3743248671c20380f
[]
no_license
yukihane/stackoverflow-qa
bfaf371e3c61919492e2084ed4c65f33323d7231
ba5e6a0d51f5ecfa80bb149456adea49de1bf6fb
refs/heads/main
2023-08-03T06:54:32.086724
2023-07-26T20:02:07
2023-07-26T20:02:07
194,699,870
3
3
null
2023-03-02T23:37:45
2019-07-01T15:34:08
Java
UTF-8
Java
false
false
1,010
java
package com.example.jaso78130; import java.util.ArrayList; import java.util.List; import lombok.RequiredArgsConstructor; import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.validation.BindException; import org.springframework.validation.FieldError; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; @RestControllerAdvice @RequiredArgsConstructor public class ExceptionControllerAdvice { private final MessageSource messageSource; @ExceptionHandler(BindException.class) public List<String> handleExampleBindException(final BindException bindEx) throws Exception { final List<String> list = new ArrayList<>(); for (final FieldError err : bindEx.getBindingResult().getFieldErrors()) { list.add(messageSource.getMessage(err, LocaleContextHolder.getLocale())); } return list; } }
[ "yukihane.feather@gmail.com" ]
yukihane.feather@gmail.com
7a1f4744dd9387f7148eeacc0294448c932d7159
bc17fc41e9d627918a9c7ba511aa1db85f5b16fe
/GithubMosby/app/src/main/java/ru/gdgkazan/githubmosby/widget/DividerItemDecoration.java
fbd59613e83da40383866bf843ff9764a71c1a63
[ "Apache-2.0" ]
permissive
ANIKINKIRILL/AndroidSchool
5cb973fcf2994a050b25889ee22f806ee8ba0ff7
435345e26fa4c23701e82b797b3116a5d4664c52
refs/heads/master
2020-06-03T15:44:50.085343
2019-06-12T20:20:09
2019-06-12T20:20:09
191,635,285
4
0
null
2019-06-12T19:51:52
2019-06-12T19:51:52
null
UTF-8
Java
false
false
3,398
java
package ru.gdgkazan.githubmosby.widget; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; /** * @author Artur Vasilov */ public class DividerItemDecoration extends RecyclerView.ItemDecoration { private final Drawable mDivider; private int mOrientation = -1; public DividerItemDecoration(Context context) { final TypedArray a = context .obtainStyledAttributes(new int[]{android.R.attr.listDivider}); mDivider = a.getDrawable(0); a.recycle(); } @Override public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) { super.getItemOffsets(outRect, view, parent, state); if (mDivider == null) { return; } int position = parent.getChildAdapterPosition(view); if (position == RecyclerView.NO_POSITION || (position == 0)) { return; } if (mOrientation == -1) { getOrientation(parent); } if (mOrientation == LinearLayoutManager.VERTICAL) { outRect.top = mDivider.getIntrinsicHeight(); } else { outRect.left = mDivider.getIntrinsicWidth(); } } @Override public void onDrawOver(Canvas c, RecyclerView parent, RecyclerView.State state) { if (mDivider == null) { super.onDrawOver(c, parent, state); return; } // Initialization needed to avoid compiler warning int left = 0, right = 0, top = 0, bottom = 0, size; int orientation = mOrientation != -1 ? mOrientation : getOrientation(parent); int childCount = parent.getChildCount(); if (orientation == LinearLayoutManager.VERTICAL) { size = mDivider.getIntrinsicHeight(); left = parent.getPaddingLeft(); right = parent.getWidth() - parent.getPaddingRight(); } else { //horizontal size = mDivider.getIntrinsicWidth(); top = parent.getPaddingTop(); bottom = parent.getHeight() - parent.getPaddingBottom(); } for (int i = 1; i < childCount; i++) { View child = parent.getChildAt(i); RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams(); if (orientation == LinearLayoutManager.VERTICAL) { top = child.getTop() - params.topMargin - size; bottom = top + size; } else { //horizontal left = child.getLeft() - params.leftMargin; right = left + size; } mDivider.setBounds(left, top, right, bottom); mDivider.draw(c); } // show last divider } private int getOrientation(RecyclerView parent) { if (mOrientation == -1) { if (parent.getLayoutManager() instanceof LinearLayoutManager) { LinearLayoutManager layoutManager = (LinearLayoutManager) parent.getLayoutManager(); mOrientation = layoutManager.getOrientation(); } } return mOrientation; } }
[ "artur.vasilov@dz.ru" ]
artur.vasilov@dz.ru
7922a5dc4cafff22aedd40640c46a01a9fd71687
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes5.dex_source_from_JADX/com/facebook/graphql/model/GraphQLBudgetRecommendationsConnectionDeserializer.java
052d329162c1d20ee25510851ca37e70e3906025
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
877
java
package com.facebook.graphql.model; import com.facebook.common.json.FbJsonDeserializer; import com.facebook.common.json.GlobalAutoGenDeserializerCache; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; /* compiled from: phrase_length */ public class GraphQLBudgetRecommendationsConnectionDeserializer extends FbJsonDeserializer { static { GlobalAutoGenDeserializerCache.a(GraphQLBudgetRecommendationsConnection.class, new GraphQLBudgetRecommendationsConnectionDeserializer()); } public GraphQLBudgetRecommendationsConnectionDeserializer() { a(GraphQLBudgetRecommendationsConnection.class); } public Object m6686a(JsonParser jsonParser, DeserializationContext deserializationContext) { return GraphQLBudgetRecommendationsConnection__JsonHelper.m6688a(jsonParser); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
0c930ca1a819a44e06178f32673eaaf78e5d3ec8
6e1ce73bc8968ca4a8dbe3f418f1d81304e9db59
/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/generation/filters/FilterGeneration.java
0995d4fd5d09cc94831beb9385a6d4aef75ce499
[ "Apache-2.0" ]
permissive
cflocke/quarkus
1c5cf055a67b3a1a612036f15ca63570c0d11b09
d6d3a916af1e29d3ecd4fb201e1d0674e7673091
refs/heads/master
2023-01-19T23:34:51.595893
2021-12-01T14:20:40
2021-12-01T14:20:40
195,122,264
0
0
Apache-2.0
2023-01-17T20:04:26
2019-07-03T20:28:21
Java
UTF-8
Java
false
false
6,986
java
package org.jboss.resteasy.reactive.server.processor.generation.filters; import static org.jboss.resteasy.reactive.server.processor.util.ResteasyReactiveServerDotNames.SERVER_REQUEST_FILTER; import static org.jboss.resteasy.reactive.server.processor.util.ResteasyReactiveServerDotNames.SERVER_RESPONSE_FILTER; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.jboss.jandex.AnnotationInstance; import org.jboss.jandex.AnnotationTarget; import org.jboss.jandex.AnnotationValue; import org.jboss.jandex.ClassInfo; import org.jboss.jandex.DotName; import org.jboss.jandex.IndexView; import org.jboss.jandex.MethodInfo; import org.jboss.resteasy.reactive.common.processor.ResteasyReactiveDotNames; import org.jboss.resteasy.reactive.server.processor.util.GeneratedClass; import org.jboss.resteasy.reactive.server.processor.util.GeneratedClassOutput; public class FilterGeneration { public static List<GeneratedFilter> generate(IndexView index, Set<DotName> unwrappableTypes, Set<String> additionalBeanAnnotations) { List<GeneratedFilter> ret = new ArrayList<>(); for (AnnotationInstance instance : index .getAnnotations(SERVER_REQUEST_FILTER)) { if (instance.target().kind() != AnnotationTarget.Kind.METHOD) { continue; } MethodInfo methodInfo = instance.target().asMethod(); GeneratedClassOutput output = new GeneratedClassOutput(); String generatedClassName = CustomFilterGenerator.generateContainerRequestFilter(methodInfo, output, unwrappableTypes, additionalBeanAnnotations); Integer priority = null; boolean preMatching = false; boolean nonBlockingRequired = false; Set<String> nameBindingNames = new HashSet<>(); AnnotationValue priorityValue = instance.value("priority"); if (priorityValue != null) { priority = priorityValue.asInt(); } AnnotationValue preMatchingValue = instance.value("preMatching"); if (preMatchingValue != null) { preMatching = preMatchingValue.asBoolean(); } AnnotationValue nonBlockingRequiredValue = instance.value("nonBlocking"); if (nonBlockingRequiredValue != null) { nonBlockingRequired = nonBlockingRequiredValue.asBoolean(); } List<AnnotationInstance> annotations = methodInfo.annotations(); for (AnnotationInstance annotation : annotations) { if (SERVER_REQUEST_FILTER.equals(annotation.name())) { continue; } DotName annotationDotName = annotation.name(); ClassInfo annotationClassInfo = index.getClassByName(annotationDotName); if (annotationClassInfo == null) { continue; } if ((annotationClassInfo.classAnnotation(ResteasyReactiveDotNames.NAME_BINDING) != null)) { nameBindingNames.add(annotationDotName.toString()); } } ret.add(new GeneratedFilter(output.getOutput(), generatedClassName, methodInfo.declaringClass().name().toString(), true, priority, preMatching, nonBlockingRequired, nameBindingNames)); } for (AnnotationInstance instance : index .getAnnotations(SERVER_RESPONSE_FILTER)) { if (instance.target().kind() != AnnotationTarget.Kind.METHOD) { continue; } MethodInfo methodInfo = instance.target().asMethod(); Integer priority = null; Set<String> nameBindingNames = new HashSet<>(); GeneratedClassOutput output = new GeneratedClassOutput(); String generatedClassName = CustomFilterGenerator.generateContainerResponseFilter(methodInfo, output, unwrappableTypes, additionalBeanAnnotations); AnnotationValue priorityValue = instance.value("priority"); if (priorityValue != null) { priority = priorityValue.asInt(); } List<AnnotationInstance> annotations = methodInfo.annotations(); for (AnnotationInstance annotation : annotations) { if (SERVER_REQUEST_FILTER.equals(annotation.name())) { continue; } DotName annotationDotName = annotation.name(); ClassInfo annotationClassInfo = index.getClassByName(annotationDotName); if (annotationClassInfo == null) { continue; } if ((annotationClassInfo.classAnnotation(ResteasyReactiveDotNames.NAME_BINDING) != null)) { nameBindingNames.add(annotationDotName.toString()); } } ret.add(new GeneratedFilter(output.getOutput(), generatedClassName, methodInfo.declaringClass().name().toString(), false, priority, false, false, nameBindingNames)); } return ret; } public static class GeneratedFilter { final List<GeneratedClass> generatedClasses; final String generatedClassName; final String declaringClassName; final boolean requestFilter; final Integer priority; final boolean preMatching; final boolean nonBlocking; final Set<String> nameBindingNames; public GeneratedFilter(List<GeneratedClass> generatedClasses, String generatedClassName, String declaringClassName, boolean requestFilter, Integer priority, boolean preMatching, boolean nonBlocking, Set<String> nameBindingNames) { this.generatedClasses = generatedClasses; this.generatedClassName = generatedClassName; this.declaringClassName = declaringClassName; this.requestFilter = requestFilter; this.priority = priority; this.preMatching = preMatching; this.nonBlocking = nonBlocking; this.nameBindingNames = nameBindingNames; } public String getGeneratedClassName() { return generatedClassName; } public String getDeclaringClassName() { return declaringClassName; } public boolean isRequestFilter() { return requestFilter; } public Integer getPriority() { return priority; } public boolean isPreMatching() { return preMatching; } public boolean isNonBlocking() { return nonBlocking; } public List<GeneratedClass> getGeneratedClasses() { return generatedClasses; } public Set<String> getNameBindingNames() { return nameBindingNames; } } }
[ "stuart.w.douglas@gmail.com" ]
stuart.w.douglas@gmail.com
fc7e010b7ba46fb0bf1d2148eb6e1bf2d8c04d59
7345bd790d14add34c3ba6fab118b28754a2a2d6
/01-JSF-Primefaces/src/br/com/fiap/bean/ClienteBean.java
83977672a52de7690d2ee26711038215d212b8b0
[]
no_license
fernandocarvalhocastro/PrimeFaces_GRAFICO
0ee784e73a3cf58f8892ebafc70ca66f6f655237
cbe35f257000cf09af03f4c75745ab3848eb237b
refs/heads/master
2021-01-22T13:30:31.799939
2017-08-18T01:43:39
2017-08-18T01:43:39
100,657,698
0
0
null
null
null
null
UTF-8
Java
false
false
2,461
java
package br.com.fiap.bean; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.util.Calendar; import javax.annotation.PostConstruct; import javax.faces.application.FacesMessage; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; import org.primefaces.event.FileUploadEvent; import org.primefaces.model.DefaultStreamedContent; import org.primefaces.model.StreamedContent; import br.com.fiap.bo.ClienteBO; import br.com.fiap.entity.Cliente; import br.com.fiap.exception.DBException; @SessionScoped @ManagedBean public class ClienteBean { private Cliente cliente; private ClienteBO bo; private StreamedContent foto; @PostConstruct private void init() { cliente = new Cliente(); cliente.setDataNascimento(Calendar.getInstance()); bo = new ClienteBO(); } public StreamedContent getFoto(){ FacesContext context = FacesContext.getCurrentInstance(); DefaultStreamedContent content = new DefaultStreamedContent(); content.setContentType("image/jpg"); try { if (context.getRenderResponse() || cliente.getFoto() == null) { content.setStream(new FileInputStream("D:\\temp\\semFoto.jpg")); } else { content.setStream(new FileInputStream("D:\\temp\\" + cliente.getFoto())); } } catch (FileNotFoundException e) { e.printStackTrace(); } return content; } public void uploadFile(FileUploadEvent event) { String arquivo = event.getFile().getFileName(); try { File file = new File("D:\\temp\\",arquivo); FileOutputStream fos = new FileOutputStream(file); fos.write(event.getFile().getContents()); fos.close(); cliente.setFoto(arquivo); } catch (Exception e) { e.printStackTrace(); } } public String cadastrar() { FacesMessage msg; try { if (cliente.getCodigo() == 0) { bo.cadastrar(cliente); msg = new FacesMessage("Cadastrado!"); } else { bo.atualizar(cliente); msg = new FacesMessage("Atualizado!"); } } catch (DBException e) { e.printStackTrace(); msg = new FacesMessage("Erro!"); } FacesContext.getCurrentInstance().addMessage(null, msg); FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true); return "cliente?faces-redirect=true"; } public Cliente getCliente() { return cliente; } public void setCliente(Cliente cliente) { this.cliente = cliente; } }
[ "logonrm@fiap.com.br" ]
logonrm@fiap.com.br
d5fa0a367b298be3993e377f6924759607ef2e9a
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/budejie/sources/cn/v6/sixrooms/widgets/phone/GetVerificationCodeView.java
ee9b88a542839b9643abbbdf11730093fe63c369
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
2,335
java
package cn.v6.sixrooms.widgets.phone; import android.content.Context; import android.os.CountDownTimer; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; import android.widget.TextView; import cn.v6.sixrooms.R; public class GetVerificationCodeView extends FrameLayout { private Context a; private boolean b = true; private TextView c; private TextView d; private CountDownTimer e; private GetVerificationCodeListener f; private GetVerificationCodeView$RunCountdownCallback g = new q(this); public interface GetVerificationCodeListener { void clickGetVerificationCodeCallback(GetVerificationCodeView$RunCountdownCallback getVerificationCodeView$RunCountdownCallback); } public void setOnGetVerificationCodeListener(GetVerificationCodeListener getVerificationCodeListener) { this.f = getVerificationCodeListener; } public GetVerificationCodeView(Context context) { super(context); this.a = context; a(); } public GetVerificationCodeView(Context context, AttributeSet attributeSet) { super(context, attributeSet); this.a = context; a(); } private void a() { setLayoutParams(new LayoutParams(-2, -2)); LayoutInflater.from(this.a).inflate(R.layout.custom_get_verification_code_layout, this); this.c = (TextView) findViewById(R.id.id_tv_get_verification_code); this.d = (TextView) findViewById(R.id.id_tv_countdown); c(); d(); b(); this.c.setOnClickListener(new s(this)); } private void b() { this.e = new r(this); } private void c() { this.d.setVisibility(8); } private void d() { if (!this.b) { this.c.setText("再次获取"); } this.c.setVisibility(0); } protected void onDetachedFromWindow() { if (this.e != null) { this.e.cancel(); this.e = null; } super.onDetachedFromWindow(); } public void runCountdown() { this.b = false; if (this.e == null) { b(); } this.c.setVisibility(8); this.d.setVisibility(0); this.e.start(); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
ace4fa81f9ae203830ac073f1f47b5bf685af9bf
3ec9fbd3d98aeda177d49e5122213ff73d2ad4af
/src/test/java/com/example/bddspring1583238513/DemoApplicationTests.java
9dbba03cbe89054ce66c92bbe35d0f0aa6faccc4
[]
no_license
cb-kubecd/bdd-spring-1583238513
7c068541da9642fac28bc5559fcca3e05ceeb43d
eb11398b8cf9c6f22a683ca6d22d24c5af3c81ce
refs/heads/master
2021-02-12T20:59:45.682237
2020-03-03T12:28:59
2020-03-03T12:28:59
244,630,484
0
0
null
2020-03-03T12:40:19
2020-03-03T12:29:03
Makefile
UTF-8
Java
false
false
221
java
package com.example.bddspring1583238513; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class DemoApplicationTests { @Test void contextLoads() { } }
[ "cjxd-bot@cloudbees.com" ]
cjxd-bot@cloudbees.com
0f6bf4d6d9f0ef9f6c9959813eb0b48d823a7ef3
8db6c1b4a78bd26b8a7f051631e33ff47f65b505
/tck/bridge-tck-common/src/main/java/com/liferay/faces/bridge/tck/common/util/BridgeTCKUtil.java
ebdd403baed33832d69b6707fe36ccad912d5989
[ "Apache-2.0" ]
permissive
ralf242/liferay-faces-bridge-impl
998b9e12b249ad7f3c317528386b009642185be8
be5d4ae84dbad22956ac7da615a56d607fc76e7d
refs/heads/master
2020-04-06T05:48:39.675374
2017-02-13T14:22:19
2017-02-13T14:22:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,363
java
/** * Copyright (c) 2000-2016 Liferay, 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.liferay.faces.bridge.tck.common.util; import javax.faces.context.FacesContext; import javax.portlet.faces.Bridge; import javax.portlet.faces.BridgeUtil; /** * @author Neil Griffin */ public class BridgeTCKUtil { public static boolean isHeaderOrRenderPhase(Bridge.PortletPhase portletPhase) { return (Bridge.PortletPhase.HEADER_PHASE.equals(portletPhase) || Bridge.PortletPhase.RENDER_PHASE.equals(portletPhase)); } public static boolean isHeaderOrRenderPhase(FacesContext facesContext) { Bridge.PortletPhase portletPhase = BridgeUtil.getPortletRequestPhase(facesContext); return (Bridge.PortletPhase.HEADER_PHASE.equals(portletPhase) || Bridge.PortletPhase.RENDER_PHASE.equals(portletPhase)); } }
[ "neil.griffin.scm@gmail.com" ]
neil.griffin.scm@gmail.com
7bcba44296f97e6657c9e43052f2012d80b0fde0
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/iRobot_com.irobot.home/javafiles/com/irobot/home/RemoveButtonActivity$6.java
12613f7cbf993f0999e65d3ffdbb9996fdb10a20
[ "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
1,568
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.irobot.home; import android.content.DialogInterface; import com.irobot.core.*; // Referenced classes of package com.irobot.home: // RemoveButtonActivity class RemoveButtonActivity$6 implements android.content.Listener { public void onClick(DialogInterface dialoginterface, int i) { Assembler.getInstance().getApplicationUIService().sendCommand(ApplicationUIServiceCommand.ContinueWithLocalResetOrRemove, ((com.irobot.core.ApplicationUIServiceData) (null))); // 0 0:invokestatic #28 <Method Assembler Assembler.getInstance()> // 1 3:invokevirtual #32 <Method ApplicationUIService Assembler.getApplicationUIService()> // 2 6:getstatic #38 <Field ApplicationUIServiceCommand ApplicationUIServiceCommand.ContinueWithLocalResetOrRemove> // 3 9:aconst_null // 4 10:invokevirtual #44 <Method void ApplicationUIService.sendCommand(ApplicationUIServiceCommand, com.irobot.core.ApplicationUIServiceData)> // 5 13:return } final RemoveButtonActivity a; RemoveButtonActivity$6(RemoveButtonActivity removebuttonactivity) { a = removebuttonactivity; // 0 0:aload_0 // 1 1:aload_1 // 2 2:putfield #17 <Field RemoveButtonActivity a> super(); // 3 5:aload_0 // 4 6:invokespecial #19 <Method void Object()> // 5 9:return } }
[ "silenta237@gmail.com" ]
silenta237@gmail.com
4d33311129678a89e962700ed14e6e6630dd672a
75950d61f2e7517f3fe4c32f0109b203d41466bf
/modules/tags/fabric3-modules-parent-pom-0.5.1/kernel/impl/fabric3-fabric/src/main/java/org/fabric3/fabric/domain/DistributedDomain.java
b4d9d0afe1337bfe41da3b897e084f32b9803fc3
[]
no_license
codehaus/fabric3
3677d558dca066fb58845db5b0ad73d951acf880
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
refs/heads/master
2023-07-20T00:34:33.992727
2012-10-31T16:32:19
2012-10-31T16:32:19
36,338,853
0
0
null
null
null
null
UTF-8
Java
false
false
2,561
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.fabric3.fabric.domain; import org.osoa.sca.annotations.Reference; import org.fabric3.fabric.allocator.Allocator; import org.fabric3.fabric.generator.PhysicalModelGenerator; import org.fabric3.fabric.instantiator.LogicalModelInstantiator; import org.fabric3.fabric.services.routing.RoutingService; import org.fabric3.spi.domain.Domain; import org.fabric3.spi.domain.DomainException; import org.fabric3.spi.services.contribution.MetaDataStore; import org.fabric3.spi.services.lcm.LogicalComponentManager; import org.fabric3.spi.services.lcm.RecoveryException; /** * Implements a distributed domain containing user-defined services. * * @version $Rev$ $Date$ */ public class DistributedDomain extends AbstractDomain implements Domain { private LogicalComponentManager logicalComponentManager; public DistributedDomain(@Reference Allocator allocator, @Reference(name = "store")MetaDataStore metaDataStore, @Reference PhysicalModelGenerator physicalModelGenerator, @Reference LogicalModelInstantiator logicalModelInstantiator, @Reference(name = "logicalComponentManager")LogicalComponentManager logicalComponentManager, @Reference RoutingService routingService) { super(allocator, metaDataStore, physicalModelGenerator, logicalModelInstantiator, logicalComponentManager, routingService); this.logicalComponentManager = logicalComponentManager; } public void initialize() throws DomainException { try { logicalComponentManager.initialize(); } catch (RecoveryException e) { throw new DomainException(e); } } }
[ "jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf" ]
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
f9fd512f1a6c5a6f7dad7ba4d2418155f89bfad7
8b5cdda28454b0aab451a4b3216a58ca87517c41
/AL-Game/src/com/aionemu/gameserver/skillengine/effect/SummonFunctionalNpcEffect.java
bd38e0daec3f04cc288838e0e729d1ef9eefcc8e
[]
no_license
flroexus/aelp
ac36cd96963bd12847e37118531b68953f9e8440
4f6cca6b462419accf53b58c454be0cf6abe39c0
refs/heads/master
2023-05-28T18:36:47.919387
2020-09-05T07:27:49
2020-09-05T07:27:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
633
java
package com.aionemu.gameserver.skillengine.effect; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlType; import com.aionemu.gameserver.skillengine.model.Effect; /** * @author Rolandas */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SummonFunctionalNpcEffect") public class SummonFunctionalNpcEffect extends SummonEffect { @XmlAttribute(name = "owner") private SummonOwner owner; @Override public void applyEffect(Effect effect) { // TODO set creator name perhaps and spawn } }
[ "luiz.philip@amedigital.com" ]
luiz.philip@amedigital.com
d02411dc4c8adcd5031df3589a0c57236b7804c4
c3323b068ef682b07ce6b992918191a0a3781462
/open-metadata-implementation/access-services/subject-area/subject-area-spring/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/server/spring/SubjectAreaTermRESTResource.java
4ef3d34ca713f9041d470b995811702be55bd0d7
[ "Apache-2.0" ]
permissive
louisroehrs/egeria
897cb9b6989b1e176c39817b723f4b24de4b23ad
8045cc6a34ea87a4ea44b2f0992e09dff97c9714
refs/heads/master
2020-04-08T20:45:35.061405
2018-11-28T09:05:23
2018-11-28T09:05:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,057
java
/* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.accessservices.subjectarea.server.spring; import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Antonym; import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.RelatedTermRelationship; import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.Synonym; import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.TermHASARelationship; import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse; import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaRESTServices; import org.odpi.openmetadata.accessservices.subjectarea.server.services.SubjectAreaTermRESTServices; import org.springframework.web.bind.annotation.*; /** * The SubjectAreaRESTServices provides the org.odpi.openmetadata.accessservices.subjectarea.server-side implementation of the SubjectAreaDefinition Open Metadata * Assess Service (OMAS). This interface provides term authoring interfaces for subject area experts. */ @RestController @RequestMapping("/open-metadata/access-services/subject-area") public class SubjectAreaTermRESTResource extends SubjectAreaRESTServices{ private SubjectAreaTermRESTServices restAPI = new SubjectAreaTermRESTServices(); /** * Default constructor */ public SubjectAreaTermRESTResource() { //SubjectAreaRESTServices registers this omas. } /** * Create a Term * * The qualifiedName can be specified and will be honoured. If it is specified then the caller may wish to ensure that it is * unique. If this qualifiedName is not specified then one will be generated as GlossaryTerm concatinated with the guid. * * Failure to create the Terms classifications, link to its glossary or its icon, results in the create failing and the term being deleted * * @param userId userId * @param suppliedTerm term to create * @return response, when successful contains the created term. * when not successful the following Exception responses can occur * <ul> * <li> UserNotAuthorizedException the requesting user is not authorized to issue this request.</li> * <li> MetadataServerUncontactableException not able to communicate with a Metadata respository service.</li> * <li> InvalidParameterException one of the parameters is null or invalid.</li> * <li> UnrecognizedGUIDException the supplied guid was not recognised</li> * <li> ClassificationException Error processing a classification</li> * <li> FunctionNotSupportedException Function not supported</li> * <li> StatusNotSupportedException A status value is not supported</li> * </ul> */ @RequestMapping(method = RequestMethod.POST, path = "/users/{userId}/terms") public SubjectAreaOMASAPIResponse createTerm(@PathVariable String userId, @RequestBody Term suppliedTerm) { return restAPI.createTerm(userId,suppliedTerm); } /** * Get a Term * @param userId userId under which the request is performed * @param guid guid of the term to get * @return a response which when successful contains the term * when not successful the following Exception responses can occur * <ul> * <li> UserNotAuthorizedException the requesting user is not authorized to issue this request.</li> * <li> MetadataServerUncontactableException not able to communicate with a Metadata respository service.</li> * <li> InvalidParameterException one of the parameters is null or invalid.</li> * <li> UnrecognizedGUIDException the supplied guid was not recognised</li> * <li> FunctionNotSupportedException Function not supported</li> * </ul> */ @RequestMapping(method = RequestMethod.GET, path = "/users/{userId}/terms/{guid}") public SubjectAreaOMASAPIResponse getTermByGuid(@PathVariable String userId, @PathVariable String guid) { return restAPI.getTermByGuid(userId,guid); } /** * Update a Term * <p> * Status is not updated using this call. * * @param userId userId under which the request is performed * @param guid guid of the term to update * @param suppliedTerm term to be updated * @param isReplace flag to indicate that this update is a replace. When not set only the supplied (non null) fields are updated. * @return a response which when successful contains the updated term * when not successful the following Exception responses can occur * <ul> * <li> UnrecognizedGUIDException the supplied guid was not recognised</li> * <li> UserNotAuthorizedException the requesting user is not authorized to issue this request.</li> * <li> FunctionNotSupportedException Function not supported</li> * <li> InvalidParameterException one of the parameters is null or invalid.</li> * <li> MetadataServerUncontactableException not able to communicate with a Metadata respository service.</li> * </ul> */ @RequestMapping(method = RequestMethod.PUT, path = "/users/{userId}/terms/{guid}") public SubjectAreaOMASAPIResponse updateTerm(@PathVariable String userId,@PathVariable String guid, Term suppliedTerm, @RequestParam(value = "isReplace", required=false) Boolean isReplace) { return restAPI.updateTerm(userId,guid,suppliedTerm,isReplace); } /** * Delete a Term instance * <p> * There are 2 types of deletion, a soft delete and a hard delete (also known as a purge). All repositories support hard deletes. Soft deletes support * is optional. Soft delete is the default. * <p> * A soft delete means that the term instance will exist in a deleted state in the repository after the delete operation. This means * that it is possible to undo the delete. * A hard delete means that the term will not exist after the operation. * when not successful the following Exceptions can occur * * @param userId userId under which the request is performed * @param guid guid of the term to be deleted. * @param isPurge true indicates a hard delete, false is a soft delete. * @return a response which when successful contains a void response * when not successful the following Exception responses can occur * <ul> * <li> UnrecognizedGUIDException the supplied guid was not recognised</li> * <li> UserNotAuthorizedException the requesting user is not authorized to issue this request.</li> * <li> FunctionNotSupportedException Function not supported this indicates that a soft delete was issued but the repository does not support it.</li> * <li> InvalidParameterException one of the parameters is null or invalid.</li> * <li> MetadataServerUncontactableException not able to communicate with a Metadata respository service. There is a problem retrieving properties from the metadata repository.</li> * <li> EntityNotDeletedException a soft delete was issued but the term was not deleted.</li> * <li> GUIDNotPurgedException a hard delete was issued but the term was not purged</li> * </ul> */ @RequestMapping(method = RequestMethod.DELETE, path = "/users/{userId}/terms/{guid}") public SubjectAreaOMASAPIResponse deleteTerm(@PathVariable String userId,@PathVariable String guid,@RequestParam(value = "isPurge", required=false) Boolean isPurge) { if (isPurge == null) { // default to soft delete if isPurge is not specified. isPurge = false; } return restAPI.deleteTerm(userId,guid,isPurge); } }
[ "david_radley@uk.ibm.com" ]
david_radley@uk.ibm.com
6a8cb20ffc51851156c41a3a43b7a62bff293747
c48733807b6e920b974644ff369f73f68b606a9d
/maven_project/src/main/java/cn/javass/dp/bridge/example6/SpecialUrgencyMessage.java
5dcf4c4a6678ccbf62693819bdae98556d678f56
[]
no_license
sworderHB/maven_project
c4d45cf646f94b8e1c4eb0a9f602f40e43f2b376
29e1a81086f572b5128c826535a28010b8da48a3
refs/heads/master
2020-03-22T01:19:09.641233
2018-07-01T04:35:34
2018-07-01T04:35:34
139,297,569
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package cn.javass.dp.bridge.example6; /** * 特急消息 */ public class SpecialUrgencyMessage extends AbstractMessage{ public SpecialUrgencyMessage(MessageImplementor impl) { super(impl); } public void hurry(String messageId) { //执行催促的业务,发出催促的信息 } public void sendMessage(String message, String toUser) { message = "特急:"+message; super.sendMessage(message, toUser); //还需要增加一条待催促的信息 } }
[ "sworder2018@gmail.com" ]
sworder2018@gmail.com
0e12cb3d80f236fd3f9bed78a49358cfe0d66a58
99c7920038f551b8c16e472840c78afc3d567021
/aliyun-java-sdk-rds-v5/src/main/java/com/aliyuncs/v5/rds/model/v20140815/PurgeDBInstanceLogResponse.java
f492f598050c2ac251f83575fc150d290cb071c0
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk-v5
9fa211e248b16c36d29b1a04662153a61a51ec88
0ece7a0ba3730796e7a7ce4970a23865cd11b57c
refs/heads/master
2023-03-13T01:32:07.260745
2021-10-18T08:07:02
2021-10-18T08:07:02
263,800,324
4
2
NOASSERTION
2022-05-20T22:01:22
2020-05-14T02:58:50
Java
UTF-8
Java
false
false
1,244
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.v5.rds.model.v20140815; import com.aliyuncs.v5.AcsResponse; import com.aliyuncs.v5.rds.transform.v20140815.PurgeDBInstanceLogResponseUnmarshaller; import com.aliyuncs.v5.transform.UnmarshallerContext; /** * @author auto create * @version */ public class PurgeDBInstanceLogResponse extends AcsResponse { private String requestId; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } @Override public PurgeDBInstanceLogResponse getInstance(UnmarshallerContext context) { return PurgeDBInstanceLogResponseUnmarshaller.unmarshall(this, context); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
fb6afe081c80fb18e7cafce1953e40bb3b2cda23
937169c7c2e1b003a853421c9bae90fedf23d246
/violin-test/src/main/java/com/wolf/test/jdknewfuture/Helper.java
00c6255787f8ff7179ff7429045d7e20ae7a55ee
[ "Apache-2.0" ]
permissive
liyork/violin
7edc4ce113b4b229ad7698a8fe5f3ad2f6031e14
53ca1869e614e7940e9097f3ef3f45f755c78345
refs/heads/master
2023-08-07T01:10:08.932970
2023-07-24T08:51:06
2023-07-24T08:51:06
101,621,643
0
2
Apache-2.0
2022-12-14T20:22:45
2017-08-28T08:30:21
Java
UTF-8
Java
false
false
247
java
package com.wolf.test.jdknewfuture; /** * Description: * <br/> Created on 24/08/2018 9:52 AM * * @author 李超 * @since 1.0.0 */ public class Helper { public int string2Int(String from) { return Integer.valueOf(from); } }
[ "lichao30@jd.com" ]
lichao30@jd.com
d3e854d5a1686171ed90653c49d37c11a994ddf5
2c93fa0b266d392a601fc4408135f2430c667a49
/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/AdGroupElementParametersBase.java
6dfa1d82665ea96cdc4459902fa63722402391a0
[ "Apache-2.0" ]
permissive
jbeecham/ovirt-engine
5d79080d2f5627229e6551fee78882f9f9a6e3bc
3e76a8d3b970a963cedd84bcb3c7425b8484cf26
refs/heads/master
2021-01-01T17:15:29.961545
2012-10-25T14:41:57
2012-10-26T08:56:22
10,623,147
3
0
null
null
null
null
UTF-8
Java
false
false
530
java
package org.ovirt.engine.core.common.action; import org.ovirt.engine.core.common.businessentities.*; public class AdGroupElementParametersBase extends AdElementParametersBase { private static final long serialVersionUID = 407769818057698987L; private ad_groups _adGroup; public AdGroupElementParametersBase(ad_groups adGroup) { super(adGroup.getid()); _adGroup = adGroup; } public ad_groups getAdGroup() { return _adGroup; } public AdGroupElementParametersBase() { } }
[ "iheim@redhat.com" ]
iheim@redhat.com
5108c6600e9c0e5545fd877d519946c47e800006
183d057ee3f1255551c9f2bc6080dfcc23262639
/app/src/main/java/com/cliffex/videomaker/videoeditor/introvd/template/editor/export/C6260l.java
98c5a24100f1862798fa46f6e01914dba3613df6
[]
no_license
datcoind/VideoMaker-1
5567ff713f771b19154ba463469b97d18d0164ec
bcd6697db53b1e76ee510e6e805e46b24a4834f4
refs/heads/master
2023-03-19T20:33:16.016544
2019-09-27T13:55:07
2019-09-27T13:55:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,388
java
package com.introvd.template.editor.export; import android.content.Context; import android.view.View; import com.introvd.template.ads.AdParamMgr; import com.introvd.template.ads.entity.AdPositionInfoParam; import com.introvd.template.ads.listener.ViewAdsListener; import com.introvd.template.common.UserBehaviorLog; import com.introvd.template.module.p326ad.C7680l; import com.introvd.template.module.p326ad.p327a.C7589a; import com.introvd.template.module.p326ad.p328b.C7591a; import com.introvd.template.module.p326ad.p328b.C7592b; import java.util.HashMap; /* renamed from: com.introvd.template.editor.export.l */ class C6260l { private Context context; /* renamed from: com.introvd.template.editor.export.l$a */ interface C6262a { /* renamed from: cG */ void mo29196cG(View view); } C6260l(Context context2) { this.context = context2; } /* renamed from: cF */ private HashMap<String, String> m17936cF(View view) { HashMap<String, String> hashMap = new HashMap<>(1); hashMap.put("platform", C7591a.m22370W(view.getTag())); return hashMap; } /* access modifiers changed from: 0000 */ /* renamed from: a */ public void mo29192a(final C6262a aVar) { C7589a.m22363h(46, new ViewAdsListener() { private View cQh; public void onAdLoaded(AdPositionInfoParam adPositionInfoParam, boolean z, String str) { if (!AdParamMgr.isAdConfigValid(43) && aVar != null) { View adView = C6260l.this.getAdView(); this.cQh = adView; if (adView != null) { aVar.mo29196cG(this.cQh); } } } }); C7589a.m22360aj(this.context, 46); } /* access modifiers changed from: 0000 */ /* renamed from: cE */ public void mo29193cE(View view) { HashMap cF = m17936cF(view); UserBehaviorLog.onKVEvent(this.context, "Ad_Export_B_Show", cF); C7592b.m22379F(this.context, "Ad_Export_B_Show", (String) cF.get("platform")); } /* access modifiers changed from: 0000 */ public View getAdView() { return C7589a.getAdView(this.context, 46); } /* access modifiers changed from: 0000 */ public void onRelease() { C7680l.aAe().releasePosition(46); } }
[ "bhagat.singh@cliffex.com" ]
bhagat.singh@cliffex.com
97fbe79e39407d25c042a8511dba5bcc05694c78
584fa4b81ab04d5e60eb08fdb110a010a7343cb6
/database/src/com/db/database/CURD/DeleteDemo2.java
2d30b4fecaf2c00aac68d58d108ce0756daa4498
[]
no_license
582496630/JAVAbase
cea2f5b5fda5a723cb2381e9baee72e8687bc97d
2857b0333f12a9e48d09f4369b4d1954acd294fa
refs/heads/master
2021-01-12T14:46:23.134859
2017-01-05T01:12:09
2017-01-05T01:12:09
72,085,790
0
0
null
null
null
null
UTF-8
Java
false
false
959
java
package com.db.database.CURD; import java.sql.DriverManager; import com.mysql.jdbc.Connection; import com.mysql.jdbc.PreparedStatement; import com.mysql.jdbc.Statement; import sun.misc.CharacterEncoder; public class DeleteDemo2 { public static final String DBDRIVE = "com.mysql.jdbc.Driver"; public static final String DBURL = "jdbc:mysql://localhost:3306/db_one"; public static final String DBUSER = "root"; public static final String DBPWD = "root"; public static void main(String[] args) throws Exception { Class.forName(DBDRIVE); Connection conn = (Connection) DriverManager.getConnection(DBURL, DBUSER, DBPWD); String tablename = "cv"; String sql = "delete from "+tablename+" where id = 13;"; PreparedStatement prest = (PreparedStatement) conn.prepareStatement(sql); //prest.setInt(1, 17); 报错 int rs = prest.executeUpdate(sql); System.out.println("删除数据成功"+rs); prest.close(); conn.close(); } }
[ "582496630@qq.com" ]
582496630@qq.com
bf7033fc4ec80ba16318bef939f2f6d1dbd1f06c
4536078b4070fc3143086ff48f088e2bc4b4c681
/v1.0.4/decompiled/d/b/e/e0.java
d1c2b97166e4e058639d5e5b2db4d1eb033ce6d3
[]
no_license
olealgoritme/smittestopp_src
485b81422752c3d1e7980fbc9301f4f0e0030d16
52080d5b7613cb9279bc6cda5b469a5c84e34f6a
refs/heads/master
2023-05-27T21:25:17.564334
2023-05-02T14:24:31
2023-05-02T14:24:31
262,846,147
0
0
null
null
null
null
UTF-8
Java
false
false
2,788
java
package d.b.e; import android.annotation.SuppressLint; import android.graphics.PorterDuff.Mode; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.DrawableContainer; import android.graphics.drawable.DrawableContainer.DrawableContainerState; import android.graphics.drawable.ScaleDrawable; import android.os.Build.VERSION; import d.b.c.a.c; import d.i.c.j.b; @SuppressLint({"RestrictedAPI"}) public class e0 { public static final int[] a = { 16842912 }; public static final int[] b = new int[0]; static { new Rect(); try { Class.forName("android.graphics.Insets"); return; } catch (ClassNotFoundException localClassNotFoundException) { for (;;) {} } } public static PorterDuff.Mode a(int paramInt, PorterDuff.Mode paramMode) { if (paramInt != 3) { if (paramInt != 5) { if (paramInt != 9) { switch (paramInt) { default: return paramMode; case 16: return PorterDuff.Mode.ADD; case 15: return PorterDuff.Mode.SCREEN; } return PorterDuff.Mode.MULTIPLY; } return PorterDuff.Mode.SRC_ATOP; } return PorterDuff.Mode.SRC_IN; } return PorterDuff.Mode.SRC_OVER; } public static boolean a(Drawable paramDrawable) { if ((paramDrawable instanceof DrawableContainer)) { paramDrawable = paramDrawable.getConstantState(); if ((paramDrawable instanceof DrawableContainer.DrawableContainerState)) { paramDrawable = ((DrawableContainer.DrawableContainerState)paramDrawable).getChildren(); int i = paramDrawable.length; for (int j = 0; j < i; j++) { if (!a(paramDrawable[j])) { return false; } } } } else { if ((paramDrawable instanceof b)) { return a(((b)paramDrawable).a()); } if ((paramDrawable instanceof c)) { return a(x); } if ((paramDrawable instanceof ScaleDrawable)) { return a(((ScaleDrawable)paramDrawable).getDrawable()); } } return true; } public static void b(Drawable paramDrawable) { if ((Build.VERSION.SDK_INT == 21) && ("android.graphics.drawable.VectorDrawable".equals(paramDrawable.getClass().getName()))) { int[] arrayOfInt = paramDrawable.getState(); if ((arrayOfInt != null) && (arrayOfInt.length != 0)) { paramDrawable.setState(b); } else { paramDrawable.setState(a); } paramDrawable.setState(arrayOfInt); } } } /* Location: * Qualified Name: base.d.b.e.e0 * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "olealgoritme@gmail.com" ]
olealgoritme@gmail.com
60a3a0939bfb4cc8584208cf8c1bcd396db8c5cd
548e9bb58c753aba7ecb12095079b6a30a28a88c
/user-service/src/main/java/com/stackroute/kafka/domain/Location.java
9bc1655ed5ce1fa3d28dc07a0485870014a6cd8a
[ "Apache-2.0" ]
permissive
rutujaBacchuwar/CoWorking_24
58f97a4e12519cc254c87ee6be9221031dd52d8b
6fcf8478fca9badf192e527e14d26d4567b09bd8
refs/heads/master
2023-01-12T11:18:54.499385
2019-07-24T20:24:03
2019-07-24T20:24:03
198,669,245
0
0
null
2023-01-07T08:05:20
2019-07-24T16:09:47
JavaScript
UTF-8
Java
false
false
1,388
java
package com.stackroute.kafka.domain; public class Location { String locationName; double latitude; double longitude; int locationId; public void setLocationName(String locationName) { this.locationName = locationName; } public void setLatitude(double latitude) { this.latitude = latitude; } public void setLongitude(double longitude) { this.longitude = longitude; } public void setLocationId(int locationId) { this.locationId = locationId; } public Location() { } public Location(String locationName, double latitude, double longitude, int locationId) { this.locationName = locationName; this.latitude = latitude; this.longitude = longitude; this.locationId = locationId; } public String getLocationName() { return locationName; } public double getLatitude() { return latitude; } public double getLongitude() { return longitude; } public int getLocationId(){ return locationId; } @Override public String toString() { return "Location{" + "locationName='" + locationName + '\'' + ", latitude=" + latitude + ", longitude=" + longitude + ", locationId=" + locationId + '}'; } }
[ "rutuja.bacchuwar@stackroute.in" ]
rutuja.bacchuwar@stackroute.in
eba27be06acda4175a803961941703d2a68b6ffb
2e5ea9d0a943148d618d840545283ccd61673376
/ctsaj026/CoreJava/src/C.java
d7ef76f612109525da7f76152dc4806822f45acb
[]
no_license
shankar-trainer/cts_2021_1
708077efd781e502dec6ab68423a43dabc1713d3
f45ced520baf730652f7a2d59ba7dcd5cd4a150d
refs/heads/master
2023-04-22T22:12:32.655933
2021-05-04T03:48:22
2021-05-04T03:48:22
363,567,009
0
0
null
null
null
null
UTF-8
Java
false
false
346
java
class B { int a = 100; } public class C extends B { int a = 1000; void disp() { int a = 10; System.out.println("local a is " + a); System.out.println("super a is " + super.a); System.out.println("this a is " + this.a); } public static void main(String[] args) { C c = new C(); System.out.println(c.a); c.disp(); } }
[ "shankar7979@hotmail.com" ]
shankar7979@hotmail.com
5c819de95f26fa5fe9ed85aab3e39420d5ed4b11
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/87/359.java
db2d845a049e714d8eb8d91b42f43a9570a5d08f
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,108
java
package <missing>; public class GlobalMembers { public static int Main() { int i; int a; int b; int c; int d; int e; int f; int n = 0; for (i = 0; ;i++) { String tempVar = ConsoleInput.scanfRead(); if (tempVar != null) { a = Integer.parseInt(tempVar); } String tempVar2 = ConsoleInput.scanfRead(" "); if (tempVar2 != null) { b = Integer.parseInt(tempVar2); } String tempVar3 = ConsoleInput.scanfRead(" "); if (tempVar3 != null) { c = Integer.parseInt(tempVar3); } String tempVar4 = ConsoleInput.scanfRead(" "); if (tempVar4 != null) { d = Integer.parseInt(tempVar4); } String tempVar5 = ConsoleInput.scanfRead(" "); if (tempVar5 != null) { e = Integer.parseInt(tempVar5); } String tempVar6 = ConsoleInput.scanfRead(" "); if (tempVar6 != null) { f = Integer.parseInt(tempVar6); } if (a == 0 && b == 0 && c == 0 && d == 0 && e == 0 && f == 0) { break; } n = ((d + 11 - a) * 3600 + e * 60 + f + 3600 - b * 60 - c); System.out.printf("%d\n",n); } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
ab45ba4d5b50213b450c57b4f5c663cc2d5276e2
f634ac0e874e3147407a352e43403168b373875f
/src-intf/eayun-virtualization-intf/src/main/java/com/eayun/virtualization/model/VmSGroupKey.java
7d60cd781bfc680d6f181414f1e27fa1e2b1858f
[]
no_license
yapengsong/business
82d49442c1d546029c3449909b37c772b17bbef1
f876cf82e1c08a91770ea58582719cda4e7927aa
refs/heads/master
2021-01-19T21:44:35.104690
2017-04-19T03:33:24
2017-04-19T03:33:24
88,695,172
0
2
null
null
null
null
UTF-8
Java
false
false
774
java
package com.eayun.virtualization.model; public class VmSGroupKey implements java.io.Serializable { private static final long serialVersionUID = -11167651198987706L; private String vmId; private String sgId; public String getVmId() { return vmId; } public void setVmId(String vmId) { this.vmId = vmId; } public String getSgId() { return sgId; } public void setSgId(String sgId) { this.sgId = sgId; } @Override public boolean equals(Object obj) { if(obj instanceof VmSGroupKey){ VmSGroupKey key =(VmSGroupKey)obj; if(this.sgId.equals(key.getSgId())&&this.vmId.equals(key.getVmId())){ return true; } } return false; } @Override public int hashCode() { return this.sgId.hashCode(); } }
[ "yapeng.song@eayun.com" ]
yapeng.song@eayun.com
0371cfea312305afdf49f45505ccbf25ba599c9e
98c2845f69b56358f885c193bcda5b610731a415
/cool-jsfml/src/main/java/jp/gr/java_conf/kgd/library/cool/jsfml/component/ImmutableDrawState.java
0cdd1cea2bc8ed223003dbea1252757d6b7823e9
[ "MIT" ]
permissive
t-kgd/library-cool
a797fb2b7848a1a7cd9c7b4d8e5cc535e742ad3d
a38a3bf1009cafbd888363e1fc19df27c35f9f62
refs/heads/master
2016-09-16T04:03:25.037228
2015-07-09T08:09:48
2015-07-09T08:09:48
38,791,179
0
0
null
null
null
null
UTF-8
Java
false
false
975
java
package jp.gr.java_conf.kgd.library.cool.jsfml.component; import org.jsfml.graphics.Color; import org.jsfml.graphics.Transform; import org.jsfml.system.Vector2f; public class ImmutableDrawState implements IConstDrawState { private final IConstDrawState inner; public ImmutableDrawState(IConstDrawState source) { DrawState state = new DrawState(); ComponentHelper.copyDrawState(state, source); inner = state; } public Color getColorMask() { return inner.getColorMask(); } // public boolean isVisible() // { // return inner.isVisible(); // } public Vector2f getOrigin() { return inner.getOrigin(); } public float getAlphaMaskRate() { return inner.getAlphaMaskRate(); } public float getRotation() { return inner.getRotation(); } public Vector2f getScale() { return inner.getScale(); } public Vector2f getPosition() { return inner.getPosition(); } public Transform getTransform() { return inner.getTransform(); } }
[ "t-kgd@users.noreply.github.com" ]
t-kgd@users.noreply.github.com
f38687df244c7c52282a398008da97bef5dd2f7b
b57f116205a4fe4c6cce9e82904077b8beb746fc
/trunk/Zpdl_DualList/src/zpdl/studio/duallist/util/DualListDCacheParam.java
03064b9ba4dd87bbe5f17cc238c4a847ca7292d4
[]
no_license
BGCX261/zpdl-dual-filebrowser-svn-to-git
24fa5980bc5d0d647e868ef719d15efe6461159a
bf2f36a5084ff08502c3bc015382b3d7a22adac2
refs/heads/master
2020-05-17T23:37:32.115242
2015-08-25T15:17:47
2015-08-25T15:17:47
42,346,124
0
0
null
null
null
null
UTF-8
Java
false
false
1,885
java
package zpdl.studio.duallist.util; import java.io.File; import zpdl.studio.api.dcache.DCacheParam; import zpdl.studio.duallist.view.DualListItem; import zpdl.studio.duallist.view.DualListRowView; public class DualListDCacheParam extends DCacheParam { private String mKey; private int mType; private String mPath; private DualListRowView mRawView; public DualListDCacheParam(DualListItem item, DualListRowView view) { super(); long size = item.getSize(); long lastModified = item.getLastModified(); mType = item.getType(); mPath = item.getPath(); mRawView = view; StringBuilder sb = new StringBuilder(); sb.append(lastModified); sb.append(size); int separatorStartIndex = 0; int separatorEndIndex = mPath.indexOf(File.separator); while(separatorEndIndex >= 0) { String key = mPath.substring(separatorStartIndex, separatorEndIndex); if(key.length() > 0) { byte[] bKey = key.getBytes(); int iKey = 0; for(int i = 0; i < bKey.length; i++) { iKey += bKey[i]; } sb.append(iKey); } separatorStartIndex = separatorEndIndex + 1; separatorEndIndex = mPath.indexOf(File.separator, separatorEndIndex + 1); } sb.append(mPath.substring(separatorStartIndex, mPath.length())); mKey = sb.toString(); } public int getType() { return mType; } public String getPath() { return mPath; } public DualListRowView getView() { return mRawView; } @Override public String getKey() { return mKey; } }
[ "you@example.com" ]
you@example.com
9f30133c2eaed2b0700e90a542ca7350c0562ef6
83e81c25b1f74f88ed0f723afc5d3f83e7d05da8
/services/tests/servicestests/src/com/android/server/timezonedetector/TestHandler.java
b2426f7ed515e0f898177f1961c87db3c2a53eb7
[ "Apache-2.0", "LicenseRef-scancode-unicode" ]
permissive
Ankits-lab/frameworks_base
8a63f39a79965c87a84e80550926327dcafb40b7
150a9240e5a11cd5ebc9bb0832ce30e9c23f376a
refs/heads/main
2023-02-06T03:57:44.893590
2020-11-14T09:13:40
2020-11-14T09:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,514
java
/* * Copyright (C) 2020 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.server.timezonedetector; import static org.junit.Assert.assertEquals; import android.os.Handler; import android.os.Looper; import android.os.Message; /** * A Handler that can track posts/sends and wait for them to be completed. */ public class TestHandler extends Handler { private final Object mMonitor = new Object(); private int mMessagesProcessed = 0; private int mMessagesSent = 0; public TestHandler(Looper looper) { super(looper); } @Override public boolean sendMessageAtTime(Message msg, long uptimeMillis) { synchronized (mMonitor) { mMessagesSent++; } Runnable callback = msg.getCallback(); // Have the callback increment the mMessagesProcessed when it is done. It will notify // any threads waiting for all messages to be processed if appropriate. Runnable newCallback = () -> { callback.run(); synchronized (mMonitor) { mMessagesProcessed++; if (mMessagesSent == mMessagesProcessed) { mMonitor.notifyAll(); } } }; msg.setCallback(newCallback); return super.sendMessageAtTime(msg, uptimeMillis); } /** Asserts the number of messages posted or sent is as expected. */ public void assertTotalMessagesEnqueued(int expected) { synchronized (mMonitor) { assertEquals(expected, mMessagesSent); } } /** * Waits for all enqueued work to be completed before returning. */ public void waitForMessagesToBeProcessed() throws InterruptedException { synchronized (mMonitor) { if (mMessagesSent != mMessagesProcessed) { mMonitor.wait(); } } } }
[ "keneankit01@gmail.com" ]
keneankit01@gmail.com
2b1b7d8eec6938e09be0cdfd22155fa6dfe49868
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/41/208.java
0095ab59646e024f33945438d688c1058b021fda
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,313
java
package <missing>; public class GlobalMembers { public static int Main() { int a; int b; int c; int d; int e; int[] k = new int[6]; int[] p = new int[6]; for (a = 1;a <= 5;a++) { for (b = 1;b <= 5;b++) { if (b == a) { continue; } for (c = 1;c <= 5;c++) { if (c == a || b == c) { continue; } for (d = 1;d <= 5;d++) { if (d == c || d == a || d == b) { continue; } for (e = 1;e <= 5;e++) { if (e == c || e == a || e == b || e == d || e == 2 || e == 3) { continue; } else { p[a] = 1; p[b] = 2; p[c] = 3; p[d] = 4; p[e] = 5; k[1] = e == 1; k[2] = b == 2; k[3] = a == 5; k[4] = c != 1; k[5] = d == 1; if (k[p[1]] == 1 && k[p[2]] == 1 && k[p[3]] == 0 && k[p[4]] == 0 && k[p[5]] == 0) { System.out.print(a); System.out.print(' '); System.out.print(b); System.out.print(' '); System.out.print(c); System.out.print(' '); System.out.print(d); System.out.print(' '); System.out.print(e); } } } } } } } return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
7b340aecd6ab88f09748c67082c9922cf0715877
73c5f5a5545036967df0d5ddf2cbfaa97fbe49ed
/src/src/com/rapidminer/datatable/DataTablePairwiseMatrixExtractionAdapter.java
94b39d48e0d92c6848e9fbeeea68a1f76f9ca58e
[]
no_license
hejiming/rapiddataminer
74b103cb4523ccba47150045c165dc384cf7d38f
177e15fa67dee28b311f6d9176bbfeedae6672e2
refs/heads/master
2021-01-10T11:35:48.036839
2015-12-31T12:29:43
2015-12-31T12:29:43
48,233,639
0
0
null
null
null
null
UTF-8
Java
false
false
4,950
java
/* * RapidMiner * * Copyright (C) 2001-2008 by Rapid-I and the contributors * * Complete list of developers available at our web site: * * http://rapid-i.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see http://www.gnu.org/licenses/. */ package com.rapidminer.datatable; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import com.rapidminer.operator.visualization.SymmetricalMatrix; /** * This class can be used to use all pairs (entries) of a correlation matrix as data table. The data is directly * read from the correlation matrix instead of building a copy. Please note that the method * for adding new rows is not supported by this type of data tables. * * @author Ingo Mierswa * @version $Id: DataTablePairwiseMatrixExtractionAdapter.java,v 1.2 2008/05/09 19:23:16 ingomierswa Exp $ */ public class DataTablePairwiseMatrixExtractionAdapter extends AbstractDataTable { private SymmetricalMatrix matrix; private String[] index2NameMap; private Map<String,Integer> name2IndexMap = new HashMap<String,Integer>(); private String[] tableColumnNames; public DataTablePairwiseMatrixExtractionAdapter(SymmetricalMatrix matrix, String[] columnNames, String[] tableColumnNames) { super("Pairwise Correlation Table"); this.matrix = matrix; this.index2NameMap = columnNames; for (int i = 0; i < this.index2NameMap.length; i++) this.name2IndexMap.put(this.index2NameMap[i], i); this.tableColumnNames = tableColumnNames; if ((this.tableColumnNames == null) || (this.tableColumnNames.length != 3)) throw new RuntimeException("Cannot create pairwise matrix extraction data table with other than 3 table column names."); } public int getNumberOfSpecialColumns() { return 0; } public boolean isSpecial(int index) { return false; } public boolean isNominal(int index) { return (index <= 1); } public String mapIndex(int column, int value) { return index2NameMap[value]; } /** Please note that this method does not map new strings but is only able to deliver strings which * where already known during construction. */ public int mapString(int column, String value) { Integer result = this.name2IndexMap.get(value); if (result == null) return -1; else return result; } public int getNumberOfValues(int column) { return index2NameMap.length; } public String getColumnName(int i) { return tableColumnNames[i]; } public int getColumnIndex(String name) { for (int i = 0; i < tableColumnNames.length; i++) { if (tableColumnNames[i].equals(name)) return i; } return -1; } public boolean isSupportingColumnWeights() { return false; } public double getColumnWeight(int column) { return Double.NaN; } public int getNumberOfColumns() { return tableColumnNames.length; } public void add(DataTableRow row) { throw new RuntimeException("DataTablePairwiseCorrelationMatrixAdapter: adding new rows is not supported!"); } public DataTableRow getRow(int rowIndex) { int firstAttribute = 0; int secondAttribute = 1; for (int i = 0; i < rowIndex; i++) { secondAttribute++; if (secondAttribute >= matrix.getNumberOfColumns()) { firstAttribute++; secondAttribute = firstAttribute + 1; } } return new PairwiseCorrelation2DataTableRowWrapper(this.matrix, firstAttribute, secondAttribute); } public Iterator<DataTableRow> iterator() { return new PairwiseCorrelation2DataTableRowIterator(this.matrix); } public int getNumberOfRows() { return ((index2NameMap.length * index2NameMap.length) - index2NameMap.length) / 2; } /** Not implemented!!! Please use this class only for plotting purposes if you can ensure * that the number of columns / rows is small. */ public void sample(int newSize) {} }
[ "dao.xiang.cun@163.com" ]
dao.xiang.cun@163.com
a842f7d4151f9e4c353c98a0f077a13110907945
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_766df3d057b9d9f526c8d05bd679d3b21c40e687/ValidateException/14_766df3d057b9d9f526c8d05bd679d3b21c40e687_ValidateException_t.java
d3c1151f852517f95fe762b8cf3f80a1f033e736
[]
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
434
java
/** * */ package tk.c4se.halt.ih31.nimunimu.exception; /** * Validation exception. * * @author ne_Sachirou */ public class ValidateException extends Exception { private static final long serialVersionUID = 1L; public ValidateException() { super(); } public ValidateException(String message) { super(message); } public ValidateException(Throwable e) { super(e); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
89e25bf0f04a3688171a2d7379c6e12f3991649e
64aaecbd1e58ffcd88d04e278f7a166d22dc99c0
/Uni-SG/src/test/java/com/specomm/uniqlo/checkoutflows/GuestCheckoutWithVisaCard.java
17e797e5d87df109e07f5e1d090a2a9c56f91e0e
[]
no_license
srammya/Ramya
a0086c0def77c91c72749de69e7781f1d6d23408
41a1cc69ca3256f8e113f64574c879c1b0a3a5dd
refs/heads/master
2022-12-01T00:02:15.456646
2021-04-19T18:34:30
2021-04-19T18:34:30
114,844,772
0
0
null
2022-11-16T03:46:30
2017-12-20T05:01:40
Java
UTF-8
Java
false
false
5,153
java
package com.specomm.uniqlo.checkoutflows; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.apache.log4j.Logger; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.PageFactory; import org.testng.Reporter; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; import com.specomm.uniqlo.common.utils.GeneralActions; import com.specomm.uniqlo.common.utils.ReusableActions; import com.specomm.uniqlo.pagecomponents.CategoryPage; import com.specomm.uniqlo.pagecomponents.ProductDetailsPage; import com.specomm.uniqlo.pagecomponents.ShippingDetailsGuestPage; import com.specomm.uniqlo.pagecomponents.ShoppingBucketPage; import com.specomm.uniqlo.pagecomponents.UniqloHomePage; import com.specomm.uniqlo.pagecomponents.VisaPaymentDetailsPage; import com.specomm.uniqlo.testreport.TestListener; public class GuestCheckoutWithVisaCard extends GeneralActions{ static WebDriver driver; UniqloHomePage uniqloHomePage=new UniqloHomePage(driver); CategoryPage categoryPage=new CategoryPage(driver); ProductDetailsPage productDetailsPage=new ProductDetailsPage(driver); ShoppingBucketPage shoppingBucketPage=new ShoppingBucketPage(driver); ShippingDetailsGuestPage shippingDetailsGuestPage=new ShippingDetailsGuestPage(driver); VisaPaymentDetailsPage paymentDetailsPage=new VisaPaymentDetailsPage(driver); Logger log4jlogger =Logger.getLogger("devpinoyLogger"); GeneralActions genAction = new GeneralActions(); @BeforeClass public void setUp() throws IOException, InterruptedException { driver = getDriver(); driver = launchBrowser(driver, "firefox"); uniqloHomePage=PageFactory.initElements(driver,UniqloHomePage.class); categoryPage=PageFactory.initElements(driver,CategoryPage.class); productDetailsPage=PageFactory.initElements(driver,ProductDetailsPage.class); shoppingBucketPage=PageFactory.initElements(driver,ShoppingBucketPage.class); shippingDetailsGuestPage=PageFactory.initElements(driver,ShippingDetailsGuestPage.class); paymentDetailsPage=PageFactory.initElements(driver,VisaPaymentDetailsPage.class); ReusableActions.loadPropFileValues(); ReusableActions.openUrl(driver,ReusableActions.getPropFileValues("Url")); } @Test(priority = 1 ) public void checkoutAsGuestCheckoutWithVisaCard(){ try { uniqloHomePage.closePopup(); int j= ReusableActions.getRandomNumber(2,6); for (int i = 0; i <= j; i++) { uniqloHomePage.mainMenuRandomSelection(); ReusableActions.waitForpageToLoad(driver); categoryPage.productRandomSelection(); ReusableActions.waitForpageToLoad(driver); productDetailsPage.selectProductToCart(); ReusableActions.waitForpageToLoad(driver); } shoppingBucketPage.verifyShopBucketAndProceed(); } catch(Exception e){ e.printStackTrace(); } } @Test(priority = 2 ,dataProviderClass=ShippingDetailsGuestPage.class,dataProvider="getData") public void shipDetailscheckoutAsGuestWithVisaCard(String sFirstName,String sLastName,String sEmail,String sPhone,String sAddress,String sCity,String sRegion,String sPostal,String sDay,String sMonth,String sYear,String password,String vpassword ){ try{ ReusableActions.waitForpageToLoad(driver); shippingDetailsGuestPage.ship_DetailsGuest(sFirstName,sLastName,sEmail,sPhone,sAddress,sCity,sRegion,sPostal,sDay,sMonth,sYear,password,vpassword); } catch (Throwable t) { t.printStackTrace(); } } @Test(priority = 3 ,dataProviderClass=VisaPaymentDetailsPage.class,dataProvider="getData") public void paymentDetailscheckoutAsGuestWithVisaCard(String cType,String cNumber,String cExpiryMonth,String cExpiryYear,String cccvv){ try{ ReusableActions.waitForpageToLoad(driver); paymentDetailsPage.selectPaymentDetails(cType,cNumber,cExpiryMonth,cExpiryYear,cccvv); Thread.sleep(10000); } catch (Throwable t) { t.printStackTrace(); } } @AfterMethod public void afterMethod() throws IOException { if (driver != null) { File file = new File("Screenshots" + fileSeperator + "Results"); if (!file.exists()) { Reporter.log("File created " + file, true); file.mkdir(); System.out.println("Dir created"); } File screenshotFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); FileUtils.copyFile(screenshotFile,new File(dir+fileSeperator+"Screenshots" + fileSeperator + "Results" + fileSeperator+this.getClass().getSimpleName()+fileSeperator+TestListener.testMethodName+fileSeperator+TestListener.screenShotName)); } } @AfterClass public static void quitDriver() { try{ Thread.sleep(5000); driver.quit(); } catch (Exception e) { e.printStackTrace(); } } }
[ "john@sample.com" ]
john@sample.com
0257a469a02110569d927329d5f9acd37c00a898
b14df15c5eb15715d45fac1ea27c8cda241fa0db
/REPASO JAVA/java1/src/A0_Bucles/A1_21_BucleFor.java
7fcc81231b4cf31c0ac21aec9cc4cd2b93bec3cd
[]
no_license
AxelCCp/Repaso-FullStackJava
b47d5d2dd4cea5d2a73a25374d3d8d5a4078667e
6be60a2ef512ee4e2936ccbbbc8c24b5d7b9e0ec
refs/heads/master
2023-07-16T04:02:21.035274
2021-09-01T22:18:33
2021-09-01T22:18:33
387,669,491
0
0
null
null
null
null
UTF-8
Java
false
false
1,017
java
package A0_Bucles; import javax.swing.JOptionPane; //BUCLE FOR. //COMPROBAR EMAIL. public class A1_21_BucleFor { public static void main(String[]args) { /* for(int i=10;i>0;i-=2) { System.out.println(i); } */ /* boolean arroba = false; String email = JOptionPane.showInputDialog("Ingresa tu Email:"); //System.out.println("La longitud de tu email es: " + email.length()); for(int i=0; i<email.length(); i++) { if(email.charAt(i)=='@') { arroba=true; } } if(arroba==true) System.out.println("Email correcto"); else if(arroba==false ) System.out.println("Email Incorrecto"); */ int arroba=0; boolean punto=false; String email = JOptionPane.showInputDialog("Ingresa tu email:"); for(int i=0; i<email.length(); i++) { if(email.charAt(i)=='@') { arroba++; } if(email.charAt(i)=='.') { punto=true; } } if(arroba==1 && punto==true)System.out.println("Email Correcto"); else System.out.println("Email incorrecto"); } }
[ "hpmajin@outlook.es" ]
hpmajin@outlook.es
dd4d6b8e88cf6ce7350acdef1a0116ee3a38672e
3144b109eade61ab22c43a5da1863aaa7ff7807d
/src/main/java/org/ict/algorithm/thread/MDC.java
f62e041d9e1bed0974aef6028639244526a8bca3
[]
no_license
xuelianhan/basic-algos
1f3458c1d6790b31a7a8828f5ca8aee7baaa5073
dd9aae141a3f83b95b0bc50fa77af51ad6dac9e9
refs/heads/master
2023-08-31T21:05:29.333204
2023-08-31T06:07:56
2023-08-31T06:07:56
9,878,731
5
0
null
2023-06-15T02:10:19
2013-05-06T03:32:24
Java
UTF-8
Java
false
false
146
java
package org.ict.algorithm.thread; /** * @see https://www.baeldung.com/mdc-in-log4j-2-logback * @author hanxuelian * */ public class MDC { }
[ "xueliansniper@gmail.com" ]
xueliansniper@gmail.com
7d9382d9d1afc721ee21aa7bb1c4158c946e953f
4d6f449339b36b8d4c25d8772212bf6cd339f087
/netreflected/src/Core/PresentationCore,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35/system/windows/ink/StylusShape.java
ae8d389bf20b23b3406b0ab9f3f5f35197031e59
[ "MIT" ]
permissive
lvyitian/JCOReflector
299a64550394db3e663567efc6e1996754f6946e
7e420dca504090b817c2fe208e4649804df1c3e1
refs/heads/master
2022-12-07T21:13:06.208025
2020-08-28T09:49:29
2020-08-28T09:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,921
java
/* * MIT License * * Copyright (c) 2020 MASES s.r.l. * * 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. */ /************************************************************************************** * <auto-generated> * This code was generated from a template using JCOReflector * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. * </auto-generated> *************************************************************************************/ package system.windows.ink; import org.mases.jcobridge.*; import org.mases.jcobridge.netreflection.*; import java.util.ArrayList; // Import section /** * The base .NET class managing System.Windows.Ink.StylusShape, PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Extends {@link NetObject}. * <p> * * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Ink.StylusShape" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Windows.Ink.StylusShape</a> */ public class StylusShape extends NetObject { /** * Fully assembly qualified name: PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 */ public static final String assemblyFullName = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; /** * Assembly name: PresentationCore */ public static final String assemblyShortName = "PresentationCore"; /** * Qualified class name: System.Windows.Ink.StylusShape */ public static final String className = "System.Windows.Ink.StylusShape"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } public StylusShape(Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link StylusShape}, a cast assert is made to check if types are compatible. */ public static StylusShape cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new StylusShape(from.getJCOInstance()); } // Constructors section public StylusShape() throws Throwable { } // Methods section // Properties section public double getHeight() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (double)classInstance.Get("Height"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public double getRotation() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (double)classInstance.Get("Rotation"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public double getWidth() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (double)classInstance.Get("Width"); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }
[ "mario.mastrodicasa@masesgroup.com" ]
mario.mastrodicasa@masesgroup.com
c1f58aa102ba3e187936fb0feb356acef7e81030
86ece2b8a128aaa261836fcc09fd4378050c0f22
/storio-contentresolver/src/test/java/com/pushtorefresh/storio/contentresolver/operation/put/PreparedPutContentValuesTest.java
80a524f22684b6cc10dadccbc5cffa17a7c6fed7
[ "Apache-2.0" ]
permissive
tobibo/storio
388d909059e418a834350647aabea845eed6a105
92c27be0a78d181301436207f30f372cb44fe833
refs/heads/master
2021-01-24T21:41:59.283243
2015-04-11T11:37:09
2015-04-11T11:37:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,193
java
package com.pushtorefresh.storio.contentresolver.operation.put; import org.junit.Test; import rx.Observable; public class PreparedPutContentValuesTest { @Test public void putContentValuesBlocking() { final PutStub putStub = PutStub.newPutStubForOneContentValues(); final PutResult putResult = putStub.storIOContentResolver .put() .contentValues(putStub.mapFunc.map(putStub.testItems.get(0))) .withPutResolver(putStub.putResolverForContentValues) .prepare() .executeAsBlocking(); putStub.verifyBehaviorForOneContentValues(putResult); } @Test public void putContentValuesObservable() { final PutStub putStub = PutStub.newPutStubForOneContentValues(); final Observable<PutResult> putResultObservable = putStub.storIOContentResolver .put() .contentValues(putStub.mapFunc.map(putStub.testItems.get(0))) .withPutResolver(putStub.putResolverForContentValues) .prepare() .createObservable(); putStub.verifyBehaviorForOneContentValues(putResultObservable); } }
[ "artem.zinnatullin@gmail.com" ]
artem.zinnatullin@gmail.com
44976139f3b3a48a0e18cdec381cba970e2b9613
6992cef1d8dec175490d554f3a1d8cb86cd44830
/Java/JEE/Skills/ejbModule/entity/Company.java
13df683f6db4c4e6dc0dad42538d69cbff0f6c67
[]
no_license
hamaenpaa/own_code_examples
efd49b62bfc96d1dec15914a529661d3ebbe448d
202eea76a37f305dcbc5a792c9b613fc43ca8477
refs/heads/master
2021-01-17T14:51:03.861478
2019-05-06T09:28:23
2019-05-06T09:28:23
44,305,640
1
0
null
null
null
null
UTF-8
Java
false
false
560
java
package entity; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class Company { int id; String name; String description; public Company() {} @Id public int getId() { return this.id; } public void setId(int id) { this.id = id; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getDescription() { return this.description; } public void setDescription(String description) { this.description = description; } }
[ "harri.maenpaa@gmail.com" ]
harri.maenpaa@gmail.com
d88b1ec4a2789c867f838d13f6cf38cfe843d3d9
56adea945b27ccaf880decadb7f7cb86de450a8d
/core/ep-core/src/test/java/com/elasticpath/service/dataimport/impl/ImportServiceImplNewTest.java
dc0d3ccefe18e88503a23a4a6c3bcae8a3892ff5
[]
no_license
ryanlfoster/ep-commerce-engine-68
89b56878806ca784eca453d58fb91836782a0987
7364bce45d25892e06df2e1c51da84dbdcebce5d
refs/heads/master
2020-04-16T04:27:40.577543
2013-12-10T19:31:52
2013-12-10T20:01:08
40,164,760
1
1
null
2015-08-04T05:15:25
2015-08-04T05:15:25
null
UTF-8
Java
false
false
5,238
java
package com.elasticpath.service.dataimport.impl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import org.jmock.Expectations; import org.jmock.integration.junit4.JUnitRuleMockery; import org.junit.Rule; import org.junit.Test; import com.elasticpath.domain.dataimport.ImportBadRow; import com.elasticpath.domain.dataimport.ImportFault; import com.elasticpath.domain.dataimport.ImportJob; import com.elasticpath.domain.dataimport.ImportJobRequest; import com.elasticpath.domain.dataimport.impl.ImportBadRowImpl; import com.elasticpath.domain.dataimport.impl.ImportFaultImpl; import com.elasticpath.domain.dataimport.impl.ImportJobImpl; import com.elasticpath.persistence.api.PersistenceEngine; import com.elasticpath.service.dataimport.ImportService; /** * New test for {@code ImportServiceImpl} which does not extend {@code ElasticPathTestCase}. */ public class ImportServiceImplNewTest { @Rule public final JUnitRuleMockery context = new JUnitRuleMockery(); /** * Tests that validateTitle succeeds when there is a hyphen in a field for a base amount import. */ @Test public void testValidateTitleBaseAmount() { ImportServiceImpl service = new ImportServiceImpl(); final ImportJobRequest importJobRequest = context.mock(ImportJobRequest.class); final ImportJob importJob = new ImportJobImpl(); importJob.setImportDataTypeName("Base Amount"); context.checking(new Expectations() { { allowing(importJobRequest).getImportJob(); will(returnValue(importJob)); } }); String[] titleRow = {"empty", "PL-1_USD"}; List<ImportBadRow> importBadRows = new ArrayList<ImportBadRow>(); service.validateTitleLine(titleRow, importBadRows, importJobRequest); assertTrue("Expect no faults", importBadRows.isEmpty()); } /** * Test double for {@code ImportServiceImpl}. */ private class ImportServiceTestDouble extends ImportServiceImpl { @Override protected ImportFault getImportFaultError() { return new ImportFaultImpl(); } @SuppressWarnings("unchecked") @Override protected <T> T getBean(final String beanName) { if ("importBadRow".equals(beanName)) { return (T) new ImportBadRowImpl(); } return null; } }; /** * Tests that validateTitle fails when there is a hyphen the header for a non * Base Amount import. */ @Test public void testValidateTitleNotBaseAmount() { ImportServiceImpl service = new ImportServiceTestDouble(); final ImportJobRequest importJobRequest = context.mock(ImportJobRequest.class); final ImportJob importJob = new ImportJobImpl(); importJob.setImportDataTypeName("Category"); context.checking(new Expectations() { { allowing(importJobRequest).getImportJob(); will(returnValue(importJob)); } }); String[] titleRow = {"empty", "PL-1_USD"}; List<ImportBadRow> importBadRows = new ArrayList<ImportBadRow>(); service.validateTitleLine(titleRow, importBadRows, importJobRequest); assertEquals("Expect the hyphen to fail", 1, importBadRows.size()); } /** * Tests that <code>ImportService</code> returns an empty list if an empty set of guids is passed in. */ @Test public void testFindByGuidsWithEmptyGuids() { PersistenceEngine mockPersistenceEngine = context.mock(PersistenceEngine.class); ImportService importService = new ImportServiceImpl(); importService.setPersistenceEngine(mockPersistenceEngine); assertEquals(Collections.<ImportJob>emptyList(), importService.findByGuids(Collections.<String>emptySet())); } /** * Tests that <code>ImportService</code> returns an empty list if null is passed in for guids. */ @Test public void testFindByGuidsWithNullGuids() { PersistenceEngine mockPersistenceEngine = context.mock(PersistenceEngine.class); ImportService importService = new ImportServiceImpl(); importService.setPersistenceEngine(mockPersistenceEngine); assertEquals(Collections.<ImportJob>emptyList(), importService.findByGuids(null)); } /** * Tests that <code>ImportService</code> returns the list of one <code>ImportJob</code> found by the query. */ @Test public void testFindByGuidsWithOneGuid() { final Set<String> guids = new HashSet<String>(Arrays.asList("guid1")); final List<ImportJob> importJobsFromQuery = new ArrayList<ImportJob>(); ImportJob importJob = new ImportJobImpl(); importJobsFromQuery.add(importJob); final PersistenceEngine mockPersistenceEngine = context.mock(PersistenceEngine.class); ImportService importService = new ImportServiceImpl(); importService.setPersistenceEngine(mockPersistenceEngine); context.checking(new Expectations() { { oneOf(mockPersistenceEngine).retrieveByNamedQueryWithList("IMPORT_JOB_FIND_BY_GUIDS", "list", guids); will(returnValue(importJobsFromQuery)); } }); List<ImportJob> returnedImportJobs = importService.findByGuids(guids); assertSame("The import jobs returned from the service call should be the same as what's returned from the query.", importJobsFromQuery, returnedImportJobs); } }
[ "chris.gomes@pearson.com" ]
chris.gomes@pearson.com
f5cfe6c9b4b0d172abefaf065a596f5b64b22848
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/assets/MidasPay_zip/MidasPay_1.7.9a_179010_92809280434fe4a46110cc442b537591.jar/classes.jar/midas/x/ua.java
6eed0d286a7fc13086c6c1d4105dfb2d8d556070
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
384
java
package midas.x; public abstract interface ua extends Runnable { public abstract String b(); public abstract void cancel(); } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\assets\MidasPay_zip\MidasPay_1.7.9a_179010_92809280434fe4a46110cc442b537591.jar\classes.jar * Qualified Name: midas.x.ua * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
3c6aee74f75615032ab9028af285531e76775b78
a4e0f5d38301cbc506191020afdfbef4bf5d4915
/workspace/glaf-ui/src/main/java/com/glaf/ui/mapper/SkinMapper.java
343cbaa00b2bb55e40609a3b6202fe17730131e9
[ "Apache-2.0" ]
permissive
magoo-lau/glaf
14f95ddcee026f28616027a601f97e8d7df44102
9c325128afc4325bc37655d54bc65f34ecc41089
refs/heads/master
2020-12-02T12:47:14.959928
2017-07-09T08:08:51
2017-07-09T08:08:51
96,594,013
0
0
null
2017-07-08T03:41:28
2017-07-08T03:41:28
null
UTF-8
Java
false
false
1,398
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 com.glaf.ui.mapper; import java.util.*; import org.springframework.stereotype.Component; import com.glaf.ui.model.*; import com.glaf.ui.query.SkinQuery; @Component public interface SkinMapper { void deleteSkins(SkinQuery query); void deleteSkinById(String id); void deleteSkinInstanceByActorId(String actorId); Skin getSkinById(String id); Skin getUserSkin(String actorId); int getSkinCount(SkinQuery query); List<Skin> getSkins(SkinQuery query); void insertSkin(Skin model); void insertSkinInstance(SkinInstance skinInstance); void updateSkin(Skin model); }
[ "jior2008@gmail.com" ]
jior2008@gmail.com
49e12756386c1d8fc4b320663eb65c9eb415c1fc
d84fb60595312136aeb1069baad585da325c218d
/HuaShanApp/app/src/main/java/com/karazam/huashanapp/my/transactiondetails/main/view/activity/view/TransactionAdapter.java
171f6f0f9d8f0880bf03ba67c921eb43627b17b7
[]
no_license
awplying12/huashanApp
d6a72b248c94a65e882385edf92231552214340c
86bd908ec2f82fc030a9d83238144a943461c842
refs/heads/master
2021-01-11T00:21:10.870110
2017-02-10T11:27:06
2017-02-10T11:27:06
70,544,770
0
0
null
null
null
null
UTF-8
Java
false
false
5,018
java
package com.karazam.huashanapp.my.transactiondetails.main.view.activity.view; import android.app.Activity; import android.content.Context; import android.text.TextUtils; import android.text.format.Time; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.example.stickylistview_library.StickyListHeadersAdapter; import com.example.utils.base.BaseBaseAdapter; import com.example.utils.utils.DataUtil; import com.example.utils.utils.StringUtil; import com.karazam.huashanapp.R; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; /** * Created by Administrator on 2016/12/9. */ public class TransactionAdapter extends BaseBaseAdapter<TransactionItem> implements StickyListHeadersAdapter { private Activity activity; public TransactionAdapter(Context context, ArrayList<TransactionItem> list,Activity activity) { super(context, list); this.activity = activity; } @Override public View getHeaderView(int position, View convertView, ViewGroup parent) { HeaderViewHolder headerViewHolder; if(convertView == null){ convertView = LayoutInflater.from(getContext()).inflate(R.layout.layout_transaction_header_item,null); headerViewHolder = new HeaderViewHolder(convertView); convertView.setTag(headerViewHolder); }else { headerViewHolder = (HeaderViewHolder) convertView.getTag(); } Long date = Long.parseLong(StringUtil.interrupt(getList().get(position).getCreateDate(),0,"0")); String month = DataUtil.getDate(new Date(date),"yyyy年M月"); headerViewHolder.month.setText(StringUtil.interrupt(month,0,"")); return convertView; } @Override public long getHeaderId(int position) { Time time = new Time("GMT+8"); Long date = Long.parseLong(StringUtil.interrupt(getList().get(position).getCreateDate(),0,"0")); time.set(date); return time.month; } @Override public View getViewBase(final int position, View convertView, ViewGroup parent) { ViewHolder holder; if(convertView == null){ convertView = LayoutInflater.from(getContext()).inflate(R.layout.layout_transaction_item,null); holder = new ViewHolder(convertView); convertView.setTag(holder); }else { holder = (ViewHolder) convertView.getTag(); } String week = getList().get(position).getWeekDay(); holder.data1.setText(StringUtil.interrupt(week,0,"未知")); SimpleDateFormat sdf = new SimpleDateFormat("MM-dd"); Long dateNum = Long.parseLong(StringUtil.interrupt(getList().get(position).getCreateDate(),0,"0")); Date date = new Date(dateNum); String data2 = StringUtil.interrupt(sdf.format(date),0,"未知"); holder.data2.setText(data2); String amount = StringUtil.reservedDecimal(StringUtil.interrupt(getList().get(position).getAmount(),0,"0"),2); holder.amount.setText(StringUtil.getMoneyType(amount,false)); String momo = StringUtil.interrupt(getList().get(position).getMemo(),14,"未知"); holder.momo.setText(momo); TransactionItem item = getList().get(position); String orderId = item.getOrderId(); String type = item.getType(); if (type.equals("investment")){ //投资 holder. goto_icon.setVisibility(View.VISIBLE); } else if(type.equals("withdrawal")){ //提现 holder. goto_icon.setVisibility(View.VISIBLE); } else if(type.equals("recharge")){ //充值 holder. goto_icon.setVisibility(View.VISIBLE); } else if(type.equals("repayment")){ //回款 holder. goto_icon.setVisibility(View.VISIBLE); } else { holder. goto_icon.setVisibility(View.VISIBLE); } return convertView; } public class ViewHolder { private View itemView; private TextView data1,data2 ,amount,momo; private ImageView goto_icon; public ViewHolder(View itemView) { this.itemView = itemView; data1 = (TextView) itemView.findViewById(R.id.data_tv_1); data2 = (TextView) itemView.findViewById(R.id.data_tv_2); amount = (TextView) itemView.findViewById(R.id.amount); momo = (TextView) itemView.findViewById(R.id.momo); goto_icon = (ImageView) itemView.findViewById(R.id.goto_icon); } } public class HeaderViewHolder { private View itemView; private TextView month; public HeaderViewHolder(View itemView) { this.itemView = itemView; month = (TextView) itemView.findViewById(R.id.month); } } }
[ "awplying14@163.com" ]
awplying14@163.com
cbe4d6f27155b57992b38c1fb438d65233a4110e
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12584-3-7-FEMO-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/store/XWikiHibernateStore_ESTest.java
2e00bd4da2b7742f1b358bbbd4a6a1f03a053cd1
[]
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
564
java
/* * This file was automatically generated by EvoSuite * Fri Apr 03 19:35:05 UTC 2020 */ package com.xpn.xwiki.store; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XWikiHibernateStore_ESTest extends XWikiHibernateStore_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
39190d4b738eebc19c01d766cfb387fffcdf23a5
b41b553a285bfea105ad4b68943eb1c29f976ca2
/core/src/main/java/io/github/thanktoken/core/api/address/ThankAddress.java
3aa42ecac9ff3d372077c56c7b706ad2b9003d39
[ "Apache-2.0" ]
permissive
thanktoken/thanks4java
c12f32f5b778a843cfefc577e664e8768ab4aef7
9ccc2aca2375247c168e8b64c0241de78408367f
refs/heads/master
2021-04-09T16:00:43.851308
2020-03-25T11:28:20
2020-03-25T11:28:20
125,636,409
2
0
null
null
null
null
UTF-8
Java
false
false
1,705
java
package io.github.thanktoken.core.api.address; import io.github.mmm.crypto.CryptoBinary; import io.github.thanktoken.core.api.algorithm.ThankAlgorithm; /** * Cryptographic address that acts like a bank account number. It corresponds to a {@link java.security.KeyPair}. * Depending on the {@link ThankAlgorithm} this may be a binary representation of the {@link java.security.PublicKey} * itself or something derived from it (like a hash) but still sufficient to verify a signature created by signing with * the corresponding {@link java.security.PrivateKey}. * * @since 1.0.0 */ public abstract class ThankAddress extends CryptoBinary { /** * The constructor. * * @param data the {@link #getData() binary data}. */ public ThankAddress(byte[] data) { super(data); } /** * @return the {@link ThankAddressHeader header} of this address. Please note that using the wrong header will render * your tokens, transactions and messages invalid. Official {@link ThankAddress}es have to be certified and * confirmed via the {@link io.github.thanktoken.core.api.identity.ThankIdentity}-directory (see * {@link io.github.thanktoken.core.api.identity.ThankIdentityProvider}). */ public abstract ThankAddressHeader getHeader(); /** * @return the ID (hash-code) of this address that may be used for * {@link io.github.thanktoken.core.api.timestamp.ThankTimestamp}s. * @see io.github.thanktoken.core.api.timestamp.ThankTimestampFactoryNanoIdRange */ public int getTimestampId() { int id = this.data[0]; for (int i = 1; i < this.data.length; i++) { id = 31 * id + this.data[i]; } return id; } }
[ "hohwille@users.sourceforge.net" ]
hohwille@users.sourceforge.net
ab22658fc12165e9e145428412657d72712d6e8c
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/60_sugar-net.sf.sugar.fspath.cli.Prompt-1.0-3/net/sf/sugar/fspath/cli/Prompt_ESTest_scaffolding.java
d099f0a3fd721a7c77a471ded1b51336ef5d7b10
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
536
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Oct 25 17:45:07 GMT 2019 */ package net.sf.sugar.fspath.cli; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class Prompt_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
dc4f843f087e75767f855eb904f581a7470f5569
aab931876a659a5051d05d03c2ea113bb3665588
/src/main/java/org/jhonrain/modules/sys/entity/SysConfigDO.java
bdecbba9a932b134d9826224501867cb85b25599
[]
no_license
JHON-XZL/read-demo
049c171798539e3993645ebde1541cb1a87553e1
a99f6502c0825e9d07b562da61cd48e1bba78ea6
refs/heads/master
2020-03-21T12:11:50.101595
2018-06-25T03:56:22
2018-06-25T03:56:22
138,539,804
0
0
null
null
null
null
UTF-8
Java
false
false
486
java
package org.jhonrain.modules.sys.entity; import lombok.Data; import org.hibernate.validator.constraints.NotBlank; /** * <p>功能描述</br>系统配置信息</p> * * @author jiangy19 * @version v1.0 * @projectName happy-read * @date 2018/6/19 13:56 */ @Data public class SysConfigDO { private Long id; @NotBlank(message = "参数名不能为空") private String key; @NotBlank(message = "参数值不能为空") private String value; private String remark; }
[ "3291371805@qq.com" ]
3291371805@qq.com
85ae9888d59d20d8847e981691e34dbd6d27a7f5
a6c0eb7d9bc171b87a0ac7dd62076de2770badd0
/SIF3InfraREST/sif3InfraModel/src/sif3/infra/common/model/ProvisionedZonesType.java
890f74551516ffddfd57863eb91a1cfcc8a1bfd9
[ "Apache-2.0" ]
permissive
Access4LearningNA/sif3-framework-java
ab92b3f136a0d59e5df4e0dff0b60ed6eeba667e
b903f2e5d98ed98f4b6bccf90e31d0bbe0c0e50f
refs/heads/master
2020-06-17T17:08:03.850761
2016-05-26T01:54:47
2016-05-26T01:54:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,208
java
package sif3.infra.common.model; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for provisionedZonesType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="provisionedZonesType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="provisionedZone" type="{http://www.sifassociation.org/infrastructure/3.1}provisionedZoneType" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "provisionedZonesType", namespace = "http://www.sifassociation.org/infrastructure/3.1", propOrder = { "provisionedZone" }) public class ProvisionedZonesType { @XmlElement(namespace = "http://www.sifassociation.org/infrastructure/3.1", required = true) protected List<ProvisionedZoneType> provisionedZone; /** * Gets the value of the provisionedZone property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the provisionedZone property. * * <p> * For example, to add a new item, do as follows: * <pre> * getProvisionedZone().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ProvisionedZoneType } * * */ public List<ProvisionedZoneType> getProvisionedZone() { if (provisionedZone == null) { provisionedZone = new ArrayList<ProvisionedZoneType>(); } return this.provisionedZone; } }
[ "joerg.huber@systemic.com.au" ]
joerg.huber@systemic.com.au
35447eaa8d67e48209401df0a6d2fb756e382541
c49d17bc0ea18308455dfa19e0f9560d87d0954f
/thor-rpc/src/main/java/com/mob/thor/rpc/protocol/telnet/CountTelnetHandler.java
5441747488db449ecbac325cf4607baf98d5dc1f
[ "Apache-2.0" ]
permissive
MOBX/Thor
4b6ed58ba167bde1a8e4148de4a05268314e86d4
68b650d7ee05efe67dc1fca8dd0194a47d683f72
refs/heads/master
2020-12-31T02:49:31.603273
2016-01-30T12:49:39
2016-01-30T12:49:39
48,224,631
2
0
null
null
null
null
UTF-8
Java
false
false
6,389
java
package com.mob.thor.rpc.protocol.telnet; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import com.mob.thor.rpc.api.Exporter; import com.mob.thor.rpc.api.Invoker; import com.mob.thor.rpc.api.RpcStatus; import com.mob.thor.rpc.common.URL; import com.mob.thor.rpc.common.extension.Activate; import com.mob.thor.rpc.common.utils.StringUtils; import com.mob.thor.rpc.protocol.ThorProtocol; import com.mob.thor.rpc.remoting.api.RemotingException; import com.mob.thor.rpc.remoting.api.ThorChannel; import com.mob.thor.rpc.remoting.api.telnet.TelnetHandler; import com.mob.thor.rpc.remoting.api.telnet.support.Help; import com.mob.thor.rpc.remoting.api.telnet.support.TelnetUtils; @Activate @Help(parameter = "[service] [method] [times]", summary = "Count the service.", detail = "Count the service.") public class CountTelnetHandler implements TelnetHandler { public String telnet(final ThorChannel channel, String message) { String service = (String) channel.getAttribute(ChangeTelnetHandler.SERVICE_KEY); if ((service == null || service.length() == 0) && (message == null || message.length() == 0)) { return "Please input service name, eg: \r\ncount XxxService\r\ncount XxxService xxxMethod\r\ncount XxxService xxxMethod 10\r\nor \"cd XxxService\" firstly."; } StringBuilder buf = new StringBuilder(); if (service != null && service.length() > 0) { buf.append("Use default service " + service + ".\r\n"); } String[] parts = message.split("\\s+"); String method; String times; if (service == null || service.length() == 0) { service = parts.length > 0 ? parts[0] : null; method = parts.length > 1 ? parts[1] : null; } else { method = parts.length > 0 ? parts[0] : null; } if (StringUtils.isInteger(method)) { times = method; method = null; } else { times = parts.length > 2 ? parts[2] : "1"; } if (!StringUtils.isInteger(times)) { return "Illegal times " + times + ", must be integer."; } final int t = Integer.parseInt(times); Invoker<?> invoker = null; for (Exporter<?> exporter : ThorProtocol.getDubboProtocol().getExporters()) { if (service.equals(exporter.getInvoker().getInterface().getSimpleName()) || service.equals(exporter.getInvoker().getInterface().getName()) || service.equals(exporter.getInvoker().getUrl().getPath())) { invoker = exporter.getInvoker(); break; } } if (invoker != null) { if (t > 0) { final String mtd = method; final Invoker<?> inv = invoker; final String prompt = channel.getUrl().getParameter("prompt", "telnet"); Thread thread = new Thread(new Runnable() { public void run() { for (int i = 0; i < t; i++) { String result = count(inv, mtd); try { channel.send("\r\n" + result); } catch (RemotingException e1) { return; } if (i < t - 1) { try { Thread.sleep(1000); } catch (InterruptedException e) { } } } try { channel.send("\r\n" + prompt + "> "); } catch (RemotingException e1) { return; } } }, "TelnetCount"); thread.setDaemon(true); thread.start(); } } else { buf.append("No such service " + service); } return buf.toString(); } private String count(Invoker<?> invoker, String method) { URL url = invoker.getUrl(); List<List<String>> table = new ArrayList<List<String>>(); List<String> header = new ArrayList<String>(); header.add("method"); header.add("total"); header.add("failed"); header.add("active"); header.add("average"); header.add("max"); if (method == null || method.length() == 0) { for (Method m : invoker.getInterface().getMethods()) { RpcStatus count = RpcStatus.getStatus(url, m.getName()); List<String> row = new ArrayList<String>(); row.add(m.getName()); row.add(String.valueOf(count.getTotal())); row.add(String.valueOf(count.getFailed())); row.add(String.valueOf(count.getActive())); row.add(String.valueOf(count.getSucceededAverageElapsed()) + "ms"); row.add(String.valueOf(count.getSucceededMaxElapsed()) + "ms"); table.add(row); } } else { boolean found = false; for (Method m : invoker.getInterface().getMethods()) { if (m.getName().equals(method)) { found = true; break; } } if (found) { RpcStatus count = RpcStatus.getStatus(url, method); List<String> row = new ArrayList<String>(); row.add(method); row.add(String.valueOf(count.getTotal())); row.add(String.valueOf(count.getFailed())); row.add(String.valueOf(count.getActive())); row.add(String.valueOf(count.getSucceededAverageElapsed()) + "ms"); row.add(String.valueOf(count.getSucceededMaxElapsed()) + "ms"); table.add(row); } else { return "No such method " + method + " in class " + invoker.getInterface().getName(); } } return TelnetUtils.toTable(header, table); } }
[ "zhangxiongcai337@gmail.com" ]
zhangxiongcai337@gmail.com
e2543fceebf5f722d3d7c0f8bd7e6d1ad16629ed
e7861c0ed1b49224b6c4ccf6dbfc63be61a026e5
/JDBC/1월23일 JDBC드라이버설정 및 시작/jdbcProject_v1.1내꺼/src/employee/controller/EmployeeController.java
d38daeb9ebe30ad9e50ebd733864ae1d1f936b65
[]
no_license
kdw912001/kh
7d7610b4ddaab286714131d1c9108373f6c920a9
73c511db0723e0bc49258d8d146ba6f8ee9db762
refs/heads/master
2020-04-06T10:19:58.220792
2019-05-03T18:41:57
2019-05-03T18:41:57
157,376,594
1
0
null
null
null
null
UTF-8
Java
false
false
1,829
java
package employee.controller; import java.util.ArrayList; import employee.model.dao.EmployeeDao; import employee.model.vo.Employee; import employee.view.EmployeeMenu; public class EmployeeController { //DI 선언 private EmployeeDao edao = new EmployeeDao(); public EmployeeController() {} public ArrayList<Employee> selectAll() { ArrayList<Employee> empList = edao.selectList(); if(empList.size() == 0 || empList==null) { System.out.println("\n직원 정보가 존재하지 않습니다."); new EmployeeMenu().displayMenu(); } return empList; } public Employee selectEmployee(String empId) { Employee emp = edao.selectOne(empId); if(emp == null) { System.out.println(empId + " 사번 직원이 존재하지 않습니다."); new EmployeeMenu().displayMenu();//원래는 이 방식으로 호출 안함. //나중에 배운다고 함. } return emp; } public ArrayList<Employee> selectJobId(String jobId) { ArrayList<Employee> empList = edao.selectJobList(jobId); if(empList.size() == 0) { System.out.println("\n해당 직급의 직원정보가 존재하지 않습니다."); new EmployeeMenu().displayMenu(); } return empList; } public ArrayList<Employee> selectDeptId(String deptId) { ArrayList<Employee> empList = edao.selectDeptList(deptId); if(empList.size() == 0) { System.out.println("\n해당 부서에 근무하는 직원정보가 없습니다."); new EmployeeMenu().displayMenu(); } return empList; } public void insertEmployee(Employee emp) { int result = edao.insert(emp); if(result <= 0) { System.out.println("\n새 직원 등록 실패!"); System.out.println("확인하고 다시 시도하십시오."); } return;//return 하기 때문에 //new EmployeeMenu().displayMenu();할 필요없음 } }
[ "kdw912001@naver.com" ]
kdw912001@naver.com
3b3646853c1c16eb7ba89ccafffc161dbe11c375
d67d84765b65e72648e74ab8284c80719e117d08
/qtc_pointtablet/app/src/main/java/qtc/project/pos/model/OrderDetailModel.java
45927a23cce2e4cd01dfe37d02b266819e9fbf04
[]
no_license
dinhdeveloper/TONGHOP
ec02a0b33bc144fe44906946c803cedc0a8f20d6
9cbf8d3d2a5d76150d85ce4cb77dc24d8533cba1
refs/heads/master
2022-11-15T01:31:15.611953
2020-07-13T10:29:04
2020-07-13T10:29:04
274,818,584
0
0
null
null
null
null
UTF-8
Java
false
false
923
java
package qtc.project.pos.model; import java.io.Serializable; public class OrderDetailModel implements Serializable { private String id; private String quantity; private String name; private String image; private String price; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getQuantity() { return quantity; } public void setQuantity(String quantity) { this.quantity = quantity; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public String getPrice() { return price; } public void setPrice(String price) { this.price = price; } }
[ "dinhtrancntt@gmail.com" ]
dinhtrancntt@gmail.com
56c69bb9503109744de800056bf617b8bd78495a
1c92fce07085ad72f1443e65f12553dde613b338
/1-spring-core/src/test/java/org/certificatic/spring/core/tarea2/test/namespaces/pcutil/NamespacesPCUtilTest.java
210090d2a56d98412270b9629f37a7fa01367390
[]
no_license
rtelematica/coreSpring5Grupo2
61e7d64b257e067848d5ebec4559ac52e3b0260f
5b191bf59f768d88baf7ed463822e212f16c7e6b
refs/heads/master
2022-04-22T20:37:37.180258
2020-03-28T22:49:24
2020-03-28T22:49:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,092
java
package org.certificatic.spring.core.tarea2.test.namespaces.pcutil; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.certificatic.spring.core.tarea2.namespaces.pcutil.bean.Agenda; import org.certificatic.spring.core.tarea2.namespaces.pcutil.bean.Auto; import org.certificatic.spring.core.tarea2.namespaces.pcutil.bean.Circulo; import org.certificatic.spring.core.tarea2.namespaces.pcutil.bean.MisProperties; import org.certificatic.spring.core.tarea2.namespaces.pcutil.bean.Persona; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import lombok.extern.slf4j.Slf4j; @Slf4j public class NamespacesPCUtilTest { private static ClassPathXmlApplicationContext applicationContext; @Before public void beforeTest() { applicationContext = new ClassPathXmlApplicationContext( "spring/tarea2/namespaces-p-c-util-application-context.xml"); } @Test public void collectionsTest() { log.info("collectionsTest -------------------"); Persona persona = applicationContext.getBean(Persona.class); Assert.assertNotNull(persona); Assert.assertEquals("Ivan Garcia", persona.getNombre()); log.info("persona: {}", persona); Circulo circulo = applicationContext.getBean(Circulo.class); Assert.assertNotNull(circulo); Assert.assertEquals(Math.PI * circulo.getRadio() * circulo.getRadio(), circulo.getArea(), 0.00001); log.info("circulo: {}", circulo); Agenda agenda = applicationContext.getBean(Agenda.class); Assert.assertNotNull(agenda); Assert.assertEquals("Spring Framework 5", agenda.getProperties().get("curso.nombre")); Assert.assertEquals(expectedNumerosMap(), agenda.getNumeros()); Assert.assertEquals(expectedAutosFamiliaSet(), agenda.getAutosFamilia()); Assert.assertEquals(expectedNotasList(), agenda.getNotas()); log.info("agenda: {}", agenda); MisProperties misProperties = applicationContext.getBean(MisProperties.class); Assert.assertNotNull(misProperties); Assert.assertEquals("Ivan Garcia", misProperties.getProgrammerName()); Assert.assertEquals("Iker Emilio", misProperties.getNombreHijo()); Assert.assertEquals("Spring Framework 5", misProperties.getNombreCurso()); log.info("misProperties: {}", misProperties); ((AbstractApplicationContext) applicationContext).close(); } private List<String> expectedNotasList() { List<String> lista = new ArrayList<>(); lista.add("una nota"); lista.add("dos notas"); lista.add("tres notas"); return lista; } private Set<Auto> expectedAutosFamiliaSet() { Set<Auto> autoSet = new HashSet<>(); autoSet.add(new Auto("BMW", "330ia")); autoSet.add(new Auto("Ford", "Mustang GT")); return autoSet; } private Map<String, Integer> expectedNumerosMap() { Map<String, Integer> map = new HashMap<>(); map.put("uno", 1); map.put("dos", 2); map.put("tres", 3); return map; } }
[ "isc.ivgarcia@gmail.com" ]
isc.ivgarcia@gmail.com
68639f5172599dd67a94d4b22c4ab9cac107d857
cb94cff2ffff25045cfa3ae283b244ff421e5bbc
/nitipAppsMitra/app/src/main/java/com/cindodcindy/nitip/view/BookingDetailActivity.java
5adcad54ccacc56fd2b12515adb756cf59f90f7f
[]
no_license
CindoddCindy/nitipMitra
5a38d3d947cefd82adccf4540d03ccc499f59cc5
cd69a9d2c01f819bd769b836d65f1b1700d11488
refs/heads/main
2023-04-16T10:38:19.200080
2021-05-05T10:32:10
2021-05-05T10:32:10
359,737,637
0
0
null
null
null
null
UTF-8
Java
false
false
5,643
java
package com.cindodcindy.nitip.view; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.widget.TextView; import com.cindodcindy.nitip.R; public class BookingDetailActivity extends AppCompatActivity { private TextView textView_by_asal_barang, textView_by_tujuan_barang, textView_by_nama_pengirim, textView_by_nama_penerima, textView_by_jenis_barang, textView_by_berat_kg, textView_asal, textView_tujuan, textView_date_going, textView_date_arive, textView_time_going, textView_time_arrive, textView_nama_penjual, textView_harga, textView_barang_type, textView_kapasitas; private TextView btn_konfirm, btn_hapus, btn_back; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_booking_detail); textView_by_asal_barang=findViewById(R.id.tv_book_detail_by_asal_barang); textView_by_tujuan_barang=findViewById(R.id.tv_book_detail_by_tujuan_barang); textView_by_nama_pengirim=findViewById(R.id.tv_book_detail_by_nama_pengirim); textView_by_nama_penerima=findViewById(R.id.tv_book_detail_by_nama_penerima); textView_by_jenis_barang=findViewById(R.id.tv_detail_booking_by_jenis_barang); textView_by_berat_kg=findViewById(R.id.tv_detail_booking_by_berat_barang); //data jasa textView_asal=findViewById(R.id.id_tv_detail_booking_lugg_asal); textView_tujuan=findViewById(R.id.tv_detail_booking_tujuan); textView_date_going=findViewById(R.id.tv_item_detail_booking_tgal_going); textView_date_arive=findViewById(R.id.tv_detail_boking_tgal_arr); textView_time_going=findViewById(R.id.tv_item_detail_booking_time_going); textView_time_arrive=findViewById(R.id.tv_item_detail_booking_time_arr); textView_nama_penjual=findViewById(R.id.tv_item_detail_booking_nama_seller); textView_harga=findViewById(R.id.tv_booking_detail_price); textView_barang_type=findViewById(R.id.tv_booking_detail_type); textView_kapasitas=findViewById(R.id.tv_booking_detail_height); btn_konfirm=findViewById(R.id.tv_booking_detail_btn_konfirm_booking); btn_hapus=findViewById(R.id.tv_booking_detail_btn_hapus_konfirm); btn_back=findViewById(R.id.tv_booking_detail_btn_kembali); } public void getDataFromItem(){ if(getIntent().getExtras()!=null) { /** * Jika Bundle ada, ambil data dari Bundle */ Bundle bundle = getIntent().getExtras(); // spHandle.setSpIdConfirmOrderEdit(SpHandle.SP_ID_CONFIRM_ORDER_EDIT, bundle.getLong("id_customer")); //spHandle.setSpIdConfirmOrder(SpHandle.SP_ID_CONFIRM_ORDER,bundle.getLong("id_confirm")); textView_asal.setText(bundle.getString("asal")); textView_tujuan.setText(bundle.getString("tujuan")); textView_date_going.setText(bundle.getString("tglgo")); textView_date_arive.setText(bundle.getString("tglarr")); textView_time_going.setText(bundle.getString("jamgo")); textView_time_arrive.setText(bundle.getString("jamarr")); textView_nama_penjual.setText(bundle.getString("namapenjual")); textView_harga.setText(bundle.getString("harga")); textView_kapasitas.setText(bundle.getString("kapasitas")); textView_barang_type.setText(bundle.getString("jenisbarang")); textView_by_asal_barang.setText(bundle.getString("asalBr")); textView_by_tujuan_barang.setText(bundle.getString("tujuanBr")); textView_by_nama_pengirim.setText(bundle.getString("pengirim")); textView_by_nama_penerima.setText(bundle.getString("penerima")); textView_by_jenis_barang.setText(bundle.getString("jenisBr")); textView_by_berat_kg.setText(bundle.getString("beratBr")); } } public void deleteItemBooking(){ } public void konfirmBooking(){ Bundle bundle = new Bundle(); //bundle.putLong("id_buyer", content.getIdBuyer()); bundle.putString("asal",textView_asal.getText().toString()); bundle.putString("tujuan",textView_tujuan.getText().toString()); bundle.putString("tglgo",textView_date_going.getText().toString()); bundle.putString("tglarr",textView_date_arive.getText().toString()); bundle.putString("jamgo", textView_time_going.getText().toString()); bundle.putString("jamarr",textView_time_arrive.getText().toString()); bundle.putString("namapenjual",textView_nama_penjual.getText().toString()); bundle.putString("kapasitas",textView_kapasitas.getText().toString()); bundle.putString("jenisbarang",textView_barang_type.getText().toString()); bundle.putString("harga", textView_harga.getText().toString()); bundle.putString("asalBr",textView_by_asal_barang.getText().toString()); bundle.putString("tujuanBr",textView_by_tujuan_barang.getText().toString()); bundle.putString("pengirim",textView_by_nama_pengirim.getText().toString()); bundle.putString("penerima",textView_by_nama_penerima.getText().toString()); bundle.putString("jenisBr", textView_by_jenis_barang.getText().toString()); bundle.putString("beratBr",textView_by_berat_kg.getText().toString()); Intent intent = new Intent(BookingDetailActivity.this, InputConfirmActivity.class); intent.putExtras(bundle); startActivity(intent); } }
[ "cindodcindy@gmail.com" ]
cindodcindy@gmail.com
e09988b185a063403ebe8795376c861186825afe
a7c85a1e89063038e17ed2fa0174edf14dc9ed56
/spring-aop-perf-tests/src/main/java/coas/perf/TargetClass100/Advice3.java
aa3012a2bae9c066f08d2c65e2465570ee5c541a
[]
no_license
pmaslankowski/java-contracts
28b1a3878f68fdd759d88b341c8831716533d682
46518bb9a83050956e631faa55fcdf426589830f
refs/heads/master
2021-03-07T13:15:28.120769
2020-09-07T20:06:31
2020-09-07T20:06:31
246,267,189
0
0
null
null
null
null
UTF-8
Java
false
false
734
java
package coas.perf.TargetClass100; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.springframework.stereotype.Component; import coas.perf.TargetClass100.Subject100; @Aspect @Component("Advice_100_3") public class Advice3 { private int counter = 0; @Around("execution(* Subject100.*(..))") public Object onTarget(ProceedingJoinPoint joinPoint) throws Throwable { int res = (int) joinPoint.proceed(); for (int i=0; i < 1000; i++) { if (res % 2 == 0) { res /= 2; } else { res = 2 * res + 1; } } return res; } }
[ "pmaslankowski@gmail.com" ]
pmaslankowski@gmail.com
3d7df32d50c10ea562c6825e464f20f0519232c1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_574e7707dd6ff7eb6cfbaf3703d31bdc06266d1e/GrenadeBehavior/26_574e7707dd6ff7eb6cfbaf3703d31bdc06266d1e_GrenadeBehavior_t.java
bb2a271ec4f4e7aa057b7dd815fab0cc18c5ce27
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
3,061
java
/* Copyright 2010 Ben Ruijl, Wouter Smeenk This file is part of Walled In. Walled In is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. Walled In 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 Walled In; see the file LICENSE. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ package walledin.game.entity.behaviors.logic; import walledin.engine.math.Matrix2f; import walledin.engine.math.Vector2f; import walledin.game.entity.AbstractBehavior; import walledin.game.entity.Attribute; import walledin.game.entity.Entity; import walledin.game.entity.Family; import walledin.game.entity.MessageType; public class GrenadeBehavior extends AbstractBehavior { /** * The number of particles created from the explosion. They will fly in * different directions. */ private static final int NUMBER_OFPARTICALS = 5; /** Explode time in seconds. */ private static final double EXPLODE_TIME = 2.0; private double time = 0; private final Vector2f particleTarget = new Vector2f(100.0f, 0); private final Vector2f particleAcc = new Vector2f(30000.0f, 0); public GrenadeBehavior(final Entity owner) { super(owner); } @Override public void onMessage(final MessageType messageType, final Object data) { } @Override public void onUpdate(final double delta) { time += delta; /* TODO: use shoot message? */ if (time > EXPLODE_TIME) { /* Explode! */ for (int i = 0; i < NUMBER_OFPARTICALS; i++) { final Entity foamBullet = getOwner().getEntityManager().create( Family.FOAMGUN_BULLET); foamBullet.setAttribute(Attribute.POSITION, getAttribute(Attribute.POSITION)); foamBullet.sendMessage(MessageType.APPLY_FORCE, new Matrix2f(-i * Math.PI / (NUMBER_OFPARTICALS - 1)) .apply(particleAcc)); foamBullet .setAttribute(Attribute.TARGET, ((Vector2f) foamBullet .getAttribute(Attribute.POSITION)) .add(new Matrix2f(-i * Math.PI / (NUMBER_OFPARTICALS - 1)) .apply(particleTarget))); foamBullet.setAttribute(Attribute.OWNED_BY, getAttribute(Attribute.OWNED_BY)); } getOwner().remove(); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
493e000ecfc1bc601e8b13b103e77ac72b908915
b71a12e46a2582b915346c6ca21f8c2948aeef13
/model/src/main/java/com/poomoo/model/response/RTypeBO.java
df45cf0a41d892a4f67338e8d8e45f7e07f24e4f
[]
no_license
poomoo/HomeOnLine
21295eb89f8d41ca3d3b8dc913c8dc9b0669b45b
483099470ff74dcb76cd09825a999c91e28b979c
refs/heads/master
2020-04-04T06:12:27.958470
2017-03-10T04:54:41
2017-03-10T04:54:41
49,559,977
0
1
null
null
null
null
UTF-8
Java
false
false
499
java
/** * Copyright (c) 2016. 李苜菲 Inc. All rights reserved. */ package com.poomoo.model.response; import java.util.List; /** * 类名 RTypeBO * 描述 首页分类 * 作者 李苜菲 * 日期 2016/8/2 15:46 */ public class RTypeBO { public String picUrl; public List<RCateBO> categotys; @Override public String toString() { return "RTypeBO{" + "picUrl='" + picUrl + '\'' + ", categotys=" + categotys + '}'; } }
[ "454592359@qq.com" ]
454592359@qq.com
6af866b95dc6e04548ae60c6cefcec3a680ade63
d0994997c7f6a3d6552220d8d396b9ff1fd5b715
/tophlc/src/main/java/com/toobei/common/view/listView/MyListView.java
042b493a9ed697fc5259d561f2694517597bbf72
[ "MIT" ]
permissive
liqimoon/xiubit-android
65ab6f1a56b9f89e86530401f07a8cf16c6c2efd
5723b5a8187a14909f605605b42fb3e7a8c3d768
refs/heads/master
2020-06-28T09:40:01.876486
2018-09-21T05:50:49
2018-09-21T05:50:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
771
java
package com.toobei.common.view.listView; import android.content.Context; import android.util.AttributeSet; import android.widget.ListView; /** * Created by Administrator on 2016/7/14 0014. */ public class MyListView extends ListView { public MyListView(Context context) { super(context); } public MyListView(Context context, AttributeSet attrs) { super(context, attrs); } public MyListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int i = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec, i); } }
[ "694208570@qq.com" ]
694208570@qq.com
a5371ca15cf10fa6cbf200e17240aff726a1d648
8534ea766585cfbd6986fd845e59a68877ecb15b
/com/google/android/gms/games/multiplayer/realtime/RoomEntityCreator.java
16b964b38f1e85549de4a09895587243e03ccbf2
[]
no_license
Shanzid01/NanoTouch
d7af94f2de686f76c2934b9777a92b9949b48e10
6d51a44ff8f719f36b880dd8d1112b31ba75bfb4
refs/heads/master
2020-04-26T17:39:53.196133
2019-03-04T10:23:51
2019-03-04T10:23:51
173,720,526
0
0
null
null
null
null
UTF-8
Java
false
false
3,276
java
package com.google.android.gms.games.multiplayer.realtime; import android.os.Bundle; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.safeparcel.zza; import com.google.android.gms.common.internal.safeparcel.zzb; import com.google.android.gms.games.multiplayer.ParticipantEntity; import java.util.ArrayList; public class RoomEntityCreator implements Creator<RoomEntity> { static void zza(RoomEntity roomEntity, Parcel parcel, int i) { int zzK = zzb.zzK(parcel); zzb.zza(parcel, 1, roomEntity.getRoomId(), false); zzb.zzc(parcel, 1000, roomEntity.getVersionCode()); zzb.zza(parcel, 2, roomEntity.getCreatorId(), false); zzb.zza(parcel, 3, roomEntity.getCreationTimestamp()); zzb.zzc(parcel, 4, roomEntity.getStatus()); zzb.zza(parcel, 5, roomEntity.getDescription(), false); zzb.zzc(parcel, 6, roomEntity.getVariant()); zzb.zza(parcel, 7, roomEntity.getAutoMatchCriteria(), false); zzb.zzc(parcel, 8, roomEntity.getParticipants(), false); zzb.zzc(parcel, 9, roomEntity.getAutoMatchWaitEstimateSeconds()); zzb.zzH(parcel, zzK); } public /* synthetic */ Object createFromParcel(Parcel parcel) { return zzdh(parcel); } public /* synthetic */ Object[] newArray(int i) { return zzeY(i); } public RoomEntity zzdh(Parcel parcel) { int i = 0; ArrayList arrayList = null; int zzJ = zza.zzJ(parcel); long j = 0; Bundle bundle = null; int i2 = 0; String str = null; int i3 = 0; String str2 = null; String str3 = null; int i4 = 0; while (parcel.dataPosition() < zzJ) { int zzI = zza.zzI(parcel); switch (zza.zzaP(zzI)) { case 1: str3 = zza.zzo(parcel, zzI); break; case 2: str2 = zza.zzo(parcel, zzI); break; case 3: j = zza.zzi(parcel, zzI); break; case 4: i3 = zza.zzg(parcel, zzI); break; case 5: str = zza.zzo(parcel, zzI); break; case 6: i2 = zza.zzg(parcel, zzI); break; case 7: bundle = zza.zzq(parcel, zzI); break; case 8: arrayList = zza.zzc(parcel, zzI, ParticipantEntity.CREATOR); break; case 9: i = zza.zzg(parcel, zzI); break; case 1000: i4 = zza.zzg(parcel, zzI); break; default: zza.zzb(parcel, zzI); break; } } if (parcel.dataPosition() == zzJ) { return new RoomEntity(i4, str3, str2, j, i3, str, i2, bundle, arrayList, i); } throw new zza.zza("Overread allowed size end=" + zzJ, parcel); } public RoomEntity[] zzeY(int i) { return new RoomEntity[i]; } }
[ "shanzid.shaiham@gmail.com" ]
shanzid.shaiham@gmail.com
cad7c0dcf21b060c51950145943339a9fe7a52e4
0e8f8831c0f3e4ade77af85f430460b7573bd3ea
/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/reporting/StopProblemReportRecord.java
5b83b4ec488cd2ea009177e0a5ad2da34370ea2d
[ "Apache-2.0" ]
permissive
tuure/onebusaway-application-modules
80bd04180c3f3fcd10d020f9a11c47dd0e71493b
4c4d1afb8239c1a5ab9b5aa2f0e00bcceef07a01
refs/heads/master
2020-12-30T18:50:38.233603
2012-06-20T11:06:19
2012-06-20T11:06:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,735
java
/** * Copyright (C) 2011 Brian Ferris <bdferris@onebusaway.org> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.onebusaway.transit_data_federation.impl.reporting; import java.io.Serializable; import javax.persistence.AttributeOverride; import javax.persistence.AttributeOverrides; import javax.persistence.Column; import javax.persistence.Embedded; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import org.hibernate.annotations.Parameter; import org.hibernate.annotations.Type; import org.onebusaway.gtfs.model.AgencyAndId; import org.onebusaway.transit_data.model.problems.EProblemReportStatus; @Entity @Table(name = "oba_stop_problem_reports") public class StopProblemReportRecord implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue private long id; private long time; @Embedded @AttributeOverrides({ @AttributeOverride(name = "agencyId", column = @Column(name = "stopId_agencyId", length = 50)), @AttributeOverride(name = "id", column = @Column(name = "stopId_id"))}) private AgencyAndId stopId; private String data; private String userComment; @Column(nullable = true) private Double userLat; @Column(nullable = true) private Double userLon; @Column(nullable = true) private Double userLocationAccuracy; /** * Custom Hibernate mapping so that the vehicle phase enum gets mapped to a * string as opposed to an integer, allowing for safe expansion of the enum in * the future and more legibility in the raw SQL. Additionally, the phase * string can be a little shorter than the default length. */ @Type(type = "org.onebusaway.container.hibernate.EnumUserType", parameters = {@Parameter(name = "enumClassName", value = "org.onebusaway.transit_data.model.problems.EProblemReportStatus")}) @Column(length = 25) private EProblemReportStatus status; public long getId() { return id; } public void setId(long id) { this.id = id; } public long getTime() { return time; } public void setTime(long time) { this.time = time; } public AgencyAndId getStopId() { return stopId; } public void setStopId(AgencyAndId stopId) { this.stopId = stopId; } public String getData() { return data; } public void setData(String data) { this.data = data; } public String getUserComment() { return userComment; } public void setUserComment(String userComment) { this.userComment = userComment; } public Double getUserLat() { return userLat; } public void setUserLat(Double userLat) { this.userLat = userLat; } public Double getUserLon() { return userLon; } public void setUserLon(Double userLon) { this.userLon = userLon; } public Double getUserLocationAccuracy() { return userLocationAccuracy; } public void setUserLocationAccuracy(Double userLocationAccuracy) { this.userLocationAccuracy = userLocationAccuracy; } public EProblemReportStatus getStatus() { return status; } public void setStatus(EProblemReportStatus status) { this.status = status; } }
[ "bdferris@google.com" ]
bdferris@google.com
197f3b4c6ffa45c2581c0e75d2d4e113a4033ce0
b7e2001c5656cc601938b8148069aa45aae2be8d
/iCAide/src/main/java/com/deya/hospital/adapter/DepartDialogListAdapter.java
ee8815ccd46f59ea897c1feba362f4f8b8229d2b
[]
no_license
xiongzhuo/Nursing
f260cec3b2b4c46d395a4cc93040358bd7c2cc38
25e6c76ccd69836407dcc6b59ca2daa41a3c9459
refs/heads/master
2021-01-18T08:10:21.098781
2017-08-15T08:56:59
2017-08-15T08:57:23
100,354,682
0
0
null
null
null
null
UTF-8
Java
false
false
1,949
java
package com.deya.hospital.adapter; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.TextView; import com.deya.acaide.R; import com.deya.hospital.vo.DepartLevelsVo; import java.util.ArrayList; import java.util.List; public class DepartDialogListAdapter extends BaseAdapter { List<DepartLevelsVo> list = new ArrayList<DepartLevelsVo>(); private LayoutInflater inflater; Context context; public DepartDialogListAdapter(Context context, List<DepartLevelsVo> list) { inflater = LayoutInflater.from(context); this.context = context; this.list = list; } @Override public int getCount() { return list.size(); } @Override public Object getItem(int position) { return null; } @Override public long getItemId(int position) { return 0; } private int checkPosition = -1; public void setIsCheck(int position) { checkPosition = position; notifyDataSetChanged(); } public void setData(List<DepartLevelsVo> list){ this.list=list; notifyDataSetInvalidated(); } @Override public View getView(int position, View convertView, ViewGroup parent) { ViewHolder viewHolder = null; if (null == convertView) { viewHolder=new ViewHolder(); convertView = inflater.inflate(R.layout.list_item, null); viewHolder.listtext = (TextView) convertView .findViewById(R.id.listtext); viewHolder.bottm_view=convertView.findViewById(R.id.bottm_view); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } viewHolder.listtext.setText(list.get(position).getRoot().getName()); if (position==list.size()-1) { viewHolder.bottm_view.setVisibility(View.GONE); }else { viewHolder.bottm_view.setVisibility(View.VISIBLE); } return convertView; } public class ViewHolder { TextView listtext,numsTv; View bottm_view; } }
[ "15388953585@163.com" ]
15388953585@163.com
af5338cb7fb4a6c4451f892818eb41fc37c02e0f
d60d72dc8afce46eb5125027d536bab8d43367e3
/module/CMSJava-core/src/shu/cms/gma/gbp/CIECAM02Vendor.java
8995c9d5f4b6d4b2c48fd69f552c25b252ee3db5
[]
no_license
enessssimsek/cmsjava
556cd61f4cab3d1a31f722138d7a6a488c055eeb
59988c118159ba49496167b41cd0cfa9ea2e3c74
refs/heads/master
2023-03-18T12:35:16.160707
2018-10-29T08:22:16
2018-10-29T08:22:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,434
java
package shu.cms.gma.gbp; import shu.cms.colorspace.independ.*; import shu.cms.hvs.cam.ciecam02.*; import shu.cms.hvs.cam.ciecam02.ViewingConditions; import shu.cms.profile.*; /** * <p>Title: Colour Management System</p> * * <p>Description: a Colour Management System by Java</p> * * <p>Copyright: Copyright (c) 2009</p> * * <p>Company: skygroup</p> * * @author not attributable * @version 1.0 */ public class CIECAM02Vendor extends LChVendor { public CIECAM02Vendor(ProfileColorSpace pcs, ViewingConditions vc) { this(pcs, new CIECAM02(vc)); } public CIECAM02Vendor(ProfileColorSpace pcs, CIECAM02 cam02) { super(pcs); this.cam02 = cam02; // cam02.getViewingConditions().get this.white = (CIEXYZ) cam02.getViewingConditions().white.clone(); this.white.normalizeY(); } private CIEXYZ white; private CIECAM02 cam02; public double[] getLChValues(double[] rgbValues) { //先從pcs撈出d50 (or d65?) 的data //轉進cam, 得到JCh //XYZ的data應該對齊cam的白點吧! double[] XYZValues = pcs.toCIEXYZValues(rgbValues); CIEXYZ XYZ = new CIEXYZ(XYZValues, white); XYZ.normalizeWhite(); CIECAM02Color JCh = cam02.forward(XYZ); double[] JChValues = JCh.getJChValues(); return JChValues; } public double[] getLChValues(double[] rgbValues, CIEXYZ referenceWhite) { return getLChValues(rgbValues); } }
[ "skyforce@gmail.com" ]
skyforce@gmail.com
cfa69ac3ff6b4eee38cdd799e001ae25564abce4
a7717cb09e0a7c89a3409d01a58f62c2c41997e8
/src/main/java/zebra/example/common/schedule/ZebraBoardArticleCreationJob.java
030156ea8fabbf2813131b4d36cb110ace38b285
[]
no_license
sawhsong/alpaca
999989c2a06f8923cceb5f6c0432863b725a3e3d
783057130c19163b6b5eb2e901161155aefe10ba
refs/heads/master
2023-08-07T02:38:24.106460
2023-07-30T22:53:27
2023-07-30T22:53:27
143,237,867
0
0
null
null
null
null
UTF-8
Java
false
false
4,730
java
package zebra.example.common.schedule; import java.util.Iterator; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.quartz.JobDataMap; import org.quartz.JobDetail; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import org.springframework.scheduling.quartz.QuartzJobBean; import zebra.example.common.module.commoncode.ZebraCommonCodeManager; import zebra.example.common.module.key.ZebraKeyManager; import zebra.example.conf.resource.ormapper.dao.ZebraBoard.ZebraBoardDao; import zebra.example.conf.resource.ormapper.dto.oracle.ZebraBoard; import zebra.util.CommonUtil; import zebra.util.ConfigUtil; public class ZebraBoardArticleCreationJob extends QuartzJobBean { private Logger logger = LogManager.getLogger(getClass()); private ZebraBoardDao zebraBoardDao; public void setZebraBoardDao(ZebraBoardDao zebraBoardDao) { this.zebraBoardDao = zebraBoardDao; } @Override protected void executeInternal(JobExecutionContext context) throws JobExecutionException { addBoard(context); } @SuppressWarnings("rawtypes") private void addBoard(JobExecutionContext context) { String uid = CommonUtil.uid(); String contents = ""; try { ZebraBoard zebraBoard = new ZebraBoard(); logger.debug("ZebraBoardArticleCreationJob Begin : "+CommonUtil.getSysdate("yyyy-MM-dd HH:mm:ss")); zebraBoard.setArticleId(ZebraKeyManager.getId("ZEBRA_BOARD_S")); if (CommonUtil.toInt(CommonUtil.substring(uid, 0, 3)) % 2 == 0) { zebraBoard.setBoardType(ZebraCommonCodeManager.getCodeByConstants("BOARD_TYPE_NOTICE")); contents += "ZebraBoardArticleCreationJob System generated article - "+CommonUtil.getSysdate("yyyy-MM-dd HH:mm:ss")+" - "+uid+"\n\n"; contents += "context.getFireInstanceId() : "+context.getFireInstanceId()+"\n"; contents += "context.getJobRunTime() : "+CommonUtil.toString(context.getJobRunTime()/1000, "#,##0.00")+"\n"; contents += "context.getRefireCount() : "+context.getRefireCount()+"\n"; contents += "context.getFireTime() : "+CommonUtil.toString(context.getFireTime(), ConfigUtil.getProperty("format.dateTime.java"))+"\n"; contents += "context.getPreviousFireTime() : "+CommonUtil.toString(context.getPreviousFireTime(), ConfigUtil.getProperty("format.dateTime.java"))+"\n"; contents += "context.getNextFireTime() : "+CommonUtil.toString(context.getNextFireTime(), ConfigUtil.getProperty("format.dateTime.java"))+"\n\n"; contents += "System Generated UID : "+uid+"\n"; } else { JobDetail jobDetail = context.getJobDetail(); JobDataMap jobDataMap = jobDetail.getJobDataMap(); zebraBoard.setBoardType(ZebraCommonCodeManager.getCodeByConstants("BOARD_TYPE_FREE")); contents += "ZebraBoardArticleCreationJob System generated article - "+CommonUtil.getSysdate("yyyy-MM-dd HH:mm:ss")+" - "+uid+"</br></br>"; contents += "context.getFireInstanceId() : "+context.getFireInstanceId()+"</br>"; contents += "context.getJobRunTime() : "+CommonUtil.toString(context.getJobRunTime()/1000, "#,##0.00")+"</br>"; contents += "context.getRefireCount() : "+context.getRefireCount()+"</br>"; contents += "context.getFireTime() : "+CommonUtil.toString(context.getFireTime(), ConfigUtil.getProperty("format.dateTime.java"))+"</br>"; contents += "context.getPreviousFireTime() : "+CommonUtil.toString(context.getPreviousFireTime(), ConfigUtil.getProperty("format.dateTime.java"))+"</br>"; contents += "context.getNextFireTime() : "+CommonUtil.toString(context.getNextFireTime(), ConfigUtil.getProperty("format.dateTime.java"))+"</br></br>"; contents += "jobDetail.getDescription() : "+jobDetail.getDescription()+"</br></br>"; contents += "System Generated UID : "+uid+"</br></br>"; for (Iterator keys = jobDataMap.keySet().iterator(); keys.hasNext();) { String key = (String)keys.next(); contents += "jobDataMap("+key+") : "+jobDataMap.get(key)+"</br>"; } } zebraBoard.setWriterId("0"); zebraBoard.setWriterName("ZebraBoardArticleCreationJob"); zebraBoard.setWriterEmail(ConfigUtil.getProperty("mail.default.from")); zebraBoard.setWriterIpAddress("127.0.0.1"); zebraBoard.setArticleSubject("ZebraBoardArticleCreationJob System generated article - "+CommonUtil.getSysdate("yyyy-MM-dd HH:mm:ss")+" - "+uid); zebraBoard.setArticleContents(contents); zebraBoard.setInsertUserId("0"); zebraBoard.setInsertDate(CommonUtil.toDate(CommonUtil.getSysdate())); zebraBoard.setRefArticleId("-1"); zebraBoardDao.insert(zebraBoard); logger.debug("ZebraBoardArticleCreationJob End : "+CommonUtil.getSysdate("yyyy-MM-dd HH:mm:ss")); } catch (Exception ex) { ex.printStackTrace(); logger.error(ex); } } }
[ "sawhsong@gmail.com" ]
sawhsong@gmail.com
781901d7fff37fadd1d3387c42f112e713ac802a
8d55350b6ad5781de2d0a83a52fb76aa83e4b2fd
/broheim-websocket-core/src/main/java/com/broheim/websocket/core/message/SimpleMessage.java
143da15fd90c2a8759d20d631fdf68e07c0a9c71
[]
no_license
boyalearn/broheim
af2b77cc27b3c4f2a5c2af1417f036998c811677
ad32a19ae535a6c9545584f81038e85c09cb7e3d
refs/heads/master
2023-05-02T20:58:35.089288
2021-04-23T03:02:51
2021-04-23T03:02:51
357,521,319
3
0
null
null
null
null
UTF-8
Java
false
false
238
java
package com.broheim.websocket.core.message; import lombok.Getter; import lombok.Setter; @Setter @Getter public class SimpleMessage implements Message { private Integer serialNo; private String cmd; private String body; }
[ "2114517411@qq.com" ]
2114517411@qq.com
550a34e08d3d5245777be965a62e63f0ca336f41
c8cd781b0ccf27363e17fe30d1ed6933258030f2
/simpleplayer/src/main/java/com/example/simpleplayer/player/icMediaPlayer.java
2baf626449d08724a6109544a75b32a3b8991eda
[]
no_license
krctech9999/AmlogicPlayer
d47efaf6062c5b01cf568ccb835f704d68a1dcd8
d4205ecffcbb8d6d42c5606e2517a73fa9a5b52e
refs/heads/master
2020-09-20T20:07:11.124488
2019-11-29T03:38:22
2019-11-29T03:38:22
224,579,445
0
0
null
null
null
null
UTF-8
Java
false
false
5,398
java
/* * Copyright (C) 2013-2014 Zhang Rui <bbcallen@gmail.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.amlogicplayer.player; import java.io.IOException; import java.util.Map; import android.annotation.TargetApi; import android.content.Context; import android.net.Uri; import android.os.Build; import android.view.Surface; import android.view.SurfaceHolder; public interface icMediaPlayer { /* * Do not change these values without updating their counterparts in native */ public static final int MEDIA_INFO_UNKNOWN = 1; public static final int MEDIA_INFO_STARTED_AS_NEXT = 2; public static final int MEDIA_INFO_VIDEO_RENDERING_START = 3; public static final int MEDIA_INFO_VIDEO_TRACK_LAGGING = 700; public static final int MEDIA_INFO_BUFFERING_START = 701; public static final int MEDIA_INFO_BUFFERING_END = 702; public static final int MEDIA_INFO_BAD_INTERLEAVING = 800; public static final int MEDIA_INFO_NOT_SEEKABLE = 801; public static final int MEDIA_INFO_METADATA_UPDATE = 802; public static final int MEDIA_INFO_TIMED_TEXT_ERROR = 900; public static final int MEDIA_ERROR_UNKNOWN = 1; public static final int MEDIA_ERROR_SERVER_DIED = 100; public static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 200; public static final int MEDIA_ERROR_IO = -1004; public static final int MEDIA_ERROR_MALFORMED = -1007; public static final int MEDIA_ERROR_UNSUPPORTED = -1010; public static final int MEDIA_ERROR_TIMED_OUT = -110; public abstract void setDisplay(SurfaceHolder sh); public abstract void setDataSource(Context context, Uri uri) throws IOException, IllegalArgumentException, SecurityException, IllegalStateException; public abstract void setDataSource(Context context, Uri uri, Map<String, String> header) throws IOException, IllegalArgumentException, SecurityException, IllegalStateException; public abstract void prepareAsync() throws IllegalStateException; public abstract void start() throws IllegalStateException; public abstract void stop() throws IllegalStateException; public abstract void pause() throws IllegalStateException; public abstract void setScreenOnWhilePlaying(boolean screenOn); public abstract int getVideoWidth(); public abstract int getVideoHeight(); public abstract boolean isPlaying(); public abstract void seekTo(long msec) throws IllegalStateException; public abstract long getCurrentPosition(); public abstract long getDuration(); public abstract void release(); public abstract void reset(); public abstract void setVolume(float leftVolume, float rightVolume); public abstract void setLogEnabled(boolean enable); public abstract boolean isPlayable(); public abstract void setOnPreparedListener(OnPreparedListener listener); public abstract void setOnCompletionListener(OnCompletionListener listener); public abstract void setOnBufferingUpdateListener( OnBufferingUpdateListener listener); public abstract void setOnSeekCompleteListener( OnSeekCompleteListener listener); public abstract void setOnVideoSizeChangedListener( OnVideoSizeChangedListener listener); public abstract void setOnErrorListener(OnErrorListener listener); public abstract void setOnInfoListener(OnInfoListener listener); /*-------------------- * Listeners */ public static interface OnPreparedListener { public void onPrepared(icMediaPlayer mp); } public static interface OnCompletionListener { public void onCompletion(icMediaPlayer mp); } public static interface OnBufferingUpdateListener { public void onBufferingUpdate(icMediaPlayer mp, int percent); } public static interface OnSeekCompleteListener { public void onSeekComplete(icMediaPlayer mp); } public static interface OnVideoSizeChangedListener { public void onVideoSizeChanged(icMediaPlayer mp, int width, int height, int sar_num, int sar_den); } public static interface OnErrorListener { public boolean onError(icMediaPlayer mp, int what, int extra); } public static interface OnInfoListener { public boolean onInfo(icMediaPlayer mp, int what, int extra); } /*-------------------- * Optional */ public abstract void setAudioStreamType(int streamtype); public abstract void setKeepInBackground(boolean keepInBackground); public abstract int getVideoSarNum(); public abstract int getVideoSarDen(); @Deprecated public abstract void setWakeMode(Context context, int mode); @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public abstract void setSurface(Surface surface); }
[ "chevylin0802@gmail.com" ]
chevylin0802@gmail.com
cd3782be8240e266c2429243d15c0b57b5f61f6b
17e3684165cf1c2596b7103fa7820180254e9236
/lambda-behave/src/test/java/com/insightfullogic/lambdabehave/example/ExpectationSpec.java
3f5b790b510e1dd05eebecb886c51750c4229d98
[ "MIT" ]
permissive
neomatrix369/lambda-behave
aa2e7b2ac7d96ca866bc02e72c0322c4d4a9cbf8
cc8b44e99021a14aab21cf28156f4515fc0c4f55
refs/heads/master
2021-11-28T12:53:37.442195
2018-06-17T12:39:22
2018-06-17T12:39:22
21,961,094
0
0
MIT
2020-10-13T23:41:45
2014-07-17T23:26:27
Java
UTF-8
Java
false
false
3,264
java
package com.insightfullogic.lambdabehave.example; import com.insightfullogic.lambdabehave.JunitSuiteRunner; import org.junit.runner.RunWith; import java.util.Arrays; import java.util.List; import static com.insightfullogic.lambdabehave.Suite.describe; /** * This example specification is designed more as a way of testing out the API and * showing that it is readable and usable than actually testing out the matcher API. */ @RunWith(JunitSuiteRunner.class) public class ExpectationSpec {{ describe("the different forms of expectation", it -> { it.should("support basic expectations over values", expect -> { House greenGables = new House("Green Gables", "Anne", true); List<House> houses = Arrays.asList(greenGables); Object nothing = null; expect.that(greenGables) .instanceOf(House.class) .is(greenGables) .isEqualTo(greenGables) .isIn(houses) .isIn(greenGables) .isNotNull() .sameInstance(greenGables) .and(nothing).toBeNull(); }); it.should("allow you write expectations about different collection values", expect -> { House greenGables = new House("Green Gables", "Anne", true); House kensingtonPalace = new House("Kensington Palace", "The Royal Family", false); House nothing = null; List<House> houses = Arrays.asList(greenGables, kensingtonPalace, nothing); expect.that(houses) .hasItem(greenGables) .contains(greenGables, kensingtonPalace, nothing) .containsInAnyOrder(nothing, kensingtonPalace, greenGables) .hasItems(kensingtonPalace, greenGables) .hasSize(3) .isNotNull() .sameInstance(houses) .never() .toBeNull(); }); it.should("support expectations about different string values", expect -> { String str = "The quick brown fox jumps over the lazy dog"; expect.that(str) .containsString("quick brown") .equalToIgnoringCase("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG") .endsWith("lazy dog") .startsWith("The quick") .is(str); }); it.should("support expectations about different array values", expect -> { final String[] strs = { "The quick brown", "fox jumps over", "the lazy dog" }; expect.that(strs) .isArrayWithSize(3) .isArrayWithItem("the lazy dog") .is(strs); }); }); }} class House { private final String name; private final String owner; private final boolean isFictional; House(String name, String owner, boolean isFictional) { this.name = name; this.owner = owner; this.isFictional = isFictional; } public String getName() { return name; } public String getOwner() { return owner; } public boolean isFictional() { return isFictional; } }
[ "richard.warburton@gmail.com" ]
richard.warburton@gmail.com
b3ab61d0fc15de8a48048999813d75ff50ae2274
095b0f77ffdad9d735710c883d5dafd9b30f8379
/src/com/google/android/gms/games/multiplayer/realtime/RoomEntity.java
fafd97001003454ff189bc7f0870b4cac676a450
[]
no_license
wubainian/smali_to_java
d49f9b1b9b5ae3b41e350cc17c84045bdc843cde
47cfc88bbe435a5289fb71a26d7b730db8366373
refs/heads/master
2021-01-10T01:52:44.648391
2016-03-10T12:10:09
2016-03-10T12:10:09
53,547,707
1
0
null
null
null
null
UTF-8
Java
false
false
1,963
java
package com.google.android.gms.games.multiplayer.realtime import android.os.Parcelable$Creator; import android.os.Bundle; import java.util.ArrayList; import android.os.Parcel; public final class RoomEntity extends com.google.android.gms.internal.av implements com.google.android.gms.games.multiplayer.realtime.Room{ //instance field private final int a; private final String b; private final String c; private final long d; private final int e; private final String f; private final int g; private final Bundle h; private final ArrayList i; private final int j; //static field public static final Parcelable$Creator CREATOR; //clinit method static{ } //init method RoomEntity(int aint0, String aString0, String aString0, long along0, int aint0, String aString0, int aint0, Bundle aBundle0, ArrayList aArrayList0, int aint0){ } public RoomEntity(com.google.android.gms.games.multiplayer.realtime.Room aRoom0){ } //ordinary method static int a(com.google.android.gms.games.multiplayer.realtime.Room aRoom0){ } static boolean a(com.google.android.gms.games.multiplayer.realtime.Room aRoom0, Object aObject0){ } static synthetic boolean a(Integer aInteger0){ } static synthetic boolean a(String aString0){ } static String b(com.google.android.gms.games.multiplayer.realtime.Room aRoom0){ } static synthetic Integer m(){ } public synthetic Object a(){ } public String b(){ } public String c(){ } public long d(){ } public int describeContents(){ } public int e(){ } public boolean equals(Object aObject0){ } public String f(){ } public int g(){ } public Bundle h(){ } public int hashCode(){ } public ArrayList i(){ } public int j(){ } public int k(){ } public com.google.android.gms.games.multiplayer.realtime.Room l(){ } public String toString(){ } public void writeToParcel(Parcel aParcel0, int aint0){ } }
[ "guoliang@tigerjoys.com" ]
guoliang@tigerjoys.com
1c3ccab16fa655a5b4355fec9f1a37d5c9ff8be0
4c01db9b8deeb40988d88f9a74b01ee99d41b176
/easymallTest/ht/src/main/java/cn/gao/ht/pojo/Module.java
194cc966148cf6d5e5ac4367e9d8908c12b5c81a
[]
no_license
GGPay/-
76743bf63d059cbf34c058b55edfdb6a58a41f71
20b584467142c6033ff92549fd77297da8ae6bfc
refs/heads/master
2020-04-29T10:24:29.949835
2018-04-07T04:34:19
2018-04-07T04:34:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,882
java
package cn.gao.ht.pojo; /** * Created by tarena on 2016/10/17. */ public class Module extends BaseEntity { private Module parent;//父级模块 private Integer ctype;//类型 1 主菜单 2 操作页面 3 按钮 private Integer state;// 状态 private Integer orderNo; //排序号 private String remark;//备注 private String name;//模块名称 private String moduleId;//模块id private String pId;//ztree 的父级节点 private boolean checked;//角色是否拥有该权限 有为true 没有为false public boolean isChecked() { return checked; } public void setChecked(boolean checked) { this.checked = checked; } public String getId(){ return moduleId; } public String getpId() { return pId; } public void setpId(String pId) { this.pId = pId; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getCtype() { return ctype; } public void setCtype(Integer ctype) { this.ctype = ctype; } public Module getParent() { return parent; } public void setParent(Module parent) { this.parent = parent; } public String getModuleId() { return moduleId; } public void setModuleId(String moduleId) { this.moduleId = moduleId; } public Integer getOrderNo() { return orderNo; } public void setOrderNo(Integer orderNo) { this.orderNo = orderNo; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public Integer getState() { return state; } public void setState(Integer state) { this.state = state; } }
[ "pinggaimuir@sina.com" ]
pinggaimuir@sina.com
6be989e6e84dc6ec249f187fc5fb606593ecf3a4
23ff493b8800c3c43bb37303c7c7886bef34ba82
/src/hpu/zyf/service/ProductService.java
1d86bc82a9c29193f9ca027d9133f6e02ac0d182
[]
no_license
hpulzl/snackShop
223c381fd368ba207c4e7ea7f9cf56e2476974ff
74566253173b4abba569bfb44c5492a9254a473f
refs/heads/master
2021-01-01T05:29:03.445658
2017-04-13T06:53:34
2017-04-13T06:53:34
59,088,502
1
0
null
null
null
null
GB18030
Java
false
false
835
java
package hpu.zyf.service; import hpu.zyf.entity.ProductType; import hpu.zyf.entity.Productdetail; import java.util.List; /** * 商品信息的接口 * 商品的添加、删除、修改、查询()等 * @author admin * */ public interface ProductService { public boolean inserProduct(Productdetail pd)throws Exception; public boolean updateProduct(Productdetail pd)throws Exception; public boolean deleteProduct(String pdid)throws Exception; public Productdetail selectByPdid(String pdid)throws Exception; //通过条件进行分页查询,只需要传入页码,每页显示的数据时固定的。 public List<Productdetail> selectByPdExample(String example,int pageNo)throws Exception; //总共的页数 public int pageTotal(String example)throws Exception; public List<ProductType> selectAllType()throws Exception; }
[ "824337531@qq.com" ]
824337531@qq.com
8e5e4ac99252e57da31738eef7b6be65dd0d1f38
5d10b0b0b995823362d0cb40b16615d8a8c7a456
/src/main/java/com/ldbc/driver/dshini/db/neo4j/emdedded/handlers/index/IndexQueryNodeOnOfferIndexOperationHandler.java
348835a53d4844463f989c1ff562bc1d395f8829
[]
no_license
alexaverbuch/ldbc_bench-log_gen
c17eed3658e605fce3c2ac829496a76067a021de
7cc62f088cfeed334e7d564da7be83662f86af78
refs/heads/master
2021-01-02T22:51:25.194211
2013-08-22T17:45:41
2013-08-22T17:45:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,443
java
package com.ldbc.driver.dshini.db.neo4j.emdedded.handlers.index; import java.util.Iterator; import org.neo4j.graphdb.Node; import org.neo4j.graphdb.Transaction; import org.neo4j.helpers.collection.IteratorUtil; import com.ldbc.driver.OperationHandler; import com.ldbc.driver.OperationResult; import com.ldbc.driver.dshini.db.neo4j.emdedded.Neo4jConnectionStateEmbedded; import com.ldbc.driver.dshini.operations.index.IndexQueryNodeOnOfferIndexOperationFactory.IndexQueryNodeOnOfferIndexOperation; public class IndexQueryNodeOnOfferIndexOperationHandler extends OperationHandler<IndexQueryNodeOnOfferIndexOperation> { @Override protected OperationResult executeOperation( IndexQueryNodeOnOfferIndexOperation operation ) { int resultCode; int result; Neo4jConnectionStateEmbedded connection = (Neo4jConnectionStateEmbedded) getDbConnectionState(); Transaction tx = connection.getDb().beginTx(); try { Iterator<Node> nodes = connection.getDb().index().forNodes( operation.getIndexName() ).query( operation.getIndexQuery() ); resultCode = 0; result = IteratorUtil.count( nodes ); } catch ( Exception e ) { resultCode = -1; result = 0; } finally { tx.finish(); } return operation.buildResult( resultCode, result ); } }
[ "alex.averbuch@gmail.com" ]
alex.averbuch@gmail.com
2f6b9320f245259717757d6c520127b97834d00c
369270a14e669687b5b506b35895ef385dad11ab
/jdk.internal.vm.compiler/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/graph/InferStamps.java
f91c94abbbf0b2d61d3a62fb50442c1b945e6426
[]
no_license
zcc888/Java9Source
39254262bd6751203c2002d9fc020da533f78731
7776908d8053678b0b987101a50d68995c65b431
refs/heads/master
2021-09-10T05:49:56.469417
2018-03-20T06:26:03
2018-03-20T06:26:03
125,970,208
3
3
null
null
null
null
UTF-8
Java
false
false
3,588
java
/* * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * */ package org.graalvm.compiler.phases.graph; import org.graalvm.compiler.core.common.type.ObjectStamp; import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.ValueNode; import org.graalvm.compiler.nodes.ValuePhiNode; public class InferStamps { /** * Infer the stamps for all Object nodes in the graph, to make the stamps as precise as * possible. For example, this propagates the word-type through phi functions. To handle phi * functions at loop headers, the stamp inference is called until a fix point is reached. * <p> * This method can be used when it is needed that stamps are inferred before the first run of * the canonicalizer. For example, word type rewriting must run before the first run of the * canonicalizer because many nodes are not prepared to see the word type during * canonicalization. */ public static void inferStamps(StructuredGraph graph) { /* * We want to make the stamps more precise. For cyclic phi functions, this means we have to * ignore the initial stamp because the imprecise stamp would always propagate around the * cycle. We therefore set the stamp to an illegal stamp, which is automatically ignored * when the phi function performs the "meet" operator on its input stamps. */ for (Node n : graph.getNodes()) { if (n instanceof ValuePhiNode) { ValueNode node = (ValueNode) n; if (node.stamp() instanceof ObjectStamp) { assert node.stamp().hasValues() : "We assume all Phi and Proxy stamps are legal before the analysis"; node.setStamp(node.stamp().empty()); } } } boolean stampChanged; // The algorithm is not guaranteed to reach a stable state. int z = 0; do { stampChanged = false; /* * We could use GraphOrder.forwardGraph() to process the nodes in a defined order and * propagate long def-use chains in fewer iterations. However, measurements showed that * we have few iterations anyway, and the overhead of computing the order is much higher * than the benefit. */ for (Node n : graph.getNodes()) { if (n instanceof ValueNode) { ValueNode node = (ValueNode) n; if (node.stamp() instanceof ObjectStamp) { stampChanged |= node.inferStamp(); } } } ++z; } while (stampChanged && z < 10000); /* * Check that all the illegal stamps we introduced above are correctly replaced with real * stamps again. */ assert checkNoEmptyStamp(graph); } private static boolean checkNoEmptyStamp(StructuredGraph graph) { for (Node n : graph.getNodes()) { if (n instanceof ValuePhiNode) { ValueNode node = (ValueNode) n; assert node.stamp().hasValues() : "Stamp is empty after analysis. This is not necessarily an error, but a condition that we want to investigate (and then maybe relax or remove the assertion)."; } } return true; } }
[ "841617433@qq.com" ]
841617433@qq.com
d4ae9f17f34aaa3bdf1094823819f52d797f7053
1818a376a14cfad3eb7c6b692e573ab4576ba056
/dddlib-domain/src/main/java/org/dayatang/domain/EntityRepository.java
4fdfa6451eccd41ac780565f4ed269c1bc60b770
[ "Apache-2.0" ]
permissive
XinxiJiang/dddlib
476cd655bc8d19671f027f2a37bca8654d6d5af4
b244de70326aaecfbbbaebc5de2a9c0e8c89f565
refs/heads/master
2023-08-28T12:16:04.675805
2021-11-16T04:07:35
2021-11-16T04:07:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,808
java
package org.dayatang.domain; import java.io.Serializable; import java.util.List; /** * 仓储访问接口。用于存取和查询数据库中的各种类型的实体。 * * @author yyang (<a href="mailto:gdyangyu@gmail.com">gdyangyu@gmail.com</a>) * */ public interface EntityRepository { /** * 将实体(无论是新的还是修改了的)保存到仓储中。 * * @param <T> 实体的类型 * @param entity 要存储的实体实例。 * @return 持久化后的当前实体 */ <T extends Entity> T save(T entity); /** * 将实体从仓储中删除。如果仓储中不存在此实例将抛出EntityNotExistedException异常。 * * @param entity 要删除的实体实例。 */ void remove(Entity entity); /** * 判断仓储中是否存在指定ID的实体实例。 * * @param <T> 实体类型 * @param clazz 实体的类 * @param id 实体标识 * @return 如果实体实例存在,返回true,否则返回false */ <T extends Entity> boolean exists(Class<T> clazz, Serializable id); /** * 从仓储中获取指定类型、指定ID的实体 * * @param <T> 实体类型 * @param clazz 实体的类 * @param id 实体标识 * @return 一个实体实例。 */ <T extends Entity> T get(Class<T> clazz, Serializable id); /** * 从仓储中装载指定类型、指定ID的实体 * * @param <T> 实体类型 * @param clazz 实体的类 * @param id 实体标识 * @return 一个实体实例。 */ <T extends Entity> T load(Class<T> clazz, Serializable id); /** * 从仓储中获取entity参数所代表的未修改的实体 * * @param <T> 实体类型 * @param clazz 实体的类 * @param entity 要查询的实体 * @return 参数entity在仓储中的未修改版本 */ <T extends Entity> T getUnmodified(Class<T> clazz, T entity); /** * 根据业务主键从仓储中获取指定类型的实体 * * @param <T> 实体类型 * @param clazz 实体的类 * @param keyValues 代表业务主键值的命名参数。key为主键属性名,value为主键属性值 * @return 一个实体实例。 */ <T extends Entity> T getByBusinessKeys(Class<T> clazz, NamedParameters keyValues); /** * 查找指定类型的所有实体 * * @param <T> 实体类型 * @param clazz 实体的类 * @return 符合条件的实体集合 */ <T extends Entity> List<T> findAll(Class<T> clazz); /** * 创建条件查询 * * @param entityClass 要查询的实体类 * @param <T> 实体的类型 * @return 一个条件查询 */ <T extends Entity> CriteriaQuery createCriteriaQuery(Class<T> entityClass); /** * 执行条件查询,返回符合条件的实体列表 * * @param criteriaQuery 要执行的条件查询 * @param <T> 返回结果元素类型 * @return 符合查询条件的实体列表 */ <T> List<T> find(CriteriaQuery criteriaQuery); /** * 执行条件查询,返回符合条件的单个实体 * * @param criteriaQuery 要执行的条件查询 * @param <T> 返回结果类型 * @return 符合查询条件的单个结果 */ <T> T getSingleResult(CriteriaQuery criteriaQuery); /** * 根据指定的条件执行条件查询,返回符合条件的实体列表 * * @param entityClass 查询的目标实体类 * @param criterion 查询条件 * @param <T> 返回结果元素类型 * @return 符合查询条件的实体列表 */ <T extends Entity> List<T> find(Class<T> entityClass, QueryCriterion criterion); /** * 根据指定的条件执行条件查询,返回符合条件的单个实体 * * @param entityClass 查询的目标实体类 * @param criterion 查询条件 * @param <T> 返回结果类型 * @return 符合查询条件的单个结果 */ <T extends Entity> T getSingleResult(Class<T> entityClass, QueryCriterion criterion); /** * 创建JPQL查询 * * @param jpql JPQL语句 * @return 一个JPQL查询 */ JpqlQuery createJpqlQuery(String jpql); /** * 执行JPQL查询,返回符合条件的实体列表 * * @param jpqlQuery 要执行的JPQL查询 * @param <T> 返回结果元素类型 * @return 符合查询条件的结果列表 */ <T> List<T> find(JpqlQuery jpqlQuery); /** * 执行JPQL查询,返回符合条件的单个实体 * * @param jpqlQuery 要执行的JPQL查询 * @param <T> 返回结果类型 * @return 符合查询条件的单个结果 */ <T> T getSingleResult(JpqlQuery jpqlQuery); /** * 执行更新仓储的操作。 * * @param jpqlQuery 要执行的JPQL查询。 * @return 被更新或删除的实体的数量 */ int executeUpdate(JpqlQuery jpqlQuery); /** * 创建命名查询 * * @param queryName 命名查询的名字 * @return 一个命名查询 */ NamedQuery createNamedQuery(String queryName); /** * 执行命名查询,返回符合条件的实体列表 * * @param namedQuery 要执行的命名查询 * @param <T> 返回结果元素类型 * @return 符合查询条件的结果列表 */ <T> List<T> find(NamedQuery namedQuery); /** * 执行命名查询,返回符合条件的单个实体 * * @param namedQuery 要执行的命名查询 * @param <T> 返回结果类型 * @return 符合查询条件的单个结果 */ <T> T getSingleResult(NamedQuery namedQuery); /** * 使用命名查询执行更新仓储的操作。 * * @param namedQuery 要执行的命名查询。 * @return 被更新或删除的实体的数量 */ int executeUpdate(NamedQuery namedQuery); /** * 创建原生SQL查询 * * @param sql SQL语句 * @return 一个原生SQL查询 */ SqlQuery createSqlQuery(String sql); /** * 执行SQL查询,返回符合条件的实体列表 * * @param sqlQuery 要执行的SQL查询。 * @param <T> 返回结果元素类型 * @return 符合查询条件的结果列表 */ <T> List<T> find(SqlQuery sqlQuery); /** * 执行SQL查询,返回符合条件的单个实体 * * @param sqlQuery 要执行的SQL查询。 * @param <T> 返回结果类型 * @return 符合查询条件的单个结果 */ <T> T getSingleResult(SqlQuery sqlQuery); /** * 使用SQL查询执行更新仓储的操作。 * * @param sqlQuery 要执行的SQL查询。 * @return 被更新或删除的实体的数量 */ int executeUpdate(SqlQuery sqlQuery); /** * 按例查询。 * * @param <T> 查询的目标实体类型 * @param <E> 查询样例的类型 * @param example 查询样例 * @param settings 查询设置 * @return 与example相似的T类型的范例 */ <T extends Entity, E extends T> List<T> findByExample(E example, ExampleSettings<T> settings); /** * 根据单一属性的值查找实体 * * @param <T> 要查询的实体的类型 * @param clazz 要查询的实体的类 * @param propertyName 要查询的属性 * @param propertyValue 匹配的属性值 * @return 类型为clazz的、属性propertyName的值等于propertyValue的实体的集合 */ <T extends Entity> List<T> findByProperty(Class<T> clazz, String propertyName, Object propertyValue); /** * 根据多个属性的值查找实体 * * @param <T> 要查询的实体的类型 * @param clazz 要查询的实体的类 * @param properties 命名参数,其中key为属性名,value为要匹配的属性值。 * @return 类型为clazz、多个属性分别等于指定的属性值的实体的集合。 */ <T extends Entity> List<T> findByProperties(Class<T> clazz, NamedParameters properties); /** * 获取命名查询的查询字符串 * @param queryName 命名查询的名字 * @return 命名查询对应的JPQL字符串 */ String getQueryStringOfNamedQuery(String queryName); /** * 将内存中的持久化对象状态即时写入数据库 */ void flush(); /** * 使用数据库中的最新数据更新实体的当前状态。实体中的任何已改变但未持久化的属性值将被数据库中的最新值覆盖。 * * @param entity 要刷新的实体 */ void refresh(Entity entity); /** * 清空持久化缓存 */ void clear(); }
[ "gdyangyu@gmail.com" ]
gdyangyu@gmail.com
897df0a009fb63152243e404200b0468e4ac068d
4d2bf4558bffb9e8219e920f91c71f1fb98a0b83
/src/com/inti/dao/impl/DepartementDAO.java
27e7888850332fe54c7d37a98b142e29d10b9be9
[]
no_license
AlexisAndreu/gestion_ferme
b8781bd369ea272dd97bfb25278a5adb4cbda8a8
5f71e04b756c481bc06badd4cc63c52a7d6f9a47
refs/heads/master
2023-02-19T07:57:41.680972
2021-01-19T13:15:02
2021-01-19T13:15:02
330,942,484
0
0
null
null
null
null
UTF-8
Java
false
false
640
java
package com.inti.dao.impl; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.criterion.Restrictions; import com.inti.dao.interfaces.IDepartementDAO; import com.inti.entities.Departement; import com.inti.utils.HibernateUtility; public class DepartementDAO extends ManagerDAO<Departement> implements IDepartementDAO { @Override public Departement rechercherDepartementParNom(String nom) { Session s = HibernateUtility.getSessionFactory().openSession(); Criteria crit = s.createCriteria(Departement.class); crit.add(Restrictions.eq("nom", nom)); return (Departement) crit.uniqueResult(); } }
[ "you@example.com" ]
you@example.com
727ab01876f724c3cf2478c720132619209d2f50
fa33039e15bc570af9d4e2ad8a403db93000c48f
/Chapter21_Input-Output/src/be/intecbrussel/exercise07_object_serialization/drawing/DrawingApp.java
4aad8e120766e129e76269dc40e20f411bdef7ce
[]
no_license
Mert1980/JAVA-11-Fundamentals
0098f54e839cbed6f7db80056daacacb94f82169
1785da2dcb34ae93723a62af90a508d07cad4cd4
refs/heads/master
2023-03-03T20:59:18.902535
2021-02-13T04:28:26
2021-02-13T04:28:26
300,883,080
1
1
null
null
null
null
UTF-8
Java
false
false
815
java
package be.intecbrussel.exercise07_object_serialization.drawing; import java.util.Iterator; public class DrawingApp { public static void main(String[] args) { Drawing myDrawing = new Drawing(); myDrawing.add(new Circle(5, 5, 5)); myDrawing.add(new Rectangle(10, 20, 1, 1)); myDrawing.add(new Triangle(10, 20, 20)); myDrawing.add(new Square(7, 1, 1)); Iterator iterator = myDrawing.new DrawableIterator(); // more simply while(iterator.hasNext()){ try{ System.out.println(iterator.next()); } catch (Exception e){ System.out.println(e.getMessage()); } } /*for (Object drawable:myDrawing ) { System.out.println(drawable); }*/ } }
[ "mertdemirok80@gmail.com" ]
mertdemirok80@gmail.com
329f3094269a43593e9e070db2562ce0c64f9443
96a7d93cb61cef2719fab90742e2fe1b56356d29
/selected projects/desktop/jEdit-v5.5.0/org/jedit/options/OptionTreeModel.java
4fc55cc3e5c4011a85cd343d9272f9c3f5c5f655
[ "MIT" ]
permissive
danielogen/msc_research
cb1c0d271bd92369f56160790ee0d4f355f273be
0b6644c11c6152510707d5d6eaf3fab640b3ce7a
refs/heads/main
2023-03-22T03:59:14.408318
2021-03-04T11:54:49
2021-03-04T11:54:49
307,107,229
0
1
MIT
2021-03-04T11:54:49
2020-10-25T13:39:50
Java
UTF-8
Java
false
false
4,756
java
/* * OptionTreeModel.java - OptionGroup-backed TreeModel * :tabSize=4:indentSize=4:noTabs=false: * :folding=explicit:collapseFolds=1: * * Portions Copyright (C) 2003 Slava Pestov * Copyright (C) 2012 Alan Ezust * Copyright (C) 2016 Eric Le Lay (extracted from PluginOptionGroup) * * 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 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.jedit.options; import javax.swing.event.EventListenerList; import javax.swing.event.TreeModelEvent; import javax.swing.event.TreeModelListener; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; import org.gjt.sp.jedit.OptionGroup; /** * TreeModel implementation backed by an OptionGroup **/ public class OptionTreeModel implements TreeModel { private OptionGroup root; private EventListenerList listenerList; public OptionTreeModel() { this(new OptionGroup(null)); } public OptionTreeModel(OptionGroup root) { this.root = root; listenerList = new EventListenerList(); } public void addTreeModelListener(TreeModelListener l) { listenerList.add(TreeModelListener.class, l); } public void removeTreeModelListener(TreeModelListener l) { listenerList.remove(TreeModelListener.class, l); } public Object getChild(Object parent, int index) { if (parent instanceof OptionGroup) { return ((OptionGroup)parent).getMember(index); } else { return null; } } public int getChildCount(Object parent) { if (parent instanceof OptionGroup) { return ((OptionGroup)parent).getMemberCount(); } else { return 0; } } public int getIndexOfChild(Object parent, Object child) { if (parent instanceof OptionGroup) { return ((OptionGroup)parent) .getMemberIndex(child); } else { return -1; } } public Object getRoot() { return root; } public boolean isLeaf(Object node) { return !(node instanceof OptionGroup); } public void valueForPathChanged(TreePath path, Object newValue) { // this model may not be changed by the TableCellEditor } protected void fireNodesChanged(Object source, Object[] path, int[] childIndices, Object[] children) { Object[] listeners = listenerList.getListenerList(); TreeModelEvent modelEvent = null; for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] != TreeModelListener.class) continue; if (modelEvent == null) { modelEvent = new TreeModelEvent(source, path, childIndices, children); } ((TreeModelListener)listeners[i + 1]) .treeNodesChanged(modelEvent); } } protected void fireNodesInserted(Object source, Object[] path, int[] childIndices, Object[] children) { Object[] listeners = listenerList.getListenerList(); TreeModelEvent modelEvent = null; for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] != TreeModelListener.class) continue; if (modelEvent == null) { modelEvent = new TreeModelEvent(source, path, childIndices, children); } ((TreeModelListener)listeners[i + 1]) .treeNodesInserted(modelEvent); } } protected void fireNodesRemoved(Object source, Object[] path, int[] childIndices, Object[] children) { Object[] listeners = listenerList.getListenerList(); TreeModelEvent modelEvent = null; for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] != TreeModelListener.class) continue; if (modelEvent == null) { modelEvent = new TreeModelEvent(source, path, childIndices, children); } ((TreeModelListener)listeners[i + 1]) .treeNodesRemoved(modelEvent); } } protected void fireTreeStructureChanged(Object source, Object[] path, int[] childIndices, Object[] children) { Object[] listeners = listenerList.getListenerList(); TreeModelEvent modelEvent = null; for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] != TreeModelListener.class) continue; if (modelEvent == null) { modelEvent = new TreeModelEvent(source, path, childIndices, children); } ((TreeModelListener)listeners[i + 1]) .treeStructureChanged(modelEvent); } } }
[ "danielogen@gmail.com" ]
danielogen@gmail.com
8398cc0c3b090e32b93903b61cf36b01d6b3714c
99e6f1e30800cfaa66d5e5487c8d6b680a309e46
/app-dao/src/main/java/com/kangyonggan/app/mapper/CategoryMapper.java
e4a4ba36b227df1b694361d4ec5267c79e85136b
[]
no_license
KittyKoala/app
29508d0ce911f4fe01c02c717328c367c097135e
5bf802d97041b05f24527a7f4f416742af6c0f4d
refs/heads/master
2020-04-24T18:30:14.806513
2019-02-14T08:31:24
2019-02-14T08:31:24
172,181,588
4
0
null
2019-02-23T06:45:51
2019-02-23T06:45:49
null
UTF-8
Java
false
false
292
java
package com.kangyonggan.app.mapper; import com.kangyonggan.app.model.Category; import com.kangyonggan.common.mybatis.MyMapper; import org.apache.ibatis.annotations.Mapper; /** * @author kangyonggan * @since 8/8/18 */ @Mapper public interface CategoryMapper extends MyMapper<Category> { }
[ "kangyonggan@gmail.com" ]
kangyonggan@gmail.com
2b32a0ccda500e789a595ae37afb3265757e7522
a7b868c8c81984dbcb17c1acc09c0f0ab8e36c59
/src/main/java/com/alipay/api/domain/AlipayOpenMiniInneraccountPidQueryModel.java
e212d875bc8b402b535690032ae8016b35f28007
[ "Apache-2.0" ]
permissive
1755616537/alipay-sdk-java-all
a7ebd46213f22b866fa3ab20c738335fc42c4043
3ff52e7212c762f030302493aadf859a78e3ebf7
refs/heads/master
2023-02-26T01:46:16.159565
2021-02-02T01:54:36
2021-02-02T01:54:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
863
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 查询小程序管理员虚拟 ID * * @author auto create * @since 1.0, 2020-01-09 14:05:04 */ public class AlipayOpenMiniInneraccountPidQueryModel extends AlipayObject { private static final long serialVersionUID = 7557733721569642139L; /** * 业务类型 */ @ApiField("client_type") private String clientType; /** * 外部业务主体ID */ @ApiField("out_biz_id") private String outBizId; public String getClientType() { return this.clientType; } public void setClientType(String clientType) { this.clientType = clientType; } public String getOutBizId() { return this.outBizId; } public void setOutBizId(String outBizId) { this.outBizId = outBizId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
8a1be538d39a3572849b33a7751229009b65c9c1
ff59d94041ab79f96ce000ff70c841f6c904dd08
/Animation/app/src/main/java/com/example/nguyendangtinh/animation/MainActivity.java
8001f9080e91d8c747dff1c159e519bd1f430720
[]
no_license
nguyendangtinhdx/Android
09bfbe60e12860f67777e2690a74782c9f1b80d4
27756f09ea1d1512be855935c4c1bd166caa4a3b
refs/heads/master
2020-05-09T14:27:25.173493
2019-04-13T16:24:55
2019-04-13T16:24:55
181,192,886
0
0
null
null
null
null
UTF-8
Java
false
false
1,386
java
package com.example.nguyendangtinh.animation; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.animation.Animation; import android.view.animation.TranslateAnimation; import android.widget.ImageView; import android.widget.Toast; public class MainActivity extends AppCompatActivity { ImageView img; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); img = (ImageView)findViewById(R.id.imageView); TranslateAnimation animation = new TranslateAnimation(0,200,0,500); animation.setDuration(6000); // 6 giây animation.setFillAfter(true); // chạy xong rồi đứng im không quay lại animation.setAnimationListener(new Animation.AnimationListener() { @Override public void onAnimationStart(Animation animation) { Toast.makeText(MainActivity.this,"Start",Toast.LENGTH_SHORT).show(); } @Override public void onAnimationEnd(Animation animation) { Toast.makeText(MainActivity.this,"End",Toast.LENGTH_SHORT).show(); } @Override public void onAnimationRepeat(Animation animation) { } }); img.startAnimation(animation); } }
[ "=" ]
=
f7d70e9a9fe0a789e5d0fe6e50228078bdc38e98
caddff9764c16aee4f0b7364a15c94710e6f43f8
/app/src/main/java/ontime/app/customer/Adapter/RvPaymnetMethordListAdapter.java
1425ee719ac460b51964b43beca4e71f8b7a8e3d
[]
no_license
sumitkumarc/maindata
451ea583bfc7ade8f5a99777f852563b23ae94cd
3548e5124d20d504631a58d2be5cbc56f108f444
refs/heads/master
2023-02-28T04:15:29.496699
2021-02-03T02:24:08
2021-02-03T02:24:08
331,492,414
0
0
null
null
null
null
UTF-8
Java
false
false
2,936
java
package ontime.app.customer.Adapter; import android.annotation.SuppressLint; import android.content.Context; import android.graphics.Color; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.bumptech.glide.Glide; import ontime.app.R; import ontime.app.customer.doneActivity.OrderSummaryActivity; import ontime.app.databinding.RowItemPaymentMethordBinding; import ontime.app.databinding.RowItemorderCancelledBinding; import ontime.app.utils.Common; public class RvPaymnetMethordListAdapter extends RecyclerView.Adapter<RvPaymnetMethordListAdapter.MyViewHolder> { Context mContext; int[] mints; int row_index = 0; int[] ints= new int[]{4,2,1,3}; public RvPaymnetMethordListAdapter(Context context, int[] ints) { mContext = context; mints = ints; } @NonNull @Override public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.row_item_payment_methord, parent, false); return new MyViewHolder(itemView, RowItemPaymentMethordBinding.bind(itemView)); } @SuppressLint({"SetTextI18n", "UseCompatLoadingForDrawables"}) @Override public void onBindViewHolder(@NonNull MyViewHolder holder, final int position) { Glide.with(mContext).load(mints[position]).centerCrop().placeholder(R.drawable.ic_action_user).into(holder.binding.ivPamentMethord); holder.binding.llImgBack.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { row_index=position; Common.PAYMENT_TYPE =ints[position]; if(ints[position] == 1){ OrderSummaryActivity.binding.txtWallet.setVisibility(View.VISIBLE); }else { OrderSummaryActivity.binding.txtWallet.setVisibility(View.GONE); } notifyDataSetChanged();; } }); if (row_index == position) { if (Common.MERCHANT_TYPE == 1) { holder.binding.llImgBack.setBackground(mContext.getResources().getDrawable(R.drawable.btn_red_border)); } else { holder.binding.llImgBack.setBackground(mContext.getResources().getDrawable(R.drawable.btn_orange_border)); } }else { holder.binding.llImgBack.setBackground(null); } } @Override public int getItemCount() { return mints.length; } public class MyViewHolder extends RecyclerView.ViewHolder { RowItemPaymentMethordBinding binding; MyViewHolder(View itemView, RowItemPaymentMethordBinding itemBinding) { super(itemView); binding = itemBinding; } } }
[ "psumit88666@gmail.com" ]
psumit88666@gmail.com
3ea0bafe4b233234a796b7a76b7084e4dc6fe336
47a7afc6143e2cf27f56506cb04868e4d1d79232
/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/helloworld/HelloWorldController.java
67ee60f10f06ee2423233a37a0316d7428393402
[]
no_license
javoPB/MicroServiciosUdemy-RestFull
a3ecb20eef2f2e0975a885e93b6ffe5802149950
2ce292aa48bb8619a659314d2767114099a0f31f
refs/heads/master
2022-12-29T18:45:25.777574
2020-10-12T15:11:06
2020-10-12T15:11:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,446
java
package com.in28minutes.rest.webservices.restfulwebservices.helloworld; import java.util.Locale; import org.hibernate.annotations.UpdateTimestamp; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloWorldController { @Autowired private MessageSource messageSource; //@RequestMapping(method = RequestMethod.GET, path = "/hello-world") @GetMapping(path = "/hello-world") public String getHelloWorld() { return "Hello World."; } /** * Si en la clase HelloWorldBean no se define el getter del atributo de clase donde se almacena el valor * que se pasa como parámetro en el constructor, de genera un error. * @return */ @GetMapping(path = "/hello-world-bean") public HelloWorldBean getHelloWorldBean() { return new HelloWorldBean("Hello World."); } @GetMapping(path = "/hello-world/path-variable/{name}") public HelloWorldBean getHelloWorldBean(@PathVariable String name) { return new HelloWorldBean(String.format("Hello World %s", name) ); } /** * Para el manejo de la internacionalización. (i18n) * @RequestHeader para indicar que el parámetro se encuentra en el header del request. * y por consiguiente, el lenguaje se pasa como parámetro. * @return */ // @GetMapping(path = "/hello-world-internationalized") // public String getHelloWorldInternationalized(@RequestHeader(name="Accept-Language", required = false) Locale locale) { // return messageSource.getMessage("good.morning.message", null, locale); // } //Optimizando la configuración se la internacionalización. @GetMapping(path = "/hello-world-internationalized") public String getHelloWorldInternationalized() { return messageSource.getMessage("good.morning.message", null, LocaleContextHolder.getLocale()); } }
[ "pbjavouam@gmail.com" ]
pbjavouam@gmail.com
3da27293aec4c0b9cf6555be9a185d2a7a71513c
45993396ffec1dbe2909ab2b42ee42540afe0b73
/mc/src/com/hex/bigdata/udsp/mc/model/McConsumeLog.java
70cc7f2a62e89fe5e0c951e5ed93c75fa22a986c
[]
no_license
fjfd/boracay
6a9758795400db4208e5ce7dacb8691bb3a68190
184da923f964233a759f766c7f3fa61c30ee0274
refs/heads/master
2020-05-28T01:40:05.124311
2019-04-17T15:25:50
2019-04-17T15:25:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,731
java
package com.hex.bigdata.udsp.mc.model; import java.io.Serializable; public class McConsumeLog implements Serializable { private String pkId; private String userName; private String serviceName; private String requestContent; private String requestStartTime; private String requestEndTime; private String runStartTime; private String runEndTime; private String responseContent; private String status; private String appType; private String requestType; private String appName; private String errorCode; private String message; private String syncType; private String isCache; // 是否从缓存获取(0:是,1:否) private long consumeTime; // 接口耗时(ms) public String getPkId() { return pkId; } public void setPkId(String pkId) { this.pkId = pkId; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getServiceName() { return serviceName; } public void setServiceName(String serviceName) { this.serviceName = serviceName; } public String getRequestContent() { return requestContent; } public void setRequestContent(String requestContent) { this.requestContent = requestContent; } public String getRequestStartTime() { return requestStartTime; } public void setRequestStartTime(String requestStartTime) { this.requestStartTime = requestStartTime; } public String getRequestEndTime() { return requestEndTime; } public void setRequestEndTime(String requestEndTime) { this.requestEndTime = requestEndTime; } public String getRunStartTime() { return runStartTime; } public void setRunStartTime(String runStartTime) { this.runStartTime = runStartTime; } public String getRunEndTime() { return runEndTime; } public void setRunEndTime(String runEndTime) { this.runEndTime = runEndTime; } public String getResponseContent() { return responseContent; } public void setResponseContent(String responseContent) { this.responseContent = responseContent; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getAppType() { return appType; } public void setAppType(String appType) { this.appType = appType; } public String getRequestType() { return requestType; } public void setRequestType(String requestType) { this.requestType = requestType; } public String getAppName() { return appName; } public void setAppName(String appName) { this.appName = appName; } public String getErrorCode() { return errorCode; } public void setErrorCode(String errorCode) { this.errorCode = errorCode; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getSyncType() { return syncType; } public void setSyncType(String syncType) { this.syncType = syncType; } public String getIsCache() { return isCache; } public void setIsCache(String isCache) { this.isCache = isCache; } public long getConsumeTime() { return consumeTime; } public void setConsumeTime(long consumeTime) { this.consumeTime = consumeTime; } }
[ "junjie.miao@goupwith.com" ]
junjie.miao@goupwith.com
5860e21a6c43db992b0b8d16e88f032c61c40b88
ce65da0e9ac893d21e3cb050e8918fb9203125b4
/library/common/src/main/java/com/jaydenxiao/common/utils/springylib/springyRecyclerView/SpringyAdapterAnimator.java
47b38dcfca4935a6c7a2f50cbd8d07b2c015e319
[]
no_license
veicn/SelfPos2.0
c5319b41b55f2e2e7e12398dce09a46ff948186e
4a826590fa3cd296f4a20966729fe0e611910cef
refs/heads/master
2020-04-10T20:55:35.865144
2018-12-07T03:39:31
2018-12-07T03:39:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,140
java
package com.jaydenxiao.common.utils.springylib.springyRecyclerView; import android.support.v7.widget.RecyclerView; import android.view.View; import com.facebook.rebound.SimpleSpringListener; import com.facebook.rebound.Spring; import com.facebook.rebound.SpringConfig; import com.facebook.rebound.SpringSystem; import com.facebook.rebound.SpringUtil; /** * Created by Zach on 6/30/2017. */ public class SpringyAdapterAnimator { private static final int INIT_DELAY = 100; private static final int INIT_TENSION = 200; private static final int INIT_FRICTION = 20; private int tension; private int fraction ; private static final int PER_ITEM_GAPE = 100; private int parentHeight; private int parentWidth; private RecyclerView parent; private SpringSystem mSpringSystem; private SpringyAdapterAnimationType animationType; private boolean mFirstViewInit = true; private int mLastPosition = -1; private int mStartDelay; public SpringyAdapterAnimator(RecyclerView recyclerView) { parent = recyclerView; mSpringSystem = SpringSystem.create(); animationType = SpringyAdapterAnimationType.SLIDE_FROM_BOTTOM; parentHeight = parent.getResources().getDisplayMetrics().heightPixels; parentWidth = parent.getResources().getDisplayMetrics().widthPixels; mStartDelay = INIT_DELAY; tension = INIT_TENSION; fraction= INIT_FRICTION; } /* * setInitDelay @param initDelay for set delay at screen creation * */ public void setInitDelay(int initDelay){ mStartDelay = initDelay; } public void setSpringAnimationType(SpringyAdapterAnimationType type){ animationType = type; } public void addConfig(int tension,int fraction){ this.tension = tension; this.fraction = fraction; } /** * onSpringyItemCreate call in Adapter's Constructor method * @param item itemView instance from RecyclerView's OnCreateView method * **/ public void onSpringItemCreate(View item) { if (mFirstViewInit) { setAnimation(item, mStartDelay, tension, fraction); mStartDelay += PER_ITEM_GAPE; } } /** * * onSpringyItemBind call in RecyclerView's onBind for scroll effects * @param item itemView instance from RecyclerView's onBind method * @param position from RecyclerView's onBind method * **/ public void onSpringItemBind(View item, int position) { if (!mFirstViewInit && position > mLastPosition) { setAnimation(item, 0, tension - tension/4, fraction); mLastPosition = position; } } private void setAnimation(final View item, final int delay, final int tension, final int friction) { setInitValue(item); Runnable startAnimation = new Runnable() { @Override public void run() { SpringConfig config = new SpringConfig(tension, friction); Spring spring = mSpringSystem.createSpring(); spring.setSpringConfig(config); spring.addListener(new SimpleSpringListener() { @Override public void onSpringUpdate(Spring spring) { switch (animationType) { case SLIDE_FROM_BOTTOM: item.setTranslationY(getMappedValue(spring)); break; case SLIDE_FROM_LEFT: item.setTranslationX(getMappedValue(spring)); break; case SLIDE_FROM_RIGHT: item.setTranslationX(getMappedValue(spring)); break; case SCALE: item.setScaleX(getMappedValue(spring)); item.setScaleY(getMappedValue(spring)); break; } } @Override public void onSpringEndStateChange(Spring spring) { mFirstViewInit = false; } }); spring.setEndValue(1); } }; parent.postDelayed(startAnimation, delay); } private void setInitValue(View item) { switch (animationType) { case SLIDE_FROM_BOTTOM: item.setTranslationY(parentHeight); break; case SLIDE_FROM_LEFT: item.setTranslationX(-parentWidth); break; case SLIDE_FROM_RIGHT: item.setTranslationX(parentWidth); break; case SCALE: item.setScaleX(0); item.setScaleY(0); break; default: item.setTranslationY(parentHeight); break; } } private float getMappedValue(Spring spring) { float value; switch (animationType) { case SLIDE_FROM_BOTTOM: value = (float) SpringUtil.mapValueFromRangeToRange(spring.getCurrentValue(), 0, 1, parentHeight, 0); break; case SLIDE_FROM_LEFT: value = (float) SpringUtil.mapValueFromRangeToRange(spring.getCurrentValue(), 0, 1, -parentWidth, 0); break; case SLIDE_FROM_RIGHT: value = (float) SpringUtil.mapValueFromRangeToRange(spring.getCurrentValue(), 0, 1, parentWidth, 0); break; case SCALE: value = (float) SpringUtil.mapValueFromRangeToRange(spring.getCurrentValue(), 0, 1, 0, 1); break; default: value = (float) SpringUtil.mapValueFromRangeToRange(spring.getCurrentValue(), 0, 1, parentHeight, 0); break; } return value; } }
[ "xzl@acewill.com" ]
xzl@acewill.com
f5f260d072518ee162ba0c7803715b9e345038c0
80144cbbe03b94c9781d5aff6534c4a08cea9d98
/core/src/main/java/com/example/util/GsonUtils.java
e670e1b983ddb04fef5d12edb8eca416f19e0e8c
[]
no_license
3441242166/ShaShiApp
3c15d85a10ef25a45053b469986ee7eca9783cac
03584dce89e05f024278f667bf05cc323226070f
refs/heads/master
2020-05-22T13:20:05.873815
2019-05-01T02:18:59
2019-05-01T02:18:59
186,354,771
0
0
null
null
null
null
UTF-8
Java
false
false
1,299
java
package com.example.util; import android.util.Log; import com.google.gson.Gson; import java.util.Map; import okhttp3.MediaType; import okhttp3.RequestBody; public class GsonUtils { private static final String TAG = "GsonUtils"; private static Gson gson = new Gson(); /** * 对象转Json字符串 * * @param object * @return */ public static String toJson(Object object) { return gson.toJson(object); } /** * 字符串转Json对象 * * @param json * @param clazz * @param <T> * @return */ public static <T> T fromJson(String json, Class<T> clazz) { return gson.fromJson(json, clazz); } /** * @param map * @param <K,V> * @return */ public static <K,V>RequestBody toBody(Map<K,V> map){ MediaType JSON = MediaType.parse("application/json; charset=utf-8"); String json = toJson(map); Log.i(TAG, "toBody: "+ json); return RequestBody.create(JSON, json); } public static <K,V>RequestBody toBody(Object object){ MediaType JSON = MediaType.parse("application/json; charset=utf-8"); String json = toJson(object); Log.i(TAG, "toBody: "+ json); return RequestBody.create(JSON, json); } }
[ "3441242166@qq.com" ]
3441242166@qq.com
a1689f793d8a0250f552c2f318558038d499a0b3
b796867c5ff3a5044ec2cd086741193ec2eefd09
/engine/src/main/java/org/teiid/query/sql/lang/CollectionValueIterator.java
9a6179b6fe28663397b25eab9a9ee47552cf7445
[ "Apache-2.0" ]
permissive
teiid/teiid
56971cbdc8910b51019ba184b8bb1bb054ff6a47
3de2f782befef980be5dc537249752e28ad972f7
refs/heads/master
2023-08-19T06:32:20.244837
2022-03-10T17:49:34
2022-03-10T17:49:34
6,092,163
277
269
NOASSERTION
2023-01-04T18:50:23
2012-10-05T15:21:04
Java
UTF-8
Java
false
false
1,866
java
/* * Copyright Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags and * the COPYRIGHT.txt file distributed with this work. * * 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.teiid.query.sql.lang; import java.util.Collection; import java.util.Iterator; import org.teiid.core.TeiidComponentException; import org.teiid.query.sql.util.ValueIterator; public class CollectionValueIterator implements ValueIterator { private Collection vals; private Iterator instance = null; public CollectionValueIterator(Collection vals) { this.vals = vals; } /** * @see org.teiid.query.sql.util.ValueIterator#hasNext() * @since 4.3 */ public boolean hasNext() throws TeiidComponentException { if (instance == null) { this.instance = vals.iterator(); } return this.instance.hasNext(); } /** * @see org.teiid.query.sql.util.ValueIterator#next() * @since 4.3 */ public Object next() throws TeiidComponentException { if (instance == null) { this.instance = vals.iterator(); } return this.instance.next(); } /** * @see org.teiid.query.sql.util.ValueIterator#reset() * @since 4.3 */ public void reset() { this.instance = null; } }
[ "shawkins@redhat.com" ]
shawkins@redhat.com
266c801d9a4d2628d8d466e760eafec0d5ac35f4
1c31804e076828585d5df1695e308ace5382cbf1
/jodd-petite/src/test/java/jodd/petite/mix/Big2.java
7903d46aa52bf0c8b6d7fe04deedd8bb39d53aa1
[]
no_license
zipu888/jodd
bb07bb97b41a3cb7a4765677dc7a5c7d93efac43
3f70308ab43de8eb82343b5db86935a3f506a7b2
refs/heads/master
2021-01-15T18:50:31.015230
2013-07-15T02:07:47
2013-07-15T02:07:47
8,326,913
1
0
null
null
null
null
UTF-8
Java
false
false
308
java
// Copyright (c) 2003-2013, Jodd Team (jodd.org). All Rights Reserved. package jodd.petite.mix; import jodd.petite.meta.PetiteInject; public class Big2 { private Small small; public Small getSmall() { return small; } @PetiteInject public void setSmall(Small small) { this.small = small; } }
[ "igor@jodd.org" ]
igor@jodd.org
24675ae4ace700b7a83aed97145e553811a95310
b20a86ce19e01d30f0260de6512e037b59e2ecd0
/iGrid/modules/util/javax/sql/RowSetListener.java
e770ab37ed2a8958b307f5b144f59e72fc859265
[]
no_license
mwsobol/iGrid
0ea729b69d417320d6d9233784ab2919df42ec03
b6c6384deb32e570f476c215cb93a5191084b366
refs/heads/master
2021-01-23T13:22:28.149192
2014-07-14T12:53:37
2014-07-14T12:53:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,541
java
/* * @(#)RowSetListener.java 1.1 99/05/11 * * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved. * * This software is the confidential and proprietary information of Sun * Microsystems, Inc. ("Confidential Information"). You shall not * disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into * with Sun. * * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING * THIS SOFTWARE OR ITS DERIVATIVES. * * */ package javax.sql; /** * <P>The RowSetListener interface is implemented by a * component that wants to be notified when a significant * event happens in the life of a RowSet */ public interface RowSetListener extends java.util.EventListener { /** * <P>Called when the rowset is changed. * * @param event an object describing the event */ void rowSetChanged(RowSetEvent event); /** * <P>Called when a row is inserted, updated, or deleted. * * @param event an object describing the event */ void rowChanged(RowSetEvent event); /** * Called when a rowset's cursor is moved. * * @param event an object describing the event */ void cursorMoved(RowSetEvent event); }
[ "sobol@sorcersoft.org" ]
sobol@sorcersoft.org
c10a3d6c7bfca7d6232eb7aad98d6265c7b03282
8de7891a3ab36567957aa537795b5c1fc40c69c6
/concrete-pom/concrete-accounts/concrete-accounts-common-tools/src/main/java/org/coodex/concrete/accounts/AbstractTenantAccountFactory.java
b7d3cba23af95b47a975e4b3a6eb0f79c5f8cbcd
[ "Apache-2.0" ]
permissive
coodex2016/concrete.coodex.org
a09ae70f5fee21c045d83c1495915c0aba22f8ce
d4ff2fdcafba4a8a426b6ceb79b086c931147525
refs/heads/0.5.x
2023-08-04T04:37:51.116386
2023-07-13T05:48:51
2023-07-13T05:48:51
85,026,857
23
10
NOASSERTION
2023-02-22T00:09:24
2017-03-15T03:52:33
Java
UTF-8
Java
false
false
2,515
java
/* * Copyright (c) 2018 coodex.org (jujus.shen@126.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.coodex.concrete.accounts; import org.coodex.concrete.common.Account; import org.coodex.concrete.common.ClassifiableAccountFactory; import org.coodex.concrete.common.ClassifiableAccountID; import org.coodex.concrete.common.IF; import org.coodex.config.Config; import org.coodex.util.SingletonMap; import static org.coodex.concrete.accounts.AccountConstants.TYPE_TENANT_ADMINISTRATOR; import static org.coodex.concrete.common.AccountsErrorCodes.NONE_THIS_ACCOUNT; /** * Created by davidoff shen on 2017-05-26. */ public abstract class AbstractTenantAccountFactory extends ClassifiableAccountFactory { // private ConcreteCache<String, TenantAccount> accountCache = new ConcreteCache<String, TenantAccount>() { // @Override // protected TenantAccount load(String key) { // return newAccount(key); // } // // @Override // protected String getRule() { // return AbstractTenantAccountFactory.class.getPackage().getName(); // } // }; private SingletonMap<String, TenantAccount> accountSingletonMap = SingletonMap.<String, TenantAccount>builder() .function(this::newAccount).maxAge(Config.getValue("cache.object.life", 10, AbstractTenantAccountFactory.class.getPackage().getName() ) * 60L * 1000L).build(); protected abstract TenantAccount newAccount(String key); @Override public Account<ClassifiableAccountID> getAccountByID(ClassifiableAccountID id) { return IF.isNull(accountSingletonMap.get(id.getId()), NONE_THIS_ACCOUNT); } @Override protected Integer[] getSupportTypes() { return new Integer[]{TYPE_TENANT_ADMINISTRATOR}; } // @Override // public boolean accept(ClassifiableAccountID param) { // return param != null && param.getCategory() == AccountConstants.TYPE_TENANT_ADMINISTRATOR; // } }
[ "jujus.shen@126.com" ]
jujus.shen@126.com
26f741101099f239bbadeef3f31578b726e4e8ce
9b9c3236cc1d970ba92e4a2a49f77efcea3a7ea5
/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/quests/not_done/Q10597_EscapeToTheShadowOfTheMotherTree.java
ed9be95c756bc6ee193d141aa1d558f5127feb2e
[]
no_license
BETAJIb/ikol
73018f8b7c3e1262266b6f7d0a7f6bbdf284621d
f3709ea10be2d155b0bf1dee487f53c723f570cf
refs/heads/master
2021-01-05T10:37:17.831153
2019-12-24T22:23:02
2019-12-24T22:23:02
240,993,482
0
0
null
null
null
null
UTF-8
Java
false
false
1,147
java
/* * This file is part of the L2J Mobius project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package quests.not_done; import org.l2jmobius.Config; import org.l2jmobius.gameserver.model.quest.Quest; /** * @author Mobius */ public class Q10597_EscapeToTheShadowOfTheMotherTree extends Quest { private static final int START_NPC = 34411; public Q10597_EscapeToTheShadowOfTheMotherTree() { super(10597); addStartNpc(START_NPC); addTalkId(START_NPC); addCondMinLevel(Config.PLAYER_MAXIMUM_LEVEL, getNoQuestMsg(null)); } }
[ "mobius@cyber-wizard.com" ]
mobius@cyber-wizard.com
5ecbe567e04188bf4bab96f5bb3eae7ec2363ce7
6d2d4af76f82e154b3aa06531adc248e3201c09b
/src/main/java/com/robertx22/mine_and_slash/database/spells/synergies/base/OnHealedSynergy.java
7a063b44d3d941fd45f2c59fe9536cb3513fd316
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
AzureDoom/Mine-and-Slash
4bd16494be00bde5a038bcc01dd66fb45209fe7f
a772326882824039eee814dcff4af321923a5736
refs/heads/AzureBranch
2021-07-10T03:32:16.672923
2020-08-16T03:59:14
2020-08-16T03:59:14
188,708,742
1
3
NOASSERTION
2020-02-24T09:12:49
2019-05-26T16:48:17
Java
UTF-8
Java
false
false
267
java
package com.robertx22.mine_and_slash.database.spells.synergies.base; import com.robertx22.mine_and_slash.uncommon.effectdatas.SpellHealEffect; public abstract class OnHealedSynergy extends Synergy { public abstract void tryActivate(SpellHealEffect effect); }
[ "treborx555@gmail.com" ]
treborx555@gmail.com
44890cc19d59ee54187a950d8f9b7ccac8b0c22c
05a1862363ed4da2b1f60985178cbb5845b9e6f5
/MyrranCore/src/DAO/Settings/DAO/SettingsDAO.java
2b552998b89333bc74347a3050c2e5764ccfd87d
[]
no_license
Hanto/Myrran
3daf41df87e6636cd5b79388cac4e692a0c03a42
63dca560c50b9e73f6256e00933d1e91219a2038
refs/heads/master
2020-04-09T13:24:48.462587
2015-10-01T16:48:10
2015-10-01T16:48:10
21,379,073
0
0
null
null
null
null
UTF-8
Java
false
false
540
java
package DAO.Settings.DAO;// Created by Hanto on 06/07/2014. public interface SettingsDAO { public String getString(String key, String defaultValue); public float getFloat(String key, float defaultValue); public int getInt(String key, int defaultValue); public boolean getBoolean(String key, boolean defaultValue); public void setString(String key, String value); public void setFloat(String key, float value); public void setInt(String key, int value); public void setBoolean(String key, boolean value); }
[ "jhanto@gmail.com" ]
jhanto@gmail.com
9e27a590ba444a4b124dfbd3a0872b81e60fe99e
8bdd4795dd0e54d5db2163dc2a7f967331de128e
/src/main/java/personal/service/PersonService.java
0406a4e86832ec1695f5f3f7f63508105858bf68
[]
no_license
yefengmengluo/mybatis
465656ea2ed2cd8599c103fd76a48681aacbdecd
f13b1375be66f225df1a8ac01399cd330be90482
refs/heads/master
2021-01-10T01:14:32.630826
2016-02-16T10:10:20
2016-02-16T10:10:20
51,724,611
1
0
null
null
null
null
UTF-8
Java
false
false
215
java
package personal.service; import personal.entity.Person; import personal.util.Page; public interface PersonService { public Page<Person> getList(Page<Person> page); public Person getById(Integer id); }
[ "yefengmengluo@163.com" ]
yefengmengluo@163.com
aba0adc1c18dc98527cdc1f1960fd0d1195fdae2
45736204805554b2d13f1805e47eb369a8e16ec3
/com/viaversion/viaversion/rewriter/ComponentRewriter.java
7bb2b3c7d7e69f57566c5bdf7b11acdc9e7953c5
[]
no_license
KrOySi/ArchWare-Source
9afc6bfcb1d642d2da97604ddfed8048667e81fd
46cdf10af07341b26bfa704886299d80296320c2
refs/heads/main
2022-07-30T02:54:33.192997
2021-08-08T23:36:39
2021-08-08T23:36:39
394,089,144
2
0
null
null
null
null
UTF-8
Java
false
false
5,757
java
/* * Decompiled with CFR 0.150. */ package com.viaversion.viaversion.rewriter; import com.viaversion.viaversion.api.Via; import com.viaversion.viaversion.api.protocol.Protocol; import com.viaversion.viaversion.api.protocol.packet.ClientboundPacketType; import com.viaversion.viaversion.api.protocol.remapper.PacketRemapper; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.libs.gson.JsonElement; import com.viaversion.viaversion.libs.gson.JsonObject; import com.viaversion.viaversion.libs.gson.JsonParser; import com.viaversion.viaversion.libs.gson.JsonPrimitive; import com.viaversion.viaversion.libs.gson.JsonSyntaxException; public class ComponentRewriter { protected final Protocol protocol; public ComponentRewriter(Protocol protocol) { this.protocol = protocol; } public ComponentRewriter() { this.protocol = null; } public void registerComponentPacket(ClientboundPacketType packetType) { this.protocol.registerClientbound(packetType, new PacketRemapper(){ @Override public void registerMap() { this.handler(wrapper -> ComponentRewriter.this.processText(wrapper.passthrough(Type.COMPONENT))); } }); } public void registerChatMessage(ClientboundPacketType packetType) { this.registerComponentPacket(packetType); } public void registerBossBar(ClientboundPacketType packetType) { this.protocol.registerClientbound(packetType, new PacketRemapper(){ @Override public void registerMap() { this.map(Type.UUID); this.map(Type.VAR_INT); this.handler(wrapper -> { int action = wrapper.get(Type.VAR_INT, 0); if (action == 0 || action == 3) { ComponentRewriter.this.processText(wrapper.passthrough(Type.COMPONENT)); } }); } }); } public void registerCombatEvent(ClientboundPacketType packetType) { this.protocol.registerClientbound(packetType, new PacketRemapper(){ @Override public void registerMap() { this.handler(wrapper -> { if (wrapper.passthrough(Type.VAR_INT) == 2) { wrapper.passthrough(Type.VAR_INT); wrapper.passthrough(Type.INT); ComponentRewriter.this.processText(wrapper.passthrough(Type.COMPONENT)); } }); } }); } public void registerTitle(ClientboundPacketType packetType) { this.protocol.registerClientbound(packetType, new PacketRemapper(){ @Override public void registerMap() { this.handler(wrapper -> { int action = wrapper.passthrough(Type.VAR_INT); if (action >= 0 && action <= 2) { ComponentRewriter.this.processText(wrapper.passthrough(Type.COMPONENT)); } }); } }); } public JsonElement processText(String value) { try { JsonElement root = JsonParser.parseString(value); this.processText(root); return root; } catch (JsonSyntaxException e) { if (Via.getManager().isDebug()) { Via.getPlatform().getLogger().severe("Error when trying to parse json: " + value); throw e; } return new JsonPrimitive(value); } } public void processText(JsonElement element) { JsonObject hoverEvent; JsonElement extra; JsonElement translate; if (element == null || element.isJsonNull()) { return; } if (element.isJsonArray()) { this.processAsArray(element); return; } if (element.isJsonPrimitive()) { this.handleText(element.getAsJsonPrimitive()); return; } JsonObject object = element.getAsJsonObject(); JsonPrimitive text = object.getAsJsonPrimitive("text"); if (text != null) { this.handleText(text); } if ((translate = object.get("translate")) != null) { this.handleTranslate(object, translate.getAsString()); JsonElement with = object.get("with"); if (with != null) { this.processAsArray(with); } } if ((extra = object.get("extra")) != null) { this.processAsArray(extra); } if ((hoverEvent = object.getAsJsonObject("hoverEvent")) != null) { this.handleHoverEvent(hoverEvent); } } protected void handleText(JsonPrimitive text) { } protected void handleTranslate(JsonObject object, String translate) { } protected void handleHoverEvent(JsonObject hoverEvent) { JsonObject contents; String action = hoverEvent.getAsJsonPrimitive("action").getAsString(); if (action.equals("show_text")) { JsonElement value = hoverEvent.get("value"); this.processText(value != null ? value : hoverEvent.get("contents")); } else if (action.equals("show_entity") && (contents = hoverEvent.getAsJsonObject("contents")) != null) { this.processText(contents.get("name")); } } private void processAsArray(JsonElement element) { for (JsonElement jsonElement : element.getAsJsonArray()) { this.processText(jsonElement); } } public <T extends Protocol> T getProtocol() { return (T)this.protocol; } }
[ "67242784+KrOySi@users.noreply.github.com" ]
67242784+KrOySi@users.noreply.github.com
d56ffdcaa33f9746dd98ccab6da3151d32782438
89972779259818d76e3d249a52153e4f42dd9501
/old/vnm-selfcare-webapps-mega2-master/vnm-selfcare-core-2.0/src/main/java/com/gnv/vnm/selfcare/core/adapter/upcc/ws/SInSubscriberAccountParaVO.java
eb0bead71361c6223eed1d05b6799def878f2420
[]
no_license
SM-Tiwari/Spring-Security
5514149eb7e082e04f04dab0cbcbf9fb1df5d84e
f0676d3a96748d476c226ba7e724896eab77fa71
refs/heads/master
2022-12-28T18:07:32.056655
2020-01-31T03:31:13
2020-01-31T03:31:13
237,351,143
0
0
null
2022-12-10T01:04:42
2020-01-31T03:10:35
Java
UTF-8
Java
false
false
2,682
java
package com.gnv.vnm.selfcare.core.adapter.upcc.ws; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for SInSubscriberAccountParaVO complex type. * * <p>The following schema fragment specifies the expected result contained within this class. * * <pre> * &lt;complexType name="SInSubscriberAccountParaVO"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="subscriber" type="{rm:type}SPccSubscriber"/> * &lt;element name="subscriberAccount" type="{rm:type}SSubscriberAccount" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SInSubscriberAccountParaVO", propOrder = { "subscriber", "subscriberAccount" }) public class SInSubscriberAccountParaVO { @XmlElement(required = true) protected SPccSubscriber subscriber; protected List<SSubscriberAccount> subscriberAccount; /** * Gets the value of the subscriber property. * * @return * possible object is * {@link SPccSubscriber } * */ public SPccSubscriber getSubscriber() { return subscriber; } /** * Sets the value of the subscriber property. * * @param value * allowed object is * {@link SPccSubscriber } * */ public void setSubscriber(SPccSubscriber value) { this.subscriber = value; } /** * Gets the value of the subscriberAccount property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the subscriberAccount property. * * <p> * For example, to add a new item, do as follows: * <pre> * getSubscriberAccount().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link SSubscriberAccount } * * */ public List<SSubscriberAccount> getSubscriberAccount() { if (subscriberAccount == null) { subscriberAccount = new ArrayList<SSubscriberAccount>(); } return this.subscriberAccount; } }
[ "siddhesh.mani@infotelgroup.in" ]
siddhesh.mani@infotelgroup.in
199369d8a35a41fc332e1ecaad383fbaa6bb01c3
7cfde3b082522eeb5fb1d4546ebc6ab24a4f11a4
/wgames/gameserver/src/main/java/org/linlinjava/litemall/gameserver/data/vo/Vo_41009_0.java
db63ea1d2446a4d62b4ed850477fe085f0989858
[]
no_license
miracle-ET/DreamInMiracle
9f784e7f373e78a7011aceb2b5b78ce6f5b7c268
2587221feb4fd152fc91cabd533b383c7e44b86f
refs/heads/master
2022-07-21T21:44:55.253764
2020-01-03T03:59:17
2020-01-03T03:59:17
231,498,544
0
2
null
2022-06-21T02:33:57
2020-01-03T02:41:06
Java
UTF-8
Java
false
false
130
java
package org.linlinjava.litemall.gameserver.data.vo; public class Vo_41009_0 { public int server_time; public int time_zone; }
[ "Administrator@DESKTOP-M4SH3SF" ]
Administrator@DESKTOP-M4SH3SF
e701a00d6f678cd91726a65c4dbbdc8bb34337ac
54bafa3495c01a9530a662d441d45f35652e062f
/src/main/java/cn/promore/bf/action/LogAction.java
890459e23f2570d48061d5989c57e806b92a75b7
[]
no_license
zskang/tsj
d20f397762d230c487c0c9ce2e7a2863dd83050f
0ff6bafec55e77f86097b164fd4f0b48db35eeff
refs/heads/master
2021-07-13T12:46:51.300209
2017-10-18T09:57:45
2017-10-18T09:57:52
107,389,919
0
0
null
null
null
null
UTF-8
Java
false
false
5,441
java
package cn.promore.bf.action; /** * @author huzd@si-tech.com.cn or ahhzd@vip.qq.com */ import java.util.Collection; import java.util.Date; import java.util.Enumeration; import java.util.List; import javax.annotation.Resource; import org.apache.log4j.Level; import org.apache.log4j.LogManager; import org.apache.log4j.MDC; import org.apache.log4j.spi.LoggerRepository; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.ParentPackage; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cache.ehcache.EhCacheCache; import org.springframework.cache.ehcache.EhCacheCacheManager; import org.springframework.stereotype.Controller; import cn.promore.bf.bean.Log; import cn.promore.bf.bean.Page; import cn.promore.bf.serivce.LogService; import net.sf.ehcache.management.CacheStatistics; @Controller @Action(value="logAction") @ParentPackage("huzdDefault") @Results({@Result(name="result",type="json"), @Result(name="list",type="json",params={"includeProperties","logs\\[\\d+\\]\\.(id|username|clientIp|operateModule|operateModuleName|operateType|operateTime|operateContent|operateResult),page\\.(\\w+),flag,message","excludeNullProperties","true"}) }) public class LogAction extends BaseAction{ public static Logger LOG = LoggerFactory.getLogger(LogAction.class); private static final long serialVersionUID = -8613055080615406396L; @Resource LogService logService; @Resource EhCacheCacheManager ehCacheManager; private Log log; private boolean flag = true; private String message; private Page page; private List<Log> logs; private Date startDate; private Date endDate; public LogAction() { MDC.put("operateModuleName","日志管理"); } @RequiresPermissions("log:get") public String list(){ if(null==page)page=new Page(); page.setTotalRecords(logService.findDatasNo(log, startDate, endDate)); logs = logService.findDatas(log, page, startDate, endDate); MDC.put("operateContent","日志列表查询"); LOG.info(""); return "list"; } public String changeLogLevel(){ LoggerRepository loggerRepository = org.apache.log4j.LogManager.getLoggerRepository(); System.out.println("===========getCurrentCategories============"); Enumeration<?> allCategories = loggerRepository.getCurrentCategories(); while(allCategories.hasMoreElements()){ org.apache.log4j.Logger logger = (org.apache.log4j.Logger)allCategories.nextElement(); if(logger.getName().indexOf("cn.promore")!=-1)System.out.println("------------"+logger.getName()); } System.out.println("=================getCurrentLoggers======Threshold:" + loggerRepository.getThreshold()); Enumeration<?> allLoggers = loggerRepository.getCurrentLoggers(); while(allLoggers.hasMoreElements()){ org.apache.log4j.Logger logger = (org.apache.log4j.Logger)allLoggers.nextElement(); if(logger.getName().indexOf("cn.promore")!=-1){ System.out.println("------------"+logger.getName()); }else { LogManager.getLogger(logger.getName()).setLevel(Level.OFF); } } System.out.println("======================="+LogManager.getRootLogger().getLevel()); //LogManager.getLogger(DocumentAction.class.getName()).setLevel(Level.INFO); return "result"; } public String cache(){ Collection<String> caches = ehCacheManager.getCacheNames(); for(String cacheName:caches){ System.out.println("缓存名称:"+cacheName); EhCacheCache cache = (EhCacheCache)ehCacheManager.getCache(cacheName); CacheStatistics cacheStatistics = new CacheStatistics(cache.getNativeCache()); System.out.println("缓存命中率:缓存命中:"+cacheStatistics.getCacheHits()+",缓存未命中:"+cacheStatistics.getCacheMisses()+"["+cacheStatistics.getCacheHitPercentage()+"]"); System.out.println("缓存存储对象数:"+cacheStatistics.getMemoryStoreObjectCount()); System.out.println("getInMemoryHitPercentage"+cacheStatistics.getInMemoryHitPercentage()); System.out.println("getOffHeapHitPercentage"+cacheStatistics.getOffHeapHitPercentage()); System.out.println("getOnDiskHitPercentage"+cacheStatistics.getOnDiskHitPercentage()); } return null; } public String cleanCache(){ Collection<String> caches = ehCacheManager.getCacheNames(); for(String cacheName:caches){ System.out.println("缓存名称:"+cacheName); EhCacheCache cache = (EhCacheCache)ehCacheManager.getCache(cacheName); cache.clear(); } return null; } public Log getLog() { return log; } public void setLog(Log log) { this.log = log; } public boolean isFlag() { return flag; } public void setFlag(boolean flag) { this.flag = flag; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public Page getPage() { return page; } public void setPage(Page page) { this.page = page; } public List<Log> getLogs() { return logs; } public void setLogs(List<Log> logs) { this.logs = logs; } public Date getStartDate() { return startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } public Date getEndDate() { return endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } }
[ "253479240@qq.com" ]
253479240@qq.com
e52e65e77bd41810084a5ea9e1d60f0b632533cb
82cc2675fdc5db614416b73307d6c9580ecbfa0c
/eb-service/core-service/src/main/java/cn/comtom/core/main/omd/dao/OmdRequestDao.java
6cbceaf47a7e769539f33eb72f7638ff800c7d5a
[]
no_license
hoafer/ct-ewbsv2.0
2206000c4d7c3aaa2225f9afae84a092a31ab447
bb94522619a51c88ebedc0dad08e1fd7b8644a8c
refs/heads/master
2022-11-12T08:41:26.050044
2020-03-20T09:05:36
2020-03-20T09:05:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
569
java
package cn.comtom.core.main.omd.dao; import cn.comtom.core.fw.BaseDao; import cn.comtom.core.fw.CoreMapper; import cn.comtom.core.main.omd.entity.dbo.OmdRequest; import cn.comtom.core.main.omd.mapper.OmdRequestMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @Repository public class OmdRequestDao extends BaseDao<OmdRequest,String> { @Autowired private OmdRequestMapper mapper; @Override public CoreMapper<OmdRequest, String> getMapper() { return mapper; } }
[ "568656253@qq.com" ]
568656253@qq.com
5ddeb62e61c5017d9c402b6c6846e28f458409b7
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/130/082/CWE190_Integer_Overflow__int_max_square_04.java
9a35bbcb2ed44b7c693b934cf76c95b45bf98a36
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
6,617
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__int_max_square_04.java Label Definition File: CWE190_Integer_Overflow__int.label.xml Template File: sources-sinks-04.tmpl.java */ /* * @description * CWE: 190 Integer Overflow * BadSource: max Set data to the maximum value for int * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: square * GoodSink: Ensure there will not be an overflow before squaring data * BadSink : Square data, which can lead to overflow * Flow Variant: 04 Control flow: if(PRIVATE_STATIC_FINAL_TRUE) and if(PRIVATE_STATIC_FINAL_FALSE) * * */ public class CWE190_Integer_Overflow__int_max_square_04 extends AbstractTestCase { /* The two variables below are declared "final", so a tool should * be able to identify that reads of these will always return their * initialized values. */ private static final boolean PRIVATE_STATIC_FINAL_TRUE = true; private static final boolean PRIVATE_STATIC_FINAL_FALSE = false; public void bad() throws Throwable { int data; if (PRIVATE_STATIC_FINAL_TRUE) { /* POTENTIAL FLAW: Use the maximum value for this type */ data = Integer.MAX_VALUE; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } if (PRIVATE_STATIC_FINAL_TRUE) { /* POTENTIAL FLAW: if (data*data) > Integer.MAX_VALUE, this will overflow */ int result = (int)(data * data); IO.writeLine("result: " + result); } } /* goodG2B1() - use goodsource and badsink by changing first PRIVATE_STATIC_FINAL_TRUE to PRIVATE_STATIC_FINAL_FALSE */ private void goodG2B1() throws Throwable { int data; if (PRIVATE_STATIC_FINAL_FALSE) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } else { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } if (PRIVATE_STATIC_FINAL_TRUE) { /* POTENTIAL FLAW: if (data*data) > Integer.MAX_VALUE, this will overflow */ int result = (int)(data * data); IO.writeLine("result: " + result); } } /* goodG2B2() - use goodsource and badsink by reversing statements in first if */ private void goodG2B2() throws Throwable { int data; if (PRIVATE_STATIC_FINAL_TRUE) { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } if (PRIVATE_STATIC_FINAL_TRUE) { /* POTENTIAL FLAW: if (data*data) > Integer.MAX_VALUE, this will overflow */ int result = (int)(data * data); IO.writeLine("result: " + result); } } /* goodB2G1() - use badsource and goodsink by changing second PRIVATE_STATIC_FINAL_TRUE to PRIVATE_STATIC_FINAL_FALSE */ private void goodB2G1() throws Throwable { int data; if (PRIVATE_STATIC_FINAL_TRUE) { /* POTENTIAL FLAW: Use the maximum value for this type */ data = Integer.MAX_VALUE; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } if (PRIVATE_STATIC_FINAL_FALSE) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); } else { /* FIX: Add a check to prevent an overflow from occurring */ /* NOTE: Math.abs of the minimum int or long will return that same value, so we must check for it */ if ((data != Integer.MIN_VALUE) && (data != Long.MIN_VALUE) && (Math.abs(data) <= (long)Math.sqrt(Integer.MAX_VALUE))) { int result = (int)(data * data); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too large to perform squaring."); } } } /* goodB2G2() - use badsource and goodsink by reversing statements in second if */ private void goodB2G2() throws Throwable { int data; if (PRIVATE_STATIC_FINAL_TRUE) { /* POTENTIAL FLAW: Use the maximum value for this type */ data = Integer.MAX_VALUE; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } if (PRIVATE_STATIC_FINAL_TRUE) { /* FIX: Add a check to prevent an overflow from occurring */ /* NOTE: Math.abs of the minimum int or long will return that same value, so we must check for it */ if ((data != Integer.MIN_VALUE) && (data != Long.MIN_VALUE) && (Math.abs(data) <= (long)Math.sqrt(Integer.MAX_VALUE))) { int result = (int)(data * data); IO.writeLine("result: " + result); } else { IO.writeLine("data value is too large to perform squaring."); } } } public void good() throws Throwable { goodG2B1(); goodG2B2(); goodB2G1(); goodB2G2(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
f09ef2cb2d60dcebfa124937d37015ff61f7cae8
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/ad/bas/rec/AD_BAS_3510_LCURLISTRecord.java
5b3d3b2760635351ba8d1a43946120b865f9a605
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
2,672
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.ad.bas.rec; /** * */ public class AD_BAS_3510_LCURLISTRecord extends java.lang.Object implements java.io.Serializable{ public String oth_clsf; public String pubc_dt; public String pubc_side; public String issu_ser_no; public String std; public String advcs; public String advt_cont; public String indt_clsf; public String slcrg_pers; public String pubc_amt; public String pubc_seq; public AD_BAS_3510_LCURLISTRecord(){} public void setOth_clsf(String oth_clsf){ this.oth_clsf = oth_clsf; } public void setPubc_dt(String pubc_dt){ this.pubc_dt = pubc_dt; } public void setPubc_side(String pubc_side){ this.pubc_side = pubc_side; } public void setIssu_ser_no(String issu_ser_no){ this.issu_ser_no = issu_ser_no; } public void setStd(String std){ this.std = std; } public void setAdvcs(String advcs){ this.advcs = advcs; } public void setAdvt_cont(String advt_cont){ this.advt_cont = advt_cont; } public void setIndt_clsf(String indt_clsf){ this.indt_clsf = indt_clsf; } public void setSlcrg_pers(String slcrg_pers){ this.slcrg_pers = slcrg_pers; } public void setPubc_amt(String pubc_amt){ this.pubc_amt = pubc_amt; } public void setPubc_seq(String pubc_seq){ this.pubc_seq = pubc_seq; } public String getOth_clsf(){ return this.oth_clsf; } public String getPubc_dt(){ return this.pubc_dt; } public String getPubc_side(){ return this.pubc_side; } public String getIssu_ser_no(){ return this.issu_ser_no; } public String getStd(){ return this.std; } public String getAdvcs(){ return this.advcs; } public String getAdvt_cont(){ return this.advt_cont; } public String getIndt_clsf(){ return this.indt_clsf; } public String getSlcrg_pers(){ return this.slcrg_pers; } public String getPubc_amt(){ return this.pubc_amt; } public String getPubc_seq(){ return this.pubc_seq; } } /* 작성시간 : Wed Apr 15 18:21:44 KST 2009 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11