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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794510cd702a5a0fe48aa98a28fb03042443adfe
|
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
|
/analysis/reverse-engineering/decompile-fitts-with-gradle-20191031-2200/src/main/java/androidx/annotation/RequiresFeature.java
|
6a2532c868281bfbb48ed9cfdf4014d73900b418
|
[
"Apache-2.0"
] |
permissive
|
skkuse-adv/2019Fall_team2
|
2d4f75bc793368faac4ca8a2916b081ad49b7283
|
3ea84c6be39855f54634a7f9b1093e80893886eb
|
refs/heads/master
| 2020-08-07T03:41:11.447376
| 2019-12-21T04:06:34
| 2019-12-21T04:06:34
| 213,271,174
| 5
| 5
|
Apache-2.0
| 2019-12-12T09:15:32
| 2019-10-07T01:18:59
|
Java
|
UTF-8
|
Java
| false
| false
| 417
|
java
|
package androidx.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
@Retention(RetentionPolicy.SOURCE)
public @interface RequiresFeature {
String enforcement();
String name();
}
|
[
"33246398+ajid951125@users.noreply.github.com"
] |
33246398+ajid951125@users.noreply.github.com
|
24160dc4954af64a653d92b167fdd056fceec945
|
d6557816238a851ab04dc963d0e02cf373b441ab
|
/src/main/java/smilyk/homeacc/service/subcategory/SubcategoryService.java
|
12521a3227a9711c58665a2b096a12779c5bbcd1
|
[] |
no_license
|
natalyaKh/home-accounting
|
bafbe467f957e42c2dcf7c57606b1db57806644c
|
432c1993c98c6e5f1b9153c00d1a8cd5a1b50606
|
refs/heads/main
| 2023-06-25T13:48:39.940607
| 2021-07-27T07:42:08
| 2021-07-27T07:42:08
| 389,890,372
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 708
|
java
|
package smilyk.homeacc.service.subcategory;
import smilyk.homeacc.dto.SubcategoryDto;
import smilyk.homeacc.model.Subcategory;
import java.util.List;
public interface SubcategoryService {
Subcategory save(SubcategoryDto subcategoryDto);
List<SubcategoryDto> getAllSubcategoryByUserUuid(String userUuid);
SubcategoryDto createSubcategory(SubcategoryDto subcategoryDto);
SubcategoryDto getSubcategoryBySubcategoryUuid(String subcategoryUuid);
SubcategoryDto deleteSubcategoryBySubcategoryUuid(String subcategoryUuid);
SubcategoryDto updateSubcategory(SubcategoryDto subcategoryDto);
Boolean getSubcategoryForValidationUniqueName(String userUuid, String subcategoryName);
}
|
[
"smilyk1982@gmail.com"
] |
smilyk1982@gmail.com
|
0d860fda206d595091b74cb98164bb55d939f115
|
17d734b053085b279ec4ee1c92498589fe529bef
|
/rcore/src/main/java/com/qiyuan/gamesdk/core/api/def/IReportApi.java
|
0a69e6c3472d149c6b9db0c3c5e88aa6c2fba44c
|
[] |
no_license
|
fyc/HWSDK2
|
f1b1ca0e007712433931484ee44778e22edddddd
|
a08463652534b12329f5dc5d48e43de05fc76c9f
|
refs/heads/master
| 2020-04-02T17:29:40.654071
| 2018-11-29T03:07:49
| 2018-11-29T03:07:49
| 154,659,600
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 839
|
java
|
package com.qiyuan.gamesdk.core.api.def;
import android.app.Activity;
import com.qiyuan.gamesdk.core.base.http.volley.bean.QyDataBean;
import com.qiyuan.gamesdk.core.base.http.volley.listener.QyRespListener;
import com.qygame.qysdk.outer.IOperateCallback;
import com.qiyuan.gamesdk.core.base.http.volley.bean.QyDataBean;
import com.qiyuan.gamesdk.core.base.http.volley.listener.QyRespListener;
import java.util.Map;
/**
* Created by chenshuide on 15/6/8.
*/
public interface IReportApi extends IApiWrapping {
void feedback(String content, QyRespListener<Void> callback);
// 激活事件请求
void reportActivate(Activity activity,IOperateCallback<QyDataBean> callback);
void onLineEvent( IOperateCallback<Void> callback);
void onCharacterEvent(Map<String, String> params, IOperateCallback<Void> callback);
}
|
[
"925355740@qq.com"
] |
925355740@qq.com
|
a1ec6759f2bed1cd528c377b6d5dda24ac1e54d8
|
5ebf8e5463d207b5cc17e14cc51e5a1df135ccb9
|
/moe.apple/moe.platform.ios/src/main/java/apple/intents/INSpeakableStringResolutionResult.java
|
1c0268375c9f9147a663feeaff9f1d35378454ad
|
[
"ICU",
"Apache-2.0",
"W3C"
] |
permissive
|
multi-os-engine-community/moe-core
|
1cd1ea1c2caf6c097d2cd6d258f0026dbf679725
|
a1d54be2cf009dd57953c9ed613da48cdfc01779
|
refs/heads/master
| 2021-07-09T15:31:19.785525
| 2017-08-22T10:34:50
| 2017-08-22T10:59:02
| 101,847,137
| 1
| 0
| null | 2017-08-30T06:43:46
| 2017-08-30T06:43:46
| null |
UTF-8
|
Java
| false
| false
| 6,043
|
java
|
/*
Copyright 2014-2016 Intel Corporation
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 apple.intents;
import apple.NSObject;
import apple.foundation.NSArray;
import apple.foundation.NSMethodSignature;
import apple.foundation.NSSet;
import org.moe.natj.c.ann.FunctionPtr;
import org.moe.natj.general.NatJ;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.Library;
import org.moe.natj.general.ann.Mapped;
import org.moe.natj.general.ann.MappedReturn;
import org.moe.natj.general.ann.NInt;
import org.moe.natj.general.ann.NUInt;
import org.moe.natj.general.ann.Owned;
import org.moe.natj.general.ann.Runtime;
import org.moe.natj.general.ptr.VoidPtr;
import org.moe.natj.objc.Class;
import org.moe.natj.objc.ObjCRuntime;
import org.moe.natj.objc.SEL;
import org.moe.natj.objc.ann.ObjCClassBinding;
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.map.ObjCObjectMapper;
@Generated
@Library("Intents")
@Runtime(ObjCRuntime.class)
@ObjCClassBinding
public class INSpeakableStringResolutionResult extends INIntentResolutionResult {
static {
NatJ.register();
}
@Generated
protected INSpeakableStringResolutionResult(Pointer peer) {
super(peer);
}
@Generated
@Selector("accessInstanceVariablesDirectly")
public static native boolean accessInstanceVariablesDirectly();
@Generated
@Owned
@Selector("alloc")
public static native INSpeakableStringResolutionResult alloc();
@Generated
@Selector("allocWithZone:")
@MappedReturn(ObjCObjectMapper.class)
public static native Object allocWithZone(VoidPtr zone);
@Generated
@Selector("automaticallyNotifiesObserversForKey:")
public static native boolean automaticallyNotifiesObserversForKey(String key);
@Generated
@Selector("cancelPreviousPerformRequestsWithTarget:")
public static native void cancelPreviousPerformRequestsWithTarget(@Mapped(ObjCObjectMapper.class) Object aTarget);
@Generated
@Selector("cancelPreviousPerformRequestsWithTarget:selector:object:")
public static native void cancelPreviousPerformRequestsWithTargetSelectorObject(
@Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector,
@Mapped(ObjCObjectMapper.class) Object anArgument);
@Generated
@Selector("classFallbacksForKeyedArchiver")
public static native NSArray<String> classFallbacksForKeyedArchiver();
@Generated
@Selector("classForKeyedUnarchiver")
public static native Class classForKeyedUnarchiver();
@Generated
@Selector("confirmationRequiredWithStringToConfirm:")
@MappedReturn(ObjCObjectMapper.class)
public static native Object confirmationRequiredWithStringToConfirm(INSpeakableString stringToConfirm);
@Generated
@Selector("debugDescription")
public static native String debugDescription_static();
@Generated
@Selector("description")
public static native String description_static();
@Generated
@Selector("disambiguationWithStringsToDisambiguate:")
@MappedReturn(ObjCObjectMapper.class)
public static native Object disambiguationWithStringsToDisambiguate(
NSArray<? extends INSpeakableString> stringsToDisambiguate);
@Generated
@Selector("hash")
@NUInt
public static native long hash_static();
@Generated
@Selector("instanceMethodForSelector:")
@FunctionPtr(name = "call_instanceMethodForSelector_ret")
public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(SEL aSelector);
@Generated
@Selector("instanceMethodSignatureForSelector:")
public static native NSMethodSignature instanceMethodSignatureForSelector(SEL aSelector);
@Generated
@Selector("instancesRespondToSelector:")
public static native boolean instancesRespondToSelector(SEL aSelector);
@Generated
@Selector("isSubclassOfClass:")
public static native boolean isSubclassOfClass(Class aClass);
@Generated
@Selector("keyPathsForValuesAffectingValueForKey:")
public static native NSSet<String> keyPathsForValuesAffectingValueForKey(String key);
@Generated
@Selector("needsValue")
@MappedReturn(ObjCObjectMapper.class)
public static native Object needsValue();
@Generated
@Owned
@Selector("new")
@MappedReturn(ObjCObjectMapper.class)
public static native Object new_objc();
@Generated
@Selector("notRequired")
@MappedReturn(ObjCObjectMapper.class)
public static native Object notRequired();
@Generated
@Selector("resolveClassMethod:")
public static native boolean resolveClassMethod(SEL sel);
@Generated
@Selector("resolveInstanceMethod:")
public static native boolean resolveInstanceMethod(SEL sel);
@Generated
@Selector("setVersion:")
public static native void setVersion_static(@NInt long aVersion);
@Generated
@Selector("successWithResolvedString:")
@MappedReturn(ObjCObjectMapper.class)
public static native Object successWithResolvedString(INSpeakableString resolvedString);
@Generated
@Selector("superclass")
public static native Class superclass_static();
@Generated
@Selector("unsupported")
@MappedReturn(ObjCObjectMapper.class)
public static native Object unsupported();
@Generated
@Selector("version")
@NInt
public static native long version_static();
@Generated
@Selector("init")
public native INSpeakableStringResolutionResult init();
}
|
[
"kristof.liliom@migeran.com"
] |
kristof.liliom@migeran.com
|
8ce785b9691e609e7b1c411dd494620356e608b7
|
bc8e436ad945cc075b9d47869e82529d972969b6
|
/ca-api/src/main/java/org/xipki/ca/api/NameId.java
|
22beaaa25479475324cba30e6d823140f2eed035
|
[
"Apache-2.0"
] |
permissive
|
etsangsplk/xipki
|
283ac407756c2856a91e01787db271f8a92bb4b0
|
230365bf7e5686b83a186e2bebcef49c08b55887
|
refs/heads/master
| 2020-03-18T13:16:57.382344
| 2018-05-24T05:19:10
| 2018-05-24T05:19:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,948
|
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.api;
import org.xipki.common.util.CompareUtil;
import org.xipki.common.util.ParamUtil;
import org.xipki.common.util.StringUtil;
/**
* TODO.
* @author Lijun Liao
* @since 2.2.0
*/
public class NameId {
private Integer id;
private final String name;
public NameId(Integer id, String name) {
this.id = id;
this.name = ParamUtil.requireNonBlankLower("name", name);
}
public void setId(Integer id) {
this.id = id;
}
public Integer getId() {
return id;
}
public String getName() {
return name;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof NameId)) {
return false;
}
NameId other = (NameId) obj;
return CompareUtil.equalsObject(id, other.id) && name.equals(other.name);
}
public boolean equals(NameId obj, boolean ignoreId) {
if (obj == null) {
return false;
}
if (!name.equals(obj.name)) {
return false;
}
return ignoreId ? true : CompareUtil.equalsObject(id, obj.id);
}
@Override
public int hashCode() {
int ret = name.hashCode();
if (id != null) {
ret += 37 * id;
}
return ret;
}
@Override
public String toString() {
return StringUtil.concatObjects("(id=", id, ", name=", name, ")");
}
}
|
[
"lijun.liao@gmail.com"
] |
lijun.liao@gmail.com
|
943599c041c01827df8ed69e3475639cbb0ebefa
|
f13095d4b60e2a78878b27000177c145df29ee11
|
/app/src/main/java/com/sfs/zbar/net/RequestManager.java
|
b9f469ab2aedd1d5b87c9b55f6d34d564149471b
|
[] |
no_license
|
ChinaAndroidMaster/ZbarSample
|
70e7b9fb73bd384c0eb12a087142351ce654637e
|
53bbfe26cc201230f585957529aa4dcd61bfbf97
|
refs/heads/master
| 2021-10-02T05:39:49.499527
| 2018-11-29T10:38:18
| 2018-11-29T10:38:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,322
|
java
|
package com.sfs.zbar.net;
import android.content.Context;
import android.util.Log;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.sfs.zbar.MyApplication;
import com.sfs.zbar.net.volley.DefaultRetryPolicy;
import com.sfs.zbar.net.volley.Request;
import com.sfs.zbar.net.volley.Request.Method;
import com.sfs.zbar.net.volley.RequestQueue;
import com.sfs.zbar.net.volley.Response.ErrorListener;
import com.sfs.zbar.net.volley.Response.Listener;
import com.sfs.zbar.net.volley.RetryPolicy;
import com.sfs.zbar.net.volley.TimeoutError;
import com.sfs.zbar.net.volley.VolleyError;
import com.sfs.zbar.net.volley.tollbox.Volley;
import com.sfs.zbar.tools.Logg;
import java.util.Iterator;
import java.util.Map.Entry;
class RequestManager {
private static RequestQueue mQueue;
private RequestManager() {
}
public static void initVolley(Context ctx) {
mQueue = Volley.newRequestQueue(ctx);
}
static void addReqest(Request<?> request, Object tag) {
if (tag != null)
request.setTag(tag);
//下面的代码防止volley自动请求第2次
request.setRetryPolicy(new DefaultRetryPolicy(50000,DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
mQueue.add(request);
}
public static RequestQueue getQueue() {
return mQueue;
}
private static String addGetCommonParams(StringBuilder urlSb) {
// urlSb.append("&").append("sign=").append(getApkSign());
Log.i("sasasasa", "-sa-"+urlSb.toString());
return urlSb.toString();
}
private static void addJsonToUrl(StringBuilder urlSb, JsonObject JSONObject) {
if (JSONObject != null) {
Iterator<Entry<String, JsonElement>> keys = JSONObject.entrySet()
.iterator();
while (keys.hasNext()) {
String name = keys.next().getKey();
urlSb.append(name.replaceAll(" ", ""))
.append("=")
.append(JSONObject.get(name).toString()
.replaceAll("\"", "")/* 处理掉双引号,否则会得到错误数据 */)
.append("&");
}
urlSb.delete(urlSb.length() - 1, urlSb.length());
}
}
public static <T> void put(String cmd, String param,
final IVolleyResponse<T> l, Class<T> clazz, Object tag) {
StringBuilder urlSb = new StringBuilder(Urls.URL_HOST).append(cmd);
Log.i("asasasasas", "--urlSb--"+urlSb);
addPutRequest(urlSb, param, l, clazz, tag, null);
}
private static void addGetParams(StringBuilder urlSb, String cmd,
JsonObject jsonP) {
urlSb.append(cmd).append("?");
addGetCommonParams(urlSb);
addJsonToUrl(urlSb, jsonP);
}
public static <T> void post(String cmd, String param,
final IVolleyResponse<T> l, Class<T> clazz, Object tag) {
StringBuilder urlSb = new StringBuilder(Urls.URL_HOST);
urlSb.append(cmd);
addPostRequest(urlSb, param, l, clazz, tag, null);
}
public static <T> void post2(String cmd, JsonObject param,
final IVolleyResponse<T> l, Class<T> clazz, Object tag) {
StringBuilder urlSb = new StringBuilder(Urls.URL_HOST);
urlSb.append(cmd);
addJsonToUrl(urlSb, param);
addPostRequest(urlSb, null, l, clazz, tag, null);
}
public static <T> void postRetryPolicy(String cmd, String param,
final IVolleyResponse<T> l, Class<T> clazz, Object tag,
RetryPolicy retryPolicy) {
StringBuilder urlSb = new StringBuilder(Urls.URL_HOST);
urlSb.append(cmd);
addPostRequest(urlSb, param, l, clazz, tag, retryPolicy);
}
public static <T> void postPay(String cmd, String param,
final IVolleyResponse<T> l, Class<T> clazz, Object tag) {
StringBuilder urlSb = new StringBuilder("");
urlSb.append(cmd);
addPutRequest(urlSb, param, l, clazz, tag, null);
}
private static <T> void addPostRequest(Object urlSb, String param,
final IVolleyResponse<T> l, Class<T> clazz, Object tag,
RetryPolicy retryPolicy) {
VolleyRequest<T> request = new VolleyRequest<T>(Method.POST,
urlSb.toString(), param, new Listener<T>() {
public void onResponse(T response) {
l.onResponse(response);
}
}, new ErrorListener() {
public void onErrorResponse(VolleyError error) {
String msg = "";
if (error instanceof TimeoutError) {
msg = MyApplication.netWorkTimeOut;
} else if (error != null && error.getMessage() != null) {
msg = error.getMessage();
} else
msg = MyApplication.netWorkError;
Logg.v("url = error msg" + msg);
l.onErrorListener(error);
}
}, clazz);
if (retryPolicy != null)
request.setRetryPolicy(retryPolicy);
addReqest(request, tag);
}
private static <T> void addPutRequest(Object urlSb, String param,
final IVolleyResponse<T> l, Class<T> clazz, Object tag,
RetryPolicy retryPolicy) {
VolleyRequest<T> request = new VolleyRequest<T>(Method.PUT,
urlSb.toString(), param, new Listener<T>() {
public void onResponse(T response) {
l.onResponse(response);
}
}, new ErrorListener() {
public void onErrorResponse(VolleyError error) {
String msg = "";
if (error instanceof TimeoutError) {
msg = MyApplication.netWorkTimeOut;
} else if (error != null && error.getMessage() != null) {
msg = error.getMessage();
} else
msg = MyApplication.netWorkError;
Logg.v("url = error msg" + msg);
l.onErrorListener(error);
}
}, clazz);
if (retryPolicy != null)
request.setRetryPolicy(retryPolicy);
addReqest(request, tag);
}
public static <T> void get(String cmd, JsonObject jsonP,
final IVolleyResponse<T> l, Class<T> clazz, Object tag) {
StringBuilder urlSb = new StringBuilder(Urls.URL_HOST);
Log.i("sasasasa", "-sa--"+urlSb);
addGetParams(urlSb, cmd, jsonP);
addReqest(new VolleyRequest<T>(Method.GET, urlSb.toString(), null,
new Listener<T>() {
public void onResponse(T response) {
l.onResponse(response);
}
}, new ErrorListener() {
public void onErrorResponse(VolleyError error) {
String msg = "";
if (error instanceof TimeoutError) {
msg = MyApplication.netWorkTimeOut;
} else if (error != null && error.getMessage() != null) {
msg = error.getMessage();
} else
msg = MyApplication.netWorkError;
Logg.v("url = error msg" + msg);
l.onErrorListener(error);
}
}, clazz), tag);
}
public static <T> void getPay(String cmd, JsonObject jsonP,
final IVolleyResponse<T> l, Class<T> clazz, Object tag) {
StringBuilder urlSb = new StringBuilder("");
addGetParams(urlSb, cmd, jsonP);
addReqest(new VolleyRequest<T>(Method.GET, urlSb.toString(), null,
new Listener<T>() {
public void onResponse(T response) {
l.onResponse(response);
}
}, new ErrorListener() {
public void onErrorResponse(VolleyError error) {
String msg = "";
if (error instanceof TimeoutError) {
msg = MyApplication.netWorkTimeOut;
} else if (error != null && error.getMessage() != null) {
msg = error.getMessage();
} else
msg = MyApplication.netWorkError;
Logg.v("url = error msg" + msg);
l.onErrorListener(error);
}
}, clazz), tag);
}
}
|
[
"sjy0118atsn@163.com"
] |
sjy0118atsn@163.com
|
d9c27cf5e77ae5b3d1a3f9812b977bd9bf229f5f
|
6dc23397533f60c21dba6710ecc7a1da5c6b4388
|
/app/src/main/java/com/example/explore/Model/Southwest.java
|
31e9b997f2bc7348d5489a0ad2abe2f92d30b118
|
[] |
no_license
|
andreeabezman/explore
|
4154291ded3c15966a9e188d09bd5ec27f50c190
|
b3c607ac81d197f61e344fdd915a31f3db45ab53
|
refs/heads/master
| 2020-08-05T17:56:23.832859
| 2019-10-04T04:03:15
| 2019-10-04T04:03:15
| 212,644,190
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 495
|
java
|
package com.example.explore.Model;
public class Southwest {
private String lng;
private String lat;
public String getLng ()
{
return lng;
}
public void setLng (String lng)
{
this.lng = lng;
}
public String getLat ()
{
return lat;
}
public void setLat (String lat)
{
this.lat = lat;
}
@Override
public String toString()
{
return "ClassPojo [lng = "+lng+", lat = "+lat+"]";
}
}
|
[
"user.email"
] |
user.email
|
6be646a0217747ab949066f3c23660aca938b0c2
|
7ef423a91df3638d44e933e493ddb216c19df846
|
/_src/ApacheCXFBook/Chapter5/Invoker/src/demo/order/client/OrderProcessClientHandler.java
|
ad210ff688b074514a58abe6691b37ea84a4e610
|
[
"Apache-2.0"
] |
permissive
|
paullewallencom/apache-cfx-978-1-8471-9540-1
|
2806db7b3efd03ef7fa8c6407edab5a976bde30a
|
bf61d2d9c5ad4798e8a878934f3bcc1dfec142d5
|
refs/heads/main
| 2023-02-04T17:30:09.653872
| 2020-12-27T18:43:17
| 2020-12-27T18:43:17
| 319,186,854
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,099
|
java
|
package demo.order.client;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.cxf.binding.soap.SoapMessage;
import org.apache.cxf.binding.soap.interceptor.AbstractSoapInterceptor;
import org.apache.cxf.binding.soap.interceptor.SoapPreProtocolOutInterceptor;
import org.apache.cxf.headers.Header;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.phase.Phase;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class OrderProcessClientHandler extends AbstractSoapInterceptor {
public String userName;
public String password;;
public OrderProcessClientHandler() {
super(Phase.WRITE);
addAfter(SoapPreProtocolOutInterceptor.class.getName());
}
public void handleMessage(SoapMessage message) throws Fault {
System.out.println("OrderProcessClientHandler handleMessage invoked");
DocumentBuilder builder = null;
try {
builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
} catch (ParserConfigurationException e) {
e.printStackTrace();
throw new Fault(e);
}
Document doc = builder.newDocument();
Element credentialsel = doc.createElement("OrderCredentials");
Element unameel = doc.createElement("username");
unameel.setTextContent(getUserName());
Element pwdel = doc.createElement("password");
pwdel.setTextContent(getPassword());
credentialsel.appendChild(unameel);
credentialsel.appendChild(pwdel);
//Create Header object
QName orderqname = new QName("OrderCredentials");
Header header = new Header(orderqname,credentialsel);
message.getHeaders().add(header);
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
|
[
"paullewallencom@users.noreply.github.com"
] |
paullewallencom@users.noreply.github.com
|
f7735a92aaa70756b007439c4a42c1a661907707
|
166272ba153a4fe4962dfb48f2856b516e97efe1
|
/src/test/org/learnwithllew/courseware/recipes/quizzes/tests/SimpleSquareQuizTest.java
|
f8ff048819e0d66818905ffb38a087e21eb11c33
|
[] |
no_license
|
LearnWithLlew/IntroToJava.sources
|
473107108fdc31d19c574246bc1b9cd8034920db
|
17277f2239754fe12fcb10381bc05b63f484f91c
|
refs/heads/master
| 2023-08-04T19:06:41.361366
| 2023-07-31T03:53:32
| 2023-07-31T03:53:32
| 40,963,960
| 0
| 0
| null | 2022-05-20T21:55:29
| 2015-08-18T09:47:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,402
|
java
|
package org.learnwithllew.courseware.recipes.quizzes.tests;
import junit.framework.TestCase;
import org.approvaltests.reporters.ClipboardReporter;
import org.approvaltests.reporters.DelayedClipboardReporter;
import org.approvaltests.reporters.DiffReporter;
import org.approvaltests.reporters.UseReporter;
import org.learnwithllew.teachingextensions.logo.Colors;
import org.learnwithllew.teachingextensions.logo.Tortoise;
import org.learnwithllew.teachingextensions.logo.Turtle;
import org.learnwithllew.teachingextensions.logo.utils.TortoiseUtils;
import org.learnwithllew.courseware.recipes.quizzes.graders.SimpleSquareQuizGrader;
import org.learnwithllew.courseware.recipes.quizzes.graders.SquareQuiz;
public class SimpleSquareQuizTest extends TestCase
{
public static class SimpleSquareCorrectQuiz implements SquareQuiz
{
public void question1()
{
// Move the tortoise 110 pixels
Tortoise.move(110);
}
public void question2()
{
// Turn the tortoise 1/5 of 360 degrees to the right
Tortoise.turn(360 / 5);
}
public void question3()
{
// Change the color the tortoise draws to yellow
Tortoise.setPenColor(Colors.Yellows.Yellow);
}
public void question4()
{
// Change the width of the line the tortoise draws to 5 pixels
Tortoise.setPenWidth(5);
}
}
public void testCorrect() throws Exception
{
SimpleSquareQuizGrader.TURTLE_SPEED = Turtle.TEST_SPEED;
new SimpleSquareQuizGrader().grade(new SimpleSquareCorrectQuiz());
TortoiseUtils.verifyForOs();
}
public static class SimpleSquareIncorrectQuiz implements SquareQuiz
{
public void question1()
{
// Move the tortoise 110 pixels
Tortoise.move(75);
}
public void question2()
{
// Turn the tortoise 1/5 of 360 degrees to the right
Tortoise.turn(360.0 / 6);
}
public void question3()
{
// Change the color the tortoise draws to yellow
Tortoise.setPenColor(Colors.Yellows.Gold);
}
public void question4()
{
// Change the width of the line the tortoise draws to 5 pixels
Tortoise.setPenWidth(9);
}
}
public void testIncorrect() throws Exception
{
SimpleSquareQuizGrader.TURTLE_SPEED = Turtle.TEST_SPEED;
new SimpleSquareQuizGrader().grade(new SimpleSquareIncorrectQuiz());
TortoiseUtils.verifyForOs();
}
}
|
[
"isidore@setgame.com"
] |
isidore@setgame.com
|
895963dd9222373f46507941b83cd48eda821a47
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/repairnator/learning/5036/ProjectInspector4Checkstyle.java
|
0506a69444728cbf8a4cd45c1b598446b4519d85
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,623
|
java
|
package fr.inria.spirals.repairnator.process.inspectors;
import fr.inria.spirals.repairnator.BuildToBeInspected;
import fr.inria.spirals.repairnator.process.step.paths.ComputePlugins;
import fr.inria.spirals.repairnator.process.step.paths.ComputeSourceDir;
import fr.inria.spirals.repairnator.process.step.push.*;
import fr.inria.spirals.repairnator.notifier.AbstractNotifier;
import fr.inria.spirals.repairnator.process.step.*;
import fr.inria.spirals.repairnator.process.step.checkoutrepository.CheckoutBuggyBuild;
import fr.inria.spirals.repairnator.serializer.AbstractDataSerializer;
import fr.inria.spirals.repairnator.states.ScannedBuildStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
/**
* Created by bloriot97.
*/
public class ProjectInspector4Checkstyle extends ProjectInspector {
private final Logger logger
= LoggerFactory.getLogger(ProjectInspector4Bears.class);
public ProjectInspector4Checkstyle(BuildToBeInspected buildToBeInspected, String workspace, List<AbstractDataSerializer> serializers, List<AbstractNotifier> notifiers) {
super(buildToBeInspected, workspace, serializers, notifiers);
}
protected void initProperties() {
this.getJobStatus().getProperties().setVersion("Checkstyle 0.1");
super.initProperties();
}
public void run() {
if (this.getBuildToBeInspected().getStatus() != ScannedBuildStatus.PASSING_AND_PASSING_WITH_TEST_CHANGES) {
AbstractStep cloneRepo = new CloneRepository(this);
cloneRepo
.addNextStep(new CheckoutBuggyBuild(this, true))
.addNextStep(new BuildProject(this))
.addNextStep(new ComputePlugins(this, false))
.addNextStep(new Checkstyle(this));
super.setFinalStep(new ComputeSourceDir(this, false, true));
super.getFinalStep().
addNextStep(new WritePropertyFile(this)).
addNextStep(new CommitProcessEnd(this)).
addNextStep(new PushProcessEnd(this));
cloneRepo.setDataSerializer(this.getSerializers());
cloneRepo.setNotifiers(this.getNotifiers());
this.printPipeline();
try {
cloneRepo.execute();
} catch (Exception e) {
this.getJobStatus().addStepError("Unknown", e.getMessage());
this.logger.error("Exception catch while executing steps: ", e);
}
} else {
this.logger.debug("Build " + this.getBuggyBuild().getId() + " is not a failing build.");
}
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
d3c96d3d8fe83d12af46078e35e8f7323997a234
|
5ed0ce6a5bf847ab1bcc99cb9b005e5bd1334067
|
/src/org/codehaus/jackson/jaxrs/MapperConfigurator.java
|
26ba68cdfe95bac1c2029403588a006b288c814a
|
[] |
no_license
|
nikitakoselev/Alpha2Sdk
|
10b0b83cba67d19d49191caa73e67c9f899664ad
|
ed2efdb5db0ea3a9271c9ebd351bf789b6ba0d37
|
refs/heads/master
| 2023-04-10T22:19:30.954805
| 2021-04-20T20:59:34
| 2021-04-20T20:59:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,263
|
java
|
package org.codehaus.jackson.jaxrs;
import java.util.ArrayList;
import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.map.AnnotationIntrospector;
import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector;
import org.codehaus.jackson.xc.JaxbAnnotationIntrospector;
public class MapperConfigurator {
protected ObjectMapper _mapper;
protected ObjectMapper _defaultMapper;
protected Annotations[] _defaultAnnotationsToUse;
protected Class<? extends AnnotationIntrospector> _jaxbIntrospectorClass;
public MapperConfigurator(ObjectMapper mapper, Annotations[] defAnnotations) {
this._mapper = mapper;
this._defaultAnnotationsToUse = defAnnotations;
}
public synchronized ObjectMapper getConfiguredMapper() {
return this._mapper;
}
public synchronized ObjectMapper getDefaultMapper() {
if (this._defaultMapper == null) {
this._defaultMapper = new ObjectMapper();
this._setAnnotations(this._defaultMapper, this._defaultAnnotationsToUse);
}
return this._defaultMapper;
}
public synchronized void setMapper(ObjectMapper m) {
this._mapper = m;
}
public synchronized void setAnnotationsToUse(Annotations[] annotationsToUse) {
this._setAnnotations(this.mapper(), annotationsToUse);
}
public synchronized void configure(DeserializationConfig.Feature f, boolean state) {
this.mapper().configure(f, state);
}
public synchronized void configure(SerializationConfig.Feature f, boolean state) {
this.mapper().configure(f, state);
}
public synchronized void configure(JsonParser.Feature f, boolean state) {
this.mapper().configure(f, state);
}
public synchronized void configure(JsonGenerator.Feature f, boolean state) {
this.mapper().configure(f, state);
}
protected ObjectMapper mapper() {
if (this._mapper == null) {
this._mapper = new ObjectMapper();
this._setAnnotations(this._mapper, this._defaultAnnotationsToUse);
}
return this._mapper;
}
protected void _setAnnotations(ObjectMapper mapper, Annotations[] annotationsToUse) {
AnnotationIntrospector intr;
if (annotationsToUse != null && annotationsToUse.length != 0) {
intr = this._resolveIntrospectors(annotationsToUse);
} else {
intr = AnnotationIntrospector.nopInstance();
}
mapper.getDeserializationConfig().setAnnotationIntrospector(intr);
mapper.getSerializationConfig().setAnnotationIntrospector(intr);
}
protected AnnotationIntrospector _resolveIntrospectors(Annotations[] annotationsToUse) {
ArrayList<AnnotationIntrospector> intr = new ArrayList();
Annotations[] arr$ = annotationsToUse;
int len$ = annotationsToUse.length;
int i;
for(i = 0; i < len$; ++i) {
Annotations a = arr$[i];
if (a != null) {
intr.add(this._resolveIntrospector(a));
}
}
int count = intr.size();
if (count == 0) {
return AnnotationIntrospector.nopInstance();
} else {
AnnotationIntrospector curr = (AnnotationIntrospector)intr.get(0);
i = 1;
for(int len = intr.size(); i < len; ++i) {
curr = AnnotationIntrospector.pair(curr, (AnnotationIntrospector)intr.get(i));
}
return curr;
}
}
protected AnnotationIntrospector _resolveIntrospector(Annotations ann) {
switch(ann) {
case JACKSON:
return new JacksonAnnotationIntrospector();
case JAXB:
try {
if (this._jaxbIntrospectorClass == null) {
this._jaxbIntrospectorClass = JaxbAnnotationIntrospector.class;
}
return (AnnotationIntrospector)this._jaxbIntrospectorClass.newInstance();
} catch (Exception var3) {
throw new IllegalStateException("Failed to instantiate JaxbAnnotationIntrospector: " + var3.getMessage(), var3);
}
default:
throw new IllegalStateException();
}
}
}
|
[
"dave@davesnowdon.com"
] |
dave@davesnowdon.com
|
e81cde945ef9860f6cf9e65f80104c02a37ffde0
|
129f58086770fc74c171e9c1edfd63b4257210f3
|
/src/testcases/CWE191_Integer_Underflow/CWE191_Integer_Underflow__int_getCookies_Servlet_multiply_67b.java
|
b3a8c18bc9b1b7566917f3ffe1847b2244ab362e
|
[] |
no_license
|
glopezGitHub/Android23
|
1bd0b6a6c7ce3c7439a74f1e4dcef2c4c0fac4ba
|
6215d0684c4fbdc7217ccfbedfccfca69824cc5e
|
refs/heads/master
| 2023-03-07T15:14:59.447795
| 2023-02-06T13:59:49
| 2023-02-06T13:59:49
| 6,856,387
| 0
| 3
| null | 2023-02-06T18:38:17
| 2012-11-25T22:04:23
|
Java
|
UTF-8
|
Java
| false
| false
| 2,747
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__int_getCookies_Servlet_multiply_67b.java
Label Definition File: CWE191_Integer_Underflow__int.label.xml
Template File: sources-sinks-67b.tmpl.java
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: getCookies_Servlet Read data from the first cookie using getCookies()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: multiply
* GoodSink: Ensure there will not be an underflow before multiplying data by 2
* BadSink : If data is negative, multiply by 2, which can cause an underflow
* Flow Variant: 67 Data flow: data passed in a class from one method to another in different source files in the same package
*
* */
package testcases.CWE191_Integer_Underflow;
import testcasesupport.*;
import java.sql.*;
import javax.servlet.http.*;
public class CWE191_Integer_Underflow__int_getCookies_Servlet_multiply_67b
{
public void bad_sink(CWE191_Integer_Underflow__int_getCookies_Servlet_multiply_67a.Container data_container , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data = data_container.a;
if(data < 0) /* ensure we won't have an overflow */
{
/* POTENTIAL FLAW: if (data * 2) < Integer.MIN_VALUE, this will underflow */
int result = (int)(data * 2);
IO.writeLine("result: " + result);
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2B_sink(CWE191_Integer_Underflow__int_getCookies_Servlet_multiply_67a.Container data_container , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data = data_container.a;
if(data < 0) /* ensure we won't have an overflow */
{
/* POTENTIAL FLAW: if (data * 2) < Integer.MIN_VALUE, this will underflow */
int result = (int)(data * 2);
IO.writeLine("result: " + result);
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2G_sink(CWE191_Integer_Underflow__int_getCookies_Servlet_multiply_67a.Container data_container , HttpServletRequest request, HttpServletResponse response) throws Throwable
{
int data = data_container.a;
if(data < 0) /* ensure we won't have an overflow */
{
/* FIX: Add a check to prevent an underflow from occurring */
if (data > (Integer.MIN_VALUE/2))
{
int result = (int)(data * 2);
IO.writeLine("result: " + result);
}
else
{
IO.writeLine("data value is too small to perform multiplication.");
}
}
}
}
|
[
"guillermo.pando@gmail.com"
] |
guillermo.pando@gmail.com
|
191cbe7495b856bebb43fc61f154b8712e83093a
|
6253283b67c01a0d7395e38aeeea65e06f62504b
|
/decompile/app/Gallery2/src/main/java/com/android/gallery3d/ui/SharedItemAdapter.java
|
ef88328e365a596962588bc6000ffaa1da3495f4
|
[] |
no_license
|
sufadi/decompile-hw
|
2e0457a0a7ade103908a6a41757923a791248215
|
4c3efd95f3e997b44dd4ceec506de6164192eca3
|
refs/heads/master
| 2023-03-15T15:56:03.968086
| 2017-11-08T03:29:10
| 2017-11-08T03:29:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,677
|
java
|
package com.android.gallery3d.ui;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import com.android.gallery3d.common.Utils;
import java.util.ArrayList;
import java.util.List;
public class SharedItemAdapter extends BaseAdapter {
private List<Integer> mIndexHolder = new ArrayList(2);
private ViewProvider mViewProvider;
public interface ViewProvider {
View getItemView(int i, View view, ViewGroup viewGroup);
}
public SharedItemAdapter(ViewProvider viewProvider) {
Utils.assertTrue(viewProvider != null);
this.mViewProvider = viewProvider;
}
public void clear() {
this.mIndexHolder.clear();
notifyDataSetChanged();
}
public void addIndex(int index) {
this.mIndexHolder.add(Integer.valueOf(index));
notifyDataSetChanged();
}
public int getCount() {
return this.mIndexHolder.size();
}
public Object getItem(int position) {
return this.mIndexHolder.get(position);
}
public long getItemId(int position) {
return (long) position;
}
public int getItemViewType(int position) {
return 0;
}
public View getView(int position, View convertView, ViewGroup parent) {
if (position > this.mIndexHolder.size()) {
return null;
}
return this.mViewProvider.getItemView(((Integer) this.mIndexHolder.get(position)).intValue(), convertView, parent);
}
public int getViewTypeCount() {
return 1;
}
public boolean hasStableIds() {
return false;
}
public boolean isEmpty() {
return false;
}
}
|
[
"liming@droi.com"
] |
liming@droi.com
|
3c59f10fbceab474cadf3ba962249cbeb061e146
|
88f997d8bb36917a4dcbde5e2dea99d4f6ab6563
|
/workspace/okwei-basic/src/main/java/com/okwei/bean/enums/agent/AgentSupplierType.java
|
5e1c7512153f1113a5d29d2b960f9d348d164856
|
[] |
no_license
|
cenbow/wd
|
f68843fec0da31487ce9f8928383d9979a643185
|
c32f30107cf44dff45027447c0b6f29fc35e571f
|
refs/heads/master
| 2021-01-21T17:23:37.337895
| 2016-12-01T06:57:59
| 2016-12-01T06:57:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 515
|
java
|
package com.okwei.bean.enums.agent;
/**
* 供应商类型
* @author Administrator
*
*/
public enum AgentSupplierType {
/**
* 联合分销号
*/
union(1),
/**
* 独立分销号
*/
independence(2);
private final int Type;
private AgentSupplierType(int step)
{
this.Type = step;
}
public String toString()
{
return String.valueOf(this.Type);
}
public int toInt()
{
return this.Type;
}
}
|
[
"okmen.zy@foxmail.com"
] |
okmen.zy@foxmail.com
|
6d645eb674cf448b20fbb54e8bb6f4be73ce3726
|
a9c6648c8b69473566a2af60b4783ef9a974b4d6
|
/hk-kafka-example/hk-kafka-producer/src/main/java/com/hk/kafka/producer/example/TransactionProducer.java
|
438976e5f04ae2b4641f135b1a6cc1c2d1ae2cee
|
[] |
no_license
|
huankai/hk-examples
|
6bba158a050b740aed5b2403f71f672110344e42
|
bf8e9abe7c9c30d8916458b6cf5b15ba929c865c
|
refs/heads/master
| 2022-10-18T20:40:55.928956
| 2020-04-01T15:33:41
| 2020-04-01T15:33:41
| 114,425,813
| 5
| 1
| null | 2022-10-05T00:02:20
| 2017-12-16T01:54:39
|
Java
|
UTF-8
|
Java
| false
| false
| 2,289
|
java
|
package com.hk.kafka.producer.example;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.producer.KafkaProducer;
import org.apache.kafka.clients.producer.ProducerConfig;
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.serialization.StringSerializer;
import java.util.Properties;
/**
* @author sjq-278
* @date 2018-11-19 16:36
*/
@Slf4j
public class TransactionProducer {
public static void main(String[] args) {
Properties props = new Properties();
props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "sjq-01:9092,sjq-02:9092,sjq-03:9092");
props.put(ProducerConfig.ACKS_CONFIG, "all");//等待分区的所有副本应答,才表示此消息发送成功
props.put(ProducerConfig.RETRIES_CONFIG, 5); // 生产者从服务器收到临时性错误时,生产者重发消息的次数
props.put(ProducerConfig.BATCH_SIZE_CONFIG, 16384);// 一批消息处理大小
props.put(ProducerConfig.LINGER_MS_CONFIG, 1); // 请求延时
props.put(ProducerConfig.BUFFER_MEMORY_CONFIG, 33554432); // 发送缓存区内存大小
props.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName()); // key序列化
props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName()); // value序列化
//设置事务id
props.put(ProducerConfig.TRANSACTIONAL_ID_CONFIG, "tran");
KafkaProducer<String, String> producer = new KafkaProducer<>(props);
//初始化事务
producer.initTransactions();
// 开始事务
producer.beginTransaction();
try {
for (int i = 0; i < 10; i++) {
Thread.sleep(500);
log.info("index = {} ...", i);
if (i == 5) {// 模拟异常
throw new RuntimeException("Error...");
}
producer.send(new ProducerRecord<>("transaction-topic", "data" + i));
}
//事务提交
producer.commitTransaction();
// producer.send
} catch (Exception e) {
//放弃事务
producer.abortTransaction();
} finally {
producer.close();
}
}
}
|
[
"huankai@139.com"
] |
huankai@139.com
|
dc375460357c9cef035af5d24efdbea386d4bc18
|
263b9556d76279459ab9942b0005a911e2b085c5
|
/src/main/java/com/alipay/api/domain/CertAuditResult.java
|
250a91b9ab8425cda5841f328b5559d5d425ffbb
|
[
"Apache-2.0"
] |
permissive
|
getsgock/alipay-sdk-java-all
|
1c98ffe7cb5601c715b4f4b956e6c2b41a067647
|
1ee16a85df59c08fb9a9b06755743711d5cd9814
|
refs/heads/master
| 2020-03-30T05:42:59.554699
| 2018-09-19T06:17:22
| 2018-09-19T06:17:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,696
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 证件宝审核结果
*
* @author auto create
* @since 1.0, 2018-04-20 09:30:36
*/
public class CertAuditResult extends AlipayObject {
private static final long serialVersionUID = 6823255929381187381L;
/**
* 官方渠道信息比对结果返回码。
0:通过,
1:参数未输入,
2:参数不合法,
3:查询不到信息,
4:参数无法验证,
5:参数不匹配,
6:服务异常
*/
@ApiField("authority_check_retcode")
private String authorityCheckRetcode;
/**
* 官方渠道信息比对结果返回信息
*/
@ApiField("authority_check_retmessage")
private String authorityCheckRetmessage;
/**
* 官方渠道信息比对结果,通过Y,不通过N,待定U
*/
@ApiField("authority_check_suggest")
private String authorityCheckSuggest;
/**
* 证件上人脸比对结果,通过Y,不通过N,待定U
*/
@ApiField("cert_face_suggest")
private String certFaceSuggest;
/**
* 合规结果,通过Y,不通过N,待定U
*/
@ApiField("compliance_suggest")
private String complianceSuggest;
/**
* ocr结果
*/
@ApiField("ocr")
private CertFields ocr;
/**
* ocr比对结果,通过Y,不通过N,待定U
*/
@ApiField("ocr_check_suggest")
private String ocrCheckSuggest;
public String getAuthorityCheckRetcode() {
return this.authorityCheckRetcode;
}
public void setAuthorityCheckRetcode(String authorityCheckRetcode) {
this.authorityCheckRetcode = authorityCheckRetcode;
}
public String getAuthorityCheckRetmessage() {
return this.authorityCheckRetmessage;
}
public void setAuthorityCheckRetmessage(String authorityCheckRetmessage) {
this.authorityCheckRetmessage = authorityCheckRetmessage;
}
public String getAuthorityCheckSuggest() {
return this.authorityCheckSuggest;
}
public void setAuthorityCheckSuggest(String authorityCheckSuggest) {
this.authorityCheckSuggest = authorityCheckSuggest;
}
public String getCertFaceSuggest() {
return this.certFaceSuggest;
}
public void setCertFaceSuggest(String certFaceSuggest) {
this.certFaceSuggest = certFaceSuggest;
}
public String getComplianceSuggest() {
return this.complianceSuggest;
}
public void setComplianceSuggest(String complianceSuggest) {
this.complianceSuggest = complianceSuggest;
}
public CertFields getOcr() {
return this.ocr;
}
public void setOcr(CertFields ocr) {
this.ocr = ocr;
}
public String getOcrCheckSuggest() {
return this.ocrCheckSuggest;
}
public void setOcrCheckSuggest(String ocrCheckSuggest) {
this.ocrCheckSuggest = ocrCheckSuggest;
}
}
|
[
"liuqun.lq@alibaba-inc.com"
] |
liuqun.lq@alibaba-inc.com
|
7a095003983b13c420b33405df276239f242844e
|
0dc9b73a0f32443c55e5edf1563c27e6ac0d0372
|
/app/src/main/java/com/android/androidaudiolearning/android_record/basic/draw/CustomImageView.java
|
578b4f499053df7e3958c55f4bc6b09a29f43b66
|
[] |
no_license
|
wangchao1994/AndroidPermission
|
c19bf042577eb6682df18a8f5605fa8e749a9005
|
287a765135076ac70ec985facd975a153bafdfd6
|
refs/heads/master
| 2022-02-12T09:50:52.329625
| 2019-08-09T06:32:36
| 2019-08-09T06:32:36
| 198,164,666
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,383
|
java
|
package com.android.androidaudiolearning.android_record.basic.draw;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.util.AttributeSet;
import android.view.View;
public class CustomImageView extends View {
private Paint mPaint;
private Bitmap mBitmap;
public CustomImageView(Context context) {
this(context,null);
}
public CustomImageView(Context context, AttributeSet attrs) {
this(context, attrs,0);
}
public CustomImageView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
private void init() {
initPaint();
}
private void initPaint() {
mPaint = new Paint();
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setFlags(Paint.ANTI_ALIAS_FLAG);
//设置抗锯齿
mPaint.setAntiAlias(true);
}
public void setBitmap(Bitmap bitmap) {
mBitmap = bitmap;
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (mBitmap == null){
return;
}
canvas.drawColor(Color.TRANSPARENT, PorterDuff.Mode.CLEAR);
canvas.drawBitmap(mBitmap,0,0,mPaint);
}
}
|
[
"wchao0829@163.com"
] |
wchao0829@163.com
|
f381cfdfc22aa0c945d22fa8a6b0916073099449
|
8823c96d433605e7c13679b027a697e6a647cf9c
|
/src/main/java/com/lzhlyle/leetcode/week/no70/ClimbStairs_DP_Adv.java
|
278d8fb38464b27c44a50d01f011b6f89fd39183
|
[
"MIT"
] |
permissive
|
lzhlyle/leetcode
|
62278bf6e949f802da335e8de2d420440f578c2f
|
8f053128ed7917c231fd24cfe82552d9c599dc16
|
refs/heads/master
| 2022-07-14T02:28:11.082595
| 2020-11-16T14:28:20
| 2020-11-16T14:28:20
| 215,598,819
| 2
| 0
|
MIT
| 2022-06-17T02:55:41
| 2019-10-16T16:52:05
|
Java
|
UTF-8
|
Java
| false
| false
| 316
|
java
|
package com.lzhlyle.leetcode.week.no70;
public class ClimbStairs_DP_Adv {
public int climbStairs(int n) {
if (n < 0) return 0;
if (n < 3) return n;
int a = 1, b = 2;
for (int i = 3; i <= n; i++) {
b = b + a;
a = b - a;
}
return b;
}
}
|
[
"lzhlyle@msn.cn"
] |
lzhlyle@msn.cn
|
4f7d4854d5465d051327b9d527aa44aae42eb581
|
e9fcc52371d9c94d30fcdb5f850c3623a29d73e8
|
/mailbox_dao/java/src/main/java/xueqiao/mailbox/dao/controller/base/IController.java
|
24befd816baf2313d05b3d69f54a5f603c1fbc7e
|
[] |
no_license
|
xueqiao-codes/xueqiao-portal
|
ebbcffc2b4226224d0265c9f498167567c7f83a9
|
dcef080c22f51fa827d29be88a2dd2dd604c56b3
|
refs/heads/main
| 2023-04-15T21:09:35.417625
| 2021-04-25T12:48:06
| 2021-04-25T12:48:06
| 361,424,886
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 185
|
java
|
package xueqiao.mailbox.dao.controller.base;
import org.soldier.platform.svr_platform.comm.ErrorInfo;
public interface IController {
public void checkParams() throws ErrorInfo;
}
|
[
"wangli@authine.com"
] |
wangli@authine.com
|
c971f4a12312402df062c4728f2be9afda08ebe2
|
7c2681819604180033f44a8b57214b5326f7f69e
|
/mockserver-core/src/main/java/org/mockserver/server/netty/codec/MockServerServerCodec.java
|
4f89243b984ff276e4e102301247dbdaa9ba7a40
|
[
"Apache-2.0"
] |
permissive
|
JamesLinus/mockserver
|
f6e84cde2e1ba975e83eae3a810c9b2143cdebab
|
1e4d7e98c50d7d1a5b25ff1c9fc891d7c0f14631
|
refs/heads/master
| 2021-08-23T13:02:42.205480
| 2017-12-05T00:51:44
| 2017-12-05T00:51:44
| 113,142,015
| 2
| 1
| null | 2017-12-05T06:23:51
| 2017-12-05T06:23:51
| null |
UTF-8
|
Java
| false
| false
| 405
|
java
|
package org.mockserver.server.netty.codec;
import io.netty.channel.CombinedChannelDuplexHandler;
/**
* @author jamesdbloom
*/
public class MockServerServerCodec extends CombinedChannelDuplexHandler<MockServerRequestDecoder, MockServerResponseEncoder> {
public MockServerServerCodec(boolean isSecure) {
init(new MockServerRequestDecoder(isSecure), new MockServerResponseEncoder());
}
}
|
[
"jamesdbloom@gmail.com"
] |
jamesdbloom@gmail.com
|
8d02f6e65f7ec64102ce76c0a4934d100ba7d518
|
e8f229fd13349186999b95622a8ad4e06e2b95ea
|
/src/BehavioralPattern/F_Command/b/NoCommand.java
|
dca25f15d3dd16de39ad7202417ca5412f299f52
|
[] |
no_license
|
wangchao550586585/Head-First-Design-Patterns
|
626ef15a4d1d101adf05ab442e759eb7c562403a
|
60b20ef2d3964a2cb7b6457cb234e4f9d216daa6
|
refs/heads/master
| 2022-09-28T09:35:07.302269
| 2020-06-03T05:20:41
| 2020-06-03T05:20:41
| 255,507,830
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 166
|
java
|
package BehavioralPattern.F_Command.b;
public class NoCommand implements Command {
@Override
public void execute() {
}
@Override
public void undo() {
}
}
|
[
"550586585@qq.com"
] |
550586585@qq.com
|
8edc9e500d0616ddd45cfdce83c4c379c08f0cb1
|
db3bc52adee14f4b84382ff3e79dc49e9bb0f5d6
|
/servlet/src/main/java/com/twelvemonkeys/servlet/cache/CacheException.java
|
fb9be851e07dc659a39b093bf742809a7dfad533
|
[] |
no_license
|
conceptboard/TwelveMonkeys
|
e398da78c715213f25fb6349ec3c15474d1b523f
|
9742af9a5d4e4407c0f530bf5ab5e3ce440a9348
|
refs/heads/master
| 2021-01-16T19:40:13.078539
| 2011-11-14T14:25:21
| 2011-11-14T14:25:21
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 473
|
java
|
package com.twelvemonkeys.servlet.cache;
/**
* CacheException
*
* @author <a href="mailto:harald.kuhr@gmail.com">Harald Kuhr</a>
* @author last modified by $Author: haku $
* @version $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-servlet/src/main/java/com/twelvemonkeys/servlet/cache/CacheException.java#1 $
*/
public class CacheException extends Exception {
public CacheException(Throwable pCause) {
super(pCause);
}
}
|
[
"harald.kuhr@gmail.com"
] |
harald.kuhr@gmail.com
|
028d3bfd0b6ff6e85fa26b6b07b0d68e309415b0
|
dad39d0b44a8c734fa2e4947fe81c519d5c57ac4
|
/src/main/java/com/huge/ihos/material/deptapp/dao/DeptAppDao.java
|
7f154d33f4e1741920cd290149ee4f4901b50a26
|
[] |
no_license
|
herrysa/iHOSv3.7
|
9dd9b81139c5263387a003ef9cf1e01b27f49e6f
|
29abbaa5e4c4cb9fa470278b6958d1dcb2b2ca41
|
refs/heads/master
| 2021-01-16T23:32:31.946408
| 2017-02-28T09:04:56
| 2017-02-28T09:04:56
| 53,923,309
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 499
|
java
|
package com.huge.ihos.material.deptapp.dao;
import java.util.List;
import com.huge.ihos.material.deptapp.model.DeptApp;
import com.huge.dao.GenericDao;
import com.huge.webapp.pagers.JQueryPager;
import com.huge.webapp.util.PropertyFilter;
/**
* An interface that provides a data management interface to the DeptApp table.
*/
public interface DeptAppDao extends GenericDao<DeptApp, String> {
public JQueryPager getDeptAppCriteria(final JQueryPager paginatedList,List<PropertyFilter> filters);
}
|
[
"xia_keyou@163.com"
] |
xia_keyou@163.com
|
9a9e1a0c51cf3f12e359e5bc5f190fbec61e16d6
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/23/23_347bb6a2e5678cfb734a28f0cf1305b596217a4a/DefenderPanel/23_347bb6a2e5678cfb734a28f0cf1305b596217a4a_DefenderPanel_s.java
|
59dce8c11a1b318c95331dc4b403e59786047571
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,137
|
java
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package acdefender;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.ArrayList;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
import javax.swing.Timer;
/**
* Panneau du jeu qui est aussi le contrôleur
*
* @author ankat
*/
public class DefenderPanel extends JPanel implements Runnable, ConstantesDefender {
Thread t; // Thread principal
//--------------------LES MONSTRES-----------------------
Monstre monstre; // Une instance de la classe Monstre
private int delay; // Delai pour l'exécution de la tâche qui fait apparaître les Monstres
Graphics graph; // Contexte graphique
TaskPerformer taskPerformer; // Un ActionListener permettant l'apparition des monstres
ArrayList<Monstre> listeMonstres = new ArrayList<Monstre>(); // Une liste contenant des monstres
//-------------------LA BULLET----------------------------
Bullet bullet; // Une instance de la classe Bullet
private int XClic; // Coordonnées x du clic de souris
private int YClic; // Coordonnées y du clic de souris
private float a; // Coefficient directeur de la droit y = ax+b que forme la bullet jusqu'au clic
private int b; // L'ordonnée à l'origine de la droit y = ax+b que forme la bullet jusqu'au clic
// Pour dessiner une tourelle fixe
private final ImageIcon imageTourelle = new ImageIcon(getClass().getResource("/tourelle100*90.jpeg"));
public DefenderPanel() {
this.setPreferredSize(new Dimension(FRAME_WIDTH, FRAME_HEIGHT));
this.addMouseListener(new ClickListener());
bullet = new Bullet();
taskPerformer = new TaskPerformer();
t = new Thread(this);
t.start();
} // fin constructeur
@Override
public void paintComponent(Graphics g) {
g.setColor(Color.white);
g.fillRect(0, 0, this.getWidth(), this.getHeight());
graph = g;
// Dessine la bullet
bullet.drawBullet(g, bullet.getPosXBullet(), bullet.getPosYBullet());
// Dessine la tourelle fixe
g.drawImage(imageTourelle.getImage(), 0, Y_DEPART_BULLET, null);
// Boucle permettant de dessiner les monstres de la liste
for (int i = 0; i < listeMonstres.size(); ++i) {
int posX = listeMonstres.get(i).getPosXMonstres();
int posY = listeMonstres.get(i).getPosYMonstres();
listeMonstres.get(i).drawMonstres(g, posX, posY);
// Move monster for next place
listeMonstres.get(i).run();
}
// Après avoir placé tous les monstres on repeint la fenêtre
repaint();
if (DEBUG) {
System.out.println("taille listeMonstres : " + listeMonstres.size()); // DEBUG
}
} // fin méthode paintComponent
@Override
public void run() {
delay = 1500;
new Timer(delay, taskPerformer).start();
colision();
}
//--------------------------------------------------------------------------
// AUTRES METHODES DE CLASSE
//--------------------------------------------------------------------------
public void colision() {
while (true) {
for (int i = 0; i < listeMonstres.size(); ++i) {
if ( (bullet.getPosXBullet() >= listeMonstres.get(i).getPosXMonstres() && bullet.getPosXBullet() <= (listeMonstres.get(i).getPosXMonstres() + 86) )
&& (bullet.getPosYBullet() >= listeMonstres.get(i).getPosYMonstres() && bullet.getPosYBullet() <= (listeMonstres.get(i).getPosYMonstres() + 100) ) ) {
listeMonstres.remove(i);
} // fin if
} // fin for
// if(DEBUG){
System.out.println("Je suis dans colision");
// }
} // fin while
} // fin méthode colision
//-----------------------------------------------------------------------------
// CLASSES INTERNES
//-----------------------------------------------------------------------------
/**
* Tâche qui permet de faire apparaître des monstres en créant des nouveaux
* monstres et en les ajoutant à la liste
*/
public class TaskPerformer implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
monstre = new Monstre();
listeMonstres.add(monstre);
new Thread(monstre).start();
}
} // fin classe TaskPerformer
/**
* Permet de réagit aux clics de souris pour tirer avec la Bullet
*/
public class ClickListener extends MouseAdapter {
public void mousePressed(MouseEvent e) {
// Informe la bullet du clic effectué pour lui permettre de lancer sa méthode goBullet()
bullet.setIsClick(true);
// Récupère les coordonnées où on a cliqué
XClic = e.getX();
YClic = e.getY();
// Calcul du coefficient directeur a = (y2 - y1) / (x2 - x1)
a = (float) (YClic - Y_DEPART_BULLET) / (XClic - X_DEPART_BULLET);
// b l'ordonnée à l'origine, donc coordonnées de départ (y pour x = 0)
b = Y_DEPART_BULLET;
// Envoie les nouvelles coordonnées à la bullet
bullet.setA(a);
bullet.setB(b);
if (DEBUG) {
System.out.println("a = " + a + " b = " + b); // DEBUG
}
// lancement d'un nouveau thread
new Thread(bullet).start();
} // fin méthode mousePressed
} // fin classe ClickListener
} // fin classe DefenderPanel
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
b5042cba38a8db01f603deee9bdf39d880dadbad
|
f1bdf504e0be626dc3e3001c2de384d993c0fc48
|
/src/main/java/org/contentmine/ami/tools/download/scielo/ScieloMetadataEntry.java
|
562a1ef7f65d506b4224760f6404ba44ccc88a8c
|
[
"Apache-2.0"
] |
permissive
|
anjackson/ami3
|
61cae21f2eca6b9906930eff08ca78b4b8246456
|
d58c8420ddd3cee07429738f4495499e1a850207
|
refs/heads/master
| 2021-05-17T23:13:04.884140
| 2020-06-09T21:50:50
| 2020-06-09T21:50:50
| 250,989,085
| 0
| 0
|
Apache-2.0
| 2020-06-09T21:50:51
| 2020-03-29T08:47:06
|
HTML
|
UTF-8
|
Java
| false
| false
| 5,495
|
java
|
package org.contentmine.ami.tools.download.scielo;
import java.util.List;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.contentmine.ami.tools.download.AbstractDownloader;
import org.contentmine.ami.tools.download.AbstractMetadataEntry;
import org.contentmine.eucl.xml.XMLUtil;
import org.contentmine.graphics.html.HtmlA;
import org.contentmine.graphics.html.HtmlElement;
import org.contentmine.graphics.html.HtmlSpan;
import nu.xom.Element;
/** holds metadata for biorxiv search result
*
* <li class="first odd search-result result-jcode-biorxiv search-result-highwire-citation">
<div class="highwire-article-citation highwire-citation-type-highwire-article" data-pisa="biorxiv;2020.02.02.931162v1" data-pisa-master="biorxiv;2020.02.02.931162" data-apath="/biorxiv/early/2020/02/04/2020.02.02.931162.atom" id="biorxivearly2020020420200202931162atom">
<div class="highwire-cite highwire-cite-highwire-article highwire-citation-biorxiv-article-pap-list clearfix">
<!-- Title AND link to content -->
<span class="highwire-cite-title">
<a href="/content/10.1101/2020.02.02.931162v1" class="highwire-cite-linked-title" data-icon-position="" data-hide-link-title="0"><span class="highwire-cite-title">Phylogenomic analysis of the 2019-nCoV coronavirus</span></a> </span>
<!-- Authors -->
<div class="highwire-cite-authors"><span class="highwire-citation-authors"><span class="highwire-citation-author first" data-delta="0"><span class="nlm-given-names">Carmine</span> <span class="nlm-surname">Ceraolo</span></span>, <span class="highwire-citation-author" data-delta="1"><span class="nlm-given-names">Federico M</span> <span class="nlm-surname">Giorgi</span></span></span>
</div>
<!-- DOI -->
<div class="highwire-cite-metadata"><span class="highwire-cite-metadata-journal highwire-cite-metadata">bioRxiv </span><span class="highwire-cite-metadata-pages highwire-cite-metadata">2020.02.02.931162; </span><span class="highwire-cite-metadata-doi highwire-cite-metadata"><span class="doi_label">doi:</span> https ://doi.org/10.1101/2020.02.02.931162 </span>
</div>
<!-- I think this is just a button for saving citations - skip it -->
<div class="highwire-cite-extras">
<div id="hw-make-citation-0" class="hw-make-citation" data-encoded-apath=";biorxiv;early;2020;02;04;2020.02.02.931162.atom" data-seqnum="0"><a href="/highwire-save-citation/saveapath/%3Bbiorxiv%3Bearly%3B2020%3B02%3B04%3B2020.02.02.931162.atom/nojs/0" id="link-save-citation-toggle-0" class="link-save-citation-save use-ajax hw-link-save-unsave-catation link-icon" title="Save"><i class="icon-plus" /> <span class="title">Add to Selected Citations</span></a>
</div>
</div>
</div>
</div>
</li>
* @author pm286
*
*/
public class ScieloMetadataEntry extends AbstractMetadataEntry {
private static final String HIGHWIRE_CITE_TITLE = "highwire-cite-title";
private static final Logger LOG = Logger.getLogger(ScieloMetadataEntry.class);
static {
LOG.setLevel(Level.DEBUG);
}
public ScieloMetadataEntry() {
super();
}
public ScieloMetadataEntry(AbstractDownloader downloader) {
super(downloader);
}
protected void extractMetadata() {
getTitleAndContentLink();
getAuthors();
getDOI();
}
protected String getDOI() {
return doi;
}
protected List<String> getAuthors() {
System.err.println("getAuthors(); NYI");
return null;
}
/**
<!-- Title AND link to content -->
<span class="highwire-cite-title">
<a href="/content/10.1101/2020.02.02.931162v1" class="highwire-cite-linked-title"
data-icon-position="" data-hide-link-title="0">
<span class="highwire-cite-title">Phylogenomic analysis of the 2019-nCoV coronavirus</span>
</a>
</span>
*/
private void getTitleAndContentLink() {
HtmlSpan span = (HtmlSpan) XMLUtil.getFirstElement(metadataEntryElement, ".//*[local-name()='span' and @class='" + HIGHWIRE_CITE_TITLE + "']");
if (span == null) {
System.out.println("null span "+metadataEntryElement.toXML());
} else {
urlPath = ((HtmlA) XMLUtil.getSingleChild(span, HtmlA.TAG)).getHref();
}
}
public void read(Element li) {
metadataEntryElement = HtmlElement.create(li);
extractMetadata();
}
protected String extractDOIFromUrl() {
return urlPath.replace("/content/", "");
}
/**
<li class="first odd search-result result-jcode-biorxiv search-result-highwire-citation">
<div class="highwire-article-citation highwire-citation-type-highwire-article" data-pisa="biorxiv;2020.01.24.917864v1" data-pisa-master="biorxiv;2020.01.24.917864" data-seqnum="11" data-apath="/biorxiv/early/2020/01/24/2020.01.24.917864.atom" id="biorxivearly2020012420200124917864atom">
<div class="highwire-cite highwire-cite-highwire-article highwire-citation-biorxiv-article-pap-list clearfix">
<span class="highwire-cite-title">
<a href="/content/10.1101/2020.01.24.917864v1" class="highwire-cite-linked-title" data-icon-position="" data-hide-link-title="0">
<span class="highwire-cite-title">A systematic review of scientific research focused on farmers in agricultural adaptation to climate change (2008-2017)</span>
</a>
* @return
* gets the pointer to the "citation", often a landing page (here the value of @href)
*/
@Override
public String getCitationLink() {
return XMLUtil.getSingleValue(metadataEntryElement, ".//*[local-name()='"+HtmlA.TAG+"']/@href");
}
}
|
[
"peter.murray.rust@googlemail.com"
] |
peter.murray.rust@googlemail.com
|
df63d40d08eb2ba50dad488e7adf3d2840a0f0f4
|
ad5e8ce2639015c5aeba77ccc7bde15a89582603
|
/api-provider/src/main/java/com/salty/provider/core/register/config/ServerConfig.java
|
a440728951080a5d55fc15dfc16535cd23786f43
|
[] |
no_license
|
ReExia/node-ts-zk-proxy
|
36561ba9b4f42836685453522563aa0cdefba185
|
1da9a492f501f41d45e9a8388549275ff470140f
|
refs/heads/master
| 2020-04-05T17:12:46.236312
| 2018-11-11T05:20:00
| 2018-11-11T05:20:00
| 157,049,460
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,183
|
java
|
package com.salty.provider.core.register.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* @author setsuna
* server配置
*/
@Configuration
@ConfigurationProperties(prefix = "server")
public class ServerConfig {
/**
* 服务地址
*/
private String address;
/**
* 服务端口
*/
private int port;
/**
* 注册路径
*/
private String registryPath;
/**
* 注册项目名称
*/
private String appName;
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public String getRegistryPath() {
return registryPath;
}
public void setRegistryPath(String registryPath) {
this.registryPath = registryPath;
}
public String getAppName() {
return appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
}
|
[
"liu1023434681@qq.com"
] |
liu1023434681@qq.com
|
16d749a4cb3aa882e6e7642f6b3f7acee13ee07f
|
f2ad1616ced29850fbd779d5114240236da60aa7
|
/repos/src/main/java/com/iqmsoft/mm/dao/StudentDao.java
|
2a9c69564fbcc8c825605f4476b5fabf242ec643
|
[] |
no_license
|
Murugar/MultiModulePostGreSQLSpringMVC
|
a92c2bc9e538c3ec9aaee9c07531ab433df8cf82
|
6e2d7d33f47c7d549d0ad664a32b8ed631c88df0
|
refs/heads/master
| 2021-01-19T21:41:52.998841
| 2017-02-20T08:13:41
| 2017-02-20T08:13:41
| 82,532,765
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,560
|
java
|
package com.iqmsoft.mm.dao;
import com.fi.ls.entity.Student;
import java.util.List;
import java.util.Set;
public interface StudentDao {
/**
* creates new Student in database
* @param s specific Student to be created
*/
public void create(Student s);
/**
* updates given Student
* @param s Student that would be updated
* @return updated Student
*/
public Student update(Student s);
/**
* removes given Student
* @param s Student that has to be removed
*/
public void remove(Student s);
/**
* finds specific student from database by birth number
* @param birthNumber of student
* @return student that is found by birth number
*/
public Student findByBirthNumber(String birthNumber);
/**
* finds specific Student by id
* @param id of a Student that would be returned
* @return specific Student by id
*/
public Student findById(Long id);
/**
* returns all Students
* @return List of all Students
*/
public Set<Student> findAll();
/**
* returns all students with same first name
* @param firstName of students
* @return list of all students with specific first name
*/
public Set<Student> findByFirstName(String firstName);
/**
* returns all students with same surname
* @param surname of students
* @return list of all students with specific surname
*/
public Set<Student> findBySurname(String surname);
}
|
[
"davanon2014@gmail.com"
] |
davanon2014@gmail.com
|
06c822d808fb2dfcc37a32ab9855aa87320061f6
|
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
|
/src/br/com/mind5/stats/statsOwnerSale/ownerSaleLive/info/SowaliveSetterLChanged.java
|
41ef603c8319f9f9f8d2210778cce20866d92692
|
[] |
no_license
|
grazianiborcai/Agenda_WS
|
4b2656716cc49a413636933665d6ad8b821394ef
|
e8815a951f76d498eb3379394a54d2aa1655f779
|
refs/heads/master
| 2023-05-24T19:39:22.215816
| 2023-05-15T15:15:15
| 2023-05-15T15:15:15
| 109,902,084
| 0
| 0
| null | 2022-06-29T19:44:56
| 2017-11-07T23:14:21
|
Java
|
UTF-8
|
Java
| false
| false
| 408
|
java
|
package br.com.mind5.stats.statsOwnerSale.ownerSaleLive.info;
import br.com.mind5.common.DefaultValue;
import br.com.mind5.info.InfoSetterTemplate;
public final class SowaliveSetterLChanged extends InfoSetterTemplate<SowaliveInfo> {
@Override protected SowaliveInfo setAttrHook(SowaliveInfo recordInfo) {
recordInfo.lastChanged = DefaultValue.localDateTimeNow();
return recordInfo;
}
}
|
[
"mmaciel@mind5.com.br"
] |
mmaciel@mind5.com.br
|
1718b088b7057692067dafa13afe49796901ed71
|
7a10335f0b2cc573ac32c5eebe3a921c9eb556dc
|
/src/main/java/org/golde/forge/betterminecraft/proxy/ClientProxy.java
|
410be6150c1c530494fa082778512ce898199b25
|
[] |
no_license
|
egold555/EricsBetterClientMod
|
7ecdf4ad39844ec55c328b6442ce24df9bbc0381
|
8484a8aac2c02262c8d345fb577a89be02238d45
|
refs/heads/master
| 2021-01-23T06:10:54.851165
| 2017-06-02T03:27:08
| 2017-06-02T03:27:08
| 93,013,752
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 674
|
java
|
package org.golde.forge.betterminecraft.proxy;
import org.golde.forge.betterminecraft.config.BMConfig;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
public class ClientProxy extends CommonProxy {
@Override
public void preInit(FMLPreInitializationEvent event) {
super.preInit(event);
BMConfig.clientPreInit();
}
@Override
public void init(FMLInitializationEvent event) {
super.init(event);
}
@Override
public void postInit(FMLPostInitializationEvent event) {
super.postInit(event);
}
}
|
[
"eric@golde.org"
] |
eric@golde.org
|
da09520d8af405ee68d463f7c65f0209e3d01b82
|
74b6018e594e5cba71d3e26ef70884c92abde0c0
|
/libraries/Gaussian/src/main/java/edu/ucsf/valelab/gaussianfit/algorithm/JitterDetector.java
|
46847487f4c820e65c033a9d0456e90d2b3395e6
|
[] |
no_license
|
lwxGitHub123/micro-manager
|
4b5caec8f25de2b7a9e92e7883eecc026fdc08b9
|
a945fdf550ba880744b5b3695fa2c559505f735b
|
refs/heads/main
| 2023-06-24T13:00:29.082165
| 2021-07-29T07:24:13
| 2021-07-29T07:24:13
| 382,203,845
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,402
|
java
|
/*
* This class uses autocorrelation to detect the movement between a reference image
* and the given image
Copyright (c) 2010-2017, Regents of the University of California
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS 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 COPYRIGHT OWNER OR 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.
The views and conclusions contained in the software and documentation are those
of the authors and should not be interpreted as representing official policies,
either expressed or implied, of the FreeBSD Project.
*/
package edu.ucsf.valelab.gaussianfit.algorithm;
import ij.process.FHT;
import ij.process.ImageProcessor;
import java.awt.Point;
import java.awt.geom.Point2D;
/**
* @author Nico Stuurman
*/
public class JitterDetector {
private final FHT ref_;
public JitterDetector(ImageProcessor reference) {
ref_ = new FHT(reference);
ref_.transform();
ref_.resetMinAndMax();
}
public void getJitter(ImageProcessor test, Point2D.Double com) {
FHT t = new FHT(test);
t.transform();
t.resetMinAndMax();
FHT m = ref_.conjugateMultiply(t);
m.inverseTransform();
m.swapQuadrants();
// return the position of the brightest pixel
Point brightPix = new Point(0, 0);
BrightestPixel(m, brightPix, 32);
try {
// Gaussian fit using Nelder Mead and 3D fitting
GaussianFit gs = new GaussianFit(3, 2);
// halfsize of the square around brightest pixel used for Gaussian fit
int hs = 5;
ImageProcessor ip = m.convertToShort(true);
ip.setRoi(brightPix.x - hs, brightPix.y - hs, 2 * hs, 2 * hs);
ImageProcessor ipc = ip.crop();
GaussianFit.Data fitResult = gs.dogaussianfit(ipc, 100);
com.x = fitResult.getParms()[GaussianFit.XC] - hs + brightPix.x;
com.y = fitResult.getParms()[GaussianFit.YC] - hs + brightPix.y;
} catch (Exception ex) {
// Gaussian fit failed, try second best estimate
com.x = brightPix.x;
com.y = brightPix.y;
}
}
/**
* Finds the brightest pixel in the center of the image m only searches in the center of the
* image in a square with edge size searchsize
*
* @param m image to be searched
* @param brightPix point use to return coordinates of pixel found
* @param searchSize size of edge of center square in which to look for brightest pixel
*/
private void BrightestPixel(FHT m, Point brightPix, int searchSize) {
float pixels[] = (float[]) m.getPixels();
int height = m.getHeight();
int width = m.getWidth();
int halfHeight = (height / 2);
int halfWidth = (width / 2);
int halfSearchSize = (searchSize / 2);
double max = pixels[halfHeight * width + halfWidth];
brightPix.x = halfWidth;
brightPix.y = halfHeight;
for (int y = halfHeight - halfSearchSize;
y < halfHeight + halfSearchSize; y++) {
for (int x = halfWidth - halfSearchSize;
x < halfWidth + halfSearchSize; x++) {
if (pixels[y * width + x] > max) {
max = pixels[y * width + x];
brightPix.x = x;
brightPix.y = y;
}
}
}
}
}
|
[
"test@test.com"
] |
test@test.com
|
c83f52e21267c808df192a8b571798351da8f070
|
ce195bf61e9c4a1c93a1f0c9e3eaf43a9dfb4b07
|
/src/main/java/uk/ac/soton/ldanalytics/iotwo/EventsWebSocket.java
|
4991fb9efa213382a5cd7c84ae3eccf15ed3636c
|
[] |
no_license
|
eugenesiow/iotwo
|
66e31440c14edde05c2b07246dfd93c88ac6d308
|
9b32c6571efe7d3ed7d0aa2eaf5fe45d556af5ec
|
refs/heads/master
| 2021-01-09T21:47:01.108988
| 2016-10-15T10:02:09
| 2016-10-15T10:02:09
| 44,196,000
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 936
|
java
|
package uk.ac.soton.ldanalytics.iotwo;
import org.eclipse.jetty.websocket.api.Session;
import org.eclipse.jetty.websocket.api.annotations.*;
import java.io.IOException;
@WebSocket
public class EventsWebSocket {
private static Session session;
@OnWebSocketConnect
public void connected(Session session) {
EventsWebSocket.session = session;
}
@OnWebSocketClose
public void closed(int statusCode, String reason) {
EventsWebSocket.session = null;
}
@OnWebSocketMessage
public void message(String message) throws IOException {
System.out.println("Got: " + message); // Print message
session.getRemote().sendString(message); // and send it back
}
public static void sendMessage(String message) throws IOException {
System.out.println("Got: " + message); // Print message
session.getRemote().sendString(message); // and send it back
}
}
|
[
"kyo116@gmail.com"
] |
kyo116@gmail.com
|
5a071ac9c009a9bb2effc2be1994cbb0eba921ee
|
9d8edaf61a05d0417688c8d3a5cc6bbf0866f5a7
|
/app/src/main/java/com/example/wp/awesomemmz/common/GlideCircleTransform.java
|
d7a1da17b6e098f9dd25a60eb1af7a1c4e27382c
|
[] |
no_license
|
eeqg/AwesomeMmz
|
5f008bdf4ee826d74dca6e5d30f94745c656eeee
|
b66a2ff3eb99f06dc7e26496162f4501a3267775
|
refs/heads/master
| 2022-08-24T02:11:52.169230
| 2022-07-27T07:41:02
| 2022-07-27T07:41:02
| 166,962,157
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,606
|
java
|
package com.example.wp.awesomemmz.common;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.NonNull;
import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;
import java.security.MessageDigest;
/*
* glide 加载的圆形图片。如头像
* */
public class GlideCircleTransform extends BitmapTransformation {
public GlideCircleTransform(Context context) {
super();
}
@Override
protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
return circleCrop(pool, toTransform);
}
private static Bitmap circleCrop(BitmapPool pool, Bitmap source) {
if (source == null) return null;
int size = Math.min(source.getWidth(), source.getHeight());
int x = (source.getWidth() - size) / 2;
int y = (source.getHeight() - size) / 2;
Bitmap squared = Bitmap.createBitmap(source, x, y, size, size);
Bitmap result = pool.get(size, size, Bitmap.Config.ARGB_8888);
if (result == null) {
result = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888);
}
Canvas canvas = new Canvas(result);
Paint paint = new Paint();
paint.setShader(new BitmapShader(squared, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP));
paint.setAntiAlias(true);
float r = size / 2f;
canvas.drawCircle(r, r, r, paint);
return result;
}
@Override
public void updateDiskCacheKey(@NonNull MessageDigest messageDigest) {
}
}
|
[
"876583632@qq.com"
] |
876583632@qq.com
|
ead0d47ee6ab5a4fdf339f37ab16645e87958db5
|
1aa2f57eb9c8288eed8b2cc80210fcadeca2d2b9
|
/hibernate-types-52/src/main/java/com/vladmihalcea/hibernate/type/json/JsonBinaryType.java
|
c263523657768ae0f2fa2b39ac3578db2ecdb208
|
[
"Apache-2.0"
] |
permissive
|
imtiaz-rahi/hibernate-types
|
ac6015c58d78582a293e01c061e86ff272f24c2e
|
6397bfb8c824289d69c3e4a011711535272ea2e7
|
refs/heads/master
| 2021-09-01T18:08:38.873754
| 2017-12-28T06:32:22
| 2017-12-28T06:32:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,235
|
java
|
package com.vladmihalcea.hibernate.type.json;
import com.vladmihalcea.hibernate.type.json.internal.JsonBinarySqlTypeDescriptor;
import com.vladmihalcea.hibernate.type.json.internal.JsonTypeDescriptor;
import org.hibernate.type.AbstractSingleColumnStandardBasicType;
import org.hibernate.usertype.DynamicParameterizedType;
import java.util.Properties;
/**
* Maps any given Java object on a binary JSON column type.
* <p>
* For more details about how to use it, check out <a href="https://vladmihalcea.com/2016/06/20/how-to-map-json-objects-using-generic-hibernate-types/">this article</a> on <a href="https://vladmihalcea.com/">vladmihalcea.com</a>.
*
* @author Vlad Mihalcea
*/
public class JsonBinaryType
extends AbstractSingleColumnStandardBasicType<Object> implements DynamicParameterizedType {
public static final JsonBinaryType INSTANCE = new JsonBinaryType();
public JsonBinaryType() {
super(JsonBinarySqlTypeDescriptor.INSTANCE, new JsonTypeDescriptor());
}
public String getName() {
return "jsonb";
}
@Override
public void setParameterValues(Properties parameters) {
((JsonTypeDescriptor) getJavaTypeDescriptor()).setParameterValues(parameters);
}
}
|
[
"mihalcea.vlad@gmail.com"
] |
mihalcea.vlad@gmail.com
|
b4a7dae436a1f956bf7b1977f66eeadeca5e6806
|
4c45fd10460f88c7176a01c450db5b0aa3314b9b
|
/src/com/earthman/app/nim/login/LogoutHelper.java
|
0ff13874d6a0e78a94c14ea7b6cb79b6445243c3
|
[] |
no_license
|
WenJunKing/diqiuren
|
b5c60134ba655bb45014a4a75d9b05313a585fb5
|
b4440085fccc413c1390db2678cd5da893217afc
|
refs/heads/master
| 2021-06-01T07:31:33.432581
| 2016-08-19T07:44:12
| 2016-08-19T07:44:12
| 66,062,997
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 688
|
java
|
package com.earthman.app.nim.login;
import com.earthman.app.nim.NimCache;
import com.earthman.app.nim.uikit.LoginSyncDataStatusObserver;
import com.earthman.app.nim.uikit.NimUIKit;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.auth.AuthService;
/**
* 注销帮助类
* Created by huangjun on 2015/10/8.
*/
public class LogoutHelper {
public static void logout() {
// 清理缓存&注销监听&清除状态
NimUIKit.clearCache();
// ChatRoomHelper.logout();//暂不集成聊天室
NimCache.clear();
LoginSyncDataStatusObserver.getInstance().reset();
NIMClient.getService(AuthService.class).logout();
}
}
|
[
"472759693@qq.com"
] |
472759693@qq.com
|
b574fd2b3b4ea4702e4d842348a8c2d15e6d9216
|
2742c434ff8f3392ac28f2e3ce4c3d7b7656fd46
|
/app/src/main/java/com/mike4christ/storexapp/actvities/OrderStatusActivity.java
|
cfb44a861629f3b1393f089029682ea932ee7db5
|
[] |
no_license
|
alumichael/StorexApp
|
d7391175c98bf4e969e33f0b54cf21933ca092ee
|
7330e3c6e1b219973c66b24239921ccdf723f423
|
refs/heads/master
| 2020-06-28T20:22:13.287537
| 2019-08-15T15:43:45
| 2019-08-15T15:43:45
| 200,332,406
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,469
|
java
|
package com.mike4christ.storexapp.actvities;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.FragmentTransaction;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.snackbar.Snackbar;
import com.mike4christ.storexapp.R;
import com.mike4christ.storexapp.adapters.OrderAdapter;
import com.mike4christ.storexapp.adapters.ProductAdapter;
import com.mike4christ.storexapp.models.customer.ErrorModel.APIError;
import com.mike4christ.storexapp.models.customer.ErrorModel.ErrorUtils;
import com.mike4christ.storexapp.models.customer.OrderModel.GetOrderList;
import com.mike4christ.storexapp.models.customer.Product.ProductModel;
import com.mike4christ.storexapp.models.customer.Product.ProductModel_Obj;
import com.mike4christ.storexapp.retrofit_interface.ApiInterface;
import com.mike4christ.storexapp.retrofit_interface.ServiceGenerator;
import com.mike4christ.storexapp.util.UserPreferences;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import static com.facebook.FacebookSdk.getApplicationContext;
public class OrderStatusActivity extends AppCompatActivity {
@BindView(R.id.toolbar)
Toolbar toolBar;
@BindView(R.id.order_status_layout)
LinearLayout mOrderStatusLayout;
@BindView(R.id.recycler_order)
RecyclerView mRecyclerOrder;
UserPreferences userPreferences;
LinearLayoutManager layoutManager;
OrderAdapter orderAdapter;
ApiInterface client= ServiceGenerator.createService(ApiInterface.class);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_oder_status);
userPreferences=new UserPreferences(this);
ButterKnife.bind( this);
getOderList();
customizeToolbar(toolBar);
}
private void getOderList(){
//get client and call object for request
Call<List<GetOrderList>> call=client.getOrder_info(userPreferences.getUserAccessToken());
call.enqueue(new Callback<List<GetOrderList>>() {
@Override
public void onResponse(Call<List<GetOrderList>> call, Response<List<GetOrderList>> response) {
if(!response.isSuccessful()){
try {
APIError apiError = ErrorUtils.parseError(response);
showMessage("Fetch Failed: " + apiError.getMessage());
Log.i("Invalid Fetch", apiError.getMessage());
//Log.i("Invalid Entry", response.errorBody().toString());
} catch (Exception e) {
Log.i("Fetch Failed", e.getMessage());
showMessage("Fetch Failed");
}
return;
}
List<GetOrderList> orderList=response.body();
int ordersize=orderList.size();
int last_detail=ordersize-1;
userPreferences.setUserOrderSize(ordersize);
userPreferences.setUserLastOrder(orderList.get(last_detail).getCreatedOn());
userPreferences.setUserLastOrderId(String.valueOf(orderList.get(last_detail).getOrderId()));
Log.i("Re-Success1",orderList.toString());
Log.i("Re-SuccessSize", String.valueOf(orderList.size()));
layoutManager = new LinearLayoutManager(getApplicationContext());
mRecyclerOrder.setLayoutManager(layoutManager);
orderAdapter = new OrderAdapter(getBaseContext(),orderList);
mRecyclerOrder.setAdapter(orderAdapter);
orderAdapter.notifyDataSetChanged();
Log.i("Success",response.body().toString());
}
@Override
public void onFailure(Call<List<GetOrderList>> call, Throwable t) {
showMessage("Fetch failed, please try again "+t.getMessage());
Log.i("GEtError",t.getMessage());
}
});
}
public void customizeToolbar(Toolbar toolbar){
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
getSupportActionBar().setDisplayShowHomeEnabled(false);
// getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_chevron_left_black_24dp);
//setting Elevation for > API 21
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
toolbar.setElevation(10f);
}
// Save current title and subtitle
final CharSequence originalTitle = toolbar.getTitle();
// Temporarily modify title and subtitle to help detecting each
toolbar.setTitle("ORDER STATUS");
for(int i = 0; i < toolbar.getChildCount(); i++){
View view = toolbar.getChildAt(i);
if(view instanceof TextView){
TextView textView = (TextView) view;
if(textView.getText().equals("ORDER STATUS")){
// Customize title's TextView
Toolbar.LayoutParams params = new Toolbar.LayoutParams(Toolbar.LayoutParams.WRAP_CONTENT, Toolbar.LayoutParams.MATCH_PARENT);
params.gravity = Gravity.CENTER_HORIZONTAL;
textView.setLayoutParams(params);
textView.setTextColor(getResources().getColor(R.color.colorPrimary));
}
}
}
// Restore title and subtitle
toolbar.setTitle(originalTitle);
}
public boolean onOptionsItemSelected(MenuItem item) {
startActivity(new Intent(this, Dashboard.class));
return super.onOptionsItemSelected(item);
}
public void onBackPressed() {
startActivity(new Intent(this, Dashboard.class));
super.onBackPressed();
}
public void showMessage(String s) {
Snackbar.make(mOrderStatusLayout, s, Snackbar.LENGTH_LONG).show();
}
}
|
[
"alumichael9@gmail.com"
] |
alumichael9@gmail.com
|
9567d7f176034648530e1008994e43e256127d05
|
ab2ff3f3e0015293e4fb55bb9ab325fbc0b0731b
|
/trunk/NeEDApp/src/main/java/com/apeironsol/need/util/comparator/StudentAcademicExamDOComparator.java
|
15beee5ea5020dcc2ffe6a81c9abdd1e8939b6ab
|
[] |
no_license
|
karreypradeep/NeedTrunk
|
1e10717521e4fcf950b8f30ac6ff852f52129b62
|
b01cb32bd75e8ad18474ce369509b24d908ccd03
|
refs/heads/master
| 2020-04-06T03:33:03.560106
| 2014-03-09T10:04:10
| 2014-03-09T10:04:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,676
|
java
|
/**
* This document is a part of the source code and related artifacts for
* SMSystem.
* www.apeironsol.com
* Copyright © 2012 apeironsol
*
*/
package com.apeironsol.need.util.comparator;
import java.io.Serializable;
import java.util.Comparator;
import com.apeironsol.need.academics.dataobject.StudentAcademicExamDO;
import com.apeironsol.need.academics.dataobject.StudentExamSubjectDO;
/**
* Comparator for {@link StudentExamSubjectDO}
*
* @author Pradeep.
*/
public class StudentAcademicExamDOComparator implements Comparator<StudentAcademicExamDO>, Serializable {
/**
*
*/
private static final long serialVersionUID = -1054777258492582017L;
public static enum Order {
EXAM_START_DATE, EXAM_END_DATE;
};
private final Order orderBy;
private boolean ascending = true;
public StudentAcademicExamDOComparator(final Order orderBy) {
this.orderBy = orderBy;
}
@Override
public int compare(final StudentAcademicExamDO source, final StudentAcademicExamDO target) {
int result = 0;
if (Order.EXAM_START_DATE.equals(this.orderBy) && source.getSectionExam() != null && target.getSectionExam() != null) {
result = source.getSectionExam().getStartDate().compareTo(target.getSectionExam().getStartDate());
}
if (Order.EXAM_END_DATE.equals(this.orderBy) && source.getSectionExam() != null && target.getSectionExam() != null) {
result = source.getSectionExam().getEndDate().compareTo(target.getSectionExam().getEndDate());
}
return result != 0 ? this.ascending ? result : result == 1 ? -1 : 1 : result;
}
public void setAscending() {
this.ascending = true;
}
public void setDescending() {
this.ascending = false;
}
}
|
[
"kpgoud533@gmail.com"
] |
kpgoud533@gmail.com
|
4a6924a471303ae9fe0c68cd68878c8d99742e82
|
7ad527bad3bd0d7eb94d1d8a0fe08df67aa26c3e
|
/软件学院/高级语言程序设计(Java)/答案/Exercise05_33.java
|
7257d7d38492d396297a06ecf30ed8839f84d81f
|
[] |
no_license
|
SCUTMSC/SCUT-Course
|
67e67ac494aef7fc73de17f61b7fab8450f17952
|
90f884a9032e951ebc9421cc88ca807b9ec211da
|
refs/heads/master
| 2020-07-16T22:22:53.359477
| 2019-09-07T08:28:09
| 2019-09-07T08:28:09
| 205,880,291
| 10
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 391
|
java
|
public class Exercise05_33 {
public static void main(String[] args) {
for (int number = 6; number <= 10000; number++) {
int sum = 0;
int divisor = number - 1;
while (divisor >= 1) {
if (number % divisor == 0) {
sum += divisor;
}
divisor--;
}
if (number == sum) {
System.out.println(number);
}
}
}
}
|
[
"LotteWong21@gmail.com"
] |
LotteWong21@gmail.com
|
438b541b16ef7e8ad18d77d0d143189ce054de64
|
3cd10b464385a0c3d694b3a73fc4c53851cc023b
|
/spring-reactive-routerfunction/src/main/java/com/laibao/spring/reactive/routerfunction/SpringBootMongodbReactiveRouterFunctionApplication.java
|
a72e88659c684fa1275f2f31114fe49975059d47
|
[] |
no_license
|
wanglaibao/springboot2-in-action
|
acd57fc38e7e43b7b96ad152c92e82a906398421
|
644548b3cba5e21c09b4c54ac3dbd5bc6015f265
|
refs/heads/master
| 2021-01-25T14:09:53.851965
| 2019-04-01T07:58:55
| 2019-04-01T07:58:55
| 123,655,338
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 477
|
java
|
package com.laibao.spring.reactive.routerfunction;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.web.reactive.config.EnableWebFlux;
@EnableWebFlux
@SpringBootConfiguration
public class SpringBootMongodbReactiveRouterFunctionApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootMongodbReactiveRouterFunctionApplication.class,args);
}
}
|
[
"wanglaibao2010@gmail.com"
] |
wanglaibao2010@gmail.com
|
9b7d3c274b6a4dd59e08dafda8c54e2f31c5b249
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_95/Testnull_9405.java
|
8e32e1491c7309d7799ecd4ca3df48ee01aa95d3
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 304
|
java
|
package org.gradle.test.performancenull_95;
import static org.junit.Assert.*;
public class Testnull_9405 {
private final Productionnull_9405 production = new Productionnull_9405("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
7c1977acadcb4389fec9b7136f8037bc9432f596
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a170/A170074Test.java
|
e056f14bfe7614b4ff999c429b975f11e43f2a1d
|
[] |
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.a170;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A170074Test extends AbstractSequenceTest {
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
9009bfb710bb6c400b3c8f625e11258cc79807c8
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14152-4-4-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/query/internal/CountDocumentFilter_ESTest_scaffolding.java
|
33112e59b53ef6eb9e9dc96ddde91e8effe30579
|
[] |
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
| 2,447
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Apr 03 15:11:13 UTC 2020
*/
package org.xwiki.query.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import static org.evosuite.shaded.org.mockito.Mockito.*;
@EvoSuiteClassExclude
public class CountDocumentFilter_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.xwiki.query.internal.CountDocumentFilter";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {}
}
@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(CountDocumentFilter_ESTest_scaffolding.class.getClassLoader() ,
"org.xwiki.query.internal.AbstractQueryFilter",
"org.xwiki.query.QueryFilter",
"org.xwiki.query.internal.CountDocumentFilter",
"org.xwiki.component.annotation.Component"
);
}
private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException {
mock(Class.forName("org.slf4j.Logger", false, CountDocumentFilter_ESTest_scaffolding.class.getClassLoader()));
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
a8231f82070f2fca3fa96b2279b4da34494e8262
|
43b72b58998f07b9da6e22481f70be197fbfbccd
|
/src/main/java/br/com/porto/amazonas/criptografia/interfaces/Criptografia.java
|
c011cce50eafc96bf5adb838a577a4db332bdc50
|
[] |
no_license
|
BrunoLV/amazonas-cript
|
b111c5111c82b7e2d00bf97a67bf720ea2afdba4
|
4730e25eb06973808f78ab9305d1cbad46e5d1c2
|
refs/heads/master
| 2020-05-17T11:07:46.289878
| 2014-03-28T00:08:37
| 2014-03-28T00:08:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 541
|
java
|
package br.com.porto.amazonas.criptografia.interfaces;
import br.com.porto.amazonas.criptografia.exceptions.CriptografiaException;
/**
* Interface para os componentes de criptografia.
* @author Bruno Luiz Viana
*
*/
public interface Criptografia {
/**
* Método utilizado para realizar criptografia das informações passadas para o método.
* @param value
* @return
* @throws CriptografiaException
*/
String criptografar(String value) throws CriptografiaException;
} // fim da interface Criptografia
|
[
"brunolviana22@hotmail.com"
] |
brunolviana22@hotmail.com
|
350c9d06588463ba92ea3ecf6aa2683fb19f9e83
|
1dc34a97b1bd1540fc06c445a33738e7237461c7
|
/type/src/main/java/com/qmuiteam/qmui/type/TypeModel.java
|
264dc6a9417de17e852ffe61a2f4abb820dac6e8
|
[
"MIT",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
Yuebohan/QMUI_Android
|
d1c6e708d0ff57512157c0e44b9e937a3d63d8ca
|
dde15a456bd2f81afa2f4c955ddfb73af16b572f
|
refs/heads/master
| 2022-11-29T20:58:11.101597
| 2020-08-14T10:00:40
| 2020-08-14T10:00:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,664
|
java
|
/*
* Tencent is pleased to support the open source community by making QMUI_Android available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*
* 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.qmuiteam.qmui.type;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.qmuiteam.qmui.type.element.Element;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TypeModel {
private CharSequence mOrigin;
private final Map<Integer, Element> mElementMap;
private Element mFirstElement;
private Element mLastElement;
@Nullable
private Element mFirstEffect;
public TypeModel(
CharSequence origin,
@NonNull Map<Integer, Element> elementMap,
Element firstElement,
Element lastElement,
@Nullable Element firstEffect) {
mOrigin = origin;
mElementMap = elementMap;
mFirstElement = firstElement;
mLastElement = lastElement;
mFirstEffect = firstEffect;
}
@Nullable
public Element getFirstEffect() {
return mFirstEffect;
}
public CharSequence getOrigin() {
return mOrigin;
}
public EffectRemover addBgEffect(int start, int end, final int bgColor){
List<Integer> types = new ArrayList<>();
types.add(TypeEnvironment.TYPE_BG_COLOR);
return unsafeAddEffect(start, end, types, new EnvironmentUpdater() {
@Override
public void update(TypeEnvironment env) {
env.setBackgroundColor(bgColor);
}
});
}
public EffectRemover addTextColorEffect(int start, int end, final int textColor){
List<Integer> types = new ArrayList<>();
types.add(TypeEnvironment.TYPE_TEXT_COLOR);
return unsafeAddEffect(start, end, types, new EnvironmentUpdater() {
@Override
public void update(TypeEnvironment env) {
env.setTextColor(textColor);
}
});
}
public EffectRemover addUnderLineEffect(int start, int end, final int underLineColor, final int underLineHeight){
List<Integer> types = new ArrayList<>();
types.add(TypeEnvironment.TYPE_BORDER_BOTTOM_WIDTH);
types.add(TypeEnvironment.TYPE_BORDER_BOTTOM_COLOR);
return unsafeAddEffect(start, end, types, new EnvironmentUpdater() {
@Override
public void update(TypeEnvironment env) {
env.setBorderBottom(underLineHeight, underLineColor);
}
});
}
public EffectRemover unsafeAddEffect(int start, int end, List<Integer> types, EnvironmentUpdater environmentUpdater){
Element elementStart = mElementMap.get(start);
Element elementEnd = mElementMap.get(end);
if(elementStart == null || elementEnd == null){
return null;
}
for(Integer type: types){
elementStart.addSaveType(type);
elementEnd.addRestoreType(type);
}
elementStart.addEnvironmentUpdater(environmentUpdater);
if(mFirstEffect == null){
mFirstEffect = elementStart;
}else{
mFirstEffect.insetEffect(elementStart);
}
elementStart.insetEffect(elementEnd);
return new DefaultEffectRemove(this, start, end, types, environmentUpdater);
}
public boolean unsafeRemoveEffect(int start, int end, List<Integer> types, EnvironmentUpdater environmentUpdater){
Element elementStart = mElementMap.get(start);
Element elementEnd = mElementMap.get(end);
if(elementStart == null || elementEnd == null){
return false;
}
for(Integer type: types){
elementStart.removeSaveType(type);
elementEnd.removeStoreType(type);
}
elementStart.removeEnvironmentUpdater(environmentUpdater);
mFirstEffect = elementStart.removeFromEffectListIfNeeded(mFirstEffect);
mFirstEffect = elementEnd.removeFromEffectListIfNeeded(mFirstEffect);
return true;
}
public Element firstElement() {
return mFirstElement;
}
public Element lastElement() {
return mLastElement;
}
public interface EffectRemover {
void remove();
}
static class DefaultEffectRemove implements EffectRemover{
private final int mStart;
private final int mEnd;
private final List<Integer> mTypes;
private final EnvironmentUpdater mEnvironmentUpdater;
private final TypeModel mTypeModel;
public DefaultEffectRemove(
TypeModel typeModel,
int start,
int end,
List<Integer> types,
EnvironmentUpdater environmentUpdater) {
mTypeModel = typeModel;
mStart = start;
mEnd = end;
mTypes = types;
mEnvironmentUpdater = environmentUpdater;
}
@Override
public void remove() {
mTypeModel.unsafeRemoveEffect(mStart, mEnd, mTypes, mEnvironmentUpdater);
}
}
}
|
[
"cgspine@gmail.com"
] |
cgspine@gmail.com
|
141f3f355858620a4f4d599859140b26371b9e5e
|
01a017e9de1987ba69d26817e7fa8ccf9b6e9370
|
/src/net/sourceforge/quoa/converter/Converter.java
|
9aa2405209d43b9beebc8500d490fab49ded6f4f
|
[] |
no_license
|
fabiojose/quoa
|
2f5f0d4ce6ad5bae5321231cd5d66700e4316eef
|
adfa09ed28f0217e3702e70764ca6804e25b2e7e
|
refs/heads/master
| 2021-03-12T20:04:49.002418
| 2014-02-24T13:43:17
| 2014-02-24T13:43:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 372
|
java
|
package net.sourceforge.quoa.converter;
public interface Converter<F,B> {
/**
* From a value to another
* @param value
* @return
*/
B forward(F value);
/**
* The 'another' to the original
* @param value
* @return
*/
F backward(B value);
/**
* Set of converter parameters
* @param parameters
*/
void setParameters(Object...parameters);
}
|
[
"fabiojose@gmail.com"
] |
fabiojose@gmail.com
|
12e98f7c981a91ec895cdfde817ff5c396ffaee9
|
5971af9bf04fff14bfd7196dc6d0afa542a00e91
|
/MavenBasicUtil/src/main/java/com/kaifantech/util/json/JsonUtil.java
|
458ddcbe2b1f13a5d9b9573b4eda27ebc5f06c7a
|
[] |
no_license
|
dxmcu/maven
|
7841cd8a7951fe0f059852ec9070388c20b3e5c3
|
01d8933752ca7306afe96f610b37a69d86018058
|
refs/heads/master
| 2022-12-26T21:02:37.255799
| 2020-02-16T08:30:29
| 2020-02-16T08:30:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,061
|
java
|
package com.kaifantech.util.json;
import java.util.HashMap;
import java.util.Map;
import com.alibaba.fastjson.JSONObject;
import com.calculatedfun.util.AppTool;
public class JsonUtil {
@SuppressWarnings("unchecked")
public static Map<String, Object> toMap(JSONObject requestJson, boolean notNull) {
Map<String, Object> obj = new HashMap<>();
for (String key : requestJson.keySet()) {
int index1 = key.indexOf('[');
int index2 = key.indexOf(']');
if (!AppTool.isNull(key)) {
if (index1 > 0 && index2 > index1) {
if (notNull && AppTool.isNull(requestJson.getString(key))) {
return null;
}
String index = key.substring(index1 + 1, index2);
Map<String, String> map = (Map<String, String>) obj.get(index);
if (AppTool.isNull(map)) {
map = new HashMap<>();
}
map.put(key.substring(0, index1), requestJson.getString(key));
obj.put(index, map);
} else if (index1 < 0 && index2 < 0) {
obj.put(key, requestJson.getString(key));
}
} else {
continue;
}
}
return obj;
}
}
|
[
"583937325@qq.com"
] |
583937325@qq.com
|
6c0800f0233c03300619eba1e8e33f607922e5ad
|
78f7fd54a94c334ec56f27451688858662e1495e
|
/partyanalyst-service/trunk/src/main/java/com/itgrids/partyanalyst/dao/IActionTypeRequiredDAO.java
|
75aa88de09a8c511ed0cd41122b104edd8651ca7
|
[] |
no_license
|
hymanath/PA
|
2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef
|
d166bf434601f0fbe45af02064c94954f6326fd7
|
refs/heads/master
| 2021-09-12T09:06:37.814523
| 2018-04-13T20:13:59
| 2018-04-13T20:13:59
| 129,496,146
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 233
|
java
|
package com.itgrids.partyanalyst.dao;
import org.appfuse.dao.GenericDao;
import com.itgrids.partyanalyst.model.ActionTypeRequired;
public interface IActionTypeRequiredDAO extends GenericDao<ActionTypeRequired, Long> {
}
|
[
"itgrids@b17b186f-d863-de11-8533-00e0815b4126"
] |
itgrids@b17b186f-d863-de11-8533-00e0815b4126
|
a607a423f627c554cb56bb7a6fabecb2ef7047df
|
e52f88dfe64b13bd9360b0f802183bcb379d3bc6
|
/saas/src/main/java/org/adamalang/api/HashedPasswordResponder.java
|
28df7d824a8a058ec3537966b246f408de4fd4b5
|
[
"MIT"
] |
permissive
|
mathgladiator/adama-lang
|
addfc85111fe329eb23942605457b77e4f59d5d2
|
a03326cc678aaac5f566606408a708b5f871553d
|
refs/heads/master
| 2023-09-01T02:35:07.985525
| 2023-08-31T23:47:07
| 2023-08-31T23:47:07
| 245,283,238
| 94
| 14
|
MIT
| 2023-09-10T18:12:37
| 2020-03-05T22:47:40
|
Java
|
UTF-8
|
Java
| false
| false
| 1,054
|
java
|
/*
* This file is subject to the terms and conditions outlined in the
* file 'LICENSE' (it's dual licensed) located in the root directory
* near the README.md which you should also read. For more information
* about the project which owns this file, see https://www.adama-platform.com/ .
*
* (c) 2021 - 2023 by Adama Platform Initiative, LLC
*/
package org.adamalang.api;
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.adamalang.common.Callback;
import org.adamalang.common.ErrorCodeException;
import org.adamalang.web.io.*;
public class HashedPasswordResponder {
public final JsonResponder responder;
public HashedPasswordResponder(JsonResponder responder) {
this.responder = responder;
}
public void complete(String passwordHash) {
ObjectNode _obj = new JsonMapper().createObjectNode();
_obj.put("passwordHash", passwordHash);
responder.finish(_obj.toString());
}
public void error(ErrorCodeException ex) {
responder.error(ex);
}
}
|
[
"48896921+mathgladiator@users.noreply.github.com"
] |
48896921+mathgladiator@users.noreply.github.com
|
ebc66dc54f70237ab1bc0bd48525f2987a4a46fb
|
c173fc0a3d23ffda1a23b87da425036a6b890260
|
/hrsaas/src/org/struts/action/admin/srd/RetGratuityNomAction.java
|
feb98fdd657808b2f34a6c9447ace94ee59e99f3
|
[
"Apache-2.0"
] |
permissive
|
ThirdIInc/Third-I-Portal
|
a0e89e6f3140bc5e5d0fe320595d9b02d04d3124
|
f93f5867ba7a089c36b1fce3672344423412fa6e
|
refs/heads/master
| 2021-06-03T05:40:49.544767
| 2016-08-03T07:27:44
| 2016-08-03T07:27:44
| 62,725,738
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,246
|
java
|
/**
* author:PK Sahoo
*/
package org.struts.action.admin.srd;
import org.paradyne.bean.admin.srd.RetGratuityNom;
import org.paradyne.model.admin.srd.RetGratuityNomModel;
import org.struts.lib.ParaActionSupport;
public class RetGratuityNomAction extends ParaActionSupport {
private RetGratuityNom rgn;
public Object getModel() {
logger.info("Inside-->getModel()");
return this.rgn;
}
/**
* @return the rgn
*/
public RetGratuityNom getRgn() {
return rgn;
}
/**
* @param rgn the rgn to set
*/
public void setRgn(RetGratuityNom rgn) {
this.rgn = rgn;
}
static org.apache.log4j.Logger logger=org.apache.log4j.Logger.getLogger(org.struts.lib.ParaActionSupport.class);public void prepare_local() throws Exception {
logger.info("Inside-->prepare()");
rgn=new RetGratuityNom();
rgn.setMenuCode(121);
}
public String report() throws Exception
{
logger.info("Inside-->report()");
try
{
try {
RetGratuityNomModel model = new RetGratuityNomModel();
model.initiate(context,session);
model.generateReport(rgn,response);
model.terminate();
} catch (Exception e) {
e.printStackTrace();
}
}
catch(Exception e)
{
logger.info("eXCEPTION IN PROCESS OF OT "+e);
}
return null;
}
public String f9type() throws Exception {
//
// BUILD COMPLETE QUERY (ALONG WITH PARAMETERS) WHICH GIVES THE DESIRED
// OUTPUT ALONG WITH PROFILES
//
logger.info("Inside-->report()");
String query = " SELECT EMP_TOKEN,(HRMS_TITLE.TITLE_NAME||' '||EMP_FNAME||' '||EMP_MNAME||' '||EMP_LNAME),EMP_ID FROM HRMS_EMP_OFFC LEFT JOIN HRMS_TITLE ON(HRMS_TITLE.TITLE_CODE=HRMS_EMP_OFFC.EMP_TITLE_CODE) ORDER BY EMP_ID ";
// SET THE HEADER NAMES OF TABLE WHICH IS DISPLAYED IN POP-UP WINDOW. *
String[] headers = { "Token No.", "Employee Name" };
//DEFINE THE PERCENT WIDTH OF EACH COLUMN
String[] headerWidth = { "40", "60" };
// -SET THE FIELDNAMES INTO WHICH THE VALUES ARE BEING POPULATED AFTER A
// ROW IS SELECTED. -USEFULL IN CASES WHERE SUBMIT FLAG IS 'false'
// -PARENT FORM WILL SHOW THE VALUES IN THE FILDS CORRSPONDING TO COLUMN
// INDEX. NOTE: LENGHT OF COLUMN INDEX MUST BE SAME AS THE LENGTH OF
// FIELDNAMES
//
String[] fieldNames = { "empToken","empName","empId" };
// SET THE COLUMN INDEX E.G. SUPPOSE THE POP-UP SHOWS 4 COLUMNS, BUT ON
// CLICKING A ROW ONLY SECOND AND FORTH COLUMN VALUES NEED TO BE SHOWN
// IN THE PARENT WINDOW FIELDS THEN THE COLUMN INDEX CAN BE {1,3}
//NOTE: COLUMN NUMBERS STARTS WITH 0
int[] columnIndex = { 0,1,2 };
// WHEN SET TO 'true' WILL SUBMIT THE FORM
String submitFlag = "false";
// IF THE 'submitFlag' IS 'true' , THE FORM WILL SUBMIT AND CALL
// FOLLOWING METHOD IN THE ACTION * NAMING CONVENSTION: <NAME OF
// ACTION>_<METHOD TO CALL>.action
String submitToMethod = "";
// CALL THIS METHOD AFTER ALL PARAMETERS ARE DEFINED *
setF9Window(query, headers, headerWidth, fieldNames, columnIndex,
submitFlag, submitToMethod);
return "f9page";
}
}
|
[
"Jigar.V@jigar_vasani.THIRDI.COM"
] |
Jigar.V@jigar_vasani.THIRDI.COM
|
d8ffea1ef01fad2affc03ebbf8df5301751142a8
|
07619093ad6342d333a680b99d12125ab0bf55cc
|
/src/main/java/com/imooc/util/JSONUtil.java
|
aa14a7516133a4cdcd8f17e26e9e75b05aa5361c
|
[] |
no_license
|
somepeopleHavingDream/sell
|
a7f5b2cb120771d85d35a8acef48d3da6ed83fd6
|
04f8988a887b8355573185e2f6e7c3ae0f96cda6
|
refs/heads/master
| 2022-08-12T10:14:21.612040
| 2022-08-02T02:55:29
| 2022-08-02T02:55:29
| 188,584,809
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 459
|
java
|
package com.imooc.util;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
/**
* json工具类
*
* @author yangxin
* 2019/10/23 15:57
*/
public class JSONUtil {
/**
* 将对象转换成json
*/
public static String toJSON(Object object) {
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.setPrettyPrinting();
Gson gson = gsonBuilder.create();
return gson.toJson(object);
}
}
|
[
"1393003255@qq.com"
] |
1393003255@qq.com
|
670ca2b66305f98fcf500597e59af53f63d1ba37
|
f7a748eb6803a9f2b609dad279e30513497fa0be
|
/test/com/facebook/buck/event/listener/SuperConsoleConfigTest.java
|
12dceab747927957323c8185f03a2d0577f2cbf4
|
[
"Apache-2.0"
] |
permissive
|
MMeunierSide/buck
|
a44937e207a92a8a8d5df06c1e65308aa2d42328
|
b1aa036a203acb8c4cf2898e0af2a1b88208d232
|
refs/heads/master
| 2020-03-09T23:25:38.016401
| 2018-04-11T04:11:59
| 2018-04-11T05:04:57
| 129,057,807
| 1
| 0
|
Apache-2.0
| 2018-04-11T08:06:36
| 2018-04-11T08:06:35
| null |
UTF-8
|
Java
| false
| false
| 2,822
|
java
|
/*
* Copyright 2017-present Facebook, Inc.
*
* 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.facebook.buck.event.listener;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import com.facebook.buck.config.BuckConfig;
import com.facebook.buck.config.FakeBuckConfig;
import com.facebook.buck.util.Ansi;
import com.facebook.buck.util.CapturingPrintStream;
import com.facebook.buck.util.Console;
import com.facebook.buck.util.Verbosity;
import com.facebook.buck.util.environment.Platform;
import com.google.common.collect.ImmutableMap;
import org.junit.Test;
public class SuperConsoleConfigTest {
@Test
public void testIsEnabled() {
Console nonAnsiConsole =
new Console(
Verbosity.STANDARD_INFORMATION,
new CapturingPrintStream(),
new CapturingPrintStream(),
Ansi.withoutTty());
Console ansiConsole =
new Console(
Verbosity.STANDARD_INFORMATION,
new CapturingPrintStream(),
new CapturingPrintStream(),
Ansi.forceTty());
SuperConsoleConfig enabledConfig = createConfigWithSuperConsoleValue("enabled");
assertTrue(enabledConfig.isEnabled(null, Platform.LINUX));
SuperConsoleConfig disabledConfig = createConfigWithSuperConsoleValue("disabled");
assertFalse(disabledConfig.isEnabled(null, Platform.LINUX));
SuperConsoleConfig autoConfig = createConfigWithSuperConsoleValue("auto");
assertTrue(autoConfig.isEnabled(ansiConsole, Platform.LINUX));
assertFalse(autoConfig.isEnabled(nonAnsiConsole, Platform.LINUX));
assertFalse(autoConfig.isEnabled(ansiConsole, Platform.WINDOWS));
SuperConsoleConfig emptyConfig = new SuperConsoleConfig(FakeBuckConfig.builder().build());
assertTrue(emptyConfig.isEnabled(ansiConsole, Platform.LINUX));
assertFalse(emptyConfig.isEnabled(nonAnsiConsole, Platform.LINUX));
assertFalse(emptyConfig.isEnabled(ansiConsole, Platform.WINDOWS));
}
private SuperConsoleConfig createConfigWithSuperConsoleValue(String enabled) {
BuckConfig enabledConfig =
FakeBuckConfig.builder()
.setSections(ImmutableMap.of("ui", ImmutableMap.of("superconsole", enabled)))
.build();
return new SuperConsoleConfig(enabledConfig);
}
}
|
[
"facebook-github-bot@users.noreply.github.com"
] |
facebook-github-bot@users.noreply.github.com
|
abebc6bf0b26c21b12059be798c18192e72fe496
|
03a289c1012bc0f84d6b232bf5e274a4eb5dfec0
|
/JavaLearning/designPattern/src/main/java/com/leon/artofpattern/flyweight/exercise/FlyWeight.java
|
cc22c603072564a95e3c6d8d51c2b1ac1d71ac80
|
[] |
no_license
|
severalfly/MyTest
|
f4d93f0cf8a4b7204861a2254670a095affccbe7
|
27f831899378b5602b32e29ca778cab63d604a14
|
refs/heads/master
| 2022-12-20T08:13:10.727855
| 2019-07-16T14:21:28
| 2019-07-16T14:21:28
| 22,954,817
| 0
| 0
| null | 2022-12-10T04:18:57
| 2014-08-14T13:30:12
|
C
|
UTF-8
|
Java
| false
| false
| 176
|
java
|
package com.leon.artofpattern.flyweight.exercise;
public abstract class FlyWeight
{
public void display(Location location)
{
System.out.println(location);
}
}
|
[
"zhangsmile90@gmail.com"
] |
zhangsmile90@gmail.com
|
4d2871bb43bbee166c0ff3f5b64641a0848ab3cc
|
c8ee6fc67d3c1e55e1bd81f2089004ded8902bae
|
/cw-app-biz/src/main/java/com/cw/biz/home/domain/entity/AppModule.java
|
9a9d57e2a3a58ea1bbd0684723930c4b3f83c502
|
[] |
no_license
|
Away-Leo/cw-app
|
3f08e69355b8dbda10c36b606ae22f518df07ba7
|
034dfe5534ace27e75e2af680d4e43c95758672e
|
refs/heads/master
| 2022-10-26T21:19:36.461487
| 2019-08-10T21:21:38
| 2019-08-10T21:21:38
| 196,578,757
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 865
|
java
|
package com.cw.biz.home.domain.entity;
import com.cw.biz.common.entity.AggEntity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
* APP所属模块
* Created by Administrator on 2017/7/28.
*/
@Entity
@Table(name="cw_module_app")
@Getter
@Setter
public class AppModule extends AggEntity {
@Column(name="app_name",columnDefinition="varchar(100) not null comment '应用名称'")
private String appName;
@Column(name="module_ids",columnDefinition="varchar(200) comment 'app对应的模块组合'")
private String moduleIds;
@Column(name="is_valid",columnDefinition="tinyint(1) not null comment '是否有效'")
private Boolean isValid=Boolean.TRUE;
/**
* 保存数据验证
*/
public void prepareSave()
{
}
}
|
[
"781720639@qq.com"
] |
781720639@qq.com
|
56fb5046ea2bc4ed72e4c55a2cdab1b3afafe6fd
|
41ce5edf2e270e321dddd409ffac11ab7f32de86
|
/3/com/android/inputmethod/latin/LatinKeyboardView.java
|
363dcd0b051706e29e35c64071188d2b59efa806
|
[] |
no_license
|
danny-source/SDK_Android_Source_03-14
|
372bb03020203dba71bc165c8370b91c80bc6eaa
|
323ad23e16f598d5589485b467bb9fba7403c811
|
refs/heads/master
| 2020-05-18T11:19:29.171830
| 2014-03-29T12:12:44
| 2014-03-29T12:12:44
| 18,238,039
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,977
|
java
|
/*
* Copyright (C) 2008-2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.android.inputmethod.latin;
import android.content.Context;
import android.graphics.Canvas;
import android.inputmethodservice.Keyboard;
import android.inputmethodservice.KeyboardView;
import android.inputmethodservice.Keyboard.Key;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.util.AttributeSet;
import android.view.MotionEvent;
import java.util.List;
public class LatinKeyboardView extends KeyboardView {
static final int KEYCODE_OPTIONS = -100;
static final int KEYCODE_SHIFT_LONGPRESS = -101;
private Keyboard mPhoneKeyboard;
public LatinKeyboardView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public LatinKeyboardView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public void setPhoneKeyboard(Keyboard phoneKeyboard) {
mPhoneKeyboard = phoneKeyboard;
}
@Override
protected boolean onLongPress(Key key) {
if (key.codes[0] == Keyboard.KEYCODE_MODE_CHANGE) {
getOnKeyboardActionListener().onKey(KEYCODE_OPTIONS, null);
return true;
} else if (key.codes[0] == Keyboard.KEYCODE_SHIFT) {
getOnKeyboardActionListener().onKey(KEYCODE_SHIFT_LONGPRESS, null);
invalidate();
return true;
} else if (key.codes[0] == '0' && getKeyboard() == mPhoneKeyboard) {
// Long pressing on 0 in phone number keypad gives you a '+'.
getOnKeyboardActionListener().onKey('+', null);
return true;
} else {
return super.onLongPress(key);
}
}
/**************************** INSTRUMENTATION *******************************/
static final boolean DEBUG_AUTO_PLAY = false;
private static final int MSG_TOUCH_DOWN = 1;
private static final int MSG_TOUCH_UP = 2;
Handler mHandler2;
private String mStringToPlay;
private int mStringIndex;
private boolean mDownDelivered;
private Key[] mAsciiKeys = new Key[256];
private boolean mPlaying;
@Override
public void setKeyboard(Keyboard k) {
super.setKeyboard(k);
if (DEBUG_AUTO_PLAY) {
findKeys();
if (mHandler2 == null) {
mHandler2 = new Handler() {
@Override
public void handleMessage(Message msg) {
removeMessages(MSG_TOUCH_DOWN);
removeMessages(MSG_TOUCH_UP);
if (mPlaying == false) return;
switch (msg.what) {
case MSG_TOUCH_DOWN:
if (mStringIndex >= mStringToPlay.length()) {
mPlaying = false;
return;
}
char c = mStringToPlay.charAt(mStringIndex);
while (c > 255 || mAsciiKeys[(int) c] == null) {
mStringIndex++;
if (mStringIndex >= mStringToPlay.length()) {
mPlaying = false;
return;
}
c = mStringToPlay.charAt(mStringIndex);
}
int x = mAsciiKeys[c].x + 10;
int y = mAsciiKeys[c].y + 26;
MotionEvent me = MotionEvent.obtain(SystemClock.uptimeMillis(),
SystemClock.uptimeMillis(),
MotionEvent.ACTION_DOWN, x, y, 0);
LatinKeyboardView.this.dispatchTouchEvent(me);
me.recycle();
sendEmptyMessageDelayed(MSG_TOUCH_UP, 500); // Deliver up in 500ms if nothing else
// happens
mDownDelivered = true;
break;
case MSG_TOUCH_UP:
char cUp = mStringToPlay.charAt(mStringIndex);
int x2 = mAsciiKeys[cUp].x + 10;
int y2 = mAsciiKeys[cUp].y + 26;
mStringIndex++;
MotionEvent me2 = MotionEvent.obtain(SystemClock.uptimeMillis(),
SystemClock.uptimeMillis(),
MotionEvent.ACTION_UP, x2, y2, 0);
LatinKeyboardView.this.dispatchTouchEvent(me2);
me2.recycle();
sendEmptyMessageDelayed(MSG_TOUCH_DOWN, 500); // Deliver up in 500ms if nothing else
// happens
mDownDelivered = false;
break;
}
}
};
}
}
}
private void findKeys() {
List<Key> keys = getKeyboard().getKeys();
// Get the keys on this keyboard
for (int i = 0; i < keys.size(); i++) {
int code = keys.get(i).codes[0];
if (code >= 0 && code <= 255) {
mAsciiKeys[code] = keys.get(i);
}
}
}
void startPlaying(String s) {
if (!DEBUG_AUTO_PLAY) return;
if (s == null) return;
mStringToPlay = s.toLowerCase();
mPlaying = true;
mDownDelivered = false;
mStringIndex = 0;
mHandler2.sendEmptyMessageDelayed(MSG_TOUCH_DOWN, 10);
}
@Override
public void draw(Canvas c) {
super.draw(c);
if (DEBUG_AUTO_PLAY && mPlaying) {
mHandler2.removeMessages(MSG_TOUCH_DOWN);
mHandler2.removeMessages(MSG_TOUCH_UP);
if (mDownDelivered) {
mHandler2.sendEmptyMessageDelayed(MSG_TOUCH_UP, 20);
} else {
mHandler2.sendEmptyMessageDelayed(MSG_TOUCH_DOWN, 20);
}
}
}
}
|
[
"danny@35g.tw"
] |
danny@35g.tw
|
3acb00147c2d698461ce212814b62071a34d74c4
|
3070f1dd95f19d028a510d5ab2ca13b0316e97e6
|
/fxgl/src/test/java/manual/ViewportTest.java
|
fce3199a8d2f20faa0fba0371b1c83ea89973bb0
|
[
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
GeTOUO/FXGL
|
2531cbcc4cd9ed10247130db4c1108a368169f55
|
b7bfc6b4248aa68ab8ff2106fb754c9a9d2fc269
|
refs/heads/master
| 2021-05-07T19:50:11.994279
| 2017-10-16T13:38:47
| 2017-10-16T13:38:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,453
|
java
|
/*
* FXGL - JavaFX Game Library. The MIT License (MIT).
* Copyright (c) AlmasB (almaslvl@gmail.com).
* See LICENSE for details.
*/
package manual;
import com.almasb.fxgl.annotation.OnUserAction;
import com.almasb.fxgl.app.ApplicationMode;
import com.almasb.fxgl.app.FXGL;
import com.almasb.fxgl.app.GameApplication;
import com.almasb.fxgl.entity.Entities;
import com.almasb.fxgl.entity.GameEntity;
import com.almasb.fxgl.entity.component.BoundingBoxComponent;
import com.almasb.fxgl.entity.component.PositionComponent;
import com.almasb.fxgl.input.ActionType;
import com.almasb.fxgl.input.Input;
import com.almasb.fxgl.input.InputMapping;
import com.almasb.fxgl.settings.GameSettings;
import javafx.scene.input.KeyCode;
import javafx.scene.input.MouseButton;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text;
public class ViewportTest extends GameApplication {
private PositionComponent playerPosition;
private BoundingBoxComponent bbox;
@Override
protected void initSettings(GameSettings settings) {
settings.setWidth(800);
settings.setHeight(600);
settings.setTitle("ViewportTest");
settings.setVersion("0.1");
settings.setFullScreen(false);
settings.setIntroEnabled(false);
settings.setMenuEnabled(false);
settings.setProfilingEnabled(true);
settings.setApplicationMode(ApplicationMode.DEVELOPER);
}
@Override
protected void initInput() {
Input input = getInput();
input.addInputMapping(new InputMapping("Move Left", KeyCode.A));
input.addInputMapping(new InputMapping("Move Right", KeyCode.D));
input.addInputMapping(new InputMapping("Move Up", KeyCode.W));
input.addInputMapping(new InputMapping("Move Down", KeyCode.S));
input.addInputMapping(new InputMapping("Shoot", MouseButton.PRIMARY));
}
@Override
protected void initAssets() {}
@Override
protected void initGame() {
GameEntity entity = Entities.builder()
.at(100, 100)
.viewFromNodeWithBBox(new Rectangle(40, 40))
.buildAndAttach(getGameWorld());
playerPosition = entity.getPositionComponent();
bbox = entity.getBoundingBoxComponent();
}
@Override
protected void initPhysics() {}
private Text debug;
@Override
protected void initUI() {
debug = FXGL.getUIFactory().newText("", Color.BLUE, 24);
debug.setTranslateX(200);
debug.setTranslateY(350);
getGameScene().addUINode(debug);
}
@Override
public void onUpdate(double tpf) {
debug.setText("Player is inside viewport: "
+ bbox.isWithin(getGameScene().getViewport().getVisibleArea()));
}
@OnUserAction(name = "Move Left", type = ActionType.ON_ACTION)
public void moveLeft() {
playerPosition.translate(-5, 0);
}
@OnUserAction(name = "Move Right", type = ActionType.ON_ACTION)
public void moveRight() {
playerPosition.translate(5, 0);
}
@OnUserAction(name = "Move Up", type = ActionType.ON_ACTION)
public void moveUp() {
playerPosition.translate(0, -5);
}
@OnUserAction(name = "Move Down", type = ActionType.ON_ACTION)
public void moveDown() {
playerPosition.translate(0, 5);
}
public static void main(String[] args) {
launch(args);
}
}
|
[
"almaslvl@gmail.com"
] |
almaslvl@gmail.com
|
60d572d4da022a702ab1a15af8a88605f6888c78
|
1420ba90b0617caef56cd4dbb385b22924f001eb
|
/tour-android/app/src/main/java/cn/xmzt/www/nim/uikit/common/util/C.java
|
d8c0bf59dbac49a6759e63216dece92cda398979
|
[] |
no_license
|
similar718/tour_p
|
7a4dbf5267b2bb119887791b0a09416ac6071642
|
2bb766983fe397c90437608a3dbee482ffda7ad0
|
refs/heads/master
| 2020-11-26T06:32:22.172843
| 2019-12-20T03:30:59
| 2019-12-20T03:30:59
| 228,989,138
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,044
|
java
|
package cn.xmzt.www.nim.uikit.common.util;
public class C {
// 视频允许大小
public static final long MAX_LOCAL_VIDEO_FILE_SIZE = 20 * 1024 * 1024;
// 关于文件后缀的常量
public static final class FileSuffix {
public static final String JPG = ".jpg";
public static final String PNG = ".png";
public static final String M4A = ".m4a";
public static final String THREE_3GPP = ".3gp";
public static final String BMP = ".bmp";
public static final String MP4 = ".mp4";
public static final String AMR_NB = ".amr";
public static final String APK = ".apk";
public static final String AAC = ".aac";
}
// 关于mimetype的常量
public static final class MimeType {
public static final String MIME_JPEG = "image/jpeg";
public static final String MIME_PNG = "image/png";
public static final String MIME_BMP = "image/x-MS-bmp";
public static final String MIME_GIF = "image/gif";
public static final String MIME_AUDIO_3GPP = "audio/3gpp";
public static final String MIME_AUDIO_MP4 = "audio/mp4";
public static final String MIME_AUDIO_M4A = "audio/m4a";
public static final String MIME_AUDIO_AMR_NB = "audio/amr";
public static final String MIME_AUDIO_AAC = "audio/aac";
public static final String MIME_TXT = "txt/txt";// 用 于PC长消息
public static final String MIME_WAPPUSH_SMS = "message/sms";
public static final String MIME_WAPPUSH_TEXT = "txt/wappush"; // 文字wappush
public static final String MIME_MUSIC_LOVE = "music/love"; // 爱音乐
public static final String MIME_MUSIC_XIA = "music/xia"; // 虾米音乐
public static final String MIME_VIDEO_3GPP = "video/3gpp";
public static final String MIME_VIDEO_ALL = "video/*";
public static final String MIME_LOCATION_GOOGLE = "location/google";
}
}
|
[
"1170214556@qq.com"
] |
1170214556@qq.com
|
fbb49c4ef46a028c49dec3553a65eed8e586ec8a
|
246ab67acefec1b5c6cd65b52330f25dcf3d02c7
|
/ChatUI/src/main/java/com/sinothk/chat/ui/style1/ChatBean.java
|
9382e4654d2068b281c38a5f907cb486063525a3
|
[] |
no_license
|
sinothk/ChatUI
|
c96ebc20b71d85492db140583a464bb33fc04fe3
|
44f36387b11c7fa6da62be98bb713bde61c6aee4
|
refs/heads/master
| 2020-09-29T10:14:38.960403
| 2019-12-17T09:16:17
| 2019-12-17T09:16:17
| 227,017,163
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 405
|
java
|
package com.sinothk.chat.ui.style1;
/**
* ChatBean
* Created by 90Chris on 2015/11/24.
*/
public class ChatBean {
private String tag;
private String textMsg;
public ChatBean(String tag, String textMsg) {
this.tag = tag;
this.textMsg = textMsg;
}
public String getTag() {
return tag;
}
public String getTextMsg() {
return textMsg;
}
}
|
[
"381518188@qq.com"
] |
381518188@qq.com
|
9ac5e206138291aaec4473537c1c2e0d88fe5727
|
856256e888ec4363b84a9291c48eb09eb1f7d4b2
|
/src/main/java/net/canarymod/api/entity/living/monster/CanaryWitch.java
|
ecd83f37c24ce10338e97db9541b66ba91165fee
|
[] |
no_license
|
FallenMoonNetwork/CanaryRecode
|
fc7cc461ca3fb6af05c6ac36f449d234d75fee8b
|
5ebbf4104ee2a90a856ba6f3367da6cd7ff7e999
|
refs/heads/master
| 2016-09-03T00:32:29.983048
| 2013-11-06T10:25:29
| 2013-11-06T10:25:29
| 4,693,967
| 3
| 2
| null | 2014-01-02T15:00:50
| 2012-06-17T18:42:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,103
|
java
|
package net.canarymod.api.entity.living.monster;
import net.canarymod.api.entity.EntityType;
import net.minecraft.server.EntityWitch;
/**
* Witch wrapper implementation
*
* @author Jason (darkdiplomat)
*/
public class CanaryWitch extends CanaryEntityMob implements Witch {
/**
* Constructs a new wrapper for EntityWitch
*
* @param entity
* the EntityWitch to wrap
*/
public CanaryWitch(EntityWitch entity) {
super(entity);
}
/**
* {@inheritDoc}
*/
@Override
public EntityType getEntityType() {
return EntityType.WITCH;
}
@Override
public String getFqName() {
return "Witch";
}
/**
* {@inheritDoc}
*/
@Override
public boolean isAgressive() {
return getHandle().bT();
}
/**
* {@inheritDoc}
*/
@Override
public void setAggressive(boolean aggressive) {
getHandle().a(aggressive);
}
/**
* {@inheritDoc}
*/
@Override
public EntityWitch getHandle() {
return (EntityWitch) entity;
}
}
|
[
"darkdiplomat@visualillusionsent.net"
] |
darkdiplomat@visualillusionsent.net
|
84f309b2ab242e7ddc5a23220e937088fac83fe6
|
0fe68de3c4e325e99c865db3f525888f9b3724f0
|
/creational-patterns-ref/src/main/java/br/com/cod3r/prototype/deepShallow/model/Address.java
|
f298df7871f42fda50f2633be951064ebe847267
|
[] |
no_license
|
danielbortolozo/designer-pattern
|
3579b5fe88f6a3b27600b9e59733d3db6623e083
|
da7b7fcebcff9ec08bda049202a41bc3aae734c9
|
refs/heads/main
| 2023-03-14T03:32:05.780367
| 2021-03-04T01:49:56
| 2021-03-04T01:49:56
| 344,316,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 487
|
java
|
package br.com.cod3r.prototype.deepShallow.model;
public class Address implements Cloneable {
public String street;
public Integer number;
public Address(String street, Integer number) {
super();
this.street = street;
this.number = number;
}
@Override
public String toString() {
return "Address [street=" + street + ", number=" + number + "]";
}
@Override
public Object clone() throws CloneNotSupportedException {
return super.clone();
}
}
|
[
"danielbortolozo@hotmail.com"
] |
danielbortolozo@hotmail.com
|
1bdc2b9dc2c4ba1077186736ea7e1e98db798d7f
|
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
|
/genny_JavaWithoutLambdas/applicationModule/src/test/java/applicationModulepackageJava10/Foo692Test.java
|
b327ca713dc0524ca2da45191c7cee8115fabcce
|
[] |
no_license
|
NikitaKozlov/generated-project-for-desugaring
|
0bc1443ab3ddc84cd289331c726761585766aea7
|
81506b3711004185070ca4bb9a93482b70011d36
|
refs/heads/master
| 2020-03-20T00:35:06.996525
| 2018-06-12T09:30:37
| 2018-06-12T09:30:37
| 137,049,317
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 482
|
java
|
package applicationModulepackageJava10;
import org.junit.Test;
public class Foo692Test {
@Test
public void testFoo0() {
new Foo692().foo0();
}
@Test
public void testFoo1() {
new Foo692().foo1();
}
@Test
public void testFoo2() {
new Foo692().foo2();
}
@Test
public void testFoo3() {
new Foo692().foo3();
}
@Test
public void testFoo4() {
new Foo692().foo4();
}
@Test
public void testFoo5() {
new Foo692().foo5();
}
}
|
[
"nikita.e.kozlov@gmail.com"
] |
nikita.e.kozlov@gmail.com
|
67d3528ab2d9fba592696b928b767cefadad0b17
|
b8e79465242a0673e9952f7e76da8c047a46d86e
|
/src/main/java/com/opensearchserver/client/v1/field/ResultFieldList.java
|
67248d93caab0d84ea11118aa8bf03031ca24476
|
[
"Apache-2.0"
] |
permissive
|
jaeksoft/oss-java-client
|
2284ca26272c90a1c30468913b9fec4390f43466
|
771000315015b5cc2b929022d65ee908b91849cb
|
refs/heads/master
| 2021-01-21T04:35:29.430057
| 2016-08-09T11:43:53
| 2016-08-09T11:43:53
| 29,774,143
| 0
| 3
| null | 2016-08-09T11:43:53
| 2015-01-24T11:15:35
|
Java
|
UTF-8
|
Java
| false
| false
| 2,109
|
java
|
/**
* Copyright 2014-2015 OpenSearchServer Inc.
*
* 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.opensearchserver.client.v1.field;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.opensearchserver.client.common.CommonResult;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "result")
public class ResultFieldList extends CommonResult {
@XmlElement(name = "unique")
@JsonProperty("unique")
public String uniqueField;
@XmlElement(name = "default")
@JsonProperty("default")
public String defaultField;
public List<SchemaField> fields;
public ResultFieldList() {
fields = null;
uniqueField = null;
defaultField = null;
}
/**
* @param uniqueField
* the uniqueField to set
* @return this instance
*/
public ResultFieldList setUniqueField(String uniqueField) {
this.uniqueField = uniqueField;
return this;
}
/**
* @param defaultField
* the defaultField to set
* @return this instance
*/
public ResultFieldList setDefaultField(String defaultField) {
this.defaultField = defaultField;
return this;
}
/**
* @param fields
* the fields to set
* @return this instance
*/
public ResultFieldList setFields(List<SchemaField> fields) {
this.fields = fields;
return this;
}
}
|
[
"ekeller@open-search-server.com"
] |
ekeller@open-search-server.com
|
24229784f2322ba80b0548970744ba0f35f9cbbe
|
de0e24c1cbb823b16d5a4316d4be5ca6b8bf78d0
|
/qa/src/main/java/org/apache/river/qa/harness/StartClassServerRequest.java
|
ec65fff588e50ea33de4e7928b134907a114821f
|
[
"BSD-3-Clause",
"Apache-2.0",
"MIT"
] |
permissive
|
dreedyman/apache-river
|
2812ffe56bd9070c56c92c04de917472d9b5ddd9
|
d2829fb82ba552e2f90ad8d42667fd7be49be777
|
refs/heads/master
| 2022-11-28T16:50:40.117022
| 2020-08-10T17:16:51
| 2020-08-10T17:16:51
| 279,403,665
| 0
| 0
|
Apache-2.0
| 2020-08-10T17:16:53
| 2020-07-13T20:21:36
|
Java
|
UTF-8
|
Java
| false
| false
| 2,061
|
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.river.qa.harness;
/**
* A <code>SlaveRequest</code> to start a service.
*/
class StartClassServerRequest implements SlaveRequest {
/** the service name */
private String serviceName;
/**
* Construct the request.
*
* @param serviceName the service name
*/
StartClassServerRequest(String serviceName) {
this.serviceName = serviceName;
}
/**
* Called by the <code>SlaveTest</code> after unmarshalling this object.
* The <code>AdminManager</code> is retrieved from the slave test,
* an admin is retrieved from the manager, and the admins <code>start</code>
* method is called. The <code>serviceName</code> should be the name
* of a class server, although no check is performed to verify this.
* <code>null</code> is returned since the class server 'proxy' is
* a local reference which is not serializable.
*
* @param slaveTest a reference to the <code>SlaveTest</code>
* @return null
* @throws Exception if an error occurs starting the service
*/
public Object doSlaveRequest(SlaveTest slaveTest) throws Exception {
Admin admin = slaveTest.getAdminManager().getAdmin(serviceName, 0);
admin.start();
return null;
}
}
|
[
"zkuti@chemaxon.com"
] |
zkuti@chemaxon.com
|
30e663093609ba327bc3515650e6e2b7442ed1da
|
07a71837812e75194c42f3f6c2943acac5ded5c4
|
/ekartMS-master/cardMS_final/src/main/java/com/infosys/ekart/repository/CardRepository.java
|
d9e7e9ba47d792763a5c5c107af5e06a5f8d9adc
|
[] |
no_license
|
PriMon-07/Ekart
|
aa3d850b2ed5e76f05f798f62538eb5679f96fab
|
ad129fd3007451b02245d8c4e60e1706bba175f0
|
refs/heads/main
| 2023-01-24T23:54:31.156765
| 2020-12-08T12:40:29
| 2020-12-08T12:40:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 699
|
java
|
package com.infosys.ekart.repository;
import java.util.List;
import javax.transaction.Transactional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.infosys.ekart.entity.CardEntity;
@Repository
public interface CardRepository extends JpaRepository<CardEntity, Integer> {
public CardEntity findByUserIdAndCardNumber(String userId, String cardNumber);
List<CardEntity> findByUserId(String userId);
CardEntity findByCardNumberAndExpiryMonthAndExpiryYearAndNameOnCard(String cardNumber, String expiryMonth,
String expiryYear, String nameOnCard);
@Transactional
Integer deleteByCardNumber(String cardNumber);
}
|
[
"="
] |
=
|
b945d31f237d3d95f7926c2a1905817a68396f9d
|
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
|
/subject SPLs and test cases/BerkeleyDB(5)/BerkeleyDB_P2/evosuite-tests5/com/sleepycat/je/log/ScavengerFileReader_ESTest5.java
|
2a59c4d1016a8298f012f2698ff645040d8b2d4d
|
[] |
no_license
|
psjung/SRTST_experiments
|
6f1ff67121ef43c00c01c9f48ce34f31724676b6
|
40961cb4b4a1e968d1e0857262df36832efb4910
|
refs/heads/master
| 2021-06-20T04:45:54.440905
| 2019-09-06T04:05:38
| 2019-09-06T04:05:38
| 206,693,757
| 1
| 0
| null | 2020-10-13T15:50:41
| 2019-09-06T02:10:06
|
Java
|
UTF-8
|
Java
| false
| false
| 519
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Apr 22 10:59:15 KST 2017
*/
package com.sleepycat.je.log;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVNET = true)
public class ScavengerFileReader_ESTest5 extends ScavengerFileReader_ESTest_scaffolding5 {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"psjung@kaist.ac.kr"
] |
psjung@kaist.ac.kr
|
5aaa2ce6ff89a89baeee95d1fb841224b7a3b51b
|
0e2eed7cca32367c797938e3c8e24e5d83ba2ca8
|
/app/src/main/java/com/xkj/binaryoption/utils/dateUtils.java
|
46dca57996d8be579288786b04dbc816d1288a49
|
[] |
no_license
|
AreYReady/BinaryOption
|
fd23c098ccdf58adeb678a350335ba0d0f4fe548
|
60bd6c3b3dbe275f2a39c7fe2b3270a000991595
|
refs/heads/master
| 2021-01-19T23:52:28.954837
| 2017-05-13T03:05:26
| 2017-05-13T03:05:26
| 89,043,127
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,233
|
java
|
package com.xkj.binaryoption.utils;
import android.text.format.Time;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;
/**
* Created by huangsc on 2017-04-28.
* TODO:
*/
public class DateUtils {
/**
* @author xjunda
* Created at 2016-07-16 10:46
* 获取x轴时间格式 10位 unix时间戳
*/
public static String getXTime(long time) {
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone(getCurrentTimeZone()));
return sdf.format(new Date(time * 1000));
}
/**
* @author huangsc
* Created at 2016-11-16 10:46
* 10位 unix时间戳
*/
public static String getCurrentTimeNoS() {
SimpleDateFormat formatter = new SimpleDateFormat("HH:mm");
Date currentTime = new Date();
String dateString = formatter.format(currentTime);
return dateString;
}
public static Long getCurrentTimeHHMMNoS() throws ParseException {
// SimpleDateFormat formatter = new SimpleDateFormat("HH:mm");
// Date currentTime = new Date();
// String dateString = formatter.format(currentTime);
// return dateToLong(currentTime);
Time time = new Time();
time.setToNow();
return stringToLong(time.hour + ":" + time.minute, "HH:mm");
}
//算法是当前时间减去8:00得出来的毫毛值
public static long stringToLong(String strTime, String formatType)
throws ParseException {
Date date = stringToDate(strTime, formatType); // String类型转成date类型
if (date == null) {
return 0;
} else {
long currentTime = dateToLong(date); // date类型转成long类型
return currentTime;
}
}
// string类型转换为date类型
// strTime要转换的string类型的时间,formatType要转换的格式yyyy-MM-dd HH:mm:ss//yyyy年MM月dd日
// HH时mm分ss秒,
// strTime的时间格式必须要与formatType的时间格式相同
public static Date stringToDate(String strTime, String formatType)
throws ParseException {
SimpleDateFormat formatter = new SimpleDateFormat(formatType);
Date date = null;
date = formatter.parse(strTime);
return date;
}
// date类型转换为long类型
// date要转换的date类型的时间
public static long dateToLong(Date date) {
return date.getTime();
}
/**
* 获取时间天、小时单为位
*
* @param time
* @return
*/
public static String getXTimeDay(long time) {
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd HH");
sdf.setTimeZone(TimeZone.getTimeZone(getCurrentTimeZone()));
return sdf.format(new Date(time * 1000));
}
/**
* @author xjunda
* Created at 2016-07-16 11:01
* 获取当前时间格式
*/
public static String getShowTime(long time) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone(getCurrentTimeZone()));
return sdf.format(new Date(time));
}
/**
* @author xjunda
* Created at 2016-07-16 11:01
* 获取当前时间格式没有时区
*/
public static String getShowTimeNoTimeZone(long time) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(new Date(time));
}
public static String getShowTimeNoTimeZone(long time,String format) {
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.format(new Date(time));
}
/**
* 获取订单开始时间
*
* @param open_time
* @return
*/
public static long getOrderStartTime(String open_time) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone(getCurrentTimeZone()));
try {
return sdf.parse(open_time).getTime();
} catch (ParseException e) {
e.printStackTrace();
}
return -1;
}
/**
* 获取订单开始时间
*
* @param open_time
* @return
*/
public static long getOrderStartTimeNoTimeZone(String open_time) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
return sdf.parse(open_time).getTime();
} catch (ParseException e) {
e.printStackTrace();
}
return -1;
}
/**
* 获取订单开始时间
*
* @param open_time
* @param format 时间格式
* @return
*/
public static long getOrderStartTimeNoTimeZone(String open_time,String format) {
SimpleDateFormat sdf = new SimpleDateFormat(format);
try {
return sdf.parse(open_time).getTime();
} catch (ParseException e) {
e.printStackTrace();
}
return -1;
}
private static String getCurrentTimeZone() {
TimeZone tz = TimeZone.getDefault();
return createGmtOffsetString(true, true, tz.getRawOffset());
}
private static String createGmtOffsetString(boolean includeGmt,
boolean includeMinuteSeparator, int offsetMillis) {
int offsetMinutes = offsetMillis / 60000;
char sign = '+';
if (offsetMinutes < 0) {
sign = '-';
offsetMinutes = -offsetMinutes;
}
StringBuilder builder = new StringBuilder(9);
if (includeGmt) {
builder.append("GMT");
}
builder.append(sign);
appendNumber(builder, 2, offsetMinutes / 60);
if (includeMinuteSeparator) {
builder.append(':');
}
// appendNumber(builder, 2, offsetMinutes % 60);
return builder.toString();
}
private static void appendNumber(StringBuilder builder, int count, int value) {
String string = Integer.toString(value);
for (int i = 0; i < count - string.length(); i++) {
builder.append('0');
}
builder.append(string);
}
}
|
[
"jimdaxu@qq.com"
] |
jimdaxu@qq.com
|
25596e4be18c04d334c8158fdab0aee644d7c77c
|
d895eecddb20db0286ce8bde880d8f2fba3897b8
|
/src/main/java/org/orecruncher/dsurround/client/handlers/fog/HolisticFogColorCalculator.java
|
9312256b8c11f39b8f0a097e8b82e071565d9a9e
|
[
"MIT"
] |
permissive
|
Smollet777/DynamicSurroundings
|
1d6f22a6f9a9a119b15b0aeabbd3486ad3b47496
|
220eb3afc03d7e46935b08a194980c85a71d4d2e
|
refs/heads/master
| 2021-04-19T21:11:37.124477
| 2020-02-01T22:07:47
| 2020-02-01T22:07:47
| 249,633,997
| 0
| 0
|
MIT
| 2020-03-24T06:50:56
| 2020-03-24T06:50:55
| null |
UTF-8
|
Java
| false
| false
| 2,414
|
java
|
/*
* This file is part of Dynamic Surroundings, licensed under the MIT License (MIT).
*
* Copyright (c) OreCruncher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package org.orecruncher.dsurround.client.handlers.fog;
import javax.annotation.Nonnull;
import org.orecruncher.lib.Color;
import org.orecruncher.lib.collections.ObjectArray;
import net.minecraftforge.client.event.EntityViewRenderEvent;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class HolisticFogColorCalculator implements IFogColorCalculator {
protected ObjectArray<IFogColorCalculator> calculators = new ObjectArray<>(4);
protected Color cached;
public void add(@Nonnull final IFogColorCalculator calc) {
this.calculators.add(calc);
}
@Override
public Color calculate(@Nonnull final EntityViewRenderEvent.FogColors event) {
Color result = null;
for (int i = 0; i < this.calculators.size(); i++) {
final Color color = this.calculators.get(i).calculate(event);
if (result == null)
result = color;
else if (color != null)
result = result.mix(color);
}
return this.cached = result;
}
@Override
public void tick() {
this.calculators.forEach(IFogColorCalculator::tick);
}
@Override
public String toString() {
return this.cached != null ? this.cached.toString() : "<NOT SET>";
}
}
|
[
"tedjkaiser@gmail.com"
] |
tedjkaiser@gmail.com
|
79c78f6efc80441a4732666b21cc54678723aa18
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/56/1057.java
|
32be6742e5819e60f0e713cdcb6616723297bbfa
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,016
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
String n = new String(new char[5]);
String p;
int l;
int a;
int b;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = tempVar.charAt(0);
}
p = n;
l = n.length();
if (l == 1)
{
System.out.printf("%s",n);
}
else if (l == 2)
{
a = p;
p = *(p.Substring(1));
*(p.Substring(1)) = a;
System.out.printf("%s",n);
}
else if (l == 3)
{
a = p;
p = *(p.Substring(2));
*(p.Substring(2)) = a;
System.out.printf("%s",n);
}
else if (l == 4)
{
a = p;
b = (p.Substring(1));
p = *(p.Substring(3));
*(p.Substring(1)) = *(p.Substring(2));
*(p.Substring(3)) = a;
*(p.Substring(2)) = b;
System.out.printf("%s",n);
}
else if (l == 5)
{
a = p;
b = (p.Substring(1));
p = *(p.Substring(4));
*(p.Substring(1)) = *(p.Substring(3));
*(p.Substring(4)) = a;
*(p.Substring(3)) = b;
System.out.printf("%s",n);
}
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
5b076e91dc93e68c081fac86dc4bdb93cbcb17ee
|
2a1f6afb809b5d3347bd1a4521d2f876665cc2ca
|
/demo/j2cl/src/main/java/org/treblereel/mvp/presenter/javascript/TabPresenter.java
|
87fc533a5da325d0f4f99def3ace230da1d2db7d
|
[
"Apache-2.0"
] |
permissive
|
treblereel/gwtbootstrap3
|
8ddab0f20a2222be79c44894f202194b4bae6606
|
f362536b6a0dc4994db5d1bab5bd2d69e49123b4
|
refs/heads/master
| 2022-04-30T20:20:58.179484
| 2022-03-31T04:33:55
| 2022-03-31T04:33:55
| 190,029,044
| 9
| 0
|
Apache-2.0
| 2022-03-31T04:33:55
| 2019-06-03T15:08:43
|
Java
|
UTF-8
|
Java
| false
| false
| 1,109
|
java
|
package org.treblereel.mvp.presenter.javascript;
/*
* #%L
* GwtBootstrap3
* %%
* Copyright (C) 2013 - 2021 GwtBootstrap3
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
import org.gwtproject.user.client.ui.Panel;
import org.treblereel.mvp.presenter.Presenter;
import org.treblereel.mvp.view.javascript.TabView;
/**
* @author Dmitrii Tikhomirov
* Created by treblereel 7/29/19
*/
public class TabPresenter implements Presenter {
private TabView display = new TabView();
@Override
public void dispatch(Panel container) {
container.add(display);
}
}
|
[
"chani.liet@gmail.com"
] |
chani.liet@gmail.com
|
f2097fe8e1f460fcfdcca58f045889e9fad00c85
|
7b12f67da8c10785efaebe313547a15543a39c77
|
/jjg-common-base/src/main/java/com/xdl/jjg/redisson/config/strategy/RedissonConfigStrategy.java
|
6e32a97af853849368cceb043e30ed4a00180a41
|
[] |
no_license
|
liujinguo1994/xdl-jjg
|
071eaa5a8fb566db6b47dbe046daf85dd2b9bcd8
|
051da0a0dba18e6e5021ecb4ef3debca16b01a93
|
refs/heads/master
| 2023-01-06T09:11:30.487559
| 2020-11-06T14:42:45
| 2020-11-06T14:42:45
| 299,525,315
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 442
|
java
|
package com.xdl.jjg.redisson.config.strategy;
import com.xdl.jjg.redisson.config.RedissonProperties;
import org.redisson.config.Config;
/**
* Redisson配置构建接口
*/
public interface RedissonConfigStrategy {
/**
* 根据不同的Redis配置策略创建对应的Config
* @param redissonProperties
* @return Config
*/
Config createRedissonConfig(RedissonProperties redissonProperties);
}
|
[
"344009799@qq.com"
] |
344009799@qq.com
|
e56bf891e8086422e0f6cabf094677610c7ec5f4
|
572ab44a5612fa7c48c1c3b29b5f4375f3b08ed1
|
/BIMfoBA.src/jsdai/SIfc4/EIfcperformancehistory.java
|
0c47233699281e1f47827f7278874114e06dbff1
|
[] |
no_license
|
ren90/BIMforBA
|
ce9dd9e5c0b8cfd2dbd2b84f3e2bcc72bc8aa18e
|
4a83d5ecb784b80a217895d93e0e30735dc83afb
|
refs/heads/master
| 2021-01-12T20:49:32.561833
| 2015-03-09T11:00:40
| 2015-03-09T11:00:40
| 24,721,790
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,153
|
java
|
/* Generated by JSDAI Express Compiler, version 4.3.2, build 500, 2011-12-13 */
// Java interface for entity IfcPerformanceHistory
package jsdai.SIfc4;
import jsdai.lang.*;
public interface EIfcperformancehistory extends EIfccontrol {
// generateExplicitAttributeMethodDeclarations: 1
/// methods for attribute:LifeCyclePhase, base type: STRING
public boolean testLifecyclephase(EIfcperformancehistory type) throws SdaiException;
public String getLifecyclephase(EIfcperformancehistory type) throws SdaiException;
public void setLifecyclephase(EIfcperformancehistory type, String value) throws SdaiException;
public void unsetLifecyclephase(EIfcperformancehistory type) throws SdaiException;
// generateExplicitAttributeMethodDeclarations: 1
// attribute:PredefinedType, base type: ENUMERATION
public boolean testPredefinedtype(EIfcperformancehistory type) throws SdaiException;
public int getPredefinedtype(EIfcperformancehistory type) throws SdaiException;
public void setPredefinedtype(EIfcperformancehistory type, int value) throws SdaiException;
public void unsetPredefinedtype(EIfcperformancehistory type) throws SdaiException;
}
|
[
"renato.filipe.vieira@gmail.com"
] |
renato.filipe.vieira@gmail.com
|
fec416cda5e4317d344e6d3b1eb6b8653ccf1495
|
0ac05e3da06d78292fdfb64141ead86ff6ca038f
|
/OSWE/oswe/openCRX/rtjar/rt.jar.src/javax/swing/event/SwingPropertyChangeSupport.java
|
e22252d251fad639a8c49f303b77701527bb225a
|
[] |
no_license
|
qoo7972365/timmy
|
31581cdcbb8858ac19a8bb7b773441a68b6c390a
|
2fc8baba4f53d38dfe9c2b3afd89dcf87cbef578
|
refs/heads/master
| 2023-07-26T12:26:35.266587
| 2023-07-17T12:35:19
| 2023-07-17T12:35:19
| 353,889,195
| 7
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,506
|
java
|
/* */ package javax.swing.event;
/* */
/* */ import java.beans.PropertyChangeEvent;
/* */ import java.beans.PropertyChangeSupport;
/* */ import javax.swing.SwingUtilities;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public final class SwingPropertyChangeSupport
/* */ extends PropertyChangeSupport
/* */ {
/* */ static final long serialVersionUID = 7162625831330845068L;
/* */ private final boolean notifyOnEDT;
/* */
/* */ public SwingPropertyChangeSupport(Object paramObject) {
/* 53 */ this(paramObject, false);
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public SwingPropertyChangeSupport(Object paramObject, boolean paramBoolean) {
/* 68 */ super(paramObject);
/* 69 */ this.notifyOnEDT = paramBoolean;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public void firePropertyChange(final PropertyChangeEvent evt) {
/* 87 */ if (evt == null) {
/* 88 */ throw new NullPointerException();
/* */ }
/* 90 */ if (!isNotifyOnEDT() ||
/* 91 */ SwingUtilities.isEventDispatchThread()) {
/* 92 */ super.firePropertyChange(evt);
/* */ } else {
/* 94 */ SwingUtilities.invokeLater(new Runnable()
/* */ {
/* */ public void run() {
/* 97 */ SwingPropertyChangeSupport.this.firePropertyChange(evt);
/* */ }
/* */ });
/* */ }
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public final boolean isNotifyOnEDT() {
/* 111 */ return this.notifyOnEDT;
/* */ }
/* */ }
/* Location: /Users/timmy/timmy/OSWE/oswe/openCRX/rt.jar!/javax/swing/event/SwingPropertyChangeSupport.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"t0984456716"
] |
t0984456716
|
f0d5da6259c24d5e9c5240f6da9562fdb4282513
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/6/6_d8f53b937e1483340b819b88a8bf4f6a36d69b0d/CyclomaticComplexityCheck/6_d8f53b937e1483340b819b88a8bf4f6a36d69b0d_CyclomaticComplexityCheck_t.java
|
56abd20fa89a248cf94ad98866cbb1b80eb60179
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,148
|
java
|
////////////////////////////////////////////////////////////////////////////////
// checkstyle: Checks Java source code for adherence to a set of rules.
// Copyright (C) 2001-2004 Oliver Burn
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks.metrics;
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
/**
* Checks cyclomatic complexity against a specified limit. The complexity is
* measured by the number of "if", "while", "do", "for", "?:", "catch",
* "switch", "case", "&&" and "||" statements (plus one) in the body of
* the member. It is a measure of the minimum number of possible paths through
* the source and therefore the number of required tests. Generally 1-4 is
* considered good, 5-7 ok, 8-10 consider re-factoring, and 11+ re-factor now!
*
* @author <a href="mailto:simon@redhillconsulting.com.au">Simon Harris</a>
* @author Oliver Burn
*/
public class CyclomaticComplexityCheck
extends AbstractComplexityCheck
{
/** default allowed complexity */
private static final int DEFAULT_VALUE = 10;
/** Create an instance. */
public CyclomaticComplexityCheck()
{
super(DEFAULT_VALUE);
}
/** {@inheritDoc} */
public int[] getDefaultTokens()
{
return new int[] {
TokenTypes.CTOR_DEF,
TokenTypes.METHOD_DEF,
TokenTypes.INSTANCE_INIT,
TokenTypes.STATIC_INIT,
TokenTypes.LITERAL_WHILE,
TokenTypes.LITERAL_DO,
TokenTypes.LITERAL_FOR,
TokenTypes.LITERAL_IF,
TokenTypes.LITERAL_ELSE,
TokenTypes.LITERAL_SWITCH,
TokenTypes.LITERAL_CASE,
TokenTypes.LITERAL_TRY,
TokenTypes.LITERAL_CATCH,
TokenTypes.QUESTION,
TokenTypes.LAND,
TokenTypes.LOR,
};
}
/** {@inheritDoc} */
protected final void visitTokenHook(DetailAST aAST)
{
if (!CheckUtils.isElseIf(aAST)) {
incrementCurrentValue(1);
}
}
/** {@inheritDoc} */
protected final String getMessageID()
{
return "cyclomaticComplexity";
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
43db22465dff45856edc183fe610a25ca092e054
|
25baed098f88fc0fa22d051ccc8027aa1834a52b
|
/src/main/java/com/ljh/daoMz/ViewHlhtCdropayoffdMapper.java
|
cc9029dab625d0f46f79dbb52a9374ffa7136452
|
[] |
no_license
|
woai555/ljh
|
a5015444082f2f39d58fb3e38260a6d61a89af9f
|
17cf8f4415c9ae7d9fedae46cd9e9d0d3ce536f9
|
refs/heads/master
| 2022-07-11T06:52:07.620091
| 2022-01-05T06:51:27
| 2022-01-05T06:51:27
| 132,585,637
| 0
| 0
| null | 2022-06-17T03:29:19
| 2018-05-08T09:25:32
|
Java
|
UTF-8
|
Java
| false
| false
| 290
|
java
|
package com.ljh.daoMz;
import com.ljh.bean.ViewHlhtCdropayoffd;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ljh
* @since 2020-10-26
*/
public interface ViewHlhtCdropayoffdMapper extends BaseMapper<ViewHlhtCdropayoffd> {
}
|
[
"37681193+woai555@users.noreply.github.com"
] |
37681193+woai555@users.noreply.github.com
|
00ea449822018b452d11ae404909557febbe401e
|
e6a977b8c8ac1546aeeaf4e7ffd7f467324a832d
|
/ac/ac-pom2/log-parser/src/main/java/com/hp/it/perf/ac/load/content/AcContentCounter.java
|
1832c85b904325dcebf3f34fbf3b33ef83dc2249
|
[] |
no_license
|
shengyao15/performance_project
|
6c86d6493d2c2d79d3e0d3585f96557a8584b1f6
|
d3f7a66e9065379452fcda0bb6209a529822393c
|
refs/heads/master
| 2021-05-16T03:07:16.637843
| 2017-11-01T06:35:58
| 2017-11-01T06:35:58
| 20,017,606
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,417
|
java
|
package com.hp.it.perf.ac.load.content;
public class AcContentCounter implements AcContentHandler {
protected int successCount;
protected int errorCount;
protected long startTime;
protected long time;
protected AcContentMetadata metadata;
protected Class<?> beanClass;
@Override
public void init(AcContentMetadata metadata) {
this.metadata = metadata;
this.successCount = 0;
this.errorCount = 0;
this.time = 0;
startTime = System.currentTimeMillis();
}
@Override
public void handle(Object object, AcContentLine contentLine)
throws AcLoadException {
beanClass = object.getClass();
successCount++;
}
@Override
public void handleLoadError(AcLoadException error, AcContentLine contentLine)
throws AcLoadException {
errorCount++;
}
@Override
public void destroy() {
time = System.currentTimeMillis() - startTime;
}
public int getSuccessCount() {
return successCount;
}
public int getErrorCount() {
return errorCount;
}
public long getTime() {
return time;
}
public AcContentMetadata getMetadata() {
return metadata;
}
public Class<?> getBeanClass() {
return beanClass;
}
@Override
public String toString() {
return String
.format("AcContentCounter [successCount=%s, errorCount=%s, time=%s, beanClass=%s, metadata=%s]",
successCount, errorCount, time,
beanClass == null ? "UNKNOWN" : beanClass.getName(),
metadata);
}
}
|
[
"shengyao15@126.com"
] |
shengyao15@126.com
|
6d6906cf566b69e39f7bfdf64d80fef056a18b3c
|
225011bbc304c541f0170ef5b7ba09b967885e95
|
/com/cuebiq/cuebiqsdk/model/CuebiqSDKProvider.java
|
238b43e16a55f8816c5afde31c4081d7f3f30599
|
[] |
no_license
|
sebaudracco/bubble
|
66536da5367f945ca3318fecc4a5f2e68c1df7ee
|
e282cda009dfc9422594b05c63e15f443ef093dc
|
refs/heads/master
| 2023-08-25T09:32:04.599322
| 2018-08-14T15:27:23
| 2018-08-14T15:27:23
| 140,444,001
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,597
|
java
|
package com.cuebiq.cuebiqsdk.model;
import android.content.ContentProvider;
import android.content.ContentValues;
import android.content.pm.PackageManager.NameNotFoundException;
import android.database.Cursor;
import android.net.Uri;
import android.preference.PreferenceManager;
import android.util.Log;
import com.cuebiq.cuebiqsdk.CuebiqSDK;
import com.cuebiq.cuebiqsdk.model.config.Settings;
import com.cuebiq.cuebiqsdk.model.persistence.PersistenceManagerFactory;
import com.cuebiq.cuebiqsdk.task.GAIDRunnable;
import java.util.concurrent.Executors;
import mf.org.apache.xerces.impl.xs.SchemaSymbols;
public class CuebiqSDKProvider extends ContentProvider {
public static final String CUEBIQ_APPKEY = "com.cuebiq.sdk.AppKey";
public int delete(Uri uri, String str, String[] strArr) {
return 0;
}
public String getType(Uri uri) {
return null;
}
public Uri insert(Uri uri, ContentValues contentValues) {
return null;
}
public boolean onCreate() {
boolean z = false;
Log.i("CuebiqSDKProvider", "Starting CuebiqSDK...");
Executors.newSingleThreadExecutor().submit(new GAIDRunnable(getContext(), null));
boolean isSDKCollectionEnabled = PersistenceManagerFactory.get().isSDKCollectionEnabled(getContext());
try {
Boolean.parseBoolean(getContext().getString(getContext().getResources().getIdentifier("cuebiq_sdk_collection", SchemaSymbols.ATTVAL_STRING, getContext().getPackageName())));
z = PersistenceManagerFactory.get().isUserCOPAProtected(getContext());
} catch (Exception e) {
}
if (!isSDKCollectionEnabled || r0) {
Log.i("CuebiqSDKProvider", "SDK has explicit opt-out, stop tracking.");
} else {
try {
String string = getContext().getPackageManager().getApplicationInfo(getContext().getPackageName(), 128).metaData.getString(CUEBIQ_APPKEY);
if (string == null || "".equals(string)) {
Log.i("CuebiqSDKProvider", "CuebiqSDK AppKey must not be null. Did you forget to add it in your AndroidManifest as metadata?");
string = "aWildcard";
}
if (PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("q_temp_fist_launch", true)) {
PreferenceManager.getDefaultSharedPreferences(getContext()).edit().putBoolean("q_temp_fist_launch", false).apply();
PersistenceManagerFactory.get().saveBeAudienceConfiguration(getContext(), new Settings());
}
int identifier = getContext().getResources().getIdentifier("cuebiq_use_gdpr_flow_by_cuebiq", "bool", getContext().getPackageName());
if (identifier != 0) {
PersistenceManagerFactory.get().saveUseGDPRFlowByCuebiq(getContext(), getContext().getResources().getBoolean(identifier));
}
CuebiqSDK.initialize(getContext(), string);
} catch (NameNotFoundException e2) {
Log.i("CuebiqSDKProvider", "...Failed to initialize CuebiqSDK: " + e2.getMessage());
} catch (NullPointerException e3) {
Log.i("CuebiqSDKProvider", "...Failed to initialize CuebiqSDK: " + e3.getMessage());
}
}
return true;
}
public Cursor query(Uri uri, String[] strArr, String str, String[] strArr2, String str2) {
return null;
}
public int update(Uri uri, ContentValues contentValues, String str, String[] strArr) {
return 0;
}
}
|
[
"sebaudracco@gmail.com"
] |
sebaudracco@gmail.com
|
d5e2e9d17e9522c6d6a41c4bb1ad3ea306042dfd
|
76e86a2e835a121eb0531ffb2795625b7b2e531c
|
/src/Arithmetic/JichuTimu/Example01.java
|
ceec2cadb9ca1a05fd0589e583bafa0c4addca9f
|
[] |
no_license
|
0ranges/OldTest
|
7b942d0d4bbc94e1604874ee66d09307000e5e79
|
6f8ffd62d8b2c3eea3c65ffb1a46d800cf9da8ad
|
refs/heads/master
| 2020-04-20T10:06:49.344822
| 2019-06-26T07:55:33
| 2019-06-26T07:55:33
| 168,781,870
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,139
|
java
|
package Arithmetic.JichuTimu;
import java.util.Scanner;
/**
* Created by user on 2017/4/19.
*/
/*
把手放在键盘上,稍不注意就会往右错一位。
这样的话,Q会变为W,J会变为K。
输入一个错位后的敲出的字符串,输出本来的字符串
例子:
输入:O S, GOMR YPFSU/
输出:I AM FINE TODAY.
*/
public class Example01 {
public static void main(String[] args) {
String real = "`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";
Scanner input = new Scanner(System.in);
String str = input.nextLine();
// System.out.println(String.valueOf(str.charAt(0)));
// System.out.println(real.contains(String.valueOf(str.charAt(0))));
for(int i = 0;i<str.length();i++){
if(real.contains(String.valueOf(str.charAt(i)))) {
for (int j = 1; j < real.length(); j++) {
if (String.valueOf(str.charAt(i)).equals(String.valueOf(real.charAt(j))))
System.out.print(real.charAt(j - 1));
}
}else{
System.out.print(" ");
}
}
}
}
|
[
"864160262@qq.com"
] |
864160262@qq.com
|
643dbc7a35b23a4b46e82124602618c7b849d238
|
fec4c1754adce762b5c4b1cba85ad057e0e4744a
|
/jf-base/src/main/java/com/jf/entity/ActivityProductAuditLog.java
|
e6e9df158e6f53b05003741506ddd397771ba7d4
|
[] |
no_license
|
sengeiou/workspace_xg
|
140b923bd301ff72ca4ae41bc83820123b2a822e
|
540a44d550bb33da9980d491d5c3fd0a26e3107d
|
refs/heads/master
| 2022-11-30T05:28:35.447286
| 2020-08-19T02:30:25
| 2020-08-19T02:30:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,044
|
java
|
package com.jf.entity;
import java.util.Date;
public class ActivityProductAuditLog {
private Integer id;
private Integer activityProductId;
private String type;
private String status;
private Integer createBy;
private Date createDate;
private Integer updateBy;
private Date updateDate;
private String remarks;
private String delFlag;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getActivityProductId() {
return activityProductId;
}
public void setActivityProductId(Integer activityProductId) {
this.activityProductId = activityProductId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type == null ? null : type.trim();
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
public Integer getCreateBy() {
return createBy;
}
public void setCreateBy(Integer createBy) {
this.createBy = createBy;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Integer getUpdateBy() {
return updateBy;
}
public void setUpdateBy(Integer updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateDate() {
return updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks == null ? null : remarks.trim();
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag == null ? null : delFlag.trim();
}
}
|
[
"397716215@qq.com"
] |
397716215@qq.com
|
5920529f919623da217a6c8b64c19e74957ae0d0
|
f28c3fae2b66f542a2d441b3950e960607d65ca3
|
/src/main/java/cz/cvut/fit/mi_mpr_dip/admission/domain/Link.java
|
1ee57d474f4f447f219686fa1694472002727955
|
[] |
no_license
|
janondrusek/MI-MPR-DIP-Admission
|
c4a642f9ee912e172338cba21ea931bfe1d6f910
|
761ee5c1c9905e3a8db1581178c8279b74b1553d
|
refs/heads/master
| 2021-10-12T00:23:31.524336
| 2012-11-10T14:03:24
| 2012-11-10T14:03:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 706
|
java
|
package cz.cvut.fit.mi_mpr_dip.admission.domain;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import org.springframework.roo.addon.equals.RooEquals;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;
@RooJavaBean
@RooToString
@RooEquals
@XmlAccessorType(XmlAccessType.FIELD)
public class Link implements Serializable {
private static final long serialVersionUID = -7366014812417405862L;
@XmlAttribute
private String href;
@XmlAttribute
private String method;
@XmlAttribute
private String rel;
}
|
[
"ondrusek.jan@gmail.com"
] |
ondrusek.jan@gmail.com
|
5f353a6a117eeee235537bafa1893202ff708270
|
bdb4396d158b4e6bdf224b98ad4b24a38f425491
|
/examples/dfp_axis/src/main/java/dfp/axis/v201505/productpackageservice/ActivateProductPackages.java
|
69b86782053f044f06bb8b8719ea12200a6311fb
|
[
"Apache-2.0"
] |
permissive
|
paulsrbh/googleads-java-lib
|
f0554376f8217e425641223a8406badaa6a164ba
|
19609477dcc6e054300896acd90ba8b613c66517
|
refs/heads/master
| 2021-01-16T23:19:56.213218
| 2015-07-27T07:22:36
| 2015-07-27T07:22:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,158
|
java
|
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package dfp.axis.v201505.productpackageservice;
import com.google.api.ads.common.lib.auth.OfflineCredentials;
import com.google.api.ads.common.lib.auth.OfflineCredentials.Api;
import com.google.api.ads.dfp.axis.factory.DfpServices;
import com.google.api.ads.dfp.axis.utils.v201505.StatementBuilder;
import com.google.api.ads.dfp.axis.v201505.ProductPackage;
import com.google.api.ads.dfp.axis.v201505.ProductPackagePage;
import com.google.api.ads.dfp.axis.v201505.ProductPackageServiceInterface;
import com.google.api.ads.dfp.axis.v201505.UpdateResult;
import com.google.api.ads.dfp.lib.client.DfpSession;
import com.google.api.client.auth.oauth2.Credential;
import com.google.common.collect.Iterables;
import java.util.Arrays;
/**
* This example activates a product package. To determine which product packages exist,
* run GetAllProductPackages.java.
*
* Credentials and properties in {@code fromFile()} are pulled from the
* "ads.properties" file. See README for more info.
*
* Tags: ProductPackageService.getProductPackagesByStatement
* Tags: ProductPackageService.performProductPackageAction
*
* @author Nicholas Chen
*/
public class ActivateProductPackages {
// Set the ID of the product package to activate.
private static final String PRODUCT_PACKAGE_ID =
"INSERT_PRODUCT_PACKAGE_ID_HERE";
public static void runExample(DfpServices dfpServices, DfpSession session,
long productPackageId)
throws Exception {
// Get the ProductPackageService.
ProductPackageServiceInterface productPackageService =
dfpServices.get(session, ProductPackageServiceInterface.class);
// Create a statement to select a single product package.
StatementBuilder statementBuilder = new StatementBuilder()
.where("id = :id")
.orderBy("id ASC")
.limit(1)
.withBindVariableValue("id", productPackageId);
// Get the product package.
ProductPackagePage page =
productPackageService.getProductPackagesByStatement(
statementBuilder.toStatement());
ProductPackage productPackage = Iterables.getOnlyElement(
Arrays.asList(page.getResults()));
System.out.printf("Product package with ID \"%d\" will be activated.%n",
productPackage.getId());
// Remove limit and offset from statement.
statementBuilder.removeLimitAndOffset();
// Create action to activate product packages.
com.google.api.ads.dfp.axis.v201505.ActivateProductPackages action =
new com.google.api.ads.dfp.axis.v201505.ActivateProductPackages();
// Perform action.
UpdateResult result =
productPackageService.performProductPackageAction(
action, statementBuilder.toStatement());
if (result != null && result.getNumChanges() > 0) {
System.out.printf("Number of product packages activated: %d%n", result.getNumChanges());
} else {
System.out.println("No product packages were deactivated.");
}
}
public static void main(String[] args) throws Exception {
// Generate a refreshable OAuth2 credential.
Credential oAuth2Credential = new OfflineCredentials.Builder()
.forApi(Api.DFP)
.fromFile()
.build()
.generateCredential();
// Construct a DfpSession.
DfpSession session = new DfpSession.Builder()
.fromFile()
.withOAuth2Credential(oAuth2Credential)
.build();
DfpServices dfpServices = new DfpServices();
runExample(dfpServices, session, Long.parseLong(PRODUCT_PACKAGE_ID));
}
}
|
[
"api.cseeley@gmail.com"
] |
api.cseeley@gmail.com
|
e58ceea382289d87fd0034925ce996ef1b608435
|
4b80a1d37087ca4c352fb026cca641b5310f8a24
|
/trunk/mras/bookrec/knowledgecal/bookmark/src/main/java/com/eb/bi/rs/mras/bookrec/knowledgecal/bookmark/.svn/text-base/BookTypeReducer.java.svn-base
|
dd918c399211124847950d33cfe86f01153a344d
|
[] |
no_license
|
byr-ly/leetcode
|
292ff93245d81a6b271c7785896330d271ea5915
|
4eb8966b237c81a68822f81b17158ee5d91c9400
|
refs/heads/master
| 2022-11-09T15:20:29.792485
| 2017-11-07T12:06:05
| 2017-11-07T12:06:05
| 77,654,665
| 1
| 0
| null | 2022-11-04T22:44:01
| 2016-12-30T02:40:38
|
Java
|
UTF-8
|
Java
| false
| false
| 2,031
|
package com.eb.bi.rs.mras.bookrec.knowledgecal.bookmark;
import java.io.IOException;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.Reducer.Context;
public class BookTypeReducer extends Reducer<Text,Text, Text, Text> {
private static String book_Ctype1;
private static String book_Ctype2;
private static String book_Ctype3;
@Override
protected void setup(Context context) throws IOException,InterruptedException {
book_Ctype1 = context.getConfiguration().get("charge_type1");
book_Ctype2 = context.getConfiguration().get("charge_type2");
book_Ctype3 = context.getConfiguration().get("charge_type3");
}
@Override
protected void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException{
//图书总章节数
int book_chnum = 0;
//图书订购类型
String book_ctype = "";
//图书打分类型
int book_TYPE = 0;
for(Text value:values){
String[] field = value.toString().split("\\|");
if(field[0].equals("0")){
book_chnum=Integer.valueOf(field[1]);
}
else{
book_ctype=field[1];
}
}
if(book_ctype.equals(book_Ctype1)){
if(book_chnum<=50&&book_chnum>0){
book_TYPE = 1;
}
if(book_chnum>50&&book_chnum<=250){
book_TYPE = 2;
}
if(book_chnum>250&&book_chnum<=600){
book_TYPE = 3;
}
if(book_chnum>600){
book_TYPE = 4;
}
}
if(book_ctype.equals(book_Ctype2)){
if(book_chnum<=50&&book_chnum>0){
book_TYPE = 5;
}
if(book_chnum>50&&book_chnum<=200){
book_TYPE = 6;
}
if(book_chnum>200){
book_TYPE = 7;
}
}
if(book_ctype.equals(book_Ctype3)){
if(book_chnum<=50&&book_chnum>0){
book_TYPE = 8;
}
if(book_chnum>50){
book_TYPE = 9;
}
}
//context.write(key,new Text(book_TYPE+"|"+book_chnum));
context.write(key,new Text(book_TYPE + ""));
}
}
|
[
"liyang@liyangdeMacBook-Pro.local"
] |
liyang@liyangdeMacBook-Pro.local
|
|
1d3fd65cbb55e8f4f14a6381868ea8e16050c038
|
1308c1453797f30ed017045be22a3c202d2a2c5b
|
/gmall-oms/src/main/java/com/atguigu/gmall/oms/service/OrderItemService.java
|
a39e1becb28ce3e8229ee354082f21d62f240ce2
|
[
"Apache-2.0"
] |
permissive
|
zsf3424/gmall
|
92fcf8e44723319cba5e0a9915285e3cdb0545fc
|
9ec8c81b1e27534ca3665c40b3a6c0bfa8b12b5d
|
refs/heads/master
| 2022-12-22T16:45:20.812811
| 2019-11-18T13:13:50
| 2019-11-18T13:13:50
| 218,036,372
| 1
| 0
|
Apache-2.0
| 2022-12-16T00:41:52
| 2019-10-28T11:58:06
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 456
|
java
|
package com.atguigu.gmall.oms.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.gmall.oms.entity.OrderItemEntity;
import com.atguigu.core.bean.PageVo;
import com.atguigu.core.bean.QueryCondition;
/**
* 订单项信息
*
* @author zsf
* @email zsf3424@163.com
* @date 2019-10-28 20:57:48
*/
public interface OrderItemService extends IService<OrderItemEntity> {
PageVo queryPage(QueryCondition params);
}
|
[
"zsf3424@126.com"
] |
zsf3424@126.com
|
efcae7c327aa9dbcd0017bc241622dd8696a33c9
|
8baf913bee8d5e840aa51f050bebc37b1e3c7506
|
/剑指offer R2/57.删除链表中重复的结点/删除链表中重复的结点.java
|
9e57bc6970d3505aab3d8f79a6dde51fd2fede97
|
[] |
no_license
|
MoriatyC/code
|
460aa431b56a9e7806e8f743e2e6b345de0a745a
|
b97a4b263689a5cad43d7051a630df8ea0f06afc
|
refs/heads/master
| 2020-05-20T22:33:58.545806
| 2018-07-23T06:56:32
| 2018-07-23T06:56:32
| 84,533,271
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,476
|
java
|
/*
public class ListNode {
int val;
ListNode next = null;
ListNode(int val) {
this.val = val;
}
}
*/
import java.util.Map;
import java.util.HashMap;
public class Solution {
public ListNode deleteDuplication(ListNode pHead)
{
if (pHead == null) {
return pHead;
}
ListNode pre = new ListNode(0);
pre.next = pHead;
ListNode ret = pre;
while (pHead != null && pHead.next != null) {
ListNode next = pHead.next;
if (pHead.val == next.val) {
while (next != null && next.val == pHead.val) {
next = next.next;
}
pre.next = next;
pHead = next;
} else {
pre = pHead;
pHead = pHead.next;
}
}
return ret.next;
}
}
/*
if (pHead == null) {
return null;
}
ListNode fade = new ListNode(0);
fade.next = pHead;
ListNode pre = fade;
ListNode cur = fade.next;
while (cur != null && cur.next != null) {
if (cur.val != cur.next.val) {
pre = cur;
cur = cur.next;
} else {
int tmp = cur.val;
while (cur != null && tmp == cur.val) {
cur = cur.next;
}
pre.next = cur;
}
}
return fade.next;
*/
|
[
"119889525@qq.com"
] |
119889525@qq.com
|
61ed73517e13b5e659a30e83633e10dff12281c3
|
8b261b77c9bd77b360a4473f92aec27b9b55d9c1
|
/yxclient/src/main/java/com/yxclient/app/adapter/InfoCommentAdapter.java
|
71a98d55a7b07c37f32d962ff1ddb823169d1625
|
[] |
no_license
|
kh1011/Master
|
f8f66d5d3126f626e4f06debbc5983a302a385ed
|
5b9d36f6922f9dd2833f06c60eacc502e3e39b81
|
refs/heads/master
| 2020-03-14T00:48:48.841358
| 2018-04-28T02:32:02
| 2018-04-28T02:32:02
| 131,364,497
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,882
|
java
|
package com.yxclient.app.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.bumptech.glide.Glide;
import com.yxclient.app.R;
import com.yxclient.app.event.ItemInfoCommentListener;
import com.yxclient.app.model.bean.InfoEvaluationsModel;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import de.hdodenhof.circleimageview.CircleImageView;
/**
* Created by Song on 2016/9/7.
* x
*/
public class InfoCommentAdapter extends RecyclerView.Adapter<InfoCommentAdapter.MyViewHolder> {
private Context mContext;
private List<InfoEvaluationsModel> mDataList;
private LayoutInflater mInflater;
private ItemInfoCommentListener onItemListener;
public InfoCommentAdapter(Context context, List<InfoEvaluationsModel> dataList) {
this.mContext = context;
this.mDataList = dataList;
mInflater = LayoutInflater.from(context);
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View rootView = mInflater.inflate(R.layout.item_info_comment, parent, false);
MyViewHolder myViewHolder = new MyViewHolder(rootView);
return myViewHolder;
}
@Override
public int getItemCount() {
return mDataList.size();
}
@Override
public void onBindViewHolder(final MyViewHolder holder, final int position) {
final InfoEvaluationsModel model = mDataList.get(position);
Glide.with(mContext).load(model.getCreateUser().getHeadImage()).into(holder.imageView);
holder.tv_Name.setText(model.getCreateUser().getName());
holder.tv_Content.setText(model.getContent());
holder.tv_Date.setText(model.getCreateTime());
}
public void setOnItemListener(ItemInfoCommentListener onItemListener) {
this.onItemListener = onItemListener;
}
/**
* ViewHolder
*/
class MyViewHolder extends RecyclerView.ViewHolder {
// 评论者头像
@BindView(R.id.profile_userimage)
CircleImageView imageView;
// 评论者姓名
@BindView(R.id.comment_username)
TextView tv_Name;
// 评论内容
@BindView(R.id.comment_content)
TextView tv_Content;
// 评论发布日期
@BindView(R.id.comment_date)
TextView tv_Date;
public MyViewHolder(View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
}
public void remove(InfoEvaluationsModel itemModel) {
mDataList.remove(itemModel);
}
public InfoEvaluationsModel getItem(int pos) {
return mDataList.get(pos);
}
}
|
[
"782818448@qq.com"
] |
782818448@qq.com
|
371cdd26a96c635db039a2817f5fe5b217cd0ebf
|
ec7e0f9ed97c366c0af86dc43071c1096f1d308d
|
/Prj_Px1m0dBridge/src/ch/maybites/px1m0d/plug/collection/liveA/PlgChainStart.java
|
1d68c489f36ba3a14dd9fd50eedf49b186302c67
|
[] |
no_license
|
maybites/Prj_Px1m0dBridge
|
18cb99524c6f0a61bbdea365e2735e54d6a3eff7
|
380ed48c02d7d6ffa0e7514219822e84e3766fdd
|
refs/heads/master
| 2020-04-27T09:15:47.507686
| 2012-06-07T22:02:41
| 2012-06-07T22:02:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,033
|
java
|
package ch.maybites.px1m0d.plug.collection.liveA;
import ch.maybites.px1m0d.message.Message;
import ch.maybites.px1m0d.message.Px1MessageNatebu;
import ch.maybites.px1m0d.message.Px1MessageSocket;
import ch.maybites.px1m0d.plug.*;
import gestalt.shape.*;
import ch.maybites.px1m0d.plug.config.PlugConfig;
import ch.maybites.px1m0d.plug.drawing.Painter;
import ch.maybites.px1m0d.plug.drawing.effects.*;
import ch.maybites.px1m0d.plug.drawing.effects.icons.IconBasic;
import ch.maybites.px1m0d.plug.behaviours.*;
import ch.maybites.px1m0d.plug.gestures.*;
public class PlgChainStart extends Plug{
private static final long serialVersionUID = 1L;
public PlgChainStart(Socket sm, PlugConfig param, Px1MessageSocket msg){
super(sm, param, msg);
painter = new Painter(this);
agent = new Agent();
watcher = new Watcher(this);
param.print();
//IconBasic basicPlug = new IconBasic(new Color(1.0f, 1.0f, 0.3f, 0.3f));
painter.addEffect(parameter.getIconEffect());
EffctLampSwitch lampSwitch = new EffctLampSwitch();
painter.addEffect(lampSwitch);
//-- //--
GstrPlugging plugging = new GstrPlugging(this);
GstrButton button = new GstrButton(this);
GstrSwitch switsch = new GstrSwitch(this);
switsch.registerListener(lampSwitch);
plugging.registerListener(lampSwitch);
GstrNatebu natebu = new GstrNatebu(this);
GstrMetronome metronome = new GstrMetronome(this);
//************
// FUNCTIONS
//************
// Functions are Gestures on "naked" buttons. These Objects are used to open
// Liaisons with buttons so the buttons can send infos about the pressed
// gestures to this plug. they are called functions because they shouldnt be
// mixed up with the Gesture Objects of the bridge architecture.
// Functions are used to set the plug into a special condition, like beeing
// able to open or close a pipe liaison, or listening to global pipe messages
//********
// handles the function-liaisons
GstrLiaisonFunctionForPlugs functions = new GstrLiaisonFunctionForPlugs(this);
button.registerListener(functions);
//********
BhaveLiaisonFunctionStub fLiaisonStub = new BhaveLiaisonFunctionStub(this);
functions.registerListener(fLiaisonStub);
//********
// LINKS
//********
// handles Link liaisons
GstrLiaisonLink links = new GstrLiaisonLink(this);
button.registerListener(links);
// manages the links to this plug. it can only be linked AT, but not linked
// TO another plug - hence a server
BhaveLinkServer linkServer = new BhaveLinkServer(this, painter);
links.registerListener(linkServer);
plugging.registerListener(linkServer);
//********
// PIPES
//********
// GstrLiaisonPipeReceiver handles pipe-liaisons, beeing a receiver
// this means it can only be on the receiving end of a pipe connection
// carefull: a plug can also receiving pipe messages without beeing part of
// a pipe connection -> see for example GstrPipeGlobalListening
GstrLiaisonPipeReceiver pipeConnection = new GstrLiaisonPipeReceiver(this);
// needs to listen to button events
button.registerListener(pipeConnection);
// GstrLiaisonPipePing pings back any Liaison pipe pings and acknoleges this way
// the willingness of this plug to accept automated pipe connections
GstrLiaisonPipePing pipePing = new GstrLiaisonPipePing(this);
//********
// is helping listening to RELATIVE pipe messages. it actually is listening for
// the relevant function-messages that switch the listening mode on/off
GstrPipeGlobalListening globalPipeListnr = new GstrPipeGlobalListening(this);
//********
// GstrPipeConnctReceiver helps handling the pipe connections AND
// handles the different pipe messages.
GstrPipeConnctReceiver pipeMsgReceiver = new GstrPipeConnctReceiver(this);
// or a pipe message
// or a global relative pipe message by listing to the pipe-global-message-listener
// that switches the listening to those messages on/off
globalPipeListnr.registerListener(pipeMsgReceiver);
// it also listen to switch on/off events
switsch.registerListener(pipeMsgReceiver);
//********
// JOBS
//********
// handles the assigned jobs
BhaveJobManager jobManager = new BhaveJobManager(this, painter);
button.registerListener(jobManager);
plugging.registerListener(jobManager);
switsch.registerListener(jobManager);
natebu.registerListener(jobManager);
pipeMsgReceiver.registerListener(jobManager);
metronome.registerListener(jobManager);
links.registerListener(jobManager);
//--
watcher.register(plugging);
watcher.register(switsch);
watcher.register(button);
watcher.register(metronome);
watcher.register(functions);
watcher.register(links);
watcher.register(pipeConnection);
watcher.register(globalPipeListnr);
watcher.register(pipeMsgReceiver);
watcher.register(natebu);
watcher.register(pipePing);
agent.register(fLiaisonStub);
agent.register(linkServer);
agent.register(jobManager);//should be registered last in order to get the link notifications
}
}
|
[
"registered@maybites.ch"
] |
registered@maybites.ch
|
ad7b8c0efa5466b541ca87abcc10d633f3df2f2b
|
7a2544ccc3e3e07a7a2f55e5ca51633d06a29f0c
|
/src/main/java/edu/uiowa/slis/BIBFRAME/IssnL/IssnLSubjectURI.java
|
e9af2671d41772fd0e6e09cee1a7824f90dedf55
|
[] |
no_license
|
eichmann/BIBFRAMETagLib
|
bf3ddf103e1010dab4acdb034f7d037fa0419f9d
|
816e96a0e55e5f67688ba238e623e13daba92d61
|
refs/heads/master
| 2021-12-28T00:04:14.171163
| 2020-01-20T17:44:33
| 2020-01-20T17:44:33
| 135,755,642
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,624
|
java
|
package edu.uiowa.slis.BIBFRAME.IssnL;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
@SuppressWarnings("serial")
public class IssnLSubjectURI extends edu.uiowa.slis.BIBFRAME.TagLibSupport {
static IssnLSubjectURI currentInstance = null;
private static final Log log = LogFactory.getLog(IssnLSubjectURI.class);
// functional property
public int doStartTag() throws JspException {
try {
IssnL theIssnL = (IssnL)findAncestorWithClass(this, IssnL.class);
if (!theIssnL.commitNeeded) {
pageContext.getOut().print(theIssnL.getSubjectURI());
}
} catch (Exception e) {
log.error("Can't find enclosing IssnL for subjectURI tag ", e);
throw new JspTagException("Error: Can't find enclosing IssnL for subjectURI tag ");
}
return SKIP_BODY;
}
public String getSubjectURI() throws JspTagException {
try {
IssnL theIssnL = (IssnL)findAncestorWithClass(this, IssnL.class);
return theIssnL.getSubjectURI();
} catch (Exception e) {
log.error(" Can't find enclosing IssnL for subjectURI tag ", e);
throw new JspTagException("Error: Can't find enclosing IssnL for subjectURI tag ");
}
}
public void setSubjectURI(String subjectURI) throws JspTagException {
try {
IssnL theIssnL = (IssnL)findAncestorWithClass(this, IssnL.class);
theIssnL.setSubjectURI(subjectURI);
} catch (Exception e) {
log.error("Can't find enclosing IssnL for subjectURI tag ", e);
throw new JspTagException("Error: Can't find enclosing IssnL for subjectURI tag ");
}
}
}
|
[
"david-eichmann@uiowa.edu"
] |
david-eichmann@uiowa.edu
|
199c23e81e649803e147adda0297f5accf63d2dd
|
2dfbf0f6fbbd81bcd47162ea0a9ea8a34b56e23b
|
/src/br/com/travelmate/managerBean/OrcamentoCurso/promocao/ConsCidadeAcomodacaoMB.java
|
b47e20cceb84175609a87cd290b40fb7c0a86b47
|
[] |
no_license
|
julioizidoro/systm-eclipse
|
25e5cce7b86d5ffeb241731c6949fa5ff614c90c
|
cc501300c4a5740492cd4fb409ec23529f67297d
|
refs/heads/master
| 2021-01-21T12:27:39.100941
| 2019-01-23T11:33:18
| 2019-01-23T11:33:18
| 47,205,022
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,215
|
java
|
package br.com.travelmate.managerBean.OrcamentoCurso.promocao;
import java.io.Serializable;
import javax.annotation.PostConstruct;
import javax.faces.context.FacesContext;
import javax.faces.view.ViewScoped;
import javax.inject.Named;
import javax.servlet.http.HttpSession;
import org.primefaces.context.RequestContext;
import br.com.travelmate.model.Promocaoacomodacao;
@Named
@ViewScoped
public class ConsCidadeAcomodacaoMB implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private Promocaoacomodacao promocaoacomodacao;
@PostConstruct
public void init() {
FacesContext fc = FacesContext.getCurrentInstance();
HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);
promocaoacomodacao = (Promocaoacomodacao) session.getAttribute("promocaoacomodacao");
session.removeAttribute("promocaoacomodacao");
}
public Promocaoacomodacao getPromocaoacomodacao() {
return promocaoacomodacao;
}
public void setPromocaoacomodacao(Promocaoacomodacao promocaoacomodacao) {
this.promocaoacomodacao = promocaoacomodacao;
}
public String fechar(){
RequestContext.getCurrentInstance().closeDialog(null);
return "";
}
}
|
[
"jizidoro@globo.com"
] |
jizidoro@globo.com
|
98d7a696a0f969a138256959794dc1992c907acd
|
b55109e36f35eda6cb84bfbe67cf2f363ace235e
|
/Client/src/BusinessLogic/AccountBL/AccountInfo.java
|
75706813616b09d9b5d5b97248422b6a2590f568
|
[] |
no_license
|
JonySheep/XiangXiangDeng
|
cb87e65e24080302f3f135e9e22f23735fe424d5
|
4ad25e3781d30050c5c7e0b29767e07477cae750
|
refs/heads/master
| 2021-04-30T12:18:09.803163
| 2018-02-12T16:51:37
| 2018-02-12T16:51:37
| 121,271,929
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 469
|
java
|
package BusinessLogic.AccountBL;
import Util.ResultMessage;
import VO.AccountVO;
public interface AccountInfo {
/**
*
* @param id id指账户编号
* @return 返回id所对应的客户信息
*/
AccountVO getInfo(String id);
/**
*
* @param amount 表示账户余额
* @return 返回一个ResultMMessage表示更新结果
*/
ResultMessage updateBalance(double amount, String carNumber);
}
|
[
"161250180@mail.smal.nju.edu.cn"
] |
161250180@mail.smal.nju.edu.cn
|
68692d5610a73c1486c32f322961cb1b191adec5
|
92f7d9ea0432b52af68b87f61aa32b69b73ed7b7
|
/src/main/java/com/tiagods/delivery/repository/interfaces/PedidoCaixaDAO.java
|
bd2b73b33d3d651e499df9be98c28949fb2a33ea
|
[] |
no_license
|
tiagods/delivery
|
d448a965e30d506857a0b966c0ae8b497161556a
|
e457d355a70fc2b36283f41f931c61cfa97e90d0
|
refs/heads/master
| 2021-04-15T18:50:57.842570
| 2018-04-29T18:42:36
| 2018-04-29T18:42:36
| 126,649,431
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 304
|
java
|
package com.tiagods.delivery.repository.interfaces;
import com.tiagods.delivery.model.pedido.PedidoCaixa;
import java.util.List;
public interface PedidoCaixaDAO {
PedidoCaixa save(PedidoCaixa c);
void remove(PedidoCaixa c);
List<PedidoCaixa> getAll();
PedidoCaixa findById(Long id);
}
|
[
"tiagoice@hotmail.com"
] |
tiagoice@hotmail.com
|
ecfcf55221065cac1ce1af2b632748e36d9a02ad
|
8b49b48892f698439ce7ce2e85b4fa3804370c62
|
/src/com/danbro/javase/src/main/java/algorithm/algorithmQuestion/Test.java
|
f4bf9f4f1aa8b521954a328be9906a1bbdde44bd
|
[] |
no_license
|
Danbro007/jdk-source-analysis
|
319223e56ea9c3f752e86f258684981d4e95180f
|
bbe0b6acb07be13b59e60bec3fab7ec90d543ad9
|
refs/heads/master
| 2023-01-22T08:42:44.624405
| 2020-12-04T06:15:03
| 2020-12-04T06:15:03
| 277,484,296
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,436
|
java
|
package algorithm.algorithmQuestion;
import java.util.Arrays;
import java.util.Random;
/**
* @Classname Test
* @Description TODO
* @Date 2020/8/18 12:56
* @Author Danrbo
*/
public class Test {
public static void main(String[] args) {
int[] array = new int[10];
for (int i = 0; i < array.length; i++) {
array[i] = new Random().nextInt(100);
}
System.out.println(Arrays.toString(array));
insertSort(array);
}
public static void bubbleSort(int[] array) {
for (int i = 0; i < array.length - 1; i++) {
boolean flag = true;
int temp;
for (int j = 0; j < array.length - i - 1; j++) {
if (array[j] > array[j+1]){
temp = array[j+1];
array[j+1] = array[j];
array[j] = temp;
flag = false;
}
}
if (flag){
break;
}
}
System.out.println(Arrays.toString(array));
}
public static void insertSort(int[] array){
for (int i = 1; i < array.length; i++) {
int cur = array[i];
int index = i - 1;
while (index >= 0 && cur < array[index]){
array[index + 1] = array[index--];
}
array[index+1] = cur;
}
System.out.println(Arrays.toString(array));
}
}
|
[
"710170342@qq.com"
] |
710170342@qq.com
|
4cc2f062eeeb5fa5ca4c5def3606397ad754d17b
|
341bd2ddc2152acae527223c9b5d9038fda37dfb
|
/thrift/compiler/test/fixtures/basic-swift-bean/gen-swift/test/fixtures/basic_swift_bean/LegacyServiceAsyncClientImpl.java
|
e5c970320207d7856f1f23c3f33940a3f87f8d7e
|
[
"Apache-2.0"
] |
permissive
|
rtxlab/fbthrift
|
3845f50e8a30fc03004406a2101865b8f8c1da28
|
67b4151fe27472d2a553d5cfcc3e6285ae3ae31b
|
refs/heads/master
| 2022-12-22T17:35:24.899783
| 2020-10-03T02:45:40
| 2020-10-03T02:47:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,072
|
java
|
/**
* Autogenerated by Thrift
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package test.fixtures.basic_swift_bean;
import com.facebook.nifty.client.RequestChannel;
import com.facebook.swift.codec.*;
import com.facebook.swift.service.*;
import com.facebook.swift.service.metadata.*;
import com.facebook.swift.transport.client.*;
import com.google.common.util.concurrent.ListenableFuture;
import java.io.*;
import java.lang.reflect.Method;
import java.util.*;
import org.apache.thrift.ProtocolId;
@SwiftGenerated
public class LegacyServiceAsyncClientImpl extends AbstractThriftClient implements LegacyService.Async {
// Method Handlers
private ThriftMethodHandler getPointsMethodHandler;
// Method Exceptions
private static final Class[] getPointsExceptions = new Class[] {
org.apache.thrift.TException.class};
public LegacyServiceAsyncClientImpl(
RequestChannel channel,
Map<Method, ThriftMethodHandler> methods,
Map<String, String> headers,
Map<String, String> persistentHeaders,
List<? extends ThriftClientEventHandler> eventHandlers) {
super(channel, headers, persistentHeaders, eventHandlers);
Map<String, ThriftMethodHandler> methodHandlerMap = new HashMap<>();
methods.forEach(
(key, value) -> {
methodHandlerMap.put(key.getName(), value);
});
// Set method handlers
getPointsMethodHandler = methodHandlerMap.get("getPoints");
}
public LegacyServiceAsyncClientImpl(
Map<String, String> headers,
RpcClient rpcClient,
ThriftServiceMetadata serviceMetadata,
ThriftCodecManager codecManager,
ProtocolId protocolId,
Map<Method, ThriftMethodHandler> methods) {
super(headers, rpcClient, serviceMetadata, codecManager, protocolId);
Map<String, ThriftMethodHandler> methodHandlerMap = new HashMap<>();
methods.forEach(
(key, value) -> {
methodHandlerMap.put(key.getName(), value);
});
// Set method handlers
getPointsMethodHandler = methodHandlerMap.get("getPoints");
}
@Override
public void close() {
super.close();
}
@Override
public ListenableFuture<Map<String, List<Integer>>> getPoints(
Set<String> key,
long legacyStuff) {
try {
return (ListenableFuture<Map<String, List<Integer>>>) execute(getPointsMethodHandler, getPointsExceptions, key, legacyStuff);
} catch (Throwable t) {
throw new RuntimeTException(t.getMessage(), t);
}
}
public ListenableFuture<Map<String, List<Integer>>> getPoints(
Set<String> key,
long legacyStuff,
RpcOptions rpcOptions) {
try {
return (ListenableFuture<Map<String, List<Integer>>>) executeWithOptions(getPointsMethodHandler, getPointsExceptions, rpcOptions, key, legacyStuff);
} catch (Throwable t) {
throw new RuntimeTException(t.getMessage(), t);
}
}
}
|
[
"facebook-github-bot@users.noreply.github.com"
] |
facebook-github-bot@users.noreply.github.com
|
0874107cd833f3e2581fe008335f96a9db1ed39a
|
6252c165657baa6aa605337ebc38dd44b3f694e2
|
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-900-Files/boiler-To-Generate-900-Files/syncregions-900Files/TemperatureController5523.java
|
1a48402091efdb4518b6ead61d6ad3881497deac
|
[] |
no_license
|
soha500/EglSync
|
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
|
55101bc781349bb14fefc178bf3486e2b778aed6
|
refs/heads/master
| 2021-06-23T02:55:13.464889
| 2020-12-11T19:10:01
| 2020-12-11T19:10:01
| 139,832,721
| 0
| 1
| null | 2019-05-31T11:34:02
| 2018-07-05T10:20:00
|
Java
|
UTF-8
|
Java
| false
| false
| 367
|
java
|
package syncregions;
public class TemperatureController5523 {
public execute(int temperature5523, int targetTemperature5523) {
//sync _bfpnFUbFEeqXnfGWlV5523, behaviour
1-if(temperatureDifference > 0 && boilerStatus == true) { return 1; } else if (temperatureDifference < 0 && boilerStatus == false) { return 2; } else return 0;
//endSync
}
}
|
[
"sultanalmutairi@172.20.10.2"
] |
sultanalmutairi@172.20.10.2
|
27a74608542f845fcd898a4a2e2f36cabc931bed
|
ab6c3626364b835f23df13ec6f9de2b80d99a887
|
/sos-commons/sos-commons-util/src/test/java/com/sos/commons/util/SOSPathTest.java
|
f3f1116159053a31db53ddec578e6aea25d772ec
|
[] |
no_license
|
sos-berlin/sos-components
|
e0a2b05b2cadd97dceb20f0322d13a869ad7a644
|
865506c880f39af38c22491b68bda8385d74f08a
|
refs/heads/master
| 2023-08-30T01:40:05.968297
| 2023-08-29T16:06:32
| 2023-08-29T16:06:32
| 116,804,720
| 0
| 0
| null | 2023-02-07T11:48:42
| 2018-01-09T10:59:58
|
Java
|
UTF-8
|
Java
| false
| false
| 902
|
java
|
package com.sos.commons.util;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.sos.commons.util.SOSPath.SOSPathResult;
public class SOSPathTest {
private static final Logger LOGGER = LoggerFactory.getLogger(SOSPathTest.class);
@Ignore
@Test
public void testCleanupDirectory() throws IOException {
Path cleanupDir = Paths.get("./src/test/resources/cleanup");
try {
if (Files.exists(cleanupDir)) {
LOGGER.info("[cleanup]start");
SOSPathResult r = SOSPath.cleanupDirectory(cleanupDir);
LOGGER.info("[cleanup][end]" + r);
}
} catch (Exception e) {
LOGGER.error(e.toString(), e);
}
}
}
|
[
"robert.ehrlich@sos-berlin.com"
] |
robert.ehrlich@sos-berlin.com
|
f7630fdf0ca3b7f8af0df29b1c02afe8bdf88776
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_c06f87ad4d0076fe0e0c4c8779503bc4f49d006a/Course/2_c06f87ad4d0076fe0e0c4c8779503bc4f49d006a_Course_s.java
|
0d59cb515d9540e84f52804fa9217424a0748d91
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 2,364
|
java
|
package edu.course.hibernate;
import java.io.Serializable;
import java.util.Set;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
@Entity
public class Course implements Serializable{
private static final long serialVersionUID = 1L;
private Set<Student> students;
private Teacher teacher;
private String name;
public Course() {
super();
}
public Course(Teacher teacher, String name) {
super();
this.teacher = teacher;
this.setName(name);
}
private Long id;
@Id
@GeneratedValue
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@ManyToMany
public Set<Student> getStudents() {
return students;
}
public void setStudents(Set<Student> students) {
this.students = students;
}
@ManyToOne
public Teacher getTeacher() {
return teacher;
}
public void setTeacher(Teacher teacher) {
this.teacher = teacher;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((teacher == null) ? 0 : teacher.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Course other = (Course) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (teacher == null) {
if (other.teacher != null)
return false;
} else if (!teacher.equals(other.teacher))
return false;
return true;
}
@Override
public String toString() {
return "Course [students=" + students + ", teacher=" + teacher
+ ", name=" + name + ", id=" + id + "]";
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
80ce1b9113192c40a37599ac739598b621a8133c
|
deae3b8d4df39dc9db9c96fb07c9844d3d742f23
|
/USNavyaSelenium/src/javaPrograms/InstanceVariablesIntialization.java
|
08815cd121f9c851b119e1d48311f951192a6c53
|
[] |
no_license
|
AnandSelenium/Navya
|
f023d8ccf9e87c51b9c6e961460d8c6cccbc5bb9
|
acee63850c1e3b30928539984d48702b169e61f1
|
refs/heads/master
| 2020-03-23T21:40:04.799717
| 2018-07-24T07:46:48
| 2018-07-24T07:46:48
| 142,123,774
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,468
|
java
|
package javaPrograms;
public class InstanceVariablesIntialization {
int empid;
String empName;
int salary;
static String CompanyName = "Google";
public void initial(int empid,String empName,int sal) // non -static Method
{
this.empid = empid;
this.empName = empName;
CompanyName ="Facebook"; // direct access
salary=sal; // Instance variable salary is assigned with local variable sal value
}
public void display() // non -static Method
{
System.out.println("EMpId: "+empid);
System.out.println("EMpName: "+empName);
System.out.println("Company Name: "+CompanyName);
System.out.println("Salary: "+salary);
}
public static void main(String[] args) {
InstanceVariablesIntialization emp = new InstanceVariablesIntialization();
emp.initial(10, "Ravi", 40000);
emp.display();
emp.initial(20, "Priyanka", 50000); // old values 10, ravi , 40000 are replaced with new values in the heap memory
emp.display();
InstanceVariablesIntialization emp1= new InstanceVariablesIntialization(); // creating new copy of memory for id,name,salary in the heap with reference to emp1 object
emp1.initial(30, "Navya", 60000);
emp1.display();
InstanceVariablesIntialization emp2= new InstanceVariablesIntialization(); // creating new copy of memory for id,name,salary in the heap with reference to emp1 object
emp2.initial(40, "Usha", 80000);
emp2.display();
}
}
|
[
"seleniumauto175@gmail.com"
] |
seleniumauto175@gmail.com
|
4f91a278fe4225a70a1c0e95736f91f0a1fbd47e
|
f079838945693463ba36ac6398eb3f75dd74cc0b
|
/SlidingPuzzle/src/main/SettingManager.java
|
423acdcebc497fd21228a141bdc6f933407156ac
|
[] |
no_license
|
james-fed/java
|
835bdf01e05b1be68296e5bb56de9626622e59fc
|
3935dcdc41467075e224cd607bab1f737c48e8b7
|
refs/heads/main
| 2023-04-12T12:53:33.270570
| 2021-05-15T09:04:42
| 2021-05-15T09:04:42
| 367,556,158
| 0
| 0
| null | 2021-05-15T06:21:03
| 2021-05-15T06:21:03
| null |
UTF-8
|
Java
| false
| false
| 1,292
|
java
|
package main;
import gameInfo.KeyboardLayout;
import io.Reader;
import io.Writer;
public class SettingManager {
private static final String SETTING_FILE_NAME = "setting.csv";
private static final int GAME_SIZE_SETTING_INDEX = 0;
private static final int KEYBOARD_LAYOUT_SETTING_INDEX = 1;
private static final int DEFAULT_GAME_SIZE = 4;
private static final KeyboardLayout DEFAULT_KEYBOARD_LAYOUT = KeyboardLayout.DEFAULT;
public static void implementSettingInGame() {
Reader reader = new Reader();
if (!reader.isExist(SETTING_FILE_NAME))
setSetting(DEFAULT_GAME_SIZE, DEFAULT_KEYBOARD_LAYOUT);
String[] settings = reader.read(SETTING_FILE_NAME).split(",");
Setting.setGameSize(Integer.parseInt(settings[GAME_SIZE_SETTING_INDEX]));
Setting.setKeyboardLayout(settings[KEYBOARD_LAYOUT_SETTING_INDEX].equals("0") ? KeyboardLayout.DEFAULT : KeyboardLayout.WSAD);
}
public static void setSetting(int gameSize, KeyboardLayout keyboardLayout) {
String gameInfo = "";
gameInfo = gameSize + "," + ((keyboardLayout == KeyboardLayout.DEFAULT) ? "0" : "1");
Writer writer = new Writer();
writer.write(SETTING_FILE_NAME, gameInfo);
implementSettingInGame();
}
}
|
[
"null"
] |
null
|
95557ba43200f36c0da654c25ec68c34a308d474
|
2df71870ef0c73ae9825a97b8a6c744a999a3a59
|
/sdkcompat/v193/com/google/idea/sdkcompat/clion/ToolchainCompat.java
|
3683a3aa2f7ac055138dc20f944b54470f1e62b4
|
[
"Apache-2.0"
] |
permissive
|
dillon-giacoppo/intellij
|
6eb5a4d04b4e1ec4ccbdd9fe9a47513d86164874
|
9fcfbc314f3ca2bb7c8823557a97ff8e8d3d2c02
|
refs/heads/master
| 2022-12-27T13:14:57.908103
| 2020-10-14T22:51:54
| 2020-10-14T22:52:28
| 254,621,407
| 2
| 0
|
Apache-2.0
| 2020-04-10T11:47:29
| 2020-04-10T11:47:29
| null |
UTF-8
|
Java
| false
| false
| 254
|
java
|
package com.google.idea.sdkcompat.cpp;
import com.jetbrains.cidr.cpp.toolchains.CPPToolchains.Toolchain;
/** Api compat with 2020.1 #api193 */
public class ToolchainCompat {
public static String getDefaultName() {
return Toolchain.DEFAULT;
}
}
|
[
"copybara-worker@google.com"
] |
copybara-worker@google.com
|
712540f284b86bd96dd6718d09627a2f9433ff98
|
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
|
/bin/modules/sap-subscription-billing/ysaprcomsfulfillment/src/com/sap/hybris/ysaprcomsfulfillment/actions/order/SapCancelOrderAction.java
|
61773e3a2c10fe6c92878441f736d307c39ac415
|
[] |
no_license
|
jp-developer0/hybrisTrail
|
82165c5b91352332a3d471b3414faee47bdb6cee
|
a0208ffee7fee5b7f83dd982e372276492ae83d4
|
refs/heads/master
| 2020-12-03T19:53:58.652431
| 2020-01-02T18:02:34
| 2020-01-02T18:02:34
| 231,430,332
| 0
| 4
| null | 2020-08-05T22:46:23
| 2020-01-02T17:39:15
| null |
UTF-8
|
Java
| false
| false
| 1,943
|
java
|
/*
* Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("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 SAP.
*/
package com.sap.hybris.ysaprcomsfulfillment.actions.order;
import de.hybris.platform.basecommerce.enums.ConsignmentStatus;
import de.hybris.platform.core.enums.OrderStatus;
import de.hybris.platform.core.model.order.OrderModel;
import de.hybris.platform.orderprocessing.model.OrderProcessModel;
import de.hybris.platform.sap.sapmodel.enums.SAPOrderStatus;
import de.hybris.platform.task.RetryLaterException;
/**
* Cancel multiple SAP OMS orders
*/
public class SapCancelOrderAction extends SapOmsAbstractAction<OrderProcessModel> {
@Override
public String execute(OrderProcessModel process) throws Exception {
final OrderModel order = process.getOrder();
if (isCancellationComplete(process)) {
setOrderStatus(order, OrderStatus.CANCELLED);
order.getConsignments().stream().forEach(consignment -> {
consignment.setStatus(ConsignmentStatus.CANCELLED);
getModelService().save(consignment);
});
return Transition.OK.toString();
} else {
return Transition.WAIT.toString();
}
}
protected boolean isCancellationComplete(OrderProcessModel process) {
boolean sapOrdersCancelled = process.getOrder().getSapOrders()//
.stream()//
.allMatch(sapOrder -> sapOrder.getSapOrderStatus().equals(SAPOrderStatus.CANCELLED_FROM_ERP));
boolean allSapConsignmentsCancelled = process
.getSapConsignmentProcesses()
.stream()
.allMatch(
sapConsignmentProcess -> sapConsignmentProcess.getConsignment().getStatus()
.equals(ConsignmentStatus.CANCELLED));
return sapOrdersCancelled && allSapConsignmentsCancelled;
}
}
|
[
"juan.gonzalez.working@gmail.com"
] |
juan.gonzalez.working@gmail.com
|
ec78c981b5da00396a0716790bf7b99650bbef8d
|
86505462601eae6007bef6c9f0f4eeb9fcdd1e7b
|
/bin/modules/order-management/yacceleratorordermanagement/src/de/hybris/platform/yacceleratorordermanagement/events/SendReturnLabelEventListener.java
|
d76aa123e8eb18a5149572d0c0a83e6b4b235b37
|
[] |
no_license
|
jp-developer0/hybrisTrail
|
82165c5b91352332a3d471b3414faee47bdb6cee
|
a0208ffee7fee5b7f83dd982e372276492ae83d4
|
refs/heads/master
| 2020-12-03T19:53:58.652431
| 2020-01-02T18:02:34
| 2020-01-02T18:02:34
| 231,430,332
| 0
| 4
| null | 2020-08-05T22:46:23
| 2020-01-02T17:39:15
| null |
UTF-8
|
Java
| false
| false
| 3,315
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2018 SAP SE or an SAP affiliate company.
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("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 SAP.
*/
package de.hybris.platform.yacceleratorordermanagement.events;
import de.hybris.platform.basecommerce.model.site.BaseSiteModel;
import de.hybris.platform.commerceservices.enums.SiteChannel;
import de.hybris.platform.commerceservices.event.AbstractSiteEventListener;
import de.hybris.platform.core.model.order.OrderModel;
import de.hybris.platform.processengine.BusinessProcessService;
import de.hybris.platform.returns.model.ReturnProcessModel;
import de.hybris.platform.returns.model.ReturnRequestModel;
import de.hybris.platform.servicelayer.model.ModelService;
import de.hybris.platform.servicelayer.util.ServicesUtil;
import de.hybris.platform.warehousing.event.SendReturnLabelEvent;
import org.springframework.beans.factory.annotation.Required;
/**
* listener to send return label to customer, after return request gets approved.
*/
public class SendReturnLabelEventListener extends AbstractSiteEventListener<SendReturnLabelEvent>
{
private ModelService modelService;
private BusinessProcessService businessProcessService;
@Override
protected void onSiteEvent(final SendReturnLabelEvent sendReturnLabelEvent)
{
final ReturnRequestModel returnRequest = sendReturnLabelEvent.getReturnRequest();
final ReturnProcessModel returnProcessModel = (ReturnProcessModel) getBusinessProcessService().createProcess(
"sendReturnLabelEmail-process-" + returnRequest.getCode() + "-" + System.currentTimeMillis(),
"sendReturnLabelEmail-process");
returnProcessModel.setReturnRequest(returnRequest);
getModelService().save(returnProcessModel);
getBusinessProcessService().startProcess(returnProcessModel);
}
@Override
protected boolean shouldHandleEvent(final SendReturnLabelEvent event)
{
final ReturnRequestModel returnRequest = event.getReturnRequest();
ServicesUtil.validateParameterNotNullStandardMessage("event.return", returnRequest);
final BaseSiteModel site = returnRequest.getOrder().getSite();
ServicesUtil.validateParameterNotNullStandardMessage("event.return.site", site);
return getSiteChannelForEvent(event).equals(site.getChannel());
}
protected SiteChannel getSiteChannelForEvent(final SendReturnLabelEvent event)
{
final OrderModel order = event.getReturnRequest().getOrder();
ServicesUtil.validateParameterNotNullStandardMessage("event.order", order);
final BaseSiteModel site = order.getSite();
ServicesUtil.validateParameterNotNullStandardMessage("event.order.site", site);
return site.getChannel();
}
protected BusinessProcessService getBusinessProcessService()
{
return businessProcessService;
}
@Required
public void setBusinessProcessService(final BusinessProcessService businessProcessService)
{
this.businessProcessService = businessProcessService;
}
protected ModelService getModelService()
{
return modelService;
}
@Required
public void setModelService(final ModelService modelService)
{
this.modelService = modelService;
}
}
|
[
"juan.gonzalez.working@gmail.com"
] |
juan.gonzalez.working@gmail.com
|
23b0abc524385226d3cf1a2fa7ee602a2216de86
|
ffc2f92d41d936fe29c695297dbd590d96c4babb
|
/micro-core/src/main/java/com/aol/micro/server/auto/discovery/FilterConfiguration.java
|
7435d7f01250023832879d7afab454fccbb91058
|
[
"Apache-2.0"
] |
permissive
|
celeskyking/micro-server
|
7755766363097471c381648c357a3ff9631a4c5c
|
99ab9bc057b189cace7b47c385bba0334ab73725
|
refs/heads/master
| 2021-01-24T21:47:13.420494
| 2015-10-30T16:59:46
| 2015-10-30T16:59:46
| 45,366,624
| 1
| 0
| null | 2015-11-02T01:58:59
| 2015-11-02T01:58:58
| null |
UTF-8
|
Java
| false
| false
| 406
|
java
|
package com.aol.micro.server.auto.discovery;
import java.util.Map;
import javax.servlet.Filter;
import org.pcollections.HashTreePMap;
public interface FilterConfiguration {
public String[] getMapping();
default Class<? extends Filter> getFilter(){
return null;
}
default String getName(){
return null;
}
default Map<String,String> getInitParameters(){
return HashTreePMap.empty();
}
}
|
[
"john.mcclean@teamaol.com"
] |
john.mcclean@teamaol.com
|
126f803c9b38e0b8f065ec00184c35642d86fa3c
|
a4a51084cfb715c7076c810520542af38a854868
|
/src/main/java/com/google/android/exoplayer2/e/h/b.java
|
7178dd05f9d8b0cdb2b0444755728fb058f7ae87
|
[] |
no_license
|
BharathPalanivelu/repotest
|
ddaf56a94eb52867408e0e769f35bef2d815da72
|
f78ae38738d2ba6c9b9b4049f3092188fabb5b59
|
refs/heads/master
| 2020-09-30T18:55:04.802341
| 2019-12-02T10:52:08
| 2019-12-02T10:52:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,986
|
java
|
package com.google.android.exoplayer2.e.h;
import com.path.android.jobqueue.JobManager;
final class b {
/* renamed from: a reason: collision with root package name */
private final int f9759a;
/* renamed from: b reason: collision with root package name */
private final int f9760b;
/* renamed from: c reason: collision with root package name */
private final int f9761c;
/* renamed from: d reason: collision with root package name */
private final int f9762d;
/* renamed from: e reason: collision with root package name */
private final int f9763e;
/* renamed from: f reason: collision with root package name */
private final int f9764f;
/* renamed from: g reason: collision with root package name */
private long f9765g;
private long h;
public b(int i, int i2, int i3, int i4, int i5, int i6) {
this.f9759a = i;
this.f9760b = i2;
this.f9761c = i3;
this.f9762d = i4;
this.f9763e = i5;
this.f9764f = i6;
}
public long a() {
return ((this.h / ((long) this.f9762d)) * JobManager.NS_PER_MS) / ((long) this.f9760b);
}
public int b() {
return this.f9762d;
}
public int c() {
return this.f9760b * this.f9763e * this.f9759a;
}
public int d() {
return this.f9760b;
}
public int e() {
return this.f9759a;
}
public long a(long j) {
long j2 = (j * ((long) this.f9761c)) / JobManager.NS_PER_MS;
int i = this.f9762d;
return Math.min((j2 / ((long) i)) * ((long) i), this.h - ((long) i)) + this.f9765g;
}
public long b(long j) {
return (j * JobManager.NS_PER_MS) / ((long) this.f9761c);
}
public boolean f() {
return (this.f9765g == 0 || this.h == 0) ? false : true;
}
public void a(long j, long j2) {
this.f9765g = j;
this.h = j2;
}
public int g() {
return this.f9764f;
}
}
|
[
"noiz354@gmail.com"
] |
noiz354@gmail.com
|
bfa21446f6b0c0929818706d0d1ca12f84cd75a3
|
1b4651958d6412dc4c7373131718223b019319d1
|
/life-record-service/src/main/java/pri/jarod/javaweb/enums/AuditCheckType.java
|
095c8a32f026c8d5943a0b5b1bf1ea8f42958aee
|
[] |
no_license
|
userkdg/life-record
|
fbbde48cac5c5ec943656bb03cd3e1d0f93aca60
|
e5d1b1103b4ac49a59800f02fcfd2c260979392f
|
refs/heads/master
| 2023-01-06T06:15:33.500668
| 2020-10-18T13:39:17
| 2020-10-18T13:39:17
| 305,109,380
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,124
|
java
|
package pri.jarod.javaweb.enums;
import pri.jarod.javaweb.constant.DapConstant;
/**
* @author Jarod.Kong
* @date 2020/9/27 8:43
*/
public enum AuditCheckType {
CHINESE(1, DapConstant.AUDIT_SYSTEM_REPORT_CHINESE, "表&字段结构完整性检查", "检查表级字段的中文名是否存在"),
STANDARD(2, DapConstant.AUDIT_SYSTEM_REPORT_STANDARD, "标准符合度检查", "检查已映射标准的字段,长度及类型是否与对应的标准相符");
private final int code;
private final String springBeanName;
private final String checkType;
private final String checkDesc;
AuditCheckType(int code, String springBeanName, String checkType, String checkDesc) {
this.code = code;
this.springBeanName = springBeanName;
this.checkType = checkType;
this.checkDesc = checkDesc;
}
public int getCode() {
return code;
}
public String getCheckType() {
return checkType;
}
public String getCheckDesc() {
return checkDesc;
}
public String getSpringBeanName() {
return springBeanName;
}
}
|
[
"1265598443@qq.com"
] |
1265598443@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.