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
0e8c84736ee843806046ddb77c639f068ec2e23a
eb4fd201bfcd55169b0b1d002597d63680c07ac2
/jsp/hkspring0206egt/src/com/hk/mobile/dao/HKPDSDao.java
4beeb1229b90ccc2b7dab93b8cd31ccd12278463
[]
no_license
honnynoop/designweb
a6e47bee876973929325928ba3ed2eee4b134ba7
14ce744e1d75cb51f4a2e8eebceaa71d658383bc
refs/heads/master
2020-03-17T06:54:19.539175
2018-05-14T14:49:53
2018-05-14T14:49:53
133,374,381
0
0
null
null
null
null
UTF-8
Java
false
false
1,004
java
package com.hk.mobile.dao; import java.util.List; import org.mybatis.spring.SqlSessionTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; import com.hk.mobile.member.model.HKPds; import egovframework.rte.psl.dataaccess.EgovAbstractMapper; @Repository("hKPDSDao") public class HKPDSDao extends EgovAbstractMapper{ String ns="HKPds."; public void uploadPDS(HKPds dto) { insert(ns+"uploadPDS",dto); } public List<HKPds> getPDSList() { return selectList(ns+"getPDSList"); } public void pdsReadCount(int seq) { update(ns+"pdsReadCount",seq); } public void downloadCount(int seq) { update(ns+"downloadCount",seq); } public HKPds getPDS(int seq) { return (HKPds)selectOne(ns+"getPDS",seq); } public void updatePDS(HKPds pdsdto) { update(ns+"updatePDS",pdsdto); } public void delPDS(int seq) { delete(ns+"delPDS",seq); } }
[ "honnynoop@naver.com" ]
honnynoop@naver.com
d0f9e226203b679fc5b8b832b56e48a512cfbd42
740e28225ca74f4189f3c6631a1da4c145652ec0
/modules/product/src/test/java/com/opengamma/strata/product/credit/type/CdsQuoteConventionTest.java
4d22b3ad559e6e779734486a72bb973c08ce1185
[ "Apache-2.0", "LicenseRef-scancode-mit-old-style" ]
permissive
balajimore/Strata
a7c631946930f0b32c869c0e9935cf64ef795891
ce069bc0ca25fbd685afaf11416963621e4c0b61
refs/heads/master
2020-12-31T08:08:14.672046
2017-08-08T09:48:19
2017-08-08T09:48:19
100,478,920
1
0
null
2017-08-16T10:46:53
2017-08-16T10:46:53
null
UTF-8
Java
false
false
2,016
java
/* * Copyright (C) 2017 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.strata.product.credit.type; import static com.opengamma.strata.collect.TestHelper.assertJodaConvert; import static com.opengamma.strata.collect.TestHelper.assertSerialization; import static com.opengamma.strata.collect.TestHelper.assertThrows; import static com.opengamma.strata.collect.TestHelper.coverEnum; import static org.testng.Assert.assertEquals; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; /** * Test {@link CdsQuoteConvention}. */ @Test public class CdsQuoteConventionTest { //------------------------------------------------------------------------- @DataProvider(name = "name") static Object[][] data_name() { return new Object[][] { {CdsQuoteConvention.PAR_SPREAD, "ParSpread"}, {CdsQuoteConvention.POINTS_UPFRONT, "PointsUpfront"}, {CdsQuoteConvention.QUOTED_SPREAD, "QuotedSpread"}, }; } @Test(dataProvider = "name") public void test_toString(CdsQuoteConvention convention, String name) { assertEquals(convention.toString(), name); } @Test(dataProvider = "name") public void test_of_lookup(CdsQuoteConvention convention, String name) { assertEquals(CdsQuoteConvention.of(name), convention); } public void test_of_lookup_notFound() { assertThrows(() -> CdsQuoteConvention.of("Rubbish"), IllegalArgumentException.class); } public void test_of_lookup_null() { assertThrows(() -> CdsQuoteConvention.of(null), IllegalArgumentException.class); } //------------------------------------------------------------------------- public void coverage() { coverEnum(CdsQuoteConvention.class); } public void test_serialization() { assertSerialization(CdsQuoteConvention.POINTS_UPFRONT); } public void test_jodaConvert() { assertJodaConvert(CdsQuoteConvention.class, CdsQuoteConvention.POINTS_UPFRONT); } }
[ "stephen@opengamma.com" ]
stephen@opengamma.com
35007adae04da4ae0c1c72a9993b84d8dc254ca1
70cbaeb10970c6996b80a3e908258f240cbf1b99
/WiFi万能钥匙dex1-dex2jar.jar.src/com/b/a/ad.java
8984a8f14270b12aa5a4bc36bafca77ace1cb2eb
[]
no_license
nwpu043814/wifimaster4.2.02
eabd02f529a259ca3b5b63fe68c081974393e3dd
ef4ce18574fd7b1e4dafa59318df9d8748c87d37
refs/heads/master
2021-08-28T11:11:12.320794
2017-12-12T03:01:54
2017-12-12T03:01:54
113,553,417
2
1
null
null
null
null
UTF-8
Java
false
false
3,686
java
package com.b.a; import java.lang.reflect.Type; final class ad<T> extends w<T> { ad(z paramz, Type paramType, av paramav, m paramm, au paramau, ay<x<?>> paramay, u paramu) { super(paramz, paramType, paramav, paramm, paramau, paramay, paramu); } private String a(l paraml) { return this.b.a(paraml); } protected final T a() { return (T)this.c.a(this.g); } public final void a(l paraml, Type paramType, Object paramObject) { try { if (!(this.f instanceof ac)) { paramType = new com/b/a/ae; paraml = new java/lang/StringBuilder; paraml.<init>("Expecting object found: "); paramType.<init>(this.f); throw paramType; } } catch (IllegalAccessException paraml) { throw new RuntimeException(paraml); } s locals = (s)this.f.o().a(a(paraml)); if (locals != null) { paraml.a(paramObject, a(paramType, locals)); } for (;;) { return; paraml.a(paramObject, null); } } public final void a(Object paramObject) {} public final void a(Object paramObject, Type paramType) { throw new ae("Expecting object but found array: " + paramObject); } public final void b(l paraml, Type paramType, Object paramObject) { try { if (!(this.f instanceof ac)) { paramType = new com/b/a/ae; paraml = new java/lang/StringBuilder; paraml.<init>("Expecting object found: "); paramType.<init>(this.f); throw paramType; } } catch (IllegalAccessException paraml) { throw new RuntimeException(paraml); } z localz = this.f.o().a(a(paraml)); if (localz != null) { paraml.a(paramObject, a(paramType, localz)); } for (;;) { return; paraml.a(paramObject, null); } } public final void b(Object paramObject) { if (!(this.f instanceof ag)) { throw new ae("Type information is unavailable, and the target object is not a primitive: " + this.f); } this.e = this.f.q().n(); } public final boolean c(l paraml, Type paramType, Object paramObject) { boolean bool2 = true; try { localObject = a(paraml); if (!(this.f instanceof ac)) { paraml = new com/b/a/ae; paramType = new java/lang/StringBuilder; paramType.<init>("Expecting object found: "); paraml.<init>(this.f); throw paraml; } } catch (IllegalAccessException paraml) { throw new RuntimeException(); } Object localObject = this.f.o().a((String)localObject); boolean bool3 = az.a(paramType); boolean bool1; if (localObject == null) { bool1 = bool2; } for (;;) { return bool1; if ((localObject instanceof ab)) { bool1 = bool2; if (!bool3) { paraml.a(paramObject, null); bool1 = bool2; } } else { aw localaw = new com/b/a/aw; localaw.<init>(null, paramType, false); paramType = localaw.a(this.d); if (paramType == null) { bool1 = false; } else { paramType = a((z)localObject, paramType); if (paramType == null) { bool1 = bool2; if (bool3) {} } else { paraml.a(paramObject, paramType); bool1 = bool2; } } } } } } /* Location: /Users/hanlian/Downloads/WiFi万能钥匙dex1-dex2jar.jar!/com/b/a/ad.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "lianh@jumei.com" ]
lianh@jumei.com
ede7a63e3726f613ddf9e467c3a0b2dca9398841
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/shake/d/a/o.java
455105c4614d7806873356351f781ef277b0e421
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
687
java
package com.tencent.mm.plugin.shake.d.a; import android.database.Cursor; import com.tencent.mm.sdk.e.e; import com.tencent.mm.sdk.e.i; public final class o extends i<n> { public static final String[] ciG = new String[0]; public static final String[] diD = new String[]{i.a(n.dhO, "shaketvhistory")}; public e diF; public o(e eVar) { super(eVar, n.dhO, "shaketvhistory", diD); this.diF = eVar; } public final Cursor bvi() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("SELECT * FROM shaketvhistory ORDER BY createtime DESC"); return this.diF.rawQuery(stringBuilder.toString(), null); } }
[ "707194831@qq.com" ]
707194831@qq.com
58b0c5fd335d889a45a8a5bf99cea79de358f70d
1938f671d53acfcc3f7b853f7fc9af348a089b4d
/modules/lwjgl/vulkan/src/generated/java/org/lwjgl/vulkan/NVShaderSmBuiltins.java
bbb847f4926b2c028508625b931536ee76b8bc7b
[ "LicenseRef-scancode-khronos", "LGPL-2.0-or-later", "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
Alex-----/lwjgl3
c51dc2e310c2a32553703c4b9c0d9d6eec123210
c56c3043a7b7f8dc1b5a1e5d4e5d1dc093e035e2
refs/heads/master
2021-06-22T09:56:38.089710
2021-04-11T07:23:14
2021-04-11T07:23:14
194,931,060
0
0
BSD-3-Clause
2019-07-02T20:34:17
2019-07-02T20:34:16
null
UTF-8
Java
false
false
3,031
java
/* * Copyright LWJGL. All rights reserved. * License terms: https://www.lwjgl.org/license * MACHINE GENERATED FILE, DO NOT EDIT */ package org.lwjgl.vulkan; /** * <h5>Description</h5> * * <p>This extension provides the ability to determine device-specific properties on NVIDIA GPUs. It provides the number of streaming multiprocessors (SMs), the maximum number of warps (subgroups) that can run on an SM, and shader builtins to enable invocations to identify which SM and warp a shader invocation is executing on.</p> * * <p>This extension enables support for the SPIR-V {@code ShaderSMBuiltinsNV} capability.</p> * * <p>These properties and built-ins <b>should</b> typically only be used for debugging purposes.</p> * * <dl> * <dt><b>Name String</b></dt> * <dd>{@code VK_NV_shader_sm_builtins}</dd> * <dt><b>Extension Type</b></dt> * <dd>Device extension</dd> * <dt><b>Registered Extension Number</b></dt> * <dd>155</dd> * <dt><b>Revision</b></dt> * <dd>1</dd> * <dt><b>Extension and Version Dependencies</b></dt> * <dd><ul> * <li>Requires Vulkan 1.1</li> * </ul></dd> * <dt><b>Contact</b></dt> * <dd><ul> * <li>Daniel Koch <a target="_blank" href="https://github.com/KhronosGroup/Vulkan-Docs/issues/new?title=VK_NV_shader_sm_builtins:%20&amp;body=@dgkoch%20">dgkoch</a></li> * </ul></dd> * <dt><b>Last Modified Date</b></dt> * <dd>2019-05-28</dd> * <dt><b>Interactions and External Dependencies</b></dt> * <dd><ul> * <li>This extension requires <a target="_blank" href="https://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/NV/SPV_NV_shader_sm_builtins.html">{@code SPV_NV_shader_sm_builtins}</a>.</li> * <li>This extension enables <a target="_blank" href="https://github.com/KhronosGroup/GLSL/blob/master/extensions/nv/GLSL_NV_shader_sm_builtins.txt">{@code GL_NV_shader_sm_builtins}</a> for GLSL source languages.</li> * </ul></dd> * <dt><b>Contributors</b></dt> * <dd><ul> * <li>Jeff Bolz, NVIDIA</li> * <li>Eric Werness, NVIDIA</li> * </ul></dd> * </dl> */ public final class NVShaderSmBuiltins { /** The extension specification version. */ public static final int VK_NV_SHADER_SM_BUILTINS_SPEC_VERSION = 1; /** The extension name. */ public static final String VK_NV_SHADER_SM_BUILTINS_EXTENSION_NAME = "VK_NV_shader_sm_builtins"; /** * Extends {@code VkStructureType}. * * <h5>Enum values:</h5> * * <ul> * <li>{@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV}</li> * <li>{@link #VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV}</li> * </ul> */ public static final int VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_FEATURES_NV = 1000154000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SM_BUILTINS_PROPERTIES_NV = 1000154001; private NVShaderSmBuiltins() {} }
[ "iotsakp@gmail.com" ]
iotsakp@gmail.com
ff1545b42e91f4cc212a22bb4712cfc2a2c090cc
e5bb4c1c5cb3a385a1a391ca43c9094e746bb171
/FMP/trunk/FMP/src/main/java/com/hzfh/fmp/facade/baseInfo/SmstempleteFacade.java
2353c8dcae19565621f06597743a6e930783bb5a
[]
no_license
FashtimeDotCom/huazhen
397143967ebed9d50073bfa4909c52336a883486
6484bc9948a29f0611855f84e81b0a0b080e2e02
refs/heads/master
2021-01-22T14:25:04.159326
2016-01-11T09:52:40
2016-01-11T09:52:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,707
java
package com.hzfh.fmp.facade.baseInfo; import com.hzfh.api.baseInfo.model.Smstemplete; import com.hzfh.api.baseInfo.model.query.SmstempleteCondition; import com.hzfh.api.baseInfo.service.SmstempleteService; import com.hzframework.contract.PagedList; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import java.util.List; public class SmstempleteFacade { private static ApplicationContext context = new ClassPathXmlApplicationContext("spring/hessian-baseInfo.xml"); public static PagedList<Smstemplete> getPagingList(SmstempleteCondition smstempleteCondition) { SmstempleteService smstempleteService = (SmstempleteService) context.getBean("smstempleteService"); return smstempleteService.getPagingList(smstempleteCondition); } public static int add(Smstemplete smstemplete){ SmstempleteService smstempleteService = (SmstempleteService) context.getBean("smstempleteService"); return smstempleteService.add(smstemplete); } public static int update(Smstemplete smstemplete){ SmstempleteService smstempleteService = (SmstempleteService) context.getBean("smstempleteService"); return smstempleteService.update(smstemplete); } public static List<Smstemplete> getList(){ SmstempleteService smstempleteService = (SmstempleteService) context.getBean("smstempleteService"); return smstempleteService.getList(); } public static Smstemplete getInfo(int id){ SmstempleteService smstempleteService = (SmstempleteService) context.getBean("smstempleteService"); return smstempleteService.getInfo(id); } }
[ "ulei0343@163.com" ]
ulei0343@163.com
d25e8fa9aae6499dcf5c21a0cb04b150bf4c6425
4b0bf4787e89bcae7e4759bde6d7f3ab2c81f849
/aliyun-java-sdk-dms-enterprise/src/main/java/com/aliyuncs/dms_enterprise/model/v20181101/AddLhMembersRequest.java
4d5a1d33342f399193183fc4974d34f3d4ff9e0b
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk
a263fa08e261f12d45586d1b3ad8a6609bba0e91
e19239808ad2298d32dda77db29a6d809e4f7add
refs/heads/master
2023-09-03T12:28:09.765286
2023-09-01T09:03:00
2023-09-01T09:03:00
39,555,898
1,542
1,317
NOASSERTION
2023-09-14T07:27:05
2015-07-23T08:41:13
Java
UTF-8
Java
false
false
2,945
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.dms_enterprise.model.v20181101; import com.aliyuncs.RpcAcsRequest; import java.util.List; import com.google.gson.Gson; import com.google.gson.annotations.SerializedName; import com.aliyuncs.http.MethodType; import com.aliyuncs.dms_enterprise.Endpoint; /** * @author auto create * @version */ public class AddLhMembersRequest extends RpcAcsRequest<AddLhMembersResponse> { private Long tid; @SerializedName("members") private List<Members> members; private Integer objectType; private Long objectId; public AddLhMembersRequest() { super("dms-enterprise", "2018-11-01", "AddLhMembers", "dms-enterprise"); setMethod(MethodType.POST); try { com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public Long getTid() { return this.tid; } public void setTid(Long tid) { this.tid = tid; if(tid != null){ putQueryParameter("Tid", tid.toString()); } } public List<Members> getMembers() { return this.members; } public void setMembers(List<Members> members) { this.members = members; if (members != null) { putQueryParameter("Members" , new Gson().toJson(members)); } } public Integer getObjectType() { return this.objectType; } public void setObjectType(Integer objectType) { this.objectType = objectType; if(objectType != null){ putQueryParameter("ObjectType", objectType.toString()); } } public Long getObjectId() { return this.objectId; } public void setObjectId(Long objectId) { this.objectId = objectId; if(objectId != null){ putQueryParameter("ObjectId", objectId.toString()); } } public static class Members { @SerializedName("Roles") private List<String> roles; @SerializedName("UserId") private Long userId; public List<String> getRoles() { return this.roles; } public void setRoles(List<String> roles) { this.roles = roles; } public Long getUserId() { return this.userId; } public void setUserId(Long userId) { this.userId = userId; } } @Override public Class<AddLhMembersResponse> getResponseClass() { return AddLhMembersResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
83b0f8caa1d6a35bc1deac8232ac5aa1ec836b1f
c074acf2945feebfe5927478eb36dee946364f0a
/design-pattern/src/main/java/com/chang/prototype/ConcretePrototype.java
95e4c9988f309b96fd7abd72a80e8739726c3a86
[]
no_license
wooyeeyii/think-in-java
fcbf9d7baf9fe30ac0dbdb8ebe43a98f69541175
3d8c7ab5a7ede7b9d625881bda350ecc19a47375
refs/heads/master
2021-11-08T17:08:10.117191
2021-11-05T01:22:40
2021-11-05T01:22:40
178,848,694
1
0
null
null
null
null
UTF-8
Java
false
false
241
java
package com.chang.prototype; //����ԭ�ͽ�ɫ public class ConcretePrototype implements Prototype { public Object clone() { // Prototype prototype = new ConcretePrototype(); return prototype; } }
[ "wooyeeyii@163.com" ]
wooyeeyii@163.com
9e49235d55740ee2387513b82aefc92867deca63
eaf45eab3bb7741f314eec67856d5c3cd7d9b5c6
/src/main/java/org/neo4j/gis/spatial/rtree/TreeMonitor.java
f23c0f4f86b69528b134fe4ac210bd9cd296155d
[]
no_license
YuhanSun/Riso-Tree
5df61cd2bfb547612e2ca24acbcb305306509c84
1ae89af6fad0454dc553e63fd7c34479e2fdd0bc
refs/heads/wiki_rtree
2022-05-25T19:04:26.061084
2021-01-24T22:50:09
2021-01-24T22:50:09
84,517,622
2
1
null
2022-05-20T20:57:42
2017-03-10T04:01:38
Java
UTF-8
Java
false
false
1,412
java
/** * Copyright (c) 2002-2013 "Neo Technology," Network Engine for Objects in Lund AB * [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 org.neo4j.gis.spatial.rtree; import org.neo4j.graphdb.Node; import java.util.List; import java.util.Map; public interface TreeMonitor { void setHeight(int height); int getHeight(); void addNbrRebuilt(RTreeIndex rtree); int getNbrRebuilt(); void addSplit(Node indexNode); void beforeMergeTree(Node indexNode, List<RTreeIndex.NodeWithEnvelope> right); void afterMergeTree(Node indexNode); int getNbrSplit(); void addCase(String key); Map<String, Integer> getCaseCounts(); void reset(); void matchedTreeNode(int level, Node node); List<Node> getMatchedTreeNodes(int level); }
[ "wdmzssyh@gmail.com" ]
wdmzssyh@gmail.com
6ccf655c41fef34051664f6a26e019ab1827483b
beba93c13d613d3e6ebbc1e7603085bc37538ae5
/airticket/src/main/java/ru/rrr/generated_entities/ReservationEntity.java
d4d272d97abd71e662f6dd66db24893bd2a26e71
[]
no_license
reset1301/javaProgs
c0f40da2701f9312e8d8aa070e55bcd25b085142
92979172ad66e6b5034cb433a050d06b364118ab
refs/heads/master
2022-12-23T23:33:39.077421
2019-10-26T18:29:50
2019-10-26T18:29:50
144,703,812
0
0
null
2022-12-16T04:32:39
2018-08-14T10:14:20
Java
UTF-8
Java
false
false
3,714
java
package ru.rrr.generated_entities; import javax.persistence.*; import java.util.Objects; @Entity @Table(name = "reservation", schema = "public", catalog = "airticket") public class ReservationEntity { private long id; private long flightId; private long passengerId; private int placeId; private String addInfo; private int reserveDatetime; private String code; private FlightEntity flightByFlightId; private PassengerEntity passengerByPassengerId; private SprPlaceEntity sprPlaceByPlaceId; @Id @Column(name = "id", nullable = false) public long getId() { return id; } public void setId(long id) { this.id = id; } @Basic @Column(name = "flight_id", nullable = false) public long getFlightId() { return flightId; } public void setFlightId(long flightId) { this.flightId = flightId; } @Basic @Column(name = "passenger_id", nullable = false) public long getPassengerId() { return passengerId; } public void setPassengerId(long passengerId) { this.passengerId = passengerId; } @Basic @Column(name = "place_id", nullable = false) public int getPlaceId() { return placeId; } public void setPlaceId(int placeId) { this.placeId = placeId; } @Basic @Column(name = "add_info", nullable = true, length = 255) public String getAddInfo() { return addInfo; } public void setAddInfo(String addInfo) { this.addInfo = addInfo; } @Basic @Column(name = "reserve_datetime", nullable = false) public int getReserveDatetime() { return reserveDatetime; } public void setReserveDatetime(int reserveDatetime) { this.reserveDatetime = reserveDatetime; } @Basic @Column(name = "code", nullable = false, length = 255) public String getCode() { return code; } public void setCode(String code) { this.code = code; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ReservationEntity that = (ReservationEntity) o; return id == that.id && flightId == that.flightId && passengerId == that.passengerId && placeId == that.placeId && reserveDatetime == that.reserveDatetime && Objects.equals(addInfo, that.addInfo) && Objects.equals(code, that.code); } @Override public int hashCode() { return Objects.hash(id, flightId, passengerId, placeId, addInfo, reserveDatetime, code); } @ManyToOne @JoinColumn(name = "flight_id", referencedColumnName = "id", nullable = false) public FlightEntity getFlightByFlightId() { return flightByFlightId; } public void setFlightByFlightId(FlightEntity flightByFlightId) { this.flightByFlightId = flightByFlightId; } @ManyToOne @JoinColumn(name = "passenger_id", referencedColumnName = "id", nullable = false) public PassengerEntity getPassengerByPassengerId() { return passengerByPassengerId; } public void setPassengerByPassengerId(PassengerEntity passengerByPassengerId) { this.passengerByPassengerId = passengerByPassengerId; } @ManyToOne @JoinColumn(name = "place_id", referencedColumnName = "id", nullable = false) public SprPlaceEntity getSprPlaceByPlaceId() { return sprPlaceByPlaceId; } public void setSprPlaceByPlaceId(SprPlaceEntity sprPlaceByPlaceId) { this.sprPlaceByPlaceId = sprPlaceByPlaceId; } }
[ "reset1301@mail.ru" ]
reset1301@mail.ru
6b568ab3595acc1a25f58453a4c59a2f0306b522
bf5a6ba4b7b216de771dff37bb70cf827d943659
/rapid-core/src/main/java/org/rapid/core/condition/MQConsumerCondition.java
e9e3d08468318d39671520d9b8feeb7ccba71892
[]
no_license
723854867/rapid
cb4ede1ae997fe169d33034bb998ab9abf0df278
72f7047d4d949503c87233d1a6695eb1e430cfde
refs/heads/master
2021-01-12T01:45:07.280777
2018-04-06T03:08:34
2018-04-06T03:08:34
121,467,272
1
0
null
null
null
null
UTF-8
Java
false
false
324
java
package org.rapid.core.condition; import org.rapid.core.CoreConsts; public class MQConsumerCondition extends ConfigrationCondtion<String> { public MQConsumerCondition() { super(CoreConsts.ACTIVEMQ_TYPE); } @Override protected boolean checkVal(String value) { return value.equals("consumer"); } }
[ "723854867@qq.com" ]
723854867@qq.com
db27583827002f5a2a366bc6c9de0d4f283fd876
3707e5fe5ba75fc4a8501a44c8dfb042adb7ca77
/IDEA132472/src/util/HibernateSessionFactory.java
05ea9dcc3a4583f9440b72ea193b9684d2e54add
[]
no_license
IdeaUJetBrains/TESTproject
2f9abba812245b6347e36620b42dadbea7727015
4127311b9626bf26e10ae758298085f9c2c66486
refs/heads/master
2021-01-17T12:54:08.156206
2018-10-17T10:15:31
2018-10-17T10:15:31
55,963,291
0
0
null
null
null
null
UTF-8
Java
false
false
971
java
package util; import org.hibernate.SessionFactory; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistry; /** * Created by Olga Pavlova on 5/27/2016. */ public class HibernateSessionFactory { private static final SessionFactory sessionFactory = buildSessionFactory1(); private static SessionFactory buildSessionFactory1() { Configuration configuration = new Configuration()//.setNamingStrategy(CustomNamingStrategy.INSTANCE) .configure(); ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder() .applySettings(configuration.getProperties()).build(); return configuration.buildSessionFactory(serviceRegistry); } public static SessionFactory getSessionFactory() { return sessionFactory; } public static void shutdown() { getSessionFactory().close(); } }
[ "olga.pavlova@jetbrains.com" ]
olga.pavlova@jetbrains.com
3e043992ec93023320f80eb9166aec85411bd368
1c0df66bdc53d84aea6f7aa1f0183cf6f8392ab1
/temp/src/minecraft/net/minecraft/inventory/InventoryCrafting.java
26dec863c7d019133882497c55771fdca107fdd5
[]
no_license
yuwenyong/Minecraft-1.9-MCP
9b7be179db0d7edeb74865b1a78d5203a5f75d08
bc89baf1fd0b5d422478619e7aba01c0b23bd405
refs/heads/master
2022-05-23T00:52:00.345068
2016-03-11T21:47:32
2016-03-11T21:47:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,228
java
package net.minecraft.inventory; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.ItemStackHelper; import net.minecraft.item.ItemStack; import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentTranslation; public class InventoryCrafting implements IInventory { private final ItemStack[] field_70466_a; private final int field_70464_b; private final int field_174924_c; private final Container field_70465_c; public InventoryCrafting(Container p_i1807_1_, int p_i1807_2_, int p_i1807_3_) { int i = p_i1807_2_ * p_i1807_3_; this.field_70466_a = new ItemStack[i]; this.field_70465_c = p_i1807_1_; this.field_70464_b = p_i1807_2_; this.field_174924_c = p_i1807_3_; } public int func_70302_i_() { return this.field_70466_a.length; } public ItemStack func_70301_a(int p_70301_1_) { return p_70301_1_ >= this.func_70302_i_()?null:this.field_70466_a[p_70301_1_]; } public ItemStack func_70463_b(int p_70463_1_, int p_70463_2_) { return p_70463_1_ >= 0 && p_70463_1_ < this.field_70464_b && p_70463_2_ >= 0 && p_70463_2_ <= this.field_174924_c?this.func_70301_a(p_70463_1_ + p_70463_2_ * this.field_70464_b):null; } public String func_70005_c_() { return "container.crafting"; } public boolean func_145818_k_() { return false; } public ITextComponent func_145748_c_() { return (ITextComponent)(this.func_145818_k_()?new TextComponentString(this.func_70005_c_()):new TextComponentTranslation(this.func_70005_c_(), new Object[0])); } public ItemStack func_70304_b(int p_70304_1_) { return ItemStackHelper.func_188383_a(this.field_70466_a, p_70304_1_); } public ItemStack func_70298_a(int p_70298_1_, int p_70298_2_) { ItemStack itemstack = ItemStackHelper.func_188382_a(this.field_70466_a, p_70298_1_, p_70298_2_); if(itemstack != null) { this.field_70465_c.func_75130_a(this); } return itemstack; } public void func_70299_a(int p_70299_1_, ItemStack p_70299_2_) { this.field_70466_a[p_70299_1_] = p_70299_2_; this.field_70465_c.func_75130_a(this); } public int func_70297_j_() { return 64; } public void func_70296_d() { } public boolean func_70300_a(EntityPlayer p_70300_1_) { return true; } public void func_174889_b(EntityPlayer p_174889_1_) { } public void func_174886_c(EntityPlayer p_174886_1_) { } public boolean func_94041_b(int p_94041_1_, ItemStack p_94041_2_) { return true; } public int func_174887_a_(int p_174887_1_) { return 0; } public void func_174885_b(int p_174885_1_, int p_174885_2_) { } public int func_174890_g() { return 0; } public void func_174888_l() { for(int i = 0; i < this.field_70466_a.length; ++i) { this.field_70466_a[i] = null; } } public int func_174923_h() { return this.field_174924_c; } public int func_174922_i() { return this.field_70464_b; } }
[ "jholley373@yahoo.com" ]
jholley373@yahoo.com
c8b4575f54e245afd1de7e30e7328a0543b7791f
966cf113352b90410cc3c9eb97a5bca2b95045f9
/wsale-service/src/main/java/jb/model/TzcOfflineTransfer.java
3677187f031a985cd7c4799d903b7cdad8960448
[]
no_license
xuwenming/wsale
964f56b181c45c90c625165bf4c40500c73609d6
ba933b561684d87bc98114240aef6c4dae2bef15
refs/heads/master
2021-01-13T10:48:41.230903
2017-08-08T09:22:43
2017-08-08T09:22:43
72,286,517
0
0
null
null
null
null
UTF-8
Java
false
false
6,813
java
/* * @author John * @date - 2017-03-24 */ package jb.model; import javax.persistence.*; import java.util.Date; import org.hibernate.annotations.DynamicInsert; import org.hibernate.annotations.DynamicUpdate; @SuppressWarnings("serial") @Entity @Table(name = "zc_offline_transfer") @DynamicInsert(true) @DynamicUpdate(true) public class TzcOfflineTransfer implements java.io.Serializable,IEntity{ private static final long serialVersionUID = 5454155825314635342L; //alias public static final String TABLE_ALIAS = "ZcOfflineTransfer"; public static final String ALIAS_ID = "主键"; public static final String ALIAS_USER_ID = "转账人ID"; public static final String ALIAS_TRANSFER_USER_NAME = "汇款人姓名"; public static final String ALIAS_TRANSFER_AMOUNT = "汇款金额"; public static final String ALIAS_TRANSFER_TIME = "汇款时间"; public static final String ALIAS_REMARK = "汇款备注"; public static final String ALIAS_HANDLE_STATUS = "处理状态"; public static final String ALIAS_HANDLE_USER_ID = "处理人"; public static final String ALIAS_HANDLE_REMARK = "处理结果"; public static final String ALIAS_HANDLE_TIME = "处理时间"; public static final String ALIAS_ADDTIME = "创建时间"; //date formats public static final String FORMAT_TRANSFER_TIME = jb.util.Constants.DATE_FORMAT_FOR_ENTITY; public static final String FORMAT_HANDLE_TIME = jb.util.Constants.DATE_FORMAT_FOR_ENTITY; public static final String FORMAT_ADDTIME = jb.util.Constants.DATE_FORMAT_FOR_ENTITY; //可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息 //columns START //@Length(max=36) private String id; private String transferNo; //@Length(max=36) private String userId; //@Length(max=6) private String transferUserName; // private Double transferAmount; // private Date transferTime; //@Length(max=128) private String remark; private String bankCode; //@Length(max=4) private String handleStatus; //@Length(max=36) private String handleUserId; //@Length(max=300) private String handleRemark; // private Date handleTime; private Boolean isWallet; // private Date addtime; //columns END public TzcOfflineTransfer(){ } public TzcOfflineTransfer(String id) { this.id = id; } public void setId(String id) { this.id = id; } @Id @Column(name = "id", unique = true, nullable = false, length = 36) public String getId() { return this.id; } @Column(name = "transfer_no", unique = false, nullable = true, insertable = true, updatable = true, length = 64) public String getTransferNo() { return transferNo; } public void setTransferNo(String transferNo) { this.transferNo = transferNo; } @Column(name = "user_id", unique = false, nullable = true, insertable = true, updatable = true, length = 36) public String getUserId() { return this.userId; } public void setUserId(String userId) { this.userId = userId; } @Column(name = "transfer_user_name", unique = false, nullable = true, insertable = true, updatable = true, length = 6) public String getTransferUserName() { return this.transferUserName; } public void setTransferUserName(String transferUserName) { this.transferUserName = transferUserName; } @Column(name = "transfer_amount", unique = false, nullable = true, insertable = true, updatable = true, length = 22) public Double getTransferAmount() { return this.transferAmount; } public void setTransferAmount(Double transferAmount) { this.transferAmount = transferAmount; } @Column(name = "transfer_time", unique = false, nullable = true, insertable = true, updatable = true, length = 19) public Date getTransferTime() { return this.transferTime; } public void setTransferTime(Date transferTime) { this.transferTime = transferTime; } @Column(name = "remark", unique = false, nullable = true, insertable = true, updatable = true, length = 128) public String getRemark() { return this.remark; } public void setRemark(String remark) { this.remark = remark; } @Column(name = "bank_code", unique = false, nullable = true, insertable = true, updatable = true, length = 4) public String getBankCode() { return bankCode; } public void setBankCode(String bankCode) { this.bankCode = bankCode; } @Column(name = "handle_status", unique = false, nullable = true, insertable = true, updatable = true, length = 4) public String getHandleStatus() { return this.handleStatus; } public void setHandleStatus(String handleStatus) { this.handleStatus = handleStatus; } @Column(name = "handle_user_id", unique = false, nullable = true, insertable = true, updatable = true, length = 36) public String getHandleUserId() { return this.handleUserId; } public void setHandleUserId(String handleUserId) { this.handleUserId = handleUserId; } @Column(name = "handle_remark", unique = false, nullable = true, insertable = true, updatable = true, length = 300) public String getHandleRemark() { return this.handleRemark; } public void setHandleRemark(String handleRemark) { this.handleRemark = handleRemark; } @Column(name = "handle_time", unique = false, nullable = true, insertable = true, updatable = true, length = 19) public Date getHandleTime() { return this.handleTime; } public void setHandleTime(Date handleTime) { this.handleTime = handleTime; } @Column(name = "is_wallet", unique = false, nullable = true, insertable = true, updatable = true, length = 0) public Boolean getIsWallet() { return isWallet; } public void setIsWallet(Boolean isWallet) { this.isWallet = isWallet; } @Column(name = "addtime", unique = false, nullable = true, insertable = true, updatable = true, length = 19) public Date getAddtime() { return this.addtime; } public void setAddtime(Date addtime) { this.addtime = addtime; } /* public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("Id",getId()) .append("UserId",getUserId()) .append("TransferUserName",getTransferUserName()) .append("TransferAmount",getTransferAmount()) .append("TransferTime",getTransferTime()) .append("Remark",getRemark()) .append("HandleStatus",getHandleStatus()) .append("HandleUserId",getHandleUserId()) .append("HandleRemark",getHandleRemark()) .append("HandleTime",getHandleTime()) .append("Addtime",getAddtime()) .toString(); } public int hashCode() { return new HashCodeBuilder() .append(getId()) .toHashCode(); } public boolean equals(Object obj) { if(obj instanceof ZcOfflineTransfer == false) return false; if(this == obj) return true; ZcOfflineTransfer other = (ZcOfflineTransfer)obj; return new EqualsBuilder() .append(getId(),other.getId()) .isEquals(); }*/ }
[ "252429711@qq.com" ]
252429711@qq.com
99d389ba28547cce40631402dadba27747944981
f8a14fec331ec56dd7e070fc032604117f155085
/gameserver/src/main/java/ru/l2/gameserver/model/actor/recorder/CharStatsChangeRecorder.java
429eaf2f12cc77798fbf3934a1f4ed381bb2b2e8
[]
no_license
OFRF/BladeRush
c2f06d050a1f2d79a9b50567b9f1152d6d755149
87329d131c0fcc8417ed15479298fdb90bc8f1d2
refs/heads/master
2023-03-25T13:51:04.404738
2020-05-04T14:37:23
2020-05-04T14:37:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,335
java
package ru.l2.gameserver.model.actor.recorder; import ru.l2.gameserver.model.Creature; import ru.l2.gameserver.model.base.TeamType; public class CharStatsChangeRecorder<T extends Creature> { public static final int BROADCAST_CHAR_INFO = 1; public static final int SEND_CHAR_INFO = 2; public static final int SEND_STATUS_INFO = 4; protected final T _activeChar; protected int _level; protected int _accuracy; protected int _attackSpeed; protected int _castSpeed; protected int _criticalHit; protected int _evasion; protected int _magicAttack; protected int _magicDefence; protected int _maxHp; protected int _maxMp; protected int _physicAttack; protected int _physicDefence; protected int _runSpeed; protected int _abnormalEffects; protected int _abnormalEffects2; protected int _abnormalEffects3; protected TeamType _team; protected int _changes; public CharStatsChangeRecorder(final T actor) { _activeChar = actor; } protected int set(final int flag, final int oldValue, final int newValue) { if (oldValue != newValue) { _changes |= flag; } return newValue; } protected long set(final int flag, final long oldValue, final long newValue) { if (oldValue != newValue) { _changes |= flag; } return newValue; } protected String set(final int flag, final String oldValue, final String newValue) { if (!oldValue.equals(newValue)) { _changes |= flag; } return newValue; } protected <E extends Enum<E>> E set(final int flag, final E oldValue, final E newValue) { if (oldValue != newValue) { _changes |= flag; } return newValue; } protected void refreshStats() { _accuracy = set(2, _accuracy, _activeChar.getAccuracy()); _attackSpeed = set(1, _attackSpeed, _activeChar.getPAtkSpd()); _castSpeed = set(1, _castSpeed, _activeChar.getMAtkSpd()); _criticalHit = set(2, _criticalHit, _activeChar.getCriticalHit(null, null)); _evasion = set(2, _evasion, _activeChar.getEvasionRate(null)); _runSpeed = set(1, _runSpeed, _activeChar.getRunSpeed()); _physicAttack = set(2, _physicAttack, _activeChar.getPAtk(null)); _physicDefence = set(2, _physicDefence, _activeChar.getPDef(null)); _magicAttack = set(2, _magicAttack, _activeChar.getMAtk(null, null)); _magicDefence = set(2, _magicDefence, _activeChar.getMDef(null, null)); _maxHp = set(4, _maxHp, _activeChar.getMaxHp()); _maxMp = set(4, _maxMp, _activeChar.getMaxMp()); _level = set(2, _level, _activeChar.getLevel()); _abnormalEffects = set(1, _abnormalEffects, _activeChar.getAbnormalEffect()); _abnormalEffects2 = set(1, _abnormalEffects2, _activeChar.getAbnormalEffect2()); _abnormalEffects3 = set(1, _abnormalEffects3, _activeChar.getAbnormalEffect3()); _team = set(1, _team, _activeChar.getTeam()); } public final void sendChanges() { refreshStats(); onSendChanges(); _changes = 0; } protected void onSendChanges() { if ((_changes & 0x4) == 0x4) { _activeChar.broadcastStatusUpdate(); } } }
[ "yadrov995@gmail.com" ]
yadrov995@gmail.com
2dc3a4035bf42205b58d01d1fdc4452e2944f537
0bfd35893ec68c908ed928551ce0839ed36d78ac
/work/src/org/kuali/kfs/sys/util/RestXmlUtil.java
d57a615937fa111bb9497a9bdae25d423240d68d
[]
no_license
dazali/kfs_dataobject_restservice
06f8464f65f6c232828f337dc2aabbfe8298f240
434272c1f58564802e59f1038e5239324fe14cfa
refs/heads/master
2020-12-25T10:36:35.663227
2014-07-28T19:07:28
2014-07-28T19:07:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,391
java
/* * Copyright 2014 The Kuali Foundation. * * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php * * 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.kuali.kfs.sys.util; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import org.apache.commons.lang.time.DateUtils; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.core.api.util.type.TypeUtils; import org.kuali.rice.krad.datadictionary.DataObjectEntry; import org.kuali.rice.krad.service.DataDictionaryService; import org.kuali.rice.krad.service.KRADServiceLocatorWeb; import org.kuali.rice.krad.service.PersistenceStructureService; import org.kuali.rice.krad.util.ObjectUtils; import com.thoughtworks.xstream.XStream; public class RestXmlUtil { private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(RestXmlUtil.class); private DataDictionaryService dataDictionaryService; private static final String[] DATE_FORMAT = {"MM/dd/yyyy", "yyyy-MM-dd"}; /** * * This method converts a map into xml in the format of <key>value</key> * * @param boName * @param o * @return */ public static String toXML(DataObjectEntry doe, Object o) { XStream xStream = getXStream(doe.getDataObjectClass().getName()); return xStream.toXML(o); } /** * * This method converts the xml back to map. * * @param boName * @param xml * @return */ public static Object fromXML(DataObjectEntry doe, String xml) { XStream xStream = getXStream(doe.getDataObjectClass().getName()); return xStream.fromXML(xml); } /** * * This method parses the xml back to list of business objects. * * @param doe * @param xml * @return * @throws Exception */ public static List<?> parseXML(DataObjectEntry doe, String xml) { List<Object> list = new ArrayList<Object>(); Object fromXML = fromXML(doe, xml); if (fromXML instanceof Collection) { Collection<Object> c = (Collection<Object>)fromXML; for (Object o : c) { Map<?,?> m = (Map<?,?>) o; list.add(populateBusinessObject(doe, m)); } } else if (fromXML instanceof Map) { Map<?,?> m = (Map<?,?>)fromXML; list.add(populateBusinessObject(doe, m)); } return list; } protected static Object populateBusinessObject(DataObjectEntry doe, Map<?,?> m) { Object bo = ObjectUtils.createNewObjectFromClass(doe.getDataObjectClass()); PersistenceStructureService persistenceStructureService = SpringContext.getBean(PersistenceStructureService.class); for (Object key : m.keySet()) { String propertyName = (String) key; Class<?> propertyType = ObjectUtils.getPropertyType(bo, propertyName, persistenceStructureService); if (propertyType != null) { try { Object propertyValue = m.get(key); if (propertyValue != null && !propertyValue.equals("null")) { String value = (String) propertyValue; if (TypeUtils.isIntegralClass(propertyType)) { propertyValue = Integer.parseInt(value); } else if (TypeUtils.isDecimalClass(propertyType)) { propertyValue = Float.parseFloat(value); } else if (TypeUtils.isTemporalClass(propertyType)) { propertyValue = KfsDateUtils.convertToSqlDate(DateUtils.parseDate(value, DATE_FORMAT)); } else if (TypeUtils.isBooleanClass(propertyType)) { propertyValue = Boolean.parseBoolean(value); } } else { propertyValue = null; } ObjectUtils.setObjectProperty(bo, propertyName, propertyValue); } catch (Exception ex) { LOG.error(ex); } } } return bo; } protected static XStream getXStream(String className) { XStream xStream = new XStream(); xStream.registerConverter(new MapEntryConverter()); xStream.alias(List.class.getName(), List.class); xStream.alias(className, Map.class); return xStream; } public DataDictionaryService getDataDictionaryService() { if (this.dataDictionaryService == null) { this.dataDictionaryService = KRADServiceLocatorWeb.getDataDictionaryService(); } return this.dataDictionaryService; } public void setDataDictionaryService(DataDictionaryService dataDictionaryService) { this.dataDictionaryService = dataDictionaryService; } }
[ "dazali@8e488046-810e-0410-995a-d32c8891de31" ]
dazali@8e488046-810e-0410-995a-d32c8891de31
dbf4a7f8336b636c7c2e35757702ba079763312d
ceaac3e69d60afad3f081c72cff6444e33e39f66
/src/main/java/fr/cnrs/dsi/sesame/frontend/security/DomainUserDetailsService.java
d1dae1cdb12778e11f161537174f81bc1b11d172
[]
no_license
tarek-github/jhipster-sample-application
4aa572fa9171095e6f2e74309b1a7cefd41c7a2f
c74a5e7e913e7bb6af46822c0ba7d8ba782e4c9e
refs/heads/master
2022-12-10T15:03:02.117416
2020-09-15T08:17:04
2020-09-15T08:17:04
295,660,610
0
0
null
null
null
null
UTF-8
Java
false
false
2,736
java
package fr.cnrs.dsi.sesame.frontend.security; import fr.cnrs.dsi.sesame.frontend.domain.User; import fr.cnrs.dsi.sesame.frontend.repository.UserRepository; import java.util.*; import java.util.stream.Collectors; import org.hibernate.validator.internal.constraintvalidators.hv.EmailValidator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; /** * Authenticate a user from the database. */ @Component("userDetailsService") public class DomainUserDetailsService implements UserDetailsService { private final Logger log = LoggerFactory.getLogger(DomainUserDetailsService.class); private final UserRepository userRepository; public DomainUserDetailsService(UserRepository userRepository) { this.userRepository = userRepository; } @Override @Transactional public UserDetails loadUserByUsername(final String login) { log.debug("Authenticating {}", login); if (new EmailValidator().isValid(login, null)) { return userRepository .findOneWithAuthoritiesByEmailIgnoreCase(login) .map(user -> createSpringSecurityUser(login, user)) .orElseThrow(() -> new UsernameNotFoundException("User with email " + login + " was not found in the database")); } String lowercaseLogin = login.toLowerCase(Locale.ENGLISH); return userRepository .findOneWithAuthoritiesByLogin(lowercaseLogin) .map(user -> createSpringSecurityUser(lowercaseLogin, user)) .orElseThrow(() -> new UsernameNotFoundException("User " + lowercaseLogin + " was not found in the database")); } private org.springframework.security.core.userdetails.User createSpringSecurityUser(String lowercaseLogin, User user) { if (!user.getActivated()) { throw new UserNotActivatedException("User " + lowercaseLogin + " was not activated"); } List<GrantedAuthority> grantedAuthorities = user .getAuthorities() .stream() .map(authority -> new SimpleGrantedAuthority(authority.getName())) .collect(Collectors.toList()); return new org.springframework.security.core.userdetails.User(user.getLogin(), user.getPassword(), grantedAuthorities); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
b8248e2bda48855a5bb0741ff458063a34b20d99
a6acf7165e121edd7e82b06e592e738c2a857f3e
/kodilla-good-patterns/src/main/java/com/kodilla/good/patterns/challenges/service/CarRentalRepository.java
be3c595ff01a2d5e8093b1b5ea490abf20b8c27e
[]
no_license
MilenaBo/nr1-MB-repository
d147fc22a61e8f94d9802b0edab57aa3ef3c44b7
67bd1c77e426b11679ba08b58b6337c65e88f083
refs/heads/master
2021-05-20T20:43:49.681697
2020-11-30T00:30:01
2020-11-30T00:30:01
252,410,496
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package com.kodilla.good.patterns.challenges.service; import java.time.LocalDateTime; public class CarRentalRepository implements RentalRepository { public void createRental(User user, LocalDateTime from, LocalDateTime to) { System.out.println("*********** CarRentalRepository "+user.getName()+user.getSurname() +" from "+from.toString()+" to "+to.toString()); } }
[ "nasz_email_do_github" ]
nasz_email_do_github
2de3283094eab5fabe283a5e1c0d2c1b06a78f35
78fc3e82fa22cc3b1819983786782800404dc69b
/src/main/java/sample/Controller.java
50a6f39b8beb04e2f30e9c478a3f13f9575dece4
[]
no_license
panmingzhi815/portMonitor
39dd7ef4ad0e438eb34016eee08250d47e6f75fb
b6e01447b524d6fe62a942921afcc66cf962b34f
refs/heads/master
2020-03-13T12:50:47.930790
2018-04-26T08:50:19
2018-04-26T08:50:19
131,127,416
1
2
null
null
null
null
UTF-8
Java
false
false
4,511
java
package sample; import javafx.beans.property.SimpleDoubleProperty; import javafx.beans.value.ObservableDoubleValue; import javafx.beans.value.ObservableValue; import javafx.fxml.Initializable; import javafx.scene.control.Alert; import javafx.scene.control.ProgressBar; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.scene.control.cell.PropertyValueFactory; import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl; import me.chanjar.weixin.cp.bean.WxCpMessage; import me.chanjar.weixin.cp.config.WxCpInMemoryConfigStorage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sample.model.MonitorModel; import sample.model.PortModel; import java.io.IOException; import java.net.InetSocketAddress; import java.net.Socket; import java.net.URL; import java.util.List; import java.util.ResourceBundle; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; public class Controller implements Initializable, Runnable { private static Logger LOGGER = LoggerFactory.getLogger(Controller.class); public ProgressBar process; public TableView<PortModel> table; public TableColumn<PortModel, String> ip; public TableColumn<PortModel, Integer> port; public TableColumn<PortModel, String> errorMsg; private MonitorModel monitorModel = new MonitorModel(); private WxCpServiceImpl wxCpService; private SimpleDoubleProperty processValue = new SimpleDoubleProperty(0); @Override public void initialize(URL location, ResourceBundle resources) { try { process.progressProperty().bind(processValue); ip.setCellValueFactory(new PropertyValueFactory<>("ip")); port.setCellValueFactory(new PropertyValueFactory<>("port")); errorMsg.setCellValueFactory(new PropertyValueFactory<>("errorMsg")); monitorModel = MonitorModel.load("config.json"); table.getItems().setAll(monitorModel.getPortList()); WxCpInMemoryConfigStorage config = new WxCpInMemoryConfigStorage(); config.setCorpId(monitorModel.getWeixinCorpId()); config.setCorpSecret(monitorModel.getWeixinCorpSecret()); config.setAgentId(monitorModel.getWeixinAgentId()); wxCpService = new WxCpServiceImpl(); wxCpService.setWxCpConfigStorage(config); final ScheduledExecutorService scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(); scheduledExecutorService.scheduleWithFixedDelay(this,3L, monitorModel.getTestSpeedSec(), TimeUnit.SECONDS); Executors.newSingleThreadScheduledExecutor().scheduleWithFixedDelay(()->{ sendWeixinMsg("我是微信告警小助手,我一直都在检查服务器的状态"); },3L,60L * 60 * 24,TimeUnit.SECONDS); } catch (Exception e) { LOGGER.error("启动应用异常",e); Alert alert = new Alert(Alert.AlertType.ERROR); alert.setHeaderText(e.getMessage()); alert.showAndWait(); } } @Override public void run() { List<PortModel> portList = monitorModel.getPortList(); for (PortModel item : portList) { LOGGER.info("正在检查端口:{}",item); int errorTimes = 0; for (int i = 0; i < monitorModel.getTestTimes(); i++) { processValue.set(processValue.get() >= 1 ? 0 : processValue.add(0.05).doubleValue()); try { Socket socket = new Socket(); socket.setSoTimeout(monitorModel.getTestTimes()); socket.connect(new InetSocketAddress(item.getIp(),item.getPort())); socket.close(); break; } catch (IOException e) { LOGGER.error("第{}次检查端口失败{}",i, item); errorTimes ++; } } if (errorTimes == monitorModel.getTestTimes()){ sendWeixinMsg(item.getErrorMsg()); } } } private void sendWeixinMsg(String text){ try { WxCpMessage message = WxCpMessage.TEXT().agentId(monitorModel.getWeixinAgentId()).toUser(monitorModel.getUserIds()).content(text).build(); wxCpService.messageSend(message); } catch (Exception e) { LOGGER.error("微信发送告警失败",e); } } }
[ "154341736@qq.com" ]
154341736@qq.com
999c4c61fe82236e03ef2e07cd2230c51cf259fe
9ee734247827006ed2ef201de7999b6e7dca6390
/ibm.jdk8/src/java/util/MissingFormatArgumentException.java
fcb716d5cd41dbcfc0e37b5e398b2545d268d2ba
[ "MIT" ]
permissive
flyzsd/java-code-snippets
33341764176f9ea4d023eaa75d36fb8be9786b97
1202b941ec4686d157fbc8643b65d247c6cd2b27
refs/heads/master
2021-01-13T07:48:23.217223
2017-06-23T04:45:12
2017-06-23T04:45:12
95,096,070
0
0
null
null
null
null
UTF-8
Java
false
false
1,876
java
/*=========================================================================== * Licensed Materials - Property of IBM * "Restricted Materials of IBM" * * IBM SDK, Java(tm) Technology Edition, v8 * (C) Copyright IBM Corp. 2003, 2003. All Rights Reserved * * US Government Users Restricted Rights - Use, duplication or disclosure * restricted by GSA ADP Schedule Contract with IBM Corp. *=========================================================================== */ /* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.util; /** * Unchecked exception thrown when there is a format specifier which does not * have a corresponding argument or if an argument index refers to an argument * that does not exist. * * <p> Unless otherwise specified, passing a <tt>null</tt> argument to any * method or constructor in this class will cause a {@link * NullPointerException} to be thrown. * * @since 1.5 */ public class MissingFormatArgumentException extends IllegalFormatException { private static final long serialVersionUID = 19190115L; private String s; /** * Constructs an instance of this class with the unmatched format * specifier. * * @param s * Format specifier which does not have a corresponding argument */ public MissingFormatArgumentException(String s) { if (s == null) throw new NullPointerException(); this.s = s; } /** * Returns the unmatched format specifier. * * @return The unmatched format specifier */ public String getFormatSpecifier() { return s; } public String getMessage() { return "Format specifier '" + s + "'"; } }
[ "zhangshudong@gmail.com" ]
zhangshudong@gmail.com
0dac47f4dd247c6ddc4736b5b85f481282f7be9c
205e7175c428ff9d83d8bded152d22de92c8b030
/mpos_srv/src/main/java/com/site/entity/TPosSaleDetailFore.java
467b47444fd93042916e9b817559f4d5ecae8692
[]
no_license
langrs/mpos
e0039ce479a052a9ff21b9ba55b96c447f75561c
837c536c527179eba1bec6f7c954ea9a6d18ea0f
refs/heads/master
2020-03-23T20:20:10.035520
2018-07-23T15:41:25
2018-07-23T15:42:16
142,035,656
0
0
null
null
null
null
UTF-8
Java
false
false
5,981
java
package com.site.entity; import java.util.Date; import java.io.Serializable; /** * FUNCTION:TPosSaleDetailFore Entity * COMPANY:SZUNIC * AUTHOR:LZM */ public class TPosSaleDetailFore implements Serializable { private static final long serialVersionUID = 1L; // protected String sheetNo; // protected String sheetSort; // protected String itemNo; // protected String saleBarcode; // protected String itemUnit; // protected String unitType; // protected Double unitPack; // protected Double orgPrice; // protected Double realPrice; // protected Double saleQty; // protected String saleSign; // protected Double saleAmt; // protected String saleMan; // protected String counterNo; // protected String manageType; // protected String specialType; // protected String specialNo; // protected String itemIspack; // protected Double jsQty; // protected String saleMemo; // protected String saleBytxt1; // protected String saleBytxt2; // protected String saleBytxt3; // protected Double saleBynum1; // protected Double saleBynum2; // protected Double saleBynum3; // protected Double allzkForeRealPrice; // protected String allzkForeSpecialType; // protected Double ManageLyRate; // protected String lySupNo; // protected Double insideTaxAmt; // protected String isPackage; public void setSheetNo(String sheetNo) { this.sheetNo = sheetNo; } public String getSheetNo() { return this.sheetNo; } public void setSheetSort(String sheetSort) { this.sheetSort = sheetSort; } public String getSheetSort() { return this.sheetSort; } public void setItemNo(String itemNo) { this.itemNo = itemNo; } public String getItemNo() { return this.itemNo; } public void setSaleBarcode(String saleBarcode) { this.saleBarcode = saleBarcode; } public String getSaleBarcode() { return this.saleBarcode; } public void setItemUnit(String itemUnit) { this.itemUnit = itemUnit; } public String getItemUnit() { return this.itemUnit; } public void setUnitType(String unitType) { this.unitType = unitType; } public String getUnitType() { return this.unitType; } public void setUnitPack(Double unitPack) { this.unitPack = unitPack; } public Double getUnitPack() { return this.unitPack; } public void setOrgPrice(Double orgPrice) { this.orgPrice = orgPrice; } public Double getOrgPrice() { return this.orgPrice; } public void setRealPrice(Double realPrice) { this.realPrice = realPrice; } public Double getRealPrice() { return this.realPrice; } public void setSaleQty(Double saleQty) { this.saleQty = saleQty; } public Double getSaleQty() { return this.saleQty; } public void setSaleSign(String saleSign) { this.saleSign = saleSign; } public String getSaleSign() { return this.saleSign; } public void setSaleAmt(Double saleAmt) { this.saleAmt = saleAmt; } public Double getSaleAmt() { return this.saleAmt; } public void setSaleMan(String saleMan) { this.saleMan = saleMan; } public String getSaleMan() { return this.saleMan; } public void setCounterNo(String counterNo) { this.counterNo = counterNo; } public String getCounterNo() { return this.counterNo; } public void setManageType(String manageType) { this.manageType = manageType; } public String getManageType() { return this.manageType; } public void setSpecialType(String specialType) { this.specialType = specialType; } public String getSpecialType() { return this.specialType; } public void setSpecialNo(String specialNo) { this.specialNo = specialNo; } public String getSpecialNo() { return this.specialNo; } public void setItemIspack(String itemIspack) { this.itemIspack = itemIspack; } public String getItemIspack() { return this.itemIspack; } public void setJsQty(Double jsQty) { this.jsQty = jsQty; } public Double getJsQty() { return this.jsQty; } public void setSaleMemo(String saleMemo) { this.saleMemo = saleMemo; } public String getSaleMemo() { return this.saleMemo; } public void setSaleBytxt1(String saleBytxt1) { this.saleBytxt1 = saleBytxt1; } public String getSaleBytxt1() { return this.saleBytxt1; } public void setSaleBytxt2(String saleBytxt2) { this.saleBytxt2 = saleBytxt2; } public String getSaleBytxt2() { return this.saleBytxt2; } public void setSaleBytxt3(String saleBytxt3) { this.saleBytxt3 = saleBytxt3; } public String getSaleBytxt3() { return this.saleBytxt3; } public void setSaleBynum1(Double saleBynum1) { this.saleBynum1 = saleBynum1; } public Double getSaleBynum1() { return this.saleBynum1; } public void setSaleBynum2(Double saleBynum2) { this.saleBynum2 = saleBynum2; } public Double getSaleBynum2() { return this.saleBynum2; } public void setSaleBynum3(Double saleBynum3) { this.saleBynum3 = saleBynum3; } public Double getSaleBynum3() { return this.saleBynum3; } public void setAllzkForeRealPrice(Double allzkForeRealPrice) { this.allzkForeRealPrice = allzkForeRealPrice; } public Double getAllzkForeRealPrice() { return this.allzkForeRealPrice; } public void setAllzkForeSpecialType(String allzkForeSpecialType) { this.allzkForeSpecialType = allzkForeSpecialType; } public String getAllzkForeSpecialType() { return this.allzkForeSpecialType; } public void setManageLyRate(Double ManageLyRate) { this.ManageLyRate = ManageLyRate; } public Double getManageLyRate() { return this.ManageLyRate; } public void setLySupNo(String lySupNo) { this.lySupNo = lySupNo; } public String getLySupNo() { return this.lySupNo; } public void setInsideTaxAmt(Double insideTaxAmt) { this.insideTaxAmt = insideTaxAmt; } public Double getInsideTaxAmt() { return this.insideTaxAmt; } public void setIsPackage(String isPackage) { this.isPackage = isPackage; } public String getIsPackage() { return this.isPackage; } }
[ "27617839@qq.com" ]
27617839@qq.com
d2199d1d096a2fd5a3d021013c65566cf9c2b8e4
ae10ea9be64e610b58374399894a25aa5070fd0e
/uhomeBase/src/test/java/com/ytoxl/module/uhome/uhomebase/service/SenderMailTest.java
e56dc87ea194252b95cb70c64a7da00f4db947e0
[]
no_license
ichoukou/uhome
71887423893981b614a29643d89a5ecbb3ee646a
09407e4d28c2b169f4890853173c7dbb48a609b6
refs/heads/master
2020-05-20T23:55:38.324369
2018-11-28T05:31:25
2018-11-28T05:31:25
185,812,444
0
1
null
2019-05-09T14:12:50
2019-05-09T14:12:49
null
UTF-8
Java
false
false
806
java
package com.ytoxl.module.uhome.uhomebase.service; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.HashMap; import java.util.Map; import javax.mail.MessagingException; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import com.ytoxl.module.mail.service.MailService; import com.ytoxl.module.uhome.uhomebase.BaseTest; import freemarker.template.TemplateException; public class SenderMailTest extends BaseTest{ @Autowired private MailService mailService; @Test public void testSenderMail() throws UnsupportedEncodingException, MessagingException, IOException, TemplateException { Map<String,String> map = new HashMap<String,String>(); mailService.sendMail("594566751@qq.com", "rePassword",map , "123456"); } }
[ "caozhi_soft@163.com" ]
caozhi_soft@163.com
eb476a471ee6440711ad0d91c108495eeea5dbbc
9481441312a3e30fcfa4abce17a147166d496af9
/webserver/src/main/java/dmt/server/service/exception/AuthenticationException.java
ccde60fc5f686a4ba90951a66d69be11830cbdc4
[ "Apache-2.0" ]
permissive
marcoromagnolo/delivery-management-tool
b20daa7f7aed6b2f5dcfac8161eb209a1ac16e5e
f13763da7a3f3946cee2774b90f72d85c79075cd
refs/heads/master
2021-05-09T22:33:08.281902
2018-01-24T15:47:22
2018-01-24T15:47:22
118,757,188
0
0
null
null
null
null
UTF-8
Java
false
false
275
java
package dmt.server.service.exception; import dmt.server.enums.ErrorType; /** * @author Marco Romagnolo */ public class AuthenticationException extends AbstractServiceException { public AuthenticationException(ErrorType errorType) { super(errorType); } }
[ "mail@marcoromagnolo.it" ]
mail@marcoromagnolo.it
a825abf170174372ca1a7a1c2fbfbfc19c1a7cec
460805f5ce256852e96da8a02dadc4a220313901
/original-java/com/ifengyu/intercom/ui/map/d/a/c.java
034ae5e37de3f775e7ca83d3a1fe78e4d9910478
[]
no_license
Mi-Walkie-Talkie-by-Darkhorse/Mi-Walkie-Talkie-Plus
bab78cd8cea85af901d1bab6dc9f68f673727419
d47857800bb3a9f1deae5b4b6c6a3c44c1a78748
refs/heads/2.9.34-plus
2023-05-29T20:00:38.390971
2022-02-22T11:03:47
2022-02-22T11:03:47
221,777,793
49
10
null
2019-12-13T12:13:29
2019-11-14T20:07:47
Smali
UTF-8
Java
false
false
1,921
java
package com.ifengyu.intercom.ui.map.d.a; import android.graphics.Bitmap; import android.graphics.drawable.BitmapDrawable; import android.location.Location; import com.ifengyu.intercom.MiTalkiApp; import com.ifengyu.intercom.R; import org.osmdroid.util.GeoPoint; import org.osmdroid.views.MapView; import org.osmdroid.views.overlay.mylocation.IMyLocationProvider; import org.osmdroid.views.overlay.mylocation.MyLocationNewOverlay; /* compiled from: MyLocationOverlay */ public class c extends MyLocationNewOverlay { private GeoPoint a = new GeoPoint(0, 0); public c(IMyLocationProvider iMyLocationProvider, MapView mapView) { super(iMyLocationProvider, mapView); setDirectionArrow(((BitmapDrawable) mapView.getContext().getResources().getDrawable(R.drawable.icon_for_my_location)).getBitmap(), ((BitmapDrawable) mapView.getContext().getResources().getDrawable(R.drawable.icon_for_my_location)).getBitmap()); this.mCirclePaint.setColor(-12272701); } public void onLocationChanged(Location location, IMyLocationProvider iMyLocationProvider) { super.onLocationChanged(location, iMyLocationProvider); if (((d) iMyLocationProvider).a() && MiTalkiApp.a().e()) { this.a.setLatitude(location.getLatitude()); this.a.setLongitude(location.getLongitude()); this.mMapView.getController().animateTo(this.a); } } public void setDirectionArrow(Bitmap bitmap, Bitmap bitmap2) { this.mPersonBitmap = bitmap; this.mDirectionArrowBitmap = bitmap2; this.mDirectionArrowCenterX = ((float) this.mDirectionArrowBitmap.getWidth()) / 2.0f; this.mDirectionArrowCenterY = ((float) this.mDirectionArrowBitmap.getHeight()) / 2.0f; } public void stopLocationProvider() { if (this.mMyLocationProvider != null) { this.mMyLocationProvider.stopLocationProvider(); } } }
[ "Mi-Walkie-Talkie-by-Darkhorse@der-ball-ist-rund.net" ]
Mi-Walkie-Talkie-by-Darkhorse@der-ball-ist-rund.net
04b856e60a81f83054d41adbe7e7c1351ad5b52b
af66630bdef2969ea0df431aa86ae1689e03b67f
/app/src/main/java/com/mmy/maimaiyun/model/main/presenter/VolumePresenter.java
e7e1e57bfbfe19f7923e710f63a6c1b8d83391cb
[]
no_license
IkeFan/mymyyun
f58650d9aeab2bab2102eec5137d2081fc3e1bf3
2d76528c51e18d8b36a0e109bd0dbc5275557f52
refs/heads/master
2020-03-29T11:43:23.943929
2018-09-28T03:40:42
2018-09-28T03:40:42
149,867,311
0
0
null
null
null
null
UTF-8
Java
false
false
2,270
java
package com.mmy.maimaiyun.model.main.presenter; import com.google.gson.reflect.TypeToken; import com.mmy.maimaiyun.base.able.BaseBean; import com.mmy.maimaiyun.base.able.OnLoadDataListener; import com.mmy.maimaiyun.base.mvp.BasePresenter; import com.mmy.maimaiyun.data.bean.ActivityCateBean; import com.mmy.maimaiyun.data.bean.ActivitySubCateBean; import com.mmy.maimaiyun.data.bean.ActvityGoodInfoBean; import com.mmy.maimaiyun.model.main.model.IActivityGoodsModel; import com.mmy.maimaiyun.model.main.model.VolumeModel; import com.mmy.maimaiyun.model.main.ui.activity.GoodInfoActivity; import com.mmy.maimaiyun.model.main.view.VolumeView; import java.lang.reflect.Type; import java.util.List; import javax.inject.Inject; /** * @创建者 lucas * @创建时间 2017/9/12 0012 15:21 * @描述 TODO */ public class VolumePresenter extends BasePresenter<VolumeView> { private VolumeView mView; @Inject VolumeModel mModel; private List<ActivitySubCateBean<List<ActvityGoodInfoBean>>> mData; @Inject public VolumePresenter(VolumeView view) { mView = view; } public void loadData(){ IActivityGoodsModel.ActivityRequestBody body = new IActivityGoodsModel.ActivityRequestBody(); body.status = IActivityGoodsModel.Status.OPEN_AND_SHOW_HOME; body.activityId = 10; body.isShowGoods = 1; mModel.getActivityGoods(new OnLoadDataListener<BaseBean<List<ActivityCateBean<List<ActivitySubCateBean<List<ActvityGoodInfoBean>>>>>>>(mView.findLoadingSmartLayout()) { @Override public void onResponse(String body, BaseBean<List<ActivityCateBean<List<ActivitySubCateBean<List<ActvityGoodInfoBean>>>>>> data) { mData = data.data.get(0).subCate; mView.refreshList(mData); } @Override public void onFailure(String body, Throwable t) { } @Override public Type getBeanType() { return new TypeToken<BaseBean<List<ActivityCateBean<List<ActivitySubCateBean<List<ActvityGoodInfoBean>>>>>>>(){}.getType(); } },body); } public void openInfoPage(String id) { mView.openActivity(GoodInfoActivity.class,"id="+id); } }
[ "652918554@qq.com" ]
652918554@qq.com
9ac7bb640358a097303655c706c018c82857284b
995f73d30450a6dce6bc7145d89344b4ad6e0622
/MATE-20_EMUI_11.0.0/src/main/java/ohos/hiviewdfx/xcollie/XCollie.java
8bc68b35c116b97c8e334aa74ace91bbcd3ce01f
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,273
java
package ohos.hiviewdfx.xcollie; import ohos.hiviewdfx.FreezeDetectorUtils; import ohos.hiviewdfx.HiLog; public final class XCollie { public static final long XCOLLIE_FLAG_DEFAULT = -1; public static final long XCOLLIE_FLAG_LOG = 1; public static final long XCOLLIE_FLAG_NOOP = 0; public static final long XCOLLIE_FLAG_RECOVERY = 2; public static final int XCOLLIE_INVALID_ID = -1; public static final long XCOLLIE_LOCK = 1; public static final long XCOLLIE_THREAD = 2; private static volatile XCollie xCollie; private native void nativeCancelTimer(int i); private native boolean nativeRegisterXCollieChecker(XCollieChecker xCollieChecker, String str, long j); private native int nativeSetTimer(XCollieTimer xCollieTimer, String str, long j, long j2); private native boolean nativeUpdateTimer(int i, long j); private XCollie() { } public static XCollie getInstance() { FreezeDetectorUtils.loadJniLibrary(); if (xCollie == null) { synchronized (XCollie.class) { if (xCollie == null) { xCollie = new XCollie(); } } } return xCollie; } public boolean registerXCollieChecker(XCollieChecker xCollieChecker, long j) { if (xCollieChecker == null) { HiLog.error(FreezeDetectorUtils.LOG_TAG, "input checker is null", new Object[0]); return false; } else if ((1 & j) != 0 || (2 & j) != 0) { return nativeRegisterXCollieChecker(xCollieChecker, xCollieChecker.getXCollieCheckerName(), j); } else { HiLog.error(FreezeDetectorUtils.LOG_TAG, "input checker is null", new Object[0]); return false; } } public int setTimer(XCollieTimer xCollieTimer, long j) { if (xCollieTimer != null) { return nativeSetTimer(xCollieTimer, xCollieTimer.getTimerName(), xCollieTimer.getTimeout(), j); } HiLog.error(FreezeDetectorUtils.LOG_TAG, "input xcollieTimer is null", new Object[0]); return -1; } public void cancelTimer(int i) { nativeCancelTimer(i); } public boolean updateTimer(int i, long j) { return nativeUpdateTimer(i, j); } }
[ "dstmath@163.com" ]
dstmath@163.com
06e6f7965280c0ee6de236d724438b634a5d5a93
93bb5785ee04ad297e1c8ed32fef5187ae2d291a
/aecopdDB/src/com/dao/RelivateDao.java
96391441b4ef1031dcdf3985b3ea63b2d35c9a2e
[ "Apache-2.0" ]
permissive
DanDaye/AECOPDWEBSERVICE
5d81e622321d983614f8973868031233d2b21af9
387173122434684a1e0495287d093dd8c02fe530
refs/heads/master
2020-03-16T01:27:33.399129
2018-05-15T13:11:03
2018-05-15T13:11:03
132,440,808
0
0
null
null
null
null
UTF-8
Java
false
false
1,383
java
package com.dao; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.ArrayList; import java.util.List; import com.entity.Relivate; public class RelivateDao { static String sql = null; static db_connection db1 = null; static ResultSet ret = null; public List<Relivate> findRelivate(String find){ List<Relivate> l = new ArrayList<Relivate>(); sql = "SELECT * FROM `relivateRate` where relivateRate.machine_id ="+find+" order by relivateRate.Date";//SQL闁跨喐鏋婚幏鐑芥晸閿燂拷 db1= new db_connection(sql);//闁跨喐鏋婚幏鐑芥晸閺傘倖瀚筪b_connection闁跨喐鏋婚幏鐑芥晸閺傘倖瀚� try{ ret = db1.pst.executeQuery(); ret.beforeFirst(); while(ret.next()){ Relivate h = new Relivate(); Timestamp t = ret.getTimestamp("Date"); h.setDate(t.toString()); h.setrelivate(ret.getString("relivate")); l.add(h); } }catch(Exception e){ e.printStackTrace(); }finally{ if(db1!=null) try { db1.pst.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } if(l.size()<=5){ return l; }else{ return l.subList(l.size()-5, l.size()); } } }
[ "jinsi_l@foxmail.com" ]
jinsi_l@foxmail.com
9702415597a10cf528d31074136d8f631cbf435e
a36dce4b6042356475ae2e0f05475bd6aed4391b
/2005/webcommon/com/hps/july/arenda/valueobject/PositionDopInfoVO.java
17bf48aff98545d2d412e462282b301243586372
[]
no_license
ildar66/WSAD_NRI
b21dbee82de5d119b0a507654d269832f19378bb
2a352f164c513967acf04d5e74f36167e836054f
refs/heads/master
2020-12-02T23:59:09.795209
2017-07-01T09:25:27
2017-07-01T09:25:27
95,954,234
0
1
null
null
null
null
WINDOWS-1251
Java
false
false
3,859
java
package com.hps.july.arenda.valueobject; /** * Insert the type's description here. * Creation date: (27.12.2004 16:01:41) * @author: Shafigullin Ildar */ public class PositionDopInfoVO { private java.lang.String applaceTypeName;//тип помещения private java.lang.String apparatTypeName;//тип аппаратной private String apparatPlaceName;//местонахождение аппаратной private java.lang.String oporaPlaceName;//место размещения опоры private java.lang.String antennPlaceName;//место размещения антен private java.lang.String isvc;//если Y то отображаем опору, иначе не отображаем поля (место размещения опоры и чужая опора) private java.lang.String oporaour;//чужая опора (Y -да, N - нет) /** * PositionDopInfoVO constructor comment. */ public PositionDopInfoVO() { super(); } /** * Insert the method's description here. * Creation date: (27.12.2004 16:07:29) * @return java.lang.String */ public java.lang.String getAntennPlaceName() { return antennPlaceName; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:05:24) * @return String */ public String getApparatPlaceName() { return apparatPlaceName; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:02:32) * @return java.lang.String */ public java.lang.String getApparatTypeName() { return apparatTypeName; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:02:13) * @return java.lang.String */ public java.lang.String getApplaceTypeName() { return applaceTypeName; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:07:51) * @return java.lang.String */ public java.lang.String getIsvc() { return isvc; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:08:52) * @return java.lang.String */ public java.lang.String getOporaour() { return oporaour; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:06:50) * @return java.lang.String */ public java.lang.String getOporaPlaceName() { return oporaPlaceName; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:07:29) * @param newAntennPlaceName java.lang.String */ public void setAntennPlaceName(java.lang.String newAntennPlaceName) { antennPlaceName = newAntennPlaceName; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:05:24) * @param newApparatPlaceName String */ public void setApparatPlaceName(String newApparatPlaceName) { apparatPlaceName = newApparatPlaceName; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:02:32) * @param newApparattypename java.lang.String */ public void setApparatTypename(java.lang.String newApparatTypeName) { apparatTypeName = newApparatTypeName; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:02:13) * @param newApplacetypeName java.lang.String */ public void setApplacetypeName(java.lang.String newApplaceTypeName) { applaceTypeName = newApplaceTypeName; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:07:51) * @param newIsvc java.lang.String */ public void setIsvc(java.lang.String newIsvc) { isvc = newIsvc; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:08:52) * @param newOporaour java.lang.String */ public void setOporaour(java.lang.String newOporaour) { oporaour = newOporaour; } /** * Insert the method's description here. * Creation date: (27.12.2004 16:06:50) * @param newOporaPlaceName java.lang.String */ public void setOporaPlaceName(java.lang.String newOporaPlaceName) { oporaPlaceName = newOporaPlaceName; } }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
bb4809177174891653c2404497f43e71aad59c7a
f081da8f16da9cd23d03659e96925a47ac12f068
/src/main/java/BP/kflowweb/WebServiceImp/Test.java
4bd529adae353489358e0a163f6b41acac705a6c
[]
no_license
konglong123/KFlow
df671510d601724d1cb5ee1efd52a172c7915dcf
01fc4a782791df8e800b26bdd3f3abc6dd83259b
refs/heads/master
2023-02-02T15:14:12.531378
2020-12-24T11:15:10
2020-12-24T11:15:10
228,565,169
1
2
null
2020-06-15T07:02:17
2019-12-17T08:06:36
JavaScript
UTF-8
Java
false
false
2,101
java
package BP.kflowweb.WebServiceImp; import java.util.Hashtable; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.namespace.QName; public class Test { public static void main(String[] args) throws Exception { //服务的地址 String weBPath="http://localhost:8080/jflow-web/services/LoacalWS"; String UserNo="admin"; try { // 以下都是套路 Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress(weBPath); call.setOperationName(new QName("http://WebServiceImp","SendWork"));// WSDL里面描述的接口名称 call.addParameter("flowNo", org.apache.axis.encoding.XMLType.XSD_DATE, javax.xml.rpc.ParameterMode.IN);// 接口的参数 call.addParameter("workid", org.apache.axis.encoding.XMLType.XSD_DATE, javax.xml.rpc.ParameterMode.IN);// 接口的参数 call.addParameter("ht", org.apache.axis.encoding.XMLType.XSD_DATE, javax.xml.rpc.ParameterMode.IN);// 接口的参数 call.addParameter("toNodeID", org.apache.axis.encoding.XMLType.XSD_DATE, javax.xml.rpc.ParameterMode.IN);// 接口的参数 call.addParameter("toEmps", org.apache.axis.encoding.XMLType.XSD_DATE, javax.xml.rpc.ParameterMode.IN);// 接口的参数 call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);// 设置返回类型 String temp = "admin"; Hashtable ht = new Hashtable(); ht.put("ZiDuan1", "111"); ht.put("ZiDuan2", "222"); String result = (String) call.invoke(new Object[] { "226",(long)798,ht,22602,"zhangyifan" }); // 给方法传递参数,并且调用方法 System.out.println("result is " + result); } catch (Exception e) { System.err.println(e.toString()); } } }
[ "17888821571@163.com" ]
17888821571@163.com
dfacb25b04e5fd470f316536fb54277a24d1ff79
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/MOCKITO-16b-4-29-Single_Objective_GGA-WeightedSum/org/mockito/Mockito_ESTest.java
6c32f7288f4c10dbb41ddbe286abf5939a967296
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
657
java
/* * This file was automatically generated by EvoSuite * Tue Mar 31 12:29:07 UTC 2020 */ package org.mockito; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.mockito.Mockito; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class Mockito_ESTest extends Mockito_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { // Undeclared exception! Mockito.when((Object) null); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
77e49d33d561530ea1d8f0d42c28536956f2c1cb
a38848f0a9212cefc6c79177b3bddf7f45b4e8f9
/SoaDependencyAnalyzerWebLib/src/com/tomecode/soa/ora/osb10g/services/protocols/dsp/DSPServer.java
509227f610c6711c76668bc5cab569e327daf9d7
[]
no_license
ramazanfirin/soadepanalzerweblib
aa8e884967a1c6aeb5fbff4db45c454daeb9793f
0f9cd9cc6737d751863bd3554c6c91b48fa0698b
refs/heads/master
2020-05-02T21:25:42.554862
2015-05-11T05:30:59
2015-05-11T05:30:59
35,404,098
0
0
null
null
null
null
UTF-8
Java
false
false
3,741
java
package com.tomecode.soa.ora.osb10g.services.protocols.dsp; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.graphics.Image; import com.tomecode.soa.dependency.analyzer.gui.utils.PropertyGroupView; import com.tomecode.soa.dependency.analyzer.icons.ImageFace; import com.tomecode.soa.dependency.analyzer.icons.ImageFactory; import com.tomecode.soa.dependency.analyzer.view.graph.ToolTip; import com.tomecode.soa.ora.osb10g.services.OSBService; import com.tomecode.soa.ora.osb10g.services.config.EndpointDsp; import com.tomecode.soa.protocols.Node; /** * (c) Copyright Tomecode.com, 2010,2011. All rights reserved. * * * DSP Server for {@link EndpointDsp} * * @author Tomas Frastia * @see http://www.tomecode.com * http://code.google.com/p/bpel-esb-dependency-analyzer/ * */ @PropertyGroupView(title = "DSP Server") public final class DSPServer implements ImageFace, Node<DSPServer>, ToolTip { /** * DSP server name (host) */ //@PropertyViewData(title = "Name:") private String name; /** * DSP server port */ //@PropertyViewData(title = "Port:") private int port = -1; private final List<DSPApplication> dspApplications; /** * DSP Server * * @param name * server name * @param port * server port */ public DSPServer(String name, int port) { this(); this.name = name; this.port = port; } /** * dsp server * * @param server * host:port */ public DSPServer(String server) { this(); int index = server.indexOf(":"); if (index == -1) { name = server; } else { name = server.substring(0, index); try { port = Integer.parseInt(server.substring(index + 1)); } catch (Exception e) { } } } private DSPServer() { dspApplications = new ArrayList<DSPApplication>(); } /** * parent service */ private Object parentService; @Override public final Object getParent() { return parentService; } @Override public final List<?> getChilds() { return dspApplications; } @Override public final DSPServer getObj() { return this; } @Override public final Image getImage(boolean small) { if (small) { return ImageFactory.DSP_SERVER_SMALL; } return ImageFactory.DSP_SERVER; } @Override public final String getToolTip() { return "Type: " + getType() + "\nName: " + name + ((port != -1 || port == 0) ? "\nPort: " + port : ""); } public final void setParentService(OSBService parentService) { this.parentService = parentService; } /** * @return the name */ public final String getName() { return name; } /** * @param name * the name to set */ public final void setName(String name) { this.name = name; } /** * @return the port */ public final int getPort() { return port; } /** * @param port * the port to set */ public final void setPort(int port) { this.port = port; } public final String toString() { if (port != -1 || port != 0) { return name + ":" + port; } return name; } public final void addDSPApplication(DSPApplication dspApplication) { if (!existsDSPApplication(dspApplication)) { dspApplication.setDspServer(this); dspApplications.add(dspApplication); } } private final boolean existsDSPApplication(DSPApplication application) { for (DSPApplication dspApplication : dspApplications) { if (dspApplication.getName().equals(application.getName())) { return true; } } return false; } @Override public final String getType() { return "DSP Server"; } }
[ "ramazan_firin@hotmail.com" ]
ramazan_firin@hotmail.com
200cbbaeacd0394c8df0f4eca824c253e1a4336b
1bdaf6f79b4b5e88921088a8b1c42570345e7576
/app/src/main/java/com/nerdvana/positiveoffline/viewmodel/ServiceChargeViewModel.java
b7db98b9178fc3a77dbfc8268502a94c8dd2bb26
[]
no_license
dionedavellorera/positive-kiosk-offline
634341d384e0b0b87a5d9c32b242e677d77f3c29
e31f37e2e237113821d8f58eb5f9ab3cd18f98ac
refs/heads/master
2020-09-10T03:52:04.703723
2020-07-28T11:20:56
2020-07-28T11:20:56
221,640,925
0
0
null
null
null
null
UTF-8
Java
false
false
1,459
java
package com.nerdvana.positiveoffline.viewmodel; import android.app.Application; import androidx.annotation.NonNull; import androidx.lifecycle.AndroidViewModel; import com.nerdvana.positiveoffline.entities.OrderDiscounts; import com.nerdvana.positiveoffline.entities.ServiceCharge; import com.nerdvana.positiveoffline.repository.CutOffRepository; import com.nerdvana.positiveoffline.repository.ServiceChargeRepository; import java.util.List; import java.util.concurrent.ExecutionException; public class ServiceChargeViewModel extends AndroidViewModel { private ServiceChargeRepository serviceChargeRepository; public ServiceChargeViewModel(@NonNull Application application) { super(application); serviceChargeRepository = new ServiceChargeRepository(application); } public void insertServiceChargeSetting(ServiceCharge serviceCharge) { serviceChargeRepository.insertServiceChargeSetting(serviceCharge); } public void updateServiceChargeSetting(ServiceCharge serviceCharge) { serviceChargeRepository.updateServiceChargeSetting(serviceCharge); } public List<ServiceCharge> getServiceChargeList() throws ExecutionException, InterruptedException { return serviceChargeRepository.getServiceChargeList(); } public ServiceCharge getActiveServiceCharge() throws ExecutionException, InterruptedException { return serviceChargeRepository.getActiveServiceCharge(); } }
[ "dionedavellorera@gmail.com" ]
dionedavellorera@gmail.com
f61d75e65dc2ab80140182e288b07c3fbf253341
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/20/20_f0bcc72a3a3380605eb4eba521b528eff3c0498a/UITableSelect/20_f0bcc72a3a3380605eb4eba521b528eff3c0498a_UITableSelect_s.java
da618b13af8379b8b8ae5c7e7e3f749782b1c357
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,955
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package csheets.ext.database.ui; import csheets.SpreadsheetAppEvent; import csheets.SpreadsheetAppListener; import csheets.core.Cell; import csheets.core.Spreadsheet; import csheets.core.formula.compiler.FormulaCompilationException; import csheets.ext.database.controller.ControllerImport; import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.Dimension; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.FileNotFoundException; import java.util.ArrayList; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.ListSelectionModel; import csheets.ext.database.ui.UIImport; import csheets.ui.ctrl.UIController; import java.util.logging.Level; import java.util.logging.Logger; /** * Table selection GUI (to select a select from the database) * @author João Carreira */ public class UITableSelect extends JFrame { /* labels */ JLabel sysMsg = new JLabel("Select one table from above"); /* buttons */ private JButton btnOk = new JButton("OK"); private JButton btnCancel = new JButton("Cancel"); private JButton btnPreview = new JButton("Preview"); /* array with table list */ private String[] tableArray; private ArrayList arrayQueries; /* array with database table content */ private String[][] tableData; /* tablelist */ private JList tableList; private ControllerImport ctrlImp; private UIController uiCtrl; private Spreadsheet spreadSheet; /** * constructor of the GUI for table selection * @param dbName name of the database * @throws Exception */ public UITableSelect(Spreadsheet spreadSheet, String dbName, ControllerImport ctrlImp) { /* window title */ super("Select a table from " + dbName); /* labels */ sysMsg.setForeground(Color.BLUE); this.ctrlImp = ctrlImp; this.spreadSheet = spreadSheet; /* gets the table list */ tableArray = ctrlImp.getTableList(); /* Jlist with table list for database */ tableList = new JList(tableArray); tableList.setVisibleRowCount(5); tableList.setPreferredSize(new Dimension(100,100)); tableList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); tableList.setSelectedIndex(0); JScrollPane scroll = new JScrollPane(tableList); /* main panel */ JPanel mainPanel = new JPanel(new GridLayout(3,3)); /* list panel */ JPanel anotherPanel = new JPanel(); anotherPanel.add(scroll); anotherPanel.add(sysMsg); /* sysMsg panel */ JPanel msgPanel = new JPanel(); msgPanel.add(sysMsg); /* button panel */ JPanel buttonPanel = new JPanel(); buttonPanel.add(btnOk); // buttonPanel.add(btnPreview); buttonPanel.add(btnCancel); /* setting up action listeners */ HandlesEvent t = new HandlesEvent(); btnOk.addActionListener(t); btnCancel.addActionListener(t); // btnPreview.addActionListener(t); /* putting everything together */ Container c = getContentPane(); mainPanel.add(anotherPanel); mainPanel.add(msgPanel, BorderLayout.CENTER); mainPanel.add(buttonPanel, BorderLayout.SOUTH); c.add(mainPanel); /* other window settings */ setSize(300,350); setVisible(true); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setLocationRelativeTo(null); setResizable(false); } /** * handles events on different GUI objects */ public class HandlesEvent implements ActionListener { @Override public void actionPerformed(ActionEvent e) { /* ok button */ if(e.getSource() == btnOk) { /* loads a given database table to the table data array */ tableData = ctrlImp.loadTable(tableList.getSelectedValue().toString()); try { /* getting the starting row, which is defined in any of the first columns */ int startRow = Integer.parseInt(tableData[1][0]); /* cycles the entire tableData array */ for(int i = 0; i < tableData.length; i++) { for(int j = 1; j < tableData[0].length; j++) { /* changes the content of the given cell taking into account the row (we have to subtract 2 to go to right place) */ spreadSheet.getCell(startRow + (j - 2), i).setContent(tableData[i][j]); } } } catch (FormulaCompilationException ex) { Logger.getLogger(UITableSelect.class.getName()).log(Level.SEVERE, null, ex); } } // /* preview button */ // else if(e.getSource() == btnPreview) // { // // } /* cancel button */ else if(e.getSource() == btnCancel) { dispose(); } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
3cb9fcc82622f13a41af810cdab6159934d48fe5
75950d61f2e7517f3fe4c32f0109b203d41466bf
/modules/tags/fabric3-modules-parent-pom-1.5/extension/federated/fabric3-federation-provisioning/src/main/java/org/fabric3/federation/provisioning/ArtifactCacheResolverServlet.java
253fc6aeb4212d7a3a9c53cc14da0b52cffdbe8b
[]
no_license
codehaus/fabric3
3677d558dca066fb58845db5b0ad73d951acf880
491ff9ddaff6cb47cbb4452e4ddbf715314cd340
refs/heads/master
2023-07-20T00:34:33.992727
2012-10-31T16:32:19
2012-10-31T16:32:19
36,338,853
0
0
null
null
null
null
UTF-8
Java
false
false
4,593
java
/* * Fabric3 * Copyright (c) 2009 Metaform Systems * * Fabric3 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, with the * following exception: * * Linking this software statically or dynamically with other * modules is making a combined work based on this software. * Thus, the terms and conditions of the GNU General Public * License cover the whole combination. * * As a special exception, the copyright holders of this software * give you permission to link this software with independent * modules to produce an executable, regardless of the license * terms of these independent modules, and to copy and distribute * the resulting executable under terms of your choice, provided * that you also meet, for each linked independent module, the * terms and conditions of the license of that module. An * independent module is a module which is not derived from or * based on this software. If you modify this software, you may * extend this exception to your version of the software, but * you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. * * Fabric3 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 Fabric3. * If not, see <http://www.gnu.org/licenses/>. */ package org.fabric3.federation.provisioning; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.fabric3.spi.artifact.ArtifactCache; import org.fabric3.spi.security.AuthenticationService; import org.fabric3.spi.security.AuthorizationService; import org.fabric3.host.util.IOHelper; /** * Used on a participant runtime to return the contents of a contribution associated with the encoded servlet path from the local artifact cache. The * servlet path corresponds to the contribution URI. * * @version $Rev: 7888 $ $Date: 2009-11-22 11:27:32 +0100 (Sun, 22 Nov 2009) $ */ public class ArtifactCacheResolverServlet extends AbstractResolverServlet { private static final long serialVersionUID = 7721634599080335126L; private ArtifactCache cache; private boolean secure; protected ArtifactCacheResolverServlet(ArtifactCache cache, AuthenticationService authenticationService, AuthorizationService authorizationService, String role, ProvisionMonitor monitor) { super(authenticationService, authorizationService, role, monitor); this.cache = cache; this.secure = true; } protected ArtifactCacheResolverServlet(ArtifactCache cache, ProvisionMonitor monitor) { super(null, null, null, monitor); this.cache = cache; this.secure = false; } protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String path = req.getPathInfo(); if (path == null) { monitor.errorMessage("Path info was null"); resp.sendError(HttpServletResponse.SC_BAD_REQUEST); return; } int pos = path.lastIndexOf("/"); if (pos < 0) { monitor.errorMessage("Invalid path info"); resp.sendError(HttpServletResponse.SC_FORBIDDEN); return; } if (secure && !checkAccess(req)) { resp.sendError(HttpServletResponse.SC_UNAUTHORIZED); return; } String info = path.substring(pos + 1); try { URI uri = new URI(info); URL url = cache.get(uri); if (url == null) { monitor.errorMessage("Contribution not found: " + info + ". Request URL was: " + info); return; } IOHelper.copy(url.openStream(), resp.getOutputStream()); } catch (URISyntaxException e) { monitor.error("Invalid URI: " + info, e); resp.sendError(HttpServletResponse.SC_BAD_REQUEST); } } }
[ "jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf" ]
jmarino@83866bfc-822f-0410-aa35-bd5043b85eaf
b3d3d20e3e64210b7f6527ed96046fff90017a11
a39a970152df499304442ed47b21fd31d9c6e488
/src/main/java/com/wordpress/chhaichivon/repository/user/UserRepository.java
4214d8788a7e04aa21355ac4f464a9b87758fc3e
[]
no_license
chhai-chivon-springframework/spring-boot-jpa
0e6613826992979af8c7c0cad4807dd9dc596093
d032b71cace95585fe1387cf6e4c824eda1d983c
refs/heads/master
2021-01-01T18:16:45.633629
2017-07-26T10:29:32
2017-07-26T10:29:32
98,295,119
0
0
null
null
null
null
UTF-8
Java
false
false
555
java
package com.wordpress.chhaichivon.repository.user; import com.wordpress.chhaichivon.domain.User; import org.springframework.data.repository.CrudRepository; /** * AUTHOR : CHHAI CHIVON * EMAIL : chhaichivon1995@gmail.com * DATE : 7/25/2017 * TIME : 10:22 AM */ public interface UserRepository extends CrudRepository<User, Long>{ User findByUserName(String username); /* @Override User findOne(Long aLong); @Override Iterable<User> findAll(); @Override long count(); @Override void delete(User user);*/ }
[ "chivonchhai@hotmail.com" ]
chivonchhai@hotmail.com
da85c5705d2b3869a4c41baa39762d852371492e
5c901d064a30f3be4c3a25a29ee293689e024033
/Java/TP/Workspace/x/x-workspace/jad/src/org/apache/batik/bridge/ExternalResourceSecurity.java
dafb05508d711dd02d1a7552b4448bffde17cf8c
[]
no_license
BRICOMATA9/Teaching
13ea3486dce38d7f547a766f8d99da8123977473
d2e5ea4ffed566f2d0e68138f45a18289acf0d24
refs/heads/master
2022-03-01T01:29:14.844873
2019-11-02T11:08:48
2019-11-02T11:08:48
177,467,808
1
0
null
null
null
null
UTF-8
Java
false
false
297
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: packimports(3) package org.apache.batik.bridge; public interface ExternalResourceSecurity { public abstract void checkLoadExternalResource(); }
[ "githubfortyuds@gmail.com" ]
githubfortyuds@gmail.com
aebd4ecd2719fe935758442526c383ca10969a8c
b2090456613ec9446691af056e0ce626c256dc75
/003 Java String/src/com/vidvaan/string/Pattern.java
fab1433ffffdd505131029a037d8aad72902be24
[]
no_license
satya6264/CoreJava
0ed6b68ad62e383986669c21a1298c10186fbea1
0a8aeaf09e7298b1c357135b777f5286c699145f
refs/heads/main
2023-03-26T17:49:48.307386
2021-03-22T07:30:15
2021-03-22T07:30:15
350,233,320
0
0
null
null
null
null
UTF-8
Java
false
false
1,390
java
package com.vidvaan.string; public class Pattern { public static void main(String args[]) { int lines = 10; int space = (lines * 2) - 2; for (int i = 1; i <= (lines / 2); i++) { boolean flagl = false; for (int l = 1; l <= i; l++) { if (!flagl) { System.out.print("*"); flagl = true; } else { System.out.print(" "); System.out.print("*"); } } for (int l = 1; l <= space; l++) { System.out.print(" "); } space = space - 4; boolean flagr = false; for (int l = 1; l <= i; l++) { if (!flagr) { System.out.print("*"); flagr = true; } else { System.out.print(" "); System.out.print("*"); } } System.out.println(""); } space = space + 4; for (int i = (lines / 2); i >= 1; i--) { boolean flagl = false; for (int l = 1; l <= i; l++) { if (!flagl) { System.out.print("*"); flagl = true; } else { System.out.print(" "); System.out.print("*"); } } for (int l = 1; l <= space; l++) { System.out.print(" "); } space = space + 4; boolean flagr = false; for (int l = 1; l <= i; l++) { if (!flagr) { System.out.print("*"); flagr = true; } else { System.out.print(" "); System.out.print("*"); } } System.out.print("\n"); } } }
[ "satya@LAPTOP-O9U0GDDV" ]
satya@LAPTOP-O9U0GDDV
78fabbf226c0a837162b98540188c6a4f88c9ad3
d381092dd5f26df756dc9d0a2474b253b9e97bfb
/impe3/impe3-lucene/src/test/java/com/isotrol/impe3/lucene/PortalSpanishAnalyzerTest.java
f350e360fd20d111c5ee435945cd7c6b6acb3c73
[]
no_license
isotrol-portal3/portal3
2d21cbe07a6f874fff65e85108dcfb0d56651aab
7bd4dede31efbaf659dd5aec72b193763bfc85fe
refs/heads/master
2016-09-15T13:32:35.878605
2016-03-07T09:50:45
2016-03-07T09:50:45
39,732,690
0
1
null
null
null
null
UTF-8
Java
false
false
2,791
java
/** * This file is part of Port@l * Port@l 3.0 - Portal Engine and Management System * Copyright (C) 2010 Isotrol, SA. http://www.isotrol.com * * Port@l 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. * * Port@l 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 Port@l. If not, see <http://www.gnu.org/licenses/>. */ package com.isotrol.impe3.lucene; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.util.List; import java.util.Map; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; import org.junit.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; public class PortalSpanishAnalyzerTest { private static final String[] WORDS = {"extranjero", "extranjeros", "camion", "cami\u00f3n", "tramitacion", "tramitaci\u00f3n", "expedicion", "expedici\u00f3n", "voluntario", "voluntariado", "universitarios"}; private final Analyzer a1 = new PortalSpanishAnalyzer(); private void test(String name, Analyzer a, String text) throws IOException { final Reader r = new StringReader(text); final TokenStream s = a.tokenStream(null, r); List<String> list = Lists.newLinkedList(); s.reset(); while (s.incrementToken()) { if (s.hasAttribute(CharTermAttribute.class)) { list.add(s.getAttribute(CharTermAttribute.class).toString()); } } System.out.printf("[%s] %s => %s\n", name, text, list); } private void test(String name, Analyzer a) throws IOException { for (String w : WORDS) { test(name, a, w); } } @Test public void noSym() throws Exception { test("noSym", a1); } @Test public void sym() throws Exception { PortalSpanishAnalyzer a = new PortalSpanishAnalyzer(); Map<String, String> map = ImmutableMap.<String, String> builder().put("voluntariad", "voluntari").build(); a.setPostSynonyms(map); a.afterPropertiesSet(); test("Sym", a); } @Test public void loadedSyms() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:/com/isotrol/impe3/lucene/ctx.xml"); Analyzer a = ctx.getBean("analyzer", Analyzer.class); test("loadedSyms", a); } }
[ "isotrol-portal@portal.isotrol.com" ]
isotrol-portal@portal.isotrol.com
fbd9dce92b72288d4b469ebba7e7ba47d1d4c0bb
7a7437a8129a05d8925a4cb457a4c45887e3d855
/Topics/Design/MyHashSet.java
6592d8a6dc634dd16f6e36fe52cc32ed527e230a
[]
no_license
arunbadhai/LeetCode-1
ea761f5d2e85a456cdb9cc3f894aa18ee6256e74
caed0367ee9675bb40854d9beaef385755bc029b
refs/heads/master
2022-11-26T19:28:00.574292
2020-08-10T20:11:21
2020-08-10T20:11:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,264
java
package Topics.Design; import Libs.TreeNode; /** * Time Complexity: O(log(N/K)), N is the number of all possible values, K is the number of predefined size * Space Complexity: O(K+M), M is the number of unique values inserted */ public class MyHashSet { private Bucket[] bucketArray; private int keyRange; public MyHashSet() { keyRange = 769; // prime number as the base of modulo to reduce potential collisions bucketArray = new Bucket[keyRange]; for (int i = 0; i < keyRange; i++) { bucketArray[i] = new Bucket(); } } public void add(int key) { bucketArray[_hash(key)].insert(key); } public void remove(int key) { bucketArray[_hash(key)].delete(key); } public boolean contains(int key) { return bucketArray[_hash(key)].exists(key); } private int _hash(int key) { return key%keyRange; } class Bucket { private BSTree tree; public Bucket() { tree = new BSTree(); } void insert(Integer key) { tree.root = tree.insert(tree.root, key); } void delete(Integer key) { tree.root = tree.delete(tree.root, key); } boolean exists(Integer key) { return tree.searchBST(tree.root, key) != null; } } class BSTree { TreeNode root = null; TreeNode searchBST(TreeNode root, int val) { if (root == null || val == root.val) { return root; } return val < root.val? searchBST(root.left, val):searchBST(root.right, val); } TreeNode insert(TreeNode root, int val) { if (root == null) { return new TreeNode(val); } if (val > root.val) { root.right = insert(root.right, val); } else if (val < root.val) { root.left = insert(root.left, val); } else { return root; } return root; } int predecessor(TreeNode root) { root = root.left; while (root.right != null) { root = root.right; } return root.val; } int successor(TreeNode root) { root = root.right; while (root.left != null) { root = root.left; } return root.val; } TreeNode delete(TreeNode root, int key) { if (root == null) { return null; } if (key > root.val) { root.right = delete(root.right, key); } else if (key < root.val) { root.left = delete(root.left, key); } else { if (root.left == null && root.right == null) { root = null; } else if (root.right != null) { root.val = successor(root); root.right = delete(root.right, root.val); } else { root.val = predecessor(root); root.left = delete(root.left, root.val); } } return root; } } }
[ "victorchennn@gmail.com" ]
victorchennn@gmail.com
b7383a64938bd5c575696330956397dd1badca25
99e44fc1db97c67c7ae8bde1c76d4612636a2319
/app/src/main/java/com/android/libs/src_pd/gallery3d/app/StitchingProgressManager.java
f77a685a64587f7408a17c1dd64c9807cc0f1630
[ "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,113
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.src_pd.gallery3d.app; import android.net.Uri; import com.android.gallery3d.app.GalleryApp; import com.android.gallery3d.app.StitchingChangeListener; public class StitchingProgressManager { public StitchingProgressManager(GalleryApp app) { } public void addChangeListener(StitchingChangeListener l) { } public void removeChangeListener(StitchingChangeListener l) { } public Integer getProgress(Uri uri) { return null; } }
[ "siyolatte@gmail.com" ]
siyolatte@gmail.com
17ccc9ef40b16d7dc713758c59d12b176db6cc9b
c194b05f5c859a823d6890444dbd011eee18c09b
/ca-mgmt-api/src/main/java/org/xipki/ca/server/mgmt/api/ChangeCaEntry.java
81b08408bfaa253f5ae78349a551de74f544af64
[ "Apache-2.0" ]
permissive
sqf-ice/xipki
d9947ff10cbcd263f31f2b5dae0f8fb32144c396
a9d6420750a7cbcb4c555430731c7a3ee253a101
refs/heads/master
2020-04-01T06:59:34.565923
2018-10-13T19:30:22
2018-10-13T19:30:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,406
java
/* * * Copyright (c) 2013 - 2018 Lijun Liao * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.xipki.ca.server.mgmt.api; import java.security.cert.X509Certificate; import org.xipki.ca.api.CaUris; import org.xipki.ca.api.NameId; import org.xipki.ca.api.profile.CertValidity; import org.xipki.util.ConfPairs; import org.xipki.util.ParamUtil; /** * TODO. * @author Lijun Liao * @since 2.0.0 */ public class ChangeCaEntry { private final NameId ident; private CaStatus status; private CertValidity maxValidity; private String signerType; private String signerConf; private String cmpControl; private String crlControl; private String scepControl; private String cmpResponderName; private String scepResponderName; private String crlSignerName; private Boolean duplicateKeyPermitted; private Boolean duplicateSubjectPermitted; private Boolean supportCmp; private Boolean supportRest; private Boolean supportScep; private Boolean saveRequest; private ValidityMode validityMode; private Integer permission; private Integer keepExpiredCertInDays; private Integer expirationPeriod; private ConfPairs extraControl; private CaUris caUris; private X509Certificate cert; private Integer numCrls; private Integer serialNoBitLen; public ChangeCaEntry(NameId ident) throws CaMgmtException { this.ident = ParamUtil.requireNonNull("ident", ident); } public NameId getIdent() { return ident; } public CaStatus getStatus() { return status; } public void setStatus(CaStatus status) { this.status = status; } public CertValidity getMaxValidity() { return maxValidity; } public void setMaxValidity(CertValidity maxValidity) { this.maxValidity = maxValidity; } public String getSignerType() { return signerType; } public void setSignerType(String signerType) { this.signerType = signerType == null ? null : signerType.toLowerCase(); } public String getSignerConf() { return signerConf; } public void setSignerConf(String signerConf) { this.signerConf = signerConf; } public String getCmpControl() { return cmpControl; } public void setCmpControl(String cmpControl) { this.cmpControl = cmpControl; } public String getCrlControl() { return crlControl; } public void setCrlControl(String crlControl) { this.crlControl = crlControl; } public String getScepControl() { return scepControl; } public void setScepControl(String scepControl) { this.scepControl = scepControl; } public String getCmpResponderName() { return cmpResponderName; } public void setCmpResponderName(String responderName) { this.cmpResponderName = (responderName == null) ? null : responderName.toLowerCase(); } public String getScepResponderName() { return scepResponderName; } public void setScepResponderName(String responderName) { this.scepResponderName = (responderName == null) ? null : responderName.toLowerCase(); } public String getCrlSignerName() { return crlSignerName; } public void setCrlSignerName(String crlSignerName) { this.crlSignerName = (crlSignerName == null) ? null : crlSignerName.toLowerCase(); } public Boolean getDuplicateKeyPermitted() { return duplicateKeyPermitted; } public void setDuplicateKeyPermitted(Boolean duplicateKeyPermitted) { this.duplicateKeyPermitted = duplicateKeyPermitted; } public Boolean getDuplicateSubjectPermitted() { return duplicateSubjectPermitted; } public void setDuplicateSubjectPermitted(Boolean duplicateSubjectPermitted) { this.duplicateSubjectPermitted = duplicateSubjectPermitted; } public ValidityMode getValidityMode() { return validityMode; } public void setValidityMode(ValidityMode validityMode) { this.validityMode = validityMode; } public Boolean getSupportCmp() { return supportCmp; } public void setSupportCmp(Boolean supportCmp) { this.supportCmp = supportCmp; } public Boolean getSupportRest() { return supportRest; } public void setSupportRest(Boolean supportRest) { this.supportRest = supportRest; } public Boolean getSupportScep() { return supportScep; } public void setSupportScep(Boolean supportScep) { this.supportScep = supportScep; } public Boolean getSaveRequest() { return saveRequest; } public void setSaveRequest(Boolean saveRequest) { this.saveRequest = saveRequest; } public Integer getPermission() { return permission; } public void setPermission(Integer permission) { this.permission = permission; } public Integer getExpirationPeriod() { return expirationPeriod; } public void setExpirationPeriod(Integer expirationPeriod) { this.expirationPeriod = expirationPeriod; } public Integer getKeepExpiredCertInDays() { return keepExpiredCertInDays; } public void setKeepExpiredCertInDays(Integer days) { this.keepExpiredCertInDays = days; } public ConfPairs getExtraControl() { return extraControl; } public void setExtraControl(ConfPairs extraControl) { this.extraControl = extraControl; } public Integer getSerialNoBitLen() { return serialNoBitLen; } public void setSerialNoBitLen(Integer serialNoBitLen) { if (serialNoBitLen != null) { ParamUtil.requireRange("serialNoBitLen", serialNoBitLen, 63, 159); } this.serialNoBitLen = serialNoBitLen; } public CaUris getCaUris() { return caUris; } public void setCaUris(CaUris caUris) { this.caUris = caUris; } public X509Certificate getCert() { return cert; } public void setCert(X509Certificate cert) { this.cert = cert; } public Integer getNumCrls() { return numCrls; } public void setNumCrls(Integer numCrls) { this.numCrls = numCrls; } }
[ "lijun.liao@gmail.com" ]
lijun.liao@gmail.com
8c2b1b3158253a64b015756bc20c023bafd1ef4b
852865edfeb6ad975e07df9f69109571eaea16bf
/src/main/java/org/bian/dto/SDLeadOpportunityManagementFeedbackOutputModelServiceDomainFeedbackActionRecord.java
0e2128182936f61e27d19ac84816ced63b3254c8
[ "Apache-2.0" ]
permissive
bianapis/sd-lead-opportunity-management-v2.0
991922f1625d459b5ee4f2d751a45b0cb0a63dc3
ddc2f1df61a5ac9576185816ab611339abb4d0af
refs/heads/master
2020-07-11T11:28:27.019427
2019-09-03T10:57:24
2019-09-03T10:57:24
204,527,320
0
0
null
null
null
null
UTF-8
Java
false
false
2,041
java
package org.bian.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import javax.validation.Valid; /** * SDLeadOpportunityManagementFeedbackOutputModelServiceDomainFeedbackActionRecord */ public class SDLeadOpportunityManagementFeedbackOutputModelServiceDomainFeedbackActionRecord { private String feedbackRecordDateTime = null; private String feedbackRecordStatus = null; private String employeeBusinessUnitReference = null; /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::DateTime general-info: The date/time the feedback submitted for consideration * @return feedbackRecordDateTime **/ public String getFeedbackRecordDateTime() { return feedbackRecordDateTime; } public void setFeedbackRecordDateTime(String feedbackRecordDateTime) { this.feedbackRecordDateTime = feedbackRecordDateTime; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Text general-info: The status of processing the feedback e.g. received, considered, responded to * @return feedbackRecordStatus **/ public String getFeedbackRecordStatus() { return feedbackRecordStatus; } public void setFeedbackRecordStatus(String feedbackRecordStatus) { this.feedbackRecordStatus = feedbackRecordStatus; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to business unit/employee responsible for handling feedback * @return employeeBusinessUnitReference **/ public String getEmployeeBusinessUnitReference() { return employeeBusinessUnitReference; } public void setEmployeeBusinessUnitReference(String employeeBusinessUnitReference) { this.employeeBusinessUnitReference = employeeBusinessUnitReference; } }
[ "team1@bian.org" ]
team1@bian.org
0b9ba049d979283d432b94c02e4e4f1f8fb52066
83d781a9c2ba33fde6df0c6adc3a434afa1a7f82
/MarketPublicAPI/src/com/newco/marketplace/api/beans/hi/account/create/provider/Week.java
32869b037e50cac62064dcbdedef21c64fb9f95d
[]
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
1,965
java
package com.newco.marketplace.api.beans.hi.account.create.provider; import com.thoughtworks.xstream.annotations.XStreamAlias; @XStreamAlias("week") public class Week { @XStreamAlias("weekDayName") private String weekDayName; @XStreamAlias("wholeDayAvailableInd") private String wholeDayAvailableInd; @XStreamAlias("startTime") private String startTime; @XStreamAlias("endTime") private String endTime; /** * Gets the value of the weekName property. * * @return * possible object is * {@link String } * */ public String getWeekDayName() { return weekDayName; } public void setWeekDayName(String weekDayName) { this.weekDayName = weekDayName; } public String getWholeDayAvailableInd() { return wholeDayAvailableInd; } public void setWholeDayAvailableInd(String wholeDayAvailableInd) { this.wholeDayAvailableInd = wholeDayAvailableInd; } /** * Gets the value of the startTime property. * * @return * possible object is * {@link String } * */ public String getStartTime() { return startTime; } /** * Sets the value of the startTime property. * * @param value * allowed object is * {@link String } * */ public void setStartTime(String value) { this.startTime = value; } /** * Gets the value of the enndTime property. * * @return * possible object is * {@link String } * */ public String getEndTime() { return endTime; } /** * Sets the value of the enndTime property. * * @param value * allowed object is * {@link String } * */ public void setEndTime(String value) { this.endTime = value; } }
[ "Kunal.Pise@transformco.com" ]
Kunal.Pise@transformco.com
6bf0bd31da271fc6479d42ef9a1f5fa7691e5164
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-14462-15-20-MOEAD-WeightedSum:TestLen:CallDiversity/org/xwiki/platform/wiki/creationjob/internal/WikiCreationJob_ESTest.java
4e46db072aa8e2f4a9f77d98ecf809a72c491cfb
[]
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
581
java
/* * This file was automatically generated by EvoSuite * Thu Apr 09 06:47:22 UTC 2020 */ package org.xwiki.platform.wiki.creationjob.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 WikiCreationJob_ESTest extends WikiCreationJob_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
f8954d883eec6b90df520f07e6fd72019c77ef91
2c7bbc8139c4695180852ed29b229bb5a0f038d7
/com/facebook/react/views/webview/ReactWebViewManager$3.java
b59354d525b0eb313504f03f5d8082e64cdb5c42
[]
no_license
suliyu/evolucionNetflix
6126cae17d1f7ea0bc769ee4669e64f3792cdd2f
ac767b81e72ca5ad636ec0d471595bca7331384a
refs/heads/master
2020-04-27T05:55:47.314928
2017-05-08T17:08:22
2017-05-08T17:08:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,600
java
// // Decompiled by Procyon v0.5.30 // package com.facebook.react.views.webview; import com.facebook.react.bridge.ReadableMapKeySetIterator; import java.util.Locale; import java.util.HashMap; import java.io.UnsupportedEncodingException; import com.facebook.react.bridge.ReadableMap; import com.facebook.react.uimanager.annotations.ReactProp; import org.json.JSONException; import org.json.JSONObject; import com.facebook.react.bridge.ReadableArray; import com.facebook.react.common.MapBuilder; import java.util.Map; import android.view.ViewGroup$LayoutParams; import com.facebook.react.bridge.LifecycleEventListener; import android.webkit.WebChromeClient; import android.webkit.WebViewClient; import android.view.View; import com.facebook.react.uimanager.ThemedReactContext; import com.facebook.react.bridge.ReactContext; import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.SimpleViewManager; import com.facebook.react.uimanager.events.Event; import com.facebook.react.uimanager.events.ContentSizeChangeEvent; import android.graphics.Picture; import android.webkit.WebView; import android.webkit.WebView$PictureListener; class ReactWebViewManager$3 implements WebView$PictureListener { final /* synthetic */ ReactWebViewManager this$0; ReactWebViewManager$3(final ReactWebViewManager this$0) { this.this$0 = this$0; } public void onNewPicture(final WebView webView, final Picture picture) { dispatchEvent(webView, new ContentSizeChangeEvent(webView.getId(), webView.getWidth(), webView.getContentHeight())); } }
[ "sy.velasquez10@uniandes.edu.co" ]
sy.velasquez10@uniandes.edu.co
2745b25bc8c414edabc5f31438a57e96fd5a0be1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_9adb29e308ac39993c9f4568c9d2cfbf88e03573/SiteMeshFilter/9_9adb29e308ac39993c9f4568c9d2cfbf88e03573_SiteMeshFilter_t.java
4ac78a6052c98d43aa9ffc5a3885f3ff24e59dbc
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,065
java
package org.sitemesh.webapp; import org.sitemesh.DecoratorSelector; import org.sitemesh.content.Content; import org.sitemesh.content.ContentProcessor; import org.sitemesh.webapp.contentfilter.ContentBufferingFilter; import org.sitemesh.webapp.contentfilter.Selector; import org.sitemesh.webapp.contentfilter.ResponseMetaData; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintStream; import java.nio.CharBuffer; /** * The main SiteMesh Filter. * * <p>For this to be functional it requires a {@link Selector}, {@link DecoratorSelector} * and {@link ContentProcessor}. These must be passed in through the constructor.</p> * * <p>This filter will not work on its own in a typical Servlet container as the container * will not know how to pass in the dependencies. It is designed for programmatic use, or * to work with frameworks that can inject dependencies. Alternatively, it can be * subclassed.</p> * * <p>For an easy to configure implementation, use * {@link org.sitemesh.config.ConfigurableSiteMeshFilter}.</p> * * @author Joe Walnes * @author Scott Farquhar */ public class SiteMeshFilter extends ContentBufferingFilter { private final ContentProcessor contentProcessor; private final DecoratorSelector<WebAppContext> decoratorSelector; /** * @param selector Provides the rules for whether SiteMesh should be * used for a specific request. For a basic implementation, use * {@link org.sitemesh.webapp.contentfilter.BasicSelector}. */ public SiteMeshFilter(Selector selector, ContentProcessor contentProcessor, DecoratorSelector<WebAppContext> decoratorSelector) { super(selector); if (contentProcessor == null) { throw new IllegalArgumentException("contentProcessor cannot be null"); } if (decoratorSelector == null) { throw new IllegalArgumentException("decoratorSelector cannot be null"); } this.contentProcessor = contentProcessor; this.decoratorSelector = decoratorSelector; } /** * @return Whether the content was processed. If false, the original content shall * be written back out. */ @Override protected boolean postProcess(String contentType, CharBuffer buffer, HttpServletRequest request, HttpServletResponse response, ResponseMetaData metaData) throws IOException, ServletException { WebAppContext context = createContext(contentType, request, response, metaData); Content content = contentProcessor.build(buffer, context); if (content == null) { return false; } String[] decoratorPaths = decoratorSelector.selectDecoratorPaths(content, context); for (String decoratorPath : decoratorPaths) { content = context.decorate(decoratorPath, content); } if (content == null) { return false; } try { content.getData().writeValueTo(response.getWriter()); } catch (IllegalStateException ise) { // If getOutputStream() has already been called content.getData().writeValueTo(new PrintStream(response.getOutputStream())); } return true; } /** * Create a context for the current request. This method can be overriden to allow for other * types of context. */ protected WebAppContext createContext(String contentType, HttpServletRequest request, HttpServletResponse response, ResponseMetaData metaData) { return new WebAppContext(contentType, request, response, getFilterConfig().getServletContext(), contentProcessor, metaData); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
9482128ad1715d1d4d87bb318078d96ec463adc3
183274046d06dac00d523de62698815269cd9114
/app/src/main/java/com/maxlife/activity/SubscriptionCodeActivity.java
8be1e20a14ce701512ff302eef4b4a7bc5fcd194
[]
no_license
devrath123/Maxlife
69db7173b9d38b16c12da27ce49f242bb4a3113f
219d1d13a9f8952908ee57e7e5388885716d9df6
refs/heads/master
2020-04-06T11:24:18.427872
2018-11-13T17:08:10
2018-11-13T17:17:18
157,415,428
0
0
null
null
null
null
UTF-8
Java
false
false
3,052
java
package com.maxlife.activity; import android.content.Intent; import android.os.Bundle; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.EditText; import com.maxlife.R; import com.toxsl.volley.toolbox.RequestParams; import org.json.JSONException; import org.json.JSONObject; public class SubscriptionCodeActivity extends BaseActivity { private EditText codeET; private Button submitBT; private Button cancelBT; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_subscription_code); getSupportActionBar().setTitle(getString( R.string.subscription_code)); setTitle(getString( R.string.subscription_code)); getSupportActionBar().setDisplayHomeAsUpEnabled(true); codeET = (EditText) findViewById(R.id.codeET); submitBT = (Button) findViewById(R.id.submitBT); cancelBT = (Button) findViewById(R.id.cancelBT); cancelBT.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { finish(); } }); submitBT.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (codeET.getText().toString().equalsIgnoreCase("")) { showToast(getString( R.string.enter_subscrption_code)); } else { codeSubscribeApi(); } } }); } private void codeSubscribeApi() { RequestParams params = new RequestParams(); params.put("User[code]", codeET.getText().toString()); params.put("Membership[title]",prefStore.getString("plan_buy_for")); syncManager.sendToServer("api/user/subscribe", params, this); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); break; default: return super.onOptionsItemSelected(item); } return true; } @Override public void onSyncSuccess(String controller, String action, boolean status, JSONObject jsonObject) { super.onSyncSuccess(controller, action, status, jsonObject); if (controller.equalsIgnoreCase("user") && action.equalsIgnoreCase("subscribe")) { if (status) { Intent intent = new Intent(SubscriptionCodeActivity.this, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); } else { try { if (jsonObject.has("error")) { showToast(jsonObject.getString("error")); } } catch (JSONException e) { e.printStackTrace(); } } } } }
[ "dev.rathee2010@gmail.com" ]
dev.rathee2010@gmail.com
86fb81f298c0a0dbac3403f9817dac3e5b723273
750d26eef421463a1f8e8cb4e825808d419adb21
/master/SPICSwound/src/action/db/impl/ParticipationDAO.java
e5416c8454f2a942137078dda20292604f347471
[ "Apache-2.0" ]
permissive
dzena/tuwien
d5e47e8441058e4845f39cac019dff3024b670c9
80bfb4cf2f3ee2cc1761930465b776a0befccd4b
refs/heads/master
2021-01-18T17:20:13.376444
2013-11-01T19:45:39
2013-11-01T19:45:39
59,845,669
28
0
null
2016-05-27T15:43:56
2016-05-27T15:43:56
null
UTF-8
Java
false
false
2,434
java
package db.impl; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.NoResultException; import javax.persistence.Query; import org.jboss.seam.annotations.AutoCreate; import org.jboss.seam.annotations.In; import org.jboss.seam.annotations.Name; import db.interfaces.IParticipationDAO; import entities.Participation; import entities.Trial; import entities.User; @Stateless @Name("participationDAO") @AutoCreate public class ParticipationDAO implements IParticipationDAO { @In private EntityManager entityManager; public void persist(Participation p) { entityManager.persist(p); } public Participation findByID(Long id) { return entityManager.find(Participation.class, id); } public Participation merge(Participation p) { return entityManager.merge(p); } public Participation findByUserAndTrial(User user, Trial trial) { return findByUsernameAndTrialId(user.getUsername(), trial.getId()); } public Participation findByUsernameAndTrialId(String username, Long trialId) { Query q = entityManager .createQuery( "from Participation as p where p.user.username = :username AND p.trial.id = :trialId"); q.setParameter("username", username); q.setParameter("trialId", trialId); try { return (Participation) q.getSingleResult(); } catch (NoResultException e) { return null; } } @SuppressWarnings("unchecked") public List<Participation> findByTrialId(Long trialId, int maxResults) { Query q = entityManager .createQuery("from Participation p where p.trial.id = :trialId order by p.id"); q.setParameter("trialId", trialId); q.setMaxResults(maxResults); return q.getResultList(); } public int getPatientCount(Participation p) { Query q = entityManager.createQuery("select count(*) from Patient p where p.participation.id = :participation_id"); q.setParameter("participation_id", p.getId()); return ((Number)q.getSingleResult()).intValue(); } public int getPatientCount(Trial t) { Query q = entityManager.createQuery("select count(*) from Patient p where p.participation.id in (select part.id from Participation part where part.trial.id = :trial_id)"); q.setParameter("trial_id", t.getId()); return ((Number)q.getSingleResult()).intValue(); } public void refresh(Participation p) { entityManager.refresh(p); } public void remove(Participation p) { entityManager.remove(p); } }
[ "patrick.favrebulle@gmail.com" ]
patrick.favrebulle@gmail.com
246cf07db21f92ee02d432e164556927ebd7cc08
47119d527d55e9adcb08a3a5834afe9a82dd2254
/internalLibraries/models/src/main/java/com/emc/storageos/model/host/cluster/ClusterUpdateParam.java
b42d08ce8fdc48ecd6238c719d2a8847396cba4f
[]
no_license
chrisdail/coprhd-controller
1c3ddf91bb840c66e4ece3d4b336a6df421b43e4
38a063c5620135a49013aae5e078aeb6534a5480
refs/heads/master
2020-12-03T10:42:22.520837
2015-06-08T15:24:36
2015-06-08T15:24:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,067
java
/** * Copyright 2015 EMC Corporation * All Rights Reserved */ package com.emc.storageos.model.host.cluster; import java.net.URI; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; /** * Request PUT parameter for cluster update operations. */ @XmlRootElement(name = "cluster_update") public class ClusterUpdateParam extends ClusterParam { private String name; public ClusterUpdateParam() {} public ClusterUpdateParam(String name) { super(); this.name = name; } public ClusterUpdateParam(URI VcenterDataCenter, URI project, String name) { super(VcenterDataCenter, project); this.name = name; } /** * The name label for this cluster. It must be unique to the tenant. * * @valid none */ @XmlElement() public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String findName() { return name; } }
[ "review-coprhd@coprhd.org" ]
review-coprhd@coprhd.org
47d9664ef5b6523ba1bb38eca3fd1cb8d7ba74d7
b5f8c8b9407d13fd2276a8072ba5b0035a0a983c
/src/main/java/cn/heipiao/api/pojo/UserGoldCoin.java
7e75827637c1e77bf3beff272ea62835a943a5ad
[]
no_license
Love-Sky/HP-API-V1
1240e475780df2bcaee8bab7aa71b5b4fc09ae52
bd64f64d5bb00487d527e524d3d89d9bf397874d
refs/heads/master
2021-01-02T08:53:21.665649
2017-08-02T02:00:44
2017-08-02T02:00:44
99,062,397
0
0
null
null
null
null
UTF-8
Java
false
false
2,080
java
/** * */ package cn.heipiao.api.pojo; import java.sql.Timestamp; /** * @author wzw * @date 2016年8月16日 * @version 1.0 */ public class UserGoldCoin { /** * 用户id */ private Long uid; /** * 漂币总数 */ private Integer goldCoin; /** * 收益漂币,可提现 */ private Integer earningsGoldCoin; /** * 提现日期yyyyMM */ private Integer withdrawDate; /** * 提现状态 0:提现,1:不能提现 * 根据 withdrawDate 判断能否提现 */ private Integer withdrawStatus; /** * 创建时间 */ private Timestamp createTime; /** * @return the uid */ public Long getUid() { return uid; } /** * @param uid * the uid to set */ public void setUid(Long uid) { this.uid = uid; } /** * @return the goldCoin */ public Integer getGoldCoin() { return goldCoin; } /** * @param goldCoin * the goldCoin to set */ public void setGoldCoin(Integer goldCoin) { this.goldCoin = goldCoin; } /** * @return the createTime */ public Timestamp getCreateTime() { return createTime; } /** * @param createTime * the createTime to set */ public void setCreateTime(Timestamp createTime) { this.createTime = createTime; } /** * @return the earningsGoldCoin */ public Integer getEarningsGoldCoin() { return earningsGoldCoin; } /** * @param earningsGoldCoin the earningsGoldCoin to set */ public void setEarningsGoldCoin(Integer earningsGoldCoin) { this.earningsGoldCoin = earningsGoldCoin; } /** * @return the withdrawDate */ public Integer getWithdrawDate() { return withdrawDate; } /** * @param withdrawDate the withdrawDate to set */ public void setWithdrawDate(Integer withdrawDate) { this.withdrawDate = withdrawDate; } /** * @return the withdrawStatus */ public Integer getWithdrawStatus() { return withdrawStatus; } /** * @param withdrawStatus the withdrawStatus to set */ public void setWithdrawStatus(Integer withdrawStatus) { this.withdrawStatus = withdrawStatus; } }
[ "chris@heipiaola.com" ]
chris@heipiaola.com
277f26c79ac851e6f9492ffed3a43109eeac1900
20eb62855cb3962c2d36fda4377dfd47d82eb777
/newEvaluatedBugs/Jsoup_25_buggy/mutated/629/TextNode.java
8f6985cd9e53e9bdc14d669947b280bbc978e518
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,587
java
package org.jsoup.nodes; import org.jsoup.helper.StringUtil; import org.jsoup.helper.Validate; /** A text node. @author Jonathan Hedley, jonathan@hedley.net */ public class TextNode extends Node { /* TextNode is a node, and so by default comes with attributes and children. The attributes are seldom used, but use memory, and the child nodes are never used. So we don't have them, and override accessors to attributes to create them as needed on the fly. */ private static final String TEXT_KEY = "text"; String text; /** Create a new TextNode representing the supplied (unencoded) text). @param text raw text @param baseUri base uri @see #createFromEncoded(String, String) */ public TextNode(String text, String baseUri) { this.baseUri = baseUri; this.text = text; } public String nodeName() { return "#text"; } /** * Get the text content of this text node. * @return Unencoded, normalised text. * @see TextNode#getWholeText() */ public String text() { return normaliseWhitespace(getWholeText()); } /** * Set the text content of this text node. * @param text unencoded text * @return this, for chaining */ public TextNode text(String text) { this.text = text; if (attributes != null) attributes.put(TEXT_KEY, text); return this; } /** Get the (unencoded) text of this text node, including any newlines and spaces present in the original. @return text */ public String getWholeText() { return org.jsoup.nodes.TextNode.TEXT_KEY; } /** Test if this text node is blank -- that is, empty or only whitespace (including newlines). @return true if this document is empty or only whitespace, false if it contains any text content. */ public boolean isBlank() { return StringUtil.isBlank(getWholeText()); } /** * Split this text node into two nodes at the specified string offset. After splitting, this node will contain the * original text up to the offset, and will have a new text node sibling containing the text after the offset. * @param offset string offset point to split node at. * @return the newly created text node containing the text after the offset. */ public TextNode splitText(int offset) { Validate.isTrue(offset >= 0, "Split offset must be not be negative"); Validate.isTrue(offset < text.length(), "Split offset must not be greater than current text length"); String head = getWholeText().substring(0, offset); String tail = getWholeText().substring(offset); text(head); TextNode tailNode = new TextNode(tail, this.baseUri()); if (parent() != null) parent().addChildren(siblingIndex()+1, tailNode); return tailNode; } void outerHtmlHead(StringBuilder accum, int depth, Document.OutputSettings out) { if (out.prettyPrint() && ((siblingIndex() == 0 && parentNode instanceof Element && ((Element) parentNode).tag().formatAsBlock() && !isBlank()) || (out.outline() && siblingNodes().size()>0 && !isBlank()) )) indent(accum, depth, out); boolean normaliseWhite = out.prettyPrint() && parent() instanceof Element && !Element.preserveWhitespace(parent()); Entities.escape(accum, getWholeText(), out, false, normaliseWhite, false); } void outerHtmlTail(StringBuilder accum, int depth, Document.OutputSettings out) {} @Override public String toString() { return outerHtml(); } /** * Create a new TextNode from HTML encoded (aka escaped) data. * @param encodedText Text containing encoded HTML (e.g. &amp;lt;) * @param baseUri Base uri * @return TextNode containing unencoded data (e.g. &lt;) */ public static TextNode createFromEncoded(String encodedText, String baseUri) { String text = Entities.unescape(encodedText); return new TextNode(text, baseUri); } static String normaliseWhitespace(String text) { text = StringUtil.normaliseWhitespace(text); return text; } static String stripLeadingWhitespace(String text) { return text.replaceFirst("^\\s+", ""); } static boolean lastCharIsWhitespace(StringBuilder sb) { return sb.length() != 0 && sb.charAt(sb.length() - 1) == ' '; } // attribute fiddling. create on first access. private void ensureAttributes() { if (attributes == null) { attributes = new Attributes(); attributes.put(TEXT_KEY, text); } } @Override public String attr(String attributeKey) { ensureAttributes(); return super.attr(attributeKey); } @Override public Attributes attributes() { ensureAttributes(); return super.attributes(); } @Override public Node attr(String attributeKey, String attributeValue) { ensureAttributes(); return super.attr(attributeKey, attributeValue); } @Override public boolean hasAttr(String attributeKey) { ensureAttributes(); return super.hasAttr(attributeKey); } @Override public Node removeAttr(String attributeKey) { ensureAttributes(); return super.removeAttr(attributeKey); } @Override public String absUrl(String attributeKey) { ensureAttributes(); return super.absUrl(attributeKey); } }
[ "justinwm@163.com" ]
justinwm@163.com
559b05686dfd54bf7c950929e211ad237bd6d2e8
0e4756fbda5832b02258425dd0e94382fdcb40d1
/ctoedu-springboot-dubbo/ctoedu-springboot-dubbo-consumer/src/test/java/cn/ctoedu/ApplicationTests.java
da07e13fb222385682111e8c2aa62a4af03097d5
[]
no_license
bobobokey/learndemo
d1da80636864825a8d1a6e6fe1168b599de119d9
24d6200e39d49362ce37023367627f536ecfa814
refs/heads/master
2022-04-28T14:44:17.970284
2022-04-28T04:33:01
2022-04-28T04:33:01
486,090,706
0
0
null
2022-04-28T04:33:02
2022-04-27T07:30:09
null
UTF-8
Java
false
false
2,318
java
package cn.ctoedu; import cn.ctoedu.service.ComputeService; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = Application.class) public class ApplicationTests { @Autowired ComputeService computeService; @Test public void testAdd() throws Exception { System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"); System.out.println("Dubbo消费结果为:。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。"+computeService.add(100, 200)); Assert.assertEquals("compute-service:add", new Integer(3), computeService.add(1, 2)); //Assert.assertEquals("compute-service:add", new Integer(5), computeService.add(1, 2)); } }
[ "32060663+csy512889371@users.noreply.github.com" ]
32060663+csy512889371@users.noreply.github.com
8375980a909b911cb38205eca424258d7dbde389
bc8bc366e772fa10f479cf033f8ed55c81641efc
/app/src/main/java/myproject/mylaundry/module/DirectionKobal.java
ab29be78616e3fd2b7bc6bae1b499ce4bbec8369
[]
no_license
ArifGlory/MyLaundry
7d43480293b66a1a543fb15b5c9c5135e48b57dc
a71cd742c399519e0200c7ce1acda2b984512e89
refs/heads/master
2020-08-27T11:08:07.472046
2020-08-27T02:01:28
2020-08-27T02:01:28
217,344,947
0
0
null
null
null
null
UTF-8
Java
false
false
5,948
java
package myproject.mylaundry.module; import android.os.AsyncTask; import android.util.Log; import com.google.android.gms.maps.model.LatLng; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.List; public class DirectionKobal { private static final String DIRECTION_URL_API = "https://maps.googleapis.com/maps/api/directions/json?"; private static final String GOOGLE_API_KEY = "AIzaSyBYR_9WSimaGMFhwRyTSy25DKPrSnl97uc"; private DirectionKobalListener listener; private String origin; private String destination; public DirectionKobal(DirectionKobalListener listener, String origin, String destination) { this.listener = listener; this.origin = origin; this.destination = destination; Log.d("originDK:",origin); Log.d("destinationDK:",destination); } public void execute() throws UnsupportedEncodingException { listener.onDirectionKobalStart(); new DownloadRawData().execute(createUrl()); Log.d("URl :",createUrl()); } private String createUrl() throws UnsupportedEncodingException { // String urlOrigin = URLEncoder.encode(origin, "utf-8"); // String urlDestination = URLEncoder.encode(destination, "utf-8"); String urlOrigin = origin; String urlDestination = destination; Log.d("originDK2:",urlOrigin); Log.d("destinationDK2:",urlDestination); // String tes = "https://maps.googleapis.com/maps/api/directions/json?origin=-5.382351,%20105.257791&destination=-5.312351,%20105.757791&key=AIzaSyBu7sqdHEuWtcuTmLbxrQK5Qnb-m0ggBr8"; return DIRECTION_URL_API + "origin=" + urlOrigin + "&destination=" + urlDestination + "&key=" + GOOGLE_API_KEY; // return tes; } private class DownloadRawData extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String... params) { String link = params[0]; try { URL url = new URL(link); InputStream is = url.openConnection().getInputStream(); StringBuffer buffer = new StringBuffer(); BufferedReader reader = new BufferedReader(new InputStreamReader(is)); String line; while ((line = reader.readLine()) != null) { buffer.append(line + "\n"); } return buffer.toString(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return null; } @Override protected void onPostExecute(String res) { try { parseJSon(res); } catch (JSONException e) { e.printStackTrace(); } } } private void parseJSon(String data) throws JSONException { if (data == null) return; List<Route> routes = new ArrayList<Route>(); JSONObject jsonData = new JSONObject(data); JSONArray jsonRoutes = jsonData.getJSONArray("routes"); for (int i = 0; i < jsonRoutes.length(); i++) { JSONObject jsonRoute = jsonRoutes.getJSONObject(i); Route route = new Route(); JSONObject overview_polylineJson = jsonRoute.getJSONObject("overview_polyline"); JSONArray jsonLegs = jsonRoute.getJSONArray("legs"); JSONObject jsonLeg = jsonLegs.getJSONObject(0); JSONObject jsonDistance = jsonLeg.getJSONObject("distance"); JSONObject jsonDuration = jsonLeg.getJSONObject("duration"); JSONObject jsonEndLocation = jsonLeg.getJSONObject("end_location"); JSONObject jsonStartLocation = jsonLeg.getJSONObject("start_location"); route.distance = new Distance(jsonDistance.getString("text"), jsonDistance.getInt("value")); route.duration = new Duration(jsonDuration.getString("text"), jsonDuration.getInt("value")); route.endAddress = jsonLeg.getString("end_address"); route.startAddress = jsonLeg.getString("start_address"); route.startLocation = new LatLng(jsonStartLocation.getDouble("lat"), jsonStartLocation.getDouble("lng")); route.endLocation = new LatLng(jsonEndLocation.getDouble("lat"), jsonEndLocation.getDouble("lng")); route.points = decodePolyLine(overview_polylineJson.getString("points")); routes.add(route); } listener.onDirectionKobalSuccess(routes); } private List<LatLng> decodePolyLine(final String poly) { int len = poly.length(); int index = 0; List<LatLng> decoded = new ArrayList<LatLng>(); int lat = 0; int lng = 0; while (index < len) { int b; int shift = 0; int result = 0; do { b = poly.charAt(index++) - 63; result |= (b & 0x1f) << shift; shift += 5; } while (b >= 0x20); int dlat = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1)); lat += dlat; shift = 0; result = 0; do { b = poly.charAt(index++) - 63; result |= (b & 0x1f) << shift; shift += 5; } while (b >= 0x20); int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1)); lng += dlng; decoded.add(new LatLng( lat / 100000d, lng / 100000d )); } return decoded; } }
[ "arifglory46@gmail.com" ]
arifglory46@gmail.com
d213c78da6cc222fe3951c77bca89d8ff6c1122b
de514e258a6e368fea5de242ebaadb16b267c332
/corejavademo/src/test/java/com/art2cat/dev/corejava/iostream/FileStreamTest.java
76df5a28e646353e594ce8cab4d3936419cef62d
[]
no_license
Art2Cat/JavaDemo
09e1e10d4bbc13fb80f6afd92e56d4c4bfed3d51
08a8a45c3301bfba5856b7edeebf37ebd648111b
refs/heads/master
2021-06-21T16:40:04.403603
2019-08-03T06:14:18
2019-08-03T06:14:18
104,846,429
0
1
null
null
null
null
UTF-8
Java
false
false
1,311
java
package com.art2cat.dev.corejava.iostream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.nio.file.Paths; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; public class FileStreamTest { private Path path = Paths.get("src", "test", "resources", "out.dat"); @Test public void testFileOutputStream() { try (FileOutputStream out = new FileOutputStream(path.toString())) { out.write('A'); out.write('B'); out.write("中国".getBytes(StandardCharsets.UTF_8)); } catch (IOException e) { Assertions.fail(e); } } @Test public void testFileInputStream() { try (FileInputStream in = new FileInputStream(path.toString())) { byte[] buffer = new byte[1024]; int c; StringBuilder builder = new StringBuilder(); while ((c = in.read(buffer, 0, buffer.length)) != -1) { builder.append(new String(buffer, 0, c, StandardCharsets.UTF_8)); } Assertions.assertEquals("AB中国", builder.toString()); } catch (IOException e) { Assertions.fail(e); } } }
[ "yiming.whz@gmail.com" ]
yiming.whz@gmail.com
1447b3074583b849debbe71d7e32b170c6a71c9f
1070edc16d16f0204ef4fd5640025fd71ee3c0a4
/enlighten/src-instr/instr/callback/ArrayCopyParams.java
ee7aed267573b5fbe4966d73a59989dec13d456e
[]
no_license
gatech/enlightened-debugging
db00c5021fd03ba17518322abe8cd1e891cd1c29
890ef5ec6c495d3017f23b0d2cd4aa6f3270e8cd
refs/heads/master
2021-02-13T16:54:18.335477
2020-03-03T18:50:51
2020-03-03T18:50:51
244,714,355
1
0
null
null
null
null
UTF-8
Java
false
false
2,029
java
/* * Copyright 2019 Georgia Institute of Technology * All rights reserved. * * Author(s): Xiangyu Li <xiangyu.li@cc.gatech.edu> * * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation and/or * other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors * may be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package instr.callback; public class ArrayCopyParams { public Object src; public int srcPos; public Object dest; public int destPos; public int length; public ArrayCopyParams(Object src, int srcPos, Object dest, int destPos, int length) { this.src = src; this.srcPos = srcPos; this.dest = dest; this.destPos = destPos; this.length = length; } }
[ "shoreray@live.com" ]
shoreray@live.com
42c7b4e5de8951d4991dd08bc04e56ca30f4395e
a18dbf5a4d9bc7514fa65514e47d5ff145bdae0f
/src/main/java/com/atguigu/controller/back/MlbackCountdownController.java
0a5a7ccfbe5fc1ed98152fef4853ef09ee2554e7
[]
no_license
ColdMoonlight/HuaShuoCustom
a6a0a12cebe0f872bdaef5bec0144886049f4c25
8b983c0da81ca4c1dd7ef2485d28f4ba8726e59b
refs/heads/Custom
2023-08-06T10:54:30.996330
2021-08-27T06:45:58
2021-08-27T06:45:58
398,129,498
0
0
null
2021-08-25T02:14:47
2021-08-20T02:15:16
Java
UTF-8
Java
false
false
5,002
java
package com.atguigu.controller.back; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.atguigu.bean.MlbackAdmin; import com.atguigu.bean.MlbackCountdown; import com.atguigu.common.Const; import com.atguigu.common.Msg; import com.atguigu.service.MlbackAdminService; import com.atguigu.service.MlbackCountdownService; import com.atguigu.utils.DateUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; @Controller @RequestMapping("/MlbackCountdown") public class MlbackCountdownController { @Autowired MlbackCountdownService mlbackCountdownService; @Autowired MlbackAdminService mlbackAdminService; /** * 1.0 20200707 * toMlbackCountdownPage列表页面 * @param jsp * @return * */ @RequestMapping("/toMlbackCountdownPage") public String toMlbackCountdownPage(HttpSession session) throws Exception{ MlbackAdmin mlbackAdmin =(MlbackAdmin) session.getAttribute(Const.ADMIN_USER); if(mlbackAdmin==null){ //MlbackAdmin对象为空 return "back/mlbackAdminLogin"; }else{ return "back/marketing/mlbackCountdownPage"; } } /**2.0 20200707 * 分类MlbackActShowPro列表分页list数据 * @param pn * @return */ @RequestMapping(value="/getMlbackCountdownByPage") @ResponseBody public Msg getMlbackActShowProByPage(@RequestParam(value = "pn", defaultValue = "1") Integer pn,HttpSession session) { int PagNum = Const.PAGE_NUM_CATEGORY; PageHelper.startPage(pn, PagNum); List<MlbackCountdown> MlbackCountdownList = mlbackCountdownService.selectMlbackCountdownGetAll(); System.out.println("MlbackCountdownList.size:"+MlbackCountdownList.size()); PageInfo page = new PageInfo(MlbackCountdownList, PagNum); return Msg.success().add("pageInfo", page); } /**3.0 20200703 * MlbackCountdown initializaSlide * @param MlbackCountdown * @return */ @RequestMapping(value="/initializaSlide",method=RequestMethod.POST) @ResponseBody public Msg initializaSlide(HttpServletResponse rep,HttpServletRequest res){ MlbackCountdown mlbackCountdown = new MlbackCountdown(); //取出id String nowTime = DateUtil.strTime14s(); mlbackCountdown.setCountdownCreatetime(nowTime); //无id,insert System.out.println("插入前"+mlbackCountdown.toString()); mlbackCountdownService.insertSelective(mlbackCountdown); System.out.println("插入后"+mlbackCountdown.toString()); return Msg.success().add("resMsg", "Catalog初始化成功").add("mlbackCountdown", mlbackCountdown); } /**3.0 20200707 * mlbackCountdown save * @param mlbackCountdown */ @RequestMapping(value="/save",method=RequestMethod.POST) @ResponseBody public Msg saveSelective(HttpServletResponse rep,HttpServletRequest res,@RequestBody MlbackCountdown mlbackCountdown){ //接受参数信息 //mlbackProductService; String nowtime = DateUtil.strTime14s(); mlbackCountdown.setCountdownMotifytime(nowtime); //有id,update mlbackCountdownService.updateByPrimaryKeySelective(mlbackCountdown); return Msg.success().add("resMsg", "更新成功"); } /**4.0 20200707 * MlbackCountdown delete * @param id */ @RequestMapping(value="/delete",method=RequestMethod.POST) @ResponseBody public Msg delete(@RequestBody MlbackCountdown mlbackCountdown){ //接收SlideId Integer countdownId = mlbackCountdown.getCountdownId(); mlbackCountdownService.deleteByPrimaryKey(countdownId); return Msg.success().add("resMsg", "delete success"); } /** * 5.0 20200707 * 查看单条Slide的详情细节 * @param MlbackCountdown * @return */ @RequestMapping(value="/getOneMlbackCountdownDetail",method=RequestMethod.POST) @ResponseBody public Msg getOneMlbackCountdownDetail(@RequestBody MlbackCountdown mlbackCountdown){ Integer countdownId = mlbackCountdown.getCountdownId(); //接受actshowproId MlbackCountdown mlbackCountdownReq = new MlbackCountdown(); mlbackCountdownReq.setCountdownId(countdownId); //查询本条 List<MlbackCountdown> mlbackCountdowList =mlbackCountdownService.selectMlbackCountdownById(mlbackCountdownReq); MlbackCountdown mlbackCountdownOne = new MlbackCountdown(); if(mlbackCountdowList.size()>0){ mlbackCountdownOne = mlbackCountdowList.get(0); } return Msg.success().add("resMsg", "查看单条倒计时的详情完毕").add("mlbackCountdownOne", mlbackCountdownOne); } }
[ "Administrator@windows10.microdone.cn" ]
Administrator@windows10.microdone.cn
fd4c5902439b4e50eb4534edbe78a0bf471d3f5b
76c92e56ef879d8642c46147d853b744b12498e7
/src/com/servlet/ExamServlet.java
66b5b88b4eb7ade3ad35c94e6cbd76b117cce819
[]
no_license
KTLeYing/stuinfomanagesystem
c7e55ed342f81a6d31fb775471439dbfce364fe0
31f46b407695f70a5919af079258248beeb5b43a
refs/heads/master
2023-03-14T19:32:09.675431
2021-03-17T09:33:56
2021-03-17T09:33:56
266,731,838
2
0
null
null
null
null
UTF-8
Java
false
false
4,455
java
package com.servlet; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.util.Enumeration; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.entity.Exam; import com.entity.Page; import com.entity.User; import com.service.ExamService; import com.tools.StringTool; import org.apache.commons.beanutils.BeanUtils; import net.sf.json.JSONObject; /** * 考试类Servlet * @author bojiangzhou * */ @WebServlet("/ExamServlet") public class ExamServlet extends HttpServlet { //创建服务层对象 private ExamService service = new ExamService(); @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //获取请求的方法 String method = request.getParameter("method"); if("toExamListView".equalsIgnoreCase(method)){ //转发到考试列表页 request.getRequestDispatcher("/WEB-INF/view/other/examList.jsp").forward(request, response); } } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //获取请求的方法 String method = request.getParameter("method"); //请求分发 if("ExamList".equalsIgnoreCase(method)){ //获取所有考试数据 examList(request, response); } else if("AddExam".equalsIgnoreCase(method)){ //添加考试 addExam(request, response); } else if("DeleteExam".equalsIgnoreCase(method)){ //删除考试信息 deleteExam(request, response); } else if("TeacherExamList".equalsIgnoreCase(method)){ //获取属于某个老师的考试 teacherExamList(request, response); } else if("StudentExamList".equalsIgnoreCase(method)){ //获取属于某个学生的考试 studentExamList(request, response); } } private void studentExamList(HttpServletRequest request, HttpServletResponse response) throws IOException { //获取当前用户 User user = (User) request.getSession().getAttribute("user"); String number = user.getAccount(); String result = service.studentExamList(number); response.getWriter().write(result); } private void teacherExamList(HttpServletRequest request, HttpServletResponse response) throws IOException { //获取当前用户 User user = (User) request.getSession().getAttribute("user"); String number = user.getAccount(); String result = service.teacherExamList(number); response.getWriter().write(result); } private void deleteExam(HttpServletRequest request, HttpServletResponse response) throws IOException { //获取要删除的id int id = Integer.parseInt(request.getParameter("id")); try { service.deleteExam(id); response.getWriter().write("success"); } catch (Exception e) { response.getWriter().write("fail"); e.printStackTrace(); } } private void addExam(HttpServletRequest request, HttpServletResponse response) throws IOException { //获取参数名 Enumeration<String> pNames = request.getParameterNames(); Exam exam = new Exam(); while(pNames.hasMoreElements()){ String pName = pNames.nextElement(); String value = request.getParameter(pName); try { BeanUtils.setProperty(exam, pName, value); } catch (IllegalAccessException | InvocationTargetException e) { e.printStackTrace(); } } try { service.addExam(exam); response.getWriter().write("success"); } catch (Exception e) { response.getWriter().write("fail"); e.printStackTrace(); } } private void examList(HttpServletRequest request, HttpServletResponse response) throws IOException { //获取分页参数 int page = Integer.parseInt(request.getParameter("page")); int rows = Integer.parseInt(request.getParameter("rows")); //年级ID String gradeid = request.getParameter("gradeid"); //班级ID String clazzid = request.getParameter("clazzid"); Exam exam = new Exam(); if(!StringTool.isEmpty(gradeid)){ exam.setGradeid(Integer.parseInt(gradeid)); } if(!StringTool.isEmpty(clazzid)){ exam.setClazzid(Integer.parseInt(clazzid)); } //获取数据 String result = service.getExamList(exam, new Page(page, rows)); //返回数据 response.getWriter().write(result); } }
[ "2198902814@qq.com" ]
2198902814@qq.com
16720f0b984718d9c6a0f93f41a7ce6c6bbc1ab7
349cf43ac64952d40a277981642038d30a1fba01
/parser/roland/javascript/JSFunctionExpression.java
e46e33d13c93ecef9662bf18d3376cfeb4bedab4
[ "BSD-2-Clause" ]
permissive
highsource/javascript-codemodel
5ea9d67f1889c7fa8594ba4bfd6ec43ab757262d
7813dbbc74b606214a91df92742899ccd66c1717
refs/heads/master
2023-08-31T23:36:48.642935
2015-04-04T08:03:05
2015-04-04T08:03:05
26,062,088
7
2
null
null
null
null
UTF-8
Java
false
false
1,852
java
/* * Definition of expression trees for function/method invocations. thisValInvoke() * of the expression lval tells us whether the function invocation came from a method * or from a normal function call. */ package roland.javascript; import java.util.Vector; import java.lang.String; class JSFunctionExpression extends JSExpression { JSExpression _name; Vector _args; // Vector of JSExpression's ////////////////////////////////////////////////////////////////////////////// // Constructor public JSFunctionExpression( Token t, JSExpression name, Vector args) { super(t); _name = name; _args = args; } ////////////////////////////////////////////////////////////////////////////// // Extension of JSExpression public JSValue Eval( JSContext context) throws JSException { setLineCol(context); JSValue fnVal = _name.Eval(context); setLineCol(context); Vector argVals = new Vector(); for(int i=0; i<_args.size(); i++) { argVals.addElement( ((JSExpression)_args.elementAt(i)).Eval(context)); } JSValue thisVal; if( fnVal instanceof JSLValue) { thisVal = ((JSLValue)fnVal).thisValInvoke(context); } else { throw new JSException( "Can't evaluate \"this\" for function invocation - this should not happen.", context); } return context._lastExpr = ((JSFunctionValue)fnVal.asFunction(context)).Invoke( context, thisVal, argVals); } ////////////////////////////////////////////////////////////////////////////// // Extension of JSParsedStatement public String Decompile(int indent) { String s = _name.Decompile(indent) + "("; for(int i=0; i < _args.size(); i++) { s += ((JSExpression)_args.elementAt(i)).Decompile(indent); if( i < _args.size()-1) { s += ", "; } } s += ")"; return s; } }
[ "aleksei.valikov@gmail.com" ]
aleksei.valikov@gmail.com
28e28c6116a92cf12f2d59507171acdbbe7ee742
f21c426606be1d72c8e333c1a46af1eba8380e8c
/app/src/main/java/com/esspl/hemendra/weatherapp/service/YAHOOWeatherService.java
a62392cddb1b3473ce1d1d847d5fe03b18552a4a
[]
no_license
bapisth/WeatherApp
79a13d4d241de585567f8ac01134dd08ed5a2df9
7af0fee24670de303b86e212f3da4cc62e7fbdf2
refs/heads/master
2016-08-11T22:25:59.155578
2015-12-05T03:23:02
2015-12-05T03:23:02
47,233,817
0
0
null
null
null
null
UTF-8
Java
false
false
3,645
java
package com.esspl.hemendra.weatherapp.service; import android.net.Uri; import android.os.AsyncTask; import android.util.Log; import com.esspl.hemendra.weatherapp.model.Channel; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URI; import java.net.URL; import java.net.URLConnection; /** * Created by BAPI1 on 01-12-2015. */ public class YAHOOWeatherService { private WeatherServiceCallback callback; private String location; private Exception error; public String getLocation() { return location; } public YAHOOWeatherService(WeatherServiceCallback callback) { this.callback = callback; } public void refreshWeather(String l){ this.location=l; new AsyncTask<String, Void, String>() { @Override protected String doInBackground(String... params) { String YQL = String.format("select * from weather.forecast where woeid in (select woeid from geo.places(1) where text=\"%s\") and u='c'", params[0]); //String YQL = String.format("select * from weather.forecast where woeid in (select woeid from geo.places(1) where text=\"%s\")", params[0]); String endPoint = String.format("https://query.yahooapis.com/v1/public/yql?q=%s&format=json", Uri.encode(YQL)); Log.d("Endpoint=============",endPoint); try { URL url = new URL(endPoint); URLConnection connection = url.openConnection(); InputStream inputStream = connection.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream)); StringBuilder result = new StringBuilder(); String line; while ((line= reader.readLine())!=null ){ result.append(line); } return result.toString(); } catch (Exception e) { e.printStackTrace(); } return null; } @Override protected void onPostExecute(String s) { if(s==null && error != null){ callback.serviceFailure(error); return; } try { if (s==null){ callback.serviceFailure(new LocationWetherException("Location Bodhe Miluni taku.."+s)); return; } JSONObject data = new JSONObject(s); JSONObject queryResults = data.getJSONObject("query"); int count = queryResults.getInt("count"); if(count == 0){ callback.serviceFailure(new LocationWetherException("No Weather Information Found For "+location)); return; } Channel channel = new Channel(); channel.populate(queryResults.optJSONObject("results").optJSONObject("channel")); callback.serviceSuccess(channel); } catch (JSONException e) { callback.serviceFailure(e); } } }.execute(location); } public class LocationWetherException extends Exception{ public LocationWetherException(String detailMessage) { super(detailMessage); } } }
[ "hemendra7011@rediffmail.com" ]
hemendra7011@rediffmail.com
9171c01e8aef3a7ec75130bf1530b9d94901c9e6
8bca6164fc085936891cda5ff7b2341d3d7696c5
/bootstrap/gensrc/de/hybris/platform/acceleratorservices/enums/CheckoutFlowEnum.java
af3364de3b5907e787fa8012bb75f917f117dbdf
[]
no_license
rgonthina1/newplatform
28819d22ba48e48d4edebbf008a925cad0ebc828
1cdc70615ea4e86863703ca9a34231153f8ef373
refs/heads/master
2021-01-19T03:03:22.221074
2016-06-20T14:49:25
2016-06-20T14:49:25
61,548,232
1
0
null
null
null
null
UTF-8
Java
false
false
3,860
java
/* * * [y] hybris Platform * * Copyright (c) 2000-2015 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * */ package de.hybris.platform.acceleratorservices.enums; import de.hybris.platform.core.HybrisEnumValue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; /** * Generated enum CheckoutFlowEnum declared at extension acceleratorservices. */ @SuppressWarnings("PMD") public class CheckoutFlowEnum implements HybrisEnumValue { /**<i>Generated model type code constant.</i>*/ public final static String _TYPECODE = "CheckoutFlowEnum"; /**<i>Generated simple class name constant.</i>*/ public final static String SIMPLE_CLASSNAME = "CheckoutFlowEnum"; private static final ConcurrentMap<String, CheckoutFlowEnum> cache = new ConcurrentHashMap<String, CheckoutFlowEnum>(); /** * Generated enum value for CheckoutFlowEnum.MULTISTEP declared at extension acceleratorservices. */ public static final CheckoutFlowEnum MULTISTEP = valueOf("MULTISTEP"); /** The code of this enum.*/ private final String code; private final String codeLowerCase; /** * Creates a new enum value for this enum type. * * @param code the enum value code */ private CheckoutFlowEnum(final String code) { this.code = code.intern(); this.codeLowerCase = this.code.toLowerCase().intern(); } /** * Compares this object to the specified object. The result is <code>true</code> * if and only if the argument is not <code>null</code> and is an <code>CheckoutFlowEnum * </code> object that contains the enum value <code>code</code> as this object. * * @param obj the object to compare with. * @return <code>true</code> if the objects are the same; * <code>false</code> otherwise. */ @Override public boolean equals(final Object obj) { try { final HybrisEnumValue enum2 = (HybrisEnumValue) obj; return this == enum2 || (enum2 != null && !this.getClass().isEnum() && !enum2.getClass().isEnum() && this.getType().equalsIgnoreCase(enum2.getType()) && this.getCode().equalsIgnoreCase(enum2.getCode())); } catch (final ClassCastException e) { return false; } } /** * Gets the code of this enum value. * * @return code of value */ @Override public String getCode() { return this.code; } /** * Gets the type this enum value belongs to. * * @return code of type */ @Override public String getType() { return SIMPLE_CLASSNAME; } /** * Returns a hash code for this <code>CheckoutFlowEnum</code>. * * @return a hash code value for this object, equal to the enum value <code>code</code> * represented by this <code>CheckoutFlowEnum</code> object. */ @Override public int hashCode() { return this.codeLowerCase.hashCode(); } /** * Returns the code representing this enum value. * * @return a string representation of the value of this object. */ @Override public String toString() { return this.code.toString(); } /** * Returns a <tt>CheckoutFlowEnum</tt> instance representing the specified enum value. * * @param code an enum value * @return a <tt>CheckoutFlowEnum</tt> instance representing <tt>value</tt>. */ public static CheckoutFlowEnum valueOf(final String code) { final String key = code.toLowerCase(); CheckoutFlowEnum result = cache.get(key); if (result == null) { CheckoutFlowEnum newValue = new CheckoutFlowEnum(code); CheckoutFlowEnum previous = cache.putIfAbsent(key, newValue); result = previous != null ? previous : newValue; } return result; } }
[ "Kalpana" ]
Kalpana
7c05632ef40ff55e23c91462147a6ab0b23c17cb
380366cde7f499290a61f8372034744cae137a4e
/mso-catalog-db/src/test/java/org/onap/so/db/catalog/TempNetworkHeatTemplateLookupTest.java
e0de3cf3754cb1e8c76a274ab05cfa369257b1ba
[ "Apache-2.0" ]
permissive
onap/so
82a219ed0e5559a94d630cc9956180dbab0d33b8
43224c4dc5ff3bf67979f480d8628f300497da07
refs/heads/master
2023-08-21T00:09:36.560504
2023-07-03T16:30:22
2023-07-03T16:30:55
115,077,083
18
25
Apache-2.0
2022-03-21T09:59:49
2017-12-22T04:39:28
Java
UTF-8
Java
false
false
2,307
java
/*- * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ============LICENSE_END========================================================= */ package org.onap.so.db.catalog; import static org.junit.Assert.assertTrue; import org.junit.Test; import org.onap.so.db.catalog.beans.TempNetworkHeatTemplateLookup; /** */ public class TempNetworkHeatTemplateLookupTest { @Test public final void tempNetworkHeatTemplateLookupDataTest() { TempNetworkHeatTemplateLookup tempNetworkHeatTemplateLookup = new TempNetworkHeatTemplateLookup(); tempNetworkHeatTemplateLookup.setAicVersionMax("aicVersionMax"); assertTrue(tempNetworkHeatTemplateLookup.getAicVersionMax().equalsIgnoreCase("aicVersionMax")); tempNetworkHeatTemplateLookup.setAicVersionMin("aicVersionMin"); assertTrue(tempNetworkHeatTemplateLookup.getAicVersionMin().equalsIgnoreCase("aicVersionMin")); tempNetworkHeatTemplateLookup.setHeatTemplateArtifactUuid("heatTemplateArtifactUuid"); assertTrue(tempNetworkHeatTemplateLookup.getHeatTemplateArtifactUuid() .equalsIgnoreCase("heatTemplateArtifactUuid")); tempNetworkHeatTemplateLookup.setNetworkResourceModelName("networkResourceModelName"); assertTrue(tempNetworkHeatTemplateLookup.getNetworkResourceModelName() .equalsIgnoreCase("networkResourceModelName")); // assertTrue(tempNetworkHeatTemplateLookup.toString() != null); } }
[ "mb388a@us.att.com" ]
mb388a@us.att.com
87073d57896c6b7290e13b384ae17de94ca164c2
8de0190ba91403621d09cdb0855612d00d8179b2
/leetcode-algorithm-java/src/main/java/johnny/leetcode/algorithm/Solution018.java
660ec4f2613278531391fca9a51fb9da28c75ef6
[]
no_license
156420591/algorithm-problems-java
e2494831becba9d48ab0af98b99fca138aaa1ca8
1aec8a6e128763b1c1378a957d270f2a7952b81a
refs/heads/master
2023-03-04T12:36:06.143086
2021-02-05T05:38:15
2021-02-05T05:38:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,919
java
package johnny.leetcode.algorithm; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; /** * 4Sum. * Given an array S of n integers, are there elements a, b, c, and d in S such * that a + b + c + d = target? Find all unique quadruplets in the array which * gives the sum of target. * <p> * Note: * Elements in a quadruplet (a,b,c,d) must be in non-descending order. * (ie, a ≤ b ≤ c ≤ d) * The solution set must not contain duplicate quadruplets. * For example, given array S = {1 0 -1 0 -2 2}, and target = 0. * <p> * A solution set is: * (-1, 0, 0, 1) * (-2, -1, 1, 2) * (-2, 0, 0, 2) * * @author Johnny */ public class Solution018 { public List<List<Integer>> fourSum(int[] nums, int target) { List<List<Integer>> res = new ArrayList<List<Integer>>(); if (nums == null || nums.length < 3) { return res; } Arrays.sort(nums); HashSet<List<Integer>> hashSet = new HashSet<List<Integer>>(); for (int i = 0; i < nums.length; i++) { for (int j = i + 1; j < nums.length; j++) { int k = j + 1; int l = nums.length - 1; while (k < l) { int sum = nums[i] + nums[j] + nums[k] + nums[l]; if (sum == target) { List<Integer> item = Arrays.asList(nums[i], nums[j], nums[k], nums[l]); if (!hashSet.contains(item)) { hashSet.add(item); res.add(item); } k++; l--; } else if (sum > target) { l--; } else if (sum < target) { k++; } } } } return res; } }
[ "jojozhuang@gmail.com" ]
jojozhuang@gmail.com
be0e383eb5f098cee3d109415cc7376001274535
b99a6c1b7344f4f7aea1021705c188ae53f7919c
/src/main/java/com/gz/example/App.java
9549d262742f77811ba21fe782a6b44a8a3c41d2
[]
no_license
xiaozefeng/blade-example
ce26f9caa9ba3006777279a7dc667f8cca29cbf2
f534e8a2b0054cd28bb1c84e32300fbd2011f948
refs/heads/master
2021-05-12T09:35:45.197078
2018-01-13T08:18:26
2018-01-13T08:18:26
117,326,771
0
0
null
null
null
null
UTF-8
Java
false
false
298
java
package com.gz.example; import com.blade.Blade; /** * Hello world! * * @author xiaozefeng */ public class App { public static void main(String[] args) { Blade.me() .get("/", (req, res) -> res.text("Hello Blade !")) .start(App.class, args); } }
[ "qq523107430@163.com" ]
qq523107430@163.com
09ebaf38389cfaab47c7a34cf14182f984aef891
06d71c9e817f5db60550145dcf61d045d5609448
/java/src/com/wj100/server/Server06.java
8877cbe0dd6d176ca933c0b8bc57006152797b88
[]
no_license
jie8023yu/JavaBase
792839588496c08388760347bc11d00dbf04793d
4b01a54c9117ccc1c8ce8c1d0a949372348ae1d5
refs/heads/master
2021-07-06T19:19:42.021639
2020-09-03T10:02:30
2020-09-03T10:02:30
177,577,914
0
0
null
null
null
null
UTF-8
Java
false
false
2,267
java
package com.wj100.server; import com.wj100.server.servlet.LoginServlet; import com.wj100.server.servlet.RegisterServlet; import com.wj100.server.servlet.Servlet; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; /** * 加入了servvlet,解耦了业务代码 */ public class Server06 { private ServerSocket serverSocket; public static void main(String[] args) { Server06 server = new Server06(); server.start(); while (true) { try { server.receive(); } catch (Exception e) { e.printStackTrace(); } } } //启动服务 public void start() { try { serverSocket = new ServerSocket(8888); System.out.println("服务器启动完毕"); } catch (IOException e) { e.printStackTrace(); System.out.println("服务启动失败"); } } public void receive() { try { Socket client = serverSocket.accept(); System.out.println("一个客户端建立了连接"); //获取请求协议 Request2 request = new Request2(client); String[] usernames = request.getParameterValues("username"); if (null != usernames) { for (String str : usernames) System.out.println(str); } Response response = new Response(client); Servlet servlet = null; String url = request.getUrl().trim(); if (url.equals("login")) { servlet = new LoginServlet(); } else if (url.equals("reg")) { servlet = new RegisterServlet(); } else { //首页 } servlet.service(request,response); //关注状态码 response.pushToBrowser(200); } catch (IOException e) { e.printStackTrace(); System.out.println("客户端错误"); } } //停止服务 public void stop() { try { serverSocket.close(); } catch (IOException e) { e.printStackTrace(); System.out.println("服务器关闭失败"); } } }
[ "15236730688@163.com" ]
15236730688@163.com
cb826f7fad8e5e5949974ce4a4b5161f90cf4703
8d5e27d3541120c4ae3a6a86227e185e1cf90757
/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/resource/BaseBinary.java
3514aa9173c47dd5e11b63296cdce367e9194552
[]
no_license
sweetnavelorange/hapi-fhir
82d77c0b8604b034b0558dce4694f5dd3fd5774e
a81e081798e642a0d8a5bdfc2839b6f05ee76195
refs/heads/master
2020-12-24T13:53:34.673831
2015-03-01T23:00:06
2015-03-01T23:00:06
31,572,617
0
0
null
2015-03-03T01:15:12
2015-03-03T01:15:12
null
UTF-8
Java
false
false
1,019
java
package ca.uhn.fhir.model.base.resource; /* * #%L * HAPI FHIR - Core Library * %% * Copyright (C) 2014 - 2015 University Health Network * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import ca.uhn.fhir.model.api.IResource; public interface BaseBinary extends IResource { byte[] getContent(); String getContentAsBase64(); String getContentType(); void setContent(byte[] theContent); void setContentAsBase64(String theContent); void setContentType(String theContentType); }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
13734bd507b861f9fc9c3e14f8042a7bbb3ada9c
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/sonar/ce/task/projectanalysis/util/cache/ObjectInputStreamIteratorTest.java
f11d51e9183126394b07bdf3a58ea4042d4a9f02
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
3,280
java
/** * SonarQube * Copyright (C) 2009-2019 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.sonar.ce.task.projectanalysis.util.cache; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.NoSuchElementException; import org.junit.Assert; import org.junit.Test; public class ObjectInputStreamIteratorTest { @Test public void read_objects() throws Exception { ByteArrayOutputStream bytesOutput = new ByteArrayOutputStream(); ObjectOutputStream objectOutputStream = new ObjectOutputStream(bytesOutput); objectOutputStream.writeObject(new ObjectInputStreamIteratorTest.SimpleSerializable("first")); objectOutputStream.writeObject(new ObjectInputStreamIteratorTest.SimpleSerializable("second")); objectOutputStream.writeObject(new ObjectInputStreamIteratorTest.SimpleSerializable("third")); objectOutputStream.flush(); objectOutputStream.close(); ObjectInputStreamIterator<ObjectInputStreamIteratorTest.SimpleSerializable> it = new ObjectInputStreamIterator(new ByteArrayInputStream(bytesOutput.toByteArray())); assertThat(it.next().value).isEqualTo("first"); assertThat(it.next().value).isEqualTo("second"); assertThat(it.next().value).isEqualTo("third"); try { it.next(); Assert.fail(); } catch (NoSuchElementException expected) { } } @Test public void test_error() throws Exception { ByteArrayOutputStream bytesOutput = new ByteArrayOutputStream(); ObjectOutputStream objectOutputStream = new ObjectOutputStream(bytesOutput); objectOutputStream.writeObject(new ObjectInputStreamIteratorTest.SimpleSerializable("first")); objectOutputStream.writeBoolean(false); objectOutputStream.flush(); objectOutputStream.close(); ObjectInputStreamIterator<ObjectInputStreamIteratorTest.SimpleSerializable> it = new ObjectInputStreamIterator(new ByteArrayInputStream(bytesOutput.toByteArray())); assertThat(it.next().value).isEqualTo("first"); try { it.next(); Assert.fail(); } catch (RuntimeException expected) { } } static class SimpleSerializable implements Serializable { String value; public SimpleSerializable() { } public SimpleSerializable(String value) { this.value = value; } } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
4f588d198b7d49f3ab273f0170fdcd9ad8242eab
59e0b637d3f7885fdbde61a6900ed3dbf52224fa
/src/nl/esciencecenter/neon/examples/jurriaan/SegmentedLine.java
1f7d1aade92a270af278bee1c12b25d177643aff
[]
no_license
Maartenvm/NeonApps
d4a8eb73d15fe8af173c858209586a307253bdde
b1ca06fb03e5d95c83eb92939b2f5ae0596e6135
refs/heads/master
2021-01-01T16:45:19.300527
2014-04-22T16:57:48
2014-04-22T16:57:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,912
java
package nl.esciencecenter.neon.examples.jurriaan; import java.nio.FloatBuffer; import java.util.ArrayList; import java.util.List; import javax.media.opengl.GL3; import nl.esciencecenter.neon.datastructures.GLSLAttribute; import nl.esciencecenter.neon.datastructures.VertexBufferObject; import nl.esciencecenter.neon.exceptions.UninitializedException; import nl.esciencecenter.neon.math.Color4; import nl.esciencecenter.neon.math.Float4Vector; import nl.esciencecenter.neon.models.Model; import nl.esciencecenter.neon.shaders.ShaderProgram; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class SegmentedLine extends Model { private final static Logger LOGGER = LoggerFactory.getLogger(SegmentedLine.class); private final Color4 color; private final List<Float4Vector> points; private final float widthPerSegment; private class DataPoint { private final float horizontal, vertical; public DataPoint(float horizontal, float vertical) { this.horizontal = horizontal; this.vertical = vertical; } public float getHorizontal() { return horizontal; } public float getVertical() { return vertical; } } private final List<DataPoint> dataPoints; private float minHorizontal, maxHorizontal, minVertical, maxVertical; public SegmentedLine(int numSegments, float widthPerSegment, Color4 color) { super(VertexFormat.LINES); this.widthPerSegment = widthPerSegment; this.color = color; points = new ArrayList<Float4Vector>(); for (int i = 0; i < numSegments + 1; i++) { points.add(new Float4Vector(i * widthPerSegment, 0f, 0f, 1f)); } this.dataPoints = new ArrayList<DataPoint>(); this.minHorizontal = Float.MAX_VALUE; this.minVertical = Float.MAX_VALUE; this.maxHorizontal = Float.MIN_VALUE; this.maxVertical = Float.MIN_VALUE; } public boolean addData(float horizontal, float vertical) { boolean dimensionsChanged = false; if (horizontal < minHorizontal) { minHorizontal = horizontal; dimensionsChanged = true; } if (vertical < minVertical) { minVertical = vertical; dimensionsChanged = true; } if (horizontal > maxHorizontal) { maxHorizontal = horizontal; dimensionsChanged = true; } if (vertical > maxVertical) { maxVertical = vertical; dimensionsChanged = true; } dataPoints.add(new DataPoint(horizontal, vertical)); recalculatePoints(); return dimensionsChanged; } public void applyNewDimensions(float minHorizontal, float maxHorizontal, float minVertical, float maxVertical) { this.minHorizontal = minHorizontal; this.maxHorizontal = maxHorizontal; this.minVertical = minVertical; this.maxVertical = maxVertical; recalculatePoints(); } private void recalculatePoints() { int numSegments = points.size(); float diffHorizontal = maxHorizontal - minHorizontal; float segmentWidth = diffHorizontal / numSegments; points.clear(); for (int i = 0; i < numSegments; i++) { float lowerSegmentBoundary = i * segmentWidth + minHorizontal; float upperSegmentBoundary = (i + 1) * segmentWidth + minHorizontal; float qualifyingDataTotal = 0f; for (DataPoint d : dataPoints) { if (d.getHorizontal() > lowerSegmentBoundary && d.getHorizontal() < upperSegmentBoundary) { qualifyingDataTotal++; } } float segmentHeight = qualifyingDataTotal / dataPoints.size(); Float4Vector segmentPoint = new Float4Vector(i * widthPerSegment, segmentHeight, 0f, 1f); points.add(segmentPoint); } } public float getSegmentValue(int segmentIndex) { int numSegments = points.size(); float diffHorizontal = maxHorizontal - minHorizontal; float segmentWidth = diffHorizontal / numSegments; return segmentIndex * segmentWidth + minHorizontal; } public FloatBuffer pointsAsBuffer() { FloatBuffer result = FloatBuffer.allocate(points.size() * 2 * 4); for (int i = 0; i < points.size() - 1; i++) { Float4Vector thisPoint = points.get(i); Float4Vector nextPoint = points.get(i + 1); result.put(thisPoint.asBuffer()); result.put(nextPoint.asBuffer()); } result.rewind(); return result; } public FloatBuffer colorAsBuffer() { return color.asBuffer(); } public float getMinHorizontal() { return minHorizontal; } public float getMaxHorizontal() { return maxHorizontal; } public float getMinVertical() { return minVertical; } public float getMaxVertical() { return maxVertical; } @Override public void init(GL3 gl) { delete(gl); setNumVertices(points.size() * 2); GLSLAttribute vAttrib = new GLSLAttribute(pointsAsBuffer(), "MCvertex", GLSLAttribute.SIZE_FLOAT, 4); setVbo(new VertexBufferObject(gl, vAttrib)); } @Override public void draw(GL3 gl, ShaderProgram program) throws UninitializedException { program.setUniformVector("Color", color); getVbo().bind(gl); program.linkAttribs(gl, getVbo().getAttribs()); // Load all staged variables into the GPU, check for errors and // omissions. try { program.use(gl); } catch (UninitializedException e) { LOGGER.error(e.getMessage()); } gl.glDrawArrays(GL3.GL_LINES, 0, getNumVertices()); } }
[ "m.vanmeersbergen@esciencecenter.nl" ]
m.vanmeersbergen@esciencecenter.nl
033181dcd5b0d15f0f23730dd98ee2120a330c2d
9fe81626cb2e4e500ce687020f5a91e3d361748b
/com/fasterxml/jackson/annotation/JsonFormat.java
c4183d5c39fb1771a8ea16e708f2a37cfac021d4
[]
no_license
jozn/Bisphone
2a09ebae0c0aa1f993d903444c44c8a30ddf476c
6c55c196dc44dc70d5f840c4db45e523700c604f
refs/heads/master
2021-01-20T03:22:27.235020
2016-02-04T11:44:03
2016-02-04T11:44:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,856
java
package com.fasterxml.jackson.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.util.Locale; import java.util.TimeZone; @Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface JsonFormat { public enum Shape { ANY, SCALAR, ARRAY, OBJECT, NUMBER, NUMBER_FLOAT, NUMBER_INT, STRING, BOOLEAN; public boolean isNumeric() { return this == NUMBER || this == NUMBER_INT || this == NUMBER_FLOAT; } } public class Value { private TimeZone _timezone; private final Locale locale; private final String pattern; private final Shape shape; private final String timezoneStr; public Value() { this("", Shape.ANY, "", ""); } public Value(JsonFormat jsonFormat) { this(jsonFormat.pattern(), jsonFormat.shape(), jsonFormat.locale(), jsonFormat.timezone()); } public Value(String str, Shape shape, String str2, String str3) { Locale locale = (str2 == null || str2.length() == 0 || "##default".equals(str2)) ? null : new Locale(str2); String str4 = (str3 == null || str3.length() == 0 || "##default".equals(str3)) ? null : str3; this(str, shape, locale, str4, null); } public Value(String str, Shape shape, Locale locale, String str2, TimeZone timeZone) { this.pattern = str; this.shape = shape; this.locale = locale; this._timezone = timeZone; this.timezoneStr = str2; } public String getPattern() { return this.pattern; } public Shape getShape() { return this.shape; } public Locale getLocale() { return this.locale; } public TimeZone getTimeZone() { TimeZone timeZone = this._timezone; if (timeZone != null) { return timeZone; } if (this.timezoneStr == null) { return null; } timeZone = TimeZone.getTimeZone(this.timezoneStr); this._timezone = timeZone; return timeZone; } public boolean hasPattern() { return this.pattern != null && this.pattern.length() > 0; } public boolean hasLocale() { return this.locale != null; } } String locale() default "##default"; String pattern() default ""; Shape shape() default Shape.ANY; String timezone() default "##default"; }
[ "grayhat@kimo.com" ]
grayhat@kimo.com
c6520e3ecce80f9d8a71db7a941638b7223c317a
ad0300c29aa79d6b25e430efd128344f1c283369
/clojure/core_partition.java
a7e47540a93e6076fa6ff0d7688bb637244aa4b6
[]
no_license
galdolber/clojure-core-java
d7cedc6e68d3755f3ff446e9bbec988d8739c74d
1ef06a7ecd400fa9f91cb17f636ebcf308f3b320
refs/heads/master
2016-09-10T12:52:54.014593
2014-01-25T22:04:10
2014-01-25T22:04:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
921
java
package clojure; import clojure.lang.*; public final class core_partition extends clojure.lang.AFunction { public static final clojure.lang.Var const__0; static { const__0 = (clojure.lang.Var)RT.var("clojure.core", "partition"); } public core_partition() { super(); } public java.lang.Object invoke(java.lang.Object n1, java.lang.Object step2, java.lang.Object pad3, java.lang.Object coll4) { return new clojure.lang.LazySeq((clojure.lang.IFn)((clojure.lang.IFn)new clojure.core_partition_fn__4338(pad3, n1, step2, coll4))); } public java.lang.Object invoke(java.lang.Object n1, java.lang.Object step2, java.lang.Object coll3) { return new clojure.lang.LazySeq((clojure.lang.IFn)((clojure.lang.IFn)new clojure.core_partition_fn__4335(coll3, n1, step2))); } public java.lang.Object invoke(java.lang.Object n1, java.lang.Object coll2) { return ((IFn)const__0.getRawRoot()).invoke(n1, n1, coll2); } }
[ "gal.dolber@gmail.com" ]
gal.dolber@gmail.com
717d3f6f7aaba279e31a96d7f71503c9ed1a2266
b796867c5ff3a5044ec2cd086741193ec2eefd09
/engine/src/test/java/org/teiid/common/buffer/TestFileStoreInputStreamFactory.java
588169e1d7343c5a14c8b4faf18a7fc97672f07e
[ "Apache-2.0" ]
permissive
teiid/teiid
56971cbdc8910b51019ba184b8bb1bb054ff6a47
3de2f782befef980be5dc537249752e28ad972f7
refs/heads/master
2023-08-19T06:32:20.244837
2022-03-10T17:49:34
2022-03-10T17:49:34
6,092,163
277
269
NOASSERTION
2023-01-04T18:50:23
2012-10-05T15:21:04
Java
UTF-8
Java
false
false
1,507
java
/* * Copyright Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags and * the COPYRIGHT.txt file distributed with this work. * * 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.teiid.common.buffer; import static org.junit.Assert.*; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.junit.Test; import org.teiid.core.types.Streamable; @SuppressWarnings("nls") public class TestFileStoreInputStreamFactory { @Test public void testInputStream() throws IOException { FileStore fs = BufferManagerFactory.getStandaloneBufferManager().createFileStore("test"); FileStoreInputStreamFactory factory = new FileStoreInputStreamFactory(fs, Streamable.ENCODING); OutputStream os = factory.getOuputStream(0); os.write(new byte[2]); os.close(); InputStream is = factory.getInputStream(0, 1); is.read(); assertEquals(-1, is.read()); } }
[ "shawkins@redhat.com" ]
shawkins@redhat.com
ab444407661b56a3e8be6e7cb07cbb535f9c56ed
38909d941bc6d0538985bb8b93d69697fed7f67f
/core/src/main/java/dev/morphia/aggregation/experimental/stages/Out.java
02ab79e1bc0f20c617ef0b4ce9f07119e8f22f1a
[ "Apache-2.0" ]
permissive
ptwohig/morphia
35c212699b39fd78eacee998e16459d910e6d02c
90872c3624c26024234374ddc35340ff5b19c42e
refs/heads/master
2023-02-24T00:53:07.407581
2021-01-28T18:18:12
2021-01-28T18:18:12
289,325,362
0
0
null
null
null
null
UTF-8
Java
false
false
1,749
java
package dev.morphia.aggregation.experimental.stages; import org.bson.Document; /** * Takes the documents returned by the aggregation pipeline and writes them to a specified collection. The $out operator must be the last * stage in the pipeline. The $out operator lets the aggregation framework return result sets of any size. * * @param <O> the output type used to lookup the collection name * @aggregation.expression $out */ public class Out<O> extends Stage { private Class<?> type; private String collection; protected Out() { super("$out"); } /** * Creates a $out stage with target type/collection * * @param type the type to use to determine the target collection * @param <O> the output type used to lookup the collection name * @return the new stage */ public static <O> Out<O> to(Class<O> type) { return new Out<O>() .type(type); } /** * Creates a $out stage with target collection * * @param collection the target collection * @return the new stage */ public static Out<Document> to(String collection) { return new Out<Document>() .collection(collection); } /** * @return the collection name * @morphia.internal */ public String getCollection() { return collection; } /** * @return the type representing the collection * @morphia.internal */ public Class<?> getType() { return type; } private Out<O> collection(String collection) { this.collection = collection; return this; } private Out<O> type(Class<O> type) { this.type = type; return this; } }
[ "jlee@antwerkz.com" ]
jlee@antwerkz.com
192d2e297dc6a2f3bd152dc1e8a0a75b013f553e
36f11aea4016d8fec2611b651dbdc92f489ea350
/nacid/src/com/ext/nacid/regprof/web/handlers/ExtRegprofUserAccessUtils.java
e85d55d30b255f4808891c5c08322e5b8ff748e6
[ "MIT" ]
permissive
governmentbg/NACID-DOCTORS-TITLES
a91eecfee6d6510ace5499a18c4dbe25680743be
72b79b14af654573e5d23e0048adeac20d06696a
refs/heads/master
2022-12-03T22:39:48.965063
2020-08-28T07:11:13
2020-08-28T07:11:13
281,618,972
0
0
null
null
null
null
UTF-8
Java
false
false
2,406
java
package com.ext.nacid.regprof.web.handlers; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import com.nacid.bl.NacidDataProvider; import com.nacid.bl.exceptions.NotAuthorizedException; import com.nacid.bl.external.ExtPerson; import com.nacid.bl.impl.regprof.external.applications.ExtRegprofApplicationDetailsImpl; import com.nacid.bl.impl.regprof.external.applications.ExtRegprofApplicationImpl; import com.nacid.bl.regprof.external.ExtRegprofApplicationsDataProvider; public class ExtRegprofUserAccessUtils { public final static int USER_ACTION_VIEW = 0; public final static int USER_ACTION_CHANGE = 1; public static final Map<Integer, List<Integer>> ACTION_TO_STATUS = new HashMap<Integer, List<Integer>>(); static { ACTION_TO_STATUS.put(USER_ACTION_VIEW, Arrays.asList(ExtRegprofApplicationImpl.STATUS_EDITABLE, ExtRegprofApplicationImpl.STATUS_NOT_EDITABLE, ExtRegprofApplicationImpl.STATUS_TRANSFERED)); ACTION_TO_STATUS.put(USER_ACTION_CHANGE, Arrays.asList(ExtRegprofApplicationImpl.STATUS_EDITABLE)); } public static void checkApplicantActionAccess(int applicationId, int userId, int operationType, NacidDataProvider dp) throws NotAuthorizedException { ExtRegprofApplicationsDataProvider eaDP = dp.getExtRegprofApplicationsDataProvider(); eaDP.checkApplicationAccess(applicationId, userId, operationType); } /** * @throws RuntimeException<br /> * ako uset.getPerson().getId() != application.getApplicantId(), hvyrlq exception<br /> * ako actiona e edit i status-a na zaqvlenieto e "not_editable", hvyrlq exception */ public static void checkApplicantActionAccess(int action, ExtPerson person, ExtRegprofApplicationDetailsImpl appDetails) throws NotAuthorizedException { if (appDetails == null ) { throw new RuntimeException("Unknown application."); } if (person.getId() != appDetails.getRepresentativeId()) { throw new NotAuthorizedException("Can't access applications which are not bound to your user id!"); } if (action == USER_ACTION_CHANGE && appDetails.getStatus() == ExtRegprofApplicationImpl.STATUS_NOT_EDITABLE) { throw new NotAuthorizedException("Record cannot be edited because it's already commited"); } } }
[ "vcankova@nacid.bg" ]
vcankova@nacid.bg
f3fdb60068f7f6a9b772d8fce8c4cc4e73f4f7b4
1275e4b98a8dbd61053ebeee6433719248bff988
/src/main/java/com/flea/modules/ebook/pojo/vo/FileMeta.java
6a7d75fe3b4c8deb0e7cc520253a10dffd0481b3
[]
no_license
zmiraclej/LibraryOMS
98c480dc5d0ea8617826a3e08b98b06f2aa443bc
c3ffa73b7a33ec93fecdc7c068c5655305d3a06b
refs/heads/master
2021-05-10T21:30:37.158091
2018-01-20T09:46:31
2018-01-20T09:52:20
118,229,684
0
0
null
null
null
null
UTF-8
Java
false
false
1,311
java
/** * @Package com.flea.modules.ebook.pojo.vo * @Description: TODO * @author bruce * @date 2016年6月30日 下午2:19:02 * @version V1.0 */ package com.flea.modules.ebook.pojo.vo; import com.flea.common.pojo.User; /** * @author bruce * @2016年6月30日 下午2:19:02 */ public class FileMeta { private String bookId; private String fileName; private String fileSize; private String fileType; private User user; private String remark; private byte[] bytes; public User getUser() { return user; } public void setUser(User user) { this.user = user; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } public String getFileSize() { return fileSize; } public void setFileSize(String fileSize) { this.fileSize = fileSize; } public String getFileType() { return fileType; } public void setFileType(String fileType) { this.fileType = fileType; } public byte[] getBytes() { return bytes; } public void setBytes(byte[] bytes) { this.bytes = bytes; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getBookId() { return bookId; } public void setBookId(String bookId) { this.bookId = bookId; } }
[ "3507373533@qq.com" ]
3507373533@qq.com
896e77b8049468c8f2741d33a240b4f0d2d43275
217967e8c2dc47c116c850e331f7fe58159d3a08
/java_MybatisEx/src/mybatis/service/FactoryService.java
97df829e851bb9ea6db6fd8f6956f867471b3e9f
[]
no_license
kaily22/Webstudy
0289e6b2c4441fb8a27b4a2dd3dbda91bbb2c9e2
d7dbf7486b1e4fa52e6cd777b6a26a8f5377b2d2
refs/heads/master
2023-09-03T06:18:48.411583
2021-10-26T07:23:33
2021-10-26T07:23:33
419,213,288
0
0
null
null
null
null
UTF-8
Java
false
false
1,033
java
package mybatis.service; import java.io.Reader; import org.apache.ibatis.io.Resources; import org.apache.ibatis.session.SqlSessionFactory; import org.apache.ibatis.session.SqlSessionFactoryBuilder; public class FactoryService { private static SqlSessionFactory factory; static { /* * 먼저 Mybatis 설정 파일인 config.xml 파일로부터 설정 정보를 읽어들이기 * 위한 입력 스트링을 생성한다. */ try { Reader reader = Resources.getResourceAsReader("mybatis/config/config.xml"); /* * 그리고 나서 입력 스트림을 통해 config.xml 파일을 읽어 * sqlSessionFactory 객체를 생성한다. */ //sqlSessionFactory 객체 생성 -> 빌더 클래스를 통해서 객체를 만든다. factory = new SqlSessionFactoryBuilder().build(reader); }catch(Exception e) { e.printStackTrace(); } } public static SqlSessionFactory getFactory() { return factory; } }
[ "kailyyy02@gmail.com" ]
kailyyy02@gmail.com
629b178e2f700500e2c007bfc2d4f3ec87f969a2
03e483531cd3f892781974e214e583784b3ce897
/JDBC-1/src/jdbc_insert/Baglanti.java
ccacacc138ec513126086c3b6b5efc0659445e92
[]
no_license
huseyinsaglam/Java-SE
37f43b16c4785387d5e999667afa2365e5d7bbca
b5537a828e125341259f3779bd58be9d6aeae666
refs/heads/master
2021-01-27T01:02:54.220177
2020-08-14T10:25:57
2020-08-14T10:25:57
243,470,290
1
0
null
null
null
null
UTF-8
Java
false
false
2,813
java
package jdbc_insert; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import com.sun.crypto.provider.RSACipher; public class Baglanti { private String kullanici_adi = "root"; private String parola = "123456"; private String db_ismi = "jpa1.schema"; private String host = "localhost"; private int port = 3306; private Connection con = null; private Statement statement=null; public Baglanti() { //String url = "jdbc:mysql://" + host + ":" + port + "/" + db_ismi+ "?useUnicode=true&characterEncoding=utf8"; String url = "jdbc:mysql://" + host + ":" + port + "/" + db_ismi+ "?serverTimezone=UTC"; try { Class.forName("com.mysql.jdbc.Driver"); } catch (ClassNotFoundException ex) { System.out.println("Driver Bulunamadi...."); } try { con = DriverManager.getConnection(url, kullanici_adi, parola); System.out.println("Baglanti Basarili..."); } catch (SQLException ex) { System.out.println("Baglanti Basarisiz..."); // ex.printStackTrace(); } } public void sorgulari_getir() { try { statement = con.createStatement(); String sorgu = "Select * From employer"; ResultSet rs = statement.executeQuery(sorgu); while(rs.next()) { String name= rs.getString("name"); String surname= rs.getString("surname"); System.out.println("name = " +name + " " + "surname = " +surname); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public void insert() { try { statement = con.createStatement(); int id= 3; String name = "fener"; String surname = "bahce"; int salary = 6000; // Insert Into calisanlar (ad,soyad,email) VALUES('fener','bahce',6000) String sorgu = "Insert Into employer (id,name,surname,salary) VALUES(" + "'" + id +"'" + name + "'," + "'" + surname + "'," + "'" + salary + "')"; statement.executeUpdate(sorgu); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void main(String[] args) { System.out.println("Eklemeden once"); Baglanti baglanti = new Baglanti(); baglanti.sorgulari_getir(); System.out.println("Eklemeden sonra"); baglanti.insert(); baglanti.sorgulari_getir(); } }
[ "hsaglam001@gmail.com" ]
hsaglam001@gmail.com
1a9715fcdd7362caf2b5425748e115d7b77f0b9b
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.5.1/sources/com/iqoption/activity/w.java
0fe0101dc45d20ec3963a02ac5b5ad6a4fbe02c7
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
600
java
package com.iqoption.activity; import android.view.View; import com.google.common.base.n; import com.iqoption.fragment.leftmenu.LeftMenuFragment; final /* synthetic */ class w implements n { private final b aeD; private final View aeQ; private final View aeR; private final LeftMenuFragment aeS; w(b bVar, View view, View view2, LeftMenuFragment leftMenuFragment) { this.aeD = bVar; this.aeQ = view; this.aeR = view2; this.aeS = leftMenuFragment; } public Object get() { return this.aeD.a(this.aeQ, this.aeR, this.aeS); } }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
fc821d7401a51f81a327021c4c1f8b37bf261baf
9410ef0fbb317ace552b6f0a91e0b847a9a841da
/src/main/java/com/tencentcloudapi/teo/v20220106/models/CreatePurgeTaskResponse.java
3b677bcf261de153518a03736621db9f03d812aa
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java-intl-en
274de822748bdb9b4077e3b796413834b05f1713
6ca868a8de6803a6c9f51af7293d5e6dad575db6
refs/heads/master
2023-09-04T05:18:35.048202
2023-09-01T04:04:14
2023-09-01T04:04:14
230,567,388
7
4
Apache-2.0
2022-05-25T06:54:45
2019-12-28T06:13:51
Java
UTF-8
Java
false
false
4,339
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tencentcloudapi.teo.v20220106.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class CreatePurgeTaskResponse extends AbstractModel{ /** * Task ID */ @SerializedName("JobId") @Expose private String JobId; /** * List of failed tasks and reasons Note: This field may return `null`, indicating that no valid value can be obtained. */ @SerializedName("FailedList") @Expose private FailReason [] FailedList; /** * The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get Task ID * @return JobId Task ID */ public String getJobId() { return this.JobId; } /** * Set Task ID * @param JobId Task ID */ public void setJobId(String JobId) { this.JobId = JobId; } /** * Get List of failed tasks and reasons Note: This field may return `null`, indicating that no valid value can be obtained. * @return FailedList List of failed tasks and reasons Note: This field may return `null`, indicating that no valid value can be obtained. */ public FailReason [] getFailedList() { return this.FailedList; } /** * Set List of failed tasks and reasons Note: This field may return `null`, indicating that no valid value can be obtained. * @param FailedList List of failed tasks and reasons Note: This field may return `null`, indicating that no valid value can be obtained. */ public void setFailedList(FailReason [] FailedList) { this.FailedList = FailedList; } /** * Get The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @return RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public String getRequestId() { return this.RequestId; } /** * Set The unique request ID, which is returned for each request. RequestId is required for locating a problem. * @param RequestId The unique request ID, which is returned for each request. RequestId is required for locating a problem. */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } public CreatePurgeTaskResponse() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public CreatePurgeTaskResponse(CreatePurgeTaskResponse source) { if (source.JobId != null) { this.JobId = new String(source.JobId); } if (source.FailedList != null) { this.FailedList = new FailReason[source.FailedList.length]; for (int i = 0; i < source.FailedList.length; i++) { this.FailedList[i] = new FailReason(source.FailedList[i]); } } if (source.RequestId != null) { this.RequestId = new String(source.RequestId); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "JobId", this.JobId); this.setParamArrayObj(map, prefix + "FailedList.", this.FailedList); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
1f1403b075f3330a1111c88d1f5617330b715826
bbe7eae301fd2289fad3b62b97a68162c6f71e41
/SpringMvc/src/main/java/com/mnt/erp/bean/Route.java
631559ce80bb3e8a0c8205632376a61b83c87b38
[]
no_license
venkateshpavuluri/organization
a083e7d283f5f49f49fbd7c3738c888a95159d9e
0bd0ce4eae6abc6aea7f174f7fbc8b224feada00
refs/heads/master
2021-01-19T20:18:36.911359
2014-06-14T10:55:54
2014-06-14T10:55:54
20,830,205
1
0
null
null
null
null
UTF-8
Java
false
false
7,184
java
/** * */ package com.mnt.erp.bean; /** * @author anikesh * */ public class Route { private int routeId; private String routeCode; private String organizationId; private int orgIdInt; private String organizationName; private String fromPlace; private String toPlace; private String distance; private int distInt; private String uomId; private int uomInt; private String uomName; private String approxTime; private int approxInt; private String timeUomId; private int timeUomInt; private String timeUomName; private int aid; private Organization organizationBean; private Uom uomBean; private Uom timeuomBean; private int routeIdEdit; private String routeCodeEdit; private String organizationIdEdit; private String fromPlaceEdit; private String toPlaceEdit; private String distanceEdit; private String uomIdEdit; private String approxTimeEdit; private String timeUomIdEdit; private String operations; private String basicSearchId; private String xmlLabel; //-------------------- advance search ---------- private String firstLabel; private String secondLabel; private String operations1; private String advanceSearchText; private int advanceSearchHidden; public int getRouteId() { return routeId; } public void setRouteId(int routeId) { this.routeId = routeId; } public String getRouteCode() { return routeCode; } public void setRouteCode(String routeCode) { this.routeCode = routeCode; } public String getOrganizationId() { return organizationId; } public void setOrganizationId(String organizationId) { this.organizationId = organizationId; } public String getOrganizationName() { return organizationName; } public void setOrganizationName(String organizationName) { this.organizationName = organizationName; } public String getFromPlace() { return fromPlace; } public void setFromPlace(String fromPlace) { this.fromPlace = fromPlace; } public String getToPlace() { return toPlace; } public void setToPlace(String toPlace) { this.toPlace = toPlace; } public String getDistance() { return distance; } public void setDistance(String distance) { this.distance = distance; } public String getUomId() { return uomId; } public void setUomId(String uomId) { this.uomId = uomId; } public String getUomName() { return uomName; } public void setUomName(String uomName) { this.uomName = uomName; } public String getApproxTime() { return approxTime; } public void setApproxTime(String approxTime) { this.approxTime = approxTime; } public String getTimeUomId() { return timeUomId; } public void setTimeUomId(String timeUomId) { this.timeUomId = timeUomId; } public String getTimeUomName() { return timeUomName; } public void setTimeUomName(String timeUomName) { this.timeUomName = timeUomName; } public int getAid() { return aid; } public void setAid(int aid) { this.aid = aid; } public Organization getOrganizationBean() { return organizationBean; } public void setOrganizationBean(Organization organizationBean) { this.organizationBean = organizationBean; } public Uom getUomBean() { return uomBean; } public void setUomBean(Uom uomBean) { this.uomBean = uomBean; } public int getRouteIdEdit() { return routeIdEdit; } public void setRouteIdEdit(int routeIdEdit) { this.routeIdEdit = routeIdEdit; } public String getRouteCodeEdit() { return routeCodeEdit; } public void setRouteCodeEdit(String routeCodeEdit) { this.routeCodeEdit = routeCodeEdit; } public String getOrganizationIdEdit() { return organizationIdEdit; } public void setOrganizationIdEdit(String organizationIdEdit) { this.organizationIdEdit = organizationIdEdit; } public String getFromPlaceEdit() { return fromPlaceEdit; } public void setFromPlaceEdit(String fromPlaceEdit) { this.fromPlaceEdit = fromPlaceEdit; } public String getToPlaceEdit() { return toPlaceEdit; } public void setToPlaceEdit(String toPlaceEdit) { this.toPlaceEdit = toPlaceEdit; } public String getDistanceEdit() { return distanceEdit; } public void setDistanceEdit(String distanceEdit) { this.distanceEdit = distanceEdit; } public String getUomIdEdit() { return uomIdEdit; } public void setUomIdEdit(String uomIdEdit) { this.uomIdEdit = uomIdEdit; } public String getApproxTimeEdit() { return approxTimeEdit; } public void setApproxTimeEdit(String approxTimeEdit) { this.approxTimeEdit = approxTimeEdit; } public String getTimeUomIdEdit() { return timeUomIdEdit; } public void setTimeUomIdEdit(String timeUomIdEdit) { this.timeUomIdEdit = timeUomIdEdit; } public Uom getTimeuomBean() { return timeuomBean; } public void setTimeuomBean(Uom timeuomBean) { this.timeuomBean = timeuomBean; } public int getOrgIdInt() { return orgIdInt; } public void setOrgIdInt(int orgIdInt) { this.orgIdInt = orgIdInt; } public int getDistInt() { return distInt; } public void setDistInt(int distInt) { this.distInt = distInt; } public int getUomInt() { return uomInt; } public void setUomInt(int uomInt) { this.uomInt = uomInt; } public int getApproxInt() { return approxInt; } public void setApproxInt(int approxInt) { this.approxInt = approxInt; } public int getTimeUomInt() { return timeUomInt; } public void setTimeUomInt(int timeUomInt) { this.timeUomInt = timeUomInt; } //=================search methods==================== public String getOperations() { return operations; } public void setOperations(String operations) { this.operations = operations; } public String getBasicSearchId() { return basicSearchId; } public void setBasicSearchId(String basicSearchId) { this.basicSearchId = basicSearchId; } public String getXmlLabel() { return xmlLabel; } public void setXmlLabel(String xmlLabel) { this.xmlLabel = xmlLabel; } public String getFirstLabel() { return firstLabel; } public void setFirstLabel(String firstLabel) { this.firstLabel = firstLabel; } public String getSecondLabel() { return secondLabel; } public void setSecondLabel(String secondLabel) { this.secondLabel = secondLabel; } public String getOperations1() { return operations1; } public void setOperations1(String operations1) { this.operations1 = operations1; } public String getAdvanceSearchText() { return advanceSearchText; } public void setAdvanceSearchText(String advanceSearchText) { this.advanceSearchText = advanceSearchText; } public int getAdvanceSearchHidden() { return advanceSearchHidden; } public void setAdvanceSearchHidden(int advanceSearchHidden) { this.advanceSearchHidden = advanceSearchHidden; } }
[ "pavuluri.venki@gmail.com" ]
pavuluri.venki@gmail.com
a7cc37d37fdda150fa3c06ac557651e366436f6d
833a7628cf19869a01eb77afd6a50126e81bf685
/app/src/main/java/com/dream/moka/Bean/Other/GuijiBean.java
15bf478d7107ebf61a3f219dfcbaa2d583356a80
[]
no_license
nobbuuu/MoCarUser
bddda855cb16b701e8598dc4889b62c26bc26533
8df4776b394ffab3c83355f986f70aca8a69b06c
refs/heads/master
2020-03-23T08:57:03.621073
2018-07-17T23:55:55
2018-07-17T23:55:55
141,357,758
0
1
null
null
null
null
UTF-8
Java
false
false
584
java
package com.dream.moka.Bean.Other; /** * Created by Administrator on 2018/3/19 0019. */ public class GuijiBean { /** * latitude : 22.6866510000 * longtitude : 113.9521240000 */ private double latitude; private double longtitude; public double getLatitude() { return latitude; } public void setLatitude(double latitude) { this.latitude = latitude; } public double getLongtitude() { return longtitude; } public void setLongtitude(double longtitude) { this.longtitude = longtitude; } }
[ "1184824553@qq.com" ]
1184824553@qq.com
4deefec01de6dbd71cbdb6e942145abec6bb8a02
da5940bdc8045d60063c5e8e1cdce9e8d9bd977a
/Licenta/src/fields/f4_1/F4_1AnnualValueEURO.java
ec3f97a6caf6640ca3a6dfc8421e3c80fdb75b39
[]
no_license
dorapolicarp/MyRepo
a9afb3fae31bb067041a62d1369ccc7e1bb67134
937632317a3187e756bec021c0719e4c7ed5f5f7
refs/heads/master
2021-03-12T22:07:03.287136
2013-05-11T10:36:13
2013-05-11T10:36:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
286
java
package fields.f4_1; import fields.Field; public class F4_1AnnualValueEURO implements Field { private String value; public F4_1AnnualValueEURO(String value) { this.value = value; } @Override public void print() { System.out.println("F4_1AnnualValueEURO: " + value); } }
[ "dorapolicarp@gmail.com" ]
dorapolicarp@gmail.com
2b90a41d173251c4e8960e4c57ea690ce355b099
ce778e35ea72ad33d03129c43b3ddfafc3581076
/src/test/java/com/redhat/qe/test/rest/ClusterTestBase.java
667e3f314a71d169b22cde2076204a96f0e149bd
[]
no_license
rhscqe/rhsc-shell-rest-api-automation
011150559815afa155229422fa8cec1bb4c3c6d4
7d720a8a566fb7f7178a95d593b97e6f09ec3e91
refs/heads/master
2021-01-02T08:34:15.525146
2014-08-08T07:38:41
2014-08-08T07:38:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
757
java
package com.redhat.qe.test.rest; import org.junit.After; import org.junit.Before; import com.redhat.qe.config.RhscConfiguration; import com.redhat.qe.helpers.repository.ClusterHelper; import com.redhat.qe.model.Cluster; public abstract class ClusterTestBase extends RestTestBase { private Cluster cluster; public ClusterTestBase() { super(); } protected Cluster getCluster() { return cluster; } public abstract Cluster getClusterToBeCreated(); @Before public void createOrShowCluster() { cluster = new ClusterHelper().create(getClusterToBeCreated(), getClusterRepository(), getDatacenterRepository()); } @After public void cleanup() { if(cluster != null && cluster.getId() != null) getClusterRepository().destroy(cluster); } }
[ "dtsang@redhat.com" ]
dtsang@redhat.com
0b45df78e1cf9544051555de03b91750978a78d3
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/hd/edu/dm/HD_EDU_1301_LDM.java
24a82205272d07341b7f5ab48e6f9dea73db47e3
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
6,191
java
/*************************************************************************************************** * 파일명 : .java * 기능 : 독자우대-구독신청 * 작성일자 : 2007-05-22 * 작성자 : 김대섭 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.hd.edu.dm; import java.sql.*; import oracle.jdbc.driver.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.hd.edu.ds.*; import chosun.ciis.hd.edu.rec.*; /** * */ public class HD_EDU_1301_LDM extends somo.framework.db.BaseDM implements java.io.Serializable{ public String cmpy_cd; public String emp_no; public String nm_korn; public String dept_cd; public String emp_clsf_cd; public HD_EDU_1301_LDM(){} public HD_EDU_1301_LDM(String cmpy_cd, String emp_no, String nm_korn, String dept_cd, String emp_clsf_cd){ this.cmpy_cd = cmpy_cd; this.emp_no = emp_no; this.nm_korn = nm_korn; this.dept_cd = dept_cd; this.emp_clsf_cd = emp_clsf_cd; } public void setCmpy_cd(String cmpy_cd){ this.cmpy_cd = cmpy_cd; } public void setEmp_no(String emp_no){ this.emp_no = emp_no; } public void setNm_korn(String nm_korn){ this.nm_korn = nm_korn; } public void setDept_cd(String dept_cd){ this.dept_cd = dept_cd; } public void setEmp_clsf_cd(String emp_clsf_cd){ this.emp_clsf_cd = emp_clsf_cd; } public String getCmpy_cd(){ return this.cmpy_cd; } public String getEmp_no(){ return this.emp_no; } public String getNm_korn(){ return this.nm_korn; } public String getDept_cd(){ return this.dept_cd; } public String getEmp_clsf_cd(){ return this.emp_clsf_cd; } public String getSQL(){ return "{ call MISHDL.SP_HD_EDU_1301_L(? ,? ,? ,? ,? ,? ,? ,?) }"; } public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{ HD_EDU_1301_LDM dm = (HD_EDU_1301_LDM)bdm; cstmt.registerOutParameter(1, Types.VARCHAR); cstmt.registerOutParameter(2, Types.VARCHAR); cstmt.setString(3, dm.cmpy_cd); cstmt.setString(4, dm.emp_no); cstmt.setString(5, dm.nm_korn); cstmt.setString(6, dm.dept_cd); cstmt.setString(7, dm.emp_clsf_cd); cstmt.registerOutParameter(8, OracleTypes.CURSOR); } public BaseDataSet createDataSetObject(){ return new chosun.ciis.hd.edu.ds.HD_EDU_1301_LDataSet(); } public void print(){ System.out.println("SQL = " + this.getSQL()); System.out.println("cmpy_cd = [" + getCmpy_cd() + "]"); System.out.println("emp_no = [" + getEmp_no() + "]"); System.out.println("nm_korn = [" + getNm_korn() + "]"); System.out.println("dept_cd = [" + getDept_cd() + "]"); System.out.println("emp_clsf_cd = [" + getEmp_clsf_cd() + "]"); } } /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오. String cmpy_cd = req.getParameter("cmpy_cd"); if( cmpy_cd == null){ System.out.println(this.toString+" : cmpy_cd is null" ); }else{ System.out.println(this.toString+" : cmpy_cd is "+cmpy_cd ); } String emp_no = req.getParameter("emp_no"); if( emp_no == null){ System.out.println(this.toString+" : emp_no is null" ); }else{ System.out.println(this.toString+" : emp_no is "+emp_no ); } String nm_korn = req.getParameter("nm_korn"); if( nm_korn == null){ System.out.println(this.toString+" : nm_korn is null" ); }else{ System.out.println(this.toString+" : nm_korn is "+nm_korn ); } String dept_cd = req.getParameter("dept_cd"); if( dept_cd == null){ System.out.println(this.toString+" : dept_cd is null" ); }else{ System.out.println(this.toString+" : dept_cd is "+dept_cd ); } String emp_clsf_cd = req.getParameter("emp_clsf_cd"); if( emp_clsf_cd == null){ System.out.println(this.toString+" : emp_clsf_cd is null" ); }else{ System.out.println(this.toString+" : emp_clsf_cd is "+emp_clsf_cd ); } ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.checkString(req.getParameter("cmpy_cd")); String emp_no = Util.checkString(req.getParameter("emp_no")); String nm_korn = Util.checkString(req.getParameter("nm_korn")); String dept_cd = Util.checkString(req.getParameter("dept_cd")); String emp_clsf_cd = Util.checkString(req.getParameter("emp_clsf_cd")); ----------------------------------------------------------------------------------------------------*//*---------------------------------------------------------------------------------------------------- Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("cmpy_cd"))); String emp_no = Util.Uni2Ksc(Util.checkString(req.getParameter("emp_no"))); String nm_korn = Util.Uni2Ksc(Util.checkString(req.getParameter("nm_korn"))); String dept_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("dept_cd"))); String emp_clsf_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("emp_clsf_cd"))); ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 DM 파일의 변수를 설정시 사용하십시오. dm.setCmpy_cd(cmpy_cd); dm.setEmp_no(emp_no); dm.setNm_korn(nm_korn); dm.setDept_cd(dept_cd); dm.setEmp_clsf_cd(emp_clsf_cd); ----------------------------------------------------------------------------------------------------*/ /* 작성시간 : Thu Sep 06 14:17:03 KST 2018 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
03205b62a9631e88040dd16bac03cc97ec6da4c7
1aa92f16a21b1f50b0c4bf5dab0c314a1750af49
/template/acgist-common/acgist-common/src/test/java/com/acgist/test/JSONUtilsTest.java
d0f231cd0c3cb843c1356f98329847ac18e328b3
[ "BSD-3-Clause" ]
permissive
acgist/demo
08e984c0deb2522aaa8157f698927441efb05f21
77c384811ae4c7769f1a91486c011cecf3c7fbb3
refs/heads/master
2023-06-07T20:30:09.517797
2023-06-04T00:13:58
2023-06-04T00:13:58
283,970,105
1
0
BSD-3-Clause
2022-11-16T02:42:07
2020-07-31T07:20:27
JavaScript
UTF-8
Java
false
false
879
java
package com.acgist.test; import org.junit.Test; import com.acgist.core.gateway.response.GatewayResponse; import com.acgist.utils.JSONUtils; public class JSONUtilsTest extends BaseTest { @Test public void testCost() { this.cost(); GatewayResponse response = new GatewayResponse(); response.setCode("0000"); response.setMessage("成功"); String json; for (int index = 0; index < 100000; index++) { json = JSONUtils.toJSON(response); JSONUtils.toJava(json, GatewayResponse.class); } this.costed(); } @Test public void testJson() { GatewayResponse response = new GatewayResponse(); response.setCode("0000"); response.setMessage("成功"); String json; json = JSONUtils.toJSON(response); this.log(json); response = JSONUtils.toJava(json, GatewayResponse.class); this.log(response.getCode()); this.log(response.getMessage()); } }
[ "289547414@qq.com" ]
289547414@qq.com
e43c8eaf5539463ba15f59d8c4bdc753edcbcd43
a5d01febfd8d45a61f815b6f5ed447e25fad4959
/Source Code/5.27.0/sources/com/jumio/sdk/exception/JumioErrorCase.java
4585596dc81a3a70a4cb0078ea98a1aa8b1df6e9
[]
no_license
kkagill/Decompiler-IQ-Option
7fe5911f90ed2490687f5d216cb2940f07b57194
c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6
refs/heads/master
2020-09-14T20:44:49.115289
2019-11-04T06:58:55
2019-11-04T06:58:55
223,236,327
1
0
null
2019-11-21T18:17:17
2019-11-21T18:17:16
null
UTF-8
Java
false
false
131
java
package com.jumio.sdk.exception; public interface JumioErrorCase { String code(); int message(); boolean retry(); }
[ "yihsun1992@gmail.com" ]
yihsun1992@gmail.com
9c60c1084f141a0c1cbb3d9c2fe3f769ecfe5c76
f90343cea65eeda4b51cb5abbe1ba78a4086e366
/library/ui/src/main/java/com/google/android/exoplayer2/ui/TimeBar.java
9e3f2e42ff49bcd3ddf48f332c53af44f2571de0
[ "Apache-2.0" ]
permissive
portizb/ExoPlayer
63eb21d26cb866b8fb57e758023f989f5b31d257
ab21f885d42209d0c65a70fc93dee26c96af6f84
refs/heads/dev-v2
2021-08-07T16:05:17.235546
2020-02-18T10:56:25
2020-02-18T11:00:59
238,707,749
18
10
Apache-2.0
2021-01-12T09:24:53
2020-02-06T14:30:44
null
UTF-8
Java
false
false
4,347
java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.exoplayer2.ui; import android.view.View; import androidx.annotation.Nullable; /** * Interface for time bar views that can display a playback position, buffered position, duration * and ad markers, and that have a listener for scrubbing (seeking) events. */ public interface TimeBar { /** * Adds a listener for scrubbing events. * * @param listener The listener to add. */ void addListener(OnScrubListener listener); /** * Removes a listener for scrubbing events. * * @param listener The listener to remove. */ void removeListener(OnScrubListener listener); /** * @see View#isEnabled() */ void setEnabled(boolean enabled); /** * Sets the position increment for key presses and accessibility actions, in milliseconds. * <p> * Clears any increment specified in a preceding call to {@link #setKeyCountIncrement(int)}. * * @param time The time increment, in milliseconds. */ void setKeyTimeIncrement(long time); /** * Sets the position increment for key presses and accessibility actions, as a number of * increments that divide the duration of the media. For example, passing 20 will cause key * presses to increment/decrement the position by 1/20th of the duration (if known). * <p> * Clears any increment specified in a preceding call to {@link #setKeyTimeIncrement(long)}. * * @param count The number of increments that divide the duration of the media. */ void setKeyCountIncrement(int count); /** * Sets the current position. * * @param position The current position to show, in milliseconds. */ void setPosition(long position); /** * Sets the buffered position. * * @param bufferedPosition The current buffered position to show, in milliseconds. */ void setBufferedPosition(long bufferedPosition); /** * Sets the duration. * * @param duration The duration to show, in milliseconds. */ void setDuration(long duration); /** * Returns the preferred delay in milliseconds of media time after which the time bar position * should be updated. * * @return Preferred delay, in milliseconds of media time. */ long getPreferredUpdateDelay(); /** * Sets the times of ad groups and whether each ad group has been played. * * @param adGroupTimesMs An array where the first {@code adGroupCount} elements are the times of * ad groups in milliseconds. May be {@code null} if there are no ad groups. * @param playedAdGroups An array where the first {@code adGroupCount} elements indicate whether * the corresponding ad groups have been played. May be {@code null} if there are no ad * groups. * @param adGroupCount The number of ad groups. */ void setAdGroupTimesMs(@Nullable long[] adGroupTimesMs, @Nullable boolean[] playedAdGroups, int adGroupCount); /** * Listener for scrubbing events. */ interface OnScrubListener { /** * Called when the user starts moving the scrubber. * * @param timeBar The time bar. * @param position The scrub position in milliseconds. */ void onScrubStart(TimeBar timeBar, long position); /** * Called when the user moves the scrubber. * * @param timeBar The time bar. * @param position The scrub position in milliseconds. */ void onScrubMove(TimeBar timeBar, long position); /** * Called when the user stops moving the scrubber. * * @param timeBar The time bar. * @param position The scrub position in milliseconds. * @param canceled Whether scrubbing was canceled. */ void onScrubStop(TimeBar timeBar, long position, boolean canceled); } }
[ "olly@google.com" ]
olly@google.com
c27baac7ebb2444bdd0d0cef9bf3bfea0562422a
fbbd7efd013423e0fce6bf71943a8014a17d29c7
/wanhaohui2/src/main/java/com/wishland/www/wanhaohui2/base/MyApplication.java
12bbc65538a88e662b1e085c3406ab7b120ea063
[]
no_license
RightManCode/ProjectTest
2e80aaffc56b233c18d4440b2653f98c2097ab34
6c6331b8d29c8d0edb3c0c74ae3b501ced11c483
refs/heads/master
2021-07-12T20:21:53.605300
2017-10-12T14:09:51
2017-10-12T14:09:51
107,496,698
0
0
null
null
null
null
UTF-8
Java
false
false
514
java
package com.wishland.www.wanhaohui2.base; import android.app.Application; import android.content.Context; import com.facebook.drawee.backends.pipeline.Fresco; /** * Created by admin on 2017/10/7. */ public class MyApplication extends Application { public static Context baseContext; @Override public void onCreate() { super.onCreate(); baseContext = getApplicationContext(); initFresco(); } private void initFresco() { Fresco.initialize(this); } }
[ "bing@163.com" ]
bing@163.com
357a8d1aabd051709836cce3335da3109e99b95e
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/mm/protocal/protobuf/am.java
5a3f4ba9cfcecaffa8957cb6bb2b065f26d71e03
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,813
java
package com.tencent.mm.protocal.protobuf; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.bt.a; public final class am extends a { public String content; public String cxb; public String pkI; public String username; public final int op(int i, Object... objArr) { AppMethodBeat.i(28297); int f; if (i == 0) { e.a.a.c.a aVar = (e.a.a.c.a) objArr[0]; if (this.username != null) { aVar.e(1, this.username); } if (this.cxb != null) { aVar.e(2, this.cxb); } if (this.pkI != null) { aVar.e(3, this.pkI); } if (this.content != null) { aVar.e(4, this.content); } AppMethodBeat.o(28297); return 0; } else if (i == 1) { if (this.username != null) { f = e.a.a.b.b.a.f(1, this.username) + 0; } else { f = 0; } if (this.cxb != null) { f += e.a.a.b.b.a.f(2, this.cxb); } if (this.pkI != null) { f += e.a.a.b.b.a.f(3, this.pkI); } if (this.content != null) { f += e.a.a.b.b.a.f(4, this.content); } AppMethodBeat.o(28297); return f; } else if (i == 2) { e.a.a.a.a aVar2 = new e.a.a.a.a((byte[]) objArr[0], unknownTagHandler); for (f = a.getNextFieldNumber(aVar2); f > 0; f = a.getNextFieldNumber(aVar2)) { if (!super.populateBuilderWithField(aVar2, this, f)) { aVar2.ems(); } } AppMethodBeat.o(28297); return 0; } else if (i == 3) { e.a.a.a.a aVar3 = (e.a.a.a.a) objArr[0]; am amVar = (am) objArr[1]; switch (((Integer) objArr[2]).intValue()) { case 1: amVar.username = aVar3.BTU.readString(); AppMethodBeat.o(28297); return 0; case 2: amVar.cxb = aVar3.BTU.readString(); AppMethodBeat.o(28297); return 0; case 3: amVar.pkI = aVar3.BTU.readString(); AppMethodBeat.o(28297); return 0; case 4: amVar.content = aVar3.BTU.readString(); AppMethodBeat.o(28297); return 0; default: AppMethodBeat.o(28297); return -1; } } else { AppMethodBeat.o(28297); return -1; } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
0c5fe1325681e9f1bc63f0a3a5e34e85a20f6a28
32073db03d500748722cbc970aa185d74c957a3e
/app/src/main/java/com/cyanbirds/wwjy/net/IUserLoveApi.java
98f2ac76dec1347625a249665271d77cbf63e617
[]
no_license
wybilold1999/WwProject
25fba4582cebf5845b97df88f665470ade0e8625
cd026b70bb7e81a08927ba2e7b9bcf99368a1682
refs/heads/master
2020-04-17T06:46:18.058916
2019-01-18T04:05:40
2019-01-18T04:05:40
75,819,699
0
0
null
null
null
null
UTF-8
Java
false
false
851
java
package com.cyanbirds.wwjy.net; import android.support.v4.util.ArrayMap; import io.reactivex.Observable; import okhttp3.ResponseBody; import retrofit2.http.Field; import retrofit2.http.FieldMap; import retrofit2.http.FormUrlEncoded; import retrofit2.http.Header; import retrofit2.http.POST; /** * Created by wangyb on 2018/9/14 */ public interface IUserLoveApi { @FormUrlEncoded @POST("love/addLove") Observable<ResponseBody> addLove(@Header("token") String token, @Field("loveId") String loveId); @FormUrlEncoded @POST("love/loveFormeList") Observable<ResponseBody> getLoveFormeList(@Header("token") String token, @FieldMap ArrayMap<String, String> params); @FormUrlEncoded @POST("greet/sendGreet") Observable<ResponseBody> sendGreet(@Header("token") String token, @Field("greetId") String greetId); }
[ "395044952@qq.com" ]
395044952@qq.com
0306773e4f18dbe154b85b2338beba0a5b37ef80
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/24/24_1b7e471ec4de5d2cdf80a57034c8462601640794/TalkStreamBean/24_1b7e471ec4de5d2cdf80a57034c8462601640794_TalkStreamBean_s.java
8221d299c895df9bcc21fda4f7ea8636c568155b
[]
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,719
java
package com.opensajux.view; import java.io.Serializable; import java.util.List; import java.util.Map; import javax.enterprise.context.SessionScoped; import javax.inject.Inject; import javax.inject.Named; import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManagerFactory; import javax.jdo.Query; import org.primefaces.model.LazyDataModel; import org.primefaces.model.SortOrder; import com.opensajux.entity.TalkStream; @SessionScoped @Named public class TalkStreamBean implements Serializable { private static final long serialVersionUID = 8879513787369863264L; @Inject private transient PersistenceManagerFactory pmf; private LazyDataModel<TalkStream> streamModel; public TalkStreamBean() { } public LazyDataModel<TalkStream> getStream() { if (streamModel == null) { streamModel = new LazyDataModel<TalkStream>() { private static final long serialVersionUID = -4213392862978853235L; @Override public int getRowCount() { PersistenceManager pm = pmf.getPersistenceManager(); Long count = (Long) pm.newQuery("select count(key) from " + TalkStream.class.getName()).execute(); pm.close(); return count.intValue(); } @Override public List<TalkStream> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) { PersistenceManager pm = pmf.getPersistenceManager(); Query query = pm.newQuery(TalkStream.class); query.setRange(first, first + pageSize); List<TalkStream> stream = (List<TalkStream>) query.execute(); pm.close(); return stream; } }; streamModel.setPageSize(5); } return streamModel; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b4075256a8e3dfa7ec40c4c188437b7551773a92
9a9fcafa9bbc28c9f1930e01c46af8f023955aea
/JavaEE就业班多线程和数据库/作业题1/就业班JavaSE--day04【内部类、static、包、访问修饰符、final】/示例/day04_homework/src/com/itheima/level2_04/Employee.java
e444adf8996ec6debbab183d4a12023704bfb4bd
[]
no_license
zhengbingyanbj/JavaSE
84cd450ef5525050809c78a8b6660b9495c072db
671ac02dcafe81d425c3c191c313b6040e8ae557
refs/heads/master
2021-09-01T18:20:49.082475
2017-12-28T07:13:30
2017-12-28T07:13:30
115,139,599
0
0
null
null
null
null
GB18030
Java
false
false
546
java
package com.itheima.level2_04; /* 1.定义抽象类(Employee) a)属性: 工号(id),姓名(name) b)行为: 抽象方法work() c)要求: 提供setters和gettters方法 */ public abstract class Employee { // 工号 private String id; // 姓名 private String name; // 行为 public abstract void work(); // 提供setters和gettters方法 public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "zhengbingyanbj@163.com" ]
zhengbingyanbj@163.com
2e8f73f29875503a804b862cf310842c3048a6cb
aaabffe8bf55973bfb1390cf7635fd00ca8ca945
/src/main/java/com/microsoft/graph/models/generated/BaseWorkbookFunctionsBitandBody.java
a6155f7727ab16041098725d95017b5a5287bb03
[ "MIT" ]
permissive
rgrebski/msgraph-sdk-java
e595e17db01c44b9c39d74d26cd925b0b0dfe863
759d5a81eb5eeda12d3ed1223deeafd108d7b818
refs/heads/master
2020-03-20T19:41:06.630857
2018-03-16T17:31:43
2018-03-16T17:31:43
137,648,798
0
0
null
2018-06-17T11:07:06
2018-06-17T11:07:05
null
UTF-8
Java
false
false
2,177
java
// ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------------------------------------------------ package com.microsoft.graph.models.generated; import com.microsoft.graph.concurrency.*; import com.microsoft.graph.core.*; import com.microsoft.graph.models.extensions.*; import com.microsoft.graph.models.generated.*; import com.microsoft.graph.http.*; import com.microsoft.graph.requests.extensions.*; import com.microsoft.graph.requests.generated.*; import com.microsoft.graph.options.*; import com.microsoft.graph.serializer.*; import java.util.Arrays; import java.util.EnumSet; import com.google.gson.JsonObject; import com.google.gson.annotations.*; // **NOTE** This file was generated by a tool and any changes will be overwritten. /** * The class for the Base Workbook Functions Bitand Body. */ public class BaseWorkbookFunctionsBitandBody { /** * The number1. * */ @SerializedName("number1") @Expose public com.google.gson.JsonElement number1; /** * The number2. * */ @SerializedName("number2") @Expose public com.google.gson.JsonElement number2; /** * The raw representation of this class */ private JsonObject rawObject; /** * The serializer */ private ISerializer serializer; /** * Gets the raw representation of this class * * @return the raw representation of this class */ public JsonObject getRawObject() { return rawObject; } /** * Gets serializer * * @return the serializer */ protected ISerializer getSerializer() { return serializer; } /** * Sets the raw JSON object * * @param serializer the serializer * @param json the JSON object to set this object to */ public void setRawObject(final ISerializer serializer, final JsonObject json) { this.serializer = serializer; rawObject = json; } }
[ "caitbal@microsoft.com" ]
caitbal@microsoft.com
ce1dc2660fa974f06b03a8a5c0ada5215af5c632
2dad3fbfb842f9a83608cda8162ad2872bdf2f1a
/app/src/main/java/com/example/ttsdkdemo/adapter/VodAdapter.java
3848e1f6dcfe7b94e3eb26d5e90553f3ad5a342b
[]
no_license
liqiangwaini/TTSDKDemo
e268575c7021c4ea60e9aa3c0e5beea40d612067
5ed85ffcb494c6aac71167eb912db17cfdf59bc0
refs/heads/master
2016-09-14T21:07:20.578921
2016-04-21T11:03:51
2016-04-21T11:03:51
54,885,234
0
0
null
null
null
null
UTF-8
Java
false
false
407
java
package com.example.ttsdkdemo.adapter; import android.content.Context; import android.widget.TextView; import com.tingtingfm.ttsdk.entity.VodInfo; public class VodAdapter extends CommonAdapter<VodInfo> { public VodAdapter(Context context) { super(context); } @Override public void convert(TextView textView, VodInfo vodInfo) { textView.setText(vodInfo.getName()); } }
[ "550163812@qq.com" ]
550163812@qq.com
046b35b41bbb52118e5b196b504b52905ef0172a
0c21777557f347ae4ac1b3197d1f7c28e05aed1b
/android/support/v4/widget/CursorFilter.java
7503401bfb0cc88fee6746bd6e80edf52bf75c35
[]
no_license
dmisuvorov/HappyFresh.Android
68421b90399b72523f398aabbfd30b61efaeea1f
242c5b0c006e7825ed34da57716d2ba9d1371d65
refs/heads/master
2020-04-29T06:47:34.143095
2016-01-11T06:24:16
2016-01-11T06:24:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,878
java
package android.support.v4.widget; import android.database.Cursor; import android.widget.Filter; import android.widget.Filter.FilterResults; class CursorFilter extends Filter { CursorFilterClient mClient; CursorFilter(CursorFilterClient paramCursorFilterClient) { this.mClient = paramCursorFilterClient; } public CharSequence convertResultToString(Object paramObject) { return this.mClient.convertToString((Cursor)paramObject); } protected Filter.FilterResults performFiltering(CharSequence paramCharSequence) { paramCharSequence = this.mClient.runQueryOnBackgroundThread(paramCharSequence); Filter.FilterResults localFilterResults = new Filter.FilterResults(); if (paramCharSequence != null) { localFilterResults.count = paramCharSequence.getCount(); localFilterResults.values = paramCharSequence; return localFilterResults; } localFilterResults.count = 0; localFilterResults.values = null; return localFilterResults; } protected void publishResults(CharSequence paramCharSequence, Filter.FilterResults paramFilterResults) { paramCharSequence = this.mClient.getCursor(); if ((paramFilterResults.values != null) && (paramFilterResults.values != paramCharSequence)) { this.mClient.changeCursor((Cursor)paramFilterResults.values); } } static abstract interface CursorFilterClient { public abstract void changeCursor(Cursor paramCursor); public abstract CharSequence convertToString(Cursor paramCursor); public abstract Cursor getCursor(); public abstract Cursor runQueryOnBackgroundThread(CharSequence paramCharSequence); } } /* Location: /Users/michael/Downloads/dex2jar-2.0/HappyFresh.jar!/android/support/v4/widget/CursorFilter.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "michael@MJSTONE-MACBOOK.local" ]
michael@MJSTONE-MACBOOK.local
0255a725723c8b9e2d8b9156f3f301d230e7ac47
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/28/28_28cccf7d02f4c5599cb8fafd01a815db6b8fbe7d/Board/28_28cccf7d02f4c5599cb8fafd01a815db6b8fbe7d_Board_s.java
44909575de469e039a41215c453005db2d0d4ec1
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,513
java
package clueGame; import java.io.*; import java.util.*; public class Board { //variables private ArrayList<BoardCell> cells = new ArrayList<BoardCell>(); private Map<Character, String> rooms = new HashMap<Character, String>(); private int numRows, numColumns; //Board Info // private final int numRows = 25; // private final int numColumns = 25; private LinkedList<BoardCell> adjacencies; private ArrayList<LinkedList<BoardCell>> listOfAdjacencies; //Scanner and File IO private Scanner scan; private FileReader fileIn; boolean [] visited = new boolean[numRows*numColumns]; Set targets = new HashSet<Integer>(); //Constructors public Board(){ //will use a known file that works for the legend and the layout } public Board(String layoutFile, String legendFile) throws FileNotFoundException, BadConfigFormatException { loadConfigFiles(layoutFile, legendFile); } //methods public void calcAdjacencies(){ for(int i = 0; i < numRows; ++i) { for (int j = 0; j < numColumns; ++j) { adjacencies = new LinkedList<BoardCell>(); if (i-1 >= 0) { int xminus1 = calcIndex(i-1, j); adjacencies.add(xminus1); } if (j-1 >= 0) { int yminus1 = calcIndex(i, j-1); adjacencies.add(yminus1); } if (i+1 < numRows) { int xplus1 = calcIndex(i+1, j); adjacencies.add(xplus1); } if (j+1 < numColumns) { int yplus1 = calcIndex(i, j+1); adjacencies.add(yplus1); } listOfAdjacencies.add(adjacencies); } } } public LinkedList<BoardCell> getAdjList(int index){ listOfAdjacencies = new ArrayList<LinkedList<BoardCell>>(); calcAdjacencies(); return listOfAdjacencies.get(index); } public void setVisitedTrue(int index) { visited[index] = true; } public void setVisitedFalse(int index) { visited[index] = false; } public void startTargets(int index, int steps){ Arrays.fill(visited, false); targets = new HashSet<BoardCell>(); visited[index] = true; calcTargets(index, steps); } public void calcTargets(int thisCell, int steps){ ArrayList<LinkedList<BoardCell>> tempAdjacencies = listOfAdjacencies; LinkedList<BoardCell> adjacentCells = tempAdjacencies.get(thisCell); LinkedList<BoardCell> adjacentCellsTemp = new LinkedList<BoardCell>(); for(BoardCell i: adjacentCells){ if(!visited[i]){ adjacentCellsTemp.add(i); } } for (BoardCell i: adjacentCellsTemp) { setVisitedTrue(i); if (steps == 1) { targets.add(i); } else { calcTargets(i, steps - 1); } setVisitedFalse(i); } } public Set getTargets(){ return targets; } public int calcIndex(int row, int col){ if(row > numRows || row < 0 || col > numColumns || col < 0){ System.out.println("The row or column is out of bounds."); } return row*numColumns + col; } public void loadConfigFiles(String layoutFile, String legendFile) throws FileNotFoundException, BadConfigFormatException { loadRoomConfigFiles(legendFile); loadBoardConfigFiles(layoutFile); } public void loadRoomConfigFiles(String legendFile) throws BadConfigFormatException, FileNotFoundException{ fileIn = new FileReader(legendFile); scan = new Scanner(fileIn); while(scan.hasNextLine()){ String line = scan.nextLine(); String[] toSplit = line.split(", "); if (toSplit.length > 2 || toSplit.length < 0) throw new BadConfigFormatException(legendFile); else { char c = toSplit[0].charAt(0); rooms.put(c, toSplit[1]); } } } public void loadBoardConfigFiles(String layoutFile) throws BadConfigFormatException { try { fileIn = new FileReader(layoutFile); scan = new Scanner(fileIn); int rowCount = 0; int columnCount = 0; int badColumnCheck = 0; boolean firstrun = true; while(scan.hasNextLine()) { String line = scan.nextLine(); String[] toSplit = line.split(","); if (firstrun == true) { badColumnCheck = toSplit.length; } firstrun = false; if (toSplit.length != badColumnCheck) { throw new BadConfigFormatException(layoutFile); } else badColumnCheck = toSplit.length; for (int i = 0; i < toSplit.length; ++i) { if (toSplit[i].equals("W")) { WalkwayCell w = new WalkwayCell(); w.isWalkway = true; w.row = rowCount; w.col = i; cells.add(w); } else { RoomCell r = new RoomCell(); r.roomInitial = toSplit[i].charAt(0); if (!rooms.containsKey(r.roomInitial)) { throw new BadConfigFormatException(layoutFile); } r.isRoom = true; r.row = rowCount; r.col = i; if(toSplit[i].length() > 1){ determineAndSetDoorwayDirection(toSplit[i].charAt(1), r); r.isDoor = true; } else{ r.setDoorDirection(RoomCell.DoorDirection.NONE); } cells.add(r); } } rowCount++; columnCount++; // line = scan.nextLine(); // toSplit = line.split(","); } this.numColumns = columnCount; this.numRows = columnCount; } catch (FileNotFoundException e) { e.printStackTrace(); } } //helper function for loadBoardConfigFiles function public void determineAndSetDoorwayDirection(char aLetter, RoomCell aCell){ switch(aLetter){ case 'R': aCell.setDoorDirection(RoomCell.DoorDirection.RIGHT); break; case 'L': aCell.setDoorDirection(RoomCell.DoorDirection.LEFT); break; case 'D': aCell.setDoorDirection(RoomCell.DoorDirection.DOWN); break; case 'U': aCell.setDoorDirection(RoomCell.DoorDirection.UP); break; } } //getters public RoomCell getRoomCellAt(int row, int col) { int index = calcIndex(row,col); RoomCell returnRoom = new RoomCell(); if (cells.get(index).isRoom() == true) { returnRoom = (RoomCell)cells.get(index); } return returnRoom; } public BoardCell getCells(int index) { return cells.get(index); } public Map<Character, String> getRooms() { return rooms; } public int getNumRows() { return numRows; } public int getNumColumns() { return numColumns; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f69251bdcab4e89e4df66fd356e49ea1431fb011
1e0dd7d68aefc61ba2cb698c2f52cf8e172a2e41
/app/src/main/java/com/lianxi/dingtu/dingtu_plate/mvp/ui/adapter/MenuAdapter.java
ecc5a3ad7757ccfa4b770813b103aa168c2ea84a
[]
no_license
scygh/DingTu_plate
2ef1650e221a3c1b77cf7c74a3df0d0d14550a03
486f9bd4d1bea69c5c85c1dee9b200eea461f14b
refs/heads/master
2021-07-03T02:17:34.992865
2020-03-17T01:37:56
2020-03-17T01:37:56
221,102,540
0
0
null
null
null
null
UTF-8
Java
false
false
654
java
package com.lianxi.dingtu.dingtu_plate.mvp.ui.adapter; import android.support.annotation.Nullable; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.lianxi.dingtu.dingtu_plate.R; import java.util.List; public class MenuAdapter extends BaseQuickAdapter<String, BaseViewHolder> { public MenuAdapter(int layoutResId, @Nullable List<String> data) { super(layoutResId, data); } @Override protected void convert(BaseViewHolder helper, String item) { helper.setText(R.id.item_menu_tv,item) .addOnClickListener(R.id.item_menu_btn); } }
[ "1797484636@qq.com" ]
1797484636@qq.com
a3166940faf21ac1cd35f682115c36122e2023bd
2b3e0c89b9ef2d01a1014723eb2659330f29c0c1
/Core Service Java Client/src/com/sdltridion/contentmanager/coreservice/_2012/GetSearchResultsXmlResponse.java
4c38f170a9ad53b8f03d8422a83c4c73710fc0f0
[]
no_license
mitza13/yet-another-tridion-blog
def0263f9797e62239956733da1682c2ebc08aec
a803ec3772d02dbfc76a21e7a5d44cc9ec87aac3
refs/heads/master
2021-01-20T04:28:52.805980
2018-04-06T14:54:57
2018-04-06T14:54:57
42,700,739
2
1
null
null
null
null
UTF-8
Java
false
false
3,899
java
package com.sdltridion.contentmanager.coreservice._2012; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAnyElement; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import org.w3c.dom.Element; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="GetSearchResultsXmlResult" minOccurs="0"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;any processContents='lax' minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "getSearchResultsXmlResult" }) @XmlRootElement(name = "GetSearchResultsXmlResponse") public class GetSearchResultsXmlResponse { @XmlElement(name = "GetSearchResultsXmlResult", nillable = true) protected GetSearchResultsXmlResponse.GetSearchResultsXmlResult getSearchResultsXmlResult; /** * Gets the value of the getSearchResultsXmlResult property. * * @return * possible object is * {@link GetSearchResultsXmlResponse.GetSearchResultsXmlResult } * */ public GetSearchResultsXmlResponse.GetSearchResultsXmlResult getGetSearchResultsXmlResult() { return getSearchResultsXmlResult; } /** * Sets the value of the getSearchResultsXmlResult property. * * @param value * allowed object is * {@link GetSearchResultsXmlResponse.GetSearchResultsXmlResult } * */ public void setGetSearchResultsXmlResult(GetSearchResultsXmlResponse.GetSearchResultsXmlResult value) { this.getSearchResultsXmlResult = value; } /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;any processContents='lax' minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "any" }) public static class GetSearchResultsXmlResult { @XmlAnyElement(lax = true) protected Object any; /** * Gets the value of the any property. * * @return * possible object is * {@link Element } * {@link Object } * */ public Object getAny() { return any; } /** * Sets the value of the any property. * * @param value * allowed object is * {@link Element } * {@link Object } * */ public void setAny(Object value) { this.any = value; } } }
[ "mitza13@538b63c4-fdea-668c-0068-65d03cfa36e6" ]
mitza13@538b63c4-fdea-668c-0068-65d03cfa36e6
de48910c3ffde8f03637e5aa12a421430c71aba4
a823d48f9c18a308d389492471f205365bb4e578
/0000-java8-master/src/main/java/com/sun/org/apache/xerces/internal/jaxp/DefaultValidationErrorHandler.java
0d67455248572e72e0795692e8cfd060081bddf4
[]
no_license
liuawen/Learning-Algorithms
3e145915ceecb93e88ca92df5dc1d0bf623db429
983c93a96ce0807534285782a55b22bb31252078
refs/heads/master
2023-07-19T17:04:39.723755
2023-07-14T14:59:03
2023-07-14T14:59:03
200,856,810
16
6
null
2023-04-17T19:13:20
2019-08-06T13:26:41
Java
UTF-8
Java
false
false
2,118
java
/* * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ /* * Copyright 2000-2002,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 com.sun.org.apache.xerces.internal.jaxp; import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter; import java.util.Locale; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; import org.xml.sax.helpers.DefaultHandler; /** */ class DefaultValidationErrorHandler extends DefaultHandler { static private int ERROR_COUNT_LIMIT = 10; private int errorCount = 0; private Locale locale = Locale.getDefault(); public DefaultValidationErrorHandler(Locale locale) { this.locale = locale; } // XXX Fix message i18n public void error(SAXParseException e) throws SAXException { if (errorCount >= ERROR_COUNT_LIMIT) { // Ignore all errors after reaching the limit return; } else if (errorCount == 0) { // Print a warning before the first error System.err.println(SAXMessageFormatter.formatMessage(locale, "errorHandlerNotSet", new Object [] {errorCount})); } String systemId = e.getSystemId(); if (systemId == null) { systemId = "null"; } String message = "Error: URI=" + systemId + " Line=" + e.getLineNumber() + ": " + e.getMessage(); System.err.println(message); errorCount++; } }
[ "157514367@qq.com" ]
157514367@qq.com
408d9cfdcb0df8af20c8000f5c8391c5b62fa62d
29227577f1b07a9fcada5d38d6c57cded3515cb2
/src/main/java/nanocad/display.java
f13bf26b742cd0743407c15f39e124fcf9577c90
[ "Apache-2.0" ]
permissive
SciGaP/seagrid-rich-client
ad11edd2691c0ac1863591e106cb5f4f19d6d633
b7114b3bb4bb3796e8f9ab3b49e5bd08f9fc005e
refs/heads/master
2023-06-23T16:33:10.356706
2022-06-16T02:27:46
2022-06-16T02:27:46
45,587,225
1
8
Apache-2.0
2023-06-14T22:43:06
2015-11-05T04:19:15
Java
UTF-8
Java
false
false
2,667
java
package nanocad; import java.awt.*; import java.awt.List; import java.lang.*; import java.awt.event.*; public class display extends Frame { public boolean flagtoindicate=false; Panel plMain = new Panel(); Button buttonOK = new Button("OK"); Button buttonclose = new Button("Close"); List todisplay = new List(50,false); String dirname=null,username=null,user,dir; List newlist; private newNanocad nano; textwin saveWin; public display(newNanocad n,List newlist,String dir,String user){ //super(); enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { todisplay = newlist; dirname= dir; username = user; nano = n; jbInit(); } catch (Exception e) { e.printStackTrace(); } } public void jbInit() throws Exception { this.setTitle("Load file"); this.add(plMain,null); //this.setLayout(null);//.getContentPane().setLayout(null); plMain.setLayout(null); this.setSize(new Dimension(300,450)); plMain.setLayout(null); plMain.setBounds(new Rectangle(0, 0, 100, 100)); // plMain.add(errormsg, null); plMain.add(todisplay,null); todisplay.setBounds(40,10,200,200); plMain.add(buttonOK, null); plMain.add(buttonclose,null); todisplay.setVisible(true); buttonOK.setFont(new Font("SansSerif", 1, 12)); buttonOK.setBounds(new Rectangle(100, 278, 40, 32)); buttonOK.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { buttonOK_actionPerformed(e); } } ); buttonclose.setFont(new Font("SansSerif",1,12)); buttonclose.setBounds(new Rectangle(160,278,40,32)); buttonclose.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e){ buttonclose_actionPerformed(e); } } ); } void buttonclose_actionPerformed(ActionEvent e) { this.dispose(); } void buttonOK_actionPerformed(ActionEvent e) { String filename = todisplay.getSelectedItem(); // Check User directory! String dirname ="/work/csd/temp/"+ username +"/"; // To get rid of ".pdb" from the list of files returned by cgi script int pos; if( (pos = filename.indexOf("pdb")) != -1) { System.out.println("pdb"); String ext = filename.substring(pos, filename.length()); String data = nano.receiveFile(filename, ext, dirname); nano.drawFile(data,ext); } } /* public static void main(String args[]) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch(Exception exp) { } display aa = new display(); aa.setVisible(true); }*/ }
[ "supun.nakandala@gmail.com" ]
supun.nakandala@gmail.com
701e20837753b3c4f72cd8e8551fd9a02f3925b6
6482753b5eb6357e7fe70e3057195e91682db323
/org/apache/logging/log4j/core/util/ArrayUtils.java
bb41cb80ea928c33b90d04be8e4cede403758eeb
[]
no_license
TheShermanTanker/Server-1.16.3
45cf9996afa4cd4d8963f8fd0588ae4ee9dca93c
48cc08cb94c3094ebddb6ccfb4ea25538492bebf
refs/heads/master
2022-12-19T02:20:01.786819
2020-09-18T21:29:40
2020-09-18T21:29:40
296,730,962
0
1
null
null
null
null
UTF-8
Java
false
false
1,021
java
package org.apache.logging.log4j.core.util; import java.lang.reflect.Array; public class ArrayUtils { public static int getLength(final Object array) { if (array == null) { return 0; } return Array.getLength(array); } private static Object remove(final Object array, final int index) { final int length = getLength(array); if (index < 0 || index >= length) { throw new IndexOutOfBoundsException(new StringBuilder().append("Index: ").append(index).append(", Length: ").append(length).toString()); } final Object result = Array.newInstance(array.getClass().getComponentType(), length - 1); System.arraycopy(array, 0, result, 0, index); if (index < length - 1) { System.arraycopy(array, index + 1, result, index, length - index - 1); } return result; } public static <T> T[] remove(final T[] array, final int index) { return (T[])remove(array, index); } }
[ "tanksherman27@gmail.com" ]
tanksherman27@gmail.com
5759140f058117b45666d3fed962d03022675b3c
2eb5604c0ba311a9a6910576474c747e9ad86313
/chado-pg-orm/src/org/irri/iric/chado/so/SupercontigHome.java
f9c952fa9d94dc5d1c236f4885fbc3b4e2431b8b
[]
no_license
iric-irri/portal
5385c6a4e4fd3e569f5334e541d4b852edc46bc1
b2d3cd64be8d9d80b52d21566f329eeae46d9749
refs/heads/master
2021-01-16T00:28:30.272064
2014-05-26T05:46:30
2014-05-26T05:46:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,528
java
package org.irri.iric.chado.so; // Generated 05 26, 14 1:32:32 PM by Hibernate Tools 3.4.0.CR1 import java.util.List; import javax.naming.InitialContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.LockMode; import org.hibernate.SessionFactory; import org.hibernate.criterion.Example; /** * Home object for domain model class Supercontig. * @see org.irri.iric.chado.so.Supercontig * @author Hibernate Tools */ public class SupercontigHome { private static final Log log = LogFactory.getLog(SupercontigHome.class); private final SessionFactory sessionFactory = getSessionFactory(); protected SessionFactory getSessionFactory() { try { return (SessionFactory) new InitialContext() .lookup("SessionFactory"); } catch (Exception e) { log.error("Could not locate SessionFactory in JNDI", e); throw new IllegalStateException( "Could not locate SessionFactory in JNDI"); } } public void persist(Supercontig transientInstance) { log.debug("persisting Supercontig instance"); try { sessionFactory.getCurrentSession().persist(transientInstance); log.debug("persist successful"); } catch (RuntimeException re) { log.error("persist failed", re); throw re; } } public void attachDirty(Supercontig instance) { log.debug("attaching dirty Supercontig instance"); try { sessionFactory.getCurrentSession().saveOrUpdate(instance); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void attachClean(Supercontig instance) { log.debug("attaching clean Supercontig instance"); try { sessionFactory.getCurrentSession().lock(instance, LockMode.NONE); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void delete(Supercontig persistentInstance) { log.debug("deleting Supercontig instance"); try { sessionFactory.getCurrentSession().delete(persistentInstance); log.debug("delete successful"); } catch (RuntimeException re) { log.error("delete failed", re); throw re; } } public Supercontig merge(Supercontig detachedInstance) { log.debug("merging Supercontig instance"); try { Supercontig result = (Supercontig) sessionFactory .getCurrentSession().merge(detachedInstance); log.debug("merge successful"); return result; } catch (RuntimeException re) { log.error("merge failed", re); throw re; } } public Supercontig findById(org.irri.iric.chado.so.SupercontigId id) { log.debug("getting Supercontig instance with id: " + id); try { Supercontig instance = (Supercontig) sessionFactory .getCurrentSession().get( "org.irri.iric.chado.so.Supercontig", id); if (instance == null) { log.debug("get successful, no instance found"); } else { log.debug("get successful, instance found"); } return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } public List findByExample(Supercontig instance) { log.debug("finding Supercontig instance by example"); try { List results = sessionFactory.getCurrentSession() .createCriteria("org.irri.iric.chado.so.Supercontig") .add(Example.create(instance)).list(); log.debug("find by example successful, result size: " + results.size()); return results; } catch (RuntimeException re) { log.error("find by example failed", re); throw re; } } }
[ "locem@berting-debian.ourwebserver.no-ip.biz" ]
locem@berting-debian.ourwebserver.no-ip.biz