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
16a0705bd4097989060f67ee9b8cebc21051284f
9647246bbb22d3f8d5cb9174d4232e94ca9d1d19
/app/src/main/java/com/linchange/hencoderpracticedraw3/sample/Sample04SetTypefaceView.java
9e7e54364d86e8dfcbca59dc9bf3039ed1c1175e
[]
no_license
lkmc2/PracticeDraw3
03dc205b681210cd9bf39c91076d915b1b1eafdb
187aa42c009f93e82a0d37ba8a0719e496961cbf
refs/heads/master
2021-05-14T18:39:45.683671
2018-01-03T03:04:10
2018-01-03T03:04:10
116,084,466
0
0
null
null
null
null
UTF-8
Java
false
false
1,301
java
package com.linchange.hencoderpracticedraw3.sample; import android.content.Context; import android.graphics.Canvas; import android.graphics.Paint; import android.graphics.Typeface; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.View; public class Sample04SetTypefaceView extends View { Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); String text = "Hello HenCoder"; Typeface typeface; public Sample04SetTypefaceView(Context context) { super(context); } public Sample04SetTypefaceView(Context context, @Nullable AttributeSet attrs) { super(context, attrs); } public Sample04SetTypefaceView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); } { paint.setTextSize(60); typeface = Typeface.createFromAsset(getContext().getAssets(), "Satisfy-Regular.ttf"); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); paint.setTypeface(null); canvas.drawText(text, 50, 100, paint); paint.setTypeface(Typeface.SERIF); canvas.drawText(text, 50, 200, paint); paint.setTypeface(typeface); canvas.drawText(text, 50, 300, paint); } }
[ "lkmc2@163.com" ]
lkmc2@163.com
2ea2c4aaff6eff3ec6f7343a5ade28d6b1fc35ba
ef830bb18e1f432122e1c9523d4c807c9ef077a5
/src/main/java/com/taobao/api/response/LogisticsOnlineCancelResponse.java
08be084a9e436b4418f8d27a0619f7b9eb5d0952
[]
no_license
daiyuok/TopSecuritySdk
bb424c5808bd103079cbbbfcb56689a73259a24d
8ac8eb48b88158a741c820a940564fd0b876e9db
refs/heads/master
2021-01-22T06:49:05.025064
2017-03-01T06:19:42
2017-03-01T06:19:42
81,789,925
2
2
null
null
null
null
UTF-8
Java
false
false
1,167
java
package com.taobao.api.response; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.TaobaoResponse; /** * TOP API: taobao.logistics.online.cancel response. * * @author top auto create * @since 1.0, null */ public class LogisticsOnlineCancelResponse extends TaobaoResponse { private static final long serialVersionUID = 3248234225783773738L; /** * 成功与失败 */ @ApiField("is_success") private Boolean isSuccess; /** * 修改时间 */ @ApiField("modify_time") private String modifyTime; /** * 重新创建物流订单id */ @ApiField("recreated_order_id") private String recreatedOrderId; public void setIsSuccess(Boolean isSuccess) { this.isSuccess = isSuccess; } public Boolean getIsSuccess( ) { return this.isSuccess; } public void setModifyTime(String modifyTime) { this.modifyTime = modifyTime; } public String getModifyTime( ) { return this.modifyTime; } public void setRecreatedOrderId(String recreatedOrderId) { this.recreatedOrderId = recreatedOrderId; } public String getRecreatedOrderId( ) { return this.recreatedOrderId; } }
[ "daixinyu@shopex.cn" ]
daixinyu@shopex.cn
f0050cd6537331bb72bd5a8af91771f7c7de60d1
99c7920038f551b8c16e472840c78afc3d567021
/aliyun-java-sdk-arms-v5/src/main/java/com/aliyuncs/v5/arms/transform/v20190808/SearchRetcodeAppByPageResponseUnmarshaller.java
298b76887a9c9e4251cbb52e6cad30b2b5587097
[ "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
3,113
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.arms.transform.v20190808; import java.util.ArrayList; import java.util.List; import com.aliyuncs.v5.arms.model.v20190808.SearchRetcodeAppByPageResponse; import com.aliyuncs.v5.arms.model.v20190808.SearchRetcodeAppByPageResponse.PageBean; import com.aliyuncs.v5.arms.model.v20190808.SearchRetcodeAppByPageResponse.PageBean.RetcodeApp; import com.aliyuncs.v5.transform.UnmarshallerContext; public class SearchRetcodeAppByPageResponseUnmarshaller { public static SearchRetcodeAppByPageResponse unmarshall(SearchRetcodeAppByPageResponse searchRetcodeAppByPageResponse, UnmarshallerContext _ctx) { searchRetcodeAppByPageResponse.setRequestId(_ctx.stringValue("SearchRetcodeAppByPageResponse.RequestId")); PageBean pageBean = new PageBean(); pageBean.setTotalCount(_ctx.integerValue("SearchRetcodeAppByPageResponse.PageBean.TotalCount")); pageBean.setPageNumber(_ctx.integerValue("SearchRetcodeAppByPageResponse.PageBean.PageNumber")); pageBean.setPageSize(_ctx.integerValue("SearchRetcodeAppByPageResponse.PageBean.PageSize")); List<RetcodeApp> retcodeAppsList = new ArrayList<RetcodeApp>(); for (int i = 0; i < _ctx.lengthValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps.Length"); i++) { RetcodeApp retcodeApp = new RetcodeApp(); retcodeApp.setAppId(_ctx.longValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps["+ i +"].AppId")); retcodeApp.setPid(_ctx.stringValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps["+ i +"].Pid")); retcodeApp.setAppName(_ctx.stringValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps["+ i +"].AppName")); retcodeApp.setType(_ctx.stringValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps["+ i +"].Type")); retcodeApp.setUserId(_ctx.stringValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps["+ i +"].UserId")); retcodeApp.setRegionId(_ctx.stringValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps["+ i +"].RegionId")); retcodeApp.setCreateTime(_ctx.longValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps["+ i +"].CreateTime")); retcodeApp.setUpdateTime(_ctx.longValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps["+ i +"].UpdateTime")); retcodeApp.setRetcodeAppType(_ctx.stringValue("SearchRetcodeAppByPageResponse.PageBean.RetcodeApps["+ i +"].RetcodeAppType")); retcodeAppsList.add(retcodeApp); } pageBean.setRetcodeApps(retcodeAppsList); searchRetcodeAppByPageResponse.setPageBean(pageBean); return searchRetcodeAppByPageResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
75c48cfc1867f3de49b982936c7ad1edd597e8d9
b5502ea9580e882a1c530f6e5914ce090e2d00a6
/experiment/CASSANDRA/cassandra/src/java/org/apache/cassandra/db/AbstractBufferClusteringPrefix.java
3260953b5e5b4f8d465a6986c0c31347d48f4036
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-public-domain" ]
permissive
Lingzhi-Ouyang/Almost-Strong-Consistency-Cassandra
a3fb54a8c35805a6810532719d7a8da99998f997
2b9aa8e78e134fc8811ea6caff3daca1f4a92936
refs/heads/master
2021-07-09T01:13:04.424482
2020-11-03T03:12:13
2020-11-03T03:12:13
205,116,322
2
2
null
null
null
null
UTF-8
Java
false
false
2,064
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cassandra.db; import java.nio.ByteBuffer; import org.apache.cassandra.utils.ObjectSizes; public abstract class AbstractBufferClusteringPrefix extends AbstractClusteringPrefix { public static final ByteBuffer[] EMPTY_VALUES_ARRAY = new ByteBuffer[0]; private static final long EMPTY_SIZE = ObjectSizes.measure(Clustering.make(EMPTY_VALUES_ARRAY)); protected final Kind kind; protected final ByteBuffer[] values; protected AbstractBufferClusteringPrefix(Kind kind, ByteBuffer[] values) { this.kind = kind; this.values = values; } public Kind kind() { return kind; } public ClusteringPrefix clustering() { return this; } public int size() { return values.length; } public ByteBuffer get(int i) { return values[i]; } public ByteBuffer[] getRawValues() { return values; } public long unsharedHeapSize() { return EMPTY_SIZE + ObjectSizes.sizeOnHeapOf(values); } public long unsharedHeapSizeExcludingData() { return EMPTY_SIZE + ObjectSizes.sizeOnHeapExcludingData(values); } }
[ "lingzhi.ouyang@outlook.com" ]
lingzhi.ouyang@outlook.com
a66e2e0d63aa6737dcaa9f1164ab0487f3e15833
cacd87f8831b02e254d65c5e86d48264c7493d78
/pc/messageService/messageServer/src/main/java/com/manji/messageserver/requestParam/QueryAllUsersRequestParam.java
7aff6b995c54699e26a4a93a96b21bbb58ca64a9
[]
no_license
lichaoqian1992/beautifulDay
1a5a30947db08d170968611068673d2f0b626eb2
44e000ecd47099dc5342ab8a208edea73602760b
refs/heads/master
2021-07-24T22:48:33.067359
2017-11-03T09:06:15
2017-11-03T09:06:15
108,791,908
0
3
null
null
null
null
UTF-8
Java
false
false
479
java
package com.manji.messageserver.requestParam; import lombok.Data; import javax.validation.ConstraintViolation; import java.util.Set; /** * Created by Administrator on 2016/12/14. */ @Data public class QueryAllUsersRequestParam extends BaseRequestParam{ private String cursor; @Override public <T> T click() { Set<ConstraintViolation<QueryAllUsersRequestParam>> validate = validator.validate(this); return (T) validate; } }
[ "1015598423@qq.com" ]
1015598423@qq.com
2b1bc560c34b4f68129364208f62d5d2c219645c
c54c2a85be055075876aab06100a75ed805a1ebb
/src/main/java/courseallocationsystem/edd/TreeNode.java
a67e71820a53deaf9dff02e84b1e8320c18d2602
[]
no_license
L2AsHdz/CourseAllocationSystem
ff20fabc7f8971b95d5c8dcb4fc7db64844e4a5e
01335cde01468e0482451a21b465c449c751cd64
refs/heads/master
2023-05-02T05:38:29.472233
2021-05-21T15:47:37
2021-05-21T15:47:37
362,756,653
0
0
null
null
null
null
UTF-8
Java
false
false
696
java
package courseallocationsystem.edd; /** * * @param <T> * @date 6/04/2021 * @time 01:21:33 * @author asael */ public class TreeNode<T> { private T dato; private TreeNode<T> left; private TreeNode<T> right; public TreeNode(T dato) { this.dato = dato; } public T getDato() { return dato; } public void setDato(T dato) { this.dato = dato; } public TreeNode<T> getLeft() { return left; } public void setLeft(TreeNode<T> left) { this.left = left; } public TreeNode<T> getRight() { return right; } public void setRight(TreeNode<T> right) { this.right = right; } }
[ "leonidas0197@gmail.com" ]
leonidas0197@gmail.com
74f317a330f6b874062263a751781ba199ecc14b
778da6dbb2eb27ace541338d0051f44353c3f924
/src/main/java/com/espertech/esper/client/scopetest/SupportSubscriberMRD.java
30708242a033e6d2954eb73713ba38f4ae9e176d
[]
no_license
jiji87432/ThreadForEsperAndBenchmark
daf7188fb142f707f9160173d48c2754e1260ec7
fd2fc3579b3dd4efa18e079ce80d3aee98bf7314
refs/heads/master
2021-12-12T02:15:18.810190
2016-12-01T12:15:01
2016-12-01T12:15:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,047
java
/* * ************************************************************************************* * Copyright (C) 2006-2015 EsperTech, Inc. All rights reserved. * * http://www.espertech.com/esper * * http://www.espertech.com * * ---------------------------------------------------------------------------------- * * The software in this package is published under the terms of the GPL license * * a copy of which has been included with this distribution in the license.txt file. * * ************************************************************************************* */ package com.espertech.esper.client.scopetest; import java.util.ArrayList; import java.util.List; /** * Subscriber for multi-row delivery that retains the events it receives for use in assertions. */ public class SupportSubscriberMRD { private boolean isInvoked; private List<Object[][]> insertStreamList = new ArrayList<Object[][]>(); private List<Object[][]> removeStreamList = new ArrayList<Object[][]>(); /** * Receive multi-row subscriber data through this methods. * @param insertStream new data * @param removeStream removed data */ public synchronized void update(Object[][] insertStream, Object[][] removeStream) { isInvoked = true; insertStreamList.add(insertStream); removeStreamList.add(insertStream); } /** * Returns all insert-stream events received so far. * <p> * The list contains an item for each delivery. Each item contains a row with the event and each event is itself a tuple (object array). * </p> * @return list of Object array-array */ public List<Object[][]> getInsertStreamList() { return insertStreamList; } /** * Returns all removed-stream events received so far. * <p> * The list contains an item for each delivery. Each item contains a row with the event and each event is itself a tuple (object array). * </p> * @return list of Object array-array */ public List<Object[][]> getRemoveStreamList() { return removeStreamList; } /** * Reset subscriber, clearing all associated state. */ public synchronized void reset() { isInvoked = false; insertStreamList.clear(); removeStreamList.clear(); } /** * Returns true if the subscriber was invoked at least once. * @return invoked flag */ public boolean isInvoked() { return isInvoked; } /** * Returns true if the subscriber was invoked at least once and clears the invocation flag. * @return invoked flag */ public synchronized boolean getAndClearIsInvoked() { boolean invoked = isInvoked; isInvoked = false; return invoked; } }
[ "qinjie2012@163.com" ]
qinjie2012@163.com
c4d6529ef3dc8063d4b5371155ba2528a3972cfc
35d105d4e23bd5e5e58221c3d07625e32f2ad052
/hadruwaves/hadruwaves-java/src/main/java/net/vpc/scholar/hadruwaves/builders/AbstractSParametersBuilder.java
5e18d1a95d7ec48361471f1d58b50b556a083fc4
[]
no_license
imenk1986/scholar-mw
a7f9478bd2a56dbcb442217da5429a15030cdd6c
d649ed0b00d7982bf0e537c2bb582eaeeff3df96
refs/heads/master
2021-06-23T07:24:23.828936
2017-08-14T21:20:03
2017-08-14T21:20:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
810
java
package net.vpc.scholar.hadruwaves.builders; import net.vpc.scholar.hadrumaths.convergence.ConvergenceEvaluator; import net.vpc.scholar.hadrumaths.util.ProgressMonitor; import net.vpc.scholar.hadruwaves.str.MWStructure; /** * @author taha.bensalah@gmail.com on 7/16/16. */ public abstract class AbstractSParametersBuilder extends AbstractComplexBuilder implements SParametersBuilder{ public AbstractSParametersBuilder(MWStructure structure) { super(structure); } @Override public SParametersBuilder monitor(ProgressMonitor monitor) { return (SParametersBuilder) super.monitor(monitor); } @Override public SParametersBuilder converge(ConvergenceEvaluator convergenceEvaluator) { return (SParametersBuilder) super.converge(convergenceEvaluator); } }
[ "canard77" ]
canard77
795e605b7dfb540e165ce7610449f2d6eca3307f
563c6dae5141ee42174c95ff53852045e5de9b61
/20171104 SP4(DI vs AOP)/src/configuration/lesson17p177/ConfigurableMessageProvider.java
3c70ba4dfa85633f4ec06bced3cda285190712a4
[]
no_license
VictorLeonidovich/SpringHibernateLessons
79510b5a569b0e43449b78328b047397d75106ec
54bd8408c9b0174c2a9e311885005578b52271e7
refs/heads/master
2020-04-01T14:19:10.990814
2018-10-16T13:41:55
2018-10-16T13:41:55
153,289,407
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
package configuration.lesson17p177; public class ConfigurableMessageProvider implements MessageProvider{ private String message = "Default message"; public ConfigurableMessageProvider() { } public ConfigurableMessageProvider(String message) { this.message = message; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } }
[ "k-v-l@tut.by" ]
k-v-l@tut.by
a7ead7243c7d29e1cc5f96a75ed9846b479c9b2a
600df3590cce1fe49b9a96e9ca5b5242884a2a70
/chrome/android/java/src/org/chromium/chrome/browser/blimp/ChromeBlimpClientContextDelegate.java
858108c7681613430c30017948613dc1d9393334
[ "BSD-3-Clause" ]
permissive
metux/chromium-suckless
efd087ba4f4070a6caac5bfbfb0f7a4e2f3c438a
72a05af97787001756bae2511b7985e61498c965
refs/heads/orig
2022-12-04T23:53:58.681218
2017-04-30T10:59:06
2017-04-30T23:35:58
89,884,931
5
3
BSD-3-Clause
2022-11-23T20:52:53
2017-05-01T00:09:08
null
UTF-8
Java
false
false
3,999
java
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.blimp; import android.content.Context; import org.chromium.base.annotations.CalledByNative; import org.chromium.blimp_public.BlimpClientContext; import org.chromium.blimp_public.BlimpClientContextDelegate; import org.chromium.chrome.browser.ApplicationLifetime; import org.chromium.chrome.browser.profiles.Profile; import org.chromium.chrome.browser.signin.AccountSigninActivity; import org.chromium.chrome.browser.signin.SigninAccessPoint; /** * The ChromeBlimpClientContextDelegate for //chrome which provides the necessary functionality * required to run Blimp. This is the Java counterparty to the C++ * ChromeBlimpClientContextDelegateAndroid. * * There can only be a single delegate for any given BlimpClientContext. To create one and attach * it, call {@link ChromeBlimpClientContextDelegate#createAndSetDelegateForContext(Profile)}. * When the delegate should be deleted, a call to {@link #destroy} is required. */ public class ChromeBlimpClientContextDelegate implements BlimpClientContextDelegate { /** * {@link BlimpClientContext} associated with this delegate. */ private BlimpClientContext mBlimpClientContext; /** * Creates a new ChromeBlimpClientContextDelegate that is owned by the caller. It automatically * attaches itself as the sole delegate for the BlimpClientContext attached to the given * profile. When the delegate should be deleted, the caller of this method must call * {@link #destroy()} to ensure that the native counterparts are cleaned up. The call to * {@link #destroy()} also removes the delegate from the BlimpClientContext by clearing the * pointer for the delegate by calling BlimpClientContext::SetDelegate(nullptr). * * @param profile The profile to use to look for the BlimpClientContext. * @return The newly created delegate, owned by the caller. */ public static ChromeBlimpClientContextDelegate createAndSetDelegateForContext(Profile profile) { return new ChromeBlimpClientContextDelegate(profile); } /** * @return {@link BlimpClientContext} object this delegate belongs to. */ public BlimpClientContext getBlimpClientContext() { return mBlimpClientContext; } @Override public void restartBrowser() { ApplicationLifetime.terminate(true); } @Override public void startUserSignInFlow(Context context) { // TODO(xingliu): Figure out if Blimp should have its own SigninAccessPoint. AccountSigninActivity.startAccountSigninActivity(context, SigninAccessPoint.SETTINGS); } /** * The pointer to the ChromeBlimpClientContextDelegateAndroid JNI bridge. */ private long mNativeChromeBlimpClientContextDelegateAndroid; private ChromeBlimpClientContextDelegate(Profile profile) { // Create native delegate object. mNativeChromeBlimpClientContextDelegateAndroid = nativeInit(profile); BlimpClientContext context = BlimpClientContextFactory.getBlimpClientContextForProfile(profile); mBlimpClientContext = context; // Set ourselves as the Java delegate object. mBlimpClientContext.setDelegate(this); // Connect to engine on start up. if (mBlimpClientContext.isBlimpEnabled()) { mBlimpClientContext.connect(); } } @CalledByNative private void clearNativePtr() { mNativeChromeBlimpClientContextDelegateAndroid = 0; } public void destroy() { assert mNativeChromeBlimpClientContextDelegateAndroid != 0; nativeDestroy(mNativeChromeBlimpClientContextDelegateAndroid); } private native long nativeInit(Profile profile); private native void nativeDestroy(long nativeChromeBlimpClientContextDelegateAndroid); }
[ "enrico.weigelt@gr13.net" ]
enrico.weigelt@gr13.net
6e99634b4553c1cbf514b5e10601f115542c8814
7219f75733d906ff930e1b6ba1be249d6007b582
/src/com/vikings/sanguo/ui/alert/UpdateBonusTip.java
d14a4768be1f1a50de9ebc7f1d56968ef1bcea14
[]
no_license
wongainia/sanguo
9c9b528a3b4cfaf58f94badf71add1b8bb77e038
55e38be665f1b9e3a4dc7a1caaa09728563cf4b2
refs/heads/master
2020-05-23T09:51:26.455001
2019-05-14T22:44:06
2019-05-14T22:44:06
186,711,060
0
1
null
null
null
null
UTF-8
Java
false
false
3,385
java
package com.vikings.sanguo.ui.alert; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.webkit.WebChromeClient; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.LinearLayout.LayoutParams; import com.vikings.sanguo.R; import com.vikings.sanguo.cache.Account; import com.vikings.sanguo.cache.CacheMgr; import com.vikings.sanguo.config.Config; import com.vikings.sanguo.invoker.CheckVersion; import com.vikings.sanguo.invoker.FinishQuestInvoker; import com.vikings.sanguo.model.Dict; import com.vikings.sanguo.model.QuestInfoClient; import com.vikings.sanguo.thread.UpdateVersion; import com.vikings.sanguo.ui.Home; import com.vikings.sanguo.utils.ViewUtil; import com.vikings.sanguo.widget.CustomConfirmDialog; public class UpdateBonusTip extends CustomConfirmDialog { private QuestInfoClient qic; private View update; private Home home; // 强制更新时调用 public UpdateBonusTip(Home home) { this.home = home; } public UpdateBonusTip() { super("下载新版本活动"); update = content.findViewById(R.id.update); ViewGroup body = (ViewGroup) findViewById(R.id.body); setRightTopCloseBtn(); body.addView(getWebContent()); if (Config.isSmallScreen()) { View scrollFrame = tip.findViewById(R.id.scrollFrame); LayoutParams lp = (LayoutParams) scrollFrame.getLayoutParams(); lp.height = (int) (270 * Config.SCALE_FROM_HIGH); } } @Override public void show() { qic = Account.getUpdateQuest(); if (null == qic) return; setValue(); super.show(); } private void setValue() { int ver = CacheMgr.dictCache.getDictInt(Dict.TYPE_CLIENT_VERSION, 1); if (CheckVersion.isNewer(ver)) { ViewUtil.setText(update, "立即领奖"); update.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { dismiss(); if (qic != null) new FinishQuestInvoker(qic).start(); } }); } else { ViewUtil.setText(update, "立即更新"); update.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { dismiss(); if (null != home) { new UpdateVersion(home).start(); } else { new UpdateVersion(controller.getCastleWindow() .showDownload()).start(); controller.closeAllPopup(); } } }); } } @Override protected View getContent() { return controller.inflate(R.layout.alert_update_bonus, contentLayout, false); } protected WebView getWebContent() { WebView webView = ViewUtil.getWebView(controller.getUIContext()); webView.setWebViewClient(new WebViewClient() { public boolean shouldOverrideUrlLoading(WebView view, String url) { // 当有新连接时,使用当前的 WebView view.loadUrl(url); return true; } }); webView.setWebChromeClient(new WebChromeClient() { @Override public void onProgressChanged(WebView view, int newProgress) { if (null != content) { if (newProgress == 100) { ViewUtil.setGone(content, R.id.loading); ViewUtil.setVisible(content, R.id.scroll); } else { ViewUtil.setVisible(content, R.id.loading); ViewUtil.setGone(content, R.id.scroll); } } } }); String urlStr = CacheMgr.dictCache.getDict(Dict.TYPE_SITE_ADDR, 32); webView.loadUrl(urlStr); return webView; } }
[ "dengyuanming@dengyuanming" ]
dengyuanming@dengyuanming
998fc7ad7ed077c87a6b681af51c0608bc7057ec
fcf30c6d484de4e825b6cab8e7b59f1b65447a91
/distributed-and-concurrent/mq/rocketmq/rocketmq-api/src/main/java/com/natsuki_kining/rocketmq/qingshan/SimpleConsumer.java
29e9c4b2e73d06d016a833d5e6c8e1fecf5c2cda
[]
no_license
natsuki-kining/java-demo
7a2f3cdd2ff2d6b23f7269e00c48fd69e359d2b0
ad569bd15e96671ae2421c4f752016a5c50c2198
refs/heads/master
2022-07-09T15:57:18.058190
2021-05-04T15:54:08
2021-05-04T15:54:08
235,028,307
0
0
null
2022-06-30T20:22:48
2020-01-20T05:50:12
Java
UTF-8
Java
false
false
2,501
java
package com.natsuki_kining.rocketmq.qingshan; import org.apache.rocketmq.client.consumer.DefaultMQPushConsumer; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus; import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently; import org.apache.rocketmq.client.exception.MQClientException; import org.apache.rocketmq.common.message.MessageExt; import org.apache.rocketmq.common.protocol.heartbeat.MessageModel; import java.io.UnsupportedEncodingException; import java.util.List; public class SimpleConsumer { public static void main(String[] args) throws MQClientException { // Instantiate with specified consumer group name. DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("my_test_consumer_group"); // Specify name server addresses. consumer.setNamesrvAddr("192.168.44.163:9876;192.168.44.164:9876"); consumer.setMessageModel(MessageModel.BROADCASTING); // Subscribe one more more topics to consume. consumer.subscribe("q-2-1", "*"); // Register callback to execute on arrival of messages fetched from brokers. consumer.registerMessageListener(new MessageListenerConcurrently() { @Override public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs, ConsumeConcurrentlyContext context) { System.out.printf("%s Receive New Messages: %s %n", Thread.currentThread().getName(), msgs); for(MessageExt msg : msgs){ String topic = msg.getTopic(); String messageBody=""; try { messageBody = new String(msg.getBody(),"utf-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); // 重新消费 return ConsumeConcurrentlyStatus.RECONSUME_LATER; } String tags = msg.getTags(); System.out.println("topic:"+topic+",tags:"+tags+",msg:"+messageBody); } // 消费成功 return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; } }); //Launch the consumer instance. consumer.start(); System.out.printf("Consumer Started.%n"); } }
[ "natsuki_kining@126.com" ]
natsuki_kining@126.com
d82f114e4c8b07e08f2bb7637ae189c0619d3fda
4a628f90448b092ceed8635e7e328896f44e0501
/server/src/main/java/org/elasticsearch/search/aggregations/metrics/percentiles/tdigest/TDigestPercentileRanksAggregator.java
46642a1035f5a3ad06532bad13499b4cc161285e
[ "Apache-2.0" ]
permissive
jprante/elasticsearch-server
5417fd3a18518f7284a1927aca3932f79f7c8ca0
c84cbbdb06105bd2683a349de320d8d6e4d0b9cf
refs/heads/master
2023-08-14T18:39:50.325513
2019-02-10T18:12:50
2019-02-10T18:12:50
6,097,759
6
13
null
null
null
null
UTF-8
Java
false
false
2,785
java
/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.elasticsearch.search.aggregations.metrics.percentiles.tdigest; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.aggregations.Aggregator; import org.elasticsearch.search.aggregations.InternalAggregation; import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator; import org.elasticsearch.search.aggregations.support.ValuesSource.Numeric; import org.elasticsearch.search.SearchContext; import java.io.IOException; import java.util.List; import java.util.Map; public class TDigestPercentileRanksAggregator extends AbstractTDigestPercentilesAggregator { public TDigestPercentileRanksAggregator(String name, Numeric valuesSource, SearchContext context, Aggregator parent, double[] percents, double compression, boolean keyed, DocValueFormat formatter, List<PipelineAggregator> pipelineAggregators, Map<String, Object> metaData) throws IOException { super(name, valuesSource, context, parent, percents, compression, keyed, formatter, pipelineAggregators, metaData); } @Override public InternalAggregation buildAggregation(long owningBucketOrdinal) { TDigestState state = getState(owningBucketOrdinal); if (state == null) { return buildEmptyAggregation(); } else { return new InternalTDigestPercentileRanks(name, keys, state, keyed, formatter, pipelineAggregators(), metaData()); } } @Override public InternalAggregation buildEmptyAggregation() { return new InternalTDigestPercentileRanks(name, keys, new TDigestState(compression), keyed, formatter, pipelineAggregators(), metaData()); } @Override public double metric(String name, long bucketOrd) { TDigestState state = getState(bucketOrd); if (state == null) { return Double.NaN; } else { return InternalTDigestPercentileRanks.percentileRank(state, Double.valueOf(name)); } } }
[ "joergprante@gmail.com" ]
joergprante@gmail.com
27c7da8b3125755490f9deeca5691ad7fc3becc6
0b637a01dfed1702c1e21ed6365bf505a4b006dc
/src/main/java/rx/transformers/SingleTransformerTest.java
4c0b43602bba8ae56128eca4e417949ed757b9e4
[]
no_license
ArekLopus/RxJavaTest
964b93d8ddf08e1151134a899934df7cfa2fed7b
83fa5759316838c001e4c9cc7d62cd6b11ee647f
refs/heads/master
2021-07-06T09:11:14.157305
2019-07-05T07:39:39
2019-07-05T07:39:39
195,362,560
0
0
null
2020-10-13T14:22:30
2019-07-05T07:39:10
Java
UTF-8
Java
false
false
1,672
java
package rx.transformers; import java.util.Collection; import java.util.Collections; import io.reactivex.Observable; import io.reactivex.SingleTransformer; // Custom Transformers and operators for Singles, Maybes, and Completables //-There are Transformer and operator counterparts for Single, Maybe, and Completable. //-When you want to create an Observable or Flowable operator that yields Single, you might find it easier to convert // it back into an Observable/Flowable by calling its toObservable() or toFlowable() operators. This also applies to Maybe. //-If on some rare occasion you need to create a Transformer or operator specifically to takea Single and transform it into another Single, // you will want to use SingleTransformer or SingleOperator. //-Maybe, Completable have counterparts with MaybeTransformer/MaybeOperator and CompletableTransformer/CompletableOperator. //-The implementation of apply() for all of these should largely be the same experience, and you will use SingleObserver, MaybeObserver, // and CompletableObserver to proxy the upstream and downstream. public class SingleTransformerTest { public SingleTransformerTest() { Observable.just("One", "Two", "Three", "Four").toList() .compose(toUnmodifiable()) .subscribe(System.out::println); System.out.println("--- Main Thread Finished ---"); } public static <T> SingleTransformer<Collection<T>, Collection<T>> toUnmodifiable() { return singleObserver -> singleObserver.map(Collections::unmodifiableCollection); } public static void main(String[] args) { new SingleTransformerTest(); } }
[ "abc@example.com" ]
abc@example.com
26e3ded0bd158e0efb32febea711df9622356c5c
1969ad81fef51f888f12e4b131cd56106a8afa80
/src/test/java/com/dxc/fsg/bpo/directorymanager/web/rest/UserJWTControllerIntTest.java
e29eb27e6971b883f7b895879c7fd12ce1788f4a
[]
no_license
mikebaxley/bpoDirectoryManager
d3fdcbcb0b9ef9c9e44c3afea5bfef4eff879f35
f567b33bb9344a2e112e7857c269c93f0fbb29db
refs/heads/master
2021-08-24T02:29:16.482376
2017-12-07T17:15:22
2017-12-07T17:15:22
113,478,695
0
0
null
null
null
null
UTF-8
Java
false
false
4,986
java
package com.dxc.fsg.bpo.directorymanager.web.rest; import com.dxc.fsg.bpo.directorymanager.BpoDirectoryManagerApp; import com.dxc.fsg.bpo.directorymanager.domain.User; import com.dxc.fsg.bpo.directorymanager.repository.UserRepository; import com.dxc.fsg.bpo.directorymanager.security.jwt.TokenProvider; import com.dxc.fsg.bpo.directorymanager.web.rest.vm.LoginVM; import com.dxc.fsg.bpo.directorymanager.web.rest.errors.ExceptionTranslator; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.isEmptyString; import static org.hamcrest.Matchers.not; /** * Test class for the UserJWTController REST controller. * * @see UserJWTController */ @RunWith(SpringRunner.class) @SpringBootTest(classes = BpoDirectoryManagerApp.class) public class UserJWTControllerIntTest { @Autowired private TokenProvider tokenProvider; @Autowired private AuthenticationManager authenticationManager; @Autowired private UserRepository userRepository; @Autowired private PasswordEncoder passwordEncoder; @Autowired private ExceptionTranslator exceptionTranslator; private MockMvc mockMvc; @Before public void setup() { UserJWTController userJWTController = new UserJWTController(tokenProvider, authenticationManager); this.mockMvc = MockMvcBuilders.standaloneSetup(userJWTController) .setControllerAdvice(exceptionTranslator) .build(); } @Test @Transactional public void testAuthorize() throws Exception { User user = new User(); user.setLogin("user-jwt-controller"); user.setEmail("user-jwt-controller@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller"); login.setPassword("test"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(isEmptyString()))); } @Test @Transactional public void testAuthorizeWithRememberMe() throws Exception { User user = new User(); user.setLogin("user-jwt-controller-remember-me"); user.setEmail("user-jwt-controller-remember-me@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller-remember-me"); login.setPassword("test"); login.setRememberMe(true); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()) .andExpect(header().string("Authorization", not(nullValue()))) .andExpect(header().string("Authorization", not(isEmptyString()))); } @Test @Transactional public void testAuthorizeFails() throws Exception { LoginVM login = new LoginVM(); login.setUsername("wrong-user"); login.setPassword("wrong password"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isUnauthorized()) .andExpect(jsonPath("$.id_token").doesNotExist()) .andExpect(header().doesNotExist("Authorization")); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
c760508c4a0b7cb10bc3f90cfc66c789fbfc7670
0509330f67b7c75697a7e8e2216fbab8ea113041
/sms-api/src/main/java/com/sms/api/service/SignatureService.java
2650fc1e80301be96b37c95533b7cc359816390c
[ "Apache-2.0" ]
permissive
hewoyexiaoyao/sms-backend
e0b222db6b7ef5b9631b97b0ad7d46ba85570f2e
8d9c36063063bfc1b329508b10599fab22f10782
refs/heads/master
2023-07-16T21:29:17.572020
2021-08-18T06:27:40
2021-08-18T06:27:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
273
java
package com.sms.api.service; import com.baomidou.mybatisplus.extension.service.IService; import com.sms.entity.SignatureEntity; /** * 签名表 */ public interface SignatureService extends IService<SignatureEntity> { SignatureEntity getByCode(String signature); }
[ "yueliminvc@outlook.com" ]
yueliminvc@outlook.com
07290475d2520a4467ec1c6cbd49d875e12a7c9a
6d4d1066424aa064735077b5eb9442398ee12016
/yopsaas-wx-api/src/main/java/com/yongche/yopsaas/wx/service/YopToftService.java
b9209492070e1dc5a893d590a5cf394900f0dd49
[]
no_license
yongche2010/vibe-saas
c600572b0ad665090f145095d142e20b4cb01a73
fef65af3b97e0dc3a73e4e679972dcee4cdac30b
refs/heads/master
2022-12-15T17:01:02.701777
2020-09-07T04:13:10
2020-09-07T04:13:10
254,801,366
0
1
null
null
null
null
UTF-8
Java
false
false
5,174
java
package com.yongche.yopsaas.wx.service; import com.ridegroup.yop.api.BaseAPI; import com.ridegroup.yop.bean.BaseResultT; import com.ridegroup.yop.bean.price.PriceNew; import com.ridegroup.yop.bean.toft.AvailableService; import com.ridegroup.yop.bean.toft.Estimated; import com.yongche.yopsaas.core.util.JacksonUtil; import com.yongche.yopsaas.core.util.ResponseUtil; import com.yongche.yopsaas.core.yop.ToftService; import org.apache.commons.logging.Log; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.apache.commons.logging.LogFactory; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @Service public class YopToftService { private final Log logger = LogFactory.getLog(YopToftService.class); @Autowired private ToftService toftService; public Object estimatedAll(String body) { /* * city 城市 * bj type 产品类型 * 7 aircode 机场三字码,接送机必传,接机则传到达机场三字码、送机则传起飞机场三字码接送机必填 PEK car_type_id 车型 * 2 expect_start_longitude 出发地点经度 * 116.458637 expect_start_latitude 出发地点纬度 * 39.955538 expect_end_longitude 目的地点经度 * 116.373055 expect_end_latitude 目的地点纬度 * 39.911093 time 开始时间 * 2013-04-19 11:22:33 rent_time 使用时长 单位:小时,时租必填 2 map_type 地图类型 1-百度 2-火星 3-谷歌 默认 1-百度 * 2 reqMap.put("city", "bj"); reqMap.put("type", "7"); reqMap.put("aircode", "PEK"); if(hasCarType) { reqMap.put("car_type_id", "2"); } reqMap.put("start_position", "颐和园"); reqMap.put("expect_start_latitude", "39.955538"); reqMap.put("expect_start_longitude", "116.458637"); reqMap.put("time", df.format(calendar.getTime())); reqMap.put("rent_time", "2"); reqMap.put("end_position", "总部基地"); reqMap.put("expect_end_latitude", "39.911093"); reqMap.put("expect_end_longitude", "116.373055"); reqMap.put("map_type", BaseAPI.MAP_TYPE_MARS);*/ String city = JacksonUtil.parseString(body, "city"); String productType = JacksonUtil.parseString(body, "product_type_id"); String startAddress = JacksonUtil.parseString(body, "start_address"); String startLatitude = JacksonUtil.parseString(body, "start_latitude"); String startLongitude = JacksonUtil.parseString(body, "start_longitude"); String startTime = JacksonUtil.parseString(body, "start_time"); String endAddress = JacksonUtil.parseString(body, "end_position"); String endLatitude = JacksonUtil.parseString(body, "end_latitude"); String endLongitude = JacksonUtil.parseString(body, "end_longitude"); Map<String, Object> reqMap = new HashMap<String, Object>(); reqMap.put("city", city); reqMap.put("type", productType); reqMap.put("start_position", startAddress); reqMap.put("expect_start_latitude", startLatitude); reqMap.put("expect_start_longitude", startLongitude); Date date = new Date(Long.valueOf(startTime) * 1000); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); reqMap.put("time", df.format(date)); reqMap.put("rent_time", "2"); reqMap.put("end_position", endAddress); reqMap.put("expect_end_latitude", endLatitude); reqMap.put("expect_end_longitude", endLongitude); reqMap.put("map_type", BaseAPI.MAP_TYPE_MARS); logger.debug(reqMap); BaseResultT<List<Estimated>> data = this.toftService.estimatedAll(reqMap); if(data.getCode().equals("200")) { return ResponseUtil.ok(data.getResult()); } else { return ResponseUtil.fail(Integer.valueOf(data.getCode()), data.getMsg()); } } public Object getAvailableService() { BaseResultT<Map<String, AvailableService>> data = this.toftService.getAvailableService(); if(data.getCode().equals("200")) { Map<String, Object> result = new HashMap<String, Object>(); result.put("cityList", data.getResult()); long now = System.currentTimeMillis(); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); //获取时间戳 String time = dateFormat.format(now); result.put("version", time); return ResponseUtil.ok(result); } else { return ResponseUtil.fail(Integer.valueOf(data.getCode()), data.getMsg()); } } public Object getPrice(String city, String productType, String airCode) { PriceNew data = this.toftService.getPrice(city, productType, airCode); if(data.getCode().equals("200")) { return ResponseUtil.ok(data.getResult()); } else { return ResponseUtil.fail(Integer.valueOf(data.getCode()), data.getMsg()); } } }
[ "zhangchunsheng423@gmail.com" ]
zhangchunsheng423@gmail.com
96cb5b4201fb73d0dd71c2f79dde78a579df7c07
6992cef1d8dec175490d554f3a1d8cb86cd44830
/Java/JEE/EJBPractises/ex10_1/src/main/com/titan/travelagent/TravelAgentRemote.java
fe02ba71802f721921054e20e8b67056630e2fba
[]
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
351
java
package com.titan.travelagent; import javax.ejb.Remote; import com.titan.domain.Customer; @Remote public interface TravelAgentRemote { public int createCustomer(Customer cust); public Customer findCustomer(int pKey); public void doMerge(Customer cust); public void doFlush(int pKey); public void doRemove(int pKey); }
[ "harri.maenpaa@gmail.com" ]
harri.maenpaa@gmail.com
d7c0be46ba9f47636a97bd427a97233e71e56d33
26f21c96ddb28a9776eff5f09882f61125130788
/meetup-server-client/src/main/java/com/openteach/meetup/server/client/entity/Friend.java
a75169dad3641f6fb5e5e952d179bde579a44c4d
[]
no_license
sihai/meetup-server
1ecdaebaff7a647f55b6e18ff8db71f7233ba7df
4aaa22738c3a166477ad315434302320d6b76f38
refs/heads/master
2020-04-22T22:07:31.843063
2013-12-04T09:11:04
2013-12-04T09:11:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
823
java
package com.openteach.meetup.server.client.entity; /** * * @author sihai * */ public class Friend extends BaseEntity { /** * */ private String user0Id; /** * */ private String user1Id; /** * */ private String message; /** * 0 - requested * 1 - accepted * 2 - rejected */ private int status; public String getUser0Id() { return user0Id; } public String getUser1Id() { return user1Id; } public void setUser0Id(String user0Id) { this.user0Id = user0Id; } public void setUser1Id(String user1Id) { this.user1Id = user1Id; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } }
[ "iac-rq@live.cn" ]
iac-rq@live.cn
1b6fa506e5ee6b68ab3cbb4c544a8a18a4753898
b17e8b87a21877e2c0208065b0303de7cbec4a04
/OOPC/2102 Examples/nov02/StrExample.java
2cd279abd34b59f559ddccf1ae0ac04c90fcc591
[]
no_license
jaithakai91/egreer-wpi
63b799c7fc54cd638c35b8086d6cc71beb37e8f9
628122efb2b717c3906cafffdd1ba0f9ecea3136
refs/heads/master
2023-04-18T14:31:35.452030
2011-03-06T06:31:39
2011-03-06T06:31:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
393
java
package nov02; public class StrExample { /** * String manipulation example. */ public static void main(String[] args) { for (String s = "George"; s.length() > 0; s=s.substring(1,s.length())) { System.out.println (s); } int n = 1024; int log = 0; for (int i = 1; i < n; i = i * 2) { log++; } System.out.println (n + " " + log); } }
[ "greer.eric@gmail.com" ]
greer.eric@gmail.com
7233be4040a770ac8fe37520f50fc1554db53c28
782831d070d5233db071fde183a45244de3b4106
/src/newtimes/shipping/shippingmaintain/AddDetailListDataFactoryAdapter.java
2bbb9c0585ff76d3f69dcf3398a5260b9df6ac2a
[]
no_license
leetungchi/AS_newtimesApp
d71c83f2488d57305b835f7196db77bbdb57bd91
359168c78c293f900a393847b04f8caf812a2eef
refs/heads/master
2020-03-23T21:38:21.763324
2018-07-24T07:56:07
2018-07-24T07:56:07
142,121,479
0
0
null
null
null
null
UTF-8
Java
false
false
1,773
java
package newtimes.shipping.shippingmaintain; import exgui.ultratable.PagedDataFactoryAdapter; import database.datatype.Record; /** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author not attributable * @version 1.0 */ public class AddDetailListDataFactoryAdapter extends PagedDataFactoryAdapter { private static AddDetailListDataFactoryAdapter instanceOfMe = null; public AddDetailListDataFactoryAdapter() { try{ super.ejb = exgui2.CONST.SHIP_DETAIL_EJB; }catch(Exception e){ e.printStackTrace(); exgui2.CONST.SHIP_DETAIL_EJB = null; exgui.verification.VerifyLib.showAlert( "Server side Connection Failed", "Server side Connection Failed"); } } public static AddDetailListDataFactoryAdapter getInstance(){ if(instanceOfMe == null){ instanceOfMe = new AddDetailListDataFactoryAdapter(); } return instanceOfMe; } public java.util.Vector getRecords(int bgn, int rowcount)throws Exception { java.util.Vector vRec = new java.util.Vector(); try { java.util.HashMap hm = (java.util.HashMap)util.ApplicationProperites.getProperties("getData"); if (MasterEdit.SRN_NO != null) { hm.put("SHIP_NO", MasterEdit.SRN_NO); vRec = exgui2.CONST.SHIP_DETAIL_EJB.getRecords(bgn, rowcount, hm); } else { String SRN_NO = util.ApplicationProperites.getProperties("SRN_NO").toString(); hm.put("SHIP_NO", SRN_NO); vRec = exgui2.CONST.SHIP_DETAIL_EJB.getRecords(bgn, rowcount, hm); } } catch (Exception e) { e.printStackTrace(); util.ExceptionLog.exp2File( e, "error at get record source.\n"+"vector: "+vRec.toString()); } return vRec; } }
[ "lee@User-PC" ]
lee@User-PC
e99567a583ca6bcd8b6c13fcf606ef0262bbcab6
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/multitalk/data/MultiTalkGroupMemberData.java
9a7c5897a5d938e6cb7bc41f8591e67445e033fa
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
1,417
java
package com.tencent.mm.plugin.multitalk.data; import android.os.Parcel; import android.os.Parcelable; import android.os.Parcelable.Creator; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.sdk.platformtools.bo; import com.tencent.pb.talkroom.sdk.MultiTalkGroupMember; public class MultiTalkGroupMemberData implements Parcelable { public static final Parcelable.Creator<MultiTalkGroupMemberData> CREATOR; MultiTalkGroupMember oFO; static { AppMethodBeat.i(53884); CREATOR = new Parcelable.Creator() { }; AppMethodBeat.o(53884); } public MultiTalkGroupMemberData(MultiTalkGroupMember paramMultiTalkGroupMember) { this.oFO = paramMultiTalkGroupMember; } public int describeContents() { return 0; } public void writeToParcel(Parcel paramParcel, int paramInt) { AppMethodBeat.i(53883); paramParcel.writeString(bo.bc(this.oFO.Aqh, "")); paramParcel.writeString(bo.bc(this.oFO.Aqi, "")); paramParcel.writeInt(this.oFO.status); paramParcel.writeInt(this.oFO.boZ); paramParcel.writeInt(this.oFO.Api); AppMethodBeat.o(53883); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes2-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.multitalk.data.MultiTalkGroupMemberData * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
d2259008510a06f8459db62a33743363e55b67a8
c80f25f9c8faa1ea9db5bb1b8e36c3903a80a58b
/laosiji-sources/feng/android/sources/com/umeng/analytics/pro/m.java
f7ce6c15b138424affe5682238b9ebbc20eb7a78
[]
no_license
wenzhaot/luobo_tool
05c2e009039178c50fd878af91f0347632b0c26d
e9798e5251d3d6ba859bb15a00d13f085bc690a8
refs/heads/master
2020-03-25T23:23:48.171352
2019-09-21T07:09:48
2019-09-21T07:09:48
144,272,972
0
0
null
null
null
null
UTF-8
Java
false
false
3,849
java
package com.umeng.analytics.pro; import android.content.Context; import com.feng.library.okhttp.utils.OkHttpUtils; import com.umeng.analytics.b; import com.umeng.commonsdk.framework.UMEnvelopeBuild; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; /* compiled from: DefconProcesser */ public class m { private static final int a = 0; private static final int b = 1; private static final int c = 2; private static final int d = 3; private final long e; /* compiled from: DefconProcesser */ private static class a { public static final m a = new m(); private a() { } } private m() { this.e = OkHttpUtils.DEFAULT_MILLISECONDS; } public static m a() { return a.a; } public int a(Context context) { return Integer.valueOf(UMEnvelopeBuild.imprintProperty(context, "defcon", String.valueOf(0))).intValue(); } public void a(JSONObject jSONObject, Context context) { int a = a(context); if (a == 1) { jSONObject.remove("events"); g.a(context).f(); } else if (a == 2) { jSONObject.remove("events"); jSONObject.remove(b.ac); jSONObject.remove(b.ah); try { jSONObject.put(b.ac, c()); } catch (JSONException e) { e.printStackTrace(); } g.a(context).f(); } else if (a == 3) { jSONObject.remove("events"); jSONObject.remove(b.ac); jSONObject.remove(b.ah); g.a(context).f(); } } public void b(JSONObject jSONObject, Context context) { int a = a(context); if (a == 1) { jSONObject.remove("error"); jSONObject.remove(b.N); jSONObject.remove(b.O); g.a(context).a(false, true); } else if (a == 2) { jSONObject.remove(b.n); try { jSONObject.put(b.n, b()); } catch (Exception e) { } jSONObject.remove("error"); jSONObject.remove(b.N); jSONObject.remove(b.O); g.a(context).a(false, true); } else if (a == 3) { jSONObject.remove(b.n); jSONObject.remove("error"); jSONObject.remove(b.N); jSONObject.remove(b.O); g.a(context).a(false, true); } } public JSONObject b() { JSONObject jSONObject = new JSONObject(); try { long currentTimeMillis = System.currentTimeMillis(); jSONObject.put("id", p.a().d()); jSONObject.put(b.p, currentTimeMillis); jSONObject.put(b.q, currentTimeMillis + OkHttpUtils.DEFAULT_MILLISECONDS); jSONObject.put("duration", OkHttpUtils.DEFAULT_MILLISECONDS); } catch (Throwable th) { } return jSONObject; } private JSONArray c() { JSONArray jSONArray = new JSONArray(); try { long currentTimeMillis = System.currentTimeMillis(); JSONObject jSONObject = new JSONObject(); JSONObject j = b.a().j(); if (j.length() > 0) { jSONObject.put(b.ab, j); } jSONObject.put(b.ad, p.a().d()); jSONObject.put(b.ae, currentTimeMillis); JSONObject jSONObject2 = new JSONObject(); jSONObject2.put(b.af, p.a().d()); jSONObject2.put(b.ag, currentTimeMillis + OkHttpUtils.DEFAULT_MILLISECONDS); if (j.length() > 0) { jSONObject2.put(b.ab, j); } jSONArray.put(jSONObject).put(jSONObject2); } catch (JSONException e) { e.printStackTrace(); } return jSONArray; } }
[ "tanwenzhao@vipkid.com.cn" ]
tanwenzhao@vipkid.com.cn
a3005bed7e39c016d3fa1a700be417a7ceee8562
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/dc11fbc9421c547961bfefcdc4044715a7131ceb484b10c8391745399298fcce81022dbb780a9efcac004486b7d989ef4bf0dfb5a4db7c599a8f9aa3393570ae/000/mutations/104/grade_dc11fbc9_000.java
4bbe27bcfbf85b69f541822540097f12ac8b1e0f
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,417
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class grade_dc11fbc9_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_dc11fbc9_000 mainClass = new grade_dc11fbc9_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { DoubleObj a = new DoubleObj (), b = new DoubleObj (), c = new DoubleObj (), d = new DoubleObj (); DoubleObj score = new DoubleObj (); output += (String.format ("Enter thresholds for A, B, C, D\nin that order, decreasing percentages > ")); a.value = scanner.nextDouble (); b.value = scanner.nextDouble (); c.value = scanner.nextDouble (); d.value = scanner.nextDouble (); output += (String.format ("Thank you. Now enter student score (percent) >")); score.value = scanner.nextDouble (); if (score.value >= a.value) { output += (String.format ("Student has an A grade\n")); } else if (score.value >= b.value) { output += (String.format ("Student has a B grade\n")); } else if (score.value >= c.value) { output += (String.format ("Student has a C grade\n")); } else if (score.value >= b.value) { output += (String.format ("Student has a D grade\n")); } else { output += (String.format ("Student has failed the course\n")); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
503f62896f9ece43b15e9deee77e2e3a52ed9f3b
8c085f12963e120be684f8a049175f07d0b8c4e5
/adaptx/tags/0.9.13/src/main/org/exolab/adaptx/xml/dom2xpn/ParentDOMXPathNode.java
1234c8ed10948fdeba20b4893229fe376f25587f
[]
no_license
alam93mahboob/castor
9963d4110126b8f4ef81d82adfe62bab8c5f5bce
974f853be5680427a195a6b8ae3ce63a65a309b6
refs/heads/master
2020-05-17T08:03:26.321249
2014-01-01T20:48:45
2014-01-01T20:48:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,044
java
/* * (C) Copyright Keith Visco 2001 All rights reserved. * * The contents of this file are released under an Open Source * Definition (OSD) compliant license; you may not use this file * execpt in compliance with the license. Please see license.txt, * distributed with this file. You may also obtain a copy of the * license at http://www.clc-marketing.com/xslp/license.txt * * The program is provided "as is" without any warranty express or * implied, including the warranty of non-infringement and the implied * warranties of merchantibility and fitness for a particular purpose. * The Copyright owner will not be liable for any damages suffered by * you as a result of using the Program. In no event will the Copyright * owner be liable for any special, indirect or consequential damages or * lost profits even if the Copyright owner has been advised of the * possibility of their occurrence. * * $Id$ */ package org.exolab.adaptx.xml.dom2xpn; import org.exolab.adaptx.xpath.XPathNode; import org.w3c.dom.*; /** * An interface for Parent XPathNodes. There are only add * methods...and no remove methods, since this interface * is used for an XPathNode implementation which simply wraps * a W3C DOM implementation. * @author <a href="mailto:kvisco@ziplink.net">Keith Visco</a> * @version $Revision$ $Date$ **/ abstract class ParentDOMXPathNode extends BaseDOMXPathNode { /** * A reference to the first child XPathNode **/ BaseDOMXPathNode _firstChild = null; /** * A reference to the last child XPathNode **/ BaseDOMXPathNode _lastChild = null; /** * Creates a new ParentDOMXPathNode **/ ParentDOMXPathNode() { super(); } //-- ParentDOMXPathNode /** * Returns the first child node of this node, or null if * the node has no children. Child nodes are only returned * for an element or root node. * * @return The first child node of this node, or null **/ public XPathNode getFirstChild() { return _firstChild; } //-- getFirstChild /** * Returns true if this node has any child nodes. * * @return True if this node has any child nodes. **/ public boolean hasChildNodes() { return (_firstChild != null); } //-- hasChildNodes /* protected methods */ /** * Adds the given child XPathNode to this XPathNode. Adding * the node to this Parent will reset any parent node, and * any siblings. * * @param node the XPathNode to add as a child **/ void addChild(BaseDOMXPathNode node) { node.setNext(null); node.setParent(this); if (_firstChild == null) { _firstChild = node; _lastChild = node; _firstChild.setPrevious(null); } else { _lastChild.setNext(node); node.setPrevious(_lastChild); _lastChild = node; } } //-- addChild } //-- ParentDOMXPathNode
[ "wguttmn@b24b0d9a-6811-0410-802a-946fa971d308" ]
wguttmn@b24b0d9a-6811-0410-802a-946fa971d308
a27388be5e36c4edccedda31f3feebf11f2ff2cb
bae185aaee10ca50a9b11422d2eb91b841eb30f9
/app/src/main/java/com/doedelhi/pankhpractice/services/video_monitoring_capture_images/APictureCapturingClass.java
4617bf815ad185488a53201d4a613318d46e4df1
[]
no_license
prathamApp/PankhAssessment
07020335227e90481590ef77c0cbe889e35f2725
c9fc00efb5190d98c8f9a713596bcd8f76b4222a
refs/heads/main
2023-01-14T03:30:26.267683
2020-11-20T11:59:19
2020-11-20T11:59:19
306,378,569
0
0
null
null
null
null
UTF-8
Java
false
false
1,635
java
package com.doedelhi.pankhpractice.services.video_monitoring_capture_images; import android.app.Activity; import android.content.Context; import android.hardware.camera2.CameraManager; import android.util.SparseIntArray; import android.view.Surface; /** * Abstract Picture Taking Service. * * @author hzitoun (zitoun.hamed@gmail.com) */ public abstract class APictureCapturingClass { private static final SparseIntArray ORIENTATIONS = new SparseIntArray(); static { ORIENTATIONS.append(Surface.ROTATION_0, 90); ORIENTATIONS.append(Surface.ROTATION_90, 0); ORIENTATIONS.append(Surface.ROTATION_180, 270); ORIENTATIONS.append(Surface.ROTATION_270, 180); } private final Activity activity; final Context context; final CameraManager manager; /*** * constructor. * * @param activity the activity used to get display manager and the application context */ APictureCapturingClass(final Activity activity) { this.activity = activity; this.context = activity.getApplicationContext(); this.manager = (CameraManager) context.getSystemService(Context.CAMERA_SERVICE); } /*** * @return orientation */ int getOrientation() { final int rotation = this.activity.getWindowManager().getDefaultDisplay().getRotation(); return ORIENTATIONS.get(2); } /** * starts pictures capturing process. * * @param listener picture capturing listener * @param fileName */ public abstract void startCapturing(final PictureCapturingListener listener, String fileName); }
[ "prathambaner123@gmail.com" ]
prathambaner123@gmail.com
94b826d402524e7b8bd9f58bdbc713c28da5b4f0
dc6e97aac1c52e7192ea9450b3cd862f8386200e
/gomint-server/src/main/java/io/gomint/server/plugin/PluginClassloader.java
7b5fae6c95ffef97d6d5ca0404358800244db2c3
[ "BSD-3-Clause" ]
permissive
geNAZt/GoMint-1
f60b4fe4fb639e8a1a61b6cd0bc45d01f42201be
2e904fd8692c5c691f5cf48b1ba81b36a0b2529c
refs/heads/master
2022-12-13T10:27:00.770544
2020-09-14T20:38:45
2020-09-14T20:38:45
295,726,851
0
0
NOASSERTION
2020-09-15T12:50:49
2020-09-15T12:50:48
null
UTF-8
Java
false
false
4,029
java
package io.gomint.server.plugin; import io.gomint.GoMint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; import java.lang.module.Configuration; import java.lang.module.ModuleFinder; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.nio.file.Path; import java.util.HashSet; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; /** * @author geNAZt * @version 1.0 */ public class PluginClassloader extends URLClassLoader { private static final Logger LOGGER = LoggerFactory.getLogger(PluginClassloader.class); private static final Set<PluginClassloader> ALL_LOADERS = new CopyOnWriteArraySet<>(); private static ClassLoader applicationClassloader; static { ClassLoader.registerAsParallelCapable(); applicationClassloader = GoMint.class.getClassLoader(); } public static String getPluginWhichLoaded(String name) { for (PluginClassloader loader : ALL_LOADERS) { try { loader.loadClass(name, true); return loader.meta.getName() + " v" + loader.meta.getVersion().toString(); } catch (ClassNotFoundException e) { // Ignored } } return null; } public static Class<?> find(String name) throws ClassNotFoundException { for (PluginClassloader loader : ALL_LOADERS) { try { return loader.loadClass(name, true); } catch (ClassNotFoundException e) { LOGGER.info("Could not find class in plugin"); } } return applicationClassloader.loadClass(name); } private final PluginMeta meta; /** * Create a new plugin class loader * * @param meta which holds information about the plugin to be loaded * @throws MalformedURLException when the file is incorrectly labeled */ PluginClassloader(PluginMeta meta) throws MalformedURLException { super(resolveURLs(meta)); this.meta = meta; ALL_LOADERS.add(this); } private static URL[] resolveURLs(PluginMeta meta) throws MalformedURLException { URL[] loaderURLs = new URL[meta.getModuleDependencies() != null ? meta.getModuleDependencies().size() + 1 : 1]; loaderURLs[0] = meta.getPluginFile().toURI().toURL(); if (meta.getModuleDependencies() != null) { int index = 1; for (File moduleDependency : meta.getModuleDependencies()) { loaderURLs[index++] = moduleDependency.toURI().toURL(); } } return loaderURLs; } @Override protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { return loadClass0(name, resolve, true); } private Class<?> loadClass0(String name, boolean resolve, boolean checkOther) throws ClassNotFoundException { try { return super.loadClass(name, resolve); } catch (ClassNotFoundException ex) { // Ignored } if (checkOther) { for (PluginClassloader loader : ALL_LOADERS) { if (loader != this) { try { return loader.loadClass0(name, resolve, false); } catch (ClassNotFoundException ex) { // Ignored } } } try { return applicationClassloader.loadClass(name); } catch (ClassNotFoundException ex) { // Ignored } } throw new ClassNotFoundException(name); } /** * Remove the loader and free the resources loaded with it */ public void remove() { ALL_LOADERS.remove(this); try { super.close(); } catch (IOException e) { LOGGER.warn("Could not close plugin classloader", e); } } }
[ "fabian.fassbender42@googlemail.com" ]
fabian.fassbender42@googlemail.com
05cfdedf5ef3c875c6c6a9147323ecd4fe6430ff
1627f39bdce9c3fe5bfa34e68c276faa4568bc35
/src/math/Boj3053.java
a0c09ce223da2a39e9657bd2508fb153a45383bc
[ "Apache-2.0" ]
permissive
minuk8932/Algorithm_BaekJoon
9ebb556f5055b89a5e5c8d885b77738f1e660e4d
a4a46b5e22e0ed0bb1b23bf1e63b78d542aa5557
refs/heads/master
2022-10-23T20:08:19.968211
2022-10-02T06:55:53
2022-10-02T06:55:53
84,549,122
3
3
null
null
null
null
UTF-8
Java
false
false
789
java
package math; import java.io.BufferedReader; import java.io.InputStreamReader; /** * * @author minchoba * 백준 3053번 : 택시 기하학 * * @see https://www.acmicpc.net/problem/3053 * */ public class Boj3053 { public static void main(String[] args) throws Exception{ // 버퍼를 통한 값 입력 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); double pi = 3.1415926535897930; // Math.PI : 원인 모를 오류, 컴파일러마다 다르게 인식해서 그런듯.. double ucl = pi * N * N; // 유클리드 double taxi = 2 * N * N; // 택시(맨해튼 거리) System.out.printf("%f \n", ucl); // 유클리드 원 넓이 System.out.printf("%f", taxi); // 택시 원 넓이 } }
[ "minuk8932@naver.com" ]
minuk8932@naver.com
206f9f8cca627727cb9510aa44e0b37aad51f258
24c1efa5108a63dcf8cac2e8829ea1e6582917e2
/src/com/rutaslv/model/animals/Spider.java
60fb7065ccb3bbca373c44cdc0d9ed6bcfd8c035
[]
no_license
r426/DesignPatterns
de613f0d571bd0096017a1429e832078090cd37a
d9ea3ec1c7e9c8d5301e9266f96bd2b484aede1c
refs/heads/master
2020-03-25T00:14:32.670834
2018-08-02T08:48:37
2018-08-02T08:48:37
143,175,530
0
0
null
2018-08-02T08:48:38
2018-08-01T15:34:34
Java
UTF-8
Java
false
false
381
java
package com.rutaslv.model.animals; import com.rutaslv.model.moves.Eat; public class Spider extends Animal { public Spider(String category, String family, String name, float weight, float height, String move) { super(category, family, name, weight, height, move); } public void move() { moveBehavior = new Eat(); moveBehavior.move(); } }
[ "you@example.com" ]
you@example.com
4ccca831b7a90e341ed3bd9a4ba593986fc7aead
b9559e00a99cc08ee72efb30d3a04166054651e2
/Java/ZipMe/DerivativeExtractCRC/net/sf/zipme/ZipInputStream.java
03c3fbded62592d98e6bc2e01bb38cc8cbf69694
[]
no_license
joliebig/featurehouse_fstcomp_examples
d4dd7d90a77ae3b20b6118677a17001fdb53ee93
20dd7dc9a807ec0c20939eb5c6e00fcc1ce19d20
refs/heads/master
2021-01-19T08:08:37.797995
2013-01-29T13:48:20
2013-01-29T13:48:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,227
java
// package net.sf.zipme; class ZipInputStream { private CRC32 crc=new CRC32(); /** * Open the next entry from the zip archive, and return its description. * If the previous entry wasn't closed, this method will close it. */ public ZipEntry getNextEntry() throws IOException { if (crc == null) throw new IOException("Stream closed."); return original(); } /** * Closes the current zip entry and moves to the next one. */ public void closeEntry() throws IOException { if (crc == null) throw new IOException("Stream closed."); original(); } protected void hook36() throws IOException { crc.reset(); original(); } protected void hook37( byte[] b, int off, int len) throws IOException { if (len > 0) crc.update(b,off,len); original(b,off,len); } protected void hook38() throws IOException { if (crc == null) throw new IOException("Stream closed."); original(); } protected void hook39() throws IOException { if ((crc.getValue() & 0xffffffffL) != entry.getCrc()) throw new ZipException("CRC mismatch"); crc.reset(); original(); } protected void hook40() throws IOException { crc=null; original(); } }
[ "apel" ]
apel
eb3dcf9790251752c836dca4471d9c85e6dfa870
4152b9f20932a13fa27535fbe0c8455cea269bd0
/jstarcraft-ai-weka/src/main/java/weka/classifiers/IterativeClassifier.java
6109c067aa36448d4db866bc9be1a3f950f083b0
[ "Apache-2.0" ]
permissive
kingrom/jstarcraft-ai
ab7843bd6c09503bf9156aabbf07386577ddff63
5029228e27efa3dd934d431cd8dd90e786b760a7
refs/heads/master
2020-08-01T21:28:42.582026
2019-09-23T09:58:54
2019-09-23T09:58:54
208,401,831
1
0
Apache-2.0
2019-09-14T06:54:48
2019-09-14T06:54:45
null
UTF-8
Java
false
false
3,345
java
/* * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* * IterativeClassifier.java * Copyright (C) 2001-2012 University of Waikato, Hamilton, New Zealand * */ package weka.classifiers; import weka.core.Instances; /** * Interface for classifiers that can induce models of growing complexity one * step at a time. * * @author Gabi Schmidberger (gabi@cs.waikato.ac.nz) * @author Bernhard Pfahringer (bernhard@cs.waikato.ac.nz) * @version $Revision$ */ public interface IterativeClassifier extends Classifier { /** * Initializes an iterative classifier. * * @param instances the instances to be used in induction * @exception Exception if the model cannot be initialized */ void initializeClassifier(Instances instances) throws Exception; /** * If called with argument true then the classifier will be able to be trained * further (with more iterations) at a later date. Note that this can * potentially make serialized model structures larger, because certain data and * data structures might need to be retained to facilitate continued training. * When set to false, and done() is called, then the classifier will be cleaned * up, resulting in (potentially) a more compact serialized model. * * @param resume true to enable training to continue at a later point after the * initial model is built. * @throws Exception if finalization cannot be set */ void setResume(boolean resume) throws Exception; /** * Returns true if the classifier will be able to be trained further (with more * iterations) at a later date. Note that this can potentially make serialized * model structures larger, because certain data and data structures might need * to be retained to facilitate continued training. When set to false, and * done() is called, then the classifier will be cleaned up, resulting in * (potentially) a more compact serialized model. * * @return true to enable training to continue at a later point after the * initial model is built. * @throws Exception if finalization cannot be set */ boolean getResume(); /** * Performs one iteration. * * @return false if no further iterations could be performed, true otherwise * @exception Exception if this iteration fails for unexpected reasons */ boolean next() throws Exception; /** * Signal end of iterating, for either the time being or permanently if * setFinalized(true) has been called. Useful for any house-keeping/cleanup. * * @exception Exception if cleanup fails */ void done() throws Exception; }
[ "Birdy@LAPTOP-QRG8T75T" ]
Birdy@LAPTOP-QRG8T75T
c0b6f74d0efe8d2941d143ba31aa5e28fd4ac9c6
eabeb1f52c0f7cbca9b9215eac2767f22beeb48d
/src/main/java/io/swagger/client/model/TimeWindow.java
adc54d554a994759ef41bb313e248d047524cd98
[ "Apache-2.0" ]
permissive
oblonski/directions-api-vrp-java-client
701de18fb236621df8c049606ad816cc98170803
893b5cfd543ffc9015d44be2ac1f1c2b47e8480b
refs/heads/master
2020-12-11T01:47:57.447213
2015-04-28T13:51:39
2015-04-28T13:51:39
35,999,878
1
0
null
2015-05-21T08:10:32
2015-05-21T08:10:32
null
UTF-8
Java
false
false
1,152
java
package io.swagger.client.model; import com.wordnik.swagger.annotations.*; import com.fasterxml.jackson.annotation.JsonProperty; @ApiModel(description = "") public class TimeWindow { private Long earliest = null; private Long latest = null; /** * earliest start time of corresponding activity **/ @ApiModelProperty(value = "earliest start time of corresponding activity") @JsonProperty("earliest") public Long getEarliest() { return earliest; } public void setEarliest(Long earliest) { this.earliest = earliest; } /** * latest start time of corresponding activity **/ @ApiModelProperty(value = "latest start time of corresponding activity") @JsonProperty("latest") public Long getLatest() { return latest; } public void setLatest(Long latest) { this.latest = latest; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TimeWindow {\n"); sb.append(" earliest: ").append(earliest).append("\n"); sb.append(" latest: ").append(latest).append("\n"); sb.append("}\n"); return sb.toString(); } }
[ "peathal@yahoo.de" ]
peathal@yahoo.de
509d91cbe1ba38698ffb411b3495f7b719fbbcf0
ee5ac2eedc6ed411450b90170937375336a0f19d
/libraries/BridJ/src/main/java/org/bridj/ClassDefiner.java
83754f4cfe9f4c16c921b6adc2fa4bc73b461340
[]
no_license
peter-lawrey/nativelibs4java
4d290462290f7e50a3891c1120ab670b08b469bc
33492dac7c178d207c34237a5383e22de4a4f60c
refs/heads/master
2021-01-17T21:51:32.660371
2012-03-22T21:44:24
2012-03-22T21:44:24
3,831,063
1
0
null
null
null
null
UTF-8
Java
false
false
258
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.bridj; /** * * @author ochafik */ interface ClassDefiner { Class<?> defineClass(String className, byte[] data) throws ClassFormatError; }
[ "olivier.chafik@gmail.com" ]
olivier.chafik@gmail.com
1c8f6358bac86f569597776b53da4164b787abfe
c34c074b6bf35641aa80deee712e46915dec5bad
/processor/src/main/java/org/gwtproject/resources/apt/ClientBundleFactoryBuilder.java
0a221d2656ad259510be2ad30def1a9db7439802
[]
no_license
jnehlmeier/gwt-resources
f57dfc0bd1f640be400ff410f662e5a80fb1fed4
d37884abf319376bace22fd722406316ea503220
refs/heads/master
2020-04-11T19:36:08.499907
2018-12-11T19:43:08
2018-12-11T19:43:08
162,039,840
0
0
null
2018-12-16T20:50:21
2018-12-16T20:50:21
null
UTF-8
Java
false
false
2,426
java
package org.gwtproject.resources.apt; import com.google.auto.common.MoreElements; import org.gwtproject.resources.context.AptContext; import javax.lang.model.element.TypeElement; import javax.tools.JavaFileObject; import java.io.IOException; import java.io.PrintWriter; import java.util.Map; /** * @author Dmitrii Tikhomirov * Created by treblereel 12/1/18 */ public class ClientBundleFactoryBuilder { private final Map<TypeElement, String> generatedSimpleSourceNames; private final AptContext aptContext; private final String BUILDER_CLASS_NAME = "ClientBundleFactory"; private final String BUILDER_PACKAGE_NAME = "org.gwtproject.resources.client"; ClientBundleFactoryBuilder(Map<TypeElement, String> generatedSimpleSourceNames, AptContext aptContext) { this.generatedSimpleSourceNames = generatedSimpleSourceNames; this.aptContext = aptContext; } void build() { JavaFileObject builderFile = null; try { builderFile = aptContext.filer.createSourceFile(BUILDER_PACKAGE_NAME + "." + BUILDER_CLASS_NAME); try (PrintWriter out = new PrintWriter(builderFile.openWriter())) { out.print("package "); out.print(BUILDER_PACKAGE_NAME); out.println(";"); out.println("import java.util.Map;"); out.println("import java.util.HashMap;"); out.println(); out.print("public class "); out.print(BUILDER_CLASS_NAME); out.println(" {"); out.println(); out.print(" private static "); out.print("Map<Class, Object>"); out.print(" map = new "); out.print("HashMap<>"); out.print("();"); out.println(); out.println(" static {"); generatedSimpleSourceNames.forEach((k, v) -> { out.println(" map.put(" + k + ".class, new " + MoreElements.getPackage(k) + "." + v + "());"); }); out.println(" }"); out.println(" public static <T> T get(Class clazz) {"); out.println(" return (T) map.get(clazz);"); out.println(" }"); out.println("}"); } } catch (IOException e) { e.printStackTrace(); } } }
[ "chani@me.com" ]
chani@me.com
6033317c69019b166ddc72726033062bc466e50f
f643eb2bffea8995b057f01347ccf9ff63e85344
/4.医科大学_功能点/1.医科大学-组织机构同步/src/com/seeyon/apps/ext/zxzyk/po/OrgDept.java
6f8708351084e4a697c9bd604602bdc7b7210961
[]
no_license
AirSkye/A-8-code
13598ff31d554ec68f1e677c2f9284931594d0c9
008c6d21dd8c9b406c16fc86b899534b712121c4
refs/heads/master
2023-07-18T10:54:24.056687
2021-03-16T03:02:41
2021-03-16T03:02:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,338
java
package com.seeyon.apps.ext.zxzyk.po; import java.util.List; /** * Created by Administrator on 2019-7-29. */ public class OrgDept { private String deptid; private String orgAccountId; private String deptname; private Boolean enabled = true; private Integer sortId = 1; private Boolean isGroup = false; private String superior; private String path = ""; private String unitcode; private String deptcode; private String parentId; private List<OrgDept> list; public List<OrgDept> getList() { return list; } public void setList(List<OrgDept> list) { this.list = list; } public String getParentId() { return parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public OrgDept() { } public Boolean getGroup() { return isGroup; } public void setGroup(Boolean group) { isGroup = group; } public String getDeptid() { return deptid; } public void setDeptid(String deptid) { this.deptid = deptid; } public String getOrgAccountId() { return orgAccountId; } public void setOrgAccountId(String orgAccountId) { this.orgAccountId = orgAccountId; } public String getDeptname() { return deptname; } public void setDeptname(String deptname) { this.deptname = deptname; } public Boolean getEnabled() { return enabled; } public void setEnabled(Boolean enabled) { this.enabled = enabled; } public Integer getSortId() { return sortId; } public void setSortId(Integer sortId) { this.sortId = sortId; } public String getSuperior() { return superior; } public void setSuperior(String superior) { this.superior = superior; } public String getPath() { return path; } public void setPath(String path) { this.path = path; } public String getUnitcode() { return unitcode; } public void setUnitcode(String unitcode) { this.unitcode = unitcode; } public String getDeptcode() { return deptcode; } public void setDeptcode(String deptcode) { this.deptcode = deptcode; } }
[ "741963634@qq.com" ]
741963634@qq.com
1c37f3ae5af80bc2ab05566f36edf8c49383044e
0acabd81d062e9b34ab172249ce3180bf55b526a
/src/main/java/com/huaxu/core/leetcode/topic100/Topic124.java
5d18d60b463b5e1a7aa47c2bef12b62d9cc44c53
[]
no_license
BlHole/core
445f87c12a4c47f42aa0548b2a24342109d5b713
97441613c9c9e39738af22c7188c6b01e9044c17
refs/heads/master
2022-05-30T12:39:44.207637
2020-04-01T10:21:10
2020-04-01T10:21:10
229,370,125
1
0
null
null
null
null
UTF-8
Java
false
false
1,323
java
package com.huaxu.core.leetcode.topic100; import com.huaxu.core.leetcode.basic.TreeNode; /** * <p>项目名称: leetcode</p> * <p>文件名称: Topic124</p> * <p>文件描述: </p> * <p>创建日期: 2019/07/03 20:07</p> * <p>创建用户:huaxu</p> */ public class Topic124 { public static void main(String[] args) { TreeNode root = new TreeNode(1); root.left = new TreeNode(-2); root.left.left = new TreeNode(1); root.left.left.left = new TreeNode(-1); root.left.right = new TreeNode(3); root.right = new TreeNode(-3); root.right.left = new TreeNode(-2); int a = new Topic124().new Solution().maxPathSum(root); System.out.println(a); } class Solution { public int maxPathSum(TreeNode root) { if (root == null) return Integer.MIN_VALUE; int rootVal = root.val; int leftVal = maxPathSum(root.left); int rightVal = maxPathSum(root.right); if (rootVal >= 0) { rootVal += leftVal > 0 ? leftVal : 0; rootVal += rightVal > 0 ? rightVal : 0; } else { rootVal = Math.max(rootVal, leftVal); rootVal = Math.max(rootVal, rightVal); } return rootVal; } } }
[ "tshy0425@hotmail.com" ]
tshy0425@hotmail.com
d05cdb6f81921f9ea86b50b0b9f0c9304a7f8ff0
f3b9a444d2d513c670d216f7c700131410c47f92
/game_analyze/src/com/gamecenter/alipay/domain/McardTemplateBenefit.java
00db092da8e3efbac957add272593e9401e1007b
[]
no_license
kuainiao/GameAdminWeb
6a372087380e3c5ad98fc7cf4c8cbf9f01854e5d
f89327374d39c112421606e6a9fe9189b46c1a90
refs/heads/master
2020-06-03T22:15:02.944948
2017-12-22T06:20:38
2017-12-22T06:20:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,897
java
package com.gamecenter.alipay.domain; import java.util.Date; import java.util.List; import com.gamecenter.alipay.AlipayObject; import com.gamecenter.alipay.internal.mapping.ApiField; import com.gamecenter.alipay.internal.mapping.ApiListField; /** * 会员卡模板外部权益 * * @author auto create * @since 1.0, 2017-04-20 22:01:36 */ public class McardTemplateBenefit extends AlipayObject { private static final long serialVersionUID = 6855442979359649452L; /** * 权益描述信息 */ @ApiListField("benefit_desc") @ApiField("string") private List<String> benefitDesc; /** * 权益结束时间 */ @ApiField("end_date") private Date endDate; /** * 会员卡模板权益扩展信息:JSON格式; openUrl 说明:跳转到商户的优惠活动页面 */ @ApiField("ext_info") private String extInfo; /** * 权益开始时间 */ @ApiField("start_date") private Date startDate; /** * 会员卡模板ID */ @ApiField("template_id") private String templateId; /** * 权益标题 */ @ApiField("title") private String title; public List<String> getBenefitDesc() { return this.benefitDesc; } public void setBenefitDesc(List<String> benefitDesc) { this.benefitDesc = benefitDesc; } public Date getEndDate() { return this.endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } public String getExtInfo() { return this.extInfo; } public void setExtInfo(String extInfo) { this.extInfo = extInfo; } public Date getStartDate() { return this.startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } public String getTemplateId() { return this.templateId; } public void setTemplateId(String templateId) { this.templateId = templateId; } public String getTitle() { return this.title; } public void setTitle(String title) { this.title = title; } }
[ "lyh@163.com" ]
lyh@163.com
ac0d2cf09701f9ad31188f7c49a8d970692cda14
527e6c527236f7a1f49800667a9331dc52c7eefa
/src/main/java/it/csi/siac/siacbasegengsaapp/frontend/ui/util/wrapper/registrazionemovfin/consultazione/ConsultaRegistrazioneMovFinOrdinativoPagamentoHelper.java
0dc2ec2fe8038f16e54b99e88abc0577b5ceba80
[]
no_license
unica-open/siacbilapp
4953a8519a839c997798c3d39e220f61c0bce2b6
bf2bf7d5609fe32cee2409057b811e5a6fa47a76
refs/heads/master
2021-01-06T14:57:26.105285
2020-03-03T17:01:19
2020-03-03T17:01:19
241,366,496
0
0
null
null
null
null
UTF-8
Java
false
false
1,349
java
/* *SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte *SPDX-License-Identifier: EUPL-1.2 */ package it.csi.siac.siacbasegengsaapp.frontend.ui.util.wrapper.registrazionemovfin.consultazione; import java.util.List; import it.csi.siac.siacbilser.model.Capitolo; import it.csi.siac.siacfinser.model.ordinativo.OrdinativoPagamento; import it.csi.siac.siacfinser.model.ordinativo.SubOrdinativoPagamento; /** * Helper per la consultazione dei dati dell'ordinativo di pagamento * @author Marchino Alessandro * */ public class ConsultaRegistrazioneMovFinOrdinativoPagamentoHelper extends ConsultaRegistrazioneMovFinOrdinativoHelper<OrdinativoPagamento, SubOrdinativoPagamento> { /** Per la serializzazione */ private static final long serialVersionUID = -4331679149495872856L; /** * Costruttore di wrap * @param ordinativo l'ordinativo * @param listaSubOrdinativo la lista dei subordinativi sub ordinativo * @param isGestioneUEB se la gestione UEB sia attiva */ public ConsultaRegistrazioneMovFinOrdinativoPagamentoHelper(OrdinativoPagamento ordinativo, List<SubOrdinativoPagamento> listaSubOrdinativo, boolean isGestioneUEB) { super(ordinativo, listaSubOrdinativo, isGestioneUEB); } @Override protected Capitolo<?, ?> ottieniCapitolo() { return ordinativo != null ? ordinativo.getCapitoloUscitaGestione() : null; } }
[ "michele.perdono@csi.it" ]
michele.perdono@csi.it
f1977991fe7f98e5d1be8c9d8114b4bb42dfa407
278ed483cae1001dbbb9f7350f7086293063b967
/newyu-utils/src/test/java/com/newyu/utils/netty/MsgpackDecoder.java
3703c61b1c21ad1a2b90aaf11a8121af7956f236
[]
no_license
newyuliuyu/newyu
cca1b44a34b1101662641505760d8880dbabab11
228871303c2329ac392f436c2744c813a232cf7d
refs/heads/master
2022-12-28T00:49:00.267977
2019-12-06T07:35:33
2019-12-06T07:35:33
180,946,389
0
0
null
2022-12-16T00:03:17
2019-04-12T06:40:13
Java
UTF-8
Java
false
false
904
java
package com.newyu.utils.netty; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToMessageDecoder; import org.msgpack.MessagePack; import java.util.List; /** * ClassName: MsgpackDecoder <br/> * Function: ADD FUNCTION. <br/> * Reason: ADD REASON(可选). <br/> * date: 19-10-16 下午1:46 <br/> * * @author liuyu * @version v1.0 * @since JDK 1.7+ */ public class MsgpackDecoder extends MessageToMessageDecoder<ByteBuf> { @Override protected void decode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws Exception { final byte[] array; final int length=msg.readableBytes(); array=new byte[length]; //msg.getBytes(msg.readerIndex(),array,0,length); msg.readBytes(array); MessagePack msgPack=new MessagePack(); out.add(msgPack.read(array)); } }
[ "306487103@qq.com" ]
306487103@qq.com
55aca607d703fcdc5f8259126f687cafa0026ffe
5b5362e26b79b486f597b3d325d23840b76442f0
/empoa-simple-models-impl/src/main/java/org/openapitools/empoa/simple/internal/models/servers/ServerVariablesImpl.java
f2516b55e98e9fb6ba79dad3a51a21b97e537520
[ "Apache-2.0" ]
permissive
fschuerer/empoa
191b5751c874c7315e8189ad26204261710b75c5
2d3b21c2b28b241e5f4497df981f6e6df4ddd14c
refs/heads/master
2020-08-06T04:52:44.020885
2019-08-26T15:24:42
2019-08-26T15:24:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,570
java
/******************************************************************************* * Copyright 2019 Jeremie Bresson * * 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.openapitools.empoa.simple.internal.models.servers; import org.eclipse.microprofile.openapi.models.servers.ServerVariables; public class ServerVariablesImpl implements ServerVariables { private java.util.Map<String, Object> _extensions; @Override public java.util.Map<String, Object> getExtensions() { if (_extensions == null) { return null; } return java.util.Collections.unmodifiableMap(_extensions); } @Override public void setExtensions(java.util.Map<String, Object> extensions) { if (extensions == null) { _extensions = null; } else { _extensions = new java.util.LinkedHashMap<>(); _extensions.putAll(extensions); } } @Override public ServerVariables addExtension(String key, Object object) { if (object == null) { throw new IllegalArgumentException("Null value for key '" + key + "' is not allowed"); } else { if (_extensions == null) { _extensions = new java.util.LinkedHashMap<>(); } _extensions.put(key, object); } return this; } @Override public void removeExtension(String key) { if (_extensions != null) { _extensions.remove(key); } } private java.util.Map<String, org.eclipse.microprofile.openapi.models.servers.ServerVariable> _serverVariables; @Override public java.util.Map<String, org.eclipse.microprofile.openapi.models.servers.ServerVariable> getServerVariables() { if (_serverVariables == null) { return null; } return java.util.Collections.unmodifiableMap(_serverVariables); } @Override public void setServerVariables(java.util.Map<String, org.eclipse.microprofile.openapi.models.servers.ServerVariable> serverVariables) { if (serverVariables == null) { _serverVariables = null; } else { _serverVariables = new java.util.LinkedHashMap<>(); _serverVariables.putAll(serverVariables); } } @Override public ServerVariables addServerVariable(String key, org.eclipse.microprofile.openapi.models.servers.ServerVariable serverVariable) { if (serverVariable == null) { throw new IllegalArgumentException("Null value for key '" + key + "' is not allowed"); } else { if (_serverVariables == null) { _serverVariables = new java.util.LinkedHashMap<>(); } _serverVariables.put(key, serverVariable); } return this; } @Override public void removeServerVariable(String key) { if (_serverVariables != null) { _serverVariables.remove(key); } } }
[ "dev@jmini.fr" ]
dev@jmini.fr
319440e7ac0370410cd7084c01d0e62942afcc58
5046dcaf273981683f5831211977fc68bc2d8295
/Service/app/src/main/java/ru/geekbrains/service/CalculationService.java
8abca43a913a4811d2b4afa796ca25a8b2744857
[]
no_license
DwarfPorter/Lesson_2_3_2020-05-22
04a9e595804e6fc4e17c91a7a61f580e3257b713
2ae52bb29617458b53776d7500967e78defe164a
refs/heads/master
2022-09-09T02:12:33.633841
2020-05-22T19:20:58
2020-05-22T19:20:58
266,192,383
0
1
null
null
null
null
UTF-8
Java
false
false
2,005
java
package ru.geekbrains.service; import android.app.IntentService; import android.content.Intent; import android.content.Context; import java.util.Calendar; import java.util.Date; public class CalculationService extends IntentService { private static final String EXTRA_SECONDS = "ru.geekbrains.service.calculation.SECONDS"; static final String EXTRA_RESULT = "ru.geekbrains.service.calculation.RESULT"; public CalculationService() { super("CalculationService"); } /** * Фабричный метод для старта сервиса (чтобы не перегружать класс MainActivity) */ public static void startCalculationService(Context context, int seconds) { Intent intent = new Intent(context, CalculationService.class); intent.putExtra(EXTRA_SECONDS, seconds); context.startService(intent); } /** * Обработка в фоновом режиме алгоритма в сервисе */ @Override protected void onHandleIntent(Intent intent) { int seconds = intent.getIntExtra(EXTRA_SECONDS, 0); long result = calculateLong(seconds); sendBrodcast(result); } // Долгий расчёт private long calculateLong(int seconds) { long result = 0; Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.SECOND, seconds); Date finishTime = calendar.getTime(); while (Calendar.getInstance().getTime().before(finishTime)) { if (result == Long.MAX_VALUE) { result = 0; } result++; } return result; } // Отправка уведомления о завершении сервиса private void sendBrodcast(long result) { Intent broadcastIntent = new Intent(MainActivity.BROADCAST_ACTION_CALCFINISHED); broadcastIntent.putExtra(EXTRA_RESULT, result); sendBroadcast(broadcastIntent); } }
[ "mrvlmor@gmail.com" ]
mrvlmor@gmail.com
9d86e967bb4e42547b3d969bbeb6b709736d18bb
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.assistant-base/sources/X/CO.java
6c706c8b22de689a1a18101ed8fb4a16666cdb62
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
393
java
package X; import com.facebook.proxygen.LigerHttpResponseHandler; public final class CO { public int A00 = 16; public int A01 = 1024; public int A02 = 16; public long A03 = LigerHttpResponseHandler.MAX_WAIT_TIME_MILLIS; public C0829jR A04; public Ca A05; public Class A06; public CO(Class cls, Ca ca) { this.A06 = cls; this.A05 = ca; } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
a0c2a2b5acb5420bd79525241dd7f1bd94191a81
f55e0f08bbbbde3bbf06b83c822a93d54819b1e8
/app/src/main/java/com/jqsoft/nursing/di/contract/urbanLowInsActivityContract.java
4148f80a11d348b194301006cbb66205167a5c07
[]
no_license
moshangqianye/nursing
27e58e30a51424502f1b636ae47b60b81a3b2ca0
20cd5aace59555ef9d708df0fb03639b2fc843d0
refs/heads/master
2020-09-08T13:39:55.939252
2020-03-20T09:55:34
2020-03-20T09:55:34
221,147,807
0
0
null
null
null
null
UTF-8
Java
false
false
884
java
package com.jqsoft.nursing.di.contract; import com.jqsoft.nursing.bean.base.HttpResultBaseBean; import com.jqsoft.nursing.bean.base.HttpResultEmptyBean; import com.jqsoft.nursing.bean.grassroots_civil_administration.UrbanLowInsBean; import com.jqsoft.nursing.bean.grassroots_civil_administration.base.GCAHttpResultBaseBean; import java.util.List; /** * Created by Administrator on 2017/5/21. */ public interface urbanLowInsActivityContract { interface View{ void onLoadListSuccess(GCAHttpResultBaseBean<List<UrbanLowInsBean>> bean); void onLoadMoreListSuccess(GCAHttpResultBaseBean<List<UrbanLowInsBean>> bean); void onLoadListFailure(String message, boolean isLoadMore); void onDeleteUrbanSuccess(HttpResultBaseBean<HttpResultEmptyBean> bean); void onDeleteUrbanFailure(String message); } interface presenter{ } }
[ "123456" ]
123456
c5de6860eab9424732ddf348f6ee353e45702e10
314f17f60baf9f2faa1720cb9e6e5dc1d733a97e
/.svn/pristine/8b/8bcfc701334ec5059592284571937a91cf6e8056.svn-base
97acb8b0269ffe4fe7c11611990a061e1eb2bd4b
[]
no_license
lc4t/payment
8a18d08cb65b778bff48a36e86c3412324159fc0
9cfd839ef92b74594259b1a6d3737e11ce4e441e
refs/heads/master
2020-03-31T07:15:31.731886
2017-05-23T05:15:15
2017-05-23T05:15:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,416
package noumena.payment.dao.servlet.yijie; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import noumena.payment.model.Orders; import noumena.payment.util.Constants; import noumena.payment.util.DateUtil; import noumena.payment.yijie.YijieCharge; public class YijieServlet extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; /** * The doGet method of the servlet. <br> * * This method is called when a form has its tag value method equals to get. * * @param request * the request send by the client to the server * @param response * the response send by the server to the client * @throws ServletException * if an error occurred * @throws IOException * if an error occurred */ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } /** * The doPost method of the servlet. <br> * * This method is called when a form has its tag value method equals to * post. * * model: * 1 - 客户端请求支付 * 2 - 客户端请求验证订单 * 11 - 小米请求Token服务成功状态回调 * * @param request * the request send by the client to the server * @param response * the response send by the server to the client * @throws ServletException * if an error occurred * @throws IOException * if an error occurred */ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("utf-8"); //必需的参数 String stype = request.getParameter("model"); //请求的类型:1-得到交易id;2-查询订单状态 String uid = request.getParameter("uid"); // String pkgid = request.getParameter("pkgid"); // String itemid = request.getParameter("itemid"); // String payprice = request.getParameter("price"); //一定是人民币元 String cburl = request.getParameter("cburl"); //单机游戏可以不需要回调地址 //选填的参数 String imei = request.getParameter("imei"); // String channel = request.getParameter("channel"); // String device_type = request.getParameter("device_type"); // String device_id = request.getParameter("device_id"); // String gversion = request.getParameter("gversion"); // String osversion = request.getParameter("osversion"); // //支付方的参数 String sdk = request.getParameter("sdk");//渠道在易接服务器的 ID //验证订单用参数 String payIds = request.getParameter("payIds"); //待查询的所有订单号,以“,”分隔 String ret = ""; if (stype == null) { stype = ""; } if (stype.equals("1")) { if (sdk != null) { sdk = sdk.replace("{", "").replace("-", "").replace("}", "").toLowerCase(); } String paytype = "yj_"+sdk.toLowerCase(); Orders vo = new Orders(); vo.setImei(imei); vo.setUId(uid); vo.setItemId(itemid); vo.setGversion(gversion); vo.setOsversion(osversion); vo.setDeviceId(device_id); vo.setDeviceType(device_type); vo.setChannel(channel); vo.setAppId(pkgid); if (payprice == null) { payprice = "0"; } vo.setAmount(Float.valueOf(payprice)*100); vo.setCreateTime(DateUtil.getCurrentTime()); vo.setPayType(paytype); vo.setCallbackUrl(cburl); vo.setExInfo(Constants.PAY_TYPE_YIJIE); ret = YijieCharge.getTransactionId(vo,paytype); } else if (stype.equals("2")) { ret = YijieCharge.checkOrdersStatus(payIds); } else { System.out.println("=====(" + DateUtil.getCurTimeStr() + ")=====channel(yijie model invalid)->" + stype); ret = "invalid"; } System.out.println("=====(" + DateUtil.getCurTimeStr() + ")=====channel(yijie order id)->(" + uid + ")" + ret); response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println(ret); out.flush(); out.close(); } /** * Initialization of the servlet. <br> * * @throws ServletException * if an error occure */ public void init() throws ServletException { // Put your code here } }
[ "you@example.com" ]
you@example.com
50699ef37e4a914513b7fb5dd08597dac0231667
173a7e3c1d4b34193aaee905beceee6e34450e35
/kmzyc-order/kmzyc-order-web/src/main/java/com/pltfm/app/service/impl/TestLocalRemote.java
2d99906ccc93ffecb4a571355618ff0529fbf1f9
[]
no_license
jjmnbv/km_dev
d4fc9ee59476248941a2bc99a42d57fe13ca1614
f05f4a61326957decc2fc0b8e06e7b106efc96d4
refs/heads/master
2020-03-31T20:03:47.655507
2017-05-26T10:01:56
2017-05-26T10:01:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,915
java
package com.pltfm.app.service.impl; public class TestLocalRemote { // // 库存接口 // public static StockRemoteService getStockService() throws MalformedURLException { // String serviceUrl = "http://10.1.23.30:8080/hessian/stockService"; // HessianProxyFactory factory = new HessianProxyFactory(); // return (StockRemoteService) factory.create(StockRemoteService.class, serviceUrl); // } // // // 第三方查询接口 // public static QryOrderOnLineService getQryOnlineService() throws MalformedURLException { // String serviceUrl = "http://localhost:8088/hessian/qryOrderOnLineService"; // HessianProxyFactory factory = new HessianProxyFactory(); // return (QryOrderOnLineService) factory.create(QryOrderOnLineService.class, serviceUrl); // } // // // 退款接口 // public static RefundOrderService getRefundService() throws MalformedURLException { // String serviceUrl = "http://localhost:8088/hessian/refundOrderService"; // HessianProxyFactory factory = new HessianProxyFactory(); // return (RefundOrderService) factory.create(RefundOrderService.class, serviceUrl); // } // // // 邮件接口 // public static EmailSubscriptionRemoteService getEmailService() throws MalformedURLException { // String serviceUrl = "http://localhost:8088/hessian/remoteEmailSubscriptionService"; // HessianProxyFactory factory = new HessianProxyFactory(); // return (EmailSubscriptionRemoteService) factory.create(EmailSubscriptionRemoteService.class, // serviceUrl); // } // // // 短信接口 // public static MessageRemoteService getMessageService() throws MalformedURLException { // String serviceUrl = "http://localhost:8088/hessian/messageRemoteService"; // HessianProxyFactory factory = new HessianProxyFactory(); // return (MessageRemoteService) factory.create(MessageRemoteService.class, serviceUrl); // } }
[ "luoxinyu@km.com" ]
luoxinyu@km.com
b8761f2df1a01f0b122ac1abb27d33a9ad1957aa
10a9cfc0479edbf11732b300358786039feef9d8
/cldc/1.0/src/hprose/io/ObjectIntMap.java
f76c7d36cf95d6f41c3756cbe1241a716f80bda3
[ "MIT" ]
permissive
hprose/hprose-j2me
3a1c02c980b074124caf8eac3db62c9e2ab250fa
b56df8f6d77e19401bcaeadc13144404b5b07f6c
refs/heads/master
2023-05-27T07:36:43.319840
2016-02-06T05:43:37
2016-02-06T05:43:37
34,025,440
8
2
null
2015-05-02T00:54:42
2015-04-16T00:22:27
Java
UTF-8
Java
false
false
5,773
java
/**********************************************************\ | | | hprose | | | | Official WebSite: http://www.hprose.com/ | | http://www.hprose.org/ | | | \**********************************************************/ /**********************************************************\ * * * ObjectIntMap.java * * * * ObjectIntMap class for Java. * * * * LastModified: Jun 7, 2011 * * Author: Ma Bingyao <andot@hprose.com> * * * \**********************************************************/ package hprose.io; final class ObjectIntMap { static final int DEFAULT_INITIAL_CAPACITY = 16; static final int MAXIMUM_CAPACITY = 1 << 30; Entry[] table; int size; int threshold; public ObjectIntMap() { threshold = DEFAULT_INITIAL_CAPACITY; table = new Entry[DEFAULT_INITIAL_CAPACITY]; } static int hash(Object key) { int h = System.identityHashCode(key); h ^= (h >>> 20) ^ (h >>> 12); return h ^ (h >>> 7) ^ (h >>> 4); } static int indexFor(int h, int length) { return h & (length - 1); } public int size() { return size; } public boolean isEmpty() { return size == 0; } public void clear() { Entry[] tab = table; for (int i = 0; i < tab.length; i++) tab[i] = null; size = 0; } public int get(Object key) { if (key == null) { return getForNullKey(); } int hash = hash(key); for (Entry e = table[indexFor(hash, table.length)]; e != null; e = e.next) { Object k; if (e.hash == hash && ((k = e.key) == key)) { return e.value; } } return -1; } private int getForNullKey() { for (Entry e = table[0]; e != null; e = e.next) { if (e.key == null) { return e.value; } } return -1; } public boolean containsKey(Object key) { return getEntry(key) != null; } final Entry getEntry(Object key) { if (key == null) { for (Entry e = table[0]; e != null; e = e.next) { if (e.key == null) { return e; } } } else { int hash = hash(key); for (Entry e = table[indexFor(hash, table.length)]; e != null; e = e.next) { Object k; if (e.hash == hash && ((k = e.key) == key)) { return e; } } } return null; } public int put(Object key, int value) { if (key == null) { return putForNullKey(value); } int hash = hash(key); int i = indexFor(hash, table.length); for (Entry e = table[i]; e != null; e = e.next) { Object k; if (e.hash == hash && ((k = e.key) == key)) { int oldValue = e.value; e.value = value; return oldValue; } } addEntry(hash, key, value, i); return -1; } private int putForNullKey(int value) { for (Entry e = table[0]; e != null; e = e.next) { if (e.key == null) { int oldValue = e.value; e.value = value; return oldValue; } } addEntry(0, null, value, 0); return -1; } void resize(int newCapacity) { Entry[] oldTable = table; int oldCapacity = oldTable.length; if (oldCapacity == MAXIMUM_CAPACITY) { threshold = Integer.MAX_VALUE; return; } Entry[] newTable = new Entry[newCapacity]; transfer(newTable); table = newTable; threshold = newCapacity; } void transfer(Entry[] newTable) { Entry[] src = table; int newCapacity = newTable.length; for (int j = 0; j < src.length; j++) { Entry e = src[j]; if (e != null) { src[j] = null; do { Entry next = e.next; int i = indexFor(e.hash, newCapacity); e.next = newTable[i]; newTable[i] = e; e = next; } while (e != null); } } } static class Entry { final Object key; int value; Entry next; final int hash; Entry(int h, Object k, int v, Entry n) { value = v; next = n; key = k; hash = h; } } void addEntry(int hash, Object key, int value, int bucketIndex) { Entry e = table[bucketIndex]; table[bucketIndex] = new Entry(hash, key, value, e); if (size++ >= threshold) { resize(2 * table.length); } } }
[ "mabingyao@gmail.com" ]
mabingyao@gmail.com
eae0cc01b214cf144bf6fbdf1fe962cdd3e97ff2
e9045e5fa2457a301fa0401d040b0aafb218f9ad
/src/edu/stanford/smi/protegex/owl/model/event/PropertyAdapter.java
06e3eac308bc315f924dc6667dd695150606e3ee
[]
no_license
ubbdst/protege-owl-plugin
8441c5b3c04b37d6e76227c206a4ce9953d65992
55bf58bbeea18349581aae8883da25587b0adb6a
refs/heads/master
2021-06-05T11:38:14.123125
2019-04-03T10:59:21
2019-04-03T10:59:21
83,047,190
1
0
null
2019-04-03T10:47:48
2017-02-24T14:04:41
Java
UTF-8
Java
false
false
5,266
java
/* * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific language governing rights and limitations under the License. * * The Original Code is Protege-2000. * * The Initial Developer of the Original Code is Stanford University. Portions * created by Stanford University are Copyright (C) 2007. All Rights Reserved. * * Protege was developed by Stanford Medical Informatics * (http://www.smi.stanford.edu) at the Stanford University School of Medicine * with support from the National Library of Medicine, the National Science * Foundation, and the Defense Advanced Research Projects Agency. Current * information about Protege can be obtained at http://protege.stanford.edu. * */ package edu.stanford.smi.protegex.owl.model.event; import edu.stanford.smi.protege.event.SlotEvent; import edu.stanford.smi.protegex.owl.model.RDFProperty; import edu.stanford.smi.protegex.owl.model.RDFSClass; /** * @author Holger Knublauch <holger@knublauch.com> */ public class PropertyAdapter implements PropertyListener { public void subpropertyAdded(RDFProperty property, RDFProperty subproperty, SlotEvent event) { subpropertyAdded(property, subproperty); } public void subpropertyAdded(RDFProperty property, RDFProperty subproperty) { // Do nothing } public void subpropertyRemoved(RDFProperty property, RDFProperty subproperty, SlotEvent event) { subpropertyRemoved(property, subproperty); } public void subpropertyRemoved(RDFProperty property, RDFProperty subproperty) { // Do nothing } public void superpropertyAdded(RDFProperty property, RDFProperty superproperty, SlotEvent event) { superpropertyAdded(property, superproperty); } public void superpropertyAdded(RDFProperty property, RDFProperty superproperty) { // Do nothing } public void superpropertyRemoved(RDFProperty property, RDFProperty superproperty, SlotEvent event) { superpropertyRemoved(property, superproperty); } public void superpropertyRemoved(RDFProperty property, RDFProperty superproperty) { // Do nothing } public void unionDomainClassAdded(RDFProperty property, RDFSClass rdfsClass, SlotEvent event) { unionDomainClassAdded(property, rdfsClass); } public void unionDomainClassAdded(RDFProperty property, RDFSClass rdfsClass) { // Do nothing } public void unionDomainClassRemoved(RDFProperty property, RDFSClass rdfsClass, SlotEvent event) { unionDomainClassRemoved(property, rdfsClass); } public void unionDomainClassRemoved(RDFProperty property, RDFSClass rdfsClass) { // Do nothing } /************* Deprecated methods **************/ /** * @deprecated */ public final void templateSlotClsAdded(SlotEvent event) { if (event.getSlot() instanceof RDFProperty && event.getCls() instanceof RDFSClass) { unionDomainClassAdded((RDFProperty) event.getSlot(), (RDFSClass) event.getCls(), event); } } /** * @deprecated */ public void templateSlotClsRemoved(SlotEvent event) { if (event.getSlot() instanceof RDFProperty && event.getCls() instanceof RDFSClass) { unionDomainClassRemoved((RDFProperty) event.getSlot(), (RDFSClass) event.getCls(), event); } } /** * @deprecated */ public void directSubslotAdded(SlotEvent event) { if (event.getSlot() instanceof RDFProperty && event.getSubslot() instanceof RDFProperty) { subpropertyAdded((RDFProperty) event.getSlot(), (RDFProperty) event.getSubslot(), event); } } /** * @deprecated */ public final void directSubslotMoved(SlotEvent event) { // Not supported in OWL } /** * @deprecated */ public void directSubslotRemoved(SlotEvent event) { if (event.getSlot() instanceof RDFProperty && event.getSubslot() instanceof RDFProperty) { subpropertyRemoved((RDFProperty) event.getSlot(), (RDFProperty) event.getSubslot(), event); } } /** * @deprecated */ public void directSuperslotAdded(SlotEvent event) { if (event.getSlot() instanceof RDFProperty && event.getSubslot() instanceof RDFProperty) { superpropertyAdded((RDFProperty) event.getSlot(), (RDFProperty) event.getSubslot(), event); } } /** * @deprecated */ public void directSuperslotRemoved(SlotEvent event) { if (event.getSlot() instanceof RDFProperty && event.getSubslot() instanceof RDFProperty) { superpropertyRemoved((RDFProperty) event.getSlot(), (RDFProperty) event.getSubslot(), event); } } }
[ "hru066@ubbhf0225453.klientdrift.uib.no" ]
hru066@ubbhf0225453.klientdrift.uib.no
8b50210a4b35b7093149971e9917e6a73871a895
840a2793dcb6cad4cd9541e572c984123ef99ae2
/NewVersion/app/src/main/java/dingw/com/newversion/constant/Constant.java
b238a27079176e21f6186681660bedcacd397106
[]
no_license
kimonic/NewVersion1
9eea5db895c12f92be3e662911e5934fed694f65
99854a892067241c4e242bf101b987470ae7ade3
refs/heads/master
2021-01-20T09:06:37.686748
2017-05-22T10:04:24
2017-05-22T10:04:24
90,218,871
0
0
null
null
null
null
UTF-8
Java
false
false
1,892
java
package dingw.com.newversion.constant; /** * Created by 12348 on 2017/4/5 0005. * 常量 */ public class Constant { public static final String BASEurl="http://ceshi.12348oa.com/v1.4/lawyerapp/"; // public static final String NEWBASEURL="http://ceshi.12348oa.com/flfw/"; public static final String NEWBASEURL="https://develapi.12348oa.com/flfw/"; public static final String WORK_BASEURL="http://ceshi.12348oa.com/flfw/"; public static final String NOTICE_SEARCH_URL="http://ceshi.12348oa.com/flfw/bulletin/getList?seach="; public static final String MINUTE_SEARCH_URL="http://ceshi.12348oa.com/flfw/minute/getList??seach="; public static final String TAG="icon_boy tag------------"; /**登录url连接*/ public static final String LOGIN_URL="login/lawyerLoginApp"; /**绑定解绑url连接*/ public static final String BIND_URL="login/bindLawyer"; /**解除绑定url连接*/ public static final String UNBIND_URL="login/relieveBindLawyer"; /**律师自媒体列表*/ public static final String LAWYER_ZIMEITI=NEWBASEURL+"selfmedia/getList"; /**律师自媒体列表详情*/ public static final String LAWYER_ZIMEITI_DETAILS="selfmedia/getDetails"; /**修改密码获取验证码*/ public static final String CHANGE_PASSWORD_VERIFY_CODE="login/getVerifyCode"; /**修改密码提交*/ public static final String CHANGE_PASSWORD="login/updatePwd"; /**我的财务*/ public static final String FINANCE=NEWBASEURL+"finance_personal/total"; /**主页--待办--网民咨询*/ public static final String WANGMINZIXUN=NEWBASEURL+"consult/getList"; /**主页--工作--本所公告--详情*/ public static final String BENSUOGONGGAO_DEETAILS=NEWBASEURL+"bulletin/getDetails?id="; /**主页--平台--文书*/ public static final String WENSHU=NEWBASEURL+"document/getList?type="; }
[ "123456" ]
123456
d7efd4e4cd8ae1ac17d75b9ee6ce3a34f7298f6f
80dded658a2def9f19efda0285e22405a8dd451c
/decompiled_src/JDGui/org/anddev/andengine/level/LevelLoader.java
a7c0e282de24a18a8fbcd9f0e61125cdbd65b28f
[ "Apache-2.0" ]
permissive
rLadia-demo/AttacknidPatch
57482e19c6e99e8923e299a121b9b2c74242b8ee
561fc5fa5c1bc5afa4bad28855bf16b480c3ab6a
refs/heads/master
2021-01-25T07:08:43.450419
2014-06-15T14:35:03
2014-06-15T14:35:03
20,852,359
1
0
null
null
null
null
UTF-8
Java
false
false
3,320
java
package org.anddev.andengine.level; import android.content.Context; import android.content.res.AssetManager; import android.content.res.Resources; import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.util.HashMap; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import org.anddev.andengine.level.util.constants.LevelConstants; import org.anddev.andengine.util.Debug; import org.anddev.andengine.util.StreamUtils; import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; public class LevelLoader implements LevelConstants { private String mAssetBasePath; private final HashMap<String, IEntityLoader> mEntityLoaders = new HashMap(); public LevelLoader() { this(""); } public LevelLoader(String paramString) { setAssetBasePath(paramString); } public void loadLevelFromAsset(Context paramContext, String paramString) throws IOException { loadLevelFromStream(paramContext.getAssets().open(this.mAssetBasePath + paramString)); } public void loadLevelFromResource(Context paramContext, int paramInt) throws IOException { loadLevelFromStream(paramContext.getResources().openRawResource(paramInt)); } public void loadLevelFromStream(InputStream paramInputStream) throws IOException { try { XMLReader localXMLReader = SAXParserFactory.newInstance().newSAXParser().getXMLReader(); localXMLReader.setContentHandler(new LevelParser(this.mEntityLoaders)); localXMLReader.parse(new InputSource(new BufferedInputStream(paramInputStream))); return; } catch (SAXException localSAXException) { Debug.e(localSAXException); return; } catch (ParserConfigurationException localParserConfigurationException) { Debug.e(localParserConfigurationException); return; } finally { StreamUtils.closeStream(paramInputStream); } } public void registerEntityLoader(String paramString, IEntityLoader paramIEntityLoader) { this.mEntityLoaders.put(paramString, paramIEntityLoader); } public void registerEntityLoader(String[] paramArrayOfString, IEntityLoader paramIEntityLoader) { HashMap localHashMap = this.mEntityLoaders; for (int i = -1 + paramArrayOfString.length;; i--) { if (i < 0) { return; } localHashMap.put(paramArrayOfString[i], paramIEntityLoader); } } public void setAssetBasePath(String paramString) { if ((paramString.endsWith("/")) || (paramString.length() == 0)) { this.mAssetBasePath = paramString; return; } throw new IllegalStateException("pAssetBasePath must end with '/' or be lenght zero."); } public static abstract interface IEntityLoader { public abstract void onLoadEntity(String paramString, Attributes paramAttributes); } } /* Location: C:\Users\Rodelle\Desktop\Attacknid\Tools\Attacknids-dex2jar.jar * Qualified Name: org.anddev.andengine.level.LevelLoader * JD-Core Version: 0.7.0.1 */
[ "rLadia@ymail.com" ]
rLadia@ymail.com
eb1e8f452aa275ed091d40c07869c2df33bef2b1
bc2c3d6948d0727629188996df8cf798a98d2b6f
/org.gnstudio.apdt.model.editor/src/org/gnstudio/apdt/model/editor/nodes/sequence/DefaultCaseGroupNode.java
898d1e88c4349724e84897628d5a37ed9474b020
[]
no_license
GiorgioNatili/apdt-core
5d26f74207d70fca0209a55315af2f427f4d6196
bf762f3d48d41603373a85a7a230310f7dd62ba8
refs/heads/master
2020-05-02T17:44:53.477300
2014-01-16T04:50:46
2014-01-16T04:50:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,571
java
/******************************************************************************* * Copyright (c) 2010, 2012 GNstudio s.r.l. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser General Public License v3.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl-3.0.html * * Contributors: * GNstudio s.r.l. - initial API and implementation *******************************************************************************/ package org.gnstudio.apdt.model.editor.nodes.sequence; import org.eclipse.jface.resource.ImageDescriptor; import org.gnstudio.apdt.model.Sequence; import org.gnstudio.apdt.model.SequenceGroup; import org.gnstudio.apdt.model.editor.APDEditorImages; import org.gnstudio.apdt.model.editor.APDEditorMessages; import org.gnstudio.apdt.model.editor.APDNodeHelpMessages; import org.gnstudio.apdt.model.editor.nodes.AbstractNode; import org.gnstudio.apdt.model.editor.nodes.NodeDeleteProvider; public class DefaultCaseGroupNode extends CaseGroupNode { public DefaultCaseGroupNode(AbstractNode<?> parent, SequenceGroup provider, NodeDeleteProvider<Sequence> deleteProvider) { super(parent, provider, deleteProvider); } @Override public String getName() { return APDEditorMessages.TreeNode_default_case; } @Override public String getNote() { return APDNodeHelpMessages.getNLS("editor.help.default"); } public ImageDescriptor getImageDescriptor() { return APDEditorImages.DESC_MODEL_SEQN_DEFAULT_CASE; } }
[ "theanuradha@gmail.com" ]
theanuradha@gmail.com
298bfcc8a9e1f5989e4603b224ce08c82592d9ba
43ea91f3ca050380e4c163129e92b771d7bf144a
/services/eip/src/main/java/com/huaweicloud/sdk/eip/v2/model/CreateSharedBandwidhRequestBody.java
74960e43611f4d701a8782d7914fe5969a6ca668
[ "Apache-2.0" ]
permissive
wxgsdwl/huaweicloud-sdk-java-v3
660602ca08f32dc897d3770995b496a82a1cc72d
ee001d706568fdc7b852792d2e9aefeb9d13fb1e
refs/heads/master
2023-02-27T14:20:54.774327
2021-02-07T11:48:35
2021-02-07T11:48:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,493
java
package com.huaweicloud.sdk.eip.v2.model; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.huaweicloud.sdk.eip.v2.model.CreateSharedBandwidthOption; import java.util.function.Consumer; import java.util.Objects; /** * 创建共享带宽请求体 */ public class CreateSharedBandwidhRequestBody { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="bandwidth") private CreateSharedBandwidthOption bandwidth = null; public CreateSharedBandwidhRequestBody withBandwidth(CreateSharedBandwidthOption bandwidth) { this.bandwidth = bandwidth; return this; } public CreateSharedBandwidhRequestBody withBandwidth(Consumer<CreateSharedBandwidthOption> bandwidthSetter) { if(this.bandwidth == null ){ this.bandwidth = new CreateSharedBandwidthOption(); bandwidthSetter.accept(this.bandwidth); } return this; } /** * Get bandwidth * @return bandwidth */ public CreateSharedBandwidthOption getBandwidth() { return bandwidth; } public void setBandwidth(CreateSharedBandwidthOption bandwidth) { this.bandwidth = bandwidth; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } CreateSharedBandwidhRequestBody createSharedBandwidhRequestBody = (CreateSharedBandwidhRequestBody) o; return Objects.equals(this.bandwidth, createSharedBandwidhRequestBody.bandwidth); } @Override public int hashCode() { return Objects.hash(bandwidth); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateSharedBandwidhRequestBody {\n"); sb.append(" bandwidth: ").append(toIndentedString(bandwidth)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "hwcloudsdk@huawei.com" ]
hwcloudsdk@huawei.com
d4ad0289f56c5ec92eb7ee911c26f19a55a5763d
e04eaf81f95cc8d894694f4976c992665036749e
/org.eclipse.gmt.emfacade.tests/src-gen/org/eclipse/gmt/emfacade/swt/binders/FormLayout_marginRight.java
66d99f9fd503a4588e2599cc6c4f005ec39a8461
[]
no_license
hallvard/emfacade
d5fc3d669dfab100ffb2fb33e4315200b90417fe
c1f8b77be5200b233053606470290f61e49f5359
refs/heads/master
2020-05-17T11:36:37.711287
2011-11-14T08:36:57
2011-11-14T08:36:57
2,770,878
0
0
null
null
null
null
UTF-8
Java
false
false
436
java
package org.eclipse.gmt.emfacade.swt.binders; import org.eclipse.gmt.emfacade.builder.strategies.GetSetStrategy1.Association; import org.eclipse.swt.layout.FormLayout; class FormLayout_marginRight implements Association<FormLayout, Integer> { public Integer get(FormLayout formLayout) { return formLayout.marginRight; } public void set(FormLayout formLayout, Integer integer) { formLayout.marginRight = integer; } }
[ "hal@idi.ntnu.no" ]
hal@idi.ntnu.no
998a2792a099afe26d8d70e188bbc19e856a44b4
c5a5049c34fcef7601ef9d50f0f4d76b21d5e3ed
/src/main/java/com/dnake/kit/EncryptKit.java
4803233a5d48c1fc8983c8dda7f69d7961be2f25
[]
no_license
zhsyk34/lock2
65677e25c67a24d38a2a4ac6ed4aca3813f2941f
b590cd8f1466d7170fdc66ed3f3aa2abefef7462
refs/heads/master
2021-01-11T21:40:03.861918
2017-01-21T05:42:45
2017-01-21T05:42:45
78,832,956
0
0
null
null
null
null
UTF-8
Java
false
false
1,215
java
package com.dnake.kit; import java.nio.charset.Charset; import java.security.MessageDigest; public class EncryptKit { private final static String[] hexDigits = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"}; public static String md5(String str) { if (str != null) { try { // 创建具有指定算法名称的信息摘要 MessageDigest md = MessageDigest.getInstance("MD5"); // 使用指定的字节数组对摘要进行最后更新,然后完成摘要计算 byte[] results = md.digest(str.getBytes(Charset.forName("UTF-8"))); // 将得到的字节数组变成字符串返回 String resultString = byteArrayToHexString(results); return resultString.toUpperCase(); } catch (Exception ex) { ex.printStackTrace(); } } return null; } private static String byteArrayToHexString(byte[] b) { StringBuffer resultSb = new StringBuffer(); for (int i = 0; i < b.length; i++) { resultSb.append(byteToHexString(b[i])); } return resultSb.toString(); } private static String byteToHexString(byte b) { int n = b; if (n < 0) n = 256 + n; int d1 = n / 16; int d2 = n % 16; return hexDigits[d1] + hexDigits[d2]; } }
[ "zhsy1985@sina.com" ]
zhsy1985@sina.com
743314df69369968c12e98a88e94dd2f138657f7
6e812f36c5706901f2f01966bf79a49cd64ce131
/LoadObj/app/src/main/java/com/example/a111/loadobj/MyRenderer2.java
150b0f17cb00610f8079d9fb8c37c08c24976c1a
[]
no_license
huhaisong/androidStudio-workplace
a1b9dc669c287562eb5032324cb6cbc3614c561e
a0967dacc5018efcb7b6703160d24059d817c403
refs/heads/master
2020-04-06T07:02:45.504409
2016-09-19T07:36:45
2016-09-19T07:36:45
60,130,558
1
1
null
null
null
null
UTF-8
Java
false
false
9,212
java
package com.example.a111.loadobj; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; import com.threed.jpct.*; import com.threed.jpct.Matrix; import com.threed.jpct.util.MemoryHelper; import android.opengl.*; public class MyRenderer2 implements GLSurfaceView.Renderer { // FrameBuffer对象 private FrameBuffer fb; // World对象 private World world; // RGBColor private RGBColor back = new RGBColor(50, 50, 100); // Object3D对象 private Object3D plane = null; private Object3D ball1 = null; private Object3D ball2 = null; // SimpleVector // 通过设置组件的x,y,z向量来创建一个SimpleVector对象 ,表示小球的运动方向和速度 private SimpleVector move = new SimpleVector(-4.0, 0.0, 4.0); private boolean collsion = false;//是否发生碰撞 private SimpleVector tem; // FPS private int fps = 0; private long time = System.currentTimeMillis(); // 默认构造 // 对该项目的一些优化 public MyRenderer2() { // 绘制的最多的Polygon数量,默认为4096,此处如果超过500,则不绘制 Config.maxPolysVisible = 500; // 最远的合适的平面,默认为1000 Config.farPlane = 1500; Config.glTransparencyMul = 0.1f; Config.glTransparencyOffset = 0.1f; // 使JPCT-AE这个引擎使用顶点而不是顶点数组缓冲对象,因为它可能会使某些硬件更快 // 但在Samsung Galaxy,它并不能工作的很好,可能使之崩溃,这就是它默认为false的原因 Config.useVBO = true; Texture.defaultToMipmapping(true); Texture.defaultTo4bpp(true); } @Override public void onDrawFrame(GL10 gl) { // TODO Auto-generated method stub try { move();//实现上下左右键 SimpleVector trsn = ball2.checkForCollisionSpherical(move, 10f); //求出两个球之间距离 SimpleVector length = new SimpleVector(ball1.getTransformedCenter().x - ball2.getTransformedCenter().x, ball1.getTransformedCenter().y - ball2.getTransformedCenter().y, ball1.getTransformedCenter().z - ball2.getTransformedCenter().z); //判断两球之间距离是否小于两球半径之和,若小于,则发生碰撞 if (length.length() <= 20 + 5) { collsion = true;//碰撞发生 } //如果发生碰撞 if (collsion) { //判断小球是否已经跨越平面了 if (ball2.getTranslation(tem).z < -100 || ball1.getTranslation(tem).z > 100) { ball1.clearTranslation(); ball2.clearTranslation(); ball1.setVisibility(false);//球消失 ball2.setVisibility(false); } else {//小球设置新的运动方向 ball1.translate(new SimpleVector(1, 0, 3)); ball2.translate(new SimpleVector(-2, 0, -2)); } } //或者if(!collsion) //如果没有碰撞 else ball2.translate(trsn); SimpleVector axis = new SimpleVector(1, 0, 1);//球旋转时轴的方向 ball2.rotateAxis(axis, (float) Math.toRadians(10));//实现球旋转 // 以定义好的RGBColor清屏 fb.clear(back); // 变换和灯光所有的多 边形 world.renderScene(fb); // 绘制由renderScene产生的场景 world.draw(fb); // 渲染显示图像 fb.display(); // fps加1 fps += 1; // 打印输出fps if (System.currentTimeMillis() - time > 1000) { System.out.println(fps + "fps"); fps = 0; time = System.currentTimeMillis(); } } catch (Exception e) { e.printStackTrace(); // 打印异常信息 Logger.log("Drawing thread terminated!", Logger.MESSAGE); } } @Override public void onSurfaceChanged(GL10 gl, int width, int height) { // TODO Auto-generated method stub if (fb != null) { fb = null; } // 新产生一个FrameBuffer对象 fb = new FrameBuffer(gl, width, height); } @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { // TODO Auto-generated method stub Logger.log("onCreate"); // 混合渲染 gl.glEnable(GL10.GL_BLEND); gl.glBlendFunc(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA); // 新建world对象 world = new World(); // 纹理 TextureManager tm = TextureManager.getInstance(); Texture texture2 = new Texture(LoadFile.bitmap1); Texture texture3 = new Texture(LoadFile.bitmap2); Texture texture4 = new Texture(LoadFile.bitmap3); tm.addTexture("texture2", texture2); tm.addTexture("texture3", texture3); tm.addTexture("texture4", texture4); // 初始化各3D元素 // plane = Primitives.getPlane(20, 10); // 得到平面 //也可以采用上面得到平面的方法,这里采用的是加载3ds模型 plane = loadModel("table.3ds", 4f); plane.translate(0, -30, 20); plane.rotateX(-(float) Math.PI / 2); // 从jpct-ae的坐标旋转到正常坐标系 plane.rotateY((float) Math.PI / 2); ball1 = Primitives.getSphere(10); // 得到球体 ball1.translate(0, -39, 0); ball2 = Primitives.getSphere(10); ball2.translate(50, -39, -50); //设置纹理贴图方式 plane.calcTextureWrap(); plane.setTexture("texture2"); ball1.calcTextureWrapSpherical(); ball1.setTexture("texture3"); ball2.calcTextureWrapSpherical(); ball2.setTexture("texture4"); world.addObject(plane); world.addObject(ball1); world.addObject(ball2); //设置碰撞模式 ball1.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS); ball2.setCollisionMode(Object3D.COLLISION_CHECK_SELF); plane.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS); // 设置环境光 world.setAmbientLight(255, 255, 255); //这里设置光照的地方不成功,不能显示光照,不知道为什么???????????? //设置光照 Light light = new Light(world); light.setPosition(new SimpleVector(ball1.getTransformedCenter().x, ball1.getTransformedCenter().y - 100, ball1.getTransformedCenter().z - 50)); light.setIntensity(255, 0, 0); //以上3段代码没有效果 // 编译所有对象 world.buildAllObjects(); // Camera相关 Camera cam = world.getCamera(); cam.setPositionToCenter(ball1); cam.align(ball1);//将相机方向对着物体的Z轴正方向 //相机绕着X轴旋转20度 cam.rotateCameraX((float) Math.toRadians(20)); cam.moveCamera(Camera.CAMERA_MOVEOUT, 250); // 向外以移动 cam.moveCamera(Camera.CAMERA_MOVEUP, 60); //cam.lookAt(plane.getTransformedCenter()); // 回收内存 MemoryHelper.compact(); } // 载入模型 private Object3D loadModel(String filename, float scale) { // 将载入的3ds文件保存到model数组中 Object3D[] model = Loader.load3DS(LoadFile2.loadf(filename), scale); // 取第一个3ds文件 Object3D o3d = new Object3D(0); // 临时变量temp Object3D temp ; // 遍历model数组 for (Object3D aModel : model) { // 给temp赋予model数组中的某一个 temp = aModel; // 设置temp的中心为 origin (0,0,0) temp.setCenter(SimpleVector.ORIGIN); // 沿x轴旋转坐标系到正常的坐标系(jpct-ae的坐标中的y,x是反的) temp.rotateX((float) (-.5 * Math.PI)); // 使用旋转矩阵指定此对象旋转网格的原始数据 temp.rotateMesh(); // new 一个矩阵来作为旋转矩阵 temp.setRotationMatrix(new Matrix()); // 合并o3d与temp o3d = Object3D.mergeObjects(o3d, temp); // 主要是为了从桌面版JPCT到android版的移徝(桌面版此处为o3d.build()) o3d.compile(); } // 返回o3d对象 return o3d; } public void move() { Camera cam = world.getCamera(); if (Jpct_Collsion3Activity.up) { // 按向上方向键 cam.moveCamera(cam.getDirection(), -2);//摄像机向里面移动 } if (Jpct_Collsion3Activity.down) { cam.moveCamera(cam.getDirection(), 2);//向外移动 } if (Jpct_Collsion3Activity.left) { plane.rotateY((float) Math.toRadians(-10));// 向左旋转 } if (Jpct_Collsion3Activity.right) { plane.rotateY((float) Math.toRadians(10)); // 向右旋转 } } }
[ "291648890@qq.com" ]
291648890@qq.com
9c3cb14f75fcf2e254da3f276bfff1ecd43cdef5
1930d97ebfc352f45b8c25ef715af406783aabe2
/src/main/java/com/alipay/api/response/AlipayDataDataserviceAdCreativeCreateormodifyResponse.java
5707bcf74b1d46798dabc2e7a88133a7ed78812e
[ "Apache-2.0" ]
permissive
WQmmm/alipay-sdk-java-all
57974d199ee83518523e8d354dcdec0a9ce40a0c
66af9219e5ca802cff963ab86b99aadc59cc09dd
refs/heads/master
2023-06-28T03:54:17.577332
2021-08-02T10:05:10
2021-08-02T10:05:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,056
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.data.dataservice.ad.creative.createormodify response. * * @author auto create * @since 1.0, 2021-07-28 23:00:22 */ public class AlipayDataDataserviceAdCreativeCreateormodifyResponse extends AlipayResponse { private static final long serialVersionUID = 2516856538535665529L; /** * 广告投放平台生成的创意ID */ @ApiField("creative_id") private Long creativeId; /** * 外部平台导入广告库后,广告投放创意对应的外部资源ID */ @ApiField("creative_outer_id") private String creativeOuterId; public void setCreativeId(Long creativeId) { this.creativeId = creativeId; } public Long getCreativeId( ) { return this.creativeId; } public void setCreativeOuterId(String creativeOuterId) { this.creativeOuterId = creativeOuterId; } public String getCreativeOuterId( ) { return this.creativeOuterId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
de7f0fb00a6b1d2819324cbd41b03ffb23bf1f5d
71007018bfae36117fd2f779dbe6e6d7bb9bde9c
/src/test/java/com/magento/test/service/CmsPageStoreServiceTest.java
c8c87947abaca182c194c3198c7c2a3605ef7e1e
[]
no_license
gmai2006/magentotest
819201760b720a90d55ef853be964651ace125ac
ca67d16d6280ddaefbf57fa1129b6ae7bd80408f
refs/heads/main
2023-09-03T05:14:27.788984
2021-10-17T06:25:09
2021-10-17T06:25:09
418,040,494
0
0
null
null
null
null
UTF-8
Java
false
false
2,588
java
/** * %% Copyright (C) 2021 DataScience 9 LLC %% Licensed under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * <p>http://www.apache.org/licenses/LICENSE-2.0 * * <p>Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing permissions and * limitations under the License. #L% * * <p>This code is 100% AUTO generated. Please do not modify it DIRECTLY If you need new features or * function or changes please update the templates then submit the template through our web * interface. */ package com.magento.test.service; import com.magento.test.entity.CmsPageStore; import com.magento.test.entity.CmsPageStoreId; import com.magento.test.utils.FileUtils; import com.google.gson.JsonArray; import com.google.gson.GsonBuilder; import org.junit.BeforeClass; import org.junit.Test; import java.io.IOException; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List; import java.util.Arrays; import com.google.gson.Gson; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.magento.test.utils.ByteArrayToBase64TypeAdapter; public class CmsPageStoreServiceTest { private static DefaultCmsPageStoreService serviceMock; private static CmsPageStore[] records; static Gson gson = new GsonBuilder() .registerTypeHierarchyAdapter(byte[].class, new ByteArrayToBase64TypeAdapter()) .setDateFormat("yyyy-MM-dd HH:mm:ss.S") .create(); /** Run when the class is loaded. */ @BeforeClass public static void setUp() { serviceMock = mock(DefaultCmsPageStoreService.class); String inputFile = "CmsPageStore.json"; try { String json = FileUtils.readFileFromResource2String(inputFile, Charset.defaultCharset()); records = gson.fromJson(json, CmsPageStore[].class); } catch (IOException ex) { ex.printStackTrace(); } final CmsPageStoreId id = new CmsPageStoreId(records[0].getStoreId(), records[0].getPageId()); when(serviceMock.find(id)).thenReturn(records[0]); } @Test public void testFind_success() { final CmsPageStoreId id = new CmsPageStoreId(records[0].getStoreId(), records[0].getPageId()); CmsPageStore testResult = serviceMock.find(id); org.junit.Assert.assertNotNull(testResult); } }
[ "gmai2006@gmail.com" ]
gmai2006@gmail.com
8164ef68c660cef9b38830cadbfef0874d9ff907
712a5e8475b6c9276bd4f8f857be95fdf6f30b9f
/com/google/android/gms/analytics/ecommerce/Product.java
34dea6f61da2f76bec37fff87ef1c7702146a6ba
[]
no_license
swapnilsen/OCR_2
b29bd22a51203b4d39c2cc8cb03c50a85a81218f
1889d208e17e94a55ddeae91336fe92110e1bd2d
refs/heads/master
2021-01-20T08:46:03.508508
2017-05-03T19:50:52
2017-05-03T19:50:52
90,187,623
1
0
null
null
null
null
UTF-8
Java
false
false
2,275
java
package com.google.android.gms.analytics.ecommerce; import com.google.ads.mediation.facebook.FacebookAdapter; import com.google.android.gms.analytics.zzc; import com.google.android.gms.analytics.zzf; import com.google.android.gms.common.internal.zzac; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; public class Product { Map<String, String> zzadz; public Product() { this.zzadz = new HashMap(); } void put(String str, String str2) { zzac.zzb((Object) str, (Object) "Name should be non-null"); this.zzadz.put(str, str2); } public Product setBrand(String str) { put("br", str); return this; } public Product setCategory(String str) { put("ca", str); return this; } public Product setCouponCode(String str) { put("cc", str); return this; } public Product setCustomDimension(int i, String str) { put(zzc.zzay(i), str); return this; } public Product setCustomMetric(int i, int i2) { put(zzc.zzaz(i), Integer.toString(i2)); return this; } public Product setId(String str) { put(FacebookAdapter.KEY_ID, str); return this; } public Product setName(String str) { put("nm", str); return this; } public Product setPosition(int i) { put("ps", Integer.toString(i)); return this; } public Product setPrice(double d) { put("pr", Double.toString(d)); return this; } public Product setQuantity(int i) { put("qt", Integer.toString(i)); return this; } public Product setVariant(String str) { put("va", str); return this; } public String toString() { return zzf.zzS(this.zzadz); } public Map<String, String> zzbM(String str) { Map<String, String> hashMap = new HashMap(); for (Entry entry : this.zzadz.entrySet()) { String valueOf = String.valueOf(str); String valueOf2 = String.valueOf((String) entry.getKey()); hashMap.put(valueOf2.length() != 0 ? valueOf.concat(valueOf2) : new String(valueOf), (String) entry.getValue()); } return hashMap; } }
[ "swasen@cisco.com" ]
swasen@cisco.com
d35acbd6d3a1e720ceebc5a27292dc4d5cab6f26
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/LANG-5b-1-5-Single_Objective_GGA-WeightedSum/org/apache/commons/lang3/LocaleUtils_ESTest_scaffolding.java
87f19105b1421c345fd572d1a89905372b020e71
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
1,920
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Mar 31 10:10:52 UTC 2020 */ package org.apache.commons.lang3; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class LocaleUtils_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.lang3.LocaleUtils"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(LocaleUtils_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.lang3.LocaleUtils" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
780094b97e6c2335a07780df3e234d6b43bf989e
3db45557aef8a45f41c0f8dd706beeea8b1dea9f
/cjpf/src/main/java/cjp/lifted14.java
baf44abe9c40c32108bf55ccd6756defaed13bec
[]
no_license
OpenUniversity/AOP-Awesome
7847f63ca88c9781ca0c2bcdcd8b0cd2e8c7ed56
b2dcbe3ee1369717dd2cf193503c632ade7d28ad
refs/heads/master
2020-04-05T00:29:22.270200
2018-12-21T17:04:28
2018-12-21T17:04:28
17,806,949
0
0
null
2014-03-22T14:39:49
2014-03-16T19:15:22
Java
UTF-8
Java
false
false
1,446
java
package cjp; import org.strategoxt.stratego_lib.*; import org.strategoxt.java_front.*; import org.strategoxt.stratego_gpp.*; import org.strategoxt.stratego_sglr.*; import org.strategoxt.lang.*; import org.spoofax.interpreter.terms.*; import static org.strategoxt.lang.Term.*; import org.spoofax.interpreter.library.AbstractPrimitive; import java.util.ArrayList; import java.lang.ref.WeakReference; @SuppressWarnings("all") final class lifted14 extends Strategy { public static final lifted14 instance = new lifted14(); @Override public IStrategoTerm invoke(Context context, IStrategoTerm term) { ITermFactory termFactory = context.getFactory(); Fail181: { IStrategoTerm m_19 = null; if(term.getTermType() != IStrategoTerm.APPL || transform._consParam_3 != ((IStrategoAppl)term).getConstructor()) break Fail181; m_19 = term.getSubterm(1); term = pp_aspectj_string_0_0.instance.invoke(context, m_19); if(term == null) break Fail181; term = termFactory.makeAppl(transform._consLit_1, new IStrategoTerm[]{termFactory.makeAppl(transform._consClass_1, new IStrategoTerm[]{termFactory.makeAppl(transform._consRegularTypePattern_1, new IStrategoTerm[]{termFactory.makeAppl(transform._consRefTypePattern_1, new IStrategoTerm[]{termFactory.makeAppl(transform._consNamePattern_1, new IStrategoTerm[]{term})})})})}); if(true) return term; } return null; } }
[ "arik.hadas@openu.ac.il" ]
arik.hadas@openu.ac.il
a64ed79e009439ed209771992e98f1a11f661c71
57a65f5ee510ffc270988ffec20ad0aacecd123f
/src/main/java/com/elytradev/correlated/client/render/tile/RenderDriveBay.java
8dbd05b9f2f7b1eda5bc18628e973e634dec1b78
[ "MIT" ]
permissive
carstorm/Correlated
748b7df45a36a05548c78ea17139986296e7492d
d5e56b4f70190e09de9465107bf9a32a0de3056a
refs/heads/1.11.2
2021-01-22T19:08:48.153727
2017-03-14T16:11:03
2017-03-14T16:11:03
85,167,153
0
0
null
2017-03-16T07:44:26
2017-03-16T07:44:26
null
UTF-8
Java
false
false
7,664
java
package com.elytradev.correlated.client.render.tile; import org.lwjgl.opengl.GL11; import com.elytradev.correlated.Correlated; import com.elytradev.correlated.block.BlockDriveBay; import com.elytradev.correlated.client.render.ProtrudingBoxRenderer; import com.elytradev.correlated.item.ItemDrive; import com.elytradev.correlated.tile.TileEntityDriveBay; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.VertexBuffer; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.entity.Entity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult.Type; public class RenderDriveBay extends TileEntitySpecialRenderer<TileEntityDriveBay> { private static class RenderDummy extends Render<Entity> { protected RenderDummy(RenderManager renderManager) { super(renderManager); } @Override public void renderLivingLabel(Entity entityIn, String str, double x, double y, double z, int maxDistance) { super.renderLivingLabel(entityIn, str, x, y, z, maxDistance); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return null; } } private static final ResourceLocation DRIVE = new ResourceLocation("correlated", "textures/misc/drive.png"); private RenderDummy renderDummy; private final Entity DUMMY_ENTITY = new Entity(null) { @Override protected void writeEntityToNBT(NBTTagCompound tagCompound) { } @Override protected void readEntityFromNBT(NBTTagCompound tagCompund) { } @Override protected void entityInit() { } }; public static final ProtrudingBoxRenderer pbr = new ProtrudingBoxRenderer() .slotCount(8) .columns(2) .width(4) .height(2) .depth(1) .textureWidth(12) .textureHeight(8) .x(3) .y(2) .z(0) .xPadding(2) .yPadding(1); @Override public void renderTileEntityAt(TileEntityDriveBay te, double x, double y, double z, float partialTicks, int destroyStage) { IBlockState bs = te.getWorld().getBlockState(te.getPos()); if (bs.getBlock() != Correlated.drive_bay) return; boolean lit = bs.getValue(BlockDriveBay.LIT); GlStateManager.pushMatrix(); GlStateManager.translate(x, y, z); EnumFacing facing = te.getWorld().getBlockState(te.getPos()).getValue(BlockDriveBay.FACING); switch (facing) { case NORTH: break; case WEST: GlStateManager.rotate(90, 0, 1, 0); GlStateManager.translate(-1, 0, 0); break; case SOUTH: GlStateManager.rotate(180, 0, 1, 0); GlStateManager.translate(-1, 0, -1); break; case EAST: GlStateManager.rotate(270, 0, 1, 0); GlStateManager.translate(0, 0, -1); break; default: break; } GlStateManager.translate(0, 0, -0.0001f); GlStateManager.enableTexture2D(); Minecraft.getMinecraft().getTextureManager().bindTexture(DRIVE); Tessellator tess = Tessellator.getInstance(); VertexBuffer wr = tess.getBuffer(); float oldX = OpenGlHelper.lastBrightnessX; float oldY = OpenGlHelper.lastBrightnessY; int light = te.getWorld().getCombinedLight(te.getPos().offset(facing), 0); int j = light % 65536; int k = light / 65536; OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j, k); wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL); for (int i = 0; i < 8; i++) { if (te.hasDriveInSlot(i)) { ItemStack drive = te.getDriveInSlot(i); if (drive.getItem() instanceof ItemDrive) { ItemDrive itemDrive = (ItemDrive)drive.getItem(); pbr.render(itemDrive.getBaseColor(drive), i, 0, 0); } } } tess.draw(); if (lit) { OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240); GlStateManager.disableLighting(); } GlStateManager.enableBlend(); GlStateManager.disableAlpha(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL); for (int i = 0; i < 8; i++) { if (te.hasDriveInSlot(i)) { ItemStack drive = te.getDriveInSlot(i); if (drive.getItem() instanceof ItemDrive) { ItemDrive itemDrive = (ItemDrive)drive.getItem(); pbr.render(lit ? itemDrive.getFullnessColor(drive) : Correlated.proxy.getColor("other", 48), i, 0, 0.5f); } } } tess.draw(); wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR_NORMAL); for (int i = 0; i < 8; i++) { if (te.hasDriveInSlot(i)) { ItemStack drive = te.getDriveInSlot(i); if (drive.getItem() instanceof ItemDrive) { ItemDrive itemDrive = (ItemDrive)drive.getItem(); pbr.render(itemDrive.getTierColor(drive), i, 0.5f, 0); } } } tess.draw(); GlStateManager.disableBlend(); GlStateManager.enableAlpha(); GlStateManager.enableLighting(); GlStateManager.popMatrix(); RayTraceResult mop = Minecraft.getMinecraft().objectMouseOver; if (mop != null && mop.typeOfHit == Type.BLOCK && mop.getBlockPos().equals(te.getPos())) { if (te.getBlockType() instanceof BlockDriveBay) { BlockDriveBay block = (BlockDriveBay)te.getBlockType(); float hitX = (float)(mop.hitVec.xCoord-te.getPos().getX()); float hitY = (float)(mop.hitVec.yCoord-te.getPos().getY()); float hitZ = (float)(mop.hitVec.zCoord-te.getPos().getZ()); int slot = block.getLookedAtSlot(bs, mop.sideHit, hitX, hitY, hitZ); if (slot != -1 && te.hasDriveInSlot(slot)) { ItemStack drive = te.getDriveInSlot(slot); if (drive.hasDisplayName()) { double nameXZ = 0.325+((7-slot)%2)*(6f/16f); double nameX = 0; double nameY = 0.5+((7-slot)/2)*(3/16f); double nameZ = 0; switch (mop.sideHit) { case EAST: nameZ = nameXZ; nameX = mop.hitVec.xCoord-te.getPos().getX(); break; case WEST: nameZ = nameXZ; nameX = mop.hitVec.xCoord-te.getPos().getX(); nameZ = 1-nameZ; break; case NORTH: nameX = nameXZ; nameZ = mop.hitVec.zCoord-te.getPos().getZ(); break; case SOUTH: nameX = nameXZ; nameZ = mop.hitVec.zCoord-te.getPos().getZ(); nameX = 1-nameX; break; default: break; } nameX += mop.sideHit.getFrontOffsetX()*(2/16f); nameY += mop.sideHit.getFrontOffsetY()*(2/16f); nameZ += mop.sideHit.getFrontOffsetZ()*(2/16f); DUMMY_ENTITY.world = te.getWorld(); DUMMY_ENTITY.posX = DUMMY_ENTITY.prevPosX = te.getPos().getX()+0.5; DUMMY_ENTITY.posY = DUMMY_ENTITY.prevPosY = te.getPos().getY()+0.5; DUMMY_ENTITY.posZ = DUMMY_ENTITY.prevPosZ = te.getPos().getZ()+0.5; DUMMY_ENTITY.height = -0.75f; if (renderDummy == null) { renderDummy = new RenderDummy(Minecraft.getMinecraft().getRenderManager()); } GlStateManager.pushMatrix(); GlStateManager.scale(0.5f, 0.5f, 0.5f); renderDummy.renderLivingLabel(DUMMY_ENTITY, drive.getDisplayName(), (x+nameX)*2, (y+nameY)*2, (z+nameZ)*2, 64); GlStateManager.popMatrix(); } } } } OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, oldX, oldY); } }
[ "aesen@unascribed.com" ]
aesen@unascribed.com
32affd26e4b9e4ea00d887584c1e4d32bc3e1d07
8e67fdab6f3a030f38fa127a79050b8667259d01
/JavaStudyHalUk/src/JavaCybertekSchool_2019/day23_Arrays/WarmUp2.java
5ecf94909f0c13718817d0a12dbdfdcef57c9654
[]
no_license
mosmant/JavaStudyHalUk
07e38ade6c7a31d923519a267a63318263c5910f
a41e16cb91ef307b50cfc497535126aa1e4035e5
refs/heads/master
2023-07-27T13:31:11.004490
2021-09-12T14:59:25
2021-09-12T14:59:25
405,671,965
0
0
null
null
null
null
UTF-8
Java
false
false
858
java
package JavaCybertekSchool_2019.day23_Arrays; public class WarmUp2 { /* 2. write a program that can find the unique characters from a String. Ex: input: AAABCDEEFF output: BCD */ public static void main(String[] args) { String str ="ALL THE LETTERS"; // i String Unique =""; // to store all the unique chars from str for(int j=0; j< str.length(); j++) { int count = 0 ; // count how many times the character is appeared for(int i=0; i < str.length(); i++) { // highest value of i: str.length()-1 if( str.substring(i, i+1).equals( str.substring(j,j+1) ) ) { // ""+str.charAt(j) count++; } } if(count == 1) { Unique+=""+str.charAt(j); } } System.out.println(Unique); } }
[ "mottnr@gmail.com" ]
mottnr@gmail.com
bef7369c99514ccd7850c3377950057ab2ea9882
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-81b-2-19-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/linear/EigenDecompositionImpl_ESTest_scaffolding.java
c579bfae73fb6f12789e301bab1c05f17e85b6fa
[]
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
457
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Apr 03 13:19:42 UTC 2020 */ package org.apache.commons.math.linear; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class EigenDecompositionImpl_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
1ed57cf01fd255cabd88bda9cd10b5794a4317c4
523584d00978ce9398d0d4b5cf33a318110ddadb
/src-pos/uk/chromis/pos/panels/JPanelPayments.java
aac3c6144e293dd84f58f7df38352ea38177e466
[]
no_license
zenonarg/Chromis
8bbd687d763f4bf258984e46825257486bc49265
8211d7e1f3aa0e5d858e105a392795bf05c39924
refs/heads/master
2023-04-26T09:31:06.394569
2021-01-12T15:26:15
2021-01-12T15:26:15
312,036,399
1
0
null
2021-01-12T14:57:42
2020-11-11T17:06:35
null
UTF-8
Java
false
false
2,357
java
/* ** Chromis POS - The New Face of Open Source POS ** Copyright (c)2015-2016 ** http://www.chromis.co.uk ** ** This file is part of Chromis POS Version V0.60.2 beta ** ** Chromis POS 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. ** ** Chromis POS 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 Chromis POS. If not, see <http://www.gnu.org/licenses/> ** ** */ package uk.chromis.pos.panels; import uk.chromis.data.user.EditorRecord; import uk.chromis.data.user.ListProvider; import uk.chromis.data.user.SaveProvider; import uk.chromis.pos.forms.AppLocal; import uk.chromis.pos.forms.DataLogicSales; /** * * @author adrianromero */ public class JPanelPayments extends JPanelTable { private PaymentsEditor jeditor; private DataLogicSales m_dlSales = null; /** Creates a new instance of JPanelPayments */ public JPanelPayments() { } /** * */ @Override protected void init() { m_dlSales = (DataLogicSales) app.getBean("uk.chromis.pos.forms.DataLogicSales"); jeditor = new PaymentsEditor(app, dirty); } /** * * @return */ @Override public ListProvider getListProvider() { return null; } /** * * @return */ @Override public SaveProvider getSaveProvider() { return new SaveProvider(null , m_dlSales.getPaymentMovementInsert() , m_dlSales.getPaymentMovementDelete()); } /** * * @return */ @Override public EditorRecord getEditor() { return jeditor; } /** * * @return */ @Override public String getTitle() { return AppLocal.getIntString("Menu.Payments"); } }
[ "john@chromis.co.uk" ]
john@chromis.co.uk
f41a61c8690e3af404a47ba6dba392dd1898890b
2586f3b8626c14aa53e9f87ac0844689b22a8b48
/src/sun/util/resources/cldr/ext/CurrencyNames_ckb.java
7699719f9f70c73abecdba1dfe283a12de973722
[]
no_license
shaoxiongdu/LearningJDK
46fd841471f5d0e2737ebcd3570ef6f018a90ddb
406e4de55d107648ed6497d625239c637227aa66
refs/heads/master
2022-11-12T14:30:01.400708
2022-11-08T13:00:17
2022-11-08T13:00:17
350,005,058
18
11
null
null
null
null
UTF-8
Java
false
false
3,614
java
/* * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * COPYRIGHT AND PERMISSION NOTICE * * Copyright (C) 1991-2016 Unicode, Inc. All rights reserved. * Distributed under the Terms of Use in * http://www.unicode.org/copyright.html. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of the Unicode data files and any associated documentation * (the "Data Files") or Unicode software and any associated documentation * (the "Software") to deal in the Data Files or Software * without restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, and/or sell copies of * the Data Files or Software, and to permit persons to whom the Data Files * or Software are furnished to do so, provided that * (a) this copyright and permission notice appear with all copies * of the Data Files or Software, * (b) this copyright and permission notice appear in associated * documentation, and * (c) there is clear notice in each modified Data File or in the Software * as well as in the documentation associated with the Data File(s) or * Software that the data or software has been modified. * * THE DATA FILES AND SOFTWARE ARE 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 OF THIRD PARTY RIGHTS. * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THE DATA FILES OR SOFTWARE. * * Except as contained in this notice, the name of a copyright holder * shall not be used in advertising or otherwise to promote the sale, * use or other dealings in these Data Files or Software without prior * written authorization of the copyright holder. */ package sun.util.resources.cldr.ext; import sun.util.resources.OpenListResourceBundle; public class CurrencyNames_ckb extends OpenListResourceBundle { @Override protected final Object[][] getContents() { final Object[][] data = new Object[][] { { "IQD", "\u062f.\u0639.\u200f" }, }; return data; } }
[ "kangjianwei1990@qq.com" ]
kangjianwei1990@qq.com
7a9ba03d4dfc8e84c938c9548a08389be8afc6ec
ba26af1bfe70673303f39fb34bf83f5c08ed5905
/analysis/src/main/java/org/apache/calcite/util/graph/DefaultEdge.java
9596ca906dc3011e4a1b84d5f20cdd6ffcf7b313
[ "MIT" ]
permissive
GinPonson/Quicksql
5a4a6671e87b3278e2d77eee497a4910ac340617
e31f65fb96ea2f2c373ba3acc43473a48dca10d1
refs/heads/master
2020-07-30T06:23:41.805009
2019-09-22T08:50:18
2019-09-22T08:50:18
210,116,844
0
0
MIT
2019-09-22T08:48:23
2019-09-22T08:48:23
null
UTF-8
Java
false
false
1,577
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.calcite.util.graph; /** * Default implementation of Edge. */ public class DefaultEdge { public final Object source; public final Object target; public DefaultEdge(Object source, Object target) { this.source = source; this.target = target; } @Override public int hashCode() { return source.hashCode() * 31 + target.hashCode(); } @Override public boolean equals(Object obj) { return this == obj || obj instanceof DefaultEdge && ((DefaultEdge) obj).source.equals(source) && ((DefaultEdge) obj).target.equals(target); } public static <V> DirectedGraph.EdgeFactory<V, DefaultEdge> factory() { return DefaultEdge::new; } } // End DefaultEdge.java
[ "xushengguo-xy@360.cn" ]
xushengguo-xy@360.cn
d32d5f14ed175f1c4adbea36602f92ddbcfaa61d
19c26b81823782f0b5678c8d6e05aa13a3f82ae0
/channel-car-core/src/main/java/com/hzins/car/model/req/DoOfflinePayReq.java
f471924ea1409955c7a1e3b084dfe1f9bded28fb
[]
no_license
shanjunmei/channel-car
4a0c827b872d4205631f1ef2b5824e420ed8aed8
7818ab03fbe964a2a61f096a290f66e40cdea7a5
refs/heads/master
2021-01-01T03:51:32.452478
2016-04-28T02:24:27
2016-04-28T02:24:27
57,263,805
0
0
null
null
null
null
UTF-8
Java
false
false
2,053
java
/** * Copyright (c) 2006-2015 Hzins Ltd. All Rights Reserved. * * This code is the confidential and proprietary information of * Hzins. You shall not disclose such Confidential Information * and shall use it only in accordance with the terms of the agreements * you entered into with Hzins,http://www.hzins.com. * */ package com.hzins.car.model.req; /** * <p> * * * * </p> * * @author hz15101769 * @date 2016年4月8日 上午11:23:09 * @version */ public class DoOfflinePayReq { private String insureNum;// ": "45645644564545", //投保单号 private String onliePaymentId;// ":"1", // 在线支付网关标识:1:支付宝;3:银联 private String partnerId;// ": "1", // 业务系统标识(1:主站;3:渠道;22:保运通) private String consumeType;// ": "1", //消费类型(1:购买保险,2:充值) private String notifyUrl;// ": "http://www.hzins.com/" //支付完成返回的url private String deadline;// ": "2015-12-30 23:59:59" //交易关闭时间 public String getInsureNum() { return insureNum; } public void setInsureNum(String insureNum) { this.insureNum = insureNum; } public String getOnliePaymentId() { return onliePaymentId; } public void setOnliePaymentId(String onliePaymentId) { this.onliePaymentId = onliePaymentId; } public String getPartnerId() { return partnerId; } public void setPartnerId(String partnerId) { this.partnerId = partnerId; } public String getConsumeType() { return consumeType; } public void setConsumeType(String consumeType) { this.consumeType = consumeType; } public String getNotifyUrl() { return notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getDeadline() { return deadline; } public void setDeadline(String deadline) { this.deadline = deadline; } }
[ "445052471@qq.com" ]
445052471@qq.com
9005ca52c8a88fd39b060cf4bd7650125e449af2
c25be104d0c4d28f780037efc58b1706e20db376
/email/src/main/java/com/tinhvan/hd/email/bean/EmailRequest.java
d738738ca20dddb555f3b2d85c4a231fb88dba90
[]
no_license
nthanhdo2610/hd
9a22eca5303b409e3e93dad9c6f5d3a4ab5942ca
efdcd782e01e75976504880bf385b88d7a507267
refs/heads/master
2023-09-03T23:24:36.790002
2020-02-26T14:07:53
2020-02-26T14:07:53
229,775,829
0
0
null
null
null
null
UTF-8
Java
false
false
2,236
java
package com.tinhvan.hd.email.bean; import com.tinhvan.hd.base.HDPayload; public class EmailRequest implements HDPayload { //input values private String emailType; private String langCode; private String[] listEmail; private String[] listFile; private String[] params; //data convert private String userName; private String password; private String mailFrom; private String fileType; private String title; private String content; public String getEmailType() { return emailType; } public void setEmailType(String emailType) { this.emailType = emailType; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getLangCode() { return langCode; } public void setLangCode(String langCode) { this.langCode = langCode; } public String[] getParams() { return params; } public void setParams(String[] params) { this.params = params; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String[] getListEmail() { return listEmail; } public void setListEmail(String[] listEmail) { this.listEmail = listEmail; } public String[] getListFile() { return listFile; } public void setListFile(String[] listFile) { this.listFile = listFile; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getMailFrom() { return mailFrom; } public void setMailFrom(String mailFrom) { this.mailFrom = mailFrom; } public String getFileType() { return fileType; } public void setFileType(String fileType) { this.fileType = fileType; } @Override public void validatePayload() { } }
[ "nthanhdo11110030@gmail.com" ]
nthanhdo11110030@gmail.com
6d4ca8e803779362ab07470f9106162e76102fee
8b35595039bb04f5545e53aead05a60e01faba0f
/src/main/java/fr/brouillard/oss/jgitver/impl/pattern/VersionPatternGrammarDefinition.java
e4be63647ea9341420921eaab3327fb16cafd5fa
[ "Apache-2.0" ]
permissive
djarosz/jgitver
e8c47fbd6343871be7a386d5e55aa8880c645474
af9cd4f59c1402cc67bd146d74ebf295c5b55880
refs/heads/master
2020-03-31T00:34:54.428890
2018-11-01T11:03:04
2018-11-01T11:03:04
151,746,082
0
0
Apache-2.0
2018-10-05T16:03:37
2018-10-05T16:03:48
null
UTF-8
Java
false
false
5,073
java
/** * Copyright (C) 2016 Matthieu Brouillard [http://oss.brouillard.fr/jgitver] (matthieu@brouillard.fr) * * 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 fr.brouillard.oss.jgitver.impl.pattern; import java.util.List; import java.util.Optional; import java.util.function.Function; import java.util.stream.Collectors; import org.petitparser.parser.Parser; import fr.brouillard.oss.jgitver.Version; import fr.brouillard.oss.jgitver.metadata.Metadatas; /** * Extension of the {@link VersionGrammarDefinition} defining the actions to realize on rules detection. */ public class VersionPatternGrammarDefinition extends VersionGrammarDefinition { private AutoSeparatorProvider separatorProvider; /** * Constructor is given the necessary elements to transform the recognized elements. * @param version the base version to use (normally coming from a tag) * @param env provider of environment variables values * @param sys provider of system properties values * @param meta provider of computed {@link Metadatas} */ public VersionPatternGrammarDefinition( Version version, Function<String, Optional<String>> env, Function<String, Optional<String>> sys, Function<Metadatas, Optional<String>> meta ) { super(); resetSeparatorProvider(); action("pattern", (List<?> elements) -> { String computedVersion = elements.stream().map(o -> ((Object) o).toString()).collect(Collectors.joining()); return Version.parse(computedVersion); }); action("pattern_element", (o) -> o); action("delimitedPlaceholder", (o) -> { return o; }); action("placeholder", (o) -> o); action("withPrefixPlaceholder", (List<?> elements) -> { Prefix p = (Prefix) elements.get(0); Optional<String> value = (Optional<String>) elements.get(1); Optional<String> result = p.apply(value); result.ifPresent((ignore) -> getSeparatorProvider().next()); return result; }); action("chars", (o) -> o); action("prefix_placeholder", (o) -> o); action("fixed_prefix_placeholder", (List<?> elements) -> { getSeparatorProvider().endVersion(); String prefix = (String) elements.get(0); Mode mode = (Mode) elements.get(1); return new Prefix(mode, prefix); }); action("mandatory_prefix_placeholder", (o) -> o); action("optional_prefix_placeholder", (o) -> o); action("auto_prefix_placeholder", (ignore) -> { return new Prefix(Mode.OPTIONAL, () -> this.getSeparatorProvider().currentSeparator()); }); action("meta", (String s) -> { try { Metadatas m = Metadatas.valueOf(s); return meta.apply(m); } catch (IllegalArgumentException iae) { return Optional.empty(); } }); action("sys", (String s) -> sys.apply(s)); action("env", (String s) -> env.apply(s)); action("full_version", (o) -> { getSeparatorProvider().major(); getSeparatorProvider().minor(); getSeparatorProvider().patch(); getSeparatorProvider().next(); return Optional.of(String.format("%s.%s.%s", version.getMajor(), version.getMinor(), version.getPatch())); }); action("major_version", (o) -> { getSeparatorProvider().major(); return Optional.of("" + version.getMajor()); }); action("minor_version", (o) -> { getSeparatorProvider().minor(); return Optional.of("" + version.getMinor()); }); action("patch_version", (o) -> { getSeparatorProvider().patch(); return Optional.of("" + version.getPatch()); }); action("inner_placeholder", (o) -> o); action("placeholder", (Optional<String> o) -> o.orElse("")); } @Override public Parser build() { resetSeparatorProvider(); return super.build(); } /** * Allow to reset the automatic computation of the separator to use during detection. * Must be called before each pattern matching and version recognition. */ public void resetSeparatorProvider() { separatorProvider = new AutoSeparatorProvider(); } private AutoSeparatorProvider getSeparatorProvider() { return separatorProvider; } }
[ "matthieu@brouillard.fr" ]
matthieu@brouillard.fr
abb4f551b19c53f51e06d25ff03ef01ae36a145f
5e46b24b22e845872a3cb739915fcdd591fff11a
/shells/ca-qa-shell/src/main/java/org/xipki/ca/server/mgmt/qa/shell/NegEnvAddCmd.java
59789fed24ebd9ee599a6e30b764e2bcd04d75d3
[ "Apache-2.0" ]
permissive
burakkoprulu/xipki
18a3b2a33d207c9e4b70a2e392684140d5a93857
6c0981909bd5acf565ca46415442b7aab2bdad37
refs/heads/master
2020-03-08T08:54:33.086528
2018-04-03T15:53:26
2018-04-03T15:53:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,326
java
/* * * Copyright (c) 2013 - 2018 Lijun Liao * * 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.xipki.ca.server.mgmt.qa.shell; import org.apache.karaf.shell.api.action.Command; import org.apache.karaf.shell.api.action.lifecycle.Service; import org.xipki.ca.server.mgmt.shell.EnvAddCmd; import org.xipki.console.karaf.CmdFailure; /** * TODO. * @author Lijun Liao * @since 2.0.0 */ @Command(scope = "caqa", name = "neg-env-add", description = "add environment parameter (negative, QA)") @Service public class NegEnvAddCmd extends EnvAddCmd { @Override protected Object execute0() throws Exception { println("neg-env-add"); try { super.execute0(); } catch (Exception ex) { return null; } throw new CmdFailure("exception expected, but received none"); } }
[ "lijun.liao@gmail.com" ]
lijun.liao@gmail.com
e1b52c1b6c21a48414fa42374bfda876fb379f47
8dcdb46fbb6a9ba9ebcd4fd827ce2670c1953069
/threatconnect-sdk/threatconnect-sdk-core/src/main/java/com/threatconnect/sdk/client/fluent/AbstractIndicatorBuilder.java
d05a42be6d1f8b70b831efcec93c2396da0872b8
[ "Apache-2.0" ]
permissive
ThreatConnect-Inc/threatconnect-java
1243d812cae54724710276dab60418cd7e2e97ed
af1397e9e9d49c4391e321cbd627340bfd3003bc
refs/heads/master
2023-08-31T18:22:06.686473
2021-08-25T15:06:28
2021-08-25T15:06:28
27,193,063
5
3
NOASSERTION
2022-05-20T20:49:45
2014-11-26T19:38:13
Java
UTF-8
Java
false
false
2,391
java
package com.threatconnect.sdk.client.fluent; import com.threatconnect.sdk.server.entity.Owner; import java.util.Date; public class AbstractIndicatorBuilder<T extends AbstractIndicatorBuilder<T>> { protected Long id; protected Owner owner; protected String ownerName; protected String type; protected Date dateAdded; protected Date lastModified; protected Double rating; protected Double confidence; protected Double threatAssessRating; protected Double threatAssessConfidence; protected String webLink; protected String source; protected String description; protected String summary; public T withId(Long id) { this.id = id; return getThis(); } public T withOwner(Owner owner) { this.owner = owner; return getThis(); } public T withOwnerName(String ownerName) { this.ownerName = ownerName; return getThis(); } public T withType(String type) { this.type = type; return getThis(); } public T withDateAdded(Date dateAdded) { this.dateAdded = dateAdded; return getThis(); } public T withLastModified(Date lastModified) { this.lastModified = lastModified; return getThis(); } public T withRating(Double rating) { this.rating = rating; return getThis(); } public T withConfidence(Double confidence) { this.confidence = confidence; return getThis(); } public T withThreatAssessRating(Double threatAssessRating) { this.threatAssessRating = threatAssessRating; return getThis(); } public T withThreatAssessConfidence(Double threatAssessConfidence) { this.threatAssessConfidence = threatAssessConfidence; return getThis(); } public T withWebLink(String webLink) { this.webLink = webLink; return getThis(); } public T withSource(String source) { this.source = source; return getThis(); } public T withDescription(String description) { this.description = description; return getThis(); } public T withSummary(String summary) { this.summary = summary; return getThis(); } private T getThis() { return (T) this; } }
[ "gmarut@threatconnect.com" ]
gmarut@threatconnect.com
d5a21f14283074f8e08e1809980e41e677d3f029
c9ae5bbaf082abe43738a7f17ffab43309327977
/Source/FA-GameServer/data/scripts/system/handlers/quest/verteron/_1162_AltenosWeddingRing.java
9b6a11835f229235a2cbe8c21b52b290ffb91e9e
[]
no_license
Ace65/emu-santiago
2071f50e83e3e4075b247e4265c15d032fc13789
ddb2a59abd9881ec95c58149c8bf27f313e3051c
refs/heads/master
2021-01-13T00:43:18.239492
2012-02-22T21:14:53
2012-02-22T21:14:53
54,834,822
0
1
null
null
null
null
UTF-8
Java
false
false
4,811
java
/* * This file is part of aion-unique <aion-unique.org>. * * aion-unique is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * aion-unique is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with aion-unique. If not, see <http://www.gnu.org/licenses/>. */ package quest.verteron; import gameserver.model.EmotionType; import gameserver.model.gameobjects.Creature; import gameserver.model.gameobjects.Npc; import gameserver.model.gameobjects.player.Player; import gameserver.model.templates.quest.QuestItems; import gameserver.network.aion.serverpackets.SM_DIALOG_WINDOW; import gameserver.network.aion.serverpackets.SM_EMOTION; import gameserver.network.aion.serverpackets.SM_USE_OBJECT; import gameserver.quest.handlers.QuestHandler; import gameserver.quest.model.QuestCookie; import gameserver.quest.model.QuestState; import gameserver.quest.model.QuestStatus; import gameserver.services.ItemService; import gameserver.utils.PacketSendUtility; import gameserver.utils.ThreadPoolManager; import java.util.Collections; /** * @author Balthazar */ public class _1162_AltenosWeddingRing extends QuestHandler { private final static int questId = 1162; public _1162_AltenosWeddingRing() { super(questId); } @Override public void register() { qe.setNpcQuestData(203095).addOnQuestStart(questId); qe.setNpcQuestData(203095).addOnTalkEvent(questId); qe.setNpcQuestData(203093).addOnTalkEvent(questId); qe.setNpcQuestData(700005).addOnTalkEvent(questId); } @Override public boolean onDialogEvent(final QuestCookie env) { final Player player = env.getPlayer(); int targetId = 0; if(env.getVisibleObject() instanceof Npc) targetId = ((Npc) env.getVisibleObject()).getNpcId(); QuestState qs = player.getQuestStateList().getQuestState(questId); if(qs == null || qs.getStatus() == QuestStatus.NONE) { if(targetId == 203095) { if(env.getDialogId() == 26) return sendQuestDialog(env, 1011); else return defaultQuestStartDialog(env); } } if(qs == null) return false; if(qs.getStatus() == QuestStatus.START) { switch(targetId) { case 700005: { switch(env.getDialogId()) { case -1: { if(player.getInventory().getItemCountByItemId(182200563) == 0) { if(!ItemService.addItems(player, Collections .singletonList(new QuestItems(182200563, 1)))) { return true; } } final int targetObjectId = env.getVisibleObject().getObjectId(); PacketSendUtility.sendPacket(player, new SM_USE_OBJECT(player.getObjectId(), targetObjectId, 3000, 1)); PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.NEUTRALMODE2, 0, targetObjectId), true); ThreadPoolManager.getInstance().schedule(new Runnable(){ @Override public void run() { if(!player.isTargeting(targetObjectId)) return; PacketSendUtility.sendPacket(player, new SM_USE_OBJECT(player.getObjectId(), targetObjectId, 3000, 0)); PacketSendUtility.broadcastPacket(player, new SM_EMOTION(player, EmotionType.START_LOOT, 0, targetObjectId), true); QuestState qs = player.getQuestStateList().getQuestState(questId); qs.setQuestVarById(0, qs.getQuestVarById(0) + 1); updateQuestStatus(env); PacketSendUtility.broadcastPacket(player.getTarget(), new SM_EMOTION( (Creature) player.getTarget(), EmotionType.DIE, 128, 0)); } }, 3000); return true; } } } case 203093: case 203095: { if(qs.getQuestVarById(0) == 1) { qs.setStatus(QuestStatus.REWARD); updateQuestStatus(env); player.getInventory().removeFromBagByItemId(182200563, 1); PacketSendUtility.sendPacket(player, new SM_DIALOG_WINDOW(env.getVisibleObject().getObjectId(), 10)); return true; } } return false; } } else if(qs.getStatus() == QuestStatus.REWARD) { if(targetId == 203095) { if(env.getDialogId() == 1009) return sendQuestDialog(env, 5); else return defaultQuestEndDialog(env); } } return false; } }
[ "mixerdj.carlos@gmail.com" ]
mixerdj.carlos@gmail.com
271eefbba9ff35da3048a211401124f4cc94be31
6c8987d48d600fe9ad2640174718b68932ed4a22
/OpenCylocs-Gradle/src/main/java/nl/strohalm/cyclos/controls/members/sms/SearchSmsMailingVariablesAjaxAction.java
daed90bf10cd1feff1f8b0d64219b11d4fe139a8
[]
no_license
hvarona/ocwg
f89140ee64c48cf52f3903348349cc8de8d3ba76
8d4464ec66ea37e6ad10255efed4236457b1eacc
refs/heads/master
2021-01-11T20:26:38.515141
2017-03-04T19:49:40
2017-03-04T19:49:40
79,115,248
0
0
null
null
null
null
UTF-8
Java
false
false
4,342
java
/* This file is part of Cyclos (www.cyclos.org). A project of the Social Trade Organisation (www.socialtrade.org). Cyclos is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Cyclos 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 Cyclos; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package nl.strohalm.cyclos.controls.members.sms; import java.util.ArrayList; import java.util.List; import java.util.Map; import nl.strohalm.cyclos.annotations.Inject; import nl.strohalm.cyclos.controls.ActionContext; import nl.strohalm.cyclos.controls.BaseAjaxAction; import nl.strohalm.cyclos.entities.groups.MemberGroup; import nl.strohalm.cyclos.entities.members.Member; import nl.strohalm.cyclos.services.sms.SmsMailingService; import org.apache.commons.lang.ArrayUtils; import org.json.simple.JSONObject; /** * Searches SMS mailing variables and returns a list as an JSON * @author jcomas */ public class SearchSmsMailingVariablesAjaxAction extends BaseAjaxAction { protected SmsMailingService smsMailingService; @Inject public final void setSmsMailingService(final SmsMailingService smsMailingService) { this.smsMailingService = smsMailingService; } @Override protected ContentType contentType() { return ContentType.JSON; } @SuppressWarnings("unchecked") @Override protected void renderContent(final ActionContext context) throws Exception { final List<MemberGroup> groups = resolveGroups(context); Map<String, String> variables = null; final Member m = resolveMember(context); final boolean isToMember = m != null; if (groups != null || context.isBroker() && !isToMember) { variables = smsMailingService.getSmsTextVariables(groups); } else { if (m != null) { variables = smsMailingService.getSmsTextVariables(m); } } // We need to pass an ordered structure. JSONObject doesn't preserve the map order, so we pass a list of entries were each entry is a list of // [key, value]. final JSONObject json = new JSONObject(); final List<List<String>> entries = new ArrayList<List<String>>(); for (final Map.Entry<String, String> entry : variables.entrySet()) { final ArrayList<String> e = new ArrayList<String>(); e.add(entry.getKey()); e.add(entry.getValue()); entries.add(e); } json.put("entries", entries); responseHelper.writeJSON(context.getResponse(), json.toJSONString()); } /** * Resolves the possible groups for the logged user to see */ private List<MemberGroup> resolveGroups(final ActionContext context) { // Ensure that only normal groups (not removed) are used List<MemberGroup> groups = null; final SearchSmsMailingVariablesAjaxForm form = context.getForm(); if (ArrayUtils.isNotEmpty(form.getGroupIds())) { groups = new ArrayList<MemberGroup>(); for (final Long id : form.getGroupIds()) { if (id > 0) { groups.add((MemberGroup) groupService.load(id)); } } } return groups; } private Member resolveMember(final ActionContext context) { final SearchSmsMailingVariablesAjaxForm form = context.getForm(); Member member = null; final long memberId = form.getMemberId(); if (memberId > 0) { try { member = elementService.load(memberId); } catch (final Exception e) { member = null; } } return member; } }
[ "wladimir2113@gmail.com" ]
wladimir2113@gmail.com
86d873d8cc98bcdb56d81712de03ed7fea287b03
066c3640aa155279b0b259f12f8fd926b8e9e72a
/emms_GXDD/.svn/pristine/87/8799723a86b1541baa929b3f780216e0f3166dc0.svn-base
37547cef98aad181e9d71e56f0d5792ae806e881
[]
no_license
zjt0428/emms_GXDD
3eebe850533357e7e43858120cfa58a55d797f7c
9dd7af521efa613c9bba3ce8f7e1c706d8b94a50
refs/heads/master
2020-09-13T18:09:00.499402
2019-11-20T07:56:23
2019-11-20T07:56:23
222,864,042
0
0
null
null
null
null
UTF-8
Java
false
false
199
package com.knight.emms.dao; import com.knight.emms.core.dao.BaseBusinessModelDao; import com.knight.emms.model.TakeStock; public interface TakeStockDao extends BaseBusinessModelDao<TakeStock>{ }
[ "3555673863@qq.com" ]
3555673863@qq.com
28ff8aca0479592c7cef6c2829573f291a3da9b0
f551ac18a556af60d50d32a175c8037aa95ec3ac
/base/com/enation/app/base/core/action/api/RegionApiAction.java
8eaf1299ab052f3470a2686ec8dd3ba49519b59c
[]
no_license
yexingf/cxcar
06dfc7b7970f09dae964827fcf65f19fa39d35d1
0ddcf144f9682fa2847b9a350be91cedec602c60
refs/heads/master
2021-05-15T05:40:04.396174
2018-01-09T09:46:18
2018-01-09T09:46:18
116,647,698
0
5
null
null
null
null
UTF-8
Java
false
false
1,407
java
package com.enation.app.base.core.action.api; import java.util.List; import net.sf.json.JSONArray; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Namespace; import org.apache.struts2.convention.annotation.ParentPackage; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import com.enation.app.base.core.service.IRegionsManager; import com.enation.framework.action.WWAction; /** * 地区api * @author lina * 2014-2-21 */ @Component @Scope("prototype") @ParentPackage("eop_default") @Namespace("/api/base") @Action("region") public class RegionApiAction extends WWAction { private IRegionsManager regionsManager; private Integer regionid; /** * 获取该地区的子 * @param regionid int型 * @return */ public String getChildren(){ if(regionid==null){ this.showErrorJson("缺少参数:regionid"); }else{ List list =regionsManager.listChildrenByid(regionid); this.json=JSONArray.fromObject(list).toString(); } return WWAction.JSON_MESSAGE; } public IRegionsManager getRegionsManager() { return regionsManager; } public void setRegionsManager(IRegionsManager regionsManager) { this.regionsManager = regionsManager; } public Integer getRegionid() { return regionid; } public void setRegionid(Integer regionid) { this.regionid = regionid; } }
[ "274674758_ye@sina.com" ]
274674758_ye@sina.com
ce9d3d826ba5b439325b8bf0a6631db8f01acea1
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1016371.java
1d97cf10356e08e99a00b15d1337f797501cb08e
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
334
java
public boolean DEL(){ if (this.cmd.length != 2) { Data.logger.warn("Syntax: DEL <file>"); return true; } if (notConnected()) { return LDEL(); } try { rmForced(this.cmd[1]); } catch ( final IOException e) { Data.logger.warn("Error: deletion of file " + this.cmd[1] + " failed."); } return true; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
3919a68c0ffe9c6ab6d1394cfe9698f695d205aa
23755632dac4a28af241fe7ad170da677c47da1a
/src/com/rrs/corona/solutionsacceleratorstudio/plugin/DsFieldInfo.java
3cf5363575ea2d42893ae24df3118c1c3200210e
[]
no_license
debjava/solutionsacceleratorstudio
87bace4a3f8e0fce5bbf4071159b0fdd33318264
6265d8e4c7485a1fcd839cfa45c9bbf8d8f9cc90
refs/heads/master
2020-04-08T09:07:30.403885
2018-11-26T17:58:40
2018-11-26T17:58:40
159,209,056
0
0
null
null
null
null
UTF-8
Java
false
false
4,266
java
/****************************************************************************** * @rrs_start_copyright * * Copyright 2005 (C) Red Rabbit Software Inc. All rights reserved. * This software is the confidential and proprietary information of Red Rabbit * Software, 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 Red Rabbit Software. * * * @rrs_end_copyright ******************************************************************************/ /****************************************************************************** * @rrs_start_disclaimer * * The contents of this file are subject to the Red Rabbit Software Inc. Corona License * ("License"); You may not use this file except in compliance with the License. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE RED RABBIT SOFTWARE INC. OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @rrs_end_disclaimer ******************************************************************************/ package com.rrs.corona.solutionsacceleratorstudio.plugin; /** * * @author Debadatta Mishra * */ public class DsFieldInfo { /** * DataSource name */ String dataSourceName; /** * URL for the dataSource */ String dataSourceURL; /** * User name for the dataSource */ String dataSourceUserName; /** * password for the dataSource */ String dataSourcePassword; /** * Table Field Name */ String DsFieldName;// Field name /** * Field Type */ String DsFieldType;// Field type /** * A field has primary or not */ boolean isPrimaryKey; /** * @return Returns the dsFieldName. */ public String getDsFieldName() { return DsFieldName; } /** * @param dsFieldName The dsFieldName to set. */ public void setDsFieldName(String dsFieldName) { DsFieldName = dsFieldName; } /** * @return Returns the dsFieldType. */ public String getDsFieldType() { return DsFieldType; } /** * @param dsFieldType The dsFieldType to set. */ public void setDsFieldType(String dsFieldType) { DsFieldType = dsFieldType; } /** * @return Returns the dataSourceName. */ public String getDataSourceName( ) { return dataSourceName; } /** * @param dataSourceName The dataSourceName to set. */ public void setDataSourceName( String dataSourceName ) { this.dataSourceName = dataSourceName; } /** * @return Returns the dataSourcePassword. */ public String getDataSourcePassword( ) { return dataSourcePassword; } /** * @param dataSourcePassword The dataSourcePassword to set. */ public void setDataSourcePassword( String dataSourcePassword ) { this.dataSourcePassword = dataSourcePassword; } /** * @return Returns the dataSourceURL. */ public String getDataSourceURL( ) { return dataSourceURL; } /** * @param dataSourceURL The dataSourceURL to set. */ public void setDataSourceURL( String dataSourceURL ) { this.dataSourceURL = dataSourceURL; } /** * @return Returns the dataSourceUserName. */ public String getDataSourceUserName( ) { return dataSourceUserName; } /** * @param dataSourceUserName The dataSourceUserName to set. */ public void setDataSourceUserName( String dataSourceUserName ) { this.dataSourceUserName = dataSourceUserName; } /** * @return Returns the isPrimaryKey. */ public boolean isPrimaryKey( ) { return isPrimaryKey; } /** * @param isPrimaryKey The isPrimaryKey to set. */ public void setPrimaryKey( boolean isPrimaryKey ) { this.isPrimaryKey = isPrimaryKey; } }
[ "deba.java@gmail.com" ]
deba.java@gmail.com
63081c67095732aaea2825c8de19056545b16f65
e8f171ddb3c8fb54fcecaff0a84648e76681f982
/community/logicaldoc/trunk/logicaldoc-gui/src/main/java/com/logicaldoc/gui/frontend/client/document/form/AddForm.java
211e60fac95d0b87414f04307d0f3733b342d55e
[]
no_license
zhunengfei/logicaldoc
f12114ef72935e683af4b50f30a88fbd5df9bfde
9d432d29a9b43ebd2b13a1933a50add3f4784815
refs/heads/master
2021-01-20T01:05:48.499693
2017-01-13T16:24:16
2017-01-13T16:24:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,035
java
package com.logicaldoc.gui.frontend.client.document.form; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.AsyncCallback; import com.logicaldoc.gui.common.client.Session; import com.logicaldoc.gui.common.client.beans.GUIDocument; import com.logicaldoc.gui.common.client.beans.GUIAttribute; import com.logicaldoc.gui.common.client.i18n.I18N; import com.logicaldoc.gui.common.client.log.Log; import com.logicaldoc.gui.common.client.util.ItemFactory; import com.logicaldoc.gui.frontend.client.document.DocumentsPanel; import com.logicaldoc.gui.frontend.client.services.DocumentService; import com.logicaldoc.gui.frontend.client.services.DocumentServiceAsync; import com.logicaldoc.gui.frontend.client.services.FormService; import com.logicaldoc.gui.frontend.client.services.FormServiceAsync; import com.smartgwt.client.types.HeaderControls; import com.smartgwt.client.types.TitleOrientation; import com.smartgwt.client.widgets.Window; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.ButtonItem; import com.smartgwt.client.widgets.form.fields.SelectItem; import com.smartgwt.client.widgets.form.fields.TextItem; import com.smartgwt.client.widgets.form.fields.events.ClickEvent; import com.smartgwt.client.widgets.form.fields.events.ClickHandler; /** * This popup window is used to create a new document based on a selected form. * * @author Marco Meschieri - LogicalDOC * @since 7.3 */ public class AddForm extends Window { private DocumentServiceAsync docService = (DocumentServiceAsync) GWT.create(DocumentService.class); private FormServiceAsync formService = (FormServiceAsync) GWT.create(FormService.class); private DynamicForm form = new DynamicForm(); private SelectItem formSelector; public AddForm() { setHeaderControls(HeaderControls.HEADER_LABEL, HeaderControls.CLOSE_BUTTON); setTitle(I18N.message("addform")); setAutoSize(true); setCanDragResize(true); setIsModal(true); setShowModalMask(true); centerInPage(); formSelector = ItemFactory.newFormSelector(); formSelector.setWrapTitle(false); formSelector.setRequired(true); TextItem title = ItemFactory.newTextItem("title", "title", null); title.setRequired(true); ButtonItem save = new ButtonItem(); save.setTitle(I18N.message("save")); save.setAutoFit(true); save.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { onSave(); } }); form.setNumCols(2); form.setTitleOrientation(TitleOrientation.TOP); form.setFields(title, formSelector, save); addItem(form); } public void onSave() { if (!form.validate()) return; long formId = Long.parseLong(form.getValue("form").toString()); String templateIdString = formSelector.getSelectedRecord().getAttributeAsString("templateId"); final GUIDocument frm = new GUIDocument(); frm.setFolder(Session.get().getCurrentFolder()); frm.setFormId(formId); frm.setTitle(form.getValueAsString("title").trim()); frm.setFileName(frm.getTitle() + ".pdf"); frm.setLanguage(I18N.getDefaultLocaleForDoc()); if (templateIdString != null && !templateIdString.isEmpty()) { frm.setTemplateId(Long.parseLong(templateIdString)); docService.getAttributes(Long.parseLong(templateIdString), new AsyncCallback<GUIAttribute[]>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIAttribute[] attributes) { frm.setAttributes(attributes); FillForm fillForm = new FillForm(frm); fillForm.show(); destroy(); } }); } else { formService.create(frm, new AsyncCallback<GUIDocument>() { @Override public void onFailure(Throwable caught) { Log.serverError(caught); } @Override public void onSuccess(GUIDocument doc) { DocumentsPanel.get().refresh(); } }); } } }
[ "car031@bae09422-6297-422f-b3ee-419521344c47" ]
car031@bae09422-6297-422f-b3ee-419521344c47
d428734303f29f7f0cc5daf0021fcb2360cf2104
5ceab696d3d0388a51d12a4d48100322316cc8b4
/app/src/main/java/zrock/application/engine/app/libraries/detector/Detect.java
e884be337b5d0bccbb8c88afdd00382499e7a793
[ "MIT" ]
permissive
AsepMo/ZRock_Engine
b80fe55f46d198180ce624383a4be5148f445270
93c991fede10274d83bcfca474a312ad5e4d0f47
refs/heads/master
2022-04-04T00:15:53.737568
2020-02-19T19:48:10
2020-02-19T19:48:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,694
java
package zrock.application.engine.app.libraries.detector; import android.content.Context; import android.content.pm.PackageManager; import android.text.TextUtils; import zrock.application.engine.app.libraries.entity.Library; import java.util.ArrayList; import java.util.List; /** * Created by mikepenz on 08.09.14. * Original concept of detecting libraries with their classPath by Michael Carrano * More details can be found here: https://github.com/michaelcarrano/detective-droid */ public class Detect { public static List<Library> detect(Context mCtx, List<Library> libraries) { ArrayList<Library> foundLibraries = new ArrayList<Library>(); // Loop through known libraries for (Library library : libraries) { if (!TextUtils.isEmpty(library.getClassPath())) { try { Context ctx = mCtx.createPackageContext(mCtx.getPackageName(), Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY); Class<?> clazz = Class.forName(library.getClassPath(), false, ctx.getClassLoader()); // Detected a library!!! if (clazz != null) { foundLibraries.add(library); } } catch (ClassNotFoundException e) { //e.printStackTrace(); } catch (PackageManager.NameNotFoundException e) { //e.printStackTrace(); } } } // Only return AppSource if app has a library //return libraries.size() > 0 ? new AppSource(pkg, libraries) : null; return foundLibraries; } }
[ "asepmo.story@gmail.com" ]
asepmo.story@gmail.com
322a7b3d5c18cf4ec035a7d69d86c2fe9b065238
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-12798-116-26-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/DefaultTemplateManager_ESTest.java
ebc8ab1d3ddffaf3c459e150f9592da5a0821040
[]
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
582
java
/* * This file was automatically generated by EvoSuite * Thu Apr 09 00:08:45 UTC 2020 */ package com.xpn.xwiki.internal.template; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DefaultTemplateManager_ESTest extends DefaultTemplateManager_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
300bb22e365515717e00ee48988146b19aa9dfc6
9b2db7e84535c45c3081e6d9ccefde6538f114ec
/ph-commons/src/test/java/com/helger/commons/io/file/IFileFilterFuncTest.java
c0f03752fc39261ad9cf6d46519847562c2e3ce7
[ "Apache-2.0" ]
permissive
zhujiancom/ph-commons
a1039023392b88474359eda81335daec76c89776
f8ff80afe5ba919019a73d3153380fa9f3cb5071
refs/heads/master
2021-07-12T06:20:15.159581
2017-10-15T19:55:05
2017-10-15T19:55:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,821
java
/** * Copyright (C) 2014-2017 Philip Helger (www.helger.com) * philip[at]helger[dot]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.helger.commons.io.file; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.File; import java.io.FileFilter; import java.io.FilenameFilter; import org.junit.Test; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; /** * Test class for class {@link IFileFilter}. * * @author Philip Helger */ public final class IFileFilterFuncTest { @Test public void testGetFilterFileOnly () { final FileFilter aFilter = IFileFilter.fileOnly (); assertNotNull (aFilter); // file assertTrue (aFilter.accept (new File ("pom.xml"))); // not existing file assertFalse (aFilter.accept (new File ("file.htm"))); // directory assertFalse (aFilter.accept (new File ("src"))); // null assertFalse (aFilter.accept (null)); } @Test public void testGetFilterDirectoryOnly () { final FileFilter aFilter = IFileFilter.directoryOnly (); assertNotNull (aFilter); // file assertFalse (aFilter.accept (new File ("pom.xml"))); // not existing file assertFalse (aFilter.accept (new File ("file.htm"))); // directory assertTrue (aFilter.accept (new File ("src"))); // null assertFalse (aFilter.accept (null)); } @Test public void testGetFilterDirectoryPublic () { final FileFilter aFilter = IFileFilter.directoryPublic (); assertNotNull (aFilter); // file assertFalse (aFilter.accept (new File ("pom.xml"))); // not existing file assertFalse (aFilter.accept (new File ("file.htm"))); // directory assertTrue (aFilter.accept (new File ("src"))); // not existing directory assertFalse (aFilter.accept (new File (".internal"))); // null assertFalse (aFilter.accept (null)); } @Test public void testGetParentDirectoryPublic () { final FileFilter aFilter = IFileFilter.parentDirectoryPublic (); assertNotNull (aFilter); // file assertTrue (aFilter.accept (new File ("pom.xml"))); // not existing file assertTrue (aFilter.accept (new File ("file.htm"))); // directory assertTrue (aFilter.accept (new File ("src"))); // null assertFalse (aFilter.accept (null)); // hidden file assertFalse (aFilter.accept (new File (".svn/pom.xml"))); } @Test public void testGetFilterFilenameHidden () { final FileFilter aFilter = IFileFilter.filenameHidden (); assertNotNull (aFilter); // file assertFalse (aFilter.accept (new File ("pom.xml"))); // not existing file assertFalse (aFilter.accept (new File ("file.htm"))); // directory assertFalse (aFilter.accept (new File ("src"))); // not existing directory assertTrue (aFilter.accept (new File (".internal"))); // null assertFalse (aFilter.accept (null)); } @Test @SuppressFBWarnings (value = "NP_NONNULL_PARAM_VIOLATION") public void testFilenameStartsWith () { try { // null not allowed IFileFilter.filenameStartsWith (null); fail (); } catch (final NullPointerException ex) {} final FilenameFilter ff = IFileFilter.filenameStartsWith ("file"); assertNotNull (ff); assertTrue (ff.accept (null, "file.htm")); assertTrue (ff.accept (new File ("dir"), "file.htm")); assertFalse (ff.accept (null, "hello.html")); assertFalse (ff.accept (new File ("dir"), "hello.html")); assertFalse (ff.accept (null, null)); assertFalse (ff.accept (null, "")); } @Test @SuppressFBWarnings (value = "NP_NONNULL_PARAM_VIOLATION") public void testFilenameEndsWith () { try { // null not allowed IFileFilter.filenameEndsWith (null); fail (); } catch (final NullPointerException ex) {} final FilenameFilter ff = IFileFilter.filenameEndsWith (".htm"); assertNotNull (ff); assertTrue (ff.accept (null, "file.htm")); assertTrue (ff.accept (new File ("dir"), "file.htm")); assertFalse (ff.accept (null, "file.html")); assertFalse (ff.accept (new File ("dir"), "file.html")); assertFalse (ff.accept (null, null)); assertFalse (ff.accept (null, "")); } @Test @SuppressFBWarnings (value = "NP_NONNULL_PARAM_VIOLATION") public void testFilenameEqualsIgnoreCase () { try { // null not allowed IFileFilter.filenameEqualsIgnoreCase (null); fail (); } catch (final NullPointerException ex) {} final FilenameFilter ff = IFileFilter.filenameEqualsIgnoreCase ("file.htm"); assertNotNull (ff); assertTrue (ff.accept (null, "file.htm")); assertTrue (ff.accept (new File ("dir"), "file.htm")); assertTrue (ff.accept (null, "FILE.HTM")); assertTrue (ff.accept (new File ("dir"), "FILE.HTM")); assertFalse (ff.accept (null, "hello.html")); assertFalse (ff.accept (new File ("dir"), "hello.html")); assertFalse (ff.accept (null, "HELLO.HTML")); assertFalse (ff.accept (new File ("dir"), "HELLO.HTML")); assertFalse (ff.accept (null, null)); assertFalse (ff.accept (null, "")); } @Test @SuppressFBWarnings (value = "NP_NONNULL_PARAM_VIOLATION") public void testFilenameEquals () { try { // null not allowed IFileFilter.filenameEquals (null); fail (); } catch (final NullPointerException ex) {} final FilenameFilter ff = IFileFilter.filenameEquals ("file.htm"); assertNotNull (ff); assertTrue (ff.accept (null, "file.htm")); assertTrue (ff.accept (new File ("dir"), "file.htm")); assertFalse (ff.accept (null, "hello.html")); assertFalse (ff.accept (new File ("dir"), "hello.html")); assertFalse (ff.accept (null, null)); assertFalse (ff.accept (null, "")); } @Test @SuppressFBWarnings (value = "NP_NONNULL_PARAM_VIOLATION") public void testFilenameMatchAnyRegEx () { try { // null not allowed IFileFilter.filenameMatchAnyRegEx ((String []) null); fail (); } catch (final NullPointerException ex) {} final FilenameFilter ff = IFileFilter.filenameMatchAnyRegEx (".*htm$"); assertNotNull (ff); assertTrue (ff.accept (null, "file.htm")); assertTrue (ff.accept (new File ("dir"), "file.htm")); assertFalse (ff.accept (null, "file.html")); assertFalse (ff.accept (new File ("dir"), "file.html")); assertFalse (ff.accept (null, null)); assertFalse (ff.accept (null, "")); } @Test @SuppressFBWarnings (value = "NP_NONNULL_PARAM_VIOLATION") public void testFilenameMatchNoRegEx () { try { // null not allowed IFileFilter.filenameMatchNoRegEx ((String []) null); fail (); } catch (final NullPointerException ex) {} final FilenameFilter ff = IFileFilter.filenameMatchNoRegEx (".*html$"); assertNotNull (ff); assertTrue (ff.accept (null, "file.htm")); assertTrue (ff.accept (new File ("dir"), "file.htm")); assertFalse (ff.accept (null, "file.html")); assertFalse (ff.accept (new File ("dir"), "file.html")); assertFalse (ff.accept (null, null)); assertTrue (ff.accept (null, "")); } }
[ "philip@helger.com" ]
philip@helger.com
09db702eb9e48d69963085fb0a6f9c6e19fc8ee4
ecdf387e88421ff8ebb49100ca0d5661aa7273c7
/TianjianERP/src/com/matech/audit/service/meetingConsumable/model/MeetingConsumable.java
c6cf47ea59a91469de3836a76a49172ab46a4423
[]
no_license
littletanker/mt-TianjianERP
1a9433ff8bad1aebceec5bdd721544e88d73e247
ef0378918a72a321735ab4745455f6ebe5e04576
refs/heads/master
2021-01-18T17:11:33.639821
2013-09-04T09:01:24
2013-09-04T09:01:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,647
java
package com.matech.audit.service.meetingConsumable.model; public class MeetingConsumable { private String uuid;// private String meetingOrderId;// 会议编号 private String names;//耗材名称 private String counts;//数量 private String moneys;//金额 private String recordUser;//记录人 private String recordTime;//记录时间 private String batchNumber;//批次号 private String property; public String getUuid() { return uuid; } public void setUuid(String uuid) { this.uuid = uuid; } public String getMeetingOrderId() { return meetingOrderId; } public void setMeetingOrderId(String meetingOrderId) { this.meetingOrderId = meetingOrderId; } public String getNames() { return names; } public void setNames(String names) { this.names = names; } public String getCounts() { return counts; } public void setCounts(String counts) { this.counts = counts; } public String getMoneys() { return moneys; } public void setMoneys(String moneys) { this.moneys = moneys; } public String getRecordUser() { return recordUser; } public void setRecordUser(String recordUser) { this.recordUser = recordUser; } public String getRecordTime() { return recordTime; } public void setRecordTime(String recordTime) { this.recordTime = recordTime; } public String getBatchNumber() { return batchNumber; } public void setBatchNumber(String batchNumber) { this.batchNumber = batchNumber; } public String getProperty() { return property; } public void setProperty(String property) { this.property = property; } }
[ "smartken0824@gmail.com" ]
smartken0824@gmail.com
a6934b18a5b05c47824705b169d298f9eaac3fee
062fa4f7f890198a53ad03ee849c10b4a0cc8826
/classes-dex2jar_source_from_jdcore/com/amap/api/mapcore2d/dw.java
235249176c5e5491fbee2ac4ac4f55e707ef2d40
[]
no_license
Biu-G/combostuck
e721e24015379f6bfa4f4222ff49a5826e5b1991
57fed26a45e238f36ba056b3960ff05f882eb55f
refs/heads/master
2020-07-03T21:30:07.489769
2019-11-06T17:27:47
2019-11-06T17:27:47
202,056,117
0
0
null
null
null
null
UTF-8
Java
false
false
1,761
java
package com.amap.api.mapcore2d; import android.content.Context; import java.util.Iterator; import java.util.List; public class dw { private dm a; private Context b; public dw(Context paramContext, boolean paramBoolean) { b = paramContext; a = a(b, paramBoolean); } private dm a(Context paramContext, boolean paramBoolean) { try { paramContext = new dm(paramContext, dm.a(dt.class)); return paramContext; } catch (Throwable paramContext) { if (!paramBoolean) { dd.a(paramContext, "SDKDB", "getDB"); } else { paramContext.printStackTrace(); } } return null; } private boolean a(List<cy> paramList, cy paramCy) { paramList = paramList.iterator(); while (paramList.hasNext()) { if (((cy)paramList.next()).equals(paramCy)) { return false; } } return true; } public List<cy> a() { try { Object localObject = cy.h(); localObject = a.a((String)localObject, cy.class, true); return localObject; } catch (Throwable localThrowable) { localThrowable.printStackTrace(); } return null; } public void a(cy paramCy) { if (paramCy == null) { return; } try { if (a == null) { a = a(b, false); } String str = cy.a(paramCy.a()); List localList = a.b(str, cy.class); if ((localList != null) && (localList.size() != 0)) { if (a(localList, paramCy)) { a.a(str, paramCy); } } else { a.a(paramCy); return; } } catch (Throwable paramCy) { dd.a(paramCy, "SDKDB", "insert"); paramCy.printStackTrace(); } } }
[ "htlzkahsy@gmail.com" ]
htlzkahsy@gmail.com
a345805a5bb9708fa9ca0cd6b942bb40f8b8f1dc
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a037/A037928Test.java
694790f8757feae76d0f480ede76fa1c4358f707
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a037; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A037928Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
6d6b1a600657c1f242f6cc69150c9903471d642a
958fe324587c77bbae9d533083bbe7532e340e81
/src/main/java/org/repodriller/filter/range/OnlyInHead.java
537db4e872cfd1fa97d5101ac828ec07c29e9e75
[ "Apache-2.0" ]
permissive
mauricioaniche/repodriller
d5da4a01ab79f3852175799f239035f8713b73ef
3d36653b39cffd5107e23927fb0dec386b2669c3
refs/heads/master
2021-09-17T15:40:37.453755
2018-06-11T16:28:26
2018-06-11T16:28:26
26,788,399
156
36
null
2018-06-15T08:21:05
2014-11-18T02:33:13
Java
UTF-8
Java
false
false
307
java
package org.repodriller.filter.range; import java.util.Arrays; import java.util.List; import org.repodriller.domain.ChangeSet; import org.repodriller.scm.SCM; public class OnlyInHead implements CommitRange { @Override public List<ChangeSet> get(SCM scm) { return Arrays.asList(scm.getHead()); } }
[ "mauricioaniche@gmail.com" ]
mauricioaniche@gmail.com
6e121ee5c99d9352be6152100bee381749bf9f8a
abb7595a979afada4416d0b177a96ca39184b956
/src/runtime/com/shtick/util/tokenizers/json/PositiveToken.java
75617d4cc6a6a5f7f9e8c55c9d62678a69724649
[ "MIT" ]
permissive
seanmcox/scratch-runner-implementation
6101adc3a6d5dec0f53b77f49e3357ba6260febe
20f73f009bb6a1aaa155125f6e3be4ffe112b23c
refs/heads/master
2023-02-21T14:52:52.829791
2023-02-05T04:24:22
2023-02-05T04:24:22
122,667,595
0
0
MIT
2019-02-04T07:20:50
2018-02-23T20:09:04
Java
UTF-8
Java
false
false
654
java
/** * */ package com.shtick.util.tokenizers.json; /** * @author sean.cox * */ public class PositiveToken extends JSONToken { /** * The constant value that characterizes this token. * This is the same as the value returned by toString() */ public static final String VALUE="+"; /** * @param line * @param linePosition * @param position */ public PositiveToken(int line, int linePosition, int position) { super(line, linePosition, line, linePosition+VALUE.length(), position, position+VALUE.length()); } /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { return VALUE; } }
[ "git@smcox.com" ]
git@smcox.com
9001bc518e8afcaede395dcf896636bbc8b9b7a6
d00af6c547e629983ff777abe35fc9c36b3b2371
/jboss-all/jmx/src/main/test/compliance/standard/support/ArbitraryInterface.java
9477adcd97008a5556c81165a4108a410118eae4
[]
no_license
aosm/JBoss
e4afad3e0d6a50685a55a45209e99e7a92f974ea
75a042bd25dd995392f3dbc05ddf4bbf9bdc8cd7
refs/heads/master
2023-07-08T21:50:23.795023
2013-03-20T07:43:51
2013-03-20T07:43:51
8,898,416
1
1
null
null
null
null
UTF-8
Java
false
false
244
java
/* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ package test.compliance.standard.support; public interface ArbitraryInterface { void setArbitraryValue(String value); }
[ "rasmus@dll.nu" ]
rasmus@dll.nu
4869e436e63ca0871c4862444038f8e7aa7dd92d
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.socialplatform-base/sources/X/AnonymousClass1k8.java
ccfee89f9cde76151bf7e33ed8baab6f879a6ce0
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
688
java
package X; import android.content.Context; /* renamed from: X.1k8 reason: invalid class name */ public final class AnonymousClass1k8 extends AbstractC09911kL<AnonymousClass1k8, AnonymousClass1kA, AbstractC00820Ju<AnonymousClass0VM>, AnonymousClass0mX> { public final C06231Ww A00; public final AnonymousClass1k6 A01; /* JADX WARN: Incorrect args count in method signature: (Landroid/content/Context;LX/1Ww;LX/1k6;Ljava/util/Set<LX/1l9;>;Ljava/util/Set<Lcom/facebook/fresco/ui/common/ControllerListener2;>;)V */ public AnonymousClass1k8(Context context, C06231Ww r2, AnonymousClass1k6 r3) { super(context); this.A01 = r3; this.A00 = r2; } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
ea005395fe5229556119627844e983f12352acf2
bb544736bc4267412bf7e774dd1601371fb0b91d
/kie-server-parent/kie-server-api/src/main/java/org/kie/server/api/marshalling/xstream/XStreamMarshallerExtension.java
2b688814bb2e9218f0427aa9a46252494f13d5c3
[ "Apache-2.0" ]
permissive
domhanak/droolsjbpm-integration
b807ded5c600e0a335bbd340ede855ca5911ff33
62ca32b448401fc3b287bd28b99531540a85782f
refs/heads/master
2022-04-30T08:11:52.809050
2019-04-03T11:54:50
2019-04-03T11:54:50
88,586,866
1
0
Apache-2.0
2021-05-05T11:43:34
2017-04-18T05:50:01
Java
UTF-8
Java
false
false
1,599
java
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * 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.kie.server.api.marshalling.xstream; import com.thoughtworks.xstream.mapper.MapperWrapper; /** * Represents custom extension for the XStream marshaller. */ public interface XStreamMarshallerExtension { /** * Extends the provided marshaller, with e.g. custom converters. * * @param xStreamMarshaller the marshaller which should be extended */ void extend(XStreamMarshaller xStreamMarshaller); /** * Enables additional {@link MapperWrapper}s by chaining them to the provided one. * * Example: {@code return new HibernateWrapper(next)} * - this will add the HibernateWrapper into the chain. Note that it is important to pass the {@code next} * MapperWrapper into the constructor to make sure the chain does not get broken * * Default implementation: identity * * @param next the next {@link MapperWrapper} in the chain */ default MapperWrapper chainMapperWrapper(MapperWrapper next) { return next; } }
[ "swiderski.maciej@gmail.com" ]
swiderski.maciej@gmail.com
b7798dcee095a5692dde9d4aa36c8bb502e3a73c
6cd756bf890b53b748d41d14d6c460349a898c99
/fr-designer-report-8.0/com/fr/design/mainframe/widget/editors/ColorTextField.java
8b188e6c5ae7267dd1d28fe5ba21a9931b26eaa0
[]
no_license
jiangzhenjian/FineReport
4208b347f3b7fe839fec97cc0cb67bd33d761ba8
ca34e419b4f117684ecbfafdd6a1178cc94ce5c6
refs/heads/master
2021-01-07T20:53:20.460962
2017-01-22T03:25:11
2017-01-22T03:25:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,531
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) fieldsfirst ansi package com.fr.design.mainframe.widget.editors; import com.fr.design.gui.itextfield.UITextField; import java.awt.*; import java.awt.event.ActionListener; import javax.swing.JComponent; // Referenced classes of package com.fr.design.mainframe.widget.editors: // ITextComponent public class ColorTextField extends JComponent implements ITextComponent { class ColorTextFieldLayout implements LayoutManager { final ColorTextField this$0; public void addLayoutComponent(String s, Component component) { } public void removeLayoutComponent(Component component) { } public Dimension preferredLayoutSize(Container container) { byte byte0 = 22; int i = ColorTextField.LEFT + ColorTextField.BOX + ColorTextField.ICON_TEXT_PAD + 60; return new Dimension(i, byte0); } public Dimension minimumLayoutSize(Container container) { byte byte0 = 22; int i = ColorTextField.LEFT + ColorTextField.BOX + ColorTextField.ICON_TEXT_PAD; return new Dimension(i, byte0); } public void layoutContainer(Container container) { int i = 0; int j = container.getWidth(); int k = container.getHeight(); if(getColor() != null) { i += ColorTextField.LEFT + ColorTextField.BOX + ColorTextField.ICON_TEXT_PAD; j -= i; } textField.setBounds(i, 0, j, k); } public ColorTextFieldLayout() { this$0 = ColorTextField.this; super(); } } private static int BOX = 12; private static int LEFT = 4; private static int ICON_TEXT_PAD = 4; private Color color; private UITextField textField; public ColorTextField() { setLayout(new ColorTextFieldLayout()); textField = new UITextField(); textField.setBorder(null); textField.setOpaque(false); add(textField); } public void paintComponent(Graphics g) { int i = getWidth(); int j = getHeight(); g.setColor(Color.white); g.fillRect(0, 0, i, j); int k = LEFT; int l = (j - BOX) / 2; if(getColor() != null) { g.setColor(getColor()); g.fillRect(k, l, BOX, BOX); g.setColor(Color.black); g.drawRect(k, l, BOX, BOX); k += BOX + ICON_TEXT_PAD; } } public Color getColor() { return color; } public void setColor(Color color1) { color = color1; } public void setText(String s) { textField.setText(s); } public String getText() { return textField.getText(); } public void setEditable(boolean flag) { textField.setEditable(flag); textField.setBackground(Color.white); } public void requestFocus() { textField.requestFocus(); } public void addActionListener(ActionListener actionlistener) { textField.addActionListener(actionlistener); } public void selectAll() { textField.selectAll(); } public void setValue(Object obj) { color = (Color)obj; } }
[ "hao01@hao" ]
hao01@hao
2652c58090bedca403eeb87153a62f05053a40ed
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/recharge/ui/RechargeUI$17.java
6ebc567118c9239cf0482fe1c7c4deb39182937a
[]
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
894
java
package com.tencent.mm.plugin.recharge.ui; import android.content.Intent; import android.view.MenuItem; import android.view.MenuItem.OnMenuItemClickListener; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.br.c; final class RechargeUI$17 implements MenuItem.OnMenuItemClickListener { RechargeUI$17(RechargeUI paramRechargeUI) {} public final boolean onMenuItemClick(MenuItem paramMenuItem) { AppMethodBeat.i(67232); paramMenuItem = new Intent(); paramMenuItem.putExtra("rawUrl", RechargeUI.j(this.NyL)); c.b(this.NyL, "webview", ".ui.tools.WebViewUI", paramMenuItem); AppMethodBeat.o(67232); return true; } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes4.jar * Qualified Name: com.tencent.mm.plugin.recharge.ui.RechargeUI.17 * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
1f051d0dabf89d9529525b800b97c159d7c3a7b3
ba57e3efce77bcc07fd535b53ba34e03dcb6c5fe
/src/main/java/com/kousenit/shopping/controllers/ProductRestController.java
a88cfdb676de0815df93cb1de37f389102d77a5a
[]
no_license
neucast/shopping_rest
bab330cb2039cc75ede568718b725d52a5e5a35b
67beddde59066ebe1ce1ca6a71848f8be2c842fc
refs/heads/master
2023-08-12T01:28:03.214504
2021-10-14T14:54:03
2021-10-14T14:54:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,830
java
package com.kousenit.shopping.controllers; import com.kousenit.shopping.entities.Product; import com.kousenit.shopping.entities.ProductNotFoundException; import com.kousenit.shopping.services.ProductService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import java.net.URI; import java.util.List; import java.util.Optional; @RestController @RequestMapping("/rest") public class ProductRestController { private final ProductService service; @Autowired public ProductRestController(ProductService service) { this.service = service; } @GetMapping // localhost:8080/rest?minimumPrice=5.0 public List<Product> getAllProducts( @RequestParam(required = false) Double minimumPrice) { if (minimumPrice != null) { return service.findAllByMinimumPrice(minimumPrice); } return service.findAll(); } @GetMapping("{id}") public Product getProduct(@PathVariable("id") Integer id) { return service.findById(id) .orElseThrow(() -> new ProductNotFoundException(id)); } @PostMapping @ResponseStatus(HttpStatus.CREATED) public ResponseEntity<Product> insertProduct(@RequestBody Product product) { Product p = service.saveProduct(product); URI location = ServletUriComponentsBuilder.fromCurrentRequestUri() .path("/{id}") .buildAndExpand(p.getId()) .toUri(); return ResponseEntity.created(location).body(p); } @PutMapping("{id}") public Product updateOrInsertProduct(@PathVariable Integer id, @RequestBody Product newProduct) { return service.findById(id).map(product -> { product.setName(newProduct.getName()); product.setPrice(newProduct.getPrice()); return service.saveProduct(product); }).orElseGet(() -> { newProduct.setId(id); return service.saveProduct(newProduct); }); } @DeleteMapping("{id}") public ResponseEntity<Void> deleteProduct(@PathVariable Integer id) { Optional<Product> existingProduct = service.findById(id); if (existingProduct.isPresent()) { service.deleteProduct(id); return ResponseEntity.noContent().build(); } else { return ResponseEntity.notFound().build(); } } @DeleteMapping @ResponseStatus(HttpStatus.NO_CONTENT) public void deleteAllProducts() { service.deleteAllInBatch(); } }
[ "ken.kousen@kousenit.com" ]
ken.kousen@kousenit.com
70d8e99caf84468159a40ccda1a5bec714d0c6f8
1f47217ad740b03b5ca7c965a01788dee3c0fbf7
/JLibrary06/lib/XML/JAXB/jaxb/samples/streaming-unmarshalling/src/Main.java
09503492d90d861848e54329a514dbcf7c195445
[]
no_license
amitabha66/JLibrary06
bee7fddca01188991af968a5678fe1d89dce7ee3
f19056cee7a88318315f9c25f8618aface8f0683
refs/heads/master
2021-01-19T07:03:19.133486
2016-06-23T16:41:59
2016-06-23T16:41:59
61,802,950
0
0
null
null
null
null
UTF-8
Java
false
false
3,127
java
/* * The contents of this file are subject to the terms * of the Common Development and Distribution License * (the "License"). You may not use this file except * in compliance with the License. * * You can obtain a copy of the license at * https://jwsdp.dev.java.net/CDDLv1.0.html * See the License for the specific language governing * permissions and limitations under the License. * * When distributing Covered Code, include this CDDL * HEADER in each file and include the License file at * https://jwsdp.dev.java.net/CDDLv1.0.html If applicable, * add the following below this CDDL HEADER, with the * fields enclosed by brackets "[]" replaced with your * own identifying information: Portions Copyright [yyyy] * [name of copyright owner] */ import org.xml.sax.XMLReader; import primer.PurchaseOrderType; import primer.PurchaseOrders; import javax.xml.bind.JAXBContext; import javax.xml.bind.Unmarshaller; import javax.xml.parsers.SAXParserFactory; import java.io.File; /* * @(#)$Id: Main.java,v 1.1.2.1 2006/09/14 19:16:12 kohsuke Exp $ * * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. * * This software is the proprietary information of Sun Microsystems, Inc. * Use is subject to license terms. * */ public class Main { public static void main( String[] args ) throws Exception { // create JAXBContext for the primer.xsd JAXBContext context = JAXBContext.newInstance("primer"); Unmarshaller unmarshaller = context.createUnmarshaller(); // purchase order notification callback final PurchaseOrders.Listener orderListener = new PurchaseOrders.Listener() { public void handlePurchaseOrder(PurchaseOrders purchaseOrders, PurchaseOrderType purchaseOrder) { System.out.println("this order will be shipped to " + purchaseOrder.getShipTo().getName()); } }; // install the callback on all PurchaseOrders instances unmarshaller.setListener(new Unmarshaller.Listener() { public void beforeUnmarshal(Object target, Object parent) { if(target instanceof PurchaseOrders) { ((PurchaseOrders)target).setPurchaseOrderListener(orderListener); } } public void afterUnmarshal(Object target, Object parent) { if(target instanceof PurchaseOrders) { ((PurchaseOrders)target).setPurchaseOrderListener(null); } } }); // create a new XML parser SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setNamespaceAware(true); XMLReader reader = factory.newSAXParser().getXMLReader(); reader.setContentHandler(unmarshaller.getUnmarshallerHandler()); for (String arg : args) { // parse all the documents specified via the command line. // note that XMLReader expects an URL, not a file name. // so we need conversion. reader.parse(new File(arg).toURI().toString()); } } }
[ "amitabha66@gmail.com" ]
amitabha66@gmail.com
9d8a7e45e3973fcfd123fb6435a3589e2b19352f
91e72ef337a34eb7e547fa96d99fca5a4a6dc89e
/subjects/javapoet/results/evosuite/1564423768/0002/evosuite-tests/com/squareup/javapoet/CodeBlock_ESTest.java
e83e4da5fa85cf01e28c2cbfe22f094558c226f9
[]
no_license
STAMP-project/descartes-amplification-experiments
deda5e2f1a122b9d365f7c76b74fb2d99634aad4
a5709fd78bbe8b4a4ae590ec50704dbf7881e882
refs/heads/master
2021-06-27T04:13:17.035471
2020-10-14T08:17:05
2020-10-14T08:17:05
169,711,716
0
0
null
2020-10-14T08:17:07
2019-02-08T09:32:43
Java
UTF-8
Java
false
false
617
java
/* * This file was automatically generated by EvoSuite * Mon Jul 29 18:12:58 GMT 2019 */ package com.squareup.javapoet; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, useJEE = true) public class CodeBlock_ESTest extends CodeBlock_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "oscarlvp@gmail.com" ]
oscarlvp@gmail.com
bb37f2dde23c081b549e2c2d045de6dcb686d92c
3bf7e651bee0f9729fe5895523668bb037c449ab
/RxUI/src/main/java/com/vondear/rxui/view/dialog/RxDialogShapeLoading.java
37789c866f046484b9fded6d39618ac5b4d50b6d
[ "Apache-2.0" ]
permissive
865394064/RxTool
bbdc1de3fa4b328a27a3df8d86137d374ee211f8
5804a45e4bd2cdce7049505f1b74012a2176fd0f
refs/heads/master
2020-08-27T20:18:50.284748
2019-10-25T07:48:16
2019-10-25T07:48:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,524
java
package com.vondear.rxui.view.dialog; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import com.vondear.rxtool.view.RxToast; import com.vondear.rxui.R; import com.vondear.rxui.view.dialog.shapeloadingview.RxShapeLoadingView; /** * @author Vondear * @date 2017/3/16 */ public class RxDialogShapeLoading extends RxDialog { private RxShapeLoadingView mLoadingView; private View mDialogContentView; public RxDialogShapeLoading(Context context, int themeResId) { super(context, themeResId); initView(context); } public RxDialogShapeLoading(Context context, boolean cancelable, OnCancelListener cancelListener) { super(context, cancelable, cancelListener); initView(context); } public RxDialogShapeLoading(Context context) { super(context); initView(context); } public RxDialogShapeLoading(Activity context) { super(context); initView(context); } public RxDialogShapeLoading(Context context, float alpha, int gravity) { super(context, alpha, gravity); initView(context); } private void initView(Context context) { mDialogContentView = LayoutInflater.from(context).inflate(R.layout.dialog_shape_loading_view, null); mLoadingView = mDialogContentView.findViewById(R.id.loadView); setContentView(mDialogContentView); } public void cancel(RxCancelType code, String str) { cancel(); switch (code) { case normal: RxToast.normal(str); break; case error: RxToast.error(str); break; case success: RxToast.success(str); break; case info: RxToast.info(str); break; default: RxToast.normal(str); break; } } public void cancel(String str) { cancel(); RxToast.normal(str); } public void setLoadingText(CharSequence charSequence) { mLoadingView.setLoadingText(charSequence); } public RxShapeLoadingView getLoadingView() { return mLoadingView; } public View getDialogContentView() { return mDialogContentView; } public enum RxCancelType {normal, error, success, info} }
[ "865394064@qq.com" ]
865394064@qq.com
d3b0ce3853cf3980f8d64fe151ca76e309d0fabb
790b934cb3945e64e65c267703394e6b39135a2d
/PARALLEL PROJECTS/forestmanagementsystemusingspringrest/src/test/java/com/capgemini/forestmanagementsystemusingspringrest/testdao/ProductDaoTest.java
5b9dd50d7e370721120681963d7d01c947905605
[]
no_license
Omkarnaik571/TY_CG_HTD_BangloreNovember_JFS_OmkarNaik
af1f515dd34abe1f79d81a88422cd1f668d18ed4
c460ff715036e843138ef4e43e0e9a664d944664
refs/heads/master
2023-01-12T01:42:37.720261
2020-02-17T09:36:46
2020-02-17T09:36:46
225,846,042
1
0
null
2023-01-07T21:26:24
2019-12-04T11:00:48
Java
UTF-8
Java
false
false
2,426
java
package com.capgemini.forestmanagementsystemusingspringrest.testdao; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; import com.capgemini.forestmanagementsystemusingspringrest.config.OrmConfig; import com.capgemini.forestmanagementsystemusingspringrest.dao.LandDao; import com.capgemini.forestmanagementsystemusingspringrest.dao.ProductDao; import com.capgemini.forestmanagementsystemusingspringrest.dto.LandDetailsDto; import com.capgemini.forestmanagementsystemusingspringrest.dto.ProductDetailsDto; import com.capgemini.forestmanagementsystemusingspringrest.testconfig.TestBeans; @SpringJUnitConfig(classes = { TestBeans.class, OrmConfig.class }) class ProductDaoTest { @Autowired ProductDao productDao; @Test void testAddProduct() { ProductDetailsDto productDetailsDto=new ProductDetailsDto(); productDetailsDto.setProductId(77); productDetailsDto.setProductName("Oak Tree"); boolean isAdded=productDao.addProduct(productDetailsDto); assertTrue(isAdded); productDao.deleteProduct(productDetailsDto.getProductId()); } @Test void testDeleteProduct() { ProductDetailsDto productDetailsDto=new ProductDetailsDto(); productDetailsDto.setProductId(77); productDetailsDto.setProductName("Oak Tree"); productDao.addProduct(productDetailsDto); boolean isDeleted=productDao.deleteProduct(productDetailsDto.getProductId()); assertTrue(isDeleted); } @Test void testModifyProduct() { ProductDetailsDto productDetailsDto=new ProductDetailsDto(); productDetailsDto.setProductId(77); productDetailsDto.setProductName("Oak Tree"); productDao.addProduct(productDetailsDto); boolean isModified=productDao.modifyProduct(productDetailsDto); assertTrue(isModified); productDao.deleteProduct(productDetailsDto.getProductId()); } @Test void testViewAllProduct() { assertNotNull(productDao.viewAllProduct()); } @Test void testViewParticularProduct() { ProductDetailsDto productDetailsDto=new ProductDetailsDto(); productDetailsDto.setProductId(77); productDetailsDto.setProductName("Oak Tree"); productDao.addProduct(productDetailsDto); assertNotNull(productDao.viewParticularProduct(productDetailsDto.getProductId())); productDao.deleteProduct(productDetailsDto.getProductId()); } }
[ "omkarnaik571@gmail.com" ]
omkarnaik571@gmail.com
ddee07f689f7553e8e7adcac08fe28a51e6bb9df
329b2cb3c91a0c953458efd253c4fcdce6f539c4
/graphsdk/src/main/java/com/microsoft/graph/generated/IBaseWorkbookFunctionsValueRequestBuilder.java
4b98249f5c7df5d97a84ad8db1ab04aed4b9e931
[ "MIT" ]
permissive
sbolotovms/msgraph-sdk-android
255eeddf19c1b15f04ee3b1549f0cae70d561fdd
1320795ba1c0b5eb36ef8252b73799d15fc46ba1
refs/heads/master
2021-01-20T05:09:00.148739
2017-04-28T23:20:23
2017-04-28T23:20:23
89,751,501
1
0
null
2017-04-28T23:20:37
2017-04-28T23:20:37
null
UTF-8
Java
false
false
1,443
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.generated; import com.microsoft.graph.concurrency.*; import com.microsoft.graph.core.*; import com.microsoft.graph.extensions.*; import com.microsoft.graph.http.*; import com.microsoft.graph.generated.*; import com.microsoft.graph.options.*; import com.microsoft.graph.serializer.*; import java.util.Arrays; import java.util.List; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The interface for the Base Workbook Functions Value Request Builder. */ public interface IBaseWorkbookFunctionsValueRequestBuilder extends IRequestBuilder { /** * Creates the IWorkbookFunctionsValueRequest * * @return The IWorkbookFunctionsValueRequest instance */ IWorkbookFunctionsValueRequest buildRequest(); /** * Creates the IWorkbookFunctionsValueRequest with specific options instead of the existing options * * @param requestOptions the options for the request * @return The IWorkbookFunctionsValueRequest instance */ IWorkbookFunctionsValueRequest buildRequest(final List<Option> requestOptions); }
[ "brianmel@microsoft.com" ]
brianmel@microsoft.com
27823f73fab13e102928949f0cd9f7378f2d6720
dd2346f5994ab072aa61ebff9baafffe9b855b0c
/app/src/main/java/com/holike/crm/adapter/customer/CustomerDrawingAdapter.java
8d7d799b028e71f096e80ff84763f7720dead585
[]
no_license
stozen/HolikeCRM_V2
210573d8d27406629a373da08424d50dbc7d6710
752d00ef33f866e562d056ec88fe3e12695856fa
refs/heads/master
2020-07-19T20:53:47.228264
2019-08-28T09:52:25
2019-08-28T09:52:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,079
java
package com.holike.crm.adapter.customer; import android.content.Context; import android.text.TextUtils; import android.view.View; import com.holike.crm.R; import com.holike.crm.adapter.CustomerStatusListAdapter; import com.holike.crm.bean.CustomerStatusBean; import com.holike.crm.bean.MultiItem; import java.util.List; /** * Created by gallop 2019/7/8 * Copyright (c) 2019 holike * 待出图客户(客户列表) */ public class CustomerDrawingAdapter extends CustomerStatusListAdapter { private String mTipsRuleDate, mTipsSource, mTipsRuler, mTipsReservation, mTipsCountdown; public CustomerDrawingAdapter(Context context, List<MultiItem> mDatas) { super(context, mDatas); mTipsRuleDate = context.getString(R.string.customer_ruler_date_tips); mTipsSource = context.getString(R.string.customer_source_tips); mTipsRuler = context.getString(R.string.customer_ruler_tips); mTipsReservation = context.getString(R.string.followup_reservation); mTipsCountdown = context.getString(R.string.customer_countdown_tips); } @Override public void setup(RecyclerHolder holder, CustomerStatusBean.InnerBean bean, int position) { holder.setText(R.id.tv_rulerDate, obtain2(mTipsRuleDate, wrap(bean.appointmentTime))); //量尺日期 holder.setText(R.id.tv_source, obtain(mTipsSource, wrap(bean.source), false)); //来源 holder.setText(R.id.tv_ruler, obtain(mTipsRuler, wrap(bean.appointMeasureBy), false)); //量尺人员 holder.setText(R.id.tv_reservation, obtain2(mTipsReservation, wrap(bean.measureAppConfirmTime))); //预约确图 if (TextUtils.isEmpty(bean.customerProtectTime)) { holder.setVisibility(R.id.tv_countdown, View.GONE); } else { holder.setText(R.id.tv_countdown, obtain2(mTipsCountdown, bean.customerProtectTime)); holder.setVisibility(R.id.tv_countdown, View.VISIBLE); } } @Override public int bindLayoutResId() { return R.layout.item_rv_customer_status_drawing_v2; } }
[ "i23xiaoyan@qq.com" ]
i23xiaoyan@qq.com
99cf0fcab1f48095c7fa555d62b1529764845154
5a076617e29016fe75d6421d235f22cc79f8f157
/Android 旋转的地球源码/src/com/renzh/earthtest/BufferFactory.java
8512488045c07896f7bcf18739b17d614051881c
[]
no_license
dddddttttt/androidsourcecodes
516b8c79cae7f4fa71b97a2a470eab52844e1334
3d13ab72163bbeed2ef226a476e29ca79766ea0b
refs/heads/master
2020-08-17T01:38:54.095515
2018-04-08T15:17:24
2018-04-08T15:17:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,001
java
package com.renzh.earthtest; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.nio.ShortBuffer; /** * A utility class to create buffers. * * All public methods are static. */ public class BufferFactory { // This class cannot and should not be instantiated private BufferFactory() {} /** * Creates a buffer of floats using memory outside the normal, garbage collected heap * * @param capacity The number of primitives to create in the buffer. */ public static FloatBuffer createFloatBuffer(int capacity) { // 4 is the number of bytes in a float ByteBuffer vbb = ByteBuffer.allocateDirect(capacity * 4); vbb.order(ByteOrder.nativeOrder()); return vbb.asFloatBuffer(); } public static FloatBuffer createFloatBuffer(float[]fArray){ return createFloatBuffer(fArray.length).put(fArray); } /** * Creates a buffer of shorts using memory outside the normal, garbage collected heap * * @param capacity The number of primitives to create in the buffer. */ public static ShortBuffer createShortBuffer(int capacity) { // 2 is the number of bytes in a short ByteBuffer vbb = ByteBuffer.allocateDirect(capacity * 2); vbb.order(ByteOrder.nativeOrder()); return vbb.asShortBuffer(); } public static ShortBuffer createShortBuffer(short[]sArray){ return createShortBuffer(sArray.length).put(sArray); } public static IntBuffer createIntBuffer(int capacity) { ByteBuffer vbb = ByteBuffer.allocateDirect(capacity * 4); vbb.order(ByteOrder.nativeOrder()); return vbb.asIntBuffer(); } public static IntBuffer createIntBuffer(int[]iArray){ return createIntBuffer(iArray.length).put(iArray); } public static ByteBuffer createByteBuffer(int capacity) { ByteBuffer vbb = ByteBuffer.allocateDirect(capacity); vbb.order(ByteOrder.nativeOrder()); return vbb; } public static ByteBuffer createByteBuffer(byte[]bArray){ return createByteBuffer(bArray.length).put(bArray); } }
[ "harry.han@gmail.com" ]
harry.han@gmail.com
690f8af80c9017eef58bb391e8a852402ffea0b0
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes5.dex_source_from_JADX/com/facebook/graphql/deserializers/GraphQLGraphSearchConnectedFriendsConnectionDeserializer.java
cb17ef6f756dcaaef29c93d7cacb4eb1adcd342e
[]
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
3,702
java
package com.facebook.graphql.deserializers; import com.facebook.flatbuffers.FlatBufferBuilder; import com.facebook.flatbuffers.MutableFlatBuffer; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; import com.fasterxml.jackson.databind.SerializerProvider; import java.nio.ByteBuffer; import java.util.ArrayList; /* compiled from: page_aymt_megaphone */ public class GraphQLGraphSearchConnectedFriendsConnectionDeserializer { public static int m5074a(JsonParser jsonParser, FlatBufferBuilder flatBufferBuilder) { int[] iArr = new int[2]; boolean[] zArr = new boolean[1]; int[] iArr2 = new int[1]; while (jsonParser.c() != JsonToken.END_OBJECT) { String i = jsonParser.i(); jsonParser.c(); if (!(jsonParser.g() == JsonToken.VALUE_NULL || i == null)) { if (i.equals("count")) { zArr[0] = true; iArr2[0] = jsonParser.E(); } else if (i.equals("edges")) { int i2 = 0; ArrayList arrayList = new ArrayList(); if (jsonParser.g() == JsonToken.START_ARRAY) { while (jsonParser.c() != JsonToken.END_ARRAY) { arrayList.add(Integer.valueOf(GraphQLGraphSearchConnectedFriendsEdgeDeserializer.m5077a(jsonParser, flatBufferBuilder))); } } if (!arrayList.isEmpty()) { int[] iArr3 = new int[arrayList.size()]; for (int i3 = 0; i3 < arrayList.size(); i3++) { iArr3[i3] = ((Integer) arrayList.get(i3)).intValue(); } i2 = flatBufferBuilder.a(iArr3, true); } iArr[1] = i2; } else { jsonParser.f(); } } } flatBufferBuilder.c(2); if (zArr[0]) { flatBufferBuilder.a(0, iArr2[0], 0); } flatBufferBuilder.b(1, iArr[1]); return flatBufferBuilder.d(); } public static MutableFlatBuffer m5075a(JsonParser jsonParser, short s) { FlatBufferBuilder flatBufferBuilder = new FlatBufferBuilder(128); int a = m5074a(jsonParser, flatBufferBuilder); if (1 != 0) { flatBufferBuilder.c(2); flatBufferBuilder.a(0, s, 0); flatBufferBuilder.b(1, a); a = flatBufferBuilder.d(); } flatBufferBuilder.d(a); ByteBuffer wrap = ByteBuffer.wrap(flatBufferBuilder.e()); wrap.position(0); MutableFlatBuffer mutableFlatBuffer = new MutableFlatBuffer(wrap, null, null, true, null); mutableFlatBuffer.a(4, Boolean.valueOf(true)); return mutableFlatBuffer; } public static void m5076a(MutableFlatBuffer mutableFlatBuffer, int i, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) { jsonGenerator.f(); int a = mutableFlatBuffer.a(i, 0, 0); if (a != 0) { jsonGenerator.a("count"); jsonGenerator.b(a); } a = mutableFlatBuffer.g(i, 1); if (a != 0) { jsonGenerator.a("edges"); jsonGenerator.d(); for (int i2 = 0; i2 < mutableFlatBuffer.c(a); i2++) { GraphQLGraphSearchConnectedFriendsEdgeDeserializer.m5079b(mutableFlatBuffer, mutableFlatBuffer.m(a, i2), jsonGenerator, serializerProvider); } jsonGenerator.e(); } jsonGenerator.g(); } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
51002414e8e6c520e003077696242e3304557a69
65e03eecd6416c2693bcdc91f2d0a46d9a0c4716
/javafundamentals-e62/src/main/Example3.java
2ca849de4781ec3cfbdb732bfae48a6ee206bc27
[]
no_license
lspil/youtubechannel
51e23c70f58953d8d834c7846d1ed3ff88211008
91aa9432a7366d457a8fe14b5cae6fe102b893aa
refs/heads/master
2023-08-31T14:06:07.497714
2023-08-20T07:33:11
2023-08-20T07:33:11
184,881,541
187
239
null
2023-07-04T13:55:46
2019-05-04T10:34:22
Java
UTF-8
Java
false
false
536
java
package main; import java.nio.file.Path; import java.nio.file.Paths; public class Example3 { public static void main(String[] args) { Path p1 = Paths.get("a/b/c/./././d/../../c"); // ./ ../ /** * a/b/c/./././d/../../c ----> a/b/c */ System.out.println(p1.normalize()); Path p2 = Paths.get("a/../../../b"); // relative /* * ../../b */ System.out.println(p2.normalize()); Path p3 = Paths.get("/a/../../../b"); // absolute /b System.out.println(p3.normalize()); } }
[ "Laurentiu.Spilca@endava.com" ]
Laurentiu.Spilca@endava.com