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
9bbc0a0df4a2a1d5ff8c73535617ecd0ecfe06e9
908b9859a4b45dca4d916720122a1b40c0fafe43
/labs/wsclient/src/main/java/com/mt/pos/ws/beans/BackupSimSmsListResponse.java
e72a89176eee256f1fedde92a1023882f24a1508
[]
no_license
mugabarigiraCHUK/scotomax-hman
778a3b48c9ac737414beaee9d72d1138a1e5b1ee
786478731338b5af7a86cada2e4582ddb3b2569f
refs/heads/master
2021-01-10T06:50:26.179698
2012-08-13T16:35:46
2012-08-13T16:35:46
46,422,699
0
0
null
null
null
null
UTF-8
Java
false
false
2,021
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2010.08.09 at 07:25:26 PM ICT // package com.mt.pos.ws.beans; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for backupSimSmsListResponse complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="backupSimSmsListResponse"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="return" type="{http://rm.isl.mt.com/}serverResponse" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "backupSimSmsListResponse", namespace = "http://rm.isl.mt.com/", propOrder = { "_return" }) @XmlRootElement(name = "backupSimSmsListResponse", namespace = "http://rm.isl.mt.com/") public class BackupSimSmsListResponse { @XmlElement(name = "return") protected ServerResponse _return; /** * Gets the value of the return property. * * @return * possible object is * {@link ServerResponse } * */ public ServerResponse getReturn() { return _return; } /** * Sets the value of the return property. * * @param value * allowed object is * {@link ServerResponse } * */ public void setReturn(ServerResponse value) { this._return = value; } }
[ "developmax@ad344d4b-5b83-fe1d-98cd-db9ebd70f650" ]
developmax@ad344d4b-5b83-fe1d-98cd-db9ebd70f650
dda7f60c020b865b82ce94afef229e5366389d09
747a9fbd3ea6a3d3e469d63ade02b7620d970ca6
/gmsm/src/main/java/com/getui/gmsm/bouncycastle/i18n/filter/SQLFilter.java
f7efe435f2af1058a90a41d97ca8c21a9909fef6
[]
no_license
xievxin/GitWorkspace
3b88601ebb4718dc34a2948c673367ba79c202f0
81f4e7176daa85bf8bf5858ca4462e9475227aba
refs/heads/master
2021-01-21T06:18:33.222406
2019-01-31T01:28:50
2019-01-31T01:28:50
95,727,159
3
0
null
null
null
null
UTF-8
Java
false
false
1,626
java
package com.getui.gmsm.bouncycastle.i18n.filter; /** * Filter for strings to store in a SQL table. * * escapes ' " = - / \ ; \r \n */ public class SQLFilter implements Filter { public String doFilter(String input) { StringBuffer buf = new StringBuffer(input); int i = 0; while (i < buf.length()) { char ch = buf.charAt(i); switch (ch) { case '\'': buf.replace(i,i+1,"\\\'"); i += 1; break; case '\"': buf.replace(i,i+1,"\\\""); i += 1; break; case '=': buf.replace(i,i+1,"\\="); i += 1; break; case '-': buf.replace(i,i+1,"\\-"); i += 1; break; case '/': buf.replace(i,i+1,"\\/"); i += 1; break; case '\\': buf.replace(i,i+1,"\\\\"); i += 1; break; case ';': buf.replace(i,i+1,"\\;"); i += 1; break; case '\r': buf.replace(i,i+1,"\\r"); i += 1; break; case '\n': buf.replace(i,i+1,"\\n"); i += 1; break; default: } i++; } return buf.toString(); } public String doFilterUrl(String input) { return doFilter(input); } }
[ "xiex@getui.com" ]
xiex@getui.com
a7abe13d45059e7418f7c0f59560c065f7b91992
7665d522c01524cbb825263f73c5d4700d3ce06d
/okgo-lib/src/main/java/com/lzy/extend/JsonConvert.java
38b2a969962738209b91a156189cc6ccebeaaece
[]
no_license
paulzeng/Billion_Health
3c329301dc5367a8592a73458b4fa77dfbd24f44
9188c7cf8dad057a45e1a757a4552feb015eb155
refs/heads/master
2021-03-21T00:36:59.200046
2018-12-14T03:25:58
2018-12-14T03:25:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,930
java
package com.lzy.extend; import com.google.gson.Gson; import com.google.gson.stream.JsonReader; import com.lzy.okgo.convert.Converter; import com.lzy.okgo.utils.OkLogger; import org.json.JSONArray; import org.json.JSONObject; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import okhttp3.Response; import okhttp3.ResponseBody; public class JsonConvert<T> implements Converter<T> { private Type type; private Class<T> clazz; public JsonConvert() { } public JsonConvert(Type type) { this.type = type; } public JsonConvert(Class<T> clazz) { this.clazz = clazz; } /** * 该方法是子线程处理,不能做ui相关的工作 * 主要作用是解析网络返回的 response 对象,生成onSuccess回调中需要的数据对象 * 这里的解析工作不同的业务逻辑基本都不一样,所以需要自己实现,以下给出的时模板代码,实际使用根据需要修改 */ @Override public T convertResponse(Response response) throws Throwable { // 重要的事情说三遍,不同的业务,这里的代码逻辑都不一样,如果你不修改,那么基本不可用 // 重要的事情说三遍,不同的业务,这里的代码逻辑都不一样,如果你不修改,那么基本不可用 // 重要的事情说三遍,不同的业务,这里的代码逻辑都不一样,如果你不修改,那么基本不可用 // 详细原理说明: https://github.com/jeasonlzy/okhttp-OkGo/wiki/JsonCallback if (type == null) { if (clazz == null) { // 如果没有通过构造函数传进来,就自动解析父类泛型的真实类型(有局限性,继承后就无法解析到) Type genType = getClass().getGenericSuperclass(); type = ((ParameterizedType) genType).getActualTypeArguments()[0]; } else { return parseClass(response, clazz); } } if (type instanceof ParameterizedType) { return parseParameterizedType(response, (ParameterizedType) type); } else if (type instanceof Class) { return parseClass(response, (Class<?>) type); } else { return parseType(response, type); } } private T parseClass(Response response, Class<?> rawType) throws Exception { if (rawType == null) return null; ResponseBody body = response.body(); if (body == null) return null; JsonReader jsonReader = new JsonReader(body.charStream()); if (rawType == String.class) { //noinspection unchecked return (T) body.string(); } else if (rawType == JSONObject.class) { //noinspection unchecked return (T) new JSONObject(body.string()); } else if (rawType == JSONArray.class) { //noinspection unchecked return (T) new JSONArray(body.string()); } else { T t = new Gson().fromJson(jsonReader, rawType); response.close(); return t; } } private T parseType(Response response, Type type) throws Exception { if (type == null) return null; ResponseBody body = response.body(); if (body == null) return null; JsonReader jsonReader = new JsonReader(body.charStream()); // 泛型格式如下: new JsonCallback<任意JavaBean>(this) T t = new Gson().fromJson(jsonReader, type); response.close(); return t; } private T parseParameterizedType(Response response, ParameterizedType type) throws Exception { if (type == null) return null; ResponseBody body = response.body(); if (body == null) return null; JsonReader jsonReader = new JsonReader(body.charStream()); Type rawType = type.getRawType(); // 泛型的实际类型 Type typeArgument = type.getActualTypeArguments()[0]; // 泛型的参数 if (rawType != BaseResponse.class) { // 泛型格式如下: new JsonCallback<外层BaseBean<内层JavaBean>>(this) T t = new Gson().fromJson(jsonReader, type); response.close(); return t; } else { if (typeArgument == Void.class) { // 泛型格式如下: new JsonCallback<LzyResponse<Void>>(this) SimpleBaseResponse simpleResponse = new Gson().fromJson(jsonReader, SimpleBaseResponse.class); response.close(); //noinspection unchecked return (T) simpleResponse.toBaseResponse(); } else { // 泛型格式如下: new JsonCallback<BaseResponse<内层JavaBean>>(this) BaseResponse baseResponse = new Gson().fromJson(jsonReader, type); response.close(); int code = baseResponse.msgcode; //这里的100是以下意思 //一般来说服务器会和客户端约定一个数表示成功,其余的表示失败,这里根据实际情况修改 if (code == 100) { //noinspection unchecked return (T) baseResponse; } else if (code == 104) { throw new IllegalStateException("用户授权信息无效"); } else if (code == 105) { throw new IllegalStateException("用户收取信息已过期"); } else if (code == 106) { throw new IllegalStateException("用户账户被禁用"); } else { //直接将服务端的错误信息抛出,onError中可以获取 throw new IllegalStateException("错误代码:" + code + ",错误信息:" + baseResponse.msgcode); } } } } }
[ "416143467@qq.com" ]
416143467@qq.com
57e9687a530d97da2c8643b5d5b7f8d79f953d37
5f90d95e66d06439a4286fa2b324f2286f7d91e1
/src/main/java/org/diorite/config/serialization/comments/DocumentCommentsImpl.java
63e66d54af47551940a67bd6efd6bda588fe3d9f
[ "MIT" ]
permissive
GotoFinal/diorite-configs-java8
bae8cae87577c88a00bde10e5086a6d377ac212a
53b2598f7cbcba4a7a7a956c81639c9d2a5c35e8
refs/heads/master
2021-06-27T22:25:46.607216
2018-09-30T19:55:33
2018-09-30T19:55:33
96,231,560
14
5
MIT
2018-09-30T19:32:40
2017-07-04T15:25:00
Java
UTF-8
Java
false
false
2,766
java
/* * The MIT License (MIT) * * Copyright (c) 2016. Diorite (by Bartłomiej Mazur (aka GotoFinal)) * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package org.diorite.config.serialization.comments; import javax.annotation.Nullable; import java.io.IOException; import java.io.Writer; import org.apache.commons.lang3.StringUtils; import org.diorite.config.annotations.SerializableAs; /** * Root comments node. */ @SerializableAs(DocumentComments.class) class DocumentCommentsImpl extends CommentsNodeImpl implements DocumentComments { private String header = StringUtils.EMPTY; private String footer = StringUtils.EMPTY; @Override public String getFooter() { return this.footer; } @Override public void setFooter(@Nullable String footer) { if ((footer == null) || footer.trim().isEmpty()) { footer = StringUtils.EMPTY; } this.footer = footer; } @Override public String getHeader() { return this.header; } @Override public void setHeader(@Nullable String header) { if ((header == null) || header.trim().isEmpty()) { header = StringUtils.EMPTY; } this.header = header; } @Override public DocumentComments getRoot() { return this; } @Override public void writeTo(Writer writer) throws IOException { CommentsWriter commentsWriter = new CommentsWriter(writer, this); commentsWriter.writeAll(); } @Override public DocumentComments copy() { DocumentCommentsImpl copy = new DocumentCommentsImpl(); copy.dataMap.putAll(this.copyMap(copy)); return copy; } }
[ "bartlomiejkmazur@gmail.com" ]
bartlomiejkmazur@gmail.com
f0fc687cd423052fbd17e164508c1d85da49edb4
1ec8b12e4ec6f0d746e7a74bc7ea96d08aa04451
/src/com/vmware/vim25/ArrayOfClusterAttemptedVmInfo.java
b26012f8e029df42340287bbe6462d481db75e25
[]
no_license
nickdeng1216/Intercloud
b5f76de436a3a112ac177b817199498f77f85160
5a325b943c28a95c8511806147667428fc284254
refs/heads/master
2022-02-23T15:40:16.366847
2019-09-29T12:50:20
2019-09-29T12:50:20
192,634,019
0
1
null
null
null
null
UTF-8
Java
false
false
2,271
java
/*================================================================================ Copyright (c) 2012 Steve Jin. 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 VMware, Inc. 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 VMWARE, INC. 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. ================================================================================*/ package com.vmware.vim25; /** * @author Steve Jin (http://www.doublecloud.org) * @version 5.1 */ public class ArrayOfClusterAttemptedVmInfo { public ClusterAttemptedVmInfo[] ClusterAttemptedVmInfo; public ClusterAttemptedVmInfo[] getClusterAttemptedVmInfo() { return this.ClusterAttemptedVmInfo; } public ClusterAttemptedVmInfo getClusterAttemptedVmInfo(int i) { return this.ClusterAttemptedVmInfo[i]; } public void setClusterAttemptedVmInfo(ClusterAttemptedVmInfo[] ClusterAttemptedVmInfo) { this.ClusterAttemptedVmInfo=ClusterAttemptedVmInfo; } }
[ "nickdeng1216@gmail.com" ]
nickdeng1216@gmail.com
90ce038d55e38638ea8784e1531d5029d7577d17
340b193641c8c4f6534072604b50dc4fd737466e
/src/main/java/com/lcy/util/scale/SatisfactionSurveyUtils.java
dd1c6238e567d06eb1e909789ee62022627ab520
[]
no_license
wang0077/hxjy
169aafae00dc4defd30a03968a8bd8db24330bed
1054fe54ec3f4cd870d4e9935eb8c62f358cd4bb
refs/heads/master
2023-02-24T13:49:26.024943
2021-02-03T08:31:23
2021-02-03T08:31:23
327,232,057
0
0
null
null
null
null
UTF-8
Java
false
false
1,998
java
package com.lcy.util.scale; import com.lcy.dto.scale.ProblemMiniDTO; import com.lcy.util.common.GsonUtils; import org.modelmapper.TypeToken; import java.io.*; import java.net.URL; import java.util.List; public class SatisfactionSurveyUtils { // 配置目录类型 private static final String FILE_NAME = "config/scale/satisfaction_survey.json"; // 获取单实例对 private static SatisfactionSurveyUtils instance = new SatisfactionSurveyUtils(); private static List<ProblemMiniDTO> PROBLEM_MINI_DTO_LIST; /** * 私有构 */ private SatisfactionSurveyUtils(){ this.initConfigs(); } /** * 初始化配置 */ private void initConfigs(){ URL url = null; String path = null; try{ path = System.getProperty("user.dir") + File.separator + FILE_NAME; File file = new File(path); if (!file.exists()) { url = SatisfactionSurveyUtils.class.getClassLoader().getResource( FILE_NAME); path = url.getPath(); file = new File(path); } StringBuffer laststr = new StringBuffer(); BufferedReader reader = null; try { FileInputStream in = new FileInputStream(file); reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));// 读取文件 String tempString = null; while ((tempString = reader.readLine()) != null) { laststr = laststr.append(tempString); } reader.close(); } catch (IOException e) { e.printStackTrace(); } finally { if (reader != null) { try { reader.close(); } catch (IOException el) { } } } PROBLEM_MINI_DTO_LIST = GsonUtils.jsonToBean(laststr.toString(), new TypeToken<List<ProblemMiniDTO>>(){}.getType()); }catch(Exception e){ System.out.println(FILE_NAME+" 文件不存在"); e.printStackTrace(); return; } } /** * @return 单实例对象 */ public static SatisfactionSurveyUtils getInstance(){ return instance; } public static List<ProblemMiniDTO> getProblemList(){ return PROBLEM_MINI_DTO_LIST; } }
[ "44741783+wang0077@users.noreply.github.com" ]
44741783+wang0077@users.noreply.github.com
84cbe06c446f2e8121133745ce5bc0bdfd1613f7
7016cec54fb7140fd93ed805514b74201f721ccd
/src/java/com/echothree/control/user/forum/common/form/DeleteForumPartyTypeRoleForm.java
7b3a4cf90366af50c0644b7c0176dd4f61f8e704
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
1,049
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // -------------------------------------------------------------------------------- package com.echothree.control.user.forum.common.form; import com.echothree.control.user.forum.common.spec.ForumPartyTypeRoleSpec; public interface DeleteForumPartyTypeRoleForm extends ForumPartyTypeRoleSpec { // Nothing additional beyond ForumPartyTypeSpec }
[ "rich@echothree.com" ]
rich@echothree.com
fc0d4c0adead59e35dc3a5531cf95af4142a4b71
7034b8c445d2c6ec34b6ae2d7c4ea0a9ce7f2b36
/src/main/java/tasks/DivideStringIntoGroupsOfSizeK.java
2679d349c0a08e65eab31ee49ffcecce6284981a
[]
no_license
RakhmedovRS/LeetCode
1e0da62cf6fab90575e061aae27afb22cc849181
da4368374eead2f2ce2300c3dfdc941430e717ca
refs/heads/master
2023-08-31T01:03:59.047473
2023-08-27T04:52:15
2023-08-27T04:52:15
238,749,044
14
8
null
null
null
null
UTF-8
Java
false
false
828
java
package tasks; import common.Difficulty; import common.LeetCode; import java.util.ArrayList; import java.util.List; /** * @author RakhmedovRS * @created 1/18/2022 */ @LeetCode( id = 2138, name = "Divide a String Into Groups of Size k", url = "https://leetcode.com/problems/divide-a-string-into-groups-of-size-k/", difficulty = Difficulty.EASY ) public class DivideStringIntoGroupsOfSizeK { public String[] divideString(String s, int k, char fill) { int pos = 0; List<String> list = new ArrayList<>(); while (pos < s.length()) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < k; i++) { if (pos < s.length()) { sb.append(s.charAt(pos++)); } else { sb.append(fill); } } list.add(sb.toString()); } return list.toArray(new String[]{}); } }
[ "rakhmedovrs@gmail.com" ]
rakhmedovrs@gmail.com
ce1a730cb4f14ded8924d5be0eff971ec5ac2013
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13916-7-24-MOEAD-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/WikiInitializerJob_ESTest.java
9a7979e9e4b572e71ba988e17621c70196bd34d9
[]
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
565
java
/* * This file was automatically generated by EvoSuite * Tue Apr 07 20:14:24 UTC 2020 */ package com.xpn.xwiki.internal; 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 WikiInitializerJob_ESTest extends WikiInitializerJob_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
c822d4ac4d3d450950773719bb22693569a0d6cf
f80b63052b690ef6c145727c4c0a46b94ec33394
/ylc/src/com/louding/frame/http/JsonRequest.java
56a0f4deaf032b09e67388b466a8fe8f6a91cf84
[]
no_license
dougisadog/xiaoman
dbd31ff957ec4e90606ed395c57275561d9a9b40
5dc8bb23f4680eaeded0fd6421c39aeb62ca1eee
refs/heads/master
2020-12-11T07:19:04.544002
2017-09-06T09:18:58
2017-09-06T09:18:59
68,798,640
0
0
null
null
null
null
UTF-8
Java
false
false
2,860
java
/* * Copyright (c) 2014, 张涛. * * 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.louding.frame.http; import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.util.Map; import com.louding.frame.utils.KJLoger; /** * 用来发起application/json格式的请求的,我们平时所使用的是form表单提交的参数,而使用JsonRequest提交的是json参数。 */ public class JsonRequest extends Request<byte[]> { private static final String PROTOCOL_CHARSET = "utf-8"; private static final String PROTOCOL_CONTENT_TYPE = String.format( "application/json; charset=%s", PROTOCOL_CHARSET); private final String mRequestBody; private final HttpParams mParams; public JsonRequest(int method, String url, HttpParams params, HttpCallBack callback) { super(method, url, callback); mRequestBody = params.getJsonParams(); mParams = params; if (null != mCallback && mCallback.isStream()) { setShouldCache(false); } } @Override public Map<String, String> getHeaders() { return mParams.getHeaders(); } @Override protected void deliverResponse(Map<String, String> headers, byte[] response) { if (mCallback != null) { mCallback.onSuccess(headers, response); } } @Override public Response<byte[]> parseNetworkResponse(NetworkResponse response) { return Response.success(response.data, response.headers, HttpHeaderParser.parseCacheHeaders(mConfig, response)); } @Override public String getBodyContentType() { return PROTOCOL_CONTENT_TYPE; } @Override public String getCacheKey() { if (getMethod() == HttpMethod.POST) { return getUrl() + mParams.getUrlParams(); } else { return getUrl(); } } @Override public byte[] getBody() { try { return mRequestBody == null ? null : mRequestBody .getBytes(PROTOCOL_CHARSET); } catch (UnsupportedEncodingException uee) { KJLoger.debug( "Unsupported Encoding while trying to get the bytes of %s using %s", mRequestBody, PROTOCOL_CHARSET); return null; } } }
[ "wzc2542736@163.com" ]
wzc2542736@163.com
ef5cb5b78b7509483786bdaa68f0527b250c90b2
aa8ee2ae7989f9a2c31a3b758a0688daf0eb8a40
/gframedl/src/main/java/de/unidue/inf/is/ezdl/gframedl/tools/search/actions/DisableExtractAction.java
63c4133bd74cb8e1722229555fe185bdadf99a72
[]
no_license
drag0sd0g/ezDL
c7c26a85b7e8be557513498a87bea9c24e2973e0
38d8d98a4f40eff566b0532fdbb21c0a935b42d6
refs/heads/master
2020-08-05T21:34:52.384264
2011-06-26T10:56:58
2011-06-26T10:56:58
1,955,388
0
0
null
null
null
null
UTF-8
Java
false
false
1,931
java
/* * Copyright 2009-2011 Universität Duisburg-Essen, Working Group * "Information Engineering" * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package de.unidue.inf.is.ezdl.gframedl.tools.search.actions; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.Action; import de.unidue.inf.is.ezdl.dlfrontend.i18n.I18nSupport; import de.unidue.inf.is.ezdl.gframedl.Icons; import de.unidue.inf.is.ezdl.gframedl.tools.search.SearchTool; import de.unidue.inf.is.ezdl.gframedl.tools.search.panels.SearchControlsPanel; /** * Default action for the extract button in the {@link SearchControlsPanel} of * the {@link SearchTool}. Is added to the list of Actions so that the extract * button can be disabled while a search is in progress. * * @author tacke */ public class DisableExtractAction extends AbstractAction { private static final long serialVersionUID = 1254412767194167787L; /** * Constructor, that adds text label and icon of the extract action. */ public DisableExtractAction() { putValue(Action.NAME, I18nSupport.getInstance().getLocString("ezdl.controls.resultlistpanel.label.extract")); putValue(Action.SMALL_ICON, Icons.EXTRACT_ACTION.get16x16()); } @Override public void actionPerformed(ActionEvent e) { } }
[ "dragos.dogaru.1987@googlemail.com" ]
dragos.dogaru.1987@googlemail.com
5abcfbd8be2bca33e07b14014359f7073050553d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_9756da351688f98437916b710b9871372ac8ddcb/MetadataCreatorTest/12_9756da351688f98437916b710b9871372ac8ddcb_MetadataCreatorTest_s.java
614ff4176729648764dd5b96f8ab67c2b8ea820d
[]
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
1,564
java
package test.concordion.internal.listener; import junit.framework.TestCase; import nu.xom.Attribute; import nu.xom.Document; import nu.xom.Element; import org.concordion.internal.listener.MetadataCreator; public class MetadataCreatorTest extends TestCase { private MetadataCreator metadataCreator = new MetadataCreator(); private Element html = new Element("html"); private Document document = new Document(html); private Element head = new Element("head"); public MetadataCreatorTest() { html.appendChild(head); } public void testAddsContentTypeMetadataIfMissing() throws Exception { metadataCreator.beforeParsing(document); assertEquals("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /></head></html>", html.toXML()); } public void testDoesNotAddContentTypeMetadataIfAlreadyPresent() throws Exception { Element meta = new Element("meta"); meta.addAttribute(new Attribute("http-equiv", "Content-Type")); meta.addAttribute(new Attribute("content", "text/html; charset=UTF-8")); head.appendChild(new Element(meta)); assertEquals("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /></head></html>", html.toXML()); metadataCreator.beforeParsing(document); assertEquals("<html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /></head></html>", html.toXML()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
049bc2a887c5ca09e98c4820f4c96c7fcf3fd073
dd0eb0786bd86d2bf01aed3f5b05c9b790927981
/src/main/java/org/jumutang/giftpay/controller/ArchivesController.java
d8549e53318ce86d18a9e06b2021e0a3eb89444e
[]
no_license
havetogg/giftpay_wap
ebc0230c5806b50ca593ca39669c56a4fc46c466
b5cc0e135f778de46f484c3aa2f7230874d63290
refs/heads/master
2021-01-01T06:31:01.043926
2017-08-15T08:15:14
2017-08-15T08:15:14
97,445,253
0
2
null
null
null
null
UTF-8
Java
false
false
8,057
java
package org.jumutang.giftpay.controller; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.jumutang.giftpay.model.BalanceModel; import org.jumutang.giftpay.model.UserMainModel; import org.jumutang.giftpay.model.UserSubModel; import org.jumutang.giftpay.service.BalanceServiceI; import org.jumutang.giftpay.service.UserMainService; import org.jumutang.giftpay.service.UserSubService; import org.jumutang.giftpay.tools.HttpUtil; import org.jumutang.giftpay.tools.MD5X; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; /** * 身份验证调用转发控制层 * * @author 鲁雨 * @since 20170120 * @version v1.0 * * copyright Luyu(18994139782@163.com) * */ @Controller public class ArchivesController { @Autowired private BalanceServiceI balanceServiceI; @Autowired private UserMainService userMainService; @Autowired private UserSubService userSubService; /** * 获取档案信息 * @param request * @param response * @return */ @ResponseBody @RequestMapping("/getArchives") public String getArchives(HttpServletRequest request,HttpServletResponse response){ String url = "http://ityuany.com:8080/archives/queryArchives"; String identity = "5c8b58d99aee469d96a9e315f5ac4c2b"; // String result = HttpUtil.sendGet(url,"UTF-8",identity); Map<String,Object> result = new HashMap<>(); result.put("code", 10000); // System.out.println("请求发送完毕"); return JSON.toJSONString(result); } /** * 创建档案信息 * @param request * @return */ @ResponseBody @RequestMapping("/saveArchives") public String saveArchives(HttpServletRequest request,String name,String code){ String url = "http://ityuany.com:8080/archives/addArchives"; String id = "5c8b58d99aee469d96a9e315f5ac4c2b"; Map<String,Object> param = new HashMap<>(); param.put("name",name); param.put("cert",code ); // String result = HttpUtil.sendPost(url, "utf-8", JSON.toJSONString(param), id); Map<String,Object> result = new HashMap<>(); result.put("code", 10000); return JSON.toJSONString(result); } /** * 检验身份信息 * @param request * @return */ @ResponseBody @RequestMapping("/checkArchives") public String checkArchives(HttpServletRequest request){ HttpSession session = request.getSession(); Map<String,Object> result = new HashMap<>(); String userId = (String)session.getAttribute("userId"); if(userId==null){ result.put("state", "1"); result.put("message", "未登录"); return JSON.toJSONString(result); } String name = request.getParameter("name"); String code = request.getParameter("code"); String pwd = request.getParameter("pwd"); UserMainModel userMainModel = new UserMainModel(); userMainModel.setUserName(name); userMainModel.setIdCard(code); List<UserMainModel> list = userMainService.queryUserMainModel(userMainModel); if(list.size()==0){ result.put("state", 2); result.put("message", "身份信息错误"); return JSON.toJSONString(result); } pwd = MD5X.getLowerCaseMD5For32(pwd); BalanceModel balanceModel = new BalanceModel(); balanceModel.setAccountId(userId); balanceModel.setPayPassword(pwd); int result1 = balanceServiceI.updateBalance(balanceModel); if(result1 >0){ result.put("state", 0); }else{ result.put("state", 3); result.put("message", "设置失败"); } return JSON.toJSONString(result); } /** * 查询是否绑定身份信息 * @param request * @return */ @ResponseBody @RequestMapping("/checkIdCard") public String checkIdCard(HttpServletRequest request){ HttpSession session = request.getSession(); Map<String,Object> map = new HashMap<>(); String userId = (String)session.getAttribute("userId"); UserMainModel userMainModel = new UserMainModel(); userMainModel.setId(userId); List<UserMainModel> userList = userMainService.queryUserMainModel(userMainModel); UserMainModel userMainModelResult = userList.get(0); if(userMainModelResult.getIdCard()==null){ map.put("state", 3); map.put("message", "未身份验证"); return JSON.toJSONString(map); }else{ map.put("state", 4); map.put("message", "查询失败"); return JSON.toJSONString(map); } } /** * 保存身份证信息 * @param request * @return */ @ResponseBody @RequestMapping("/saveIdCard") public String saveIdCard(HttpServletRequest request){ String idCard = request.getParameter("idCard"); String userName = request.getParameter("userName"); HttpSession session = request.getSession(); Map<String,Object> map = new HashMap<>(); String userId = (String)session.getAttribute("userId"); UserMainModel userMainModel = new UserMainModel(); userMainModel.setIdCard(idCard); userMainModel.setUserName(userName); userMainModel.setId(userId); int result = userMainService.updateUserMainModel(userMainModel); if(result!=0){ map.put("state", 0); return JSON.toJSONString(map); }else{ map.put("state", 3); map.put("message", "绑定身份失败"); return JSON.toJSONString(map); } } /** * 获取用户信息 * @param request * @return */ @ResponseBody @RequestMapping("/isSettingInfo") public String isSetingInfo(HttpServletRequest request){ Map<String,Object> map = new HashMap<>(); HttpSession session = request.getSession(); String userId = (String)session.getAttribute("userId"); if(userId == null){ map.put("state", "1"); map.put("message", "未登录"); return JSON.toJSONString(map); } //查询支付密码 BalanceModel balanceModel = new BalanceModel(); balanceModel.setAccountId(userId); List<BalanceModel> balanceList = balanceServiceI.queryBalances(balanceModel); if(balanceList.size()==0){ map.put("state", 3); map.put("message", "无账户"); return JSON.toJSONString(map); }else{ map.put("pwd", balanceList.get(0).getPayPassword()); } //查询用户信息 UserMainModel userMainModel = new UserMainModel(); userMainModel.setId(userId); List<UserMainModel> resultList = userMainService.queryUserMainModel(userMainModel); map.put("state", 0); map.put("data", resultList.get(0)); return JSON.toJSONString(map); } /** * 验证身份修改密码 * @param request * @return */ @ResponseBody @RequestMapping("/chechIdCode") public String checkId(HttpServletRequest request){ HttpSession session = request.getSession(); Map<String, Object> map = new HashMap<>(); String userId = (String)session.getAttribute("userId"); if(userId == null){ map.put("state", "1"); map.put("message", "未登录"); return JSON.toJSONString(map); } String password = request.getParameter("pwd"); String name = request.getParameter("name"); String code = request.getParameter("code"); UserMainModel userMainModel = new UserMainModel(); userMainModel.setIdCard(code); userMainModel.setUserName(name); List<UserMainModel> list = userMainService.queryUserMainModel(userMainModel); if(list.size()==0){ map.put("state",1); map.put("message", "身份信息错误"); return JSON.toJSONString(map); } BalanceModel balanceModel = new BalanceModel(); balanceModel.setAccountId(userId); balanceModel.setPayPassword(MD5X.getLowerCaseMD5For32(password)); int result = balanceServiceI.updateBalance(balanceModel); if(result == 0){ map.put("state", 2); map.put("message", "设置失败"); return JSON.toJSONString(map); }else{ map.put("state", 0); return JSON.toJSONString(map); } } }
[ "278496708@qq.com" ]
278496708@qq.com
3d6f1df07fdf22d48cf90700505aee5052f8d82c
9cc68b1964d78e140135231408c2001552855873
/src/main/java/us/tryy3/rgbarmor/handlers/ConfigHandler.java
2735ae2bfa2c928e6bc837263bb8f2bfaa554ad7
[ "Apache-2.0" ]
permissive
tryy3/RGBArmor
03fa18e66a7b8c8506a8c42ff90984a94325ab93
d942ce368a97b869c9bc23639ad54e5f410ab240
refs/heads/master
2020-05-17T15:48:15.349528
2015-08-17T03:58:09
2015-08-17T03:58:09
40,858,379
0
0
null
null
null
null
UTF-8
Java
false
false
2,985
java
package us.tryy3.rgbarmor.handlers; import org.bukkit.Bukkit; import org.bukkit.configuration.file.FileConfiguration; import org.bukkit.configuration.file.YamlConfiguration; import org.bukkit.entity.Player; import us.tryy3.rgbarmor.Main; import us.tryy3.rgbarmor.objects.Animation; import us.tryy3.rgbarmor.objects.Armor; import us.tryy3.rgbarmor.objects.PlayerRGB; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * Created by tryy3 on 2015-07-24. */ public class ConfigHandler { //TODO: Maybe add load functions from animation/player handler? public static void save(Animation animation) { FileConfiguration config = YamlConfiguration.loadConfiguration(animation.getFile()); config.set("Name", animation.getName()); config.set("Ticks", animation.getTicks()); config.createSection("Enchantments", animation.getEnchantments()); List<String> list = new ArrayList<>(); for (List<Integer> i: animation.getRgb()) { String s = i.get(0) + "." + i.get(1) + "," + i.get(2); list.add(s); } config.set("RGB", list); try { config.save(animation.getFile()); } catch (IOException e) { e.printStackTrace(); } } public static void save(Player player) { FileConfiguration config = YamlConfiguration.loadConfiguration(new File(Main.file + "/players.yml")); String playerUUID = "Players." + player.getUniqueId(); PlayerRGB playerRGB = PlayerHandler.getPlayer(player.getUniqueId().toString()); Armor helmet = playerRGB.getHelmet(); Armor chestplate = playerRGB.getChestplate(); Armor leggings = playerRGB.getLeggings(); Armor boots = playerRGB.getBoots(); config.set(playerUUID + ".helmet.animation", helmet.getAnimation().getUniqueName()); config.set(playerUUID + ".helmet.ticks", helmet.getTicks()); config.set(playerUUID + ".helmet.active", helmet.isActive()); config.set(playerUUID + ".chestplate.animation", chestplate.getAnimation().getUniqueName()); config.set(playerUUID + ".chestplate.ticks", chestplate.getTicks()); config.set(playerUUID + ".chestplate.active", chestplate.isActive()); config.set(playerUUID + ".leggings.animation", leggings.getAnimation().getUniqueName()); config.set(playerUUID + ".leggings.ticks", leggings.getTicks()); config.set(playerUUID + ".leggings.active", leggings.isActive()); config.set(playerUUID + ".boots.animation", boots.getAnimation().getUniqueName()); config.set(playerUUID + ".boots.ticks", boots.getTicks()); config.set(playerUUID + ".boots.active", boots.isActive()); try { config.save(new File(Main.file + "/players.yml")); } catch (IOException e) { e.printStackTrace(); } } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
82ad97148cad131db73c97d8284f29502b93dbb2
62e9a75b8a85570139599eb802905fe6659a6499
/forge-1.18/src/main/java/org/dynmapblockscan/forge_1_18/statehandlers/ForgeStateContainer.java
ffd41f8152f9cff59e2d199433bb02ec148925bf
[]
no_license
webbukkit/DynmapBlockScan
f5b213b04d3d9a301f0eb85929c0db91269071aa
33fec65b2c893dc11d894fbc6247051224a37710
refs/heads/master
2023-06-23T11:15:34.178600
2023-06-14T02:32:05
2023-06-14T02:32:05
89,141,357
55
36
null
2023-06-04T20:38:14
2017-04-23T12:48:31
Java
UTF-8
Java
false
false
3,352
java
package org.dynmapblockscan.forge_1_18.statehandlers; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; import org.dynmapblockscan.core.statehandlers.StateContainer; import java.util.Set; import com.google.common.collect.ImmutableMap; import net.minecraft.util.StringRepresentable; import net.minecraft.world.level.block.AirBlock; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.BushBlock; import net.minecraft.world.level.block.CropBlock; import net.minecraft.world.level.block.FlowerBlock; import net.minecraft.world.level.block.GrassBlock; import net.minecraft.world.level.block.LeavesBlock; import net.minecraft.world.level.block.LiquidBlock; import net.minecraft.world.level.block.TallGrassBlock; import net.minecraft.world.level.block.VineBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.Property; public class ForgeStateContainer extends StateContainer { public ForgeStateContainer(Block blk, Set<String> renderprops, Map<String, List<String>> propMap) { List<BlockState> bsl = blk.getStateDefinition().getPossibleStates(); BlockState defstate = blk.defaultBlockState(); if (renderprops == null) { renderprops = new HashSet<String>(); for (String pn : propMap.keySet()) { renderprops.add(pn); } } // Build table of render properties and valid values for (String pn : propMap.keySet()) { if (renderprops.contains(pn) == false) { continue; } this.renderProperties.put(pn, propMap.get(pn)); } this.defStateIndex = 0; int idx = 0; for (BlockState bs : bsl) { ImmutableMap.Builder<String,String> bld = ImmutableMap.builder(); for (Property<?> ent : bs.getProperties()) { String pn = ent.getName(); if (renderprops.contains(pn)) { // If valid render property Comparable<?> v = bs.getValue(ent); if (v instanceof StringRepresentable) { v = ((StringRepresentable)v).getSerializedName(); } bld.put(pn, v.toString()); } } StateRec sr = new StateRec(idx, bld.build()); int prev_sr = records.indexOf(sr); if (prev_sr < 0) { if (bs.equals(defstate)) { this.defStateIndex = records.size(); } records.add(sr); } else { StateRec prev = records.get(prev_sr); if (prev.hasMeta(idx) == false) { sr = new StateRec(prev, idx); records.set(prev_sr, sr); if (bs.equals(defstate)) { this.defStateIndex = prev_sr; } } } idx++; } // Check for well-known block types if (blk instanceof LeavesBlock) { type = WellKnownBlockClasses.LEAVES; } else if (blk instanceof CropBlock) { type = WellKnownBlockClasses.CROPS; } else if (blk instanceof FlowerBlock) { type = WellKnownBlockClasses.FLOWER; } else if (blk instanceof TallGrassBlock) { type = WellKnownBlockClasses.TALLGRASS; } else if (blk instanceof VineBlock) { type = WellKnownBlockClasses.VINES; } else if (blk instanceof BushBlock) { type = WellKnownBlockClasses.BUSH; } else if (blk instanceof GrassBlock) { type = WellKnownBlockClasses.GRASS; } else if (blk instanceof LiquidBlock) { type = WellKnownBlockClasses.LIQUID; } } }
[ "mike@primmhome.com" ]
mike@primmhome.com
eb9f4b5afb989a01c5e300b91710bd5ebce7da43
e56046696d18a10fadb689ae63d7507a611d9772
/src/testjob/level17/lesson10/home10/Solution.java
a85c7fe1efa02719d5359c543c9e6c560e77fc0d
[]
no_license
mogsev/study
1e4674cea4f3646626a0fc66b5ed5fc857532d6c
6a9deffd0d28f8f6aafca415f66e5e70351a3b65
refs/heads/master
2016-09-10T23:40:44.675523
2015-08-15T19:53:08
2015-08-15T19:53:08
30,208,631
1
0
null
null
null
null
UTF-8
Java
false
false
1,861
java
package com.javarush.test.level17.lesson10.home10; /* Посчитаем 1. Сделай так, чтобы результат успел посчитаться для всех элементов массива values НЕ используя Thread.sleep 2. Исправь synchronized блок так, чтобы программа не вывела результат на экран */ public class Solution { public static void main(String[] args) throws InterruptedException { Counter counter1 = new Counter(); Counter counter2 = new Counter(); Counter counter3 = new Counter(); Counter counter4 = new Counter(); counter1.start(); counter2.start(); counter3.start(); counter4.start(); for (int i = 1; i <= 100; i++) { if (values[i] > 1) { System.out.println(String.format("%d повторилось %d раз", i, values[i])); } else if (values[i] == 0) { System.out.println(String.format("%d ни разу не встретилось", i)); } } } public static Integer count = 0; public static int[] values = new int[105]; static { for (int i = 0; i < 105; i++) { values[i] = 0; } } public static void incrementCount() { count++; } public static int getCount() { return count; } public static class Counter extends Thread { @Override public void run() { do { synchronized (this) { incrementCount(); values[getCount()]++; } try { Thread.sleep(1); } catch (InterruptedException e) { } } while (getCount() < 100); } } }
[ "mogsev@gmail.com" ]
mogsev@gmail.com
d26f9fb93c869d8ab916fcded9b492af747b2df3
99e44fc1db97c67c7ae8bde1c76d4612636a2319
/app/src/main/java/com/android/libs/gallerycommon/exif/IfdId.java
ba861e9de6e2c3669d5854ae08251b7940ebca0b
[ "MIT" ]
permissive
wossoneri/AOSPGallery4AS
add7c34b2901e3650d9b8518a02dd5953ba48cef
0be2c89f87e3d5bd0071036fe89d0a1d0d9db6df
refs/heads/master
2022-03-21T04:42:57.965745
2022-02-23T08:44:51
2022-02-23T08:44:51
113,425,141
3
2
MIT
2022-02-23T08:44:52
2017-12-07T08:45:41
Java
UTF-8
Java
false
false
1,099
java
/* * Copyright (C) 2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.libs.gallerycommon.exif; /** * The constants of the IFD ID defined in EXIF spec. */ public interface IfdId { public static final int TYPE_IFD_0 = 0; public static final int TYPE_IFD_1 = 1; public static final int TYPE_IFD_EXIF = 2; public static final int TYPE_IFD_INTEROPERABILITY = 3; public static final int TYPE_IFD_GPS = 4; /* This is used in ExifData to allocate enough IfdData */ static final int TYPE_IFD_COUNT = 5; }
[ "siyolatte@gmail.com" ]
siyolatte@gmail.com
6435eba84bcf4d93b991a59de0a70fe3985c4f34
f63f198b0ca6771d1eb3aba003907fde921ed4d4
/education-service/src/main/java/com/jimmy/service/StudentInfoService.java
402d2aec01cf5d85b44330b77e0c53549a64cc77
[]
no_license
aidenyan/education
4c7bc652a380fde09cfef391e077284654e957bc
d237d771ec5f05bf310ae7bd1d9a95438358f62c
refs/heads/master
2022-07-07T08:06:56.957303
2019-09-07T02:30:00
2019-09-07T02:30:00
190,502,159
0
0
null
2022-06-17T02:11:33
2019-06-06T02:42:18
JavaScript
UTF-8
Java
false
false
2,079
java
package com.jimmy.service; import com.jimmy.dao.entity.StudentInfo; import java.util.List; public interface StudentInfoService { /** * 根据的ID查找学生信息 * * @param id ID * @return 学生信息 */ StudentInfo findById(Long id); /** * 根据登录账号查找学生信息 * * @param name 学生登录账号 * @return 学生信息 */ StudentInfo findByName(String name); /** * 判断班级是否已经被使用 */ boolean isExistClassmate(Long classmateId); /** * 根据名字搜索 * * @param name 学生名字 * @return List<学生信息> */ List<StudentInfo> list(String name); /** * 根据id获取学生信息 * * @param idList ID列表 * @return List<学生信息> */ List<StudentInfo> list(List<Long> idList); List<StudentInfo> listBase(List<Long> idList); /** * 根据班级ID获取学生信息 * * @param classMateIdList 班级ID * @return List<学生信息> */ List<StudentInfo> listByClassMate(List<Long> classMateIdList); /** * 根据班级ID获取学生信息 * * @param classMateIdList 班级ID * @return List<学生信息> */ List<StudentInfo> listByClassMate(List<Long> classMateIdList, String realName); /** * 更新token * * @param token token * @param id ID */ void updateToken(String token, Long id); /** * 保存学生信息 * * @param studentInfo 学生信息 * @return 保存的数量 */ int save(StudentInfo studentInfo); /** * 保存学生头部特征 */ int updateHeader(String headerInfo, Long id); /** * 保存学生头部特征 */ void updateHeader(String headerInfo, String headerImg, Integer faceVersion, Long id); /** * 保存学生头部图片 */ int updateHeaderImg(String headerImg, Long id); /** * 删除 * * @param id */ void delete(Long id); }
[ "yanyifei@zcckj.com" ]
yanyifei@zcckj.com
6dc764b5accbc1ee5e31719c8886d3c3119c2a20
6d82f06048d330216b17c19790f29075e62e47d5
/snapshot/runtime/util/defaults/src/test/org/apache/avalon/util/defaults/test/DefaultsBuilderTestCase.java
78fb594f4254fcdbe6fb67353913a842995c0bb2
[]
no_license
IdelsTak/dpml-svn
7d1fc3f1ff56ef2f45ca5f7f3ae88b1ace459b79
9f9bdcf0198566ddcee7befac4a3b2c693631df5
refs/heads/master
2022-03-19T15:50:45.872930
2009-11-23T08:45:39
2009-11-23T08:45:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,847
java
/* * Copyright 2004 The Apache Software Foundation * * 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.apache.avalon.util.defaults.test; import java.util.Properties; import java.io.File; import java.io.IOException; import junit.framework.TestCase ; import org.apache.avalon.util.defaults.DefaultsBuilder; /** * DefaultsBuilderTestCase * * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a> * @version $Id: DefaultsBuilderTestCase.java 30977 2004-07-30 08:57:54Z niclas $ */ public class DefaultsBuilderTestCase extends TestCase { private static final String KEY = "test"; private DefaultsBuilder m_builder; protected void setUp() throws Exception { File base = getWorkDir(); m_builder = new DefaultsBuilder( KEY, base ); } private File getWorkDir() { String path = System.getProperty( "project.dir" ); if( null != path ) { return new File( path ); } else { path = System.getProperty( "basedir" ); File root = new File( path ); return new File( root, "target/test-classes" ); } } public void testHomeDirectory() throws Exception { System.out.println( "inst: " + m_builder.getHomeDirectory() ); } public void testHomeProperties() throws Exception { System.out.println( "home: " + m_builder.getHomeProperties() ); } public void testUserProperties() throws Exception { System.out.println( "user: " + m_builder.getUserProperties() ); } public void testDirProperties() throws Exception { System.out.println( "dir: " + m_builder.getDirProperties() ); } public void testConsolidatedProperties() throws Exception { File base = getWorkDir(); File props = new File( base, "test.keys" ); Properties properties = DefaultsBuilder.getProperties( props ); String[] keys = (String[]) properties.keySet().toArray( new String[0] ); Properties defaults = DefaultsBuilder.getProperties( DefaultsBuilderTestCase.class.getClassLoader(), "static.properties" ); System.out.println( "con: " + m_builder.getConsolidatedProperties( defaults, keys ) ); } }
[ "niclas@00579e91-1ffa-0310-aa18-b241b61564ef" ]
niclas@00579e91-1ffa-0310-aa18-b241b61564ef
0ad7739a132b2b9e742d99d63fceed51572eb7c7
d36d5ba4d8d1df1ad4494c94bd39252e128c5b5b
/com.jaspersoft.studio/src/com/jaspersoft/studio/model/IContainer.java
f020e6d1668083c180ef82c05cf4e0c2579a1c3c
[]
no_license
xviakoh/jaspersoft-xvia-plugin
6dfca36eb27612f136edc4c206e631d8dd8470f0
c037a0568a518e858a201fda257a8fa416af3908
refs/heads/master
2021-01-01T19:35:32.905460
2015-06-18T15:21:11
2015-06-18T15:21:11
37,666,261
0
0
null
null
null
null
UTF-8
Java
false
false
683
java
/******************************************************************************* * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved. * http://www.jaspersoft.com. * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ package com.jaspersoft.studio.model; public interface IContainer { }
[ "kyungseog.oh@trackvia.com" ]
kyungseog.oh@trackvia.com
ecb00a8e3ff081ce3d2656c7fa2468c66ab13153
1594d85883fb5e65a3b5217d9bcbed0773c274ae
/src/main/java/datastructure/array/optimization_problems/MaxAverageOfKElement.java
3b6098b8d1d05485d587f0b83f706423d8eea310
[]
no_license
vinay25788/AlgorithimsAndDataStructure
01af50bbef79f2614e4e83230683b7dc068c4633
9d78f86514e13b87554c03a6087e875b55dba6c2
refs/heads/master
2023-01-13T06:27:49.790242
2022-12-26T15:44:34
2022-12-26T15:44:34
248,677,681
0
0
null
2022-03-09T01:49:32
2020-03-20T05:45:34
Java
UTF-8
Java
false
false
793
java
package datastructure.array.optimization_problems; public class MaxAverageOfKElement { public static void main(String[] args) { int[] a = {1, 12, -5, -6, 50, 3}; int k = 4; findAverage(a, k); } public static void findAverage(int[] a, int k) { int curSum = 0, maxSum = Integer.MIN_VALUE; int end = -1; for (int i = 0; i < k; i++) curSum += a[i]; int n = a.length; maxSum = curSum; end = k-1; for (int i = k; i < n; i++) { curSum += a[i] - a[i - k]; if (maxSum < curSum) { maxSum = curSum; end = i; } } System.out.println(maxSum); System.out.println(" maximum length subarray " + (end - k + 1)); } }
[ "Vinay.Kumar@target.com" ]
Vinay.Kumar@target.com
f9091273f62f9888592ca61e05c8def93f2ae57e
2a802b71c99a8e89885edef09a6539a38e808c2b
/cas-server-support-ldap/src/test/java/org/jasig/cas/util/ldap/uboundid/InMemoryTestLdapDirectoryServer.java
bc14f6c501b49d7cbb8193a0b73237e7709bc7ea
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
permanz/cas
649bd90491e78d3641c49c13c5da760e462ad696
ece1fc2652ea1ba0bc91d2911e3d3607135242c3
refs/heads/master
2021-01-18T20:47:57.665139
2016-05-01T18:55:17
2016-05-01T18:55:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,378
java
package org.jasig.cas.util.ldap.uboundid; import com.unboundid.ldap.listener.InMemoryDirectoryServer; import com.unboundid.ldap.listener.InMemoryDirectoryServerConfig; import com.unboundid.ldap.listener.InMemoryListenerConfig; import com.unboundid.ldap.sdk.LDAPConnection; import com.unboundid.ldap.sdk.LDAPException; import com.unboundid.ldap.sdk.schema.Schema; import com.unboundid.util.ssl.KeyStoreKeyManager; import com.unboundid.util.ssl.SSLUtil; import com.unboundid.util.ssl.TrustStoreTrustManager; import org.apache.commons.io.IOUtils; import org.jasig.cas.util.LdapTestUtils; import org.ldaptive.LdapEntry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.io.ClassPathResource; import javax.annotation.PreDestroy; import java.io.Closeable; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.util.Collection; import java.util.Properties; /** * @author Misagh Moayyed * @since 4.1.0 */ public class InMemoryTestLdapDirectoryServer implements Closeable { private static final Logger LOGGER = LoggerFactory.getLogger(InMemoryTestLdapDirectoryServer.class); private InMemoryDirectoryServer directoryServer; private Collection<LdapEntry> ldapEntries; /** * Instantiates a new Ldap directory server. * Parameters need to be streams so they can be read from JARs. */ public InMemoryTestLdapDirectoryServer(final InputStream properties, final InputStream ldifFile, final InputStream schemaFile) { try { final Properties p = new Properties(); p.load(properties); final InMemoryDirectoryServerConfig config = new InMemoryDirectoryServerConfig(p.getProperty("ldap.rootDn")); config.addAdditionalBindCredentials(p.getProperty("ldap.managerDn"), p.getProperty("ldap.managerPassword")); final File keystoreFile = File.createTempFile("key", "store"); try (final OutputStream outputStream = new FileOutputStream(keystoreFile)) { IOUtils.copy(new ClassPathResource("/ldapServerTrustStore").getInputStream(), outputStream); } final String serverKeyStorePath = keystoreFile.getCanonicalPath(); final SSLUtil serverSSLUtil = new SSLUtil( new KeyStoreKeyManager(serverKeyStorePath, "changeit".toCharArray()), new TrustStoreTrustManager(serverKeyStorePath)); final SSLUtil clientSSLUtil = new SSLUtil(new TrustStoreTrustManager(serverKeyStorePath)); config.setListenerConfigs( InMemoryListenerConfig.createLDAPConfig("LDAP", // Listener name null, // Listen address. (null = listen on all interfaces) 1389, // Listen port (0 = automatically choose an available port) serverSSLUtil.createSSLSocketFactory()), // StartTLS factory InMemoryListenerConfig.createLDAPSConfig("LDAPS", // Listener name null, // Listen address. (null = listen on all interfaces) 1636, // Listen port (0 = automatically choose an available port) serverSSLUtil.createSSLServerSocketFactory(), // Server factory clientSSLUtil.createSSLSocketFactory())); // Client factory config.setEnforceSingleStructuralObjectClass(false); config.setEnforceAttributeSyntaxCompliance(true); final File file = File.createTempFile("ldap", "schema"); try (final OutputStream outputStream = new FileOutputStream(file)) { IOUtils.copy(schemaFile, outputStream); } final Schema s = Schema.mergeSchemas(Schema.getSchema(file)); config.setSchema(s); this.directoryServer = new InMemoryDirectoryServer(config); LOGGER.debug("Populating directory..."); final File ldif = File.createTempFile("ldiff", "file"); try (final OutputStream outputStream = new FileOutputStream(ldif)) { IOUtils.copy(ldifFile, outputStream); } this.directoryServer.importFromLDIF(true, ldif.getCanonicalPath()); this.directoryServer.restartServer(); final LDAPConnection c = getConnection(); LOGGER.debug("Connected to {}:{}", c.getConnectedAddress(), c.getConnectedPort()); populateDefaultEntries(c); c.close(); } catch (final Exception e) { throw new RuntimeException(e); } } /** * Instantiates a new Ldap directory server. */ public InMemoryTestLdapDirectoryServer(final File properties, final File ldifFile, final File... schemaFile) throws FileNotFoundException { this(new FileInputStream(properties), new FileInputStream(ldifFile), new FileInputStream(ldifFile)); } private void populateDefaultEntries(final LDAPConnection c) throws Exception { populateEntries(c, new ClassPathResource("ldif/users-groups.ldif").getInputStream()); } public void populateEntries(final InputStream rs) throws Exception { populateEntries(getConnection(), rs); } protected void populateEntries(final LDAPConnection c, final InputStream rs) throws Exception { this.ldapEntries = LdapTestUtils.readLdif(rs, getBaseDn()); LdapTestUtils.createLdapEntries(c, ldapEntries); populateEntriesInternal(c); } protected void populateEntriesInternal(final LDAPConnection c) {} public String getBaseDn() { return this.directoryServer.getBaseDNs().get(0).toNormalizedString(); } public Collection<LdapEntry> getLdapEntries() { return this.ldapEntries; } public LDAPConnection getConnection() throws LDAPException { return this.directoryServer.getConnection(); } @Override @PreDestroy public void close() { LOGGER.debug("Shutting down LDAP server..."); this.directoryServer.shutDown(true); LOGGER.debug("Shut down LDAP server."); } }
[ "mmoayyed@unicon.net" ]
mmoayyed@unicon.net
b67c521079e9ccfb8d400280f20a6211c53686f3
5855b70bdf5811db997d5cb35a3f4dedc7cd9e66
/src/main/java/com/prowidesoftware/swift/samples/integrator/validation/MessageValidation4Example.java
88c7dbd31cf02568fa0705a2e7ed5cb7772dd008
[]
no_license
yashanet/prowide-integrator-examples
82f5a0e78fb84b8ce530dc9bdea7f59c647a38f7
f055fa1361289efec94ee1738d7a0fd003faea7e
refs/heads/master
2022-06-30T20:32:34.899279
2020-05-10T16:27:00
2020-05-10T16:27:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,331
java
package com.prowidesoftware.swift.samples.integrator.validation; import java.util.List; import com.prowidesoftware.swift.validator.ValidationEngine; import com.prowidesoftware.swift.validator.ValidationProblem; /** * Validation test sample for MT540 with valid and invalid sample messages * * The expected ouput is: <pre> Message OK test: 223 day/s left for this license. MESSAGE OK. NO VALIDATION PROBLEMS FOUND. ----------------------- Message with validation problem test: MALFORMED MESSAGE, 8 VALIDATION PROBLEMS FOUND. 1/8: INVALID_FIELD_QUALIFIER tag index 10 --> Invalid qualifier SETT/UNIT/299000, found in field 36B, expecting one of: SETT. (errorcode: K36) 2/8: FAILED_EXPRESSION_QUALIFIER tag index 11 --> Invalid qualifier found in field 36B, expecting one of: AMOR FAMT UNIT. 3/8: MISSING_DOUBLE_SLASH tag index 10 --> Field 36B: Missing double slash ('//') between components. 4/8: BAD_SLASH_SEPARATORS tag index 10 --> Field 36B: 2 '/' found while 3 were expected. 5/8: COMPONENT_BAD_SIZE tag index 10 --> Field 36B: Component component 1 must have 4 characters, and 17 where found. 6/8: BAD_CHARSET tag index 10 --> Field 36B: Bad char at position 5 of SETT/UNIT/299000, found. Expected characters are: Alpha-numeric capital letters (upper case), and digits only. ([A-Z][0-9]). 7/8: MISSING_COMPONENT tag index 10 --> Field 36B: Missing required component 2. 8/8: MISSING_COMPONENT tag index 10 --> Field 36B: Missing required amount component. </pre> * */ public class MessageValidation4Example { public static void main(String[] args) { ValidationEngine validator = new ValidationEngine(); validator.initialize(); System.out.println("-----------------------"); System.out.println("Message OK test:"); List<ValidationProblem> result = validator.validateMtMessage(mt540_ok); System.out.print(ValidationProblem.printout(result)); System.out.println("-----------------------"); System.out.println("Message with validation problem test:"); result = validator.validateMtMessage(mt540_errors); System.out.print(ValidationProblem.printout(result)); validator.dispose(); } final static String mt540_ok = "{1:F01FOOLUS33AXXX0000000000}{2:I540FOOSGB2LXGSTN}{3:{108:090106C1234567}}{4:\n" + //General Information ":16R:GENL\n" + //0 ":20C::SEME//090106C1234567\n" + //1 ":23G:NEWM\n" + //2 ":16S:GENL\n" + //3 //Trade Details ":16R:TRADDET\n" + //4 ":98A::SETT//20090109\n" + //5 ":98A::TRAD//20090109\n" + //6 ":35B:ISIN IT0009999001\n" + //7 "C1234567\n" + "FOO SPA COMMON\n" + ":16S:TRADDET\n" + //8 //Financial Instrument/Account ":16R:FIAC\n" + //9 ":36B::SETT//UNIT/100000,\n" + //10 ":97A::SAFE//AAA01\n" + //11 ":16S:FIAC\n" + //12 //Settlement Details ":16R:SETDET\n" + //13 ":22F::SETR//TRAD\n" + //14 //Settlement Parties ":16R:SETPRTY\n" + //15 ":95Q::DEAG//BCITITMM\n" + //16 ":16S:SETPRTY\n" + //17 //Settlement Parties ":16R:SETPRTY\n" + //18 ":95P::SELL//CRESCHZZ80A\n" + //19 ":97A::SAFE//999999999\n" + //20 ":16S:SETPRTY\n" + //21 //Settlement Parties ":16R:SETPRTY\n" + //22 ":95Q::PSET//ZZZ\n" + //23 ":16S:SETPRTY\n" + //24 ":16S:SETDET\n" + //25 "-}"; final static String mt540_errors = "{1:F01AAAAUS00AXXX0000000000}{2:I540BBBBUS00XGSTN}{3:{108:09010110000000}}{4:\n" + //General Information ":16R:GENL\n" + ":20C::SEME//09010110000000\n" + ":23G:NEWM\n" + ":16S:GENL\n" + //Trade Details ":16R:TRADDET\n" + ":98A::SETT//20090101\n" + ":98A::TRAD//20090101\n" + ":35B:ISIN IT0004176001\n" + "1000000-0\n" + "FOO SPA COMMON\n" + ":16S:TRADDET\n" + //Financial Instrument/Account ":16R:FIAC\n" + ":36B::SETT/UNIT/299000,\n" + // remove slash ":97A::SAFE//XXX123\n" + ":16S:FIAC\n" + //Settlement Details ":16R:SETDET\n" + ":22F::SETR//TRAD\n" + //Settlement Parties ":16R:SETPRTY\n" + ":95Q::DEAG//CCCCCCCC\n" + ":16S:SETPRTY\n" + //Settlement Parties ":16R:SETPRTY\n" + ":95P::SELL//DDDDDDDDXXX\n" + ":97A::SAFE//123456789\n" + ":16S:SETPRTY\n" + //Settlement Parties ":16R:SETPRTY\n" + ":95Q::PSET//XXX\n" + ":16S:SETPRTY\n" + ":16S:SETDET\n" + "-}"; }
[ "sebastian@prowidesoftware.com" ]
sebastian@prowidesoftware.com
48cad7bb5275b5b431d6bba1fd41be5050bdbc29
903d3eb210e4cc06818beef01897dc5b9d9a9746
/compiled/Java/Euler_Problem-027.java
a5687ac8579a5041e81fa2395098b645591d8849
[ "MIT" ]
permissive
Mikescher/Project-Euler_Befunge
ab4d642e95fd76eb126771c8027fad45bf325c98
db6be0cb0b2cbf41eb6ac0f8b0140998c509acc5
refs/heads/master
2020-04-06T06:31:16.183969
2019-09-26T14:45:22
2019-09-26T14:45:22
24,105,754
7
2
null
null
null
null
UTF-8
Java
false
false
5,510
java
/* transpiled with BefunCompile v1.3.0 (c) 2017 */ class Program{ private final static String _g = "Ah+LCAAAAAAABACT7+ZgAAEWhrc3HLsvO4gwPNg/ybdMn3Pr5JTbtzaw6N+zrdLIDTzdsEZC7O1J+fchYbp5u7vWeJTv57eacOaM9tJ+c/2badaPC7+9evb499nb/jdP"+ "n78+e3bOlt11xXt/Trjqy8bQH8rIQBPwwSP1A/+Xn7trospKJW7tOXl6HaezJb/z5bZEo5k2+qc/GfEsXNv+duLbyHutZStuK3NXzPpnIb2O726MbncpTy7P58OfbUJr"+ "/1nlO/uwasfpXDLIW60Y+/1lcOlnAfHXt1uPlpXu2x0dHrsq9ffr5FWRi9+c/v9HdE7H04CtjyVeHXWV2nX03RZv1szK83xfu2z5r4t66tQ9ztv01XXb349vLFoiw68a"+ "nqlbFjTf6renlcrrRKmk4jWn7eXqz+u96E5PXTNbxG/TvBV2MW0Wq1Z7VrHNaVvIf1enN3bmpBSxpJmblqzaVTV31/J/fv6hOuGZvtevFf7NLr+6/K/v1aUrNP/80jFN"+ "/33/iv/+r5mXmWtvRXLNStv/ftf7J09LZH7LB++14mefJl79+ejCzujw+q+LfLZaRcYzHtq6S3BDNSMDABHvrYXvAQAA"; private final long[] g=zc(zd(java.util.Base64.getDecoder().decode(_g))); private long[]zc(byte[]b){long[]r=new long[97200];for(int i=0;i<97200;i++)r[i]=b[i];return r;} private byte[]zd(byte[]o){byte[]d=java.util.Arrays.copyOfRange(o,1,o.length);for(int i=0;i<o[0];i++)d=zs(d);return d;} private byte[]zs(byte[]o){try{ java.io.ByteArrayInputStream y=new java.io.ByteArrayInputStream(o); java.util.zip.GZIPInputStream s=new java.util.zip.GZIPInputStream(y); java.io.ByteArrayOutputStream a=new java.io.ByteArrayOutputStream(); int res=0;byte buf[]=new byte[1024];while(res>=0){res=s.read(buf,0,1024);if(res>0)a.write(buf,0,res);}return a.toByteArray(); }catch(java.io.IOException e){return null;}} private long gr(long x,long y){return(x>=0&&y>=0&&x<600&&y<162)?g[(int)(y*600+x)]:0;} private void gw(long x,long y,long v){if(x>=0&&y>=0&&x<600&&y<162)g[(int)(y*600+x)]=v;} private long td(long a,long b){return(b==0)?0:(a/b);} private long tm(long a,long b){return(b==0)?0:(a%b);} private final static java.util.Stack<Long> s=new java.util.Stack<Long>(); private long sp(){return(s.size()==0)?0:s.pop();} private void sa(long v){s.push(v);} private long sr(){return(s.size()==0)?0:s.peek();} long t0; private int _0(){ gw(1,0,600); gw(2,0,150); gw(9,0,90000); gw(3,0,2); gw(4,0,1000); gw(3,1,0); return 1; } private int _1(){ gw(tm(gr(3,0),gr(1,0)),(td(gr(3,0),gr(1,0)))+3,88); sa(gr(3,0)+gr(3,0)); sa((gr(3,0)+gr(3,0))<gr(9,0)?1:0); return 2; } private int _2(){ if(sp()!=0)return 22;else return 3; } private int _3(){ sp(); return 4; } private int _4(){ sa(gr(3,0)+1); sa(gr(3,0)+1); gw(3,0,gr(3,0)+1); sa(tm(sp(),gr(1,0))); {long v0=sp();long v1=sp();sa(v0);sa(v1);} sa(td(sp(),gr(1,0))); sa(sp()+3L); {long v0=sp();t0=gr(sp(),v0);} t0-=32; return 5; } private int _5(){ if((t0)!=0)return 6;else return 4; } private int _6(){ if(gr(9,0)>gr(3,0))return 1;else return 7; } private int _7(){ gw(0,3,32); gw(1,3,32); gw(5,0,1-gr(4,0)); gw(6,0,2); return 8; } private int _8(){ gw(7,0,0); sa((gr(5,0)*gr(7,0))+gr(6,0)); sa(((gr(5,0)*gr(7,0))+gr(6,0))>1?1:0); return 9; } private int _9(){ if(sp()!=0)return 10;else return 21; } private int _10(){ sa(tm(sr(),gr(1,0))); {long v0=sp();long v1=sp();sa(v0);sa(v1);} sa(td(sp(),gr(1,0))); sa(sp()+3L); {long v0=sp();t0=gr(sp(),v0);} t0-=32; if((t0)!=0)return 20;else return 11; } private int _11(){ t0=gr(7,0); if(gr(7,0)>gr(3,1))return 19;else return 12; } private int _12(){ t0=gr(5,0)+2; gw(5,0,gr(5,0)+2); t0=t0>gr(4,0)?1:0; if((t0)!=0)return 13;else return 18; } private int _13(){ gw(5,0,1-gr(4,0)); return 14; } private int _14(){ sa(gr(6,0)+1); sa(gr(6,0)+1); gw(6,0,gr(6,0)+1); sa(tm(sp(),gr(1,0))); {long v0=sp();long v1=sp();sa(v0);sa(v1);} sa(td(sp(),gr(1,0))); sa(sp()+3L); {long v0=sp();t0=gr(sp(),v0);} t0-=32; return 15; } private int _15(){ if((t0)!=0)return 16;else return 14; } private int _16(){ if(gr(6,0)>gr(4,0))return 17;else return 18; } private int _17(){ System.out.print(String.valueOf(gr(1,1)*gr(2,1))+" "); return 23; } private int _18(){ t0=0; return 8; } private int _19(){ gw(3,1,t0); gw(1,1,gr(5,0)); gw(2,1,gr(6,0)); return 12; } private int _20(){ sa((gr(7,0)+1)*(gr(7,0)+1)); gw(7,0,gr(7,0)+1); sa(sp()+(gr(5,0)*gr(7,0))+gr(6,0)); sa(sr()>1?1:0); return 9; } private int _21(){ sp(); return 11; } private int _22(){ sa(sr()); sa(32); {long v0=sp();long v1=sp();sa(v0);sa(v1);} sa(tm(sr(),gr(1,0))); {long v0=sp();long v1=sp();sa(v0);sa(v1);} sa(td(sp(),gr(1,0))); sa(sp()+3L); {long v0=sp();long v1=sp();gw(v1,v0,sp());} sa(sp()+gr(3,0)); sa(sr()<gr(9,0)?1:0); return 2; } public void main(){ int c=0; while(c<23){ switch(c){ case 0:c=_0();break; case 1:c=_1();break; case 2:c=_2();break; case 3:c=_3();break; case 4:c=_4();break; case 5:c=_5();break; case 6:c=_6();break; case 7:c=_7();break; case 8:c=_8();break; case 9:c=_9();break; case 10:c=_10();break; case 11:c=_11();break; case 12:c=_12();break; case 13:c=_13();break; case 14:c=_14();break; case 15:c=_15();break; case 16:c=_16();break; case 17:c=_17();break; case 18:c=_18();break; case 19:c=_19();break; case 20:c=_20();break; case 21:c=_21();break; case 22:c=_22();break; } } } public static void main(String[]a){new Program().main();} }
[ "mailport@mikescher.de" ]
mailport@mikescher.de
a1f1f150bd3afd37ce9314b6ef967eaa68201c13
dc28cc4fdea539d599cc99a0daef30143e17d49d
/src/main/java/com/jsf2184/socket/Server.java
657fcc5211f570fdece4190cfc8c419a1b8548bf
[]
no_license
jsf2184/exercises
ba22098b51a4e095ddfbe864041b93f4d2e337ce
62043366147cad41089e45d7d07ec99117ffd8f6
refs/heads/master
2023-07-28T15:23:24.251872
2023-02-26T22:28:52
2023-02-26T22:28:52
117,767,742
0
0
null
2023-07-16T13:29:10
2018-01-17T01:49:10
Java
UTF-8
Java
false
false
1,707
java
package com.jsf2184.socket; import org.apache.log4j.Logger; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.util.function.Function; public class Server { private static final Logger _log = Logger.getLogger(Server.class); int _port; private Function<Socket, Runnable> _clientHandlerFactory; boolean _running; public Server(int port, Function<Socket, Runnable> clientHandlerFactory) { _port = port; _clientHandlerFactory = clientHandlerFactory; } public void run() { ServerSocket serverSocket; try { // Create a 'standing' Server socket to listen on a well known port for new connections. serverSocket = new ServerSocket(_port); } catch (IOException e) { _log.error("Server.run(): abort trying to create ServerSocket ", e); return; } _running = true; while (_running) { Socket clientSocket; try { // When a new client connects, the serverSocket will yield a socket devoted to serving the new client clientSocket = serverSocket.accept(); } catch (IOException e) { _log.error("Server.run(): error from serverSocket.accept() ", e); break; } _log.info("Server accepts new client"); // Get a distinct runnable devoted to handling that particular client. Note that were this real, we would // start the runnable in a new thread. // Runnable clientHandler = _clientHandlerFactory.apply(clientSocket); clientHandler.run(); } } }
[ "jsf2184@gmail.com" ]
jsf2184@gmail.com
433818cd6e8f9efb53cc91b7abe5604a430a86a4
c94f888541c0c430331110818ed7f3d6b27b788a
/blockchain/java/src/main/java/com/antgroup/antchain/openapi/blockchain/models/CreateDataauthorizationDataEntityRequest.java
21e8c2a5d5fe831f196f132f4c16953df7648e60
[ "MIT", "Apache-2.0" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
4,221
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.blockchain.models; import com.aliyun.tea.*; public class CreateDataauthorizationDataEntityRequest extends TeaModel { // OAuth模式下的授权token @NameInMap("auth_token") public String authToken; @NameInMap("product_instance_id") public String productInstanceId; // 业务系统数据对象唯一标示 @NameInMap("biz_uid") @Validation(required = true) public String bizUid; // 区块链ID @NameInMap("blockchain_id") public String blockchainId; // 数据类别 @NameInMap("category") @Validation(required = true, maxLength = 32) public String category; // 数据模型ID @NameInMap("data_model_id") public String dataModelId; // 扩展参数,标准JSON格式 @NameInMap("extension_info") @Validation(maxLength = 2000) public String extensionInfo; // 数据名称 @NameInMap("name") @Validation(required = true, maxLength = 64) public String name; // 数据所有者ID @NameInMap("owner_id") @Validation(required = true, maxLength = 100) public String ownerId; // 审批模版 @NameInMap("process_template") public java.util.List<ProcessNode> processTemplate; // DID doc里的公开信息 @NameInMap("public_info") public String publicInfo; public static CreateDataauthorizationDataEntityRequest build(java.util.Map<String, ?> map) throws Exception { CreateDataauthorizationDataEntityRequest self = new CreateDataauthorizationDataEntityRequest(); return TeaModel.build(map, self); } public CreateDataauthorizationDataEntityRequest setAuthToken(String authToken) { this.authToken = authToken; return this; } public String getAuthToken() { return this.authToken; } public CreateDataauthorizationDataEntityRequest setProductInstanceId(String productInstanceId) { this.productInstanceId = productInstanceId; return this; } public String getProductInstanceId() { return this.productInstanceId; } public CreateDataauthorizationDataEntityRequest setBizUid(String bizUid) { this.bizUid = bizUid; return this; } public String getBizUid() { return this.bizUid; } public CreateDataauthorizationDataEntityRequest setBlockchainId(String blockchainId) { this.blockchainId = blockchainId; return this; } public String getBlockchainId() { return this.blockchainId; } public CreateDataauthorizationDataEntityRequest setCategory(String category) { this.category = category; return this; } public String getCategory() { return this.category; } public CreateDataauthorizationDataEntityRequest setDataModelId(String dataModelId) { this.dataModelId = dataModelId; return this; } public String getDataModelId() { return this.dataModelId; } public CreateDataauthorizationDataEntityRequest setExtensionInfo(String extensionInfo) { this.extensionInfo = extensionInfo; return this; } public String getExtensionInfo() { return this.extensionInfo; } public CreateDataauthorizationDataEntityRequest setName(String name) { this.name = name; return this; } public String getName() { return this.name; } public CreateDataauthorizationDataEntityRequest setOwnerId(String ownerId) { this.ownerId = ownerId; return this; } public String getOwnerId() { return this.ownerId; } public CreateDataauthorizationDataEntityRequest setProcessTemplate(java.util.List<ProcessNode> processTemplate) { this.processTemplate = processTemplate; return this; } public java.util.List<ProcessNode> getProcessTemplate() { return this.processTemplate; } public CreateDataauthorizationDataEntityRequest setPublicInfo(String publicInfo) { this.publicInfo = publicInfo; return this; } public String getPublicInfo() { return this.publicInfo; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
e79aea1059b04f17bdaa06ba7fa1973b82a84b5f
ec3f195e1bb6bba9c56655c632f8d1035ff48b28
/src/test/java/com/selenium/basictests/WebDriverConfig.java
02b020fdca41ef3898eef1b588c3397db7add1ba
[]
no_license
meetmmpatel/Selenium_Java
e43b3812e7a133f01cd53b729fb8279f1a954585
d7f028ab3f907fc39dd2fb451ab38aa528db12a0
refs/heads/master
2020-03-27T01:54:24.885495
2018-08-22T19:27:52
2018-08-22T19:27:52
145,752,643
0
0
null
null
null
null
UTF-8
Java
false
false
611
java
package com.selenium.basictests; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class WebDriverConfig { public WebDriver getChrome() { System.setProperty("webdriver.chrome.driver", "/Users/milanpatel/Documents/core/software/chromedriver-2"); WebDriver driver = new ChromeDriver(); return driver; } public WebDriver getFirefox() { System.setProperty("webdriver.gecko.driver", "/Users/milanpatel/Documents/core/software/geckodriver"); WebDriver driver = new FirefoxDriver(); return driver; } }
[ "meetmmpatel@gmail.com" ]
meetmmpatel@gmail.com
ec4225c020d18d6320d503bdb8bf3ce5f7e9e754
7898b6967273fb569d61256b7acc8da372c1326e
/ProjectEuler/LargestProductInGrid.java
08c9ac27307c0ed6df6812eb03f12c135a8d776d
[]
no_license
DavinderSinghKharoud/AlgorithmsAndDataStructures
83d4585ebbdc9bc27529bffcadf03f49fc3d0088
183aeba23f51b9edea6be8afbc9ee6cd221d3195
refs/heads/master
2022-07-08T17:18:23.954213
2022-05-17T02:22:16
2022-05-17T02:22:16
229,511,418
2
1
null
null
null
null
UTF-8
Java
false
false
3,156
java
package ProjectEuler; public class LargestProductInGrid { static long max = -1; public static void main(String[] args) { int[][] SQUARE = { {8, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 07, 78, 52, 12, 50, 77, 91, 8}, {49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 04, 56, 62, 00}, {81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 03, 49, 13, 36, 65}, {52, 70, 95, 23, 04, 60, 11, 42, 69, 24, 68, 56, 01, 32, 56, 71, 37, 02, 36, 91}, {22, 31, 16, 71, 51, 67, 63, 89, 41, 92, 36, 54, 22, 40, 40, 28, 66, 33, 13, 80}, {24, 47, 32, 60, 99, 03, 45, 02, 44, 75, 33, 53, 78, 36, 84, 20, 35, 17, 12, 50}, {32, 98, 81, 28, 64, 23, 67, 10, 26, 38, 40, 67, 59, 54, 70, 66, 18, 38, 64, 70}, {67, 26, 20, 68, 02, 62, 12, 20, 95, 63, 94, 39, 63, 8, 40, 91, 66, 49, 94, 21}, {24, 55, 58, 05, 66, 73, 99, 26, 97, 17, 78, 78, 96, 83, 14, 88, 34, 89, 63, 72}, {21, 36, 23, 9, 75, 00, 76, 44, 20, 45, 35, 14, 00, 61, 33, 97, 34, 31, 33, 95}, {78, 17, 53, 28, 22, 75, 31, 67, 15, 94, 03, 80, 04, 62, 16, 14, 9, 53, 56, 92}, {16, 39, 05, 42, 96, 35, 31, 47, 55, 58, 88, 24, 00, 17, 54, 24, 36, 29, 85, 57}, {86, 56, 00, 48, 35, 71, 89, 07, 05, 44, 44, 37, 44, 60, 21, 58, 51, 54, 17, 58}, {19, 80, 81, 68, 05, 94, 47, 69, 28, 73, 92, 13, 86, 52, 17, 77, 04, 89, 55, 40}, {04, 52, 8, 83, 97, 35, 99, 16, 07, 97, 57, 32, 16, 26, 26, 79, 33, 27, 98, 66}, {88, 36, 68, 87, 57, 62, 20, 72, 03, 46, 33, 67, 46, 55, 12, 32, 63, 93, 53, 69}, {04, 42, 16, 73, 38, 25, 39, 11, 24, 94, 72, 18, 8, 46, 29, 32, 40, 62, 76, 36}, {20, 69, 36, 41, 72, 30, 23, 88, 34, 62, 99, 69, 82, 67, 59, 85, 74, 04, 36, 16}, {20, 73, 35, 29, 78, 31, 90, 01, 74, 31, 49, 71, 48, 86, 81, 16, 23, 57, 05, 54}, {01, 70, 54, 71, 83, 51, 54, 69, 16, 92, 33, 48, 61, 43, 52, 01, 89, 19, 67, 48} }; getMaxProduct( SQUARE); } private static void getMaxProduct(int[][] square) { for( int i = 0; i<square.length; i++){ for( int j = 0; j<square[i].length; j++){ if( j<= 16){ getProduct(square[i][j], square[i][j+1], square[i][j+2], square[i][j+3]); } if( i<=16 ){ getProduct( square[i][j], square[i+1][j], square[i+2][j], square[i+3][j]); } if( i <= 16 && j<=16 ){ getProduct( square[i][j], square[i+1][j+1], square[i+2][j+2], square[i+3][j+3]); } if( i<=16 && j>=3){ getProduct( square[i][j], square[i+1][j-1], square[i+2][j-2], square[i+3][j-3]); } } } System.out.println(max); } private static void getProduct(int num, int num1, int num2, int num3) { long product = num*num1*num2*num3; max = Math.max( product, max); } }
[ "dskharoud2@gmail.com" ]
dskharoud2@gmail.com
b5fb481b034526a574f1547aea63c0fe3a9eeb5a
cbad3334a18b0877925b891f2e52496b0095740c
/第20章 BN赛艇/BNST/src/com/bn/clp/RotateThread.java
8fe198b6f3e76e171ce97489fee628292c141488
[]
no_license
tangyong3g/openGl20Games
73e05de4add4e326e6f2082e555d37c091bd2614
f1b06bb64a210b82ca4fbbff98e23f1290f42762
refs/heads/master
2021-01-17T04:48:34.641523
2019-12-07T02:06:39
2019-12-07T02:06:39
11,811,001
13
7
null
null
null
null
WINDOWS-1252
Java
false
false
1,197
java
package com.bn.clp; import static com.bn.clp.Constant.CURR_BOAT_V; import static com.bn.clp.Constant.head_Angle; import static com.bn.clp.Constant.head_Angle_A; import static com.bn.clp.Constant.head_Angle_Max; //¾§ÌåÐýתÏß³Ì public class RotateThread extends Thread { public RotateThread() { this.setName("RotateThread"); } public void run() { while(Constant.threadFlag) { SpeedForControl.angleY=(SpeedForControl.angleY+6)%360; if(CURR_BOAT_V==0) { if(head_Angle<=head_Angle_Max&&KeyThread.upFlag) { head_Angle=head_Angle+head_Angle_A; if(head_Angle==head_Angle_Max) { KeyThread.upFlag=false; } } else if(head_Angle>=-head_Angle_Max&&!KeyThread.upFlag) { head_Angle=head_Angle-head_Angle_A; if(head_Angle==-head_Angle_Max) { KeyThread.upFlag=true; } } } else { if(head_Angle<4) { head_Angle=head_Angle+head_Angle_A; } else { head_Angle=head_Angle-head_Angle_A; } } try { Thread.sleep(60); }catch(Exception e) { e.printStackTrace(); } } } }
[ "ty_sany@163.com" ]
ty_sany@163.com
19b71dc726fc9f601ed3684b7c627367ddd359e6
e1175d0659c545521558ffa991e25960ecad44bf
/domain/src/main/java/com/next/dynamo/persistance/StaticDataPlugin.java
a28a73b2a8c6510d326a04174ea6ad731e8a3a16
[]
no_license
ping2ravi/dynamo
3f479e5378e26f0ea6726944b2cc4501e3098b7a
0db2216bb29265b38a82473274744f4dd08d241c
refs/heads/master
2020-12-25T16:58:04.524789
2017-04-25T04:38:20
2017-04-25T04:38:20
56,911,488
1
1
null
null
null
null
UTF-8
Java
false
false
722
java
package com.next.dynamo.persistance; import javax.persistence.Column; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; import org.hibernate.validator.constraints.NotBlank; import lombok.Getter; import lombok.Setter; import lombok.ToString; @Entity @DiscriminatorValue(value = "StaticData") @Getter @Setter @ToString(callSuper=true) public class StaticDataPlugin extends DataPlugin { @Column(name = "content", columnDefinition = "LONGTEXT") @NotBlank(message="{staticdataplugin.content.empty.error}") private String content; public String getContent() { return content; } public void setContent(String content) { this.content = content; } }
[ "ping2ravi@gmail.com" ]
ping2ravi@gmail.com
a3e4318dd2baafbb3dcadf6a166b36e6721a8473
b658499f1eb5ac71ae21d61e19b848db42fc0c77
/ds-and-alg-bootcamp/src/test/java/com/udemy/challenges/linkedlists/LinkedListsTest.java
b3cf04bb53c520e718f3867a644a69afe04e7635
[]
no_license
vsushko/java-projects
0a5611c0e6d9911957b373e3d985bf3e157cd904
647469ba541653373ade0e2b0a6808f24cc2333b
refs/heads/master
2023-08-31T08:17:49.268277
2023-08-30T13:34:39
2023-08-30T13:34:39
150,632,629
0
0
null
2022-06-21T04:23:11
2018-09-27T18:43:15
Java
UTF-8
Java
false
false
2,711
java
package com.udemy.challenges.linkedlists; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import java.util.Stack; /** * @author vsushko */ public class LinkedListsTest { private LinkedListAdder adder; // private Palindrome palindrome; @Before public void SetUp() { adder = new LinkedListAdder(); // palindrome = new Palindrome(); } @Test public void Duplicates() { // Challenge: Write a method that removes any duplicates from our Linked List. LinkedListRemoveDuplicates linkedList = new LinkedListRemoveDuplicates(); linkedList.addBack(1); linkedList.addBack(2); linkedList.addBack(1); // duplication linkedList.removeDuplicates(); Assert.assertEquals(2, linkedList.size()); } @Test public void SumLists() { // Challenge: You have two numbers represented by a linked list. // Each node represents a single digit, in reverse order, such that the // 1's digit is at the head. Write a function that adds the two numbers // and returns the sum as a linked list. // Example // Input: (8 -> 2 -> 5) + (4 -> 9 -> 2). That is 528 + 294. // Output: (2 -> 2 -> 8). That is 822. // Create our two numbers Stack first = new Stack(); first.push(8); first.push(2); first.push(5); Stack second = new Stack(); second.push(4); second.push(9); second.push(2); // Add them together Stack sum = adder.sum(first, second); // Check the result Assert.assertEquals(3, sum.size()); while (!sum.isEmpty()) { System.out.println(sum.pop()); } } @Test public void LoopDetection() { // Challenge: Given a circular linked list, implement an algorithm determines // whether the linked list has a circular loop // // Definition: A circular linked list (corrupt) is one where a node's next pointer // points to an earlier node. // Example // Input: 1 -> 2 -> 3 -> 4 -> 5 -> 3 (same as earlier) Node node1 = new Node(1); Node node2 = new Node(2); Node node3 = new Node(3); Node node4 = new Node(4); Node node5 = new Node(5); LinkedListLoopDetector loopDetector = new LinkedListLoopDetector(); loopDetector.addBack(node1); loopDetector.addBack(node2); loopDetector.addBack(node3); loopDetector.addBack(node4); loopDetector.addBack(node5); loopDetector.addBack(node3); // loop! Assert.assertTrue(loopDetector.hasLoop()); } }
[ "vasiliy.sushko@gmail.com" ]
vasiliy.sushko@gmail.com
67777668304d2d3e0a5d5a69d9f91dc02c0030b0
026ef13eb5573a1f422d70363c16b063cfb446ee
/JVM系列之1:内存与垃圾回收篇/JVMDemo/chapter13/src/com/atguigu/java1/StringTest4.java
bf18adddd0ff2fcf0d38667b930b51cc7a65d44e
[]
no_license
ToLoveToFeel/JVM_atguigu
eb0e555d4d889540f62cdb28feb2826de8d05d09
8eba864ac981c2ece789036fbcfea8a4f1de6c7e
refs/heads/master
2023-03-10T05:48:57.758437
2021-02-18T02:03:00
2021-02-18T02:03:00
265,485,174
5
5
null
null
null
null
UTF-8
Java
false
false
724
java
package com.atguigu.java1; import org.junit.Test; import javax.annotation.processing.SupportedSourceVersion; import java.sql.SQLOutput; /** * @author shkstart shkstart@126.com * @create 2020 0:49 */ public class StringTest4 { public static void main(String[] args) { System.out.println(); // 常量池中字符串个数:2166 System.out.println("1"); // 2167 System.out.println("2"); System.out.println("3"); System.out.println("4"); // 2170 //如下的字符串"1" 到 "4"不会再次加载 System.out.println("1"); // 2171 System.out.println("2"); // 2171 System.out.println("3"); System.out.println("4"); // 2171 } }
[ "1137247975@qq.com" ]
1137247975@qq.com
7277be1d5ade1bd61098fac638798858609d421e
49dab7bbffcebe53329e1aee76c230d2396babf2
/server/OS/net/violet/platform/datamodel/factories/mock/ApplicationCategoryFactoryMock.java
0eaf4643e1bce0d6e3355d9eb8a5a49d04f72664
[ "MIT" ]
permissive
bxbxbx/nabaztag-source-code
42870b0e91cf794728a20378e706c338ecedb7ba
65197ea668e40fadb35d8ebd0aeb512311f9f547
refs/heads/master
2021-05-29T07:06:19.794006
2015-08-06T16:08:30
2015-08-06T16:08:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,513
java
package net.violet.platform.datamodel.factories.mock; import java.util.ArrayList; import java.util.List; import net.violet.db.records.factories.RecordFactoryMock; import net.violet.platform.datamodel.ApplicationCategory; import net.violet.platform.datamodel.factories.ApplicationCategoryFactory; import net.violet.platform.datamodel.mock.ApplicationCategoryMock; public class ApplicationCategoryFactoryMock extends RecordFactoryMock<ApplicationCategory, ApplicationCategoryMock> implements ApplicationCategoryFactory { public ApplicationCategoryFactoryMock() { super(ApplicationCategoryMock.class); } @Override public void loadCache() { ApplicationCategoryMock.BUILDER.generateValuesFromInitFile(2, net.violet.platform.util.Constantes.OS_PATH + "net/violet/platform/datamodel/mock/applicationCategInit"); } public List<ApplicationCategory> getAllCategories() { return new ArrayList<ApplicationCategory>(findAllMapped().values()); } public ApplicationCategory findByName(String inName) { for (final ApplicationCategory categ : findAll()) { if (categ.getName().equals(inName)) { return categ; } } return null; } /** * @see net.violet.platform.datamodel.factories.ApplicationCategoryFactory#findByShortName(java.lang.String) */ public ApplicationCategory findByShortName(String inShortName) { // recreate the full entry for the DicoTools.dico return findByName(ApplicationCategoryFactory.CATG_KEY_PRFX + inShortName + ApplicationCategoryFactory.CATG_KEY_SFX); } }
[ "sebastien@yoozio.com" ]
sebastien@yoozio.com
74a2ba781b6e36e3c185666f1d6e35d26694cd1e
61e3ff6d34297cf444e5749c1e1d7ed5ba93cecd
/com/android/common/independentFocusExposure/C0606w.java
aacd43983a283671469ccf19cedf60cf447b2dc1
[]
no_license
BeYkeRYkt/nubia_cam_smali
b49beafe60b989fab02753601735e493f2f72d16
39dad22d05b0a2dfd4e9d04acad9673ac1add410
refs/heads/master
2020-03-17T18:31:12.851246
2018-05-17T15:24:14
2018-05-17T15:24:14
133,825,725
2
0
null
null
null
null
UTF-8
Java
false
false
563
java
package com.android.common.independentFocusExposure; import android.animation.Animator; import android.animation.Animator.AnimatorListener; final class C0606w implements AnimatorListener { final /* synthetic */ C0598n NK; C0606w(C0598n c0598n) { this.NK = c0598n; } public void onAnimationStart(Animator animator) { } public void onAnimationRepeat(Animator animator) { } public void onAnimationEnd(Animator animator) { this.NK.Mo.start(); } public void onAnimationCancel(Animator animator) { } }
[ "beykerykt@gmail.com" ]
beykerykt@gmail.com
6df4c2e99db96055614f5d9cdd0a96e572d262d5
9e8afc827742e6ebf18c547071dfa2e96ab945a9
/HMI112_V01/app_mms/src/main/java/com/uninew/mms/aidl/aidl/RecorderService.java
4d7e9a2b2b8edc5ad36dffb0a661c5fdc594080f
[]
no_license
hgdsys007/Uninew
23c0957e58f8bdaa698db0102f62eecc91d3f538
efedd89a2d296ca6427c48441bbdb8490c2c42bb
refs/heads/master
2021-12-30T05:40:15.482254
2018-02-06T01:29:01
2018-02-06T01:29:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,646
java
package com.uninew.mms.aidl.aidl; import android.app.Service; import android.content.Intent; import android.os.Handler; import android.os.IBinder; import android.os.RemoteCallbackList; import android.os.RemoteException; import android.util.Log; import com.cookoo.car_terminal.aidl.IMmsSend; import com.cookoo.car_terminal.aidl.IUninewAppSend; import com.uninew.mms.McuService; import com.uninew.mms.aidl.interfaces.Initialize; /** * * @author: xiehd */ public class RecorderService extends Service { private static RecorderService recorderService = null; private static final String TAG = "RecorderService"; public static byte[] arrs; private byte[] konzai; private byte[] banzai; private byte[] manzai; private int TIME = 1000; private RemoteCallbackList<IUninewAppSend> callbacklist = new RemoteCallbackList<IUninewAppSend>(); Handler handler; Runnable runnable = new Runnable() { @Override public void run() { // handler自带方法实现定时器 try { handler.postDelayed(this, TIME); // refleshData(); } catch (Exception e) { e.printStackTrace(); } } }; @Override public void onCreate() { super.onCreate(); Log.d(TAG, "RecorderService onCreate"); recorderService = this; Log.d("xhd", "RecorderService start McuService!!!!"); Intent mmsService = new Intent(this, McuService.class); this.startService(mmsService); initData(); } public static RecorderService getService() { return recorderService; } @Override public int onStartCommand(Intent intent, int flags, int startId) { Log.i(TAG, "RecorderService onStartCommand"); return super.onStartCommand(intent, flags, startId); } @Override public IBinder onBind(Intent intent) { Log.d(TAG, "onBind"); return iBinder; } private IMmsSend.Stub iBinder = new IMmsSend.Stub() { @Override public void registerCallback(IUninewAppSend irs) throws RemoteException { Log.i(TAG, "绑定aidl=" + irs); RecorderServicePolicy.getPolicy().setRecorderSender(irs); RecorderServicePolicy.getPolicy().setIsRegister(true); Log.i(TAG, "---registerCallback---" + irs); if (irs != null) { callbacklist.register(irs); } } @Override public void unregisterCallback(IUninewAppSend irs) throws RemoteException { RecorderServicePolicy.getPolicy().setRecorderSender(null); RecorderServicePolicy.getPolicy().setIsRegister(false); Log.i(TAG, "--unregisterCallback---" + irs); if (irs != null) { callbacklist.unregister(irs); } } @Override public boolean systemStateNotify(byte state) throws RemoteException { return Initialize.getMcuReceiveListener().systemStateNotify(state); } @Override public void mcuVersionNotify(String version) throws RemoteException { Initialize.getMcuReceiveListener().mcuVersionNotify(version); } @Override public boolean electricity(byte type, byte electricity) throws RemoteException { return Initialize.getMcuReceiveListener().electricity(type,electricity); } // 物理按键获取 只需要KEY值就行了 @Override public void handleMcuKey(byte key, byte action) throws RemoteException { Initialize.getMcuReceiveListener().handleMcuKey(key,action); } @Override public boolean receiveCanDatas(byte[] canDatas) throws RemoteException { return Initialize.getMcuReceiveListener().receiveCanDatas(canDatas); } @Override public boolean receiveRS232(byte id, byte[] rs232Datas) throws RemoteException { return Initialize.getMcuReceiveListener().receiveRS232(id,rs232Datas); } @Override public boolean receiveRS485(byte id, byte[] rs485Datas) throws RemoteException { return Initialize.getMcuReceiveListener().receiveRS485(id,rs485Datas); } @Override public boolean receiveBaudRate(byte id, byte baudRate) throws RemoteException { return Initialize.getMcuReceiveListener().receiveBaudRate(id,baudRate); } @Override public boolean receiveIOState(byte id, byte state) throws RemoteException { return Initialize.getMcuReceiveListener().receiveIOState(id,state); } @Override public boolean receivePulseSignal(int speed) throws RemoteException { return Initialize.getMcuReceiveListener().receivePulseSignal(speed); } }; private void initData() { // handler = new Handler() { // @Override // public void handleMessage(Message msg) { // // do something // // Message message = handler.obtainMessage(0); // // initUI(); // sendMessageDelayed(message, 1000); // } // }; // // Message message = handler.obtainMessage(0); // handler.sendMessageDelayed(message, 1000); } // handler.removeMessages(0) 结束调用 }
[ "782508551@qq.com" ]
782508551@qq.com
bbe4cb74bf73c3d3e7499a55fde772fafa29867e
6d1256c996e0c97beb8cc86641d77ff03881db60
/src/main/java/com/epam/training/center/lesson05/page/component/HeaderComponent.java
3c7fe5a5f89c82d7ecb44090d1be5851977dddaa
[]
no_license
DmitryKhodakovsky/epam-test-auto-autumn-oct-2021
2e015d051a23d0ac63e2bbe26d68b88c9ae4a098
299db6cf1c4181d7894d3c136cedb5ae46507869
refs/heads/master
2023-08-22T07:56:42.426273
2021-11-02T17:57:13
2021-11-02T17:57:13
417,151,336
0
0
null
2021-11-02T17:57:13
2021-10-14T13:57:23
Java
UTF-8
Java
false
false
1,147
java
package com.epam.training.center.lesson05.page.component; import static org.openqa.selenium.support.ui.ExpectedConditions.elementToBeClickable; import static org.openqa.selenium.support.ui.ExpectedConditions.visibilityOf; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; public class HeaderComponent extends AbstractComponent { @FindBy(css = "[data-widget='catalogMenu'] button") private WebElement catalogButton; @FindBy(css = ".search-bar-wrapper input") private WebElement searchInputField; @FindBy(css = ".search-bar-wrapper button") private WebElement searchButton; public HeaderComponent(WebDriver driver) { super(driver); } public CatalogComponent openCatalog() { wait.until(visibilityOf(catalogButton)).click(); return new CatalogComponent(driver); } public void sendKeysToSearchInputField(String text) { wait.until(visibilityOf(searchInputField)).sendKeys(text); } public void clickToSearchButton() { wait.until(elementToBeClickable(searchButton)).click(); } }
[ "khda91@gmail.com" ]
khda91@gmail.com
515d8ebd555fdb1449f0d19b9e5bdab6e095ec96
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/budejie/sources/com/bumptech/glide/load/f.java
08995dbfdc0966f6b029f846c6aaeff2e5c2847a
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
157
java
package com.bumptech.glide.load; import com.bumptech.glide.load.engine.j; public interface f<T> { j<T> a(j<T> jVar, int i, int i2); String a(); }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
46b3c672817508b4bec9f455b5fec373dad17869
c18ca0ee85f21ef5e9890db9bb70ab8bb114200a
/JAVA Prgramming/programs/chap07/TwoDimLatticeTest.java
9c9d9f78ba56b6821bd0fc413da9b1c7b2f38f76
[]
no_license
f1lm/MS-2014-Boise-State-University
a3032b8b9e13303cdb3b4cb0001eddfd0d1cbffe
9d87f14e48a5c51a8a3ebfb0e010a493faf70576
refs/heads/master
2020-04-15T15:17:48.031552
2015-03-18T01:37:30
2015-03-18T01:37:30
32,502,472
1
1
null
2015-03-19T05:19:57
2015-03-19T05:19:56
null
UTF-8
Java
false
false
1,606
java
/** * A driver class for testing the creation of a random two-dimensional lattice. * * @author amit * */ public class TwoDimLatticeTest { /** * Show usage message and terminate the application. */ private static void show_usage() { System.err .println("java TwoDimLatticeTest <size> <A-percentage> <random-seed> [animate]"); System.exit(1); } /** * Process command line arguments and create a two-dimensional lattice. * * @param args * @return */ private static TwoDimLattice process_arguments(String[] args) { if (args.length < 3) { show_usage(); } int size = Integer.parseInt(args[0]); if (size <= 0) { System.err.println("TwoDimLatticeTest: The size must be positive!"); show_usage(); } int percentage_A = Integer.parseInt(args[1]); if ((percentage_A <= 0) || (percentage_A >= 100)) { System.err.println("TwoDimLatticeTest: The percentage of A atoms must be greater than 0 and less than 100!"); show_usage(); } long seed = Long.parseLong(args[2]); return new TwoDimLattice(size, percentage_A, seed); } /** * Creates a lattice and saves it to file. * @param args */ public static void main(String[] args) { if (args.length < 3) { show_usage(); System.exit(1); } TwoDimLattice simulation = process_arguments(args); System.out.println(); System.out.print("TwoDimLatticeTest: "); System.out.println(simulation); System.out.println(); simulation.saveToFile("simulation_start.txt"); System.out.println("Initial state saved in file: simulation_start.txt"); System.out.println(); } }
[ "milsonmun@yahoo.com" ]
milsonmun@yahoo.com
34231241d573ae03f6d34869462ca06518e2f5a6
39723eae63b30bba1dc2e6bade36eea0c5d982cb
/wemo_apk/java_code/android/support/v4/media/MediaBrowserCompatUtils.java
0d1b760ecba0ec90f206ad62000c7f7def157dc4
[]
no_license
haoyu-liu/crack_WeMo
39142e3843b16cdf0e3c88315d1bfbff0d581827
cdca239427cb170316e9774886a4eed9a5c51757
refs/heads/master
2020-03-22T21:40:45.425229
2019-02-24T13:48:11
2019-02-24T13:48:11
140,706,494
1
1
null
null
null
null
UTF-8
Java
false
false
3,408
java
package android.support.v4.media; import android.os.Bundle; import java.util.List; public class MediaBrowserCompatUtils { public static List<MediaBrowserCompat.MediaItem> applyOptions(List<MediaBrowserCompat.MediaItem> paramList, Bundle paramBundle) { int i = paramBundle.getInt("android.media.browse.extra.PAGE", -1); int j = paramBundle.getInt("android.media.browse.extra.PAGE_SIZE", -1); if ((i == -1) && (j == -1)) { return paramList; } int k = j * (i - 1); int m = k + j; if ((i < 1) || (j < 1) || (k >= paramList.size())) { return null; } if (m > paramList.size()) { m = paramList.size(); } return paramList.subList(k, m); } public static boolean areSameOptions(Bundle paramBundle1, Bundle paramBundle2) { if (paramBundle1 == paramBundle2) {} do { do { do { return true; if (paramBundle1 != null) { break; } } while ((paramBundle2.getInt("android.media.browse.extra.PAGE", -1) == -1) && (paramBundle2.getInt("android.media.browse.extra.PAGE_SIZE", -1) == -1)); return false; if (paramBundle2 != null) { break; } } while ((paramBundle1.getInt("android.media.browse.extra.PAGE", -1) == -1) && (paramBundle1.getInt("android.media.browse.extra.PAGE_SIZE", -1) == -1)); return false; } while ((paramBundle1.getInt("android.media.browse.extra.PAGE", -1) == paramBundle2.getInt("android.media.browse.extra.PAGE", -1)) && (paramBundle1.getInt("android.media.browse.extra.PAGE_SIZE", -1) == paramBundle2.getInt("android.media.browse.extra.PAGE_SIZE", -1))); return false; } public static boolean hasDuplicatedItems(Bundle paramBundle1, Bundle paramBundle2) { int i; int j; label12: int k; label19: int m; label26: int n; int i1; label44: int i2; int i3; if (paramBundle1 == null) { i = -1; if (paramBundle2 != null) { break label89; } j = -1; if (paramBundle1 != null) { break label100; } k = -1; if (paramBundle2 != null) { break label112; } m = -1; if ((i != -1) && (k != -1)) { break label124; } n = 0; i1 = Integer.MAX_VALUE; if ((j != -1) && (m != -1)) { break label144; } i2 = 0; i3 = Integer.MAX_VALUE; label62: if ((n > i2) || (i2 > i1)) { break label164; } } label89: label100: label112: label124: label144: label164: while ((n <= i3) && (i3 <= i1)) { return true; i = paramBundle1.getInt("android.media.browse.extra.PAGE", -1); break; j = paramBundle2.getInt("android.media.browse.extra.PAGE", -1); break label12; k = paramBundle1.getInt("android.media.browse.extra.PAGE_SIZE", -1); break label19; m = paramBundle2.getInt("android.media.browse.extra.PAGE_SIZE", -1); break label26; n = k * (i - 1); i1 = -1 + (n + k); break label44; i2 = m * (j - 1); i3 = -1 + (i2 + m); break label62; } return false; } } /* Location: /root/Documents/wemo_apk/classes-dex2jar.jar!/android/support/v4/media/MediaBrowserCompatUtils.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "root@localhost.localdomain" ]
root@localhost.localdomain
eb17426c6e33b005b90ec8c55275825b7a541dd7
e3eb00125a35950cb103aca085b1e3fec71fb0e0
/azure-mgmt-machinelearning/src/main/java/com/microsoft/azure/management/machinelearning/AssetItem.java
ef6aeb18fd072baa3e0d5b827c104bba5a0d64d5
[ "MIT" ]
permissive
AutorestCI/azure-libraries-for-java
cefc78a0c47da086a34f5c3b9b742d91872c5cb0
e9b6d3f111856cb8509a5cfffcdb3366eb9f36c5
refs/heads/master
2021-04-15T09:52:41.051392
2018-03-23T18:18:31
2018-03-23T18:18:31
126,526,915
2
0
MIT
2018-10-10T16:48:13
2018-03-23T18:51:17
Java
UTF-8
Java
false
false
5,149
java
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.machinelearning; import java.util.Map; import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; /** * Information about an asset associated with the web service. */ public class AssetItem { /** * Asset's friendly name. */ @JsonProperty(value = "name", required = true) private String name; /** * Asset's Id. */ @JsonProperty(value = "id") private String id; /** * Asset's type. Possible values include: 'Module', 'Resource'. */ @JsonProperty(value = "type", required = true) private AssetType type; /** * Access information for the asset. */ @JsonProperty(value = "locationInfo", required = true) private BlobLocation locationInfo; /** * Information about the asset's input ports. */ @JsonProperty(value = "inputPorts") private Map<String, InputPort> inputPorts; /** * Information about the asset's output ports. */ @JsonProperty(value = "outputPorts") private Map<String, OutputPort> outputPorts; /** * If the asset is a custom module, this holds the module's metadata. */ @JsonProperty(value = "metadata") private Map<String, String> metadata; /** * If the asset is a custom module, this holds the module's parameters. */ @JsonProperty(value = "parameters") private List<ModuleAssetParameter> parameters; /** * Get the name value. * * @return the name value */ public String name() { return this.name; } /** * Set the name value. * * @param name the name value to set * @return the AssetItem object itself. */ public AssetItem withName(String name) { this.name = name; return this; } /** * Get the id value. * * @return the id value */ public String id() { return this.id; } /** * Set the id value. * * @param id the id value to set * @return the AssetItem object itself. */ public AssetItem withId(String id) { this.id = id; return this; } /** * Get the type value. * * @return the type value */ public AssetType type() { return this.type; } /** * Set the type value. * * @param type the type value to set * @return the AssetItem object itself. */ public AssetItem withType(AssetType type) { this.type = type; return this; } /** * Get the locationInfo value. * * @return the locationInfo value */ public BlobLocation locationInfo() { return this.locationInfo; } /** * Set the locationInfo value. * * @param locationInfo the locationInfo value to set * @return the AssetItem object itself. */ public AssetItem withLocationInfo(BlobLocation locationInfo) { this.locationInfo = locationInfo; return this; } /** * Get the inputPorts value. * * @return the inputPorts value */ public Map<String, InputPort> inputPorts() { return this.inputPorts; } /** * Set the inputPorts value. * * @param inputPorts the inputPorts value to set * @return the AssetItem object itself. */ public AssetItem withInputPorts(Map<String, InputPort> inputPorts) { this.inputPorts = inputPorts; return this; } /** * Get the outputPorts value. * * @return the outputPorts value */ public Map<String, OutputPort> outputPorts() { return this.outputPorts; } /** * Set the outputPorts value. * * @param outputPorts the outputPorts value to set * @return the AssetItem object itself. */ public AssetItem withOutputPorts(Map<String, OutputPort> outputPorts) { this.outputPorts = outputPorts; return this; } /** * Get the metadata value. * * @return the metadata value */ public Map<String, String> metadata() { return this.metadata; } /** * Set the metadata value. * * @param metadata the metadata value to set * @return the AssetItem object itself. */ public AssetItem withMetadata(Map<String, String> metadata) { this.metadata = metadata; return this; } /** * Get the parameters value. * * @return the parameters value */ public List<ModuleAssetParameter> parameters() { return this.parameters; } /** * Set the parameters value. * * @param parameters the parameters value to set * @return the AssetItem object itself. */ public AssetItem withParameters(List<ModuleAssetParameter> parameters) { this.parameters = parameters; return this; } }
[ "jianghaolu@users.noreply.github.com" ]
jianghaolu@users.noreply.github.com
93fb4aa2b59a1e21c6769918117a2dcaeea15e14
0379c27b497f3af88df8908eb1fc66c9d5c4efab
/src/main/java/com/wfu/modules/sys/entity/Office.java
ffd98cee5448735b51f31e4d8639cbe4a2af2793
[ "Apache-2.0" ]
permissive
magicgis/jybl
a440524dd6296e4ba6ff9c5210dc3cf98246354a
54a8915ab2d521c96921c41fbe0b9258a4af10f8
refs/heads/master
2020-03-26T17:03:28.651516
2017-06-30T07:52:10
2017-06-30T07:52:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,499
java
/** * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved. */ package com.wfu.modules.sys.entity; import java.util.List; import javax.validation.constraints.NotNull; import com.wfu.common.persistence.TreeEntity; import org.hibernate.validator.constraints.Length; /** * 机构Entity * @author ThinkGem * @version 2013-05-15 */ public class Office extends TreeEntity<Office> { private static final long serialVersionUID = 1L; // private Office parent; // 父级编号 // private String parentIds; // 所有父级编号 private Area area; // 归属区域 private String code; // 机构编码 // private String name; // 机构名称 // private Integer sort; // 排序 private String type; // 机构类型(1:公司;2:部门;3:小组) private String grade; // 机构等级(1:一级;2:二级;3:三级;4:四级) private String address; // 联系地址 private String zipCode; // 邮政编码 private String master; // 负责人 private String phone; // 电话 private String fax; // 传真 private String email; // 邮箱 private String useable;//是否可用 private User primaryPerson;//主负责人 private User deputyPerson;//副负责人 private List<String> childDeptList;//快速添加子部门 private String adId;//AD同步标识 private String parentName;//父级组织名称 public Office(){ super(); // this.sort = 30; this.type = "2"; } public Office(String id){ super(id); } public List<String> getChildDeptList() { return childDeptList; } public void setChildDeptList(List<String> childDeptList) { this.childDeptList = childDeptList; } public String getUseable() { return useable; } public void setUseable(String useable) { this.useable = useable; } public User getPrimaryPerson() { return primaryPerson; } public void setPrimaryPerson(User primaryPerson) { this.primaryPerson = primaryPerson; } public User getDeputyPerson() { return deputyPerson; } public void setDeputyPerson(User deputyPerson) { this.deputyPerson = deputyPerson; } // @JsonBackReference // @NotNull public Office getParent() { return parent; } public void setParent(Office parent) { this.parent = parent; } // // @Length(min=1, max=2000) // public String getParentIds() { // return parentIds; // } // // public void setParentIds(String parentIds) { // this.parentIds = parentIds; // } @NotNull public Area getArea() { return area; } public void setArea(Area area) { this.area = area; } // // @Length(min=1, max=100) // public String getName() { // return name; // } // // public void setName(String name) { // this.name = name; // } // // public Integer getSort() { // return sort; // } // // public void setSort(Integer sort) { // this.sort = sort; // } @Length(min=1, max=20) public String getType() { return type; } public void setType(String type) { this.type = type; } @Length(min=1, max=1) public String getGrade() { return grade; } public void setGrade(String grade) { this.grade = grade; } @Length(min=0, max=255) public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } @Length(min=0, max=100) public String getZipCode() { return zipCode; } public void setZipCode(String zipCode) { this.zipCode = zipCode; } @Length(min=0, max=100) public String getMaster() { return master; } public void setMaster(String master) { this.master = master; } @Length(min=0, max=200) public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } @Length(min=0, max=200) public String getFax() { return fax; } public void setFax(String fax) { this.fax = fax; } @Length(min=0, max=200) public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } @Length(min=0, max=100) public String getCode() { return code; } public void setCode(String code) { this.code = code; } // public String getParentId() { // return parent != null && parent.getId() != null ? parent.getId() : "0"; // } @Override public String toString() { return name; } public String getAdId() { return adId; } public void setAdId(String adId) { this.adId = adId; } public String getParentName() { return parentName; } public void setParentName(String parentName) { this.parentName = parentName; } }
[ "347184068@qq.com" ]
347184068@qq.com
075664555e9eaef34b8a3cd9f277879a3ebc8386
91f073089796688e988fc06075c036663e621064
/UtilsModule/src/main/java/middlem/person/utilsmodule/comutils/StringUtils.java
c38e6577f1ad5749d2c9b42bca7bd1e096fcc127
[]
no_license
hongqinghe/UtilsLib
b576bca55ab29d3908ed9e2b21f4fbf8599d3816
75302260ffe519facdf7f183c2c335069ee87938
refs/heads/master
2021-07-13T14:04:16.477068
2018-04-19T12:15:27
2018-04-19T12:15:27
109,475,621
0
0
null
null
null
null
UTF-8
Java
false
false
7,211
java
package middlem.person.utilsmodule.comutils; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.util.regex.Matcher; import java.util.regex.Pattern; /*********************************************** * * <P> desc: String工具类(添加数据保护机制) * <P> Author: gongtong * <P> Date: 2017-10-24 21:34 ***********************************************/ public class StringUtils extends org.apache.commons.lang3.StringUtils { /** * 判断字符串是否还有非法字符 * @param str * @return boolean */ public static boolean isStringFilter(String str) { String regEx="[`~!@#$%^&*+=|{}':;',\\[\\]<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]"; Pattern p = Pattern.compile(regEx); Matcher m = p.matcher(str); if(m.find()) { return false; } return true; } // 将textview中的字符全角化。即将所有的数字、字母及标点全部转为全角字符,使它们与汉字同占两个字节,这样就可以避免由于占位导致的排版混乱问题了 public static String ToDBC(String input) { if(input == null){ return new String(); } char[] c = input.toCharArray(); for (int i = 0; i < c.length; i++) { if (c[i] == 12288) { c[i] = (char) 32; continue; } if (c[i] > 65280 && c[i] < 65375) c[i] = (char) (c[i] - 65248); } return new String(c); } /** * 判断字符串是否为空 * * @param str * @return boolean */ public static boolean isStrEmpty(String str) { return isBlank(str) && isEmpty(str); } /** * 判断字符串是否相等 * * @param source * @param target * @return boolean */ public static boolean isEqual(String source, String target) { if (isStrEmpty(source)) { return isStrEmpty(target); } else { return source.equals(target); } } /** * String的安全检测 * 为空则返回"" * * @param source * @return */ public static String saveCheck(String source) { return isStrEmpty(source) ? "" : source; } /** * 得到字符数 * 一个中文字符对应两个字符 * * @param str * @return int */ public static int getStrCount(String str) { str = str.replaceAll("[^\\x00-\\xff]", "**"); int length = str.length(); return length; } /** * 字符全角化 * 将所有的数字、字母及标点全部转为全角字符 * 使它们与汉字同占两个字节,这样就可以避免由于占位导致的排版混乱问题了 * * @param source * @return String */ public static String doDBC(String source) { if (source == null) { return new String(); } char[] c = source.toCharArray(); for (int i = 0; i < c.length; i++) { if (c[i] == 12288) { c[i] = (char) 32; continue; } if (c[i] > 65280 && c[i] < 65375) c[i] = (char) (c[i] - 65248); } return new String(c); } /** * encode字符串 * @param str * @return String */ public static String encodeStr(String str) { try { str = URLEncoder.encode(str, "utf-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return str; } /** * unicode字符化 * * @param str * @return String */ public static String unicodeToString(String str) { Pattern pattern = Pattern.compile("(\\\\u(\\p{XDigit}{4}))"); Matcher matcher = pattern.matcher(str); char ch; while (matcher.find()) { ch = (char) Integer.parseInt(matcher.group(2), 16); str = str.replace(matcher.group(1), ch + ""); } return str; } /** * 汉字转拼音 * * @param src * @return String */ // public static String getPinYin(String src) { // char[] t1 = null; // t1 = src.toCharArray(); // // System.out.println(t1.length); // String[] t2 = new String[t1.length]; // // System.out.println(t2.length); // // 设置汉字拼音输出的格式 // HanyuPinyinOutputFormat t3 = new HanyuPinyinOutputFormat(); // t3.setCaseType(HanyuPinyinCaseType.LOWERCASE); // t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE); // t3.setVCharType(HanyuPinyinVCharType.WITH_V); // String t4 = ""; // int t0 = t1.length; // for (int i =0; i < t0; i++) { // // 判断能否为汉字字符 // if (Character.toString(t1[i]).matches("[\\u4E00-\\u9FA5]+")) { // t2 = PinyinHelper.toHanyuPinyinStringArray(t1[i], t3);// 将汉字的几种全拼都存到t2数组中 // t4 += t2[0];// 取出该汉字全拼的第一种读音并连接到字符串t4后 // } else { // // 如果不是汉字字符,间接取出字符并连接到字符串t4后 // t4 += Character.toString(t1[i]); // } // } // return t4; // } /** * 手机号码格式化 * <p>1xx-xxxx-xxxx</p> * @param phone * @return String */ public static String formatPhoneNum(String phone){ if (isStrEmpty(phone) || !WordUtils.isMobileNo(phone)) { return phone; } String phoneStr1 = phone.substring(0, 3); String phoneStr2 = phone.substring(3, 7); String phoneStr3 = phone.substring(7, 11); return phoneStr1 + "-" + phoneStr2 + "-" + phoneStr3; } /** * 去除所有空格 * @param source * @return String */ public static String preProcess(String source) { if (source == null) { return null; } String result = source.replaceAll(",", ""); result = result.replaceAll(" ", ""); return result; } public static boolean regexCheck(String str, String regex) { boolean flag = false; if (!isStrEmpty(str) && !isStrEmpty(regex)) { try { Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(str); flag = matcher.matches(); } catch (Exception e) { flag = false; } } return flag; } /** * 把空数据转成null. * * @param source * 原始值. * @return 转换后的值. */ public static String emptyToNull(String source) { return StringUtils.isEmpty(source) ? null : source; } /** * 把null转换称空串. * * @param source * 原始串. * @return */ public static String nullToEmpty(String source) { return StringUtils.isEmpty(source) ? "" : source; } }
[ "gongtong@2dfire.com" ]
gongtong@2dfire.com
77cae0e9417530b30b52d740d3ad478a84a74228
a8ac3cf27f6fb6fcbbe0d4d170e118e3bdebe871
/src/main/java/com/wsc/qa/utils/ReadFromFile.java
bfc5fa25562d0c0b9e89ee6feb8061de6627944e
[]
no_license
shichaowei/toyiyi
ff7f1be04ebb0cb3d35cdf1739908dc8bd7a81c9
29dbb98408d5e148578ede487bffd3846216c41e
refs/heads/master
2021-07-19T22:37:17.047152
2017-10-29T11:26:06
2017-10-29T11:26:06
108,728,064
0
0
null
null
null
null
UTF-8
Java
false
false
7,003
java
package com.wsc.qa.utils; import java.io.File; import java.io.*; public class ReadFromFile { /** * 以字节为单位读取文件,常用于读二进制文件,如图片、声音、影像等文件。 */ public static void readFileByBytes(String fileName) { File file = new File(fileName); InputStream in = null; try { System.out.println("以字节为单位读取文件内容,一次读一个字节:"); // 一次读一个字节 in = new FileInputStream(file); int tempbyte; while ((tempbyte = in.read()) != -1) { System.out.write(tempbyte); } in.close(); } catch (IOException e) { e.printStackTrace(); return; } try { System.out.println("以字节为单位读取文件内容,一次读多个字节:"); // 一次读多个字节 byte[] tempbytes = new byte[100]; int byteread = 0; in = new FileInputStream(fileName); ReadFromFile.showAvailableBytes(in); // 读入多个字节到字节数组中,byteread为一次读入的字节数 while ((byteread = in.read(tempbytes)) != -1) { System.out.write(tempbytes, 0, byteread); } } catch (Exception e1) { e1.printStackTrace(); } finally { if (in != null) { try { in.close(); } catch (IOException e1) { } } } } /** * 以字符为单位读取文件,常用于读文本,数字等类型的文件 */ public static void readFileByChars(String fileName) { File file = new File(fileName); Reader reader = null; try { System.out.println("以字符为单位读取文件内容,一次读一个字节:"); // 一次读一个字符 reader = new InputStreamReader(new FileInputStream(file)); int tempchar; while ((tempchar = reader.read()) != -1) { // 对于windows下,\r\n这两个字符在一起时,表示一个换行。 // 但如果这两个字符分开显示时,会换两次行。 // 因此,屏蔽掉\r,或者屏蔽\n。否则,将会多出很多空行。 if (((char) tempchar) != '\r') { System.out.print((char) tempchar); } } reader.close(); } catch (Exception e) { e.printStackTrace(); } try { System.out.println("以字符为单位读取文件内容,一次读多个字节:"); // 一次读多个字符 char[] tempchars = new char[30]; int charread = 0; reader = new InputStreamReader(new FileInputStream(fileName)); // 读入多个字符到字符数组中,charread为一次读取字符数 while ((charread = reader.read(tempchars)) != -1) { // 同样屏蔽掉\r不显示 if ((charread == tempchars.length) && (tempchars[tempchars.length - 1] != '\r')) { System.out.print(tempchars); } else { for (int i = 0; i < charread; i++) { if (tempchars[i] == '\r') { continue; } else { System.out.print(tempchars[i]); } } } } } catch (Exception e1) { e1.printStackTrace(); } finally { if (reader != null) { try { reader.close(); } catch (IOException e1) { } } } } /** * 以行为单位读取文件,常用于读面向行的格式化文件 */ public static String readFileByLines(String fileName) { String result=""; File file = new File(fileName); BufferedReader reader = null; try { // System.out.println("以行为单位读取文件内容,一次读一整行:"); reader = new BufferedReader(new FileReader(file)); String tempString = null; int line = 1; // 一次读入一行,直到读入null为文件结束 while ((tempString = reader.readLine()) != null) { // 显示行号 // System.out.println("line " + line + ": " + tempString); result+=tempString; result+=","; line++; } reader.close(); } catch (IOException e) { e.printStackTrace(); } finally { if (reader != null) { try { reader.close(); } catch (IOException e1) { } } } return result; } /** * 随机读取文件内容 */ public static void readFileByRandomAccess(String fileName) { RandomAccessFile randomFile = null; try { System.out.println("随机读取一段文件内容:"); // 打开一个随机访问文件流,按只读方式 randomFile = new RandomAccessFile(fileName, "r"); // 文件长度,字节数 long fileLength = randomFile.length(); // 读文件的起始位置 int beginIndex = (fileLength > 4) ? 4 : 0; // 将读文件的开始位置移到beginIndex位置。 randomFile.seek(beginIndex); byte[] bytes = new byte[10]; int byteread = 0; // 一次读10个字节,如果文件内容不足10个字节,则读剩下的字节。 // 将一次读取的字节数赋给byteread while ((byteread = randomFile.read(bytes)) != -1) { System.out.write(bytes, 0, byteread); } } catch (IOException e) { e.printStackTrace(); } finally { if (randomFile != null) { try { randomFile.close(); } catch (IOException e1) { } } } } /** * 显示输入流中还剩的字节数 */ private static void showAvailableBytes(InputStream in) { try { System.out.println("当前字节输入流中的字节数为:" + in.available()); } catch (IOException e) { e.printStackTrace(); } } public static void main(String[] args) { String fileName = "C:/temp/newTemp.txt"; ReadFromFile.readFileByBytes(fileName); ReadFromFile.readFileByChars(fileName); ReadFromFile.readFileByLines(fileName); ReadFromFile.readFileByRandomAccess(fileName); } }
[ "1239378293@qq.com" ]
1239378293@qq.com
8ff56519fc29c922163fa10cadfb49f5e5188321
930c207e245c320b108e9699bbbb036260a36d6a
/BRICK-Jackson-JsonLd/generatedCode/src/main/java/brickschema/org/schema/_1_0_2/Brick/IReturn_Air_Humidity_Sensor.java
9d404da0caea2cb89bc68e62b6145a6f4b74bd4d
[]
no_license
InnovationSE/BRICK-Generated-By-OLGA
24d278f543471e1ce622f5f45d9e305790181fff
7874dfa450a8a2b6a6f9927c0f91f9c7d2abd4d2
refs/heads/master
2021-07-01T14:13:11.302860
2017-09-21T12:44:17
2017-09-21T12:44:17
104,251,784
1
0
null
null
null
null
UTF-8
Java
false
false
1,078
java
/** * This file is automatically generated by OLGA * @author OLGA * @version 1.0 */ package brickschema.org.schema._1_0_2.Brick; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldId; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldProperty; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldType; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldLink; import ioinformarics.oss.jackson.module.jsonld.annotation.JsonldPropertyType; import brick.jsonld.util.RefId; import brickschema.org.schema._1_0_2.Brick.IReturn_Air; import brickschema.org.schema._1_0_2.Brick.IHumidity_Sensor; public interface IReturn_Air_Humidity_Sensor extends IReturn_Air, IHumidity_Sensor { /** * @return RefId */ @JsonIgnore public RefId getRefId(); }
[ "Andre.Ponnouradjane@non.schneider-electric.com" ]
Andre.Ponnouradjane@non.schneider-electric.com
d70362f36ccaa0dc3e38526889719afc67ac563e
675ba64fe6dd37a9f525d1a79b7b70195dd4500b
/src-cms/com/frameworkset/platform/cms/util/BinaryFileTypes.java
f61ab47c7424410fb959a74cbe32c0370c57ae0c
[]
no_license
liveqmock/bboss-cms
28b6c350325884061998a55933cde31250f9a836
cdb8ea5eb10a29fea914d742ba829905cc001e42
refs/heads/master
2021-01-22T00:32:29.721587
2013-05-29T15:50:03
2013-05-29T15:50:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,227
java
package com.frameworkset.platform.cms.util; import java.util.ListResourceBundle; /** * 二进制文件的类型和相应的mimetype映射关系 * <p>Title: BinaryFileTypes</p> * * <p>Description: </p> * * <p>Copyright: Copyright (c) 2006</p> * * <p>Company: 三一集团</p> * @Date 2007-4-19 15:12:54 * @author biaoping.yin * @version 1.0 */ public class BinaryFileTypes extends ListResourceBundle implements java.io.Serializable { protected Object[][] getContents() { return contents; } private final static Object contents[][] = { { "", "content/unknown" }, { "a", "application/octet-stream" }, { "ai", "application/postscript" }, { "aif", "audio/x-aiff" }, { "aifc", "audio/x-aiff" }, { "aiff", "audio/x-aiff" }, { "arc", "application/octet-stream" }, { "au", "audio/basic" }, { "avi", "video/x-msvideo" }, { "asf", "video/x-ms-asf" }, { "bcpio", "application/x-bcpio" }, { "bin", "application/octet-stream" }, { "c", "text/plain" }, { "c++", "text/plain" }, { "cc", "text/plain" }, { "cdf", "application/x-netcdf" }, { "cpio", "application/x-cpio" }, { "dump", "application/octet-stream" }, { "dvi", "application/x-dvi" }, { "eps", "application/postscript" }, { "etx", "text/x-setext" }, { "exe", "application/octet-stream" }, { "gif", "image/gif" }, { "gtar", "application/x-gtar" }, { "gz", "application/octet-stream" }, { "h\t", "text/plain" }, { "hdf", "application/x-hdf" }, { "hqx", "application/octet-stream" }, { "ief", "image/ief" }, { "java", "text/plain" }, { "jfif", "image/jpeg" }, { "jfif-tbnl", "image/jpeg" }, { "jpe", "image/jpeg" }, { "jpeg", "image/jpeg" }, { "jpg", "image/jpeg" }, { "png", "image/png" }, { "bmp", "image/bmp" }, { "js", "application/x-javascript" }, { "latex", "application/x-latex" }, { "man", "application/x-troff-man" }, { "me", "application/x-troff-me" }, { "mime", "message/rfc822" }, { "mov", "video/quicktime" }, { "movie", "video/x-sgi-movie" }, { "mpe", "video/mpeg" }, { "mpeg", "video/mpeg" }, { "mpg", "video/mpeg" }, { "mp3", "audio/mpeg" }, { "ms", "application/x-troff-ms" }, { "mv", "video/x-sgi-movie" }, { "nc", "application/x-netcdf" }, { "o", "application/octet-stream" }, { "oda", "application/oda" }, { "pbm", "image/x-portable-bitmap" }, { "pdf", "application/pdf" }, { "pgm", "image/x-portable-graymap" }, { "pl", "text/plain" }, { "rm", "application/vnd.rn-realmedia" }, { "rmvb", "application/vnd.rn-realmedia" }, { "ram", "audio/x-pn-realaudio" }, { "ra", "audio/x-realaudio" }, { "rpm", "audio/x-pn-realaudio-plugin" }, { "pnm", "image/x-portable-anymap" }, { "ppm", "image/x-portable-pixmap" }, { "ps", "application/postscript" }, { "qt", "video/quicktime" }, { "ras", "image/x-cmu-rast" }, { "rgb", "image/x-rgb" }, { "roff", "application/x-troff" }, { "rtf", "application/rtf" }, { "rtx", "application/rtf" }, { "saveme", "application/octet-stream" }, { "sh", "application/x-shar" }, { "shar", "application/x-shar" }, { "snd", "audio/basic" }, { "src", "application/x-wais-source" }, { "sv4cpio", "application/x-sv4cpio" }, { "sv4crc", "application/x-sv4crc" }, { "swf", "application/x-shockwave-flash" }, { "t", "application/x-troff" }, { "tar", "application/x-tar" }, { "tex", "application/x-tex" }, { "texi", "application/x-texinfo" }, { "texinfo", "application/x-texinfo" }, { "text", "text/plain" }, { "tif", "image/tiff" }, { "tiff", "image/tiff" }, { "tr", "application/x-troff" }, { "tsv", "text/tab-separated-values" }, { "txt", "text/plain" }, { "ustar", "application/x-ustar" }, { "uu", "application/octet-stream" }, { "wav", "audio/x-wav" }, { "wsrc", "application/x-wais-source" }, { "xbm", "image/x-xbitmap" }, { "xpm", "image/x-xpixmap" }, { "xwd", "image/x-xwindowdump" }, { "z", "application/octet-stream" }, { "zip", "application/zip" }, { "rar", "application/rar" }, { "xls", "application/msexcel" }, { "ppt", "application/vnd.ms-powerpoint" }, { "doc", "application/msword" }, { "wmv", "video/x-msvideo" } }; }
[ "yin-bp@163.com" ]
yin-bp@163.com
e452412fa5d3892accf7c0a6c1070625bfd92dce
a8c5b7b04eace88b19b5a41a45f1fb030df393e3
/projects/financial/src/test/java/com/opengamma/financial/analytics/fudgemsg/ISDAResultsBuilderTest.java
e6e1caf66af71a75813e6f1117ec673e505a7340
[ "Apache-2.0" ]
permissive
McLeodMoores/starling
3f6cfe89cacfd4332bad4861f6c5d4648046519c
7ae0689e06704f78fd9497f8ddb57ee82974a9c8
refs/heads/master
2022-12-04T14:02:00.480211
2020-04-28T17:22:44
2020-04-28T17:22:44
46,577,620
4
4
Apache-2.0
2022-11-24T07:26:39
2015-11-20T17:48:10
Java
UTF-8
Java
false
false
1,753
java
/** * Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.financial.analytics.fudgemsg; import static org.testng.AssertJUnit.assertEquals; import org.testng.annotations.Test; import com.opengamma.analytics.financial.credit.isdastandardmodel.ISDACompliantCreditCurve; import com.opengamma.analytics.financial.credit.isdastandardmodel.ISDACompliantCurve; import com.opengamma.analytics.financial.credit.isdastandardmodel.ISDACompliantYieldCurve; import com.opengamma.util.test.TestGroup; /** * */ @Test(groups = TestGroup.UNIT) public class ISDAResultsBuilderTest extends AnalyticsTestBase { @Test public void testISDACompliantCurve() { final double[] times = new double[] {0, .25, .5, .75, 1 }; final double[] rates = new double[] {0.01, 0.02, 0.03, 0.04, 0.05 }; final ISDACompliantCurve curve = new ISDACompliantCurve(times, rates); assertEquals(curve, cycleObject(ISDACompliantCurve.class, curve)); } @Test public void testISDACompliantCreditCurve() { final double[] times = new double[] {0, .25, .5, .75, 1 }; final double[] rates = new double[] {0.01, 0.02, 0.03, 0.04, 0.05 }; final ISDACompliantCreditCurve curve = new ISDACompliantCreditCurve(times, rates); assertEquals(curve, cycleObject(ISDACompliantCreditCurve.class, curve)); } @Test public void testISDACompliantYieldCurve() { final double[] times = new double[] {0, .25, .5, .75, 1 }; final double[] rates = new double[] {0.01, 0.02, 0.03, 0.04, 0.05 }; final ISDACompliantYieldCurve curve = new ISDACompliantYieldCurve(times, rates); assertEquals(curve, cycleObject(ISDACompliantYieldCurve.class, curve)); } }
[ "jim.moores@gmail.com" ]
jim.moores@gmail.com
657c178fd0df6412045f8bbf9fbc06e9dcfb7a4d
856e514ebc49ba9257bbee46a0b49887903fb8d1
/usercenter/branches/yc/rkylin-usercenter/rkylin-usercenter-api/src/main/java/com/rongcapital/usercenter/api/vo/WeChatRegisterInfo.java
ac3044843cd7558a029d8f5923a28caf9b96a7fc
[]
no_license
yangjava/kylin-usercenter
826f6c781937f95feb6390f42caf40d2f83d7665
5df4c8e1f4030b994e65e183ce2dd9d07fa35957
refs/heads/master
2020-12-02T22:08:28.618358
2017-07-03T08:14:27
2017-07-03T08:14:27
96,086,783
0
4
null
null
null
null
UTF-8
Java
false
false
1,908
java
package com.rongcapital.usercenter.api.vo; public class WeChatRegisterInfo extends UserRegiesterInfo{ /** * Description: */ private static final long serialVersionUID = 1L; /** * 微信号Id */ private String weChatId; /** 公众号Id*/ private String publicNumberId; /** 用户openId */ private String openId; /** 证件类型*/ private String certificateType; /** 证件号 */ private String certificateNumber; /**手机号**/ private String teleNum; public String getWeChatId() { return weChatId; } public void setWeChatId(String weChatId) { this.weChatId = weChatId; } public String getPublicNumberId() { return publicNumberId; } public void setPublicNumberId(String publicNumberId) { this.publicNumberId = publicNumberId; } public String getOpenId() { return openId; } public void setOpenId(String openId) { this.openId = openId; } public String getTeleNum() { return teleNum; } public void setTeleNum(String teleNum) { this.teleNum = teleNum; } public String getCertificateType() { return certificateType; } public void setCertificateType(String certificateType) { this.certificateType = certificateType; } public String getCertificateNumber() { return certificateNumber; } public void setCertificateNumber(String certificateNumber) { this.certificateNumber = certificateNumber; } @Override public String toString() { return "WeChatRegisterInfo [weChatId=" + weChatId + ", publicNumberId=" + publicNumberId + ", openId=" + openId + ", certificateType=" + certificateType + ", certificateNumber=" + certificateNumber + ", teleNum=" + teleNum + "]"; } }
[ "yangjava@users.noreply.github.com" ]
yangjava@users.noreply.github.com
dacc476b4cd57af538f590b7d41dd50cc0c0acb0
b774faeccfc2b987686ea09c378e85ead013c36d
/src/main/java/com/kaltura/client/types/ESearchOrderByItem.java
ff602ba66022d75b417488c014fa18c7b418c573
[]
no_license
btellstrom/KalturaGeneratedAPIClientsJava
d0df7c3db7668bdaf5a9ad40ecdffe9cad7cd10c
9e2cedfbab5cda9ed64cb1240711ae0195709a4f
refs/heads/master
2020-06-05T21:24:08.430787
2019-06-18T05:33:25
2019-06-18T05:33:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,835
java
// =================================================================================================== // _ __ _ _ // | |/ /__ _| | |_ _ _ _ _ __ _ // | ' </ _` | | _| || | '_/ _` | // |_|\_\__,_|_|\__|\_,_|_| \__,_| // // This file is part of the Kaltura Collaborative Media Suite which allows users // to do with audio, video, and animation what Wiki platfroms allow them to do with // text. // // Copyright (C) 2006-2019 Kaltura Inc. // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // // @ignore // =================================================================================================== package com.kaltura.client.types; import com.google.gson.JsonObject; import com.kaltura.client.Params; import com.kaltura.client.enums.ESearchSortOrder; import com.kaltura.client.types.ObjectBase; import com.kaltura.client.utils.GsonParser; import com.kaltura.client.utils.request.MultiRequestBuilder; /** * This class was generated using generate.php * against an XML schema provided by Kaltura. * * MANUAL CHANGES TO THIS CLASS WILL BE OVERWRITTEN. */ @SuppressWarnings("serial") @MultiRequestBuilder.Tokenizer(ESearchOrderByItem.Tokenizer.class) public abstract class ESearchOrderByItem extends ObjectBase { public interface Tokenizer extends ObjectBase.Tokenizer { String sortOrder(); } private ESearchSortOrder sortOrder; // sortOrder: public ESearchSortOrder getSortOrder(){ return this.sortOrder; } public void setSortOrder(ESearchSortOrder sortOrder){ this.sortOrder = sortOrder; } public void sortOrder(String multirequestToken){ setToken("sortOrder", multirequestToken); } public ESearchOrderByItem() { super(); } public ESearchOrderByItem(JsonObject jsonObject) throws APIException { super(jsonObject); if(jsonObject == null) return; // set members values: sortOrder = ESearchSortOrder.get(GsonParser.parseString(jsonObject.get("sortOrder"))); } public Params toParams() { Params kparams = super.toParams(); kparams.add("objectType", "KalturaESearchOrderByItem"); kparams.add("sortOrder", this.sortOrder); return kparams; } }
[ "community@kaltura.com" ]
community@kaltura.com
263e96592c99fb406bf3dac2ec2e6d6bb5520350
9e8afc827742e6ebf18c547071dfa2e96ab945a9
/HMI112_V01/app_net/src/main/java/com/uninew/net/JT905/bean/P_PictureAudioVideoUpload.java
a005c2168cb4e8cec7fedcf6c92d4632f765bc2d
[]
no_license
hgdsys007/Uninew
23c0957e58f8bdaa698db0102f62eecc91d3f538
efedd89a2d296ca6427c48441bbdb8490c2c42bb
refs/heads/master
2021-12-30T05:40:15.482254
2018-02-06T01:29:01
2018-02-06T01:29:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,268
java
package com.uninew.net.JT905.bean; import com.uninew.net.JT905.common.BaseMsgID; import com.uninew.net.JT905.common.ProtocolTool; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; /** * 图片、音视频上传命令 * Created by Administrator on 2017/8/20 0020. */ public class P_PictureAudioVideoUpload extends BaseBean { private int type;//类型 0x00:照片,0x01:音频,0x02:视频,0x03:其他:RFU private int fileId;//文件id private int startOffset;//起始位置 public P_PictureAudioVideoUpload() { } public P_PictureAudioVideoUpload(int type, int fileId, int startOffset) { this.type = type; this.fileId = fileId; this.startOffset = startOffset; } @Override public int getTcpId() { return this.tcpId; } @Override public void setTcpId(int tcpId) { this.tcpId = tcpId; } @Override public int getTransportId() { return this.transportId; } @Override public void setTransportId(int transportId) { this.transportId = transportId; } @Override public String getSmsPhoneNumber() { return this.smsPhonenumber; } @Override public void setSmsPhoneNumber(String smsPhonenumber) { this.smsPhonenumber = smsPhonenumber; } @Override public int getSerialNumber() { return this.serialNumber; } @Override public void setSerialNumber(int serialNumber) { this.serialNumber = serialNumber; } @Override public int getMsgId() { return BaseMsgID.STORE_IMAGE_UPLOAD_COMMOND; } @Override public byte[] getDataBytes() { byte[] datas = null; ByteArrayOutputStream stream = new ByteArrayOutputStream(); DataOutputStream out = new DataOutputStream(stream); try { out.writeByte(type); out.writeInt(fileId); out.writeInt(startOffset); out.flush(); datas = stream.toByteArray(); } catch (IOException e) { e.printStackTrace(); } finally { try { if (stream != null) { stream.close(); } if (out != null) { out.close(); } } catch (IOException e) { e.printStackTrace(); } } return datas; } @Override public Object getDataPacket(byte[] datas) { ByteArrayInputStream stream = new ByteArrayInputStream(datas); DataInputStream in = new DataInputStream(stream); try { type=in.readByte(); fileId=in.readInt(); startOffset=in.readInt(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (stream != null) { stream.close(); } if (in != null) { in.close(); } } catch (IOException e) { e.printStackTrace(); } } return this; } }
[ "782508551@qq.com" ]
782508551@qq.com
96825dfe8f333b4266e10a1ee47f3dd6f284fd42
76888fa0bf1c624f6b28beff08fb7486d1d4715c
/app/src/main/java/com/dante/diary/base/AboutActivity.java
b3de2394d2947cf10561ae96ddfc0f5bb3fc38f9
[]
no_license
SagarDep/TimePill
bf1d5ef68d6831c6a928728309234f177f235670
1b8b69d039c3e2d98faa6fbb572e1fe8472464d0
refs/heads/master
2020-03-22T05:12:00.147479
2018-06-01T07:12:02
2018-06-01T07:12:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,428
java
package com.dante.diary.base; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.view.View; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.dante.diary.BuildConfig; import com.dante.diary.R; import com.dante.diary.custom.Updater; import com.dante.diary.detail.PictureActivity; import com.dante.diary.utils.AppUtil; import com.dante.diary.utils.SpUtil; import butterknife.BindView; import static com.dante.diary.base.App.context; /** * about the author and so on. */ public class AboutActivity extends BaseActivity implements View.OnClickListener { private static final String TAG = "AboutActivity"; private static final long DURATION = 300; private static final String EGG_URL = "http://pic62.nipic.com/file/20150321/10529735_111347613000_2.jpg"; @BindView(R.id.versionName) TextView versionName; @BindView(R.id.donate) TextView donate; @BindView(R.id.app) LinearLayout app; @BindView(R.id.icon) ImageView icon; private long startTime; private int secretIndex; @Override protected int initLayoutId() { return R.layout.activity_about; } @Override protected void initViews(@Nullable Bundle savedInstanceState) { super.initViews(savedInstanceState); getToolbar().setNavigationOnClickListener(v -> onBackPressed()); versionName.setText(String.format(getString(R.string.version) + " %s(%s)", BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE)); donate.setOnClickListener(v -> AppUtil.donate(AboutActivity.this)); app.setOnClickListener(this); } private void go() { startTime = System.currentTimeMillis(); if (System.currentTimeMillis() - startTime < DURATION * (secretIndex + 1)) { secretIndex++; if (secretIndex == 3) { viewGif(); secretIndex = 0; } } } private void viewGif() { String url = SpUtil.getString(Updater.EGG_URL); Intent intent = new Intent(context.getApplicationContext(), PictureActivity.class); intent.putExtra(Constants.URL, url.isEmpty() ? EGG_URL : url); intent.putExtra("isGif", url.contains("gif")); startActivity(intent); } @Override public void onClick(View v) { go(); } }
[ "yons@yonsdeMac-Pro-2.local" ]
yons@yonsdeMac-Pro-2.local
2fc550e5a57506535d85b321a2498e570f1c28d2
0dc5d56af389b1443822504576827f9fd321106e
/src/main/java/com/isheji/project/entity/Msg.java
483ef28dc6524a15c2c282a43d4d27832bc990b5
[]
no_license
shanyao19940801/isheji
aaad1008801832f2910aa55a06b57c0dba0faa13
8b85549652739261f7319c4275eb02d1f25c64a1
refs/heads/master
2020-03-09T04:30:58.430824
2018-07-31T14:19:14
2018-07-31T14:19:14
128,589,672
0
0
null
null
null
null
UTF-8
Java
false
false
571
java
package com.isheji.project.entity; public class Msg<T> { /*错误码*/ private Integer code; /*提示信息 */ private String msg; /*具体内容*/ private T data; public Integer getCode() { return code; } public void setCode(Integer code) { this.code = code; } public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public T getData() { return data; } public void setData(T data) { this.data = data; } }
[ "sqshanyao@163.com" ]
sqshanyao@163.com
9a85345325eee8ccd2161082394871f04b6d7fee
b6949b224e42a20209772a5c0ec16fa109391c0a
/app/src/main/java/com/nazmuddinmavliwala/turvo/base/di/RxModule.java
1369bbcd51d0b244565a8b3fdfc20d543e1db8c3
[]
no_license
nazmuddin77/stockexchange
1a3c5717c6e2e5f51c371ad1be03a8315f0fedfd
e7f822d038a3539220e3ba93d51f64c9a2675629
refs/heads/master
2021-07-21T00:37:27.535718
2017-10-30T13:41:55
2017-10-30T13:41:55
108,854,532
0
0
null
null
null
null
UTF-8
Java
false
false
797
java
package com.nazmuddinmavliwala.turvo.base.di; import com.example.data.interactors.BackgroundThread; import com.example.data.interactors.UIThread; import com.nazmuddin.domain.executers.ExecutionThread; import com.nazmuddin.domain.executers.PostExecutionThread; import com.nazmuddinmavliwala.turvo.app.di.identifiers.ScopedActivity; import javax.inject.Scope; import dagger.Module; import dagger.Provides; /** * Created by nazmuddinmavliwala on 29/10/2017. */ @ScopedActivity @Module public class RxModule { @ScopedActivity @Provides public ExecutionThread provideExecutionThread(BackgroundThread thread) { return thread; } @ScopedActivity @Provides public PostExecutionThread providePostExecutionThread(UIThread thread) { return thread; } }
[ "nazmuddinmavliwala@gmail.com" ]
nazmuddinmavliwala@gmail.com
7a61285de2b44cc85b49c690f12238d7ddd81ab2
0363d1c39d023014626b0f18e87fbd5920400039
/JavaOop1/src/com/banyuan/oop6/TestSon.java
62a573305e7207e51e30cb7ef938c29cc662426a
[]
no_license
chou120/DaHan
54390d1aca5453a7caa8fe9005d650c316ec48e5
32bb53edebee2678aa78de14195730ccb6f6c8db
refs/heads/master
2021-02-17T06:51:53.709555
2020-04-08T03:35:25
2020-04-08T03:35:25
245,078,340
0
0
null
2020-10-13T20:50:28
2020-03-05T05:37:40
Java
UTF-8
Java
false
false
286
java
package com.banyuan.oop6; /** * @author sanye * @version 1.0 * @date 2020/3/11 3:10 下午 */ public class TestSon { public static void main(String[] args) { Son son = new Son("王五"); //son.showInfo(); System.out.println(son.getName()); son.test(); } }
[ "1208160221@qq.com" ]
1208160221@qq.com
61c41484b9be6dfdaee9ed6674af330fdd114b03
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1022/src/main/java/module1022packageJava0/Foo252.java
ce996bd6e6c29ffcd473d51a94e34dbd5a3ce02e
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
296
java
package module1022packageJava0; import java.lang.Integer; public class Foo252 { Integer int0; public void foo0() { new module1022packageJava0.Foo251().foo3(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
a828730f69c0c251eedf5d657ea42c626a07826c
68374eb2631cb33ccd8d7924a16bfb79ad08040a
/core/src/main/java/com/gengoai/hermes/package-info.java
63a0d9e9e46db72fe1e6b5ab66973c15fe8fab34
[ "Apache-2.0" ]
permissive
gengoai/hermes
92f413788f2870b51369b440d8e479824bdd3ce0
78f48e9edee397907d7ac0bda32fb5ea24f6be4a
refs/heads/master
2021-06-02T06:27:26.783582
2020-07-31T16:47:23
2020-07-31T16:47:23
130,230,032
2
1
Apache-2.0
2020-05-03T15:02:55
2018-04-19T14:41:39
Java
UTF-8
Java
false
false
166
java
/** * <p> * Hermes is a framework for Natural Language Processing. * Its design is based on the Tipster architecture. * </p> * **/ package com.gengoai.hermes;
[ "david@davidbracewell.com" ]
david@davidbracewell.com
181c52aa176a18c6c737862111e28a5651f7cf60
a718f140128d73db3a925b4e5f9c3bfd4068ddc1
/src/main/java/com/marsh/itg/ppm/dashboard/repository/AuthorityRepository.java
1219c2bfa8da2fb89195fb7f76b7553208c126a1
[]
no_license
gvasilevskiy/UserProgramDataAggregate
e363356e6f8c01f25e91ee850f44a7e8739f4cf6
0692d19b7247659809f7ad8c1f662acfd5c8b70b
refs/heads/master
2022-12-22T11:27:08.770968
2020-09-17T16:09:31
2020-09-17T16:09:31
296,377,717
0
0
null
null
null
null
UTF-8
Java
false
false
330
java
package com.marsh.itg.ppm.dashboard.repository; import com.marsh.itg.ppm.dashboard.domain.Authority; import org.springframework.data.mongodb.repository.MongoRepository; /** * Spring Data MongoDB repository for the {@link Authority} entity. */ public interface AuthorityRepository extends MongoRepository<Authority, String> {}
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
8c94e7a046e360048f443c9efb32dd37ef70eecf
3bfb7d79c7bfc30e0c40d38e554e6badfa07e4e5
/his-core/src/main/java/com/ahsj/hiscore/common/utils/ZipUtils.java
867191adb7d8c109b6f310f96dc1fd64680a5264
[]
no_license
AnHuiShangJue/hisprojecte
e4000f103977e99dcbb9d10bd8cad6da4d44eb26
f7b9c769d33cf2d9491cc557dc0f6f70ad4f2310
refs/heads/master
2023-01-24T04:34:02.051134
2020-06-03T10:41:52
2020-06-03T10:41:52
210,382,667
1
1
null
2023-01-04T22:36:32
2019-09-23T14:56:20
HTML
UTF-8
Java
false
false
6,705
java
/****************************************************************************** * * 版权所有:安徽匠桥电子信息有限公司 * ****************************************************************************** * 注意:本内容仅限于安徽匠桥电子信息有限公司内部使用,禁止转发 *****************************************************************************/ package com.ahsj.hiscore.common.utils; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; /** * <ul> * <li>Title: 匠桥专利代理系统-ZipUtils.java</li> * <li>Description: Patent Agent System</li> * <li>Copyright: Copyright (c) 2018</li> * <li>Company: http://www.ahjiangqiao.com/</li> * </ul> */ public class ZipUtils { private static final int BUFFER_SIZE = 2 * 1024; private static final long kb = 1024; private static final long mb = kb * 1024; private static final long gb = mb * 1024; /** * 压缩成ZIP 方法1 * * @param srcDir 压缩文件夹路径 * @param out 压缩文件输出流 * @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构; * false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败) * @throws RuntimeException 压缩失败会抛出运行时异常 */ public static void toZip(String srcDir, OutputStream out, boolean KeepDirStructure) throws RuntimeException { long start = System.currentTimeMillis(); ZipOutputStream zos = null; try { zos = new ZipOutputStream(out); File sourceFile = new File(srcDir); compress(sourceFile, zos, sourceFile.getName(), KeepDirStructure); long end = System.currentTimeMillis(); System.out.println("压缩完成,耗时:" + (end - start) + " ms"); } catch (Exception e) { throw new RuntimeException("zip error from ZipUtils", e); } finally { if (zos != null) { try { zos.close(); } catch (IOException e) { e.printStackTrace(); } } } } /** * 压缩成ZIP 方法2 * * @param srcFiles 需要压缩的文件列表 * @param out 压缩文件输出流 * @throws RuntimeException 压缩失败会抛出运行时异常 */ public static void toZip(List<File> srcFiles, OutputStream out) throws RuntimeException { long start = System.currentTimeMillis(); ZipOutputStream zos = null; try { zos = new ZipOutputStream(out); for (File srcFile : srcFiles) { byte[] buf = new byte[BUFFER_SIZE]; zos.putNextEntry(new ZipEntry(srcFile.getName())); int len; FileInputStream in = new FileInputStream(srcFile); while ((len = in.read(buf)) != -1) { zos.write(buf, 0, len); } zos.closeEntry(); in.close(); } long end = System.currentTimeMillis(); System.out.println("压缩完成,耗时:" + (end - start) + " ms"); } catch (Exception e) { throw new RuntimeException("zip error from ZipUtils", e); } finally { if (zos != null) { try { zos.close(); } catch (IOException e) { e.printStackTrace(); } } } } /** * 递归压缩方法 * * @param sourceFile 源文件 * @param zos zip输出流 * @param name 压缩后的名称 * @param KeepDirStructure 是否保留原来的目录结构,true:保留目录结构; * false:所有文件跑到压缩包根目录下(注意:不保留目录结构可能会出现同名文件,会压缩失败) * @throws Exception */ private static void compress(File sourceFile, ZipOutputStream zos, String name, boolean KeepDirStructure) throws Exception { byte[] buf = new byte[BUFFER_SIZE]; if (sourceFile.isFile()) { // 向zip输出流中添加一个zip实体,构造器中name为zip实体的文件的名字 zos.putNextEntry(new ZipEntry(name)); // copy文件到zip输出流中 int len; FileInputStream in = new FileInputStream(sourceFile); while ((len = in.read(buf)) != -1) { zos.write(buf, 0, len); } // Complete the entry zos.closeEntry(); in.close(); } else { File[] listFiles = sourceFile.listFiles(); if (listFiles == null || listFiles.length == 0) { // 需要保留原来的文件结构时,需要对空文件夹进行处理 if (KeepDirStructure) { // 空文件夹的处理 zos.putNextEntry(new ZipEntry(name + "/")); // 没有文件,不需要文件的copy zos.closeEntry(); } } else { for (File file : listFiles) { // 判断是否需要保留原来的文件结构 if (KeepDirStructure) { // 注意:file.getName()前面需要带上父文件夹的名字加一斜杠, // 不然最后压缩包中就不能保留原来的文件结构,即:所有文件都跑到压缩包根目录下了 compress(file, zos, name + "/" + file.getName(), KeepDirStructure); } else { compress(file, zos, file.getName(), KeepDirStructure); } } } } } public static String convertFileSize(long size) { if (size >= gb) { return String.format("%.1f GB", (float) size / gb); } else if (size >= mb) { float f = (float) size / mb; return String.format(f > 100 ? "%.0f MB" : "%.1f MB", f); } else if (size >= kb) { float f = (float) size / kb; return String.format(f > 100 ? "%.0f KB" : "%.1f KB", f); } else return String.format("%d B", size); } }
[ "18555338533@163.com" ]
18555338533@163.com
4edf4e8c687f2147d3773794637bd78e0aa6e3b9
4f1e14110fd89d882ead616b7ad0e62d09426bb1
/src/main/java/designpattern/factory/factory_method/StudentWork.java
fa51f18a2871b82847f6980972649e492e6fe736
[]
no_license
yankj12/yan-java-deep
d17a3592bfd3b08e05e440e656d43b9b35fcb1a9
9000a7387c487623742e80446a30bdf91801c6ff
refs/heads/master
2021-06-05T12:25:18.787044
2021-03-13T11:12:43
2021-03-13T11:12:43
23,537,905
0
0
null
null
null
null
UTF-8
Java
false
false
167
java
package designpattern.factory.factory_method; public class StudentWork implements Work{ public void doWork() { System.out.println("学生写作业"); } }
[ "yankj12@163.com" ]
yankj12@163.com
8394a4a66136011dedd2bd221f8e61f396ddbb2f
2c1d85d1bdf4dd6816567998bc037669f7c5d85c
/src/main/java/demoMod/monsters/VeteranShotgunKin.java
895696bd26798273368f847cbd5eee5423fa2e01
[]
no_license
tldyl/demoMod
ecf996f47adfda0ffd78581c2405b22b960ac1f5
66e55a9aad53e65af65875bdb3edf3f396e92c47
refs/heads/master
2022-06-03T08:51:43.592210
2022-05-15T14:09:25
2022-05-15T14:09:25
243,190,716
4
3
null
null
null
null
UTF-8
Java
false
false
3,747
java
package demoMod.monsters; import com.megacrit.cardcrawl.actions.AbstractGameAction; import com.megacrit.cardcrawl.actions.animations.AnimateFastAttackAction; import com.megacrit.cardcrawl.actions.common.ApplyPowerAction; import com.megacrit.cardcrawl.actions.common.DamageAction; import com.megacrit.cardcrawl.actions.common.MakeTempCardInDrawPileAction; import com.megacrit.cardcrawl.cards.DamageInfo; import com.megacrit.cardcrawl.core.CardCrawlGame; import com.megacrit.cardcrawl.dungeons.AbstractDungeon; import com.megacrit.cardcrawl.localization.MonsterStrings; import com.megacrit.cardcrawl.monsters.AbstractMonster; import demoMod.DemoMod; import demoMod.actions.PlaySoundAction; import demoMod.cards.tempCards.Flaw; import demoMod.powers.SelfExplodePower; import demoMod.sounds.DemoSoundMaster; import static demoMod.utils.Utils.calcMaxHpMultiplier; public class VeteranShotgunKin extends AbstractMonster { public static final String ID = DemoMod.makeID("VeteranShotgunKin"); private static final MonsterStrings monsterStrings; public static final String NAME; public static final String[] MOVES; public static final String[] DIALOG; private static final int HP_MAX = 15; private static final float HB_X = -8.0F; private static final float HB_Y = 10.0F; private static final float HB_W = 120.0F; private static final float HB_H = 150.0F; private static final int ATTACK_DMG = 4; private static final String IMG_PATH = DemoMod.getResourcePath("monsters/veteranShotgunKin.png"); private boolean firstMove = true; public VeteranShotgunKin(float x, float y) { super(NAME, ID, HP_MAX, HB_X, HB_Y, HB_W, HB_H, IMG_PATH, x, y); if (AbstractDungeon.ascensionLevel >= 7) { setHp(35 * (int)calcMaxHpMultiplier(), 41 * (int)calcMaxHpMultiplier()); } else { setHp(31 * (int)calcMaxHpMultiplier(), 37 * (int)calcMaxHpMultiplier()); } this.damage.add(new DamageInfo(this, ATTACK_DMG)); } @Override public void usePreBattleAction() { AbstractDungeon.actionManager.addToBottom(new ApplyPowerAction(this, this, new SelfExplodePower(this, 10))); } @Override public void takeTurn() { switch (this.nextMove) { case 1: AbstractDungeon.actionManager.addToBottom(new MakeTempCardInDrawPileAction(new Flaw(), 2, true, true)); setMove((byte)2, Intent.ATTACK, this.damage.get(0).base, 5, true); break; case 2: AbstractDungeon.actionManager.addToBottom(new AnimateFastAttackAction(this)); AbstractDungeon.actionManager.addToBottom(new PlaySoundAction("GUN_FIRE_SHOTGUN")); for (int i=0;i<5;i++) { AbstractDungeon.actionManager.addToBottom(new DamageAction(AbstractDungeon.player, this.damage.get(0), AbstractGameAction.AttackEffect.BLUNT_LIGHT)); } setMove(MOVES[1], (byte)3, Intent.UNKNOWN); break; case 3: DemoSoundMaster.playV("GUN_RELOAD_SHOTGUN", 0.1F); setMove(MOVES[0], (byte)1, Intent.STRONG_DEBUFF); break; } } @Override protected void getMove(int aiRng) { if (firstMove) { setMove(MOVES[0], (byte)1, Intent.STRONG_DEBUFF); firstMove = false; } } public void die() { super.die(); DemoSoundMaster.playV("MONSTER_SHOTGUN_KIN_DEATH", 0.1F); } static { monsterStrings = CardCrawlGame.languagePack.getMonsterStrings(ID); NAME = monsterStrings.NAME; MOVES = monsterStrings.MOVES; DIALOG = monsterStrings.DIALOG; } }
[ "756560020@qq.com" ]
756560020@qq.com
14421d9e7b367dd194dfca586d074fb747b71491
1da067ccaafec394515367ed7c597019413f1406
/redisson/src/main/java/org/redisson/spring/transaction/RedissonTransactionManager.java
37d95ab50b823205f7139489baf6d3e3d7f42b72
[ "Apache-2.0" ]
permissive
lpf-l/redisson
97df6630568866751c61fdd6856621ba89f89099
eb4200dfea42e64bf1afeb9c1b786bf118f1957b
refs/heads/master
2020-04-16T06:28:10.555926
2019-01-11T14:09:41
2019-01-11T14:09:41
165,348,214
1
0
Apache-2.0
2019-01-12T04:56:37
2019-01-12T04:56:37
null
UTF-8
Java
false
false
5,231
java
/** * Copyright 2018 Nikita Koksharov * * 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.redisson.spring.transaction; import java.util.concurrent.TimeUnit; import org.redisson.api.RTransaction; import org.redisson.api.RedissonClient; import org.redisson.api.TransactionOptions; import org.springframework.transaction.NoTransactionException; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionException; import org.springframework.transaction.TransactionSystemException; import org.springframework.transaction.support.AbstractPlatformTransactionManager; import org.springframework.transaction.support.DefaultTransactionStatus; import org.springframework.transaction.support.ResourceTransactionManager; import org.springframework.transaction.support.TransactionSynchronizationManager; /** * * @author Nikita Koksharov * */ public class RedissonTransactionManager extends AbstractPlatformTransactionManager implements ResourceTransactionManager { private static final long serialVersionUID = -6151310954082124041L; private RedissonClient redisson; public RedissonTransactionManager(RedissonClient redisson) { this.redisson = redisson; } public RTransaction getCurrentTransaction() { RedissonTransactionHolder to = (RedissonTransactionHolder) TransactionSynchronizationManager.getResource(redisson); if (to == null) { throw new NoTransactionException("No transaction is available for the current thread"); } return to.getTransaction(); } @Override protected Object doGetTransaction() throws TransactionException { RedissonTransactionObject transactionObject = new RedissonTransactionObject(); RedissonTransactionHolder holder = (RedissonTransactionHolder) TransactionSynchronizationManager.getResource(redisson); if (holder != null) { transactionObject.setTransactionHolder(holder); } return transactionObject; } @Override protected boolean isExistingTransaction(Object transaction) throws TransactionException { RedissonTransactionObject transactionObject = (RedissonTransactionObject) transaction; return transactionObject.getTransactionHolder() != null; } @Override protected void doBegin(Object transaction, TransactionDefinition definition) throws TransactionException { RedissonTransactionObject tObject = (RedissonTransactionObject) transaction; if (tObject.getTransactionHolder() == null) { int timeout = determineTimeout(definition); TransactionOptions options = TransactionOptions.defaults(); if (timeout != TransactionDefinition.TIMEOUT_DEFAULT) { options.timeout(timeout, TimeUnit.SECONDS); } RTransaction trans = redisson.createTransaction(options); RedissonTransactionHolder holder = new RedissonTransactionHolder(); holder.setTransaction(trans); tObject.setTransactionHolder(holder); TransactionSynchronizationManager.bindResource(redisson, holder); } } @Override protected void doCommit(DefaultTransactionStatus status) throws TransactionException { RedissonTransactionObject to = (RedissonTransactionObject) status.getTransaction(); try { to.getTransactionHolder().getTransaction().commit(); } catch (TransactionException e) { throw new TransactionSystemException("Unable to commit transaction", e); } } @Override protected void doRollback(DefaultTransactionStatus status) throws TransactionException { RedissonTransactionObject to = (RedissonTransactionObject) status.getTransaction(); try { to.getTransactionHolder().getTransaction().rollback(); } catch (TransactionException e) { throw new TransactionSystemException("Unable to commit transaction", e); } } @Override protected void doSetRollbackOnly(DefaultTransactionStatus status) throws TransactionException { RedissonTransactionObject to = (RedissonTransactionObject) status.getTransaction(); to.setRollbackOnly(true); } @Override protected void doCleanupAfterCompletion(Object transaction) { TransactionSynchronizationManager.unbindResourceIfPossible(redisson); RedissonTransactionObject to = (RedissonTransactionObject) transaction; to.getTransactionHolder().setTransaction(null); } @Override public Object getResourceFactory() { return redisson; } }
[ "abracham.mitchell@gmail.com" ]
abracham.mitchell@gmail.com
3c58d375712571c50d39416af44537075e5404ce
e1af7696101f8f9eb12c0791c211e27b4310ecbc
/MCP/temp/src/minecraft/net/minecraft/entity/ai/EntityAIRestrictOpenDoor.java
cf6302e0e971159f1e2d5769abfc8a961784879d
[]
no_license
VinmaniaTV/Mania-Client
e36810590edf09b1d78b8eeaf5cbc46bb3e2d8ce
7a12b8bad1a8199151b3f913581775f50cc4c39c
refs/heads/main
2023-02-12T10:31:29.076263
2021-01-13T02:29:35
2021-01-13T02:29:35
329,156,099
0
0
null
null
null
null
UTF-8
Java
false
false
2,213
java
package net.minecraft.entity.ai; import net.minecraft.entity.EntityCreature; import net.minecraft.pathfinding.PathNavigateGround; import net.minecraft.util.math.BlockPos; import net.minecraft.village.Village; import net.minecraft.village.VillageDoorInfo; public class EntityAIRestrictOpenDoor extends EntityAIBase { private final EntityCreature field_75275_a; private VillageDoorInfo field_75274_b; public EntityAIRestrictOpenDoor(EntityCreature p_i1651_1_) { this.field_75275_a = p_i1651_1_; if (!(p_i1651_1_.func_70661_as() instanceof PathNavigateGround)) { throw new IllegalArgumentException("Unsupported mob type for RestrictOpenDoorGoal"); } } public boolean func_75250_a() { if (this.field_75275_a.field_70170_p.func_72935_r()) { return false; } else { BlockPos blockpos = new BlockPos(this.field_75275_a); Village village = this.field_75275_a.field_70170_p.func_175714_ae().func_176056_a(blockpos, 16); if (village == null) { return false; } else { this.field_75274_b = village.func_179865_b(blockpos); if (this.field_75274_b == null) { return false; } else { return (double)this.field_75274_b.func_179846_b(blockpos) < 2.25D; } } } } public boolean func_75253_b() { if (this.field_75275_a.field_70170_p.func_72935_r()) { return false; } else { return !this.field_75274_b.func_179851_i() && this.field_75274_b.func_179850_c(new BlockPos(this.field_75275_a)); } } public void func_75249_e() { ((PathNavigateGround)this.field_75275_a.func_70661_as()).func_179688_b(false); ((PathNavigateGround)this.field_75275_a.func_70661_as()).func_179691_c(false); } public void func_75251_c() { ((PathNavigateGround)this.field_75275_a.func_70661_as()).func_179688_b(true); ((PathNavigateGround)this.field_75275_a.func_70661_as()).func_179691_c(true); this.field_75274_b = null; } public void func_75246_d() { this.field_75274_b.func_75470_e(); } }
[ "vinmaniamc@gmail.com" ]
vinmaniamc@gmail.com
b904a1674f8cc6a7c78df155e52e5553347f6313
55889712a9adf03489f4b6402a48c1a854d70321
/ignite_easyticket_agent_v1.0/src/com/ignite/mm/ticketing/application/SecureKey.java
ff4fcb6884eadd57c2f1a91851bc85018dc8b823
[]
no_license
ignitemyanmar/POSAndroid
7b346b5a62a00d0db576cc739776ea80dd876a8f
9614177e73fe019d42afc283ed23877fccf8ab75
refs/heads/master
2021-05-01T09:30:56.967489
2015-06-08T04:30:23
2015-06-08T04:30:23
27,748,660
1
0
null
null
null
null
UTF-8
Java
false
false
717
java
package com.ignite.mm.ticketing.application; public class SecureKey { static { System.loadLibrary("securekey"); // hello.dll (Windows) or libhello.so (Unixes) } // Declare native method public static native String getGrant(); // Declare native method public static native String getId(); // Declare native method public static native String getKey(); // Declare native method public static native String getScope(); // Declare native method public static native String getState(); // Declare native method public static native String getPEMKey(); // Declare native method public static native String getIV(); // Declare native method public static native String getAESKey(); }
[ "suwaiphyo1985@gmail.com" ]
suwaiphyo1985@gmail.com
52cb7b33d517817800b000cfe3be69942cf37695
8aea95c114e07d043d217f51a30807b4642d49a7
/samples/crossModelGeneration/languages/jetbrains.mps.samples.Entities/source_gen/jetbrains/mps/samples/Entities/typesystem/TypesystemDescriptor.java
ea0eaa0845ef5d8572ef0d3652b47fce4a341e4d
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
JetBrains/MPS
ec03a005e0eda3055c4e4856a28234b563af92c6
0d2aeaf642e57a86b23268fc87740214daa28a67
refs/heads/master
2023-09-03T15:14:10.508189
2023-09-01T13:25:35
2023-09-01T13:30:22
2,209,077
1,242
309
Apache-2.0
2023-07-25T18:10:10
2011-08-15T09:48:06
JetBrains MPS
UTF-8
Java
false
false
250
java
package jetbrains.mps.samples.Entities.typesystem; /*Generated by MPS */ import jetbrains.mps.lang.typesystem.runtime.BaseHelginsDescriptor; public class TypesystemDescriptor extends BaseHelginsDescriptor { public TypesystemDescriptor() { } }
[ "vaclav.pech@gmail.com" ]
vaclav.pech@gmail.com
9103fd907e874e4e965209519a313ccf25ccd2a3
7ef841751c77207651aebf81273fcc972396c836
/astream/src/main/java/com/loki/astream/stubs/SampleClass1714.java
293981e741b73471dd9551bf9e15c8ee2a75bf20
[]
no_license
SergiiGrechukha/ModuleApp
e28e4dd39505924f0d36b4a0c3acd76a67ed4118
00e22d51c8f7100e171217bcc61f440f94ab9c52
refs/heads/master
2022-05-07T13:27:37.704233
2019-11-22T07:11:19
2019-11-22T07:11:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package com.loki.astream.stubs;import com.jenzz.pojobuilder.api.Builder;import com.jenzz.pojobuilder.api.Ignore; @Builder public class SampleClass1714 { @Ignore private SampleClass1715 sampleClass; public SampleClass1714(){ sampleClass = new SampleClass1715(); } public String getClassName() { return sampleClass.getClassName(); } }
[ "sergey.grechukha@gmail.com" ]
sergey.grechukha@gmail.com
e9187640f721a9dfe9f478dd99490bac54036f36
0e0dae718251c31cbe9181ccabf01d2b791bc2c2
/SCT2/tags/PRE_LAZY_LINKING/test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/SyncJoinTest.java
daa22e4dff7fd6e22c3efdd50cf412cbe8032bba
[]
no_license
huybuidac20593/yakindu
377fb9100d7db6f4bb33a3caa78776c4a4b03773
304fb02b9c166f340f521f5e4c41d970268f28e9
refs/heads/master
2021-05-29T14:46:43.225721
2015-05-28T11:54:07
2015-05-28T11:54:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,969
java
/** * Copyright (c) 2012 committers of YAKINDU and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * committers of YAKINDU - initial API and implementation */ package org.yakindu.sct.generator.java.test; import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; import org.yakindu.scr.syncjoin.SyncJoinStatemachine; import org.yakindu.scr.syncjoin.SyncJoinStatemachine.State; /** * Unit TestCase for SyncJoin */ @SuppressWarnings("all") public class SyncJoinTest { private SyncJoinStatemachine statemachine; @Before public void setUp() { statemachine = new SyncJoinStatemachine(); statemachine.init(); statemachine.enter(); } @After public void tearDown() { statemachine = null; } @Test public void testsyncJoin_C2_Waits() { assertTrue(statemachine.isStateActive(State.Main_region_B)); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1)); statemachine.raiseE(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1)); statemachine.raiseJc(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1)); statemachine.raiseJd(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1)); statemachine.raiseJc(); statemachine.raiseJd(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1)); statemachine.raiseF(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2)); statemachine.raiseJc(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2)); statemachine.raiseJd(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2)); statemachine.raiseJc(); statemachine.raiseJd(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_A)); } @Test public void testsyncJoin_D2_Waits() { assertTrue(statemachine.isStateActive(State.Main_region_B)); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D1)); statemachine.raiseF(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2)); statemachine.raiseJc(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2)); statemachine.raiseJd(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2)); statemachine.raiseJc(); statemachine.raiseJd(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C1)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2)); statemachine.raiseE(); statemachine.runCycle(); assertTrue(statemachine.isStateActive(State.Main_region_B_r1_C2)); assertTrue(statemachine.isStateActive(State.Main_region_B_r2_D2)); } }
[ "a.muelder@googlemail.com" ]
a.muelder@googlemail.com
a8874c2a29020de1a2ee971c9434a553629cd8ab
d0d980c94b812928b193a7c4575cc6778744f991
/trunk/src/main/java/com/chusu/apps/model/sys/SysAdmin.java
5cf36a8294e18804577fcc4aa738870f17e774d3
[]
no_license
socket123/81Hospital
1a2b4f126762a4525c340f7e89b14535f171cc42
814e1711367bc77cfc2cfbe9bb30eec2f3f95472
refs/heads/master
2020-12-02T06:28:46.321308
2017-07-11T02:30:06
2017-07-11T02:30:06
96,841,618
0
0
null
null
null
null
UTF-8
Java
false
false
3,064
java
package com.chusu.apps.model.sys; import java.util.Date; import java.util.List; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Transient; @Table(name = "sys_admin") public class SysAdmin { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @Column(name = "user_name") private String username; private String account; private String telephone; @Column(name="role_id") private Integer roleId; /** * 密码 */ private String password; private Integer status; @Column(name="create_time") private Date createTime; @Transient private String roleName; /** * 关联关系Id */ @Transient private String relationId; @Transient private List<String> relationIds; /** * @return id */ public Integer getId() { return id; } /** * @param id */ public void setId(Integer id) { this.id = id; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } /** * @return userName */ public String getUsername() { return username; } /** * @param username */ public void setUsername(String username) { this.username = username; } /** * @return account */ public String getAccount() { return account; } /** * @param account */ public void setAccount(String account) { this.account = account; } /** * @return telephone */ public String getTelephone() { return telephone; } /** * @param telephone */ public void setTelephone(String telephone) { this.telephone = telephone; } public Integer getRoleId() { return roleId; } public void setRoleId(Integer roleId) { this.roleId = roleId; } /** * 获取密码 * * @return password - 密码 */ public String getPassword() { return password; } /** * 设置密码 * * @param password 密码 */ public void setPassword(String password) { this.password = password; } /** * @return status */ public Integer getStatus() { return status; } /** * @param status */ public void setStatus(Integer status) { this.status = status; } public String getRoleName() { return roleName; } public void setRoleName(String roleName) { this.roleName = roleName; } public String getRelationId() { return relationId; } public void setRelationId(String relationId) { this.relationId = relationId; } public List<String> getRelationIds() { return relationIds; } public void setRelationIds(List<String> relationIds) { this.relationIds = relationIds; } }
[ "jslygchenyu@126.com" ]
jslygchenyu@126.com
8d5266c4740c103df0ca6a9fcd857ff1ac3e67a6
0239c48321d531367196c57ccae20c4d481fc7c5
/src/tv/luxs/rcassistant/HistoryOrderActivity.java
28fc841a301b4c6c179d25119891433c6f04889a
[]
no_license
bingdon/----------
e26ccf861b09d5ef18d86ebd7e921a803039ddc5
0944fd28ba826442f58d22248a86ae6e7246814f
refs/heads/master
2021-01-25T05:58:03.943331
2014-06-21T15:31:08
2014-06-21T15:31:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,562
java
package tv.luxs.rcassistant; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import tv.luxs.adapter.YouhuiAdapter; import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.view.LayoutInflater; import android.view.View; import android.view.Window; import android.widget.ListView; import android.widget.TextView; /** * 历史账单 * * @author lyl * */ public class HistoryOrderActivity extends Activity { // 标题 private TextView titleTextView; // 历史账单容器 private YouhuiAdapter historyOdAdapter; // 预定数据 private List<Map<String, Object>> historyOdlist = new ArrayList<Map<String, Object>>(); // 预定listview显示 private ListView historyOdlistView; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_le_center_temp); initView(); } private void initView() { titleTextView = (TextView) findViewById(R.id.ac_title_txt); titleTextView.setText("历史账单"); historyOdlistView = (ListView) findViewById(R.id.my_list_v); historyOdAdapter = new YouhuiAdapter(this, historyOdlist); historyOdlistView.setAdapter(historyOdAdapter); LayoutInflater inflater = getLayoutInflater(); // loadingView = inflater.inflate(R.layout.list_loading, null); // historyOdlistView.addHeaderView(loadingView); new Thread(loadDataRunnable).start(); } private Runnable loadDataRunnable = new Runnable() { @Override public void run() { // TODO Auto-generated method stub for (int i = 0; i < 10; i++) { Map<String, Object> map = new HashMap<String, Object>(); map.put("uptxt", "酒店" + i); map.put("downtxt", "2014-01-01"); map.put("rmb", "" + i + "000RMB"); historyOdlist.add(map); } Message message = new Message(); message.what = 0; loadDataHandler.sendMessage(message); } }; private Handler loadDataHandler = new Handler() { public void handleMessage(Message msg) { int what = msg.what; switch (what) { case 0: // historyOdlistView.removeHeaderView(loadingView); historyOdAdapter.notifyDataSetChanged(); break; default: break; } }; }; /** * 按钮点击事件 * * @param view */ public void doClick(View view) { switch (view.getId()) { case R.id.order_back_img_btn: finish(); break; default: break; } } }
[ "1525218075@qq.com" ]
1525218075@qq.com
2ba20c2513ba35500f952d5cf0edc116ec436c69
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
/Wallet/Wallet.ServiceInterface/src/main/java/com/servicelive/wallet/serviceinterface/IWalletBO.java
d7888de91c669f9e77945c9b80822c9ec1d29fdc
[]
no_license
ssriha0/sl-b2b-platform
71ab8ef1f0ccb0a7ad58b18f28a2bf6d5737fcb6
5b4fcafa9edfe4d35c2dcf1659ac30ef58d607a2
refs/heads/master
2023-01-06T18:32:24.623256
2020-11-05T12:23:26
2020-11-05T12:23:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,989
java
package com.servicelive.wallet.serviceinterface; import java.util.Date; import java.util.List; import java.util.Map; import com.newco.marketplace.exception.core.BusinessServiceException; import com.servicelive.common.exception.SLBusinessServiceException; import com.servicelive.wallet.serviceinterface.vo.LedgerEntryType; import com.servicelive.wallet.serviceinterface.vo.ReceiptVO; import com.servicelive.wallet.serviceinterface.vo.ValueLinkEntryVO; import com.servicelive.wallet.serviceinterface.vo.WalletResponseVO; import com.servicelive.wallet.serviceinterface.vo.WalletVO; public interface IWalletBO { public double getCurrentSpendingLimit(String serviceOrderId) throws SLBusinessServiceException; public boolean checkValueLinkReconciledIndicator(String soId) throws SLBusinessServiceException; public boolean isACHTransPending(String serviceOrderId) throws SLBusinessServiceException; public boolean hasPreviousAddOn(String serviceOrderId)throws SLBusinessServiceException; public double getBuyerTotalDeposit(Long buyerId) throws SLBusinessServiceException; public boolean isBuyerAutoFunded(Long buyerId) throws SLBusinessServiceException; public WalletResponseVO adminCreditToBuyer(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO adminCreditToProvider(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO adminDebitFromBuyer(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO withdrawBuyerdebitReversal(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO adminEscheatmentFromBuyer(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO adminDebitFromProvider(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO adminEscheatmentFromProvider(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO cancelServiceOrder(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO cancelServiceOrderWithoutPenalty(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO closeServiceOrder(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO decreaseProjectSpendLimit(WalletVO request) throws SLBusinessServiceException; public void depositBuyerFundsAtValueLink(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO depositBuyerFundsWithCash(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO depositBuyerFundsWithCreditCard(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO depositBuyerFundsWithInstantACH(WalletVO request) throws SLBusinessServiceException; public void depositSLOperationFundsAtValueLink(WalletVO request) throws SLBusinessServiceException; public double getBuyerAvailableBalance(long entityId) throws SLBusinessServiceException; //SL-21117: Revenue Pull Code change Starts public List <String> getPermittedUsers() throws BusinessServiceException; public double getAvailableBalanceForRevenuePull() throws SLBusinessServiceException; public boolean getAvailableDateCheckForRevenuePull(Date calendarOnDate) throws SLBusinessServiceException; public void insertEntryForRevenuePull(double amount,Date revenuePullDate,String note,String user) throws SLBusinessServiceException; public List <String> getPermittedUsersEmail() throws BusinessServiceException; //Code change ends public double getBuyerCurrentBalance(long entityId) throws SLBusinessServiceException; public double getProviderBalance(long entityId) throws SLBusinessServiceException; public double getSLOperationBalance() throws SLBusinessServiceException; public WalletResponseVO increaseProjectSpendLimit(WalletVO request) throws SLBusinessServiceException; /** * Decription: increaseProjectSpendCompletion, should only fire rules at completion. * * @param request * * @return WalletResponseVO * * @throws SLBusinessServiceException */ public WalletResponseVO increaseProjectSpendCompletion(WalletVO request) throws SLBusinessServiceException; /** * postServiceOrder. * * @param request * * @return WalletResponseVO * * @throws SLBusinessServiceException */ public WalletResponseVO postServiceOrder(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO voidServiceOrder(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO withdrawBuyerCashFunds(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO withdrawBuyerCreditCardFunds(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO withdrawProviderFunds(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO withdrawProviderFundsReversal(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO depositOperationFunds(WalletVO request) throws SLBusinessServiceException; public WalletResponseVO withdrawOperationFunds(WalletVO request) throws SLBusinessServiceException; public List<ValueLinkEntryVO> getValueLinkEntries(String[] valueLinkEntryId, Boolean groupId) throws SLBusinessServiceException; public List<ValueLinkEntryVO> processGroupResend(String[] fulfillmentGroupIds, String comments, String userName) throws SLBusinessServiceException; public Map<String, Long> reverseValueLinkTransaction(String[] valueLinkIds, String comments, String userName) throws SLBusinessServiceException; public Map<String, Long> createValueLinkWithNewAmount(String fulfillmentEntryId, Double newAmount, String comments, String userName) throws SLBusinessServiceException; public WalletResponseVO getWalletMessageResult(String messageId) throws SLBusinessServiceException; public WalletResponseVO activateBuyer(WalletVO request) throws SLBusinessServiceException; public ReceiptVO getTransactionReceipt(Long entityId, Integer entityTypeId, LedgerEntryType entryType, String serviceOrderId) throws SLBusinessServiceException; public WalletResponseVO authCCForDollarNoCVV(WalletVO request) throws SLBusinessServiceException; public String getLedgerEntryNonce(long busTransId) throws SLBusinessServiceException; public WalletResponseVO getCreditCardInformation(Long accountId) throws SLBusinessServiceException; public Double getTransactionAmount(Long transactionId) throws SLBusinessServiceException; public double getCompletedSOLedgerAmount(long vendorId) throws SLBusinessServiceException; public long getAccountId(long buyerId) throws SLBusinessServiceException; /** * @param hsWebserviceAppKey * @return * @throws SLBusinessServiceException */ public String getApplicationFlagForHSWebService(String hsWebserviceAppKey) throws SLBusinessServiceException; }
[ "Kunal.Pise@transformco.com" ]
Kunal.Pise@transformco.com
d5498ce3c9768a02b604ded91156bc72373a8186
7d21bd4a9f44ef920e2e85745612d4d49d5cdb80
/service_modules/gateway-server/src/main/java/com/gateway/server/constant/LoginUserConstant.java
31a0d41b66518f9d62591d04e7b9289adb862931
[]
no_license
yuanyixiong/app
0935842710d1cb2909dfa93c881456c9552c9d34
403fd3d812474a75a9efd1330042342efbefd963
refs/heads/master
2022-10-30T08:07:28.916976
2020-01-17T09:11:14
2020-01-17T09:11:14
201,192,501
0
0
null
2019-10-30T15:44:59
2019-08-08T06:26:48
Java
UTF-8
Java
false
false
519
java
package com.gateway.server.constant; /** * @author 袁毅雄 * @description * @date 2019/6/11 */ public class LoginUserConstant { /** * 用户登陆返回response 中Header的key */ public static final String APP_USER_INFO_KEY = "app-user-info-key"; /** * 用户登陆返回response 中Header的key */ public static final String SHARE_APP_USER_INFO_KEY = "896778954"; /** * 资源分享 */ public final static String RESOURCE_SHARE = "RESOURCE_SHARE"; }
[ "15926499574@163.com" ]
15926499574@163.com
cf88f4c8d1d79c4bf7a973c2f8a50b8f3a30f39a
2f45b99b684f62b2e9413a302a22a7677c22580c
/cts/tests/tests/webkitsecurity/src/android/webkitsecurity/cts/WebkitExceptionNoFrameTimeoutCrashTest.java
b93411a67c749162c5c51c605b6edf9c198fd6c2
[]
no_license
b2gdev/Android-JB-4.1.2
05e15a4668781cd9c9f63a1fa96bf08d9bdf91de
e66aea986bbf29ff70e5ec4440504ca24f8104e1
refs/heads/user
2020-04-06T05:44:17.217452
2018-04-13T15:43:57
2018-04-13T15:43:57
35,256,753
3
12
null
2020-03-09T00:08:24
2015-05-08T03:32:21
null
UTF-8
Java
false
false
3,928
java
/* * Copyright (C) 2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.webkitsecurity.cts; import java.util.Date; import android.net.Uri; import android.util.Log; import junit.framework.Assert; import java.io.File; import java.io.FileInputStream; import android.webkit.WebView; import android.webkit.WebSettings; import android.webkit.MimeTypeMap; import android.cts.util.PollingCheck; import android.content.Context; import android.content.res.AssetManager; import android.test.UiThreadTest; import android.test.ActivityInstrumentationTestCase2; import android.webkitsecurity.cts.WebViewStubActivity; /* * This file acts as a template for the generation of other webkit tests. * * The contents of the assets/webkitsecuritytests directory will be scanned * for html files, and for each one found a new class will be generated based * on this template. * * The specific things that have to be done to this template are: * * 1. Change the name to Webkit + javify(testname) + Test * 2. Change the private TEST_PATH value to the test's name * 3. Change the logtag to shellify(testname) * 4. Change the constructor name to <classname> * 5. Save this as <classname>.java * 6. TODO: Remove this comment * */ public class WebkitExceptionNoFrameTimeoutCrashTest extends ActivityInstrumentationTestCase2<WebViewStubActivity> { private static final String LOGTAG = "WebkitExceptionNoFrameTimeoutCrashTest"; private static final String TEST_PATH = "exception-no-frame-timeout-crash.html"; private static final int INITIAL_PROGRESS = 100; private static long TEST_TIMEOUT = 20000L; private static long TIME_FOR_LAYOUT = 1000L; private WebView mWebView; private boolean mIsUiThreadDone; public WebkitExceptionNoFrameTimeoutCrashTest() { super("android.webkitsecurity.cts", WebViewStubActivity.class); } @Override protected void setUp() throws Exception { super.setUp(); mWebView = getActivity().getWebView(); } @Override protected void tearDown() throws Exception { super.tearDown(); } @UiThreadTest public void testWebkitCrashes() throws Exception { // set up the webview mWebView = new WebView(getActivity()); getActivity().setContentView(mWebView); // We need to be able to run JS for most of these tests WebSettings settings = mWebView.getSettings(); settings.setJavaScriptEnabled(true); settings.setJavaScriptCanOpenWindowsAutomatically(true); // Get the url for the test Log.d(LOGTAG, TEST_PATH); String url = "file:///android_asset/" + TEST_PATH; Log.d(LOGTAG, url.toString()); // Run the test assertLoadUrlSuccessfully(url); } private void assertLoadUrlSuccessfully(String url) { mWebView.loadUrl(url); waitForLoadComplete(); } private void waitForLoadComplete() { new PollingCheck(TEST_TIMEOUT) { @Override protected boolean check() { return mWebView.getProgress() == 100; } }.run(); try { Thread.sleep(TIME_FOR_LAYOUT); } catch (InterruptedException e) { Log.w(LOGTAG, "waitForLoadComplete() interrupted while sleeping for layout delay."); } } }
[ "ruvindad@zone24x7.com" ]
ruvindad@zone24x7.com
2f0f159f44010a08187141988887b5fecb939294
4a615ddb2057065086c85f477648ae76b5229a21
/chipro-community/chipro-community-api/src/main/java/cn/spark/chipro/community/api/model/params/ProductionParam.java
b8121967f159eee81e1218e4051733a6d8a00879
[]
no_license
llgeill/chipro
7fdbfd8bfab36b1d6672b5475f5b5c81ddafea08
3510e926df6cb545bdba46a0313e056930c0866c
refs/heads/master
2022-12-24T08:45:50.528535
2020-05-21T07:44:38
2020-05-21T07:44:38
221,733,312
1
3
null
2022-12-16T04:37:35
2019-11-14T15:49:37
Java
UTF-8
Java
false
false
1,830
java
package cn.spark.chipro.community.api.model.params; import cn.spark.chipro.community.api.model.validated.InsertValidated; import lombok.Data; import javax.validation.constraints.NotEmpty; import java.io.Serializable; import java.util.BitSet; import java.util.Date; /** * <p> * 作品 * </p> * * @author 李利光 * @since 2020-02-05 */ @Data public class ProductionParam implements Serializable{ private static final long serialVersionUID = 1L; /** * 作品编码 */ private String productionId; /** * 用户编码 */ @NotEmpty(message = "用户编码不能为空",groups = InsertValidated.class) private String userId; /** * 作品名称 */ private String name; /** * 介绍 */ private String introduce; /** * 说明 */ private String instruction; /** * 标签 */ private String label; /** * 手机键盘 */ private String mobileKeyboard; /** * 资源编码 */ @NotEmpty(message = "资源编码不能为空",groups = InsertValidated.class) private String resourceId; /** * 创建人 */ private String createUser; /** * 创建时间 */ private Date createTime; /** * 修改人 */ private String updateUser; /** * 修改时间 */ private Date updateTime; /** * 备注 */ private String remarks; /** * 发布状态 0:未发布 1:已发布 */ @NotEmpty(message = "发布状态不能为空",groups = InsertValidated.class) private String status; /** * 图片地址 */ private String image; /** * 点赞数量 */ private String glike; /** * 点击 */ private String click; }
[ "903857227@qq.com" ]
903857227@qq.com
e505efa04a844baaa35b720051460e6f3e01e7b8
42645a2bbc6ff796a434e804a42be2133fbaea3e
/karate-junit4/src/main/java/com/intuit/karate/junit4/KarateFeatureRunner.java
948152404f44f50681e31771d1b15df70886ff0b
[ "MIT" ]
permissive
Openet-Labs/karate
aceebc69413291c61e30b1cc5e6f3e25e67a2e98
c0b24071fadfe6396b7f9abb83a506ac277fd3bb
refs/heads/master
2020-03-25T02:30:34.702467
2018-11-22T15:32:31
2018-11-22T15:32:31
143,292,984
0
1
MIT
2019-03-19T11:55:04
2018-08-02T12:39:57
Java
UTF-8
Java
false
false
1,590
java
/* * The MIT License * * Copyright 2018 Intuit Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.intuit.karate.junit4; import com.intuit.karate.cucumber.KarateFeature; import com.intuit.karate.cucumber.KarateRuntime; /** * * @author pthomas3 */ public class KarateFeatureRunner { protected final KarateFeature feature; protected final KarateRuntime runtime; public KarateFeatureRunner(KarateFeature feature, KarateRuntime runtime) { this.feature = feature; this.runtime = runtime; } }
[ "peter_thomas@intuit.com" ]
peter_thomas@intuit.com
38c3b74dd0eb49c4106fccdb2fec701b10cc40a3
90eb7a131e5b3dc79e2d1e1baeed171684ef6a22
/sources/com/airbnb/lottie/model/content/ShapeTrimPath.java
f6b2c5c02594189c4929504a1cf1badb6aa6fa88
[]
no_license
shalviraj/greenlens
1c6608dca75ec204e85fba3171995628d2ee8961
fe9f9b5a3ef4a18f91e12d3925e09745c51bf081
refs/heads/main
2023-04-20T13:50:14.619773
2021-04-26T15:45:11
2021-04-26T15:45:11
361,799,768
0
0
null
null
null
null
UTF-8
Java
false
false
2,289
java
package com.airbnb.lottie.model.content; import com.airbnb.lottie.LottieDrawable; import com.airbnb.lottie.animation.content.Content; import com.airbnb.lottie.animation.content.TrimPathContent; import com.airbnb.lottie.model.animatable.AnimatableFloatValue; import com.airbnb.lottie.model.layer.BaseLayer; import p005b.p035e.p036a.p037a.C0843a; public class ShapeTrimPath implements ContentModel { private final AnimatableFloatValue end; private final boolean hidden; private final String name; private final AnimatableFloatValue offset; private final AnimatableFloatValue start; private final Type type; public enum Type { SIMULTANEOUSLY, INDIVIDUALLY; public static Type forId(int i) { if (i == 1) { return SIMULTANEOUSLY; } if (i == 2) { return INDIVIDUALLY; } throw new IllegalArgumentException(C0843a.m444e("Unknown trim path type ", i)); } } public ShapeTrimPath(String str, Type type2, AnimatableFloatValue animatableFloatValue, AnimatableFloatValue animatableFloatValue2, AnimatableFloatValue animatableFloatValue3, boolean z) { this.name = str; this.type = type2; this.start = animatableFloatValue; this.end = animatableFloatValue2; this.offset = animatableFloatValue3; this.hidden = z; } public AnimatableFloatValue getEnd() { return this.end; } public String getName() { return this.name; } public AnimatableFloatValue getOffset() { return this.offset; } public AnimatableFloatValue getStart() { return this.start; } public Type getType() { return this.type; } public boolean isHidden() { return this.hidden; } public Content toContent(LottieDrawable lottieDrawable, BaseLayer baseLayer) { return new TrimPathContent(baseLayer, this); } public String toString() { StringBuilder u = C0843a.m460u("Trim Path: {start: "); u.append(this.start); u.append(", end: "); u.append(this.end); u.append(", offset: "); u.append(this.offset); u.append("}"); return u.toString(); } }
[ "73280944+shalviraj@users.noreply.github.com" ]
73280944+shalviraj@users.noreply.github.com
d1dd68a43a6db706234d2a44c2219193532b3dcd
b8e593b4a7588e8275736514ab6d7247e06b84f8
/src/Chapter_12/TestFileClass.java
618729766b6eab098b92cb7bd4143cff3c482771
[]
no_license
Partynin/Introduction_to_java
1cf439ba4c7f686c45eb929525f3639bf96e51e9
b7bd6f1646ca95eb8c819888d0cc9eaa26cb946f
refs/heads/master
2020-03-09T10:15:09.169268
2018-06-11T15:12:50
2018-06-11T15:12:50
128,716,766
0
0
null
null
null
null
UTF-8
Java
false
false
1,295
java
package Chapter_12; import java.io.File; import java.io.IOException; import java.util.Date; public class TestFileClass { public static void main(String[] args) throws IOException { File file3 = new File("C:\\Users\\Константин\\Desktop\\image"); file3.mkdir(); File file = new File("C:\\Users\\Константин\\Desktop\\image/us.gif"); File file1 = new File("C:\\Users\\Константин\\Desktop\\image", "txt.txt"); file1.createNewFile(); file.createNewFile(); System.out.println("txt is exist? " + file1.exists()); System.out.println("Does it exist? " + file.exists()); System.out.println("The file has " + file.length() + " bytes"); System.out.println("Can it be read? " + file.canRead()); System.out.println("Can it be written? " + file.canWrite()); System.out.println("Is it a directory? " + file.isDirectory()); System.out.println("Is it a file? " + file.isFile()); System.out.println("Is it absolute? " + file.isAbsolute()); System.out.println("Is it hidden? " + file.isHidden()); System.out.println("Absolute path is " + file.getAbsolutePath()); System.out.println("Last modified on " + new Date(file.lastModified())); } }
[ "partinin@bk.ru" ]
partinin@bk.ru
3b2f1112fb9f51d5b8e2c0b455af309694e549da
a6e2cd9ea01bdc5cfe58acce25627786fdfe76e9
/src/main/java/com/alipay/api/response/MybankCreditSupplychainInventoryOutConsultResponse.java
d42a21f23a8bf54a80d02676528dc0b70c2c14c2
[ "Apache-2.0" ]
permissive
cc-shifo/alipay-sdk-java-all
38b23cf946b73768981fdeee792e3dae568da48c
938d6850e63160e867d35317a4a00ed7ba078257
refs/heads/master
2022-12-22T14:06:26.961978
2020-09-23T04:00:10
2020-09-23T04:00:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,453
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: mybank.credit.supplychain.inventory.out.consult response. * * @author auto create * @since 1.0, 2019-01-07 20:51:15 */ public class MybankCreditSupplychainInventoryOutConsultResponse extends AlipayResponse { private static final long serialVersionUID = 4274893226389573538L; /** * 警戒额度 */ @ApiField("alert_amt") private String alertAmt; /** * 标识客户的当前贷款状态 */ @ApiField("arg_status") private String argStatus; /** * CONTROL 可以出库 BAN 禁止出库 WARNING 达到警戒比例(此时也可以出库) */ @ApiField("controll_status") private String controllStatus; /** * 授信额度 */ @ApiField("credit_amt") private String creditAmt; /** * 待还正常利息 */ @ApiField("normal_int_amt") private String normalIntAmt; /** * 待还逾期利息 */ @ApiField("ovd_int_amt") private String ovdIntAmt; /** * 待还逾期利息罚息 */ @ApiField("ovd_int_pen_int_amt") private String ovdIntPenIntAmt; /** * 待还逾期本金罚息 */ @ApiField("ovd_prin_pen_int_amt") private String ovdPrinPenIntAmt; /** * 待还款本金 */ @ApiField("prin_amt") private String prinAmt; /** * 实际待还款总金额=待还款本金+所有利息(正常利息+逾期利息+逾期本金罚息+逾期利息罚息) */ @ApiField("repay_amt") private String repayAmt; /** * 水位额度 */ @ApiField("water_level_amt") private String waterLevelAmt; public void setAlertAmt(String alertAmt) { this.alertAmt = alertAmt; } public String getAlertAmt( ) { return this.alertAmt; } public void setArgStatus(String argStatus) { this.argStatus = argStatus; } public String getArgStatus( ) { return this.argStatus; } public void setControllStatus(String controllStatus) { this.controllStatus = controllStatus; } public String getControllStatus( ) { return this.controllStatus; } public void setCreditAmt(String creditAmt) { this.creditAmt = creditAmt; } public String getCreditAmt( ) { return this.creditAmt; } public void setNormalIntAmt(String normalIntAmt) { this.normalIntAmt = normalIntAmt; } public String getNormalIntAmt( ) { return this.normalIntAmt; } public void setOvdIntAmt(String ovdIntAmt) { this.ovdIntAmt = ovdIntAmt; } public String getOvdIntAmt( ) { return this.ovdIntAmt; } public void setOvdIntPenIntAmt(String ovdIntPenIntAmt) { this.ovdIntPenIntAmt = ovdIntPenIntAmt; } public String getOvdIntPenIntAmt( ) { return this.ovdIntPenIntAmt; } public void setOvdPrinPenIntAmt(String ovdPrinPenIntAmt) { this.ovdPrinPenIntAmt = ovdPrinPenIntAmt; } public String getOvdPrinPenIntAmt( ) { return this.ovdPrinPenIntAmt; } public void setPrinAmt(String prinAmt) { this.prinAmt = prinAmt; } public String getPrinAmt( ) { return this.prinAmt; } public void setRepayAmt(String repayAmt) { this.repayAmt = repayAmt; } public String getRepayAmt( ) { return this.repayAmt; } public void setWaterLevelAmt(String waterLevelAmt) { this.waterLevelAmt = waterLevelAmt; } public String getWaterLevelAmt( ) { return this.waterLevelAmt; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ca14edd6e0656847b482945eabb964a1eaf65b4c
015ba981d88c554d7408eeb7dfe9944414db2f40
/Icarus-Server/src/main/java/org/alexdev/icarus/messages/outgoing/room/floorplan/FloorPlanDoorMessageComposer.java
2369d06498f9d9c1d2c17c3cf3b93e2119f55b63
[]
no_license
Quackster/Icarus
55562f6d4a2910b4dd181bbd03c38ef8b835df1a
bbbe9b9f9805bd115bb842d12affc6df63364254
refs/heads/master
2022-04-09T01:47:51.093191
2020-02-02T04:33:06
2020-02-02T04:33:06
90,914,396
6
5
null
null
null
null
UTF-8
Java
false
false
864
java
package org.alexdev.icarus.messages.outgoing.room.floorplan; import org.alexdev.icarus.messages.headers.Outgoing; import org.alexdev.icarus.messages.types.MessageComposer; import org.alexdev.icarus.server.api.messages.Response; public class FloorPlanDoorMessageComposer extends MessageComposer { private int x; private int y; private int rotation; public FloorPlanDoorMessageComposer(int x, int y, int rotation) { this.x = x; this.y = y; this.rotation = rotation; } @Override public void compose(Response response) { //response.init(Outgoing.FloorPlanDoorMessageComposer); response.writeInt(this.x); response.writeInt(this.y); response.writeInt(this.rotation); } @Override public short getHeader() { return Outgoing.FloorPlanDoorMessageComposer; } }
[ "Quackster@users.noreply.github.com" ]
Quackster@users.noreply.github.com
45b878db73b8b129fa316bb0db581d2fb6bd213f
288170e2d382087af9ee7dd823aaea0c8f2159d8
/.svn/pristine/45/45b878db73b8b129fa316bb0db581d2fb6bd213f.svn-base
c8ca4e73b9df903af3ce3e7f59ea4aa0bc96bd6f
[]
no_license
bdqnghi/j2cstranslator
2a87572e06a7b54c87d2c85b4bcabb8f5d8d8878
3d6cccdb933035be40a5460a94b7389ad0bc970f
refs/heads/master
2020-03-21T19:57:02.552098
2018-06-28T07:05:57
2018-06-28T07:05:57
138,979,292
1
0
null
null
null
null
UTF-8
Java
false
false
6,671
package com.ilog.translator.java2cs.translation.astrewriter; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.CastExpression; import org.eclipse.jdt.core.dom.ConditionalExpression; import org.eclipse.jdt.core.dom.Expression; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt.core.dom.MethodInvocation; import org.eclipse.jdt.core.dom.ParenthesizedExpression; import org.eclipse.jdt.core.dom.PrimitiveType; import org.eclipse.jdt.core.dom.SwitchStatement; import org.eclipse.jdt.core.dom.Type; import org.eclipse.jdt.core.dom.VariableDeclarationFragment; import org.eclipse.jdt.internal.corext.dom.ASTNodes; import org.eclipse.text.edits.TextEditGroup; import com.ilog.translator.java2cs.translation.ITranslationContext; import com.ilog.translator.java2cs.translation.util.TranslationUtils; // - change char to int : // * in switch statement : In C# we can't use 'char' as type for a switch // * in variable declaration // - cast then and else part of the conditionalexpression "?" in order to have same type. // public class ChangeSwitchCharToIntVisitor extends ASTRewriterVisitor { // // // public ChangeSwitchCharToIntVisitor(ITranslationContext context) { super(context); transformerName = "Change Char into Int in switch"; description = new TextEditGroup(transformerName); } // // // @Override public void endVisit(VariableDeclarationFragment node) { final Expression initializer = node.getInitializer(); if (initializer != null) { final Type type = ASTNodes.getType(node); if (type.isPrimitiveType()) { final PrimitiveType pType = (PrimitiveType) type; if (pType.getPrimitiveTypeCode() == PrimitiveType.CHAR) { if (initializer.resolveTypeBinding().isPrimitive()) { if (TranslationUtils.isIntType(initializer .resolveTypeBinding())) { currentRewriter.replace(initializer, cast( currentRewriter.getAST(), initializer, pType.resolveBinding()), description); } } } } } } @Override public void endVisit(SwitchStatement node) { final Expression expr = node.getExpression(); final ITypeBinding itype = expr.resolveTypeBinding(); if ((itype != null) && itype.isPrimitive()) { if (TranslationUtils.isCharType(itype)) { final AST ast = node.getAST(); final Expression newexpr = (Expression) ASTNode.copySubtree( ast, expr); final CastExpression cExpr = ast.newCastExpression(); final Type ptype = ast.newPrimitiveType(PrimitiveType.INT); cExpr.setExpression(newexpr); cExpr.setType(ptype); currentRewriter.replace(expr, cExpr, description); } } } @Override public void endVisit(ConditionalExpression node) { final ITypeBinding tbinding = getTypeOfExpectedNode(node); // node.resolveTypeBinding(); final Expression thenE = node.getThenExpression(); final Expression elseE = node.getElseExpression(); final Expression test = node.getExpression(); // VS2008 new check .... if (test.getNodeType() != ASTNode.PARENTHESIZED_EXPRESSION) { final ParenthesizedExpression replacement = currentRewriter .getAST().newParenthesizedExpression(); replacement.setExpression((Expression) currentRewriter .createMoveTarget(test)); currentRewriter.replace(test, replacement, description); } // Limitation of C# : In conditionnalExpression (the short if with ? and // :) // then and else part MUST have the "same" type. if (tbinding != null && !thenE.resolveTypeBinding().isEqualTo( elseE.resolveTypeBinding())) { if (thenE.getNodeType() == ASTNode.NULL_LITERAL || elseE.getNodeType() == ASTNode.NULL_LITERAL) return; final AST ast = node.getAST(); // ImportRewriteUtil.addImports(rewrite, node, typeImports, // staticImports, declarations); currentRewriter.replace(thenE, cast(ast, thenE, tbinding), description); currentRewriter.replace(elseE, cast(ast, elseE, tbinding), description); } } private ITypeBinding getTypeOfExpectedNode(ConditionalExpression node) { if (node.getParent().getNodeType() == ASTNode.METHOD_INVOCATION) { final MethodInvocation method = (MethodInvocation) node.getParent(); final int index = findIndex(method, node); final IMethodBinding mBind = method.resolveMethodBinding(); if (mBind.isVarargs()) { final int nbParam = mBind.getParameterTypes().length; final ITypeBinding arrayType = mBind.getParameterTypes()[nbParam - 1]; return arrayType.getElementType(); } else { return mBind.getParameterTypes()[index]; } } return node.resolveTypeBinding(); } private int findIndex(MethodInvocation method, ASTNode node) { int i = 0; for (final Object arg : method.arguments()) { if (((ASTNode) arg) == node) return i; i++; } return -1; } private ASTNode cast(AST ast, Expression thenE, ITypeBinding tbinding) { final CastExpression cast = ast.newCastExpression(); final ParenthesizedExpression parentExpr = ast .newParenthesizedExpression(); parentExpr.setExpression((Expression) ASTNode.copySubtree(ast, thenE)); cast.setExpression(parentExpr); String name = null; if (tbinding.isWildcardType()) { final ITypeBinding bound = tbinding.getBound(); name = TranslationUtils.getFQNNameWithGenerics(bound); } else { name = TranslationUtils.getFQNNameWithGenerics(tbinding); } if (tbinding.isPrimitive()) { PrimitiveType.Code typeCode = null; if (name.equals(TranslationUtils.INT)) { typeCode = PrimitiveType.INT; } else if (name.equals(TranslationUtils.LONG)) { typeCode = PrimitiveType.LONG; } else if (name.equals(TranslationUtils.SHORT)) { typeCode = PrimitiveType.SHORT; } else if (name.equals(TranslationUtils.FLOAT)) { typeCode = PrimitiveType.FLOAT; } else if (name.equals(TranslationUtils.DOUBLE)) { typeCode = PrimitiveType.DOUBLE; } else if (name.equals(TranslationUtils.BOOLEAN)) { typeCode = PrimitiveType.BOOLEAN; } else if (name.equals(TranslationUtils.BYTE)) { typeCode = PrimitiveType.BYTE; } else if (name.equals(TranslationUtils.CHAR)) { typeCode = PrimitiveType.CHAR; } final Type type = ast.newPrimitiveType(typeCode); cast.setType(type); return cast; } else { final Type type = (Type) currentRewriter.createStringPlaceholder( name, ASTNode.SIMPLE_TYPE); cast.setType(type); return cast; } } }
[ "bdqnghi@gmail.com" ]
bdqnghi@gmail.com
372889842fab133a5f07d135e84a5fdcad9af288
f4e827601b9ab6be0ac597146b85750e1a2d4837
/src/main/java/com/demo/biz/service/impl/TransferRecordServiceImpl.java
0251a96326434a5e8a39a77a2045393fb8ead45c
[]
no_license
xujunmeng/transaction-message-demo
9c82662fb73f7d39edd5167fb9426f8cdbd09151
2d80211e2f9faf024b9699278ad31e9aae1be09b
refs/heads/master
2020-12-17T23:11:16.866003
2020-08-19T08:37:13
2020-08-19T08:37:13
235,299,495
0
0
null
2020-01-21T09:17:53
2020-01-21T09:17:51
null
UTF-8
Java
false
false
814
java
package com.demo.biz.service.impl; import com.demo.biz.entity.TransferRecord; import com.demo.biz.mapper.TransferRecordMapper; import com.demo.biz.service.TransferRecordService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * <p> * 服务实现类 * </p> * * @author chenyin * @since 2019-05-10 */ @Service public class TransferRecordServiceImpl implements TransferRecordService { @Autowired private TransferRecordMapper transferRecordMapper; @Override public int insert(TransferRecord transferRecord) { return transferRecordMapper.insert(transferRecord); } @Override public int selectCountByRecordNo(String recordNo) { return transferRecordMapper.selectCountByRecordNo(recordNo); } }
[ "xujunmeng2012@163.com" ]
xujunmeng2012@163.com
f8ae6a7b0764fefe447dbc5c7abf68f2d2a7f912
c06c258bf1dbcc1270af1dd702b99ec62cd80c4e
/plugins/android/weiui/src/main/java/cc/weiui/framework/extend/view/loading/spinkit/sprite/CircleSprite.java
ab359bb305c906236800c7dfcccee2192bd28918
[ "MIT" ]
permissive
wtowto7207/weiui-template
566d26f4e89203ff47088074c9febf35c4cab5f1
45c239c356f36653412c11602182183ed63dd224
refs/heads/master
2020-04-04T22:25:22.273884
2018-11-08T07:51:13
2018-11-08T07:51:13
156,323,694
0
1
null
2018-11-06T04:00:10
2018-11-06T04:00:10
null
UTF-8
Java
false
false
690
java
package cc.weiui.framework.extend.view.loading.spinkit.sprite; import android.animation.ValueAnimator; import android.graphics.Canvas; import android.graphics.Paint; /** * Created by ybq. */ public class CircleSprite extends ShapeSprite { @Override public ValueAnimator onCreateAnimation() { return null; } @Override public void drawShape(Canvas canvas, Paint paint) { if (getDrawBounds() != null) { int radius = Math.min(getDrawBounds().width(), getDrawBounds().height()) / 2; canvas.drawCircle(getDrawBounds().centerX(), getDrawBounds().centerY(), radius, paint); } } }
[ "aipaw@live.cn" ]
aipaw@live.cn
25d5654d9b6bdfd1efb9edd11b20ea8c902caf2a
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_2712.java
a1ba9f41ddd5d92999b41f97502e2209c6b323d3
[]
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
228
java
public static EasyDictionary create(String path){ EasyDictionary dictionary=new EasyDictionary(); if (dictionary.load(path)) { return dictionary; } else { logger.warning("?" + path + "????"); } return null; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
7120b9842ceaf45eda3aa179291901127bd012df
25c0cd7a64d2dff6eb18a2ab06e7c3f9aa1d67bb
/helloworld/src/main/java/com/basic/activemq/SendACK.java
3084a37a1918666890e479fe58acb90e6860bdd5
[]
no_license
Tjcug/activemqAction
ad050cd5f6a301032a64fc3973563060e5c89e14
a3074336aaeef4286248b2f1b73de0076a2be9d9
refs/heads/master
2020-03-17T06:18:04.549901
2018-05-15T06:02:29
2018-05-15T06:02:29
133,349,685
1
1
null
null
null
null
UTF-8
Java
false
false
3,023
java
package com.basic.activemq; import org.apache.activemq.ActiveMQConnectionFactory; import javax.jms.*; /** * locate com.basic.activemq.helloworld * Created by mastertj on 2018/5/14. * Session 事务机制 */ public class SendACK { public static void main(String[] args) throws JMSException { //第一步:建立ConnectionFactory工厂对象,需要填入用户名、密码、以及连接的地址,均使用默认即可,默认端口为:“tcp://localhost:61616” ActiveMQConnectionFactory connectionFactory=new ActiveMQConnectionFactory( ActiveMQConnectionFactory.DEFAULT_USER, ActiveMQConnectionFactory.DEFAULT_PASSWORD, "tcp://ubuntu2:61616" ); //第二步:通过ConnectionFactory工厂对象创建一个Connection对象,并且调用Connection的start方法开启连接,Connection默认是关闭的 Connection connection = connectionFactory.createConnection(); connection.start(); //第三步:通过Connection创建Session会话(上下文环境),用于接受消息,参数配置为TRUE 开启事务,参数配置为1为签收模式,一般我们设置为自动签收 Session session=connection.createSession(Boolean.FALSE,Session.CLIENT_ACKNOWLEDGE); //第四步:通过Session创建Destination对象,指的是一个客户端用来指定生产消息目标和消费消息的来源,再PTP模式中,Destination被称为Queue即队列 Destination destination = session.createQueue("first"); //第五步:我们通过session创建消息的发送和接受对象(生产者和消费者) MessageProducer/MessageConsumer MessageProducer producer=session.createProducer(null); //第六步:我们可以使用MessageProducer 的setDelivereyMode()方法将其持久化特性和非持久化特性(DelivereyMode) producer.setDeliveryMode(DeliveryMode.PERSISTENT); //第七步:最后我们使用JMS的规范的TextMessage形式创建数据(通过Session对象),并且通过MessageProducer的send方法发送数据,同理客户端使用receive接受数据 for(int i=0;i<100;i++){ TextMessage message=session.createTextMessage("我是消息内容。。。。"+i); //第一个参数目标地址 //第二个参数具体的发送数据消息 //第三个参数传送数据的优先级 //第四个参数 优先级 //第五个参数 消息的过期时间 producer.send(destination,message); } for(int i=0;i<5;i++){ MapMessage mapMessage=session.createMapMessage(); mapMessage.setString("name","谭杰1"); mapMessage.setInt("age",20+i); mapMessage.setString("addresss","武汉"); producer.send(destination,mapMessage,DeliveryMode.NON_PERSISTENT,0,1000*1000L); } if(connection!=null){ connection.close(); } } }
[ "798750509@qq.com" ]
798750509@qq.com
f33e4117b7f82f9759c2a513e5891e16185d38b4
1b36c0d8c56f7580a91e1e8f8b1e57fa88272e8f
/RefreshUpload/TwinklingRefreshLayout-master/app/src/main/java/com/lcodecore/twinklingrefreshlayout/adapter/ViewPagerHolder.java
afc634128758932397fb0a1aca19a35519f024d5
[ "Apache-2.0" ]
permissive
hrony/GitHub
2cabc08c6e29f32931ce44d217c0c04057daf9fc
a22f3ed254a005a8c8007f677968655620ccd3b1
refs/heads/master
2020-05-18T12:03:14.128849
2017-11-27T01:48:21
2017-11-27T01:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,876
java
package com.lcodecore.twinklingrefreshlayout.adapter; import android.content.Context; import android.support.v4.view.ViewPager; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import com.lcodecore.twinklingrefreshlayout.R; import com.lcodecore.twinklingrefreshlayout.adapter.base.CommonHolder; import com.lcodecore.twinklingrefreshlayout.beans.Card; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import butterknife.BindView; public class ViewPagerHolder extends CommonHolder<Void> { private LoopViewPagerAdapter viewPagerAdapter; private List<Card> cards = new ArrayList<>(); @BindView(R.id.viewPager) ViewPager viewPager; @BindView(R.id.indicators) LinearLayout indicators; public ViewPagerHolder(Context context, ViewGroup root) { super(context, root, R.layout.layout_viewpager); // cards.add(new Card("二次元专题", "啊喂,别总想去四维空间啦",R.drawable.card_cover6)); // cards.add(new Card("Music Player", "闻其名,余音绕梁",R.drawable.card_cover7)); // cards.add(new Card("el", "剪纸人の唯美旅程",R.drawable.card_cover8)); // cards.add(new Card("God of Light", "点亮世界之光",R.drawable.card_cover1)); // cards.add(new Card("BlackLight", "做最纯粹的微博客户端",R.drawable.card_cover3)); } @Override public void bindData(Void aVoid) { } @Override public void bindHeadData() { if(viewPager.getAdapter() == null){ viewPagerAdapter = new LoopViewPagerAdapter(viewPager, indicators); viewPager.setAdapter(viewPagerAdapter); viewPager.addOnPageChangeListener(viewPagerAdapter); viewPagerAdapter.setList(cards); }/*else{ viewPagerAdapter.setList(pics); }*/ } }
[ "wwqweiwenqiang@qq.com" ]
wwqweiwenqiang@qq.com
f198ffc8b79bb00352cf82364e64764d5647a244
ff79e46531d5ad204abd019472087b0ee67d6bd5
/common/api/src/och/api/model/server/ServerRow.java
476a82cde33340842eda380b6f6b8060e5cb2aa2
[ "Apache-2.0" ]
permissive
Frankie-666/live-chat-engine
24f927f152bf1ef46b54e3d55ad5cf764c37c646
3125d34844bb82a34489d05f1dc5e9c4aaa885a0
refs/heads/master
2020-12-25T16:36:00.156135
2015-08-16T09:16:57
2015-08-16T09:16:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,946
java
/* * Copyright 2015 Evgeny Dolganov (evgenij.dolganov@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 och.api.model.server; public class ServerRow implements Cloneable, Comparable<ServerRow> { public long id; public String httpUrl; public String httpsUrl; public boolean isFull; public ServerRow() { super(); } public ServerRow(long id, String httpUrl, String httpsUrl) { this.id = id; this.httpUrl = httpUrl; this.httpsUrl = httpsUrl; } public String createUrl(String req){ return createUrl(httpUrl, req); } public static String createUrl(String httpUrl, String req){ return httpUrl + req; } @Override public ServerRow clone() { try { return (ServerRow)super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("can't clone", e); } } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((httpUrl == null) ? 0 : httpUrl.hashCode()); result = prime * result + ((httpsUrl == null) ? 0 : httpsUrl.hashCode()); result = prime * result + (int) (id ^ (id >>> 32)); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ServerRow other = (ServerRow) obj; if (httpUrl == null) { if (other.httpUrl != null) return false; } else if (!httpUrl.equals(other.httpUrl)) return false; if (httpsUrl == null) { if (other.httpsUrl != null) return false; } else if (!httpsUrl.equals(other.httpsUrl)) return false; if (id != other.id) return false; return true; } @Override public int compareTo(ServerRow o) { return Long.compare(id, o.id); } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getHttpUrl() { return httpUrl; } public void setHttpUrl(String httpUrl) { this.httpUrl = httpUrl; } public String getHttpsUrl() { return httpsUrl; } public void setHttpsUrl(String httpsUrl) { this.httpsUrl = httpsUrl; } public boolean isFull() { return isFull; } public void setIsFull(Boolean isFull) { setFull(isFull); } public void setFull(Boolean isFull) { if(isFull == null) isFull = false; this.isFull = isFull; } public void setFull(boolean isFull) { this.isFull = isFull; } }
[ "evgenij.dolganov@gmail.com" ]
evgenij.dolganov@gmail.com
3fe9f43cef8677efca48139f579961574ec11283
8251566428cf5047a7de61eec859cd7c7277317f
/service/am/WEB-INF/src/com/am/frame/state/flow/OrderCancelStateAction.java
77e9cc758b2fb8268700c978490ffc8f148c1f2f
[]
no_license
wlzimujun/cbb-third-project
710b94fe5d0649597e1f8c138bec8072c403b474
f1dd91100d2d3c9659be320a0a47490115cb9837
refs/heads/master
2023-03-21T12:16:32.925153
2020-07-15T10:33:34
2020-07-15T10:34:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,409
java
package com.am.frame.state.flow; import org.json.JSONException; import org.json.JSONObject; import com.am.frame.state.OrderFlowParam; /** * @author Mike * @create 2014年12月2日 * @version * 说明:<br /> * 订单取消 * 订单状态 3-9 * 订单状态4-9 * 订单取消状态 30,31,32 -9 * */ public class OrderCancelStateAction extends DefaultOrderStateAction { @Override public String execute(OrderFlowParam ofp) { JSONObject result=new JSONObject(); try{ //获取当前订单状态 String currentStateValue=ofp.stateValue; //检查订单状态是否为3,30,31,32,4的状态,如果是,修改状态,如果不是则不动。 if("3".equals(currentStateValue)|| "30".equals(currentStateValue)|| "31".equals(currentStateValue)|| "32".equals(currentStateValue)|| "4".equals(currentStateValue)){ result=new JSONObject(super.execute(ofp)); }else{ throw new Exception("只有订单状态为3,30,31,32,4的订单才可以取消订单,目前订单状态为 "+ofp.stateValue); } }catch(Exception e){ try { result.put("CODE",0); result.put("ERRCODE",1); result.put("MSG",e.getMessage()); result.put("SUCCESS",false); result.put("STATE",ofp.stateValue); } catch (JSONException e1) { e1.printStackTrace(); } e.printStackTrace(); } return result.toString(); } }
[ "1070568622@qq.com" ]
1070568622@qq.com
693c64cd2e95104b83685ad35270c38ffbd38065
2dcc440fa85d07e225104f074bcf9f061fe7a7ae
/gameserver/src/main/java/org/mmocore/gameserver/scripts/quests/_088_SagaOfTheArchmage.java
73a9554d40b9b70d05c68842593c3d4dfe801db9
[]
no_license
VitaliiBashta/L2Jts
a113bc719f2d97e06db3e0b028b2adb62f6e077a
ffb95b5f6e3da313c5298731abc4fcf4aea53fd5
refs/heads/master
2020-04-03T15:48:57.786720
2018-10-30T17:34:29
2018-10-30T17:35:04
155,378,710
0
3
null
null
null
null
UTF-8
Java
false
false
2,746
java
package org.mmocore.gameserver.scripts.quests; public class _088_SagaOfTheArchmage extends SagasSuperclass { public _088_SagaOfTheArchmage() { super(false); NPC = new int[]{ 30176, 31627, 31282, 31282, 31590, 31646, 31647, 31650, 31654, 31655, 31657, 31282 }; Items = new int[]{ 7080, 7529, 7081, 7503, 7286, 7317, 7348, 7379, 7410, 7441, 7082, 0 }; Mob = new int[]{ 27250, 27237, 27254 }; classid = 94; prevclass = 0x0C; X = new int[]{ 191046, 46066, 46087 }; Y = new int[]{ -40640, -36396, -36372 }; Z = new int[]{ -3042, -1685, -1685 }; Text = new String[]{ "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", "I do not have the patience ..! I have been a giant force ...! Cough chatter ah ah ah!", "Paying homage to those who disrupt the orderly will be PLAYERNAME's death!", "Now, my soul freed from the shackles of the millennium, Halixia, to the back side I come ...", "Why do you interfere others' battles?", "This is a waste of time.. Say goodbye...!", "...That is the enemy", "...Goodness! PLAYERNAME you are still looking?", "PLAYERNAME ... Not just to whom the victory. Only personnel involved in the fighting are eligible to share in the victory.", "Your sword is not an ornament. Don't you think, PLAYERNAME?", "Goodness! I no longer sense a battle there now.", "let...", "Only engaged in the battle to bar their choice. Perhaps you should regret.", "The human nation was foolish to try and fight a giant's strength.", "Must...Retreat... Too...Strong.", "PLAYERNAME. Defeat...by...retaining...and...Mo...Hacker", "....! Fight...Defeat...It...Fight...Defeat...It..." }; registerNPCs(); } }
[ "Vitalii.Bashta@accenture.com" ]
Vitalii.Bashta@accenture.com
f6dab376e775243fd1818435e6a7f89308854af1
0b20c4a616e17b76fe3c9a048e68b417e35dfaac
/Java/know-arrange/src/main/java/com/min/know/thread/PrintThreadDemo.java
2e13ee5e211b1e521ce8445f5cbd517dd8c74c01
[]
no_license
minyangcheng/WorkStation
d39fffd3879adeac46d7b1cc1aeb5f56dd16c8dd
efcf62e7295ed8d76ba9de101076d987311dce88
refs/heads/master
2021-01-01T06:10:04.870682
2018-12-06T06:06:35
2018-12-06T06:06:35
97,376,308
1
0
null
null
null
null
UTF-8
Java
false
false
3,157
java
package com.min.know.thread; import java.util.concurrent.atomic.AtomicInteger; public class PrintThreadDemo { public static void main(String args[]) { PrintThread aThread = new PrintThread("a"); aThread.start(); PrintThread bThread = new PrintThread("b"); bThread.start(); PrintThread cThread = new PrintThread("c"); cThread.start(); int a=1; String.class.notify(); a=2; try { Thread.sleep(5000); } catch (InterruptedException e) { e.printStackTrace(); } } public static class PrintThread extends Thread { private static AtomicInteger num = new AtomicInteger(1); private static Object lock = new Object(); private static volatile int[] counterArr = new int[]{0, 0, 0}; private String name; private int index; public PrintThread(String name) { this.name = name; if (name.equals("a")) { this.index = 0; } else if (name.equals("b")) { this.index = 1; } else if (name.equals("c")) { this.index = 2; } } @Override public void run() { while (num.get() < 100) { synchronized (lock) { while (true) { try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("thread-" + name + " "+ counterArr[0] +" "+counterArr[1]+" "+counterArr[2]); boolean tempFlag = false; if (index == 0) { tempFlag = counterArr[0] == 0; } else if (index == 1) { tempFlag = counterArr[0] == 1 && counterArr[1] == 0; } else if (index == 2) { tempFlag = counterArr[0] == 1 && counterArr[1] == 1 && counterArr[2] == 0; } if(tempFlag){ break; }else { lock.notifyAll(); } try { lock.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } System.out.println("thread-" + name + " -- > " + num.getAndIncrement()); System.out.println("thread-" + name + " -- > " + num.getAndIncrement()); System.out.println("thread-" + name + " -- > " + num.getAndIncrement()); counterArr[index] = counterArr[index] + 1; if (index == 2) { counterArr[0] = 0; counterArr[1] = 0; counterArr[2] = 0; } } } } } }
[ "332485508@qq.com" ]
332485508@qq.com
1c02301a20492e30ddc68cb920ac98e583fb84e6
eca9eac89bba380274f4426ece725cb6ef41c103
/core/model/src/main/java/com/blazebit/storage/core/model/jpa/BucketObjectId.java
6021a2dc25612a911db4d3dad311eaf0b2820d11
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Blazebit/blaze-storage
6b2c053ee070577b43f5b07d13196cc790724732
3f5688e82b33388a113eb3e44b555e216430df71
refs/heads/master
2023-08-10T15:55:47.617089
2020-10-13T06:58:50
2020-10-13T06:58:50
37,865,542
1
0
Apache-2.0
2023-03-02T23:26:14
2015-06-22T16:05:47
Java
UTF-8
Java
false
false
1,924
java
package com.blazebit.storage.core.model.jpa; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Embeddable; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Embeddable public class BucketObjectId implements Serializable { private static final long serialVersionUID = 1L; private String bucketId; private String name; public BucketObjectId() { } public BucketObjectId(Bucket bucket, String name) { if (bucket == null) { this.bucketId = null; } else { this.bucketId = bucket.getId(); } this.name = name; } public BucketObjectId(String bucketId, String name) { this.bucketId = bucketId; this.name = name; } @NotNull @Column(name = "bucket_id") public String getBucketId() { return bucketId; } public void setBucketId(String bucketId) { this.bucketId = bucketId; } @NotNull @Size(min = 1, max = RdbmsConstants.FILE_NAME_MAX_LENGTH) public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((bucketId == null) ? 0 : bucketId.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; BucketObjectId other = (BucketObjectId) obj; if (bucketId == null) { if (other.bucketId != null) return false; } else if (!bucketId.equals(other.bucketId)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; return true; } @Override public String toString() { return "BucketObjectId [bucketId=" + bucketId + ", name=" + name + "]"; } }
[ "christian.beikov@gmail.com" ]
christian.beikov@gmail.com
0f252d903a7951b5113d623741f10cf1d01852c3
75c4712ae3f946db0c9196ee8307748231487e4b
/src/main/java/com/alipay/api/response/AlipaySecurityRiskCustomerriskSendResponse.java
1d50435b3d618ae719a490db7d77a66eb7cf1df5
[ "Apache-2.0" ]
permissive
yuanbaoMarvin/alipay-sdk-java-all
70a72a969f464d79c79d09af8b6b01fa177ac1be
25f3003d820dbd0b73739d8e32a6093468d9ed92
refs/heads/master
2023-06-03T16:54:25.138471
2021-06-25T14:48:21
2021-06-25T14:48:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
387
java
package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.security.risk.customerrisk.send response. * * @author auto create * @since 1.0, 2019-10-24 20:58:10 */ public class AlipaySecurityRiskCustomerriskSendResponse extends AlipayResponse { private static final long serialVersionUID = 8269153835684167496L; }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
fa0140060626a5a15443c63759d2d52be7a596cb
04b1803adb6653ecb7cb827c4f4aa616afacf629
/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupItem.java
36c4925b1a1806d584e862c61fdacff088e938cf
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
Java
false
false
978
java
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.content.browser.input; import org.chromium.ui.DropdownItemBase; /** * Select popup item containing the label, the type and the enabled state * of an item belonging to a select popup dialog. */ public class SelectPopupItem extends DropdownItemBase { private final String mLabel; private final int mType; public SelectPopupItem(String label, int type) { mLabel = label; mType = type; } @Override public String getLabel() { return mLabel; } @Override public boolean isEnabled() { return mType == PopupItemType.ENABLED || mType == PopupItemType.GROUP; } @Override public boolean isGroupHeader() { return mType == PopupItemType.GROUP; } public int getType() { return mType; } }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
adbccb9a3ed8840d44a1893227d3f14152a2d34f
03f9d57dbe1b78bdff2032a70282ea9e382fb9de
/src/com/intellij/lang/stylus/psi/StylusNodeType.java
5d8e05930b2ede9c487f74b1b75d8621c1d9c447
[]
no_license
svsool/intellij-stylus
3ac3275e75512f335769d6921edd0fecf384b14d
2b07974cd5d6309444bb82037214fe50f2557b40
refs/heads/master
2021-01-01T05:35:25.928430
2013-06-27T17:07:48
2013-06-27T17:07:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
793
java
package com.intellij.lang.stylus.psi; import java.lang.reflect.Constructor; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import com.intellij.lang.ASTNode; import com.intellij.util.ReflectionUtil; /** * @author VISTALL * @since 20:29/26.06.13 */ public class StylusNodeType extends StylusElementType { private final Constructor<? extends StylusElement> myConstructor; public StylusNodeType(@NotNull @NonNls String debugName, Class<? extends StylusElement> clazz) { super(debugName); try { myConstructor = clazz.getConstructor(ASTNode.class); } catch(NoSuchMethodException e) { throw new Error(e); } } public StylusElement newInstance(ASTNode astNode) { return ReflectionUtil.createInstance(myConstructor, astNode); } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
a47c86fb655f65cf9300d721c3df78b00ea7bbef
c808036130f2e7787acfbbe20af896823a8ef989
/kubernetes-mock/src/main/java/io/fabric8/kubernetes/client/mock/MockKubernetesListOperation.java
b29bc0bc140d66106d76778ff60c9de549877218
[ "Apache-2.0" ]
permissive
janstey/kubernetes-client
d00beb4dd9194c0c47b4c3f8a2ff104860b2733d
f59cd2de71b794c0df5d414c04ea3aaca8ba2baa
refs/heads/master
2021-01-17T21:11:43.644331
2015-10-02T13:51:37
2015-10-02T13:51:37
43,570,257
0
0
null
2015-10-02T18:49:07
2015-10-02T18:49:05
Java
UTF-8
Java
false
false
1,233
java
/** * Copyright (C) 2015 Red Hat, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.fabric8.kubernetes.client.mock; import io.fabric8.kubernetes.api.model.DoneableKubernetesList; import io.fabric8.kubernetes.api.model.KubernetesList; import io.fabric8.kubernetes.client.dsl.CreateGettable; import io.fabric8.kubernetes.client.dsl.Loadable; import io.fabric8.kubernetes.client.dsl.Namespaceable; import org.easymock.IExpectationSetters; import java.io.InputStream; public interface MockKubernetesListOperation extends Namespaceable<MockKubernetesListNonNamesapceOperation>, Loadable<InputStream, CreateGettable<KubernetesList, IExpectationSetters<KubernetesList>, DoneableKubernetesList>> { }
[ "iocanel@gmail.com" ]
iocanel@gmail.com
e069a1664221f75370caba18606825bec8f96fe9
c94f888541c0c430331110818ed7f3d6b27b788a
/bbp/java/src/main/java/com/antgroup/antchain/openapi/bbp/models/MatchDidAccountResponse.java
d8dc74fb3f4e109f627780c76e3bafc337b3604d
[ "MIT", "Apache-2.0" ]
permissive
alipay/antchain-openapi-prod-sdk
48534eb78878bd708a0c05f2fe280ba9c41d09ad
5269b1f55f1fc19cf0584dc3ceea821d3f8f8632
refs/heads/master
2023-09-03T07:12:04.166131
2023-09-01T08:56:15
2023-09-01T08:56:15
275,521,177
9
10
MIT
2021-03-25T02:35:20
2020-06-28T06:22:14
PHP
UTF-8
Java
false
false
1,335
java
// This file is auto-generated, don't edit it. Thanks. package com.antgroup.antchain.openapi.bbp.models; import com.aliyun.tea.*; public class MatchDidAccountResponse extends TeaModel { // 请求唯一ID,用于链路跟踪和问题排查 @NameInMap("req_msg_id") public String reqMsgId; // 结果码,一般OK表示调用成功 @NameInMap("result_code") public String resultCode; // 异常信息的文本描述 @NameInMap("result_msg") public String resultMsg; public static MatchDidAccountResponse build(java.util.Map<String, ?> map) throws Exception { MatchDidAccountResponse self = new MatchDidAccountResponse(); return TeaModel.build(map, self); } public MatchDidAccountResponse setReqMsgId(String reqMsgId) { this.reqMsgId = reqMsgId; return this; } public String getReqMsgId() { return this.reqMsgId; } public MatchDidAccountResponse setResultCode(String resultCode) { this.resultCode = resultCode; return this; } public String getResultCode() { return this.resultCode; } public MatchDidAccountResponse setResultMsg(String resultMsg) { this.resultMsg = resultMsg; return this; } public String getResultMsg() { return this.resultMsg; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
2e61cd20eb96334ab1e9f00cc85396a8eb24adec
1a5b9fe874ff100fa0799344164e0c9eff66606c
/Data Structures-201812/src/_18_CombiningDataStructures/Person.java
c3a0fe53c18be73ff687d9c3d6dca780d6d76c2f
[]
no_license
NikolovV/Independend
ad2237abec32f085d5ecbbd41e6415a3cfe616b0
701e4b5c9ead64ca7666263398237e5d272fc0f5
refs/heads/master
2021-02-28T08:58:03.386460
2020-12-25T19:08:40
2020-12-25T19:08:40
245,680,270
0
0
null
null
null
null
UTF-8
Java
false
false
1,075
java
package _18_CombiningDataStructures; public class Person implements Comparable<Person> { private String name; private String email; private int age; private String town; public Person() { super(); } public Person(String email, String name, int age, String town) { this.setName(name); this.setEmail(email); this.setAge(age); this.setTown(town); } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getEmail() { return this.email; } public void setEmail(String email) { this.email = email; } public int getAge() { return this.age; } public void setAge(int age) { this.age = age; } public String getTown() { return this.town; } public void setTown(String town) { this.town = town; } @Override public int compareTo(Person o) { return this.getEmail().compareTo(o.getEmail()); } }
[ "ventci.nikolov@gmail.com" ]
ventci.nikolov@gmail.com
518257ea2c2ed9197ec70d1749a956cf651d4d62
e7d6de9f0e13fe932062a1fdb2ef0a0d22d361b5
/src/main/java/gwt/material/design/incubator/client/infinitescroll/events/ErrorEvent.java
23749b85d67f87fb4bd6f44ff7e53a461d96b9d8
[ "Apache-2.0" ]
permissive
FelixPe/gwt-material-addins
cdf1c00acdf6a409f6d328849d82fc1c1b00efcd
adee37d647d4f024b42dcdab2737373415afe55e
refs/heads/master
2020-03-24T17:43:47.162428
2018-07-24T13:08:14
2018-07-24T13:08:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,723
java
/* * #%L * GwtMaterial * %% * Copyright (C) 2015 - 2018 GwtMaterialDesign * %% * 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% */ package gwt.material.design.incubator.client.infinitescroll.events; import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.GwtEvent; import com.google.gwt.event.shared.HasHandlers; //@formatter:off /** * @author kevzlou7979 */ public class ErrorEvent extends GwtEvent<ErrorEvent.ErrorHandler> { public static final Type<ErrorHandler> TYPE = new Type<>(); private String message; public ErrorEvent(String message) { this.message = message; } public static Type<ErrorHandler> getType() { return TYPE; } public static void fire(HasHandlers source, String message) { source.fireEvent(new ErrorEvent(message)); } @Override public Type<ErrorHandler> getAssociatedType() { return TYPE; } @Override protected void dispatch(ErrorHandler handler) { handler.onError(this); } public String getMessage() { return message; } public interface ErrorHandler extends EventHandler { void onError(ErrorEvent event); } }
[ "kevzlou7979@gmail.com" ]
kevzlou7979@gmail.com
f1c62206dd730b6b433a16ff7fd97b9fb8c7a036
6f14e8d6568a1a9c84150bb9577b860b6d147559
/Model_2/src/com/example/controller/MessageProcess.java
f0015d24397cdf5b4486c85d46cfaac072d2fc46
[]
no_license
tmznf963/SIST-E-JSP
c6c110b96d8f998fde124050d4a463dc6179294f
d9d44193182e60c033d2f69f97aef9a0f68f0397
refs/heads/master
2020-04-03T08:28:29.898127
2018-12-11T08:33:43
2018-12-11T08:33:43
155,134,335
0
0
null
null
null
null
UTF-8
Java
false
false
467
java
package com.example.controller; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class MessageProcess implements Controller { @Override public String myservice(HttpServletRequest request, HttpServletResponse response) throws Exception { request.setAttribute("USERNAME", "한지민"); request.setAttribute("USERAGE", 44); request.setAttribute("USERPHONE", "01033334444"); return "/messageView.jsp"; } }
[ "qhfhd963@naver.com" ]
qhfhd963@naver.com
b47a70e20bbe54478ed1acc2c4d94345f55aee6f
4ead80ec478a9ae03c73c7408436bd507be7b6a9
/app/estar/union-admin/src/main/java/study/daydayup/wolf/business/union/admin/controller/sdk/AliyunOssController.java
019bf895282f22bb549bb24fbf8399616a592c45
[ "MIT" ]
permissive
timxim/wolf
cfea87e0efcd5c6e6ff76c85b3882ffce60dde07
207c61cd473d1433bf3e4fc5a591aaf3a5964418
refs/heads/master
2022-11-12T15:13:33.096567
2020-07-04T14:03:53
2020-07-04T14:03:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
791
java
package study.daydayup.wolf.business.union.admin.controller.sdk; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import study.daydayup.wolf.framework.rpc.Result; import study.daydayup.wolf.sdk.aliyun.oss.AliyunOssUtil; import javax.annotation.Resource; import java.util.Map; /** * study.daydayup.wolf.business.union.admin.controller.sdk * * @author Wingle * @since 2020/3/26 7:42 下午 **/ @RestController public class AliyunOssController { @Resource private AliyunOssUtil ossUtil; @GetMapping("/sdk/aliyun/oss/signature") public Result<Map<String, String>> createSignature() { Map<String, String> signature = ossUtil.createSignature(); return Result.ok(signature); } }
[ "winglechen@gmail.com" ]
winglechen@gmail.com
63343dfd899c4258b4b0c9b6027c5f7004befa02
750bad4810b2d4616ef6d1bf4f3a377b50957e2b
/core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/unit/CUnitTypeJass.java
ea0d25204a99fa6e921199d7010cc3711285ec8f
[ "MIT", "GPL-1.0-or-later" ]
permissive
Retera/WarsmashModEngine
8af009e4fa7cf0b127397a7bd46d7376f9e06b09
6814a4ca952c28e287c32fb686212a44118b9a53
refs/heads/main
2023-08-26T02:53:30.234872
2023-08-24T02:17:49
2023-08-24T02:17:49
354,564,401
266
58
MIT
2023-08-21T12:52:06
2021-04-04T14:27:15
Java
UTF-8
Java
false
false
592
java
package com.etheller.warsmash.viewer5.handlers.w3x.simulation.unit; import com.etheller.interpreter.ast.util.CHandle; public enum CUnitTypeJass implements CHandle { HERO, DEAD, STRUCTURE, FLYING, GROUND, ATTACKS_FLYING, ATTACKS_GROUND, MELEE_ATTACKER, RANGED_ATTACKER, GIANT, SUMMONED, STUNNED, PLAGUED, SNARED, UNDEAD, MECHANICAL, PEON, SAPPER, TOWNHALL, ANCIENT, TAUREN, POISONED, POLYMORPHED, SLEEPING, RESISTANT, ETHEREAL, MAGIC_IMMUNE; public static CUnitTypeJass[] VALUES = values(); @Override public int getHandleId() { return ordinal(); } }
[ "retera@etheller.com" ]
retera@etheller.com
84dc5c24b8de07e4006c3cdc53e4a854a1b4201f
df13db4cabfaf130613ee7a3ca64bb1a5b7f44a3
/src/main/java/com/moonsworth/lunar/client/event/type/gui/SwapPackEvent.java
ea4d1e46731ccd4a893613fb5b6c3a5e1a01dc2f
[]
no_license
1onely-lucas/LunarClient
8425ba152e388023fdbba6889af132e32e207921
aa2e05705c43bb0481b16036a97b874a9b6de24b
refs/heads/main
2023-08-04T20:19:28.563743
2021-09-24T18:13:19
2021-09-24T18:13:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
package com.moonsworth.lunar.client.event.type.gui; import com.moonsworth.lunar.bridge.minecraft.client.resources.AbstractResourcePackBridge; import com.moonsworth.lunar.client.event.Event; public class SwapPackEvent extends Event { public final AbstractResourcePackBridge lIlIlIlIlIIlIIlIIllIIIIIl; public AbstractResourcePackBridge lIlIlIlIlIIlIIlIIllIIIIIl() { return this.lIlIlIlIlIIlIIlIIllIIIIIl; } public SwapPackEvent(AbstractResourcePackBridge abstractResourcePackBridge) { this.lIlIlIlIlIIlIIlIIllIIIIIl = abstractResourcePackBridge; } }
[ "decenciesmc@gmail.com" ]
decenciesmc@gmail.com
fee1e6eaa4dac34044c5977d355df8512a94d575
0812896c6bbc0bb96953d7c2bf8a7d1222dc2ef2
/HBProj10Anno-BasicApp-TryWithResource/src/com/nt/test/InsertTest.java
3189260d330e8de82ae163ec2348acb359dbf630
[]
no_license
8341849309/hibernate
b6ee0cf5c05ee94fbf5ec3ae436438756f2b04c5
442947764e7f411b120d6840ddc5476b20c31c84
refs/heads/master
2023-06-10T19:35:14.212935
2021-07-01T12:33:37
2021-07-01T12:33:37
349,377,830
0
0
null
null
null
null
UTF-8
Java
false
false
955
java
package com.nt.test; import org.hibernate.HibernateException; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import com.nt.entity.InsurancePolicy; import com.nt.utils.HibernateUtils; public class InsertTest { public static void main(String[] args) { Transaction tx = null; try (SessionFactory factory = HibernateUtils.getSessionFactory()) { try (Session ses = HibernateUtils.getSession()) { tx = ses.beginTransaction(); InsurancePolicy ip = new InsurancePolicy(); ip.setPolicyId(102); ip.setPolicyName("Health Insurance"); ip.setDuration(2.5f); ip.setCompanyName("SBI"); System.out.println("Object is saved:: " + ses.save(ip)); tx.commit(); } } catch (HibernateException he) { he.printStackTrace(); tx.rollback(); } catch (Exception e) { e.printStackTrace(); tx.rollback(); } } }
[ "hp@venkat" ]
hp@venkat
9a8392e56db1a0e75bca51da5ee6ff60fb242655
5aae3b77da27465960e8a221d35a74500485938a
/src/com/TNF/Launcher/screen/MessagesScreen.java
57e34efb3b7f0406f89b1063a9ff40f980d2548a
[]
no_license
TheNightForum/TNFLauncher
f6b48657a11a94433a15e3a6e637e6b3cbad02af
66491b9ec5a829ea9177b627ce7c5c04d1ad697b
refs/heads/master
2021-01-21T11:03:48.067438
2017-03-07T23:36:55
2017-03-07T23:36:55
79,192,866
0
0
null
null
null
null
UTF-8
Java
false
false
1,623
java
package com.TNF.Launcher.screen; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.InputStream; import java.net.URL; import com.TNF.Launcher.Game.Info; import com.TNF.Launcher.gfx.Screen; public class MessagesScreen extends Menu { private static int Status; private String GameName; public MessagesScreen(int code, String Game){ Status = code; GameName = Game; } /** * Status -1 = Dev did not enable it. * Status 1 = Display Credits. * Status 2 = Display ChangeLog. */ public void tick() { DialogMenu welcome = new DialogMenu(1, GameName); if(Status == -1){ welcome.setTitle(""); welcome.setText("Sorry... \n\n" + "The Dev has disabled this feature.\n\n" + "Press ENTER to go back."); }else if (Status == 1){ welcome.setTitle(""); welcome.setText(pullSite(Info.CreditsURL)); }else if (Status == 2){ welcome.setTitle(""); welcome.setText(pullSite(Info.ChangelogURL)); } game.setMenu(welcome); } private static String pullSite(String siteURL){ try{ URL link = new URL(siteURL); InputStream in = new BufferedInputStream(link.openStream()); ByteArrayOutputStream out = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; int n = 0; while (-1 != (n = in.read(buf))) { out.write(buf, 0, n); } out.close(); in.close(); byte[] bytes = out.toByteArray(); String raw = new String(bytes, "UTF-8"); return raw; }catch(Exception e) { return "Must be connected to the internet to view logs!"; } } public void render(Screen screen) { screen.clear(0); } }
[ "crazywolf132@gmail.com" ]
crazywolf132@gmail.com