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
aba8f87f252c492a391bbf2f415c734e8be4c4cd
06da3da551d125b6c28f6eaf3be3f1fc4f106420
/Aria/src/main/java/com/arialyy/aria/core/upload/uploader/HttpThreadTask.java
58a91259a10b42ff4d4b6d479d458df7a214309d
[ "Apache-2.0" ]
permissive
pangyu646182805/Aria
c24fe9221d534c9c78ef1782e9d2c15cca5f065a
2de77b11d672afd8fb78a1445b3aecaa03b9e1e6
refs/heads/master
2021-06-28T15:35:23.973216
2017-09-13T03:32:41
2017-09-13T03:32:41
103,469,544
2
0
null
2017-09-14T01:22:16
2017-09-14T01:22:16
null
UTF-8
Java
false
false
6,705
java
/* * Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria) * * 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.arialyy.aria.core.upload.uploader; import android.util.Log; import com.arialyy.aria.core.common.AbsThreadTask; import com.arialyy.aria.core.common.StateConstance; import com.arialyy.aria.core.common.SubThreadConfig; import com.arialyy.aria.core.inf.IUploadListener; import com.arialyy.aria.core.upload.UploadEntity; import com.arialyy.aria.core.upload.UploadTaskEntity; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; import java.util.Set; import java.util.UUID; /** * Created by Aria.Lao on 2017/7/28. * 不支持断点的HTTP上传任务 */ class HttpThreadTask extends AbsThreadTask<UploadEntity, UploadTaskEntity> { private final String TAG = "HttpThreadTask"; private final String BOUNDARY = UUID.randomUUID().toString(); // 边界标识 随机生成 private final String PREFIX = "--", LINE_END = "\r\n"; private HttpURLConnection mHttpConn; private OutputStream mOutputStream; HttpThreadTask(StateConstance constance, IUploadListener listener, SubThreadConfig<UploadTaskEntity> uploadInfo) { super(constance, listener, uploadInfo); } @Override public void run() { File uploadFile = new File(mEntity.getFilePath()); if (!uploadFile.exists()) { Log.e(TAG, "【" + mEntity.getFilePath() + "】,文件不存在。"); fail(); return; } mListener.onPre(); URL url; try { url = new URL(mEntity.getUrl()); mHttpConn = (HttpURLConnection) url.openConnection(); mHttpConn.setUseCaches(false); mHttpConn.setDoOutput(true); mHttpConn.setDoInput(true); mHttpConn.setRequestProperty("Content-Type", mTaskEntity.contentType + "; boundary=" + BOUNDARY); mHttpConn.setRequestProperty("User-Agent", mTaskEntity.userAgent); //mHttpConn.setRequestProperty("Range", "bytes=" + 0 + "-" + "100"); //内部缓冲区---分段上传防止oom mHttpConn.setChunkedStreamingMode(1024); //添加Http请求头部 Set<String> keys = mTaskEntity.headers.keySet(); for (String key : keys) { mHttpConn.setRequestProperty(key, mTaskEntity.headers.get(key)); } mOutputStream = mHttpConn.getOutputStream(); PrintWriter writer = new PrintWriter(new OutputStreamWriter(mOutputStream, mTaskEntity.charSet), true); //添加文件上传表单字段 keys = mTaskEntity.formFields.keySet(); for (String key : keys) { addFormField(writer, key, mTaskEntity.formFields.get(key)); } uploadFile(writer, mTaskEntity.attachment, uploadFile); Log.d(TAG, finish(writer) + ""); } catch (IOException e) { e.printStackTrace(); fail(); } } private void fail() { try { mListener.onFail(true); STATE.isRunning = false; if (mOutputStream != null) { mOutputStream.close(); } } catch (IOException e) { e.printStackTrace(); } } /** * 添加文件上传表单字段 */ private void addFormField(PrintWriter writer, String name, String value) { writer.append(PREFIX).append(BOUNDARY).append(LINE_END); writer.append("Content-Disposition: form-data; name=\"") .append(name) .append("\"") .append(LINE_END); writer.append("Content-Type: text/plain; charset=") .append(mTaskEntity.charSet) .append(LINE_END); writer.append(LINE_END); writer.append(value).append(LINE_END); writer.flush(); } /** * 上传文件 * * @param attachment 文件上传attachment * @throws IOException */ private void uploadFile(PrintWriter writer, String attachment, File uploadFile) throws IOException { writer.append(PREFIX).append(BOUNDARY).append(LINE_END); writer.append("Content-Disposition: form-data; name=\"") .append(attachment) .append("\"; filename=\"") .append(mTaskEntity.getEntity().getFileName()) .append("\"") .append(LINE_END); writer.append("Content-Type: ") .append(URLConnection.guessContentTypeFromName(mTaskEntity.getEntity().getFileName())) .append(LINE_END); writer.append("Content-Transfer-Encoding: binary").append(LINE_END); writer.append(LINE_END); writer.flush(); FileInputStream inputStream = new FileInputStream(uploadFile); byte[] buffer = new byte[4096]; int bytesRead; while ((bytesRead = inputStream.read(buffer)) != -1) { STATE.CURRENT_LOCATION += bytesRead; mOutputStream.write(buffer, 0, bytesRead); if (STATE.isCancel) { break; } } mOutputStream.flush(); //outputStream.close(); //不能调用,否则服务器端异常 inputStream.close(); writer.append(LINE_END); writer.flush(); if (STATE.isCancel) { STATE.isRunning = false; return; } mListener.onComplete(); STATE.isRunning = false; } /** * 任务结束操作 * * @throws IOException */ private String finish(PrintWriter writer) throws IOException { StringBuilder response = new StringBuilder(); writer.append(LINE_END).flush(); writer.append(PREFIX).append(BOUNDARY).append(PREFIX).append(LINE_END); writer.close(); int status = mHttpConn.getResponseCode(); if (status == HttpURLConnection.HTTP_OK) { BufferedReader reader = new BufferedReader(new InputStreamReader(mHttpConn.getInputStream())); String line; while ((line = reader.readLine()) != null) { response.append(line); } reader.close(); mHttpConn.disconnect(); } else { Log.w(TAG, "state_code = " + status); fail(); } writer.flush(); writer.close(); mOutputStream.close(); return response.toString(); } @Override protected String getTaskType() { return "HTTP_UPLOAD"; } }
[ "511455842@qq.com" ]
511455842@qq.com
9f2d1d6ae9ebaa47e5dd68c5019a0e91af91fe2f
627b5fa45456a81a5fc65f4b04c280bba0e17b01
/code-maven-plugin/trunk/esb/esb-runtime/esb-runtime-server/esb-runtime-server-common/src/test/java/com/deppon/esb/springplaceholder/Bean.java
bf8f5032b7da2e3ff6450d0ab93667c4ffeda706
[]
no_license
zgdkik/aili
046e051b65936c4271dd01b866a3c263cfb884aa
e47e3c62afcc7bec9409aff952b11600572a8329
refs/heads/master
2020-03-25T01:29:14.798728
2018-04-07T06:58:45
2018-04-07T06:58:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
761
java
package com.deppon.esb.springplaceholder; import java.util.UUID; /** * The Class Bean. */ public class Bean { /** The name. */ public String name; /** The passwd. */ public String passwd; /** * Gets the name. * * @return the name */ public String getName() { return name; } /** * Sets the name. * * @param name * the new name */ public void setName(String name) { this.name = name; } /** * Gets the passwd. * * @return the passwd */ public String getPasswd() { return passwd; } /** * Sets the passwd. * * @param passwd * the new passwd */ public void setPasswd(String passwd) { this.passwd = passwd; } }
[ "1024784402@qq.com" ]
1024784402@qq.com
f57e5e48c13b0327dc8801fd15139944625bcd06
af606a04ed291e8c9b1e500739106a926e205ee2
/aliyun-java-sdk-sddp/src/main/java/com/aliyuncs/sddp/model/v20190103/DescribeDataAssetsRequest.java
ddce12e706bc5362a73da9e2bf5d051f98e16c20
[ "Apache-2.0" ]
permissive
xtlGitHub/aliyun-openapi-java-sdk
a733f0a16c8cc493cc28062751290f563ab73ace
f60c71de2c9277932b6549c79631b0f03b11cc36
refs/heads/master
2023-09-03T13:56:50.071024
2021-11-10T11:53:25
2021-11-10T11:53:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,062
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.sddp.model.v20190103; import com.aliyuncs.RpcAcsRequest; import com.aliyuncs.http.MethodType; import com.aliyuncs.sddp.Endpoint; /** * @author auto create * @version */ public class DescribeDataAssetsRequest extends RpcAcsRequest<DescribeDataAssetsResponse> { private String riskLevels; private Integer rangeId; private Integer pageSize; private String lang; private Integer currentPage; private String name; private Long ruleId; public DescribeDataAssetsRequest() { super("Sddp", "2019-01-03", "DescribeDataAssets"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getRiskLevels() { return this.riskLevels; } public void setRiskLevels(String riskLevels) { this.riskLevels = riskLevels; if(riskLevels != null){ putQueryParameter("RiskLevels", riskLevels); } } public Integer getRangeId() { return this.rangeId; } public void setRangeId(Integer rangeId) { this.rangeId = rangeId; if(rangeId != null){ putQueryParameter("RangeId", rangeId.toString()); } } public Integer getPageSize() { return this.pageSize; } public void setPageSize(Integer pageSize) { this.pageSize = pageSize; if(pageSize != null){ putQueryParameter("PageSize", pageSize.toString()); } } public String getLang() { return this.lang; } public void setLang(String lang) { this.lang = lang; if(lang != null){ putQueryParameter("Lang", lang); } } public Integer getCurrentPage() { return this.currentPage; } public void setCurrentPage(Integer currentPage) { this.currentPage = currentPage; if(currentPage != null){ putQueryParameter("CurrentPage", currentPage.toString()); } } public String getName() { return this.name; } public void setName(String name) { this.name = name; if(name != null){ putQueryParameter("Name", name); } } public Long getRuleId() { return this.ruleId; } public void setRuleId(Long ruleId) { this.ruleId = ruleId; if(ruleId != null){ putQueryParameter("RuleId", ruleId.toString()); } } @Override public Class<DescribeDataAssetsResponse> getResponseClass() { return DescribeDataAssetsResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
f1ce324571e5d20c9977de88e98a3dcf23934208
a6f5531ee151d2c5e514f6f96223ff8dcbcf3932
/app/src/main/java/com/sjl/xmcsee/lib/sdk/bean/AlarmInfoBean.java
5f195328e292f865f048ca9a7cc345600c057a2f
[]
no_license
q1113225201/XMCSee
9e5cbc9966f0872277a632ac3954728c121a53d3
cc16884da0a84f89f7209f7f749579ec1184e5bf
refs/heads/master
2021-07-10T19:30:55.304308
2017-10-11T07:29:38
2017-10-11T07:29:39
106,520,158
1
0
null
null
null
null
UTF-8
Java
false
false
363
java
package com.sjl.xmcsee.lib.sdk.bean; /** * * @ClassName: AlarmInfoBean * @Description: TODO(报警配置) * @author xxy * @date 2016年3月19日 下午4:38:42 * */ public class AlarmInfoBean { public AlarmInfoBean() { } public int Level; public boolean Enable; public EventHandler EventHandler = new EventHandler(); public String[] Region; }
[ "1113225201@qq.com" ]
1113225201@qq.com
4284fe1fe22493af1da2728c9375de5aad273395
7a00bba209de9fcc26ef692006d722bee0530a1a
/backend/n2o/n2o-context/src/main/java/net/n2oapp/framework/context/smart/impl/api/MemoryContextProvider.java
a08b2b703add1e4050af7f63bc7fa27efde370fd
[ "Apache-2.0" ]
permissive
borispinus/n2o-framework
bb7c78bc195c4b01370fc2666d6a3b71ded950d7
215782a1e5251549b79c5dd377940ecabba0f1d7
refs/heads/master
2020-04-13T20:10:06.213241
2018-12-28T10:12:18
2018-12-28T10:12:18
163,422,862
1
0
null
2018-12-28T15:11:59
2018-12-28T15:11:58
null
UTF-8
Java
false
false
1,743
java
package net.n2oapp.framework.context.smart.impl.api; import net.n2oapp.framework.api.context.Context; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import static java.util.stream.Collectors.toCollection; /** * @author operehod * @since 02.12.2015 */ public class MemoryContextProvider implements PersistentContextProvider { private Set<String> params = new HashSet<>(); private Set<String> dependentParams = new HashSet<>(); private ConcurrentHashMap<Object, Object> map = new ConcurrentHashMap<>(); public MemoryContextProvider(Set<String> params, Set<String> dependentParams) { this.params = params; this.dependentParams = dependentParams; } @Override public void set(Context ctx, Map<String, Object> values) { for (String param : params) { Object key = key(ctx, dependentParams, param); map.put(key, values.get(param)); } } @Override public Map<String, Object> get(Context ctx) { Map<String, Object> res = new HashMap<>(); for (String param : params) { Object key = key(ctx, dependentParams, param); res.put(param, map.get(key)); } return res; } @SuppressWarnings("unchecked") private static Object key(Context ctx, Set<String> dependentParams, String param) { List res = dependentParams .stream() .map(ctx::get) .collect(toCollection(ArrayList::new)); res.add(param); return res; } @Override public Set<String> getParams() { return params; } @Override public Set<String> getDependsOnParams() { return dependentParams; } }
[ "iryabov@i-novus.ru" ]
iryabov@i-novus.ru
e94a859376f549da9a13be0ebaf53c4c48d92a3e
4a47c37bcea65b6b852cc7471751b5239edf7c94
/src/academy/everyonecodes/java/week9/set2/exercise2/RockScissorsPaperGame.java
9575a07052adaae172fe4d2ccac5e57e1383f321
[]
no_license
uanave/java-module
acbe808944eae54cfa0070bf8b80edf453a3edcf
f98e49bd05473d394329602db82a6945ad1238b5
refs/heads/master
2022-04-07T15:42:36.210153
2020-02-27T14:43:29
2020-02-27T14:43:29
226,831,034
0
0
null
null
null
null
UTF-8
Java
false
false
1,358
java
package academy.everyonecodes.java.week9.set2.exercise2; import academy.everyonecodes.java.week9.set2.exercise2.Moves.Move; import academy.everyonecodes.java.week9.set2.exercise2.Players.Computer; import academy.everyonecodes.java.week9.set2.exercise2.Players.Player; import academy.everyonecodes.java.week9.set2.exercise2.Players.User; public class RockScissorsPaperGame { private DecisionMaker decisionMaker = new DecisionMaker(); private User user = new User(); private Computer computer = new Computer(); public void play() { System.out.println("Let’s play rock, paper, scissors!\n"); boolean wantToPlay = true; while (wantToPlay) { playRound(user, computer); wantToPlay = askToPlayAgain(user, computer); } System.out.println("See you next time!"); } private void playRound(Player user, Player computer) { Move move1 = user.getMove(); Move move2 = computer.getMove(); System.out.println("User chose: " + move1.getName()); System.out.println("Computer chose: " + move2.getName()); String result = decisionMaker.decideWinner(move1, move2); System.out.println(result); } private boolean askToPlayAgain(Player user, Player computer) { return user.wantsToPlay() && computer.wantsToPlay(); } }
[ "uanavasile@gmail.com" ]
uanavasile@gmail.com
e22cb728ec1a20fe49d0c4e8addbe559bc0c0ccc
ca7da6499e839c5d12eb475abe019370d5dd557d
/spring-context/src/test/java/org/springframework/jmx/JmxTestBean.java
a7b7547c8820b8a393f30fba006cd382c39ed4e0
[ "Apache-2.0" ]
permissive
yangfancoming/spring-5.1.x
19d423f96627636a01222ba747f951a0de83c7cd
db4c2cbcaf8ba58f43463eff865d46bdbd742064
refs/heads/master
2021-12-28T16:21:26.101946
2021-12-22T08:55:13
2021-12-22T08:55:13
194,103,586
0
1
null
null
null
null
UTF-8
Java
false
false
3,571
java
package org.springframework.jmx; import java.io.IOException; /** * @@org.springframework.jmx.export.metadata.ManagedResource * (description="My Managed Bean", objectName="spring:bean=test", * log=true, logFile="jmx.log", currencyTimeLimit=15, persistPolicy="OnUpdate", * persistPeriod=200, persistLocation="./foo", persistName="bar.jmx") * @@org.springframework.jmx.export.metadata.ManagedNotification * (name="My Notification", description="A Notification", notificationType="type.foo,type.bar") * @author Rob Harrop */ public class JmxTestBean implements IJmxTestBean { private String name; private String nickName; private int age; private boolean isSuperman; /** * @@org.springframework.jmx.export.metadata.ManagedAttribute * (description="The Age Attribute", currencyTimeLimit=15) */ @Override public int getAge() { return age; } @Override public void setAge(int age) { this.age = age; } /** * @@org.springframework.jmx.export.metadata.ManagedOperation(currencyTimeLimit=30) */ @Override public long myOperation() { return 1L; } /** * @@org.springframework.jmx.export.metadata.ManagedAttribute * (description="The Name Attribute", currencyTimeLimit=20, * defaultValue="bar", persistPolicy="OnUpdate") */ @Override public void setName(String name) throws Exception { if ("Juergen".equals(name)) { throw new IllegalArgumentException("Juergen"); } if ("Juergen Class".equals(name)) { throw new ClassNotFoundException("Juergen"); } if ("Juergen IO".equals(name)) { throw new IOException("Juergen"); } this.name = name; } /** * @@org.springframework.jmx.export.metadata.ManagedAttribute * (defaultValue="foo", persistPeriod=300) */ @Override public String getName() { return name; } /** * @@org.springframework.jmx.export.metadata.ManagedAttribute(description="The Nick * Name * Attribute") */ public void setNickName(String nickName) { this.nickName = nickName; } public String getNickName() { return this.nickName; } public void setSuperman(boolean superman) { this.isSuperman = superman; } /** * @@org.springframework.jmx.export.metadata.ManagedAttribute(description="The Is * Superman * Attribute") */ public boolean isSuperman() { return isSuperman; } /** * @@org.springframework.jmx.export.metadata.ManagedOperation(description="Add Two * Numbers * Together") * @@org.springframework.jmx.export.metadata.ManagedOperationParameter(index=0, name="x", description="Left operand") * @@org.springframework.jmx.export.metadata.ManagedOperationParameter(index=1, name="y", description="Right operand") */ @Override public int add(int x, int y) { return x + y; } /** * Test method that is not exposed by the MetadataAssembler. */ @Override public void dontExposeMe() { throw new RuntimeException(); } protected void someProtectedMethod() { } @SuppressWarnings("unused") private void somePrivateMethod() { } protected void getSomething() { } @SuppressWarnings("unused") private void getSomethingElse() { } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
c8e055528803216915d87b6dabfb8207f254114c
f0094829f498afba8f79d3b08ebe290f06d23350
/src/main/java/com/microwise/orion/action/stock/ClaimTaskAction.java
a56f7d997b931a37f739965e5190d01a4e2e98d9
[]
no_license
algsun/galaxy
0c3c0bb6302c37aacb5a184343bc8c016a52631d
c5f40f2ed4835c803e7c2ed8ba16f84ad54f623e
refs/heads/master
2020-03-15T20:05:07.418862
2018-05-06T09:45:29
2018-05-06T09:45:29
132,314,724
0
0
null
null
null
null
UTF-8
Java
false
false
1,278
java
package com.microwise.orion.action.stock; import com.microwise.blackhole.sys.Sessions; import com.microwise.common.action.ActionMessage; import com.microwise.common.sys.annotation.Beans; import com.microwise.orion.sys.Orion; import com.microwise.orion.sys.OrionLoggerAction; import com.opensymphony.xwork2.Action; import org.activiti.engine.TaskService; import org.springframework.beans.factory.annotation.Autowired; /** * @author gaohui * @date 13-5-30 17:19 * @check xiedeng 2013-6-6 15:24 svn:3909 */ @Beans.Action @Orion public class ClaimTaskAction extends OrionLoggerAction { @Autowired private TaskService taskService; //input private String taskId; public String execute() { try{ taskService.claim(taskId, String.valueOf(Sessions.createByAction().currentUser().getId())); ActionMessage.createByAction().success("签收成功"); }catch (Exception e){ logFailed("签收任务", "签收任务失败"); e.printStackTrace(); ActionMessage.createByAction().fail("签收失败"); } return Action.SUCCESS; } public String getTaskId() { return taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } }
[ "algtrue@163.com" ]
algtrue@163.com
5c85091d7feee92d23168f0460ffa3491f1df95b
f912f0fe9b865a18b5bc31fe62c7eb8d97d108db
/workspace-others/at.jku.weiner.kefax.kbuild/src-gen/at/jku/weiner/kefax/kbuild/kbuild/ObjectSingleFile.java
99f4987b2973d15564c08cbc2dea07ec8b95d8e0
[]
no_license
timeraider4u/kefax
44db2c63ea85e10a5157436bb2dabd742b590032
7e46c1730f561d1b76017f0ddb853c94dbb93cd6
refs/heads/master
2020-04-16T01:58:01.195430
2016-10-30T22:08:29
2016-10-30T22:08:29
41,462,260
1
0
null
null
null
null
UTF-8
Java
false
false
1,355
java
/** */ package at.jku.weiner.kefax.kbuild.kbuild; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Object Single File</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link at.jku.weiner.kefax.kbuild.kbuild.ObjectSingleFile#getName <em>Name</em>}</li> * </ul> * </p> * * @see at.jku.weiner.kefax.kbuild.kbuild.KbuildPackage#getObjectSingleFile() * @model * @generated */ public interface ObjectSingleFile extends Value { /** * Returns the value of the '<em><b>Name</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Name</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Name</em>' attribute. * @see #setName(String) * @see at.jku.weiner.kefax.kbuild.kbuild.KbuildPackage#getObjectSingleFile_Name() * @model * @generated */ String getName(); /** * Sets the value of the '{@link at.jku.weiner.kefax.kbuild.kbuild.ObjectSingleFile#getName <em>Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Name</em>' attribute. * @see #getName() * @generated */ void setName(String value); } // ObjectSingleFile
[ "timeraider@gmx.at" ]
timeraider@gmx.at
8e5739cf6caa6a936c6be30e84e15bd991dca8ae
ec1a0120359defd737229e5bf616b0d367e2f661
/app/src/main/java/io/github/mayunfei/simple/TestBean.java
7e383f7188d52c6b9eba97e349df8fe9d1f31855
[ "Apache-2.0" ]
permissive
MaYunFei/YDownloadManager
c83320e8e5a2c058f3c228b023194f8ddd5e9d18
69560067fa6b93dbfef1bda67eb14abd31d87189
refs/heads/master
2021-01-01T18:39:02.826350
2017-08-25T10:40:16
2017-08-25T10:40:16
98,390,680
0
0
null
null
null
null
UTF-8
Java
false
false
1,153
java
package io.github.mayunfei.simple; import io.github.mayunfei.downloadlib.task.BaseDownloadEntity; /** * Created by mayunfei on 17-8-17. */ public class TestBean { private BaseDownloadEntity baseDownloadEntity; private String title; private String key; public BaseDownloadEntity getBaseDownloadEntity() { return baseDownloadEntity; } public void setBaseDownloadEntity(BaseDownloadEntity baseDownloadEntity) { this.baseDownloadEntity = baseDownloadEntity; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TestBean testBean = (TestBean) o; return key != null ? key.equals(testBean.key) : testBean.key == null; } @Override public int hashCode() { return key != null ? key.hashCode() : 0; } }
[ "mayunfei6@gmail.com" ]
mayunfei6@gmail.com
d7ff023d5d23865ed9f7139f0000ef20de7b42a0
77f41106d18d9d2fd2ca85c18531f7e30e6968a8
/chorus/webapp/src/main/java/com/infoclinika/mssharing/web/downloader/ChorusSingleFileDownloadHelper.java
2c9138ce2b0461f9b96a96781e306f23524336cf
[]
no_license
StratusBioSciences/chorus
a8abaa7ab1e9e8f6d867d327c7ec26e804e6fe0b
c9d8099419733314c0166980ee6270563a212383
refs/heads/master
2021-01-20T12:41:17.996158
2017-05-05T13:33:37
2017-05-05T13:33:37
90,378,816
0
4
null
2019-05-08T17:09:36
2017-05-05T13:32:47
Java
UTF-8
Java
false
false
3,857
java
package com.infoclinika.mssharing.web.downloader; import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.common.base.Throwables; import com.infoclinika.mssharing.model.helper.SecurityHelper; import com.infoclinika.mssharing.model.helper.items.ChorusFileData; import com.infoclinika.mssharing.model.write.FileAccessLogService; import com.infoclinika.mssharing.platform.web.downloader.SingleFileDownloadHelperTemplate; import com.infoclinika.mssharing.services.billing.rest.api.BillingService; import org.springframework.beans.factory.annotation.Value; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; import javax.annotation.Resource; import javax.inject.Inject; import java.net.URL; import java.util.Collections; import java.util.Date; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import static com.google.common.base.Optional.fromNullable; import static java.lang.String.format; /** * @author timofey.kasyanov, Herman Zamula * date: 06.05.2014 */ @Component public class ChorusSingleFileDownloadHelper extends SingleFileDownloadHelperTemplate<ChorusDownloadData> { private final ExecutorService executorService = Executors.newSingleThreadExecutor(); @Value("${amazon.archive.bucket}") private String archiveBucket; @Resource(name = "billingService") private BillingService billingService; @Inject private SecurityHelper securityHelper; @Inject private FileAccessLogService fileAccessLogService; public URL getDownloadUrl(final long actor, ChorusDownloadData downloadData) { logger.debug(format("Request single file download. Actor {%d}, file {%d}, requested lab {%d}", actor, downloadData.file, downloadData.lab)); final ChorusFileData fileData = (ChorusFileData) experimentDownloadHelper.readFilesDownloadData(actor, Collections.singleton(downloadData.file)).iterator().next(); final URL url = generateDownloadURL(fileData); executorService.submit(new Runnable() { @Override public void run() { try { logDownloadUsage(actor, fileData, downloadData.lab); } catch (Exception e) { logger.error("Download usage is not logged: " + e.getMessage()); throw Throwables.propagate(e); } } }); fileAccessLogService.logFileDownload(actor, fileData); return url; } @Async private void logDownloadUsage(long actor, ChorusFileData file, Long billingLab) { final Long labToBill = !isFileInUserLab(actor, file) ? billingLab : file.billLab.or(file.lab); switch (file.accessLevel) { case SHARED: case PRIVATE: billingService.logDownloadUsage(actor, file.id, labToBill); break; case PUBLIC: billingService.logPublicDownload(actor, file.id); break; } } private boolean isFileInUserLab(long actor, ChorusFileData file) { return securityHelper.getUserDetails(actor).labs.contains(file.billLab.or(file.lab)); } private URL generateDownloadURL(ChorusFileData filePath) { final String bucket = filePath.archiveId == null ? storageBucket : archiveBucket; final Optional<String> key = fromNullable(filePath.archiveId).or(fromNullable(filePath.contentId)); Preconditions.checkState(key.isPresent(), "Download path is not specified for file {" + filePath.id + "}"); final long now = System.currentTimeMillis(); final Date expirationDate = new Date(now + EXPIRATION_PERIOD); return getAmazonS3().generatePresignedUrl(bucket, key.get(), expirationDate); } }
[ "vladimir.moiseiev@teamdev.com" ]
vladimir.moiseiev@teamdev.com
f68a3bb8371fec489239913610d0ee6066e4b471
3c4763922cda3f3a990b74cdba6f8a30b07467de
/src/main/java/students/alex_kalashnikov/lesson_11/level_6/all_tasks/Book.java
00dcb15f4ca8ad6778cd17b42406677c66ecc1e3
[]
no_license
VitalyPorsev/JavaGuru1
07db5a0cc122b097a20e56c9da431cd49d3c01ea
f3c25b6357309d4e9e8ac0047e51bb8031d14da8
refs/heads/main
2023-05-10T15:35:55.419713
2021-05-15T18:48:12
2021-05-15T18:48:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,307
java
package students.alex_kalashnikov.lesson_11.level_6.all_tasks; import java.util.Objects; class Book { private Long id; private String title; private String author; private String yearOfIssue; Book(String author, String title/*String yearOfIssue*/) { this.author = author; this.title = title; // this.yearOfIssue = yearOfIssue; } public Book() { } public void setId(Long id) { this.id = id; } public Long getId() { return this.id; } public String getTitle() { return this.title; } public String getAuthor() { return this.author; } public String getYearOfIssue() { return yearOfIssue; } @Override public String toString() { return "Book{" + "id=" + id + ", author='" + author + '\'' + ", title='" + title + '\'' + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Book book = (Book) o; return title.equals(book.title) && author.equals(book.author); } @Override public int hashCode() { return Objects.hash(title, author); } }
[ "kalashnikov_alex@yahoo.com" ]
kalashnikov_alex@yahoo.com
7037371bd6c331034e7f07be7ea9660f770eef7f
05061b6fe9ab002145615a5b1b2015a0b6fff0a1
/src/test/java/io/github/mk/application/web/rest/errors/ExceptionTranslatorTestController.java
f033fea4e751fe2ed9f03e66700eb4627e7d4e3e
[]
no_license
BulkSecurityGeneratorProject/angularDemo
6c823d695a0efef9f1fcaa77b3cad4afea02466e
eca0679e757b81f1fb6e0b5f33636c10e2170688
refs/heads/master
2022-12-14T06:54:59.081522
2020-05-05T13:31:22
2020-05-05T13:31:22
296,675,246
0
0
null
2020-09-18T16:33:29
2020-09-18T16:33:26
null
UTF-8
Java
false
false
2,990
java
package io.github.mk.application.web.rest.errors; import org.springframework.dao.ConcurrencyFailureException; import org.springframework.http.HttpStatus; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.authentication.BadCredentialsException; import org.springframework.web.bind.MissingServletRequestParameterException; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.support.MissingServletRequestPartException; import javax.validation.Valid; import javax.validation.constraints.NotNull; import java.util.HashMap; import java.util.Map; @RestController public class ExceptionTranslatorTestController { @GetMapping("/test/concurrency-failure") public void concurrencyFailure() { throw new ConcurrencyFailureException("test concurrency failure"); } @PostMapping("/test/method-argument") public void methodArgument(@Valid @RequestBody TestDTO testDTO) { } @GetMapping("/test/parameterized-error") public void parameterizedError() { throw new CustomParameterizedException("test parameterized error", "param0_value", "param1_value"); } @GetMapping("/test/parameterized-error2") public void parameterizedError2() { Map<String, Object> params = new HashMap<>(); params.put("foo", "foo_value"); params.put("bar", "bar_value"); throw new CustomParameterizedException("test parameterized error", params); } @GetMapping("/test/missing-servlet-request-part") public void missingServletRequestPartException() throws Exception { throw new MissingServletRequestPartException("missing Servlet request part"); } @GetMapping("/test/missing-servlet-request-parameter") public void missingServletRequestParameterException() throws Exception { throw new MissingServletRequestParameterException("missing Servlet request parameter", "parameter type"); } @GetMapping("/test/access-denied") public void accessdenied() { throw new AccessDeniedException("test access denied!"); } @GetMapping("/test/unauthorized") public void unauthorized() { throw new BadCredentialsException("test authentication failed!"); } @GetMapping("/test/response-status") public void exceptionWithReponseStatus() { throw new TestResponseStatusException(); } @GetMapping("/test/internal-server-error") public void internalServerError() { throw new RuntimeException(); } public static class TestDTO { @NotNull private String test; public String getTest() { return test; } public void setTest(String test) { this.test = test; } } @ResponseStatus(value = HttpStatus.BAD_REQUEST, reason = "test response status") @SuppressWarnings("serial") public static class TestResponseStatusException extends RuntimeException { } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
2dc97fcda1c05e841b47f5923e29a13c6e4f5a9e
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/1/org/apache/commons/math3/random/RandomDataGenerator_reSeedSecure_707.java
ef2449c01109f86c3f193e01db270926ddab14a0
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
3,004
java
org apach common math3 random implement link random data randomdata link random gener randomgener instanc gener secur data link java secur secur random securerandom instanc provid data code secur xxx nextsecurexxx code method code random gener randomgener code provid constructor link well19937c gener plug implement implement code random gener randomgener code directli extend link abstract random gener abstractrandomgener support reseed underli pseudo random number gener prng code secur provid securityprovid code code algorithm code code secur random securerandom code instanc reset detail prn prng link java util random link java secur secur random securerandom strong usag note strong instanc variabl maintain code random gener randomgener code code secur random securerandom code instanc data gener gener random sequenc valu string strong strong code random data impl randomdataimpl code instanc repeatedli secur method slower cryptograph secur random sequenc requir secur random sequenc sequenc pseudo random valu addit dispers subsequ valu subsequ length addit properti knowledg valu gener point sequenc make easier predict subsequ valu code random data impl randomdataimpl code creat underli random number gener strong strong initi explicitli seed secur gener seed current time millisecond system ident hash code hold secur gener provid code random gener randomgener code constructor gener reseed constructor reseed code seed rese code code seed secur reseedsecur code method deleg method underli code random gener randomgener code code secur random securerandom code instanc code seed rese code fulli reset initi state secur random number gener reseed specif result subsequ random sequenc seed secur reseedsecur strong strong reiniti secur random number gener secur sequenc start call rese secur reseedsecur ident implement underli code random gener randomgener code code secur random securerandom code instanc synchron guarante thread safe instanc concurr util multipl thread respons client code synchron access seed data gener method version random data gener randomdatagener random data randomdata serializ rese secur random number gener suppli seed creat initi param seed seed seed secur reseedsecur seed sec ran getsecran set seed setse seed
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
6b9a11f5c398d773ccb758249116dfeb7df21b76
8c81eeaa4bde7c4f9e402c1647940de5deb146fc
/src/StringRearrangeScannerTest.java
6a2799e008ec8563b307aa98a34e48fc2535fab2
[]
no_license
Luciwar/Example
f4b51b53eef6189ba18ea7714f5ee38be4287864
15b5d4d48e930d75597555b1c9c128b8501812f4
refs/heads/master
2020-06-04T23:41:07.098593
2018-10-11T15:31:24
2018-10-11T15:31:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,673
java
package exercise33; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertThat; import org.junit.Before; import org.junit.Test; public class StringRearrangeScannerTest { private StringRearrangeScanner underTest; @Before public void setup() { underTest = new StringRearrangeScanner(); } @Test public void shouldReturnCatAndBatAreOffByOneChar() { String a = "cat"; String b = "bat"; assertThat(underTest.differByOne(a, b), is(true)); } @Test public void shouldReturnCatAndDogAreNotOffByOneChar() { String a = "cat"; String b = "dog"; assertThat(underTest.differByOne(a, b), is(false)); } @Test public void shouldReturnFalseTestCase1() { String[] inputArray = { "aba", "bbb", "bab" }; boolean response = underTest.stringsRearrangement(inputArray); assertEquals(false, response); } @Test public void shouldReturnTrueTestCase2() { String[] inputArray = { "ab", "bb", "aa" }; assertThat(underTest.stringsRearrangement(inputArray), is(true)); } @Test public void matchingSingleCharsShouldReturnFalseTestCase3() { String[] inputArray = { "q", "q", "q" }; assertThat(underTest.stringsRearrangement(inputArray), is(false)); } @Test public void shouldReturnTrueTestCase4() { String[] inputArray = { "zzzzab", "zzzzbb", "zzzzaa" }; assertThat(underTest.stringsRearrangement(inputArray), is(true)); } @Test public void shouldReturnFalseTestCase5() { String[] inputArray = { "ab", "ad", "ef", "eg" }; assertThat(underTest.stringsRearrangement(inputArray), is(false)); } @Test public void shouldReturnTrueTestCase6() { String[] inputArray = { "abc", "bef", "bcc", "bec", "bbc", "bdc" }; assertThat(underTest.stringsRearrangement(inputArray), is(true)); } @Test public void shouldReturnFalseWithTwoIdenticalStringsTestCase7() { String[] inputArray = { "abc", "abx", "axx", "abc" }; assertThat(underTest.stringsRearrangement(inputArray), is(false)); } @Test public void shouldReturnTrueTestCase8() { String[] inputArray = { "abc", "abx", "axx", "abx", "abc" }; assertThat(underTest.stringsRearrangement(inputArray), is (true)); } // equal number of strings and two pairs of duplicates @Test public void shouldReturnFalseExtendedTestCase() { String[] inputArray = { "abc", "xbc", "xxc", "xbc", "aby", "ayy", "aby", "azc" }; assertThat(underTest.stringsRearrangement(inputArray), is(false)); } @Test public void shouldReturnTrueExtendedTestCase() { String[] inputArray = { "abc", "bef", "bcc", "bew", "zew", "zyw", "bec", "bbc", "bdc" }; assertThat(underTest.stringsRearrangement(inputArray), is(true)); } }
[ "linhhoang13k@gmail.com" ]
linhhoang13k@gmail.com
5a9edb733b3181500693184cf22cf27e8af70af0
7b4f8397c2ae7cc527de946cfd5ca22ebec48186
/org/omg/PortableServer/LifespanPolicyOperations.java
7faa25a0211a725fa6fd415aedd07e00f1ca0db5
[]
no_license
hjsw1/jdk8-source
cd025ebd0f1231c021de894c5df88a05e1f9c060
75c2330e65a472e1a672d4ec8e86a5b07c711f42
refs/heads/main
2023-06-19T23:29:42.308929
2021-07-21T16:46:38
2021-07-21T16:46:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
693
java
package org.omg.PortableServer; /** * org/omg/PortableServer/LifespanPolicyOperations.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from /HUDSON3/workspace/8-2-build-linux-amd64/jdk8u112/7884/corba/src/share/classes/org/omg/PortableServer/poa.idl * Thursday, September 22, 2016 9:11:52 PM PDT */ /** * The LifespanPolicy specifies the lifespan of the * objects implemented in the created POA. The default * is TRANSIENT. */ public interface LifespanPolicyOperations extends org.omg.CORBA.PolicyOperations { /** * specifies the policy value */ org.omg.PortableServer.LifespanPolicyValue value (); } // interface LifespanPolicyOperations
[ "2506597416@qq.com" ]
2506597416@qq.com
837db62f94421072b58d8c5487e1ebe3b27a7b0c
ff8f8c008eb57947e2d4278da21f2c192447a045
/javastudy/src/net/slipp/exception/Position.java
29924741c9217495645b7e191af5da5d458afded
[]
no_license
akaz00/plinjava-201402
3673f582ce4e676d7af9c703ab6d491ab9654dbf
047ba1b9a198289169f62bc65807c3ccab6df02b
refs/heads/master
2021-01-11T10:54:44.841738
2014-08-25T00:54:06
2014-08-25T00:54:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,141
java
package net.slipp.exception; public class Position { private int x; private int y; public Position(String position) throws InvalidPositionException { if (position.length() != 2) { throw new InvalidPositionException(position + "은 위치 값 형식에 맞지 않습니다."); } x = (int) (position.charAt(0) - 'a'); y = Integer.parseInt(position.substring(1)) - 1; } public Position(int x, int y) { this.x = x; this.y = y; } public int getX() { return x; } public int getY() { return y; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + x; result = prime * result + y; return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Position other = (Position) obj; if (x != other.x) return false; if (y != other.y) return false; return true; } @Override public String toString() { return "Position [x=" + x + ", y=" + y + "]"; } }
[ "javajigi@gmail.com" ]
javajigi@gmail.com
1faf38b47c78de19de1f8e9abc6e332b7a411bf7
8e1c3506e5ef30a3d1816c7fbfda199bc4475cb0
/org.hl7.fhir.dstu2016may/src/main/java/org/hl7/fhir/dstu2016may/model/codesystems/ConditionState.java
8446201d826a0716a89027e1d8fec484c3fd3c54
[ "Apache-2.0" ]
permissive
jasmdk/org.hl7.fhir.core
4fc585c9f86c995e717336b4190939a9e58e3adb
fea455fbe4539145de5bf734e1737777eb9715e3
refs/heads/master
2020-09-20T08:05:57.475986
2019-11-26T07:57:28
2019-11-26T07:57:28
224,413,181
0
0
Apache-2.0
2019-11-27T11:17:00
2019-11-27T11:16:59
null
UTF-8
Java
false
false
4,139
java
package org.hl7.fhir.dstu2016may.model.codesystems; /*- * #%L * org.hl7.fhir.dstu2016may * %% * Copyright (C) 2014 - 2019 Health Level 7 * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 import org.hl7.fhir.exceptions.FHIRException; public enum ConditionState { /** * The condition is active. */ ACTIVE, /** * The condition inactive but not resolved. */ INACTIVE, /** * The condition is resolved. */ RESOLVED, /** * added to help the parsers */ NULL; public static ConditionState fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; if ("active".equals(codeString)) return ACTIVE; if ("inactive".equals(codeString)) return INACTIVE; if ("resolved".equals(codeString)) return RESOLVED; throw new FHIRException("Unknown ConditionState code '"+codeString+"'"); } public String toCode() { switch (this) { case ACTIVE: return "active"; case INACTIVE: return "inactive"; case RESOLVED: return "resolved"; default: return "?"; } } public String getSystem() { return "http://hl7.org/fhir/condition-state"; } public String getDefinition() { switch (this) { case ACTIVE: return "The condition is active."; case INACTIVE: return "The condition inactive but not resolved."; case RESOLVED: return "The condition is resolved."; default: return "?"; } } public String getDisplay() { switch (this) { case ACTIVE: return "Active"; case INACTIVE: return "Inactive"; case RESOLVED: return "Resolved"; default: return "?"; } } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
ffd6452a9f69c448bbab1d5bc1dbcdf92e2d3b4e
a9ac435254d5b0e6260a2c77c426a123d3b6ff4a
/chapter-8-greenfield-validation-package/Generated Code/ChargingStationManagementCommandSide/5ddd/2generation_gap/de/puls/ChargingStationManagementCommandSide/src/main/java/de/puls/ChargingStationManagementCommandSide/service/ChargingStationManagementCommandSide/interfaces/gen/CommandSideGen.java
8a654eef9655491fc2bb1ba078c6c4f01ba4660c
[]
no_license
frademacher/dissertation-supplemental-material
bf25315ccc66235675ece63a59464f677c79d689
892fb02d6d8898c9bb2c0dcc742d46de0ae66f84
refs/heads/main
2022-07-31T08:33:20.947398
2022-07-31T08:17:10
2022-07-31T08:17:10
519,719,556
0
0
null
null
null
null
UTF-8
Java
false
false
547
java
package de.puls.ChargingStationManagementCommandSide.service.ChargingStationManagementCommandSide.interfaces.gen; import de.puls.ChargingStationManagementCommandSide.domain.ChargingStationManagement.CreateParkingAreaCommand; import de.puls.ChargingStationManagementCommandSide.domain.ChargingStationManagement.UpdateParkingAreaCommand; public interface CommandSideGen { void createParkingArea(CreateParkingAreaCommand command); void updateParkingArea(Long id, UpdateParkingAreaCommand command); void deleteParkingArea(Long id); }
[ "florian.rademacher@fh-dortmund.de" ]
florian.rademacher@fh-dortmund.de
b8235d5ce9d080e8ec4494d59df30ba77df62584
ccb6591d8f6a66922865ead1db99b22440b8a930
/applications/plugins/org.csstudio.graphene.opiwidgets/src/org/csstudio/graphene/opiwidgets/ModelPropertyConstants.java
c37f3683a150a4a11083d5dcf1947d6630f096db
[]
no_license
mfurseman/cs-studio
b2550b5dacdb1c82d3f5356a584dc70afa4cb9cc
47c82335721bd530a60a95a021bcfd33fb1bdf6c
refs/heads/master
2021-01-16T20:04:38.412749
2014-08-13T13:27:52
2014-08-13T13:27:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
822
java
package org.csstudio.graphene.opiwidgets; public class ModelPropertyConstants { public static final String PROP_DATA_FORMULA = "data_formula"; //$NON-NLS-1$ public static final String PROP_RESIZABLE_AXIS = "show_axis"; //$NON-NLS-1$ public static final String PROP_X_FORMULA = "x_formula"; //$NON-NLS-1$ public static final String PROP_Y_FORMULA = "y_formula"; //$NON-NLS-1$ public static final String PROP_HIGHLIGHT_SELECTION_VALUE = "highlight_selection_value"; //$NON-NLS-1$ public static final String PROP_SELECTION_VALUE_PV = "selection_value_pv"; //$NON-NLS-1$ public static final String PROP_COLOR_MAP = "color_map"; //$NON-NLS-1$ public static final String PROP_DRAW_LEGEND = "draw_legend"; //$NON-NLS-1$ public static final String PROP_MOUSE_SELECTION_METHOD = "mouse_selection_method"; //$NON-NLS-1$ }
[ "gabriele.carcassi@gmail.com" ]
gabriele.carcassi@gmail.com
ef3f26ec32eadaa2cd27acd65fdc5e08e8cabb9a
6d60a8adbfdc498a28f3e3fef70366581aa0c5fd
/codebase/default/40623.java
aa81ec7e25fb8a993a3d3fe99392af408a145627
[]
no_license
rayhan-ferdous/code2vec
14268adaf9022d140a47a88129634398cd23cf8f
c8ca68a7a1053d0d09087b14d4c79a189ac0cf00
refs/heads/master
2022-03-09T08:40:18.035781
2022-02-27T23:57:44
2022-02-27T23:57:44
140,347,552
0
1
null
null
null
null
UTF-8
Java
false
false
7,310
java
import java.util.*; import javax.swing.table.TableModel; import javax.swing.event.TableModelEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.InputEvent; import javax.swing.JTable; import javax.swing.table.JTableHeader; import javax.swing.table.TableColumnModel; import java.io.*; public class TableSorter extends AbstractFilter { int indexes[]; Vector sortingColumns = new Vector(); boolean ascending = true; int compares; public TableSorter() { indexes = new int[0]; } public TableSorter(TableModel model) { setModel(model); } public void setModel(TableModel model) { super.setModel(model); reallocateIndexes(); } public int compareRowsByColumn(int row1, int row2, int column) { Class type = model.getColumnClass(column); TableModel data = model; Object o1 = data.getValueAt(row1, column); Object o2 = data.getValueAt(row2, column); if (o1 == null && o2 == null) { return 0; } else if (o1 == null) { return -1; } else if (o2 == null) { return 1; } if (type == Integer.class) { int n1 = ((Integer) data.getValueAt(row1, column)).intValue(); int n2 = ((Integer) data.getValueAt(row2, column)).intValue(); if (n1 < n2) { return -1; } else if (n1 > n2) { return 1; } else { return 0; } } else if (type.getSuperclass() == java.lang.Number.class) { Number n1 = (Number) data.getValueAt(row1, column); double d1 = n1.doubleValue(); Number n2 = (Number) data.getValueAt(row2, column); double d2 = n2.doubleValue(); if (d1 < d2) return -1; else if (d1 > d2) return 1; else return 0; } else if (type == java.util.Date.class) { Date d1 = (Date) data.getValueAt(row1, column); long n1 = d1.getTime(); Date d2 = (Date) data.getValueAt(row2, column); long n2 = d2.getTime(); if (n1 < n2) return -1; else if (n1 > n2) return 1; else return 0; } else if (type == String.class) { String s1 = (String) data.getValueAt(row1, column); String s2 = (String) data.getValueAt(row2, column); int result = s1.compareTo(s2); if (result < 0) return -1; else if (result > 0) return 1; else return 0; } else if (type == Boolean.class) { Boolean bool1 = (Boolean) data.getValueAt(row1, column); boolean b1 = bool1.booleanValue(); Boolean bool2 = (Boolean) data.getValueAt(row2, column); boolean b2 = bool2.booleanValue(); if (b1 == b2) return 0; else if (b1) return 1; else return -1; } else { Object v1 = data.getValueAt(row1, column); String s1 = v1.toString(); Object v2 = data.getValueAt(row2, column); String s2 = v2.toString(); int result = s1.compareTo(s2); if (JNConfig.debugging) { System.out.println("Being asked to compare unknown type: " + type); } if (result < 0) return -1; else if (result > 0) return 1; else return 0; } } public int compare(int row1, int row2) { compares++; for (int level = 0; level < sortingColumns.size(); level++) { Integer column = (Integer) sortingColumns.elementAt(level); int result = compareRowsByColumn(row1, row2, column.intValue()); if (result != 0) return ascending ? result : -result; } return 0; } public void reallocateIndexes() { int rowCount = model.getRowCount(); indexes = new int[rowCount]; for (int row = 0; row < rowCount; row++) indexes[row] = row; } public void tableChanged(TableModelEvent e) { reallocateIndexes(); super.tableChanged(e); } public void checkModel() { if (indexes.length != model.getRowCount()) { if (JNConfig.debugging) { System.err.println("Sorter not informed of a change in model."); } } } public void sort(Object sender) { checkModel(); compares = 0; shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length); } public void n2sort() { for (int i = 0; i < getRowCount(); i++) { for (int j = i + 1; j < getRowCount(); j++) { if (compare(indexes[i], indexes[j]) == -1) { swap(i, j); } } } } public void shuttlesort(int from[], int to[], int low, int high) { if (high - low < 2) { return; } int middle = (low + high) / 2; shuttlesort(to, from, low, middle); shuttlesort(to, from, middle, high); int p = low; int q = middle; if (high - low >= 4 && compare(from[middle - 1], from[middle]) <= 0) { for (int i = low; i < high; i++) { to[i] = from[i]; } return; } for (int i = low; i < high; i++) { if (q >= high || (p < middle && compare(from[p], from[q]) <= 0)) { to[i] = from[p++]; } else { to[i] = from[q++]; } } } public void swap(int i, int j) { int tmp = indexes[i]; indexes[i] = indexes[j]; indexes[j] = tmp; } public Object getValueAt(int aRow, int aColumn) { if (indexes.length != 0) { checkModel(); return model.getValueAt(indexes[aRow], aColumn); } return null; } public void setValueAt(Object aValue, int aRow, int aColumn) { checkModel(); model.setValueAt(aValue, indexes[aRow], aColumn); } public void sortByColumn(int column) { sortByColumn(column, true); } public void sortByColumn(int column, boolean ascending) { this.ascending = ascending; sortingColumns.removeAllElements(); sortingColumns.addElement(new Integer(column)); sort(this); super.tableChanged(new TableModelEvent(this)); } public void addMouseListenerToHeaderInTable(JTable table) { final TableSorter sorter = this; final JTable tableView = table; tableView.setColumnSelectionAllowed(false); MouseAdapter listMouseListener = new MouseAdapter() { public void mouseClicked(MouseEvent e) { TableColumnModel columnModel = tableView.getColumnModel(); int viewColumn = columnModel.getColumnIndexAtX(e.getX()); int column = tableView.convertColumnIndexToModel(viewColumn); if (e.getClickCount() == 1 && column != -1) { int shiftPressed = e.getModifiers() & InputEvent.SHIFT_MASK; boolean ascending = (shiftPressed == 0); sorter.sortByColumn(column, ascending); } } }; JTableHeader th = tableView.getTableHeader(); th.addMouseListener(listMouseListener); } }
[ "aaponcseku@gmail.com" ]
aaponcseku@gmail.com
39b8f22f9eb792bd927c53ca5949e1f30f87c4c3
2f8104b6d1501571d33ec786354b8673f879f895
/shared/communication/src/main/java/com/alibaba/otter/shared/communication/model/OtterRemoteException.java
d8729fee971bb1041add8e1bed1e64dc43c6fa51
[]
no_license
enboling/otter
b6bbf67c1ed16c25881c95cd306658a7b3806405
b76a2b15070bd4ca42895b5aa125fdf7a3f73269
refs/heads/master
2021-01-16T20:22:42.295422
2013-08-16T10:03:58
2013-08-16T10:03:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,232
java
package com.alibaba.otter.shared.communication.model; import org.apache.commons.lang.exception.NestableRuntimeException; /** * otter remote操作的统一传输异常对象 * * @author jianghang 2011-11-28 下午02:17:00 * @version 4.0.0 */ public class OtterRemoteException extends NestableRuntimeException { private static final long serialVersionUID = -7288830284122672209L; private String errorCode; private String errorDesc; public OtterRemoteException(String errorCode){ super(errorCode); } public OtterRemoteException(String errorCode, Throwable cause){ super(errorCode, cause); } public OtterRemoteException(String errorCode, String errorDesc){ super(errorCode + ":" + errorDesc); } public OtterRemoteException(String errorCode, String errorDesc, Throwable cause){ super(errorCode + ":" + errorDesc, cause); } public OtterRemoteException(Throwable cause){ super(cause); } public String getErrorCode() { return errorCode; } public String getErrorDesc() { return errorDesc; } @Override public Throwable fillInStackTrace() { return this; } }
[ "jianghang115@gmail.com" ]
jianghang115@gmail.com
df9b508a52ef194af247b108615ee66dfc7a683a
47ecb3497f01786fecff4cad4b7fdbbe721f99d2
/src/edu/umn/natsrl/vissimcom/wrapper/TransitLine.java
0ae8c84df104cf964eb72899a15993b9bda7a847
[]
no_license
seongah330/TICAS
6b5d8e7b86eaaa1cc82c679cb4df0e8a6eb4b0e8
7fb84c301eff341c0c254f7c6484ed6742ad0e92
refs/heads/master
2020-04-29T23:56:01.568909
2013-09-30T16:08:26
2013-09-30T16:08:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
479
java
package edu.umn.natsrl.vissimcom.wrapper; import org.jawin.*; import org.jawin.constants.*; import org.jawin.marshal.*; import org.jawin.io.*; import java.io.*; /** * Jawin generated code please do not edit * * CoClass Interface: TransitLine * Description: TransitLine Object Class * Help file: * * @author jawin_gen */ public class TransitLine { public static final GUID CLSID = new GUID("{625ebc91-6e4e-478e-AF2B-23D8E88E9D6E}"); }
[ "Administrator@soobinjeon-PC" ]
Administrator@soobinjeon-PC
0020f3fd16448c32b3bec86e05e8ba5a52804573
b45910cf7a6c4f5ac69bcafa1c90a92c09e4d946
/app/src/main/java/net/huansi/hsgmtapp/activity/FirstActivity.java
b27fdc1453bb04c413d087c1ced26a68cfd72ed6
[]
no_license
LiFaWang/trunk
486109cd18d440a16b8829300ddc8872d6d20c02
ba9724ccc0208dee8cd41f988f6f8a43b3128636
refs/heads/master
2021-07-16T22:16:26.535901
2017-10-24T09:55:16
2017-10-24T09:55:16
107,863,746
0
0
null
null
null
null
UTF-8
Java
false
false
1,163
java
package net.huansi.hsgmtapp.activity; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; /** * Created by Administrator on 2016/5/5 0005. */ public class FirstActivity extends Activity { // private InputMethodManager imm=null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); View view=new View(getApplicationContext()); setContentView(view); // imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); // imm.hideSoftInputFromWindow(view.getApplicationWindowToken(),0); Intent intent=new Intent(); if(getIntent()!=null) { if(getIntent().getBundleExtra("url")!=null) { Bundle bundle=new Bundle(); bundle.putString("url", getIntent().getBundleExtra("url").getString("url", "")); intent.putExtra("url", bundle); } } intent.setClass(FirstActivity.this, MainActivity.class); startActivity(intent); finish(); } }
[ "178971959@qq.com" ]
178971959@qq.com
ab9759d10fe06ad91cc30c4475bf3e00d8faf0c0
d5173fca20ddbaef947ef10885a63260d762249a
/camunda-cmmn-model/src/main/java/org/camunda/bpm/model/cmmn/impl/instance/BindingRefinementExpressionImpl.java
e3a4d6f5c14b184c661136f8db092e50cc2452fd
[ "Apache-2.0" ]
permissive
cenbow/bpm
70b8c000cade96ea5fa64ebe61647da960a91a02
888439665b327836bc2168fbf69a86010b85fe18
refs/heads/master
2020-03-20T00:24:28.168124
2018-06-12T02:19:59
2018-06-12T02:19:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,960
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.camunda.bpm.model.cmmn.impl.instance; import static org.camunda.bpm.model.cmmn.impl.CmmnModelConstants.CMMN11_NS; import static org.camunda.bpm.model.cmmn.impl.CmmnModelConstants.CMMN_ELEMENT_BINDING_REFINEMENT; import org.camunda.bpm.model.cmmn.instance.BindingRefinementExpression; import org.camunda.bpm.model.cmmn.instance.Expression; import org.camunda.bpm.model.xml.ModelBuilder; import org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext; import org.camunda.bpm.model.xml.type.ModelElementTypeBuilder; /** * @author Roman Smirnov * */ public class BindingRefinementExpressionImpl extends ExpressionImpl implements BindingRefinementExpression { public BindingRefinementExpressionImpl(ModelTypeInstanceContext instanceContext) { super(instanceContext); } public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(BindingRefinementExpression.class, CMMN_ELEMENT_BINDING_REFINEMENT) .namespaceUri(CMMN11_NS) .extendsType(Expression.class) .instanceProvider(new ModelElementTypeBuilder.ModelTypeInstanceProvider<BindingRefinementExpression>() { public BindingRefinementExpression newInstance(ModelTypeInstanceContext instanceContext) { return new BindingRefinementExpressionImpl(instanceContext); } }); typeBuilder.build(); } }
[ "frank.x.li@gmail.com" ]
frank.x.li@gmail.com
b6e437a89c3a754edad5756f718d9bd1a5211a2c
7f20b1bddf9f48108a43a9922433b141fac66a6d
/core3/vizmap-api/branches/vp-tree/src/main/java/org/cytoscape/view/vizmap/events/SaveVizmapPropsListener.java
30668bbce52d06a8df6a9d19e94364d2cc4c5df9
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
210
java
package org.cytoscape.view.vizmap.events; import org.cytoscape.event.CyListener; /** * */ public interface SaveVizmapPropsListener extends CyListener { public void handleEvent(SaveVizmapPropsEvent e); }
[ "kono@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
kono@0ecc0d97-ab19-0410-9704-bfe1a75892f5
eb12af69ae8598a079e04522dcc1b0bbaee50677
6f96ee8885b0b4bc67e9cc4859f52ebcf995dc90
/modulecore/metrtingplugin/build/generated/source/r/release/com/yanzhenjie/recyclerview/swipe/R.java
94fa2a30bb76284af4117a56c67f77e0ba590d33
[]
no_license
whwxxstsyd/SmartHome2
dece644923af868ff4c0a88208479c726604e1b1
770b097c20ced40ea0a4351b15c7069b4fabf5b8
refs/heads/master
2020-03-09T15:45:22.237172
2017-06-20T09:56:43
2017-06-20T10:00:30
128,867,449
1
2
null
2018-04-10T03:18:11
2018-04-10T03:18:11
null
UTF-8
Java
false
false
2,062
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package com.yanzhenjie.recyclerview.swipe; public final class R { public static final class attr { public static int contentViewId = 0x7f0101b9; public static int layoutManager = 0x7f01018e; public static int leftViewId = 0x7f0101b7; public static int reverseLayout = 0x7f010190; public static int rightViewId = 0x7f0101b8; public static int spanCount = 0x7f01018f; public static int stackFromEnd = 0x7f010191; } public static final class dimen { public static int item_touch_helper_max_drag_scroll_per_frame = 0x7f0900b0; public static int item_touch_helper_swipe_escape_max_velocity = 0x7f0900b1; public static int item_touch_helper_swipe_escape_velocity = 0x7f0900b2; } public static final class id { public static int item_touch_helper_previous_elevation = 0x7f0f0005; public static int swipe_content = 0x7f0f0163; public static int swipe_left = 0x7f0f0164; public static int swipe_right = 0x7f0f0165; } public static final class layout { public static int yanzhenjie_item_default = 0x7f040078; } public static final class styleable { public static int[] RecyclerView = { 0x010100c4, 0x010100f1, 0x7f01018e, 0x7f01018f, 0x7f010190, 0x7f010191 }; public static int RecyclerView_android_orientation = 0; public static int RecyclerView_layoutManager = 2; public static int RecyclerView_reverseLayout = 4; public static int RecyclerView_spanCount = 3; public static int RecyclerView_stackFromEnd = 5; public static int[] SwipeMenuLayout = { 0x7f0101b7, 0x7f0101b8, 0x7f0101b9 }; public static int SwipeMenuLayout_contentViewId = 2; public static int SwipeMenuLayout_leftViewId = 0; public static int SwipeMenuLayout_rightViewId = 1; } }
[ "554674787@qq.com" ]
554674787@qq.com
efdf5085ebe56937b794c20584cf740abb7b75ea
18473bde29a1f91ba3ce8fc7f5f7720c0c10c294
/src/main/java/com/payneteasy/firewall/l2/editor/graphics/SwingChildCanvas.java
23572e714a024db67cd902afa4442cc5d6ea0d84
[]
no_license
evsinev/firewall-config
801ad9e95a63a31f6c5617c93d4fc9c331c01a1e
807c8a21055c5d46c6e7c993c6286265db770822
refs/heads/master
2023-08-09T04:22:25.070776
2023-07-28T15:50:39
2023-07-28T15:50:39
7,672,586
5
5
null
2022-12-14T20:21:16
2013-01-17T19:25:52
Java
UTF-8
Java
false
false
1,480
java
package com.payneteasy.firewall.l2.editor.graphics; import java.awt.*; public class SwingChildCanvas implements ICanvas { private final ICanvas parent; private final int xoffset; private final int yoffset; public SwingChildCanvas(ICanvas aCanvas, int xoffset, int yoffset) { this.xoffset = xoffset; this.yoffset = yoffset; parent = aCanvas; } @Override public void drawText(Color aColor, int aX, int aY, String aName) { parent.drawText(aColor, xoffset + aX, yoffset + aY, aName); } @Override public void fillRect(Color aColor, int aX, int aY, int aWidth, int aHeight) { parent.fillRect(aColor, xoffset + aX, yoffset + aY, aWidth, aHeight); } @Override public void drawRect(Color aColor, int aX, int aY, int aWidth, int aHeight) { parent.drawRect(aColor, xoffset + aX, yoffset + aY, aWidth, aHeight); } @Override public ICanvas createChild(int aOffsetX, int aOffsetY) { return new SwingChildCanvas(this, aOffsetX, aOffsetY); } @Override public void drawLine(Color aColor, float width, int aX, int aY, int aWidth, int aHeight) { parent.drawLine(aColor, width, xoffset + aX, yoffset + aY, aWidth, aHeight); } @Override public int getTextWidth(String aText) { return parent.getTextWidth(aText); } @Override public int getTextHeight(String aText) { return parent.getTextHeight(aText); } }
[ "es@payneteasy.com" ]
es@payneteasy.com
5a91cb0da0b990d3a23b284819150ac78bbde459
7af846ccf54082cd1832c282ccd3c98eae7ad69a
/ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_13/Foo124.java
aab5c17233412504d947f4262268002a82fc5812
[]
no_license
Kadanza/TestModules
821f216be53897d7255b8997b426b359ef53971f
342b7b8930e9491251de972e45b16f85dcf91bd4
refs/heads/master
2020-03-25T08:13:09.316581
2018-08-08T10:47:25
2018-08-08T10:47:25
143,602,647
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
package taxi.nicecode.com.ftmap.generated.package_13; public class Foo124 { public void foo0(){ new Foo123().foo5(); } public void foo1(){ foo0(); } public void foo2(){ foo1(); } public void foo3(){ foo2(); } public void foo4(){ foo3(); } public void foo5(){ foo4(); } }
[ "1" ]
1
8e0fb2018a796b1acb30624f4fd6de478ab2f6f5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/5/5_efe77e586b73061ba7ff64e91884458b95aba233/ServiceMetrics/5_efe77e586b73061ba7ff64e91884458b95aba233_ServiceMetrics_t.java
407712680975d75c1680e65ab7d826d06ad54dac
[]
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
4,339
java
/* * Copyright 2009 Members of the EGEE Collaboration. * See http://www.eu-egee.org/partners for details on the copyright holders. * * 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.glite.authz.common; import java.io.PrintWriter; import net.jcip.annotations.ThreadSafe; import org.glite.authz.common.util.Strings; /** A set of metrics kept about a running service. */ @ThreadSafe public class ServiceMetrics { /** Java runtime. */ private Runtime runtime; /** ID for the service. */ private String serviceId; /** Time the service started. */ private long startupTime; /** Total number of completed requests to service. */ private long totalRequests; /** Total number of request that error'ed out. */ private long totalErrors; /** * Constructor. * * @param id ID of the service whose metrics are being tracked */ public ServiceMetrics(String id) { runtime = Runtime.getRuntime(); serviceId = Strings.safeTrimOrNullString(id); startupTime = System.currentTimeMillis(); totalRequests = 0; totalErrors = 0; } /** * Gets an identifier for the service whose metrics are being tracked. * * @return the identifier for the service whose metrics are being tracked */ public String getServiceId() { return serviceId; } /** * Gets the time that the service was started. The time is expressed in the system's default timezone. * * @return time that PEP daemon was started */ public long getServiceStartupTime() { return startupTime; } /** * Gets the total number of completed requests, successful or otherwise, serviced. * * @return total number of completed requests */ public long getTotalServiceRequests() { return totalRequests; } /** Adds one to the total number of requests. */ public void incrementTotalServiceRequests() { totalRequests++; } /** * Gets the total number of requests that error'ed out. * * @return total number of requests that error'ed out */ public long getTotalServiceRequestErrors() { return totalErrors; } /** Adds one to the total number of requests that have error'ed out. */ public void incrementTotalServiceRequestErrors() { totalErrors++; } /** * Prints metric information to the output writer. The following lines are printed: * <ul> * <li>service: <i>service_id</i></li> * <li>start time: <i>service_start_time</i></li> * <li>number of processors: <i>number_of_cpu_cores</i></li> * <li>memory usage: <i>used_megabytes</i>MB</li> * <li>total requests: <i>total_requests</i></li> * <li>total completed requests: <i>total_completed_requests</i></li> * <li>total request errors: <i>total_errors_requests</i></li> * </ul> * * @param writer writer to which metrics are printed */ public void printServiceMetrics(PrintWriter writer) { long usedMemory = (runtime.totalMemory() - runtime.freeMemory()) / 1048576; writer.println("service: " + serviceId); writer.println("start_time: " + startupTime); writer.println("number_of_processors: " + runtime.availableProcessors()); writer.println("memory_usage: " + usedMemory + "MB"); writer.println("total_requests: " + getTotalServiceRequests()); writer.println("total_completed_requests: " + (getTotalServiceRequests() - getTotalServiceRequestErrors())); writer.println("total_request_errors: " + getTotalServiceRequestErrors()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
836f316f8bf0df4f47eac92760bddc55d2cba5a3
20ea5ee84221ff5fd7e3cc1e1ca38db910caf3de
/src/test/java/com/victropolis/euler/TestProblem216.java
d432fca3cba8cd38e46def5715ef13e604081f46
[]
no_license
victropolis/project-euler-solved
a76207d8583126618ff8af801262e6077c536e55
b4f153a42e101b4d780178af05aab8a0203931ec
refs/heads/master
2016-09-06T13:38:52.788092
2015-07-04T22:03:32
2015-07-04T22:03:37
37,392,888
0
0
null
null
null
null
UTF-8
Java
false
false
698
java
package com.victropolis.euler; import org.junit.Assert; import org.junit.Test; /** * Generated programatically by victropolis on 07/04/15. */ public class TestProblem216 { /* Description (from https://projecteuler.net/problem=216): Consider numbers t(n) of the form t(n) = 2n2-1 with n &gt; 1. The first such numbers are 7, 17, 31, 49, 71, 97, 127 and 161. It turns out that only 49 = 7*7 and 161 = 7*23 are not prime. For n ≤ 10000 there are 2202 numbers t(n) that are prime. How many numbers t(n) are prime for n ≤ 50,000,000 ? */ @Test public void test() { Assert.assertEquals(5437849L, Problem216.solve(/* change signature to provide required inputs */)); } }
[ "victropolis@gmail.com" ]
victropolis@gmail.com
6f67d23184a52a7f1a14caf3d7dd2363c20e7fa5
a0be173a14bc43ea55e2b997d651b3431a39ae69
/app/src/main/java/com/hiroshi/cimoc/presenter/DownloadPresenter.java
d7209e05b0c22ee52732dc110e074a73ac91ad68
[]
no_license
Skyline0503/Cimoc
d05d49ec5cea235fc75da72980ff939bf04a0df3
e6dd1c002d896031d33f34cca10a4fc0a3e6113a
refs/heads/master
2022-01-12T14:14:59.903511
2016-10-20T05:23:37
2016-10-20T05:23:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,205
java
package com.hiroshi.cimoc.presenter; import com.hiroshi.cimoc.core.Download; import com.hiroshi.cimoc.core.manager.ComicManager; import com.hiroshi.cimoc.core.manager.TaskManager; import com.hiroshi.cimoc.model.Comic; import com.hiroshi.cimoc.model.MiniComic; import com.hiroshi.cimoc.model.Task; import com.hiroshi.cimoc.rx.RxEvent; import com.hiroshi.cimoc.ui.fragment.ComicFragment; import com.hiroshi.cimoc.ui.view.DownloadView; import java.util.ArrayList; import java.util.List; import rx.Observable; import rx.Subscriber; import rx.android.schedulers.AndroidSchedulers; import rx.functions.Action1; import rx.functions.Func1; import rx.schedulers.Schedulers; /** * Created by Hiroshi on 2016/9/1. */ public class DownloadPresenter extends BasePresenter<DownloadView> { private ComicManager mComicManager; private TaskManager mTaskManager; public DownloadPresenter() { mComicManager = ComicManager.getInstance(); mTaskManager = TaskManager.getInstance(); } @Override protected void initSubscription() { addSubscription(RxEvent.EVENT_TASK_INSERT, new Action1<RxEvent>() { @Override public void call(RxEvent rxEvent) { mBaseView.onDownloadAdd((MiniComic) rxEvent.getData()); } }); addSubscription(RxEvent.EVENT_DOWNLOAD_REMOVE, new Action1<RxEvent>() { @Override public void call(RxEvent rxEvent) { mBaseView.onDownloadDelete((long) rxEvent.getData()); } }); addSubscription(RxEvent.EVENT_DOWNLOAD_START, new Action1<RxEvent>() { @Override public void call(RxEvent rxEvent) { mBaseView.onDownloadStart(); } }); addSubscription(RxEvent.EVENT_DOWNLOAD_STOP, new Action1<RxEvent>() { @Override public void call(RxEvent rxEvent) { mBaseView.onDownloadStop(); } }); addSubscription(RxEvent.EVENT_COMIC_READ, new Action1<RxEvent>() { @Override public void call(RxEvent rxEvent) { if ((int) rxEvent.getData(1) == ComicFragment.TYPE_DOWNLOAD) { mBaseView.onComicRead((MiniComic) rxEvent.getData()); } } }); addSubscription(RxEvent.EVENT_THEME_CHANGE, new Action1<RxEvent>() { @Override public void call(RxEvent rxEvent) { mBaseView.onThemeChange((int) rxEvent.getData(1), (int) rxEvent.getData(2)); } }); } public void deleteComic(final long id) { mCompositeSubscription.add(Observable.create(new Observable.OnSubscribe<Void>() { @Override public void call(Subscriber<? super Void> subscriber) { Comic comic = mComicManager.load(id); if (comic.getFavorite() == null && comic.getHistory() == null) { mComicManager.delete(comic); } else { comic.setDownload(null); mComicManager.update(comic); } Download.delete(comic.getSource(), comic.getTitle()); subscriber.onNext(null); subscriber.onCompleted(); } }).subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Action1<Void>() { @Override public void call(Void v) { mBaseView.onDownloadDeleteSuccess(); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { throwable.printStackTrace(); mBaseView.onDownloadDeleteFail(); } })); } public void loadComic() { mCompositeSubscription.add(mComicManager.listDownload() .flatMap(new Func1<List<Comic>, Observable<Comic>>() { @Override public Observable<Comic> call(List<Comic> list) { return Observable.from(list); } }) .map(new Func1<Comic, MiniComic>() { @Override public MiniComic call(Comic comic) { return new MiniComic(comic); } }) .toList() .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Action1<List<MiniComic>>() { @Override public void call(List<MiniComic> list) { mBaseView.onComicLoadSuccess(list); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { mBaseView.onComicLoadFail(); } })); } public void loadTask() { mCompositeSubscription.add(mTaskManager.list() .flatMap(new Func1<List<Task>, Observable<Task>>() { @Override public Observable<Task> call(List<Task> list) { return Observable.from(list); } }) .filter(new Func1<Task, Boolean>() { @Override public Boolean call(Task task) { return !task.isFinish(); } }) .toList() .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Action1<List<Task>>() { @Override public void call(List<Task> list) { mBaseView.onTaskLoadSuccess(new ArrayList<>(list)); } }, new Action1<Throwable>() { @Override public void call(Throwable throwable) { mBaseView.onTaskLoadFail(); } })); } }
[ "Arachnid-27@github.com" ]
Arachnid-27@github.com
c1ff0174b551f3b40bd7422a9f1be4f50c966070
f4fb031f70595659a44cee19ac5a745285ffd01e
/Minecraft/src/net/minecraft/src/CallableTagCompound1.java
0dff5f4dee0532865aa9913ec01de97d123d3837
[]
no_license
minecraftmuse3/Minecraft
7adfae39fccbacb8f4e5d9b1b0adf0d3ad9aebc4
b3efea7d37b530b51bab42b8cf92eeb209697c01
refs/heads/master
2021-01-17T21:53:09.461358
2013-07-22T13:10:43
2013-07-22T13:10:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
577
java
package net.minecraft.src; import java.util.concurrent.Callable; class CallableTagCompound1 implements Callable { final String field_82585_a; final NBTTagCompound theNBTTagCompound; CallableTagCompound1(NBTTagCompound par1NBTTagCompound, String par2Str) { theNBTTagCompound = par1NBTTagCompound; field_82585_a = par2Str; } @Override public Object call() { return func_82583_a(); } public String func_82583_a() { return NBTBase.NBTTypes[((NBTBase) NBTTagCompound.getTagMap(theNBTTagCompound).get(field_82585_a)).getId()]; } }
[ "sashok7241@gmail.com" ]
sashok7241@gmail.com
8eff38965367a71da7a1c3f665c22feb64f1d270
3fc503bed9e8ba2f8c49ebf7783bcdaa78951ba8
/TRAVACC_R5/accommodationbackoffice/backoffice/src/de/hybris/platform/accommodationbackoffice/widgets/handler/AbstractFinancialInfoValidationHandler.java
d62b4f2898c4667cf44265a9155417e00a236c7c
[]
no_license
RabeS/model-T
3e64b2dfcbcf638bc872ae443e2cdfeef4378e29
bee93c489e3a2034b83ba331e874ccf2c5ff10a9
refs/heads/master
2021-07-01T02:13:15.818439
2020-09-05T08:33:43
2020-09-05T08:33:43
147,307,585
0
0
null
null
null
null
UTF-8
Java
false
false
3,943
java
/* * [y] hybris Platform * * Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package de.hybris.platform.accommodationbackoffice.widgets.handler; import de.hybris.platform.accommodationbackoffice.constants.AccommodationbackofficeConstants; import de.hybris.platform.servicelayer.model.ModelService; import de.hybris.platform.travelservices.model.accommodation.AbstractFinancialInfoModel; import java.util.Collections; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Required; import org.zkoss.util.resource.Labels; import org.zkoss.zul.Messagebox; import com.hybris.cockpitng.config.jaxb.wizard.CustomType; import com.hybris.cockpitng.widgets.configurableflow.FlowActionHandler; import com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter; /** * Abstract validation handler for AbstractFinancialInfo wizard. */ public abstract class AbstractFinancialInfoValidationHandler extends AbstractAccommodationBackofficeValidationHandler implements FlowActionHandler { private static final Logger LOG = Logger.getLogger(AbstractFinancialInfoValidationHandler.class); protected static final String CREATE_ABSTRACT_FINANCIAL_INFO_WIZARD_ERROR_TITLE = "create.abstractfinancialinfo.wizard.step.error.title"; protected static final String CREATE_ABSTRACT_FINANCIAL_INFO_WIZARD_DUPLICATE_CODE_ERROR_MESSAGE = "create.abstractfinancialinfo.wizard.duplicate.code.error.message"; protected static final String ABSTRACT_FINANCIAL_INFO_CODE = "create.abstractfinancialinfo.wizard.code.name"; protected static final String NEW_ABSTRACT_FINANCIAL_CODE = "newAbstractFinancialInfo"; private ModelService modelService; @Override public void perform(final CustomType customType, final FlowActionHandlerAdapter adapter, final Map<String, String> parameters) { final AbstractFinancialInfoModel abstractFinancialInfoModel = adapter.getWidgetInstanceManager().getModel().getValue (NEW_ABSTRACT_FINANCIAL_CODE, AbstractFinancialInfoModel.class); if (StringUtils.length(abstractFinancialInfoModel.getCode()) > AccommodationbackofficeConstants.CODE_MAXIMUM_CHARS_ALLOWED) { showMessage(ABSTRACT_FINANCIAL_INFO_CODE); return; } if (!validateUniqueForAttributes( Collections.singletonMap(AbstractFinancialInfoModel.CODE, abstractFinancialInfoModel.getCode()), AbstractFinancialInfoModel._TYPECODE)) { Messagebox.show(Labels.getLabel(CREATE_ABSTRACT_FINANCIAL_INFO_WIZARD_DUPLICATE_CODE_ERROR_MESSAGE), Labels.getLabel(CREATE_ABSTRACT_FINANCIAL_INFO_WIZARD_ERROR_TITLE), Messagebox.OK, Messagebox.EXCLAMATION); return; } getModelService().save(abstractFinancialInfoModel); adapter.done(); } /** * Based on the field name, it would show message for appropriate field. * * @param fieldName * the name of the field in wizard */ protected void showMessage(final String fieldName) { final Object[] args = { Labels.getLabel(fieldName) }; Messagebox .show(Labels.getLabel(AccommodationbackofficeConstants.EXCEEDED_MAXIMUM_CHARACTERS_ALLOWED_ERROR_MESSAGE, args), Labels.getLabel(CREATE_ABSTRACT_FINANCIAL_INFO_WIZARD_ERROR_TITLE), new Messagebox.Button[] { Messagebox.Button.OK }, null, null); } /** * Gets model service. * * @return the model service */ protected ModelService getModelService() { return modelService; } /** * Sets model service. * * @param modelService * the model service */ @Required public void setModelService(final ModelService modelService) { this.modelService = modelService; } }
[ "sebastian.rulik@gmail.com" ]
sebastian.rulik@gmail.com
e263beeaf8f73a6055ececc3a2d9a5f0b1483144
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/LANG-51b-1-11-SPEA2-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang/BooleanUtils_ESTest.java
1f5befd8b315d92e882504a4b3d99e627ee8ba5e
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
554
java
/* * This file was automatically generated by EvoSuite * Sun Jan 19 02:48:21 UTC 2020 */ package org.apache.commons.lang; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class BooleanUtils_ESTest extends BooleanUtils_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
7bb543c8c21eefb172ff6fecbfd55b85fe750f4a
54ce49f27a04fbdabe76ec7b43471134909932d3
/chapter_009/src/main/java/ru/job4j/calculate/InteractCalc.java
057d6d344b4f0c7e79c05f6892e981c946552991
[ "Apache-2.0" ]
permissive
IvanPJF/job4j
a3c8ce587fad7f42d58e6614455c48608d4df9f0
1451f98bbbe70ab1afdb5f8c625e810680620989
refs/heads/master
2022-09-19T16:32:18.492530
2020-03-01T17:42:54
2020-03-01T17:42:54
147,117,520
0
0
Apache-2.0
2022-09-08T01:00:16
2018-09-02T20:00:51
Java
UTF-8
Java
false
false
2,710
java
package ru.job4j.calculate; import java.io.InputStream; import java.util.Scanner; /** * Interactive calculator. *@author IvanPJF (teaching-light@yandex.ru) *@since 28.08.2019 *@version 0.1 */ public class InteractCalc { private Parser parser; private StorageOperators storageOperators; private String lastOperation; private Double result; public InteractCalc(final StorageOperators storageOperators) { this.storageOperators = storageOperators; this.parser = new Parser(); this.parser.addToOperators(this.storageOperators.allOperators()); } /** * Evaluates the proposed expression. * @param input Input expression. * @return Result of calculation. */ private Double calculate(String input) { this.parser.parse(input); String operator = this.parser.isNotOperator() ? this.lastOperation : this.parser.operator(); Double firstOperand = this.parser.isNotFirst() ? this.result : this.parser.firstOperand(); Double secondOperand = this.parser.isNotSecond() ? this.result : this.parser.secondOperand(); if (this.isNotNull(operator, firstOperand, secondOperand)) { this.result = this.storageOperators.getOperation(operator).execute(firstOperand, secondOperand); this.lastOperation = operator; } this.parser.clearFields(); return this.result; } /** * Checking an object for null. * @param object Input object. * @return Logical result. */ private boolean isNotNull(Object... object) { boolean result = true; for (Object element : object) { if (element == null) { result = false; break; } } return result; } /** * Run calculator in interactive mode. * @param is Source expressions. */ public void run(InputStream is) { try (Scanner sc = new Scanner(is)) { String wordHint = "h"; String wordResult = this.parser.resultWord(); String wordExit = "q"; Menu menu = new Menu(wordHint, wordResult, wordExit); String expresion = null; do { menu.showMenu(this.result, this.lastOperation); expresion = sc.nextLine(); if (wordHint.equals(expresion)) { menu.showHint(); sc.nextLine(); } else { if (!wordExit.equals(expresion)) { menu.showResult(this.calculate(expresion)); } } } while (!wordExit.equals(expresion)); } } }
[ "teaching-light@yandex.ru" ]
teaching-light@yandex.ru
6b1443ef49d1a0f48fb1c36ec4871adf497ea2d9
48e0f257417cfb75a79aa2c1cec4238f6b43de83
/eclipse/plugins/org.switchyard.tools.models.switchyard1_0/src/org/switchyard/tools/models/switchyard1_0/clojure/util/ClojureResourceFactoryImpl.java
b24a0f04d75a55334ab869508cd1f048c8d6423b
[]
no_license
bfitzpat/tools
4833487de846e577cf3de836b4aa700bdd04ce52
26ea82a46c481b196180c7cb16fcd306d894987f
refs/heads/master
2021-01-17T16:06:29.271555
2017-10-13T19:14:25
2017-10-19T15:49:41
3,909,717
0
1
null
2017-08-01T09:05:50
2012-04-02T18:38:01
Java
UTF-8
Java
false
false
1,714
java
/** * <copyright> * </copyright> * * $Id$ */ package org.switchyard.tools.models.switchyard1_0.clojure.util; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; import org.eclipse.emf.ecore.xmi.XMLResource; /** * <!-- begin-user-doc --> * The <b>Resource Factory</b> associated with the package. * <!-- end-user-doc --> * @see org.switchyard.tools.models.switchyard1_0.clojure.util.ClojureResourceImpl * @generated */ public class ClojureResourceFactoryImpl extends ResourceFactoryImpl { /** * Creates an instance of the resource factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ClojureResourceFactoryImpl() { super(); } /** * Creates an instance of the resource. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Resource createResource(URI uri) { XMLResource result = new ClojureResourceImpl(uri); result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); return result; } } //ClojureResourceFactoryImpl
[ "rcernich@redhat.com" ]
rcernich@redhat.com
2ebc6072faea9b17c2c94e7f80af6fe1dbbab157
9cfeb4c61cdbcf3a9d11c34b4e3291763f9a55fa
/iot-infomgt/iot-infomgt-dao/src/main/java/org/iotp/infomgt/dao/tenant/TenantDao.java
2ca78cd3933bb230b17e787fe54fb746567e27a5
[ "Apache-2.0" ]
permissive
soncd19/iotplatform
a6bbf73f381850fddba71a9356189d4c3a6a6a40
c3f5545f58944b06145fd737fd5a85dc5b97d019
refs/heads/master
2023-08-05T01:17:28.160724
2021-10-08T02:54:30
2021-10-08T02:54:30
414,826,433
0
0
null
null
null
null
UTF-8
Java
false
false
2,043
java
/******************************************************************************* * Copyright 2017 osswangxining@163.com * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. ******************************************************************************/ /** * Copyright © 2016-2017 The Thingsboard 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.iotp.infomgt.dao.tenant; import java.util.List; import org.iotp.infomgt.dao.Dao; import org.iotp.infomgt.data.Tenant; import org.iotp.infomgt.data.page.TextPageLink; public interface TenantDao extends Dao<Tenant> { /** * Save or update tenant object * * @param tenant the tenant object * @return saved tenant object */ Tenant save(Tenant tenant); /** * Find tenants by region and page link. * * @param region the region * @param pageLink the page link * @return the list of tenant objects */ List<Tenant> findTenantsByRegion(String region, TextPageLink pageLink); }
[ "soncd@vnpay.vn" ]
soncd@vnpay.vn
0ecf4b5d899f8967614f6e905275d7020cc3c49d
1f0a896d12afa98b937f546b352046deef3326fd
/src/test/java/edu/msstate/nsparc/wings/integration/forms/service/ServiceEditForm.java
9d81f78291b8966918453357f68349fe700ee16f
[]
no_license
allaallala/wings_maven
8e3f2fc9e9a789664b4f4ccf4e506895cf595853
8f33c3cb567ffde08921e22a91d8dc75efbc97cb
refs/heads/master
2022-01-26T06:30:26.290273
2019-06-04T13:12:17
2019-06-04T13:12:17
190,203,243
0
0
null
null
null
null
UTF-8
Java
false
false
1,333
java
package edu.msstate.nsparc.wings.integration.forms.service; import framework.elements.RadioButton; import org.openqa.selenium.By; /** This form is opened via Advanced -> Services -> Search for record -> Open record -> Click on Edit */ public class ServiceEditForm extends ServiceBaseForm { private RadioButton rbServiceFeeNo = new RadioButton("css=input#serviceFee2","Is there a fee for this service - No"); /** * Default constructor */ public ServiceEditForm() { super(By.xpath("//span[@id='breadCrumb'][contains(.,'Service Edit')]"), "Service Edit"); } /** * This method is used for setting Service participantSSDetails to provided values * @param title - service title * @param endDate - service end date * @param category - category * @param description - description */ public void editServiceDetails(String title, String endDate, String category, String description) { inputServiceName(title); txbServiceEndDate.type(endDate); rbServiceFeeNo.click(); if (chkWP.isPresent()) { chkWP.click(); } chkWIAAdult.click(); chkTrade.click(); selectCategory(category); BaseOtherElement.LOADING.getElement().waitForNotVisible(); inputDescription(description); } }
[ "B2eQa&udeg" ]
B2eQa&udeg
87317935bbd7062a834ee0cd6f4650fc7b034445
8fdc572a9db92148c421552b6feef2a887ec9d4f
/modules/ui/src/com/alee/extended/ninepatch/NinePatchEditorDialog.java
3417c3a6a9bccb8f7e5b24bc365e9c502acc0b88
[]
no_license
RoshanGerard/weblaf
cde828d647fdd95c3aab979881020ece08a050ca
2b8f47d5927253ae583ef6a9b3778fcafbd660c7
refs/heads/master
2020-12-24T23:39:28.707037
2016-04-18T18:24:01
2016-04-18T18:24:01
51,216,001
0
0
null
2016-02-06T18:42:37
2016-02-06T18:42:37
null
UTF-8
Java
false
false
5,774
java
/* * This file is part of WebLookAndFeel library. * * WebLookAndFeel library is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * WebLookAndFeel library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with WebLookAndFeel library. If not, see <http://www.gnu.org/licenses/>. */ package com.alee.extended.ninepatch; import com.alee.laf.WebLookAndFeel; import com.alee.laf.rootpane.WebFrame; import com.alee.managers.language.LanguageKeyListener; import com.alee.managers.language.LanguageManager; import com.alee.managers.language.data.Value; import com.alee.managers.settings.SettingsManager; import com.alee.utils.ImageUtils; import javax.swing.*; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import java.awt.*; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.awt.image.BufferedImage; import java.io.File; /** * Custom dialog that contains nine-patch editor. * * @author Mikle Garin * @see com.alee.extended.ninepatch.NinePatchEditorPanel */ public class NinePatchEditorDialog extends WebFrame { /** * Dialog title language key. */ private static final String DIALOG_TITLE_KEY = "weblaf.ex.npeditor.title"; private NinePatchEditorPanel ninePatchEditorPanel = null; public NinePatchEditorDialog () { this ( SettingsManager.get ( "NinePatchEditorDialog", "lastFile", ( String ) null ) ); } public NinePatchEditorDialog ( final String path ) { super (); setIconImages ( WebLookAndFeel.getImages () ); updateTitle (); LanguageManager.addLanguageKeyListener ( DIALOG_TITLE_KEY, new LanguageKeyListener () { @Override public void languageKeyUpdated ( final String key, final Value value ) { updateTitle (); } } ); getContentPane ().setLayout ( new BorderLayout () ); // Main editor panel ninePatchEditorPanel = new NinePatchEditorPanel (); ninePatchEditorPanel.addChangeListener ( new ChangeListener () { @Override public void stateChanged ( final ChangeEvent e ) { updateTitle (); } } ); getContentPane ().add ( ninePatchEditorPanel ); // Using provided image/directory or loading default image if ( path != null ) { final File file = new File ( path ); if ( file.exists () ) { if ( file.isFile () ) { ninePatchEditorPanel.openImage ( file ); } else { ninePatchEditorPanel.setSelectedDirectory ( file ); } } else { openDefault (); } } else { openDefault (); } // Setting proper dialog size final Rectangle bounds = SettingsManager.get ( "NinePatchEditorDialog", "bounds", ( Rectangle ) null ); if ( bounds == null ) { pack (); setLocationRelativeTo ( null ); } else { setBounds ( bounds ); } // Adding close listener setDefaultCloseOperation ( JFrame.DO_NOTHING_ON_CLOSE ); addWindowListener ( new WindowAdapter () { @Override public void windowClosing ( final WindowEvent e ) { if ( ninePatchEditorPanel.continueAfterSave () ) { SettingsManager.set ( "NinePatchEditorDialog", "lastFile", ninePatchEditorPanel.getImageSrc () ); SettingsManager.set ( "NinePatchEditorDialog", "bounds", getBounds () ); System.exit ( 0 ); } } } ); } private void openDefault () { ninePatchEditorPanel .setNinePatchImage ( ImageUtils.getBufferedImage ( NinePatchEditorDialog.class.getResource ( "icons/example.png" ) ) ); } private void updateTitle () { final String imageSrc = ninePatchEditorPanel != null ? ninePatchEditorPanel.getImageSrc () : null; setTitle ( LanguageManager.get ( DIALOG_TITLE_KEY ) + ( imageSrc != null ? " - [" + imageSrc + "]" : "" ) ); } public NinePatchEditorPanel getNinePatchEditorPanel () { return ninePatchEditorPanel; } public BufferedImage getNinePatchImage () { return ninePatchEditorPanel.getNinePatchImage (); } public static void main ( final String[] args ) { SwingUtilities.invokeLater ( new Runnable () { @Override public void run () { // Installing WebLaF WebLookAndFeel.install (); // Initializing editor dialog final NinePatchEditorDialog npe; if ( args != null && args.length > 0 ) { npe = new NinePatchEditorDialog ( args[ 0 ] ); } else { npe = new NinePatchEditorDialog (); } npe.setVisible ( true ); } } ); } }
[ "mgarin@alee.com" ]
mgarin@alee.com
56ce6e3ba0d87c3e6ad07b735c9b6af1461c04fd
49718a4619825b4312a79454596993a2eb2aabe9
/src/main/java/com/artisan/mybatis/xml/domain/SysUser.java
072bd9cdaf621b026f527920e527fe333187015a
[]
no_license
yangshangwei/MyBatisMaster
eecf44805533960824181ae53d96cbfb9547a02c
9a81148d105a5e635077caa8692f46aa1ff586c1
refs/heads/master
2020-03-09T16:00:00.634241
2018-05-07T18:42:24
2018-05-07T18:42:24
128,873,361
1
1
null
null
null
null
UTF-8
Java
false
false
2,422
java
package com.artisan.mybatis.xml.domain; import java.io.Serializable; import java.util.Arrays; import java.util.Date; import java.util.List; /** * * * @ClassName: SysUser * * @Description: 用户表 * * @author: Mr.Yang * * @date: 2018年4月13日 下午9:24:21 */ public class SysUser implements Serializable { private static final long serialVersionUID = 5736486618394472355L; /** * 用户ID */ private Long id; /** * 用户名 */ private String userName; /** * 密码 */ private String userPassword; /** * 邮箱 */ private String userEmail; /** * 简介 */ private String userInfo; /** * 头像 */ private byte[] headImg; /** * 创建时间 */ private Date createTime; /** * 用户角色: 一个用户拥有一个角色 , 一对一 */ private SysRole sysRole; /** * 用户角色: 一个用户拥有多个角色 , 一对多 */ private List<SysRole> roleList; public List<SysRole> getRoleList() { return roleList; } public void setRoleList(List<SysRole> roleList) { this.roleList = roleList; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getUserPassword() { return userPassword; } public void setUserPassword(String userPassword) { this.userPassword = userPassword; } public String getUserEmail() { return userEmail; } public void setUserEmail(String userEmail) { this.userEmail = userEmail; } public String getUserInfo() { return userInfo; } public void setUserInfo(String userInfo) { this.userInfo = userInfo; } public byte[] getHeadImg() { return headImg; } public void setHeadImg(byte[] headImg) { this.headImg = headImg; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public SysRole getSysRole() { return sysRole; } public void setSysRole(SysRole sysRole) { this.sysRole = sysRole; } @Override public String toString() { return "SysUser [id=" + id + ", userName=" + userName + ", userPassword=" + userPassword + ", userEmail=" + userEmail + ", userInfo=" + userInfo + ", headImg=" + Arrays.toString(headImg) + ", createTime=" + createTime + ", sysRole=" + sysRole + "]"; } }
[ "815150141@qq.com" ]
815150141@qq.com
8f6986837ee592ac089620f756ca896b150b3227
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/compiler/notNullVerification/TypeUseAndMemberAnnotations.java
961ea95be44d7a1a29a1e4f02993f23a51d1005e
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
415
java
import java.lang.annotation.*; @Target({ElementType.TYPE_USE, ElementType.METHOD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @interface FooAnno {} public class TypeUseAndMemberAnnotations { @FooAnno public Object foo1() { return null; } public Object foo2(@FooAnno String arg) { return null; } public @FooAnno java.util.List<@FooAnno String> returnType() { return null; } }
[ "peter@jetbrains.com" ]
peter@jetbrains.com
33af30bf37ab688515139d3e580dabd1f555adb2
4a61da5960eea711cbc45e16713e28e0ac49772d
/services/hrdb/src/com/auto_zfxgtcjlzc/hrdb/service/EmployeeService.java
58eadc77ed7791703340be96854252f5affa5a25
[]
no_license
wavemakerapps/Auto_ZFxgtcjlzc
8e9b8c6cdee29b7dc929c9a0dd7375ee5c6ab447
3d30dcdba8ec6c39599d45ea01049b51445b7816
refs/heads/master
2020-03-17T08:24:22.872639
2018-05-15T00:32:17
2018-05-15T00:32:17
133,437,001
0
0
null
null
null
null
UTF-8
Java
false
false
8,130
java
/*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved. This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the source code license agreement you entered into with wavemaker.com*/ package com.auto_zfxgtcjlzc.hrdb.service; /*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/ import java.io.InputStream; import java.util.List; import java.util.Map; import javax.validation.Valid; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import com.wavemaker.runtime.data.exception.EntityNotFoundException; import com.wavemaker.runtime.data.export.ExportOptions; import com.wavemaker.runtime.data.export.ExportType; import com.wavemaker.runtime.data.expression.QueryFilter; import com.wavemaker.runtime.data.model.AggregationInfo; import com.wavemaker.runtime.file.model.Downloadable; import com.auto_zfxgtcjlzc.hrdb.Employee; import com.auto_zfxgtcjlzc.hrdb.Vacation; /** * Service object for domain model class {@link Employee}. */ public interface EmployeeService { /** * Creates a new Employee. It does cascade insert for all the children in a single transaction. * * This method overrides the input field values using Server side or database managed properties defined on Employee if any. * * @param employee Details of the Employee to be created; value cannot be null. * @return The newly created Employee. */ Employee create(@Valid Employee employee); /** * Returns Employee by given id if exists. * * @param employeeId The id of the Employee to get; value cannot be null. * @return Employee associated with the given employeeId. * @throws EntityNotFoundException If no Employee is found. */ Employee getById(Integer employeeId); /** * Find and return the Employee by given id if exists, returns null otherwise. * * @param employeeId The id of the Employee to get; value cannot be null. * @return Employee associated with the given employeeId. */ Employee findById(Integer employeeId); /** * Find and return the list of Employees by given id's. * * If orderedReturn true, the return List is ordered and positional relative to the incoming ids. * * In case of unknown entities: * * If enabled, A null is inserted into the List at the proper position(s). * If disabled, the nulls are not put into the return List. * * @param employeeIds The id's of the Employee to get; value cannot be null. * @param orderedReturn Should the return List be ordered and positional in relation to the incoming ids? * @return Employees associated with the given employeeIds. */ List<Employee> findByMultipleIds(List<Integer> employeeIds, boolean orderedReturn); /** * Updates the details of an existing Employee. It replaces all fields of the existing Employee with the given employee. * * This method overrides the input field values using Server side or database managed properties defined on Employee if any. * * @param employee The details of the Employee to be updated; value cannot be null. * @return The updated Employee. * @throws EntityNotFoundException if no Employee is found with given input. */ Employee update(@Valid Employee employee); /** * Deletes an existing Employee with the given id. * * @param employeeId The id of the Employee to be deleted; value cannot be null. * @return The deleted Employee. * @throws EntityNotFoundException if no Employee found with the given id. */ Employee delete(Integer employeeId); /** * Deletes an existing Employee with the given object. * * @param employee The instance of the Employee to be deleted; value cannot be null. */ void delete(Employee employee); /** * Find all Employees matching the given QueryFilter(s). * All the QueryFilter(s) are ANDed to filter the results. * This method returns Paginated results. * * @deprecated Use {@link #findAll(String, Pageable)} instead. * * @param queryFilters Array of queryFilters to filter the results; No filters applied if the input is null/empty. * @param pageable Details of the pagination information along with the sorting options. If null returns all matching records. * @return Paginated list of matching Employees. * * @see QueryFilter * @see Pageable * @see Page */ @Deprecated Page<Employee> findAll(QueryFilter[] queryFilters, Pageable pageable); /** * Find all Employees matching the given input query. This method returns Paginated results. * Note: Go through the documentation for <u>query</u> syntax. * * @param query The query to filter the results; No filters applied if the input is null/empty. * @param pageable Details of the pagination information along with the sorting options. If null returns all matching records. * @return Paginated list of matching Employees. * * @see Pageable * @see Page */ Page<Employee> findAll(String query, Pageable pageable); /** * Exports all Employees matching the given input query to the given exportType format. * Note: Go through the documentation for <u>query</u> syntax. * * @param exportType The format in which to export the data; value cannot be null. * @param query The query to filter the results; No filters applied if the input is null/empty. * @param pageable Details of the pagination information along with the sorting options. If null exports all matching records. * @return The Downloadable file in given export type. * * @see Pageable * @see ExportType * @see Downloadable */ Downloadable export(ExportType exportType, String query, Pageable pageable); /** * Exports all Employees matching the given input query to the given exportType format. * * @param options The export options provided by the user; No filters applied if the input is null/empty. * @return The InputStream of the file in given export type. * * @see ExportOptions * @see Pageable * @see InputStream */ InputStream export(ExportOptions options, String query, Pageable pageable); /** * Retrieve the count of the Employees in the repository with matching query. * Note: Go through the documentation for <u>query</u> syntax. * * @param query query to filter results. No filters applied if the input is null/empty. * @return The count of the Employee. */ long count(String query); /** * Retrieve aggregated values with matching aggregation info. * * @param aggregationInfo info related to aggregations. * @param pageable Details of the pagination information along with the sorting options. If null exports all matching records. * @return Paginated data with included fields. * @see AggregationInfo * @see Pageable * @see Page */ Page<Map<String, Object>> getAggregatedValues(AggregationInfo aggregationInfo, Pageable pageable); /* * Returns the associated employeesForManagerId for given Employee id. * * @param empId value of empId; value cannot be null * @param pageable Details of the pagination information along with the sorting options. If null returns all matching records. * @return Paginated list of associated Employee instances. * * @see Pageable * @see Page */ Page<Employee> findAssociatedEmployeesForManagerId(Integer empId, Pageable pageable); /* * Returns the associated vacations for given Employee id. * * @param empId value of empId; value cannot be null * @param pageable Details of the pagination information along with the sorting options. If null returns all matching records. * @return Paginated list of associated Vacation instances. * * @see Pageable * @see Page */ Page<Vacation> findAssociatedVacations(Integer empId, Pageable pageable); }
[ "automate1@wavemaker.com" ]
automate1@wavemaker.com
2c30247eb4f6e573b616f32c5badb6c34bdb44b1
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_2/Testnull_109.java
c18ae20a9cb03291405a745bbc7b37b38e7a83eb
[]
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
300
java
package org.gradle.test.performancenull_2; import static org.junit.Assert.*; public class Testnull_109 { private final Productionnull_109 production = new Productionnull_109("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
c65941f4c2cf1a7a3a2aeb2e6896aba4700bb1fd
4a5b8d37d70aff90d9c3e4d6d53239c12726f88e
/lib-rxjava/src/main/java/cn/ollyice/library/rxjava/internal/operators/observable/ObservableSingleSingle.java
194637ad6ddf83ff935f233499ce7f22e36147b7
[]
no_license
paqxyz/AndGameDemo
29dfad61e371cf6db833107d903acffb8502e647
53271818ffff94564ec4e3337ebf4af13956d5de
refs/heads/master
2020-03-21T04:29:11.037764
2018-06-20T06:06:50
2018-06-20T06:06:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,277
java
/** * Copyright (c) 2016-present, RxJava Contributors. * * 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 cn.ollyice.library.rxjava.internal.operators.observable; import cn.ollyice.library.rxjava.*; import cn.ollyice.library.rxjava.disposables.Disposable; import cn.ollyice.library.rxjava.internal.disposables.DisposableHelper; import cn.ollyice.library.rxjava.plugins.RxJavaPlugins; import java.util.NoSuchElementException; public final class ObservableSingleSingle<T> extends Single<T> { final ObservableSource<? extends T> source; final T defaultValue; public ObservableSingleSingle(ObservableSource<? extends T> source, T defaultValue) { this.source = source; this.defaultValue = defaultValue; } @Override public void subscribeActual(SingleObserver<? super T> t) { source.subscribe(new SingleElementObserver<T>(t, defaultValue)); } static final class SingleElementObserver<T> implements Observer<T>, Disposable { final SingleObserver<? super T> actual; final T defaultValue; Disposable s; T value; boolean done; SingleElementObserver(SingleObserver<? super T> actual, T defaultValue) { this.actual = actual; this.defaultValue = defaultValue; } @Override public void onSubscribe(Disposable s) { if (DisposableHelper.validate(this.s, s)) { this.s = s; actual.onSubscribe(this); } } @Override public void dispose() { s.dispose(); } @Override public boolean isDisposed() { return s.isDisposed(); } @Override public void onNext(T t) { if (done) { return; } if (value != null) { done = true; s.dispose(); actual.onError(new IllegalArgumentException("Sequence contains more than one element!")); return; } value = t; } @Override public void onError(Throwable t) { if (done) { RxJavaPlugins.onError(t); return; } done = true; actual.onError(t); } @Override public void onComplete() { if (done) { return; } done = true; T v = value; value = null; if (v == null) { v = defaultValue; } if (v != null) { actual.onSuccess(v); } else { actual.onError(new NoSuchElementException()); } } } }
[ "289776839@qq.com" ]
289776839@qq.com
731996bf152ea0d7d21e7837c235c892029521c3
cca87c4ade972a682c9bf0663ffdf21232c9b857
/com/tencent/mm/protocal/c/bnk.java
041805c729a29b6ff06d404442196859875e8b71
[]
no_license
ZoranLi/wechat_reversing
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
refs/heads/master
2021-07-05T01:17:20.533427
2017-09-25T09:07:33
2017-09-25T09:07:33
104,726,592
12
1
null
null
null
null
UTF-8
Java
false
false
1,214
java
package com.tencent.mm.protocal.c; import com.tencent.mm.bd.a; public final class bnk extends a { public int tll; protected final int a(int i, Object... objArr) { if (i == 0) { ((a.a.a.c.a) objArr[0]).eO(1, this.tll); return 0; } else if (i == 1) { return a.a.a.a.eL(1, this.tll) + 0; } else { if (i == 2) { a.a.a.a.a aVar = new a.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (int a = a.a(aVar); a > 0; a = a.a(aVar)) { if (!super.a(aVar, this, a)) { aVar.cid(); } } return 0; } else if (i != 3) { return -1; } else { a.a.a.a.a aVar2 = (a.a.a.a.a) objArr[0]; bnk com_tencent_mm_protocal_c_bnk = (bnk) objArr[1]; switch (((Integer) objArr[2]).intValue()) { case 1: com_tencent_mm_protocal_c_bnk.tll = aVar2.xmD.mL(); return 0; default: return -1; } } } } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
76cf3754ad62c8306b497b6d7cff43d2f9f25e92
a35b7fd6516f335c0221a635df009114f475671a
/src/main/com/geekbrains/entities/DiskHib.java
f53dd7efe07f2839d270254af73eab5b6d6fde66
[]
no_license
petrol95/geek-spring
0d6e19cb2523df3dca88c3fdec909f404f676dcf
6733d410a63e8068d300e60d541aeeee3345d5fd
refs/heads/master
2020-04-30T01:02:45.239582
2019-04-01T05:15:49
2019-04-01T05:15:49
176,518,135
0
0
null
null
null
null
UTF-8
Java
false
false
999
java
package com.geekbrains.entities; import javax.persistence.*; import static javax.persistence.GenerationType.IDENTITY; @Entity @Table(name = "disk_hib") public class DiskHib { @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "id") private Long id; @Column(name = "title") private String title; @Column(name = "produced_year") private int producedYear; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public int getProducedYear() { return producedYear; } public void setProducedYear(int producedYear) { this.producedYear = producedYear; } public DiskHib() { } @Override public String toString() { return "DiskHib id = " + id + " title = " + title + " produced_year = " + producedYear; } }
[ "petrol195@yandex.ru" ]
petrol195@yandex.ru
03b323cf01824c544546d129e6390d21c2ebf9a3
a897cb7a8671c0bc4ef88345ae75cd9a2e95a3aa
/app/src/main/java/com/ourslook/zuoyeba/view/LookStudentLocationDialog.java
381cb2fd5b4a6f7307bf4079be4bb8eb2ecc3448
[]
no_license
dongerqiang/Ab_ZuoYeBaoNew
92e359499c09b289d9793ca3a629e17bba1ded53
5f73a8e4921edc06a607f632938c9e42a9794e85
refs/heads/master
2021-01-11T14:07:34.276423
2017-06-21T07:12:25
2017-06-21T07:12:25
94,974,433
0
1
null
null
null
null
UTF-8
Java
false
false
3,414
java
package com.ourslook.zuoyeba.view; import android.animation.ObjectAnimator; import android.animation.ValueAnimator; import android.content.Context; import android.media.MediaPlayer; import android.os.Handler; import android.os.Message; import android.view.View; import android.widget.ImageView; import com.baidu.mapapi.map.BaiduMap; import com.baidu.mapapi.map.BitmapDescriptor; import com.baidu.mapapi.map.BitmapDescriptorFactory; import com.baidu.mapapi.map.MapStatusUpdate; import com.baidu.mapapi.map.MapStatusUpdateFactory; import com.baidu.mapapi.map.MapView; import com.baidu.mapapi.map.MarkerOptions; import com.baidu.mapapi.map.OverlayOptions; import com.baidu.mapapi.model.LatLng; import com.ourslook.zuoyeba.R; import com.ourslook.zuoyeba.model.OrderDetailModel; import com.ourslook.zuoyeba.view.dialog.BaseDialog; import butterknife.Bind; /** * Created by huangyi on 16/5/20. * 抢单列表进去后订单详情页中点击查看学生的位置 */ public class LookStudentLocationDialog extends BaseDialog implements View.OnClickListener, ValueAnimator.AnimatorUpdateListener { @Bind(R.id.map_view_look_map) MapView mapViewLookMap; @Bind(R.id.iv_look_map_close) ImageView ivLookMapClose; BaiduMap mBaiduMap; ObjectAnimator showAnim; ObjectAnimator dismissAnim; OrderDetailModel orderDetailModel; LatLng studentLocation;//学生位置 private double mLat;//纬度 private double mLng;//经度 public LookStudentLocationDialog(Context context, double lng, double lat) { super(context, R.layout.dialog_look_map); mLat = lat; mLng = lng; init(); } private void init() { setOnClickListeners(this, ivLookMapClose); showAnim = ObjectAnimator.ofFloat(mView, "scaleY", 0f, 1f); showAnim.setDuration(1000); showAnim.addUpdateListener(this); dismissAnim = ObjectAnimator.ofFloat(mView, "scaleX", 1f, 0f); dismissAnim.setDuration(1000); dismissAnim.addUpdateListener(this); mBaiduMap = mapViewLookMap.getMap(); getStudentLocal(); } private void getStudentLocal() { studentLocation = new LatLng(mLat, mLng); MapStatusUpdate statusUpdate = MapStatusUpdateFactory.newLatLng(studentLocation); mBaiduMap.setMapStatus(statusUpdate); BitmapDescriptor bitmap = BitmapDescriptorFactory .fromResource(R.drawable.mylocation); //构建MarkerOption,用于在地图上添加Marker OverlayOptions option = new MarkerOptions() .position(studentLocation) .icon(bitmap); //在地图上添加Marker,并显示 mBaiduMap.addOverlay(option); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.iv_look_map_close://关闭 dismissing(); break; } } public void showing() { show(); showAnim.start(); } public void dismissing() { dismissAnim.start(); } @Override public void onAnimationUpdate(ValueAnimator animation) { if (animation == showAnim) {//展示动画 if (animation.getAnimatedFraction() == 1) {//消失 } } else { if (animation.getAnimatedFraction() == 1) {//出现 dismiss(); } } } }
[ "www.1371686510@qq.com" ]
www.1371686510@qq.com
dd79c5b9b15eb50c8809597a1bec830d128edbca
352b10ed3ab99d5687492f2707fd825047d10148
/src/main/java/com/sjc/consurrency/CountDownLatchDemo.java
6c19e7abce0f862b00e0525e49333a3ae4dfccd2
[]
no_license
sunjiecheng/Thinking-in-Java
81b260e4bc9c9137c9c0b37330cb0bb5e6c7ab23
4add447dac23483249e281879a337f2631701fc1
refs/heads/master
2022-02-24T08:40:21.154529
2019-09-21T08:45:18
2019-09-21T08:45:18
112,471,196
0
0
null
null
null
null
UTF-8
Java
false
false
2,254
java
package com.sjc.consurrency; /** * @author jiecheng * @create 2018-01-22 下午10:28 */ //: concurrency/CountDownLatchDemo.java import java.util.concurrent.*; import java.util.*; import static net.mindview.util.Print.*; // Performs some portion of a task: class TaskPortion implements Runnable { private static int counter = 0; private final int id = counter++; private static Random rand = new Random(47); private final CountDownLatch latch; TaskPortion(CountDownLatch latch) { this.latch = latch; } @Override public void run() { try { doWork(); latch.countDown(); } catch (InterruptedException ex) { // Acceptable way to exit } } public void doWork() throws InterruptedException { TimeUnit.MILLISECONDS.sleep(rand.nextInt(2000)); print(this + "completed"); } @Override public String toString() { return String.format("%1$-3d ", id); } } // Waits on the CountDownLatch: class WaitingTask implements Runnable { private static int counter = 0; private final int id = counter++; private final CountDownLatch latch; WaitingTask(CountDownLatch latch) { this.latch = latch; } @Override public void run() { try { latch.await(); print("Latch barrier passed for " + this); } catch (InterruptedException ex) { print(this + " interrupted"); } } @Override public String toString() { return String.format("WaitingTask %1$-3d ", id); } } public class CountDownLatchDemo { static final int SIZE = 100; public static void main(String[] args) throws Exception { ExecutorService exec = Executors.newCachedThreadPool(); // All must share a single CountDownLatch object: CountDownLatch latch = new CountDownLatch(SIZE); for (int i = 0; i < 10; i++) { exec.execute(new WaitingTask(latch)); } for (int i = 0; i < SIZE; i++) { exec.execute(new TaskPortion(latch)); } print("Launched all tasks"); exec.shutdown(); // Quit when all tasks complete } } /* (Execute to see output) *///:~
[ "tojiecheng@163.com" ]
tojiecheng@163.com
093732dc43ece609daeca3d0779fb0ea5481d354
482528f554ba0929f7e701b44b493163935c82b8
/domain/src/main/java/domain/sections/user_demo/list/SaveUserDemoSelectedListUseCase.java
702c44899f4fb3592e300b6df8bc8b7d5b635df3
[ "Apache-2.0" ]
permissive
danangkimhoa/espresso_BaseAppAndroid
a0e385c750f1a518767f18ee87f8845803c7ca66
47e586e66fedf572ee97956ab3885ba9f0a2755c
refs/heads/master
2022-12-10T17:55:54.320458
2016-04-05T19:38:15
2016-04-05T19:38:15
291,883,263
0
0
null
null
null
null
UTF-8
Java
false
false
1,503
java
/* * Copyright 2015 RefineriaWeb * * 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 domain.sections.user_demo.list; import javax.inject.Inject; import domain.foundation.UseCase; import domain.sections.UI; import domain.sections.user_demo.UserDemoRepository; import domain.sections.user_demo.entities.UserDemoEntity; import rx.Observable; public class SaveUserDemoSelectedListUseCase extends UseCase<Boolean> { private final UserDemoRepository repository; private UserDemoEntity userDemoEntity; @Inject public SaveUserDemoSelectedListUseCase(UI ui, UserDemoRepository repository) { super(ui); this.repository = repository; } public SaveUserDemoSelectedListUseCase with(UserDemoEntity userDemoEntity) { this.userDemoEntity = userDemoEntity; return this; } @Override public Observable<Boolean> react() { assert userDemoEntity != null; return repository.saveSelectedUserDemoList(userDemoEntity); } }
[ "victor@refineriaweb.com" ]
victor@refineriaweb.com
6d7de5d5b591b9ab6da6313681664815dab27edb
9595597ae76c409023698b0c3e29fc57094a9665
/src/java/br/edu/ifnmg/GerenciamentoEventos/DomainModel/Servicos/QuestionarioRespostaRepositorio.java
c2d7e71fb146f77e1dcb908e7bc7d04e431a1704
[]
no_license
pcego/GerenciadorEventos
3ddfe5e251266723e9580b5240acb12cd9be297a
d31a2e50ca503411ef1ba5827c6bb4d4c84aba11
refs/heads/master
2021-01-18T06:16:31.738644
2014-06-10T13:03:09
2014-06-10T13:03:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
730
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package br.edu.ifnmg.GerenciamentoEventos.DomainModel.Servicos; import br.edu.ifnmg.GerenciamentoEventos.DomainModel.Inscricao; import br.edu.ifnmg.GerenciamentoEventos.DomainModel.Pessoa; import br.edu.ifnmg.GerenciamentoEventos.DomainModel.Questionario; import br.edu.ifnmg.GerenciamentoEventos.DomainModel.QuestionarioResposta; import javax.ejb.Local; /** * * @author petronio */ @Local public interface QuestionarioRespostaRepositorio extends Repositorio<QuestionarioResposta> { public QuestionarioResposta Abrir(Pessoa p, Questionario q); public QuestionarioResposta Abrir(Inscricao i); }
[ "petronio.candido@gmail.com" ]
petronio.candido@gmail.com
c25c625beb5d152583908bd34d21611901b7303b
f417f06678511421db3416f1741eadd99f73251c
/library/src/main/java/dev/nick/library/Migrater.java
779a2c1e5b7a4715f85555a70ab73914cdfc93ae
[]
no_license
Tornaco/X-Migrate
125827deb6b185de085e61f44a1e5d44310b8aa8
5f978c0946af1de9c9b38855de2dd4a9ed138b9f
refs/heads/master
2021-01-01T11:58:23.348619
2017-07-20T09:05:53
2017-07-20T09:05:53
97,577,421
0
0
null
null
null
null
UTF-8
Java
false
false
5,811
java
package dev.nick.library; import android.content.Context; import android.support.annotation.NonNull; import com.google.common.collect.Lists; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; import java.util.concurrent.FutureTask; import dev.nick.library.common.SharedExecutor; import dev.nick.library.loader.Loader; import dev.nick.library.loader.LoaderListener; import dev.nick.library.loader.LoaderSource; import dev.nick.library.model.Category; import dev.nick.library.model.android.AndroidData; import dev.nick.library.model.android.FileBasedData; /** * Main class for this lib. */ public class Migrater { private Context context; private Migrater(Context context) { this.context = context; } public static Migrater with(Context context) { return new Migrater(context); } public LoadRequest.LoadRequestBuilder load(Category category) { return LoadRequest.builder(context, category); } public StreamRequest.StreamRequestBuilder stream(FileBasedData fileBasedData) { return StreamRequest.builder(fileBasedData); } static class LoadRequest { private Category category; private LoaderSource loaderSource; private Loader.Filter<AndroidData> filter; private LoaderListener<AndroidData> loaderListener; public LoadRequest(Category category, LoaderSource loaderSource, Loader.Filter<AndroidData> filter, LoaderListener<AndroidData> loaderListener) { this.category = category; this.loaderSource = loaderSource; this.filter = filter; this.loaderListener = loaderListener; } public static LoadRequestBuilder builder(Context context, Category category) { return new LoadRequestBuilder(context, category); } public static class LoadRequestBuilder { private Category category; private LoaderSource loaderSource; private Loader.Filter<AndroidData> filter; private LoaderListener<AndroidData> loaderListener; private Context context; LoadRequestBuilder(Context context, Category category) { this.category = category; this.context = context; } public LoadRequest.LoadRequestBuilder source(LoaderSource loaderSource) { this.loaderSource = loaderSource; return this; } public LoadRequest.LoadRequestBuilder filter(Loader.Filter<AndroidData> filter) { this.filter = filter; return this; } public LoadRequest.LoadRequestBuilder loaderListener(LoaderListener<AndroidData> loaderListener) { this.loaderListener = loaderListener; return this; } public LoadRequestTask future() { LoadRequest loadRequest = new LoadRequest(category, loaderSource, filter, loaderListener); return new LoadRequestTask(loadRequest, context); } } public static class LoadRequestTask extends FutureTask<List<AndroidData>> { LoadRequestTask(final LoadRequest request, final Context context) { super(new Callable<List<AndroidData>>() { @Override public List<AndroidData> call() throws Exception { if (request.loaderListener != null) { request.loaderListener.onStartLoading(); } Category c = request.category; Loader<AndroidData> loader = c.getLoader(request.loaderSource); loader.wireContext(context); List<AndroidData> dataList = Lists.newArrayList(); try { dataList = loader.load(request.filter); if (request.loaderListener != null) { request.loaderListener.onLoadingComplete(dataList); } } catch (Throwable e) { if (request.loaderListener != null) { request.loaderListener.onLoadingFailure(e); } } return dataList; } }); } public LoadRequestTask execute(@NonNull Executor executor) { executor.execute(this); return this; } public LoadRequestTask execute() { execute(SharedExecutor.getService()); return this; } public List<AndroidData> getSafety() { try { return get(); } catch (InterruptedException | ExecutionException e) { return Lists.newArrayList(); } } } } static class StreamRequest { private FileBasedData fileBasedData; static StreamRequestBuilder builder(FileBasedData fileBasedData) { return new StreamRequestBuilder(fileBasedData); } public static class StreamRequestBuilder { private FileBasedData fileBasedData; private StreamRequestBuilder(FileBasedData fileBasedData) { this.fileBasedData = fileBasedData; } } } }
[ "guohao4@lenovo.com" ]
guohao4@lenovo.com
d38d6a53cc894827d398a9acc5999c497f41c6b1
f7397e43bc4001b8d4e557b4754c5c2b06c4a86d
/providers/jdbc/shedlock-test-support-jdbc/src/main/java/net/javacrumbs/shedlock/test/support/jdbc/AbstractMsSqlServerJdbcLockProviderIntegrationTest.java
bac4a01a5b85fb661aa10a35e60b221f565f626e
[ "Apache-2.0" ]
permissive
eurafa/ShedLock
6f4f5d1bed115c5d84693e8047f62890c18a5ecc
18571c78c635eb4a0031f36ef4815d9da142eab0
refs/heads/master
2022-09-15T10:03:13.021983
2020-05-29T02:03:46
2020-05-29T02:03:46
267,741,588
0
0
Apache-2.0
2020-05-29T02:03:47
2020-05-29T01:58:53
null
UTF-8
Java
false
false
1,554
java
/** * Copyright 2009-2020 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.javacrumbs.shedlock.test.support.jdbc; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; public abstract class AbstractMsSqlServerJdbcLockProviderIntegrationTest extends AbstractJdbcLockProviderIntegrationTest { private static final MsSqlServerConfig dbConfig = new MsSqlServerConfig(); @BeforeAll public static void startMySql() { dbConfig.startDb(); } @AfterAll public static void shutDownMysql() { dbConfig.shutdownDb(); } @Override protected DbConfig getDbConfig() { return dbConfig; } @Test @Override public void shouldCreateLockIfRecordAlreadyExists() { testUtils.getJdbcTemplate().update("INSERT INTO shedlock(name, lock_until, locked_at, locked_by) VALUES(?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ?)", LOCK_NAME1, "me"); shouldCreateLock(); } }
[ "lukas@krecan.net" ]
lukas@krecan.net
1eeca2f07b6372035bcebe66e21ce1ead2bd91bb
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
/sources/com/google/android/gms/internal/ads/zzcft.java
32cfd4e2f8e84a58d8b21b345007882d47db4e60
[]
no_license
sengeiou/KnowAndGo-android-thunkable
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
39e809d0bbbe9a743253bed99b8209679ad449c9
refs/heads/master
2023-01-01T02:20:01.680570
2020-10-22T04:35:27
2020-10-22T04:35:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
930
java
package com.google.android.gms.internal.ads; import java.util.Set; import java.util.concurrent.Executor; public final class zzcft implements zzdti<Set<zzbuz<zzbsr>>> { private final zzdtu<Executor> zzfgh; private final zzdtu<zzcfz> zzfuc; private final zzcfp zzfux; private zzcft(zzcfp zzcfp, zzdtu<zzcfz> zzdtu, zzdtu<Executor> zzdtu2) { this.zzfux = zzcfp; this.zzfuc = zzdtu; this.zzfgh = zzdtu2; } public static zzcft zzd(zzcfp zzcfp, zzdtu<zzcfz> zzdtu, zzdtu<Executor> zzdtu2) { return new zzcft(zzcfp, zzdtu, zzdtu2); } public static Set<zzbuz<zzbsr>> zza(zzcfp zzcfp, zzcfz zzcfz, Executor executor) { return (Set) zzdto.zza(zzcfp.zzc(zzcfz, executor), "Cannot return null from a non-@Nullable @Provides method"); } public final /* synthetic */ Object get() { return zza(this.zzfux, this.zzfuc.get(), this.zzfgh.get()); } }
[ "joshuahj.tsao@gmail.com" ]
joshuahj.tsao@gmail.com
b9f5da8282174e4fac77823a7dae8c469c52e2ef
fca6e069c335dc8442618e36d4c0f97ede2c6a06
/src/com/mixshare/rapid_evolution/audio/tags/writers/asf/JAudioASFTagWriter.java
4eb9dad0edf8334cbeb35343cbfbda10b54785fb
[]
no_license
divideby0/RapidEvolution3
127255648bae55e778321067cd7bb5b979684b2c
f04058c6abfe520442a75b3485147f570f7d538e
refs/heads/master
2020-03-22T00:56:26.188151
2018-06-30T20:41:26
2018-06-30T20:41:26
139,274,034
0
0
null
2018-06-30T19:19:57
2018-06-30T19:19:57
null
UTF-8
Java
false
false
1,129
java
package com.mixshare.rapid_evolution.audio.tags.writers.asf; import java.io.File; import org.apache.log4j.Logger; import org.jaudiotagger.audio.AudioFileIO; import org.jaudiotagger.tag.asf.AsfTag; import com.mixshare.rapid_evolution.audio.tags.writers.JAudioGenericTagWriter; public class JAudioASFTagWriter extends JAudioGenericTagWriter { private static Logger log = Logger.getLogger(JAudioASFTagWriter.class); protected AsfTag asfTag = null; public JAudioASFTagWriter(String filename, int mode) { super(); try { this.filename = filename; if (log.isDebugEnabled()) log.debug("JAudioASFTagWriter(): filename=" + filename); audiofile = AudioFileIO.read(new File(filename)); if (audiofile != null) { tag = audiofile.getTag(); asfTag = (AsfTag)tag; if (log.isDebugEnabled()) log.debug("JAudioASFTagWriter(): tag=" + tag); } } catch (Exception e) { log.error("JAudioASFTagWriter(): error Exception", e); } } }
[ "jbickmore@gmail.com" ]
jbickmore@gmail.com
ed564f17e046487267145bfd58ecfd0f51c85aa2
b453307cd13fcc7556e4147f6760fb5e54054442
/src/com/softsynth/upload/UploadListener.java
ae1ed74719bc563f85520339fc92ecad365b8e62
[ "Apache-2.0" ]
permissive
philburk/listenup
d24408d9ad314c4f010fb2f0d834632d71279339
87ce69d55d6cc52f9d289c4edd1105cb3a39e178
refs/heads/master
2021-01-19T07:29:16.438657
2018-12-01T22:25:11
2018-12-01T22:25:11
84,015,648
8
1
null
null
null
null
UTF-8
Java
false
false
337
java
package com.softsynth.upload; import java.io.InputStream; /** * Listen for the progress and completion of an upload. * @author Phil Burk (C) 2009 Mobileer Inc */ public abstract class UploadListener { public InputStream filterInputStream( InputStream inStream ) { return inStream; } public abstract void uploadComplete( ); }
[ "philburk@mobileer.com" ]
philburk@mobileer.com
4df300d9d2138e49fab2b7132f622fec11d313f6
71b919749069accbdbfc35f7dba703dd5c5780a6
/learn-lambda/src/main/java/com/xp/example/ThrowExceptionFunction.java
edb2f8b1550584f1140174e98471ef448e626e57
[ "MIT" ]
permissive
xp-zhao/learn-java
489f811acf20649b773032a6831fbfc72dc4c418
108dcf1e4e02ae76bfd09e7c2608a38a1216685c
refs/heads/master
2023-09-01T03:07:23.795372
2023-08-25T08:28:59
2023-08-25T08:28:59
118,060,929
2
0
MIT
2022-06-21T04:16:08
2018-01-19T01:39:11
Java
UTF-8
Java
false
false
275
java
package com.xp.example; /** * 抛出异常的接口 * * @author zhaoxiaoping * @date 2021-11-24 */ @FunctionalInterface public interface ThrowExceptionFunction { /** * 抛出异常消息 * * @param message 消息 */ void throwMessage(String message); }
[ "13688396271@163.com" ]
13688396271@163.com
42aebf464828b2e2ca348fc7e694e933eb78ad0f
8a25b1aa7d446218747c7b89de6ed482a10de3fd
/p1361_cursorloader/src/main/java/com/startandroid/p1361_cursorloader/DB.java
6ea2e1c3a1e284d21633762538c4b8ae91d7b4e5
[]
no_license
Pavel081215/Sherlock3with50
604953cb75d89274c3102cb83bbdfc83c744e516
c3402fcc7bf86c9cc3373bd4735dade9a0c66e63
refs/heads/master
2021-06-30T02:04:25.755464
2017-09-19T17:30:10
2017-09-19T17:30:10
103,031,887
0
0
null
null
null
null
UTF-8
Java
false
false
2,827
java
package com.startandroid.p1361_cursorloader; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; public class DB { private static final String DB_NAME = "mydb"; private static final int DB_VERSION = 1; private static final String DB_TABLE = "mytab"; public static final String COLUMN_ID = "_id"; public static final String COLUMN_IMG = "img"; public static final String COLUMN_TXT = "txt"; private static final String DB_CREATE = "create table " + DB_TABLE + "(" + COLUMN_ID + " integer primary key autoincrement, " + COLUMN_IMG + " integer, " + COLUMN_TXT + " text" + ");"; private final Context mCtx; private DBHelper mDBHelper; private SQLiteDatabase mDB; public DB(Context ctx) { mCtx = ctx; } // открыть подключение public void open() { mDBHelper = new DBHelper(mCtx, DB_NAME, null, DB_VERSION); mDB = mDBHelper.getWritableDatabase(); } // закрыть подключение public void close() { if (mDBHelper!=null) mDBHelper.close(); } // получить все данные из таблицы DB_TABLE public Cursor getAllData() { return mDB.query(DB_TABLE, null, null, null, null, null, null); } // добавить запись в DB_TABLE public void addRec(String txt, int img) { ContentValues cv = new ContentValues(); cv.put(COLUMN_TXT, txt); cv.put(COLUMN_IMG, img); mDB.insert(DB_TABLE, null, cv); } // удалить запись из DB_TABLE public void delRec(long id) { mDB.delete(DB_TABLE, COLUMN_ID + " = " + id, null); } // класс по созданию и управлению БД private class DBHelper extends SQLiteOpenHelper { public DBHelper(Context context, String name, CursorFactory factory, int version) { super(context, name, factory, version); } // создаем и заполняем БД @Override public void onCreate(SQLiteDatabase db) { db.execSQL(DB_CREATE); ContentValues cv = new ContentValues(); for (int i = 1; i < 5; i++) { cv.put(COLUMN_TXT, "sometext " + i); cv.put(COLUMN_IMG, R.mipmap.ic_launcher); db.insert(DB_TABLE, null, cv); } } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } } }
[ "pavelzag12@gmail.com" ]
pavelzag12@gmail.com
c0d497ef61e25531c83e7c08f1869c0774558989
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-12889-1-10-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/xwiki/rest/internal/DomainObjectFactory_ESTest.java
42aac2a0ff192c635d5ce3eeff5f32ad3b5ae705
[ "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
4,895
java
/* * This file was automatically generated by EvoSuite * Tue Oct 26 01:57:44 UTC 2021 */ package org.xwiki.rest.internal; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import ch.qos.logback.classic.Logger; import com.xpn.xwiki.XWikiContext; import com.xpn.xwiki.objects.BaseObject; import com.xpn.xwiki.objects.BaseStringProperty; import java.net.URI; import java.util.LinkedList; import org.apache.batik.gvt.text.GVTAttributedCharacterIterator; import org.codehaus.groovy.control.CompilerConfiguration; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.evosuite.runtime.javaee.injection.Injector; import org.hibernate.cfg.annotations.MapKeyColumnDelegator; import org.hibernate.loader.custom.sql.SQLCustomQuery; import org.junit.runner.RunWith; import org.slf4j.helpers.NOPLogger; import org.xwiki.component.manager.ComponentManager; import org.xwiki.job.DefaultJobStatus; import org.xwiki.job.DefaultRequest; import org.xwiki.job.event.status.JobStatus; import org.xwiki.logging.logback.internal.DefaultLoggerManager; import org.xwiki.model.reference.EntityReferenceSerializer; import org.xwiki.observation.ObservationManager; import org.xwiki.observation.internal.DefaultObservationManager; import org.xwiki.rest.internal.DomainObjectFactory; import org.xwiki.rest.internal.ModelFactory; import org.xwiki.rest.internal.resources.pages.PageResourceImpl; import org.xwiki.rest.model.jaxb.ObjectFactory; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class DomainObjectFactory_ESTest extends DomainObjectFactory_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { BaseObject baseObject0 = new BaseObject(); BaseStringProperty baseStringProperty0 = new BaseStringProperty(); baseObject0.addPropertyForRemoval(baseStringProperty0); MapKeyColumnDelegator mapKeyColumnDelegator0 = mock(MapKeyColumnDelegator.class, new ViolatedAssumptionAnswer()); Boolean boolean0 = GVTAttributedCharacterIterator.TextAttribute.OVERLINE_ON; baseObject0.getOwnerDocument(); XWikiContext xWikiContext0 = new XWikiContext(); ObjectFactory objectFactory0 = new ObjectFactory(); CompilerConfiguration compilerConfiguration0 = CompilerConfiguration.DEFAULT; LinkedList<String> linkedList0 = new LinkedList<String>(); Integer integer0 = GVTAttributedCharacterIterator.TextAttribute.WRITING_MODE_RTL; ModelFactory modelFactory0 = new ModelFactory(); EntityReferenceSerializer<PageResourceImpl> entityReferenceSerializer0 = (EntityReferenceSerializer<PageResourceImpl>) mock(EntityReferenceSerializer.class, new ViolatedAssumptionAnswer()); DefaultRequest defaultRequest0 = new DefaultRequest(); DefaultObservationManager defaultObservationManager0 = new DefaultObservationManager(); ComponentManager componentManager0 = mock(ComponentManager.class, new ViolatedAssumptionAnswer()); Injector.inject(defaultObservationManager0, (Class<?>) DefaultObservationManager.class, "componentManager", (Object) componentManager0); NOPLogger nOPLogger0 = NOPLogger.NOP_LOGGER; Injector.inject(defaultObservationManager0, (Class<?>) DefaultObservationManager.class, "logger", (Object) nOPLogger0); Injector.validateBean(defaultObservationManager0, (Class<?>) DefaultObservationManager.class); DefaultLoggerManager defaultLoggerManager0 = new DefaultLoggerManager(); Logger logger0 = (Logger)SQLCustomQuery.log; Injector.inject(defaultLoggerManager0, (Class<?>) DefaultLoggerManager.class, "logger", (Object) logger0); ObservationManager observationManager0 = mock(ObservationManager.class, new ViolatedAssumptionAnswer()); Injector.inject(defaultLoggerManager0, (Class<?>) DefaultLoggerManager.class, "observation", (Object) observationManager0); Injector.validateBean(defaultLoggerManager0, (Class<?>) DefaultLoggerManager.class); DefaultJobStatus<DefaultRequest> defaultJobStatus0 = new DefaultJobStatus<DefaultRequest>(defaultRequest0, (JobStatus) null, defaultObservationManager0, defaultLoggerManager0); DefaultRequest defaultRequest1 = defaultJobStatus0.getRequest(); DefaultRequest defaultRequest2 = new DefaultRequest(defaultRequest1); DefaultJobStatus<DefaultRequest> defaultJobStatus1 = new DefaultJobStatus<DefaultRequest>(defaultRequest2, defaultJobStatus0, defaultObservationManager0, defaultLoggerManager0); defaultJobStatus0.getParentJobStatus(); ObjectFactory objectFactory1 = new ObjectFactory(); // Undeclared exception! DomainObjectFactory.createJobStatus(objectFactory1, (URI) null, defaultJobStatus0); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
057f6fd82a62fb0b52923cb42c0a00b1e6e5506c
6e7b4f44e8d8008113d1c7a911ca8d0a8adea141
/app/src/main/java/com/yh/mohudaily/util/DbUtil.java
c62694a146fd051306d0e4c7435d1c7aca6c55bf
[]
no_license
alex322326/MohuDaily
e04efef7994ff9d35843c8169d8a5037123b5e3d
e1b030029f27d13d8d786e93f0ab65a83385e59b
refs/heads/master
2020-06-10T00:26:11.644740
2016-12-11T13:57:06
2016-12-11T13:57:06
76,121,549
1
0
null
null
null
null
UTF-8
Java
false
false
2,121
java
package com.yh.mohudaily.util; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import com.yh.mohudaily.MohuDaily; /** * Created by YH on 2016/12/8. */ public class DbUtil { public static final int LATEST_COLUMN = Integer.MAX_VALUE; public static final int BASE_COLUMN = 100000000; private static DbUtil util=null; private DbCacheHelper dbHelper; private DbUtil(){ dbHelper = new DbCacheHelper(MohuDaily.getInstance(), 1); } public static DbUtil getInstance(){ if(util==null){ synchronized (DbUtil.class){ if(util==null){ util = new DbUtil(); } } } return util; } public void saveNewsCache(String date,String news){ SQLiteDatabase db = dbHelper.getWritableDatabase(); db.execSQL("replace into CacheList(date,json) values(" + LATEST_COLUMN + ",' " + news + "')"); db.close(); } public String getNewsCache(){ String json=null; SQLiteDatabase db = dbHelper.getReadableDatabase(); Cursor cursor = db.rawQuery("select * from CacheList where date = " + LATEST_COLUMN, null); if (cursor.moveToFirst()) { json = cursor.getString(cursor.getColumnIndex("json")); } cursor.close(); db.close(); return json; } public void saveNewsContentCache(String id,String content){ SQLiteDatabase db = dbHelper.getWritableDatabase(); db.execSQL("replace into CacheList(date,json) values(" + Integer.parseInt(id) + ",' " + content + "')"); db.close(); } public String getNewsContentCache(String id){ String json=null; SQLiteDatabase db = dbHelper.getReadableDatabase(); Cursor cursor = db.rawQuery("select * from CacheList where date = " +Integer.parseInt(id), null); if (cursor.moveToFirst()) { json = cursor.getString(cursor.getColumnIndex("json")); } cursor.close(); db.close(); return json; } }
[ "you@example.com" ]
you@example.com
d5b4e3225b9d59b7d8ff45d071bde4143d64754c
bcc007c0040999026621a75f0b3ae6488aad6555
/src/main/java/PartOfType.java
67f1867453b20d59e082dba3811353db1c1097ee
[]
no_license
ics-upmc/ontolurgences_fma
1d2ebe05dacc7ff2ddbd2c8ee4457675272dc4c0
f1d731daf6c429c330c23f86d6ec292ddc7ebf43
refs/heads/master
2021-01-15T22:29:24.852255
2015-09-02T02:34:37
2015-09-02T02:34:37
41,397,556
0
0
null
null
null
null
UTF-8
Java
false
false
1,003
java
import org.semanticweb.owlapi.model.IRI; public enum PartOfType { REGIONAL_PART, CONSTITUTIONAL_PART, MEMBER; public IRI getPartIRI() { String name = name().toLowerCase(); return IRI.create(Namespace.FMA.getNS(), name); } public IRI getPartOfIRI() { String name = name().toLowerCase() + "_of"; return IRI.create(Namespace.FMA.getNS(), name); } public static boolean isSomePart(IRI part) { for(PartOfType type: values()) { if(type.getPartIRI().equals(part)) return true; } return false; } public static boolean isSomePartOf(IRI part) { for(PartOfType type: values()) { if(type.getPartOfIRI().equals(part)) return true; } return false; } public static PartOfType getTypeFromIri(IRI relation) { for(PartOfType type: values()) { if(type.getPartOfIRI().equals(relation)) return type; if(type.getPartIRI().equals(relation)) return type; } throw new IllegalArgumentException("Relation "+relation.toQuotedString()+" is not a part relation"); } }
[ "laurent.mazuel@gmail.com" ]
laurent.mazuel@gmail.com
ed17f14ab928a70e6ff96f17afa0189db04f8359
d15fc36d8cb26f7fa2cb1ef1568a22ce8827137e
/workspace_java/dev_java/src/book/chap08/CarTest.java
97e4e8570ed541c2bfbc55172d49e7b6c9a1e491
[]
no_license
kimsh0306/allData20200221
7aeb50cff8b87192c1a3921ff5c5a8d5a88f6e75
84c85a48ea5c05012bdd473e94ee0b74c59c7951
refs/heads/master
2021-01-08T20:06:25.465204
2020-04-19T12:48:41
2020-04-19T12:48:41
242,128,173
0
0
null
null
null
null
UTF-8
Java
false
false
2,054
java
package book.chap08; public class CarTest { //오른쪽엔 항상 왼쪽보다 하위 클래스가 와야 한다. public static void main(String[] args) { //myCar로 접근할 수 있는 변수의 갯수는 몇 개 일까요? speed //myCar로 호출할 수 있는 메소드의 갯수는 몇 개 일까요? stop() //Car로 객체를 생성한 경우에는 메소드 한 개 변수 한 개만 호출 할 수 있어요. /* myCar의 타입이 Car타입이어서 Tivoli타입의 변수나 메소드는 한 개도 접근, 호출이 * 불가합니다. * 이것은 new Tivoli()로 인스턴스화 한 경우에도 동일하게 적용됩니다. * 다시 말하지만 타입이 Car타입이어서 생성부의 이름이 설사 Tivoli가 온다 하더라도 * Tivoli타입의 변수나 메소드는 접고, 호출이 불가하다는 것이죠. * 이런 경우 메소드는 부모와 자식클래스 모두에 선언해 놓으면[메소드오버라이드] 호출은 가능합니다. * 만일 부모에는 존재하고 자식에는 존재하지 않는 메소드의 경우 둘 다 무조건 부모메소드가 호출된다. * 그러나 변수는...? */ Car myCar = new Car(); System.out.println(myCar.speed); myCar.stop(); myCar = null; //반드시 널(=>이제 필요 없는 물건이야, 이제 버릴거야)로 처리한 다음에 인스턴스화 하게 되면 자바가상머신이 candidate(분리수거통에 넣은 상태)상태로 만들어 준다.메모리 관리. myCar = new Tivoli(); //윗라인에서 현라인으로 진행되는 과정에서 candidate상태가 됨(쓰레기값) System.out.println(myCar.speed); myCar.stop(); //Car에 있는 stop()가 Tivoli에도 있기 때문에[오버라이드] Tivoli의 stop()이 호출*********** //herCar로 접근할 수 있는 변수의 갯수는 몇 개 일까요? carColor, volumn, speed //herCar로 호출할 수 있는 메소드의 갯수는 몇 개 일까요? volumnUp(), volumnDown(), stop() Tivoli herCar = null; //Car himCar = null; } }
[ "b666790@gmail.com" ]
b666790@gmail.com
fe980f079975fc487f29d7f9539a7bbb3eaf2074
88d41a18d1ad0ccc1a79b623cf4006e52f6e20ab
/docs/spring/csff34a5d0-0fd3-11ee-95c6-acde48001122.java
a1c00d81ef720ba15058860e8075d04b2ec4e652
[ "Apache-2.0" ]
permissive
huifer/javaBook-src
87369e5f175197166dcae49ffde9a41ad3965bf7
5f319dbf46401f7f5770ed3ca80079e48392d2f8
refs/heads/master
2023-08-30T12:58:56.644540
2023-08-30T01:36:09
2023-08-30T01:36:09
173,409,096
57
19
Apache-2.0
2023-02-22T08:11:26
2019-03-02T05:51:32
Java
UTF-8
Java
false
false
465
java
package com.huifer.xz.entity; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; @Data public class TStinfo implements Serializable { private Integer fid; private BigDecimal sumDuration; private BigDecimal sumDistance; private BigDecimal sumElevationGain; private BigDecimal countDistance; private BigDecimal sumCredits; private Integer userId; private Integer year; private Integer month; }
[ "huifer97@163.com" ]
huifer97@163.com
1692285392d23284f8b3739b88bae970c6ab826f
82262cdae859ded0f82346ed04ff0f407b18ea6f
/win-back/winback-core/core-service/src/main/java/com/winback/core/model/contract/TFavoriteContract.java
dfb96b6475691e1b8c65b58500134f22c5e2fca7
[]
no_license
dwifdji/real-project
75ec32805f97c6d0d8f0935f7f92902f9509a993
9ddf66dfe0493915b22132781ef121a8d4661ff8
refs/heads/master
2020-12-27T14:01:37.365982
2019-07-26T10:07:27
2019-07-26T10:07:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,704
java
package com.winback.core.model.contract; /** * <p>封装实体bean</p> * @author Generator * @date 2019年01月18日 13时38分36秒 */ public class TFavoriteContract implements java.io.Serializable{ /** * */ private Integer id; /** * 账户id */ private Integer accountId; /** * 合同id */ private Integer contractId; /** * 删除标志(0 否 1 是) */ private Boolean deleteFlag; /** * 创建时间 */ private java.util.Date createTime; /** * 更新时间 */ private java.util.Date updateTime; /** * */ public Integer getId(){ return id; } /** * */ public void setId(Integer id){ this.id = id; } /** * 账户id */ public Integer getAccountId(){ return accountId; } /** * 账户id */ public void setAccountId(Integer accountId){ this.accountId = accountId; } /** * 合同id */ public Integer getContractId(){ return contractId; } /** * 合同id */ public void setContractId(Integer contractId){ this.contractId = contractId; } /** * 删除标志(0 否 1 是) */ public Boolean getDeleteFlag(){ return deleteFlag; } /** * 删除标志(0 否 1 是) */ public void setDeleteFlag(Boolean deleteFlag){ this.deleteFlag = deleteFlag; } /** * 创建时间 */ public java.util.Date getCreateTime(){ return createTime; } /** * 创建时间 */ public void setCreateTime(java.util.Date createTime){ this.createTime = createTime; } /** * 更新时间 */ public java.util.Date getUpdateTime(){ return updateTime; } /** * 更新时间 */ public void setUpdateTime(java.util.Date updateTime){ this.updateTime = updateTime; } }
[ "15538068782@163.com" ]
15538068782@163.com
41559fe50fa7d959a6f9b9ed8db2e0417a21ca0c
46c6cb99ff9f64eeec239398e09e85cd32f0e384
/src/main/java/gr/upatras/ece/nam/baker/model/UserSession.java
7b2f8fe2513ef10253858fc364a7277228fadfa4
[ "Apache-2.0" ]
permissive
ctranoris/fish-marketplace
0dc12fa94381f54515b28ba0ba5bbac5ecd823e0
5b922234d4dde6443883b22760762da1fbcbaa94
refs/heads/master
2021-01-18T14:06:27.510653
2015-02-26T12:04:31
2015-02-26T12:04:31
31,317,207
1
1
null
null
null
null
UTF-8
Java
false
false
1,491
java
/** * Copyright 2014 University of Patras * * 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 gr.upatras.ece.nam.baker.model; import gr.upatras.ece.nam.baker.fiware.FIWAREUser; public class UserSession { private String username = null; private String password = null; private BakerUser bakerUser = null; private FIWAREUser FIWAREUser = null; public UserSession() { super(); } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public BakerUser getBakerUser() { return bakerUser; } public void setBakerUser(BakerUser bakerUser) { this.bakerUser = bakerUser; } public FIWAREUser getFIWAREUser() { return FIWAREUser; } public void setFIWAREUser(FIWAREUser fIWAREUser) { FIWAREUser = fIWAREUser; } }
[ "tranoris@88d6be61-b049-4d1a-ac2d-38c3f0f8cafa" ]
tranoris@88d6be61-b049-4d1a-ac2d-38c3f0f8cafa
60091f8ece56ffd61525398ec1646689a49f9088
3ddf06e42c8f11f8e508f71433043caf06a9e7e0
/app/src/main/java/com/mxi/ecommerce/model/CategoryBrandChildData.java
5d173a8f1627fe60bbbdea8f00f37de3e36502b4
[]
no_license
SkyCoders007/Dada_Ecom_App
2b31fbaa458a994704777dd73cd0b8c4edb156af
bcbe890243b5c8fa201ad887d6a9278deb436f19
refs/heads/master
2020-03-16T19:00:11.691014
2018-05-10T12:21:54
2018-05-10T12:21:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
442
java
package com.mxi.ecommerce.model; /** * Created by sonali on 18/12/17. */ public class CategoryBrandChildData { String name; String brand_id; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getBrand_id() { return brand_id; } public void setBrand_id(String brand_id) { this.brand_id = brand_id; } }
[ "soniakash94@gmail.com" ]
soniakash94@gmail.com
87b3f0f129f795d165e5b85ab1055c82e1c21a06
52f6f01df20a59999f50cc78c0d692546920d518
/src/main/java/com/naya/springpatterns/scala_traits/WorkerImpl.java
a0b5d9ebf6f33bee836efe13ba97b5a252f93e4c
[]
no_license
Jeka1978/spring-patterns
822c02177e34086b4e758f859e74fb55eec08201
e2fecbd8d55a8cad3f64bc8a36a8a59d3756d80a
refs/heads/master
2021-06-27T20:32:25.177055
2020-10-28T15:47:02
2020-10-28T15:47:02
162,981,396
0
1
null
null
null
null
UTF-8
Java
false
false
491
java
package com.naya.springpatterns.scala_traits; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.stereotype.Component; /** * @author Evgeny Borisov */ @Component public class WorkerImpl implements Worker { @Override public void doWork() { System.out.println("Work 1111111111"); } public static void main(String[] args) { new AnnotationConfigApplicationContext("com.naya.springpatterns"); } }
[ "kit2009" ]
kit2009
419349ec52857388449dc60184ff380070533b8f
ad1d6b10ab1c322db396227f0c0cf083f13ac08d
/app/src/main/java/com/lh/biliclient/model/IMainBanguiFragmentModel.java
52a7e2687a578cec48d35a728ffb96f1eb589c59
[]
no_license
sunyymq/BiliClient
6f4678b4dcb5b544fa4c89a91f0573cff96d5ea2
1433e869ce2aaa51ceb7e64345888465e9feb996
refs/heads/master
2021-04-06T18:37:12.103089
2015-11-18T14:31:41
2015-11-18T14:31:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
151
java
package com.lh.biliclient.model; import com.lh.biliclient.bean.*; public interface IMainBanguiFragmentModel { public MainBangumiData getMainData() }
[ "1585086582@qq.com" ]
1585086582@qq.com
2ea2d1b9034c4f29e1110b9a5c0cc8030a0a1045
9508868f54802408df2ca922453c6ba1af01c60e
/src/main/java/com/kepler/router/filter/impl/ChainedFilter.java
4f615e3274e653537a9ecd7c5f05e7023c47730b
[]
no_license
easonlong/Kepler-All
de94c8258e55a1443eb5ce27b4659a835830890d
3633dde36fb85178b0288fc3f0eb4a25134ce8d1
refs/heads/master
2020-09-01T06:29:32.330733
2019-02-20T04:52:16
2019-02-20T04:52:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
893
java
package com.kepler.router.filter.impl; import java.util.ArrayList; import java.util.List; import com.kepler.extension.Extension; import com.kepler.host.Host; import com.kepler.protocol.Request; import com.kepler.router.filter.HostFilter; /** * @author zhangjiehao 2015年9月7日 */ public class ChainedFilter implements HostFilter, Extension { private final List<HostFilter> filters = new ArrayList<HostFilter>(); @Override public ChainedFilter install(Object instance) { this.filters.add(HostFilter.class.cast(instance)); return this; } @Override public Class<?> interested() { return HostFilter.class; } @Override public List<Host> filter(Request request, List<Host> hosts) { List<Host> approved = hosts; if (!this.filters.isEmpty()) { for (HostFilter filter : this.filters) { approved = filter.filter(request, approved); } } return approved; } }
[ "shenjiawei@didichuxing.com" ]
shenjiawei@didichuxing.com
33af1b4c9a615577a0b53f2aa07b359aff520bf9
d03142402e2e050d68d083fa84b25cb8223221fb
/atcoder/arc066/D.java
3b6c97ad37df6c2c8edf0ed1acc2cc312f722a59
[ "Unlicense" ]
permissive
mikhail-dvorkin/competitions
b859028712d69d6a14ac1b6194e43059e262d227
4e781da37faf8c82183f42d2789a78963f9d79c3
refs/heads/master
2023-09-01T03:45:21.589421
2023-08-24T20:24:58
2023-08-24T20:24:58
93,438,157
10
0
null
null
null
null
UTF-8
Java
false
false
2,727
java
package atcoder.arc066; import java.io.*; import java.util.*; public class D { static final int MOD = 1_000_000_007; static final boolean VISUALIZE = false; long n; Map<Long, Map<Long, Integer>> memo = new TreeMap<>(); Map<Long, Integer> size = new TreeMap<>(); void run() { n = in.nextLong() + 1; if (VISUALIZE) { visualize(); } out.println(solve()); } int solve() { long level = 1; size.put(level, 1); while (level < n) { size.put(2 * level, (int) (3L * size.get(level) % MOD)); memo.put(level, new TreeMap<>()); level *= 2; } return solve(level, 0); } int solve(long level, long x) { if (x >= n) { return 0; } if (x + 2 * level - 1 <= n) { return size.get(level); } level /= 2; if (memo.get(level).containsKey(x)) { return memo.get(level).get(x); } int res = solve(level, x); res += solve(level, x + level); res %= MOD; res += solve(level, x + 2 * level); res %= MOD; memo.get(level).put(x, res); return res; } void visualize() { boolean[][] nice = new boolean[(int) n][(int) n]; for (int a = 0; a < n; a++) { for (int b = 0; a + b < n; b++) { int u = a ^ b; if (u < n) { nice[u][a + b] = true; } } } for (int u = 0; u < n; u++) { for (int v = 0; v < n; v++) { System.err.print(nice[u][v] ? "#" : "."); } System.err.println(); } } static MyScanner in; static PrintWriter out; public static void main(String[] args) throws IOException { boolean stdStreams = true; String fileName = D.class.getSimpleName().replaceFirst("_.*", "").toLowerCase(); String inputFileName = fileName + ".in"; String outputFileName = fileName + ".out"; Locale.setDefault(Locale.US); BufferedReader br; if (stdStreams) { br = new BufferedReader(new InputStreamReader(System.in)); out = new PrintWriter(System.out); } else { br = new BufferedReader(new FileReader(inputFileName)); out = new PrintWriter(outputFileName); } in = new MyScanner(br); int tests = 1;//in.nextInt(); for (int test = 0; test < tests; test++) { new D().run(); } br.close(); out.close(); } static class MyScanner { BufferedReader br; StringTokenizer st; MyScanner(BufferedReader br) { this.br = br; } void findToken() { while (st == null || !st.hasMoreTokens()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { throw new RuntimeException(e); } } } String next() { findToken(); return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } } }
[ "mikhail.dvorkin@gmail.com" ]
mikhail.dvorkin@gmail.com
5c199e77d7ef4401a98c8d1b10a252558010d44d
53f5a941261609775dc3eedf0cb487956b734ab0
/com.samsung.accessory.atticmgr/sources/androidx/appcompat/widget/SeslToggleSwitch.java
f3d930a13f150c6ad286a88ec646d1744eb4840e
[]
no_license
ThePBone/BudsProAnalysis
4a3ede6ba6611cc65598d346b5a81ea9c33265c0
5b04abcae98d1ec8d35335d587b628890383bb44
refs/heads/master
2023-02-18T14:24:57.731752
2021-01-17T12:44:58
2021-01-17T12:44:58
322,783,234
16
1
null
null
null
null
UTF-8
Java
false
false
1,357
java
package androidx.appcompat.widget; import android.content.Context; import android.util.AttributeSet; public class SeslToggleSwitch extends SwitchCompat { private OnBeforeCheckedChangeListener mOnBeforeListener; public interface OnBeforeCheckedChangeListener { boolean onBeforeCheckedChanged(SeslToggleSwitch seslToggleSwitch, boolean z); } public SeslToggleSwitch(Context context) { super(context); } public SeslToggleSwitch(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public SeslToggleSwitch(Context context, AttributeSet attributeSet, int i) { super(context, attributeSet, i); } public void setOnBeforeCheckedChangeListener(OnBeforeCheckedChangeListener onBeforeCheckedChangeListener) { this.mOnBeforeListener = onBeforeCheckedChangeListener; } @Override // androidx.appcompat.widget.SwitchCompat public void setChecked(boolean z) { OnBeforeCheckedChangeListener onBeforeCheckedChangeListener = this.mOnBeforeListener; if (onBeforeCheckedChangeListener == null || !onBeforeCheckedChangeListener.onBeforeCheckedChanged(this, z)) { super.setChecked(z); } } public void setCheckedInternal(boolean z) { super.setChecked(z); } }
[ "thebone.main@gmail.com" ]
thebone.main@gmail.com
137834321c6e053adcef58833c91383e9a4783e4
408b3acf76f6e22b7620ee3e912748b6d0d715f4
/wakfu.common/src/com/ankamagames/wakfu/common/game/effect/runningEffect/WeaponAttack.java
d22147f0afb7a68f8fb8cfdb9a7ec1f6636b3d1a
[]
no_license
brunorcunha/wakfu-dirty-legacy
537dad1950f4518050941ff2711a2faffa48f1a4
a3f2edf829e4b690e350eed1962d5d0d9bba25ed
refs/heads/master
2021-06-18T08:43:52.395945
2015-05-04T14:58:56
2015-05-04T14:58:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,370
java
package com.ankamagames.wakfu.common.game.effect.runningEffect; import com.ankamagames.baseImpl.common.clientAndServer.game.effect.runningEffect.*; import com.ankamagames.wakfu.common.datas.*; import com.ankamagames.framework.kernel.core.maths.*; import com.ankamagames.wakfu.common.game.spell.*; import com.ankamagames.baseImpl.common.clientAndServer.game.effect.*; import com.ankamagames.wakfu.common.game.item.*; import com.ankamagames.framework.kernel.core.common.*; import org.apache.commons.pool.*; import com.ankamagames.framework.external.*; import com.ankamagames.wakfu.common.game.effect.*; public class WeaponAttack extends WakfuRunningEffect { private static final ObjectPool m_staticPool; private static final ParameterListSet PARAMETERS_LIST_SET; private byte m_equipementPos; public WeaponAttack() { super(); this.m_equipementPos = -1; } @Override public ParameterListSet getParametersListSet() { return WeaponAttack.PARAMETERS_LIST_SET; } @Override public void setTriggersToExecute() { super.setTriggersToExecute(); this.m_triggers.set(186); } @Override public WeaponAttack newInstance() { WeaponAttack wre; try { wre = (WeaponAttack)WeaponAttack.m_staticPool.borrowObject(); wre.m_pool = WeaponAttack.m_staticPool; } catch (Exception e) { wre = new WeaponAttack(); wre.m_pool = null; wre.m_isStatic = false; RunningEffect.m_logger.error("Erreur lors d'un checkOut sur un WeaponAttack : " + e.getMessage()); } return wre; } @Override protected void executeOverride(final RunningEffect linkedRE, final boolean trigger) { if (this.m_target == null) { return; } if (this.m_target instanceof BasicCharacterInfo && trigger && linkedRE != null && linkedRE.getCaster() != null && linkedRE.getCaster() != this.m_target) { final EffectUser user = linkedRE.getCaster(); ((BasicCharacterInfo)this.m_target).useItem(this.m_equipementPos, new Point3(user.getWorldCellX(), user.getWorldCellY(), user.getWorldCellAltitude()), false, null); } else { AbstractSpellLevel associatedSpellLevel = null; if (this.getEffectContainer() instanceof AbstractSpellLevel) { associatedSpellLevel = (AbstractSpellLevel) (this).getEffectContainer(); } if (this.m_target != null) { ((BasicCharacterInfo)this.m_caster).useItem(this.m_equipementPos, new Point3(this.m_target.getWorldCellX(), this.m_target.getWorldCellY(), this.m_target.getWorldCellAltitude()), false, associatedSpellLevel); } else { ((BasicCharacterInfo)this.m_caster).useItem(this.m_equipementPos, this.getTargetCell(), false, associatedSpellLevel); } } } @Override public void effectiveComputeValue(final RunningEffect triggerRE) { final short level = this.getContainerLevel(); if (this.m_genericEffect != null && this.m_genericEffect.getParamsCount() > 0) { this.m_equipementPos = (byte)this.m_genericEffect.getParam(0, level, RoundingMethod.RANDOM); } else { this.m_equipementPos = EquipmentPosition.FIRST_WEAPON.getId(); } } @Override public boolean useCaster() { return true; } @Override public boolean useTarget() { return true; } @Override public boolean useTargetCell() { return false; } static { m_staticPool = new MonitoredPool(new ObjectFactory<WeaponAttack>() { @Override public WeaponAttack makeObject() { return new WeaponAttack(); } }); PARAMETERS_LIST_SET = new WakfuRunningEffectParameterListSet(new ParameterList[] { new WakfuRunningEffectParameterList("Attaque si Cac, avec l'arme en cours(main droite)", new WakfuRunningEffectParameter[0]), new WakfuRunningEffectParameterList("Attaque si Cac, avec l'arme sp\u00e9cifi\u00e9e", new WakfuRunningEffectParameter[] { new WakfuRunningEffectParameter("id de position de l'\u00e9quipement", WakfuRunningEffectParameterType.ID) }) }); } }
[ "hussein.aitlahcen@gmail.com" ]
hussein.aitlahcen@gmail.com
6706b85c8c97e09b8e81da84c4fc756e154509d7
4d82d7da415aa9648c29715ed58b6b035d5aa036
/src/org/japo/java/main/Main.java
4ee395ff18eb5b3802fbf064a98d10520b69b129
[]
no_license
mahiro21/03317-ActividadLluviaConsola
7cbf228db22bb85387615b1fffa07f26b15431ba
8bf0bdad5d472226cac2822b8d4019ea4a0e3809
refs/heads/master
2020-09-02T11:36:04.901398
2019-11-05T18:44:53
2019-11-05T18:44:53
219,212,859
0
0
null
null
null
null
UTF-8
Java
false
false
2,429
java
/* * Copyright 2019 Mario Merlos Abella <mario.merlos.alum@iescamp.es>. * * 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.japo.java.main; import java.util.Random; /** * * @author Mario Merlos Abella <mario.merlos.alum@iescamp.es> */ public class Main { public static final Random RND = new Random(); public static void main(String[] args) { //variables & Constantes final int MAX = 500; final int MIN = 0; int dia; int dMax = 0; int dMin = 0; int lluvia; int tLluvia = 0; int maxLluvia = 0; int minLluvia = 500; //Inicio bucle dia = 1; System.out.printf("Control de lluvias semanal%n"); System.out.println("============================="); do { int valor = RND.nextInt(MAX - MIN + 1) + MIN; tLluvia += valor; lluvia = valor; System.out.printf("Lluvia durante el día %d ....: " + "%d L/metro cuadrado%n", dia, lluvia); if (maxLluvia <= lluvia) { maxLluvia = lluvia; dMax = dia; } if (minLluvia >= lluvia) { minLluvia = lluvia; dMin = dia; } dia++; } while (dia <= 7); System.out.println("---"); System.out.printf("Lluvia total durante la semana ....: %d%n", tLluvia); //Día lluvia máxima System.out.printf("Lluvia máxima registrada fue el día" + " %d con ..: %d L/metros cuadrados%n", dMax, maxLluvia); //Día lluvia mínima System.out.printf("Lluvia mínima registrada fue el día" + " %d con ..: %d L/metros cuadrados%n", dMin, minLluvia); System.out.println("END"); } }
[ "you@example.com" ]
you@example.com
ee023ea1911e8b5e73c376af8589e89904dbee1a
d6d9bfd3a5ef91111a07cca17be775ad820e3e36
/api/pacman-api-admin/src/main/java/com/tmobile/pacman/api/admin/repository/model/User.java
b16b7ebf1952725ee5e59c94989de37267edad8f
[ "Apache-2.0" ]
permissive
sujithgeorge/pacbot
b8b8b300b3d1f4ed1d7aa2e8c88c49cd13b1edc1
07dfaab568baebb47535c1ceafb0a80a6ccf8b64
refs/heads/master
2020-04-16T22:01:08.617175
2019-01-16T04:10:40
2019-01-16T04:10:40
165,949,684
0
0
Apache-2.0
2019-01-16T01:12:58
2019-01-16T01:12:58
null
UTF-8
Java
false
false
2,732
java
/******************************************************************************* * Copyright 2018 T Mobile, 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. 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.tmobile.pacman.api.admin.repository.model; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.UniqueConstraint; /** * User Model Class */ @Entity @Table(name = "oauth_user", uniqueConstraints = @UniqueConstraint(columnNames = "id")) public class User { @Id @GeneratedValue @Column(name = "id", unique = true, nullable = false) private Long id; @Column(name = "user_id") private String userId; @Column(name = "user_name") private String userName; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Column(name = "email") private String email; @Column(name = "created_date") private Date createdDate; @Column(name = "modified_date") private Date modifiedDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Date getCreatedDate() { return createdDate; } public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } public Date getModifiedDate() { return modifiedDate; } public void setModifiedDate(Date modifiedDate) { this.modifiedDate = modifiedDate; } }
[ "kumar.kamal@gmail.com" ]
kumar.kamal@gmail.com
a86e917a44506ae9c9a0cc29b3ba0662736a613f
c287d7b53a448e1d03f3ad3f62e7ad1e5809dfc0
/test/ph/edu/dlsu/datasal/lee/test/MyLinkedListTest.java
8b6e4c8b7cbd7f2eeac6cf5babf630a096432189
[]
no_license
melvincabatuan/DATASALChecking
8f4153ca83f57ca5d81419eb4dd18ea6ef9a7f1c
53906a38ce07bd0b5a39d1e735d77eb2d17a3ad0
refs/heads/master
2021-01-22T18:27:57.799272
2017-08-21T23:10:41
2017-08-21T23:10:41
100,757,463
0
0
null
null
null
null
UTF-8
Java
false
false
5,904
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ph.edu.dlsu.datasal.lee.test; import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; import ph.edu.dlsu.datasal.lee.myexception.ListIndexOutOfBoundsException; import ph.edu.dlsu.datasal.lee.mylinkedlist.MyLinkedList; /** * * @author cobalt */ public class MyLinkedListTest { private MyLinkedList list; @Before public void setUp() { list = new MyLinkedList<>(); } @Test public void isEmptyTest() { assertTrue(list.isEmpty()); } @Test public void initialSizeTest() { assertTrue(list.size() == 0); } @Test(expected = ListIndexOutOfBoundsException.class) public void removeWithEmptyListTest() { list.remove(1); } @Test(expected = ListIndexOutOfBoundsException.class) public void addGetTest() { /* Invalid since our list starts at 1: */ list.add(0, "Zero"); /* Invalid since our list has no elements yet */ list.add(2, "Two"); /* Adding three elements */ list.add(1, "Alpha"); list.add(2, "Beta"); list.add(3, "Gamma"); assertEquals("Alpha", list.get(1)); assertEquals("Beta", list.get(2)); assertEquals("Gamma", list.get(3)); list.add(1, "Omega"); assertEquals("Omega", list.get(1)); assertEquals("Alpha", list.get(2)); assertEquals("Beta", list.get(3)); assertEquals("Gamma", list.get(4)); /* Test size increment from addition */ assertTrue(list.size() == 4); list.add(5,"Kappa"); assertEquals("Kappa", list.get(5)); /* Test size increment from addition */ assertTrue(list.size() == 5); } @Test public void containsTest() { fail("This"); // list.add(1, "Alpha"); // list.add(2, "Beta"); // list.add(3, "Gamma"); // assertTrue(list.contains("Alpha")); // assertTrue(list.contains("Beta")); // assertTrue(list.contains("Gamma")); // assertFalse(list.contains("Omega")); } @Test public void removeElementTest() { list.add(1, "Alpha"); list.add(2, "Beta"); list.add(3, "Gamma"); list.remove(2); assertEquals("Gamma", list.get(2)); assertTrue(list.size() == 2); } @Test public void clearTest() { fail("This method is not implemented"); // list.add(1, "Alpha"); // list.add(2, "Beta"); // list.add(3, "Gamma"); // list.clear(); // assertTrue(list.size() == 0); } @Test public void containsAllTest() { fail("This method is not implemented"); // list.add(1, "Alpha"); // list.add(2, "Beta"); // list.add(3, "Gamma"); // MyLinkedList sample = new MyLinkedList<>(); // sample.add(1, "Alpha"); // sample.add(2, "Beta"); // assertTrue(list.containsAll(sample)); // assertTrue(sample.containsAll(sample)); // assertFalse(sample.containsAll(list)); // sample.add("Omega"); // assertFalse(list.containsAll(sample)); } @Test public void addAllTest() { fail("This method is not implemented"); // MyLinkedList sample = new MyLinkedList<>(); // sample.add(1, "Alpha"); // sample.add(2, "Beta"); // list.addAll(sample); // assertTrue(list.size() == 2); // assertTrue(list.contains("Alpha")); // assertTrue(list.contains("Beta")); } @Test public void removeAllTest() { fail("This method is not implemented"); // list.add(1, "Alpha"); // list.add(2, "Beta"); // list.add(3, "Gamma"); // MyLinkedList sample = new MyLinkedList<>(); // sample.add(1, "Alpha"); // sample.add(2, "Beta"); // list.removeAll(sample); // assertTrue(list.size() == 1); // assertFalse(list.contains("Alpha")); // assertFalse(list.contains("Beta")); // assertTrue(list.contains("Gamma")); } @Test public void equalsTest() { fail("This method is not implemented"); // list.add("Alpha"); // list.add("Beta"); // MyLinkedList sample = new MyLinkedList<>(); // sample.add("Alpha"); // sample.add("Beta"); // assertTrue(list.equals(sample)); // assertTrue(sample.equals(list)); // sample.add("Gamma"); // assertFalse(list.equals(sample)); // assertFalse(sample.equals(list)); } @Test public void intersectionTest() { fail("This method is not implemented"); // list.add("Alpha"); // list.add("Beta"); // MyLinkedList sample = new MyLinkedList<>(); // sample.add("Alpha"); // sample.add("Beta"); // sample.add("Gamma"); // assertEquals(list, list.intersection(sample)); // assertEquals(list, sample.intersection(list)); // assertEquals(list, list.intersection(list)); } @Test public void sortTest() { fail("This method is not implemented"); // MyLinkedListInt intList = new MyLinkedListInt(); // intList.add(1); // intList.add(5); // intList.add(2); // intList.add(4); // intList.add(3); // intList.sort(); // assertTrue(intList.get(1) == 1); // assertTrue(intList.get(2) == 2); // assertTrue(intList.get(3) == 3); // assertTrue(intList.get(4) == 4); // assertTrue(intList.get(5) == 5); } }
[ "melvincabatuan@gmail.com" ]
melvincabatuan@gmail.com
2203c5f946352e178a188f9f94e23e76703147d5
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_54804.java
eceeb7c39e4fc4373495b7db3ac3a60c430f7f24
[]
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
268
java
/** * Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ @Nullable public static B3VisualShapeInformation createSafe(long address){ return address == NULL ? null : wrap(B3VisualShapeInformation.class,address); }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
59751156ef3c344e0fc47ce5e938e7f595571688
e64c2201c1cf2adf9197c77aab2676670de9bf4c
/src/main/java/com/zxb/Concurrency/cookbook/Client.java
c8daafb91770f4438625feb4d0812836d9e65625
[]
no_license
zengxianbing/JavaStudy
45016f3910606988403f16bd1b5f0e60d52de7b2
9a4593cf4b6f79ada4677bdd87a045ff04ee721a
refs/heads/master
2020-04-06T04:29:17.203382
2016-07-04T01:11:47
2016-07-04T01:11:47
62,491,476
0
0
null
null
null
null
UTF-8
Java
false
false
1,449
java
package com.zxb.Concurrency.cookbook; import java.util.Date; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.TimeUnit; public class Client implements Runnable { private LinkedBlockingDeque requestList; public Client (LinkedBlockingDeque requestList) { this.requestList=requestList; } @Override public void run() { for (int i=0; i<3; i++) { for (int j=0; j<5; j++) { StringBuilder request=new StringBuilder(); request.append(i); request.append(":"); request.append(j); try { requestList.put(request.toString()); } catch (InterruptedException e) { e.printStackTrace(); } System.out.printf("Client: %s at %s.\n",request,new Date()); } try { TimeUnit.SECONDS.sleep(2); } catch (InterruptedException e) { e.printStackTrace(); } } System.out.printf("Client: End.\n"); } public static void main(String[] args) throws Exception { LinkedBlockingDeque list=new LinkedBlockingDeque(3); Client client=new Client(list); Thread thread=new Thread(client); thread.start(); for (int i=0; i<3; i++) { for (int j=0; j<5; j++) { String request=(String) list.take(); System.out.printf("Main: Request: %s at %s. Size:%d\n",request,new Date(),list.size()); } TimeUnit.MILLISECONDS.sleep(300); } System.out.printf("Main: End of the program.\n"); } }
[ "1121466030@qq.com" ]
1121466030@qq.com
5d419606a291d8d43d708f9f57c76e985a90bf00
5c0e9aa1c3a03a0c172c4ed93929ed3a6ed9c3de
/src/main/java/com/oldguy/example/modules/workflow/utils/HttpUtils.java
2933e515e6327dbd4a46a030dc0b00e5fd983185
[]
no_license
oldguys/ActivitiDemo
71a66f95c1f4dbf7ef60b7f5eccab98829759a14
2329f41422ebd6717ab5d059356e74b53098257d
refs/heads/master
2022-06-02T12:21:09.287362
2019-05-24T03:15:14
2019-05-24T03:15:14
167,945,634
38
35
null
2022-05-20T20:54:35
2019-01-28T10:45:41
JavaScript
UTF-8
Java
false
false
696
java
package com.oldguy.example.modules.workflow.utils; import org.apache.commons.io.IOUtils; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; /** * @author huangrenhao * @date 2019/1/22 */ public class HttpUtils { public static void copyImageStream(InputStream inputStream,OutputStream outputStream){ try { IOUtils.copy(inputStream,outputStream); } catch (IOException e) { e.printStackTrace(); }finally { try { inputStream.close(); outputStream.close(); } catch (IOException e) { e.printStackTrace(); } } } }
[ "916812040@qq.com" ]
916812040@qq.com
d2fee44e29c2237953514ec920803d5ef0e38f2f
aa0a7e8a5d24021f41a85d740dae4d4cefc4a64c
/casic-common/src/main/java/com/casic/common/utils/CommonUtil.java
a3411a30a8d2d5b6fb295bc82f54dd5439c6bb53
[]
no_license
agriculture-development-bank/AgricultureDevelopmentBankSystem
b5082176ceb1aba235473bf8e7947d057f2e1fd0
210f73cf272e76c49daba6056f2006f276a22121
refs/heads/master
2022-09-03T02:22:57.163234
2020-02-25T05:50:59
2020-02-25T05:50:59
221,409,705
0
0
null
2022-09-01T23:15:40
2019-11-13T08:29:08
JavaScript
UTF-8
Java
false
false
695
java
package com.casic.common.utils; import java.util.Random; /* * * @Author tomsun28 * @Description 高频方法工具类 * @Date 14:08 2018/3/12 */ public class CommonUtil { /* * * @Description 获取指定位数的随机数 * @Param [length] * @Return java.lang.String */ public static String getRandomString(int length) { String base = "abcdefghijklmnopqrstuvwxyz0123456789"; Random random = new Random(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < length; i++) { int number = random.nextInt(base.length()); sb.append(base.charAt(number)); } return sb.toString(); } }
[ "870754310@qq.com" ]
870754310@qq.com
43fd07f2f3436ca3b0d3b8785f271128fd0cc537
e85a519fbc05ced36aa732cb197b6ee3cf27352d
/mdo-core/web-administration/src/test/java/fr/mch/mdo/restaurant/web/struts/MdoBeanTypeConverterTest.java
183b2b2bbdc99a5acd0ddec6a03f4a6af7f11c46
[]
no_license
mathieu-ma/montagnesdor
1791fae256c7525e0f2a23a2cd7f03ca65ca13bb
e149fc14253b60d30a9e98f6c7b467b807ec5d65
refs/heads/master
2021-01-23T11:48:43.639476
2014-08-20T20:41:27
2014-08-20T20:41:27
3,204,171
3
0
null
null
null
null
UTF-8
Java
false
false
708
java
package fr.mch.mdo.restaurant.web.struts; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; public class MdoBeanTypeConverterTest extends TestCase { /** * Create the test case * * @param testName * name of the test case */ public MdoBeanTypeConverterTest(String testName) { super(testName); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite(MdoBeanTypeConverterTest.class); } public void testConvertFromString() { } public void testConvertToString() { } }
[ "mathieu.ma.dev@free.fr" ]
mathieu.ma.dev@free.fr
b917a825ff15c12d7cd66810fb4b2c6b1f4e6937
d039ea6c8f1aef82e89de66ab8b4fe2a8810cfbe
/city-user-consumer/src/main/java/com/lyc/city/user/controller/UserConsumerController.java
83cf85286e30e226f1aca485dee66ac857e48c60
[]
no_license
maxenergy/city
0b112857bbfb625dbe7d73c23597c081a005e33d
7f9641dfd47012a62526fa78e520abde18ffd3b4
refs/heads/master
2023-05-30T22:26:28.021979
2020-09-08T08:35:17
2020-09-08T08:35:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
447
java
package com.lyc.city.user.controller; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; /** * @author lyc * @date 2020/7/15 11:44 */ @Controller @Slf4j @CrossOrigin public class UserConsumerController { @GetMapping("/index") public String index(){ return "index"; } }
[ "708901735@qq.com" ]
708901735@qq.com
9a61dfd51ed03be4d2eae0428c00b7b255a0cb40
e5196e904faa4dc65eb94436f62e261fac10c1c5
/library/src/main/java/com/dtc/fhir/gwt/AppointmentStatusList.java
de48659b121f18abdc7be0f8be00f07b55189211
[]
no_license
DatacomRD/dtc-fhir
902006510c8bea81d849387a7d437cc5ea6dc0cc
33f687b29ccc90365e43b6ad09b67292e1240726
refs/heads/master
2020-04-12T06:40:33.642415
2017-07-21T07:52:29
2017-07-21T07:52:29
60,606,422
3
4
null
2017-07-21T07:52:30
2016-06-07T10:59:46
Java
UTF-8
Java
false
false
2,822
java
// // 此檔案是由 JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 所產生 // 請參閱 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // 一旦重新編譯來源綱要, 對此檔案所做的任何修改都將會遺失. // 產生時間: 2016.08.31 於 11:09:06 PM CST // package com.dtc.fhir.gwt; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>AppointmentStatus-list 的 Java 類別. * * <p>下列綱要片段會指定此類別中包含的預期內容. * <p> * <pre> * &lt;simpleType name="AppointmentStatus-list"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="proposed"/> * &lt;enumeration value="pending"/> * &lt;enumeration value="booked"/> * &lt;enumeration value="arrived"/> * &lt;enumeration value="fulfilled"/> * &lt;enumeration value="cancelled"/> * &lt;enumeration value="noshow"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "AppointmentStatus-list") @XmlEnum public enum AppointmentStatusList { /** * None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time may not be set yet. * */ @XmlEnumValue("proposed") PROPOSED("proposed"), /** * Some or all of the participant(s) have not finalized their acceptance of the appointment request. * */ @XmlEnumValue("pending") PENDING("pending"), /** * All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified. * */ @XmlEnumValue("booked") BOOKED("booked"), /** * Some of the patients have arrived. * */ @XmlEnumValue("arrived") ARRIVED("arrived"), /** * This appointment has completed and may have resulted in an encounter. * */ @XmlEnumValue("fulfilled") FULFILLED("fulfilled"), /** * The appointment has been cancelled. * */ @XmlEnumValue("cancelled") CANCELLED("cancelled"), /** * Some or all of the participant(s) have not/did not appear for the appointment (usually the patient). * */ @XmlEnumValue("noshow") NOSHOW("noshow"); private final String value; AppointmentStatusList(String v) { value = v; } public String value() { return value; } public static AppointmentStatusList fromValue(String v) { for (AppointmentStatusList c: AppointmentStatusList.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "foxb1249@gmail.com" ]
foxb1249@gmail.com
bacfefe842a41886d604f672255e51da58fe726e
aab75df354609093086383f245d475da44f08571
/scw-parent/scw-project/src/main/java/com/offcn/scw/project/enums/ProjectImageTypeEnume.java
a99967463dc64536d72a66cdfb60235e1fca4f23
[]
no_license
Gozly/scw-parent
82816030dd4b78576f380817748b3bc5a55fdd9d
9fb93e3a878f05bd9001c2988d24845c06fdc7f6
refs/heads/master
2023-02-17T18:30:19.935873
2021-01-14T07:22:54
2021-01-14T07:22:54
329,537,889
0
0
null
null
null
null
UTF-8
Java
false
false
560
java
package com.offcn.scw.project.enums; public enum ProjectImageTypeEnume { HEADER((byte)0, "头图"), DETAILS((byte)1, "详细图"); private byte code; private String type; private ProjectImageTypeEnume(byte code, String type) { this.code = code; this.type = type; } public byte getCode() { return code; } public void setCode(byte code) { this.code = code; } public String getType() { return type; } public void setType(String type) { this.type = type; } }
[ "myqq@qq.com" ]
myqq@qq.com
ab2dc825a740e368499d4a112493b0273e77e237
3f1ee65a425a585107169338b3ed0d15705447e0
/bonaparte-core-test/src/test/java/testcases/csv/TestList.java
60c287b27120b3ce9070dd07caacab744c112661
[ "Apache-2.0" ]
permissive
bodong/bonaparte-java
2d0cdd65d05366fceb069042bdb823dfd2d7d135
bd5b2372f6c76c193e26b12463266733f5e9c98e
refs/heads/master
2021-01-21T01:06:32.443992
2014-05-08T17:08:45
2014-05-08T17:08:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,134
java
package testcases.csv; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.testng.annotations.Test; import de.jpaw.bonaparte.core.BonaPortable; import de.jpaw.bonaparte.core.FoldingComposer; import de.jpaw.bonaparte.core.ListComposer; import de.jpaw.bonaparte.pojos.csvTests.UnixPasswd; import de.jpaw.bonaparte.pojos.meta.FoldingStrategy; public class TestList { @Test public void testListComposer() throws Exception { UnixPasswd pwEntry = new UnixPasswd("root", "x", 0, 0,"System superuser", "/root", "/bin/sh"); UnixPasswd pwEntry2 = new UnixPasswd("jpaw", "x", 1003, 314,"Michael Bischoff", "/home/jpaw", "/bin/bash"); List<Object> storage = new ArrayList<Object>(10); ListComposer lc = new ListComposer(storage, false); lc.writeRecord(pwEntry); lc.writeRecord(pwEntry2); assert(storage.size() == 14); // 2 entries assert(storage.get(2) instanceof Integer); assert(storage.get(7) instanceof String); assert(storage.get(9).equals(Integer.valueOf(1003))); lc.reset(); lc.writeRecord(pwEntry2); assert(storage.size() == 7); // 1 entry } @Test public void testListComposerWithFolding() throws Exception { UnixPasswd pwEntry2 = new UnixPasswd("jpaw", "x", 1003, 314,"Michael Bischoff", "/home/jpaw", "/bin/bash"); List<Object> storage = new ArrayList<Object>(10); ListComposer lc = new ListComposer(storage, false); List<String> fields = Arrays.asList( "gecos", "name", "shell"); Map<Class<? extends BonaPortable>, List<String>> map = new HashMap<> (10); map.put(UnixPasswd.class, fields); FoldingComposer<RuntimeException> fld = new FoldingComposer<RuntimeException>(lc, map, FoldingStrategy.TRY_SUPERCLASS); fld.writeRecord(pwEntry2); assert(storage.size() == 3); // 2 entries assert(storage.get(2) instanceof String); assert(storage.get(2).equals("/bin/bash")); } }
[ "jpaw@online.de" ]
jpaw@online.de
ab0f1d20a551b7327b576c02a4e17b1ff71b100d
1e92cc6b09a058f4bb4f0dbc30ee2d5dbca51932
/bracketScorer/src/main/java/io/spring/marchmadness/BracketScorerApplication.java
e367f1566eabfe27bf0c063975e5fd1c90902b0f
[ "Apache-2.0" ]
permissive
mminella/TaskMadness
6bbb28313e9e1b9d5c2314bf16d1a2f59b4ce1cd
e6510084c65d671b2f2b6701a9a453a2860ea5f0
refs/heads/master
2021-01-19T03:53:58.269086
2019-03-18T22:46:18
2019-03-18T22:46:18
50,684,051
4
1
null
2016-07-29T18:05:53
2016-01-29T18:57:34
Java
UTF-8
Java
false
false
537
java
package io.spring.marchmadness; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.task.configuration.EnableTask; import org.springframework.context.annotation.PropertySource; @SpringBootApplication @EnableTask @PropertySource("classpath:/teams.properties") public class BracketScorerApplication { public static void main(String[] args) { SpringApplication.exit(SpringApplication.run(BracketScorerApplication.class, args)); } }
[ "mminella@pivotal.io" ]
mminella@pivotal.io
382c00a4b3293b63b0f6fe5446c7febe7747f514
801ea23bf1e788dee7047584c5c26d99a4d0b2e3
/com/planet_ink/coffee_mud/Abilities/Thief/Thief_Peek.java
de28e26228ee21e4a671b30402d35aa2e41feb5f
[ "Apache-2.0" ]
permissive
Tearstar/CoffeeMud
61136965ccda651ff50d416b6c6af7e9a89f5784
bb1687575f7166fb8418684c45f431411497cef9
refs/heads/master
2021-01-17T20:23:57.161495
2014-10-18T08:03:37
2014-10-18T08:03:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,948
java
package com.planet_ink.coffee_mud.Abilities.Thief; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.ExpertiseLibrary; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2014 Bo Zimmerman 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. */ @SuppressWarnings("rawtypes") public class Thief_Peek extends ThiefSkill { @Override public String ID() { return "Thief_Peek"; } private final static String localizedName = CMLib.lang().L("Peek"); @Override public String name() { return localizedName; } @Override protected int canAffectCode(){return 0;} @Override protected int canTargetCode(){return Ability.CAN_MOBS;} @Override public int abstractQuality(){return Ability.QUALITY_INDIFFERENT;} @Override public int classificationCode(){return Ability.ACODE_THIEF_SKILL|Ability.DOMAIN_STEALING;} private static final String[] triggerStrings =I(new String[] {"PEEK"}); @Override public String[] triggerStrings(){return triggerStrings;} @Override public int usageType(){return USAGE_MOVEMENT|USAGE_MANA;} public int code=0; @Override public int abilityCode(){return code;} @Override public void setAbilityCode(int newCode){code=newCode;} @Override public boolean invoke(MOB mob, Vector commands, Physical givenTarget, boolean auto, int asLevel) { if(commands.size()<1) { mob.tell(L("Peek at whom?")); return false; } final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; if(target==mob) { mob.tell(L("You cannot peek at yourself. Try Inventory.")); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final int levelDiff=target.phyStats().level()-(mob.phyStats().level()+abilityCode()+(getXLEVELLevel(mob)*2)); final boolean success=proficiencyCheck(mob,-(levelDiff*(!CMLib.flags().canBeSeenBy(mob,target)?0:10)),auto); int discoverChance=(int)Math.round(CMath.div(target.charStats().getStat(CharStats.STAT_WISDOM),30.0)) +(levelDiff*5) -(getX1Level(mob)*5); if(!CMLib.flags().canBeSeenBy(mob,target)) discoverChance-=50; if(discoverChance>95) discoverChance=95; if(discoverChance<5) discoverChance=5; if(!success) { if(CMLib.dice().rollPercentage()<discoverChance) { final CMMsg msg=CMClass.getMsg(mob,target,null,CMMsg.MSG_OK_VISUAL,auto?"":L("Your peek attempt fails; <T-NAME> spots you!"),CMMsg.MSG_OK_VISUAL,auto?"":L("<S-NAME> tries to peek at your inventory and fails!"),CMMsg.NO_EFFECT,null); if(mob.location().okMessage(mob,msg)) mob.location().send(mob,msg); } else { mob.tell(auto?"":L("Your peek attempt fails.")); return false; } } else { String str=null; if(CMLib.dice().rollPercentage()<discoverChance) str=auto?"":L("<S-NAME> peek(s) at your inventory."); CMMsg msg=CMClass.getMsg(mob,target,this,auto?CMMsg.MSG_OK_VISUAL:(CMMsg.MSG_THIEF_ACT|CMMsg.MASK_EYES),auto?"":L("<S-NAME> peek(s) at <T-NAME>s inventory."),CMMsg.MSG_LOOK,str,CMMsg.NO_EFFECT,null); if(mob.location().okMessage(mob,msg)) { msg=CMClass.getMsg(mob,target,null,CMMsg.MSG_OK_VISUAL,auto?"":L("<S-NAME> peek(s) at <T-NAME>s inventory."),CMMsg.MSG_OK_VISUAL,str,(str==null)?CMMsg.NO_EFFECT:CMMsg.MSG_OK_VISUAL,str); mob.location().send(mob,msg); final StringBuilder msg2=CMLib.commands().getInventory(mob,target); if(msg2.length()==0) mob.tell(L("@x1 is carrying:\n\rNothing!\n\r",target.charStats().HeShe())); else mob.session().wraplessPrintln(L("@x1 is carrying:\n\r@x2",target.charStats().HeShe(),msg2.toString())); } } return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
09460b3fd22874398e643b137170597b7d096d11
968447bedbea5842c2d0f62ff47c0bd4c2258012
/demos/demo5/umlparser_v2/testcases/starbucks/MyCardsPay.java
737171aca5f34086e11db3e622c6eaa859a9ded1
[]
no_license
paulnguyen/cmpe202
5c3fe070515e4664385ca8fde5d97564f35557e4
153b243e888f083733a180c571e0290ec49a67dd
refs/heads/master
2022-12-14T13:14:04.001730
2022-11-12T21:56:09
2022-11-12T21:56:09
10,661,668
53
441
null
2022-12-06T19:25:07
2013-06-13T08:09:27
Java
UTF-8
Java
false
false
852
java
/* (c) Copyright 2018 Paul Nguyen. All Rights Reserved */ package starbucks; /** My Card Pay Screen */ public class MyCardsPay extends Screen { Card card ; public MyCardsPay() { card = Card.getInstance() ; } /** * Get Screen Display Contents * @return Screen Contents */ public String display() { String result = "[" + card.getCardId() + "]\n" + "\n\n" + "Scan Now" ; return result ; } /** * Touch (X,Y) Event * @param x X Coord * @param y Y Coord */ public void touch(int x, int y) { AppController app = AppController.getInstance() ; if ( x == 3 && y == 3 ) { app.setScreen( AppController.SCREENS.MY_CARDS_MAIN ) ; } if ( x == 2 && y == 2 ) { card.pay() ; } } }
[ "paul.nguyen@sjsu.edu" ]
paul.nguyen@sjsu.edu
ede72a6096a1bc79dbfe5dd9e8433e88de9a3251
827bf064e482700d7ded2cd0a3147cb9657db883
/WebAppsTemplate/Template/app/src/main/java/com/universal/Config.java
3c5cbf06d36488f6c50784bb3adb5482dd0cf34f
[ "MIT", "Apache-2.0" ]
permissive
cody0117/LearnAndroid
d30b743029f26568ccc6dda4313a9d3b70224bb6
02fd4d2829a0af8a1706507af4b626783524813e
refs/heads/master
2021-01-21T21:10:18.553646
2017-02-12T08:43:24
2017-02-12T08:43:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,557
java
package com.universal; import java.util.ArrayList; import java.util.List; import com.universal.fav.ui.FavFragment; import com.universal.maps.MapsFragment; import com.universal.media.ui.MediaFragment; import com.universal.rss.ui.RssFragment; import com.universal.tumblr.ui.TumblrFragment; import com.universal.twi.ui.TweetsFragment; import com.universal.web.WebviewFragment; import com.universal.wordpress.ui.WordpressFragment; import com.universal.yt.ui.VideosFragment; public class Config { public static List<NavItem> configuration() { List<NavItem> i = new ArrayList<NavItem>(); //DONT MODIFY ABOVE THIS LINE i.add(new NavItem("Section", NavItem.SECTION)); i.add(new NavItem("Uploaded Videos", R.drawable.ic_details, NavItem.ITEM, VideosFragment.class, "UU7V6hW6xqPAiUfataAZZtWA,UC7V6hW6xqPAiUfataAZZtWA")); i.add(new NavItem("Liked Videos", R.drawable.ic_details, NavItem.ITEM, VideosFragment.class, "LL7V6hW6xqPAiUfataAZZtWA")); i.add(new NavItem("News", R.drawable.ic_details, NavItem.ITEM, RssFragment.class, "http://feeds.feedburner.com/AndroidPolice")); i.add(new NavItem("Tip Us", R.drawable.ic_details, NavItem.ITEM, WebviewFragment.class, "http://www.androidpolice.com/contact/")); i.add(new NavItem("Recent Posts", R.drawable.ic_details, NavItem.ITEM, WordpressFragment.class, "http://androidpolice.com/api/")); i.add(new NavItem("Cat: Conservation", R.drawable.ic_details, NavItem.ITEM, WordpressFragment.class, "http://moma.org/wp/inside_out/api/,conservation")); i.add(new NavItem("Wallpaper Tumblr", R.drawable.ic_details, NavItem.ITEM, TumblrFragment.class, "androidbackgrounds")); i.add(new NavItem("3FM Radio", R.drawable.ic_details, NavItem.ITEM, MediaFragment.class, "http://yp.shoutcast.com/sbin/tunein-station.m3u?id=709809")); i.add(new NavItem("Official Twitter", R.drawable.ic_details, NavItem.ITEM, TweetsFragment.class, "Android")); i.add(new NavItem("Maps", R.drawable.ic_details, NavItem.ITEM, MapsFragment.class, "drogisterij")); //It's Suggested to not change the content below this line i.add(new NavItem("Device", NavItem.SECTION)); i.add(new NavItem("Favorites", R.drawable.ic_action_favorite, NavItem.EXTRA, FavFragment.class, null)); i.add(new NavItem("Settings", R.drawable.ic_action_settings, NavItem.EXTRA, SettingsFragment.class, null)); //DONT MODIFY BELOW THIS LINE return i; } }
[ "em3888@gmail.com" ]
em3888@gmail.com
14d2bf019aa375a3fe0b9f4e7b4fadf982d090f1
d2250fc1c54876681ec5db5b38d8f93bd179968c
/app/src/main/java/com/cyl/musiclake/api/kugou/KuGouRawLyric.java
099498a5583efd6c1feaf4e9708e08e54b59f859
[ "Apache-2.0" ]
permissive
chubang122/MusicLake
6b6299f30fe8144d148764780b89b30f2b87fe84
d2bad6292518f5bddb298358ef17f184464c99b8
refs/heads/master
2020-03-25T21:02:53.711993
2018-05-17T18:18:54
2018-05-17T18:18:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
682
java
package com.cyl.musiclake.api.kugou; import com.google.gson.annotations.SerializedName; /** * Created by hefuyi on 2017/1/20. */ public class KuGouRawLyric { private static final String CHARSET = "charset"; private static final String CONTENT = "content"; private static final String FMT = "fmt"; private static final String INFO = "info"; private static final String STATUS = "status"; @SerializedName(CHARSET) public String charset; @SerializedName(CONTENT) public String content; @SerializedName(FMT) public String fmt; @SerializedName(INFO) public String info; @SerializedName(STATUS) public int status; }
[ "caiyonglong@live.com" ]
caiyonglong@live.com
028c0698574a64d03014b2728f05cd3604960054
9f3d14e39d069db601f2de111381975d26922b6f
/src/main/java/com/github/teocci/codesample/javafx/uisamples/elements/ViewSwapping.java
e9028022c981a0b6624a54a6044b0725ac38f45d
[ "MIT" ]
permissive
teocci/JavaFX-UISamples
10f725d5950e2e10591b39bdd5303b2c15b26ce2
aaef171bb3f3ce94b4d80ef3f539d5746d140857
refs/heads/master
2022-11-21T02:07:15.868023
2019-05-24T05:01:52
2019-05-24T05:01:52
142,275,267
1
0
MIT
2022-11-16T12:21:58
2018-07-25T09:04:51
Java
UTF-8
Java
false
false
2,078
java
package com.github.teocci.codesample.javafx.uisamples.elements; import com.github.teocci.codesample.javafx.controllers.HolderController; import com.github.teocci.codesample.javafx.managers.VistaNavigator; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.layout.Pane; import javafx.stage.Stage; import java.io.IOException; import static com.github.teocci.codesample.javafx.managers.VistaNavigator.HOLDER; import static com.github.teocci.codesample.javafx.managers.VistaNavigator.VIEW_1; /** * Small JavaFX framework for swapping in and out child panes in a main FXML container. Code is for Java 8+. * <p> * Created by teocci. * * @author teocci@yandex.com on 2018-Jul-26 */ public class ViewSwapping extends Application { @Override public void start(Stage stage) throws Exception { stage.setTitle("View Shower"); stage.setScene(createScene(loadMainPane())); stage.show(); } /** * Loads the main fxml layout. * Sets up the vista switching VistaNavigator. * Loads the first vista into the fxml layout. * * @return the loaded pane. * @throws IOException if the pane could not be loaded. */ private Pane loadMainPane() throws IOException { FXMLLoader loader = new FXMLLoader(); Pane mainPane = loader.load(getClass().getResourceAsStream(HOLDER)); HolderController controller = loader.getController(); VistaNavigator.setController(controller); VistaNavigator.loadVista(VIEW_1); return mainPane; } /** * Creates the main application scene. * * @param mainPane the main application layout. * @return the created scene. */ private Scene createScene(Pane mainPane) { Scene scene = new Scene(mainPane, 200, 50); scene.getStylesheets().setAll(getClass().getResource("/css/views.css").toExternalForm()); return scene; } public static void main(String[] args) { launch(args); } }
[ "teocci@yandex.com" ]
teocci@yandex.com
222a005ca6b8edd749928368b71ac990104f4db8
0565885aa67e16033b5e6526397d10b03787e1ac
/fulfillment-tms-master/fulfillment-tms-biz/src/main/java/com/mallcai/fulfillment/biz/service/DcTransNoticeService.java
0b5e989a0af45dbf571632c024915c67198087f4
[]
no_license
youngzil/fulfillment-center
e05b364f160a6e84f84ee3ef1a3bdc3cfafcdad2
9b86b810b1e40cfe77e82ff972f99b645f598b57
refs/heads/master
2020-09-22T10:56:25.810905
2019-12-01T13:19:13
2019-12-01T13:19:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
330
java
package com.mallcai.fulfillment.biz.service; import com.mallcai.open.api.model.tms.TransportPlan; /** * @description: * @author: chentao * @create: 2019-11-18 13:48:56 */ public interface DcTransNoticeService { void noticeTransLine(TransportPlan transportPlan); void noticeTransCar(TransportPlan transportPlan); }
[ "58103987+dailuobo-code@users.noreply.github.com" ]
58103987+dailuobo-code@users.noreply.github.com
0584f0fc6a04b63ef66ae770b7f9efe2923ce12a
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
/project451/src/test/java/org/gradle/test/performance/largejavamultiproject/project451/p2256/Test45124.java
9dd31e98949f544c427919b796692b61ea18e975
[]
no_license
big-guy/largeJavaMultiProject
405cc7f55301e1fd87cee5878a165ec5d4a071aa
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
refs/heads/main
2023-03-17T10:59:53.226128
2021-03-04T01:01:39
2021-03-04T01:01:39
344,307,977
0
0
null
null
null
null
UTF-8
Java
false
false
2,182
java
package org.gradle.test.performance.largejavamultiproject.project451.p2256; import org.junit.Test; import static org.junit.Assert.*; public class Test45124 { Production45124 objectUnderTest = new Production45124(); @Test public void testProperty0() { Production45121 value = new Production45121(); objectUnderTest.setProperty0(value); assertEquals(value, objectUnderTest.getProperty0()); } @Test public void testProperty1() { Production45122 value = new Production45122(); objectUnderTest.setProperty1(value); assertEquals(value, objectUnderTest.getProperty1()); } @Test public void testProperty2() { Production45123 value = new Production45123(); objectUnderTest.setProperty2(value); assertEquals(value, objectUnderTest.getProperty2()); } @Test public void testProperty3() { String value = "value"; objectUnderTest.setProperty3(value); assertEquals(value, objectUnderTest.getProperty3()); } @Test public void testProperty4() { String value = "value"; objectUnderTest.setProperty4(value); assertEquals(value, objectUnderTest.getProperty4()); } @Test public void testProperty5() { String value = "value"; objectUnderTest.setProperty5(value); assertEquals(value, objectUnderTest.getProperty5()); } @Test public void testProperty6() { String value = "value"; objectUnderTest.setProperty6(value); assertEquals(value, objectUnderTest.getProperty6()); } @Test public void testProperty7() { String value = "value"; objectUnderTest.setProperty7(value); assertEquals(value, objectUnderTest.getProperty7()); } @Test public void testProperty8() { String value = "value"; objectUnderTest.setProperty8(value); assertEquals(value, objectUnderTest.getProperty8()); } @Test public void testProperty9() { String value = "value"; objectUnderTest.setProperty9(value); assertEquals(value, objectUnderTest.getProperty9()); } }
[ "sterling.greene@gmail.com" ]
sterling.greene@gmail.com
950617c431c947fa44f6739e11bc99d871164de7
d9ea3ae7b2c4e9a586e61aed23e6e997eaa38687
/19.Project/StudentManager/src/com/qfedu/action/AddStudentFastIsonServlet.java
5abf3325cfcc61242c5f0698b603fc8d39d6e2e5
[]
no_license
yuanhaocn/Fu-Zusheng-Java
6e5dcf9ef3d501102af7205bb81674f880352158
ab872bcfe36d985a651a5e12ecb6132ad4d2cb8e
refs/heads/master
2020-05-15T00:20:47.872967
2019-04-16T11:06:18
2019-04-16T11:06:18
null
0
0
null
null
null
null
GB18030
Java
false
false
690
java
package com.qfedu.action; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.alibaba.fastjson.JSON; @WebServlet("/addStudentFastIsonServlet ") public class AddStudentFastIsonServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException { // 接收前端数据 String jsonStr = req.getParameter("stuJson"); //把JSON字符创转为java对象 Object parse = JSON.parse(jsonStr); } }
[ "fuzusheng@gmail.com" ]
fuzusheng@gmail.com
492d481aa2463dccd20d6292f8ffd9e126abb061
a1e49f5edd122b211bace752b5fb1bd5c970696b
/projects/org.springframework.test/src/main/java/org/springframework/test/context/junit4/statements/package-info.java
49ec8db156b243dd7e7816c77a7aef47daeacd75
[ "Apache-2.0" ]
permissive
savster97/springframework-3.0.5
4f86467e2456e5e0652de9f846f0eaefc3214cfa
34cffc70e25233ed97e2ddd24265ea20f5f88957
refs/heads/master
2020-04-26T08:48:34.978350
2019-01-22T14:45:38
2019-01-22T14:45:38
173,434,995
0
0
Apache-2.0
2019-03-02T10:37:13
2019-03-02T10:37:12
null
UTF-8
Java
false
false
177
java
/** * * <p>JUnit 4.5 based <code>statements</code> used in the <em>Spring TestContext Framework</em>.</p> * */ package org.springframework.test.context.junit4.statements;
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
d3b19514c611da30381147868e8a6164d8185a08
ae57590200b4620506f8f4020964a7b30951b194
/NeoDatis/src/org/neodatis/odb/core/server/message/DeleteIndexMessageResponse.java
ca7f97e037cc6cdaf2ec4acdc38ca6e116d3e8fb
[]
no_license
antonisvarsamis/NeoDatis
d472e2d0720a88afcfd2e6c3958683f4a162a1fc
022ed4fe5f1a800a970e8226a08599609db69617
refs/heads/master
2020-04-15T12:24:58.311118
2014-02-02T17:53:52
2014-02-02T17:53:52
164,673,078
0
0
null
2019-01-08T15:03:46
2019-01-08T15:03:45
null
UTF-8
Java
false
false
1,463
java
/* NeoDatis ODB : Native Object Database (odb.info@neodatis.org) Copyright (C) 2007 NeoDatis Inc. http://www.neodatis.org "This file is part of the NeoDatis ODB open source object database". NeoDatis ODB 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. NeoDatis ODB is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package org.neodatis.odb.core.server.message; import org.neodatis.odb.core.server.layers.layer3.engine.Command; import org.neodatis.odb.core.server.layers.layer3.engine.Message; public class DeleteIndexMessageResponse extends Message { public DeleteIndexMessageResponse(String baseId, String connectionId, String error){ super(Command.DELETE_INDEX, baseId,connectionId); setError(error); } public DeleteIndexMessageResponse(String baseId, String connectionId){ super(Command.DELETE_INDEX, baseId,connectionId); } }
[ "sirlordt@gmail.com" ]
sirlordt@gmail.com
f9b90034bb8acb786b7f22714fa6d1bef0b229a2
f072523c1391462970c174ef33133b4c4c981c42
/spring-boot-rocketmq/spring-boot-rocketmq-consumer/src/main/java/com/thinkingcao/rocketmq/entity/OrderPaidEvent.java
14252e05628d26c1f0e58f5ca3f41a649e297b00
[]
no_license
Thinkingcao/SpringBootLearning
a689b522ac7fe2c4998097f553335e3126526b7d
4f3dd49c29baffb027c366884e1fdade165e6946
refs/heads/master
2022-06-29T16:04:14.605974
2022-05-19T13:42:22
2022-05-19T13:42:22
182,008,253
97
101
null
2022-06-21T04:15:31
2019-04-18T03:16:14
JavaScript
UTF-8
Java
false
false
353
java
package com.thinkingcao.rocketmq.entity; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; @Data @AllArgsConstructor @NoArgsConstructor public class OrderPaidEvent implements Serializable { private String orderId; //订单id编号 private Integer paidMoney; //订单金额 }
[ "617271837@qq.com" ]
617271837@qq.com
02731b164fa1465acb523569af24926ac696a078
53699b7247e77ae70f4af6b718b05098de08615f
/Xmemcache_Src/src/net/rubyeye/xmemcached/codec/MemcachedEncoder.java
9d58eb72924ee08b63af7ac35f1362e5b344752d
[]
no_license
zogwei/allProject
fc758b2aa827c9540b456b0e637392244dbe6225
0cb62453d2a4d8c9b6ab8c08dede6e68989934f3
refs/heads/master
2021-01-25T06:36:57.899097
2013-11-29T09:19:08
2013-11-29T09:19:08
28,529,921
2
0
null
null
null
null
UTF-8
Java
false
false
1,109
java
/** *Copyright [2009-2010] [dennis zhuang(killme2008@gmail.com)] *Licensed under the Apache License, Version 2.0 (the "License"); *you may not use this file except in compliance with the License. *You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 *Unless required by applicable law or agreed to in writing, *software distributed under the License is distributed on an "AS IS" BASIS, *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, *either express or implied. See the License for the specific language governing permissions and limitations under the License */ package net.rubyeye.xmemcached.codec; import net.rubyeye.xmemcached.command.Command; import com.google.code.yanf4j.buffer.IoBuffer; import com.google.code.yanf4j.core.Session; import com.google.code.yanf4j.core.CodecFactory.Encoder; /** * memcached protocol encoder * * @author dennis * */ public class MemcachedEncoder implements Encoder { public IoBuffer encode(Object message, Session session) { return ((Command) message).getIoBuffer(); } }
[ "zogwei@gmail.com@60187b04-42e5-a1eb-cd66-7b3f5e7d8f8a" ]
zogwei@gmail.com@60187b04-42e5-a1eb-cd66-7b3f5e7d8f8a
ad1cf8978d10185cc41c862d6a4318ab661941a1
0175a417f4b12b80cc79edbcd5b7a83621ee97e5
/flexodesktop/model/flexofoundation/src/main/java/org/openflexo/foundation/validation/ValidationRuleSet.java
c821240dfab2fd0d7ee2013a216b274a6d1ed972
[]
no_license
agilebirds/openflexo
c1ea42996887a4a171e81ddbd55c7c1e857cbad0
0250fc1061e7ae86c9d51a6f385878df915db20b
refs/heads/master
2022-08-06T05:42:04.617144
2013-05-24T13:15:58
2013-05-24T13:15:58
2,372,131
11
6
null
2022-07-06T19:59:55
2011-09-12T15:44:45
Java
UTF-8
Java
false
false
2,442
java
/* * (c) Copyright 2010-2011 AgileBirds * * This file is part of OpenFlexo. * * OpenFlexo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * OpenFlexo 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 OpenFlexo. If not, see <http://www.gnu.org/licenses/>. * */ package org.openflexo.foundation.validation; import java.util.Enumeration; import java.util.Vector; import org.openflexo.foundation.utils.FlexoListModel; /** * Please comment this class * * @author sguerin * */ public class ValidationRuleSet extends FlexoListModel { protected Class _type; protected Vector<ValidationRule> _rules; public ValidationRuleSet(Class type) { super(); _type = type; _rules = new Vector<ValidationRule>(); } @Override public String getDeletedProperty() { // TODO Auto-generated method stub return null; } /** * @param type1 * @param vector */ public ValidationRuleSet(Class type, Vector<ValidationRule> vectorOfRules) { this(type); _rules = new Vector<ValidationRule>(vectorOfRules); } public void addRule(ValidationRule rule) { if (!_rules.contains(rule)) { _rules.add(rule); } } public void removeRule(ValidationRule rule) { if (_rules.contains(rule)) { _rules.remove(rule); } } public Enumeration<ValidationRule> elements() { return _rules.elements(); } /** * Implements * * @see javax.swing.ListModel#getSize() * @see javax.swing.ListModel#getSize() */ @Override public int getSize() { return _rules.size(); } /** * Implements * * @see javax.swing.ListModel#getElementAt(int) * @see javax.swing.ListModel#getElementAt(int) */ @Override public ValidationRule getElementAt(int index) { return _rules.get(index); } public Class getType() { return _type; } public Vector<ValidationRule> getRules() { return _rules; } private String _typeName; public String getTypeName() { if (_typeName == null) { _typeName = getType().getSimpleName(); } return _typeName; } }
[ "guillaume.polet@gmail.com" ]
guillaume.polet@gmail.com
ccdfd4a4df0a94ea4e6dd0b2eef9ffc04fee7bec
e77777b387a7c9908956ac398652ba1ca3bfbf92
/src/test/java/com/axisdesignsolution/gateway/config/timezone/HibernateTimeZoneTest.java
6ef3ed694eccb59d05c46c9ca1e73075b4c7ec27
[]
no_license
leorajesh/AxisDesignSolutionWebApp
cc2de4952ac0ab61eb57ac2d73682e8a2e011eff
33c272dcc53814e42461872d1c0deec89d911fd4
refs/heads/master
2022-10-29T23:30:34.574700
2018-11-19T15:32:30
2018-11-19T15:32:30
158,247,664
0
0
null
2022-10-05T19:15:33
2018-11-19T15:32:21
Java
UTF-8
Java
false
false
7,014
java
package com.axisdesignsolution.gateway.config.timezone; import com.axisdesignsolution.gateway.AxisDesignSolutionWebApp; import com.axisdesignsolution.gateway.repository.timezone.DateTimeWrapper; import com.axisdesignsolution.gateway.repository.timezone.DateTimeWrapperRepository; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.support.rowset.SqlRowSet; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.transaction.annotation.Transactional; import java.time.*; import java.time.format.DateTimeFormatter; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; /** * Unit tests for the UTC Hibernate configuration. */ @RunWith(SpringRunner.class) @SpringBootTest(classes = AxisDesignSolutionWebApp.class) public class HibernateTimeZoneTest { @Autowired private DateTimeWrapperRepository dateTimeWrapperRepository; @Autowired private JdbcTemplate jdbcTemplate; private DateTimeWrapper dateTimeWrapper; private DateTimeFormatter dateTimeFormatter; private DateTimeFormatter timeFormatter; private DateTimeFormatter dateFormatter; @Before public void setup() { dateTimeWrapper = new DateTimeWrapper(); dateTimeWrapper.setInstant(Instant.parse("2014-11-12T05:50:00.0Z")); dateTimeWrapper.setLocalDateTime(LocalDateTime.parse("2014-11-12T07:50:00.0")); dateTimeWrapper.setOffsetDateTime(OffsetDateTime.parse("2011-12-14T08:30:00.0Z")); dateTimeWrapper.setZonedDateTime(ZonedDateTime.parse("2011-12-14T08:30:00.0Z")); dateTimeWrapper.setLocalTime(LocalTime.parse("14:30:00")); dateTimeWrapper.setOffsetTime(OffsetTime.parse("14:30:00+02:00")); dateTimeWrapper.setLocalDate(LocalDate.parse("2016-09-10")); dateTimeFormatter = DateTimeFormatter .ofPattern("yyyy-MM-dd HH:mm:ss.S") .withZone(ZoneId.of("UTC")); timeFormatter = DateTimeFormatter .ofPattern("HH:mm:ss") .withZone(ZoneId.of("UTC")); dateFormatter = DateTimeFormatter .ofPattern("yyyy-MM-dd"); } @Test @Transactional public void storeInstantWithUtcConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("instant", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeFormatter.format(dateTimeWrapper.getInstant()); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeLocalDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("local_date_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getLocalDateTime() .atZone(ZoneId.systemDefault()) .format(dateTimeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeOffsetDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("offset_date_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getOffsetDateTime() .format(dateTimeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeZoneDateTimeWithUtcConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("zoned_date_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getZonedDateTime() .format(dateTimeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeLocalTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("local_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getLocalTime() .atDate(LocalDate.of(1970, Month.JANUARY, 1)) .atZone(ZoneId.systemDefault()) .format(timeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeOffsetTimeWithUtcConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("offset_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getOffsetTime() .toLocalTime() .atDate(LocalDate.of(1970, Month.JANUARY, 1)) .atZone(ZoneId.systemDefault()) .format(timeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeLocalDateWithUtcConfigShouldBeStoredWithoutTransformation() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("local_date", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getLocalDate() .format(dateFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } private String generateSqlRequest(String fieldName, long id) { return format("SELECT %s FROM jhi_date_time_wrapper where id=%d", fieldName, id); } private void assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(SqlRowSet sqlRowSet, String expectedValue) { while (sqlRowSet.next()) { String dbValue = sqlRowSet.getString(1); assertThat(dbValue).isNotNull(); assertThat(dbValue).isEqualTo(expectedValue); } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
d6d3cb50640f8967b8b3356768bb32f67c6f3042
b000bff55fa78503ade27051859489d448fe3d22
/retry/src/main/java/retry/FindCustomer.java
41b72598bf05144cb558d7337d26a3bc8f9256ba
[]
no_license
yourant/design-patterns
a90119206056d9340fd1ecebf22d5df66c9102f1
eff196951c36b2e8f51e2aea3cdfbda6044d3135
refs/heads/master
2023-09-01T21:00:12.586960
2021-10-24T15:42:20
2021-10-24T15:42:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
635
java
package retry; import java.util.ArrayDeque; import java.util.Deque; import java.util.List; /** * Created by qincasin on 2020/3/19. */ public final class FindCustomer implements BusinessOperation<String> { private String customId; private final Deque<BusinessException> errors; public FindCustomer(String customId, BusinessException... errors) { this.customId = customId; this.errors = new ArrayDeque(List.of(errors)); } @Override public String perform() throws BusinessException { if (!errors.isEmpty()) { throw errors.pop(); } return customId; } }
[ "qincasin@163.com" ]
qincasin@163.com