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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08c0366ad80b024d760a67e64717aa41fb4455bd
|
54ee36062d824dd613dfe1f97dbdb02e795a2b19
|
/src/com/fordays/fdpay/agent/_entity/_AgentRelationship.java
|
ccad572f6b4e3fc4fe7a69c58e318199b1daee44
|
[] |
no_license
|
teardemon/TPP
|
732104dcc29b659b5081bc5c4f61227641ffa043
|
cab24f4e5148bac6d699a7a767bb41005eea7e0f
|
refs/heads/master
| 2020-05-29T11:50:30.782652
| 2012-10-09T09:08:06
| 2012-10-09T09:08:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,094
|
java
|
package com.fordays.fdpay.agent._entity;
/**
* AgentRelationship generated by hbm2java
*/
public class _AgentRelationship
extends org.apache.struts.action.ActionForm implements Cloneable
{
private static final long serialVersionUID = 1L;
// Fields
protected long id;
protected Long parentAgentId;
protected java.sql.Timestamp createDate;
protected java.sql.Timestamp expireDate;
protected com.fordays.fdpay.agent.Agent agent;
// Constructors
// Property accessors
public long getId() {
return this.id;
}
public void setId(long id) {
this.id = id;
}
public Long getParentAgentId() {
return this.parentAgentId;
}
public void setParentAgentId(Long parentAgentId) {
this.parentAgentId = parentAgentId;
}
public java.sql.Timestamp getCreateDate() {
return this.createDate;
}
public void setCreateDate(java.sql.Timestamp createDate) {
this.createDate = createDate;
}
public java.sql.Timestamp getExpireDate() {
return this.expireDate;
}
public void setExpireDate(java.sql.Timestamp expireDate) {
this.expireDate = expireDate;
}
public com.fordays.fdpay.agent.Agent getAgent() {
return this.agent;
}
public void setAgent(com.fordays.fdpay.agent.Agent agent) {
this.agent = agent;
}
// The following is extra code specified in the hbm.xml files
public Object clone()
{
Object o = null;
try
{
o = super.clone();
}
catch (CloneNotSupportedException e)
{
e.printStackTrace();
}
return o;
}
private String thisAction="";
public String getThisAction()
{
return thisAction;
}
public void setThisAction(String thisAction)
{
this.thisAction=thisAction;
}
private int index=0;
public int getIndex()
{
return index;
}
public void setIndex(int index)
{
this.index=index;
}
// end of extra code specified in the hbm.xml files
}
|
[
"yanrui@kurui.com"
] |
yanrui@kurui.com
|
8af4ca19f2e63d3108c3311d896358d64b006790
|
498dd2daff74247c83a698135e4fe728de93585a
|
/clients/google-api-services-lifesciences/v2beta/1.29.2/com/google/api/services/lifesciences/v2beta/CloudLifeSciencesScopes.java
|
dd813bac79c8f648f0c7a65b14d5c31a361a0387
|
[
"Apache-2.0"
] |
permissive
|
googleapis/google-api-java-client-services
|
0e2d474988d9b692c2404d444c248ea57b1f453d
|
eb359dd2ad555431c5bc7deaeafca11af08eee43
|
refs/heads/main
| 2023-08-23T00:17:30.601626
| 2023-08-20T02:16:12
| 2023-08-20T02:16:12
| 147,399,159
| 545
| 390
|
Apache-2.0
| 2023-09-14T02:14:14
| 2018-09-04T19:11:33
| null |
UTF-8
|
Java
| false
| false
| 1,403
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.lifesciences.v2beta;
/**
* Available OAuth 2.0 scopes for use with the Cloud Life Sciences API.
*
* @since 1.4
*/
public class CloudLifeSciencesScopes {
/** View and manage your data across Google Cloud Platform services. */
public static final String CLOUD_PLATFORM = "https://www.googleapis.com/auth/cloud-platform";
/**
* Returns an unmodifiable set that contains all scopes declared by this class.
*
* @since 1.16
*/
public static java.util.Set<String> all() {
java.util.Set<String> set = new java.util.HashSet<String>();
set.add(CLOUD_PLATFORM);
return java.util.Collections.unmodifiableSet(set);
}
private CloudLifeSciencesScopes() {
}
}
|
[
"chingor@google.com"
] |
chingor@google.com
|
50a08cfff090bf42f195c7b9117cf453e8850b30
|
8449bbf3b7addce0c68e60b8f9920e333ab6384c
|
/src/only/task/Repl128_2.java
|
1124f821936eb572e282c4472f0c2c1673c2ae57
|
[] |
no_license
|
Guljemal1994/Practice
|
7e34f78d31f09fddf89e903ccd309e1126aebfa8
|
b5a5fdfd60f1a529e6a8f3bf2e89c355a085bb4e
|
refs/heads/master
| 2022-04-14T20:59:39.779966
| 2020-04-13T04:23:37
| 2020-04-13T04:23:37
| 255,229,584
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 371
|
java
|
package only.task;
public class Repl128_2 {
static int countVowels(String s)
{
String count = s.replaceAll("[^aA,eE,iI,oO,uU]", "");
return count.length();
}
//test case below (dont change):
public static void main(String[] args){
System.out.println(countVowels("obama")); //3
System.out.println(countVowels("happy friday! i love weekends")); //9
}
}
|
[
"konulkuly@gmail.com"
] |
konulkuly@gmail.com
|
e5d1fdbe14530c166b20e6053ef40f646c72f753
|
7a21ff93edba001bef328a1e927699104bc046e5
|
/project-pipe-parent/module-parent/service-module-parent/pipe-service/src/main/java/com/dotop/pipe/api/service/mark/IMarkService.java
|
11c0a1575b7bf90a2c22950187bbe1c47de7c56f
|
[] |
no_license
|
150719873/zhdt
|
6ea1ca94b83e6db2012080f53060d4abaeaf12f5
|
c755dacdd76b71fd14aba5e475a5862a8d92c1f6
|
refs/heads/master
| 2022-12-16T06:59:28.373153
| 2020-09-14T06:57:16
| 2020-09-14T06:57:16
| 299,157,259
| 1
| 0
| null | 2020-09-28T01:45:10
| 2020-09-28T01:45:10
| null |
UTF-8
|
Java
| false
| false
| 931
|
java
|
package com.dotop.pipe.api.service.mark;
import com.dotop.pipe.core.bo.mark.MarkBo;
import com.dotop.pipe.core.vo.mark.MarkVo;
import com.dotop.smartwater.dependence.core.common.BaseService;
import com.dotop.smartwater.dependence.core.exception.FrameworkRuntimeException;
import com.dotop.smartwater.dependence.core.pagination.Pagination;
import java.util.List;
public interface IMarkService extends BaseService<MarkBo, MarkVo> {
@Override
MarkVo add(MarkBo markBo) throws FrameworkRuntimeException;
@Override
MarkVo get(MarkBo markBo) throws FrameworkRuntimeException;
@Override
Pagination<MarkVo> page(MarkBo markBo) throws FrameworkRuntimeException;
@Override
List<MarkVo> list(MarkBo markBo) throws FrameworkRuntimeException;
@Override
MarkVo edit(MarkBo markBo) throws FrameworkRuntimeException;
@Override
String del(MarkBo markBo) throws FrameworkRuntimeException;
}
|
[
"2216502193@qq.com"
] |
2216502193@qq.com
|
43500f4b9d143a53d261fb1219a704b8a0e4c717
|
e3cc6d2f4634e9edcca23f6b41148654ae2f0f7a
|
/src/main/java/us/codecraft/webmagic/UserRequest.java
|
01029474e84ec6a541d8351c5aca42828bb76cfe
|
[] |
no_license
|
buildhappy/webCrawler
|
c54f36caedb7e3f1418a8cc46f897f846f53b1d1
|
109f0d1acadf38da1985e147238c80715480ead2
|
refs/heads/master
| 2020-05-19T20:56:07.168001
| 2015-09-15T07:11:46
| 2015-09-15T07:11:46
| 42,501,826
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 599
|
java
|
package us.codecraft.webmagic;
/**
* java bean for user request encapsulation
* @author buildhappy
*
*/
public class UserRequest {
private String channelId;
private String keyword;
private String version;
public String getChannelId() {
return channelId;
}
public void setChannelId(String channelId) {
this.channelId = channelId;
}
public String getKeyword() {
return keyword;
}
public void setKeyword(String keyword) {
this.keyword = keyword;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}
|
[
"buildhappy512@163.com"
] |
buildhappy512@163.com
|
f446ae4554fa01fd60d889daefbed6d305d52067
|
50c2aa5ca3f7001d087e328ea923804785b9403f
|
/app/src/main/java/com/nfu/oldwork/model/QuerySimpleModel.java
|
a5170d87af42d4469f3e0d36226161b8cef407cd
|
[] |
no_license
|
MrLeeBean/oldwork
|
17c71596b48ce7ee95f7fc38da160951c56b31c2
|
28a9261adb58f048e09157b7d1c7111b23ccd152
|
refs/heads/master
| 2021-01-16T17:52:50.184407
| 2017-08-22T07:08:11
| 2017-08-22T07:08:11
| 100,018,439
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 615
|
java
|
package com.nfu.oldwork.model;
/**
* Created by Administrator on 2017-8-15.
*/
public class QuerySimpleModel {
private int signKey;
private String starId;
private String oldId;
public int getSignKey() {
return signKey;
}
public void setSignKey(int signKey) {
this.signKey = signKey;
}
public String getStarId() {
return starId;
}
public void setStarId(String starId) {
this.starId = starId;
}
public String getOldId() {
return oldId;
}
public void setOldId(String oldId) {
this.oldId = oldId;
}
}
|
[
"986417576@qq.com"
] |
986417576@qq.com
|
d6abaf5ab62b268751d167afcf19b37fc239dc2a
|
7beb062b1720ca30700c3546139d2d5d0510f54d
|
/aatrox-wechat/src/main/java/com/aatrox/wechat/wxmp/request/TemplateMessageSendRequest.java
|
7c8ae25fff94f61789a5dcba0051168cb7291392
|
[] |
no_license
|
beiyuanbing/aatrox-cloud
|
7976024f02200bd12a2e4812cadab42c4ef424e2
|
bfc2ecac7f7f3d1c98b85379f1135ab511fb7535
|
refs/heads/master
| 2023-08-28T20:13:29.701897
| 2021-06-09T07:11:48
| 2021-06-09T07:11:48
| 245,924,093
| 0
| 0
| null | 2021-04-22T19:11:45
| 2020-03-09T02:12:26
|
Java
|
UTF-8
|
Java
| false
| false
| 2,942
|
java
|
package com.aatrox.wechat.wxmp.request;
import com.aatrox.common.utils.CommonMapUtil;
import com.aatrox.common.utils.HttpClientUtil;
import com.aatrox.wechat.wxmp.base.WxmpBaseRequest;
import com.aatrox.wechat.wxmp.base.WxmpBaseResponse;
import com.alibaba.fastjson.JSONObject;
import org.apache.http.entity.ContentType;
import java.util.Iterator;
import java.util.Map;
/**
* @author aatrox
* @desc
* @date 2020/1/16
*/
public class TemplateMessageSendRequest extends WxmpBaseRequest<WxmpBaseResponse> {
private String toUser;
private String templateId;
private String formId;
private String page;
private Map<String, Object> data;
private String emphasisKeyword;
public TemplateMessageSendRequest(String toUser, String templateId, String formId) {
this.toUser = toUser;
this.templateId = templateId;
this.formId = formId;
}
@Override
protected boolean needAccessToken() {
return true;
}
@Override
protected String requestUrl() {
StringBuffer sb = new StringBuffer("https://api.weixin.qq.com/cgi-bin/message/wxopen/template/send");
sb.append("?access_token=").append(this.accessToken);
return sb.toString();
}
@Override
protected String toPostBodyString() {
JSONObject jsonObject = new JSONObject();
jsonObject.put("touser", this.toUser);
jsonObject.put("template_id", this.templateId);
jsonObject.put("form_id", this.formId);
jsonObject.put("emphasis_keyword", this.emphasisKeyword);
jsonObject.put("page", this.page);
if (this.data != null) {
JSONObject dataJ = new JSONObject();
jsonObject.put("data", dataJ);
Iterator var3 = this.data.entrySet().iterator();
while (var3.hasNext()) {
Map.Entry<String, Object> item = (Map.Entry) var3.next();
JSONObject itemJ = new JSONObject();
itemJ.put("value", item.getValue());
dataJ.put((String) item.getKey(), itemJ);
}
}
return jsonObject.toJSONString();
}
public void setData(Map<String, Object> data) {
this.data = data;
}
public void setEmphasisKeyword(String emphasisKeyword) {
this.emphasisKeyword = emphasisKeyword;
}
public void setPage(String page) {
this.page = page;
}
@Override
protected WxmpBaseResponse doRequest() {
HttpClientUtil.HttpParam httpParam = HttpClientUtil.HttpParam.makePostHttpParam(this.requestUrl());
httpParam.setHeader(CommonMapUtil.NEW("Content-Type", ContentType.APPLICATION_JSON.getMimeType()));
httpParam.setPostBodyString(this.toPostBodyString());
HttpClientUtil.HttpResult result = HttpClientUtil.httpRequest(httpParam);
return (WxmpBaseResponse) JSONObject.parseObject(result.contentToString(), WxmpBaseResponse.class);
}
}
|
[
"425210220@qq.com"
] |
425210220@qq.com
|
efaa278399ec88fa64f3c75d5330c6db26af1da9
|
8a8254c83cc2ec2c401f9820f78892cf5ff41384
|
/baseline/Travel-Mate/Android/app/src/main/java/baseline/io/github/project_travel_mate/SplashActivity.java
|
dac9da9a9199d61cd838bfd7c249ea3b2f3e54f6
|
[
"MIT"
] |
permissive
|
VU-Thesis-2019-2020-Wesley-Shann/subjects
|
46884bc6f0f9621be2ab3c4b05629e3f6d3364a0
|
14a6d6bb9740232e99e7c20f0ba4ddde3e54ad88
|
refs/heads/master
| 2022-12-03T05:52:23.309727
| 2020-08-19T12:18:54
| 2020-08-19T12:18:54
| 261,718,101
| 0
| 0
| null | 2020-07-11T12:19:07
| 2020-05-06T09:54:05
|
Java
|
UTF-8
|
Java
| false
| false
| 1,692
|
java
|
package baseline.io.github.project_travel_mate;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
import androidx.appcompat.app.AppCompatActivity;
import android.view.animation.AccelerateDecelerateInterpolator;
import com.eftimoff.androipathview.PathView;
import baseline.io.github.project_travel_mate.login.LoginActivity;
import static utils.Constants.USER_TOKEN;
public class SplashActivity extends AppCompatActivity {
private SharedPreferences mSharedPreferences;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash);
final PathView pathView = findViewById(R.id.pathView);
pathView.getPathAnimator()
.delay(1000)
.duration(1000)
.interpolator(new AccelerateDecelerateInterpolator())
.start();
pathView.useNaturalColors();
pathView.setFillAfter(true);
mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
Intent i;
if (mSharedPreferences.getString(USER_TOKEN, null) != null) {
i = MainActivity.getStartIntent(SplashActivity.this);
} else {
i = LoginActivity.getStartIntent(SplashActivity.this);
}
// TODO :: check for the user_token here & redirect to corresponding class
// If token is null -> LoginActivity, else MainActivity
new Handler().postDelayed(() -> {
startActivity(i);
finish();
}, 2000);
}
}
|
[
"sshann95@outlook.com"
] |
sshann95@outlook.com
|
608a3a06a9d91eb41cd1a36f6a7abf871dd3af93
|
5c6af71291bb9e955ef61678325494b707ac0aa7
|
/sourcecode/chapter12/src/visitcontrol/Tester.java
|
71b0532bd8f9f64086df04f511d9f79c99a5b63f
|
[] |
no_license
|
CoderDream/JavaObjectOrientedProgramming
|
0da1214fa06aa41c6ec4392468fb83997e3a12c4
|
78e741b0acea9ca148a287663266272b4cd1a763
|
refs/heads/master
| 2021-04-29T00:08:18.946778
| 2016-12-31T00:47:49
| 2016-12-31T00:47:49
| 77,717,560
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 716
|
java
|
package visitcontrol;
class Outer{
public class InnerTool{ //内部类
public int add(int a,int b){
return a+b;
}
}
private InnerTool tool=new InnerTool();
public void add(int a,int b,int c){
tool.add(tool.add(a,b),c);
}
}
public class Tester{
public static void main(String args[]){
Outer o=new Outer();
o.add(1,2,3);
Outer.InnerTool tool=new Outer().new InnerTool();
}
}
/****************************************************
* 作者:孙卫琴 *
* 来源:<<Java面向对象编程>> *
* 技术支持网址:www.javathinker.org *
***************************************************/
|
[
"coderdream@gmail.com"
] |
coderdream@gmail.com
|
ed16956e77cc82b5485f22715c4d06f176d71c62
|
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
|
/tags/2011-04-20/seasar2-2.4.44/seasar2/s2-extension/src/main/java/org/seasar/extension/dxo/converter/impl/NumberConverter.java
|
50ce38becfaa8a8b00c7a654754c1a983be5e950
|
[
"Apache-2.0"
] |
permissive
|
svn2github/s2container
|
54ca27cf0c1200a93e1cb88884eb8226a9be677d
|
625adc6c4e1396654a7297d00ec206c077a78696
|
refs/heads/master
| 2020-06-04T17:15:02.140847
| 2013-08-09T09:38:15
| 2013-08-09T09:38:15
| 10,850,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,816
|
java
|
/*
* Copyright 2004-2011 the Seasar Foundation and the Others.
*
* 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.seasar.extension.dxo.converter.impl;
import java.math.BigDecimal;
import org.seasar.extension.dxo.converter.ConversionContext;
import org.seasar.extension.dxo.exception.ConversionRuntimeException;
import org.seasar.framework.util.StringUtil;
/**
* {@link Number 数}から{@link Short}への変換を行うコンバータの抽象クラスです。
* <p>
* 変換は次のように行われます。
* </p>
* <ul>
* <li>変換元のオブジェクトが{@link Number}なら、サブクラスによる変換結果を変換先とします。</li>
* <li>変換元のオブジェクトが{@link CharSequence}なら、それを値とする{@link BigDecimal}からサブクラスが変換した結果を変換先とします。</li>
* <li>変換元のオブジェクトが{@link Boolean}なら、変換元が<code>true</code>なら1、<code>false</code>なら0を変換先とします。</li>
* <li>変換元のオブジェクトが列挙なら、その序数を変換先とします。</li>
* <li>それ以外の場合は、{@link ConversionRuntimeException}をスローします。</li>
* </ul>
*
* @author Satoshi Kimura
* @author koichik
*/
public abstract class NumberConverter extends AbstractConverter {
/** 変換元が<code>true</code>だった場合の値です。 */
protected static final Integer TRUE = new Integer(1);
/** 変換元が<code>false</code>だった場合の値です。 */
protected static final Integer FALSE = new Integer(0);
public Class[] getSourceClasses() {
return new Class[] { Number.class, CharSequence.class, Boolean.class,
Object.class };
}
public Object convert(final Object source, final Class destClass,
final ConversionContext context) {
if (source == null) {
return null;
}
if (source instanceof Number) {
return convert((Number) source);
}
if (source instanceof CharSequence) {
return convert(source.toString());
}
if (source instanceof Boolean) {
final boolean b = ((Boolean) source).booleanValue();
if (b) {
return convert(TRUE);
}
return convert(FALSE);
}
if (isEnum(source.getClass())) {
return convert(new Integer(getEnumOrdinal(source)));
}
throw new ConversionRuntimeException(source.getClass());
}
/**
* 数値を変換して返します。
*
* @param number
* 変換元の数値
* @return 変換結果の数値
*/
protected abstract Number convert(Number number);
/**
* 数を表す文字列から数値に変換して返します。
*
* @param number
* 数を表す文字列
* @return 変換結果の数値
*/
protected Number convert(final String number) {
if (StringUtil.isEmpty(number)) {
return null;
}
final BigDecimal decimal = new BigDecimal(number);
return convert(decimal);
}
}
|
[
"koichik@319488c0-e101-0410-93bc-b5e51f62721a"
] |
koichik@319488c0-e101-0410-93bc-b5e51f62721a
|
4154cc2a3f299ba8460d3e591632011b35b7a91b
|
ceeacb5157b67b43d40615daf5f017ae345816db
|
/generated/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceNameAvailabilityInner.java
|
334ca8358b8f549ee25528f38a2b7252b3826e62
|
[
"LicenseRef-scancode-generic-cla"
] |
no_license
|
ChenTanyi/autorest.java
|
1dd9418566d6b932a407bf8db34b755fe536ed72
|
175f41c76955759ed42b1599241ecd876b87851f
|
refs/heads/ci
| 2021-12-25T20:39:30.473917
| 2021-11-07T17:23:04
| 2021-11-07T17:23:04
| 218,717,967
| 0
| 0
| null | 2020-11-18T14:14:34
| 2019-10-31T08:24:24
|
Java
|
UTF-8
|
Java
| false
| false
| 4,741
|
java
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.appservice.generated.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.appservice.generated.models.InAvailabilityReasonType;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Information regarding availability of a resource name. */
@Fluent
public final class ResourceNameAvailabilityInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceNameAvailabilityInner.class);
/*
* <code>true</code> indicates name is valid and available.
* <code>false</code> indicates the name is invalid, unavailable, or both.
*/
@JsonProperty(value = "nameAvailable")
private Boolean nameAvailable;
/*
* <code>Invalid</code> indicates the name provided does not match Azure
* App Service naming requirements. <code>AlreadyExists</code> indicates
* that the name is already in use and is therefore unavailable.
*/
@JsonProperty(value = "reason")
private InAvailabilityReasonType reason;
/*
* If reason == invalid, provide the user with the reason why the given
* name is invalid, and provide the resource naming requirements so that
* the user can select a valid name. If reason == AlreadyExists, explain
* that resource name is already in use, and direct them to select a
* different name.
*/
@JsonProperty(value = "message")
private String message;
/**
* Get the nameAvailable property: <code>true</code> indicates name is valid and available.
* <code>false</code> indicates the name is invalid, unavailable, or both.
*
* @return the nameAvailable value.
*/
public Boolean nameAvailable() {
return this.nameAvailable;
}
/**
* Set the nameAvailable property: <code>true</code> indicates name is valid and available.
* <code>false</code> indicates the name is invalid, unavailable, or both.
*
* @param nameAvailable the nameAvailable value to set.
* @return the ResourceNameAvailabilityInner object itself.
*/
public ResourceNameAvailabilityInner withNameAvailable(Boolean nameAvailable) {
this.nameAvailable = nameAvailable;
return this;
}
/**
* Get the reason property: <code>Invalid</code> indicates the name provided does not match Azure App
* Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and
* is therefore unavailable.
*
* @return the reason value.
*/
public InAvailabilityReasonType reason() {
return this.reason;
}
/**
* Set the reason property: <code>Invalid</code> indicates the name provided does not match Azure App
* Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and
* is therefore unavailable.
*
* @param reason the reason value to set.
* @return the ResourceNameAvailabilityInner object itself.
*/
public ResourceNameAvailabilityInner withReason(InAvailabilityReasonType reason) {
this.reason = reason;
return this;
}
/**
* Get the message property: If reason == invalid, provide the user with the reason why the given name is invalid,
* and provide the resource naming requirements so that the user can select a valid name. If reason ==
* AlreadyExists, explain that resource name is already in use, and direct them to select a different name.
*
* @return the message value.
*/
public String message() {
return this.message;
}
/**
* Set the message property: If reason == invalid, provide the user with the reason why the given name is invalid,
* and provide the resource naming requirements so that the user can select a valid name. If reason ==
* AlreadyExists, explain that resource name is already in use, and direct them to select a different name.
*
* @param message the message value to set.
* @return the ResourceNameAvailabilityInner object itself.
*/
public ResourceNameAvailabilityInner withMessage(String message) {
this.message = message;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
}
|
[
"actions@github.com"
] |
actions@github.com
|
91c8e50014b0dbcb41fc906cbdcbb6fcb307df00
|
55cb55109f9e1aadf0e4e9b3ca92edc01af4318f
|
/spring_11/src/main/java/coreservlets/MockCustomerQuery.java
|
8098fadff1f4c31a10970ceea48b5ce683a78bb0
|
[] |
no_license
|
nigue/coreservlets
|
aa0b1204568299191ad0fb77fce21fd2dc839bea
|
47ce2db2a33fe93040666210dc0d6bead3c40b6b
|
refs/heads/master
| 2021-01-21T04:39:16.652670
| 2016-06-02T02:30:54
| 2016-06-02T02:30:54
| 19,889,167
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 834
|
java
|
package coreservlets;
import java.util.ArrayList;
import java.util.List;
/**
* Mock CustomerQuery implementation.
*/
public class MockCustomerQuery implements CustomerQuery {
/** Cached customers */
private List<Customer> customers;
/**
* Constructs a new MockCustomerQuery instance initialized with the argued
* customer list.
*
* @param customers no requirements
*/
public MockCustomerQuery(List<Customer> customers) {
this.customers = customers != null ? customers : new ArrayList<Customer>();
}
/*
* @see coreservlets.CustomerQuery#getCustomerByName(java.lang.String)
*/
public Customer getCustomerByName(String name) {
for(Customer c : customers){
if(c.getName().equals(name)){
return c;
}
}
return null;
}
}
|
[
"anibaldavor@gmail.com"
] |
anibaldavor@gmail.com
|
372bb3459e01507ab8d7d61e8c1679a00491ef72
|
48f0b3e029b304bf2cfb64419aad795445862856
|
/Registrations/ConstraintInterpreters/org.emftext.refactoring.oclinterpreter/src/org/emftext/refactoring/oclinterpreter/ErrorInterpretationResult.java
|
46bb02abdd3f58c8521f579a1b351e255b225e09
|
[] |
no_license
|
jreimone/refactory
|
09dda0718d5d8117f858d3e4497e8c1371530518
|
837f1ca3d8537250d024ead3be3ba95f7845409e
|
refs/heads/master
| 2021-07-18T15:34:02.469855
| 2021-02-23T07:55:25
| 2021-02-23T07:55:25
| 56,208,480
| 2
| 1
| null | 2020-10-13T06:52:33
| 2016-04-14T05:01:02
|
Java
|
UTF-8
|
Java
| false
| false
| 678
|
java
|
/**
*
*/
package org.emftext.refactoring.oclinterpreter;
import org.emftext.refactoring.registry.rolemapping.IInterpretationResult;
/**
* @author jreimann
*
*/
public class ErrorInterpretationResult implements IInterpretationResult {
private Exception ex;
private String message;
public ErrorInterpretationResult(String message) {
super();
this.message = message;
}
public ErrorInterpretationResult(Exception ex) {
this.ex = ex;
}
@Override
public boolean wasSuccessful() {
return false;
}
@Override
public String getErrorMessage() {
if(ex != null){
return ex.getMessage();
}
return message;
}
}
|
[
"jreimone@users.noreply.github.com"
] |
jreimone@users.noreply.github.com
|
910c3d52a4055d2b52e119a239ac9ea86afb6ad2
|
2c1d85d1bdf4dd6816567998bc037669f7c5d85c
|
/src/main/java/demoMod/relics/BlueGuonStone.java
|
7df18f86a1a1934bf44b34dde53d0ae004091a5b
|
[] |
no_license
|
tldyl/demoMod
|
ecf996f47adfda0ffd78581c2405b22b960ac1f5
|
66e55a9aad53e65af65875bdb3edf3f396e92c47
|
refs/heads/master
| 2022-06-03T08:51:43.592210
| 2022-05-15T14:09:25
| 2022-05-15T14:09:25
| 243,190,716
| 4
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,308
|
java
|
package demoMod.relics;
import basemod.abstracts.CustomRelic;
import com.badlogic.gdx.graphics.Texture;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.GainBlockAction;
import com.megacrit.cardcrawl.cards.DamageInfo;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.helpers.PowerTip;
import demoMod.DemoMod;
import demoMod.combo.Combo;
import demoMod.combo.ComboManager;
import demoMod.powers.BlueGuonStonePower;
public class BlueGuonStone extends CustomRelic implements Combo {
public static final String ID = DemoMod.makeID("BlueGuonStone");
public static final String IMG_PATH = "relics/blueGuonStone.png";
public static final Texture comboTexture = new Texture(DemoMod.getResourcePath("combos/relics/blueGuonStone.png"));
private boolean activated = false;
private boolean isRemoving = false;
private int blockAmount = 20;
public BlueGuonStone() {
super(ID, new Texture(DemoMod.getResourcePath(IMG_PATH)),
RelicTier.UNCOMMON, LandingSound.CLINK);
this.description = this.getUpdatedDescription();
this.tips.clear();
this.tips.add(new PowerTip(this.name, this.description));
this.initializeTips();
}
@Override
public void onUnequip() {
isRemoving = true;
ComboManager.detectCombo();
}
@Override
public void atBattleStart() {
activated = true;
}
@Override
public void onVictory() {
activated = false;
}
@Override
public String getUpdatedDescription() {
return this.DESCRIPTIONS[0] + this.blockAmount + this.DESCRIPTIONS[1];
}
@Override
public void onPlayerEndTurn() {
this.flash();
AbstractDungeon.actionManager.addToBottom(new GainBlockAction(AbstractDungeon.player, 2));
}
@Override
public int onAttacked(DamageInfo info, int damageAmount) {
AbstractPlayer p = AbstractDungeon.player;
if (activated && info.owner != null && info.type != DamageInfo.DamageType.HP_LOSS && info.type != DamageInfo.DamageType.THORNS && damageAmount > 0) {
this.flash();
AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(p, p, new BlueGuonStonePower(3)));
activated = false;
}
return damageAmount;
}
@Override
public String getItemId() {
return ID;
}
@Override
public void onComboActivated(String comboId) {
this.blockAmount = 30;
setDescriptionAfterLoading();
}
@Override
public void onComboDisabled(String comboId) {
this.blockAmount = 20;
setDescriptionAfterLoading();
}
private void setDescriptionAfterLoading() {
this.description = getUpdatedDescription();
this.tips.clear();
this.tips.add(new PowerTip(this.name, this.description));
this.initializeTips();
}
@Override
public boolean isRemoving() {
return isRemoving;
}
@Override
public Texture getComboPortrait() {
return comboTexture;
}
static {
ComboManager.addCombo(DemoMod.makeID("BluerGuonStone"), BlueGuonStone.class);
}
}
|
[
"756560020@qq.com"
] |
756560020@qq.com
|
ea1a13dfe407fad03a9295a73547933512564802
|
b621273e5a474ebb228b4cd0540ed1ac4b7b62bf
|
/src/main/java/com/webside/plateformaccount/controller/UserSessionController.java
|
88beb1ef8df1a23a738411b24576b24ffd822e16
|
[] |
no_license
|
a576234489/stopSimpleAdm
|
1443333143d1121d91fbc2d37104b9cff82d34c6
|
634f5ea2443455f535b1c41b77849fe4491edeed
|
refs/heads/master
| 2022-12-23T00:59:58.597221
| 2019-11-28T10:05:25
| 2019-11-28T10:05:25
| 224,623,801
| 0
| 0
| null | 2022-12-16T08:18:57
| 2019-11-28T10:03:54
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 3,352
|
java
|
/**
*
*/
package com.webside.plateformaccount.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.webside.base.basecontroller.BaseController;
import com.webside.common.Common;
import com.webside.exception.AjaxException;
import com.webside.plateformaccount.model.UserSessionEntity;
import com.webside.plateformaccount.service.impl.UserSessionServiceImpl;
import com.webside.util.PageUtil;
/**
* @ClassName UserSessionController
* @Description TODO
*
* @author wjggwm
* @data 2016年12月14日 下午6:02:13
*/
@Controller
@Scope("prototype")
@RequestMapping("/session/")
public class UserSessionController extends BaseController{
@Autowired
private UserSessionServiceImpl userSessionService;
@RequestMapping("listUI.html")
public String listUI(Model model, HttpServletRequest request) {
try
{
PageUtil page = new PageUtil();
if(request.getParameterMap().containsKey("page")){
page.setPageNum(Integer.valueOf(request.getParameter("page")));
page.setPageSize(Integer.valueOf(request.getParameter("rows")));
page.setOrderByColumn(request.getParameter("sidx"));
page.setOrderByType(request.getParameter("sord"));
}
model.addAttribute("page", page);
return Common.BACKGROUND_PATH + "/user/sessionList";
}catch(Exception e)
{
throw new AjaxException(e);
}
}
/**
* ajax分页动态加载模式
* @param dtGridPager Pager对象
* @throws Exception
*/
@RequestMapping(value = "/list.html")
@ResponseBody
public Object list(String gridPager, HttpServletResponse response) throws Exception{
List<UserSessionEntity> list = userSessionService.getAllUser();
return list;
}
/**
* 踢出用户
* @param id 用户id
* @throws Exception
*/
@RequestMapping(value = "/info.html")
public String info(Model model, String sessionId) throws Exception
{
UserSessionEntity userSessionEntity = userSessionService.getSession(sessionId);
model.addAttribute("userSessionEntity", userSessionEntity);
return Common.BACKGROUND_PATH + "/user/sessionInfo";
}
/**
* 踢出用户
* @param id 用户id
* @throws Exception
*/
@RequestMapping(value = "/kickout.html", method = RequestMethod.POST)
@ResponseBody
public Object kickout(String ids) throws Exception
{
Map<String, Object> map = new HashMap<String, Object>();
try
{
boolean flag = userSessionService.kickoutUser(ids);
if(flag)
{
map.put("success", Boolean.TRUE);
map.put("data", null);
map.put("message", "用户已被踢出");
}else
{
map.put("success", Boolean.FALSE);
map.put("data", null);
map.put("message", "踢出用户失败");
}
}catch(Exception e)
{
map.put("success", Boolean.FALSE);
map.put("data", null);
map.put("message", "踢出用户失败");
throw new AjaxException(e);
}
return map;
}
}
|
[
"576234489@qq.com"
] |
576234489@qq.com
|
6ea0f3a654b4ccc151f5bb376d71af3e34e4c403
|
c3a0330cf122f701ef06ad08f6fd42af1815c775
|
/src/main/java/cn/AssassinG/ScsyERP/common/utils/ValidUtils.java
|
0345eca93f432317e6c27387ee1a174983555648
|
[] |
no_license
|
AssassinGQ/ScsyERP-common
|
31ba816ea8a4791925e0b7a86a644c2fea3b443c
|
d3c1b58fdb739f22611de827903e14a4ce4ce4e1
|
refs/heads/master
| 2020-04-11T11:19:46.470951
| 2019-03-23T02:37:51
| 2019-03-23T02:37:51
| 161,744,898
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,064
|
java
|
package cn.AssassinG.ScsyERP.common.utils;
import cn.AssassinG.ScsyERP.common.annitations.Valid;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class ValidUtils {
public static boolean ValidationWithExp(Object clazz) {
try {
ValidationImpl(clazz);
return true;
} catch (RuntimeException e) {
System.err.println(e.getMessage());
throw e;
}
}
public static boolean Validation(Object clazz) {
try {
ValidationImpl(clazz);
return true;
} catch (RuntimeException e) {
System.err.println(e.getMessage());
return false;
}
}
public static void ValidationImpl(Object clazz) {
if(clazz == null){
throw new RuntimeException("Object can not be null");
}
List<Field> fields = new ArrayList<Field>();
Class<?> tempClass = clazz.getClass();
while(tempClass != null){
fields.addAll(Arrays.asList(tempClass.getDeclaredFields()));
tempClass = tempClass.getSuperclass();
}
for (int i = 0; i < fields.size(); i++) {
Field field = fields.get(i);
field.setAccessible(true);
if ((field.getModifiers()&(Modifier.PRIVATE|Modifier.PROTECTED)) == 0)
continue;
String fieldname = field.getName();
Object object = null;
try {
object = field.get(clazz);
} catch (IllegalArgumentException e) {
throw new RuntimeException("反射异常: " +e.getMessage());
} catch (IllegalAccessException e) {
throw new RuntimeException("反射异常: " +e.getMessage());
}
Valid valid = field.getAnnotation(Valid.class);
if(valid != null && valid.needValid()){
if(!valid.nullAble() && object == null){
throw new RuntimeException(fieldname + "不能为空");
}else if(object != null) {
if(valid.varType() == Valid.VarType.Number){
double maxvalue = valid.maxValue();
double minvalue = valid.minValue();
double value = Double.parseDouble(String.valueOf(object));
if(!(value >= minvalue && value <= maxvalue))
throw new RuntimeException(fieldname + "的取值必须是[" + minvalue + " ," + maxvalue + "]");
}else if(valid.varType() == Valid.VarType.String){
int minlength = valid.minLength();
int maxlength = valid.maxLength();
String regex = valid.regex();
int length = Utils.getLengthOfObject(object);
if(!(length >= minlength && length <= maxlength))
throw new RuntimeException(fieldname + "的长度必须是[" + minlength + " ," + maxlength + "]");
if(!regex.equals("")){
String objectstr = String.valueOf(object);
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(objectstr);
if(!matcher.matches()){
throw new RuntimeException(fieldname + "的格式不正确");
}
}
}else if(valid.varType() == Valid.VarType.Other){
}else {
throw new RuntimeException(fieldname + "的注解存在问题");
}
}
}
}
}
}
|
[
"hangq_zju@hotmail.com"
] |
hangq_zju@hotmail.com
|
8b5381c8ee0957e4b08e24c8acecd630ac795d9a
|
934bc7bdeb8bbcffa8a152820d82a94bf7cd7e71
|
/src/com/xxs/definedweek/service/impl/PaymentConfigServiceImpl.java
|
35c947e73ae71cb7c50076ae8a731721388067e9
|
[] |
no_license
|
xxs/test
|
774286d382bc46592c9d6e78404533841ba3bd3d
|
f9c3860086efb0bcb5a48da02286a7a26397efe8
|
refs/heads/master
| 2021-01-16T21:16:23.215244
| 2013-06-04T04:00:11
| 2013-06-04T04:00:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,395
|
java
|
package com.xxs.definedweek.service.impl;
import java.util.List;
import javax.annotation.Resource;
import com.xxs.definedweek.dao.PaymentConfigDao;
import com.xxs.definedweek.entity.PaymentConfig;
import com.xxs.definedweek.service.PaymentConfigService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springmodules.cache.annotations.CacheFlush;
import org.springmodules.cache.annotations.Cacheable;
/**
* Service实现类 - 支付方式配置
* KEY: DEFINEDWEEKC5ECD51B27A3F8CBD9F726E2B2CA7738
*/
@Service("paymentConfigServiceImpl")
public class PaymentConfigServiceImpl extends BaseServiceImpl<PaymentConfig, String> implements PaymentConfigService {
@Resource(name = "paymentConfigDaoImpl")
private PaymentConfigDao paymentConfigDao;
@Resource(name = "paymentConfigDaoImpl")
public void setBaseDao(PaymentConfigDao PaymentConfigDao) {
super.setBaseDao(PaymentConfigDao);
}
@Cacheable(modelId = "paymentConfigCaching")
@Transactional(readOnly = true)
public List<PaymentConfig> getNonDepositPaymentConfigList() {
return paymentConfigDao.getNonDepositPaymentConfigList();
}
@Cacheable(modelId = "paymentConfigCaching")
@Transactional(readOnly = true)
public List<PaymentConfig> getNonDepositOfflinePaymentConfigList() {
return paymentConfigDao.getNonDepositOfflinePaymentConfigList();
}
@Override
@Cacheable(modelId = "paymentConfigCaching")
@Transactional(readOnly = true)
public List<PaymentConfig> getAllList() {
return paymentConfigDao.getAllList();
}
@Override
@CacheFlush(modelId = "paymentConfigFlushing")
public void delete(PaymentConfig paymentConfig) {
paymentConfigDao.delete(paymentConfig);
}
@Override
@CacheFlush(modelId = "paymentConfigFlushing")
public void delete(String id) {
paymentConfigDao.delete(id);
}
@Override
@CacheFlush(modelId = "paymentConfigFlushing")
public void delete(String[] ids) {
paymentConfigDao.delete(ids);
}
@Override
@CacheFlush(modelId = "paymentConfigFlushing")
public String save(PaymentConfig paymentConfig) {
return paymentConfigDao.save(paymentConfig);
}
@Override
@CacheFlush(modelId = "paymentConfigFlushing")
public void update(PaymentConfig paymentConfig) {
paymentConfigDao.update(paymentConfig);
}
}
|
[
"xiaoshi332@163.com"
] |
xiaoshi332@163.com
|
2c378b7bfeb7097e88e1083d81da521bdb2485de
|
40d844c1c780cf3618979626282cf59be833907f
|
/src/testcases/CWE190_Integer_Overflow/s06/CWE190_Integer_Overflow__int_Environment_postinc_71a.java
|
168f13de8573c1a6e7638f7f3ccd2abdd7c83337
|
[] |
no_license
|
rubengomez97/juliet
|
f9566de7be198921113658f904b521b6bca4d262
|
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
|
refs/heads/master
| 2023-06-02T00:37:24.532638
| 2021-06-23T17:22:22
| 2021-06-23T17:22:22
| 379,676,259
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,642
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__int_Environment_postinc_71a.java
Label Definition File: CWE190_Integer_Overflow__int.label.xml
Template File: sources-sinks-71a.tmpl.java
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: Environment Read data from an environment variable
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: increment
* GoodSink: Ensure there will not be an overflow before incrementing data
* BadSink : Increment data, which can cause an overflow
* Flow Variant: 71 Data flow: data passed as an Object reference argument from one method to another in different classes in the same package
*
* */
package testcases.CWE190_Integer_Overflow.s06;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.logging.Level;
public class CWE190_Integer_Overflow__int_Environment_postinc_71a extends AbstractTestCase
{
public void bad() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* get environment variable ADD */
/* POTENTIAL FLAW: Read data from an environment variable */
{
String stringNumber = System.getenv("ADD");
if (stringNumber != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
(new CWE190_Integer_Overflow__int_Environment_postinc_71b()).badSink((Object)data );
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
(new CWE190_Integer_Overflow__int_Environment_postinc_71b()).goodG2BSink((Object)data );
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* get environment variable ADD */
/* POTENTIAL FLAW: Read data from an environment variable */
{
String stringNumber = System.getenv("ADD");
if (stringNumber != null) // avoid NPD incidental warnings
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch(NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
(new CWE190_Integer_Overflow__int_Environment_postinc_71b()).goodB2GSink((Object)data );
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"you@example.com"
] |
you@example.com
|
81fbee80625d9cedf4de36bd1ba93430a92f817e
|
995f73d30450a6dce6bc7145d89344b4ad6e0622
|
/P9-8.0/src/main/java/com/huawei/zxing/common/StringUtils.java
|
e324f36f858545673cfe5a580157b1ddd61ba037
|
[] |
no_license
|
morningblu/HWFramework
|
0ceb02cbe42585d0169d9b6c4964a41b436039f5
|
672bb34094b8780806a10ba9b1d21036fd808b8e
|
refs/heads/master
| 2023-07-29T05:26:14.603817
| 2021-09-03T05:23:34
| 2021-09-03T05:23:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,527
|
java
|
package com.huawei.zxing.common;
import com.huawei.android.app.AppOpsManagerEx;
import com.huawei.zxing.DecodeHintType;
import java.util.Map;
public final class StringUtils {
private static final boolean ASSUME_SHIFT_JIS;
private static final String EUC_JP = "EUC_JP";
public static final String GB2312 = "GB2312";
private static final String ISO88591 = "ISO8859_1";
private static final String PLATFORM_DEFAULT_ENCODING = System.getProperty("file.encoding");
public static final String SHIFT_JIS = "SJIS";
private static final String UTF8 = "UTF8";
static {
boolean z;
if (SHIFT_JIS.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING)) {
z = true;
} else {
z = EUC_JP.equalsIgnoreCase(PLATFORM_DEFAULT_ENCODING);
}
ASSUME_SHIFT_JIS = z;
}
private StringUtils() {
}
private static final boolean canBeGB2312(byte[] rawtext) {
int rawtextlen = rawtext.length;
int gbchars = 1;
int dbchars = 1;
int i = 0;
while (i < rawtextlen - 1) {
if (rawtext[i] < (byte) 0) {
dbchars++;
int value = rawtext[i] + 256;
int next_value = rawtext[i + 1] + 256;
if (value >= 161 && value <= 247 && next_value >= 161 && next_value <= 254) {
gbchars++;
}
i++;
}
i++;
}
return gbchars > 1 && gbchars * 100 > dbchars * 80;
}
public static String guessEncoding(byte[] bytes, Map<DecodeHintType, ?> hints) {
if (hints != null) {
String characterSet = (String) hints.get(DecodeHintType.CHARACTER_SET);
if (characterSet != null) {
return characterSet;
}
}
int length = bytes.length;
boolean canBeISO88591 = true;
boolean canBeShiftJIS = true;
boolean canBeUTF8 = true;
int utf8BytesLeft = 0;
int utf2BytesChars = 0;
int utf3BytesChars = 0;
int utf4BytesChars = 0;
int sjisBytesLeft = 0;
int sjisKatakanaChars = 0;
int sjisCurKatakanaWordLength = 0;
int sjisCurDoubleBytesWordLength = 0;
int sjisMaxKatakanaWordLength = 0;
int sjisMaxDoubleBytesWordLength = 0;
int isoHighOther = 0;
boolean utf8bom = (bytes.length > 3 && bytes[0] == (byte) -17 && bytes[1] == (byte) -69) ? bytes[2] == (byte) -65 : false;
for (int i = 0; i < length && (canBeISO88591 || canBeShiftJIS || canBeUTF8); i++) {
int value = bytes[i] & 255;
if (canBeUTF8) {
if (utf8BytesLeft > 0) {
if ((value & AppOpsManagerEx.TYPE_MICROPHONE) == 0) {
canBeUTF8 = false;
} else {
utf8BytesLeft--;
}
} else if ((value & AppOpsManagerEx.TYPE_MICROPHONE) != 0) {
if ((value & 64) == 0) {
canBeUTF8 = false;
} else {
utf8BytesLeft++;
if ((value & 32) == 0) {
utf2BytesChars++;
} else {
utf8BytesLeft++;
if ((value & 16) == 0) {
utf3BytesChars++;
} else {
utf8BytesLeft++;
if ((value & 8) == 0) {
utf4BytesChars++;
} else {
canBeUTF8 = false;
}
}
}
}
}
}
if (canBeISO88591) {
if (value > 127 && value < 160) {
canBeISO88591 = false;
} else if (value > 159 && (value < 192 || value == 215 || value == 247)) {
isoHighOther++;
}
}
if (canBeShiftJIS) {
if (sjisBytesLeft > 0) {
if (value < 64 || value == 127 || value > 252) {
canBeShiftJIS = false;
} else {
sjisBytesLeft--;
}
} else if (value == 128 || value == 160 || value > 239) {
canBeShiftJIS = false;
} else if (value > 160 && value < 224) {
sjisKatakanaChars++;
sjisCurDoubleBytesWordLength = 0;
sjisCurKatakanaWordLength++;
if (sjisCurKatakanaWordLength > sjisMaxKatakanaWordLength) {
sjisMaxKatakanaWordLength = sjisCurKatakanaWordLength;
}
} else if (value > 127) {
sjisBytesLeft++;
sjisCurKatakanaWordLength = 0;
sjisCurDoubleBytesWordLength++;
if (sjisCurDoubleBytesWordLength > sjisMaxDoubleBytesWordLength) {
sjisMaxDoubleBytesWordLength = sjisCurDoubleBytesWordLength;
}
} else {
sjisCurKatakanaWordLength = 0;
sjisCurDoubleBytesWordLength = 0;
}
}
}
if (canBeUTF8 && utf8BytesLeft > 0) {
canBeUTF8 = false;
}
if (canBeShiftJIS && sjisBytesLeft > 0) {
canBeShiftJIS = false;
}
if (canBeUTF8 && (utf8bom || (utf2BytesChars + utf3BytesChars) + utf4BytesChars > 0)) {
return UTF8;
}
if (canBeGB2312(bytes)) {
return GB2312;
}
if (canBeShiftJIS && (ASSUME_SHIFT_JIS || sjisMaxKatakanaWordLength >= 3 || sjisMaxDoubleBytesWordLength >= 3)) {
return SHIFT_JIS;
}
if (canBeISO88591 && canBeShiftJIS) {
String str = (!(sjisMaxKatakanaWordLength == 2 && sjisKatakanaChars == 2) && isoHighOther * 10 < length) ? ISO88591 : SHIFT_JIS;
return str;
} else if (canBeUTF8) {
return UTF8;
} else {
if (canBeISO88591) {
return ISO88591;
}
if (canBeShiftJIS) {
return SHIFT_JIS;
}
return PLATFORM_DEFAULT_ENCODING;
}
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
7ebbfa708611ff27da7042a134d746a0c0bea969
|
7ad843a5b11df711f58fdb8d44ed50ae134deca3
|
/JDK/JDK1.8/src/javax/xml/ws/Holder.java
|
7c4e401fefca8e75cd645a91fee98947c6bfc7bc
|
[
"MIT"
] |
permissive
|
JavaScalaDeveloper/java-source
|
f014526ad7750ad76b46ff475869db6a12baeb4e
|
0e6be345eaf46cfb5c64870207b4afb1073c6cd0
|
refs/heads/main
| 2023-07-01T22:32:58.116092
| 2021-07-26T06:42:32
| 2021-07-26T06:42:32
| 362,427,367
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 795
|
java
|
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package javax.xml.ws;
import java.io.Serializable;
/**
* Holds a value of type <code>T</code>.
*
* @since JAX-WS 2.0
*/
public final class Holder<T> implements Serializable {
private static final long serialVersionUID = 2623699057546497185L;
/**
* The value contained in the holder.
*/
public T value;
/**
* Creates a new holder with a <code>null</code> value.
*/
public Holder() {
}
/**
* Create a new holder with the specified value.
*
* @param value The value to be stored in the holder.
*/
public Holder(T value) {
this.value = value;
}
}
|
[
"panzha@dian.so"
] |
panzha@dian.so
|
8639d927581687a263893a36f780b998cf33f1c7
|
5ed7bb1199e72d1ce4e538080f3527c9315cc347
|
/src/main/jbake/assets/docs/scribble/modules/demos/scrib/smtp/src/smtp/message/client/StartTls.java
|
50c410b26ce8568d2eedb23c916e2abcf98340ad
|
[
"Apache-2.0"
] |
permissive
|
scribble/scribble.github.io
|
e269a884f3b6ff877a79911f7f604ecabb265c22
|
7c8647be9784e9d1bab0ac4e7286b5122c24358c
|
refs/heads/pages
| 2021-01-25T10:22:13.481828
| 2018-01-14T19:29:49
| 2018-01-14T19:29:49
| 3,661,659
| 5
| 2
|
Apache-2.0
| 2018-01-14T19:29:50
| 2012-03-08T16:12:55
|
Java
|
UTF-8
|
Java
| false
| false
| 238
|
java
|
package smtp.message.client;
import smtp.Smtp.Smtp.Smtp;
import smtp.message.SmtpMessage;
public class StartTls extends SmtpMessage
{
private static final long serialVersionUID = 1L;
public StartTls()
{
super(Smtp.StartTls);
}
}
|
[
"raymond.hu@imperial.ac.uk"
] |
raymond.hu@imperial.ac.uk
|
90bb2a68fcfbacbc8fd5efaec3c20a122750f23b
|
b8579c28f33435ee2d36eb9ef98ff36920dbacd7
|
/app/src/main/java/com/jxjycn/learntodrive/base/ActionController.java
|
710372d5b89d32a87184537326d4d4e62ba4714b
|
[] |
no_license
|
hanks7/Learntodrive
|
c554bfd27423e04167f3c3be7cd167406d40b0cf
|
ea87a45948872ae3f789bc9093ac6a8a22401110
|
refs/heads/master
| 2021-01-18T18:34:32.825478
| 2016-06-24T00:52:13
| 2016-06-24T00:52:13
| 61,846,237
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,806
|
java
|
package com.jxjycn.learntodrive.base;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
/**
* Created by liu on 15/5/29.
* 总控制器,用来连接Activity和Model层,是MVC中的C
*/
public class ActionController{
/**
* 缓存网络请求对象
*/
private static Map<String, BaseManager> managerMap = new HashMap<String, BaseManager>();
public static int postDate(BaseActivity baseActivity, Class<? extends BaseManager> mClass, Map<String, String> param, IResultListener resultListener) {
String name = mClass.getName();
BaseManager manager = null;
if (manager == null) {
try {
manager = mClass.newInstance();
} catch (IllegalAccessException e) {
} catch (InstantiationException e) {
}
managerMap.put(name, manager);
}
if (resultListener != null) {
resultListener.onStart();
}
manager.executePrivate(baseActivity, param, resultListener);
return 1;
}
public static int postDate(BaseActivity baseActivity,Class<? extends BaseManager> mClass, Map<String, String> param, File file,
IResultListener resultListener)
{
String name = mClass.getName();
BaseManager manager = managerMap.get(name);
if (manager == null) {
try {
manager = mClass.newInstance();
} catch (IllegalAccessException e) {
} catch (InstantiationException e) {
}
managerMap.put(name, manager);
}
if (resultListener != null) {
resultListener.onStart();
}
manager.executePrivate(baseActivity, param, file, resultListener);
return 1;
}
}
|
[
"474664736@qq.com"
] |
474664736@qq.com
|
a2e10b3317c4373b6212068a82c65b0bb2609d59
|
68ff808ae184158a4df4f6449e61621c8db72f61
|
/Java Fundamentals/Conditional Statements and Loops - Exercises/src/com/company/TriangleOfNumbers.java
|
f7e981667d6f6173fc74c5ba690c14ed0e570c66
|
[
"Apache-2.0"
] |
permissive
|
Valentin9003/Java
|
eb2ee75468091136b49e5f0b902159bbb8276eca
|
9d263063685ba60ab75dc9efd25554b715a7980a
|
refs/heads/master
| 2020-04-02T13:28:24.713200
| 2019-11-13T10:30:05
| 2019-11-13T10:30:05
| 154,482,638
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 426
|
java
|
package com.company;
import java.util.Scanner;
public class TriangleOfNumbers {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = Integer.parseInt(scanner.nextLine());
for (int i = 1; i <= n ; i++) {
for (int j = 1; j <= i ; j++) {
System.out.print(i + " ");
}
System.out.println();
}
}
}
|
[
"valio_180@abv.bg"
] |
valio_180@abv.bg
|
381938a1dc53fdefad4f4efedd4b1a87e1dd6151
|
17d9d8deeb7489008f3825edb45a1e2ca3b999ab
|
/sdks/java/http_client/v1/src/main/java/org/openapitools/client/model/V1MatrixKind.java
|
4bf0c2b133cc203f7c887b57176d7fd07de1e758
|
[
"Apache-2.0"
] |
permissive
|
thimma/polyaxon
|
4dc9b88db3d2d8dcc7bb31b2ee181e1315ae1948
|
2a78b0ed3fb744155e286f4e8b34545bc2a81927
|
refs/heads/master
| 2022-09-17T21:56:48.195084
| 2020-05-30T20:30:59
| 2020-05-30T20:45:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,470
|
java
|
// Copyright 2018-2020 Polyaxon, 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.
/*
* Polyaxon SDKs and REST API specification.
* Polyaxon SDKs and REST API specification.
*
* The version of the OpenAPI document: 1.0.93
* Contact: contact@polyaxon.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.annotations.SerializedName;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Gets or Sets v1MatrixKind
*/
@JsonAdapter(V1MatrixKind.Adapter.class)
public enum V1MatrixKind {
RANDOM("random"),
GRID("grid"),
HYPERBAND("hyperband"),
BAYES("bayes"),
HYPEROPT("hyperopt"),
ITERATIVE("iterative"),
MAPPING("mapping");
private String value;
V1MatrixKind(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static V1MatrixKind fromValue(String value) {
for (V1MatrixKind b : V1MatrixKind.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<V1MatrixKind> {
@Override
public void write(final JsonWriter jsonWriter, final V1MatrixKind enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public V1MatrixKind read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return V1MatrixKind.fromValue(value);
}
}
}
|
[
"mouradmourafiq@gmail.com"
] |
mouradmourafiq@gmail.com
|
d474afdace1ecdd20e69e4ca4088e8b9541408bd
|
0b1804971806ad54bc88bd6832b2f71a58c57bba
|
/Bean-Scope/src/main/java/com/springinaction/configuration/BeanConfig.java
|
7627471ca1e0d872495b2df9052420da6f4ab3e2
|
[] |
no_license
|
david2999999/Spring-In-Action
|
706a3f48ff32df562776df06f945dd2d5f3c1329
|
4a6ec16f31aafeeb91a8825ad1ac1c10ad65f913
|
refs/heads/master
| 2021-04-15T04:11:47.437223
| 2018-04-07T03:28:31
| 2018-04-07T03:28:31
| 126,224,453
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 486
|
java
|
package com.springinaction.configuration;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;
import com.springinaction.model.NotePad;
@Configuration
public class BeanConfig {
@Bean
@Scope(value=BeanDefinition.SCOPE_PROTOTYPE)
public NotePad notePad() {
return new NotePad();
}
}
|
[
"djiang86@binghamton.edu"
] |
djiang86@binghamton.edu
|
5962fc260aacfd9f2d47bc693f3727cc8c8286be
|
9926a6a4ac88171c98b07b848f5861728fd18239
|
/.history/taxFiling_20211031185000.java
|
864a70a3d7eb573968d63fc0312ae45ea0dc46c0
|
[] |
no_license
|
magikflowz/JavaAssignments
|
4dadee2f0f23d581f94c998680ab188c1247013c
|
a4f01f60cedd08dd216841ba98fadac9c09bbe76
|
refs/heads/master
| 2023-08-28T13:08:43.877417
| 2021-11-02T10:47:55
| 2021-11-02T10:47:55
| 423,601,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,460
|
java
|
public class taxFiling {
String name;
int Income;
String Status;
public taxFiling(String name, int Income, String Status)
{
this.name = name;
this.Income = Income;
this.Status = Status;
}
public String Single(String Name, int Income){
double tax = 0;
if(Income >=0 && Income <= 9750){
tax = .1;
}
if(Income >= 9701 && Income <=39475){
tax = .12;
}
if(Income >= 39476 && Income <= 82200){
tax = .22;
}
if(Income >= 82201 && Income <= 160725){
tax = .24;
}
if(Income >= 160726 && Income <= 204100){
tax = .32;
}
if(Income >= 204101 && Income <= 510300){
tax = .35;
}
if(Income >= 510301){
tax = .37;
}
tax = (Income/100)*tax;
return (name+", the federal income tax for an annual salary of "+Income+" for single status "+tax);
}
public String headofHousehold(String name, int Income, String Status){
double tax = 0;
if(Income >= 0 && Income <= 13850){
tax = .1;
}
if(Income >= 13851 && Income <= 52850){
tax = .12;
}
if(Income >= 52851 && Income <= 84200){
tax = .22;
}
if(Income >= 84201 && Income <= 160700){
tax = .24;
}
if(Income >= 160701 && Income <= 204100){
tax = .32;
}
if(Income >= 204101 && Income <= 510300){
tax = .35;
}
if(Income >= 510301){
tax = .37;
}
tax = (Income/100)*tax;
return (name+", the federal income tax for an annual salary of "+Income+" for a household status filer is "+tax);
}
public String marriedJointly(String name, int Income){
double tax = 0;
if(Income >=0 && Income<=19400){
tax = .1;
}
if(Income >= 19401 && Income <= 78950){
tax = .12;
}
if(Income >= 78951 && Income <= 168400){
tax = .22;
}
if(Income >= 168401 && Income <= 321450){
tax = .24;
}
if(Income >= 321451 && Income<=408200){
tax = .32;
}
if(Income >= 408201 && Income<=612350){
tax = .35;
}
if(Income >= 612351){
tax = .37;
}
tax = (Income/100)*tax;
return (name+", the federal income tax for an annual salary of "+Income+" for a married status filer is "+tax);
}
public String marriedSeparately(String name, int Income){
double tax = 0;
if(Income >=0 && Income <= 9700){
tax = .1;
}
if(Income >= 9701 && Income <= 39475){
tax = .12;
}
if(Income >= 39476 && Income <= 84200){
tax = .22;
}
if(Income >= 84201 && Income <= 160725){
tax = .24;
}
if(Income >= 160726 && Income <= 204100){
tax = .32;
}
if(Income >= 204101 && Income <= 306175){
tax = .35;
}
if(Income >= 306176){
tax = .37;
}
}
tax = (income/100)*tax;
System.out.println("\n"+name+", the federal income tax for an annual salary of "+income+" for a "+status+" filer is "+tax);
}
}
|
[
"75277480+ImNotMagik@users.noreply.github.com"
] |
75277480+ImNotMagik@users.noreply.github.com
|
b0dc86b067f8d9f4d58b8726ea3cb7781c187870
|
513b8db7c82754277c89f0946d05897483a6eea5
|
/mall-gateway/src/main/java/com/mall/gateway/config/NacosConfig.java
|
e6e6ebd52e332256767829523c07c6d5e4db99a9
|
[] |
no_license
|
sparkdata/mall
|
41dc9bfe74540afef81a84a67cd5871a259d6bc2
|
641ee0b8885c2e752834560f7384b201ce218ee6
|
refs/heads/master
| 2022-11-06T16:31:26.942656
| 2020-06-28T12:30:13
| 2020-06-28T12:30:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 563
|
java
|
package com.mall.gateway.config;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* DESCRIPTION: NacosConfig
*
* @author <a href="mailto:amos.wang@xiaoi.com">amos.wang</a>
* @date 2/19/2020
*/
@Getter
@Setter
@Configuration
@ConfigurationProperties(prefix = "spring.cloud.sentinel.datasource.ds.nacos")
public class NacosConfig {
private String serverAddr;
private String dataId;
private String groupId;
}
|
[
"1833063210@qq.com"
] |
1833063210@qq.com
|
5e405e4d2f1e57fc0c5891bb000af2b5f76a5675
|
f44c44bab2a7ca8bae3a6e9cbade4ba20682771b
|
/src/main/java/org/carsonrent/rentals/web/rest/errors/FieldErrorVM.java
|
71924da5edcc08e11f6f9f6fdc53c6e3d3172edb
|
[] |
no_license
|
BulkSecurityGeneratorProject/Cars-on-rent
|
288d3a629832cfdadf1beb7adc017faf3f454657
|
a9bb17ca472b202dbe6954ee29df08e457b14d92
|
refs/heads/master
| 2022-12-08T22:21:18.298892
| 2017-12-12T16:29:28
| 2017-12-12T16:29:28
| 296,585,779
| 0
| 0
| null | 2020-09-18T10:12:13
| 2020-09-18T10:12:12
| null |
UTF-8
|
Java
| false
| false
| 654
|
java
|
package org.carsonrent.rentals.web.rest.errors;
import java.io.Serializable;
public class FieldErrorVM implements Serializable {
private static final long serialVersionUID = 1L;
private final String objectName;
private final String field;
private final String message;
public FieldErrorVM(String dto, String field, String message) {
this.objectName = dto;
this.field = field;
this.message = message;
}
public String getObjectName() {
return objectName;
}
public String getField() {
return field;
}
public String getMessage() {
return message;
}
}
|
[
"you@example.com"
] |
you@example.com
|
64ef1ea2c7cb2ea8ab6b51de9e8d0bc8a830ee48
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_291/Testnull_29049.java
|
c2b657cd0aebdd1bb59f4472b62ef8234479d322
|
[] |
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
| 308
|
java
|
package org.gradle.test.performancenull_291;
import static org.junit.Assert.*;
public class Testnull_29049 {
private final Productionnull_29049 production = new Productionnull_29049("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
e147da62499a4817dba93961ca0ab13718aca227
|
0735d7bb62b6cfb538985a278b77917685de3526
|
/dagger/Subcomponent.java
|
77f0ea9c4991288fb0ed59f164c5bd88fe6164cf
|
[] |
no_license
|
Denoah/personaltrackerround
|
e18ceaad910f1393f2dd9f21e9055148cda57837
|
b38493ccc7efff32c3de8fe61704e767e5ac62b7
|
refs/heads/master
| 2021-05-20T03:34:17.333532
| 2020-04-02T14:47:31
| 2020-04-02T14:51:01
| 252,166,069
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 673
|
java
|
package dagger;
import java.lang.annotation.Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({java.lang.annotation.ElementType.TYPE})
public @interface Subcomponent
{
Class<?>[] modules() default {};
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({java.lang.annotation.ElementType.TYPE})
public static @interface Builder {}
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({java.lang.annotation.ElementType.TYPE})
public static @interface Factory {}
}
|
[
"ivanov.a@i-teco.ru"
] |
ivanov.a@i-teco.ru
|
f2c7d073d7c352a358bc373fb2659291829c6121
|
e24be08fc9e9d0e05220d0c4f74d99fdacab0d02
|
/M2-Android/app/src/main/java/grintsys/com/vanshop/utils/MyGcmListenerService.java
|
25e1cec6eadb8b17f1ae87dd98bf49f30e54eebc
|
[
"MIT"
] |
permissive
|
Grintsys/GRINTSYS.M2
|
211b6ef29f524d425a68ae45b8d64bdb355ad226
|
28b4d8e957a3f43136e5fcbc8aa08c8ad2ba4a0f
|
refs/heads/master
| 2020-05-04T02:07:09.741613
| 2019-08-16T21:16:54
| 2019-08-16T21:16:54
| 178,920,661
| 0
| 0
|
MIT
| 2019-08-16T21:16:55
| 2019-04-01T18:13:57
|
Java
|
UTF-8
|
Java
| false
| false
| 6,581
|
java
|
package grintsys.com.vanshop.utils;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.RingtoneManager;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import com.google.android.gms.gcm.GcmListenerService;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import grintsys.com.vanshop.BuildConfig;
import grintsys.com.vanshop.R;
import grintsys.com.vanshop.api.EndPoints;
import grintsys.com.vanshop.ux.SplashActivity;
import timber.log.Timber;
public class MyGcmListenerService extends GcmListenerService {
private static final int NOTIFICATION_ID = 6342806;
private static final String TAG = "GcmListener";
/**
* Called when message is received.
*
* @param from SenderID of the sender.
* @param data Data bundle containing message data as key/value pairs.
* For Set of keys use data.keySet().
*/
@Override
public void onMessageReceived(String from, Bundle data) {
String message = data.getString("message");
Timber.d("From: %s", from);
Timber.d("Message: %s", message);
Timber.d("Bundle: %s", data.toString());
// Topics not implemented.
// if (from.startsWith("/topics/")) {
// // message received from some topic.
// } else {
// // normal downstream message.
// }
/**
* Production applications would usually process the message here.
* Eg: - Syncing with server.
* - Store message in local database.
* - Update UI.
*/
/**
* In some cases it may be useful to show a notification indicating to the user
* that a message was received.
*/
sendNotification(data);
}
/**
* Create and show a simple notification containing the received GCM message.
*
* @param extras GCM message received.
*/
private void sendNotification(Bundle extras) {
//// If needed parse shopId, for shop specific notifications. ////
// String shopIdStr = extras.getString(EndPoints.NOTIFICATION_SHOP_ID, "0");
// int shopId;
// try {
// shopId = Integer.parseInt(shopIdStr);
// } catch (Exception e) {
// shopId = 0;
// if (BuildConfig.DEBUG) Log.e(TAG, "Failed parsing notification shop id");
// }
//
// if (BuildConfig.DEBUG) Log.d(TAG, "Tenant id: " + shopId);
// Get title and message text.
String title = extras.getString(EndPoints.NOTIFICATION_TITLE, getString(R.string.app_name));
String message = extras.getString(EndPoints.NOTIFICATION_MESSAGE);
if (BuildConfig.DEBUG) Log.d(TAG, "Title: " + title);
if (BuildConfig.DEBUG) Log.d(TAG, "Message: " + message);
// Build notification
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.ic_notification_small)
.setLargeIcon(BitmapFactory.decodeResource(getResources(), R.drawable.ic_notification_big))
.setContentTitle(title)
.setStyle(new NotificationCompat.BigTextStyle().bigText(message))
.setContentText(message)
.setAutoCancel(true)
.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));
// Set big image if exist
String imageUrl = extras.getString(EndPoints.NOTIFICATION_IMAGE_URL);
if (imageUrl != null && !imageUrl.isEmpty()) {
Bitmap bitmap = getBitmapFromURL(imageUrl);
if (bitmap != null) {
if (BuildConfig.DEBUG) Log.d(TAG, "Set big icon");
mBuilder.setStyle(new NotificationCompat.BigPictureStyle()
.bigPicture(bitmap)
.setBigContentTitle(title)
.setSummaryText(message));
} else {
if (BuildConfig.DEBUG) Log.e(TAG, "Cannot download image");
}
}
// Determine if start activity or web
String link = extras.getString(EndPoints.NOTIFICATION_LINK);
if (BuildConfig.DEBUG) Log.d(TAG, "Gcm linkType: " + link);
Intent notificationIntent;
if (link != null && link.contains("http")) {
Uri url;
try {
url = Uri.parse(link);
} catch (Exception e) {
if (BuildConfig.DEBUG) Log.e(TAG, "Parsing notification url failed.");
return;
}
notificationIntent = new Intent(Intent.ACTION_VIEW, url);
} else {
notificationIntent = new Intent(this, SplashActivity.class);
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
notificationIntent.putExtra(EndPoints.NOTIFICATION_LINK, link);
notificationIntent.putExtra(EndPoints.NOTIFICATION_TITLE, title);
}
String utmSource = "utm_source=API";
String utmMedium = "utm_medium=notification";
String utmCampaign = "utm_campaign=" + title;
String utm = utmSource + "&" + utmMedium + "&" + utmCampaign;
notificationIntent.putExtra(EndPoints.NOTIFICATION_UTM, utm);
// Create notification
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(contentIntent);
((NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE)).notify(NOTIFICATION_ID, mBuilder.build());
}
/**
* Obtain image from server.
*
* @param stringURL server path to image.
* @return image or null if error occurred.
*/
private Bitmap getBitmapFromURL(String stringURL) {
try {
URL url = new URL(stringURL);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setDoInput(true);
connection.connect();
InputStream input = connection.getInputStream();
return BitmapFactory.decodeStream(input);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
}
|
[
"serpel.js@gmail.com"
] |
serpel.js@gmail.com
|
2fded11d635598385c786715d955bb6d79da3ebf
|
640e01baac8e12ba9091eeaf9a4b70556b0e39b6
|
/Rxjava/src/main/java/io/reactivex/internal/util/AppendOnlyLinkedArrayList.java
|
4e3b207731bcab6480b2dffb7cc12303f5ea1686
|
[] |
no_license
|
lenmoyouziJiangjun/JavaLearn
|
25467eebb2b134e5314db63bd0066ffa96d737ed
|
f696a455efa5cf138411fa24d667db546be788f0
|
refs/heads/master
| 2021-06-04T15:41:16.163939
| 2021-04-11T12:05:58
| 2021-04-11T12:05:58
| 90,931,129
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,829
|
java
|
/**
* Copyright (c) 2016-present, RxJava Contributors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
* the License for the specific language governing permissions and limitations under the License.
*/
package io.reactivex.internal.util;
import org.reactivestreams.Subscriber;
import io.reactivex.Observer;
import io.reactivex.functions.*;
/**
* A linked-array-list implementation that only supports appending and consumption.
*
* @param <T> the value type
*/
public class AppendOnlyLinkedArrayList<T> {
final int capacity;
final Object[] head;
Object[] tail;
int offset;
/**
* Constructs an empty list with a per-link capacity.
*
* @param capacity the capacity of each link
*/
public AppendOnlyLinkedArrayList(int capacity) {
this.capacity = capacity;
this.head = new Object[capacity + 1];
this.tail = head;
}
/**
* Append a non-null value to the list.
* <p>Don't add null to the list!
*
* @param value the value to append
*/
public void add(T value) {
final int c = capacity;
int o = offset;
if (o == c) {
Object[] next = new Object[c + 1];
tail[c] = next;
tail = next;
o = 0;
}
tail[o] = value;
offset = o + 1;
}
/**
* Set a value as the first element of the list.
*
* @param value the value to set
*/
public void setFirst(T value) {
head[0] = value;
}
/**
* Predicate interface suppressing the exception.
*
* @param <T> the value type
*/
public interface NonThrowingPredicate<T> extends Predicate<T> {
@Override
boolean test(T t);
}
/**
* Loops over all elements of the array until a null element is encountered or
* the given predicate returns true.
*
* @param consumer the consumer of values that returns true if the forEach should terminate
*/
@SuppressWarnings("unchecked")
public void forEachWhile(NonThrowingPredicate<? super T> consumer) {
Object[] a = head;
final int c = capacity;
while (a != null) {
for (int i = 0; i < c; i++) {
Object o = a[i];
if (o == null) {
break;
}
if (consumer.test((T) o)) {
break;
}
}
a = (Object[]) a[c];
}
}
/**
* Interprets the contents as NotificationLite objects and calls
* the appropriate Subscriber method.
*
* @param <U> the target type
* @param subscriber the subscriber to emit the events to
* @return true if a terminal event has been reached
*/
public <U> boolean accept(Subscriber<? super U> subscriber) {
Object[] a = head;
final int c = capacity;
while (a != null) {
for (int i = 0; i < c; i++) {
Object o = a[i];
if (o == null) {
break;
}
if (NotificationLite.acceptFull(o, subscriber)) {
return true;
}
}
a = (Object[]) a[c];
}
return false;
}
/**
* Interprets the contents as NotificationLite objects and calls
* the appropriate Observer method.
*
* @param <U> the target type
* @param observer the observer to emit the events to
* @return true if a terminal event has been reached
*/
public <U> boolean accept(Observer<? super U> observer) {
Object[] a = head;
final int c = capacity;
while (a != null) {
for (int i = 0; i < c; i++) {
Object o = a[i];
if (o == null) {
break;
}
if (NotificationLite.acceptFull(o, observer)) {
return true;
}
}
a = (Object[]) a[c];
}
return false;
}
/**
* Loops over all elements of the array until a null element is encountered or
* the given predicate returns true.
*
* @param <S> the extra state type
* @param state the extra state passed into the consumer
* @param consumer the consumer of values that returns true if the forEach should terminate
* @throws Exception if the predicate throws
*/
@SuppressWarnings("unchecked")
public <S> void forEachWhile(S state, BiPredicate<? super S, ? super T> consumer) throws Exception {
Object[] a = head;
final int c = capacity;
for (; ; ) {
for (int i = 0; i < c; i++) {
Object o = a[i];
if (o == null) {
return;
}
if (consumer.test(state, (T) o)) {
return;
}
}
a = (Object[]) a[c];
}
}
}
|
[
"generalray4239@gmail.com"
] |
generalray4239@gmail.com
|
c0b6e364fb9fc5aec534fa97fff3eb9fb03fef68
|
b452440779c93dfb135cfb1b01803de7145893dd
|
/app/src/main/java/com/yfy/tool_textwatcher/EmptyTextWatcher.java
|
5bb1b0bfba23a197479000c1af93e4b65429fc2b
|
[] |
no_license
|
Zhaoxianxv/wuhou_dish
|
08ed3f96e8a84f49c08333d38dfe8b81b8708eee
|
e177d23c243673ba34ca587a43d4bd1c3652adc1
|
refs/heads/master
| 2022-12-27T00:24:34.386835
| 2020-10-14T02:31:40
| 2020-10-14T02:31:40
| 303,881,954
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 470
|
java
|
/**
*
*/
package com.yfy.tool_textwatcher;
import android.text.Editable;
import android.text.TextWatcher;
/**
* @version 1.0
* @Desprition
*/
public abstract class EmptyTextWatcher implements TextWatcher {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
}
}
|
[
"1006584058@qq.com"
] |
1006584058@qq.com
|
29124e319f70b8ddab80979acf58d20977a3bc66
|
4ea5efe3e5b905b583336e6d6cb620a8e050f346
|
/adaptive-fx/adaptive-fx-lib/src/main/java/me/adaptive/arp/api/IBaseReader.java
|
1966de1f49fb70624b64b4a1d1f37641da2bb7f1
|
[
"Apache-2.0"
] |
permissive
|
Panthro/adaptive-arp-javafx
|
a92693387fda8f22e9f64e69d3f854e5d71b1b62
|
fe397509c0986a2f43940a71b96eb1ee85901e2e
|
refs/heads/master
| 2020-04-03T15:02:21.697648
| 2015-02-05T15:01:14
| 2015-02-05T15:01:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,613
|
java
|
/**
--| ADAPTIVE RUNTIME PLATFORM |----------------------------------------------------------------------------------------
(C) Copyright 2013-2015 Carlos Lozano Diez t/a Adaptive.me <http://adaptive.me>.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by appli-
-cable 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.
Original author:
* Carlos Lozano Diez
<http://github.com/carloslozano>
<http://twitter.com/adaptivecoder>
<mailto:carlos@adaptive.me>
Contributors:
* Ferran Vila Conesa
<http://github.com/fnva>
<http://twitter.com/ferran_vila>
<mailto:ferran.vila.conesa@gmail.com>
* See source code files for contributors.
Release:
* @version v2.1.5
-------------------------------------------| aut inveniam viam aut faciam |--------------------------------------------
*/
package me.adaptive.arp.api;
/**
Base application for Reader purposes
@author Carlos Lozano Diez
@since v2.0
@version 1.0
*/
public interface IBaseReader extends IAdaptiveRP {
}
/**
------------------------------------| Engineered with ♥ in Barcelona, Catalonia |--------------------------------------
*/
|
[
"carlos@adaptive.me"
] |
carlos@adaptive.me
|
be0a619b20dbd1f19ec2e3138529e44118e4f799
|
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
|
/crash-reproduction-new-fitness/results/LANG-45b-1-6-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/apache/commons/lang/WordUtils_ESTest.java
|
2e0ec6da545132d33c5d41da563c46e0f98a88eb
|
[
"MIT",
"CC-BY-4.0"
] |
permissive
|
STAMP-project/Botsing-basic-block-coverage-application
|
6c1095c6be945adc0be2b63bbec44f0014972793
|
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
|
refs/heads/master
| 2022-07-28T23:05:55.253779
| 2022-04-20T13:54:11
| 2022-04-20T13:54:11
| 285,771,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,103
|
java
|
/*
* This file was automatically generated by EvoSuite
* Fri Oct 29 04:25:29 UTC 2021
*/
package org.apache.commons.lang;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.lang.WordUtils;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class WordUtils_ESTest extends WordUtils_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
WordUtils.swapCase("");
char[] charArray0 = new char[2];
charArray0[0] = 'd';
charArray0[1] = 'p';
WordUtils.capitalize("@-v;N&F'[@|_E4", charArray0);
WordUtils.capitalize("Irix");
WordUtils.abbreviate("A|]Q\";@K}[c_J}mO}?", 1, (-1250), "qH[()E9v|^d0O]l");
WordUtils.capitalizeFully("@-v;N&F'[@|_E4", charArray0);
// Undeclared exception!
WordUtils.abbreviate("A|]Q\";@K}[c_J}mO}?", (-1891), (-389), "@-v;N&F'[@|_E4");
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
da7bf1bc614c9f12e1c9cd41be8969db72965cbe
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/21/21_b6d99e3d3765d3636ce2df3b0a31b0e275c9ebd5/TestA4JActionListener/21_b6d99e3d3765d3636ce2df3b0a31b0e275c9ebd5_TestA4JActionListener_t.java
|
0aca0e4fd7da982e0af1764a425a9212eb5a0e6e
|
[] |
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
| 5,378
|
java
|
/*******************************************************************************
* JBoss, Home of Professional Open Source
* Copyright 2010-2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This 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 software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.a4jActionListener;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
import java.net.URL;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.selenium.SeleniumCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.testng.annotations.Test;
/**
* Test case for page /faces/components/a4jActionListener/all.xhtml
*
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
public class TestA4JActionListener extends AbstractMetamerTest {
private JQueryLocator invokeButtonType = pjq("input[id$=invokeByTypeButton]");
private JQueryLocator invokeButtonBinding = pjq("input[id$=invokeByBindingButton]");
private JQueryLocator invokeButtonMethod = pjq("input[id$=invokeMethodButton]");
private JQueryLocator invokeButtonCC = pjq("input[id$=invokeFromCCButton:button]");
private JQueryLocator message = pjq("ul[id$=messages] li");
@Override
public URL getTestUrl() {
return buildUrl(contextPath, "faces/components/a4jActionListener/all.xhtml");
}
@Test
public void testInvokeListenerByType() {
final String hashCodeRegExp = "@[0-9a-fA-F]{1,}$";
final String msg = "Implementation of ActionListener created and called: "
+ "org.richfaces.tests.metamer.bean.a4j.A4JActionListenerBean$ActionListenerImpl";
selenium.click(invokeButtonType);
waitGui.until(elementPresent.locator(message));
final String output1 = selenium.getText(message);
assertEquals(output1.replaceAll(hashCodeRegExp, ""), msg, "Message after first invocation of listener by type.");
int count = selenium.getCount(message);
assertEquals(count, 1, "Only one message should be displayed on the page.");
// do the same once again
selenium.click(invokeButtonType);
waitModel.failWith("New object of class ActionListenerImpl should be instantiated.").until(
new SeleniumCondition() {
public boolean isTrue() {
return !output1.equals(selenium.getText(message));
}
});
count = selenium.getCount(message);
assertEquals(count, 1, "Only one message should be displayed on the page.");
}
@Test
public void testInvokeListenerByBinding() {
final String msg = "Bound listener called";
selenium.click(invokeButtonBinding);
waitGui.until(elementPresent.locator(message));
String output = selenium.getText(message);
assertEquals(output, msg, "Message after first invocation of listener by binding.");
int count = selenium.getCount(message);
assertEquals(count, 1, "Only one message should be displayed on the page.");
}
@Test
public void testInvokeListenerMethod() {
final String msg = "Method expression listener called";
selenium.click(invokeButtonMethod);
waitGui.until(elementPresent.locator(message));
String output = selenium.getText(message);
assertEquals(output, msg, "Message after first invocation of listener method.");
int count = selenium.getCount(message);
assertEquals(count, 1, "Only one message should be displayed on the page.");
}
@Test
@IssueTracking("https://issues.jboss.org/browse/RF-10585")
public void testInvokeListenerMethodCC() {
final String msg = "Method expression listener called from composite component";
selenium.click(invokeButtonCC);
waitGui.until(elementPresent.locator(message));
String output = selenium.getText(message);
assertEquals(output, msg, "Message after first invocation of listener method from composite component.");
int count = selenium.getCount(message);
assertEquals(count, 1, "Only one message should be displayed on the page.");
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7ae1be318340f3509d6193b84afe5e09509db9d6
|
ee1244b10de45679f053293e366f192af307be74
|
/sources/com/google/android/gms/internal/ads/zzakw.java
|
337c02643fa6c27de2d1d470f83aa02fb3bdfdbd
|
[] |
no_license
|
scarletstuff/Turbogram
|
a086e50b3f4d7036526075199616682a0d7c9c45
|
21b8862573953add9260f1eb586f0985d2c71e8e
|
refs/heads/master
| 2021-09-23T14:34:23.323880
| 2018-09-24T17:48:43
| 2018-09-24T17:48:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,506
|
java
|
package com.google.android.gms.internal.ads;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.SharedPreferences.Editor;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.renderscript.Allocation;
import android.renderscript.Element;
import android.renderscript.RenderScript;
import android.renderscript.ScriptIntrinsicBlur;
import android.text.TextUtils;
import android.webkit.WebSettings;
import com.google.android.gms.common.GooglePlayServicesUtilLight;
import com.google.android.gms.common.util.ClientLibraryUtils;
import com.google.android.gms.common.util.SharedPreferencesUtils;
@TargetApi(17)
public class zzakw extends zzaky {
public final String getDefaultUserAgent(Context context) {
zzamn zzsb = zzamn.zzsb();
if (TextUtils.isEmpty(zzsb.zzcpq)) {
zzsb.zzcpq = ClientLibraryUtils.isPackageSide() ? (String) zzaml.zza(context, new zzamo(zzsb, context)) : (String) zzaml.zza(context, new zzamp(zzsb, GooglePlayServicesUtilLight.getRemoteContext(context), context));
}
return zzsb.zzcpq;
}
public final Drawable zza(Context context, Bitmap bitmap, boolean z, float f) {
if (!z || f <= 0.0f || f > 25.0f) {
return new BitmapDrawable(context.getResources(), bitmap);
}
try {
Bitmap createScaledBitmap = Bitmap.createScaledBitmap(bitmap, bitmap.getWidth(), bitmap.getHeight(), false);
Bitmap createBitmap = Bitmap.createBitmap(createScaledBitmap);
RenderScript create = RenderScript.create(context);
ScriptIntrinsicBlur create2 = ScriptIntrinsicBlur.create(create, Element.U8_4(create));
Allocation createFromBitmap = Allocation.createFromBitmap(create, createScaledBitmap);
Allocation createFromBitmap2 = Allocation.createFromBitmap(create, createBitmap);
create2.setRadius(f);
create2.setInput(createFromBitmap);
create2.forEach(createFromBitmap2);
createFromBitmap2.copyTo(createBitmap);
return new BitmapDrawable(context.getResources(), createBitmap);
} catch (RuntimeException e) {
return new BitmapDrawable(context.getResources(), bitmap);
}
}
public final boolean zza(Context context, WebSettings webSettings) {
super.zza(context, webSettings);
webSettings.setMediaPlaybackRequiresUserGesture(false);
return true;
}
public final void zzaw(Context context) {
zzamn zzsb = zzamn.zzsb();
zzakb.m589v("Updating user agent.");
String defaultUserAgent = WebSettings.getDefaultUserAgent(context);
if (!defaultUserAgent.equals(zzsb.zzcpq)) {
Context remoteContext = GooglePlayServicesUtilLight.getRemoteContext(context);
if (ClientLibraryUtils.isPackageSide() || remoteContext == null) {
Editor putString = context.getSharedPreferences("admob_user_agent", 0).edit().putString("user_agent", WebSettings.getDefaultUserAgent(context));
if (remoteContext == null) {
putString.apply();
} else {
SharedPreferencesUtils.publishWorldReadableSharedPreferences(context, putString, "admob_user_agent");
}
}
zzsb.zzcpq = defaultUserAgent;
}
zzakb.m589v("User agent is updated.");
}
}
|
[
"root@linuxhub.it"
] |
root@linuxhub.it
|
0b10a8e089a91053e93271488cf323873c13f1b8
|
bbf8fd9f280686495467a312a0ac2117cd0d39f4
|
/src/main/java/structure_model/facade/TeasetService.java
|
dc85b11d34a080b4fed2dcc1bb33b565d1b3fe1c
|
[] |
no_license
|
codeChengWenY/design_model
|
d96cb8d7aaf4e2cbfde56b76fc009c7e7c36cb86
|
2338eb6ea1a0abb2c144cf2e80c9b0b148d700d3
|
refs/heads/master
| 2022-11-30T08:13:15.517795
| 2020-08-14T06:04:56
| 2020-08-14T06:04:56
| 287,456,316
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 456
|
java
|
package structure_model.facade;
/**
* @ClassName TeasetService
* @Description:
* @Author CoderCheng
* @Date 2020-06-08 16:39
* @Version V1.0
**/
public class TeasetService {
public Teawater makeTeaWater(String who, Water water,Tealeaf tealeaf){
String teawater="一杯容量为"+water.getCapacity()+",温度为"+water.getTemperature()+"的"+tealeaf.getTeaName()+"的茶水";
return new Teawater(teawater);
}
}
|
[
"1042732167@qq.com"
] |
1042732167@qq.com
|
c2ea11c1f2bf46ee5e453716dcafafd5f632685a
|
fbad8935dec1fe06762a85723b9add59f2e010ec
|
/src/main/java/com/digitalpebble/behemoth/es/ESIndexerJob.java
|
924cda7e9837f599d5b60df729b10cb9c70239fa
|
[] |
no_license
|
DigitalPebble/behemoth-elasticsearch
|
9b07d8d527fdc0fba8477dd4fa5316a57db1c147
|
051eed400e7ba9d177b3260b6f0ec8d428458d6c
|
refs/heads/master
| 2021-01-18T14:11:43.653841
| 2014-02-12T15:53:05
| 2014-02-12T15:53:05
| 8,608,716
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,231
|
java
|
package com.digitalpebble.behemoth.es;
/**
* 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.
*/
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.MapWritable;
import org.apache.hadoop.mapred.FileInputFormat;
import org.apache.hadoop.mapred.JobClient;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapred.SequenceFileInputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;
import org.elasticsearch.hadoop.mr.EsOutputFormat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.digitalpebble.behemoth.BehemothConfiguration;
/**
* Sends annotated documents to ElasticSearch for indexing
*/
public class ESIndexerJob extends Configured implements Tool {
private static final Logger LOG = LoggerFactory
.getLogger(ESIndexerJob.class);
public ESIndexerJob() {
}
public ESIndexerJob(Configuration conf) {
super(conf);
}
public static void main(String args[]) throws Exception {
int res = ToolRunner.run(BehemothConfiguration.create(),
new ESIndexerJob(), args);
System.exit(res);
}
public int run(String[] args) throws Exception {
if (args.length != 1) {
String syntax = "com.digitalpebble.behemoth.ESIndexerJob input";
System.err.println(syntax);
return -1;
}
Path inputPath = new Path(args[0]);
JobConf job = new JobConf(getConf());
job.setJarByClass(this.getClass());
job.setJobName("Indexing " + inputPath + " into ElasticSearch");
job.setInputFormat(SequenceFileInputFormat.class);
job.setMapOutputValueClass(MapWritable.class);
job.setMapperClass(BehemothToESMapper.class);
job.setSpeculativeExecution(false); // disable speculative execution
// when writing to ES
// job.set("es.resource", "radio/artists"); // index used for storing
// data
job.setOutputFormat(EsOutputFormat.class); // use dedicated output
// format
FileInputFormat.addInputPath(job, inputPath);
// no reducer : send straight to elasticsearch at end of mapping
job.setNumReduceTasks(0);
try {
long start = System.currentTimeMillis();
JobClient.runJob(job);
long finish = System.currentTimeMillis();
if (LOG.isInfoEnabled()) {
LOG.info("ESIndexerJob completed. Timing: " + (finish - start)
+ " ms");
}
} catch (Exception e) {
LOG.error("Exception while running job", e);
return -1;
}
return 0;
}
}
|
[
"julien@digitalpebble.com"
] |
julien@digitalpebble.com
|
bdf286dd25a456bc1f7b4f3b6fec53af6252a8e2
|
eca99e2af37ede85f4c291ea886d05357305d011
|
/app/src/main/java/com/cadyd/app/model/AppShopVo.java
|
4bedced2f60416b21c68c502778b12321ca549ea
|
[] |
no_license
|
Brave-wan/cadyd
|
302fc5f47cdb246ab1ad88f585adcaa87518e080
|
7fb26a29a8609520c7be8b72016c1ecccf5872ca
|
refs/heads/master
| 2020-07-29T14:15:44.080887
| 2016-11-14T03:40:31
| 2016-11-14T03:40:31
| 73,664,047
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 402
|
java
|
package com.cadyd.app.model;
import java.util.List;
/**
* Created by wcy on 2016/7/10.
*/
public class AppShopVo {
public String shopid;// 店铺id
public String spid;// 用户领取商家发布的优惠券或者平台优惠券的id,多个id以英文逗号分隔
public String freightid;// 配送方式id
public String message;// 买家留言
public List<AppGoodsVo> goodsList;
}
|
[
"185214487@qq.com"
] |
185214487@qq.com
|
2689f1afc2a2e11bf43d1182e83702a18f1e5067
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/src/irvine/oeis/a292/A292872.java
|
a165bfedfe9534d3da20b56fe8a01fd03f75acae
|
[] |
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
| 491
|
java
|
package irvine.oeis.a292;
import irvine.oeis.FiniteSequence;
/**
* A292872 Perfect n-th powers <code>y^n (n >= 3)</code> of the form <code>x^2 + 2^a * 11^b (x >= 1</code>, a, b <code>>= 0, gcd(x, y) = 1)</code>.
* @author Georg Fischer
*/
public class A292872 extends FiniteSequence {
/** Construct the sequence. */
public A292872() {
super(27, 81, 125, 243, 729, 3375, 15625, 59049, 704969, 33698267, 41063625, 86938307, 100544625L, 483736625L, 163218919625L);
}
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
cc4207393d53d986617acfd60ebb42aa502c7c99
|
47113d2aa9ab4b033fd65bb862b061cdad514185
|
/app/src/main/java/com/zqy/canvasdemo/module/graph/arc/ArcView.java
|
a851d20b59fc62e6292d93080204307ba09b8deb
|
[] |
no_license
|
zhaoqingyue/ZQYCanvasDemo
|
78c2fcc90b235389dbbc1f1261ed189310253fe3
|
3e5fb566d44e74d6cd36cf3e70131604f7346b6c
|
refs/heads/master
| 2020-03-15T09:05:06.342136
| 2018-07-19T01:19:28
| 2018-07-19T01:19:28
| 132,066,611
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,760
|
java
|
package com.zqy.canvasdemo.module.graph.arc;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;
/**
* Created by zhaoqy on 2018/7/17.
*/
public class ArcView extends View {
private Paint paint;
public ArcView(Context context) {
super(context);
initPaint();
}
public ArcView(Context context, AttributeSet attrs) {
super(context, attrs);
initPaint();
}
public ArcView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initPaint();
}
private void initPaint() {
paint = new Paint();
// 在绘制点之前,需要设置画笔的宽度,否则不能画出来
paint.setStrokeWidth(10);
// 设置画笔的样式,来指定所画的点的样式,圆形还是方形
paint.setStrokeCap(Paint.Cap.ROUND);
paint.setColor(Color.BLUE);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
// 绘制圆弧1(无使用中心)
RectF rectF = new RectF(100, 100, 800,400);
// 绘制背景矩形
canvas.drawRect(rectF, paint);
// 绘制圆弧
paint.setColor(Color.RED);
canvas.drawArc(rectF, 0, 90, false, paint);
// 绘制圆弧2(使用中心)
RectF rectF2 = new RectF(100, 600, 800, 900);
// 绘制背景矩形
paint.setColor(Color.BLUE);
canvas.drawRect(rectF2, paint);
// 绘制圆弧
paint.setColor(Color.RED);
canvas.drawArc(rectF2, 0, 90, true, paint);
}
}
|
[
"zhaoqy@careland.com.cn"
] |
zhaoqy@careland.com.cn
|
9b3fde778d0fe066b227d03200a207db55fae714
|
af290c7aae9f6955da909768b99c8533cd87bd3b
|
/15-jms-1/src/main/java/rewards/RewardConfirmation.java
|
d0203013b90ed080d48b606f1de7bb000d788e9b
|
[] |
no_license
|
Oliver3214/corespring
|
06ef19048c6d8af8626b97c80875801bed9333d9
|
6a917c7da01ef5e48402dbc3739771010981d8a8
|
refs/heads/master
| 2020-12-19T03:01:19.727312
| 2020-01-22T15:43:19
| 2020-01-22T15:43:19
| 235,601,240
| 0
| 0
| null | 2020-01-22T15:21:17
| 2020-01-22T15:21:16
| null |
UTF-8
|
Java
| false
| false
| 1,334
|
java
|
package rewards;
import java.io.Serializable;
/**
* A summary of a confirmed reward transaction describing a contribution made to an account that was distributed among
* the account's beneficiaries.
*/
public class RewardConfirmation implements Serializable {
/**
*
*/
private static final long serialVersionUID = 977069208121895454L;
private String confirmationNumber;
private AccountContribution accountContribution;
/**
* Creates a new reward confirmation.
* @param confirmationNumber the unique confirmation number
* @param accountContribution a summary of the account contribution that was made
*/
public RewardConfirmation(String confirmationNumber, AccountContribution accountContribution) {
this.confirmationNumber = confirmationNumber;
this.accountContribution = accountContribution;
}
/**
* Returns the confirmation number of the reward transaction. Can be used later to lookup the transaction record.
*/
public String getConfirmationNumber() {
return confirmationNumber;
}
/**
* Returns a summary of the monetary contribution that was made to an account.
* @return the account contribution (the details of this reward)
*/
public AccountContribution getAccountContribution() {
return accountContribution;
}
public String toString() {
return confirmationNumber;
}
}
|
[
"jose.diaz@joedayz.pe"
] |
jose.diaz@joedayz.pe
|
5a122bb669cff5521694d3b57a63a5ba1acdc896
|
607224e023e4bf33a2be619262e1d8b55c2a3e08
|
/jars/worldwind/src/gov/nasa/worldwind/layers/Mars/THEMISColorLayer.java
|
3fd24756e6bbebb0f7cd17598271427b4cc21777
|
[] |
no_license
|
haldean/droidcopter
|
54511d836762f41b23670447f79e7457d67a216d
|
2a25c5eade55e68037001fbfdba3b0f975c70e25
|
refs/heads/master
| 2020-05-16T22:18:53.581797
| 2013-01-27T03:58:24
| 2013-01-27T03:58:24
| 755,362
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 773
|
java
|
/*
Copyright (C) 2001, 2006 United States Government
as represented by the Administrator of the
National Aeronautics and Space Administration.
All Rights Reserved.
*/
package gov.nasa.worldwind.layers.Mars;
import gov.nasa.worldwind.layers.BasicTiledImageLayer;
import gov.nasa.worldwind.util.WWXML;
import org.w3c.dom.Document;
/**
* @author Patrick Murris
* @version $Id: THEMISColorLayer.java 11316 2009-05-26 23:06:47Z dcollins $
*/
public class THEMISColorLayer extends BasicTiledImageLayer
{
public THEMISColorLayer()
{
super(getConfigurationDocument(), null);
}
protected static Document getConfigurationDocument()
{
return WWXML.openDocumentFile("config/Mars/THEMISColorLayer.xml", null);
}
}
|
[
"will.h.brown@gmail.com"
] |
will.h.brown@gmail.com
|
191ddc55c318991ed15ac31cee3db6e6c2b294dc
|
806f76edfe3b16b437be3eb81639d1a7b1ced0de
|
/src/com/huawei/pluginmessagecenter/service/MessageObserverController.java
|
e74a6fe0bea168477407009f9df86a643f9825ba
|
[] |
no_license
|
magic-coder/huawei-wear-re
|
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
|
935ad32f5348c3d8c8d294ed55a5a2830987da73
|
refs/heads/master
| 2021-04-15T18:30:54.036851
| 2018-03-22T07:16:50
| 2018-03-22T07:16:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,480
|
java
|
package com.huawei.pluginmessagecenter.service;
import com.huawei.pluginmessagecenter.p499a.C5861g;
import com.huawei.pluginmessagecenter.provider.data.MessageChangeEvent;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class MessageObserverController {
private static String TAG = "MessageObserverController";
private List<MessageObserver> mObservers = new ArrayList();
public void addObservers(MessageObserver messageObserver) {
if (messageObserver == null) {
C5861g.m27024c(TAG, "addObservers ==> observer == null");
} else {
this.mObservers.add(messageObserver);
}
}
public void deleteObservers(MessageObserver messageObserver) {
if (messageObserver == null) {
C5861g.m27024c(TAG, "deleteObservers ==> observer == null");
return;
}
C5861g.m27024c(TAG, "deleteObservers ==> observer == " + messageObserver);
this.mObservers.remove(messageObserver);
}
public void notifyAllObservers(int i, MessageChangeEvent messageChangeEvent) {
if (this.mObservers != null) {
Iterator it = new ArrayList(this.mObservers).iterator();
while (it.hasNext()) {
((MessageObserver) it.next()).onChange(i, messageChangeEvent);
}
}
}
public void clear() {
if (this.mObservers != null) {
this.mObservers.clear();
}
}
}
|
[
"lebedev1537@gmail.com"
] |
lebedev1537@gmail.com
|
510a98f0f839a75c5bb7aa35ee87218f0d74a212
|
e39843b2dead25cce89aec95f0cf2953fb43321d
|
/app/src/main/java/vision/genesis/clientapp/feature/auth/registration/RegistrationPresenter.java
|
33c577a5a936337218c703215650991f1f5076d6
|
[] |
no_license
|
GenesisVision/android-client
|
6727d5c61f2134ea00b308b00a52fc531a78d110
|
319b7dfd53ad498a65c2ee80b0e0ce15aef8aec6
|
refs/heads/develop
| 2022-05-13T08:56:00.715425
| 2022-04-18T11:17:16
| 2022-04-18T11:17:16
| 118,433,575
| 16
| 7
| null | 2021-04-01T19:41:53
| 2018-01-22T09:14:35
|
Java
|
UTF-8
|
Java
| false
| false
| 5,677
|
java
|
package vision.genesis.clientapp.feature.auth.registration;
import android.content.Context;
import com.arellomobile.mvp.InjectViewState;
import com.arellomobile.mvp.MvpPresenter;
import javax.inject.Inject;
import io.swagger.client.model.CaptchaCheckResult;
import io.swagger.client.model.CaptchaDetails;
import rx.Observable;
import rx.Single;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import vision.genesis.clientapp.GenesisVisionApplication;
import vision.genesis.clientapp.R;
import vision.genesis.clientapp.managers.AuthManager;
import vision.genesis.clientapp.model.api.Error;
import vision.genesis.clientapp.model.api.ErrorResponse;
import vision.genesis.clientapp.net.ApiErrorResolver;
import vision.genesis.clientapp.net.ErrorResponseConverter;
import vision.genesis.clientapp.utils.CaptchaUtils;
/**
* GenesisVision
* Created by Vitaly on 1/19/18.
*/
@InjectViewState
public class RegistrationPresenter extends MvpPresenter<RegistrationView>
{
@Inject
public Context context;
@Inject
public AuthManager authManager;
private Subscription riskControlSubscription;
private Subscription registrationSubscription;
private boolean privacyPolicyAccepted;
private boolean termsConditionsAccepted;
private String userName;
private String email;
private String password;
private CaptchaCheckResult captchaCheckResult;
@Override
protected void onFirstViewAttach() {
super.onFirstViewAttach();
GenesisVisionApplication.getComponent().inject(this);
}
@Override
public void onDestroy() {
if (riskControlSubscription != null) {
riskControlSubscription.unsubscribe();
}
if (registrationSubscription != null) {
registrationSubscription.unsubscribe();
}
super.onDestroy();
}
void onAcceptPrivacyPolicyCheckedChanged(boolean checked) {
privacyPolicyAccepted = checked;
updateSignUpButtonEnabled();
}
void onAcceptTermsConditionsCheckedChanged(boolean checked) {
termsConditionsAccepted = checked;
updateSignUpButtonEnabled();
}
private void updateSignUpButtonEnabled() {
getViewState().setSignUpButtonEnabled(privacyPolicyAccepted && termsConditionsAccepted);
}
void onSignInClicked() {
getViewState().showLoginActivity();
}
void onSignUpClicked(String username, String email, String password) {
if (privacyPolicyAccepted && termsConditionsAccepted) {
this.userName = username.trim();
this.email = email.trim();
this.password = password;
checkRiskControl(email);
}
}
private void checkRiskControl(String route) {
riskControlSubscription = authManager.checkRiskControl(route)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(this::handleRiskControlSuccess,
this::handleRiskControlError);
}
private void handleRiskControlSuccess(CaptchaDetails captchaDetails) {
riskControlSubscription.unsubscribe();
switch (captchaDetails.getCaptchaType()) {
case NONE:
register();
break;
case POW:
performPowCaptcha(captchaDetails);
break;
case GEETEST:
getViewState().showProgress(false);
break;
}
}
private void handleRiskControlError(Throwable throwable) {
riskControlSubscription.unsubscribe();
getViewState().showProgress(false);
ApiErrorResolver.resolveErrors(throwable,
message -> getViewState().showSnackbarMessage(message));
}
private void performPowCaptcha(CaptchaDetails captchaDetails) {
Single.fromCallable(() -> CaptchaUtils.findPowPrefix(captchaDetails))
.subscribeOn(Schedulers.computation())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(captchaCheckResult -> {
this.captchaCheckResult = captchaCheckResult;
register();
});
}
private void register() {
getViewState().clearErrors();
getViewState().showProgress(true);
registrationSubscription = getRegisterObservable(userName, email, password, password, captchaCheckResult)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.io())
.subscribe(this::onRegisterResponse,
this::onRegisterError);
}
private Observable<Void> getRegisterObservable(String userName, String email, String password, String confirmPassword, CaptchaCheckResult captchaCheckResult) {
return authManager.register(userName, email, password, confirmPassword, captchaCheckResult);
}
private void onRegisterResponse(Void response) {
registrationSubscription.unsubscribe();
getViewState().showMessageDialog(R.drawable.image_ok,
context.getString(R.string.email_sent),
context.getString(R.string.email_verification_text),
true,
() -> getViewState().finishActivity());
}
private void onRegisterError(Throwable throwable) {
registrationSubscription.unsubscribe();
getViewState().showProgress(false);
if (ApiErrorResolver.isNetworkError(throwable)) {
getViewState().showSnackbarMessage(context.getResources().getString(R.string.network_error));
}
else {
ErrorResponse response = ErrorResponseConverter.createFromThrowable(throwable);
if (response != null) {
for (Error error : response.errors) {
if (error.property == null) {
getViewState().showSnackbarMessage(error.message);
}
else {
switch (error.property.toLowerCase()) {
case "username":
getViewState().setUserNameError(error.message);
break;
case "email":
getViewState().setEmailError(error.message);
break;
case "password":
getViewState().setPasswordError(error.message);
break;
default:
getViewState().showSnackbarMessage(error.message);
break;
}
}
}
}
}
}
}
|
[
"dev.prus@gmail.com"
] |
dev.prus@gmail.com
|
106edb4b383f24fb11b6647e48a7615b3f1d11bf
|
ae2906fa1a2ec0750bed9ac28696871f5838dc91
|
/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_ListEventsResponse.java
|
068ec8592f42ca6f7b1455eba892d9063344c09d
|
[
"Apache-2.0"
] |
permissive
|
theghost5800/cf-java-client
|
ca8e2c0073fa1b8fd0441177d93d713ab3856f55
|
07a34c646a2f982e9405a49db2122ef461462af0
|
refs/heads/master
| 2022-11-15T08:17:10.162327
| 2019-10-29T15:48:42
| 2019-10-29T15:48:42
| 219,698,354
| 0
| 0
|
Apache-2.0
| 2019-11-05T08:48:37
| 2019-11-05T08:48:36
| null |
UTF-8
|
Java
| false
| false
| 998
|
java
|
/*
* Copyright 2013-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.cloudfoundry.client.v2.events;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.cloudfoundry.client.v2.PaginatedResponse;
import org.immutables.value.Value;
/**
* The response payload for the List Events operation
*/
@JsonDeserialize
@Value.Immutable
abstract class _ListEventsResponse extends PaginatedResponse<EventResource> {
}
|
[
"bhale@pivotal.io"
] |
bhale@pivotal.io
|
552fd89713880cd0a11e46e15fadd396c57a51a0
|
10d77fabcbb945fe37e15ae438e360a89a24ea05
|
/graalvm/transactions/fork/narayana/ArjunaJTS/orbportability/classes/com/arjuna/orbportability/orb/PreShutdown.java
|
caf3c1a80d720e2eb8176c1acd0fdb3efd503ef1
|
[
"Apache-2.0",
"LGPL-2.1-or-later",
"LGPL-2.1-only",
"LicenseRef-scancode-other-copyleft"
] |
permissive
|
nmcl/scratch
|
1a881605971e22aa300487d2e57660209f8450d3
|
325513ea42f4769789f126adceb091a6002209bd
|
refs/heads/master
| 2023-03-12T19:56:31.764819
| 2023-02-05T17:14:12
| 2023-02-05T17:14:12
| 48,547,106
| 2
| 1
|
Apache-2.0
| 2023-03-01T12:44:18
| 2015-12-24T15:02:58
|
Java
|
UTF-8
|
Java
| false
| false
| 1,714
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2006, Red Hat Middleware LLC, and individual contributors
* as indicated by the @author tags.
* See the copyright.txt in the distribution for a full listing
* of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* 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,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
* (C) 2005-2006,
* @author JBoss Inc.
*/
/*
* Copyright (C) 1998, 1999, 2000,
*
* Arjuna Solutions Limited,
* Newcastle upon Tyne,
* Tyne and Wear,
* UK.
*
* $Id: PreShutdown.java 2342 2006-03-30 13:06:17Z $
*/
/**
* Insances of classes derived from this interface can be registered with
* the system and do any tidy-up necessary after the ORB has
* been shutdown.
*
* @author Mark Little (mark@arjuna.com)
* @version $Id: PreShutdown.java 2342 2006-03-30 13:06:17Z $
* @since JTS 1.0.
*/
package com.arjuna.orbportability.orb;
public abstract class PreShutdown extends Shutdown
{
public abstract void work ();
protected PreShutdown ()
{
super("PreShutdown");
}
protected PreShutdown (String name)
{
super(name);
};
};
|
[
"mlittle@redhat.com"
] |
mlittle@redhat.com
|
7bb21071851b5411aa834d9adec06a34270b6d15
|
ac82c09fd704b2288cef8342bde6d66f200eeb0d
|
/projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/fixedincome/InterestRateInstrumentPresentValueFunction.java
|
061a65f02a5ece6ec14d8a3fe74cceb3c089822d
|
[
"Apache-2.0"
] |
permissive
|
cobaltblueocean/OG-Platform
|
88f1a6a94f76d7f589fb8fbacb3f26502835d7bb
|
9b78891139503d8c6aecdeadc4d583b23a0cc0f2
|
refs/heads/master
| 2021-08-26T00:44:27.315546
| 2018-02-23T20:12:08
| 2018-02-23T20:12:08
| 241,467,299
| 0
| 2
|
Apache-2.0
| 2021-08-02T17:20:41
| 2020-02-18T21:05:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,666
|
java
|
/**
* Copyright (C) 2011 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.financial.analytics.model.fixedincome;
import java.util.Collections;
import java.util.Set;
import com.opengamma.analytics.financial.interestrate.InstrumentDerivative;
import com.opengamma.analytics.financial.interestrate.PresentValueCalculator;
import com.opengamma.analytics.financial.interestrate.YieldCurveBundle;
import com.opengamma.engine.ComputationTarget;
import com.opengamma.engine.value.ComputedValue;
import com.opengamma.engine.value.ValueRequirementNames;
import com.opengamma.financial.analytics.model.discounting.DiscountingPVFunction;
import com.opengamma.financial.security.FinancialSecurity;
/**
* Function that calculated the present value.
* @deprecated Use {@link DiscountingPVFunction}
*/
@Deprecated
public class InterestRateInstrumentPresentValueFunction extends InterestRateInstrumentFunction {
private static final PresentValueCalculator CALCULATOR = PresentValueCalculator.getInstance();
public InterestRateInstrumentPresentValueFunction() {
super(ValueRequirementNames.PRESENT_VALUE);
}
@Override
public Set<ComputedValue> getComputedValues(final InstrumentDerivative derivative, final YieldCurveBundle bundle, final FinancialSecurity security, final ComputationTarget target,
final String curveCalculationConfigName, final String currency) {
final Double presentValue = derivative.accept(CALCULATOR, bundle);
return Collections.singleton(new ComputedValue(getResultSpec(target, curveCalculationConfigName, currency), presentValue));
}
}
|
[
"cobaltblue.ocean@gmail.com"
] |
cobaltblue.ocean@gmail.com
|
8864b24d17fb45d12ef1d87b02162c2e57860899
|
2d5e54e4dd6612aeb19904fcdf8757680c5bfd79
|
/api/src/org/modelio/api/module/paramEdition/BoolParameterModel.java
|
4f897614d52ac7ecf76934f21246604a16f0fc4c
|
[] |
no_license
|
mondo-project/hawk-modelio
|
1ef504dde30ce4e43b5db8d7936adbc04851e058
|
4da0f70dfeddb0451eec8b2f361586e07ad3dab9
|
refs/heads/master
| 2021-01-10T06:09:58.281311
| 2015-11-06T11:08:15
| 2015-11-06T11:08:15
| 45,675,632
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,175
|
java
|
/*
* Copyright 2013 Modeliosoft
*
* 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.modelio.api.module.paramEdition;
import com.modeliosoft.modelio.javadesigner.annotations.objid;
import org.modelio.api.module.IModuleUserConfiguration;
@objid ("a09e6ea3-905c-11dd-bbe0-001ec947ccaf")
public class BoolParameterModel extends ParameterModel {
@objid ("e434d6d2-feb1-11dd-8b31-0014222a9f79")
public BoolParameterModel(IModuleUserConfiguration conf, String name, String label, String description, String defaultValue) {
super(conf, name, label, description, defaultValue);
}
}
|
[
"antonio.garcia-dominguez@york.ac.uk"
] |
antonio.garcia-dominguez@york.ac.uk
|
f3f58d66b6a62da485b79d14bd20ddf40518b030
|
e1be07c04d74336448787700ff6eb16028f421fb
|
/lib/JP/go/ipa/oz/user/ide/PMController_if.java
|
46edd3bdea4c5da2ff9ff101b610aa58749ce6f5
|
[
"LicenseRef-scancode-warranty-disclaimer"
] |
no_license
|
yoshiylife/OZonJava
|
0e66a989556d359361d02d74641968c076b24565
|
b0d89353a8bf1224a9a8da490409c5f62dc2d017
|
refs/heads/master
| 2021-01-10T01:06:37.338257
| 2016-02-18T18:47:12
| 2016-02-18T18:47:12
| 52,029,219
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 719
|
java
|
package JP.go.ipa.oz.user.ide;
public interface PMController_if extends JP.go.ipa.oz.lib.standard._ActionListener_if {
void compileAutoEvent () throws Exception ;
void compileSubjectEvent () throws Exception ;
JP.go.ipa.oz.lib.standard._EventDispatchingQueue_if getDlgQueue () throws Exception ;
boolean checkSubjectState () throws Exception ;
void setDlgQueue (JP.go.ipa.oz.lib.standard._EventDispatchingQueue_if q) throws Exception ;
void saveEvent () throws Exception ;
void compileEvent (int flag) throws Exception ;
void setDirEvent () throws Exception ;
void destroyDlgQueue () throws Exception ;
void refreshEvent () throws Exception ;
void compileReleaseEvent () throws Exception ;
}
|
[
"yoshiylife@gmail.com"
] |
yoshiylife@gmail.com
|
96f6016670a9d683c1dd1da4006ae4d9e8dc5fb9
|
10fdc3aa333ef07a180f29a4425650945c3da9c8
|
/zhuanbo-service/src/main/java/com/zhuanbo/service/service/impl/QuickServiceImpl.java
|
48770ffbec490835b26a4c9f901bdfbc47bbef6f
|
[] |
no_license
|
arvin-xiao/lexuan
|
4d67f4ab40243c7e6167e514d899c6cd0c3f0995
|
6cffeee1002bad067e6c8481a3699186351d91a8
|
refs/heads/master
| 2023-04-27T21:01:06.644131
| 2020-05-03T03:03:52
| 2020-05-03T03:03:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 501
|
java
|
package com.zhuanbo.service.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhuanbo.core.entity.Quick;
import com.zhuanbo.service.mapper.QuickMapper;
import com.zhuanbo.service.service.IQuickService;
import org.springframework.stereotype.Service;
/**
* <p>
* 快捷入口表 服务实现类
* </p>
*
* @author rome
* @since 2019-07-03
*/
@Service
public class QuickServiceImpl extends ServiceImpl<QuickMapper, Quick> implements IQuickService {
}
|
[
"13509030019@163.com"
] |
13509030019@163.com
|
243658da0095589deefddc86a5ced393a632682b
|
3de3dae722829727edfdd6cc3b67443a69043475
|
/edexOsgi/com.raytheon.uf.edex.registry.ebxml/src/com/raytheon/uf/edex/registry/events/DeleteSlotEvent.java
|
fa9e94a9ff030d763ed1d92588ff067c919faea5
|
[
"LicenseRef-scancode-public-domain",
"Apache-2.0"
] |
permissive
|
Unidata/awips2
|
9aee5b7ec42c2c0a2fa4d877cb7e0b399db74acb
|
d76c9f96e6bb06f7239c563203f226e6a6fffeef
|
refs/heads/unidata_18.2.1
| 2023-08-18T13:00:15.110785
| 2023-08-09T06:06:06
| 2023-08-09T06:06:06
| 19,332,079
| 161
| 75
|
NOASSERTION
| 2023-09-13T19:06:40
| 2014-05-01T00:59:04
|
Java
|
UTF-8
|
Java
| false
| false
| 2,267
|
java
|
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.registry.events;
import java.util.ArrayList;
import java.util.List;
import oasis.names.tc.ebxml.regrep.xsd.rim.v4.SlotType;
import com.raytheon.uf.common.event.Event;
import com.raytheon.uf.common.util.CollectionUtil;
/**
* Event containing slots to be deleted by the registry garbage collector
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 4/11/2014 3011 bphillip Initial Coding
* 4/17/2014 3011 bphillip Delete slot events now contain strings
* </pre>
*
* @author bphillip
* @version 1
*/
public class DeleteSlotEvent extends Event {
private static final long serialVersionUID = -2818002679753482984L;
private List<String> slotsToDelete;;
public DeleteSlotEvent() {
super();
}
public DeleteSlotEvent(List<SlotType> slotsToDelete) {
if (CollectionUtil.isNullOrEmpty(slotsToDelete)) {
slotsToDelete = new ArrayList<SlotType>();
} else {
this.slotsToDelete = new ArrayList<String>(slotsToDelete.size());
for (SlotType slot : slotsToDelete) {
this.slotsToDelete.add(slot.getId());
}
}
}
public List<String> getSlotsToDelete() {
return slotsToDelete;
}
public void setSlotsToDelete(List<String> slotsToDelete) {
this.slotsToDelete = slotsToDelete;
}
}
|
[
"mjames@unidata.ucar.edu"
] |
mjames@unidata.ucar.edu
|
fb2cd673b0bdb4fe06788e5d35b4e895402411f1
|
dc0afaa5b63e1bf4ee195fa1bf56629a32d8d57a
|
/java/pay/my-chanpay/chanpay-demo-daishou/src/test/java/com/chanpay/dsf/demo/T21100Demo.java
|
b402601eb3f4f0ac7ca6e712b757c1383a207c5a
|
[] |
no_license
|
btpka3/btpka3.github.com
|
370e6954af485bd6aee35fa5944007aab131e416
|
e5435d201641a2f21c632a28eae5ef408d2e799c
|
refs/heads/master
| 2023-08-23T18:37:31.643843
| 2023-08-16T11:48:38
| 2023-08-16T11:48:38
| 8,571,000
| 19
| 19
| null | 2021-04-12T10:01:13
| 2013-03-05T03:08:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,667
|
java
|
package com.chanpay.dsf.demo;
import java.util.Map;
import com.chanpay.demo.util.BaseConstant;
import com.chanpay.demo.util.BaseParameter;
import com.chanpay.demo.util.ChanPayUtil;
/**
*
* @ClassName: T21100Demo
* @Description: 批量收款接口 Demo
* @author yanghta yanghta@chanjet.com
* @date 2017年5月3日 下午3:53:16
*
*/
public class T21100Demo extends BaseParameter {
public void send() {
Map<String, String> map = this.requestBaseParameter();
map.put("TransCode", "T21100"); // 交易码
map.put("OutTradeNo", ChanPayUtil.generateOutTradeNo()); // 商户网站唯一订单号
map.put("CorpAcctNo", "62233333333333"); // 企业账号
map.put("BusinessType", "0"); // 业务类型
map.put("CorpCheckNo", "201703061413");
map.put("CorpPushUrl", "http://172.20.11.16");
map.put("TotalNum", "1");
map.put("TotalAmt", "6");
map.put("ProdInfoList",
"[{'DetailNo':'2017050810382739288745404629','TransAmt':'6','BankCommonName':'中国建设银行','AccountType':'00','AcctNo':'62170042600000000','AcctName':'李四','Province':'甘肃省','City':'兰州市','BranchBankName':'中国建设银行股份有限公司兰州新港城支行','BranchBankCode':'105821005604','DrctBankCode':'105821005604','Currency':'CNY','ProtocolNo':'123','LiceneceType':'01','LiceneceNo':'600000201703160001','Phone':'18219910000','AcctExp':'','AcctCvv2':'','Summary':'备注','Postscript':'用途'}]");
ChanPayUtil.sendPost(map, BaseConstant.CHARSET,
BaseConstant.MERCHANT_PRIVATE_KEY);
}
@org.junit.Test
public void testSend() {
T21100Demo demo = new T21100Demo();
demo.send();
}
}
|
[
"btpka3@163.com"
] |
btpka3@163.com
|
873e61f2d884ddaabbd262aa785614600356738b
|
962b109b22edeb6111d70c1f8caefb3f6128aefc
|
/uimaj-core/src/test/java/org/apache/uima/cas/impl/FSIndexTest.java
|
9c5934a5f248287e9fce5d0575bdb292b5902385
|
[
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] |
permissive
|
sark245/uima-uimaj
|
072701ec9c0b2287f6d1cc03ec201e5c270caaea
|
6a8cb855f00bad0f05ba22bbc2ab1cd5aab597cb
|
refs/heads/main
| 2023-04-19T18:44:28.771075
| 2021-05-19T22:08:37
| 2021-05-19T22:08:37
| 369,012,308
| 0
| 0
|
Apache-2.0
| 2021-05-19T22:05:20
| 2021-05-19T22:05:19
| null |
UTF-8
|
Java
| false
| false
| 4,539
|
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.uima.cas.impl;
import static org.apache.uima.UIMAFramework.getResourceSpecifierFactory;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import org.apache.logging.log4j.core.Filter;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.appender.ConsoleAppender;
import org.apache.logging.log4j.core.filter.AbstractFilter;
import org.apache.uima.cas.CAS;
import org.apache.uima.cas.Type;
import org.apache.uima.cas.text.AnnotationFS;
import org.apache.uima.resource.metadata.TypeSystemDescription;
import org.apache.uima.util.CasCreationUtils;
import org.junit.Test;
public class FSIndexTest {
// static {
// System.setProperty(TypeSystemImpl.ENABLE_STRICT_TYPE_SOURCE_CHECK, "true");
// }
@Test
public void thatTypeSystemChangesCanBeHandled() throws Exception {
String myTypeName = "my.MyType";
TypeSystemDescription tsd1 = getResourceSpecifierFactory().createTypeSystemDescription();
tsd1.addType(myTypeName, "", CAS.TYPE_NAME_ANNOTATION);
tsd1.addType("some.OtherType1", "", CAS.TYPE_NAME_ANNOTATION);
TypeSystemDescription tsd2 = getResourceSpecifierFactory().createTypeSystemDescription();
tsd2.addType(myTypeName, "", CAS.TYPE_NAME_ANNOTATION);
tsd2.addType("some.OtherType2", "", CAS.TYPE_NAME_ANNOTATION);
CAS cas1 = CasCreationUtils.createCas(tsd1, null, null, null);
CAS cas2 = CasCreationUtils.createCas(tsd2, null, null, null);
assertThat(cas1.getTypeSystem())
.as("There exists two CASes in the JVM which have different type systems "
+ "containing the same internal and exteral types")
.isNotEqualTo(cas2.getTypeSystem());
assertThat(cas1.getTypeSystem().getType(myTypeName))
.as("The internal type is the same in both type systems")
.isEqualTo(cas2.getTypeSystem().getType(myTypeName));
Type myTypeFromCas2 = getType(cas2, myTypeName);
if (TypeSystemImpl.IS_ENABLE_STRICT_TYPE_SOURCE_CHECK) {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> {
AnnotationFS brokenFs = cas1.createAnnotation(myTypeFromCas2, 0, 0);
cas1.addFsToIndexes(brokenFs);
}).withMessageContaining("in CAS with different type system");
}
else {
List<String> capturedOutput = captureOutput(() -> {
AnnotationFS brokenFs = cas1.createAnnotation(myTypeFromCas2, 0, 0);
cas1.addFsToIndexes(brokenFs);
return null;
});
assertThat(capturedOutput.get(0)).contains("in CAS with different type system");
assertThat(capturedOutput.get(1)).contains("on index using different type system");
}
}
private List<String> captureOutput(Callable<Void> code) throws Exception {
org.apache.logging.log4j.core.Logger rootLogger = (org.apache.logging.log4j.core.Logger) org.apache.logging.log4j.LogManager
.getRootLogger();
List<String> messages = new ArrayList<>();
Filter filter = new AbstractFilter() {
@Override
public Result filter(LogEvent event) {
messages.add(event.getMessage().getFormattedMessage());
return Result.ACCEPT;
}
};
ConsoleAppender app = (ConsoleAppender) rootLogger.get().getAppenders().values().stream()
.findFirst().get();
app.addFilter(filter);
try {
code.call();
return messages;
} finally {
app.removeFilter(filter);
}
}
private Type getType(CAS cas, String typename) {
return cas.getTypeSystem().getType(typename);
}
}
|
[
"rec@apache.org"
] |
rec@apache.org
|
3b842b895bc6e39257dda44d74b9eed2229f74cd
|
daa5a20aa72d090a21ad1e0611d29ec9452a1e64
|
/src/test/java/com/jenkov/shoppingcart/actions/AddToCartTest.java
|
74e59051acd10d925c7d1fa8a829a5077eeb0f0f
|
[] |
no_license
|
jjenkov/shoppingcart-microservice
|
675aef43095482ae20199925d258efd85eb4e239
|
49878e0464770644044cb8cd7c0243a700e9d9ae
|
refs/heads/main
| 2023-03-07T17:06:45.148380
| 2021-02-25T14:46:29
| 2021-02-25T14:46:29
| 342,180,515
| 4
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,241
|
java
|
package com.jenkov.shoppingcart.actions;
import com.jenkov.shoppingcart.ShoppingCartException;
import com.jenkov.shoppingcart.actions.AddToCart;
import com.jenkov.shoppingcart.actions.CreateCart;
import com.jenkov.shoppingcart.dao.ProductDaoInMemory;
import com.jenkov.shoppingcart.dao.ShoppingCartDaoInMemory;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.fail;
public class AddToCartTest {
@Test
public void testAddCartWithWrongCartId() throws Exception {
ShoppingCartDaoInMemory shoppingCartDao = new ShoppingCartDaoInMemory();
ProductDaoInMemory productDao = new ProductDaoInMemory();
String cartId = "myCartId";
CreateCart createCart = new CreateCart(shoppingCartDao);
createCart.createCart(cartId);
assertEquals(0, shoppingCartDao.getCart(cartId).getEntries().size());
AddToCart addToCart = new AddToCart(shoppingCartDao, productDao);
try{
addToCart.addEntry(cartId + "XYZ", "prodId", 789);
fail("Expected exception here because the cartId does not match a shopping cart");
} catch(ShoppingCartException e) {
assertEquals("Shopping cart with id myCartIdXYZ not found", e.getMessage());
}
}
@Test
public void testAddCartWithWrongProductId() throws Exception {
ShoppingCartDaoInMemory shoppingCartDao = new ShoppingCartDaoInMemory();
ProductDaoInMemory productDao = new ProductDaoInMemory();
String cartId = "myCartId";
CreateCart createCart = new CreateCart(shoppingCartDao);
createCart.createCart(cartId);
assertEquals(0, shoppingCartDao.getCart(cartId).getEntries().size());
AddToCart addToCart = new AddToCart(shoppingCartDao, productDao);
try{
addToCart.addEntry(cartId, "prodIdXYZ", 789);
fail("Expected exception here because the productId does not match a real product");
} catch(ShoppingCartException e) {
assertEquals("Product with id prodIdXYZ not found", e.getMessage());
}
}
}
|
[
"jakob@jenkov.com"
] |
jakob@jenkov.com
|
2c10a48933be8236816e78425969a191383702de
|
1d2a7df9913f05c70f4dca8b421fd913b2145eb3
|
/src/workbench/db/importer/ImportOptions.java
|
33571287797bb69b92f72957c83fed0c15ea8a85
|
[] |
no_license
|
albfan/sqlworkbenchj
|
e5b7b4dcede3c7d64e3c222a4bbc9cb815e99c17
|
138cd9ee8715f2b9fde129dd9861ae98b3b15344
|
refs/heads/master
| 2021-01-16T18:19:39.338439
| 2017-08-30T18:23:12
| 2017-10-17T07:50:45
| 33,181,300
| 3
| 7
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,215
|
java
|
/*
* ImportOptions.java
*
* This file is part of SQL Workbench/J, http://www.sql-workbench.net
*
* Copyright 2002-2017, Thomas Kellerer
*
* Licensed under a modified Apache License, Version 2.0
* that restricts the use for certain governments.
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at.
*
* http://sql-workbench.net/manual/license.html
*
* 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.
*
* To contact the author please send an email to: support@sql-workbench.net
*
*/
package workbench.db.importer;
/**
*
* @author Thomas Kellerer
*/
public interface ImportOptions
{
void setDateFormat(String format);
String getDateFormat();
void setTimestampFormat(String format);
String getTimestampFormat();
void setEncoding(String enc);
String getEncoding();
void setMode(String mode);
String getMode();
}
|
[
"tkellerer@6c36a7f0-0884-4472-89c7-80b7fa7b7f28"
] |
tkellerer@6c36a7f0-0884-4472-89c7-80b7fa7b7f28
|
da88d2542f1471602e58fbe283dc2f186cc8d0f8
|
c7f768ab985c4a6080b6e00889915458d5eb4f9d
|
/components/inbound-endpoints/org.wso2.carbon.inbound.endpoint/src/main/java/org/wso2/carbon/inbound/endpoint/protocol/jms/JMSTask.java
|
5a630405f4eec4460d53d8b411d85dd874feed7c
|
[] |
no_license
|
jeewamp/carbon-mediation
|
37ca832ec733f40e621695dfc0f131d79c31bf3a
|
ace3adab90781837bbe9a849aa63e2ba6755038a
|
refs/heads/master
| 2021-01-15T10:41:19.873878
| 2014-12-11T09:27:50
| 2014-12-11T09:27:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 898
|
java
|
package org.wso2.carbon.inbound.endpoint.protocol.jms;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.ManagedLifecycle;
import org.apache.synapse.core.SynapseEnvironment;
public class JMSTask implements org.apache.synapse.task.Task, ManagedLifecycle {
private static final Log logger = LogFactory.getLog(JMSTask.class.getName());
private JMSPollingConsumer jmsPollingConsumer;
public JMSTask(JMSPollingConsumer jmsPollingConsumer) {
logger.debug("Initializing.");
this.jmsPollingConsumer = jmsPollingConsumer;
}
public void execute() {
logger.debug("Executing.");
jmsPollingConsumer.execute();
}
public void init(SynapseEnvironment synapseEnvironment) {
logger.debug("Initializing.");
}
public void destroy() {
logger.debug("Destroying.");
}
}
|
[
"irjanith@gmail.com"
] |
irjanith@gmail.com
|
e51b7efbe5d5712a2e91c75108cd7db8dd3332a6
|
f402a2d57d07ee77584ab43659feb7e5657bf725
|
/src/main/java/com/dellnaresh/wget/DirectRange.java
|
4cc92d744d290736de98af5eec11aefbec75aedd
|
[] |
no_license
|
nareshmiriyala/VideoDownloader
|
8020359b452ee3293d4d140f79e9747998e613ef
|
ccea65bc8be20bd45c200e2fcb039b47bfb1bb13
|
refs/heads/master
| 2020-12-24T14:35:35.365046
| 2015-08-31T13:14:24
| 2015-08-31T13:14:24
| 32,256,185
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,178
|
java
|
package com.dellnaresh.wget;
import com.dellnaresh.util.Constants;
import com.dellnaresh.wget.info.DownloadInfo;
import com.dellnaresh.wget.info.URLInfo;
import com.dellnaresh.wget.info.ex.DownloadInterruptedError;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.concurrent.atomic.AtomicBoolean;
public class DirectRange extends Direct {
private static final Logger logger = LoggerFactory.getLogger(DirectRange.class);
public DirectRange(DownloadInfo downloadInfo, File target) {
super(downloadInfo, target);
}
/**
* checkConnection existing file for downloadVideo resumeDownload. for range downloadVideo it will checkConnection
* file size and inside state. they sould be equal.
*
* @param downloadInfo
* @param targetFile
* @return return true - if all ok, false - if downloadVideo can not be restored.
*/
public static boolean canResume(DownloadInfo downloadInfo, File targetFile) {
logger.debug("Calling canResume method");
if (targetFile.exists()) {
if (downloadInfo.getCount() != targetFile.length())
return false;
} else {
if (downloadInfo.getCount() > 0)
return false;
}
return true;
}
private void downloadPart(DownloadInfo info, AtomicBoolean stop, Runnable notify) throws IOException {
logger.debug("Calling download Part method");
RandomAccessFile fos = null;
BufferedInputStream binaryreader = null;
HttpURLConnection conn;
try {
URL url = info.getSource();
conn = (HttpURLConnection) url.openConnection();
conn.setConnectTimeout(CONNECT_TIMEOUT);
conn.setReadTimeout(READ_TIMEOUT);
conn.setRequestProperty(Constants.USER_AGENT, info.getUserAgent());
if (info.getReferrer() != null)
conn.setRequestProperty(Constants.REFERRER, info.getReferrer().toExternalForm());
File f = getTarget();
if (!f.exists())
f.createNewFile();
info.setCount(FileUtils.sizeOf(f));
if (info.getLength()!=null && info.getCount() >= info.getLength()) {
notify.run();
return;
}
fos = new RandomAccessFile(f, "rw");
if (info.getCount() > 0) {
conn.setRequestProperty("Range", "bytes=" + info.getCount() + "-");
fos.seek(info.getCount());
}
byte[] bytes = new byte[BUF_SIZE];
int read;
// RetryWrap.checkConnection(conn);
binaryreader = new BufferedInputStream(conn.getInputStream());
while ((read = binaryreader.read(bytes)) > 0) {
fos.write(bytes, 0, read);
info.setCount(info.getCount() + read);
notify.run();
if (stop.get()) {
logger.error("DownloadInterruptedError called stop");
throw new DownloadInterruptedError(Constants.ERRORS.STOPPED);
}
if (Thread.interrupted()) {
logger.error("DownloadInterruptedError thread interrupted");
throw new DownloadInterruptedError(Constants.ERRORS.INTERRUPTED);
}
}
} finally {
if (fos != null)
fos.close();
if (binaryreader != null)
binaryreader.close();
}
}
@Override
public void download(final AtomicBoolean stop, final Runnable notify) {
logger.debug("Called download method");
downloadInfo.setState(URLInfo.States.DOWNLOADING);
notify.run();
try {
RetryWrap.wrap(stop, new RetryWrap.Wrap() {
@Override
public void download() throws IOException {
downloadInfo.setState(URLInfo.States.DOWNLOADING);
notify.run();
// downloadFile(downloadInfo,stop,notify);
downloadPart(downloadInfo, stop, notify);
}
@Override
public void retry(int delay, Throwable e) {
downloadInfo.setDelay(delay, e);
notify.run();
}
@Override
public void moved(URL url) {
downloadInfo.setState(URLInfo.States.RETRYING);
notify.run();
}
});
downloadInfo.setState(URLInfo.States.DONE);
notify.run();
} catch (DownloadInterruptedError e) {
downloadInfo.setState(URLInfo.States.STOP);
notify.run();
throw e;
} catch (RuntimeException e) {
downloadInfo.setState(URLInfo.States.ERROR);
notify.run();
throw e;
}
}
}
|
[
"ncmiriyala@gmail.com"
] |
ncmiriyala@gmail.com
|
5c5814e8c0e6245746f02c1f0fd0f0ff527f5909
|
caddff9764c16aee4f0b7364a15c94710e6f43f8
|
/app/build/generated/data_binding_base_class_source_out/debug/out/ontime/app/databinding/CRowRequestpendingItemBinding.java
|
6a17e54fed2a88c55a090e3281ee4bfa469e64b0
|
[] |
no_license
|
sumitkumarc/maindata
|
451ea583bfc7ade8f5a99777f852563b23ae94cd
|
3548e5124d20d504631a58d2be5cbc56f108f444
|
refs/heads/master
| 2023-02-28T04:15:29.496699
| 2021-02-03T02:24:08
| 2021-02-03T02:24:08
| 331,492,414
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,455
|
java
|
// Generated by view binder compiler. Do not edit!
package ontime.app.databinding;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.LinearLayoutCompat;
import androidx.viewbinding.ViewBinding;
import java.lang.NullPointerException;
import java.lang.Override;
import java.lang.String;
import ontime.app.R;
public final class CRowRequestpendingItemBinding implements ViewBinding {
@NonNull
private final LinearLayoutCompat rootView;
@NonNull
public final LinearLayout lllist;
@NonNull
public final LinearLayout second;
@NonNull
public final TextView txtName;
@NonNull
public final TextView txtOrderStatus;
@NonNull
public final TextView txtQty;
@NonNull
public final TextView txtTotal;
private CRowRequestpendingItemBinding(@NonNull LinearLayoutCompat rootView,
@NonNull LinearLayout lllist, @NonNull LinearLayout second, @NonNull TextView txtName,
@NonNull TextView txtOrderStatus, @NonNull TextView txtQty, @NonNull TextView txtTotal) {
this.rootView = rootView;
this.lllist = lllist;
this.second = second;
this.txtName = txtName;
this.txtOrderStatus = txtOrderStatus;
this.txtQty = txtQty;
this.txtTotal = txtTotal;
}
@Override
@NonNull
public LinearLayoutCompat getRoot() {
return rootView;
}
@NonNull
public static CRowRequestpendingItemBinding inflate(@NonNull LayoutInflater inflater) {
return inflate(inflater, null, false);
}
@NonNull
public static CRowRequestpendingItemBinding inflate(@NonNull LayoutInflater inflater,
@Nullable ViewGroup parent, boolean attachToParent) {
View root = inflater.inflate(R.layout.c_row_requestpending_item, parent, false);
if (attachToParent) {
parent.addView(root);
}
return bind(root);
}
@NonNull
public static CRowRequestpendingItemBinding bind(@NonNull View rootView) {
// The body of this method is generated in a way you would not otherwise write.
// This is done to optimize the compiled bytecode for size and performance.
int id;
missingId: {
id = R.id.lllist;
LinearLayout lllist = rootView.findViewById(id);
if (lllist == null) {
break missingId;
}
id = R.id.second;
LinearLayout second = rootView.findViewById(id);
if (second == null) {
break missingId;
}
id = R.id.txt_name;
TextView txtName = rootView.findViewById(id);
if (txtName == null) {
break missingId;
}
id = R.id.txt_order_status;
TextView txtOrderStatus = rootView.findViewById(id);
if (txtOrderStatus == null) {
break missingId;
}
id = R.id.txt_qty;
TextView txtQty = rootView.findViewById(id);
if (txtQty == null) {
break missingId;
}
id = R.id.txt_total;
TextView txtTotal = rootView.findViewById(id);
if (txtTotal == null) {
break missingId;
}
return new CRowRequestpendingItemBinding((LinearLayoutCompat) rootView, lllist, second,
txtName, txtOrderStatus, txtQty, txtTotal);
}
String missingId = rootView.getResources().getResourceName(id);
throw new NullPointerException("Missing required view with ID: ".concat(missingId));
}
}
|
[
"psumit88666@gmail.com"
] |
psumit88666@gmail.com
|
54835382837e8b989a18f87c5eedb310f3e10915
|
c583e42f22064bc5f3814b3d3c5f8bc62ee47a75
|
/src/main/java/com/woime/iboss/bpm/listener/SkipTaskListener.java
|
de88e7da184d545cea888cfc27eb2e5aa8d7e74f
|
[] |
no_license
|
vipsql/iboss
|
c42ab22f553b71cb56431f1e507e25434b238ede
|
9329b9a9f29d1289ffc047b44baa184f6e3636ab
|
refs/heads/master
| 2020-03-07T17:21:39.373944
| 2017-04-03T04:19:57
| 2017-04-03T04:19:57
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,937
|
java
|
package com.woime.iboss.bpm.listener;
import java.util.Collections;
import java.util.List;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.impl.context.Context;
import org.activiti.engine.impl.el.ExpressionManager;
import org.activiti.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.woime.iboss.api.org.OrgConnector;
import com.woime.iboss.api.user.UserConnector;
import com.woime.iboss.bpm.cmd.CompleteTaskWithCommentCmd;
import com.woime.iboss.bpm.persistence.domain.BpmConfRule;
import com.woime.iboss.bpm.persistence.manager.BpmConfRuleManager;
import com.woime.iboss.bpm.support.DefaultTaskListener;
import com.woime.iboss.bpm.support.MapVariableScope;
import com.woime.iboss.core.spring.ApplicationContextHelper;
public class SkipTaskListener extends DefaultTaskListener
{
private static final long serialVersionUID = -6837714612943102187L;
private static Logger logger = LoggerFactory.getLogger(SkipTaskListener.class);
@SuppressWarnings("unchecked")
@Override
public void onCreate(DelegateTask delegateTask) throws Exception
{
String taskDefinitionKey = delegateTask.getTaskDefinitionKey();
String processDefinitionId = delegateTask.getProcessDefinitionId();
String processInstanceId = delegateTask.getProcessInstanceId();
HistoricProcessInstanceEntity historicProcessInstanceEntity = Context.getCommandContext().getHistoricProcessInstanceEntityManager().findHistoricProcessInstance(processInstanceId);
List<BpmConfRule> bpmConfRules = ApplicationContextHelper.getBean(BpmConfRuleManager.class).find("from BpmConfRule where bpmConfNode.bpmConfBase.processDefinitionId=? and bpmConfNode.code=?",
processDefinitionId, taskDefinitionKey);
logger.debug("delegateTask.getId : {}", delegateTask.getId());
logger.debug("taskDefinitionKey : {}", taskDefinitionKey);
logger.debug("processDefinitionId : {}", processDefinitionId);
logger.debug("processInstanceId : {}", processInstanceId);
logger.debug("bpmConfRules : {}", bpmConfRules);
UserConnector userConnector = ApplicationContextHelper.getBean(UserConnector.class);
OrgConnector orgConnector = (OrgConnector) ApplicationContextHelper.getBean(OrgConnector.class);
ExpressionManager expressionManager = Context.getProcessEngineConfiguration().getExpressionManager();
MapVariableScope mapVariableScope = new MapVariableScope();
String initiator = historicProcessInstanceEntity.getStartUserId();
mapVariableScope.setVariable("initiator", userConnector.findById(initiator));
for (BpmConfRule bpmConfRule : bpmConfRules)
{
String value = bpmConfRule.getValue();
if ("职位".equals(value))
{
// 获得发起人的职位
int initiatorLevel = orgConnector.getJobLevelByUserId(initiator);
// 获得审批人的职位
int assigneeLevel = orgConnector.getJobLevelByUserId(delegateTask.getAssignee());
// 比较
if (initiatorLevel >= assigneeLevel)
{
logger.info("skip task : {}", delegateTask.getId());
logger.info("initiatorLevel : {}, assigneeLevel : {}", initiatorLevel, assigneeLevel);
new CompleteTaskWithCommentCmd(delegateTask.getId(), Collections.<String, Object> emptyMap(), "跳过").execute(Context.getCommandContext());
}
}
else
{
Object objectResult = expressionManager.createExpression(value).getValue(mapVariableScope);
if ((objectResult == null) || (!(objectResult instanceof Boolean)))
{
logger.error("{} is not Boolean, just return", objectResult);
return;
}
Boolean result = (Boolean) objectResult;
logger.info("value : {}, result : {}", value, result);
if (result)
{
logger.info("skip task : {}", delegateTask.getId());
new CompleteTaskWithCommentCmd(delegateTask.getId(), Collections.<String, Object> emptyMap(), "跳过").execute(Context.getCommandContext());
}
}
}
}
}
|
[
"Administrator@192.168.148.1"
] |
Administrator@192.168.148.1
|
38dea071b0152939ef76c289f24b8e61c3f246d0
|
b0136f3721cafdefa19c98dcb375b909ed43dc41
|
/antlr/src/main/java/com/lijian/antlr/listeners/csv/auto/CSVLexer.java
|
07bb63fb90323934df62cbfd69f332528c3212d6
|
[] |
no_license
|
dalijian/json
|
3e6c15763e1cc7af9e999f71943e47baa8815b36
|
c46aafd56ce97b524cad62a3ea01df87cedcd31b
|
refs/heads/master
| 2023-04-26T13:39:10.864777
| 2023-04-15T05:04:35
| 2023-04-15T05:04:35
| 160,699,643
| 0
| 0
| null | 2022-12-10T05:20:37
| 2018-12-06T16:10:41
|
Java
|
UTF-8
|
Java
| false
| false
| 3,919
|
java
|
// Generated from C:/Users/lijian/IdeaProjects/json/antlr/src/main/java/com.lijian.antlr/listeners/csv\CSV.g4 by ANTLR 4.9.1
package com.lijian.antlr.listeners.csv.auto;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
public class CSVLexer extends Lexer {
static { RuntimeMetaData.checkVersion("4.9.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, T__1=2, T__2=3, TEXT=4, STRING=5;
public static String[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};
public static String[] modeNames = {
"DEFAULT_MODE"
};
private static String[] makeRuleNames() {
return new String[] {
"T__0", "T__1", "T__2", "TEXT", "STRING"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, "','", "'\r'", "'\n'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, null, null, null, "TEXT", "STRING"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
/**
* @deprecated Use {@link #VOCABULARY} instead.
*/
@Deprecated
public static final String[] tokenNames;
static {
tokenNames = new String[_SYMBOLIC_NAMES.length];
for (int i = 0; i < tokenNames.length; i++) {
tokenNames[i] = VOCABULARY.getLiteralName(i);
if (tokenNames[i] == null) {
tokenNames[i] = VOCABULARY.getSymbolicName(i);
}
if (tokenNames[i] == null) {
tokenNames[i] = "<INVALID>";
}
}
}
@Override
@Deprecated
public String[] getTokenNames() {
return tokenNames;
}
@Override
public Vocabulary getVocabulary() {
return VOCABULARY;
}
public CSVLexer(CharStream input) {
super(input);
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@Override
public String getGrammarFileName() { return "CSV.g4"; }
@Override
public String[] getRuleNames() { return ruleNames; }
@Override
public String getSerializedATN() { return _serializedATN; }
@Override
public String[] getChannelNames() { return channelNames; }
@Override
public String[] getModeNames() { return modeNames; }
@Override
public ATN getATN() { return _ATN; }
public static final String _serializedATN =
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\7#\b\1\4\2\t\2\4"+
"\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\3\2\3\2\3\3\3\3\3\4\3\4\3\5\6\5\25\n\5"+
"\r\5\16\5\26\3\6\3\6\3\6\3\6\7\6\35\n\6\f\6\16\6 \13\6\3\6\3\6\2\2\7\3"+
"\3\5\4\7\5\t\6\13\7\3\2\4\6\2\f\f\17\17$$..\3\2$$\2%\2\3\3\2\2\2\2\5\3"+
"\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\3\r\3\2\2\2\5\17\3\2\2\2\7"+
"\21\3\2\2\2\t\24\3\2\2\2\13\30\3\2\2\2\r\16\7.\2\2\16\4\3\2\2\2\17\20"+
"\7\17\2\2\20\6\3\2\2\2\21\22\7\f\2\2\22\b\3\2\2\2\23\25\n\2\2\2\24\23"+
"\3\2\2\2\25\26\3\2\2\2\26\24\3\2\2\2\26\27\3\2\2\2\27\n\3\2\2\2\30\36"+
"\7$\2\2\31\32\7$\2\2\32\35\7$\2\2\33\35\n\3\2\2\34\31\3\2\2\2\34\33\3"+
"\2\2\2\35 \3\2\2\2\36\34\3\2\2\2\36\37\3\2\2\2\37!\3\2\2\2 \36\3\2\2\2"+
"!\"\7$\2\2\"\f\3\2\2\2\6\2\26\34\36\2";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
}
}
}
|
[
"237922011@qq.com"
] |
237922011@qq.com
|
58eec0b18260db772b1ad02f9d9295c7a16eff8c
|
856924ea94e1ad1d8be2213bef3df68c4ca4c81c
|
/hasor-core/src/main/java/net/hasor/core/environment/EnvironmentWrap.java
|
8045dbd8e85b12593a0778b111d9d021a5fb83ae
|
[
"Apache-2.0"
] |
permissive
|
forever0523/hasor
|
082c2ffc4e9277ad6bfd8ed2312ca7b7eee505d4
|
59f673e6edaa06c43494a301ed5389f3e618bb22
|
refs/heads/master
| 2022-11-24T03:53:45.346684
| 2020-07-30T05:05:04
| 2020-07-30T05:05:04
| 283,675,596
| 1
| 0
|
Apache-2.0
| 2020-07-30T05:12:32
| 2020-07-30T05:12:31
| null |
UTF-8
|
Java
| false
| false
| 3,166
|
java
|
/*
* Copyright 2008-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.hasor.core.environment;
import net.hasor.core.Environment;
import net.hasor.core.EventContext;
import net.hasor.core.Hasor;
import net.hasor.core.Settings;
import java.util.Set;
/**
* {@link Environment}接口包装器。
* @version : 2013-9-11
* @author 赵永春 (zyc@hasor.net)
*/
public class EnvironmentWrap implements Environment {
private final Environment environment;
public EnvironmentWrap(Environment environment) {
this.environment = environment;
}
protected Environment getTarget() {
return environment;
}
@Override
public String[] getSpanPackage() {
return this.getTarget().getSpanPackage();
}
@Override
public Set<Class<?>> findClass(Class<?> featureType) {
return this.getTarget().findClass(featureType);
}
@Override
public Hasor.Level runMode() {
return this.getTarget().runMode();
}
@Override
public Set<Class<?>> findClass(Class<?> featureType, String loadPackages) {
return this.getTarget().findClass(featureType, loadPackages);
}
@Override
public Set<Class<?>> findClass(Class<?> featureType, String[] loadPackages) {
return this.getTarget().findClass(featureType, loadPackages);
}
@Override
public Object getContext() {
return this.getTarget().getContext();
}
@Override
public ClassLoader getClassLoader() {
return this.getTarget().getClassLoader();
}
@Override
public EventContext getEventContext() {
return this.getTarget().getEventContext();
}
@Override
public Settings getSettings() {
return this.getTarget().getSettings();
}
@Override
public String[] getVariableNames() {
return this.getTarget().getVariableNames();
}
@Override
public String getVariable(String varName) {
return this.getTarget().getVariable(varName);
}
@Override
public String evalString(String eval) {
return this.getTarget().evalString(eval);
}
@Override
public void addVariable(String varName, String value) {
this.getTarget().addVariable(varName, value);
}
@Override
public void removeVariable(String varName) {
this.getTarget().removeVariable(varName);
}
@Override
public void refreshVariables() {
this.getTarget().refreshVariables();
}
@Override
public String getSystemProperty(String property) {
return this.getTarget().getSystemProperty(property);
}
}
|
[
"68978002+zycglt@users.noreply.github.com"
] |
68978002+zycglt@users.noreply.github.com
|
3d4de44c019a025a2fa814fa5dfec7b18fd21b7e
|
202cd298430d3d0db62618ee7b944286d3cde12d
|
/plugins/webp/src/com/android/tools/adtui/webp/WebpNativeLibHelper.java
|
90c8b86612c5a74e6c398fe7f227679dd490f175
|
[
"Apache-2.0"
] |
permissive
|
llzxcv2014/intellij-community
|
2e4c9fc7339d92216961262f7272c6b0bc17c4c3
|
7aedec109e6dba1393fe067171633efa30da4fda
|
refs/heads/master
| 2021-08-06T23:08:26.280264
| 2020-09-29T08:01:22
| 2020-09-29T08:01:22
| 222,669,602
| 1
| 0
|
Apache-2.0
| 2020-09-29T08:01:31
| 2019-11-19T10:27:26
| null |
UTF-8
|
Java
| false
| false
| 3,659
|
java
|
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.tools.adtui.webp;
import com.intellij.openapi.application.PluginPathManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.SystemInfo;
import java.io.File;
import java.io.IOException;
public final class WebpNativeLibHelper {
@SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized") private static boolean sJniLibLoaded;
@SuppressWarnings("FieldAccessedSynchronizedAndUnsynchronized") private static boolean sJniLibLoadAttempted;
private WebpNativeLibHelper() {
}
static void requireNativeLibrary() throws IOException {
if (!loadNativeLibraryIfNeeded()) {
throw new IOException("The WebP decoder library could not be loaded");
}
}
public static String getDecoderVersion() {
// This is the current result of calling
// libwebp.WebPGetEncoderVersion()
// but we don't want to have to load the native library just to get this constant
// (since it doesn't change until we change the bundled version of the library anyway).
//
// And more importantly, NOBODY looks at this version anyway.
return "1280";
}
public static String getEncoderVersion() {
return getDecoderVersion();
}
public static boolean loadNativeLibraryIfNeeded() {
if (!sJniLibLoadAttempted) {
try {
loadNativeLibrary();
}
catch (UnsatisfiedLinkError e) {
Logger.getInstance(WebpImageReaderSpi.class).warn(e);
}
}
return sJniLibLoaded;
}
private synchronized static void loadNativeLibrary() {
if (sJniLibLoadAttempted) {
// Already attempted to load, nothing to do here.
return;
}
try {
String libFileName = getLibName();
File pluginPath = getLibLocation();
File libPath = new File(pluginPath, libFileName);
if (!libPath.exists()) {
throw new UnsatisfiedLinkError(String.format("'%1$s' not found at '%2$s'", libFileName, libPath.getAbsolutePath()));
}
System.load(libPath.getAbsolutePath());
}
finally {
sJniLibLoadAttempted = true;
}
sJniLibLoaded = true;
}
/**
* Copied from {@link com.intellij.util.lang.UrlClassLoader}.
*/
public static String getLibName() {
String baseName = SystemInfo.is64Bit ? "webp_jni64" : "webp_jni";
String fileName = System.mapLibraryName(baseName);
if (SystemInfo.isMac) {
fileName = fileName.replace(".jnilib", ".dylib");
}
return fileName;
}
public static File getLibLocation() {
// A terrible hack for dev environment.
String libPath = "lib/libwebp/" + getPlatformName();
File result = new File(PluginPathManager.getPluginHomePath("webp") + "/" + libPath);
if (result.exists()) return result;
return PluginPathManager.getPluginResource(WebpNativeLibHelper.class, libPath);
}
private static String getPlatformName() {
if (SystemInfo.isWindows) return "win";
else if (SystemInfo.isMac) return "mac";
else if (SystemInfo.isLinux) return "linux";
else return "";
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
fa6a4207548e32d7d98a949e46c0ee5882e8ca75
|
9923e30eb99716bfc179ba2bb789dcddc28f45e6
|
/apimatic/java_gradle_android_lib/Samsara+API-Android/SamsaraAPILib/src/main/java/com/samsara/api/models/TaggedDriver.java
|
4643d99951859eb63a379a59ef33a38267241c4b
|
[
"MIT"
] |
permissive
|
silverspace/samsara-sdks
|
cefcd61458ed3c3753ac5e6bf767229dd8df9485
|
c054b91e488ab4266f3b3874e9b8e1c9e2d4d5fa
|
refs/heads/master
| 2020-04-25T13:16:59.137551
| 2019-03-01T05:49:05
| 2019-03-01T05:49:05
| 172,804,041
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,244
|
java
|
/*
* SamsaraAPILib
*
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
*/
package com.samsara.api.models;
import java.util.*;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonSetter;
public class TaggedDriver
extends java.util.Observable
implements java.io.Serializable {
private static final long serialVersionUID = 371481310164330635L;
private long id;
private String name;
/** GETTER
* The ID of the Driver being tagged.
*/
@JsonGetter("id")
public long getId ( ) {
return this.id;
}
/** SETTER
* The ID of the Driver being tagged.
*/
@JsonSetter("id")
public void setId (long value) {
this.id = value;
notifyObservers(this.id);
}
/** GETTER
* Name of the Driver being tagged.
*/
@JsonGetter("name")
public String getName ( ) {
return this.name;
}
/** SETTER
* Name of the Driver being tagged.
*/
@JsonSetter("name")
public void setName (String value) {
this.name = value;
notifyObservers(this.name);
}
}
|
[
"greg@samsara.com"
] |
greg@samsara.com
|
46d75418ea2306e794f467d409b36680c93a8679
|
e87f985fdd9177e92966f8b2e85b6e57662e7cf6
|
/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/TAuthor.java
|
d7b5748b5ea36a79ce1e21a3a087e4afe67e1a46
|
[
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
ben-manes/jOOQ
|
5ef43f8ea8c5c942dc0b2e0669cc927dca6f2ff7
|
9f160d5e869de1a9d66408d90718148f76c5e000
|
refs/heads/master
| 2023-09-05T03:27:56.109520
| 2013-08-26T09:48:14
| 2013-08-26T10:05:05
| 12,375,424
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,397
|
java
|
/**
* This class is generated by jOOQ
*/
package org.jooq.test.h2.generatedclasses.tables;
/**
* This class is generated by jOOQ.
*
* An entity holding authors of books
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TAuthor extends org.jooq.impl.TableImpl<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord> {
private static final long serialVersionUID = -1755521321;
/**
* The singleton instance of <code>PUBLIC.T_AUTHOR</code>
*/
public static final org.jooq.test.h2.generatedclasses.tables.TAuthor T_AUTHOR = new org.jooq.test.h2.generatedclasses.tables.TAuthor();
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord> getRecordType() {
return org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord.class;
}
/**
* The column <code>PUBLIC.T_AUTHOR.ID</code>. The author ID
*/
public static final org.jooq.TableField<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord, java.lang.Integer> ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), T_AUTHOR);
/**
* The column <code>PUBLIC.T_AUTHOR.FIRST_NAME</code>. The author's first name
*/
public static final org.jooq.TableField<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord, java.lang.String> FIRST_NAME = createField("FIRST_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(50), T_AUTHOR);
/**
* The column <code>PUBLIC.T_AUTHOR.LAST_NAME</code>. The author's last name
*/
public static final org.jooq.TableField<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord, java.lang.String> LAST_NAME = createField("LAST_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false), T_AUTHOR);
/**
* The column <code>PUBLIC.T_AUTHOR.DATE_OF_BIRTH</code>. The author's date of birth
*/
public static final org.jooq.TableField<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord, java.sql.Date> DATE_OF_BIRTH = createField("DATE_OF_BIRTH", org.jooq.impl.SQLDataType.DATE, T_AUTHOR);
/**
* The column <code>PUBLIC.T_AUTHOR.YEAR_OF_BIRTH</code>. The author's year of birth
*/
public static final org.jooq.TableField<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord, java.lang.Integer> YEAR_OF_BIRTH = createField("YEAR_OF_BIRTH", org.jooq.impl.SQLDataType.INTEGER, T_AUTHOR);
/**
* The column <code>PUBLIC.T_AUTHOR.ADDRESS</code>. The author's address
*/
public static final org.jooq.TableField<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord, java.lang.String> ADDRESS = createField("ADDRESS", org.jooq.impl.SQLDataType.VARCHAR.length(50), T_AUTHOR);
/**
* No further instances allowed
*/
private TAuthor() {
super("T_AUTHOR", org.jooq.test.h2.generatedclasses.Public.PUBLIC);
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.UniqueKey<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord> getPrimaryKey() {
return org.jooq.test.h2.generatedclasses.Keys.PK_T_AUTHOR;
}
/**
* {@inheritDoc}
*/
@Override
public java.util.List<org.jooq.UniqueKey<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord>> getKeys() {
return java.util.Arrays.<org.jooq.UniqueKey<org.jooq.test.h2.generatedclasses.tables.records.TAuthorRecord>>asList(org.jooq.test.h2.generatedclasses.Keys.PK_T_AUTHOR);
}
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
fdb771010713dbfa18430dfab18060a525f26488
|
cfa9d3ed69bf73172c3b1d6a0f2cb6660c976b93
|
/j2se/LGame-j2se-0.2.6/org/loon/framework/game/simple/media/DataSample.java
|
134b4542b0b7ce6cef3703f96d8b42e995d8d05a
|
[] |
no_license
|
jackyglony/loon-simple
|
7f3c6fd49a05de28daff0495a202d281a18706ce
|
cbf9c70e41ef5421bc1a5bb55939aa527aac675d
|
refs/heads/master
| 2020-12-25T12:18:22.710566
| 2013-06-30T03:11:06
| 2013-06-30T03:11:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,455
|
java
|
/**
* MediaFrame is an Open Source streaming media platform in Java
* which provides a fast, easy to implement and extremely small applet
* that enables to view your audio/video content without having
* to rely on external player applications or bulky plug-ins.
*
* Copyright (C) 2004/5 MediaFrame (http://www.mediaframe.org).
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
package org.loon.framework.game.simple.media;
/**
* DataSample
*/
public final class DataSample {
protected long offset;
protected int size;
public DataSample(long offset, int size) {
super();
this.offset = offset;
this.size = size;
}
public long getOffset() {
return offset;
}
public int getSize() {
return size;
}
}
|
[
"loontest@282ca0c4-f913-11dd-a8e2-f7cb3c35fcff"
] |
loontest@282ca0c4-f913-11dd-a8e2-f7cb3c35fcff
|
434ad030a4437615df72ceb931ae82e8b3d6251f
|
967502523508f5bb48fdaac93b33e4c4aca20a4b
|
/aws-java-sdk-support/src/main/java/com/amazonaws/services/support/model/transform/CategoryJsonMarshaller.java
|
ede58dba7f2dbafa5f0abacd213dac0c026c1317
|
[
"Apache-2.0",
"JSON"
] |
permissive
|
hanjk1234/aws-sdk-java
|
3ac0d8a9bf6f7d9bf1bc5db8e73a441375df10c0
|
07da997c6b05ae068230401921860f5e81086c58
|
refs/heads/master
| 2021-01-17T18:25:34.913778
| 2015-10-23T03:20:07
| 2015-10-23T03:20:07
| 44,951,249
| 1
| 0
| null | 2015-10-26T06:53:25
| 2015-10-26T06:53:24
| null |
UTF-8
|
Java
| false
| false
| 2,312
|
java
|
/*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package com.amazonaws.services.support.model.transform;
import static com.amazonaws.util.StringUtils.UTF8;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.util.Map;
import java.util.List;
import com.amazonaws.AmazonClientException;
import com.amazonaws.services.support.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.util.json.*;
/**
* CategoryMarshaller
*/
public class CategoryJsonMarshaller {
/**
* Marshall the given parameter object, and output to a JSONWriter
*/
public void marshall(Category category, JSONWriter jsonWriter) {
if (category == null) {
throw new AmazonClientException(
"Invalid argument passed to marshall(...)");
}
try {
jsonWriter.object();
if (category.getCode() != null) {
jsonWriter.key("code").value(category.getCode());
}
if (category.getName() != null) {
jsonWriter.key("name").value(category.getName());
}
jsonWriter.endObject();
} catch (Throwable t) {
throw new AmazonClientException(
"Unable to marshall request to JSON: " + t.getMessage(), t);
}
}
private static CategoryJsonMarshaller instance;
public static CategoryJsonMarshaller getInstance() {
if (instance == null)
instance = new CategoryJsonMarshaller();
return instance;
}
}
|
[
"aws@amazon.com"
] |
aws@amazon.com
|
17b519b039acb8858d62a1aafa7b23c9f7c15878
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_644b0609a741b7898b978dfc7e953a4a745955f3/PostSliderActivity/2_644b0609a741b7898b978dfc7e953a4a745955f3_PostSliderActivity_s.java
|
049af3af4ac843bfb2c044fa62c5aed404ab0ff2
|
[] |
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,054
|
java
|
package com.matji.sandwich;
import java.util.ArrayList;
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.content.Intent;
import com.matji.sandwich.base.BaseActivity;
import com.matji.sandwich.session.Session;
import com.matji.sandwich.widget.SearchBar;
import com.matji.sandwich.widget.SwipeView;
import com.matji.sandwich.widget.PostListView;
import com.matji.sandwich.widget.PostNearListView;
import com.matji.sandwich.widget.PostSearchView;
import com.matji.sandwich.widget.MyPostListView;
import com.matji.sandwich.widget.PagerControl;
import com.matji.sandwich.widget.RequestableMListView;
import com.matji.sandwich.widget.HorizontalPager.OnScrollListener;
public class PostSliderActivity extends BaseActivity implements OnScrollListener {
public static final int INDEX_NEAR_POST = 2;
private static final int mDefaultPage = 1;
private SwipeView swipeView;
private PostSearchView view1;
private PostListView view2;
private PostNearListView view3;
private MyPostListView view4;
private Context mContext;
private ArrayList<View> mContentViews;
private int mCurrentPage;
private PagerControl control;
private Session session;
private boolean privateMode;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_post_slider);
session = Session.getInstance(this);
mContext = getApplicationContext();
mContentViews = new ArrayList<View>();
privateMode = false;
control = (PagerControl) findViewById(R.id.PagerControl);
control.setContentViews(mContentViews);
swipeView = (SwipeView) findViewById(R.id.SwipeView);
view1 = (PostSearchView) findViewById(R.id.ListView1);
view2 = (PostListView) findViewById(R.id.ListView2);
view3 = (PostNearListView) findViewById(R.id.ListView3);
LinearLayout searchWrap = (LinearLayout) findViewById(R.id.SearchWrap);
searchWrap.addView(new SearchBar(this, view1), 0);
view1.setTag(R.string.title, getResources().getText(R.string.search_post).toString());
view2.setTag(R.string.title, getResources().getText(R.string.all_post).toString());
view3.setTag(R.string.title, getResources().getText(R.string.near_post).toString());
mContentViews.add(view1);
mContentViews.add(view2);
mContentViews.add(view3);
view1.setActivity(this);
view2.setActivity(this);
view3.setActivity(this);
swipeView.addOnScrollListener(this);
}
public void onResume() {
super.onResume();
mCurrentPage = session.getPreferenceProvider().getInt(Session.POST_SLIDER_INDEX, mDefaultPage);
// session.getPreferenceProvider().setInt(Session.POST_SLIDER_INDEX, mDefaultPage);
if(session.getToken() == null && privateMode == true){
// remove private lists
removePrivateStoreList();
privateMode = false;
}else if (session.getToken() != null && privateMode == false) {
// add private lists
addPrivateStoreList();
privateMode = true;
} else {
initPages();
}
view1.dataRefresh();
view2.dataRefresh();
view3.dataRefresh();
if (view4 != null) view4.dataRefresh();
}
private void initPages(){
control.start(this);
control.setNumPages(mContentViews.size());
control.setCurrentPage(mCurrentPage);
swipeView.setCurrentPage(mCurrentPage);
((RequestableMListView)mContentViews.get(mCurrentPage)).requestConditionally();
}
private void addPrivateStoreList() {
if (view4 == null) {
view4 = new MyPostListView(this, null);
Session session = Session.getInstance(mContext);
view4.setScrollContainer(false);
view4.setUserId(session.getCurrentUser().getId());
view4.setTag(R.string.title, getResources().getString(R.string.my_post).toString());
view4.setActivity(this);
}
swipeView.addView(view4);
mContentViews.add(view4);
initPages();
}
private void removePrivateStoreList() {
swipeView.removeViewInLayout(view4);
mContentViews.remove(view4);
initPages();
}
public void onScroll(int scrollX) {
}
public void onViewScrollFinished(int currentPage) {
if (mCurrentPage != currentPage) {
Log.d("refresh", "pageChanged!");
try {
mCurrentPage = currentPage;
session.getPreferenceProvider().setInt(Session.POST_SLIDER_INDEX, mCurrentPage);
control.setCurrentPage(currentPage);
View view = mContentViews.get(currentPage);
if (view instanceof RequestableMListView) {
RequestableMListView listView = (RequestableMListView) view;
listView.requestConditionally();
}
} catch (IndexOutOfBoundsException e) {
e.printStackTrace();
}
}
}
// public boolean onCreateOptionsMenu(Menu menu) {
// super.onCreateOptionsMenu(menu);
// MenuInflater inflater = getMenuInflater();
// inflater.inflate(R.menu.menu, menu);
// return true;
// }
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
switch (requestCode) {
case WRITE_POST_ACTIVITY:
if (resultCode == RESULT_OK) {
((RequestableMListView)mContentViews.get(mCurrentPage)).requestReload();
}
break;
case POST_MAIN_ACTIVITY:
if (resultCode == RESULT_OK) {
((RequestableMListView)mContentViews.get(mCurrentPage)).requestReload();
}
break;
}
}
@Override
protected String titleBarText() {
return "PostSliderActivity";
}
@Override
protected boolean setTitleBarButton(Button button) {
// TODO Auto-generated method stub
button.setText("Write");
return true;
}
@Override
protected void onTitleBarItemClicked(View view) {
// TODO Auto-generated method stub
if (loginRequired()) {
startActivityForResult(new Intent(getApplicationContext(), WritePostActivity.class), WRITE_POST_ACTIVITY);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
4b5a6aebacd11a2abb4a4133c537c0069c142fde
|
f09fad494f794e1ef7f505bced46c8295da04b87
|
/src/main/java/com/sharksharding/sql/ast/statement/SQLUnique.java
|
6aa401b337f42c62f0b334fdfb34d95d0da01e4f
|
[
"Apache-2.0"
] |
permissive
|
robbershadow/shark
|
a839d7bf8ff7e63e3c682e41872c1f5a7dfd2262
|
36553cf54aa371b00bc7576ecb27e0d2186bc05e
|
refs/heads/master
| 2020-12-31T02:33:15.700573
| 2016-04-06T21:10:38
| 2016-04-06T21:10:38
| 55,750,616
| 2
| 0
| null | 2016-04-08T04:38:38
| 2016-04-08T04:38:36
| null |
UTF-8
|
Java
| false
| false
| 1,336
|
java
|
/*
* Copyright 1999-2101 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.sharksharding.sql.ast.statement;
import java.util.ArrayList;
import java.util.List;
import com.sharksharding.sql.ast.SQLExpr;
import com.sharksharding.sql.visitor.SQLASTVisitor;
public class SQLUnique extends SQLConstraintImpl implements SQLUniqueConstraint, SQLTableElement {
private final List<SQLExpr> columns = new ArrayList<SQLExpr>();
public SQLUnique(){
}
public List<SQLExpr> getColumns() {
return columns;
}
@Override
protected void accept0(SQLASTVisitor visitor) {
if (visitor.visit(this)) {
acceptChild(visitor, this.getName());
acceptChild(visitor, this.getColumns());
}
visitor.endVisit(this);
}
}
|
[
"gao_xianglong@sina.com"
] |
gao_xianglong@sina.com
|
6c996003c4cd01257270404e960b214d78256ab7
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Spring/Spring5459.java
|
6f87336c73576d88557fe219a390c3e9d5c69c70
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,136
|
java
|
@Test
public void compareTo() {
MimeType audioBasic = new MimeType("audio", "basic");
MimeType audio = new MimeType("audio");
MimeType audioWave = new MimeType("audio", "wave");
MimeType audioBasicLevel = new MimeType("audio", "basic", singletonMap("level", "1"));
// equal
assertEquals("Invalid comparison result", 0, audioBasic.compareTo(audioBasic));
assertEquals("Invalid comparison result", 0, audio.compareTo(audio));
assertEquals("Invalid comparison result", 0, audioBasicLevel.compareTo(audioBasicLevel));
assertTrue("Invalid comparison result", audioBasicLevel.compareTo(audio) > 0);
List<MimeType> expected = new ArrayList<>();
expected.add(audio);
expected.add(audioBasic);
expected.add(audioBasicLevel);
expected.add(audioWave);
List<MimeType> result = new ArrayList<>(expected);
Random rnd = new Random();
// shuffle & sort 10 times
for (int i = 0; i < 10; i++) {
Collections.shuffle(result, rnd);
Collections.sort(result);
for (int j = 0; j < result.size(); j++) {
assertSame("Invalid media type at " + j + ", run " + i, expected.get(j), result.get(j));
}
}
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
ae80469dc79d63b5804e1d322ebd73fe8f4d5a04
|
0c28a12d3efa7ef425a8dd8f829b6521e0c8f6f5
|
/src/results/bugged/Dataset5/17845.txt
|
d86cf82fd9c81e6d937779ebc01026e7621d5427
|
[
"Apache-2.0",
"BSD-2-Clause",
"Apache-1.1"
] |
permissive
|
bsse1017kavi/Dissection-of-CodeRep
|
8408b80be8104f3642a99ee50deca5b2d9914524
|
a4b09622e1082e2df9683f549f2e26351a440b1a
|
refs/heads/master
| 2022-01-15T11:29:16.391603
| 2019-07-06T09:25:11
| 2019-07-06T09:25:11
| 195,090,051
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,462
|
txt
|
/*
* 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.jmeter.save.converters;
import org.apache.jmeter.config.ConfigTestElement;
import org.apache.jmeter.save.SaveService;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jmeter.testelement.TestPlan;
import org.apache.jmeter.testelement.property.JMeterProperty;
import org.apache.jmeter.testelement.property.PropertyIterator;
import org.apache.jmeter.testelement.property.TestElementProperty;
import org.apache.jorphan.logging.LoggingManager;
import org.apache.log.Logger;
import com.thoughtworks.xstream.mapper.Mapper;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
/**
* @author mstover
*
* To change the template for this generated type comment go to Window -
* Preferences - Java - Code Generation - Code and Comments
*/
public class TestElementPropertyConverter extends AbstractCollectionConverter {
private static final Logger log = LoggingManager.getLoggerForClass();
private final boolean testFormat22=SaveService.isSaveTestPlanFormat22();
private static final String HEADER_CLASSNAME
= "org.apache.jmeter.protocol.http.control.Header"; // $NON-NLS-1$
/**
* Returns the converter version; used to check for possible
* incompatibilities
*/
public static String getVersion() {
return "$Revision$"; // $NON-NLS-1$
}
/*
* (non-Javadoc)
*
* @see com.thoughtworks.xstream.converters.Converter#canConvert(java.lang.Class)
*/
public boolean canConvert(Class arg0) {
return arg0.equals(TestElementProperty.class);
}
/*
* (non-Javadoc)
*
* @see com.thoughtworks.xstream.converters.Converter#marshal(java.lang.Object,
* com.thoughtworks.xstream.io.HierarchicalStreamWriter,
* com.thoughtworks.xstream.converters.MarshallingContext)
*/
public void marshal(Object arg0, HierarchicalStreamWriter writer, MarshallingContext context) {
TestElementProperty prop = (TestElementProperty) arg0;
writer.addAttribute(ConversionHelp.ATT_NAME, ConversionHelp.encode(prop.getName()));
Class clazz = prop.getObjectValue().getClass();
writer.addAttribute(ConversionHelp.ATT_ELEMENT_TYPE,
testFormat22 ? mapper().serializedClass(clazz) : clazz.getName());
if (testFormat22){
TestElement te = (TestElement)prop.getObjectValue();
ConversionHelp.saveSpecialProperties(te,writer);
}
PropertyIterator iter = prop.iterator();
while (iter.hasNext()) {
JMeterProperty jmp=iter.next();
// Skip special properties if required
if (!testFormat22 || !ConversionHelp.isSpecialProperty(jmp.getName()))
{
// Don't save empty comments
if (!(TestPlan.COMMENTS.equals(jmp.getName())
&& jmp.getStringValue().length()==0))
{
writeItem(jmp, context, writer);
}
}
}
//TODO clazz is probably always the same as testclass
}
/*
* TODO - convert to work more like upgrade.properties/NameUpdater.java
*
* Special processing is carried out for the Header Class The String
* property TestElement.name is converted to Header.name for example:
* <elementProp name="User-Agent"
* elementType="org.apache.jmeter.protocol.http.control.Header"> <stringProp
* name="Header.value">Mozilla%2F4.0+%28compatible%3B+MSIE+5.5%3B+Windows+98%29</stringProp>
* <stringProp name="TestElement.name">User-Agent</stringProp>
* </elementProp> becomes <elementProp name="User-Agent"
* elementType="org.apache.jmeter.protocol.http.control.Header"> <stringProp
* name="Header.value">Mozilla%2F4.0+%28compatible%3B+MSIE+5.5%3B+Windows+98%29</stringProp>
* <stringProp name="Header.name">User-Agent</stringProp> </elementProp>
*/
/*
* (non-Javadoc)
*
* @see com.thoughtworks.xstream.converters.Converter#unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader,
* com.thoughtworks.xstream.converters.UnmarshallingContext)
*/
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
try {
TestElementProperty prop = (TestElementProperty) createCollection(context.getRequiredType());
prop.setName(ConversionHelp.decode(reader.getAttribute(ConversionHelp.ATT_NAME)));
String element = reader.getAttribute(ConversionHelp.ATT_ELEMENT_TYPE);
boolean isHeader = HEADER_CLASSNAME.equals(element);
prop.setObjectValue(mapper().realClass(element).newInstance());// Always decode
TestElement te = (TestElement)prop.getObjectValue();
// No need to check version, just process the attributes if present
ConversionHelp.restoreSpecialProperties(te, reader);
while (reader.hasMoreChildren()) {
reader.moveDown();
JMeterProperty subProp = (JMeterProperty) readItem(reader, context, prop);
if (isHeader) {
String name = subProp.getName();
if (TestElement.NAME.equals(name)) {
subProp.setName("Header.name");// $NON-NLS-1$
// Must be same as Header.HNAME - but that is built
// later
}
}
prop.addProperty(subProp);
reader.moveUp();
}
return prop;
} catch (Exception e) {
log.error("Couldn't unmarshall TestElementProperty", e);
return new TestElementProperty("ERROR", new ConfigTestElement());// $NON-NLS-1$
}
}
/**
* @param arg0
*/
public TestElementPropertyConverter(Mapper arg0) {
super(arg0);
}
}
|
[
"bsse1017@iit.du.ac.bd"
] |
bsse1017@iit.du.ac.bd
|
39c59586402ef21a9225175e77e741e6d11daf42
|
d5b518145f8e1bd83dd1ee91462f1f9c58d33922
|
/app/src/main/java/com/lichkin/application/beans/out/impl/PunchTheClockOut.java
|
3a978f925caa938a094673a984776665c16a1edc
|
[
"MIT"
] |
permissive
|
LichKinContributor/lichkin-android
|
a48666aa83a51a35fe3c991b8f78c8d872c0cf93
|
6291c6126ea2583d9fa3d7aac741d8a475d8a87f
|
refs/heads/master
| 2020-03-10T19:30:26.223224
| 2019-08-13T06:50:44
| 2019-08-13T06:50:44
| 129,549,165
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 255
|
java
|
package com.lichkin.application.beans.out.impl;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
* 打卡
* @author SuZhou LichKin Information Technology Co., Ltd.
*/
@Getter
@Setter
@ToString
public class PunchTheClockOut {
}
|
[
"zhuangxuxin@hotmail.com"
] |
zhuangxuxin@hotmail.com
|
e6e94d44a286e08aeefd92d17f3b64e443878f04
|
9a52fe3bcdd090a396e59c68c63130f32c54a7a8
|
/sources/com/google/android/gms/internal/ads/zzdrn.java
|
5cdb2c59a58723e6e281c055d9cda954f1392512
|
[] |
no_license
|
mzkh/LudoKing
|
19d7c76a298ee5bd1454736063bc392e103a8203
|
ee0d0e75ed9fa8894ed9877576d8e5589813b1ba
|
refs/heads/master
| 2022-04-25T06:08:41.916017
| 2020-04-14T17:00:45
| 2020-04-14T17:00:45
| 255,670,636
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 280
|
java
|
package com.google.android.gms.internal.ads;
import java.util.List;
/* compiled from: com.google.android.gms:play-services-ads-base@@18.2.0 */
public interface zzdrn extends List {
List<?> zzban();
zzdrn zzbao();
void zzdb(zzdpm zzdpm);
Object zzgq(int i);
}
|
[
"mdkhnmm@amazon.com"
] |
mdkhnmm@amazon.com
|
93374e4ba9e0e2f7a35493f4806ed7417706ea4e
|
598c9459a42282de936de1d1a67622eca4883813
|
/Primer semestre/Software de Entetenimiento y Videojuegos/Android/Entrega1.Simple/app/src/main/java/com/simple/gestores/CargadorGraficos.java
|
d37645c8059b83570904d61d36d5b132003cba5a
|
[
"MIT"
] |
permissive
|
SantiMA10/3ero
|
85550dbc077309b73122a4db35e1f43124efb0a4
|
570aeb6c60615285329df2ffc7ebf50666a20faa
|
refs/heads/master
| 2021-05-01T12:41:06.218185
| 2018-01-28T11:56:56
| 2018-01-28T11:56:56
| 51,208,804
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,062
|
java
|
package com.simple.gestores;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import java.util.HashMap;
public class CargadorGraficos {
private static HashMap<Integer, Drawable> drawables = new HashMap<Integer, Drawable>();
private static HashMap<Integer, Bitmap> bitmaps = new HashMap<Integer, Bitmap>();
public static Drawable cargarDrawable(Context context, int id){
if (drawables.containsKey(id)){
return drawables.get(id);
}
Drawable nuevoDrawable = context.getResources().getDrawable(id);
drawables.put(id, nuevoDrawable);
return nuevoDrawable;
}
public static Bitmap cargarBitmap(Context context,int id)
{
if (bitmaps.containsKey(id)){
return bitmaps.get(id);
}
Bitmap nuevoBitmap = ((BitmapDrawable)context.getResources().getDrawable(id)).getBitmap();
bitmaps.put(id,nuevoBitmap);
return nuevoBitmap;
}
}
|
[
"santiagomartinagra@gmail.com"
] |
santiagomartinagra@gmail.com
|
73b7c5a48961da846833b1203be68ef9cf80d0bd
|
d7e2a9c21e4fa1a94fa1e208b69b6761468b82d9
|
/flash4j/src/com/emitrom/flash4j/flex/client/spark/effects/Animate.java
|
3e7cdef68315e02fd2d865ee6f81a78401f5c94b
|
[
"Apache-2.0"
] |
permissive
|
sanyaade-mobiledev/Flash4j
|
a7c803b7db1fff51055be4f76332a652868fec6e
|
c01ca4a84b0644143d63df2ce51581967caea16f
|
refs/heads/master
| 2020-05-17T10:12:49.469911
| 2013-05-04T18:22:44
| 2013-05-04T18:22:44
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,740
|
java
|
/************************************************************************
Animate.java is part of Flash4j 3.0.0 Copyright 2012 Emitrom LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
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.emitrom.flash4j.flex.client.spark.effects;
import com.emitrom.flash4j.core.client.ProxyObject;
import com.emitrom.flash4j.core.client.framework.Bridge;
import com.emitrom.flash4j.flex.client.mx.effects.Effect;
import com.emitrom.flash4j.flex.client.spark.effects.animation.RepeatBehavior;
import com.emitrom.flash4j.flex.client.spark.effects.easing.IEaser;
import com.google.gwt.core.client.JavaScriptObject;
/**
* The Class Animate.
*/
public class Animate extends Effect {
/**
* Instantiates a new animate.
*/
protected Animate(JavaScriptObject obj) {
jsObj = obj;
}
/**
* New instance.
*
* @return the animate
*/
public Animate() {
jsObj = Bridge.createObject("spark.effects.Animate");
}
/**
* New instance.
*
* @param target the target
* @return the animate
*/
public Animate(Object target) {
this();
setTarget(target);
}
/**
* New instance.
*
* @param target the target
* @return the animate
*/
public Animate(ProxyObject target) {
this();
setTarget(target.getJsObj());
}
/**
* Disable layout.
*
* @return true, if successful
*/
public native boolean disableLayout()/*-{
var peer = this.@com.emitrom.flash4j.core.client.ProxyObject::getJsObj()();
return peer.getdisableLayout();
}-*/;
/**
* Sets the disable layout.
*
* @param value the new disable layout
*/
public native void setDisableLayout(boolean value)/*-{
var peer = this.@com.emitrom.flash4j.core.client.ProxyObject::getJsObj()();
peer.setdisableLayout(value);
}-*/;
/**
* Sets the easer.
*
* @param value the new easer
*/
public native void setEaser(IEaser value)/*-{
var peer = this.@com.emitrom.flash4j.core.client.ProxyObject::getJsObj()();
peer
.seteaser(value.@com.emitrom.flash4j.flex.client.spark.effects.easing.IEaser::asIEaser()());
}-*/;
/**
* Gets the repeat behavior.
*
* @return the repeat behavior
*/
public RepeatBehavior getRepeatBehavior() {
return RepeatBehavior.fromValue(_getRepeatBehavior());
}
/**
* _get repeat behavior.
*
* @return the string
*/
private native String _getRepeatBehavior()/*-{
var peer = this.@com.emitrom.flash4j.core.client.ProxyObject::getJsObj()();
return peer.getrepeatBehavior();
}-*/;
/**
* Sets the repeat behavior.
*
* @param behavior the new repeat behavior
*/
public void setRepeatBehavior(RepeatBehavior behavior) {
_setRepeatBehavior(behavior.value);
}
/**
* _set repeat behavior.
*
* @param value the value
*/
private native void _setRepeatBehavior(String value)/*-{
var peer = this.@com.emitrom.flash4j.core.client.ProxyObject::getJsObj()();
peer.setrepeatBehavior(value);
}-*/;
}
|
[
"jazzmatadazz@gmail.com"
] |
jazzmatadazz@gmail.com
|
0e9f6e59e90f05f726ffcd467f09d6f433af4b2a
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a293/A293856Test.java
|
26f46fd3c2cb769a78d5e68f352d4afbd2f0e6b1
|
[] |
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
| 255
|
java
|
package irvine.oeis.a293;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A293856Test extends AbstractSequenceTest {
@Override
protected int maxTerms() {
return 2;
}
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
2c21b2ddc2b2ca18357405831cae5e2b6a5179ca
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Mockito-19/org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter/BBC-F0-opt-80/tests/17/org/mockito/internal/configuration/injection/filter/FinalMockCandidateFilter_ESTest.java
|
25e3f4fc475887b833b952bef86cb6000b643cef
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 3,257
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Oct 21 15:30:47 GMT 2021
*/
package org.mockito.internal.configuration.injection.filter;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.lang.reflect.Field;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.LinkedList;
import java.util.List;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter;
import org.mockito.internal.configuration.injection.filter.OngoingInjecter;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class FinalMockCandidateFilter_ESTest extends FinalMockCandidateFilter_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter();
LinkedList<Object> linkedList0 = new LinkedList<Object>();
List<Object> list0 = linkedList0.subList(0, 0);
Integer integer0 = new Integer((-1));
linkedList0.add((Object) integer0);
// Undeclared exception!
try {
finalMockCandidateFilter0.filterCandidate(list0, (Field) null, (Object) null);
fail("Expecting exception: ConcurrentModificationException");
} catch(ConcurrentModificationException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("java.util.SubList", e);
}
}
@Test(timeout = 4000)
public void test1() throws Throwable {
FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter();
Object object0 = new Object();
// Undeclared exception!
try {
finalMockCandidateFilter0.filterCandidate((Collection<Object>) null, (Field) null, object0);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter", e);
}
}
@Test(timeout = 4000)
public void test2() throws Throwable {
FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter();
LinkedList<Object> linkedList0 = new LinkedList<Object>();
OngoingInjecter ongoingInjecter0 = finalMockCandidateFilter0.filterCandidate(linkedList0, (Field) null, linkedList0);
assertNotNull(ongoingInjecter0);
}
@Test(timeout = 4000)
public void test3() throws Throwable {
FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter();
LinkedList<Object> linkedList0 = new LinkedList<Object>();
linkedList0.add((Object) null);
Object object0 = new Object();
OngoingInjecter ongoingInjecter0 = finalMockCandidateFilter0.filterCandidate(linkedList0, (Field) null, object0);
assertNotNull(ongoingInjecter0);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
5aab9bead9cccb527074061529bb9fde9eb60521
|
961e9b2a6b49a0cd9e9ebf6833cf0da1b2cadcf1
|
/src/main/java/com/school/management/service/util/RandomUtil.java
|
b6b936823beda5a351de4cb9eafe062d4891a848
|
[] |
no_license
|
ppavan895/jbemschoolmanagement
|
4a678d59b5c873be6faada932c83648c9e2b12ec
|
545cbe281b7c3a00bd9601a3cffe1bbd1515d4b0
|
refs/heads/master
| 2020-04-12T18:02:55.691950
| 2018-12-21T04:49:14
| 2018-12-21T04:49:14
| 162,667,094
| 0
| 0
| null | 2019-01-31T12:05:14
| 2018-12-21T04:49:06
|
Java
|
UTF-8
|
Java
| false
| false
| 895
|
java
|
package com.school.management.service.util;
import org.apache.commons.lang3.RandomStringUtils;
/**
* Utility class for generating random Strings.
*/
public final class RandomUtil {
private static final int DEF_COUNT = 20;
private RandomUtil() {
}
/**
* Generate a password.
*
* @return the generated password
*/
public static String generatePassword() {
return RandomStringUtils.randomAlphanumeric(DEF_COUNT);
}
/**
* Generate an activation key.
*
* @return the generated activation key
*/
public static String generateActivationKey() {
return RandomStringUtils.randomNumeric(DEF_COUNT);
}
/**
* Generate a reset key.
*
* @return the generated reset key
*/
public static String generateResetKey() {
return RandomStringUtils.randomNumeric(DEF_COUNT);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
09ddba31bbe52e13b7dad60c97d121f2a9a98a55
|
57d575058a2632e75c0e5f80d4e87023796892a6
|
/src/main/java/com/actualize/mortgage/domainmodels/LoanProductModel.java
|
0089d6cc3f375197ebe6ed4a17465d2906a82f0c
|
[] |
no_license
|
suniltota/TRIDent-LE
|
0b9ee64daaf5e80f8b14339395414ef8b0be003e
|
7b76d48fe3041cc2c168043f6a04f0b391d2be47
|
refs/heads/master
| 2021-01-22T19:44:40.774041
| 2017-08-18T10:36:22
| 2017-08-18T10:36:22
| 100,711,918
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,037
|
java
|
/**
*
*/
package com.actualize.mortgage.domainmodels;
import java.io.Serializable;
/**
* defines LoanProduct in JSON Response
* @author sboragala
*
*/
public class LoanProductModel implements Serializable {
private static final long serialVersionUID = 4563513628139754860L;
private String loanPriceQuoteInterestRatePercent;
private LockModel lock;
/**
* @return the loanPriceQuoteInterestRatePercent
*/
public String getLoanPriceQuoteInterestRatePercent() {
return loanPriceQuoteInterestRatePercent;
}
/**
* @param loanPriceQuoteInterestRatePercent the loanPriceQuoteInterestRatePercent to set
*/
public void setLoanPriceQuoteInterestRatePercent(String loanPriceQuoteInterestRatePercent) {
this.loanPriceQuoteInterestRatePercent = loanPriceQuoteInterestRatePercent;
}
/**
* @return the lock
*/
public LockModel getLock() {
return lock;
}
/**
* @param lock the lock to set
*/
public void setLock(LockModel lock) {
this.lock = lock;
}
}
|
[
"shravan.boragala@compugain.com"
] |
shravan.boragala@compugain.com
|
822fd6b311c2ed8df7dff3eba61461cf3a014cf8
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/1/1_768c569d60767ab2dcd3f3a0c76fa364d28c5591/RoleUtil/1_768c569d60767ab2dcd3f3a0c76fa364d28c5591_RoleUtil_t.java
|
4ede21196c77d777b29df4ecaf808b6fe6d1098a
|
[] |
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,724
|
java
|
package org.infoscoop.util;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import javax.security.auth.Subject;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.infoscoop.acl.ISPrincipal;
import org.infoscoop.acl.SecurityController;
/**
* The class which get information from a tablayout table depending on role information.
*
* @author nishiumi
*
*/
public class RoleUtil {
private static final long serialVersionUID = "org.infoscoop.util.RoleUtil".hashCode();
private static final Log log = LogFactory.getLog(RoleUtil.class);
/**
* confirmation the roll information.
*
* @param type
* @param regx
* @return
* @throws ClassNotFoundException
*/
public static boolean isPermitted(String type, String regx) throws ClassNotFoundException {
return getPermittedMatchList(type, regx) != null;
}
/**
* @param type
* @param regx
* @return The result string list matched to group in regx, when type is not matched to regx, return null
* @throws ClassNotFoundException
*/
public static List<String> getPermittedMatchList(String type, String regx) throws ClassNotFoundException {
Subject loginUser = SecurityController.getContextSubject();
List<String> retVal = null;
if(loginUser != null){
Collection<ISPrincipal> principals = loginUser.getPrincipals(ISPrincipal.class);
if(log.isInfoEnabled())
log.info("LoginUser Prinipales:" + principals);
try {
Pattern pattern = Pattern.compile(regx);
for(ISPrincipal p: principals){
Matcher matcher = pattern.matcher(p.getName());
if (type.equals(p.getType())
&& p.getName() != null){
retVal = matcher2List(matcher);
if(retVal != null)
break;
}
}
} catch (PatternSyntaxException e) {
log.warn("\"" + regx + "\" is invalid regular expression.");
}
}
if (log.isInfoEnabled())
log.info("PrincipalType=" + type + ",RegExp=" + regx + ", isPermitted="
+ retVal);
return retVal;
}
private static List<String> matcher2List(Matcher matcher){
int groupCount = matcher.groupCount();
if( groupCount == 0 && matcher.matches()){
return new ArrayList<String>();
}else if(matcher.find()){
List<String> results = new ArrayList<String>();
for(int i = 1; i <= groupCount; i++){
results.add(matcher.group(i));
}
return results;
}else{
return null;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3f015fcd15d090fd0b465ffe4f5086713dbf2084
|
0cd0a325f38c339e9300ab5529628318c6ea3537
|
/src/main/java/io/github/util/spring/GlobalExceptionHandler.java
|
a65a252c757ee03d28f3af4760843935481fdb4c
|
[
"MIT"
] |
permissive
|
MaAnShanGuider/bootplus
|
2667c030b96bda3ca757572687f8dfe15478fdb6
|
247d5f6c209be1a5cf10cd0fa18e1d8cc63cf55d
|
refs/heads/master
| 2022-12-10T01:33:28.426129
| 2020-08-24T09:33:26
| 2020-08-24T09:33:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,405
|
java
|
package io.github.util.spring;
import io.github.util.exception.BaseRuntimeException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.web.ErrorProperties;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.servlet.error.AbstractErrorController;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
/**
* 全局异常处理器
*
* @author Created by 思伟 on 2020/6/6
* @Email 2434387555@qq.com
* @see RestGlobalExceptionHandler
*/
@ControllerAdvice
@Slf4j
public class GlobalExceptionHandler {
/**
* web错误处理的配置属性
*/
private final ErrorProperties errorProperties;
/**
* 由于spring实例化顺序为先执行构造方法,再注入成员变量
* 所以可以在构造方法这样写
*/
public GlobalExceptionHandler(@Value("${spring.application.name}") String applicationName,
ServerProperties serverProperties) {
this.errorProperties = serverProperties.getError();
}
/**
* 自定义异常处理器
* 会与默认的冲突
*
* @param e BaseRuntimeException
* @return String
*/
// @RequestMapping(produces = MediaType.TEXT_HTML_VALUE)
@ExceptionHandler(BaseRuntimeException.class)
public String handleMyException(BaseRuntimeException e, HttpServletRequest request) {
log.error("系统异常出错={}", e.toString(), e);
// return errorProperties.getPath();
// 传入我们自己的错误状态码 4xx 5xx,否则就不会进入定制错误页面的解析流程
/**
* @see AbstractErrorController#getStatus(javax.servlet.http.HttpServletRequest)
*/
request.setAttribute(RequestDispatcher.ERROR_STATUS_CODE, 200);
// 并不直接返回视图名称或json数据,请求转发到`BasicErrorController`,让Springboot按流程处理,从而达到自适应浏览器请求和客户端请求
return "forward:" + errorProperties.getPath();
}
}
|
[
"2434387555@qq.com"
] |
2434387555@qq.com
|
bf48aa0d0c051c39930b2396d57413ab1626a188
|
95457173cd79274e162f41e23575f4b4ef8f921a
|
/src/org/eredlab/g4/ccl/net/ftp/DefaultFTPFileListParser.java
|
bba230865c2105164c372b542989f32659bb3f27
|
[] |
no_license
|
denyot/pos
|
32bffd774035aa86f4ada7dad9a32b7e9ecbadd6
|
ee862aa4c4cabc6da4a6b86a3c3e60d503775f5c
|
refs/heads/master
| 2020-09-26T13:40:25.238048
| 2019-11-25T22:25:07
| 2019-11-25T22:25:07
| 226,265,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 199
|
java
|
package org.eredlab.g4.ccl.net.ftp;
import org.eredlab.g4.ccl.net.ftp.parser.UnixFTPEntryParser;
/** @deprecated */
public final class DefaultFTPFileListParser extends UnixFTPEntryParser
{
}
|
[
"823300635@qq.com"
] |
823300635@qq.com
|
64488cc2fa5b0dadd0e67eb8b9969d2dbddf35c4
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_52880.java
|
9bb4d51bfadc6ddd87e2d1954143938c56103a33
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 623
|
java
|
private boolean innerContainsSafeFields(final AbstractVFNode expression){
for (int i=0; i < expression.jjtGetNumChildren(); i++) {
Node child=expression.jjtGetChild(i);
if (child instanceof ASTIdentifier) {
switch (child.getImage().toLowerCase(Locale.ROOT)) {
case "id":
case "size":
case "caseNumber":
return true;
default :
}
}
if (child instanceof ASTArguments) {
if (containsSafeFields((ASTArguments)child)) {
return true;
}
}
if (child instanceof ASTDotExpression) {
if (innerContainsSafeFields((ASTDotExpression)child)) {
return true;
}
}
}
return false;
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
482893b7ba686e833b776cb88f5293f46fe39d7a
|
142ef0039d0ea36be5cacedb874aebecb1c074ab
|
/src/test/java/com/ifelze/rentme/security/SecurityUtilsUnitTest.java
|
e599d4491f56520d26e1044c6148668255df8312
|
[] |
no_license
|
BulkSecurityGeneratorProject/rentme
|
6994b77bff43539ef44e0d548209d7e62662181a
|
f7e73ec43058f928ebcf1bf702d9ac4d48a59cfb
|
refs/heads/master
| 2022-12-21T20:45:26.751904
| 2017-12-13T21:01:47
| 2017-12-13T21:01:47
| 296,592,835
| 0
| 0
| null | 2020-09-18T10:46:16
| 2020-09-18T10:46:15
| null |
UTF-8
|
Java
| false
| false
| 3,155
|
java
|
package com.ifelze.rentme.security;
import org.junit.Test;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import java.util.ArrayList;
import java.util.Collection;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Test class for the SecurityUtils utility class.
*
* @see SecurityUtils
*/
public class SecurityUtilsUnitTest {
@Test
public void testgetCurrentUserLogin() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin"));
SecurityContextHolder.setContext(securityContext);
String login = SecurityUtils.getCurrentUserLogin();
assertThat(login).isEqualTo("admin");
}
@Test
public void testgetCurrentUserJWT() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "token"));
SecurityContextHolder.setContext(securityContext);
String jwt = SecurityUtils.getCurrentUserJWT();
assertThat(jwt).isEqualTo("token");
}
@Test
public void testIsAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("admin", "admin"));
SecurityContextHolder.setContext(securityContext);
boolean isAuthenticated = SecurityUtils.isAuthenticated();
assertThat(isAuthenticated).isTrue();
}
@Test
public void testAnonymousIsNotAuthenticated() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
Collection<GrantedAuthority> authorities = new ArrayList<>();
authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.ANONYMOUS));
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("anonymous", "anonymous", authorities));
SecurityContextHolder.setContext(securityContext);
boolean isAuthenticated = SecurityUtils.isAuthenticated();
assertThat(isAuthenticated).isFalse();
}
@Test
public void testIsCurrentUserInRole() {
SecurityContext securityContext = SecurityContextHolder.createEmptyContext();
Collection<GrantedAuthority> authorities = new ArrayList<>();
authorities.add(new SimpleGrantedAuthority(AuthoritiesConstants.USER));
securityContext.setAuthentication(new UsernamePasswordAuthenticationToken("user", "user", authorities));
SecurityContextHolder.setContext(securityContext);
assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.USER)).isTrue();
assertThat(SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN)).isFalse();
}
}
|
[
"naga@ifelze.com"
] |
naga@ifelze.com
|
0c7d06905fdfc591221ccecdb9a36734e683197b
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project20/src/test/java/org/gradle/test/performance20_3/Test20_236.java
|
77187d779025bafffaa11cca219026bd2784b964
|
[] |
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
| 292
|
java
|
package org.gradle.test.performance20_3;
import static org.junit.Assert.*;
public class Test20_236 {
private final Production20_236 production = new Production20_236("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
9b2a1532eed7aa4dd6882e6717efc50c5d9a91b7
|
4882edc67da3ba954a15376caa1dcdfbe5ef5bac
|
/zipkin-service/src/main/java/com/iiit/train/springcloud/ZipkinServiceApplication.java
|
4b6923f07c683d81f84e0e26dafd7e06ee74afec
|
[] |
no_license
|
rengang66/iiit.action.springcloud.msa.jpa.mysql
|
ad89c941e88e9780715c1f6e9c68aae492c38cc8
|
2b8048b068757dbe3423eef65d69309305498afc
|
refs/heads/master
| 2020-05-16T14:38:23.628505
| 2019-04-24T11:12:01
| 2019-04-24T11:12:01
| 183,109,453
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 481
|
java
|
package com.iiit.train.springcloud;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import zipkin.server.EnableZipkinServer;
@SpringBootApplication
@EnableZipkinServer
@EnableEurekaClient
public class ZipkinServiceApplication {
public static void main(String[] args) {
SpringApplication.run(ZipkinServiceApplication.class, args);
}
}
|
[
"rengang66@sina.com"
] |
rengang66@sina.com
|
047bbd80da0e0fa1cffa1d09bd86a0e1cebe2a09
|
4bae3208f7365cea15acf3fb359207226d1f64bb
|
/modeshape-jcr/src/test/java/org/modeshape/jcr/value/basic/BaseValueFactoryTest.java
|
ab746bae0017fc8e66a68d86df1bddf5b008fab7
|
[
"Apache-2.0"
] |
permissive
|
teiid/teiid-modeshape
|
ad4c7622d4c7f8297684600177334ef8af66c397
|
8dffe84d2cc7d8b7e48f84efc49a1b0a5e46faa6
|
refs/heads/master
| 2023-09-01T07:34:07.609074
| 2019-07-26T16:57:25
| 2019-07-26T16:57:25
| 114,037,491
| 0
| 6
|
Apache-2.0
| 2022-06-21T01:23:43
| 2017-12-12T20:46:38
|
Java
|
UTF-8
|
Java
| false
| false
| 4,070
|
java
|
/*
* ModeShape (http://www.modeshape.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.modeshape.jcr.value.basic;
import java.math.BigDecimal;
import org.junit.Before;
import org.modeshape.common.text.TextDecoder;
import org.modeshape.common.text.TextEncoder;
import org.modeshape.jcr.query.model.TypeSystem;
import org.modeshape.jcr.value.BinaryFactory;
import org.modeshape.jcr.value.DateTimeFactory;
import org.modeshape.jcr.value.NameFactory;
import org.modeshape.jcr.value.NamespaceRegistry;
import org.modeshape.jcr.value.Path;
import org.modeshape.jcr.value.PathFactory;
import org.modeshape.jcr.value.ReferenceFactory;
import org.modeshape.jcr.value.StringFactory;
import org.modeshape.jcr.value.UriFactory;
import org.modeshape.jcr.value.ValueFactories;
import org.modeshape.jcr.value.ValueFactory;
public abstract class BaseValueFactoryTest {
protected NamespaceRegistry registry;
protected NamespaceRegistry.Holder registryHolder;
protected StringValueFactory stringFactory;
protected NameFactory nameFactory;
protected ValueFactories valueFactories;
protected TextEncoder encoder;
protected TextDecoder decoder;
@SuppressWarnings( "synthetic-access" )
@Before
public void beforeEach() {
registry = new SimpleNamespaceRegistry();
registryHolder = new NamespaceRegistry.Holder() {
@Override
public NamespaceRegistry getNamespaceRegistry() {
return registry;
}
};
encoder = Path.DEFAULT_ENCODER;
decoder = Path.DEFAULT_DECODER;
stringFactory = new StringValueFactory(registryHolder, Path.URL_DECODER, Path.DEFAULT_ENCODER);
valueFactories = new TestValueFactories();
this.nameFactory = new NameValueFactory(registryHolder, Path.DEFAULT_DECODER, valueFactories);
}
private class TestValueFactories extends AbstractValueFactories {
@Override
public ReferenceFactory getWeakReferenceFactory() {
return null;
}
@Override
public UriFactory getUriFactory() {
return null;
}
@Override
public TypeSystem getTypeSystem() {
return null;
}
@Override
public StringFactory getStringFactory() {
return stringFactory;
}
@Override
public ReferenceFactory getReferenceFactory() {
return null;
}
@Override
public ReferenceFactory getSimpleReferenceFactory() {
return null;
}
@Override
public PathFactory getPathFactory() {
return null;
}
@Override
public ValueFactory<Object> getObjectFactory() {
return null;
}
@Override
public NameFactory getNameFactory() {
return nameFactory;
}
@Override
public ValueFactory<Long> getLongFactory() {
return null;
}
@Override
public ValueFactory<Double> getDoubleFactory() {
return null;
}
@Override
public ValueFactory<BigDecimal> getDecimalFactory() {
return null;
}
@Override
public DateTimeFactory getDateFactory() {
return null;
}
@Override
public ValueFactory<Boolean> getBooleanFactory() {
return null;
}
@Override
public BinaryFactory getBinaryFactory() {
return null;
}
}
}
|
[
"shawkins@redhat.com"
] |
shawkins@redhat.com
|
5572ff08aa5d86032ba05579c1169628113e5d59
|
a2519a680c456132d8e8391e3b8a906472266119
|
/IS24-CSV/src/main/java/org/openestate/io/is24_csv/types/EnergieausweisTyp.java
|
23de07c727d17b9865137d5ff0f9f1a7b6029120
|
[
"Apache-2.0"
] |
permissive
|
bizzify/OpenEstate-IO
|
b0538ee11e7d6d416130dbe7b33bb94101366e9a
|
d6ef06092e0cb48d96798e1b31d43781627a5ca8
|
refs/heads/master
| 2021-01-15T10:41:34.197144
| 2015-03-19T16:31:46
| 2015-03-19T16:31:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,366
|
java
|
/*
* Copyright 2015 OpenEstate.org.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openestate.io.is24_csv.types;
import org.apache.commons.lang3.StringUtils;
/**
* Energieausweistyp.
*
* @since 1.0
* @author Andreas Rudolph
*/
public enum EnergieausweisTyp
{
KEINE_ANGABE( 1 ),
ENDENERGIEBEDARF( 2 ),
ENERGIEVERBRAUCHSKENNWERT( 3 );
private final int value;
private EnergieausweisTyp( int value )
{
this.value = value;
}
public static EnergieausweisTyp parse( String value )
{
value = StringUtils.trimToNull( value );
if (value==null) return null;
for (EnergieausweisTyp s : EnergieausweisTyp.values())
{
if (String.valueOf( s.value ).equalsIgnoreCase( value )) return s;
}
return KEINE_ANGABE;
}
public String print()
{
return String.valueOf( this.value );
}
}
|
[
"andy@openindex.de"
] |
andy@openindex.de
|
b2e08aec120694834ef49c12aeafe93c0d2e5d05
|
b02328e2816a419cafcaf5c1f876577fb0e17a57
|
/legaldocml-core/src/main/java/io/legaldocml/akn/element/PointOfOrder.java
|
c0956887ff6ea2b15bfe1b440e20f015ffc41add
|
[] |
no_license
|
jacquesmilitello/legaldocml
|
88bcec4fa940e52fc68c6d91f5f677e97f4da264
|
85d42824b2d4cd7cf32f3028310247d64541b6ad
|
refs/heads/master
| 2023-06-23T10:42:01.072633
| 2022-02-09T21:08:05
| 2022-02-09T21:08:05
| 92,104,373
| 11
| 4
| null | 2023-06-14T22:43:42
| 2017-05-22T22:18:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,100
|
java
|
package io.legaldocml.akn.element;
import io.legaldocml.akn.group.SpeechSection;
import io.legaldocml.util.Buffers;
import io.legaldocml.io.XmlWriter;
import java.io.IOException;
import static io.legaldocml.akn.AknElements.POINT_OF_ORDER;
/**
* This element is a structural container for parts of a debates that are relevant to points of order.
*
* <pre>
* <xsd:element name="pointOfOrder" type="althierarchy"/>
* </pre>
*
* @author <a href="mailto:jacques.militello@gmail.com">Jacques Militello</a>
*/
public final class PointOfOrder extends AltHierarchy implements SpeechSection {
/**
* Memory address.
*/
private static final long ADDRESS_POINT_OF_ORDER = Buffers.address(POINT_OF_ORDER);
/**
* {@inheritDoc}
*/
@Override
public void write(XmlWriter writer) throws IOException {
writer.writeStart(ADDRESS_POINT_OF_ORDER, 12);
super.write(writer);
writer.writeEnd(ADDRESS_POINT_OF_ORDER, 12);
}
/**
* {@inheritDoc}
*/
@Override
public String name() {
return POINT_OF_ORDER;
}
}
|
[
"jacques.militello@gmail.com"
] |
jacques.militello@gmail.com
|
aacfd35b74225c736f479d74662067affb27c692
|
4e8d52f594b89fa356e8278265b5c17f22db1210
|
/WebServiceArtifacts/CI_CI_PERSONAL_DATA/com/oracle/xmlns/enterprise/tools/schemas/m795726/PROPNAMEROYALSUFFIXTypeShape.java
|
f4e81da34b36d6704f8e4d9c8d56e9a62891cf6a
|
[] |
no_license
|
ouniali/WSantipatterns
|
dc2e5b653d943199872ea0e34bcc3be6ed74c82e
|
d406c67efd0baa95990d5ee6a6a9d48ef93c7d32
|
refs/heads/master
| 2021-01-10T05:22:19.631231
| 2015-05-26T06:27:52
| 2015-05-26T06:27:52
| 36,153,404
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,381
|
java
|
package com.oracle.xmlns.enterprise.tools.schemas.m795726;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for PROP_NAME_ROYAL_SUFFIXTypeShape complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="PROP_NAME_ROYAL_SUFFIXTypeShape">
* <simpleContent>
* <extension base="<http://xmlns.oracle.com/Enterprise/Tools/schemas/M795726.V1>PROP_NAME_ROYAL_SUFFIXTypeDef">
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PROP_NAME_ROYAL_SUFFIXTypeShape", propOrder = {
"value"
})
public class PROPNAMEROYALSUFFIXTypeShape {
@XmlValue
protected String value;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
|
[
"ouni_ali@yahoo.fr"
] |
ouni_ali@yahoo.fr
|
a2bf79ef7ab080e45a91620280016df869207bb4
|
096b557af3b68947cb31685221f14d911e84f918
|
/src/net/mindview/object/Documentation1.java
|
9434f2bec0df24b521d6791019e1045587528bf1
|
[] |
no_license
|
kuchikigit/SrcCodes
|
34d84eaca5a970143489c969d7063c88453bb19f
|
feb3198a382d106e37d6d34da9452ddf3482c6d3
|
refs/heads/master
| 2021-01-20T19:05:23.083737
| 2016-08-10T12:13:35
| 2016-08-10T12:13:35
| 63,997,411
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 209
|
java
|
package net.mindview.object;
//: object/Documentation1.java
/** A class comment */
public class Documentation1 {
/** A field comment */
public int i;
/** A method comment */
public void f() {}
} ///:~
|
[
"rainy.kuchiki@yahoo.com"
] |
rainy.kuchiki@yahoo.com
|
ec7f3c146ec2bbdf2c42484fd85c490ee214e472
|
f8530ef7a9d410b59cdf61c74749f939743f015a
|
/main/src/mockit/internal/capturing/CaptureOfImplementations.java
|
1bf419e1334974a90b61cbec814d1d012c184d98
|
[
"BSD-3-Clause",
"MIT"
] |
permissive
|
vimil/jmockit1
|
2d39454ba6a4542657e78a7fb829fc77b36e8d98
|
d8de95a7c7591f2e0fc4c1737952aa11b9e74f5a
|
refs/heads/master
| 2021-04-14T10:48:59.510456
| 2020-03-22T17:39:30
| 2020-03-22T17:39:30
| 249,227,492
| 2
| 2
| null | 2020-03-22T16:44:26
| 2020-03-22T16:44:25
| null |
UTF-8
|
Java
| false
| false
| 2,706
|
java
|
/*
* Copyright (c) 2006 JMockit developers
* This file is subject to the terms of the MIT license (see LICENSE.txt).
*/
package mockit.internal.capturing;
import javax.annotation.*;
import mockit.asm.classes.*;
import mockit.internal.*;
import mockit.internal.startup.*;
import mockit.internal.state.*;
public abstract class CaptureOfImplementations<M>
{
protected CaptureOfImplementations() {}
protected final void makeSureAllSubtypesAreModified(
@Nonnull Class<?> baseType, boolean registerCapturedClasses, @Nullable M typeMetadata
) {
CapturedType captureMetadata = new CapturedType(baseType);
redefineClassesAlreadyLoaded(captureMetadata, baseType, typeMetadata);
createCaptureTransformer(captureMetadata, registerCapturedClasses, typeMetadata);
}
private void redefineClassesAlreadyLoaded(@Nonnull CapturedType captureMetadata, @Nonnull Class<?> baseType, @Nullable M typeMetadata) {
Class<?>[] classesLoaded = Startup.instrumentation().getAllLoadedClasses();
for (Class<?> aClass : classesLoaded) {
if (captureMetadata.isToBeCaptured(aClass)) {
redefineClass(aClass, baseType, typeMetadata);
}
}
}
protected final void redefineClass(@Nonnull Class<?> realClass, @Nonnull Class<?> baseType, @Nullable M typeMetadata) {
if (!TestRun.mockFixture().containsRedefinedClass(realClass)) {
ClassReader classReader;
try {
classReader = ClassFile.createReaderOrGetFromCache(realClass);
}
catch (ClassFile.NotFoundException ignore) {
return;
}
TestRun.ensureThatClassIsInitialized(realClass);
BaseClassModifier modifier = createModifier(realClass.getClassLoader(), classReader, baseType, typeMetadata);
classReader.accept(modifier);
if (modifier.wasModified()) {
byte[] modifiedClass = modifier.toByteArray();
redefineClass(realClass, modifiedClass);
}
}
}
@Nonnull
protected abstract BaseClassModifier createModifier(
@Nullable ClassLoader cl, @Nonnull ClassReader cr, @Nonnull Class<?> baseType, @Nullable M typeMetadata);
protected abstract void redefineClass(@Nonnull Class<?> realClass, @Nonnull byte[] modifiedClass);
private void createCaptureTransformer(@Nonnull CapturedType captureMetadata, boolean registerCapturedClasses, @Nullable M typeMetadata) {
CaptureTransformer<M> transformer = new CaptureTransformer<>(captureMetadata, this, registerCapturedClasses, typeMetadata);
Startup.instrumentation().addTransformer(transformer, true);
TestRun.mockFixture().addCaptureTransformer(transformer);
}
}
|
[
"rliesenfeld@gmail.com"
] |
rliesenfeld@gmail.com
|
2cf0b165c08b0c746c055b7afecfd7837f8c489c
|
413a584d7123872cc04b2d1bb1141310cefa7b48
|
/sections/sections-comp-shared/sakai21/src/java/org/sakaiproject/component/section/facade/impl/sakai21/ResourceLoaderSakaiImpl.java
|
1e2e104a871624ae1fae8ef5bc6a67cd20166a7d
|
[
"ECL-1.0",
"Apache-2.0"
] |
permissive
|
etudes-inc/etudes-lms
|
31bc2b187cafc629c8b2b61be92aa16bb78aca99
|
38a938e2c74d86fc3013642b05914068a3a67af3
|
refs/heads/master
| 2020-06-03T13:49:45.997041
| 2017-10-25T21:25:58
| 2017-10-25T21:25:58
| 94,132,665
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 552
|
java
|
package org.sakaiproject.component.section.facade.impl.sakai21;
import java.util.Locale;
import org.sakaiproject.api.section.facade.manager.ResourceLoader;
public class ResourceLoaderSakaiImpl implements ResourceLoader {
public Locale getLocale() {
org.sakaiproject.util.ResourceLoader rl = new org.sakaiproject.util.ResourceLoader("sections");
return rl.getLocale();
}
public String getString(String str) {
org.sakaiproject.util.ResourceLoader rl = new org.sakaiproject.util.ResourceLoader("sections");
return rl.getString(str);
}
}
|
[
"ggolden@etudes.org"
] |
ggolden@etudes.org
|
b323b01f0f842da1d557653e4e96eaa7db0206e6
|
8ec986726b3b60170aec4cb9772d3bdb163710af
|
/lib/lib-utils/src/test/java/org/sagebionetworks/util/csv/CSVReaderIteratorTest.java
|
9fa3bc3a86aa7fe22c6ecdcd24bca91a3d9d4fba
|
[
"Apache-2.0"
] |
permissive
|
marcomarasca/Synapse-Repository-Services
|
871446d7bc8e27ca9f4e3d16c4f2007e3f69f5d3
|
294e6f422ef9a1367deaf511bc97473623233da4
|
refs/heads/develop
| 2023-08-17T12:25:54.442901
| 2023-08-16T15:40:47
| 2023-08-16T15:40:47
| 190,295,841
| 0
| 0
|
Apache-2.0
| 2023-02-22T08:31:06
| 2019-06-04T23:55:19
|
Java
|
UTF-8
|
Java
| false
| false
| 759
|
java
|
package org.sagebionetworks.util.csv;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.StringReader;
import org.junit.jupiter.api.Test;
import au.com.bytecode.opencsv.CSVReader;
public class CSVReaderIteratorTest {
CSVReader reader;
@Test
public void testIterator() {
CSVReaderIterator iterator = new CSVReaderIterator(new CSVReader(new StringReader("foo,bar\n1,2")));
assertTrue(iterator.hasNext());
assertArrayEquals(new String[] { "foo", "bar" }, iterator.next());
assertTrue(iterator.hasNext());
assertArrayEquals(new String[] { "1", "2" }, iterator.next());
assertFalse(iterator.hasNext());
}
}
|
[
"john.hill@sagebase.org"
] |
john.hill@sagebase.org
|
1d689c05d0f63a91f584e73ccc8d88ba7b713e0d
|
8f946bea32e21255f3498dd7af784f4e863aff5b
|
/de.wicketpraxis--pom/webapp-blog/src/main/java/de/wicketpraxis/web/blog/pages/examples/models/pagination/data/ViewOnly.java
|
a297b0f0f4fc26456b8fe8540b2a382e05bda07e
|
[] |
no_license
|
michaelmosmann/wicket-praxis
|
eba7fafba87114c17339a520484912d3446278d6
|
e9393c358ac788b0011bee4b0e58a85aebb3b05c
|
refs/heads/master
| 2016-09-06T07:11:27.822050
| 2013-11-12T21:23:41
| 2013-11-12T21:23:41
| 757,761
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 384
|
java
|
package de.wicketpraxis.web.blog.pages.examples.models.pagination.data;
public class ViewOnly {
final long _index;
final String _short;
public ViewOnly(long index,FromDatabase source) {
_index = index;
_short = "" + source.getVorname().charAt(0) + ". " + source.getName();
}
public long getIndex() {
return _index;
}
public String getShort() {
return _short;
}
}
|
[
"michael@mosmann.de"
] |
michael@mosmann.de
|
ba09574d93be02ab023285c2a1ab91bd94aead0b
|
8d594446eeb46c6e9bc197c8029571c337be4ffd
|
/app/src/main/java/info/eivanov/weatherforecastr/view/CurrentLocationsAdapter.java
|
a11d8ae4cbd5e262511a95aff570953a238964d2
|
[
"Apache-2.0"
] |
permissive
|
e-ivanov/mvpdemo
|
2f0a1e98bcbba4a1f72fb54b8b592d338d8ca09a
|
da5b3b76a5055e2752cfa53bf6262541b205a2a7
|
refs/heads/master
| 2021-01-23T05:50:20.842234
| 2017-09-18T20:18:18
| 2017-09-18T20:18:18
| 102,476,656
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,854
|
java
|
package info.eivanov.weatherforecastr.view;
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.TextView;
import java.util.List;
import info.eivanov.weatherforecastr.R;
import info.eivanov.weatherforecastr.model.City;
import info.eivanov.weatherforecastr.repository.CurrentLocationsRepo;
/**
* Created by killer on 9/2/17.
*/
public class CurrentLocationsAdapter extends RecyclerView.Adapter<CurrentLocationsAdapter.CityViewHolder>{
private final List<City> cities;
private final LocationsListContract.Presenter presenter;
public CurrentLocationsAdapter(LocationsListContract.Presenter presenter) {
this.presenter = presenter;
this.cities = presenter.getLocations();
}
@Override
public CityViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.current_location_list_item
, parent, false);
return new CityViewHolder(v);
}
@Override
public void onBindViewHolder(CityViewHolder holder, int position) {
holder.bindModel(cities.get(position), position);
}
@Override
public int getItemCount() {
return cities.size();
}
public class CityViewHolder extends RecyclerView.ViewHolder{
private final TextView cityAndCountryName;
private final Button delBtn;
private int position;
public CityViewHolder(View itemView) {
super(itemView);
cityAndCountryName = (TextView) itemView.findViewById(R.id.cityAndCountryName);
delBtn = (Button)itemView.findViewById(R.id.deleteLocation);
delBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
presenter.deleteCityById(cities.get(getAdapterPosition()).getId());
cities.remove(getAdapterPosition());
notifyItemRemoved(getAdapterPosition());
}
});
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
presenter.showCurrentWeatherForLocation(cities.get(position).getId());
}
});
}
public void bindModel(City city, int position){
this.position = position;
StringBuilder builder = new StringBuilder();
builder.append(city.getName());
builder.append(", ");
builder.append(city.getSys().getCountry());
cityAndCountryName.setText(builder.toString());
}
}
}
|
[
"test@example.com"
] |
test@example.com
|
cb518f836c1b38938fc8150dee7a481c3f598919
|
c9facfe6628f56ffa2da29fc5e9b1524784e021f
|
/ServiceTest/app/src/androidTest/java/com/example/administrator/servicetest/ApplicationTest.java
|
683cf8ea69e77d7a6269c25a1e729ea42c4fdaa0
|
[] |
no_license
|
EggUncle/AndroidProject
|
dae5ffa28f77867e4d71abd29c4f176a15d8b744
|
2914d9414a1445c884a84dba41c288f5e53e1512
|
refs/heads/master
| 2020-04-17T00:13:07.618664
| 2016-12-25T09:17:02
| 2016-12-25T09:17:02
| 55,585,002
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 368
|
java
|
package com.example.administrator.servicetest;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
|
[
"cicadashadow@gmail.com"
] |
cicadashadow@gmail.com
|
7fe0eba72cae9313e9ee90dfa5cb49211e7b4089
|
aa4acdba351926db6b17ac000a3765ee7534df0c
|
/pss-simulator/presentation-layer-impl/src/main/scala/pss/result/presentable/printing/TextFileCountByUserPrinter.java
|
258f8b03cdc7aa5aa4d3c5559bfbb48e710dcdff
|
[] |
no_license
|
nafeezabrar/pss-without-as
|
7579e28de6024e31bf0bd843ccc6fbe12508e01f
|
97c821da725ddc6e63612dacb67a7736b2aa4c5c
|
refs/heads/main
| 2023-01-07T09:21:58.157210
| 2020-11-09T14:58:23
| 2020-11-09T14:58:23
| 311,345,524
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 885
|
java
|
package pss.result.presentable.printing;
import pss.data.user.User;
import pss.exception.PssException;
import pss.writing.textfile.TextFileReportCountUserMapWriter;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Map;
import static pss.config.printing.ShouldPrintConfig.AppendMode;
public class TextFileCountByUserPrinter implements CountByUserPrintable {
protected final String fileName;
protected final AppendMode appendMode;
public TextFileCountByUserPrinter(String fileName, AppendMode appendMode) {
this.fileName = fileName;
this.appendMode = appendMode;
}
@Override
public void printReportCount(Map<User, Integer> reportCountMap) throws PssException, IOException, URISyntaxException {
TextFileReportCountUserMapWriter.writeReportCountInTextFile(fileName, reportCountMap, appendMode);
}
}
|
[
"ishmumkhan@gmail.com"
] |
ishmumkhan@gmail.com
|
4cacf36ff9f193515c7aae2c33250628bca136e0
|
4875bb49ea87fa36faeae3ee80f97e6beaf7bae5
|
/meiling_android_mes.git/app/src/main/java/com/mingjiang/android/app/util/NumberUtils.java
|
f302bc4ec10b8252c781ab77a23397f037628749
|
[] |
no_license
|
zhangyoulai/ZongHeGuanLang
|
47f3b3fbaec80008d51b3a33d9848873e0637dc9
|
3520e8ff854523fd46e8f2a2eeda8992a52ef540
|
refs/heads/master
| 2021-01-19T11:45:57.338250
| 2017-04-10T06:23:01
| 2017-04-10T06:23:01
| 82,263,332
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 676
|
java
|
package com.mingjiang.android.app.util;
/**
* 备注:
* 作者:wangzs on 2016/2/23 14:52
* 邮箱:wangzhaosen@shmingjiang.org.cn
*/
public class NumberUtils {
//判断是否为数字
public static boolean isNumeric(String str){
for (int i = 0; i < str.length(); i++){
System.out.println(str.charAt(i));
if (!Character.isDigit(str.charAt(i))){
return false;
}
}
return true;
}
//校验是否为空
public static boolean isEmpty(String str){
if(str == null || "".equals(str)){
return true;
}else{
return false;
}
}
}
|
[
"2865046990@qq.com"
] |
2865046990@qq.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.