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
f0230ce7fc98498c59a3e738cd07127d674fce56
b280a34244a58fddd7e76bddb13bc25c83215010
/scmv6/center-task1/src/main/java/com/smate/center/task/service/sns/quartz/PsnKwRmcService.java
022767b864ef9a003ba82777fd7454d03bade09f
[]
no_license
hzr958/myProjects
910d7b7473c33ef2754d79e67ced0245e987f522
d2e8f61b7b99a92ffe19209fcda3c2db37315422
refs/heads/master
2022-12-24T16:43:21.527071
2019-08-16T01:46:18
2019-08-16T01:46:18
202,512,072
2
3
null
2022-12-16T05:31:05
2019-08-15T09:21:04
Java
UTF-8
Java
false
false
782
java
package com.smate.center.task.service.sns.quartz; import java.util.List; public interface PsnKwRmcService { // --获取5个小时前的用户刷新数据 public List<Long> getRefreshData(); public int getRefreshFlag(); public void deleteFromTmp(); public void handlePsnKwRmc(Long psnId); public void updateRefreshFlag(); public void updateRefreshData(Long psnId); public void handleKwRcmdScore(Long psnId); public void HandlesupplementPsnKwRmc(Long psnId); public void ItoratorZhKw(Long psnId); public void ItoratorEnKw(Long psnId); /** * 获取推荐研究领域的人员ID任务列表<推荐研究领域邮件功能用到此方法> * * @param maxSize * @return */ List<Long> getPsnIdList(Long startPsnId, Integer maxSize); }
[ "zhiranhe@irissz.com" ]
zhiranhe@irissz.com
e7595767cb3f99859218b203cfad10fbc6f193cc
ae16ea830929bf6ae97c0b5d9a578e3048b8f8c3
/Projects/java_json/src/gen/cfg/ai/SimpleParallel.java
24c80985250c35345c202511e43090977c63c3f7
[ "MIT" ]
permissive
xldeng1203/luban_examples
0d5774b0952f10485caac0aeb879302c4f612002
8b4c4c181cdf3a400fa2f4f871e28128979d9e74
refs/heads/main
2023-08-25T16:02:10.995453
2021-10-20T11:35:22
2021-10-20T11:35:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,301
java
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ package cfg.ai; import com.google.gson.JsonElement; import com.google.gson.JsonObject; public final class SimpleParallel extends cfg.ai.ComposeNode { public SimpleParallel(JsonObject __json__) { super(__json__); finishMode = cfg.ai.EFinishMode.valueOf(__json__.get("finish_mode").getAsInt()); mainTask = cfg.ai.Task.deserializeTask(__json__.get("main_task").getAsJsonObject()); backgroundNode = cfg.ai.FlowNode.deserializeFlowNode(__json__.get("background_node").getAsJsonObject()); } public SimpleParallel(int id, String node_name, java.util.ArrayList<cfg.ai.Decorator> decorators, java.util.ArrayList<cfg.ai.Service> services, cfg.ai.EFinishMode finish_mode, cfg.ai.Task main_task, cfg.ai.FlowNode background_node ) { super(id, node_name, decorators, services); this.finishMode = finish_mode; this.mainTask = main_task; this.backgroundNode = background_node; } public static SimpleParallel deserializeSimpleParallel(JsonObject __json__) { return new SimpleParallel(__json__); } public final cfg.ai.EFinishMode finishMode; public final cfg.ai.Task mainTask; public final cfg.ai.FlowNode backgroundNode; public static final int ID = -1952582529; @Override public int getTypeId() { return ID; } @Override public void resolve(java.util.HashMap<String, Object> _tables) { super.resolve(_tables); if (mainTask != null) {mainTask.resolve(_tables);} if (backgroundNode != null) {backgroundNode.resolve(_tables);} } @Override public String toString() { return "{ " + "id:" + id + "," + "nodeName:" + nodeName + "," + "decorators:" + decorators + "," + "services:" + services + "," + "finishMode:" + finishMode + "," + "mainTask:" + mainTask + "," + "backgroundNode:" + backgroundNode + "," + "}"; } }
[ "taojingjian@gmail.com" ]
taojingjian@gmail.com
c4ad9f059b867f4f026f9bd7b3b79a872c441224
42b6f2af40113c457f4462258a63968db2993487
/virtdata-lib-basics/src/main/java/io/virtdata/libbasics/shared/stateful/Save.java
b77119285015c4ecf27ad673d591a3faece232eb
[ "Apache-2.0" ]
permissive
weideng1/virtdata-java
9c71d625072b601c0662e94bada43ad752382a2c
7476d9f05f8fc0709d87939f7bf28467f232824d
refs/heads/master
2020-09-16T12:55:39.365228
2019-11-22T20:55:19
2019-11-22T20:55:19
223,776,695
0
0
Apache-2.0
2019-11-24T16:44:09
2019-11-24T16:44:09
null
UTF-8
Java
false
false
1,513
java
package io.virtdata.libbasics.shared.stateful; import io.virtdata.annotations.Categories; import io.virtdata.annotations.Category; import io.virtdata.annotations.Example; import io.virtdata.annotations.ThreadSafeMapper; import io.virtdata.libbasics.core.threadstate.SharedState; import java.util.HashMap; import java.util.function.Function; /** * Save the current input value at this point in the function chain to a thread-local variable name. * The input value is unchanged, and available for the next function in the chain to use as-is. */ @ThreadSafeMapper @Categories({Category.state}) public class Save implements Function<Object,Object> { private final String name; private final Function<Object,Object> nameFunc; @Example({"Save('foo')","for the current thread, save the input object value to the named variable"}) public Save(String name) { this.name = name; this.nameFunc=null; } @Example({"Save(NumberNameToString())","for the current thread, save the current input object value to the named variable," + "where the variable name is provided by a function."}) public Save(Function<Object,Object> nameFunc) { this.name = null; this.nameFunc = nameFunc; } @Override public Object apply(Object o) { HashMap<String, Object> map = SharedState.tl_ObjectMap.get(); String varname = (nameFunc!=null) ? String.valueOf(nameFunc.apply(o)) : name; map.put(varname,o); return o; } }
[ "jshook@gmail.com" ]
jshook@gmail.com
cb99f860028daaf6325a7e62c414666b1252184f
a741d82fb5ee0203161455353587ffcc902ef351
/aylson-utils/src/main/java/com/fastweixin/company/message/req/QYBaseReqMsg.java
644486aa4ad4f32531476da10ccebfd35faafd6b
[]
no_license
xiaofeifei321/aylson-parent
b48121272d5e92a1acc4b671ab7af63aa6c06b0b
3749a0f1ef45851b4aa513b324ef23a04e4421d3
refs/heads/master
2022-12-23T20:15:51.598455
2019-08-29T11:30:13
2019-08-29T11:30:13
204,696,341
0
0
null
null
null
null
UTF-8
Java
false
false
619
java
package com.fastweixin.company.message.req; /** * 微信企业号普通消息事件基类 * ==================================================================== * 上海聚攒软件开发有限公司 * -------------------------------------------------------------------- * @author Nottyjay * @version 1.0.beta * @since 1.3.6 * ==================================================================== */ public class QYBaseReqMsg extends QYBaseReq { String msgId; public String getMsgId() { return msgId; } public void setMsgId(String msgId) { this.msgId = msgId; } }
[ "874189630@qq.com" ]
874189630@qq.com
9ca1bf204ed3bfcfd20c5ad187585fd79a024ffe
774d36285e48bd429017b6901a59b8e3a51d6add
/sources/p118io/presage/Morbier.java
559890c31fbc6a43dcd2da68470f387a0cb1ecd6
[]
no_license
jorge-luque/hb
83c086851a409e7e476298ffdf6ba0c8d06911db
b467a9af24164f7561057e5bcd19cdbc8647d2e5
refs/heads/master
2023-08-25T09:32:18.793176
2020-10-02T11:02:01
2020-10-02T11:02:01
300,586,541
0
0
null
null
null
null
UTF-8
Java
false
false
188
java
package p118io.presage; /* renamed from: io.presage.Morbier */ public final class Morbier extends Mimolette24mois { public Morbier(String str) { super(str, (byte) 0); } }
[ "jorge.luque@taiger.com" ]
jorge.luque@taiger.com
f870475c77b86e1249103fd9fc93ede2708983c1
d899f0677f3805f071a62b24634fe78f16881189
/osa03-Osa03_03.AirportsAndAircrafts/src/main/java/airports/AircraftController.java
14468ee67796bc96d9dd5a872e67fdec2137d3f4
[]
no_license
remixtures/web-server-programming-java-2021
a0de095cf2499830784ad8286671b0d198848e88
f297c51c2c34ce52629494c499c90460afc2af3c
refs/heads/master
2023-05-27T09:18:55.313181
2021-06-04T12:03:06
2021-06-04T12:03:06
373,673,320
2
1
null
null
null
null
UTF-8
Java
false
false
1,480
java
package airports; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller public class AircraftController { @Autowired private AircraftRepository aircraftRepository; @Autowired private AirportRepository airportRepository; @GetMapping("/aircrafts") public String list(Model model) { model.addAttribute("aircrafts", aircraftRepository.findAll()); model.addAttribute("airports", airportRepository.findAll()); return "aircrafts"; } @PostMapping("/aircrafts") public String create(@RequestParam String name) { Aircraft a = new Aircraft(); a.setName(name); aircraftRepository.save(a); return "redirect:/aircrafts"; } @PostMapping("/aircrafts/{aircraftId}/airports") public String assignAirport(@PathVariable Long aircraftId, @RequestParam Long airportId) { Aircraft aircraft = aircraftRepository.getOne(aircraftId); Airport airport = airportRepository.getOne(airportId); aircraft.setAirport(airport); aircraftRepository.save(aircraft); return "redirect:/aircrafts"; } }
[ "miguel.a.caetano@gmail.com" ]
miguel.a.caetano@gmail.com
730e168990757a2e52703ce0b7c5cafad2efc719
48313eab73f9fed21f8a1e476e2653a3250d0b23
/corpis-domain/corpis-transportation-domain-model/src/main/java/sk/seges/corpis/server/domain/transportation/OrderTransportationOrder.java
069d519c769e70ceacefe8fabef0b815e1884055
[]
no_license
seges/corpis
cfcdf603224261748393ec3aede41c22c5de1cee
8335e9e9be25a0ba960df3dba976840f15963d42
refs/heads/master
2020-12-24T05:14:57.179114
2016-03-31T13:08:21
2016-03-31T13:08:21
41,592,267
0
0
null
null
null
null
UTF-8
Java
false
false
393
java
package sk.seges.corpis.server.domain.transportation; import sk.seges.corpis.appscaffold.shared.annotation.BaseObject; import sk.seges.corpis.appscaffold.shared.annotation.DomainInterface; import sk.seges.corpis.server.domain.invoice.Accountable; @DomainInterface @BaseObject public interface OrderTransportationOrder extends TransportationOrder { Accountable accountable(); }
[ "sloboda@seges.sk@e28c4d36-3818-11de-97fb-aff7d2a6cc54" ]
sloboda@seges.sk@e28c4d36-3818-11de-97fb-aff7d2a6cc54
9955dfd46df0cceec5f3fea96eaee30caf49b60b
901aec9c9408a737cf382d6c3549e44eb3d0f167
/ecardcity-platform/src/main/java/cn/newcapec/function/platform/model/LegalPerson.java
fa4f9919a982e4d08c6e4cfc493335186f2547f9
[]
no_license
zhangjunfang/architecture
a32f1d3e5dfd528517ed8dc4fd2e6b32a0a12e2d
709cbc68a8381d93e7af779470025a1d8a27de4e
refs/heads/master
2016-09-15T08:41:37.899666
2016-03-05T11:23:52
2016-03-05T11:23:52
33,911,525
3
0
null
null
null
null
UTF-8
Java
false
false
4,746
java
package cn.newcapec.function.platform.model; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import cn.newcapec.framework.core.model.CommonModel; /** * 用户实体类 * * @author chongfeigao * */ @Entity @Table(name = "base_legal_person") public class LegalPerson extends CommonModel { private static final long serialVersionUID = -693841966186554489L; /* 客户代码(国家地区编号(3)+预留(5)+分配序号(3)),如08600000001 */ @Column(name = "customerunitcode", length = 12) private String customerunitcode; /* 客户名称 */ @Column(name = "customername", length = 50) private String customername; /* 客户名称简称 */ @Column(name = "customernamejp", length = 50) private String customernamejp; /* 联系人 */ @Column(name = "linkman", length = 50) private String linkman; /* 联系电话 */ @Column(name = "telephone", length = 13) private String telephone; /* 客户地址: */ @Column(name = "address", length = 100) private String address; /* 邮件 */ @Column(name = "email", length = 100) private String email; /* 所属银行(base_bank) */ @Column(name = "bankcode", length = 10) private Integer bankcode; /* 转账卡号(银行卡号) */ @Column(name = "bankcardno", length = 15) private String bankcardno; /* 数据存储数据库连接字符串(预留) */ @Column(name = "databasestr", length = 100) private String databasestr; /* 访问Web服务地址 */ @Column(name = "weburl", length = 100) private String weburl; /* 最后一次操作时间(每次操作都更新) */ @Temporal(TemporalType.TIMESTAMP) @Column(name = "opdt") private Date opdt; /* 客户注册时间(添加时候更新,其他时间不维护)) */ @Temporal(TemporalType.TIMESTAMP) @Column(name = "opendt") private Date opendt; /* 备注信息 */ @Column(name = "remark", length = 100) private String remark; /* 0:禁用状态 1:未授权 2:已授权 */ @Column(name = "status") private Integer status; /* 逻辑删除字段(0未删除,1 删除) */ @Column(name = "isdelete") private String isdelete; /* 是否正在结帐(0:否;1:是 2:准备结账 非0状态不允许执行日结操作) */ @Column(name = "isbalance") private String isbalance; public String getCustomerunitcode() { return customerunitcode; } public void setCustomerunitcode(String customerunitcode) { this.customerunitcode = customerunitcode; } public String getCustomername() { return customername; } public void setCustomername(String customername) { this.customername = customername; } public String getCustomernamejp() { return customernamejp; } public void setCustomernamejp(String customernamejp) { this.customernamejp = customernamejp; } public String getLinkman() { return linkman; } public void setLinkman(String linkman) { this.linkman = linkman; } public String getTelephone() { return telephone; } public void setTelephone(String telephone) { this.telephone = telephone; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Integer getBankcode() { return bankcode; } public void setBankcode(Integer bankcode) { this.bankcode = bankcode; } public String getBankcardno() { return bankcardno; } public void setBankcardno(String bankcardno) { this.bankcardno = bankcardno; } public String getDatabasestr() { return databasestr; } public void setDatabasestr(String databasestr) { this.databasestr = databasestr; } public String getWeburl() { return weburl; } public void setWeburl(String weburl) { this.weburl = weburl; } public Date getOpdt() { return opdt; } public void setOpdt(Date opdt) { this.opdt = opdt; } public Date getOpendt() { return opendt; } public void setOpendt(Date opendt) { this.opendt = opendt; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public String getIsdelete() { return isdelete; } public void setIsdelete(String isdelete) { this.isdelete = isdelete; } public String getIsbalance() { return isbalance; } public void setIsbalance(String isbalance) { this.isbalance = isbalance; } public static long getSerialversionuid() { return serialVersionUID; } }
[ "zhangjunfang0505@163.com" ]
zhangjunfang0505@163.com
de346b24bcefd25dc8e428d88ef909a79f776fbc
be020210b88d5e59936db53043ae325bc9927173
/test/org/pentaho/di/trans/steps/excelinput/PoiWorkBookTest.java
5a829b9cbdbd41c822e59f0abe89de112c22d5ff
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
cskason/pentaho-kettle4.4
124a245e26789ab81cfbea767f2a1d635de0917c
d59882f7076588e2cd007ac9bda5c95edc0bee19
refs/heads/master
2021-01-20T01:52:52.888969
2017-08-07T09:05:38
2017-08-07T09:05:38
89,341,173
0
0
null
null
null
null
UTF-8
Java
false
false
3,719
java
/******************************************************************************* * * Pentaho Data Integration * * Copyright (C) 2002-2012 by Pentaho : http://www.pentaho.com * ******************************************************************************* * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************/ package org.pentaho.di.trans.steps.excelinput; import java.util.Date; import junit.framework.TestCase; import org.pentaho.di.core.spreadsheet.KCell; import org.pentaho.di.core.spreadsheet.KCellType; import org.pentaho.di.core.spreadsheet.KSheet; import org.pentaho.di.core.spreadsheet.KWorkbook; public class PoiWorkBookTest extends TestCase { public void testRead() throws Exception { KWorkbook workbook = WorkbookFactory.getWorkbook(SpreadSheetType.POI, "testfiles/sample-file.xlsx", null); int numberOfSheets = workbook.getNumberOfSheets(); assertEquals(3, numberOfSheets); KSheet sheet1 = workbook.getSheet(0); assertEquals("Sheet1", sheet1.getName()); sheet1 = workbook.getSheet("Sheet1"); assertEquals("Sheet1", sheet1.getName()); assertEquals(5, sheet1.getRows()); KCell[] row = sheet1.getRow(2); assertEquals(KCellType.LABEL, row[1].getType()); assertEquals("One", row[1].getValue()); assertEquals(KCellType.DATE, row[2].getType()); assertEquals(new Date(1283817600000L), row[2].getValue()); assertEquals(KCellType.NUMBER, row[3].getType()); assertEquals(Double.valueOf("75"), row[3].getValue()); assertEquals(KCellType.BOOLEAN, row[4].getType()); assertEquals(Boolean.valueOf(true), row[4].getValue()); assertEquals(KCellType.NUMBER_FORMULA, row[5].getType()); assertEquals(Double.valueOf("75"), row[5].getValue()); row = sheet1.getRow(3); assertEquals(KCellType.LABEL, row[1].getType()); assertEquals("Two", row[1].getValue()); assertEquals(KCellType.DATE, row[2].getType()); assertEquals(new Date(1283904000000L), row[2].getValue()); assertEquals(KCellType.NUMBER, row[3].getType()); assertEquals(Double.valueOf("42"), row[3].getValue()); assertEquals(KCellType.BOOLEAN, row[4].getType()); assertEquals(Boolean.valueOf(false), row[4].getValue()); assertEquals(KCellType.NUMBER_FORMULA, row[5].getType()); assertEquals(Double.valueOf("117"), row[5].getValue()); row = sheet1.getRow(4); assertEquals(KCellType.LABEL, row[1].getType()); assertEquals("Three", row[1].getValue()); assertEquals(KCellType.DATE, row[2].getType()); assertEquals(new Date(1283990400000L), row[2].getValue()); assertEquals(KCellType.NUMBER, row[3].getType()); assertEquals(Double.valueOf("93"), row[3].getValue()); assertEquals(KCellType.BOOLEAN, row[4].getType()); assertEquals(Boolean.valueOf(true), row[4].getValue()); assertEquals(KCellType.NUMBER_FORMULA, row[5].getType()); assertEquals(Double.valueOf("210"), row[5].getValue()); try { sheet1.getRow(5); throw new Exception("No out of bounds exception thrown when expected"); } catch(ArrayIndexOutOfBoundsException e) { // OK! } workbook.close(); } }
[ "cskason@gmail.com" ]
cskason@gmail.com
d00d1f0b30da74739114ecb42b2030a227bdc49c
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/training/org/springframework/security/oauth2/client/userinfo/DelegatingOAuth2UserServiceTests.java
949e5c28782c7ac09d52a5d244c408517a506dbd
[]
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,617
java
/** * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.security.oauth2.client.userinfo; import java.util.Arrays; import java.util.Collections; import org.junit.Test; import org.mockito.ArgumentMatchers; import org.mockito.Mockito; import org.springframework.security.oauth2.core.user.OAuth2User; /** * Tests for {@link DelegatingOAuth2UserService}. * * @author Joe Grandja */ public class DelegatingOAuth2UserServiceTests { @Test(expected = IllegalArgumentException.class) public void constructorWhenUserServicesIsNullThenThrowIllegalArgumentException() { new DelegatingOAuth2UserService(null); } @Test(expected = IllegalArgumentException.class) public void constructorWhenUserServicesIsEmptyThenThrowIllegalArgumentException() { new DelegatingOAuth2UserService(Collections.emptyList()); } @Test(expected = IllegalArgumentException.class) @SuppressWarnings("unchecked") public void loadUserWhenUserRequestIsNullThenThrowIllegalArgumentException() { DelegatingOAuth2UserService<OAuth2UserRequest, OAuth2User> delegatingUserService = new DelegatingOAuth2UserService(Arrays.asList(Mockito.mock(OAuth2UserService.class), Mockito.mock(OAuth2UserService.class))); delegatingUserService.loadUser(null); } @Test @SuppressWarnings("unchecked") public void loadUserWhenUserServiceCanLoadThenReturnUser() { OAuth2UserService<OAuth2UserRequest, OAuth2User> userService1 = Mockito.mock(OAuth2UserService.class); OAuth2UserService<OAuth2UserRequest, OAuth2User> userService2 = Mockito.mock(OAuth2UserService.class); OAuth2UserService<OAuth2UserRequest, OAuth2User> userService3 = Mockito.mock(OAuth2UserService.class); OAuth2User mockUser = Mockito.mock(OAuth2User.class); Mockito.when(userService3.loadUser(ArgumentMatchers.any(OAuth2UserRequest.class))).thenReturn(mockUser); DelegatingOAuth2UserService<OAuth2UserRequest, OAuth2User> delegatingUserService = new DelegatingOAuth2UserService(Arrays.asList(userService1, userService2, userService3)); OAuth2User loadedUser = delegatingUserService.loadUser(Mockito.mock(OAuth2UserRequest.class)); assertThat(loadedUser).isEqualTo(mockUser); } @Test @SuppressWarnings("unchecked") public void loadUserWhenUserServiceCannotLoadThenReturnNull() { OAuth2UserService<OAuth2UserRequest, OAuth2User> userService1 = Mockito.mock(OAuth2UserService.class); OAuth2UserService<OAuth2UserRequest, OAuth2User> userService2 = Mockito.mock(OAuth2UserService.class); OAuth2UserService<OAuth2UserRequest, OAuth2User> userService3 = Mockito.mock(OAuth2UserService.class); DelegatingOAuth2UserService<OAuth2UserRequest, OAuth2User> delegatingUserService = new DelegatingOAuth2UserService(Arrays.asList(userService1, userService2, userService3)); OAuth2User loadedUser = delegatingUserService.loadUser(Mockito.mock(OAuth2UserRequest.class)); assertThat(loadedUser).isNull(); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
e281affb352b1067c4ed74cd4445d106620ec324
7a76838d738be65d601f164cb5a97b699be1da2b
/spring-batch-in-action/base/base/spring-batch/spring-batch-core/src/test/java/org/springframework/batch/core/explore/support/MapJobExplorerFactoryBeanTests.java
9443ca6004c6941e63ece93bfbf1edeb5f7b1d7a
[ "Apache-2.0" ]
permissive
jinminer/spring-batch
fafdedec5de3198aa0c05353a26f0238b396bebc
f2e29682f882c8656b283030279e95ebcf08868a
refs/heads/master
2022-12-22T21:04:27.438433
2019-10-08T16:58:10
2019-10-08T16:58:10
209,073,938
1
1
Apache-2.0
2022-12-16T01:35:27
2019-09-17T14:18:30
Java
UTF-8
Java
false
false
1,959
java
/* * Copyright 2010-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://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.springframework.batch.core.explore.support; import static org.junit.Assert.assertEquals; import org.junit.Test; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.explore.JobExplorer; import org.springframework.batch.core.repository.JobRepository; import org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean; import java.util.Date; /** * Tests for {@link MapJobExplorerFactoryBean}. */ public class MapJobExplorerFactoryBeanTests { /** * Use the factory to create repository and check the explorer remembers * created executions. */ @Test public void testCreateExplorer() throws Exception { MapJobRepositoryFactoryBean repositoryFactory = new MapJobRepositoryFactoryBean(); JobRepository jobRepository = repositoryFactory.getObject(); JobExecution jobExecution = jobRepository.createJobExecution("foo", new JobParameters()); //simulating a running job execution jobExecution.setStartTime(new Date()); jobRepository.update(jobExecution); MapJobExplorerFactoryBean tested = new MapJobExplorerFactoryBean(repositoryFactory); tested.afterPropertiesSet(); JobExplorer explorer = tested.getObject(); assertEquals(1, explorer.findRunningJobExecutions("foo").size()); } }
[ "jinm@uxunchina.com" ]
jinm@uxunchina.com
7572b2a7b44f3e0e51da12e71b47b1ea2631e30a
43f8b49e5bdede221c88cba239a60b98d87cb917
/Category-5/library-app/library-model/src/test/java/com/library/app/category/services/impl/CategoryServicesUTest.java
e84147ae4e934fbb2c0b2c18e2ac588e76632ead
[]
no_license
joedayz/LibraryJEE7
7ad87fe855c05239faa5da07b79d8e01098ced53
e2e2443bfa16f8753610200c5851c722070f12e1
refs/heads/master
2020-12-30T18:02:01.138470
2017-05-18T00:16:32
2017-05-18T00:16:32
90,938,029
0
0
null
null
null
null
UTF-8
Java
false
false
2,399
java
package com.library.app.category.services.impl; import static com.library.app.commontests.category.CategoryForTestsRepository.*; import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; import static org.mockito.Mockito.*; import javax.validation.Validation; import javax.validation.Validator; import org.junit.Before; import org.junit.Test; import com.library.app.category.exception.CategoryExistentException; import com.library.app.category.model.Category; import com.library.app.category.repository.CategoryRepository; import com.library.app.category.services.CategoryServices; import com.library.app.common.exception.FieldNotValidException; public class CategoryServicesUTest { private CategoryServices categoryServices; private CategoryRepository categoryRepository; private Validator validator; @Before public void initTestCase() { validator = Validation.buildDefaultValidatorFactory().getValidator(); categoryRepository = mock(CategoryRepository.class); categoryServices = new CategoryServicesImpl(); ((CategoryServicesImpl) categoryServices).validator = validator; ((CategoryServicesImpl) categoryServices).categoryRepository = categoryRepository; } @Test public void addCategoryWithNullName() { addCategoryWithInvalidName(null); } @Test public void addCategoryWithShortName() { addCategoryWithInvalidName("A"); } @Test public void addCategoryWithLongName() { addCategoryWithInvalidName("This is a long name that will cause an exception to be thrown"); } @Test(expected = CategoryExistentException.class) public void addCategoryWithExistentName() { when(categoryRepository.alreadyExists(java())).thenReturn(true); categoryServices.add(java()); } @Test public void addValidCategory() { //preparar when(categoryRepository.alreadyExists(java())).thenReturn(false); when(categoryRepository.add(java())).thenReturn(categoryWithId(java(), 1L)); //actuar final Category categoryAdded = categoryServices.add(java()); //verificar assertThat(categoryAdded.getId(), is(equalTo(1L))); } private void addCategoryWithInvalidName(final String name) { try { categoryServices.add(new Category(name)); fail("An error should have been thrown"); } catch (final FieldNotValidException e) { assertThat(e.getFieldName(), is(equalTo("name"))); } } }
[ "jose.diaz@joedayz.pe" ]
jose.diaz@joedayz.pe
5b7707c148730160c7561eb7950556571f4a07a7
0945d1677bf4d7bb3d23f20e1c6f25581a0c4ab3
/polymer-integration-tests/it-test-suites/src/test/java/com/truward/polymer/it/test/UserModelTest.java
3badb684383492521f5afe89fd95aec4a197b1f3
[ "Apache-2.0" ]
permissive
truward/polymer
8345a5ac59d302d441fc14c083d54143fe055935
ed1fc649bd02e004b34979c96370991eba7b267b
refs/heads/master
2020-12-24T14:27:01.018273
2014-05-21T03:40:02
2014-05-21T03:40:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,314
java
package com.truward.polymer.it.test; import com.truward.polymer.generated.model.UserImpl; import com.truward.polymer.it.model.User; import org.junit.Test; import static org.junit.Assert.*; public class UserModelTest { final Long id = 1L; final String name = "name"; final int age = 12; final User user = UserImpl.newBuilder() .setId(id) .setName(name) .setAge(age) .build(); @Test public void shouldMatchDefaultFields() { assertEquals(id, user.getId()); assertEquals(name, user.getName()); assertEquals(age, user.getAge()); //noinspection ObjectEqualsNull assertFalse(user.equals(null)); assertEquals(user, user); assertEquals(user, UserImpl.newBuilder(user).build()); // equals checks assertTrue(user.equals(UserImpl.newBuilder() .setId(id) .setName(name) .setAge(age) .build())); assertFalse(user.equals(UserImpl.newBuilder() .setId(id + 1) .setName(name) .setAge(age) .build())); assertFalse(user.equals(UserImpl.newBuilder() .setId(id) .setName(name + "a") .setAge(age) .build())); assertFalse(user.equals(UserImpl.newBuilder() .setId(id) .setName(name) .setAge(age + 1) .build())); } }
[ "avshabanov@gmail.com" ]
avshabanov@gmail.com
6c6f75ac166cf164bc24741986f47e8e394342f1
3b481b302b02edf57b816acac9e5ff3b7ec602e2
/src/retrofit/http/GET.java
be509f5919925ec99f7d998f762bfa33b052f6a5
[]
no_license
reverseengineeringer/com.twitter.android
53338ae009b2b6aa79551a8273875ec3728eda99
f834eee04284d773ccfcd05487021200de30bd1e
refs/heads/master
2021-04-15T04:35:06.232782
2016-07-21T03:51:19
2016-07-21T03:51:19
63,835,046
1
1
null
null
null
null
UTF-8
Java
false
false
506
java
package retrofit.http; import java.lang.annotation.Annotation; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Documented @Retention(RetentionPolicy.RUNTIME) @Target({java.lang.annotation.ElementType.METHOD}) @RestMethod("GET") public @interface GET { String value(); } /* Location: * Qualified Name: retrofit.http.GET * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
fdbb574904b1ec0ba91ba1e7c1e4dc2e824de5f2
62b8441631f0d262bf59e7e2451a88603915aadf
/.svn/pristine/fd/fdbb574904b1ec0ba91ba1e7c1e4dc2e824de5f2.svn-base
a1178a28ae44dd513fa94f7c1c249c572bddee8e
[]
no_license
WJtoy/mainHousehold-
496fc5af19657d938324d384f2d0b72d70e60c0e
4cff9537a5f78058a84d4b33f5f58595380597d8
refs/heads/master
2023-06-17T22:55:08.988873
2021-07-15T07:18:25
2021-07-15T07:18:25
385,202,403
0
0
null
null
null
null
UTF-8
Java
false
false
7,015
package com.wolfking.jeesite.modules.ws.web; import com.google.common.collect.Lists; import com.wolfking.jeesite.common.persistence.AjaxJsonEntity; import com.kkl.kklplus.utils.StringUtils; import com.wolfking.jeesite.modules.sys.entity.Notice; import com.wolfking.jeesite.modules.sys.entity.User; import com.wolfking.jeesite.modules.sys.service.NoticeService; import com.wolfking.jeesite.modules.sys.utils.UserUtils; import com.wolfking.jeesite.modules.ws.entity.WSRequest; import com.wolfking.jeesite.modules.ws.entity.WSResponse; import com.wolfking.jeesite.modules.ws.service.WebSocketService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.messaging.handler.annotation.MessageMapping; import org.springframework.messaging.simp.SimpMessagingTemplate; import org.springframework.messaging.simp.annotation.SendToUser; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.security.Principal; import java.util.Date; import java.util.List; /** * Created by Ryan Lu * */ @CrossOrigin @Controller @Slf4j @RequestMapping(value = "${adminPath}/ws/") public class WebSocketController { @Autowired private WebSocketService webSocketService; @Autowired private SimpMessagingTemplate messagingTemplate; // @Autowired // private NoticeService noticeService; /** * 未读WebSocket信息(sys_notice) */ @ResponseBody @RequestMapping(value = "mynotices",method = RequestMethod.POST) public AjaxJsonEntity myNoticeList(){ AjaxJsonEntity result = new AjaxJsonEntity(true); User user = UserUtils.getUser(); if(user==null){ result.setSuccess(false); result.setMessage("登录超时,请重新登录"); return result; } try { List<Notice> notices = null; //noticeService.getListByUserID(user.getId(),0); //mark on 2020-11-23 if(notices==null){ notices = Lists.newArrayList(); } result.setData(notices); }catch (Exception e){ result.setSuccess(false); result.setMessage("读取未读消息失败"); log.error("[WebSocketController.myNoticeList]",e); } return result; } /** * 已读 */ @ResponseBody @RequestMapping(value = "read") public AjaxJsonEntity read(String id){ AjaxJsonEntity result = new AjaxJsonEntity(true); if(StringUtils.isBlank(id)){ result.setSuccess(false); result.setMessage("参数错误"); return result; } User user = UserUtils.getUser(); if(user==null){ result.setSuccess(false); result.setMessage("登录超时,请重新登录"); return result; } Notice notice = new Notice(Long.valueOf(id)); notice.setUpdateBy(user); notice.setUpdateDate(new Date()); notice.setDelFlag(1); try { //noticeService.update(notice); //mark on 2020-11-23 }catch (Exception e){ result.setSuccess(false); result.setMessage("更新数据错误"); log.error("[WebSocketController.read]",e); } return result; } /* js:订阅:/topic/getResponse stompClient.subscribe('/user/queue/getResponse', function (response) { showResponse(JSON.parse(response.body).content); }) js:发送到:/ws/welcome stompClient.send("/ws/welcome", {}, JSON.stringify({'id':1,'name': 'ryan','userType':1})); */ @MessageMapping("/welcome") @SendToUser("/queue/getResponse") public WSResponse say(Principal principal,WSRequest message) { //System.out.println(message.getUserId()); log.info("userId:{}",message.getUserId()); WSResponse response = new WSResponse(); response.setSendDate("09-16 17:05"); response.setSender("ryan"); response.setReferId("903192905273970688"); response.setReferNo("O2017083100001"); response.setTitle("测试"); response.setContext("【问题反馈】工单号:K20170915000002回复问题反馈"); response.setNoticeType(Notice.NOTICE_TYPE_FEEDBACK); return response; } //群发:websocket发送:stompClient.send("/ws/notice", {}, "notice 2"); @MessageMapping("/notice") public void notice(Principal principal, WSRequest message) { // 参数说明 principal 当前登录的用户, message 客户端发送过来的内容 // principal.getName() 可获得当前用户的username WSResponse response = new WSResponse(); response.setSendDate("09-16 17:05"); response.setSender("系统管理员"); response.setReferId(""); response.setReferNo(""); response.setTitle("系统升级通知"); response.setContext("系统将于今晚11:00进行升级,于明晨0点启用。"); response.setNoticeType(Notice.NOTICE_TYPE_NOTICE); // 发送消息给订阅 "/topic/notice" 且在线的用户 messagingTemplate.convertAndSend("/topic/notice", response); } /** * 测试广播 */ @ResponseBody @RequestMapping(value = { "testnotice" }) public AjaxJsonEntity testNotice(HttpServletResponse response) { response.setContentType("application/json; charset=UTF-8"); AjaxJsonEntity result = new AjaxJsonEntity(true); try { WSResponse message = new WSResponse(); message.setSendDate("09-16 17:05"); message.setSender("系统管理员"); message.setReferId(""); message.setReferNo(""); message.setTitle("系统升级通知"); message.setContext("系统将于今晚11:00进行升级,于明晨0点启用。"); // 发送消息给订阅 "/topic/notice" 且在线的用户 messagingTemplate.convertAndSend("/topic/notice", message); } catch (Exception e) { result.setSuccess(false); result.setMessage(e.getMessage().toString()); } return result; } /** * 测试点对点 */ @ResponseBody @RequestMapping(value = { "testpoint" }) public AjaxJsonEntity testPoint(@RequestParam String toId, HttpServletResponse response) { response.setContentType("application/json; charset=UTF-8"); AjaxJsonEntity result = new AjaxJsonEntity(true); try { // 发送消息给订阅 "/user/queue/notifications" 且在线的用户 messagingTemplate.convertAndSendToUser(toId,"/queue/notifications", "send point to point"); } catch (Exception e) { result.setSuccess(false); result.setMessage(e.getMessage().toString()); } return result; } }
[ "1227679550@qq.com" ]
1227679550@qq.com
273ecfae21b8fe6b98c8eead01cdcb06b2afccf3
ad5cd983fa810454ccbb8d834882856d7bf6faca
/platform/ext/platformservices/testsrc/de/hybris/platform/classification/features/LocalizedFeatureWithFallbackIntegrationTest.java
3a76b0fdd1449fba6655e31572c755731c97f02d
[]
no_license
amaljanan/my-hybris
2ea57d1a4391c9a81c8f4fef7c8ab977b48992b8
ef9f254682970282cf8ad6d26d75c661f95500dd
refs/heads/master
2023-06-12T17:20:35.026159
2021-07-09T04:33:13
2021-07-09T04:33:13
384,177,175
0
0
null
null
null
null
UTF-8
Java
false
false
5,522
java
/* * Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. */ package de.hybris.platform.classification.features; import static org.assertj.core.api.Assertions.assertThat; import de.hybris.bootstrap.annotations.IntegrationTest; import de.hybris.platform.jalo.c2l.Language; import de.hybris.platform.servicelayer.ServicelayerTest; import de.hybris.platform.servicelayer.i18n.I18NService; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; import javax.annotation.Resource; import org.junit.After; import org.junit.Before; import org.junit.Test; import com.google.common.collect.Lists; @IntegrationTest public class LocalizedFeatureWithFallbackIntegrationTest extends ServicelayerTest { private static final String EN_AU = "en-AU"; private static final String DE_AT = "de-AT"; @Resource protected I18NService i18nService; private Map<Locale, List<FeatureValue>> values; private LocalizedFeature feature; private Language de; private Language en; private Locale initialLocale; private Boolean initialLocalizationFallbackEnabled; @Before public void setUp() { de = getOrCreateLanguage("de"); en = getOrCreateLanguage("en"); initialLocale = i18nService.getCurrentLocale(); initialLocalizationFallbackEnabled = i18nService.isLocalizationFallbackEnabled(); i18nService.setCurrentLocale(de.getLocale()); values = new HashMap<>(); values.put(de.getLocale(), Lists.newArrayList(new FeatureValue("de-value1", "de-desc1", null), // new FeatureValue("de-value2", "de-desc2", null))); values.put(en.getLocale(), Lists.newArrayList(new FeatureValue("en-value1", "en-desc1", null), // new FeatureValue("en-value2", "en-desc2", null))); feature = new LocalizedFeature("feature00", values, de.getLocale()); } @After public void tearDown() { i18nService.setCurrentLocale(initialLocale); i18nService.setLocalizationFallbackEnabled(initialLocalizationFallbackEnabled); } @Test public void testGetValuesFallbackFromDefaultLanguageFallbackEnabled() { // given final Language otherLanguage = getOrCreateLanguage(DE_AT); otherLanguage.setFallbackLanguages(Collections.singletonList(de)); i18nService.setLocalizationFallbackEnabled(true); // when final List<FeatureValue> result = feature.getValues(otherLanguage.getLocale()); // then assertThat(result).isNotNull(); assertThat(result).isNotEmpty(); assertThat(result).isEqualTo(values.get(de.getLocale())); } @Test public void testGetValueFallbackFromDefaultLanguageFallbackEnabled() { // given final Language otherLanguage = getOrCreateLanguage(DE_AT); otherLanguage.setFallbackLanguages(Collections.singletonList(de)); i18nService.setLocalizationFallbackEnabled(true); // when final FeatureValue result = feature.getValue(otherLanguage.getLocale()); // then assertThat(result).isNotNull(); assertThat(result).isEqualTo(values.get(de.getLocale()).get(0)); } @Test public void testGetValuesFallbackFromDefaultLanguageFallbackDisabled() { // given final Language otherLanguage = getOrCreateLanguage(DE_AT); otherLanguage.setFallbackLanguages(Collections.singletonList(de)); i18nService.setLocalizationFallbackEnabled(false); // when final List<FeatureValue> result = feature.getValues(otherLanguage.getLocale()); // then assertThat(result).isNotNull(); assertThat(result).isEmpty(); } @Test public void testGetValueFallbackFromDefaultLanguageFallbackDisabled() { // given final Language otherLanguage = getOrCreateLanguage(DE_AT); otherLanguage.setFallbackLanguages(Collections.singletonList(de)); i18nService.setLocalizationFallbackEnabled(false); // when final FeatureValue result = feature.getValue(otherLanguage.getLocale()); // then assertThat(result).isNull(); } @Test public void testGetValuesFallbackFromNoDefaultLanguageFallbackEnabled() { // given final Language otherLanguage = getOrCreateLanguage(EN_AU); otherLanguage.setFallbackLanguages(Collections.singletonList(en)); i18nService.setLocalizationFallbackEnabled(true); // when final List<FeatureValue> result = feature.getValues(otherLanguage.getLocale()); // then assertThat(result).isNotNull(); assertThat(result).isNotEmpty(); assertThat(result).isEqualTo(values.get(en.getLocale())); } @Test public void testGetValueFallbackFromNoDefaultLanguageFallbackEnabled() { // given final Language otherLanguage = getOrCreateLanguage(EN_AU); otherLanguage.setFallbackLanguages(Collections.singletonList(en)); i18nService.setLocalizationFallbackEnabled(true); // when final FeatureValue result = feature.getValue(otherLanguage.getLocale()); // then assertThat(result).isNotNull(); assertThat(result).isEqualTo(values.get(en.getLocale()).get(0)); } @Test public void testGetValuesWithoutFallback() { // given final Language otherLanguage = getOrCreateLanguage(DE_AT); i18nService.setLocalizationFallbackEnabled(true); // when final List<FeatureValue> result = feature.getValues(otherLanguage.getLocale()); // then assertThat(result).isNotNull(); assertThat(result).isEmpty(); } @Test public void testGetValueWithoutFallback() { // given final Language otherLanguage = getOrCreateLanguage(DE_AT); i18nService.setLocalizationFallbackEnabled(true); // when final FeatureValue result = feature.getValue(otherLanguage.getLocale()); // then assertThat(result).isNull(); } }
[ "amaljanan333@gmail.com" ]
amaljanan333@gmail.com
7837bbaa2324a52407a664dc3d5e5d7c1701efb9
c6d93152ab18b0e282960b8ff224a52c88efb747
/huntkey/code/biz-orm/src/main/java/com/huntkey/rx/sceo/orm/common/constant/ConstantRegex.java
4bcf547c14e33a9547c4af51569817191614a7d0
[]
no_license
BAT6188/company-database
adfe5d8b87b66cd51efd0355e131de164b69d3f9
40d0342345cadc51ca2555840e32339ca0c83f51
refs/heads/master
2023-05-23T22:18:22.702550
2018-12-25T00:58:15
2018-12-25T00:58:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,887
java
package com.huntkey.rx.sceo.orm.common.constant; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Created by linziy on 2017/12/1. */ public class ConstantRegex { public final static String AT_LEAST_ZERO_SPACE = "\\s{0,}"; public final static String AT_LEAST_ONE_SPACE = "\\s+";//一个或者多个空格 public final static String LEFT_PARENTHESIS = "\\("; public final static String RIGHT_PARENTHESIS = "\\)"; public final static String DOUBLE_COLON = "\""; //双引号 预查询 public final static String INVERTED_COMMA = "'"; //单引号 预查询 public final static String ORL_OPERATOR = "\\|";// public final static String NUMBERS = "[0-9]+"; //"xx" 形式的字符串 public final static String VAR_WITH_DOUBLE_COLON = DOUBLE_COLON + ".{0,}" + DOUBLE_COLON; //'xx' 形式的字符串 public final static String VAR_WITH_INVERTED_COMMA = INVERTED_COMMA + ".{0,}" + INVERTED_COMMA; //sql 常量 public final static String SQL_CONST_VAL = "(" + VAR_WITH_DOUBLE_COLON + "|" + VAR_WITH_INVERTED_COMMA + "|" + NUMBERS + ")"; //////////////////正则相关函数/////////////////////////////////////////////////// /** * 正则匹配且截取 * * @param regex //正则匹配 * @param src //字符串源 * @return */ public final static String getMatchedOneString(String regex, String src) { String result = null; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(src); if (m.find()) { result = m.group(); } return result; } /** * 获取多个匹配的结果 * * @param regex * @param src * @return */ public final static List<String> getMatchedMultipleString(String regex, String src) { List<String> list = new ArrayList<String>(); String result = null; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(src); while (m.find()) { result = m.group(); list.add(result); } return list; } /** * 正则查询字符串中是否包含某串数据 * * @param regex * @param src * @return */ public static boolean isContains(String src, String regex) { Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(src); return matcher.find();//部分匹配 } /** * @param src * @param regex * @return */ public static boolean isMatch(String src, String regex) { Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(src); return matcher.matches();//全部匹配 } }
[ "729235023@qq.com" ]
729235023@qq.com
07cf25d4c252f9bedb3d1e5970333bdd37cfe9cc
2daea090c54d11688b7e2f40fbeeda22fe3d01f6
/header/src/main/java/org/zstack/header/storage/primary/PrimaryStorageCapacityVO_.java
123d8025778d8dd05ffb00ffb654f46360cb8ebc
[ "Apache-2.0" ]
permissive
jxg01713/zstack
1f0e474daa6ca4647d0481c7e44d86a860ac209c
182fb094e9a6ef89cf010583d457a9bf4f033f33
refs/heads/1.0.x
2021-06-20T12:36:16.609798
2016-03-17T08:03:29
2016-03-17T08:03:29
197,339,567
0
0
Apache-2.0
2021-03-19T20:23:19
2019-07-17T07:36:39
Java
UTF-8
Java
false
false
755
java
package org.zstack.header.storage.primary; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.StaticMetamodel; import java.sql.Timestamp; /** */ @StaticMetamodel(PrimaryStorageCapacityVO.class) public class PrimaryStorageCapacityVO_ { public static volatile SingularAttribute<PrimaryStorageCapacityVO, String> uuid; public static volatile SingularAttribute<PrimaryStorageCapacityVO, Long> totalCapacity; public static volatile SingularAttribute<PrimaryStorageCapacityVO, Long> availableCapacity; public static volatile SingularAttribute<PrimaryStorageCapacityVO, Timestamp> createDate; public static volatile SingularAttribute<PrimaryStorageCapacityVO, Timestamp> lastOpDate; }
[ "xing5820@gmail.com" ]
xing5820@gmail.com
872008e7462029873801c5408d5e74cb49b657e0
fdb6411c48a1a9c8a67699f3c693cc693d9bebe7
/src/main/java/com/arunmurugan/demo/web/rest/vm/ManagedUserVM.java
33766fb22e7b98b2024555b11de55f528847af1e
[]
no_license
arunmuruganra/jhipsterSampleApplication
0759e618d7f98e9ccfa9451cb4741a3aa78ce9e5
145ea339d60c101d0a5d3a2464f1765e916c17e9
refs/heads/master
2021-07-05T04:17:39.049637
2017-09-26T04:22:56
2017-09-26T04:22:56
104,835,639
0
0
null
null
null
null
UTF-8
Java
false
false
1,373
java
package com.arunmurugan.demo.web.rest.vm; import com.arunmurugan.demo.service.dto.UserDTO; import javax.validation.constraints.Size; import java.time.Instant; import java.util.Set; /** * View Model extending the UserDTO, which is meant to be used in the user management UI. */ public class ManagedUserVM extends UserDTO { public static final int PASSWORD_MIN_LENGTH = 4; public static final int PASSWORD_MAX_LENGTH = 100; @Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH) private String password; public ManagedUserVM() { // Empty constructor needed for Jackson. } public ManagedUserVM(Long id, String login, String password, String firstName, String lastName, String email, boolean activated, String imageUrl, String langKey, String createdBy, Instant createdDate, String lastModifiedBy, Instant lastModifiedDate, Set<String> authorities) { super(id, login, firstName, lastName, email, activated, imageUrl, langKey, createdBy, createdDate, lastModifiedBy, lastModifiedDate, authorities); this.password = password; } public String getPassword() { return password; } @Override public String toString() { return "ManagedUserVM{" + "} " + super.toString(); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
9b862580418c2b1e2a7b4a91a40c62d181b2ef95
5bc9d8f92f38967cc9ecc03000c0606dbbb38f74
/sca4j/modules/tags/sca4j-modules-parent-pom-0.2.3/kernel/api/sca4j-spi/src/main/java/org/sca4j/spi/services/contribution/Export.java
94506b5df1e6208873ad5d9b61b22fdfeef4bdcd
[]
no_license
codehaus/service-conduit
795332fad474e12463db22c5e57ddd7cd6e2956e
4687d4cfc16f7a863ced69ce9ca81c6db3adb6d2
refs/heads/master
2023-07-20T00:35:11.240347
2011-08-24T22:13:28
2011-08-24T22:13:28
36,342,601
2
0
null
null
null
null
UTF-8
Java
false
false
2,895
java
/** * SCA4J * Copyright (c) 2009 - 2099 Service Symphony Ltd * * Licensed to you under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. A copy of the license * is included in this distrubtion or you may obtain a copy at * * http://www.opensource.org/licenses/apache2.0.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. * * This project contains code licensed from the Apache Software Foundation under * the Apache License, Version 2.0 and original code from project contributors. * * * Original Codehaus Header * * Copyright (c) 2007 - 2008 fabric3 project contributors * * Licensed to you under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. A copy of the license * is included in this distrubtion or you may obtain a copy at * * http://www.opensource.org/licenses/apache2.0.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. * * This project contains code licensed from the Apache Software Foundation under * the Apache License, Version 2.0 and original code from project contributors. * * Original Apache Header * * Copyright (c) 2005 - 2006 The Apache Software Foundation * * Apache Tuscany is an effort undergoing incubation at The Apache Software * Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is * required of all newly accepted projects until a further review indicates that * the infrastructure, communications, and decision making process have stabilized * in a manner consistent with other successful ASF projects. While incubation * status is not necessarily a reflection of the completeness or stability of the * code, it does indicate that the project has yet to be fully endorsed by the ASF. * * This product includes software developed by * The Apache Software Foundation (http://www.apache.org/). */ package org.sca4j.spi.services.contribution; import java.io.Serializable; import javax.xml.namespace.QName; /** * Represents an exported artifact in a contribution * * @version $Rev: 4825 $ $Date: 2008-06-13 23:21:32 +0100 (Fri, 13 Jun 2008) $ */ public interface Export extends Serializable { int NO_MATCH = -1; int EXACT_MATCH = 1; int match(Import contributionImport); QName getType(); }
[ "meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e" ]
meerajk@15bcc2b3-4398-4609-aa7c-97eea3cd106e
a096314aecb16c954ed42dafe9b8f6520b39d4ec
23d21d575da06d8a0f0c3a266915df321b5154eb
/java/soap/src/main/java/soap/sample/urlconnectionsoap/UrlConnectionSoap.java
7cf317b2e9015749e639ed84459822ab66dbd265
[]
no_license
keepinmindsh/sample
180431ce7fce20808e65d885eab1ca3dca4a76a9
4169918f432e9008b4715f59967f3c0bd619d3e6
refs/heads/master
2023-04-30T19:26:44.510319
2023-04-23T12:43:43
2023-04-23T12:43:43
248,352,910
4
0
null
2023-03-05T23:20:43
2020-03-18T22:03:16
Java
UTF-8
Java
false
false
1,725
java
package soap.sample.urlconnectionsoap; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.net.HttpURLConnection; import java.net.URL; public class UrlConnectionSoap { public static void main(String[] args) throws Exception { String xml = " <SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:myNamespace=\"https://www.w3schools.com/xml/\">\n" + " <SOAP-ENV:Header/>\n" + " <SOAP-ENV:Body>\n" + " <myNamespace:CelsiusToFahrenheit>\n" + " <myNamespace:Celsius>100</myNamespace:Celsius>\n" + " </myNamespace:CelsiusToFahrenheit>\n" + " </SOAP-ENV:Body>\n" + " </SOAP-ENV:Envelope>"; URL url = new URL("https://www.w3schools.com/xml/tempconvert.asmx"); HttpURLConnection conn = (HttpURLConnection)url.openConnection(); conn.setDoOutput(true); conn.setRequestMethod("POST"); // Header 영역에 쓰기 conn.addRequestProperty("Content-Type", "text/xml"); // BODY 영역에 쓰기 OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); wr.write(xml); wr.flush(); // 리턴된 결과 읽기 String inputLine = null; BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } in.close(); wr.close(); } }
[ "keepinmindsh@gmail.com" ]
keepinmindsh@gmail.com
dc3d8f86f48aab6838f7ab8ed5d0f64378c3aac5
fb758c2fce68269d025c79222dda9bfd34c1fae1
/src/main/java/ch/ethz/idsc/sophus/curve/BSpline6CurveSubdivision.java
278d1d32d0587bb066d5c4b685659da6b0eb2ed3
[]
no_license
btellstrom/owl
b69736e91d440309a55e45e08523a776c7e77e3d
cfa9e80bd837824a4cad1992085dfa86324af6f5
refs/heads/master
2020-05-23T07:07:51.582092
2019-05-13T16:48:12
2019-05-13T16:48:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
603
java
// code by jph package ch.ethz.idsc.sophus.curve; import ch.ethz.idsc.sophus.math.GeodesicInterface; import ch.ethz.idsc.tensor.RationalScalar; import ch.ethz.idsc.tensor.Scalar; /** cubic B-spline */ public enum BSpline6CurveSubdivision { ; private static final Scalar _5_6 = RationalScalar.of(5, 6); private static final Scalar _1_22 = RationalScalar.of(1, 22); private static final Scalar _11_32 = RationalScalar.of(11, 32); public static CurveSubdivision of(GeodesicInterface geodesicInterface) { return new Dual4PointCurveSubdivision(geodesicInterface, _5_6, _1_22, _11_32); } }
[ "jan.hakenberg@gmail.com" ]
jan.hakenberg@gmail.com
ed8d5758c3f66b34ee8cdc29c3ff47d4abdbdbc2
f2eea1841a6b742cd21db59970d2202176256878
/util/common/src/main/java/com/lin/util/entity/BaseListData.java
b5ee0d25aaa90a3c10cbb709fea3c64a98969c46
[]
no_license
xianhaiGitHub/rabc-system
ecf70fded2f6f98e7ba54df6dc2d530e78860190
eedbb31baf59360e6510635edfb1c96147821ed6
refs/heads/master
2022-04-10T21:19:27.418839
2020-03-01T14:05:05
2020-03-01T14:05:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,174
java
package com.lin.util.entity; import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.util.List; /** * BaseListData * @param <T> the type parameter * @author : fangkuaiIt / fangkuaiIt * @version : 1.0 */ @ApiModel("分页数据") abstract class BaseListData<T> implements Serializable { /** * serialVersionUID */ private static final long serialVersionUID = 6020322859354075134L; /** * 当前页码 */ @ApiModelProperty(name = "number", value = "当前页码") private int number; /** * 页码size */ @ApiModelProperty(name = "size", value = "页码size") private int size; /** * 总页数 */ @ApiModelProperty(name = "totalPages", value = "总页数") private int totalPages; /** * 总记录数 */ @ApiModelProperty(name = "totalElements", value = "总记录数") private long totalElements; /** * 是否有上一页 */ @ApiModelProperty(name = "hasPrevious", value = "是否有上一页") private boolean hasPrevious; /** * 是否有下一页 */ @ApiModelProperty(name = "hasNext", value = "是否有下一页") private boolean hasNext; /** * 是否第一页 */ @ApiModelProperty(name = "isFirst", value = "是否第一页") private boolean isFirst; /** * 是否最后一页 */ @ApiModelProperty(name = "isLast", value = "是否最后一页") private boolean isLast; /** * 原始data */ @ApiModelProperty(hidden = true) @JsonIgnore private List<T> originData; /** * 获取当前页码 * * @return the int * @author : fangkuaiIt / 2019-01-07 */ public abstract int getNumber(); /** * 获取当前页码大小 * * @return the int * @author : fangkuaiIt / 2019-01-07 */ public abstract int getSize(); /** * 获取总页数 * * @return the int * @author : fangkuaiIt / 2019-01-07 */ public abstract int getTotalPages(); /** * 获取总记录数 * * @return the long * @author : fangkuaiIt / 2019-01-07 */ public abstract long getTotalElements(); /** * 获取是否有上一页 * * @return the boolean * @author : fangkuaiIt / 2019-01-07 */ public abstract boolean getHasPrevious(); /** * 获取是否有下一页 * * @return the boolean * @author : fangkuaiIt / 2019-01-07 */ public abstract boolean getHasNext(); /** * 获取是否是第一页 * * @return the boolean * @author : fangkuaiIt / 2019-01-07 */ public abstract boolean getIsFirst(); /** * 获取是否是最后一页 * * @return the boolean * @author : fangkuaiIt / 2019-01-07 */ public abstract boolean getIsLast(); /** * 获取原始数据 * * @return the list * @author : fangkuaiIt / 2019-01-08 */ public abstract List<T> getOriginData(); }
[ "-" ]
-
1a6f8623c079e797871d5d39259dbd47a10a2f62
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/hazelcast/2015/8/ReplicatedMapAddEntryListenerToKeyMessageTask.java
b76598dd727d8a3d680556ccf123c33b84364253
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
2,510
java
/* * Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.hazelcast.client.impl.protocol.task.replicatedmap; import com.hazelcast.client.impl.protocol.ClientMessage; import com.hazelcast.client.impl.protocol.codec.ReplicatedMapAddEntryListenerToKeyCodec; import com.hazelcast.instance.Node; import com.hazelcast.nio.Connection; import com.hazelcast.nio.serialization.Data; import com.hazelcast.query.Predicate; public class ReplicatedMapAddEntryListenerToKeyMessageTask extends AbstractReplicatedMapAddEntryListenerMessageTask<ReplicatedMapAddEntryListenerToKeyCodec.RequestParameters> { public ReplicatedMapAddEntryListenerToKeyMessageTask(ClientMessage clientMessage, Node node, Connection connection) { super(clientMessage, node, connection); } @Override public Predicate getPredicate() { return null; } @Override public Data getKey() { return parameters.key; } @Override protected ClientMessage encodeEvent(Data key, Data newValue, Data oldValue, Data mergingValue, int type, String uuid, int numberOfAffectedEntries) { return ReplicatedMapAddEntryListenerToKeyCodec.encodeEntryEvent(key, newValue, oldValue, mergingValue, type, uuid, numberOfAffectedEntries); } @Override protected ReplicatedMapAddEntryListenerToKeyCodec.RequestParameters decodeClientMessage(ClientMessage clientMessage) { return ReplicatedMapAddEntryListenerToKeyCodec.decodeRequest(clientMessage); } @Override protected ClientMessage encodeResponse(Object response) { return ReplicatedMapAddEntryListenerToKeyCodec.encodeResponse((String) response); } @Override public String getDistributedObjectName() { return parameters.name; } @Override public Object[] getParameters() { return new Object[]{null, parameters.key}; } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
e36c73c44dba00f6f7dfcc53c298ffc20a8db5c9
0db6313a9fbdd4b4c92c04c46546759346beabce
/core/src/test/java/zemberek/core/collections/FixedBitVectorTest.java
3c3f27eadb8d09dd0c294828657f6c5263dfe7d2
[ "Apache-2.0" ]
permissive
COMU/zemberek-nlp
690537cd1cd1105a3e9ee99508aa1988622498c3
1533a96db5dbcd6b5a3236dc989a7a18578789cf
refs/heads/master
2020-03-30T10:18:53.474097
2018-10-01T11:48:47
2018-10-01T11:48:47
151,114,896
4
1
NOASSERTION
2018-10-01T15:50:43
2018-10-01T15:50:42
null
UTF-8
Java
false
false
3,549
java
package zemberek.core.collections; import com.google.common.base.Stopwatch; import java.util.Arrays; import java.util.Random; import java.util.concurrent.TimeUnit; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; public class FixedBitVectorTest { @Test public void setGetLastBitIndex() { String s = "101100100 01110110 11001010 11110000 11010100"; int len = s.replaceAll(" ", "").length(); FixedBitVector vector = FixedBitVector.fromBinaryString(s); Assert.assertEquals(len, vector.length); Assert.assertTrue(vector.get(0)); Assert.assertTrue(vector.get(2)); Assert.assertTrue(vector.get(3)); Assert.assertTrue(vector.get(len - 3)); Assert.assertTrue(vector.get(len - 5)); Assert.assertFalse(vector.get(1)); Assert.assertFalse(vector.get(4)); Assert.assertFalse(vector.get(5)); Assert.assertFalse(vector.get(len - 1)); Assert.assertFalse(vector.get(len - 2)); Assert.assertEquals(21, vector.numberOfOnes()); Assert.assertEquals(len - 21, vector.numberOfZeroes()); } @Test public void getSetClear() { for (int j = 1; j < 10_000_000; j = j * 2) { FixedBitVector vector = new FixedBitVector(j); for (int i = 0; i < vector.length; i++) { Assert.assertFalse(vector.get(i)); } for (int i = 0; i < vector.length; i++) { vector.set(i); } for (int i = 0; i < vector.length; i++) { Assert.assertTrue(vector.get(i)); } for (int i = 0; i < vector.length; i++) { vector.clear(i); } for (int i = 0; i < vector.length; i++) { Assert.assertFalse(vector.get(i)); } } } @Test public void safeGetSetClear() { for (int j = 1; j < 10_000_000; j = j * 2) { FixedBitVector vector = new FixedBitVector(j); for (int i = 0; i < vector.length; i++) { Assert.assertFalse(vector.safeGet(i)); } for (int i = 0; i < vector.length; i++) { vector.safeSet(i); } for (int i = 0; i < vector.length; i++) { Assert.assertTrue(vector.safeGet(i)); } for (int i = 0; i < vector.length; i++) { vector.safeClear(i); } for (int i = 0; i < vector.length; i++) { Assert.assertFalse(vector.safeGet(i)); } } } @Test(expected = IllegalArgumentException.class) public void safeGet() { FixedBitVector vector = new FixedBitVector(10); vector.safeGet(10); } @Test(expected = IllegalArgumentException.class) public void safeSet() { FixedBitVector vector = new FixedBitVector(10); vector.safeSet(10); } @Test(expected = IllegalArgumentException.class) public void safeClear() { FixedBitVector vector = new FixedBitVector(10); vector.safeClear(10); } @Test @Ignore("Not a test.") public void performanceTest() { int itCount = 5; Random rnd = new Random(0xbeefcafe); final int size = 20_000_000; int[] oneIndexes = new int[size]; int k = 0; for (int i = 0; i < oneIndexes.length; i++) { if (rnd.nextDouble() > 0.33) { oneIndexes[k] = i; k++; } } FixedBitVector vector = new FixedBitVector(size); Arrays.copyOf(oneIndexes, k); for (int i = 0; i < itCount; i++) { Stopwatch sw = Stopwatch.createStarted(); for (int oneIndex : oneIndexes) { vector.set(oneIndex); } for (int oneIndex : oneIndexes) { vector.clear(oneIndex); } System.out.println(sw.elapsed(TimeUnit.MILLISECONDS)); } } }
[ "ahmetaa@gmail.com" ]
ahmetaa@gmail.com
86a14edba725b6b780fbaff8f05798245b8a148d
573a66e4f4753cc0f145de8d60340b4dd6206607
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/97535/RxJava-1.2.0/src/main/java/rx/internal/operators/CompletableOnSubscribeMergeDelayErrorIterable.java
20477e64fd3d731b452506c34c70fe677533e8cc
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
mkaouer/Code-Smells-Detection-in-JavaScript
3919ec0d445637a7f7c5f570c724082d42248e1b
7130351703e19347884f95ce6d6ab1fb4f5cfbff
refs/heads/master
2023-03-09T18:04:26.971934
2022-03-23T22:04:28
2022-03-23T22:04:28
73,915,037
8
3
null
2023-02-28T23:00:07
2016-11-16T11:47:44
null
UTF-8
Java
false
false
4,691
java
/** * Copyright 2014 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package rx.internal.operators; import java.util.*; import java.util.concurrent.atomic.AtomicInteger; import rx.*; import rx.Completable.OnSubscribe; import rx.internal.util.unsafe.MpscLinkedQueue; import rx.subscriptions.CompositeSubscription; public final class CompletableOnSubscribeMergeDelayErrorIterable implements OnSubscribe { final Iterable<? extends Completable> sources; public CompletableOnSubscribeMergeDelayErrorIterable(Iterable<? extends Completable> sources) { this.sources = sources; } @Override public void call(final CompletableSubscriber s) { final CompositeSubscription set = new CompositeSubscription(); s.onSubscribe(set); Iterator<? extends Completable> iterator; try { iterator = sources.iterator(); } catch (Throwable e) { s.onError(e); return; } if (iterator == null) { s.onError(new NullPointerException("The source iterator returned is null")); return; } final AtomicInteger wip = new AtomicInteger(1); final Queue<Throwable> queue = new MpscLinkedQueue<Throwable>(); for (;;) { if (set.isUnsubscribed()) { return; } boolean b; try { b = iterator.hasNext(); } catch (Throwable e) { queue.offer(e); if (wip.decrementAndGet() == 0) { if (queue.isEmpty()) { s.onCompleted(); } else { s.onError(CompletableOnSubscribeMerge.collectErrors(queue)); } } return; } if (!b) { break; } if (set.isUnsubscribed()) { return; } Completable c; try { c = iterator.next(); } catch (Throwable e) { queue.offer(e); if (wip.decrementAndGet() == 0) { if (queue.isEmpty()) { s.onCompleted(); } else { s.onError(CompletableOnSubscribeMerge.collectErrors(queue)); } } return; } if (set.isUnsubscribed()) { return; } if (c == null) { NullPointerException e = new NullPointerException("A completable source is null"); queue.offer(e); if (wip.decrementAndGet() == 0) { if (queue.isEmpty()) { s.onCompleted(); } else { s.onError(CompletableOnSubscribeMerge.collectErrors(queue)); } } return; } wip.getAndIncrement(); c.unsafeSubscribe(new CompletableSubscriber() { @Override public void onSubscribe(Subscription d) { set.add(d); } @Override public void onError(Throwable e) { queue.offer(e); tryTerminate(); } @Override public void onCompleted() { tryTerminate(); } void tryTerminate() { if (wip.decrementAndGet() == 0) { if (queue.isEmpty()) { s.onCompleted(); } else { s.onError(CompletableOnSubscribeMerge.collectErrors(queue)); } } } }); } if (wip.decrementAndGet() == 0) { if (queue.isEmpty()) { s.onCompleted(); } else { s.onError(CompletableOnSubscribeMerge.collectErrors(queue)); } } } }
[ "mmkaouer@umich.edu" ]
mmkaouer@umich.edu
d02e27b72fe0f1ef06064fbb69fc331768052815
723d372f73b84e4df3f664a2a3a08cd694af9dab
/src/org/openrdf/query/parser/sparql/StringEscapesProcessor.java
88d01b34abc7aa6e534c1659c0700fc08c423e26
[]
no_license
Thanx7/bookstore
f0a901d9abc1d203111e0cc866064d4fedd95ba8
53d5b591fceb8b1a28d1426bf1a24da99d81defb
refs/heads/master
2020-06-02T20:48:48.529800
2014-08-26T14:02:39
2014-08-26T14:02:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,790
java
/* * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2007. * * Licensed under the Aduna BSD-style license. */ package org.openrdf.query.parser.sparql; import org.openrdf.query.MalformedQueryException; import org.openrdf.query.parser.sparql.ast.ASTOperationContainer; import org.openrdf.query.parser.sparql.ast.ASTString; import org.openrdf.query.parser.sparql.ast.VisitorException; /** * Processes escape sequences in strings, replacing the escape sequence with * their actual value. Escape sequences for SPARQL are documented in section <a * href="http://www.w3.org/TR/rdf-sparql-query/#grammarEscapes">A.7 Escape * sequences in strings</a>. * * @author Arjohn Kampman */ public class StringEscapesProcessor { /** * Processes escape sequences in ASTString objects. * * @param qc * The query that needs to be processed. * @throws MalformedQueryException * If an invalid escape sequence was found. */ public static void process(ASTOperationContainer qc) throws MalformedQueryException { StringProcessor visitor = new StringProcessor(); try { qc.jjtAccept(visitor, null); } catch (VisitorException e) { throw new MalformedQueryException(e); } } private static class StringProcessor extends ASTVisitorBase { public StringProcessor() { } @Override public Object visit(ASTString stringNode, Object data) throws VisitorException { String value = stringNode.getValue(); try { value = SPARQLUtil.decodeString(value); stringNode.setValue(value); } catch (IllegalArgumentException e) { // Invalid escape sequence throw new VisitorException(e.getMessage()); } return super.visit(stringNode, data); } } }
[ "Aliaksandr_Doubeikovsky@epam.com" ]
Aliaksandr_Doubeikovsky@epam.com
c48408ff7eb3a92dcce7e9eeecd0ef6f254dd7e0
15274f5065c785297baba29934a1bc6052f64e29
/hw-gae-client_fro/src/main/java/hu/hw/cloud/client/fro/reservation/extra/ExtraResView.java
d17fcebf382a21fa7703c6e0c318ecf6c195f8b3
[ "Apache-2.0" ]
permissive
LetsCloud/hw-gae
e5196cc9f1c7744c341e6d34fda2bfc0100d82de
e4a55f8fe152ad588156942ddc28e852faf8ebcd
refs/heads/master
2018-11-04T03:43:23.338526
2018-10-06T20:36:14
2018-10-06T20:36:14
115,553,009
0
1
Apache-2.0
2018-10-06T20:36:15
2017-12-27T19:55:26
Java
UTF-8
Java
false
false
767
java
/** * */ package hu.hw.cloud.client.fro.reservation.extra; import java.util.logging.Level; import java.util.logging.Logger; import javax.inject.Inject; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.user.client.ui.Widget; import com.gwtplatform.mvp.client.ViewWithUiHandlers; /** * @author robi * */ public class ExtraResView extends ViewWithUiHandlers<ExtraResUiHandlers> implements ExtraResPresenter.MyView { private static Logger logger = Logger.getLogger(ExtraResView.class.getName()); interface Binder extends UiBinder<Widget, ExtraResView> { } /** */ @Inject ExtraResView(Binder binder) { logger.log(Level.INFO, "ExtraResView()"); initWidget(binder.createAndBindUi(this)); } @Override public void open() { } }
[ "csernikr@gmail.com" ]
csernikr@gmail.com
e26ec9af5de073a44e29fc786e8d7f286822e32d
97fd02f71b45aa235f917e79dd68b61c62b56c1c
/src/main/java/com/tencentcloudapi/cpdp/v20190820/models/QueryContractPayFeeResponse.java
61892439e98bd137ea1ef1dce7506b317727084e
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java
7df922f7c5826732e35edeab3320035e0cdfba05
09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec
refs/heads/master
2023-09-04T10:51:57.854153
2023-09-01T03:21:09
2023-09-01T03:21:09
129,837,505
537
317
Apache-2.0
2023-09-13T02:42:03
2018-04-17T02:58:16
Java
UTF-8
Java
false
false
5,513
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.cpdp.v20190820.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class QueryContractPayFeeResponse extends AbstractModel{ /** * 业务系统返回消息 注意:此字段可能返回 null,表示取不到有效值。 */ @SerializedName("ErrMessage") @Expose private String ErrMessage; /** * 业务系统返回码,0表示成功,其他表示失败。 */ @SerializedName("ErrCode") @Expose private String ErrCode; /** * 查询支付方式费率及自定义表单项响应对象 注意:此字段可能返回 null,表示取不到有效值。 */ @SerializedName("Result") @Expose private QueryContractPayFeeResult Result; /** * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ @SerializedName("RequestId") @Expose private String RequestId; /** * Get 业务系统返回消息 注意:此字段可能返回 null,表示取不到有效值。 * @return ErrMessage 业务系统返回消息 注意:此字段可能返回 null,表示取不到有效值。 */ public String getErrMessage() { return this.ErrMessage; } /** * Set 业务系统返回消息 注意:此字段可能返回 null,表示取不到有效值。 * @param ErrMessage 业务系统返回消息 注意:此字段可能返回 null,表示取不到有效值。 */ public void setErrMessage(String ErrMessage) { this.ErrMessage = ErrMessage; } /** * Get 业务系统返回码,0表示成功,其他表示失败。 * @return ErrCode 业务系统返回码,0表示成功,其他表示失败。 */ public String getErrCode() { return this.ErrCode; } /** * Set 业务系统返回码,0表示成功,其他表示失败。 * @param ErrCode 业务系统返回码,0表示成功,其他表示失败。 */ public void setErrCode(String ErrCode) { this.ErrCode = ErrCode; } /** * Get 查询支付方式费率及自定义表单项响应对象 注意:此字段可能返回 null,表示取不到有效值。 * @return Result 查询支付方式费率及自定义表单项响应对象 注意:此字段可能返回 null,表示取不到有效值。 */ public QueryContractPayFeeResult getResult() { return this.Result; } /** * Set 查询支付方式费率及自定义表单项响应对象 注意:此字段可能返回 null,表示取不到有效值。 * @param Result 查询支付方式费率及自定义表单项响应对象 注意:此字段可能返回 null,表示取不到有效值。 */ public void setResult(QueryContractPayFeeResult Result) { this.Result = Result; } /** * Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public String getRequestId() { return this.RequestId; } /** * Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 * @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 */ public void setRequestId(String RequestId) { this.RequestId = RequestId; } public QueryContractPayFeeResponse() { } /** * 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 QueryContractPayFeeResponse(QueryContractPayFeeResponse source) { if (source.ErrMessage != null) { this.ErrMessage = new String(source.ErrMessage); } if (source.ErrCode != null) { this.ErrCode = new String(source.ErrCode); } if (source.Result != null) { this.Result = new QueryContractPayFeeResult(source.Result); } 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 + "ErrMessage", this.ErrMessage); this.setParamSimple(map, prefix + "ErrCode", this.ErrCode); this.setParamObj(map, prefix + "Result.", this.Result); this.setParamSimple(map, prefix + "RequestId", this.RequestId); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com
7cbbe215bb6c5cb2995545102f7f85b657493933
d1de14b2e35cae38a9e3c83921438ee7fbb77f64
/common-dps/src/main/java/com/miget/hxb/provider/ApplicationContextProvider.java
404c58a098febc5ecb3c8d98806889854f9203c3
[ "MIT" ]
permissive
wuhanligong110/migetMarket
55b3c7ea51e41bee796347dfefb05374013090c3
9e67f2c873662e3229a706b44721608688569ce0
refs/heads/master
2020-03-22T07:33:02.338595
2018-09-09T13:54:50
2018-09-09T13:54:50
139,707,297
0
0
null
null
null
null
UTF-8
Java
false
false
833
java
package com.miget.hxb.provider; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.stereotype.Component; @Component public class ApplicationContextProvider implements ApplicationContextAware { private static ApplicationContext context; public static ApplicationContext getApplicationContext() { return context; } @Override public void setApplicationContext(ApplicationContext ac) throws BeansException { context = ac; } public static <T> T getBean(Class<T> tClass) { return context.getBean(tClass); } public static <T> T getBean(String name, Class<T> tClass) { return context.getBean(name, tClass); } }
[ "694208570@qq.com" ]
694208570@qq.com
38c2759ad89b3dfd311e92b5c053c3df7715b83c
0687bfb68c2b6ebd6951ea1ab2a9154e88193b24
/backend/rmncha-dashboard-service/src/main/java/org/sdrc/rmnchadashboard/jpadomain/SynchronizationDateMaster.java
64415ec177b8aa74f01347992e5adf6793eb03fe
[]
no_license
SDRC-India/ADARSSH
c689ae9c93cbbc1d44ae875f80182caae29ca42b
e5563449292bfc9e02744d9a70f2db5546d89fd9
refs/heads/main
2023-03-30T02:26:51.648770
2021-04-01T07:42:06
2021-04-01T07:42:06
353,615,854
0
0
null
null
null
null
UTF-8
Java
false
false
3,085
java
package org.sdrc.rmnchadashboard.jpadomain; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Temporal; import javax.persistence.TemporalType; import com.fasterxml.jackson.annotation.JsonFormat; @Entity public class SynchronizationDateMaster { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Integer synchronizationDateMasterId; private String tableName; @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss.SSS") @Temporal(TemporalType.TIMESTAMP) private Date lastModifiedDate; @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss.SSS") private Date lastSynchronized; public Integer getSynchronizationDateMasterId() { return synchronizationDateMasterId; } public void setSynchronizationDateMasterId(Integer synchronizationDateMasterId) { this.synchronizationDateMasterId = synchronizationDateMasterId; } public String getTableName() { return tableName; } public void setTableName(String tableName) { this.tableName = tableName; } public Date getLastSynchronized() { return lastSynchronized; } public void setLastSynchronized(Date lastSynchronized) { this.lastSynchronized = lastSynchronized; } public Date getLastModifiedDate() { return lastModifiedDate; } public void setLastModifiedDate(Date lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((lastModifiedDate == null) ? 0 : lastModifiedDate.hashCode()); result = prime * result + ((lastSynchronized == null) ? 0 : lastSynchronized.hashCode()); result = prime * result + ((synchronizationDateMasterId == null) ? 0 : synchronizationDateMasterId.hashCode()); result = prime * result + ((tableName == null) ? 0 : tableName.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SynchronizationDateMaster other = (SynchronizationDateMaster) obj; if (lastModifiedDate == null) { if (other.lastModifiedDate != null) return false; } else if (!lastModifiedDate.equals(other.lastModifiedDate)) return false; if (lastSynchronized == null) { if (other.lastSynchronized != null) return false; } else if (!lastSynchronized.equals(other.lastSynchronized)) return false; if (synchronizationDateMasterId == null) { if (other.synchronizationDateMasterId != null) return false; } else if (!synchronizationDateMasterId.equals(other.synchronizationDateMasterId)) return false; if (tableName == null) { if (other.tableName != null) return false; } else if (!tableName.equals(other.tableName)) return false; return true; } }
[ "ratikanta131@gmail.com" ]
ratikanta131@gmail.com
c5e7d3274a6f2bbd5f63d642b961c1f7b7392ca8
4d6f449339b36b8d4c25d8772212bf6cd339f087
/netreflected/src/Framework/System.ServiceModel.Activities,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35/system/servicemodel/activities/tracking/configuration/CancelRequestedQueryElementCollection.java
35c6b4dd99da8479cc01f69e4dae59c416485467
[ "MIT" ]
permissive
lvyitian/JCOReflector
299a64550394db3e663567efc6e1996754f6946e
7e420dca504090b817c2fe208e4649804df1c3e1
refs/heads/master
2022-12-07T21:13:06.208025
2020-08-28T09:49:29
2020-08-28T09:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,951
java
/* * MIT License * * Copyright (c) 2020 MASES s.r.l. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /************************************************************************************** * <auto-generated> * This code was generated from a template using JCOReflector * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. * </auto-generated> *************************************************************************************/ package system.servicemodel.activities.tracking.configuration; import org.mases.jcobridge.*; import org.mases.jcobridge.netreflection.*; import java.util.ArrayList; // Import section /** * The base .NET class managing System.ServiceModel.Activities.Tracking.Configuration.CancelRequestedQueryElementCollection, System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Extends {@link NetObject}. * <p> * * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.ServiceModel.Activities.Tracking.Configuration.CancelRequestedQueryElementCollection" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.ServiceModel.Activities.Tracking.Configuration.CancelRequestedQueryElementCollection</a> */ public class CancelRequestedQueryElementCollection extends NetObject { /** * Fully assembly qualified name: System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 */ public static final String assemblyFullName = "System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"; /** * Assembly name: System.ServiceModel.Activities */ public static final String assemblyShortName = "System.ServiceModel.Activities"; /** * Qualified class name: System.ServiceModel.Activities.Tracking.Configuration.CancelRequestedQueryElementCollection */ public static final String className = "System.ServiceModel.Activities.Tracking.Configuration.CancelRequestedQueryElementCollection"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } public CancelRequestedQueryElementCollection(Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link CancelRequestedQueryElementCollection}, a cast assert is made to check if types are compatible. */ public static CancelRequestedQueryElementCollection cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new CancelRequestedQueryElementCollection(from.getJCOInstance()); } // Constructors section public CancelRequestedQueryElementCollection() throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.ArgumentNullException, system.collections.generic.KeyNotFoundException { try { // add reference to assemblyName.dll file addReference(JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Methods section // Properties section // Instance Events section }
[ "mario.mastrodicasa@masesgroup.com" ]
mario.mastrodicasa@masesgroup.com
e7a592e03a910ec589478b7df246d0c7ce07bf2d
894ccbb1adeadc97ca6798461cf7adf328e56945
/src/test/java/ko/maeng/example/object/chap1/AudienceTest.java
026b595b9238d57b7580bc4dff6719c0ee4a0b6e
[]
no_license
Rebwon/object-study
56ff25cbca5f95f9503c9eee070a4dd75c0afc0d
8e62b6cd095c20696a1bc6ddf488349dba1cd513
refs/heads/master
2021-02-09T03:54:33.830158
2020-08-05T07:31:52
2020-08-05T07:31:52
244,237,086
0
0
null
2020-08-05T07:31:53
2020-03-01T22:57:26
Java
UTF-8
Java
false
false
1,914
java
package ko.maeng.example.object.chap1; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; @DisplayName("Audience 클래스") class AudienceTest { final Long givenTicketFee = 100L; final Ticket givenTicket = new Ticket(givenTicketFee); @Nested @DisplayName("buy 메소드는") class Describe_buy_method { @Nested @DisplayName("초대장이 있는 경우") class Context_with_invitation { final Invitation given_초대장 = new Invitation(); final Bag givenBag = new Bag(given_초대장, 100000L); Audience given_초대장_있는_관람객() { return new Audience(givenBag); } @Test @DisplayName("관람객의 가방에 티켓을 추가하고, 0을 리턴한다") void it_returns_0() { final Audience 관람객 = given_초대장_있는_관람객(); final Long paid = 관람객.buy(givenTicket); assertTrue(givenBag.hasTicket(), "(사이드 이펙트) 관람객의 가방에는 티켓이 들어있다"); assertEquals(paid, Long.valueOf(0L), "관람객은 티켓 비용으로 0 원을 지불했다"); } } @Nested @DisplayName("초대장이 없는 경우") class Context_with_no_invitation { final Bag givenBag() { return new Bag(100000L); } Audience given_초대장_없는_관람객(Bag givenBag) { return new Audience(givenBag); } @Test @DisplayName("관람객의 가방에 티켓을 추가하고, 지불한 값을 리턴한다") void it_puts_a_ticket_into_bag() { final Bag 가방 = givenBag(); final Long paid = given_초대장_없는_관람객(가방).buy(givenTicket); assertTrue(가방.hasTicket(), "(사이드 이펙트) 관람객의 가방에는 티켓이 들어있다"); assertEquals(paid, givenTicketFee, "관람객이 지불한 돈은 티켓 값만큼이다"); } } } }
[ "msolo021015@naver.com" ]
msolo021015@naver.com
7987c821c72b4f7959f0ea8b8d0d14b3e03054f3
2937e29ae02d953807d924d27fd832a11c7ac6ee
/java-basic/src/main/java/ch29/d/Car.java
dcea2c57322cd187d71bc98f7d8a16dbb82533d6
[]
no_license
jeonjinwook/bitcamp-java-2018-12
ebbcc5732bd42fa3547b74d6591e415aac4c63de
d6bd2e2721bb18ce7be7bdc24f30cdd6f0073dfc
refs/heads/master
2021-08-06T18:46:42.587398
2019-10-23T14:00:25
2019-10-23T14:00:25
163,650,666
0
0
null
2020-04-30T12:44:13
2018-12-31T08:00:39
Java
UTF-8
Java
false
false
1,677
java
package ch29.d; import java.util.Date; public class Car { private String maker; private String model; private int cc; private int valve; private boolean auto; private Date createdDate; private BlackBox blackBox; public Car() { System.out.println("Car()"); } @Override public String toString() { return "Car [maker=" + maker + ", model=" + model + ", cc=" + cc + ", valve=" + valve + ", auto=" + auto + ", createdDate=" + createdDate + ", blackBox=" + blackBox + "]"; } public String getMaker() { return maker; } public void setMaker(String maker) { System.out.println("Car.setMaker()"); this.maker = maker; } public String getModel() { return model; } public void setModel(String model) { System.out.println("Car.setModel()"); this.model = model; } public int getCc() { return cc; } public void setCc(int cc) { System.out.println("Car.setCc()"); this.cc = cc; } public int getValve() { return valve; } public void setValve(int valve) { System.out.println("Car.setValve()"); this.valve = valve; } public boolean isAuto() { return auto; } public void setAuto(boolean auto) { System.out.println("Car.setAuto()"); this.auto = auto; } public Date getCreatedDate() { return createdDate; } public void setCreatedDate(Date createdDate) { System.out.println("Car.setCreatedDate()"); this.createdDate = createdDate; } public BlackBox getBlackBox() { return blackBox; } public void setBlackBox(BlackBox blackBox) { System.out.println("Car.setBlackBox()"); this.blackBox = blackBox; } }
[ "sambosoft@naver.com" ]
sambosoft@naver.com
15414eaea32d471a3c8206c6c98e02d2f01683d7
aadce671c213fbd6f75637d8fd8fa6efef7c56ae
/everything-collection/src/main/java/com/daltao/collection/TransactionalRandomAccessListIterator.java
bd04405b30ad9c4ea492e1095e97662a2b13ff74
[]
no_license
taodaling/everything
424d891af2567a07c5c8fcce32c77e2f73139776
0c6fc7456dac8eb6b1a09e1ee5674030b0e3c8c2
refs/heads/master
2022-06-22T01:24:25.819000
2020-06-18T10:32:18
2020-06-18T10:32:18
156,957,505
0
0
null
2022-06-10T19:57:14
2018-11-10T07:15:45
Java
UTF-8
Java
false
false
1,206
java
package com.daltao.collection; import com.daltao.common.Transactional; import java.util.ArrayDeque; import java.util.Deque; import java.util.Iterator; import java.util.List; public class TransactionalRandomAccessListIterator<E> implements Iterator<E>, Transactional { private List<E> list; private int offset; private int size; private Deque<Integer> savePoints = new ArrayDeque<>(); public TransactionalRandomAccessListIterator(List<E> list) { this.list = list; size = list.size(); } public int currentOffset() { return offset; } @Override public boolean hasNext() { return offset < size; } @Override public E next() { return list.get(offset++); } @Override public Object savePoint() { savePoints.addLast(offset); return savePoints.peekLast(); } @Override public void rollback(Object savePoint) { while (savePoints.removeLast() != savePoint) ; offset = (int) savePoint; } @Override public void commit(Object savePoint) { while (savePoints.removeLast() != savePoint) ; } }
[ "taodaling@gmail.com" ]
taodaling@gmail.com
3c7262fcf5654401e9e6736f12e17ed1a4cae41c
cf74c3878b4046815c05452751b5406e4800a325
/src/main/java/com/cxb/security/repository/RoleRepository.java
5bde25e40eae881af9c3af64a31b85d6f4014ec4
[]
no_license
ChenXbFrank/springboot-security-simple
5389f620356dc46535c43efa9d99d5d1d82970f3
4428e9ce6bea00eea0ac4ca1f397f70a51ef9476
refs/heads/master
2022-10-04T14:39:44.750194
2020-06-06T05:44:07
2020-06-06T05:44:07
269,880,526
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
package com.cxb.security.repository; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.cxb.security.entity.Role; import org.apache.ibatis.annotations.Mapper; @Mapper public interface RoleRepository extends BaseMapper<Role> { }
[ "810464826@qq.com" ]
810464826@qq.com
c106d6a8457b6417b427a2bec145ce2da43525fa
40665051fadf3fb75e5a8f655362126c1a2a3af6
/chaokunyang-jkes/6d40cc8028acfaf7870b86cf7c5ea4c3e95d2e6e/82/StringUtils.java
dd0083f3736a3fc78001df0fc8e71b71fbd92b6e
[]
no_license
fermadeiral/StyleErrors
6f44379207e8490ba618365c54bdfef554fc4fde
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
refs/heads/master
2020-07-15T12:55:10.564494
2019-10-24T02:30:45
2019-10-24T02:30:45
205,546,543
2
0
null
null
null
null
UTF-8
Java
false
false
5,057
java
package com.timeyang.jkes.core.util; import java.util.Locale; /** * @author chaokunyang */ public class StringUtils { public static boolean isEmpty(Object str) { return (str == null || "".equals(str)); } public static boolean hasText(CharSequence str) { if (!hasLength(str)) { return false; } int strLen = str.length(); for (int i = 0; i < strLen; i++) { if (!Character.isWhitespace(str.charAt(i))) { return true; } } return false; } public static boolean hasLength(String str) { return hasLength((CharSequence) str); } public static boolean hasLength(CharSequence str) { return (str != null && str.length() > 0); } /** * Trim leading and trailing whitespace from the given {@code String}. * @param str the {@code String} to check * @return the trimmed {@code String} * @see java.lang.Character#isWhitespace */ public static String trimWhitespace(String str) { if (!hasLength(str)) { return str; } StringBuilder sb = new StringBuilder(str); while (sb.length() > 0 && Character.isWhitespace(sb.charAt(0))) { sb.deleteCharAt(0); } while (sb.length() > 0 && Character.isWhitespace(sb.charAt(sb.length() - 1))) { sb.deleteCharAt(sb.length() - 1); } return sb.toString(); } /** * Trim <i>all</i> whitespace from the given {@code String}: * leading, trailing, and in between characters. * @param str the {@code String} to check * @return the trimmed {@code String} * @see java.lang.Character#isWhitespace */ public static String trimAllWhitespace(String str) { if (!hasLength(str)) { return str; } int len = str.length(); StringBuilder sb = new StringBuilder(str.length()); for (int i = 0; i < len; i++) { char c = str.charAt(i); if (!Character.isWhitespace(c)) { sb.append(c); } } return sb.toString(); } public static String addUnderscores(String name) { StringBuilder buf = new StringBuilder( name.replace('.', '_') ); for (int i=1; i<buf.length()-1; i++) { if ( Character.isLowerCase( buf.charAt(i-1) ) && Character.isUpperCase( buf.charAt(i) ) && Character.isLowerCase( buf.charAt(i+1) ) ) { buf.insert(i++, '_'); } } return buf.toString().toLowerCase(Locale.ROOT); } /** * Check whether the given {@code CharSequence} contains any whitespace characters. * @param str the {@code CharSequence} to check (may be {@code null}) * @return {@code true} if the {@code CharSequence} is not empty and * contains at least 1 whitespace character * @see Character#isWhitespace */ public static boolean containsWhitespace(CharSequence str) { if (!hasLength(str)) { return false; } int strLen = str.length(); for (int i = 0; i < strLen; i++) { if (Character.isWhitespace(str.charAt(i))) { return true; } } return false; } /** * Check whether the given {@code String} contains any whitespace characters. * @param str the {@code String} to check (may be {@code null}) * @return {@code true} if the {@code String} is not empty and * contains at least 1 whitespace character * @see #containsWhitespace(CharSequence) */ public static boolean containsWhitespace(String str) { return containsWhitespace((CharSequence) str); } /** * <p>Checks if the CharSequence contains any uppercase characters.</p> * * <p>{@code null} will return {@code false}. * An empty CharSequence (length()=0) will return {@code false}.</p> * * <pre> * StringUtils.containsUpperCase(null) = false * StringUtils.containsUpperCase("") = false * StringUtils.containsUpperCase(" ") = false * StringUtils.containsUpperCase("Abc") = true * StringUtils.containsUpperCase("aB_C") = true * </pre> * * @param cs the CharSequence to check, may be null * @return {@code true} if contains any uppercase characters, and is non-null */ public static boolean containsUpperCase(final CharSequence cs) { if (cs == null || isEmpty(cs)) { return false; } final int sz = cs.length(); for (int i = 0; i < sz; i++) { if (Character.isUpperCase(cs.charAt(i))) { return true; } } return false; } public static boolean startsWithAny(final CharSequence sequence, final CharSequence... searchStrings) { return org.apache.commons.lang3.StringUtils.startsWithAny(sequence); } }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
f82a60ae2c9b9924587034f9936eb939b05f9aee
95ca27ea805662fcad85c723dd7b5915f1718d92
/com.ibm.is.sappack.cw.app.services/src/com/ibm/is/sappack/cw/app/services/bdr/MpxBusinessProcess.java
1cae2fb51887bdbc68f34c21f3114bd319318db2
[]
no_license
poonam0409/IbmProject
2d0fb942cc147318f9c981b1accd94a06d7c5303
c0eb65de9fdcd3e5b805126e0c4ea7494a794e04
refs/heads/master
2021-07-09T07:13:07.250973
2017-10-04T11:48:00
2017-10-04T11:48:00
105,760,242
1
0
null
null
null
null
UTF-8
Java
false
false
1,392
java
package com.ibm.is.sappack.cw.app.services.bdr; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.ibm.is.sappack.cw.app.data.bdr.jpa.Process; import com.ibm.is.sappack.cw.app.services.Constants; import com.ibm.is.sappack.cw.app.services.ImportProcessProvider; public class MpxBusinessProcess { private ArrayList<MpxRecord> recordList; private Process process; public MpxBusinessProcess(String name, Date creationDate, Process parent, ImportProcessProvider importProcessProvider) { this.process = importProcessProvider.provideProcess(parent, name, Constants.EMPTY_STRING, creationDate); } public void setRecordList(ArrayList<MpxRecord> recordList) { this.recordList = recordList; } public ArrayList<MpxRecord> getRecordList() { if(recordList == null) { recordList = new ArrayList<MpxRecord>(); } return recordList; } public Process getProcess() { return process; } public void setProcess(Process process) { this.process = process; } public void setParent(Process parent) { if(parent != null) { this.process.setParentProcess(parent); List<Process> childProcesses = (List<Process>)parent.getChildProcesses(); if(childProcesses == null || childProcesses.isEmpty()) { childProcesses = new ArrayList<Process>(); parent.setChildProcesses(childProcesses); } childProcesses.add(process); } } }
[ "poonamnitp@gmail.com" ]
poonamnitp@gmail.com
a031c68b5d5fe49cf38c530406720821a1f3f973
5d841df449fb4d345271968456a33879f41231d1
/MySQL-JDBC-Driver/src/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnection.java
c89c6e323cb43ccd9cb44a7b045275ab606fa94a
[ "Apache-2.0" ]
permissive
guoguo007/Open-Source-Research
e362bae03d660a9d57dcddcb50a68d9cbc12dc52
5f29309ece613c8a5f6feed577275caa6e941823
refs/heads/master
2021-01-18T02:35:03.793710
2014-01-01T02:45:08
2014-01-01T02:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,982
java
/* Copyright 2002-2007 MySQL AB, 2008 Sun Microsystems All rights reserved. Use is subject to license terms. The MySQL Connector/J is licensed under the terms of the GPL, like most MySQL Connectors. There are special exceptions to the terms and conditions of the GPL as it is applied to this software, see the FLOSS License Exception available on mysql.com. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ package com.mysql.jdbc.jdbc2.optional; import java.lang.reflect.Constructor; import java.sql.Connection; import java.sql.SQLException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import javax.sql.ConnectionEvent; import javax.sql.ConnectionEventListener; import javax.sql.PooledConnection; import com.mysql.jdbc.ConnectionImpl; import com.mysql.jdbc.ExceptionInterceptor; import com.mysql.jdbc.SQLError; import com.mysql.jdbc.Util; /** * This class is used to wrap and return a physical connection within a logical * handle. It also registers and notifies ConnectionEventListeners of any * ConnectionEvents * * @see javax.sql.PooledConnection * @see org.gjt.mm.mysql.jdbc2.optional.LogicalHandle * @author Todd Wolff <todd.wolff_at_prodigy.net> */ public class MysqlPooledConnection implements PooledConnection { private static final Constructor JDBC_4_POOLED_CONNECTION_WRAPPER_CTOR; static { if (Util.isJdbc4()) { try { JDBC_4_POOLED_CONNECTION_WRAPPER_CTOR = Class.forName( "com.mysql.jdbc.jdbc2.optional.JDBC4MysqlPooledConnection") .getConstructor( new Class[] { com.mysql.jdbc.Connection.class }); } catch (SecurityException e) { throw new RuntimeException(e); } catch (NoSuchMethodException e) { throw new RuntimeException(e); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } } else { JDBC_4_POOLED_CONNECTION_WRAPPER_CTOR = null; } } protected static MysqlPooledConnection getInstance(com.mysql.jdbc.Connection connection) throws SQLException { if (!Util.isJdbc4()) { return new MysqlPooledConnection(connection); } return (MysqlPooledConnection) Util.handleNewInstance( JDBC_4_POOLED_CONNECTION_WRAPPER_CTOR, new Object[] { connection}, connection.getExceptionInterceptor()); } /** * The flag for an exception being thrown. */ public static final int CONNECTION_ERROR_EVENT = 1; /** * The flag for a connection being closed. */ public static final int CONNECTION_CLOSED_EVENT = 2; // ~ Instance/static variables ............................................. private Map connectionEventListeners; private Connection logicalHandle; private com.mysql.jdbc.Connection physicalConn; private ExceptionInterceptor exceptionInterceptor; // ~ Constructors .......................................................... /** * Construct a new MysqlPooledConnection and set instance variables * * @param connection * physical connection to db */ public MysqlPooledConnection(com.mysql.jdbc.Connection connection) { this.logicalHandle = null; this.physicalConn = connection; this.connectionEventListeners = new HashMap(); this.exceptionInterceptor = this.physicalConn.getExceptionInterceptor(); } /** * Adds ConnectionEventListeners to a hash table to be used for notification * of ConnectionEvents * * @param connectioneventlistener * listener to be notified with ConnectionEvents */ public synchronized void addConnectionEventListener( ConnectionEventListener connectioneventlistener) { if (this.connectionEventListeners != null) { this.connectionEventListeners.put(connectioneventlistener, connectioneventlistener); } } /** * Removes ConnectionEventListeners from hash table used for notification of * ConnectionEvents * * @param connectioneventlistener * listener to be removed */ public synchronized void removeConnectionEventListener( ConnectionEventListener connectioneventlistener) { if (this.connectionEventListeners != null) { this.connectionEventListeners.remove(connectioneventlistener); } } /** * Invoked by the container. Return a logicalHandle object that wraps a * physical connection. * * @see java.sql.DataSource#getConnection() */ public synchronized Connection getConnection() throws SQLException { return getConnection(true, false); } //当调用PooledConnection.getConnection()时实际上返回的是ConnectionWrapper //每次调用这个getConnection都会得到一个新的ConnectionWrapper, //而实际的physicalConn不会关闭,即使调用ConnectionWrapper的close了, //也不会关闭physicalConn protected synchronized Connection getConnection(boolean resetServerState, boolean forXa) throws SQLException { if (this.physicalConn == null) { SQLException sqlException = SQLError.createSQLException( "Physical Connection doesn't exist", this.exceptionInterceptor); callConnectionEventListeners(CONNECTION_ERROR_EVENT, sqlException); throw sqlException; } try { if (this.logicalHandle != null) { ((ConnectionWrapper) this.logicalHandle).close(false); } if (resetServerState) { this.physicalConn.resetServerState(); } this.logicalHandle = ConnectionWrapper.getInstance(this, this.physicalConn, forXa); } catch (SQLException sqlException) { callConnectionEventListeners(CONNECTION_ERROR_EVENT, sqlException); throw sqlException; } return this.logicalHandle; } /** * Invoked by the container (not the client), and should close the physical * connection. This will be called if the pool is destroyed or the * connectionEventListener receives a connectionErrorOccurred event. * * @see java.sql.DataSource#close() */ public synchronized void close() throws SQLException { if (this.physicalConn != null) { this.physicalConn.close(); this.physicalConn = null; } if (this.connectionEventListeners != null) { this.connectionEventListeners.clear(); this.connectionEventListeners = null; } } /** * Notifies all registered ConnectionEventListeners of ConnectionEvents. * Instantiates a new ConnectionEvent which wraps sqlException and invokes * either connectionClose or connectionErrorOccurred on listener as * appropriate. * * @param eventType * value indicating whether connectionClosed or * connectionErrorOccurred called * @param sqlException * the exception being thrown */ protected synchronized void callConnectionEventListeners(int eventType, SQLException sqlException) { if (this.connectionEventListeners == null) { return; } Iterator iterator = this.connectionEventListeners.entrySet().iterator(); ConnectionEvent connectionevent = new ConnectionEvent(this, sqlException); while (iterator.hasNext()) { ConnectionEventListener connectioneventlistener = (ConnectionEventListener) ((Map.Entry)iterator .next()).getValue(); if (eventType == CONNECTION_CLOSED_EVENT) { connectioneventlistener.connectionClosed(connectionevent); } else if (eventType == CONNECTION_ERROR_EVENT) { connectioneventlistener .connectionErrorOccurred(connectionevent); } } } protected ExceptionInterceptor getExceptionInterceptor() { return this.exceptionInterceptor; } }
[ "zhh200910@gmail.com" ]
zhh200910@gmail.com
c3e32097fa4855b434338da120f129245b02306f
3d4349c88a96505992277c56311e73243130c290
/Preparation/processed-dataset/god-class_4_1176/13.java
ccd8915280c63c3a7339766ce2026c7725d82102
[]
no_license
D-a-r-e-k/Code-Smells-Detection
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
079a02e5037d909114613aedceba1d5dea81c65d
refs/heads/master
2020-05-20T00:03:08.191102
2019-05-15T11:51:51
2019-05-15T11:51:51
185,272,690
7
4
null
null
null
null
UTF-8
Java
false
false
667
java
private void setWriterInternal(Writer writer, boolean setByUser) { m_writer_set_by_user = setByUser; m_writer = writer; // if we are tracing events we need to trace what // characters are written to the output writer. if (m_tracer != null) { boolean noTracerYet = true; Writer w2 = m_writer; while (w2 instanceof WriterChain) { if (w2 instanceof SerializerTraceWriter) { noTracerYet = false; break; } w2 = ((WriterChain) w2).getWriter(); } if (noTracerYet) m_writer = new SerializerTraceWriter(m_writer, m_tracer); } }
[ "dariusb@unifysquare.com" ]
dariusb@unifysquare.com
2c19dda1c28b43fc2a9c3ea67698d2fc1e37797d
5c52ad5c2dbccc649fe27cb3749b3e12d9ad70a3
/src/main/java/com/zea7ot/lc/lvl4/lc0146/SolutionApproach1LinkedHashMap.java
1cc4c1af8b0d0e3fca7894e871df3f572b2d5ca2
[]
no_license
XizheSun0914/lc-java-zea7ot
c14c378a099a34cbfa1714820134b145f591a280
d548827ae2ba343904464cac1d3f40420d75c0ec
refs/heads/master
2022-11-25T03:09:56.218685
2020-07-20T22:47:04
2020-07-20T22:47:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
822
java
/** * https://leetcode.com/problems/lru-cache/ */ package com.zea7ot.lc.lvl4.lc0146; import java.util.LinkedHashMap; import java.util.Map; public class SolutionApproach1LinkedHashMap extends LinkedHashMap<Integer, Integer> { // just to remove warning about lack of serialVersionUID private static final long serialVersionUID = 1L; private int capacity; public SolutionApproach1LinkedHashMap(int capacity) { super(capacity, 0.75f, true); this.capacity = capacity; } public int get(int key) { return super.getOrDefault(key, -1); } public void put(int key, int value) { super.put(key, value); } @Override protected boolean removeEldestEntry(Map.Entry<Integer, Integer> eldest){ return size() > capacity; } }
[ "yanglyu.leon.7@gmail.com" ]
yanglyu.leon.7@gmail.com
5e7c06d5970f71be2838c095f126ef5f0f1f9883
8f5d3d144cf98de0b0c535526eb65db0702d4ffc
/main/java/dqr/blocks/mobFigure/render/DqmTileEntityRenderFigureBurakkubejita.java
01ef3c18ddc2d0e4e9ce05b2f13ef7490d79d471
[]
no_license
azelDqm/MC1.7.10_DQRmod
54c0790b80c11a8ae591f17d233adc95f1b7e41a
bfec0e17fcade9d4616ac29b5abcbb12aa562d2a
refs/heads/master
2020-04-16T02:26:44.596119
2020-04-06T08:58:47
2020-04-06T08:58:47
57,311,023
6
2
null
null
null
null
UTF-8
Java
false
false
1,910
java
package dqr.blocks.mobFigure.render; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import dqr.DQR; import dqr.blocks.mobFigure.tileEntity.DqmTileEntityFigureBurakkubejita; import dqr.entity.mobEntity.model.DqmModelZukkinya; @SideOnly(Side.CLIENT) public class DqmTileEntityRenderFigureBurakkubejita extends TileEntitySpecialRenderer { //モデル private DqmModelZukkinya model = new DqmModelZukkinya(); private float fixA = 0; private float fixB = 1.0F; private float fixC = 0; private float fixD = 1.0F; private static final ResourceLocation DqmMobTexture = new ResourceLocation("dqr:textures/entity/mob/Burakkubejita.png"); public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8) { //エンティティ DqmTileEntityFigureBurakkubejita var9 = (DqmTileEntityFigureBurakkubejita)var1; GL11.glPushMatrix(); GL11.glTranslatef((float)var2 + 0.5F, (float)var4 + (1.5F * fixB / DQR.conf.figureMagni) + fixA, (float)var6 + 0.5F); GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); if (var9.getBlockMetadata() == 1) { GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); } if (var9.getBlockMetadata() == 2) { GL11.glRotatef(-180.0F, 0.0F, 1.0F, 0.0F); } if (var9.getBlockMetadata() == 3) { GL11.glRotatef(270.0F, 0.0F, 1.0F, 0.0F); } //テクスチャー this.bindTexture(DqmMobTexture); GL11.glPushMatrix(); this.model.modelRender((0.0625F * fixD / DQR.conf.figureMagni) + fixC); GL11.glPopMatrix(); GL11.glPopMatrix(); } }
[ "azel.dqm@gmail.com" ]
azel.dqm@gmail.com
66c0e74a365c98eee9a4ccfdb6c830ff80f54144
eca4a253fe0eba19f60d28363b10c433c57ab7a1
/apps/jacob.jcrm/java/jacob/entrypoint/gui/ShowContract.java
28c790fd1c1300572abf7231398cb8706850cb25
[]
no_license
freegroup/Open-jACOB
632f20575092516f449591bf6f251772f599e5fc
84f0a6af83876bd21c453132ca6f98a46609f1f4
refs/heads/master
2021-01-10T11:08:03.604819
2015-05-25T10:25:49
2015-05-25T10:25:49
36,183,560
0
0
null
null
null
null
UTF-8
Java
false
false
1,172
java
package jacob.entrypoint.gui; /** * A GUI Entry Point is one way to open the system with a dedicated form. * * You can access this entry point within an WebBrowser with the URL: * http://localhost:8080/jacob/enter?entry=ShowActivity&app=jCRMx&user=USERNAME&pwd=PASSWORD&param1=abc * * Note: 1. Replace USERNAME/PASSWORD in the url with the real username and password of the application. * 2. Replace localhost:8080 with the real servername and port. * 3. You can add any additional parameters to the url. The jACOB application servers will provide them * for you via the properties.getProperty("...") method. * * @author {user} * */ public class ShowContract extends ShowReminderItem { /* (non-Javadoc) * @see jacob.entrypoint.gui.ShowReminderItem#getTableAlias() */ protected String getTableAlias() { return "contract"; } /* (non-Javadoc) * @see de.tif.jacob.entrypoint.IGuiEntryPoint#getDomain() */ public String getDomain() { return "f_contract"; } /* (non-Javadoc) * @see de.tif.jacob.entrypoint.IGuiEntryPoint#getForm() */ public String getForm() { return "contract"; } }
[ "a.herz@freegroup.de" ]
a.herz@freegroup.de
9fc05ae101e9bf99bc1fecf9369c4f90fde5d013
be932cae69ad9e9d28950e1c6540872686cdabf9
/rongke-web/src/main/java/com/rongke/web/lianpay/util/MySSLSocketFactory.java
3e7c8840730ba0db9d7d28d3b0ab541ad005209d
[]
no_license
gaolizhan/rongke
a8af53f7810d462c8294c248c89faf8a6ae10daa
684a1aa522f182137b3b23b0ec98e2fbd4eef801
refs/heads/master
2020-04-08T08:18:49.829102
2018-11-25T14:53:35
2018-11-25T14:53:35
159,174,206
0
1
null
null
null
null
UTF-8
Java
false
false
1,792
java
package com.rongke.web.lianpay.util; /** * */ import org.apache.http.conn.ssl.SSLSocketFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; import java.io.IOException; import java.net.Socket; import java.net.UnknownHostException; import java.security.*; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; /** * SSL全部信任登录 * * @author linys * */ public class MySSLSocketFactory extends SSLSocketFactory{ SSLContext sslContext = SSLContext.getInstance("TLS"); public MySSLSocketFactory(KeyStore truststore) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { super(truststore); TrustManager tm = new X509TrustManager(){ public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { } public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { } public X509Certificate[] getAcceptedIssuers() { return null; } }; sslContext.init(null, new TrustManager[] { tm }, null); } @Override public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException { return sslContext.getSocketFactory().createSocket(socket, host, port, autoClose); } @Override public Socket createSocket() throws IOException { return sslContext.getSocketFactory().createSocket(); } }
[ "cmeizu@hotmail.com" ]
cmeizu@hotmail.com
87c9336d56f0abbc07c08082713d77a4591d08fd
9885a5daa70b59f2bc1103adb13eb4954c48b3fe
/src/main/java/org/telosys/tools/repository/persistence/InMemoryPersistenceManager.java
dd5c2744a79a46d6a217c0ebacef6915c7cce278
[]
no_license
poethelasi/telosys-tools-repository
54b8ba16a8b8eff58c3384b7d2ca421451d99b1b
6f4b8a76f5f8cebf5ed9a691be65e8086e70ad16
refs/heads/master
2021-01-12T12:05:42.855756
2016-08-29T14:14:18
2016-08-29T14:14:18
69,234,711
1
0
null
2016-09-26T09:31:15
2016-09-26T09:31:15
null
UTF-8
Java
false
false
2,235
java
/** * Copyright (C) 2008-2015 Telosys project org. ( http://www.telosys.org/ ) * * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3.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.gnu.org/licenses/lgpl.html * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.telosys.tools.repository.persistence; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import org.telosys.tools.commons.TelosysToolsException; import org.telosys.tools.commons.TelosysToolsLogger; import org.telosys.tools.repository.model.RepositoryModel; /* package */ class InMemoryPersistenceManager extends GenericPersistenceManager { private FileInMemory fileInMemory = null ; public InMemoryPersistenceManager( FileInMemory fileInMemory, TelosysToolsLogger logger) { super(logger); this.fileInMemory = fileInMemory ; } public RepositoryModel load() throws TelosysToolsException { //InputStream is = new FileInputStream(this._fileName); InputStream is = new ByteArrayInputStream(fileInMemory.getContent()); RepositoryModel repositoryModel = super.load(is); try { is.close(); } catch (IOException e) { throw new TelosysToolsException("cannot close ByteArrayInputStream ", e); } return repositoryModel ; } public void save(RepositoryModel model) throws TelosysToolsException { //OutputStream os = new FileOutputStream(this._fileName, false); OutputStream os = new ByteArrayOutputStream(); super.save(os, model); try { os.close(); } catch (IOException e) { throw new TelosysToolsException("Cannot close ByteArrayOutputStream ", e); } //--- Set new content fileInMemory.setContent(os.toString()); } }
[ "laguerin@LFR002634.corp.capgemini.com" ]
laguerin@LFR002634.corp.capgemini.com
4d93fe607093befaeb361f19d7a79ff2f27c15b0
5b478245fd98c181dabdaf7ea25ab84476e3def5
/s-management-system/SMS/src/main/java/com/sms/beans/Train.java
29df68f0fd2603c9159eea3c0109b938e68bc444
[]
no_license
sivarajankumar/s-management-system
646310892c092fc20842736887980fe52a813609
7c57b5ab3f536a9305e2839a993184bce8767f03
refs/heads/master
2021-01-10T03:23:00.610064
2014-11-06T08:59:00
2014-11-06T08:59:00
49,204,618
0
0
null
null
null
null
UTF-8
Java
false
false
977
java
package com.sms.beans; /** * Created with IntelliJ IDEA. * User: xvitcoder * Date: 12/21/12 * Time: 12:19 AM */ public class Train { private Long id; private String name; private Integer speed; private Boolean diesel; public Train() { } public Train(Long id, String name, Integer speed, Boolean diesel) { this.id = id; this.name = name; this.speed = speed; this.diesel = diesel; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getSpeed() { return speed; } public void setSpeed(Integer speed) { this.speed = speed; } public Boolean getDiesel() { return diesel; } public void setDiesel(Boolean diesel) { this.diesel = diesel; } }
[ "yameen.like@gmail.com" ]
yameen.like@gmail.com
287eadeb0f2243337e8e19ed5d0d6d6a046e5067
77eeb089e7a6fb9db426c96916cf6ac94ad90161
/src/twg2/jbcm/classFormat/attributes/Parameter_Annotations.java
19b405715dbb3b021d546c569e665a90d6634a51
[ "MIT" ]
permissive
PlumpMath/ClassLoading
1b16f63ef02c3ed55fb5072be03239221a811db3
dc1eda0b07c1d9746b8a63affff8d8b7b0d2103f
refs/heads/master
2021-01-20T09:54:05.152411
2017-01-12T02:05:05
2017-01-12T02:05:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,000
java
package twg2.jbcm.classFormat.attributes; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import twg2.jbcm.classFormat.ClassFile; import twg2.jbcm.classFormat.ReadWritable; import twg2.jbcm.modify.IndexUtility; /** A Java class file format Annotation subtype of type <code>Parameter_Annotation</code> * @author TeamworkGuy2 * @since 2013-12-3 */ public class Parameter_Annotations implements ReadWritable { ClassFile resolver; /* The value of the num_annotations item indicates the number of run-time-invisible annotations * on the parameter corresponding to the sequence number of this parameter_annotations element. */ short num_annotations; /* Each value of the annotations table represents a single run-time-invisible annotation on the * parameter corresponding to the sequence number of this parameter_annotations element. */ Annotation[] annotations; public Parameter_Annotations(ClassFile resolver) { this.resolver = resolver; } @Override public void changeCpIndex(short oldIndex, short newIndex) { IndexUtility.indexChange(annotations, oldIndex, newIndex); } @Override public void writeData(DataOutput out) throws IOException { out.writeShort(num_annotations); for(int i = 0; i < num_annotations; i++) { annotations[i].writeData(out); } } @Override public void readData(DataInput in) throws IOException { num_annotations = in.readShort(); annotations = new Annotation[num_annotations]; for(int i = 0; i < num_annotations; i++) { annotations[i] = new Annotation(resolver); annotations[i].readData(in); } } @Override public String toString() { StringBuilder strB = new StringBuilder(64); strB.append("Parameter_Annotations(["); for(int i = 0; i < num_annotations-1; i++) { strB.append(annotations[i].toString()); strB.append(", "); } if(num_annotations > 0) { strB.append(annotations[num_annotations-1].toString()); } strB.append("])"); return strB.toString(); } }
[ "straitfrommars@rocketmail.com" ]
straitfrommars@rocketmail.com
9a348bec6ea1e6aa41640ae42e82ae7e02fd57f1
40cd4da5514eb920e6a6889e82590e48720c3d38
/desktop/applis/apps/bean/bean_games/pokemonbean/src/main/java/aiki/beans/simulation/AddPokemonBeanWholeWordSet.java
3c61316e3048da5e9ff49753adc4eb2ef79c0837
[]
no_license
Cardman/projects
02704237e81868f8cb614abb37468cebb4ef4b31
23a9477dd736795c3af10bccccb3cdfa10c8123c
refs/heads/master
2023-08-17T11:27:41.999350
2023-08-15T07:09:28
2023-08-15T07:09:28
34,724,613
4
0
null
2020-10-13T08:08:38
2015-04-28T10:39:03
Java
UTF-8
Java
false
false
443
java
package aiki.beans.simulation; import aiki.beans.PokemonBeanStruct; import code.bean.nat.*; import code.bean.nat.*; import code.bean.nat.*; import code.bean.nat.*; public class AddPokemonBeanWholeWordSet implements NatCaller{ @Override public NaSt re(NaSt _instance, NaSt[] _args){ ( (AddPokemonBean) ((PokemonBeanStruct)_instance).getInstance()).setWholeWord(NaBoSt.isTrue(_args[0])); return NaNu.NULL_VALUE; } }
[ "f.desrochettes@gmail.com" ]
f.desrochettes@gmail.com
b3c492706fb3b20531b6ef87ba57f7b766139987
d9e3bf027a7f1e81044f4a765c9139e1bfbdf0df
/reactive/src/main/java/sg/edu/nus/reactive/ReactiveApplication.java
15e0f373fbc2db7bd6a523c4eb4cbb8ab67efdc0
[]
no_license
Sarah-Wai/SA50
4ab7288f2bc6294ab14a4133ca539e3b25ac0ec6
382a5a84282243e89e5c26f1e6590ec729da4b7b
refs/heads/master
2022-11-07T08:45:13.172021
2020-06-28T19:05:31
2020-06-28T19:05:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
316
java
package sg.edu.nus.reactive; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class ReactiveApplication { public static void main(String[] args) { SpringApplication.run(ReactiveApplication.class, args); } }
[ "suria.r.asai@gmail.com" ]
suria.r.asai@gmail.com
0c1c873cdf7a322123dc052f3c5c107c2fba00ac
ba33da805c0dff98c04154661876815335beb759
/CSC176/source code of the book/book10ebychapters/src/chapter9/TestSimpleCircle.java
529fe3bd5b6d8a5afc57e75445f23e3aa0ec53cb
[ "OFL-1.1", "MIT", "Unlicense" ]
permissive
XiangHuang-LMC/ijava-binder
edd2eab8441a8b6de12ebcda1b160141b95f079e
4aac9e28ec62d386c908c87b927e1007834ff58a
refs/heads/master
2020-12-23T20:45:50.518280
2020-03-20T20:15:03
2020-03-20T20:15:03
237,268,296
4
0
Unlicense
2020-01-30T17:36:57
2020-01-30T17:36:56
null
UTF-8
Java
false
false
1,584
java
package chapter9; public class TestSimpleCircle { /** Main method */ public static void main(String[] args) { // Create a circle with radius 1 SimpleCircle circle1 = new SimpleCircle(); System.out.println("The area of the circle of radius " + circle1.radius + " is " + circle1.getArea()); // Create a circle with radius 25 SimpleCircle circle2 = new SimpleCircle(25); System.out.println("The area of the circle of radius " + circle2.radius + " is " + circle2.getArea()); // Create a circle with radius 125 SimpleCircle circle3 = new SimpleCircle(125); System.out.println("The area of the circle of radius " + circle3.radius + " is " + circle3.getArea()); // Modify circle radius circle2.radius = 100; // or circle2.setRadius(100) System.out.println("The area of the circle of radius " + circle2.radius + " is " + circle2.getArea()); } } // Define the circle class with two constructors class SimpleCircle { double radius; /** Construct a circle with radius 1 */ SimpleCircle() { radius = 1; } /** Construct a circle with a specified radius */ SimpleCircle(double newRadius) { radius = newRadius; } /** Return the area of this circle */ double getArea() { return radius * radius * Math.PI; } /** Return the perimeter of this circle */ double getPerimeter() { return 2 * radius * Math.PI; } /** Set a new radius for this circle */ void setRadius(double newRadius) { radius = newRadius; } }
[ "huangxx@lemoyne.edu" ]
huangxx@lemoyne.edu
d53f6ba9c5b85ace3fe01a0ca66944ed3acb6250
5c795a957801ff7815d3cd83f8f5f16b11c57f34
/src/com/saas/chat/view/activity/NewFriendsListActivity.java
f84767dd4c623d1c6acc127fbc17fb815af6786e
[ "Apache-2.0" ]
permissive
Fuge2008/saasuser
0b0307eadd6934d092cd471dff88dd9c20af853e
5d007e6984b76809126f7365ffb0f45e466e60ab
refs/heads/master
2020-03-22T18:15:56.882139
2018-07-10T15:13:22
2018-07-10T15:13:22
140,448,304
0
0
null
null
null
null
UTF-8
Java
false
false
2,532
java
package com.saas.chat.view.activity; import org.apache.http.message.BasicNameValuePair; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.ImageView; import android.widget.ListView; import android.widget.TextView; import com.small.saasuser.activity.R; import com.saas.chat.Constants; import com.saas.chat.adpter.NewFriendsAdapter; import com.saas.chat.common.Utils; import com.saas.chat.view.BaseActivity; //新朋友 public class NewFriendsListActivity extends BaseActivity implements OnClickListener { private TextView txt_title, txt_right; private ImageView img_back; private ListView mlistview; private View layout_head; @Override public void onCreate(Bundle savedInstanceState) { setContentView(R.layout.em_activity_listview); super.onCreate(savedInstanceState); } @Override protected void initControl() { txt_title = (TextView) findViewById(R.id.txt_title); txt_title.setText("新的朋友"); txt_right = (TextView) findViewById(R.id.txt_right); txt_right.setText("添加朋友"); img_back = (ImageView) findViewById(R.id.img_back); img_back.setVisibility(View.VISIBLE); mlistview = (ListView) findViewById(R.id.listview); layout_head = getLayoutInflater().inflate( R.layout.em_layout_head_newfriend, null); mlistview.addHeaderView(layout_head); mlistview.setAdapter(new NewFriendsAdapter(this)); } @Override protected void initView() { } @Override protected void initData() { } @Override protected void setListener() { img_back.setOnClickListener(this); txt_right.setOnClickListener(this); layout_head.findViewById(R.id.txt_search).setOnClickListener(this); layout_head.findViewById(R.id.txt_tel).setOnClickListener(this); layout_head.findViewById(R.id.txt_qq).setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.img_back: Utils.finish(NewFriendsListActivity.this); break; case R.id.txt_right: Utils.start_Activity(this, PublicActivity.class, new BasicNameValuePair(Constants.NAME, "添加朋友")); break; case R.id.txt_search: Utils.start_Activity(this, PublicActivity.class, new BasicNameValuePair(Constants.NAME, "搜索")); break; case R.id.txt_tel: Utils.start_Activity(this, AddFromContactActivity.class); break; case R.id.txt_qq: Utils.start_Activity(this, PublicActivity.class, new BasicNameValuePair(Constants.NAME, "添加QQ好友")); break; default: break; } } }
[ "fzwooo@163.com" ]
fzwooo@163.com
da93c68fc82af650b596c6094010ce649aab7005
60ffee4de5e1853aaa3735d0e5e7d73c1608672c
/src/Leetcode/topic/stg/LC994_RottingOranges.java
602c562a81fa42c91c92987e999f1a5e3df37d3c
[]
no_license
roppel/CodingInterviewProblems
d903e23de6f67c9e64ba19ea65af63684878fc03
4e63ef308e380f0e1644da3473c383ad95bdfbe4
refs/heads/master
2023-01-31T18:06:09.428696
2020-12-13T19:29:54
2020-12-13T19:29:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,585
java
package Leetcode.topic.stg; import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; public class LC994_RottingOranges { public static void main(String[] args) { int[][] arr = new int[][]{{2,1,1},{1,1,0},{0,1,1}}; System.out.println(new LC994_RottingOranges().orangesRotting(arr)); System.out.println(Arrays.deepToString(arr)); } public int orangesRotting(int[][] grid) { Queue<int[]> q = new LinkedList(); int freshCount = 0; for (int i = 0; i < grid.length; i++) { for (int j = 0; j < grid[i].length; j++) { if (grid[i][j] == 2) { q.add(new int[]{i, j}); } if (grid[i][j] == 1) { freshCount++; } } } int[][] direction = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; int time = 0; while (!q.isEmpty()) { time++; int size = q.size(); while (size-- > 0) { int[] xy = q.poll(); for (int[] d : direction) { int x = xy[0] + d[0]; int y = xy[1] + d[1]; if (x < 0 || y < 0 || x >= grid.length || y >= grid[0].length || grid[x][y] == 0 || grid[x][y] == 2) { continue; } q.add(new int[]{x, y}); grid[x][y] = 2; freshCount--; } } } return freshCount == 0 ? time : -1; } }
[ "michaelperera32@gmail.com" ]
michaelperera32@gmail.com
c58130f9fbb657b9bf0e7cbecd88eabda8239619
b2f07f3e27b2162b5ee6896814f96c59c2c17405
/com/sun/org/apache/xpath/internal/functions/FuncNot.java
45d371417827f9463467cd6a5addcdbdd9fca39f
[]
no_license
weiju-xi/RT-JAR-CODE
e33d4ccd9306d9e63029ddb0c145e620921d2dbd
d5b2590518ffb83596a3aa3849249cf871ab6d4e
refs/heads/master
2021-09-08T02:36:06.675911
2018-03-06T05:27:49
2018-03-06T05:27:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
949
java
/* */ package com.sun.org.apache.xpath.internal.functions; /* */ /* */ import com.sun.org.apache.xpath.internal.Expression; /* */ import com.sun.org.apache.xpath.internal.XPathContext; /* */ import com.sun.org.apache.xpath.internal.objects.XBoolean; /* */ import com.sun.org.apache.xpath.internal.objects.XObject; /* */ import javax.xml.transform.TransformerException; /* */ /* */ public class FuncNot extends FunctionOneArg /* */ { /* */ static final long serialVersionUID = 7299699961076329790L; /* */ /* */ public XObject execute(XPathContext xctxt) /* */ throws TransformerException /* */ { /* 47 */ return this.m_arg0.execute(xctxt).bool() ? XBoolean.S_FALSE : XBoolean.S_TRUE; /* */ } /* */ } /* Location: C:\Program Files\Java\jdk1.7.0_79\jre\lib\rt.jar * Qualified Name: com.sun.org.apache.xpath.internal.functions.FuncNot * JD-Core Version: 0.6.2 */
[ "yuexiahandao@gmail.com" ]
yuexiahandao@gmail.com
9d0d44571c706101656e5b7a1272285751b27471
99c7920038f551b8c16e472840c78afc3d567021
/aliyun-java-sdk-vpc-v5/src/main/java/com/aliyuncs/v5/vpc/model/v20160428/CreatePhysicalConnectionResponse.java
24757aa25b403d9b68ef309bf63e7ccff885d739
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk-v5
9fa211e248b16c36d29b1a04662153a61a51ec88
0ece7a0ba3730796e7a7ce4970a23865cd11b57c
refs/heads/master
2023-03-13T01:32:07.260745
2021-10-18T08:07:02
2021-10-18T08:07:02
263,800,324
4
2
NOASSERTION
2022-05-20T22:01:22
2020-05-14T02:58:50
Java
UTF-8
Java
false
false
1,524
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.v5.vpc.model.v20160428; import com.aliyuncs.v5.AcsResponse; import com.aliyuncs.v5.vpc.transform.v20160428.CreatePhysicalConnectionResponseUnmarshaller; import com.aliyuncs.v5.transform.UnmarshallerContext; /** * @author auto create * @version */ public class CreatePhysicalConnectionResponse extends AcsResponse { private String requestId; private String physicalConnectionId; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getPhysicalConnectionId() { return this.physicalConnectionId; } public void setPhysicalConnectionId(String physicalConnectionId) { this.physicalConnectionId = physicalConnectionId; } @Override public CreatePhysicalConnectionResponse getInstance(UnmarshallerContext context) { return CreatePhysicalConnectionResponseUnmarshaller.unmarshall(this, context); } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
4728c5c9d8a6b25a2dd6b6924a1984c0073a2984
59e6dc1030446132fb451bd711d51afe0c222210
/components/stratos/usage/org.wso2.carbon.usage.summary.helper/2.2.0/src/main/java/org/wso2/carbon/usage/summary/helper/internal/UsageSummaryHelperServiceComponent.java
9f366397d37845683693af4459c9a6409a410dbc
[]
no_license
Alsan/turing-chunk07
2f7470b72cc50a567241252e0bd4f27adc987d6e
e9e947718e3844c07361797bd52d3d1391d9fb5e
refs/heads/master
2020-05-26T06:20:24.554039
2014-02-07T12:02:53
2014-02-07T12:02:53
38,284,349
0
1
null
null
null
null
UTF-8
Java
false
false
3,140
java
/* * Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.wso2.carbon.usage.summary.helper.internal; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.osgi.service.component.ComponentContext; import org.wso2.carbon.analytics.hive.service.HiveExecutorService; import org.wso2.carbon.ndatasource.core.DataSourceService; import org.wso2.carbon.usage.summary.helper.util.DataHolder; import javax.sql.DataSource; /** * * @scr.component name="org.wso2.carbon.usage.summary" immediate="true" * @scr.reference name="hive.executor.service" * interface="org.wso2.carbon.analytics.hive.service.HiveExecutorService" cardinality="1..1" * policy="dynamic" bind="setHiveExecutorService" unbind="unsetHiveExecutorService" * @scr.reference name="datasources.service" * interface="org.wso2.carbon.ndatasource.core.DataSourceService" * cardinality="1..1" policy="dynamic" * bind="setDataSourceService" unbind="unsetDataSourceService" */ public class UsageSummaryHelperServiceComponent { private static Log log = LogFactory.getLog(UsageSummaryHelperServiceComponent.class); protected void activate(ComponentContext context){ log.info("Stratos usage summary helper bundle started"); /*try{ }catch (Throwable t){ log.error("Error occurred while activating the usage summary helper bundle..", t); }*/ } protected void deactivate(){ log.debug("Usage summary helper bundle was deactivated.."); } protected void setHiveExecutorService(HiveExecutorService executorService){ //DataHolder.setExecutorService(executorService); } protected void unsetHiveExecutorService(HiveExecutorService executorService){ //DataHolder.setExecutorService(null); } protected void setDataSourceService(DataSourceService dataSourceService){ DataHolder.setDataSourceService(dataSourceService); try { DataHolder.setDataSource((DataSource)dataSourceService.getDataSource(DataHolder.BILLING_DATA_SOURCE_NAME).getDSObject()); log.info("Data source set to data holder"); } catch (Exception e) { log.error("Error occurred while retrieving the data source: " + DataHolder.BILLING_DATA_SOURCE_NAME, e); //To change body of catch statement use File | Settings | File Templates. } } protected void unsetDataSourceService(DataSourceService dataSourceService){ DataHolder.setDataSourceService(null); } }
[ "malaka@wso2.com" ]
malaka@wso2.com
7058bc9d407208af00bf5121380aa951cadcf80e
c5498743036544b67876707222d974582d435b40
/DesignPattern/结构型模式/Structural_model/chapter13_Facade/src/chapter13_5/HardDisk.java
f24c54da084c8193ba89567e7a72ae0e94a37513
[]
no_license
lhang662543608/Java_Notes
3035dd5eedc98eec9d154d081cddb0007d36ecf5
10b816c0c7fffc7dfe7876c643a2beefb4557b3d
refs/heads/master
2020-05-25T22:06:03.871757
2020-01-11T02:13:40
2020-01-11T02:13:40
188,006,603
0
0
null
null
null
null
UTF-8
Java
false
false
170
java
package chapter13_5; /** * @author lhang * @create 2019-10-25 21:38 */ public class HardDisk { public void read(){ System.out.println("read..."); } }
[ "ljh_662543608@163.com" ]
ljh_662543608@163.com
2b372dc2598da74532d86108988c6583f5e8fbfc
9f543bfb845f0d8fb925f0e3b298b4b4bec3a76c
/UserApp/src/exceptions/UsernameExistsException.java
0739ae828069330c44ba0a600077eba63283fb18
[]
no_license
zlatanp/chat-app
0b45fc1a0a1dd8d28cf57354ab4079f9b63bef8c
45a1f2ea3f932e930427765dc6a139c05b8757ed
refs/heads/master
2021-01-20T03:14:36.621076
2017-05-11T21:33:16
2017-05-11T21:33:16
89,515,528
0
0
null
null
null
null
UTF-8
Java
false
false
212
java
package exceptions; @SuppressWarnings("serial") public class UsernameExistsException extends RuntimeException{ public UsernameExistsException(){ System.err.println("Choosen username already exist!"); } }
[ "zlajox@gmail.com" ]
zlajox@gmail.com
88b2d243647e3f2da53acbce647128dbe63504bd
5a1ef36056876177acf2db21c9e8f70e1c5a0cae
/app/src/main/java/com/yxld/yxchuangxin/entity/MenJinShareMemberBean.java
83c3661fbe520c955aab3d12bfeaa0fd27f324e3
[]
no_license
afjzwed/xinshequ
c9473bb01722ccae42e5cebe1c4002fdea2f5202
7b5e2cdf942c00c1ad941fc6e3aa59a12508e96b
refs/heads/master
2021-06-29T14:07:49.765564
2019-04-15T05:51:53
2019-04-15T05:51:53
132,833,339
1
1
null
null
null
null
UTF-8
Java
false
false
2,444
java
package com.yxld.yxchuangxin.entity; import com.yxld.yxchuangxin.base.BaseEntity; import java.util.List; /** * @author xlei * @Date 2018/6/11. */ public class MenJinShareMemberBean extends BaseEntity { private List<MenJinShareMemberBean> data; public List<MenJinShareMemberBean> getData() { return data; } public void setData(List<MenJinShareMemberBean> data) { this.data = data; } /** * yezhuDianhua : 15243648097 * gongsiId : 23 * fanghao : 6982 * xiangmuId : 443 * yezhuId : 8611 * danyuanId : 13 * dianhuas : null * id : 21 * loudongId : 5 * yezhuIds : null */ private String yezhuDianhua; private int gongsiId; private String fanghao; private int xiangmuId; private int yezhuId; private int danyuanId; private Object dianhuas; private int id; private int loudongId; private Object yezhuIds; public String getYezhuDianhua() { return yezhuDianhua; } public void setYezhuDianhua(String yezhuDianhua) { this.yezhuDianhua = yezhuDianhua; } public int getGongsiId() { return gongsiId; } public void setGongsiId(int gongsiId) { this.gongsiId = gongsiId; } public String getFanghao() { return fanghao; } public void setFanghao(String fanghao) { this.fanghao = fanghao; } public int getXiangmuId() { return xiangmuId; } public void setXiangmuId(int xiangmuId) { this.xiangmuId = xiangmuId; } public int getYezhuId() { return yezhuId; } public void setYezhuId(int yezhuId) { this.yezhuId = yezhuId; } public int getDanyuanId() { return danyuanId; } public void setDanyuanId(int danyuanId) { this.danyuanId = danyuanId; } public Object getDianhuas() { return dianhuas; } public void setDianhuas(Object dianhuas) { this.dianhuas = dianhuas; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getLoudongId() { return loudongId; } public void setLoudongId(int loudongId) { this.loudongId = loudongId; } public Object getYezhuIds() { return yezhuIds; } public void setYezhuIds(Object yezhuIds) { this.yezhuIds = yezhuIds; } }
[ "3401794305@qq.com" ]
3401794305@qq.com
4fac3d46849eae60fd05ebea6b61a9352e11063e
459a7b0bdcc236441173bb17fc519ee04c1189ca
/engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/bv/number/sign/PositiveOrZeroValidatorForNumber.java
2278085cdafc2047bac7ddec9afa67c49d7ac833
[ "LicenseRef-scancode-dco-1.1", "Apache-2.0" ]
permissive
YHTCUG/hibernate-validator
811019d6433fdcca62e7ca08f0aa6b1fadd5e1f3
15a36e56bb1c80f830adfaf2f7a8938588860e62
refs/heads/master
2023-04-12T21:07:20.834503
2019-08-02T14:24:27
2019-08-02T15:06:43
202,673,473
0
0
Apache-2.0
2023-04-04T15:54:57
2019-08-16T06:43:44
Java
UTF-8
Java
false
false
936
java
/* * Hibernate Validator, declare and validate application constraints * * License: Apache License, Version 2.0 * See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>. */ package org.hibernate.validator.internal.constraintvalidators.bv.number.sign; import javax.validation.ConstraintValidator; import javax.validation.ConstraintValidatorContext; import javax.validation.constraints.PositiveOrZero; /** * Check that the number being validated is positive. * * @author Hardy Ferentschik * @author Xavier Sosnovsky * @author Guillaume Smet * @author Marko Bekhta */ public class PositiveOrZeroValidatorForNumber implements ConstraintValidator<PositiveOrZero, Number> { @Override public boolean isValid(Number value, ConstraintValidatorContext context) { // null values are valid if ( value == null ) { return true; } return NumberSignHelper.signum( value ) >= 0; } }
[ "gunnar.morling@googlemail.com" ]
gunnar.morling@googlemail.com
5d606e62d78fa9292c55d991fa2685758f5acabf
e8597168f6d610d853842133fc1b20403ced8558
/src/main/java/betterquesting/questing/rewards/RewardRegistry.java
676217019df2e043256855b981406d1107dfe3a7
[ "MIT" ]
permissive
Funwayguy/BetterQuesting
8cb4a016991e43f6ccce8eff517c86511a7c0ecf
414be1e8677a4ec7cca5945c41905ff3045309fa
refs/heads/1.12
2022-11-15T08:00:55.080382
2020-05-06T23:55:25
2020-05-06T23:55:25
48,046,159
77
80
MIT
2022-10-30T00:55:22
2015-12-15T13:55:36
Java
UTF-8
Java
false
false
2,419
java
package betterquesting.questing.rewards; import betterquesting.api.placeholders.rewards.FactoryRewardPlaceholder; import betterquesting.api.questing.rewards.IReward; import betterquesting.api2.registry.IFactoryData; import betterquesting.api2.registry.IRegistry; import betterquesting.core.BetterQuesting; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.ResourceLocation; import org.apache.logging.log4j.Level; import java.util.ArrayList; import java.util.HashMap; import java.util.List; public class RewardRegistry implements IRegistry<IFactoryData<IReward, NBTTagCompound>, IReward> { public static final RewardRegistry INSTANCE = new RewardRegistry(); private final HashMap<ResourceLocation, IFactoryData<IReward, NBTTagCompound>> rewardRegistry = new HashMap<>(); @Override public void register(IFactoryData<IReward, NBTTagCompound> factory) { if(factory == null) { throw new NullPointerException("Tried to register null reward"); } else if(factory.getRegistryName() == null) { throw new IllegalArgumentException("Tried to register a reward with a null name: " + factory.getClass()); } if(rewardRegistry.containsKey(factory.getRegistryName()) || rewardRegistry.containsValue(factory)) { throw new IllegalArgumentException("Cannot register dupliate reward type: " + factory.getRegistryName()); } rewardRegistry.put(factory.getRegistryName(), factory); } @Override public IFactoryData<IReward, NBTTagCompound> getFactory(ResourceLocation registryName) { return rewardRegistry.get(registryName); } @Override public List<IFactoryData<IReward, NBTTagCompound>> getAll() { return new ArrayList<>(rewardRegistry.values()); } @Override public IReward createNew(ResourceLocation registryName) { try { IFactoryData<? extends IReward, NBTTagCompound> factory; if(FactoryRewardPlaceholder.INSTANCE.getRegistryName().equals(registryName)) { factory = FactoryRewardPlaceholder.INSTANCE; } else { factory = getFactory(registryName); } if(factory == null) { BetterQuesting.logger.log(Level.ERROR, "Tried to load missing reward type '" + registryName + "'! Are you missing an expansion pack?"); return null; } return factory.createNew(); } catch(Exception e) { BetterQuesting.logger.log(Level.ERROR, "Unable to instatiate reward: " + registryName, e); return null; } } }
[ "FunwayguyEmail@gmail.com" ]
FunwayguyEmail@gmail.com
a191d9a52db38d0bbdccba3fa59b06e1161df9f3
ae9a22e74eefddd55ad71e51f9625af02b06e464
/app/src/main/java/com/kingja/zsqs/adapter/FileAdapter.java
e1a7e37a3d13d7d23fae1dd4aeb5113d06ea3177
[]
no_license
KingJA/zsqs
458cf633a96e7d18586039402dc76549d1897d00
47ba4e5463b373b2c80a48b6b9ca3e50d980ac06
refs/heads/master
2020-12-10T09:40:49.083264
2020-04-18T00:58:09
2020-04-18T00:58:09
233,558,432
0
0
null
null
null
null
UTF-8
Java
false
false
2,157
java
package com.kingja.zsqs.adapter; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import com.kingja.zsqs.R; import com.kingja.zsqs.constant.Constants; import com.kingja.zsqs.loader.image.ImageLoader; import com.kingja.zsqs.net.entiy.FileItem; import java.util.List; /** * Description:TODO * Create Time:2018/9/17 0017 下午 4:55 * Author:KingJA * Email:kingjavip@gmail.com */ public class FileAdapter extends BaseLvAdapter<FileItem> { public FileAdapter(Context context, List<FileItem> list) { super(context, list); } @Override public View simpleGetView(int position, View convertView, ViewGroup parent) { ViewHolder viewHolder; if (convertView == null) { convertView = View .inflate(context, R.layout.item_file, null); viewHolder = new ViewHolder(convertView); convertView.setTag(viewHolder); } else { viewHolder = (ViewHolder) convertView.getTag(); } FileItem item = (FileItem) getItem(position); switch (item.getType()) { case Constants.FILE_TYPE.IMG: viewHolder.iv_pdf.setVisibility(View.GONE); ImageLoader.getInstance().loadImage(context,item.getFileUrl(),viewHolder.iv_img); break; case Constants.FILE_TYPE.PDF: viewHolder.iv_img.setImageDrawable(null); viewHolder.iv_pdf.setVisibility(View.VISIBLE); break; } viewHolder.tv_fileName.setText(item.getFileName()); return convertView; } public class ViewHolder { public final View root; public ImageView iv_img; public ImageView iv_pdf; public TextView tv_fileName; public ViewHolder(View root) { this.root = root; iv_img = root.findViewById(R.id.iv_img); iv_pdf = root.findViewById(R.id.iv_pdf); tv_fileName = root.findViewById(R.id.tv_fileName); } } }
[ "kingjavip@gmail.com" ]
kingjavip@gmail.com
2ae8c0bd1c0fdbd826b6ef40b8ac2406ffc3035e
6c2ffb5e9f0a782e69df459a4d9b87bdab91dffc
/src/test/java/edu/illinois/library/cantaloupe/resolver/JdbcResolverTest.java
e8581d9bd7990b525b525b040ac9847725c3b07e
[ "LicenseRef-scancode-unknown-license-reference", "NCSA" ]
permissive
OULibraries/cantaloupe
001c8f577c38fcd6ba1099190ed919ccb1f703b1
7360cf596875dee449f163c61ed0d69510d8158b
refs/heads/master
2021-01-15T11:08:07.335769
2015-11-25T21:01:26
2015-11-25T21:01:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,738
java
package edu.illinois.library.cantaloupe.resolver; import edu.illinois.library.cantaloupe.Application; import edu.illinois.library.cantaloupe.CantaloupeTestCase; import edu.illinois.library.cantaloupe.image.SourceFormat; import edu.illinois.library.cantaloupe.request.Identifier; import edu.illinois.library.cantaloupe.test.TestUtil; import org.apache.commons.configuration.BaseConfiguration; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.sql.Connection; import java.sql.PreparedStatement; public class JdbcResolverTest extends CantaloupeTestCase { private JdbcResolver instance; public void setUp() throws Exception { BaseConfiguration config = new BaseConfiguration(); // use an in-memory H2 database config.setProperty("JdbcResolver.connection_string", "jdbc:h2:mem:test"); config.setProperty("JdbcResolver.user", "sa"); config.setProperty("JdbcResolver.password", ""); config.setProperty("JdbcResolver.function.identifier", "function getDatabaseIdentifier(url_identifier) { return url_identifier; }"); config.setProperty("JdbcResolver.lookup_sql", "SELECT image FROM items WHERE filename = ?"); config.setProperty("JdbcResolver.function.media_type", "function getMediaType(identifier) { return \"SELECT media_type FROM items WHERE filename = ?\" }"); Application.setConfiguration(config); // create the table Connection conn = JdbcResolver.getConnection(); String sql = "CREATE TABLE items (" + "filename VARCHAR(255)," + "media_type VARCHAR(255)," + "image BLOB);"; PreparedStatement statement = conn.prepareStatement(sql); statement.execute(); // insert some images sql = "INSERT INTO items (filename, media_type, image) VALUES (?, ?, ?)"; statement = conn.prepareStatement(sql); statement.setString(1, "jpg.jpg"); statement.setString(2, "image/jpeg"); statement.setBinaryStream(3, new FileInputStream(TestUtil.getFixture("jpg"))); statement.executeUpdate(); instance = new JdbcResolver(); } public void tearDown() throws Exception { Connection conn = JdbcResolver.getConnection(); String sql = "DROP TABLE items;"; PreparedStatement statement = conn.prepareStatement(sql); statement.execute(); } public void testGetInputStream() { // present image try { assertNotNull(instance.getInputStream(new Identifier("jpg.jpg"))); } catch (IOException e) { fail(); } // missing image try { instance.getInputStream(new Identifier("bogus")); fail("Expected exception"); } catch (FileNotFoundException e) { // pass } catch (IOException e) { fail("Expected FileNotFoundException"); } } public void testGetSourceFormat() throws IOException { // JdbcResolver.function.media_type returns SQL assertEquals(SourceFormat.JPG, instance.getSourceFormat(new Identifier("jpg.jpg"))); assertEquals(SourceFormat.UNKNOWN, instance.getSourceFormat(new Identifier("bogus"))); // JdbcResolver.function.media_type returns a media type Application.getConfiguration().setProperty( "JdbcResolver.function.media_type", "function getMediaType(identifier) { return (identifier == 'bogus') ? null : 'image/jpeg'; }"); assertEquals(SourceFormat.JPG, instance.getSourceFormat(new Identifier("jpg.jpg"))); assertEquals(SourceFormat.UNKNOWN, instance.getSourceFormat(new Identifier("bogus"))); // JdbcResolver.function.media_type is undefined Application.getConfiguration().setProperty( "JdbcResolver.function.media_type", null); assertEquals(SourceFormat.JPG, instance.getSourceFormat(new Identifier("jpg.jpg"))); assertEquals(SourceFormat.UNKNOWN, instance.getSourceFormat(new Identifier("bogus"))); } public void testExecuteGetDatabaseIdentifier() throws Exception { String result = instance. executeGetDatabaseIdentifier(new Identifier("cats.jpg")); assertEquals("cats.jpg", result); } public void testExecuteGetMediaType() throws Exception { String result = instance.executeGetMediaType(new Identifier("cats.jpg")); assertEquals("SELECT media_type FROM items WHERE filename = ?", result); } }
[ "alexd@n-ary.net" ]
alexd@n-ary.net
24c33b974b0417bc55bf6612d8b7f5f3d1732ad7
8cad8a86f57076b92c98cd6b43dfcb0e5587ed5a
/notification/src/main/java/org/killbill/billing/notification/plugin/api/InvoiceNotificationMetadata.java
acecf6a8403032aaf44c215e1656d37d8980b983
[ "Apache-2.0" ]
permissive
soitun/killbill-plugin-api
0ad2dc96dfff3c5a25a2dc53fc265f79757468d7
cd3fb251c4b61931eb0f7954037145148d62f983
refs/heads/master
2023-05-11T05:24:59.350338
2023-05-08T08:26:50
2023-05-08T08:26:50
46,615,886
0
0
Apache-2.0
2023-05-08T19:24:28
2015-11-21T13:13:35
Java
UTF-8
Java
false
false
1,757
java
/* * Copyright 2014-2018 Groupon, Inc * Copyright 2014-2018 The Billing Project, LLC * * The Billing Project licenses this file to you under the Apache License, version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package org.killbill.billing.notification.plugin.api; import java.math.BigDecimal; import org.joda.time.DateTime; import org.killbill.billing.catalog.api.Currency; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; public class InvoiceNotificationMetadata { private final DateTime targetDate; private final BigDecimal amountOwed; private final Currency currency; @JsonCreator public InvoiceNotificationMetadata(@JsonProperty("targetDate") final DateTime targetDate, @JsonProperty("amountOwed") final BigDecimal amountOwed, @JsonProperty("currency") final Currency currency) { this.targetDate = targetDate; this.amountOwed = amountOwed; this.currency = currency; } public DateTime getTargetDate() { return targetDate; } public BigDecimal getAmountOwed() { return amountOwed; } public Currency getCurrency() { return currency; } }
[ "sbrossier@groupon.com" ]
sbrossier@groupon.com
97f8d5b38ad1f6424e626c373e2b07e3f4b5bc22
bee994d337b02c9885e40a50078e2026c42772dc
/TrainingCalAdminView-portlet/docroot/WEB-INF/service/com/chola/trainingcalendar/model/trainingpersonalisedparameterscontentstore.java
8164620c941add21a1a666c0d8f877b5425021df
[]
no_license
mmehral/Liferay_Applications
3387fd7dd3fe348a8f78d927dedb408b949f92a3
ac0d314771ac6dba5db8c0b07ca88ae4c2636332
refs/heads/master
2021-05-06T13:47:41.349798
2017-12-19T13:09:41
2017-12-19T13:09:41
113,277,187
0
0
null
null
null
null
UTF-8
Java
false
false
2,543
java
/** * Copyright (c) 2000-present Liferay, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the Free * Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. */ package com.chola.trainingcalendar.model; import aQute.bnd.annotation.ProviderType; import com.liferay.portal.kernel.annotation.ImplementationClassName; import com.liferay.portal.kernel.model.PersistedModel; import com.liferay.portal.kernel.util.Accessor; /** * The extended model interface for the trainingpersonalisedparameterscontentstore service. Represents a row in the &quot;chola_trainingpersonalisedparameterscontentstore&quot; database table, with each column mapped to a property of this class. * * @author CloverLiferay01 * @see trainingpersonalisedparameterscontentstoreModel * @see com.chola.trainingcalendar.model.impl.trainingpersonalisedparameterscontentstoreImpl * @see com.chola.trainingcalendar.model.impl.trainingpersonalisedparameterscontentstoreModelImpl * @generated */ @ImplementationClassName("com.chola.trainingcalendar.model.impl.trainingpersonalisedparameterscontentstoreImpl") @ProviderType public interface trainingpersonalisedparameterscontentstore extends trainingpersonalisedparameterscontentstoreModel, PersistedModel { /* * NOTE FOR DEVELOPERS: * * Never modify this interface directly. Add methods to {@link com.chola.trainingcalendar.model.impl.trainingpersonalisedparameterscontentstoreImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface. */ public static final Accessor<trainingpersonalisedparameterscontentstore, Long> ID_ACCESSOR = new Accessor<trainingpersonalisedparameterscontentstore, Long>() { @Override public Long get( trainingpersonalisedparameterscontentstore trainingpersonalisedparameterscontentstore) { return trainingpersonalisedparameterscontentstore.getId(); } @Override public Class<Long> getAttributeClass() { return Long.class; } @Override public Class<trainingpersonalisedparameterscontentstore> getTypeClass() { return trainingpersonalisedparameterscontentstore.class; } }; }
[ "mehral.mohit09@gmail.com" ]
mehral.mohit09@gmail.com
590f69322de429b966a53e10fefa21a70dc3f6f7
7e90a7dcf87b77e7f38659aea946551162cf6a40
/modules/flowable-ui-modeler/flowable-ui-modeler-logic/src/main/java/org/flowable/app/service/api/AppDefinitionServiceRepresentation.java
1b704d6ed1548ab0769532df9a20a977d6a8e15e
[ "Apache-2.0" ]
permissive
propersoft-cn/flowable-engine
a09e8b2493bb1c4bbdbf83bad085135a317c80ee
fc31003d2f32f6954565502dc8a4cc505500c147
refs/heads/proper-6.2.1
2021-05-09T21:56:51.854651
2018-11-15T08:37:30
2018-11-15T08:37:30
118,738,227
0
8
Apache-2.0
2019-06-06T01:49:22
2018-01-24T08:49:14
Java
UTF-8
Java
false
false
2,165
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.flowable.app.service.api; import java.util.List; import org.flowable.app.model.common.AbstractRepresentation; public class AppDefinitionServiceRepresentation extends AbstractRepresentation { protected String id; protected String name; protected String description; protected Integer version; protected String icon; protected String theme; protected List<String> models; protected String definition; 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; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public String getTheme() { return theme; } public void setTheme(String theme) { this.theme = theme; } public List<String> getModels() { return models; } public void setModels(List<String> models) { this.models = models; } public String getDefinition() { return definition; } public void setDefinition(String definition) { this.definition = definition; } }
[ "tijs.rademakers@gmail.com" ]
tijs.rademakers@gmail.com
ab9e6085b96a5e80c1d36c7028f1520e5ee89e73
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_d528d99e47b83238c2131da3afea2daf6228aa60/Util/13_d528d99e47b83238c2131da3afea2daf6228aa60_Util_t.java
79b18e251321b96b48d6d38b47fa0fbbc39eedb0
[]
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
515
java
package me.limebyte.battlenight.core.Other; import me.limebyte.battlenight.core.BattleNight; import org.bukkit.entity.Player; public class Util { BattleNight plugin = new BattleNight(); public boolean isInTeam(Player player, String team) { if (plugin.BattleUsersTeam.containsKey(player.getName())) { if ((plugin.BattleUsersTeam.get(player.getName()) == team)) { return true; } else { return false; } } else { return false; } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b06e8a4388c6ed33e9af45fc840fd3b90fa14890
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project25/src/main/java/org/gradle/test/performance25_5/Production25_479.java
db74789865fd434bd0cb7123186606ae105bb878
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
305
java
package org.gradle.test.performance25_5; public class Production25_479 extends org.gradle.test.performance11_5.Production11_479 { private final String property; public Production25_479() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
7a934244c7be9808ad52bfa8890ecae81545b76d
781e2692049e87a4256320c76e82a19be257a05d
/all_data/cs61bl/lab02/cs61bl-ci/DateConverter.java
96d17b4edeed497490fa8c829c6b933678a08a17
[]
no_license
itsolutionscorp/AutoStyle-Clustering
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
refs/heads/master
2020-12-11T07:27:19.291038
2016-03-16T03:18:00
2016-03-16T03:18:42
59,454,921
4
0
null
2016-05-23T05:40:56
2016-05-23T05:40:56
null
UTF-8
Java
false
false
1,239
java
import java.io.*; public class DateConverter { // Given a day number in 2008, an integer between 1 and 366, // as a command-line argument, prints the date in month/day format. // Example: java DateConverter 365 // should print 12/30 // The code is missing two assignment statements. public static void main (String[] args) { int dayOfYear = 0; try { dayOfYear = Integer.parseInt (args[0]); } catch (NumberFormatException e) { e.printStackTrace(); } int month, dateInMonth, daysInMonth; month = 1; daysInMonth = 31; while (dayOfYear > daysInMonth) { month ++; dayOfYear -= daysInMonth; // *** Here is one possible place to put assignment statements. if (month == 2) { daysInMonth = 29; } else if (month == 4 || month == 6 || month == 9 || month == 11) { daysInMonth = 30; } else { daysInMonth = 31; } // *** Here is another possible place to put assignment statements. } dateInMonth = dayOfYear; System.out.println (month + "/" + dateInMonth); } }
[ "moghadam.joseph@gmail.com" ]
moghadam.joseph@gmail.com
104e4ea45dcf2534b2824bd4a21dd3da10cc7d92
205ecfb2e3a5b0d4cde43675cf29334538975acf
/FodinaExperiments/src/savers/CausalToCausalPnml.java
7fa15cc32bd5a699de5c8309ef5f465f40dac78a
[]
no_license
Macuyiko/fodina-experiments
420f63aab4db4944d1bddef4b3d15df46c92155b
d9101f2f42233784dd6c408e0c0a5c3127d5b626
refs/heads/master
2020-05-18T16:30:32.868954
2019-11-05T06:31:24
2019-11-05T06:31:24
16,309,024
3
1
null
null
null
null
UTF-8
Java
false
false
811
java
package savers; import java.io.File; import java.io.IOException; import org.processmining.models.graphbased.directed.petrinet.Petrinet; import org.processmining.plugins.bpmnminer.causalnet.CausalNet; import org.processmining.plugins.bpmnminer.converter.CausalNetToPetrinet; import org.processmining.plugins.kutoolbox.utils.ExportUtils; import org.processmining.plugins.kutoolbox.utils.PetrinetUtils; public class CausalToCausalPnml extends AbstractSaver { public void save(File pnmlFile) { CausalNet cnet = (CausalNet) this.getSaveObject(); Object[] result2 = CausalNetToPetrinet.convert(null, cnet); Petrinet pnet = (Petrinet) result2[0]; try { ExportUtils.exportPetriNet(pnet, PetrinetUtils.getInitialMarking(pnet), pnmlFile); } catch (IOException e) { e.printStackTrace(); } } }
[ "macuyiko@gmail.com" ]
macuyiko@gmail.com
749315d5b98523ef80fcbf97e86c2f8a82d00a16
6c546c98b8f4c271194174868730d8f859d2d7c5
/src/com/bergerkiller/bukkit/nolagg/itembuffer/NLIListener.java
82a15b1df5d09d960166d3cd2c2cf9157afce0ee
[]
no_license
Daewoo/NoLagg
91a7cfb21d5d14e8b2a660170f5d4d881790ce5f
f0a94ff1af2245cf8c9a1623ce23ce38e75e0e73
refs/heads/master
2021-01-15T16:37:30.753750
2012-12-30T20:52:12
2012-12-30T20:52:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,634
java
package com.bergerkiller.bukkit.nolagg.itembuffer; import org.bukkit.entity.EntityType; import org.bukkit.entity.Item; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.entity.ItemDespawnEvent; import org.bukkit.event.entity.ItemSpawnEvent; import org.bukkit.event.player.PlayerPickupItemEvent; import org.bukkit.event.world.ChunkLoadEvent; import org.bukkit.event.world.ChunkUnloadEvent; public class NLIListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST) public void onItemSpawn(ItemSpawnEvent event) { if (event.getEntityType() == EntityType.DROPPED_ITEM) { if (!ItemMap.addItem(event.getEntity())) { event.setCancelled(true); } } } public void onItemDespawn(Item item) { if (item.getType() == EntityType.DROPPED_ITEM) { ItemMap.removeItem(item); } } @EventHandler(priority = EventPriority.MONITOR) public void onItemDespawn(ItemDespawnEvent event) { if (!event.isCancelled()) { onItemDespawn(event.getEntity()); } } @EventHandler(priority = EventPriority.MONITOR) public void onItemPickup(PlayerPickupItemEvent event) { if (!event.isCancelled()) { onItemDespawn(event.getItem()); } } @EventHandler(priority = EventPriority.LOWEST) public void onChunkLoad(ChunkLoadEvent event) { ItemMap.loadChunk(event.getChunk()); } @EventHandler(priority = EventPriority.MONITOR) public void onChunkUnload(ChunkUnloadEvent event) { if (!event.isCancelled()) { ItemMap.unloadChunk(event.getChunk()); } } }
[ "bergerkiller@gmail.com" ]
bergerkiller@gmail.com
b6ce90b90c775d261423913afaaaf4b139970f60
5741045375dcbbafcf7288d65a11c44de2e56484
/reddit-decompilada/com/google/android/gms/internal/zzcxo.java
67ab1352659d19bfb261e60bd099db05c21a21d0
[]
no_license
miarevalo10/ReporteReddit
18dd19bcec46c42ff933bb330ba65280615c281c
a0db5538e85e9a081bf268cb1590f0eeb113ed77
refs/heads/master
2020-03-16T17:42:34.840154
2018-05-11T10:16:04
2018-05-11T10:16:04
132,843,706
0
0
null
null
null
null
UTF-8
Java
false
false
858
java
package com.google.android.gms.internal; import android.os.Parcel; import android.os.Parcelable.Creator; import com.google.android.gms.common.internal.zzbr; public final class zzcxo extends zzbfm { public static final Creator<zzcxo> CREATOR = new zzcxp(); private int f18030a; private zzbr f18031b; zzcxo(int i, zzbr com_google_android_gms_common_internal_zzbr) { this.f18030a = i; this.f18031b = com_google_android_gms_common_internal_zzbr; } public zzcxo(zzbr com_google_android_gms_common_internal_zzbr) { this(1, com_google_android_gms_common_internal_zzbr); } public final void writeToParcel(Parcel parcel, int i) { int a = zzbfp.m5536a(parcel); zzbfp.m5540a(parcel, 1, this.f18030a); zzbfp.m5544a(parcel, 2, this.f18031b, i); zzbfp.m5537a(parcel, a); } }
[ "mi.arevalo10@uniandes.edu.co" ]
mi.arevalo10@uniandes.edu.co
d0c4a9f50fe7fe481108fa30c55d814cc4182d14
5b5f90c99f66587cea981a640063a54b6ea75185
/src/main/java/com/coxandkings/travel/operations/enums/manageofflinebooking/CommercialsOperation.java
b0db054235656025318ace8d6b4ab52b2ffe902d
[]
no_license
suyash-capiot/operations
02558d5f4c72a895d4a7e7e743495a118b953e97
b6ad01cbdd60190e3be1f2a12d94258091fec934
refs/heads/master
2020-04-02T06:22:30.589898
2018-10-26T12:11:11
2018-10-26T12:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
168
java
package com.coxandkings.travel.operations.enums.manageofflinebooking; public enum CommercialsOperation { Ammend, Ammmend, Book, Cancel, Payment, Reprice, Search }
[ "sahil@capiot.com" ]
sahil@capiot.com
373678b94418499ee85cbb00e294761807698d6f
d2984ba2b5ff607687aac9c65ccefa1bd6e41ede
/src/net/datenwerke/rs/scripting/client/scripting/dto/pa/AddMenuSeparatorEntryExtensionDtoPA.java
3fc60109a5fa2341f35c9bc42f0e83f7378374cd
[]
no_license
bireports/ReportServer
da979eaf472b3e199e6fbd52b3031f0e819bff14
0f9b9dca75136c2bfc20aa611ebbc7dc24cfde62
refs/heads/master
2020-04-18T10:18:56.181123
2019-01-25T00:45:14
2019-01-25T00:45:14
167,463,795
0
0
null
null
null
null
UTF-8
Java
false
false
2,085
java
/* * ReportServer * Copyright (c) 2018 InfoFabrik GmbH * http://reportserver.net/ * * * This file is part of ReportServer. * * ReportServer is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package net.datenwerke.rs.scripting.client.scripting.dto.pa; import com.google.gwt.core.client.GWT; import com.google.gwt.editor.client.Editor.Path; import com.sencha.gxt.core.client.ValueProvider; import com.sencha.gxt.data.shared.ModelKeyProvider; import com.sencha.gxt.data.shared.PropertyAccess; import java.lang.String; import net.datenwerke.dtoservices.dtogenerator.annotations.CorrespondingPoso; import net.datenwerke.dtoservices.dtogenerator.annotations.GeneratedType; import net.datenwerke.rs.scripting.client.scripting.dto.AddMenuSeparatorEntryExtensionDto; import net.datenwerke.rs.terminal.client.terminal.dto.pa.CommandResultExtensionDtoPA; /** * This file was automatically created by DtoAnnotationProcessor, version 0.1 */ @GeneratedType("net.datenwerke.dtoservices.dtogenerator.DtoAnnotationProcessor") @CorrespondingPoso(net.datenwerke.rs.scripting.service.scripting.extensions.AddMenuSeparatorEntryExtension.class) public interface AddMenuSeparatorEntryExtensionDtoPA extends CommandResultExtensionDtoPA { public static final AddMenuSeparatorEntryExtensionDtoPA INSTANCE = GWT.create(AddMenuSeparatorEntryExtensionDtoPA.class); /* Properties */ public ValueProvider<AddMenuSeparatorEntryExtensionDto,String> menuName(); }
[ "srbala@gmail.com" ]
srbala@gmail.com
510e37035cbc22c74bc21f18700fd1c914113b04
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/ecf/979.java
03209f7be299aa52c94d6abc1f1bbcbedea7fe0d
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
/**************************************************************************** * Copyright (c) 2008 Composent, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Composent, Inc. - initial API and implementation *****************************************************************************/ /**************************************************************************** * Copyright (c) 2004 Composent, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Composent, Inc. - initial API and implementation *****************************************************************************/ package org.eclipse.ecf.tests.provider.jmdns; import org.eclipse.ecf.tests.discovery.DiscoveryContainerTest; public class JMDNSDiscoveryTest extends DiscoveryContainerTest { public JMDNSDiscoveryTest() { super("ecf.discovery.jmdns"); setHostname(System.getProperty("net.mdns.interface", "127.0.0.1")); } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
877a8143e69205be01db1eb1112b5c162eb83bd0
bdebc7a80c87a766fe7e7615f29e552947b97b82
/src/main/java/com/example/demo/train/TrainRestcontroller.java
f8d1b63607ff81667444fb26bbb401636752149a
[]
no_license
ekim197711/springboot-lombok-requiredargsconstructor
af1b7cd324e3386b02af164733c58b6e0ab2121e
36269e45a6fc94b85d5155014dc48743f1b5dc48
refs/heads/master
2022-07-02T14:25:40.743450
2020-05-09T22:44:39
2020-05-09T22:44:39
262,671,918
0
0
null
null
null
null
UTF-8
Java
false
false
485
java
package com.example.demo.train; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequiredArgsConstructor public class TrainRestcontroller { @Qualifier(value="cooltrain") private final Train train; @GetMapping("/train") public Train getTrain(){ return train; } }
[ "mmni@protonmail.com" ]
mmni@protonmail.com
9d6e1b9803d468aff0209ec49dac3e19bb21b1ad
233e63710e871ef841ff3bc44d3660a0c8f8564d
/trunk/gameserver/src/gameserver/utils/chathandlers/ChatCommandsLoader.java
b109c6223b73e8f16cfffaac6b2f8fdda4ea8088
[]
no_license
Wankers/Project
733b6a4aa631a18d28a1b5ba914c02eb34a9f4f6
da6db42f127d5970522038971a8bebb76baa595d
refs/heads/master
2016-09-06T10:46:13.768097
2012-08-01T23:19:49
2012-08-01T23:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,304
java
package gameserver.utils.chathandlers; import commons.scripting.classlistener.ClassListener; import commons.utils.ClassUtils; import java.lang.reflect.Modifier; /** * Created on: 12.09.2009 14:13:24 * * @author Aquanox */ public class ChatCommandsLoader implements ClassListener { private ChatProcessor processor; public ChatCommandsLoader(ChatProcessor processor) { this.processor = processor; } @Override public void postLoad(Class<?>[] classes) { for (Class<?> c : classes) { if (!isValidClass(c)) continue; if (ClassUtils.isSubclass(c, ChatCommand.class)) { @SuppressWarnings("unchecked") Class<? extends ChatCommand> tmp = (Class<? extends ChatCommand>) c; if (tmp != null) try { processor.registerCommand(tmp.newInstance()); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } } processor.onCompileDone(); } @Override public void preUnload(Class<?>[] classes) { } public boolean isValidClass(Class<?> clazz) { final int modifiers = clazz.getModifiers(); if (Modifier.isAbstract(modifiers) || Modifier.isInterface(modifiers)) return false; if (!Modifier.isPublic(modifiers)) return false; return true; } }
[ "sylvanodu14gmail.com" ]
sylvanodu14gmail.com
b52dd83a8985f0e66b29528ba7eb52430c628836
df48dc6e07cdf202518b41924444635f30d60893
/jinx-com4j/src/main/java/com/exceljava/com4j/office/MsoFlipCmd.java
acd0e123a6afa0a75deda5bea195f910f450fdc6
[ "MIT" ]
permissive
ashwanikaggarwal/jinx-com4j
efc38cc2dc576eec214dc847cd97d52234ec96b3
41a3eaf71c073f1282c2ab57a1c91986ed92e140
refs/heads/master
2022-03-29T12:04:48.926303
2020-01-10T14:11:17
2020-01-10T14:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
277
java
package com.exceljava.com4j.office ; import com4j.*; /** */ public enum MsoFlipCmd { /** * <p> * The value of this constant is 0 * </p> */ msoFlipHorizontal, // 0 /** * <p> * The value of this constant is 1 * </p> */ msoFlipVertical, // 1 }
[ "tony@pyxll.com" ]
tony@pyxll.com
5ebcd9065bfcdfbca74c1381e7a09fc625473864
a671a988cfc28470d12e2306f10f52b3b581ca86
/src/main/java/fr/delpharm/esacp/service/dto/StatutDTO.java
f8fba431bfb787b000f567f3bbf1b160905c04ae
[]
no_license
Nicolas-Beauvois/esacp
87b957dcb88caec50b647bfc9b781d0cdcabad32
11d7c9e6e785834d1c8e30d755f8ec70647125c8
refs/heads/main
2023-07-01T13:35:15.875401
2021-08-10T12:27:01
2021-08-10T12:27:01
394,648,148
0
0
null
2021-08-10T12:37:15
2021-08-10T12:37:15
null
UTF-8
Java
false
false
1,175
java
package fr.delpharm.esacp.service.dto; import java.io.Serializable; import java.util.Objects; /** * A DTO for the {@link fr.delpharm.esacp.domain.Statut} entity. */ public class StatutDTO implements Serializable { private Long id; private String statut; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getStatut() { return statut; } public void setStatut(String statut) { this.statut = statut; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof StatutDTO)) { return false; } StatutDTO statutDTO = (StatutDTO) o; if (this.id == null) { return false; } return Objects.equals(this.id, statutDTO.id); } @Override public int hashCode() { return Objects.hash(this.id); } // prettier-ignore @Override public String toString() { return "StatutDTO{" + "id=" + getId() + ", statut='" + getStatut() + "'" + "}"; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
1bf20e828738cd624b463c5645e306d38960a0ba
354ed8b713c775382b1e2c4d91706eeb1671398b
/spring-beans/src/test/java/org/springframework/tests/sample/beans/ITestBean.java
e452161bc3e7d749440ed86b4d08962ecb6687f7
[]
no_license
JessenPan/spring-framework
8c7cc66252c2c0e8517774d81a083664e1ad4369
c0c588454a71f8245ec1d6c12f209f95d3d807ea
refs/heads/master
2021-06-30T00:54:08.230154
2019-10-08T10:20:25
2019-10-08T10:20:25
91,221,166
2
0
null
2017-05-14T05:01:43
2017-05-14T05:01:42
null
UTF-8
Java
false
false
2,054
java
/* * Copyright 2002-2007 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.tests.sample.beans; import java.io.IOException; /** * Interface used for {@link org.springframework.tests.sample.beans.TestBean}. * <p> * <p>Two methods are the same as on Person, but if this * extends person it breaks quite a few tests.. * * @author Rod Johnson * @author Juergen Hoeller */ public interface ITestBean { int getAge(); void setAge(int age); String getName(); void setName(String name); ITestBean getSpouse(); void setSpouse(ITestBean spouse); ITestBean[] getSpouses(); String[] getStringArray(); void setStringArray(String[] stringArray); Integer[][] getNestedIntegerArray(); void setNestedIntegerArray(Integer[][] nestedIntegerArray); Integer[] getSomeIntegerArray(); void setSomeIntegerArray(Integer[] someIntegerArray); int[] getSomeIntArray(); void setSomeIntArray(int[] someIntArray); int[][] getNestedIntArray(); void setNestedIntArray(int[][] someNestedArray); /** * Throws a given (non-null) exception. */ void exceptional(Throwable t) throws Throwable; Object returnsThis(); INestedTestBean getDoctor(); INestedTestBean getLawyer(); IndexedTestBean getNestedIndexedBean(); /** * Increment the age by one. * * @return the previous age */ int haveBirthday(); void unreliableFileOperation() throws IOException; }
[ "jessenpan@qq.com" ]
jessenpan@qq.com
087e7677f4ed913bffff1b898b48707283b335cb
bd2e9fcb13b01071111b2ca141ecd568e33c35dc
/src/main/java/chapter03/section01/thread_3_1_3/pro_1_test1/Test2.java
2ecd95ecd022873b9857512674556c8fe2cce424
[ "Apache-2.0" ]
permissive
turoDog/java-multi-thread-programming
59bf392bcea73da7f5f43c06ff35e87a4b127f8a
cb0d5e1735577fb76e57ec2b53d692c8063d6d66
refs/heads/master
2020-09-03T12:47:58.686757
2019-12-03T15:19:19
2019-12-03T15:19:19
219,465,626
1
0
null
null
null
null
UTF-8
Java
false
false
766
java
package chapter03.section01.thread_3_1_3.pro_1_test1; /** * Project Name:java-multi-thread-programming <br/> * Package Name:chapter03.section01.thread_3_1_3.pro_1_test1 <br/> * Date:2019/11/20 22:06 <br/> * * @author <a href="turodog@foxmail.com">chenzy</a><br/> */ public class Test2 { public static void main(String[] args) { try { String lock = ""; System.out.println("syn上面"); synchronized (lock) { System.out.println("syn第一行"); lock.wait(); System.out.println("wait下的代码!"); } System.out.println("syn下面的代码"); } catch (InterruptedException e) { e.printStackTrace(); } } }
[ "turodog@foxmail.com" ]
turodog@foxmail.com
a6abc8a7a6300846eb78dcd90835d7bcb9bd6bdb
7df450d657bbc281657d083e31384366d9c5a313
/src/main/java/com/dgut/modules/order/entity/dto/RoomOrderDto.java
e2f4e639836b81c7fa7c10582bd3c4a8512d75ac
[]
no_license
bill-bxc/REManager
ef73e2443a51624987858ea63b9ea1a7f59c808c
62face9c18fc185caa26e9ec01e25e4eb3fcd9ff
refs/heads/master
2020-04-13T13:35:58.238882
2017-11-07T13:43:39
2017-11-07T13:43:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,115
java
package com.dgut.modules.order.entity.dto; import java.io.Serializable; import java.util.ArrayList; import java.util.Date; import java.util.List; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import org.springframework.beans.BeanUtils; import org.springframework.data.jpa.domain.Specification; import org.springframework.format.annotation.DateTimeFormat; import com.dgut.modules.customer.entity.Customer; import com.dgut.modules.customer.entity.dto.CustomerDto; import com.dgut.modules.order.entity.RoomOrder; import com.dgut.modules.order.entity.support.AuditedStateEnum; import com.dgut.modules.order.entity.support.SalesTypeEnum; import com.dgut.modules.room.entity.Room; import com.dgut.modules.room.entity.dto.RoomDto; import com.fasterxml.jackson.annotation.JsonFormat; public class RoomOrderDto implements Serializable { /** * 委托单dto */ private static final long serialVersionUID = 1L; private Integer id; @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss") private Date createTime; @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss") private Date auditTime; private AuditedStateEnum auditedState;//审核状态 private String creatorName; private String auditorName; private Double price; private SalesTypeEnum salesType; private String estateName; private String location; private Integer isDistribute; @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss") private Date preTime; @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss") private Date afterTime; private RoomDto roomDto; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @JsonFormat(pattern = "yyyy/MM/dd HH:mm:ss",timezone = "GMT+8") public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getAuditTime() { return auditTime; } public void setAuditTime(Date auditTime) { this.auditTime = auditTime; } public AuditedStateEnum getAuditedState() { return auditedState; } public void setAuditedState(AuditedStateEnum auditedState) { this.auditedState = auditedState; } public Double getPrice() { return price; } public void setPrice(Double price) { this.price = price; } public SalesTypeEnum getSalesType() { return salesType; } public void setSalesType(SalesTypeEnum salesType) { this.salesType = salesType; } public String getEstateName() { return estateName; } public void setEstateName(String estateName) { this.estateName = estateName; } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public Integer getIsDistribute() { return isDistribute; } public void setIsDistribute(Integer isDistribute) { this.isDistribute = isDistribute; } public String getCreatorName() { return creatorName; } public void setCreatorName(String creatorName) { this.creatorName = creatorName; } public String getAuditorName() { return auditorName; } public void setAuditorName(String auditorName) { this.auditorName = auditorName; } @JsonFormat(pattern = "yyyy/MM/dd") public Date getPreTime() { return preTime; } public void setPreTime(Date preTime) { this.preTime = preTime; } @JsonFormat(pattern = "yyyy/MM/dd") public Date getAfterTime() { return afterTime; } public void setAfterTime(Date afterTime) { this.afterTime = afterTime; } public RoomDto getRoomDto() { return roomDto; } public void setRoomDto(RoomDto roomDto) { this.roomDto = roomDto; } public static void entityToDto(RoomOrder roomOrder,RoomOrderDto dto) { RoomDto roomDto = null; BeanUtils.copyProperties(roomOrder, dto); if(roomOrder.getCreator() != null) { dto.setCreatorName(roomOrder.getCreator().getName()); } if(roomOrder.getAuditor() != null) { dto.setAuditorName(roomOrder.getAuditor().getName()); } if(roomOrder.getRoom() != null) { roomDto = new RoomDto(); RoomDto.entityToDto(roomOrder.getRoom(), roomDto); dto.setRoomDto(roomDto); } } public static Specification<RoomOrder> getWhereClause(final RoomOrderDto roomOrderDto) { return new Specification<RoomOrder>() { //predicate.add(cb.like(root.join("employee").get("name").as(String.class),"%"+ businessOrderDto.getEmployeeName()+"%")); public Predicate toPredicate(Root<RoomOrder> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicate = new ArrayList<Predicate>(); if(roomOrderDto.getCreatorName()!=null && !roomOrderDto.getCreatorName().trim().equals("")) { predicate.add(cb.like(root.join("creator").get("name").as(String.class),"%"+ roomOrderDto.getCreatorName()+"%")); } if(roomOrderDto.getAuditorName()!=null && !roomOrderDto.getAuditorName().trim().equals("")) { predicate.add(cb.like(root.join("auditor").get("name").as(String.class),"%"+ roomOrderDto.getAuditorName()+"%")); } if(roomOrderDto.getSalesType() != null && !roomOrderDto.getSalesType().toString().equals("")) { predicate.add(cb.equal(root.get("salesType").as(SalesTypeEnum.class), roomOrderDto.getSalesType())); } if(roomOrderDto.getAuditedState() != null && !roomOrderDto.getAuditedState().toString().equals("")) { predicate.add(cb.equal(root.get("auditedState").as(AuditedStateEnum.class), roomOrderDto.getAuditedState())); } if(roomOrderDto.getIsDistribute() != null && !roomOrderDto.getIsDistribute().toString().equals("")) { predicate.add(cb.equal(root.get("isDistribute").as(Integer.class),roomOrderDto.getIsDistribute())); } if(roomOrderDto.getPreTime() != null && roomOrderDto.getAfterTime() != null) { predicate.add(cb.between(root.get("createTime").as(Date.class),roomOrderDto.getPreTime(), roomOrderDto.getAfterTime())); } return cb.and(predicate.toArray(new Predicate[predicate.size()])); } }; } }
[ "2465824792@qq.com" ]
2465824792@qq.com
3139550a0fc3f17fc19efe5a6aa36a6d29095d9a
27ac00b3add9f332aca7ea88d31468c4ebe58ad5
/project/core/src/com/simplepathstudios/gamelib/ui/Buttons.java
479fb6db5ca0025ae71d965261a729cee00503b7
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
XBigTK13X/sps-gamelib
91124cf8e04ac4a5919438a360192568c299c17c
6d0203836fd4fefa55414d6e59f500d83b31d693
refs/heads/master
2016-09-10T11:59:44.411259
2014-10-10T00:30:19
2014-10-10T00:30:19
1,630,834
1
0
null
2014-08-29T16:09:14
2011-04-18T14:25:52
Java
UTF-8
Java
false
false
4,855
java
package com.simplepathstudios.gamelib.ui; import com.badlogic.gdx.graphics.g2d.Sprite; import com.simplepathstudios.gamelib.bridge.Command; import com.simplepathstudios.gamelib.bridge.DrawDepth; import com.simplepathstudios.gamelib.bridge.DrawDepths; import com.simplepathstudios.gamelib.color.Color; import com.simplepathstudios.gamelib.display.Window; import com.simplepathstudios.gamelib.input.Input; import com.simplepathstudios.gamelib.input.InputWrapper; import com.simplepathstudios.gamelib.states.GameSystem; import com.simplepathstudios.gamelib.states.StateManager; import com.simplepathstudios.gamelib.util.BoundingBox; import com.simplepathstudios.gamelib.util.HitTest; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class Buttons implements GameSystem { public static abstract class User { private BoundingBox _bounds = BoundingBox.empty(); private DrawDepth _depth; private boolean _active = true; private boolean _shouldDraw = true; private Command _command; public User() { _depth = DrawDepths.get("UIButton"); } public void setDepth(DrawDepth depth) { _depth = depth; } public DrawDepth getDepth() { return _depth; } public void setCommand(Command command) { _command = command; } public Command getCommand() { return _command; } public abstract Sprite getSprite(); public abstract void onClick(); public void onMouseDown() { } public void normal() { getSprite().setColor(Color.GRAY.getGdxColor()); } public void over() { getSprite().setColor(Color.LIGHT_GRAY.getGdxColor()); } public BoundingBox getBounds() { BoundingBox.fromDimensions(_bounds, getSprite().getX(), getSprite().getY(), (int) getSprite().getWidth(), (int) getSprite().getHeight()); return _bounds; } public void setActive(boolean active) { _active = active; } public boolean isActive() { return _active; } public void setShouldDraw(boolean shouldDraw) { _shouldDraw = shouldDraw; } public boolean shouldDraw() { return _shouldDraw; } public boolean isBeingClicked() { boolean mouseOver = HitTest.inBox(Input.get().x(), Input.get().y(), getBounds()); boolean mouseDown = Input.get().isMouseDown(false); return mouseOver && mouseDown; } } private enum State { Outside, Over, Clicked } private List<User> _users; private Map<User, State> _states; public Buttons() { _states = new HashMap<>(); _users = new ArrayList<>(); } public void add(User user) { _users.add(user); _states.put(user, null); } private User _highest; @Override public void update() { for (User user : _users) { if (user.isActive()) { boolean mouseOver = HitTest.inBox(Input.get().x(), Input.get().y(), user.getBounds()); boolean mouseDown = Input.get().isMouseDown(); if (mouseDown) { user.onMouseDown(); } if (!mouseOver || _states.get(user) == State.Clicked) { _states.put(user, State.Outside); user.normal(); } if (mouseOver && !mouseDown) { _states.put(user, State.Over); user.over(); } boolean commandActive = (!StateManager.get().isSuspended() && (user.getCommand() != null && InputWrapper.isActive(user.getCommand()))); if ((_states.get(user) == State.Over && mouseOver && mouseDown) || commandActive) { if (_highest == null) { _highest = user; } else if (_highest.getDepth().DrawDepth < user.getDepth().DrawDepth) { _states.put(_highest, State.Outside); _highest.normal(); _highest = user; } } } } if (_highest != null) { _states.put(_highest, State.Clicked); _highest.onClick(); Input.get().setMouseLock(true); _highest = null; } } @Override public void draw() { for (User user : _users) { if (user.shouldDraw() && user.isActive()) { Window.get().schedule(user.getSprite(), user.getDepth()); } } } }
[ "xbigtk13x@gmail.com" ]
xbigtk13x@gmail.com
abb8d9a8c6c21fd10651e9ddbd8c31d5e3e65e48
8a2d792e682720bc2a1d650a6deba46f4f5e537f
/simple-rest-api/src/main/java/com/nex3z/examples/simplerestapi/persistence/model/User.java
7185106843f519bb38e05baeed214d250c8f9545
[]
no_license
nex3z/spring-exercise
f61fa3e864e099799171bf77602f394eb3ef04df
36dafd6edd9375bcfd85cbe858881003d5e79bfb
refs/heads/master
2022-06-24T02:34:47.303414
2021-07-11T13:25:56
2021-07-11T13:25:56
131,864,538
0
0
null
2022-06-17T01:58:05
2018-05-02T14:43:09
Java
UTF-8
Java
false
false
893
java
package com.nex3z.examples.simplerestapi.persistence.model; import com.fasterxml.jackson.annotation.JsonIgnore; import com.nex3z.examples.simplerestapi.persistence.common.IEntity; import com.nex3z.examples.simplerestapi.persistence.common.IHasName; import lombok.Data; import lombok.EqualsAndHashCode; import javax.persistence.*; import java.util.HashSet; import java.util.Set; @Entity @Data @EqualsAndHashCode(exclude = "notes") public class User implements IEntity, IHasName { @Id @GeneratedValue private Long id; @Column(unique = true, length = 64, nullable = false) private String name; @JsonIgnore private String password; @OneToMany(mappedBy = "user") @JsonIgnore private Set<Note> notes = new HashSet<>(); private User() {} public User(String name, String password) { this.name = name; this.password = password; } }
[ "litianxing9@gmail.com" ]
litianxing9@gmail.com
a88c27ff5e8072650ac35227e530fa8a79eb646e
711c549b0ebeddc766d1f53f70471b9198d2a9b4
/app/src/main/java/com/malaab/ya/action/actionyamalaab/admin/ui/users/playgrounds/OwnerPlaygroundsMvpView.java
a1e21bdcd46cc43355a5797b1a4efec6250660f9
[]
no_license
gamal-alghol/ActionYaMalaabAdmin
428be904e41078cdc7c571dba6af61248aa69b23
5d19726285fdab54e2fb255fb06106413dff81c7
refs/heads/master
2023-06-11T06:25:59.000238
2021-06-22T09:17:13
2021-06-22T09:17:13
379,210,124
0
0
null
null
null
null
UTF-8
Java
false
false
363
java
package com.malaab.ya.action.actionyamalaab.admin.ui.users.playgrounds; import com.malaab.ya.action.actionyamalaab.admin.data.network.model.Playground; import com.malaab.ya.action.actionyamalaab.admin.ui.base.MvpView; import java.util.List; public interface OwnerPlaygroundsMvpView extends MvpView { void onGetPlayground(List<Playground> playgrounds); }
[ "gamalorge123@gmail.com" ]
gamalorge123@gmail.com
5dd46041f48c0080b9650d4695f8d309a02b1a27
3c0fa826599d88365689db1c7eef7265f89aa7bb
/main/java/com/shopizer/search/services/field/StringField.java
7a908e1d20b99bc35396c10e145a58ce834beda9
[]
no_license
shopizer-ecommerce/shopizer-search
678d4b4bccfccadbf5c82cc15fb146508d05d93a
70993c59c8cca1ab81f2a5ebf5c865cad7ee22e0
refs/heads/master
2022-11-26T12:37:25.411099
2021-12-15T01:28:23
2021-12-15T01:28:23
31,462,026
19
55
null
2022-11-16T01:20:30
2015-02-28T12:30:13
Java
UTF-8
Java
false
false
155
java
package com.shopizer.search.services.field; public class StringField extends Field { public String getValue() { return (String)super.getValue(); } }
[ "csamson777@yahoo.com" ]
csamson777@yahoo.com
ffebb5e4f5895311492eb14939e11e7105c72db5
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava15/Foo587.java
d55a61a2f6ad71dde0bd834d953465f8a122878c
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
348
java
package applicationModulepackageJava15; public class Foo587 { public void foo0() { new applicationModulepackageJava15.Foo586().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
b67ca5aa6fe2f9e9906b2fa660bd57ce0d65833d
7198994bd71ffb464916bc7f1c3164bb14d65f77
/library/src/main/java/cn/app/library/utils/DeviceUuidFactory.java
09aa6f80c14e257f0d840830533a4ce0f3d390bc
[]
no_license
nakupenda178/lklib
78f00b7f7a0aaf42389107638d810e0c5ffc407b
7cc36badfe0cf8a1d2b17e579c9fd04adf3d3eb7
refs/heads/master
2020-07-05T04:29:54.729597
2018-05-04T06:54:21
2018-05-04T06:54:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,493
java
package cn.app.library.utils; import android.annotation.SuppressLint; import android.content.Context; import android.content.SharedPreferences; import android.provider.Settings; import android.telephony.TelephonyManager; import java.io.UnsupportedEncodingException; import java.util.UUID; /** * Describe:获取Android设备唯一id */ public class DeviceUuidFactory { private static final String PREFS_FILE = "device_id.xml"; private static final String PREFS_DEVICE_ID = "device_id"; private static UUID uuid; public DeviceUuidFactory(Context context) { if (uuid == null) { synchronized (DeviceUuidFactory.class) { if (uuid == null) { final SharedPreferences prefs = context.getSharedPreferences(PREFS_FILE, 0); final String id = prefs.getString(PREFS_DEVICE_ID, null); if (id != null) { // Use the ids previously computed and stored in the prefs file uuid = UUID.fromString(id); } else { @SuppressLint("HardwareIds") final String androidId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); // Use the Android ID unless it's broken, in which case fallback on deviceId, // unless it's not available, then fallback on a random number which we store // to a prefs file try { if (!"9774d56d682e549c".equals(androidId)) { uuid = UUID.nameUUIDFromBytes(androidId.getBytes("utf8")); } else { @SuppressLint("HardwareIds") final String deviceId = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); uuid = deviceId != null ? UUID.nameUUIDFromBytes(deviceId.getBytes("utf8")) : UUID.randomUUID(); } } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } // Write the value out to the prefs file prefs.edit().putString(PREFS_DEVICE_ID, uuid.toString()).apply(); } } } } } public UUID getDeviceUuid() { return uuid; } }
[ "zhaolin.tongwei@gmail.com" ]
zhaolin.tongwei@gmail.com
5be983701a1943cb8e0d0ac37f8a1cc3562ad547
7e43011c818cd95460e02930bec0981b65d032c7
/src/main/java/com/github/badoualy/telegram/tl/api/TLInputMediaVenue.java
b3dd094427c4486a8498088b36263d7684869499
[ "MIT" ]
permissive
shahrivari/kotlogram
48faef9ff5cf1695c18cf02fb4fb3ed8edcc571e
2281523c2a99692087bdcf6b2034bca6b2dc645c
refs/heads/master
2020-09-07T11:37:15.597377
2019-11-10T12:18:56
2019-11-10T12:18:56
220,767,354
0
2
MIT
2019-11-10T09:20:24
2019-11-10T09:20:23
null
UTF-8
Java
false
false
3,521
java
package com.github.badoualy.telegram.tl.api; import com.github.badoualy.telegram.tl.TLContext; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import static com.github.badoualy.telegram.tl.StreamUtils.readTLObject; import static com.github.badoualy.telegram.tl.StreamUtils.readTLString; import static com.github.badoualy.telegram.tl.StreamUtils.writeString; import static com.github.badoualy.telegram.tl.StreamUtils.writeTLObject; import static com.github.badoualy.telegram.tl.TLObjectUtils.SIZE_CONSTRUCTOR_ID; import static com.github.badoualy.telegram.tl.TLObjectUtils.computeTLStringSerializedSize; /** * @author Yannick Badoual yann.badoual@gmail.com * @see <a href="http://github.com/badoualy/kotlogram">http://github.com/badoualy/kotlogram</a> */ public class TLInputMediaVenue extends TLAbsInputMedia { public static final int CONSTRUCTOR_ID = 0x2827a81a; protected TLAbsInputGeoPoint geoPoint; protected String title; protected String address; protected String provider; protected String venueId; private final String _constructor = "inputMediaVenue#2827a81a"; public TLInputMediaVenue() { } public TLInputMediaVenue(TLAbsInputGeoPoint geoPoint, String title, String address, String provider, String venueId) { this.geoPoint = geoPoint; this.title = title; this.address = address; this.provider = provider; this.venueId = venueId; } @Override public void serializeBody(OutputStream stream) throws IOException { writeTLObject(geoPoint, stream); writeString(title, stream); writeString(address, stream); writeString(provider, stream); writeString(venueId, stream); } @Override @SuppressWarnings({"unchecked", "SimplifiableConditionalExpression"}) public void deserializeBody(InputStream stream, TLContext context) throws IOException { geoPoint = readTLObject(stream, context, TLAbsInputGeoPoint.class, -1); title = readTLString(stream); address = readTLString(stream); provider = readTLString(stream); venueId = readTLString(stream); } @Override public int computeSerializedSize() { int size = SIZE_CONSTRUCTOR_ID; size += geoPoint.computeSerializedSize(); size += computeTLStringSerializedSize(title); size += computeTLStringSerializedSize(address); size += computeTLStringSerializedSize(provider); size += computeTLStringSerializedSize(venueId); return size; } @Override public String toString() { return _constructor; } @Override public int getConstructorId() { return CONSTRUCTOR_ID; } public TLAbsInputGeoPoint getGeoPoint() { return geoPoint; } public void setGeoPoint(TLAbsInputGeoPoint geoPoint) { this.geoPoint = geoPoint; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getProvider() { return provider; } public void setProvider(String provider) { this.provider = provider; } public String getVenueId() { return venueId; } public void setVenueId(String venueId) { this.venueId = venueId; } }
[ "yann.badoual@gmail.com" ]
yann.badoual@gmail.com
cab0e0d052ce084643ce4ea63a5cd88210848517
80873a74a3a7c1a07a2b619930e4e708388fb048
/src/jp/mosp/time/dto/settings/impl/TmdWorkTypeChangeRequestDto.java
08c55f2f732c1cf4735727d48bb3aaa8f76fccd4
[]
no_license
ekyan/ccmosp
7fb6272e2f53923b19e46b17a29d4b32a23b1319
924a257e3ecb81707e03dfc81becbf380dd52be3
refs/heads/master
2020-04-11T09:31:35.991354
2018-12-13T20:48:38
2018-12-13T20:48:38
161,681,437
1
0
null
null
null
null
UTF-8
Java
false
false
3,098
java
/* * MosP - Mind Open Source Project http://www.mosp.jp/ * Copyright (C) MIND Co., Ltd. http://www.e-mind.co.jp/ * * This program is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General Public License * as published by the Free Software Foundation, either version 3 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package jp.mosp.time.dto.settings.impl; import java.util.Date; import jp.mosp.framework.base.BaseDto; import jp.mosp.time.dto.settings.WorkTypeChangeRequestDtoInterface; /** * 勤務形態変更申請DTOクラス。 */ public class TmdWorkTypeChangeRequestDto extends BaseDto implements WorkTypeChangeRequestDtoInterface { private static final long serialVersionUID = -1623518599237699480L; /** * レコード識別ID。 */ private long tmdWorkTypeChangeRequestId; /** * 個人ID。 */ private String personalId; /** * 出勤日。 */ private Date requestDate; /** * 勤務回数。 */ private int timesWork; /** * 勤務形態コード。 */ private String workTypeCode; /** * 理由。 */ private String requestReason; /** * ワークフロー番号。 */ private long workflow; @Override public long getTmdWorkTypeChangeRequestId() { return tmdWorkTypeChangeRequestId; } @Override public String getPersonalId() { return personalId; } @Override public Date getRequestDate() { return getDateClone(requestDate); } @Override public int getTimesWork() { return timesWork; } @Override public String getWorkTypeCode() { return workTypeCode; } @Override public String getRequestReason() { return requestReason; } @Override public long getWorkflow() { return workflow; } @Override public void setTmdWorkTypeChangeRequestId(long tmdWorkTypeChangeRequestId) { this.tmdWorkTypeChangeRequestId = tmdWorkTypeChangeRequestId; } @Override public void setPersonalId(String personalId) { this.personalId = personalId; } @Override public void setRequestDate(Date requestDate) { this.requestDate = getDateClone(requestDate); } @Override public void setTimesWork(int timesWork) { this.timesWork = timesWork; } @Override public void setWorkTypeCode(String workTypeCode) { this.workTypeCode = workTypeCode; } @Override public void setRequestReason(String requestReason) { this.requestReason = requestReason; } @Override public void setWorkflow(long workflow) { this.workflow = workflow; } }
[ "dr.sho.fantasista@gmail.com" ]
dr.sho.fantasista@gmail.com
167e07d7b080f6aeb83eb7818155bc0259ac2321
0f5b8ccd8275b2d5dfa947fe6688862706997fc4
/runescape-api/src/main/java/net/runelite/rs/api/RSSequenceDefinition.java
68fc4f676547c429be8b0225a995ae37ad26b94f
[]
no_license
Sundar-Gandu/MeteorLite
6a653c4bb0458562e47088e1d859d8eb7a171460
f415bf93af2a771f920f261690eec4c7ff1b62c2
refs/heads/main
2023-08-31T17:40:57.071420
2021-10-26T07:56:40
2021-10-26T07:56:40
400,632,896
0
1
null
null
null
null
UTF-8
Java
false
false
885
java
package net.runelite.rs.api; import net.runelite.api.Sequence; import net.runelite.api.SequenceDefinition; import net.runelite.mapping.Import; public interface RSSequenceDefinition extends RSNode, SequenceDefinition, Sequence { // @Import("stretches") // boolean getStretches(); // // @Import("maxLoops") // int getMaxLoops(); // // @Import("precedenceAnimating") --- All unused // int getPrecedenceAnimating(); // // @Import("replyMode") // int getReplyMode(); // // @Import("interleaveLeave") // int[] getInterleaveLeave(); @Import("frameCount") @Override int getFrameCount(); @Import("frameIds") @Override int[] getFrameIDs(); @Import("frameLengths") @Override int[] getFrameLengths(); @Import("chatFrameIds") @Override int[] getChatFrameIds(); @Import("transformSpotAnimationModel") RSModel transformSpotAnimationModel(RSModel var1, int var2); }
[ "therealnull@gmail.com" ]
therealnull@gmail.com
6734208ebf29f680b662deab401d5e584eb698bd
c61ed8bd14d9bd2d02f6601b31c5e3819860b495
/system/src/main/java/com/reptilesysem/system/SystemApplication.java
f4d6a873b911eedae1f8bd2ecb1931ebf52276b3
[]
no_license
LuciferMS/universityReptile
e89caa91287e417500e67d935eddc7d006eecd03
5a929b688c2ec41b19246c18f871b52b2a68942f
refs/heads/master
2020-05-09T04:12:32.583210
2019-04-17T13:28:36
2019-04-17T13:28:36
180,983,610
0
0
null
null
null
null
UTF-8
Java
false
false
606
java
package com.reptilesysem.system; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; /** * @author Elliot */ @Slf4j @EnableJpaAuditing @SpringBootApplication public class SystemApplication { public static void main(String[] args) { SpringApplication.run(SystemApplication.class, args); log.info("============ the application has started =========="); } }
[ "2039176261@qq.com" ]
2039176261@qq.com
ee024bb5db1b7f57c11197444862b41e177e8107
e3cc6d2f4634e9edcca23f6b41148654ae2f0f7a
/src/main/java/com/appCrawler/utils/UnZipUtils.java
9720a260e5027d5a09846eb3e6b6749cadd1040c
[]
no_license
buildhappy/webCrawler
c54f36caedb7e3f1418a8cc46f897f846f53b1d1
109f0d1acadf38da1985e147238c80715480ead2
refs/heads/master
2020-05-19T20:56:07.168001
2015-09-15T07:11:46
2015-09-15T07:11:46
42,501,826
0
1
null
null
null
null
UTF-8
Java
false
false
3,566
java
package com.appCrawler.utils; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.zip.CRC32; import java.util.zip.CheckedInputStream; import java.util.zip.CheckedOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; /** * ZIP压缩工具 * * @author 梁栋 * @since 1.0 */ public class UnZipUtils { public static final String EXT = ".zip"; private static final String BASE_DIR = ""; private static final String PATH = File.separator; private static final int BUFFER = 1024; /** * put the unzip file to the current path * @param srcPath:the source file path * @throws Exception */ public static void decompress(String srcPath) throws Exception { File srcFile = new File(srcPath); //decompress(srcFile); String basePath = srcFile.getParent(); decompress(srcFile, basePath); } /** * put the unzip file to the current path; delete the zip file when unzip done * @param srcPath:the source file path * @throws Exception */ public static void decompressAndDelete(String srcPath) throws Exception { File srcFile = new File(srcPath); //decompress(srcFile); String basePath = srcFile.getParent(); decompress(srcFile, basePath); srcFile.delete(); } /** * put the unzip file to specified path * * @param srcPath:the zip file path * @param destPath:the destination of unzip file * @throws Exception */ public static void decompress(String srcPath, String destPath) throws Exception { File srcFile = new File(srcPath); decompress(srcFile, destPath); } /** * unzip the file to specified path; * * @param srcFile:the zip file * @param destPath * @throws Exception */ public static void decompress(File srcFile, String destPath) throws Exception { //decompress(srcFile, new File(destPath)); CheckedInputStream cis = new CheckedInputStream(new FileInputStream(srcFile), new CRC32()); ZipInputStream zis = new ZipInputStream(cis); decompress(new File(destPath), zis); zis.close(); } private static void decompress(File destFile, ZipInputStream zis) throws Exception { ZipEntry entry = null; //only get the apk file while ((entry = zis.getNextEntry()) != null && (entry.getName().endsWith(".apk"))) { //System.out.println("entry:" + entry.getName()); // 文件 String dir = destFile.getPath() + File.separator + entry.getName(); File dirFile = new File(dir); // 文件检查 fileProber(dirFile); if (entry.isDirectory()) { dirFile.mkdirs(); } else { decompressFile(dirFile, zis); } zis.closeEntry(); } } /** * 文件探针 * 当父目录不存在时,创建目录! * @param dirFile */ private static void fileProber(File dirFile) { File parentFile = dirFile.getParentFile(); if (!parentFile.exists()) { // 递归寻找上级目录 fileProber(parentFile); parentFile.mkdir(); } } /** * 文件解压缩 * * @param destFile * 目标文件 * @param zis * ZipInputStream * @throws Exception */ private static void decompressFile(File destFile, ZipInputStream zis) throws Exception { BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(destFile)); int count; byte data[] = new byte[BUFFER]; while ((count = zis.read(data, 0, BUFFER)) != -1) { bos.write(data, 0, count); } bos.close(); } }
[ "buildhappy512@163.com" ]
buildhappy512@163.com
11aa89839d837a24d9395f61c93fe0587a53d8ea
803a781caaffbc69db16cc64ea816f2fb41a4b2d
/app/src/main/java/com/rxjy/rxdesign/utils/AutoUtils.java
2cb2492e017bfcf65bb82b72b3af58263c193e82
[]
no_license
WCYu/RXDesign
803d7dfc828bc576caa1e7fda84d4bac79d2a096
b7352cc614fa874fb398a088ff21e778c73557b4
refs/heads/master
2020-03-24T06:44:05.647719
2018-08-09T11:21:15
2018-08-09T11:21:15
142,539,633
0
0
null
null
null
null
UTF-8
Java
false
false
4,924
java
package com.rxjy.rxdesign.utils; import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.util.TypedValue; import android.view.Display; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; /** * @author 这是一个进行屏幕适配的类 */ public class AutoUtils { private static int displayWidth; private static int displayHeight; private static int designWidth; private static int designHeight; private static double textPixelsRate; public static void setSize(Activity act, boolean hasStatusBar, int designWidth, int designHeight) { if (act == null || designWidth < 1 || designHeight < 1) return; Display display = act.getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); if (hasStatusBar) { height -= getStatusBarHeight(act); } AutoUtils.displayWidth = width; AutoUtils.displayHeight = height; AutoUtils.designWidth = designWidth; AutoUtils.designHeight = designHeight; double displayDiagonal = Math.sqrt(Math.pow(AutoUtils.displayWidth, 2) + Math.pow(AutoUtils.displayHeight, 2)); double designDiagonal = Math.sqrt(Math.pow(AutoUtils.designWidth, 2) + Math.pow(AutoUtils.designHeight, 2)); AutoUtils.textPixelsRate = displayDiagonal / designDiagonal; } public static int getStatusBarHeight(Context context) { int result = 0; try { int resourceId = context.getResources().getIdentifier( "status_bar_height", "dimen", "android"); if (resourceId > 0) { result = context.getResources().getDimensionPixelSize( resourceId); } } catch (Resources.NotFoundException e) { e.printStackTrace(); } return result; } public static void auto(Activity act) { if (act == null || displayWidth < 1 || displayHeight < 1) return; View view = act.getWindow().getDecorView(); auto(view); } public static void auto(View view) { if (view == null || displayWidth < 1 || displayHeight < 1) return; AutoUtils.autoTextSize(view); AutoUtils.autoSize(view); AutoUtils.autoPadding(view); AutoUtils.autoMargin(view); if (view instanceof ViewGroup) { auto((ViewGroup) view); } } private static void auto(ViewGroup viewGroup) { int count = viewGroup.getChildCount(); for (int i = 0; i < count; i++) { View child = viewGroup.getChildAt(i); if (child != null) { auto(child); } } } public static void autoMargin(View view) { if (!(view.getLayoutParams() instanceof ViewGroup.MarginLayoutParams)) return; ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) view.getLayoutParams(); if (lp == null) return; lp.leftMargin = getDisplayWidthValue(lp.leftMargin); lp.topMargin = getDisplayHeightValue(lp.topMargin); lp.rightMargin = getDisplayWidthValue(lp.rightMargin); lp.bottomMargin = getDisplayHeightValue(lp.bottomMargin); } public static void autoPadding(View view) { int l = view.getPaddingLeft(); int t = view.getPaddingTop(); int r = view.getPaddingRight(); int b = view.getPaddingBottom(); l = getDisplayWidthValue(l); t = getDisplayHeightValue(t); r = getDisplayWidthValue(r); b = getDisplayHeightValue(b); view.setPadding(l, t, r, b); } public static void autoSize(View view) { ViewGroup.LayoutParams lp = view.getLayoutParams(); if (lp == null) return; if (lp.width > 0) { lp.width = getDisplayWidthValue(lp.width); } if (lp.height > 0) { lp.height = getDisplayHeightValue(lp.height); } } public static void autoTextSize(View view) { if (view instanceof TextView) { double designPixels = ((TextView) view).getTextSize(); double displayPixels = textPixelsRate * designPixels; ((TextView) view).setIncludeFontPadding(false); ((TextView) view).setTextSize(TypedValue.COMPLEX_UNIT_PX, (float) displayPixels); } } public static int getDisplayWidthValue(int designWidthValue) { if (designWidthValue < 2) { return designWidthValue; } return designWidthValue * displayWidth / designWidth; } public static int getDisplayHeightValue(int designHeightValue) { if (designHeightValue < 2) { return designHeightValue; } return designHeightValue * displayHeight / designHeight; } }
[ "13466941275@163.com" ]
13466941275@163.com
fcac11c71fbd9bb2b0ea625c19f2cd8a0476114f
c96b0be86c08f639d388498851384706a3c87815
/KCX-Mapping-Convert/src/com/kewill/kcx/component/mapping/formats/fss/aes/subsets/V60/TsATP.java
47939f4f68445d69725bb1d705e6ab27fe304cae
[]
no_license
joelsousa/KCX-Mapping-Convert
cf1b4b785af839f6f369bcdf539bd023d4478f72
9da4b25db31f5b1dfbefd279eb76c555f3977c0e
refs/heads/master
2020-06-07T12:06:43.517765
2014-10-03T14:14:51
2014-10-03T14:14:51
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
7,115
java
/* * Funktion : TsATP.java * Titel : * Erstellt : 03.09.2008 * Author : Elisabeth Iwaniuk * Beschreibung: * Anmerkungen : 06.03.2009 - V60 checked * */ package com.kewill.kcx.component.mapping.formats.fss.aes.subsets.V60; import java.util.List; import java.util.Vector; import com.kewill.kcx.component.mapping.formats.fss.common.Teilsatz; import com.kewill.kcx.component.mapping.util.Utils; import com.kewill.kcx.component.mapping.formats.fss.aes.subsets.V60.TsATI; public class TsATP extends Teilsatz { private String beznr = ""; // Bezugsnummer private String posnr = ""; // Positionsnummer private String meaest = ""; // Maßeinheit private String menge = ""; // Menge private String uland = ""; // Ursprungsland private String kzwert = ""; // Kennzeichen Schätzwert private String zfnai = ""; // Zahlungsfall private String apgket = ""; // Anpassungskoeffizient private String anwrta = ""; // Anteilswert A private String anwrtb = ""; // Anteilswert B private String anwrtc = ""; // Anteilswert C private String anwrtd = ""; // Anteilswert D private String wberg1 = ""; // Warenbezeichnung (erste Ergänzug) private String wberg2 = ""; // Warenbezeichnung (zweite Ergänzug) private String asvfr = ""; // Verfahren Azsfuhrerstattung //AK20090407 private List <TsATI> atiList = null; public TsATP() { tsTyp = "ATP"; } public void setFields(String[] fields) { int size = fields.length; String ausgabe = "FSS: "+fields[0]+" size = "+ size; //Utils.log( ausgabe); if (size < 1 ) return; tsTyp = fields[0]; if (size < 2 ) return; beznr = fields[1]; if (size < 3 ) return; posnr = fields[2]; if (size < 4 ) return; meaest = fields[3]; if (size < 5 ) return; menge = fields[4]; if (size < 6 ) return; uland = fields[5]; if (size < 7 ) return; kzwert = fields[6]; if (size < 8 ) return; zfnai = fields[7]; if (size < 9 ) return; apgket = fields[8]; if (size < 10 ) return; anwrta = fields[9]; if (size < 11 ) return; anwrtb = fields[10]; if (size < 12 ) return; anwrtc = fields[11]; if (size < 13 ) return; anwrtd = fields[12]; if (size < 14 ) return; wberg1 = fields[13]; if (size < 15 ) return; wberg2 = fields[14]; if (size < 16 ) return; asvfr = fields[15]; } public String teilsatzBilden() { StringBuffer buff = new StringBuffer(); buff = buff.append(tsTyp); buff = buff.append(trenner); buff = buff.append(beznr); buff = buff.append(trenner); buff = buff.append(posnr); buff = buff.append(trenner); buff = buff.append(meaest); buff = buff.append(trenner); buff = buff.append(menge); buff = buff.append(trenner); buff = buff.append(uland); buff = buff.append(trenner); buff = buff.append(kzwert); buff = buff.append(trenner); buff = buff.append(zfnai); buff = buff.append(trenner); buff = buff.append(apgket); buff = buff.append(trenner); buff = buff.append(anwrta); buff = buff.append(trenner); buff = buff.append(anwrtb); buff = buff.append(trenner); buff = buff.append(anwrtc); buff = buff.append(trenner); buff = buff.append(anwrtd); buff = buff.append(trenner); buff = buff.append(wberg1); buff = buff.append(trenner); buff = buff.append(wberg2); buff = buff.append(trenner); buff = buff.append(asvfr); buff = buff.append(trenner); return new String(buff); } public String getBeznr() { return beznr; } public void setBeznr(String beznr) { this.beznr = Utils.checkNull(beznr); } public String getPosnr() { return posnr; } public void setPosnr(String posnr) { this.posnr = Utils.checkNull(posnr); } public String getMeaest() { return meaest; } public void setMeaest(String meaest) { this.meaest = Utils.checkNull(meaest); } public String getMenge() { return menge; } public void setMenge(String menge) { this.menge = Utils.checkNull(menge); } public String getUland() { return uland; } public void setUland(String uland) { this.uland = Utils.checkNull(uland); } public String getKzwert() { return kzwert; } public void setKzwert(String kzwert) { this.kzwert = Utils.checkNull(kzwert); } public String getZfnai() { return zfnai; } public void setZfnai(String zfnai) { this.zfnai = Utils.checkNull(zfnai); } public String getApgket() { return apgket; } public void setApgket(String apgket) { this.apgket = Utils.checkNull(apgket); } public String getAnwrta() { return anwrta; } public void setAnwrta(String anwrta) { this.anwrta = Utils.checkNull(anwrta); } public String getAnwrtb() { return anwrtb; } public void setAnwrtb(String anwrtb) { this.anwrtb = Utils.checkNull(anwrtb); } public String getAnwrtc() { return anwrtc; } public void setAnwrtc(String anwrtc) { this.anwrtc = Utils.checkNull(anwrtc); } public String getAnwrtd() { return anwrtd; } public void setAnwrtd(String anwrtd) { this.anwrtd = Utils.checkNull(anwrtd); } public String getWberg1() { return wberg1; } public void setWberg1(String wberg1) { this.wberg1 = Utils.checkNull(wberg1); } public String getWberg2() { return wberg2; } public void setWberg2(String wberg2) { this.wberg2 = Utils.checkNull(wberg2); } public String getAsvfr() { return asvfr; } public void setAsvfr(String asvfr) { this.asvfr = Utils.checkNull(asvfr); } public boolean isEmpty() { if ( Utils.isStringEmpty(meaest) && Utils.isStringEmpty(menge) && Utils.isStringEmpty(uland) && Utils.isStringEmpty(kzwert) && Utils.isStringEmpty(zfnai) && Utils.isStringEmpty(apgket) && Utils.isStringEmpty(anwrta) && Utils.isStringEmpty(anwrtb) && Utils.isStringEmpty(anwrtc) && Utils.isStringEmpty(anwrtd) && Utils.isStringEmpty(wberg1) && Utils.isStringEmpty(wberg2) && Utils.isStringEmpty(asvfr) ) return true; else return false; } //AK20090407 public List<TsATI> getAtiList() { return atiList; } public void setAtiList(List<TsATI> atiList) { this.atiList = atiList; } public void addAtiList(TsATI ati){ if ( ati == null) return; if(atiList==null){ atiList=new Vector<TsATI>(); } atiList.add(ati); } }
[ "joel@moredata.pt" ]
joel@moredata.pt
1396afb1cddb8f890565746e0bfbeec3c5d647fd
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/model_seeding/80_wheelwebtool-wheel.components.RenderableComponentConfiguration-0.5-1/wheel/components/RenderableComponentConfiguration_ESTest.java
a063798251d6fb625a45547c7b71da4532bc5737
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
686
java
/* * This file was automatically generated by EvoSuite * Tue Oct 29 08:49:51 GMT 2019 */ package wheel.components; 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(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class RenderableComponentConfiguration_ESTest extends RenderableComponentConfiguration_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
c867c416493840a61d4985a65c9d5ae809e0e337
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/com/google/zxing/InvertedLuminanceSource.java
06b82003d6910d95568f3423f68523db21bbc2f1
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
1,946
java
package com.google.zxing; public final class InvertedLuminanceSource extends LuminanceSource { public final LuminanceSource c; public InvertedLuminanceSource(LuminanceSource luminanceSource) { super(luminanceSource.getWidth(), luminanceSource.getHeight()); this.c = luminanceSource; } @Override // com.google.zxing.LuminanceSource public LuminanceSource crop(int i, int i2, int i3, int i4) { return new InvertedLuminanceSource(this.c.crop(i, i2, i3, i4)); } @Override // com.google.zxing.LuminanceSource public byte[] getMatrix() { byte[] matrix = this.c.getMatrix(); int height = getHeight() * getWidth(); byte[] bArr = new byte[height]; for (int i = 0; i < height; i++) { bArr[i] = (byte) (255 - (matrix[i] & 255)); } return bArr; } @Override // com.google.zxing.LuminanceSource public byte[] getRow(int i, byte[] bArr) { byte[] row = this.c.getRow(i, bArr); int width = getWidth(); for (int i2 = 0; i2 < width; i2++) { row[i2] = (byte) (255 - (row[i2] & 255)); } return row; } @Override // com.google.zxing.LuminanceSource public LuminanceSource invert() { return this.c; } @Override // com.google.zxing.LuminanceSource public boolean isCropSupported() { return this.c.isCropSupported(); } @Override // com.google.zxing.LuminanceSource public boolean isRotateSupported() { return this.c.isRotateSupported(); } @Override // com.google.zxing.LuminanceSource public LuminanceSource rotateCounterClockwise() { return new InvertedLuminanceSource(this.c.rotateCounterClockwise()); } @Override // com.google.zxing.LuminanceSource public LuminanceSource rotateCounterClockwise45() { return new InvertedLuminanceSource(this.c.rotateCounterClockwise45()); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
6c9afd5fe437b117fd1ccd8ec2cd28c90b543100
a22bd4d0134e9401ab8216393490d3d2151fc22e
/rain-common/rain-common-util/src/main/java/com/rao/util/common/CheckAgentUtil.java
ef1656b3ec0c8f73b74e11e9ac12694af3bf9c49
[]
no_license
liushencreator/rain
fa75deee369e3463b58a1842cf2e7cfc60a261b3
cf88a986a515de90b89d2fc82bedd9f06649bfe5
refs/heads/master
2020-12-08T10:36:30.095572
2020-01-10T03:04:50
2020-01-10T03:04:50
232,959,659
1
0
null
2020-01-10T03:41:34
2020-01-10T03:41:34
null
UTF-8
Java
false
false
962
java
package com.rao.util.common; /** * 检查终端类型工具类 * * @author raojing * @date 2019/8/6 22:25 */ public class CheckAgentUtil { //定义移动端请求的所有可能类型 private final static String[] agent = {"Android", "iPhone", "iPod", "iPad", "Windows Phone", "MQQBrowser"}; /** * 判断终端是否为手机端 * @param ua * @return */ public static boolean checkAgentIsMobile(String ua) { boolean flag = false; if (!ua.contains("Windows NT") || (ua.contains("Windows NT") && ua.contains("compatible; MSIE 9.0;"))) { // 排除 苹果桌面系统 if (!ua.contains("Windows NT") && !ua.contains("Macintosh")) { for (String item : agent) { if (ua.contains(item)) { flag = true; break; } } } } return flag; } }
[ "1770561005@qq.com" ]
1770561005@qq.com
7b0bc95ab6df2bbb45a04a1faa5f108830b416f2
522c4abef6c0410d52dd5b8433bf4487d46c1c25
/efamily-common/src/main/java/com/winterframework/efamily/service/impl/OrgComFenceServiceImpl.java
58e97bf4caa99e311c0d1d43e0251a35b927fbb7
[]
no_license
xjiafei/efamily
05b1c71e1f7f485132e5d6243e7af7208b567517
0401d6ec572c7959721c294408f6d525e3d12866
refs/heads/master
2020-03-10T11:42:00.359799
2018-04-13T08:13:58
2018-04-13T08:13:58
129,361,914
0
3
null
null
null
null
UTF-8
Java
false
false
1,117
java
package com.winterframework.efamily.service.impl; import javax.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.winterframework.efamily.base.exception.BizException; import com.winterframework.efamily.base.model.Context; import com.winterframework.efamily.core.base.BaseServiceImpl; import com.winterframework.efamily.dao.IOrgComFenceDao; import com.winterframework.efamily.entity.OrgFence; import com.winterframework.efamily.service.IOrgComFenceService; @Service("orgComFenceServiceImpl") @Transactional(rollbackFor = Exception.class) public class OrgComFenceServiceImpl extends BaseServiceImpl<IOrgComFenceDao,OrgFence> implements IOrgComFenceService { @Resource(name="orgComFenceDaoImpl") private IOrgComFenceDao dao; @Override protected IOrgComFenceDao getEntityDao() { // TODO Auto-generated method stub return dao; } public void deleteOrgFence(Context ctx,Long fenceId) throws BizException{ OrgFence orgFence = getEntityDao().getById(fenceId); orgFence.setStatus(0); save(ctx, orgFence); } }
[ "xjiafei126@126.com" ]
xjiafei126@126.com
ba0c61a58e01ab092c0af87dc8a301b73d97e504
96d7f027743fb13e627ae532617193d684d1c111
/app/src/main/java/com/wuyou/merchant/mvp/account/CreateAccountActivity.java
daff2f3cc838037521ecd6f6b035aaed1ff60651
[]
no_license
meiniepan/mei-2
0b756a77dce8fe29eef58b020d39ad28970f9e62
100e5a2eda0d2184539b609ab69d9cb6313ab438
refs/heads/master
2020-04-18T01:49:40.207212
2019-01-16T09:17:30
2019-01-16T09:17:30
167,136,207
0
1
null
null
null
null
UTF-8
Java
false
false
4,383
java
package com.wuyou.merchant.mvp.account; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import com.gs.buluo.common.utils.AppManager; import com.gs.buluo.common.utils.ToastUtils; import com.wuyou.merchant.CarefreeDaoSession; import com.wuyou.merchant.Constant; import com.wuyou.merchant.R; import com.wuyou.merchant.util.CounterDisposableObserver; import com.wuyou.merchant.util.EncryptUtil; import com.wuyou.merchant.util.RxUtil; import com.wuyou.merchant.view.activity.BaseActivity; import java.util.regex.Matcher; import java.util.regex.Pattern; import butterknife.BindView; import butterknife.OnClick; /** * Created by Solang on 2018/9/10. */ public class CreateAccountActivity extends BaseActivity<WalletContract.View, WalletContract.Presenter> implements WalletContract.View { @BindView(R.id.et_account_name) EditText etAccountName; @BindView(R.id.btn_random) Button btnRandom; @BindView(R.id.tv_phone_num) TextView tvPhoneNum; @BindView(R.id.et_input_captcha) EditText etInputCaptcha; @BindView(R.id.btn_obtain_captcha) Button btnObtainCaptcha; @BindView(R.id.tv_captcha_error) TextView tvCaptchaError; @BindView(R.id.btn_create_1) Button btnCreate1; @Override protected void bindView(Bundle savedInstanceState) { setTitleText(getString(R.string.create_account)); tvPhoneNum.setText(CarefreeDaoSession.getInstance().getUserInfo().getPhone()); } @Override protected int getContentLayout() { return R.layout.activity_create_account; } private CounterDisposableObserver observer; @OnClick({R.id.btn_random, R.id.btn_obtain_captcha, R.id.btn_create_1}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.btn_random: etAccountName.setText(EncryptUtil.getRandomString(12)); break; case R.id.btn_obtain_captcha: observer = new CounterDisposableObserver(btnObtainCaptcha); RxUtil.countdown(Constant.COUNT_DOWN).subscribe(observer); mPresenter.getCaptcha(Constant.CAPTCHA_NEW_ACCOUNT, tvPhoneNum.getText().toString().trim()); etInputCaptcha.requestFocus(); break; case R.id.btn_create_1: if (etAccountName.length() == 0) { ToastUtils.ToastMessage(getCtx(), "请输入账户名称"); return; } String regex = "[a-z]([a-z]|[1-5]){11}"; Pattern p = Pattern.compile(regex); Matcher m = p.matcher(etAccountName.getText().toString()); if (!m.matches()) { ToastUtils.ToastMessage(getCtx(), "账户名称格式不正确!"); return; } if (etInputCaptcha.length() == 0) { ToastUtils.ToastMessage(getCtx(), "请输入验证码"); return; } showLoadingDialog(); // mPresenter.checkCaptcha(Constant.CAPTCHA_CHECK_NEW_ACCOUNT, tvPhoneNum.getText().toString(), etInputCaptcha.getText().toString().trim()); mPresenter.createAccount(etAccountName.getText().toString(), tvPhoneNum.getText().toString()); break; } } @Override protected WalletContract.Presenter getPresenter() { return new WalletPresenter(); } @Override public void createAccountSuccess() { Intent intent = new Intent(getCtx(), CreateAccountSuccessActivity.class); startActivity(intent); finish(); AppManager.getAppManager().finishActivity(CreateOrImportAccountActivity.class); } @Override public void checkCaptchaSuccess() { mPresenter.createAccount(etAccountName.getText().toString(), tvPhoneNum.getText().toString()); } @Override protected void onDestroy() { super.onDestroy(); if (observer != null) observer.dispose(); } @Override public void showError(String message, int res) { if (res == Constant.GET_CAPTCHA_FAIL) { observer.onComplete(); } ToastUtils.ToastMessage(getCtx(), message); } }
[ "hjn910@163.com" ]
hjn910@163.com
03ef22fb03e1c0cf2fb1ec6ff2f45717bac1bd73
c885ef92397be9d54b87741f01557f61d3f794f3
/tests-without-trycatch/Jsoup-92/org.jsoup.parser.Token/BBC-F0-opt-100/21/org/jsoup/parser/Token_ESTest_scaffolding.java
c66a76f6b3b873681e5ad44a5c0e7b61c2562a66
[ "CC-BY-4.0", "MIT" ]
permissive
pderakhshanfar/EMSE-BBC-experiment
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
fea1a92c2e7ba7080b8529e2052259c9b697bbda
refs/heads/main
2022-11-25T00:39:58.983828
2022-04-12T16:04:26
2022-04-12T16:04:26
309,335,889
0
1
null
2021-11-05T11:18:43
2020-11-02T10:30:38
null
UTF-8
Java
false
false
6,979
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Oct 22 18:20:33 GMT 2021 */ package org.jsoup.parser; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class Token_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.jsoup.parser.Token"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100; org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED; org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT(); org.evosuite.runtime.classhandling.JDKClassResetter.init(); setSystemProperties(); initializeClasses(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler(); org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks(); org.evosuite.runtime.classhandling.JDKClassResetter.reset(); resetClasses(); org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } public static void setSystemProperties() { /*No java.lang.System property to set*/ } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Token_ESTest_scaffolding.class.getClassLoader() , "org.jsoup.internal.StringUtil", "org.jsoup.select.NodeVisitor", "org.jsoup.nodes.Document$QuirksMode", "org.jsoup.parser.Token$EOF", "org.jsoup.parser.Token$StartTag", "org.jsoup.select.Evaluator$AttributeWithValueStarting", "org.jsoup.select.Evaluator$IndexGreaterThan", "org.jsoup.nodes.LeafNode", "org.jsoup.select.Evaluator$IndexEvaluator", "org.jsoup.nodes.Entities$CoreCharset", "org.jsoup.select.Evaluator$AttributeWithValueMatching", "org.jsoup.select.Evaluator$Matches", "org.jsoup.select.Evaluator$AttributeWithValueEnding", "org.jsoup.nodes.Element", "org.jsoup.select.Evaluator$Class", "org.jsoup.UncheckedIOException", "org.jsoup.parser.Token", "org.jsoup.select.Evaluator$AttributeKeyPair", "org.jsoup.select.Evaluator$MatchesOwn", "org.jsoup.parser.ParseSettings", "org.jsoup.parser.Token$Character", "org.jsoup.parser.Tag", "org.jsoup.nodes.Node", "org.jsoup.select.Evaluator$Attribute", "org.jsoup.parser.Token$EndTag", "org.jsoup.nodes.Document", "org.jsoup.select.Evaluator$AttributeStarting", "org.jsoup.select.Evaluator$ContainsOwnText", "org.jsoup.nodes.Entities", "org.jsoup.parser.Token$CData", "org.jsoup.select.Evaluator$AttributeWithValueContaining", "org.jsoup.select.Evaluator$AllElements", "org.jsoup.nodes.Attributes", "org.jsoup.select.Evaluator$IndexLessThan", "org.jsoup.nodes.TextNode", "org.jsoup.select.Evaluator$AttributeWithValue", "org.jsoup.select.Evaluator$AttributeWithValueNot", "org.jsoup.nodes.Entities$EscapeMode", "org.jsoup.nodes.BooleanAttribute", "org.jsoup.SerializationException", "org.jsoup.nodes.Document$OutputSettings", "org.jsoup.select.Evaluator$ContainsText", "org.jsoup.nodes.EntitiesData", "org.jsoup.select.Evaluator", "org.jsoup.select.Evaluator$Id", "org.jsoup.internal.Normalizer", "org.jsoup.select.Evaluator$IndexEquals", "org.jsoup.helper.Validate", "org.jsoup.parser.Token$Tag", "org.jsoup.nodes.XmlDeclaration", "org.jsoup.parser.Token$Doctype", "org.jsoup.parser.Token$TokenType", "org.jsoup.nodes.Attribute", "org.jsoup.parser.CharacterReader", "org.jsoup.parser.Token$Comment", "org.jsoup.select.Evaluator$Tag", "org.jsoup.nodes.Document$OutputSettings$Syntax", "org.jsoup.parser.Token$1" ); } private static void resetClasses() { org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Token_ESTest_scaffolding.class.getClassLoader()); org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses( "org.jsoup.parser.Token", "org.jsoup.parser.Token$TokenType", "org.jsoup.parser.Token$Character", "org.jsoup.parser.Token$CData", "org.jsoup.parser.Token$Doctype", "org.jsoup.parser.Token$Tag", "org.jsoup.parser.Token$StartTag", "org.jsoup.nodes.Attributes", "org.jsoup.helper.Validate", "org.jsoup.parser.Token$EOF", "org.jsoup.internal.Normalizer", "org.jsoup.parser.Token$EndTag", "org.jsoup.parser.Token$Comment", "org.jsoup.nodes.Attribute", "org.jsoup.internal.StringUtil", "org.jsoup.nodes.Node", "org.jsoup.nodes.Element", "org.jsoup.nodes.Document", "org.jsoup.parser.ParseSettings", "org.jsoup.parser.Tag", "org.jsoup.nodes.Document$OutputSettings", "org.jsoup.nodes.EntitiesData", "org.jsoup.nodes.Document$OutputSettings$Syntax", "org.jsoup.nodes.Entities", "org.jsoup.parser.CharacterReader", "org.jsoup.nodes.Entities$EscapeMode", "org.jsoup.nodes.Document$QuirksMode", "org.jsoup.nodes.Entities$CoreCharset", "org.jsoup.nodes.Entities$1", "org.jsoup.nodes.Attributes$1", "org.jsoup.parser.Parser", "org.jsoup.parser.Tokeniser", "org.jsoup.parser.ParseErrorList", "org.jsoup.parser.TokeniserState", "org.jsoup.nodes.Attributes$Dataset", "org.jsoup.nodes.BooleanAttribute" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com