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
de67b57a26fc1b5a63ac54cf2d0d25e25d6d4a28
96d817e3a70d7e9de2adffb7e87d492668c61f4e
/datavault-broker/src/test/java/org/datavaultplatform/common/model/dao/DepositReviewDAOIT.java
302f2ee04e056b34ee1504327bd525218aa2f2c8
[ "MIT" ]
permissive
DataVault/datavault
8b97c49ab714486cce2ec8295e7951ef95006e97
e5ea8363f5e945beb77039de9239e365322f79cd
refs/heads/master
2023-08-31T15:55:42.044152
2023-03-07T08:10:19
2023-03-07T08:10:19
36,649,267
25
19
MIT
2023-09-13T15:12:06
2015-06-01T08:57:03
Java
UTF-8
Java
false
false
5,236
java
package org.datavaultplatform.common.model.dao; import static org.datavaultplatform.broker.test.TestUtils.NOW; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import java.util.List; import lombok.extern.slf4j.Slf4j; import org.datavaultplatform.broker.app.DataVaultBrokerApp; import org.datavaultplatform.broker.test.AddTestProperties; import org.datavaultplatform.broker.test.BaseReuseDatabaseTest; import org.datavaultplatform.common.model.DepositReview; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.TestPropertySource; @SpringBootTest(classes = DataVaultBrokerApp.class) @AddTestProperties @Slf4j @TestPropertySource(properties = { "broker.email.enabled=true", "broker.controllers.enabled=false", "broker.rabbit.enabled=false", "broker.scheduled.enabled=false" }) public class DepositReviewDAOIT extends BaseReuseDatabaseTest { @Autowired DepositReviewDAO dao; @Test void testWriteThenRead() { DepositReview depositReview1 = getDepositReview1(); DepositReview depositReview2 = getDepositReview2(); dao.save(depositReview1); assertNotNull(depositReview1.getId()); assertEquals(1, dao.count()); dao.save(depositReview2); assertNotNull(depositReview2.getId()); assertEquals(2, dao.count()); DepositReview foundById1 = dao.findById(depositReview1.getId()).get(); assertEquals(depositReview1.getComment(), foundById1.getComment()); DepositReview foundById2 = dao.findById(depositReview2.getId()).get(); assertEquals(depositReview2.getComment(), foundById2.getComment()); } @Test void testList() { DepositReview depositReview1 = new DepositReview(); depositReview1.setComment("dr1-comment"); depositReview1.setCreationTime(NOW); DepositReview depositReview2 = new DepositReview(); depositReview2.setComment("dr2-comment"); depositReview2.setCreationTime(NOW); dao.save(depositReview1); assertNotNull(depositReview1.getId()); assertEquals(1, dao.count()); dao.save(depositReview2); assertNotNull(depositReview2.getId()); assertEquals(2, dao.count()); List<DepositReview> items = dao.list(); assertEquals(2, items.size()); assertEquals(1, items.stream().filter(dr -> dr.getId().equals(depositReview1.getId())).count()); assertEquals(1, items.stream().filter(dr -> dr.getId().equals(depositReview2.getId())).count()); } @Test void testSearch() { DepositReview depositReview1 = getDepositReview1(); dao.save(depositReview1); assertNotNull(depositReview1.getId()); assertEquals(1, dao.count()); DepositReview depositReview2 = getDepositReview2(); dao.save(depositReview2); assertNotNull(depositReview2.getId()); assertEquals(2, dao.count()); { String search1 = depositReview1.getId().split("-")[0]; List<DepositReview> items1 = dao.search(search1); assertEquals(1, items1.size()); assertEquals(1, items1.stream().filter(dr -> dr.getId().equals(depositReview1.getId())).count()); } String searchKey2Upper = depositReview2.getId().split("-")[0].toUpperCase(); { List<DepositReview> items2 = dao.search(searchKey2Upper); assertEquals(1, items2.size()); assertEquals(1, items2.stream().filter(dr -> dr.getId().equals(depositReview2.getId())).count()); } { String searchKey2Lower = searchKey2Upper.toLowerCase(); List<DepositReview> items3 = dao.search(searchKey2Lower); assertEquals(1, items3.size()); assertEquals(1, items3.stream().filter(dr -> dr.getId().equals(depositReview2.getId())).count()); } { List<DepositReview> items4 = dao.search(null); assertEquals(2, items4.size()); assertEquals(1, items4.stream().filter(dr -> dr.getId().equals(depositReview1.getId())).count()); assertEquals(1, items4.stream().filter(dr -> dr.getId().equals(depositReview2.getId())).count()); } } @Test void testUpdate() { DepositReview depositReview = getDepositReview1(); dao.save(depositReview); depositReview.setComment("dr1-comment-updated"); DepositReview found1 = dao.findById(depositReview.getId()).get(); assertEquals("dr1-comment", found1.getComment()); dao.update(depositReview); DepositReview found2 = dao.findById(depositReview.getId()).get(); assertEquals("dr1-comment-updated", found2.getComment()); } @BeforeEach void setup() { assertEquals(0, dao.count()); } @AfterEach void tidyUp() { template.execute("delete from `DepositReviews`"); assertEquals(0, dao.count()); } DepositReview getDepositReview1() { DepositReview result = new DepositReview(); result.setComment("dr1-comment"); result.setCreationTime(NOW); return result; } DepositReview getDepositReview2(){ DepositReview result = new DepositReview(); result.setComment("dr2-comment"); result.setCreationTime(NOW); return result; } }
[ "david.j.hay@gmail.com" ]
david.j.hay@gmail.com
7692624b28c2df5b6709e78c8b7792e930b96dc4
86fc030462b34185e0b1e956b70ece610ad6c77a
/src/main/java/com/alipay/api/domain/AlipayMarketingCampaignDrawcampCreateModel.java
22207ffd42bf636bc4c9de60a09e234a404c8e90
[]
no_license
xiang2shen/magic-box-alipay
53cba5c93eb1094f069777c402662330b458e868
58573e0f61334748cbb9e580c51bd15b4003f8c8
refs/heads/master
2021-05-08T21:50:15.993077
2018-11-12T07:49:35
2018-11-12T07:49:35
119,653,252
0
0
null
null
null
null
UTF-8
Java
false
false
6,637
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 营销抽奖活动创建 * * @author auto create * @since 1.0, 2017-03-23 14:22:24 */ public class AlipayMarketingCampaignDrawcampCreateModel extends AlipayObject { private static final long serialVersionUID = 2275858695942651293L; /** * 单用户以支付宝账号维度可参与当前营销活动的总次数,由开发者自定义此数值 */ @ApiField("account_count") private String accountCount; /** * 以移动设备维度可参与当前营销活动的总次数,由开发者自定义此数值 */ @ApiField("appid_count") private String appidCount; /** * 单个用户当前活动允许中奖的最大次数,最大值999999 */ @ApiField("award_count") private String awardCount; /** * 活动奖品总中奖几率,开发者需传入整数值,如:传入99支付宝默认为99% */ @ApiField("award_rate") private String awardRate; /** * 活动唯一标识,不能包含除中文、英文、数字以外的字符,创建后不能修改,需要保证在商户端不重复。 */ @ApiField("camp_code") private String campCode; /** * 活动结束时间,yyyy-MM-dd HH:00:00格式(到小时),需要大于活动开始时间 */ @ApiField("camp_end_time") private String campEndTime; /** * 活动名称,开发者自定义 */ @ApiField("camp_name") private String campName; /** * 活动开始时间,yyyy-MM-dd HH:00:00格式(到小时),时间不能早于当前日期的0点 */ @ApiField("camp_start_time") private String campStartTime; /** * 凭证验证规则id,通过alipay.marketing.campaign.cert.create 接口创建的凭证id */ @ApiField("cert_rule_id") private String certRuleId; /** * 单用户以账户证件号(如身份证号、护照、军官证等)维度可参与当前营销活动的总次数,由开发者自定义此数值 */ @ApiField("certification_count") private String certificationCount; /** * 圈人规则id,通过alipay.marketing.campaign.rule.crowd.create 接口创建的规则id */ @ApiField("crowd_rule_id") private String crowdRuleId; /** * 以认证手机号(与支付宝账号绑定的手机号)维度的可参与当前营销活动的总次数,由开发者自定义此数值 */ @ApiField("mobile_count") private String mobileCount; /** * 开发者用于区分商户的唯一标识,由开发者自定义,用于区分是开发者名下哪一个商户的请求,为空则为默认标识 */ @ApiField("mpid") private String mpid; /** * 奖品模型,至少需要配置一个奖品 */ @ApiListField("prize_list") @ApiField("mp_prize_info_model") private List<MpPrizeInfoModel> prizeList; /** * 营销验证规则id,由支付宝配置 */ @ApiField("promo_rule_id") private String promoRuleId; /** * 活动触发类型,目前支持 CAMP_USER_TRIGGER:用户触发(开发者调用alipay.marketing.campaign.drawcamp.trigger 接口触发); CAMP_SYS_TRIGGER:系统触发,必须配置实时人群验证规则(如:配置了监听用户支付事件,支付宝会根据活动规则自动发奖,无需用户手动触发)。 */ @ApiField("trigger_type") private String triggerType; /** * 实时人群验证规则id,由支付宝配置 */ @ApiField("trigger_user_rule_id") private String triggerUserRuleId; /** * 人群验证规则id,由支付宝配置 */ @ApiField("user_rule_id") private String userRuleId; public String getAccountCount() { return this.accountCount; } public void setAccountCount(String accountCount) { this.accountCount = accountCount; } public String getAppidCount() { return this.appidCount; } public void setAppidCount(String appidCount) { this.appidCount = appidCount; } public String getAwardCount() { return this.awardCount; } public void setAwardCount(String awardCount) { this.awardCount = awardCount; } public String getAwardRate() { return this.awardRate; } public void setAwardRate(String awardRate) { this.awardRate = awardRate; } public String getCampCode() { return this.campCode; } public void setCampCode(String campCode) { this.campCode = campCode; } public String getCampEndTime() { return this.campEndTime; } public void setCampEndTime(String campEndTime) { this.campEndTime = campEndTime; } public String getCampName() { return this.campName; } public void setCampName(String campName) { this.campName = campName; } public String getCampStartTime() { return this.campStartTime; } public void setCampStartTime(String campStartTime) { this.campStartTime = campStartTime; } public String getCertRuleId() { return this.certRuleId; } public void setCertRuleId(String certRuleId) { this.certRuleId = certRuleId; } public String getCertificationCount() { return this.certificationCount; } public void setCertificationCount(String certificationCount) { this.certificationCount = certificationCount; } public String getCrowdRuleId() { return this.crowdRuleId; } public void setCrowdRuleId(String crowdRuleId) { this.crowdRuleId = crowdRuleId; } public String getMobileCount() { return this.mobileCount; } public void setMobileCount(String mobileCount) { this.mobileCount = mobileCount; } public String getMpid() { return this.mpid; } public void setMpid(String mpid) { this.mpid = mpid; } public List<MpPrizeInfoModel> getPrizeList() { return this.prizeList; } public void setPrizeList(List<MpPrizeInfoModel> prizeList) { this.prizeList = prizeList; } public String getPromoRuleId() { return this.promoRuleId; } public void setPromoRuleId(String promoRuleId) { this.promoRuleId = promoRuleId; } public String getTriggerType() { return this.triggerType; } public void setTriggerType(String triggerType) { this.triggerType = triggerType; } public String getTriggerUserRuleId() { return this.triggerUserRuleId; } public void setTriggerUserRuleId(String triggerUserRuleId) { this.triggerUserRuleId = triggerUserRuleId; } public String getUserRuleId() { return this.userRuleId; } public void setUserRuleId(String userRuleId) { this.userRuleId = userRuleId; } }
[ "xiangshuo@10.17.6.161" ]
xiangshuo@10.17.6.161
27db171c0d80f671da7fd5caece0478635abd19b
d5626df45372c2ff57afb46d43f50a5dd5dacd37
/src/test/java/org/travelers/users/service/UserServiceTestIT.java
b501bbef9fe4edc8e38f6d4605ce690cfcf8c2da
[]
no_license
Daniel194/travelers-users
17d7e6c318c15f47ef94bdad6fe4bb7af8420e8a
7a1d9d319b979d7f04ea6acea33caf2acd7fb55d
refs/heads/master
2021-01-06T19:23:12.113317
2020-12-30T19:07:41
2020-12-30T19:07:41
241,458,068
0
0
null
2020-12-30T19:07:43
2020-02-18T20:15:33
Java
UTF-8
Java
false
false
2,363
java
package org.travelers.users.service; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.travelers.users.UsersApp; import org.travelers.users.domain.User; import org.travelers.users.repository.UserRepository; import org.travelers.users.service.dto.UserDTO; import org.travelers.users.service.dto.UserDetailsDTO; import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import static org.travelers.users.util.TestUtil.areEqual; import static org.travelers.users.util.TestUtil.getUser; @SpringBootTest(classes = UsersApp.class) public class UserServiceTestIT { @Autowired private UserService userService; @Autowired private UserRepository repository; @Test public void getByLogin() { User user = getUser(); repository.save(user); UserDTO userDTO = userService.getByLogin(user.getLogin()).orElse(new UserDTO()); assertThat(areEqual(user, userDTO)).isTrue(); } @Test public void getCurrent() { User user = getUser(); repository.save(user); setCurrentUser(user.getLogin()); UserDTO userDTO = userService.getCurrent().orElse(new UserDTO()); assertThat(areEqual(user, userDTO)).isTrue(); } @Test public void update() { User user = getUser(); repository.save(user); setCurrentUser(user.getLogin()); UserDetailsDTO userDetailsDTO = new UserDetailsDTO(); userDetailsDTO.setDescription("Test12345"); UserDTO userDTO = userService.update(userDetailsDTO).orElseThrow(); user.setDescription(userDetailsDTO.getDescription()); assertThat(userDTO.getDescription()).isEqualTo(userDetailsDTO.getDescription()); } private void setCurrentUser(String login) { SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); securityContext.setAuthentication(new UsernamePasswordAuthenticationToken(login, login)); SecurityContextHolder.setContext(securityContext); } }
[ "lungu.daniel94@gmail.com" ]
lungu.daniel94@gmail.com
00c0de30c9d97961417138baf233f9c1debe8ca1
3d28dda200ed01e9fa99326eb3adfc713cda0aa5
/datagr4m-drawing/src/main/java/org/datagr4m/drawing/layout/algorithms/forces/IForceModel.java
3a2b59d37f4360a45cbdf4257c5e55906525c0e8
[ "BSD-2-Clause" ]
permissive
archenroot/org.datagr4m
ca88bdde3f6a4dc0d385f5969c554dab2d91a74e
1d4c73686749ba47e98a4b76b90355b60960adb3
refs/heads/master
2020-07-20T17:48:07.958011
2014-01-13T21:53:06
2014-01-13T21:53:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,110
java
package org.datagr4m.drawing.layout.algorithms.forces; import java.util.Collection; import java.util.List; import org.datagr4m.datastructures.pairs.Pair; import org.datagr4m.drawing.model.items.IBoundedItem; public interface IForceModel { /** * Return true if the graph already holds an attraction edge that is equal to the input edge. */ public boolean hasAttractionEdges(Pair<IBoundedItem,IBoundedItem> edge); public boolean hasAttractionEdges(IBoundedItem source, IBoundedItem destination); /** * Return all the graph's edges that should be considered for computing a force based graph layout. */ public Collection<Pair<IBoundedItem,IBoundedItem>> getAttractionEdges(); /** * Return the collection of edges that should be considered for computing a force based graph layout, and that are attached to the given source. */ public Collection<Pair<IBoundedItem, IBoundedItem>> getAttractionEdges(IBoundedItem source); /** * Return the collection of edges that should be considered for computing a force based graph layout, and that goes from source to destination. */ public Collection<Pair<IBoundedItem,IBoundedItem>> getAttractionEdges(IBoundedItem source, IBoundedItem destination); /** * Return all attraction forces of this model */ public List<IForce> getAttractionEdgeForces(); /** * Return all attraction forces of this model where input item is the owner of this force. */ public List<IForce> getAttractionEdgeForces(IBoundedItem item); /** * Return the {@link IForce}s that attract the given item, * or null if the item does not stand in this model. */ public Collection<IForce> getAttractors(IBoundedItem item); /** * Return the {@link IForce}s that repulse the given item, * or null if the item does not stand in this model. */ public Collection<IForce> getRepulsors(IBoundedItem item); public Collection<IForce> getAttractorForces(); public int getNumberOfRepulsors(); }
[ "martin.pernollet@calliandra-networks.com" ]
martin.pernollet@calliandra-networks.com
eff8db129d5578aaff73b0174924a0d3591a1bce
9208ba403c8902b1374444a895ef2438a029ed5c
/sources/com/google/android/exoplayer2/ui/spherical/GlViewGroup.java
fbb6b5e4689065daac84240a41eb7dd640bb0876
[]
no_license
MewX/kantv-decompiled-v3.1.2
3e68b7046cebd8810e4f852601b1ee6a60d050a8
d70dfaedf66cdde267d99ad22d0089505a355aa1
refs/heads/main
2023-02-27T05:32:32.517948
2021-02-02T13:38:05
2021-02-02T13:44:31
335,299,807
0
0
null
null
null
null
UTF-8
Java
false
false
2,319
java
package com.google.android.exoplayer2.ui.spherical; import android.content.Context; import android.graphics.Canvas; import android.graphics.PointF; import android.graphics.PorterDuff.Mode; import android.os.SystemClock; import android.view.LayoutInflater; import android.view.MotionEvent; import android.widget.FrameLayout; import android.widget.FrameLayout.LayoutParams; import androidx.annotation.AnyThread; import androidx.annotation.UiThread; import com.google.android.exoplayer2.util.Assertions; public final class GlViewGroup extends FrameLayout { private final CanvasRenderer canvasRenderer = new CanvasRenderer(); public GlViewGroup(Context context, int i) { super(context); LayoutInflater.from(context).inflate(i, this); measure(-2, -2); int measuredWidth = getMeasuredWidth(); int measuredHeight = getMeasuredHeight(); Assertions.checkState(measuredWidth > 0 && measuredHeight > 0); this.canvasRenderer.setSize(measuredWidth, measuredHeight); setLayoutParams(new LayoutParams(measuredWidth, measuredHeight)); } @UiThread public boolean isVisible() { int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { if (getChildAt(i).getVisibility() == 0) { return true; } } return false; } public void dispatchDraw(Canvas canvas) { Canvas lockCanvas = this.canvasRenderer.lockCanvas(); if (lockCanvas == null) { postInvalidate(); return; } lockCanvas.drawColor(0, Mode.CLEAR); super.dispatchDraw(lockCanvas); this.canvasRenderer.unlockCanvasAndPost(lockCanvas); } @UiThread public boolean simulateClick(int i, float f, float f2) { if (!isVisible()) { return false; } PointF translateClick = this.canvasRenderer.translateClick(f, f2); if (translateClick == null) { return false; } long uptimeMillis = SystemClock.uptimeMillis(); dispatchTouchEvent(MotionEvent.obtain(uptimeMillis, uptimeMillis, i, translateClick.x, translateClick.y, 1)); return true; } @AnyThread public CanvasRenderer getRenderer() { return this.canvasRenderer; } }
[ "xiayuanzhong@gmail.com" ]
xiayuanzhong@gmail.com
6277f5abe7f9784a1a2f8f2ed1f81f8792c6b7ae
5b0c5bc2d609615522a2b3cf1085899a9f3f59b4
/day26/src/cn/itcast/java/test/testDao1.java
e8b281e68ad4d1a32577ac256a83145e17a4ef80
[]
no_license
clncon/javaweb
b21aee9744f9a68b6f55770e947c33208854215e
ac88a572bbe50e1c8552487758dcd0c2973cf133
refs/heads/master
2020-12-14T06:17:21.931227
2017-03-04T02:35:56
2017-03-04T02:35:56
83,633,624
0
0
null
null
null
null
UTF-8
Java
false
false
583
java
package cn.itcast.java.test; import cn.itcast.java.dao.dao1.topicDao; import cn.itcast.java.dao.dao1.typeDao; import cn.itcast.java.domain.Topic; import cn.itcast.java.domain.Type; public class testDao1 { public static void main(String[] args) throws Exception { //typeDao typedao = new typeDao(); //topicDao topicdao = new topicDao(); //Type type = typedao.findTypeById(1); //Topic topic = topicdao.findTopicByDao(1); //System.out.println(type.getId()+":"+type.getTitle()); //System.out.println(topic.getId()+":"+topic.getTitle()); } }
[ "clncon@163.com" ]
clncon@163.com
11a4badb86b846ca3639a2968c9732573f7f68ed
29972d60af64fdac41765d03ef6485a4e7941d51
/configuration/src/test/java/net/petrikainulainen/wiremock/configuration/CustomHostAndPortConfigurationTest.java
998833469e141c8a83be0bfa37f67b4f485486e0
[ "Apache-2.0" ]
permissive
tyronne90/wiremock-tutorial
b6d1622b0d97142106060d0d86760e099d0135d5
613f3e8326932357bdd36e4bac7250ed1aa7eddd
refs/heads/master
2020-06-08T07:49:05.925210
2018-08-01T19:06:57
2018-08-01T19:06:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,723
java
package net.petrikainulainen.wiremock.configuration; import com.github.tomakehurst.wiremock.WireMockServer; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.client.RestTemplate; import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.options; import static org.assertj.core.api.Assertions.assertThat; /** * This class demonstrates how we can configure the system * under test when we want to use a custom IP address * and a custom port. */ class CustomHostAndPortConfigurationTest { private RestTemplate restTemplate; private WireMockServer wireMockServer; @BeforeEach void configureSystemUnderTest() { this.restTemplate = new RestTemplate(); this.wireMockServer = new WireMockServer(options() .bindAddress("127.0.0.1") .port(9090) ); this.wireMockServer.start(); configureFor("127.0.0.1", 9090); } @Test @DisplayName("Should ensure that WireMock server was started") void shouldEnsureThatServerWasStarted() { givenThat(get(urlEqualTo("/")).willReturn(aResponse() .withStatus(200) )); ResponseEntity<String> response = restTemplate.getForEntity("http://localhost:9090", String.class); assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); } @AfterEach void stopWireMockServer() { this.wireMockServer.stop(); } }
[ "petri.kainulainen@gmail.com" ]
petri.kainulainen@gmail.com
39a2d05230d3ffb0793d7e1eaa8a03b7b5443175
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/digits/1c2bb3a40a82cba97b2937bc6825903a28ecfe91f993fc177a0f2ae003bcc7b1073eb49e35d3f0f69d6b612e8347e9c1b93306bf25a7e5390098c1a06845baac/000/mutations/19/digits_1c2bb3a4_000.java
54b029654fa224a689f578ddffafecd6164d26f8
[]
no_license
ozzydong/CapGen
356746618848065cce4e253e5d3c381baa85044a
0ba0321b6b1191443276021f1997833342f02515
refs/heads/master
2023-03-18T20:12:02.923428
2020-08-21T03:08:28
2020-08-21T03:08:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,300
java
package introclassJava; class IntObj { public int value; public IntObj () { } public IntObj (int i) { value = i; } } class FloatObj { public float value; public FloatObj () { } public FloatObj (float i) { value = i; } } class LongObj { public long value; public LongObj () { } public LongObj (long i) { value = i; } } class DoubleObj { public double value; public DoubleObj () { } public DoubleObj (double i) { value = i; } } class CharObj { public char value; public CharObj () { } public CharObj (char i) { value = i; } } public class digits_1c2bb3a4_000 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { digits_1c2bb3a4_000 mainClass = new digits_1c2bb3a4_000 (); String output; if (args.length > 0) { mainClass.scanner = new java.util.Scanner (args[0]); } else { mainClass.scanner = new java.util.Scanner (System.in); } mainClass.exec (); System.out.println (mainClass.output); } public void exec () throws Exception { IntObj x = new IntObj (), y = new IntObj (), i = new IntObj (); IntObj step1 = new IntObj (10), step2 = new IntObj (100); IntObj num = new IntObj (); IntObj max = new IntObj (0); output += (String.format ("Enter an integer > ")); x.value = scanner.nextInt (); if (x.value < 0) { if (true) return ; output += (String.format ("%d\n", x.value % 10)); x.value = x.value * -1; } else { output += (String.format ("%d\n", x.value % 10)); } y.value = x.value; while (y.value >= 10) { y.value /= 10; max.value++; } for (i.value = 0; i.value < max.value; i.value++) { num.value = ((x.value % step2.value - x.value % step1.value) / step1.value); output += (String.format ("%d\n", num.value)); step2.value *= 10; step1.value *= 10; } output += (String.format ("That's all, have a nice day!\n")); if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
5267605e929c446c591e7805707c6c61f3f4e718
61adb4fbead4f25a0fda9bd09f0e4781f46b0942
/independent-projects/arc/tests/src/test/java/io/quarkus/arc/test/clientproxy/contextnotactive/ClientProxyContextNotActiveTest.java
cac1e4ad3c145377e1f000ec001cdfda4133f6c3
[ "Apache-2.0" ]
permissive
kdnakt/quarkus
4772d02f4a6afea6dad40931f591583ea9016f2d
e3e1cc7a60bb9849d7122b5ddf58f4190ce5c772
refs/heads/master
2023-05-25T13:30:49.999376
2022-05-18T15:27:53
2022-05-18T15:27:53
230,545,590
3
0
Apache-2.0
2023-03-02T21:02:33
2019-12-28T02:07:52
Java
UTF-8
Java
false
false
1,381
java
package io.quarkus.arc.test.clientproxy.contextnotactive; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import io.quarkus.arc.Arc; import io.quarkus.arc.test.ArcTestContainer; import javax.enterprise.context.ContextNotActiveException; import javax.enterprise.context.RequestScoped; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; public class ClientProxyContextNotActiveTest { @RegisterExtension public ArcTestContainer container = new ArcTestContainer(RequestFoo.class); @Test public void testToStringIsDelegated() { RequestFoo foo = Arc.container().instance(RequestFoo.class).get(); assertThatExceptionOfType(ContextNotActiveException.class).isThrownBy(() -> foo.ping()) .withMessageContaining( "RequestScoped context was not active when trying to obtain a bean instance for a client proxy of CLASS bean [class=io.quarkus.arc.test.clientproxy.contextnotactive.ClientProxyContextNotActiveTest$RequestFoo, id=3e5a77b35b0824bc957993f6db95a37e766e929e]") .withMessageContaining( "you can activate the request context for a specific method using the @ActivateRequestContext interceptor binding"); } @RequestScoped static class RequestFoo { void ping() { } } }
[ "mkouba@redhat.com" ]
mkouba@redhat.com
5feda33d72bf2f407c6b153bebe740a65cdda184
4168b1d8b44ea61cab5144ce2c0968ac7fa08149
/src/main/java/com/qiangdong/reader/controller/manage/ManageImportController.java
451e11654c8b43f7a75e69f74fca78d0faba1845
[ "Apache-2.0" ]
permissive
Vivian-miao/qiangdongserver
2a841f0a964c92cbfe73d4eb98f0c2888e542fff
0c16fec01b369d5491b8239860f291732db38f2e
refs/heads/master
2023-04-25T07:21:57.354176
2021-05-20T04:16:51
2021-05-20T04:16:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
966
java
package com.qiangdong.reader.controller.manage; import com.qiangdong.reader.annotation.RequireAdmin; import com.qiangdong.reader.request.BaseRequest; import com.qiangdong.reader.response.Response; import com.qiangdong.reader.serviceImpl.ImportServiceImpl; import java.io.IOException; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/manage/import") public class ManageImportController { private final ImportServiceImpl importService; public ManageImportController(ImportServiceImpl importService) { this.importService = importService; } @RequestMapping("/siwei/novel") @RequireAdmin public Response<String> importNovelFromSiWei(@RequestBody BaseRequest baseRequest) throws IOException { return importService.importNovelFromSiWei(baseRequest); } }
[ "a857681664@gmail.com" ]
a857681664@gmail.com
312abcb653b8c92614f4e6e99afef9b3fe38c929
2a251c387875a4522ec6e7fc3b01be0313b6b214
/src/com/neusoft/busManager/baseinfo/service/impl/BusTypeServiceImpl.java
82989b4e2f3244574fa6b6d1727b158ceae96a6b
[]
no_license
sunzr/busManager
1aaa05fe01d75707635a410fa38aa1ab62581484
dea2d26a7fa3e974e3b36849a255c958c5e7c449
refs/heads/master
2021-01-23T19:57:16.332068
2019-01-04T07:56:02
2019-01-04T07:56:02
102,836,526
0
0
null
null
null
null
UTF-8
Java
false
false
4,677
java
package com.neusoft.busManager.baseinfo.service.impl; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.util.List; import org.apache.ibatis.session.RowBounds; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.neusoft.busManager.baseinfo.mapper.IBusMapper; import com.neusoft.busManager.baseinfo.mapper.IBusTypeMapper; import com.neusoft.busManager.baseinfo.model.BusTypeModel; import com.neusoft.busManager.baseinfo.service.IBusTypeService; //车辆类型的业务实现类 @Service("BusTypeService") @Transactional public class BusTypeServiceImpl implements IBusTypeService{ private IBusTypeMapper ibtm=null; private IBusMapper ibm=null; @Autowired public void setIbtm(IBusTypeMapper ibtm) { this.ibtm = ibtm; } @Autowired public void setIbm(IBusMapper ibm) { this.ibm = ibm; } @Override public void add(BusTypeModel btm) throws Exception { if(btm.getPhotoFileName()!=null){ ibtm.insertWithPhoto(btm); } else{ ibtm.insert(btm); } } @Override public void modify(BusTypeModel btm) throws Exception { ibtm.update(btm); } @Override public void modifyWithPhoto(BusTypeModel btm) throws Exception { ibtm.updateWithPhoto(btm); } @Override public void modifyForDeletePhoto(BusTypeModel btm) throws Exception { ibtm.updateForDeletePhoto(btm); } @Override public void delete(BusTypeModel btm) throws Exception { ibtm.delete(btm); } @Override public BusTypeModel get(int typeno) throws Exception { return ibtm.select(typeno); } @Override public List<BusTypeModel> getListByAll() throws Exception { return ibtm.selectListByAll(); } @Override public List<BusTypeModel> getListByAllWithPage(int rows,int page) throws Exception { RowBounds rb=new RowBounds(rows*(page-1),rows); return ibtm.selectListByAllWithPage(rb); } @Override public int getCountByAll() throws Exception { return ibtm.selectCountByAll(); } @Override public int getPageCountByAll(int rows) throws Exception { int pageCount=0; int count=this.getCountByAll(); if(count%rows==0){ pageCount=count/rows; } else{ pageCount=count/rows+1; } return pageCount; } //检查指定的车辆类型能否被删除 public boolean checkCanDelete(int typeno) throws Exception{ boolean result=true; //如果此车辆类型的车辆个数大于0,此车辆类型不能被删除 if(ibm.selectCountByCondition(typeno, 0)>0){ result=false; } return result; } @Override public boolean checkNameExist(String typename) throws Exception { boolean result=false; List<BusTypeModel> list=this.getListByAll(); for(BusTypeModel bm : list){ if(bm!=null && bm.getTypename()!=null && bm.getTypename().equals(typename)){ result=true; break; } } return result; } @Override public void importFromExcel(InputStream excelFile) throws Exception { //打开上传的excel文件 Workbook wb=WorkbookFactory.create(excelFile); //取得第一个sheet Sheet sheet=wb.getSheetAt(0); for(Row row : sheet){ if(row.getRowNum()!=0){ Cell c0=row.getCell(0); int typeno=(int)c0.getNumericCellValue(); Cell c1=row.getCell(1); String typename=c1.getStringCellValue(); BusTypeModel btm=new BusTypeModel(); btm.setTypeno(typeno); btm.setTypename(typename); this.add(btm); } } wb.close(); excelFile.close(); } @Override public void exportToExcel(File source, File exportFile) throws Exception { // 打开excel模板文件 Workbook wb=WorkbookFactory.create(source); //取得第一个sheet Sheet sheet =wb.getSheetAt(0); //取得所有的车辆类型列表 List<BusTypeModel> list=ibtm.selectListByAll(); int i=1; for(BusTypeModel bm : list){ Row row=sheet.createRow(i); Cell c0=row.createCell(0); c0.setCellValue(bm.getTypeno()); Cell c1=row.createCell(1); c1.setCellValue(bm.getTypename()); i++; } FileOutputStream fileOut =new FileOutputStream(exportFile); wb.write(fileOut); fileOut.close(); } }
[ "admin@admin-PC" ]
admin@admin-PC
76049fa804f38ca8c52aa77683be95de5d7e739d
49e154b216269517be7c1c5f39037345409bec11
/Lecture-8/src/com/codingblocks/NQueens.java
03c1f88b82c78c5b0a9e2f9f34c91a5223067d99
[ "Apache-2.0" ]
permissive
samikshaw4/Crux-Noida-2018-Aug-Evening
11191cd8203183e8f7335c15af9c182a87e0c5b9
a392bb80bf59ecc2b218b4f1c00b00d40246a484
refs/heads/master
2020-04-03T05:09:40.873512
2018-10-27T08:48:30
2018-10-27T08:48:30
155,036,646
1
0
Apache-2.0
2018-10-28T04:54:48
2018-10-28T04:54:48
null
UTF-8
Java
false
false
1,951
java
package com.codingblocks; public class NQueens { public static void main(String[] args) { int n = 4; boolean[][] board = new boolean[n][n]; // display(board); nqueens(board, 0); } private static int nqueens(boolean[][] board, int row) { if (row == board.length){ display(board); return 1; } int acc = 0; // check each col or row for (int col = 0; col < board.length; col++) { // if placing is safe if (isSafe(board, row, col)){ // place your queen board[row][col] = true; acc += nqueens(board, row +1); // unplace your queen board[row][col] = false; } } return acc; } private static boolean isSafe(boolean[][] board, int row, int col) { // check to safe vertical above for (int i = 0; i < row; i++) { if (board[i][col]){ return false; } } // diag left int max_left = Math.min(row, col); for (int i = 1; i <= max_left ; i++) { if (board[row-i][col-i]){ return false; } } // diag right int max_right = Math.min(row, board.length - col - 1); for (int i = 1; i <= max_right ; i++) { if (board[row-i][col+i]){ return false; } } return true; } public static void display(boolean[][] board) { for (int i = 0; i < board.length; i++) { for (int j = 0; j < board[i].length; j++) { if (board[i][j]){ System.out.print("Q "); } else { System.out.print("X "); } } System.out.println(); } System.out.println(); } }
[ "anujgargcse@gmail.com" ]
anujgargcse@gmail.com
15a1f1c889e620c386b943c4f1babc38909ede94
57c762435444198898a25a942e1869462b0efe12
/src/learn/sparsearray/SparseArray.java
e5cbd94f632fa3f5270ab74ffc1845a2a981a03b
[]
no_license
doukangtai/algorithm
dee59ade82a719ba9f7e25c753ddf2c9a50251c4
ad63ac8f5217d3600154d40c1f3b345b93d3fad2
refs/heads/master
2022-10-12T07:48:52.058630
2021-07-19T11:29:31
2021-07-19T11:29:31
249,180,716
0
0
null
null
null
null
UTF-8
Java
false
false
2,489
java
package learn.sparsearray; /** * @Author 窦康泰 * @Date 2020-08-12 17:47 * * 将二维数组转成稀疏数组 * 1. 遍历二维数组,获取非0数据的个数count * 2. 创建稀疏数组spareArray,count+1行,3列,三列分别代表,row---column---value,二维数组的坐标和值 * 3. 稀疏数组第一行为总行数、总列数、count值 * 4. 从稀疏数组第二行开始为二维数组行、列坐标和值 * * 将稀疏数组还原二维数组 * 1. 根据稀疏数组第一行,第一、二列创建二维数组 * 2. 遍历稀疏数组(从第二行开始),将value赋值给二维数组 */ public class SparseArray { public static void main(String[] args) { int row = 10; int column = 12; int[][] array = new int[row][column]; array[0][1] = 1; array[1][2] = 2; array[2][3] = 1; array[3][4] = 2; array[4][5] = 1; System.out.println("原始二维数组"); int count = 0; for (int[] ints : array) { for (int i : ints) { System.out.printf("%d\t", i); if (i != 0) { count++; } } System.out.println(); } int[][] sparseArray = new int[count + 1][3]; sparseArray[0][0] = array.length; sparseArray[0][1] = array[0].length; sparseArray[0][2] = count; for (int i = 0; i < array.length; i++) { for (int j = 0; j < array[0].length; j++) { if (array[i][j] != 0) { sparseArray[i + 1][0] = i; sparseArray[i + 1][1] = j; sparseArray[i + 1][2] = array[i][j]; } } } System.out.println("稀疏数组"); System.out.println("row column value"); for (int[] ints : sparseArray) { for (int i : ints) { System.out.printf("%d\t", i); } System.out.println(); } int[][] newArray = new int[sparseArray[0][0]][sparseArray[0][1]]; for (int i = 1; i < sparseArray.length; i++) { newArray[sparseArray[i][0]][sparseArray[i][1]] = sparseArray[i][2]; } System.out.println("恢复后的新数组"); for (int[] ints : newArray) { for (int i : ints) { System.out.printf("%d\t", i); } System.out.println(); } } }
[ "2636693728@qq.com" ]
2636693728@qq.com
ad7db1830f7b8760d90d0183ea6c6defcedbd746
c56971071a42ef8dc401b40652e569685e5dbd8f
/03-opencsv/src/main/java/com/opencsv/bean/AbstractFieldMapEntry.java
9a097d9fe8917b29cd7917b05bab338c9c255884
[ "Apache-2.0" ]
permissive
uptonking/tablesaw
b0b2cd9f991c9bf7a9df56dadd04f8b73d4440e4
fe15b10e5c0ecd693d4448d67c00e5b7d4c07bdf
refs/heads/master
2020-04-11T05:52:27.899587
2018-03-22T16:36:34
2018-03-22T16:36:34
124,328,361
1
0
null
null
null
null
UTF-8
Java
false
false
1,933
java
/* * Copyright 2018 Andrew Rucker Jones. * * 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.opencsv.bean; import java.util.Locale; import org.apache.commons.lang3.ObjectUtils; /** * Collects common aspects of a {@link ComplexFieldMapEntry}. * * @param <I> The initializer type used to build the many-to-one mapping * @param <K> The type of the key used for indexing * * @author Andrew Rucker Jones * @since 4.2 */ abstract public class AbstractFieldMapEntry<I, K> implements ComplexFieldMapEntry<I, K> { /** The {@link BeanField} that is the target of this mapping. */ protected final BeanField field; /** The locale to be used for error messages. */ protected Locale errorLocale; /** * The only constructor, and it must be called by all derived classes. * * @param field The BeanField being mapped to * @param errorLocale The locale to be used for error messages */ protected AbstractFieldMapEntry(final BeanField field, final Locale errorLocale) { this.field = field; this.errorLocale = ObjectUtils.defaultIfNull(errorLocale, Locale.getDefault()); } @Override public BeanField getBeanField() { return field; } @Override public void setErrorLocale(final Locale errorLocale) { this.errorLocale = ObjectUtils.defaultIfNull(errorLocale, Locale.getDefault()); } }
[ "jinyaoo86@gmail.com" ]
jinyaoo86@gmail.com
855b02183e499d78472bac64a22ebc80a2bc2a7f
ee15e4de0c382336ed737d5f5e83c33442bffea6
/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/deployer/bean/support/XPCResolver.java
2938daad249c5275c7370a9a57c79fd2bd6abdd1
[]
no_license
wolfc/jboss-deployers
cff992f1c3621cef6662e731d597fa875ced664e
d96e4db10952a2188654a292e13daac88e5f235c
refs/heads/master
2020-06-07T07:40:58.844217
2011-05-16T19:22:50
2011-05-16T19:22:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,211
java
/* * JBoss, Home of Professional Open Source * Copyright 2006, JBoss Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.test.deployers.vfs.deployer.bean.support; /** * @author <a href="mailto:ales.justin@jboss.com">Ales Justin</a> */ public interface XPCResolver { String getName(); }
[ "ajustin@redhat.com" ]
ajustin@redhat.com
a4681020c71325a9bfdcc453f073fc48f0ad1f3b
6500848c3661afda83a024f9792bc6e2e8e8a14e
/gp_JADX/com/google/android/gms/internal/oy.java
2d037fd97ea6ff4104d6795c84ba2071f5f3d060
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
137
java
package com.google.android.gms.internal; public final class oy extends uv implements vm { oy() { super(ox.f27283d); } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
e6111f6c3b28d6d61c70a63fe4fa4e13a2746777
3ca934c5e29147bffc57a7212a450681d12b12ce
/Code/functional-testing/hotwire-step-defs/src/main/java/com/hotwire/test/steps/bexRetail/BexModel.java
7c04f18d69d930723769d440523f62da50d28a8c
[]
no_license
amitoj/spring_cucumber
8af821fd183e8a1ce049a3dc326dac9d80fc3e9a
fd4d207bca1645fb6f0465d1e016bfc607b39b43
refs/heads/master
2020-09-04T00:23:35.762856
2017-04-19T15:27:51
2017-04-19T15:27:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
622
java
/* * Copyright 2014 Hotwire. All Rights Reserved. * * This software is the proprietary information of Hotwire. * Use is subject to license terms. */ package com.hotwire.test.steps.bexRetail; /** * @author jgonzalez * */ public interface BexModel { void goToOMPT(String bid, String sid); void goToDBM(String nid, String vid, String did); void goToSem(String sid, String bid, String cmid, String acid, String kid, String mid); void bookFromResultsPage(); void saveSearchDetails(String transactionNumber); void goToAff(String siteID); void goToMeta(String hotelId, String rpe); }
[ "jiniguez@foundationmedicine.com" ]
jiniguez@foundationmedicine.com
d1cb9cab96b52e3291308c069c59d4976890e20a
3efa417c5668b2e7d1c377c41d976ed31fd26fdc
/src/br/com/mind5/masterData/materialSubgroup/info/MatubupMergerVisiMatoup.java
a7528809721c72067a7149b2cadeb2b6e53899f7
[]
no_license
grazianiborcai/Agenda_WS
4b2656716cc49a413636933665d6ad8b821394ef
e8815a951f76d498eb3379394a54d2aa1655f779
refs/heads/master
2023-05-24T19:39:22.215816
2023-05-15T15:15:15
2023-05-15T15:15:15
109,902,084
0
0
null
2022-06-29T19:44:56
2017-11-07T23:14:21
Java
UTF-8
Java
false
false
784
java
package br.com.mind5.masterData.materialSubgroup.info; import java.util.ArrayList; import java.util.List; import br.com.mind5.info.InfoMergerVisitorTemplate; import br.com.mind5.masterData.materialGroup.info.MatoupInfo; final class MatubupMergerVisiMatoup extends InfoMergerVisitorTemplate<MatubupInfo, MatoupInfo> { @Override public boolean shouldMerge(MatubupInfo baseInfo, MatoupInfo selectedInfo) { return (baseInfo.codGroup == selectedInfo.codGroup); } @Override public List<MatubupInfo> merge(MatubupInfo baseInfo, MatoupInfo selectedInfo) { List<MatubupInfo> results = new ArrayList<>(); baseInfo.codGroup = selectedInfo.codGroup; baseInfo.txtGroup = selectedInfo.txtGroup; results.add(baseInfo); return results; } }
[ "mmaciel@mind5.com" ]
mmaciel@mind5.com
a64c4925040eb2a46098ede41876a28148c49700
0205c7a1e9d64cea74b8d9308a42a73bff30d9d2
/COCOON-2217/cocoon-2.2.0/sitemap-impl/src/org/apache/cocoon/environment/internal/EnvironmentInfo.java
da9fc3a31b695424bfbe7a7c8bac77dd82fda054
[ "Apache-2.0" ]
permissive
ZhuofuChen/Apache_Contribution
329de187c3a9ed0b158f7b06da0b2b4174aaabb2
cedf844b4df218cbf0519972ab2d2902f3945f4a
refs/heads/master
2021-08-26T06:40:45.363568
2017-11-21T23:25:16
2017-11-21T23:25:16
110,313,367
0
0
null
null
null
null
UTF-8
Java
false
false
1,792
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.cocoon.environment.internal; import org.apache.cocoon.Processor; import org.apache.cocoon.environment.Environment; /** * This object holds a set of objects for an environment. * * This is an internal class, and it might change in an incompatible way over time. * For developing your own components/applications based on Cocoon, you shouldn't * really need it. * * @version $Id: EnvironmentInfo.java 587751 2007-10-24 02:41:36Z vgritsenko $ * @since 2.2 */ public class EnvironmentInfo { public final Processor processor; public final int oldStackCount; public final Environment environment; public EnvironmentInfo(Processor processor, int oldStackCount, Environment environment) { this.processor = processor; this.oldStackCount = oldStackCount; this.environment = environment; } }
[ "chenzhuofusean@gmail.com" ]
chenzhuofusean@gmail.com
0447a9a00759c67075be1458301fa43c4f3d427f
0f3bf97595ca48518040c82608926a82a2d69e8d
/mogu_xo/src/main/java/com/moxi/mogublog/xo/mapper/FeedbackMapper.java
dd43b508347eeeadcddd48cd61cf9a625d6166ac
[ "Apache-2.0" ]
permissive
mzxssg/mogu_blog_v2
855d37b7cf559aa225bd50223cc5a6b3c13d29e3
1c2d1f5896ac546e3c1647fdfafbec6ed457d9be
refs/heads/master
2020-12-13T17:54:15.519835
2020-02-09T03:39:35
2020-02-09T03:39:35
234,487,905
1
0
Apache-2.0
2020-01-17T06:43:35
2020-01-17T06:43:35
null
UTF-8
Java
false
false
297
java
package com.moxi.mogublog.xo.mapper; import com.moxi.mogublog.xo.entity.Feedback; import com.moxi.mougblog.base.mapper.SuperMapper; /** * <p> * 反馈表 Mapper 接口 * </p> * * @author xuzhixiang * @since 2018-09-08 */ public interface FeedbackMapper extends SuperMapper<Feedback> { }
[ "xzx19950624@qq.com" ]
xzx19950624@qq.com
f866d96ac7bae31b2a0d8ffd8e2b835daeff0111
9b43484680acf284c4b48b7e549e8faf3f45b0e8
/src/main/java/ch/ethz/idsc/subare/core/util/gfx/StateRaster.java
e5cb78426d18fb635948a24b3eeb639465e81204
[]
no_license
idsc-frazzoli/subare
fb3a7d71cb9fbfde4f099f668c007661368f4484
a31193543342c9062479f6689c073d76ad20f190
refs/heads/master
2021-03-16T08:50:07.584274
2019-11-17T08:54:20
2019-11-17T08:54:20
84,816,924
17
6
null
2021-02-27T19:35:02
2017-03-13T11:06:06
Java
UTF-8
Java
false
false
444
java
// code by jph package ch.ethz.idsc.subare.core.util.gfx; import java.awt.Dimension; import java.awt.Point; import ch.ethz.idsc.tensor.Tensor; public interface StateRaster extends Raster { /** @return dimension of raster */ Dimension dimensionStateRaster(); /** @param state * @return point with x, y as coordinates of state in raster, * or null if state does not have a position in the raster */ Point point(Tensor state); }
[ "jan.hakenberg@gmail.com" ]
jan.hakenberg@gmail.com
abbd8c5bc9a0814c0a11eb7a937c6249227878d7
9c3f3a0ea4e58ddc7818c78cee053daa4c08f558
/components/camel-sql/src/generated/java/org/apache/camel/component/sql/stored/SqlStoredComponentConfigurer.java
835128b233ef196f26cfa7845d4a2cee5e383eb2
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-unknown" ]
permissive
oklimberg/camel
015cdaa9a2a3dd6517eb84f2568566707a4c285c
8d66c7487796d366bfc90779b28fa964c2afa014
refs/heads/master
2021-02-06T21:07:02.680755
2020-02-29T09:01:15
2020-02-29T09:01:15
243,946,511
0
0
Apache-2.0
2020-02-29T10:15:08
2020-02-29T10:15:08
null
UTF-8
Java
false
false
1,262
java
/* Generated by camel build tools - do NOT edit this file! */ package org.apache.camel.component.sql.stored; import org.apache.camel.CamelContext; import org.apache.camel.spi.GeneratedPropertyConfigurer; import org.apache.camel.support.component.PropertyConfigurerSupport; /** * Generated by camel build tools - do NOT edit this file! */ @SuppressWarnings("unchecked") public class SqlStoredComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer { @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { SqlStoredComponent target = (SqlStoredComponent) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "datasource": case "dataSource": target.setDataSource(property(camelContext, javax.sql.DataSource.class, value)); return true; case "lazystartproducer": case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; case "basicpropertybinding": case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true; default: return false; } } }
[ "gnodet@gmail.com" ]
gnodet@gmail.com
34fd9c8d40fb74785888ad04e63c736a24d30899
e861c6590f6ece5e3c31192e2483c4fa050d0545
/app/src/main/java/plugin/android/ss/com/testsettings/settings/applications/AppWithAdminGrantedPermissionsLister.java
72d74fc3dde8e6992d32fb38ba067fe620796ca3
[]
no_license
calm-sjf/TestSettings
fc9a9c466f007d5eac6b4acdf674cd2e0cffb9a1
fddbb049542ff8423bdecb215b71dbdcc143930c
refs/heads/master
2023-03-22T02:46:23.057328
2020-12-10T07:37:27
2020-12-10T07:37:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,948
java
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License */ package plugin.android.ss.com.testsettings.settings.applications; import android.app.admin.DevicePolicyManager; import android.content.pm.ApplicationInfo; import android.content.pm.IPackageManager; import android.os.UserManager; import com.android.settingslib.wrapper.PackageManagerWrapper; /** * Lists installed apps across all users that have been granted one or more specific permissions by * the admin. */ public abstract class AppWithAdminGrantedPermissionsLister extends AppLister { private final String[] mPermissions; private final IPackageManager mPackageManagerService; private final DevicePolicyManager mDevicePolicyManager; public AppWithAdminGrantedPermissionsLister(String[] permissions, PackageManagerWrapper packageManager, IPackageManager packageManagerService, DevicePolicyManager devicePolicyManager, UserManager userManager) { super(packageManager, userManager); mPermissions = permissions; mPackageManagerService = packageManagerService; mDevicePolicyManager = devicePolicyManager; } @Override protected boolean includeInCount(ApplicationInfo info) { return AppWithAdminGrantedPermissionsCounter.includeInCount(mPermissions, mDevicePolicyManager, mPm, mPackageManagerService, info); } }
[ "xiaoxiaoyu@bytedance.com" ]
xiaoxiaoyu@bytedance.com
e61d6299499626ec7c22f8dd8f4efacf4edbcdee
693f7b1e553c926f865d591bfedc391982dbf280
/PogamutUT2004/src/test/java/cz/cuni/amis/pogamut/ut2004/bot/navigation/UT2004Test100_DMFlux2_Longrun.java
8d1b4612020adc9c4e7e1bef5f4fec9edd3d63b3
[]
no_license
bogo777/navigation-evaluation
56888f40e411561617cc3cab497934b128da17b4
f3ab1fee146fa0b3bf408684ee308566c0157742
refs/heads/master
2020-05-17T05:16:43.662531
2014-05-30T12:23:41
2014-05-30T12:23:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,362
java
package cz.cuni.amis.pogamut.ut2004.bot.navigation; import cz.cuni.amis.pogamut.ut2004.bot.UT2004BotTest; import org.junit.Test; /** * * @author Peta Michalik */ public class UT2004Test100_DMFlux2_Longrun extends UT2004BotTest { @Override protected String getMapName() { return "DM-Flux2"; } @Override protected String getGameType() { return "BotDeathMatch"; } @Test public void test100_longrun_1_time() { startTest( // use NavigationTestBot for the test NavigationTestBot.class, // timeout: 1 minute 1, // test movement between start: DM-Flux2.InventorySpot85, end: DM-Flux2.InventorySpot95 number of repetitions both ways new NavigationTestBotParameters("DM-Flux2.InventorySpot85", "DM-Flux2.InventorySpot95", 1, true) ); } /* * TODO: Test fails */ @Test public void test100_longrun_20_time() { startTest( // use NavigationTestBot for the test NavigationTestBot.class, // timeout: 10 minutes 10, // test movement between start: DM-Flux2.InventorySpot85, end: DM-Flux2.InventorySpot95 number of repetitions both ways new NavigationTestBotParameters("DM-Flux2.InventorySpot85", "DM-Flux2.InventorySpot95", 20, true) ); } }
[ "bmachac@2cdb6f53-bab2-4d57-a78b-cc29d6e59011" ]
bmachac@2cdb6f53-bab2-4d57-a78b-cc29d6e59011
f8ec7500e86782e5dcdb9b18a5e8e30435e58bd7
546535d586d8e11f746f5af5faa4724e02e117c9
/src/main/java/net/socialhub/core/action/UserAction.java
f2eab187b3ff19bb66ff3e802b03a468884165c3
[ "MIT" ]
permissive
uakihir0/SocialHub
84521d9efebbbdf546048f81f6e255dc61417c25
0c88f29abc7014158cac6a6499b7fe8beb796f6c
refs/heads/master
2023-07-07T09:10:35.661951
2023-06-26T13:19:38
2023-06-26T13:19:38
140,700,591
50
4
MIT
2023-06-26T13:19:40
2018-07-12T10:51:13
Java
UTF-8
Java
false
false
938
java
package net.socialhub.core.action; import net.socialhub.core.model.Relationship; import net.socialhub.core.model.User; public interface UserAction { /** * Get Account * アカウントを再度取得 */ User refresh(); /** * Follow User * アカウントをフォロー */ void follow(); /** * UnFollow User * アカウントをアンフォロー */ void unfollow(); /** * Mute User * ユーザーをミュート */ void mute(); /** * UnMute User * ユーザーをミュート解除 */ void unmute(); /** * Block User * ユーザーをブロック */ void block(); /** * UnBlock User * ユーザーをブロック解除 */ void unblock(); /** * Get relationship * 認証アカウントとの関係を取得 */ Relationship getRelationship(); }
[ "a.urusihara@gmail.com" ]
a.urusihara@gmail.com
646a8842576dd7cb141bf73fb74282dfed6522e2
574dc5180f0c75dba27499e04d3591fd6e0307e3
/src/main/java/com/sinosoft/ops/cimp/vo/to/sys/systable/SysTableFieldModel.java
34014e73f933f7d426aa6a03e813d6f1f93bc122
[]
no_license
xiaoxinyi1037700927/ops-cimp
c045b440443b248e7a4f5baee3f2f403d8d94029
29aa47edc69405953f4957d37281f822f26c0854
refs/heads/master
2023-01-08T04:12:30.909977
2019-06-12T03:52:42
2019-06-12T03:52:42
191,522,197
0
0
null
2023-01-02T22:13:43
2019-06-12T07:39:39
Java
UTF-8
Java
false
false
200
java
package com.sinosoft.ops.cimp.vo.to.sys.systable; import com.sinosoft.ops.cimp.vo.from.sys.systable.SysTableFieldModifyModel; public class SysTableFieldModel extends SysTableFieldModifyModel { }
[ "123456" ]
123456
80b115d432ccf6d336a0ef93038b59530c414fe3
f1512098b9411c10b28572267cf37cea0b562e8a
/core/src/main/java/io/onedev/server/manager/impl/DefaultPullRequestUpdateManager.java
9b1ef23cc9153915098153c8a9934273ae69d863
[ "MIT" ]
permissive
tom-chen-cn/onedev
503aa9f322659b1d33738dacc086f2c41ca85cd7
2d08d273e85a8aabeedd4eda77a1641c79ca42df
refs/heads/master
2020-04-27T20:17:13.547814
2019-03-08T03:06:30
2019-03-08T03:06:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,552
java
package io.onedev.server.manager.impl; import java.util.List; import javax.inject.Inject; import javax.inject.Singleton; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.RefUpdate; import org.eclipse.jgit.transport.RefSpec; import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions; import io.onedev.launcher.loader.ListenerRegistry; import io.onedev.server.event.pullrequest.PullRequestUpdated; import io.onedev.server.git.GitUtils; import io.onedev.server.manager.PullRequestCommentManager; import io.onedev.server.manager.PullRequestManager; import io.onedev.server.manager.PullRequestUpdateManager; import io.onedev.server.model.Project; import io.onedev.server.model.PullRequest; import io.onedev.server.model.PullRequestUpdate; import io.onedev.server.persistence.annotation.Sessional; import io.onedev.server.persistence.annotation.Transactional; import io.onedev.server.persistence.dao.AbstractEntityManager; import io.onedev.server.persistence.dao.Dao; import io.onedev.server.persistence.dao.EntityCriteria; import io.onedev.utils.ExceptionUtils; @Singleton public class DefaultPullRequestUpdateManager extends AbstractEntityManager<PullRequestUpdate> implements PullRequestUpdateManager { private final ListenerRegistry listenerRegistry; private final PullRequestManager pullRequestManager; @Inject public DefaultPullRequestUpdateManager(Dao dao, ListenerRegistry listenerRegistry, PullRequestCommentManager commentManager, PullRequestManager pullRequestManager) { super(dao); this.listenerRegistry = listenerRegistry; this.pullRequestManager = pullRequestManager; } @Transactional @Override public void save(PullRequestUpdate update) { save(update, true); } @Transactional @Override public void save(PullRequestUpdate update, boolean independent) { PullRequest request = update.getRequest(); dao.persist(update); ObjectId updateHeadId = ObjectId.fromString(update.getHeadCommitHash()); if (!request.getTargetProject().equals(request.getSourceProject())) { try { request.getTargetProject().git().fetch() .setRemote(request.getSourceProject().getGitDir().getAbsolutePath()) .setRefSpecs(new RefSpec(GitUtils.branch2ref(request.getSourceBranch()) + ":" + update.getHeadRef())) .call(); if (!request.getTargetProject().getObjectId(update.getHeadRef()).equals(updateHeadId)) { RefUpdate refUpdate = GitUtils.getRefUpdate(request.getTargetProject().getRepository(), update.getHeadRef()); refUpdate.setNewObjectId(updateHeadId); GitUtils.updateRef(refUpdate); } } catch (Exception e) { throw ExceptionUtils.unchecked(e); } } else { RefUpdate refUpdate = GitUtils.getRefUpdate(request.getTargetProject().getRepository(), update.getHeadRef()); refUpdate.setNewObjectId(updateHeadId); GitUtils.updateRef(refUpdate); } request.setHeadCommitHash(update.getHeadCommitHash()); pullRequestManager.save(request); if (independent) { PullRequestUpdated event = new PullRequestUpdated(update); listenerRegistry.post(event); } } @Sessional @Override public List<PullRequestUpdate> queryAfter(Project project, Long afterUpdateId, int count) { EntityCriteria<PullRequestUpdate> criteria = newCriteria(); criteria.createCriteria("request").add(Restrictions.eq("targetProject", project)); criteria.addOrder(Order.asc("id")); if (afterUpdateId != null) criteria.add(Restrictions.gt("id", afterUpdateId)); return query(criteria, 0, count); } }
[ "robin@pmease.com" ]
robin@pmease.com
2ea1d88e242f2c1abd175c7f95399fece1449766
953be620ec287b0cf1f5b32e788cb26cf10e7b08
/achats/achat-model/src/main/java/com/teratech/achat/model/base/UniteAchat.java
451215f027d04e47492c35058102054967b16542
[]
no_license
bekondo84/SOURCES
15511cbcf1c0d048b9d109343ac1a54cc1739b2a
1d80523ca6389eef393c50fed21bf1d821d328e3
refs/heads/master
2021-07-11T16:36:04.818659
2019-02-19T14:55:56
2019-02-19T14:55:56
148,776,597
0
0
null
null
null
null
UTF-8
Java
false
false
2,943
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.teratech.achat.model.base; import com.core.base.BaseElement; import com.megatim.common.annotations.Predicate; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; /** * * @author BEKO */ @Entity @Table(name = "T_UNAC") public class UniteAchat extends BaseElement implements Serializable,Comparable<UniteAchat>{ @Predicate(label = "code",optional = false,unique = true,search = true) private String code ; @Predicate(label = "actif",type = Boolean.class) private Boolean actif = Boolean.TRUE; @ManyToOne @JoinColumn(name = "UNGE_ID") @Predicate(label = "unite.gestion",type = UniteGestion.class,target = "many-to-one",search = true) private UniteGestion unite ; @Predicate(label = "precision",type = Double.class,search = true) private Double coeff = 0.0; public UniteAchat(String code, Boolean actif, UniteGestion unite) { this.code = code; this.actif = actif; this.unite = unite; } public UniteAchat(String code, Boolean actif, UniteGestion unite, long id, String designation, String moduleName) { super(id, designation, moduleName,0L); this.code = code; this.actif = actif; this.unite = unite; } public UniteAchat() { } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public boolean isActif() { return actif; } public void setActif(Boolean actif) { this.actif = actif; } public UniteGestion getUnite() { return unite; } public void setUnite(UniteGestion unite) { this.unite = unite; } public Double getCoeff() { return coeff; } public void setCoeff(Double coeff) { this.coeff = coeff; } @Override public String getDesignation() { return code; //To change body of generated methods, choose Tools | Templates. } @Override public String getModuleName() { return "teratechachat"; //To change body of generated methods, choose Tools | Templates. } @Override public String getListTitle() { return "unites.achat"; //To change body of generated methods, choose Tools | Templates. } @Override public String getEditTitle() { return "unite.achat"; //To change body of generated methods, choose Tools | Templates. } @Override public int compareTo(UniteAchat o) { //To change body of generated methods, choose Tools | Templates. return code.compareTo(o.code); } }
[ "bekondo_dieu@yahoo.fr" ]
bekondo_dieu@yahoo.fr
3e70dd7987be37a72545347965e4dba1ffd49e4a
cb2e0b45e47ebeb518f1c8d7d12dfa0680aed01c
/openbanking-api-spring-boot/src/main/gen/com/laegler/openbanking/api/DomesticPaymentConsentsApiController.java
f78db2d98dadeb1fb1f1a29bebda890c5775d52a
[ "MIT" ]
permissive
thlaegler/openbanking
4909cc9e580210267874c231a79979c7c6ec64d8
924a29ac8c0638622fba7a5674c21c803d6dc5a9
refs/heads/develop
2022-12-23T15:50:28.827916
2019-10-30T09:11:26
2019-10-31T05:43:04
213,506,933
1
0
MIT
2022-11-16T11:55:44
2019-10-07T23:39:49
HTML
UTF-8
Java
false
false
1,111
java
package com.laegler.openbanking.api; import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.util.Optional; @javax.annotation.Generated(value = "class com.laegler.openbanking.codegen.module.OpenbankingSpringCodegen", date = "2019-10-19T13:25:17.080+13:00") @RestController @Slf4j public class DomesticPaymentConsentsApiController implements DomesticPaymentConsentsApi { private final ObjectMapper objectMapper; private final HttpServletRequest request; @org.springframework.beans.factory.annotation.Autowired public DomesticPaymentConsentsApiController(ObjectMapper objectMapper, HttpServletRequest request) { this.objectMapper = objectMapper; this.request = request; } @Override public Optional<ObjectMapper> getObjectMapper() { return Optional.ofNullable(objectMapper); } @Override public Optional<HttpServletRequest> getRequest() { return Optional.ofNullable(request); } }
[ "thomas.laegler@googlemail.com" ]
thomas.laegler@googlemail.com
84e22b19cda59d12b86e2406421c2557d7a225c9
778556b05d62c1710f9af23dcbcd7de3b5757c66
/eureka/src/test/java/com/sam/EurekaApplicationTests.java
1b1bfb0e8a13df0d42ba780fb8d68f6fb490dedf
[]
no_license
qinxiangzhi/springCloudEureka
e7f06dd0f832e6b5bafbd5621cd879df5ac3efa4
dd3788a72852b16b86cfe54a521edf063b8f719d
refs/heads/master
2020-04-12T07:46:15.204953
2018-12-19T02:38:49
2018-12-19T02:38:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
325
java
package com.sam; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class EurekaApplicationTests { @Test public void contextLoads() { } }
[ "123" ]
123
de024860d6f274883fbc6c29927db6e292f13065
9bf14b4d2eac89c403109c15a5d48127a81ef8a9
/src/minecraft/net/minecraft/network/play/client/C15PacketClientSettings.java
1eb70704505e610fa66caf7930dcfda6e8c0be4a
[ "MIT" ]
permissive
mchimsak/VodkaSrc
e6d7e968b645566b3eeb1c0995c8d65afc983d1e
8f0cf23bac81c6bdf784228616f54afa84d03757
refs/heads/master
2020-05-01T08:48:11.781283
2018-11-20T05:46:18
2018-11-20T05:46:18
177,386,099
1
0
MIT
2019-03-24T07:59:07
2019-03-24T07:59:06
null
UTF-8
Java
false
false
2,290
java
package net.minecraft.network.play.client; import java.io.IOException; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.network.Packet; import net.minecraft.network.PacketBuffer; import net.minecraft.network.play.INetHandlerPlayServer; public class C15PacketClientSettings implements Packet<INetHandlerPlayServer> { private String lang; private int view; private EntityPlayer.EnumChatVisibility chatVisibility; private boolean enableColors; private int modelPartFlags; public C15PacketClientSettings() { } public C15PacketClientSettings(String langIn, int viewIn, EntityPlayer.EnumChatVisibility chatVisibilityIn, boolean enableColorsIn, int modelPartFlagsIn) { this.lang = langIn; this.view = viewIn; this.chatVisibility = chatVisibilityIn; this.enableColors = enableColorsIn; this.modelPartFlags = modelPartFlagsIn; } /** * Reads the raw packet data from the data stream. */ public void readPacketData(PacketBuffer buf) throws IOException { this.lang = buf.readStringFromBuffer(7); this.view = buf.readByte(); this.chatVisibility = EntityPlayer.EnumChatVisibility.getEnumChatVisibility(buf.readByte()); this.enableColors = buf.readBoolean(); this.modelPartFlags = buf.readUnsignedByte(); } /** * Writes the raw packet data to the data stream. */ public void writePacketData(PacketBuffer buf) throws IOException { buf.writeString(this.lang); buf.writeByte(this.view); buf.writeByte(this.chatVisibility.getChatVisibility()); buf.writeBoolean(this.enableColors); buf.writeByte(this.modelPartFlags); } /** * Passes this Packet on to the NetHandler for processing. */ public void processPacket(INetHandlerPlayServer handler) { handler.processClientSettings(this); } public String getLang() { return this.lang; } public EntityPlayer.EnumChatVisibility getChatVisibility() { return this.chatVisibility; } public boolean isColorsEnabled() { return this.enableColors; } public int getModelPartFlags() { return this.modelPartFlags; } }
[ "wyy-666" ]
wyy-666
ccbd64e84bd413791a45a6bbab79c6b1708dd8fa
6458b6cdab45589454d47d9afa33be66efab7433
/netty-http-client/src/main/java/org/xbib/netty/http/client/Http2.java
834a3bbaf5e92a875feb40e037a2021753225f13
[ "Apache-2.0" ]
permissive
jprante/netty-http
43ffa068ec42c61578397987c1df1d0ddc52499f
ae1240822f522ce10c70692a44f5077e46b32a5a
refs/heads/main
2023-08-14T18:41:35.120323
2023-03-11T08:06:26
2023-03-11T08:06:26
89,969,764
10
3
null
null
null
null
UTF-8
Java
false
false
686
java
package org.xbib.netty.http.client; import org.xbib.netty.http.client.api.ClientProtocolProvider; import org.xbib.netty.http.client.handler.http2.Http2ChannelInitializer; import org.xbib.netty.http.client.transport.Http2Transport; public class Http2 implements ClientProtocolProvider<Http2ChannelInitializer, Http2Transport> { @Override public boolean supportsMajorVersion(int majorVersion) { return majorVersion == 2; } @Override public Class<Http2ChannelInitializer> initializerClass() { return Http2ChannelInitializer.class; } @Override public Class<Http2Transport> transportClass() { return Http2Transport.class; } }
[ "joergprante@gmail.com" ]
joergprante@gmail.com
c7d32ab220e350e002a1e8096bc97854ae7dfaee
b0fbf2b9cd4f16d4de38cc92cfc987bd8f5c112a
/src/com/zs/ina/admin/master/purpose/dao/PurposeDAO.java
a8e1f030a62d7fb3de095eb7cd73d70beed208da
[]
no_license
sumesh-tg/International_Academy
31fba8b9f1f4985111ea6cbb837e27125b75b531
7816795ab52bbb7411aa651983a6317a2a261f4b
refs/heads/master
2020-04-11T03:11:27.067358
2018-12-12T11:15:04
2018-12-12T11:15:04
161,470,316
0
0
null
null
null
null
UTF-8
Java
false
false
1,469
java
/* * Copyright ZoftSolutions(C) 2016 SUMESH T.G <ZoftSolutions> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Developed by ZoftSolutions (2015) Company. */ package com.zs.ina.admin.master.purpose.dao; import javafx.collections.ObservableList; /** * * @author SUMESH T.G <ZoftSolutions> */ public interface PurposeDAO { /** * * @param purposeModel * @return */ public int insertPurpose(PurposeModel purposeModel); /** * * @param purposeModel * @return */ public int deletePurpose(PurposeModel purposeModel); /** * * @param purposeModel * @return */ public int upadatePurpose(PurposeModel purposeModel); /** * * @return */ public ObservableList<PurposeModel> listPurpose(); /** * * @return */ public ObservableList getPurpose(); }
[ "mailbox4sumesh@gmail.com" ]
mailbox4sumesh@gmail.com
be466b45fe65fbe0d05f6f232ea0ef5a32cd02ac
4ad17f7216a2838f6cfecf77e216a8a882ad7093
/clbs/src/main/java/com/zw/adas/domain/define/enumcontant/AdasReadParamPageEnum.java
33fa84619947c490b36561372333536e60c0f15d
[ "MIT" ]
permissive
djingwu/hybrid-development
b3c5eed36331fe1f404042b1e1900a3c6a6948e5
784c5227a73d1e6609b701a42ef4cdfd6400d2b7
refs/heads/main
2023-08-06T22:34:07.359495
2021-09-29T02:10:11
2021-09-29T02:10:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,366
java
package com.zw.adas.domain.define.enumcontant; import java.util.HashMap; import java.util.Map; import static com.zw.protocol.util.ProtocolTypeUtil.GUANG_XI_PROTOCOL_808_2013; import static com.zw.protocol.util.ProtocolTypeUtil.HEI_PROTOCOL_808_2019; import static com.zw.protocol.util.ProtocolTypeUtil.JIANG_SU_PROTOCOL_808_2013; import static com.zw.protocol.util.ProtocolTypeUtil.JIANG_XI_PROTOCOL_808_2013; import static com.zw.protocol.util.ProtocolTypeUtil.JING_PROTOCOL_808_2019; import static com.zw.protocol.util.ProtocolTypeUtil.JI_LIN_PROTOCOL_808_2013; import static com.zw.protocol.util.ProtocolTypeUtil.JI_PROTOCOL_808_2013; import static com.zw.protocol.util.ProtocolTypeUtil.LU_PROTOCOL_808_2019; import static com.zw.protocol.util.ProtocolTypeUtil.SHANG_HAI_PROTOCOL_808_2019; import static com.zw.protocol.util.ProtocolTypeUtil.SHAN_XI_PROTOCOL_808_2013; import static com.zw.protocol.util.ProtocolTypeUtil.SI_CHUAN_PROTOCOL_808_2013; import static com.zw.protocol.util.ProtocolTypeUtil.XIANG_PROTOCOL_808_2013; import static com.zw.protocol.util.ProtocolTypeUtil.YUE_PROTOCOL_808_2019; import static com.zw.protocol.util.ProtocolTypeUtil.ZHE_JIANG_PROTOCOL_808_2013; import static com.zw.protocol.util.ProtocolTypeUtil.ZW_PROTOCOL_808_2019; /** * 读取外设参数设置页面 * @author zhangjuan */ public enum AdasReadParamPageEnum { /** * 川标 */ CHUAN(SI_CHUAN_PROTOCOL_808_2013, "paramInfo"), /** * 冀标 */ JI(JI_PROTOCOL_808_2013, "jiParamInfo"), /** * 桂标 */ GUI(GUANG_XI_PROTOCOL_808_2013, "guiParamInfo"), /** * 苏标 */ SU(JIANG_SU_PROTOCOL_808_2013, "suParamInfo"), /** * 浙标 */ ZHE(ZHE_JIANG_PROTOCOL_808_2013, "zheParamInfo"), /** * 吉标 */ JI_LIN(JI_LIN_PROTOCOL_808_2013, "jiLinParamInfo"), /** * 陕西 */ SHAN(SHAN_XI_PROTOCOL_808_2013, "shanParamInfo"), /** * 赣标 */ GAN(JIANG_XI_PROTOCOL_808_2013, "ganParamInfo"), /** * 沪标 */ HU(SHANG_HAI_PROTOCOL_808_2019, "huParamInfo"), /** * 中位标 */ ZHONG_WEI(ZW_PROTOCOL_808_2019, "zhongWeiParamInfo"), /** * 黑标 */ HEI(HEI_PROTOCOL_808_2019, "heiParamInfo"), /** * 京标 */ JING(JING_PROTOCOL_808_2019, "jingParamInfo"), /** * 鲁标 */ LU(LU_PROTOCOL_808_2019, "luParamInfo"), /** * 湘标 */ XIANG(XIANG_PROTOCOL_808_2013, "xiangParamInfo"), /** * 粤标 */ YUE(YUE_PROTOCOL_808_2019, "yueParamInfo"),; private String protocolType; private String page; AdasReadParamPageEnum(String protocolType, String page) { this.protocolType = protocolType; this.page = "risk/riskManagement/DefineSettings/" + page; } private static Map<String, AdasReadParamPageEnum> readPageMap = new HashMap<>(); static { for (AdasReadParamPageEnum pageEnum : AdasReadParamPageEnum.values()) { readPageMap.put(pageEnum.protocolType, pageEnum); } } public static String getPage(String protocolType) { AdasReadParamPageEnum pageEnum = readPageMap.get(protocolType); //为空返回错误页面 if (pageEnum == null) { return null; } return pageEnum.page; } }
[ "wuxuetao@zwlbs.com" ]
wuxuetao@zwlbs.com
51192a4593d2e96069f9c7fe5b9ee134e230d78e
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Jetty/Jetty7043.java
b0ba7083256526d7ca79d99cda62d1f59c1accfb
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
372
java
@Override public void configure(WebSocketServletFactory factory) { // Test cases 9.x uses BIG frame sizes, let policy handle them. int bigFrameSize = 20 * MBYTE; factory.getPolicy().setMaxTextMessageSize(bigFrameSize); factory.getPolicy().setMaxBinaryMessageSize(bigFrameSize); factory.register(ABSocket.class); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
67883e7d3449727e98684240ec681da6ee32bfa3
80a6b8d1efa66efbb94f0df684eedb81a5cc552c
/assertj-core/src/test/java/org/assertj/core/api/ByteArrayAssertBaseTest.java
c1f87f2979719ebb9c6015f90380fffb72dbd475
[ "Apache-2.0" ]
permissive
AlHasan89/System_Re-engineering
43f232e90f65adc940af3bfa2b4d584d25ce076c
b80e6d372d038fd246f946e41590e07afddfc6d7
refs/heads/master
2020-03-27T05:08:26.156072
2019-01-06T17:54:59
2019-01-06T17:54:59
145,996,692
0
1
Apache-2.0
2019-01-06T17:55:00
2018-08-24T13:43:31
Java
UTF-8
Java
false
false
1,396
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. * * Copyright 2012-2017 the original author or authors. */ package org.assertj.core.api; import static org.assertj.core.test.ByteArrays.emptyArray; import static org.mockito.Mockito.mock; import org.assertj.core.internal.ByteArrays; /** * Base class for {@link ByteArrayAssert} tests. * * @author Olivier Michallat */ public abstract class ByteArrayAssertBaseTest extends BaseTestTemplate<ByteArrayAssert, byte[]> { protected ByteArrays arrays; @Override protected ByteArrayAssert create_assertions() { return new ByteArrayAssert(emptyArray()); } @Override protected void inject_internal_objects() { super.inject_internal_objects(); arrays = mock(ByteArrays.class); assertions.arrays = arrays; } protected ByteArrays getArrays(ByteArrayAssert someAssertions) { return someAssertions.arrays; } }
[ "nw91@le.ac.uk" ]
nw91@le.ac.uk
50b38af8d930b7a0c68a9221d2730455a9c0761f
17b698eb754c6e07679f8a518dcdaa94141f2194
/src/main/java/jmind/base/util/reflect/BeanInstantiationException.java
bb34fca7390757e73ffc7dad50fd7876db20b7cd
[]
no_license
weiboxie/jmind-base
d39ffc9f5f99807cc3f604e62ff65b5007573c61
9eb8775276e426828977c3b1b196268247ec3933
refs/heads/master
2023-08-19T20:29:24.074102
2021-09-26T11:42:44
2021-09-26T11:42:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,179
java
/* * * * The jmind-pigg 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 jmind.base.util.reflect; /** * 运行时实例化类异常 * * @author xieweibo */ public class BeanInstantiationException extends RuntimeException { private Class beanClass; public BeanInstantiationException(Class beanClass, String msg) { this(beanClass, msg, null); } public BeanInstantiationException(Class beanClass, String msg, Throwable cause) { super("Could not instantiate bean class [" + beanClass.getName() + "]: " + msg, cause); this.beanClass = beanClass; } public Class getBeanClass() { return beanClass; } }
[ "weibo.xwb@alibaba-inc.com" ]
weibo.xwb@alibaba-inc.com
da4d83ec0101bb7eeccc4892cf76d63946964949
6af61403887f4bf1ec8b80a227ea4237bd47345e
/src/rs/math/oop1/z080603/konstruktori/z03/fakultetPrepoterecenje/Profesor.java
31213cf6677006945e575e7b958f06b2a5597e9b
[ "MIT" ]
permissive
MatfOOP-I/primeri-predavanja-2020-21
fa3542caffc3808efaa6a427e076009f3493223c
071484ce72f730adaec2722369c626c09d13f467
refs/heads/main
2023-02-05T12:51:13.446040
2020-12-28T18:16:36
2020-12-28T18:16:36
310,011,294
0
0
null
null
null
null
UTF-8
Java
false
false
3,301
java
/* Јава класа која представља професора */ package rs.math.oop1.z080603.konstruktori.z03.fakultetPrepoterecenje; import java.util.Scanner; public class Profesor { private String ime; private String prezime; private String zvanje; private String katedra; private boolean[] predaje; // inicijalizacioni blok primerka { predaje = new boolean[Predmet.brojPredmeta]; for (int i = 0; i < predaje.length; i++) predaje[i] = false; } public Profesor(String ime, String prezime, String zvanje, String katedra, boolean[] predaje) { this.ime = ime; this.prezime = prezime; this.zvanje = zvanje; this.katedra = katedra; this.predaje = predaje; } public Profesor(String ime, String prezime, String zvanje, String katedra) { this.ime = ime; this.prezime = prezime; this.zvanje = zvanje; this.katedra = katedra; } public String getIme() { return ime; } public void setIme(String profIme) { ime = profIme; } public String getPrezime() { return prezime; } public void setPrezime(String profPrezime) { prezime = profPrezime; } public String getZvanje() { return zvanje; } public void setZvanje(String profZvanje) { zvanje = profZvanje; } public String getKatedra() { return katedra; } public void setKatedra(String profKatedra) { katedra = profKatedra; } public boolean getPredmetPredaje(int predmet) { return predaje[predmet]; } public void setPredmetPredaje(int predmet, boolean pred) { predaje[predmet] = pred; } public byte getPredmetPredajeBroj() { byte brojPredmeta = 0; for (boolean predmet : predaje) if (predmet) brojPredmeta++; return brojPredmeta; } public void prikazi() { System.out.printf("\nProfesor: %s %s\n", ime, prezime); System.out.printf( "Katedra: %s. Zvanje: %s\nPredaje sledece predmete:\n", katedra, zvanje); for (int i = 0; i < predaje.length; i++) System.out.printf("%s:\t%s\n", Predmet.getNazivPredmeta(i), (predaje[i]) ? "da " : "ne "); } public static Profesor ucitaj(Scanner skener) { System.out.println("Ime i prezime nastavnika"); String profIme = skener.next(); String profPrezime = skener.next(); System.out.println("Katedra na kojoj radi nastavnik"); String profKatedra = skener.next(); System.out.println("Zvanje nastavnika"); String profZvanje = skener.next(); boolean profPredajeNa[] = new boolean[Predmet.brojPredmeta]; System.out.printf( "Unesi na kojim od %d predmeta nastavnika predaje (0 znaci da ne predaje)\n", profPredajeNa.length); for (int i = 0; i < profPredajeNa.length; i++) { System.out .print(Predmet.getSifraPredmeta(i) + ":"); String unos = skener.next().trim(); profPredajeNa[i] = unos.equals("0") ? false : true; } return new Profesor(profIme, profPrezime, profKatedra, profZvanje, profPredajeNa); } }
[ "vladofilipovic@hotmail.com" ]
vladofilipovic@hotmail.com
63f2abd342e3024c93281c0952887cc401773f52
8ccd1c071b19388f1f2e92c5e5dbedc78fead327
/src/main/java/ohos/org/xml/sax/helpers/XMLReaderAdapter.java
d9ee723e79afb7fae3f3f776d17557a9ce411439
[]
no_license
yearsyan/Harmony-OS-Java-class-library
d6c135b6a672c4c9eebf9d3857016995edeb38c9
902adac4d7dca6fd82bb133c75c64f331b58b390
refs/heads/main
2023-06-11T21:41:32.097483
2021-06-24T05:35:32
2021-06-24T05:35:32
379,816,304
6
3
null
null
null
null
UTF-8
Java
false
false
7,036
java
package ohos.org.xml.sax.helpers; import java.io.IOException; import java.util.Locale; import ohos.jdk.xml.internal.JdkXmlUtils; import ohos.org.xml.sax.AttributeList; import ohos.org.xml.sax.Attributes; import ohos.org.xml.sax.ContentHandler; import ohos.org.xml.sax.DTDHandler; import ohos.org.xml.sax.DocumentHandler; import ohos.org.xml.sax.EntityResolver; import ohos.org.xml.sax.ErrorHandler; import ohos.org.xml.sax.InputSource; import ohos.org.xml.sax.Locator; import ohos.org.xml.sax.Parser; import ohos.org.xml.sax.SAXException; import ohos.org.xml.sax.SAXNotSupportedException; import ohos.org.xml.sax.XMLReader; public class XMLReaderAdapter implements Parser, ContentHandler { DocumentHandler documentHandler; AttributesAdapter qAtts; XMLReader xmlReader; @Override // ohos.org.xml.sax.ContentHandler public void endPrefixMapping(String str) { } @Override // ohos.org.xml.sax.ContentHandler public void skippedEntity(String str) throws SAXException { } @Override // ohos.org.xml.sax.ContentHandler public void startPrefixMapping(String str, String str2) { } public XMLReaderAdapter() throws SAXException { setup(XMLReaderFactory.createXMLReader()); } public XMLReaderAdapter(XMLReader xMLReader) { setup(xMLReader); } private void setup(XMLReader xMLReader) { if (xMLReader != null) { this.xmlReader = xMLReader; this.qAtts = new AttributesAdapter(); return; } throw new NullPointerException("XMLReader must not be null"); } @Override // ohos.org.xml.sax.Parser public void setLocale(Locale locale) throws SAXException { throw new SAXNotSupportedException("setLocale not supported"); } @Override // ohos.org.xml.sax.Parser public void setEntityResolver(EntityResolver entityResolver) { this.xmlReader.setEntityResolver(entityResolver); } @Override // ohos.org.xml.sax.Parser public void setDTDHandler(DTDHandler dTDHandler) { this.xmlReader.setDTDHandler(dTDHandler); } @Override // ohos.org.xml.sax.Parser public void setDocumentHandler(DocumentHandler documentHandler2) { this.documentHandler = documentHandler2; } @Override // ohos.org.xml.sax.Parser public void setErrorHandler(ErrorHandler errorHandler) { this.xmlReader.setErrorHandler(errorHandler); } @Override // ohos.org.xml.sax.Parser public void parse(String str) throws IOException, SAXException { parse(new InputSource(str)); } @Override // ohos.org.xml.sax.Parser public void parse(InputSource inputSource) throws IOException, SAXException { setupXMLReader(); this.xmlReader.parse(inputSource); } private void setupXMLReader() throws SAXException { this.xmlReader.setFeature(JdkXmlUtils.NAMESPACE_PREFIXES_FEATURE, true); try { this.xmlReader.setFeature("http://xml.org/sax/features/namespaces", false); } catch (SAXException unused) { } this.xmlReader.setContentHandler(this); } @Override // ohos.org.xml.sax.ContentHandler public void setDocumentLocator(Locator locator) { DocumentHandler documentHandler2 = this.documentHandler; if (documentHandler2 != null) { documentHandler2.setDocumentLocator(locator); } } @Override // ohos.org.xml.sax.ContentHandler public void startDocument() throws SAXException { DocumentHandler documentHandler2 = this.documentHandler; if (documentHandler2 != null) { documentHandler2.startDocument(); } } @Override // ohos.org.xml.sax.ContentHandler public void endDocument() throws SAXException { DocumentHandler documentHandler2 = this.documentHandler; if (documentHandler2 != null) { documentHandler2.endDocument(); } } @Override // ohos.org.xml.sax.ContentHandler public void startElement(String str, String str2, String str3, Attributes attributes) throws SAXException { if (this.documentHandler != null) { this.qAtts.setAttributes(attributes); this.documentHandler.startElement(str3, this.qAtts); } } @Override // ohos.org.xml.sax.ContentHandler public void endElement(String str, String str2, String str3) throws SAXException { DocumentHandler documentHandler2 = this.documentHandler; if (documentHandler2 != null) { documentHandler2.endElement(str3); } } @Override // ohos.org.xml.sax.ContentHandler public void characters(char[] cArr, int i, int i2) throws SAXException { DocumentHandler documentHandler2 = this.documentHandler; if (documentHandler2 != null) { documentHandler2.characters(cArr, i, i2); } } @Override // ohos.org.xml.sax.ContentHandler public void ignorableWhitespace(char[] cArr, int i, int i2) throws SAXException { DocumentHandler documentHandler2 = this.documentHandler; if (documentHandler2 != null) { documentHandler2.ignorableWhitespace(cArr, i, i2); } } @Override // ohos.org.xml.sax.ContentHandler public void processingInstruction(String str, String str2) throws SAXException { DocumentHandler documentHandler2 = this.documentHandler; if (documentHandler2 != null) { documentHandler2.processingInstruction(str, str2); } } /* access modifiers changed from: package-private */ public final class AttributesAdapter implements AttributeList { private Attributes attributes; AttributesAdapter() { } /* access modifiers changed from: package-private */ public void setAttributes(Attributes attributes2) { this.attributes = attributes2; } @Override // ohos.org.xml.sax.AttributeList public int getLength() { return this.attributes.getLength(); } @Override // ohos.org.xml.sax.AttributeList public String getName(int i) { return this.attributes.getQName(i); } @Override // ohos.org.xml.sax.AttributeList public String getType(int i) { return this.attributes.getType(i); } @Override // ohos.org.xml.sax.AttributeList public String getValue(int i) { return this.attributes.getValue(i); } @Override // ohos.org.xml.sax.AttributeList public String getType(String str) { return this.attributes.getType(str); } @Override // ohos.org.xml.sax.AttributeList public String getValue(String str) { return this.attributes.getValue(str); } } }
[ "yearsyan@gmail.com" ]
yearsyan@gmail.com
b2db1c6b27276859580ad56111adc2db64d34c79
0a94e4bb6bdf5c54ebba25cecafa72215266843a
/3.JavaMultithreading/src/com/javarush/task/task29/task2904/Solution.java
44f2672dfeb00c414c90045adacb090ed0b1f881
[]
no_license
Senat77/JavaRush
8d8fb6e59375656a545825585118febd2e1637f4
68dc0139da96617ebcad967331dcd24f9875d8ee
refs/heads/master
2020-05-19T18:50:31.534629
2018-09-25T14:00:31
2018-09-25T14:00:31
185,160,609
0
0
null
null
null
null
UTF-8
Java
false
false
1,481
java
package com.javarush.task.task29.task2904; /* Особенности автобоксинга Исправь ошибку в методе getValueByIndex. Читай доп. статью про особенности автобоксинга. Требования: 1. Метод getValueByIndex должен возвращать объект типа Integer из массива array, если элемент с индексом index есть в массиве. 2. Метод getValueByIndex должен возвращать объект типа Double, равный -1, если в массиве array нет элемента с индексом index. 3. Метод main не изменять. 4. Программа должна вывести две строки: "-1.0, class java.lang.Double" и "3, class java.lang.Integer". */ public class Solution { private Integer[] array = new Integer[]{1, 2, 3, 4}; public static void main(String[] args) { Number value1 = new Solution().getValueByIndex(5); //-1.0, class java.lang.Double expected Number value2 = new Solution().getValueByIndex(2); //3, class java.lang.Integer expected System.out.println(value1 + ", " + value1.getClass().toString()); System.out.println(value2 + ", " + value2.getClass().toString()); } Number getValueByIndex(int index) { return (index >= 0 && index < array.length) ? array[index] : (Number) new Double(-1); } }
[ "sergii.senatorov@gmail.com" ]
sergii.senatorov@gmail.com
a7eb1838a09d8de076069494677e385797882e8e
25baed098f88fc0fa22d051ccc8027aa1834a52b
/src/main/java/com/ljh/service/impl/UdOrdmdfqServiceImpl.java
d13309bff608d2aeddd4e909cc234506f7a955f3
[]
no_license
woai555/ljh
a5015444082f2f39d58fb3e38260a6d61a89af9f
17cf8f4415c9ae7d9fedae46cd9e9d0d3ce536f9
refs/heads/master
2022-07-11T06:52:07.620091
2022-01-05T06:51:27
2022-01-05T06:51:27
132,585,637
0
0
null
2022-06-17T03:29:19
2018-05-08T09:25:32
Java
UTF-8
Java
false
false
463
java
package com.ljh.service.impl; import com.ljh.bean.UdOrdmdfq; import com.ljh.daoMz.UdOrdmdfqMapper; import com.ljh.service.UdOrdmdfqService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** * <p> * 服务实现类 * </p> * * @author ljh * @since 2020-10-26 */ @Service public class UdOrdmdfqServiceImpl extends ServiceImpl<UdOrdmdfqMapper, UdOrdmdfq> implements UdOrdmdfqService { }
[ "37681193+woai555@users.noreply.github.com" ]
37681193+woai555@users.noreply.github.com
035edb9526c6ae3abef94e0e05c8a1ff5f8d6c2a
9254e7279570ac8ef687c416a79bb472146e9b35
/dts-20200101/src/main/java/com/aliyun/dts20200101/models/CreateDtsInstanceResponse.java
9fa558fb4362c523dd3ebde1355e829744692c59
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,079
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.dts20200101.models; import com.aliyun.tea.*; public class CreateDtsInstanceResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public CreateDtsInstanceResponseBody body; public static CreateDtsInstanceResponse build(java.util.Map<String, ?> map) throws Exception { CreateDtsInstanceResponse self = new CreateDtsInstanceResponse(); return TeaModel.build(map, self); } public CreateDtsInstanceResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public CreateDtsInstanceResponse setBody(CreateDtsInstanceResponseBody body) { this.body = body; return this; } public CreateDtsInstanceResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
25825d8d3161fd475adc8524f6121b4d8eafce2e
a1b7a1ae6c1e835bd0e33c0c9efe908d68e75243
/uikit/src/com/netease/nim/uikit/common/util/log/LogUtil.java
34892722c6fcd68db199535a9915e06fde132aa9
[ "MIT" ]
permissive
cybernhl/MyChat
71aa7dd664dd92247960981b2fd6a3bc9d004c2a
e6da34d9c3e6538d7e7bf917bcd743abab22e856
refs/heads/master
2022-11-15T07:05:22.245978
2018-04-28T16:03:00
2018-04-28T16:03:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,139
java
package com.netease.nim.uikit.common.util.log; import com.netease.nim.uikit.common.util.log.sdk.LogBase; import com.netease.nim.uikit.common.util.log.sdk.wrapper.NimLog; import com.netease.nim.uikit.common.util.storage.ExternalStorage; public class LogUtil extends NimLog { private static final String LOG_FILE_NAME_PREFIX = "demo"; public static void init(String logDir, int level) { final LogBase.LogInterceptor interceptor = new LogBase.LogInterceptor() { @Override public boolean checkValidBeforeWrite() { return ExternalStorage.getInstance().checkStorageValid(); } }; NimLog.initDateNLog(null, logDir, LOG_FILE_NAME_PREFIX, level, 0, 0, true, interceptor); } public static void ui(String msg) { LogBase logBase = getLog(); if (null == msg || null == logBase) return; logBase.i("ui", buildMessage(msg)); } public static void res(String msg) { getLog().i("res", buildMessage(msg)); } public static void audio(String msg) { getLog().i("AudioRecorder", buildMessage(msg)); } }
[ "1341520108@qq.com" ]
1341520108@qq.com
62134e29c2d1ef7bfef275d2cc465e8bb1bc737c
fb9e3f995cd9bd7bea70083a2084fee2f1c0bdf5
/src/main/java/io/kubernetes/client/SecretKeyReference.java
a5e76732d2bb734c3f1421ccc4db096e1ec3e5bf
[ "Apache-2.0" ]
permissive
haytastan/kubernetes-service-catalog-client
194b1e7053429b59b25d9fd6bffc74a283b14be8
bd95fbddfed338a38ddb5b9cdafd01cd6f3800c5
refs/heads/master
2022-01-02T16:21:56.932964
2018-03-02T22:12:13
2018-03-02T22:12:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,639
java
/* * Copyright Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags and * the COPYRIGHT.txt file distributed with this work. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.kubernetes.client; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** * // SecretKeyReference references a key of a Secret. */ @JsonIgnoreProperties(ignoreUnknown=true) public class SecretKeyReference { private String name; private String key; /** * The name of the secret in the pod's namespace to select from. * @return String */ @JsonProperty("name") public String getName() { return name; } @JsonProperty("name") public void setName(String name) { this.name = name; } /** * The key of the secret to select from. Must be a valid secret key. * @return String */ @JsonProperty("key") public String getKey() { return key; } @JsonProperty("key") public void setKey(String key) { this.key = key; } }
[ "rareddy@jboss.org" ]
rareddy@jboss.org
1819fdb74445783d8cd320874126f0bd2d6ecac1
88e4c2a0f6e9097efe89b47612509f32b79badb8
/src/main/java/com/alipay/api/domain/KoubeiMarketingToolPrizesendAuthModel.java
402029508fb818b1b30e0066a2416cb1e0b175eb
[]
no_license
xushaomin/alipay-sdk-java
15f8e311b6ded9a565f473cd732e2747ed33d8b0
a03324a1ddc6eb3469c18f831512d5248bc98461
refs/heads/master
2020-06-15T13:26:40.913354
2016-12-01T12:23:27
2016-12-01T12:23:27
75,289,929
0
0
null
null
null
null
UTF-8
Java
false
false
1,017
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 发券授权 * * @author auto create * @since 1.0, 2016-10-09 11:45:06 */ public class KoubeiMarketingToolPrizesendAuthModel extends AlipayObject { private static final long serialVersionUID = 6354939971646681119L; /** * 奖品ID */ @ApiField("prize_id") private String prizeId; /** * 外部流水号,保证业务幂等性 */ @ApiField("req_id") private String reqId; /** * 发奖用户ID */ @ApiField("user_id") private String userId; public String getPrizeId() { return this.prizeId; } public void setPrizeId(String prizeId) { this.prizeId = prizeId; } public String getReqId() { return this.reqId; } public void setReqId(String reqId) { this.reqId = reqId; } public String getUserId() { return this.userId; } public void setUserId(String userId) { this.userId = userId; } }
[ "xushaomin@foxmail.com" ]
xushaomin@foxmail.com
7811e9330d67061e8f3ea72863877e4a7055aadb
e4b1d9b159abebe01b934f0fd3920c60428609ae
/src/main/java/org/proteored/miapeapi/factories/gi/AdditionalInformationBuilder.java
f49d4c8e792970e744622180c3fd3a2a7b3e76fe
[ "Apache-2.0" ]
permissive
smdb21/java-miape-api
83ba33cc61bf2c43c4049391663732c9cc39a718
5a49b49a3fed97ea5e441e85fe2cf8621b4e0900
refs/heads/master
2022-12-30T15:28:24.384176
2020-12-16T23:48:07
2020-12-16T23:48:07
67,961,174
0
0
Apache-2.0
2022-12-16T03:22:23
2016-09-12T00:01:29
Java
UTF-8
Java
false
false
668
java
package org.proteored.miapeapi.factories.gi; import org.proteored.miapeapi.cv.AdditionalInformationName; import org.proteored.miapeapi.interfaces.gi.GIAdditionalInformation; public class AdditionalInformationBuilder { String name; // it is not mandatory String value; /** * Set the additional information. It should be one of the possible values * from {@link AdditionalInformationName} * */ AdditionalInformationBuilder(String name) { this.name = name; } public AdditionalInformationBuilder value(String value) { this.value = value; return this; } public GIAdditionalInformation build() { return new AdditionalInformationImpl(this); } }
[ "salvador@scripps.edu" ]
salvador@scripps.edu
96814bf1497a31bd9ade3d8d902946a920054134
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module210/src/main/java/module210packageJava0/Foo8.java
c21173de2d6560ef8dc94e9dc750ef6cebeac689
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
444
java
package module210packageJava0; import java.lang.Integer; public class Foo8 { Integer int0; Integer int1; Integer int2; public void foo0() { new module210packageJava0.Foo7().foo6(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
6b571eee7ac89e8e2cb1d300c7cf7f32bd5bcac9
1c93df3c07e8f869693804f6522279476b590ea8
/Cob2j/src/cl/bee/perseus/cobolparser/syntaxtree/DataDescriptionEntryClause.java
69a493d924893fc6c1fa35886c0a64047dfc34aa
[]
no_license
Osvaldo-Gutierrez/BeeFRM-workspace
79a530814acb134ab33e166ad9aa2be705dbd686
949941c903d0fa992dd23a1418363013d1bf2245
refs/heads/main
2023-02-20T01:31:06.571963
2021-01-14T20:15:36
2021-01-14T20:15:36
311,809,662
0
0
null
null
null
null
UTF-8
Java
false
false
1,512
java
/* * Copyright (c) 20XX by XXXXXXXX All Rights Reserved. * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF XXXXXXXX * The copyright notice above does not evidence any actual or intended * publication of such source code. */ package cl.bee.perseus.cobolparser.syntaxtree; /** * Grammar production: * f0 -> DataPictureClause() * | DataValueClause() * | DataUsageClause() * | DataRedefinesClause() * | DataExternalClause() * | DataGlobalClause() * | DataIdentifiedClause() * | DataSignClause() * | DataOccursClause() * | DataSynchronizedClause() * | DataJustifiedClause() * | DataBlankWhenZeroClause() */ public class DataDescriptionEntryClause implements Node { private Node parent; public NodeChoice f0; public DataDescriptionEntryClause(NodeChoice n0) { f0 = n0; if ( f0 != null ) f0.setParent(this); } public void accept(cl.bee.perseus.cobolparser.visitor.Visitor v) { v.visit(this); } public <R,A> R accept(cl.bee.perseus.cobolparser.visitor.GJVisitor<R,A> v, A argu) { return v.visit(this,argu); } public <R> R accept(cl.bee.perseus.cobolparser.visitor.GJNoArguVisitor<R> v) { return v.visit(this); } public <A> void accept(cl.bee.perseus.cobolparser.visitor.GJVoidVisitor<A> v, A argu) { v.visit(this,argu); } public void setParent(Node n) { parent = n; } public Node getParent() { return parent; } }
[ "osvaldo.gutierrez@cimagroup.cl" ]
osvaldo.gutierrez@cimagroup.cl
94ff50b5aa999bb386f34b4f0e6e8152e0fc7608
480722b5de4e2422fd2e64ccfc99e8d681fa140f
/plugins/manipulation/api/src/main/java/org/pcsoft/app/jimix/plugin/manipulation/api/Jimix2DElementBuilder.java
cca1170c5da9feb0f28fca4d10aaa7ede13d9ad7
[ "Apache-2.0" ]
permissive
KleinerHacker/jimix
8f5e53075d7339366c72bd1109a479d2d5e4b571
f0d0f03f7ad1dc8a12587bddcf0ec10396a932bf
refs/heads/master
2021-09-09T14:15:50.123312
2018-03-16T22:18:10
2018-03-16T22:18:10
121,425,087
0
0
null
null
null
null
UTF-8
Java
false
false
745
java
package org.pcsoft.app.jimix.plugin.manipulation.api; import javafx.scene.Node; import org.pcsoft.app.jimix.plugin.common.api.type.JimixElementType; import org.pcsoft.app.jimix.plugin.common.api.type.JimixPlugin2DElement; /** * Represent a builder implementation for a special {@link JimixPlugin2DElement} * * @param <T> */ public interface Jimix2DElementBuilder<T extends JimixPlugin2DElement> extends JimixElementBuilder { /** * Build the {@link JimixPlugin2DElement} and return it to add it to a group * * @param pluginElement element to build * @return */ Node buildNode(final T pluginElement); @Override default JimixElementType getType() { return JimixElementType.Element2D; } }
[ "Christoph.Pfeiffer.Berlin@freenet.de" ]
Christoph.Pfeiffer.Berlin@freenet.de
34551143cf9f3150dc6b8f5d74160e59dbf7aa3e
e6ff41c620db6ca522291088de3a8ee9a4b40127
/NPJ/project/workspace1/NicheHelloWorld/src/helloworld/service/ServiceComponent.java
f3d8f2c8c1869e287f9a1bd1e01dd8a573d7133a
[]
no_license
WinLAFS/kthsedsav
0df61c7ccc2de6720d880628a92673027e615f9a
e2d6347ac87502b40d394b380e2c9c302f6de5ef
refs/heads/master
2020-06-06T17:27:38.779205
2010-05-19T21:07:45
2010-05-19T21:07:45
35,384,630
0
0
null
null
null
null
UTF-8
Java
false
false
2,485
java
package helloworld.service; import helloworld.interfaces.HelloAllInterface; import helloworld.interfaces.HelloAnyInterface; import org.objectweb.fractal.api.Component; import org.objectweb.fractal.api.NoSuchInterfaceException; import org.objectweb.fractal.api.control.BindingController; import org.objectweb.fractal.api.control.IllegalLifeCycleException; import org.objectweb.fractal.api.control.LifeCycleController; public class ServiceComponent implements HelloAnyInterface, HelloAllInterface, BindingController, LifeCycleController { private Component myself; private boolean status; public ServiceComponent() { System.err.println("HelloService created"); } // ///////////////////////////////////////////////////////////////////// // //////////////////////// Server interfaces ////////////////////////// // ///////////////////////////////////////////////////////////////////// public void helloAny(String s) { System.out.println(s); } public void helloAll(String s) { System.out.println(s); } // ///////////////////////////////////////////////////////////////////// // //////////////////////// Fractal Stuff ////////////////////////////// // ///////////////////////////////////////////////////////////////////// public String[] listFc() { return new String[] { "component" }; } public Object lookupFc(final String itfName) throws NoSuchInterfaceException { if (itfName.equals("component")) { return myself; } else { throw new NoSuchInterfaceException(itfName); } } public void bindFc(final String itfName, final Object itfValue) throws NoSuchInterfaceException { if (itfName.equals("component")) { myself = (Component) itfValue; } else { throw new NoSuchInterfaceException(itfName); } } public void unbindFc(final String itfName) throws NoSuchInterfaceException { if (itfName.equals("component")) { myself = null; } else { throw new NoSuchInterfaceException(itfName); } } public String getFcState() { return status ? "STARTED" : "STOPPED"; } public void startFc() throws IllegalLifeCycleException { status = true; System.err.println("Service component started."); } public void stopFc() throws IllegalLifeCycleException { status = false; } }
[ "shumanski@9a21e158-ce10-11de-8d2e-8bf2cb4fc7ae" ]
shumanski@9a21e158-ce10-11de-8d2e-8bf2cb4fc7ae
0f303161199be90194910fba6b352d3333ea70c3
54f352a242a8ad6ff5516703e91da61e08d9a9e6
/Source Codes/AtCoder/abc037/A/4034258.java
86528dfdcb95762f3b9fcd73f07da91a56f2b3a0
[]
no_license
Kawser-nerd/CLCDSA
5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb
aee32551795763b54acb26856ab239370cac4e75
refs/heads/master
2022-02-09T11:08:56.588303
2022-01-26T18:53:40
2022-01-26T18:53:40
211,783,197
23
9
null
null
null
null
UTF-8
Java
false
false
2,574
java
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { FastScanner sc = new FastScanner(System.in); int a = Math.min(sc.nextInt(), sc.nextInt()); int C = sc.nextInt(); System.out.println(C/a); }//end main }//end Main class FastScanner { private InputStream in; private final byte[] buffer = new byte[1024]; private int ptr = 0; private int buflen = 0; public FastScanner(InputStream in) { this.in = in; } private boolean hasNextByte() { if (ptr < buflen) { return true; }else{ ptr = 0; try { buflen = in.read(buffer); } catch (IOException e) { e.printStackTrace(); } if (buflen <= 0) { return false; } } return true; } private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1; } private static boolean isPrintableChar(int c){ return 33 <= c && c <= 126; } public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte(); } public String next() { if (!hasNext()) throw new NoSuchElementException(); StringBuilder sb = new StringBuilder(); int b = readByte(); while(isPrintableChar(b)) { sb.appendCodePoint(b); b = readByte(); } return sb.toString(); } public long nextLong() { if (!hasNext()) throw new NoSuchElementException(); long n = 0; boolean minus = false; int b = readByte(); if (b == '-') { minus = true; b = readByte(); } if (b < '0' || '9' < b) { throw new NumberFormatException(); } while(true){ if ('0' <= b && b <= '9') { n *= 10; n += b - '0'; }else if(b == -1 || !isPrintableChar(b)){ return minus ? -n : n; }else{ throw new NumberFormatException(); } b = readByte(); } } public int nextInt() { long nl = nextLong(); if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException(); return (int) nl; } public double nextDouble() { return Double.parseDouble(next()); } }
[ "kwnafi@yahoo.com" ]
kwnafi@yahoo.com
a3e896e2a4d92cde17d2c178a85d218d0dbd52ec
00b7d68fde0dbfea81c84271918756ac9418c537
/ninja-servlet/src/main/java/ninja/servlet/NinjaServletBootstrap.java
f2edab4f9d9bf61329323b172f91318c1e6937b1
[ "Apache-2.0" ]
permissive
kindergartenso/ninja
653cce3459faee9c1aac0e8e0e2cba75b4bc20ad
bf501d63018b70ac835a6284c1a0716749aafeaa
refs/heads/develop
2020-12-13T19:56:01.709459
2015-11-23T19:21:26
2015-11-23T19:21:26
47,389,560
1
0
null
2015-12-04T07:51:53
2015-12-04T07:51:53
null
UTF-8
Java
false
false
2,629
java
/** * Copyright (C) 2012-2015 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 ninja.servlet; import ninja.Bootstrap; import ninja.Context; import ninja.utils.NinjaPropertiesImpl; import com.google.inject.AbstractModule; import com.google.inject.servlet.ServletModule; /** * Ninja bootstrap for servlet environments. Binds the context implementation * as well as attempting to load conf.ServletModule. */ public class NinjaServletBootstrap extends Bootstrap { public NinjaServletBootstrap(NinjaPropertiesImpl ninjaProperties) { super(ninjaProperties); } @Override protected void configure() throws Exception { super.configure(); // Context for servlet requests addModule(new AbstractModule() { @Override protected void configure() { bind(Context.class).to(NinjaServletContext.class); } }); // Load servlet module. By convention this is a ServletModule where // the user can register other servlets and servlet filters // If the file does not exist we simply load the default servlet String servletModuleClassName = resolveApplicationClassName(APPLICATION_GUICE_SERVLET_MODULE_CONVENTION_LOCATION); if (doesClassExist(servletModuleClassName)) { Class<?> servletModuleClass = Class .forName(servletModuleClassName); ServletModule servletModule = (ServletModule) servletModuleClass .getConstructor().newInstance(); addModule(servletModule); } else { // The servlet Module does not exist => we load the default one. ServletModule servletModule = new ServletModule() { @Override protected void configureServlets() { bind(NinjaServletDispatcher.class).asEagerSingleton(); serve("/*").with(NinjaServletDispatcher.class); } }; addModule(servletModule); } } }
[ "joe@lauer.bz" ]
joe@lauer.bz
e04c107cf3af4e364da99bc1725375cb6059fb8a
a61e512a63c06b6e9da51c36406d57c63f59842f
/src/main/java/com/sol/erp/ReqMode.java
44a460bdf6e477ef1d886d098fe9b1468682a6cc
[]
no_license
shekharkumargupta1070/solerp
72c2522f54681d4e659d6017b0731f6471eabdde
dd73736e5da7993adaccdd76e1537d6fad535e2f
refs/heads/master
2020-03-23T16:22:51.060346
2018-11-29T18:53:54
2018-11-29T18:53:54
141,806,788
0
0
null
null
null
null
UTF-8
Java
false
false
5,305
java
package com.sol.erp; import java.awt.Font; import java.sql.ResultSet; import java.util.ArrayList; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import com.sol.erp.dao.UtilListQuery; import com.sol.erp.dao.UtilQueryResult; import com.sol.erp.util.DBConnectionUtil; public class ReqMode extends javax.swing.JInternalFrame implements java.awt.event.ActionListener { /** * */ private static final long serialVersionUID = 1L; java.sql.Connection con = null; java.sql.Statement stat = null; ResultSet rs = null; UtilQueryResult qr = new UtilQueryResult(); UtilListQuery sklist = new UtilListQuery(); public ReqMode() { con = DBConnectionUtil.getConnection(); initComponents(); companyList(); } private void initComponents() { p1 = new JPanel(); l1 = new JLabel(); cb1 = new JComboBox(); l2 = new JLabel(); tf1 = new JTextField(); l3 = new JLabel(); tf2 = new JTextField(); tf3 = new JTextField(); p2 = new JPanel(); l4 = new JLabel(); tf4 = new JTextField(); p3 = new JPanel(); b1 = new JButton(); b2 = new JButton(); listmodel = new javax.swing.DefaultListModel(); list = new javax.swing.JList(listmodel); jScrollPane1 = new javax.swing.JScrollPane(list); b3 = new JButton(); getContentPane().setLayout(null); setClosable(true); setIconifiable(true); setMaximizable(true); setResizable(true); setTitle("Create Reqrutment Mode"); p1.setLayout(null); p1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); l1.setFont(new Font("MS Sans Serif", 1, 11)); l1.setForeground(new java.awt.Color(102, 102, 102)); l1.setText("Company ID"); p1.add(l1); l1.setBounds(20, 10, 80, 20); cb1.setEditable(true); p1.add(cb1); cb1.setBounds(110, 10, 80, 20); l2.setFont(new Font("MS Sans Serif", 1, 11)); l2.setForeground(new java.awt.Color(102, 102, 102)); l2.setText("Name"); p1.add(l2); l2.setBounds(20, 40, 80, 20); tf1.setEditable(false); p1.add(tf1); tf1.setBounds(110, 40, 380, 21); l3.setFont(new Font("MS Sans Serif", 1, 11)); l3.setForeground(new java.awt.Color(102, 102, 102)); l3.setText("Branch No"); p1.add(l3); l3.setBounds(20, 70, 80, 20); tf2.setEditable(false); p1.add(tf2); tf2.setBounds(110, 70, 80, 21); tf3.setEditable(false); p1.add(tf3); tf3.setBounds(200, 70, 290, 21); getContentPane().add(p1); p1.setBounds(30, 20, 510, 110); p2.setLayout(null); p2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); l4.setFont(new Font("MS Sans Serif", 1, 11)); l4.setForeground(new java.awt.Color(102, 102, 102)); l4.setText("Recruitment Mode Name"); p2.add(l4); l4.setBounds(50, 10, 140, 20); p2.add(tf4); tf4.setBounds(20, 30, 200, 21); getContentPane().add(p2); p2.setBounds(30, 140, 240, 70); p3.setLayout(null); p3.setBorder(javax.swing.BorderFactory.createEtchedBorder()); b1.setText("Add"); p3.add(b1); b1.setBounds(20, 25, 90, 30); b2.setText("Remove"); p3.add(b2); b2.setBounds(130, 25, 90, 30); getContentPane().add(p3); p3.setBounds(30, 220, 240, 80); list.setFont(new Font("Tahoma", 1, 11)); jScrollPane1.setViewportView(list); getContentPane().add(jScrollPane1); jScrollPane1.setBounds(280, 140, 260, 160); b3.setText("Close"); getContentPane().add(b3); b3.setBounds(440, 310, 100, 30); setBounds(0, 0, 566, 379); cb1.addActionListener(this); b1.addActionListener(this); b2.addActionListener(this); b3.addActionListener(this); } ArrayList ar = new ArrayList(); private JComboBox cb1; private JButton b1; @SuppressWarnings("static-access") public void companyList() { ar = sklist.skList("company_id", "HRCOMPANY_ID"); System.out.println(ar); for (int i = 0; i < ar.size(); i++) { cb1.addItem(String.valueOf(ar.get(i)).toUpperCase()); } } private JButton b2; private JButton b3; private javax.swing.JScrollPane jScrollPane1; public void companyDetails() { try { rs = stat.executeQuery("Select CO_Name, BRANCH_CODE, CITY from HRCOMPANY_ID where company_id ='" + cb1.getSelectedItem() + "' "); while (rs.next()) { String str1 = new String(rs.getString(1)); String str2 = new String(rs.getString(2)); String str3 = new String(rs.getString(3)); tf1.setText(str1); tf2.setText(str2); tf3.setText(str3); } } catch (Exception localException) { } } private JLabel l1; private JLabel l2; private JLabel l3; private JLabel l4; public void insert() { qr.Query("insert into HRREQ_MODE Values('" + cb1.getSelectedItem() + "','" + tf2.getText() + "','" + tf4.getText() + "') "); String str = qr.getMessage(); if (str.equalsIgnoreCase("succeed")) { listmodel.addElement(String.valueOf(tf4.getText())); tf4.setText(""); } } private javax.swing.JList list; private javax.swing.DefaultListModel listmodel; private JPanel p1; private JPanel p2; public void actionPerformed(java.awt.event.ActionEvent paramActionEvent) { if (paramActionEvent.getSource() == cb1) { companyDetails(); } if (paramActionEvent.getSource() == b1) { insert(); } } private JPanel p3; private JTextField tf1; private JTextField tf2; private JTextField tf3; private JTextField tf4; }
[ "shekharkumargupta@gmail.com" ]
shekharkumargupta@gmail.com
5ab8952b20b7146b2150487554f5fc19df6ffcee
6ce88a15d15fc2d0404243ca8415c84c8a868905
/bitcamp-java-basic/src/step22/ex09/Exam02_1.java
06fcd4b4822e4ececdc63ae787488665534a4fd9
[]
no_license
SangKyeongLee/bitcamp
9f6992ce2f3e4425f19b0af19ce434c4864e610b
a26991752920f280f6404565db2b13a0c34ca3d9
refs/heads/master
2021-01-24T10:28:54.595759
2018-08-10T07:25:57
2018-08-10T07:25:57
123,054,474
0
0
null
null
null
null
UTF-8
Java
false
false
1,234
java
// Java I/O API 사용하기 - ObjectOutputStream package step22.ex09; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.ObjectOutputStream; public class Exam02_1 { public static void main(String[] args) throws Exception { FileOutputStream fileOut = new FileOutputStream("temp/test9_3.data"); BufferedOutputStream bufOut = new BufferedOutputStream(fileOut); ObjectOutputStream out = new ObjectOutputStream(bufOut); Member member = new Member(); member.name = "AB가각간"; member.age = 27; member.gender = true; // ObjectOutputStream에는 인스턴스의 값을 바이트 배열로 만들어 출력하는 기능이 있다. for (int i = 0; i < 100000; i++) { out.writeObject(member); // 그러나 실행하면 오류가 발생한다. // => java.io.NotSerializableException // => 인스턴스의 값을 자동으로 바이트 배열로 만들 수 있도록 허가가 안되어 있어서 // 발생한 실행 오류이다. } out.close(); System.out.println("데이터 출력 완료!"); } }
[ "sangkyeong.lee93@gmail.com" ]
sangkyeong.lee93@gmail.com
f5b7b28c66cfb94fee24c4a33bc6fa5a7d7f6308
53f54814f0ccbc773bfe343afaf0fd0936072ac6
/Ch11/src/com/test/Ex31Test.java
a67f9b66747cbef372a9cf62b80f802a69c91c0c
[]
no_license
osj4532/thinking-in-java-4ed
6fbdaa9842940e539dfa31990eaa48d31a1231f8
18401743ca4b2cda7da81d4fc41458c71520982c
refs/heads/master
2020-03-08T15:10:31.351559
2018-06-09T12:08:40
2018-06-09T12:08:40
128,204,770
0
0
null
null
null
null
UTF-8
Java
false
false
2,382
java
package com.test; import java.util.Iterator; import java.util.Random; class Shape{ public void draw() {} public void erase() {} public void amend() {System.out.println("Shape.amend()");} @Override public String toString() { return "Shape"; } } class Circle extends Shape{ @Override public void draw() { System.out.println("Circle.draw()"); } @Override public void erase() { System.out.println("Circle.erase()"); } @Override public void amend() { System.out.println("Circle.amend()"); } @Override public String toString() { return "Circle"; } } class Square extends Shape{ @Override public void draw() { System.out.println("Square.draw()"); } @Override public void erase() { System.out.println("Square.erase()"); } @Override public void amend() { System.out.println("Square.amend()"); } @Override public String toString() { return "Square"; } } class Triangle extends Shape{ @Override public void draw() { System.out.println("Triangle.draw()"); } @Override public void erase() { System.out.println("Triangle.erase()"); } @Override public void amend() { System.out.println("Triangle.amend()"); } @Override public String toString() { return "Triangle"; } } class RandomShapeGenerator implements Iterable<Shape> { private Shape[] s; public RandomShapeGenerator(int num) { s = new Shape[num]; for(int i = 0; i < num; i++) { s[i] = next(); } } private Random rand = new Random(3); public Shape next() { switch(rand.nextInt(3)) { default: case 0 : return new Circle(); case 1 : return new Square(); case 2 : return new Triangle(); } } //이터레이터를 적용해야 포이치 문이 작동한다. @Override public Iterator<Shape> iterator() { // TODO Auto-generated method stub return new Iterator<Shape>() { private int index = 0; @Override public boolean hasNext() { // TODO Auto-generated method stub return index < s.length; } @Override public Shape next() { // TODO Auto-generated method stub return s[index++]; } @Override public void remove() { throw new UnsupportedOperationException(); } }; } } public class Ex31Test { public static void main(String[] args) { // TODO Auto-generated method stub RandomShapeGenerator r = new RandomShapeGenerator(20); for(Shape s : r) { System.out.println(s); } } }
[ "osj4532@daum.net" ]
osj4532@daum.net
1d5f8e2703a949d0164adfe82255be12241ec715
3d1a082df0da7875ec4313bc0d8aa9877ea99b80
/src/main/java/com/nervestaple/tipcalculator/MainFrame.java
bcd0fe28ae9d0ea22aa3590597855a597428d3f7
[ "MIT" ]
permissive
cmiles74/tip-calculator
616bed00ddc5f19f87bc7dfdb99ed83e481f44dd
0b886fdf579b54bf19ee6b06643e2772995d3ff0
refs/heads/master
2021-05-04T11:11:48.811286
2018-07-23T14:06:08
2018-07-23T14:06:08
45,991,351
0
0
null
null
null
null
UTF-8
Java
false
false
5,406
java
package com.nervestaple.tipcalculator; import com.nervestaple.tipcalculator.TipModel; import javax.swing.*; import javax.swing.border.EmptyBorder; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.math.BigDecimal; import java.text.NumberFormat; import java.util.logging.Logger; /** * Provides the primary frame for the application. */ public class MainFrame extends JFrame { /** * Logger instance. */ private static final Logger log = Logger.getLogger(TipModel.class.getName()); // gui components private JLabel labelBill = new JLabel("Bill"); private JLabel labelTipPercent = new JLabel("Tip %"); private JLabel labelPeople = new JLabel("People"); private JLabel labelTip = new JLabel("Tip/Person"); private JLabel labelTotal = new JLabel("Total Bill"); private JFormattedTextField textFieldBill; private JFormattedTextField textFieldTipPercent = new JFormattedTextField(NumberFormat.getIntegerInstance()); private JFormattedTextField textFieldPeople = new JFormattedTextField(NumberFormat.getIntegerInstance()); private JFormattedTextField textFieldTip = new JFormattedTextField(NumberFormat.getCurrencyInstance()); private JFormattedTextField textFieldTotal = new JFormattedTextField(NumberFormat.getCurrencyInstance()); private JButton buttonCalculate = new JButton("Calculate Tip"); // models private TipModel tipModel = new TipModel(); /** * Creates a new Swing frame. * * @param title Title for the frame */ public MainFrame(String title) { super(); setTitle(title); // setup our input fields NumberFormat formatMoneyInput = NumberFormat.getInstance(); formatMoneyInput.setMaximumFractionDigits(2); textFieldBill = new JFormattedTextField(formatMoneyInput); textFieldBill.setColumns(5); textFieldBill.setHorizontalAlignment(SwingConstants.RIGHT); textFieldTipPercent.setColumns(5); textFieldTipPercent.setHorizontalAlignment(SwingConstants.RIGHT); textFieldPeople.setColumns(5); textFieldPeople.setHorizontalAlignment(SwingConstants.RIGHT); // setup our output fields Font font = textFieldTip.getFont(); Font bigBoldFont = new Font(font.getName(), Font.BOLD, font.getSize() + 4); textFieldTip.setEditable(false); textFieldTip.setFont(bigBoldFont); textFieldTip.setBorder(new EmptyBorder(0, 0, 0, 0)); textFieldTotal.setEditable(false); textFieldTotal.setFont(bigBoldFont); textFieldTotal.setBorder(new EmptyBorder(0, 0, 0, 0)); textFieldTotal.setColumns(5); // calculate the tip when the button is clicked buttonCalculate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { calculateTip(); } }); // layout our components Box boxLeft = Box.createVerticalBox(); boxLeft.add(labelBill); boxLeft.add(textFieldBill); boxLeft.add(labelTipPercent); boxLeft.add(textFieldTipPercent); boxLeft.add(labelPeople); boxLeft.add(textFieldPeople); Box boxRight = Box.createVerticalBox(); boxRight.add(labelTip); boxRight.add(textFieldTip); boxRight.add(labelTotal); boxRight.add(textFieldTotal); Box boxBottom = Box.createHorizontalBox(); boxBottom.add(Box.createHorizontalGlue()); boxBottom.add(buttonCalculate); boxBottom.add(Box.createHorizontalStrut(10)); Box boxTop = Box.createHorizontalBox(); boxTop.add(Box.createHorizontalStrut(10)); boxTop.add(boxLeft); boxTop.add(Box.createHorizontalStrut(10)); boxTop.add(boxRight); boxTop.add(Box.createHorizontalStrut(10)); Box boxMain = Box.createVerticalBox(); boxMain.add(Box.createVerticalStrut(10)); boxMain.add(boxTop); boxMain.add(Box.createVerticalStrut(10)); boxMain.add(boxBottom); boxMain.add(Box.createVerticalStrut(10)); getContentPane().add(boxMain); pack(); setResizable(false); // fill in some data to hint the customer textFieldBill.setValue(100.00); textFieldTipPercent.setValue(20); textFieldPeople.setValue(1); calculateTip(); } /** * Calculates the tip and updates the output fields. */ private void calculateTip() { if (textFieldBill.getValue() != null) { tipModel.setTotalBill(new BigDecimal(textFieldBill.getValue().toString())); } else { tipModel.setTotalBill(null); } if (textFieldTipPercent.getValue() != null) { tipModel.setTipPercentage(new BigDecimal(textFieldTipPercent.getValue().toString()) .multiply(new BigDecimal(0.01))); } else { tipModel.setTipPercentage(null); } if (textFieldPeople.getValue() != null) { tipModel.setPeople(Integer.valueOf(textFieldPeople.getValue().toString())); } else { tipModel.setPeople(null); } tipModel.calculateTip(); textFieldTip.setValue(tipModel.getTipPerPerson()); textFieldTotal.setValue(tipModel.getTotalBillWithTip()); } }
[ "twitch@nervestaple.com" ]
twitch@nervestaple.com
ae3dac2368c018d99eb9fb66da9367718be252d6
926386167b44865e72a70002a5557d9a79c87c6b
/src/main/java/net/henryco/blinckserver/mvc/model/repository/relation/queue/VoteRepository.java
47baec7c79685699026bb46c5ce5d4cb87cb8998
[ "BSD-3-Clause" ]
permissive
AustineGwa/Blinck-Server
39d201c867015b6525b36c60f6a9a3d515625485
34e0b4cc0ce36cf41b5c9fda1b65a0a05d47cc71
refs/heads/master
2021-09-27T18:04:53.202678
2018-11-10T12:29:34
2018-11-10T12:29:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
573
java
package net.henryco.blinckserver.mvc.model.repository.relation.queue; import net.henryco.blinckserver.mvc.model.entity.relation.queue.Vote; import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; /** * @author Henry on 19/09/17. */ public interface VoteRepository extends JpaRepository<Vote, Long> { List<Vote> getAllByTopic(String topic); boolean existsByTopicAndVoter(String topic, String voter); long countAllByTopic(String topic); long countAllByTopicAndVoice(String topic, Boolean voice); void deleteAllByTopic(String topic); }
[ "hd2files@gmail.com" ]
hd2files@gmail.com
c5cfd89009fc343e10dd915bf762d5c9a86fd76b
180e78725121de49801e34de358c32cf7148b0a2
/dataset/protocol1/kylin/validation/625/ExecutablePO.java
0bddafff971cc14b167abc096c910123007124e3
[]
no_license
ASSERT-KTH/synthetic-checkstyle-error-dataset
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
40c057e1669584bfc6fecf789b5b2854660222f3
refs/heads/master
2023-03-18T12:50:55.410343
2019-01-25T09:54:39
2019-01-25T09:54:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,558
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.kylin.job.dao; import java.util.List; import java.util.Map; import org.apache.kylin.common.persistence.RootPersistentEntity; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.Maps; /** */ @SuppressWarnings("serial") @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NONE, getterVisibility = JsonAutoDetect.Visibility.NONE, isGetterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) public class ExecutablePO extends RootPersistentEntity { @JsonProperty("name") private String name; @JsonProperty("tasks") private List<ExecutablePO> tasks; @JsonProperty("tasks_check") private List<ExecutablePO> tasksForCheck; @JsonProperty("type") private String type; @JsonProperty("params") private Map<String, String> params = Maps.newHashMap(); public String getName() { return name; } public void setName(String name) { this.name = name; } public List<ExecutablePO> getTasks() { return tasks; } public void setTasks(List<ExecutablePO> tasks) { this.tasks = tasks; } public List<ExecutablePO> getTasksForCheck() { return tasksForCheck; } public void setTasksForCheck(List<ExecutablePO> tasksForCheck) { this.tasksForCheck = tasksForCheck; } public String getType() { return type; } public void setType(String type) { this.type = type; } public Map<String, String> getParams() { return params; } public void setParams(Map<String, String> params) { this.params = params; } }
[ "bloriot97@gmail.com" ]
bloriot97@gmail.com
9b30522301b8de06a3fb89174be06b6567af83e9
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/feed/j.java
025ebc1fd736aa568ae7c62ceef1681f340a013b
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
467
java
package com.tencent.mm.plugin.finder.feed; import kotlin.Metadata; @Metadata(d1={""}, d2={"Lcom/tencent/mm/plugin/finder/feed/FinderFeedDetailRelUIContract;", "", "()V", "Presenter", "ViewCallback", "plugin-finder_release"}, k=1, mv={1, 5, 1}, xi=48) public final class j {} /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes.jar * Qualified Name: com.tencent.mm.plugin.finder.feed.j * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
5abc3e65be5c0eafc1d233028f0e4414909f4c8d
67c27f17725caf486a4e11dd2d7a22f1a6eef648
/core/src/com/crashinvaders/texturepackergui/controllers/packing/processors/DataValidationProcessor.java
2601e4356b2c6fdb80b9800b9da7da89b5c6e8bb
[ "Apache-2.0" ]
permissive
arnzzz/gdx-texture-packer-gui
5ac4babe4192e5ce8dfeb35360500876da177ab6
4912c4a24e8d278c1a5907ce8f4347517c364efd
refs/heads/master
2021-07-15T07:00:35.795192
2017-10-23T00:40:38
2017-10-23T00:40:38
108,703,958
1
0
null
2017-10-29T04:05:03
2017-10-29T04:05:03
null
UTF-8
Java
false
false
1,046
java
package com.crashinvaders.texturepackergui.controllers.packing.processors; import com.crashinvaders.texturepackergui.services.model.PackModel; import com.crashinvaders.texturepackergui.services.model.ProjectModel; import com.crashinvaders.texturepackergui.utils.packprocessing.PackProcessingNode; import com.crashinvaders.texturepackergui.utils.packprocessing.PackProcessor; import com.github.czyzby.kiwi.util.common.Strings; /** Contains number of simple and most obvious checks to give user clear problem explanation. */ public class DataValidationProcessor implements PackProcessor { @Override public void processPackage(PackProcessingNode node) throws Exception { ProjectModel project = node.getProject(); PackModel pack = node.getPack(); if (Strings.isEmpty(pack.getOutputDir())) throw new IllegalStateException("Output directory is not specified"); if (pack.getInputFiles().size == 0) throw new IllegalStateException("There is no input files to perform packing"); } }
[ "metaphore@bk.ru" ]
metaphore@bk.ru
f877c27261085f7fa972b88fb1588671559f73dc
ed28460c5d24053259ab189978f97f34411dfc89
/Software Engineering/Java Web/MVC Frameworks - Spring/05. Spring Security/Exercise/resident-evil/src/main/java/softuni/entities/Capital.java
7a22ca78811b2265351f5befe8ef8f15877c6a1f
[]
no_license
Dimulski/SoftUni
6410fa10ba770c237bac617205c86ce25c5ec8f4
7954b842cfe0d6f915b42702997c0b4b60ddecbc
refs/heads/master
2023-01-24T20:42:12.017296
2020-01-05T08:40:14
2020-01-05T08:40:14
48,689,592
2
1
null
2023-01-12T07:09:45
2015-12-28T11:33:32
Java
UTF-8
Java
false
false
891
java
package softuni.entities; import javax.persistence.*; @Entity @Table(name = "capitals") public class Capital { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; private float latitude; private float longitude; public Capital() { } 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 float getLatitude() { return latitude; } public void setLatitude(float latitude) { this.latitude = latitude; } public float getLongitude() { return longitude; } public void setLongitude(float longitude) { this.longitude = longitude; } }
[ "george.dimulski@gmail.com" ]
george.dimulski@gmail.com
83929a7b3ab2c7dd4903c429ff54fffd31cab745
08b627b3d69eaee5a59eee25f7975f5a3e4d50e5
/src/br/com/drogaria/test/VendaDAOTest.java
732d87eba69b6867b72278b6b15361af2faa21a6
[]
no_license
RodrigoMCarvalho/ProjetoDrogaria
65bc32f48af66c52e33166e91620744c49c8fb9e
d459a16f6aa656adc0ad4bf36995efe3c3f63fba
refs/heads/master
2021-04-09T16:51:25.506130
2018-04-05T01:32:51
2018-04-05T01:32:51
125,679,576
0
0
null
null
null
null
UTF-8
Java
false
false
1,415
java
package br.com.drogaria.test; import java.math.BigDecimal; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; import org.junit.Ignore; import org.junit.Test; import br.com.drogaria.dao.FuncionarioDAO; import br.com.drogaria.dao.VendaDAO; import br.com.drogaria.domain.Funcionario; import br.com.drogaria.domain.Venda; import br.com.drogaria.filter.VendaFilter; public class VendaDAOTest { @Test @Ignore public void salvar() { FuncionarioDAO fdao = new FuncionarioDAO(); Funcionario f1 = fdao.buscarPorCod(1L); Venda venda = new Venda(); venda.setFuncionario(f1); venda.setHorario(new Date()); venda.setValor(new BigDecimal(168.99D)); VendaDAO vdao = new VendaDAO(); vdao.salvar(venda); } @Test @Ignore public void listar() { VendaDAO vdao = new VendaDAO(); List<Venda> vendas = vdao.listar(); for (Venda venda : vendas) { System.out.println(venda); } } @Test @Ignore public void buscar() throws ParseException { SimpleDateFormat formato = new SimpleDateFormat("dd/MM/yyyy"); VendaFilter filtro = new VendaFilter(); filtro.setDataInicial(formato.parse("01/04/2018")); filtro.setDataFinal(formato.parse("04/04/2018")); VendaDAO dao = new VendaDAO(); List<Venda> vendas = dao.buscar(filtro); for (Venda venda : vendas) { System.out.println(venda); } } }
[ "rodrigo_moreira84@hotmail.com" ]
rodrigo_moreira84@hotmail.com
64b51e9d08536dbcc38ff23f47cec821daed5845
f60d91838cc2471bcad3784a56be2aeece101f71
/spring-framework-4.3.15.RELEASE/spring-test/src/main/java/org/springframework/test/web/servlet/request/MockMultipartHttpServletRequestBuilder.java
9b7d1f14df109fb96320a234d40c575c5c911e7e
[ "Apache-2.0" ]
permissive
fisher123456/spring-boot-1.5.11.RELEASE
b3af74913eb1a753a20c3dedecea090de82035dc
d3c27f632101e8be27ea2baeb4b546b5cae69607
refs/heads/master
2023-01-07T04:12:02.625478
2019-01-26T17:44:05
2019-01-26T17:44:05
167,649,054
0
0
Apache-2.0
2022-12-27T14:50:58
2019-01-26T04:21:05
Java
UTF-8
Java
false
false
3,980
java
/* * Copyright 2002-2016 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.test.web.servlet.request; import java.net.URI; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletContext; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockMultipartHttpServletRequest; /** * Default builder for {@link MockMultipartHttpServletRequest}. * * @author Rossen Stoyanchev * @author Arjen Poutsma * @since 3.2 */ public class MockMultipartHttpServletRequestBuilder extends MockHttpServletRequestBuilder { private final List<MockMultipartFile> files = new ArrayList<MockMultipartFile>(); /** * Package-private constructor. Use static factory methods in * {@link MockMvcRequestBuilders}. * <p>For other ways to initialize a {@code MockMultipartHttpServletRequest}, * see {@link #with(RequestPostProcessor)} and the * {@link RequestPostProcessor} extension point. * @param urlTemplate a URL template; the resulting URL will be encoded * @param uriVariables zero or more URI variables */ MockMultipartHttpServletRequestBuilder(String urlTemplate, Object... uriVariables) { super(HttpMethod.POST, urlTemplate, uriVariables); super.contentType(MediaType.MULTIPART_FORM_DATA); } /** * Package-private constructor. Use static factory methods in * {@link MockMvcRequestBuilders}. * <p>For other ways to initialize a {@code MockMultipartHttpServletRequest}, * see {@link #with(RequestPostProcessor)} and the * {@link RequestPostProcessor} extension point. * @param uri the URL * @since 4.0.3 */ MockMultipartHttpServletRequestBuilder(URI uri) { super(HttpMethod.POST, uri); super.contentType(MediaType.MULTIPART_FORM_DATA); } /** * Create a new MockMultipartFile with the given content. * @param name the name of the file * @param content the content of the file */ public MockMultipartHttpServletRequestBuilder file(String name, byte[] content) { this.files.add(new MockMultipartFile(name, content)); return this; } /** * Add the given MockMultipartFile. * @param file the multipart file */ public MockMultipartHttpServletRequestBuilder file(MockMultipartFile file) { this.files.add(file); return this; } @Override public Object merge(Object parent) { if (parent == null) { return this; } if (parent instanceof MockHttpServletRequestBuilder) { super.merge(parent); if (parent instanceof MockMultipartHttpServletRequestBuilder) { MockMultipartHttpServletRequestBuilder parentBuilder = (MockMultipartHttpServletRequestBuilder) parent; this.files.addAll(parentBuilder.files); } } else { throw new IllegalArgumentException("Cannot merge with [" + parent.getClass().getName() + "]"); } return this; } /** * Create a new {@link MockMultipartHttpServletRequest} based on the * supplied {@code ServletContext} and the {@code MockMultipartFiles} * added to this builder. */ @Override protected final MockHttpServletRequest createServletRequest(ServletContext servletContext) { MockMultipartHttpServletRequest request = new MockMultipartHttpServletRequest(servletContext); for (MockMultipartFile file : this.files) { request.addFile(file); } return request; } }
[ "171509086@qq.com" ]
171509086@qq.com
0bff6ca338c061e1f8a8d9c1107e41ec7c9b32aa
425888a80686bb31f64e0956718d81efef5f208c
/src/test/java/com/aol/cyclops/control/transformers/seq/SetTSeqTraversableTest.java
5ec77400495e6dad27f12b1d0667805e8c63444b
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
cybernetics/cyclops-react
ca34140519abfbe76750131f39133d31ba6770f2
f785d9bbe773acee5b07b602c0476dd58e19ef19
refs/heads/master
2021-01-22T13:08:10.590701
2016-04-22T12:41:13
2016-04-22T12:41:13
56,901,547
1
0
null
2016-04-23T05:07:15
2016-04-23T05:07:15
null
UTF-8
Java
false
false
639
java
package com.aol.cyclops.control.transformers.seq; import com.aol.cyclops.control.monads.transformers.SetT; import com.aol.cyclops.data.collections.extensions.standard.ListX; import com.aol.cyclops.data.collections.extensions.standard.SetX; import com.aol.cyclops.types.AbstractTraversableTest; import com.aol.cyclops.types.Traversable; public class SetTSeqTraversableTest extends AbstractTraversableTest { @Override public <T> Traversable<T> of(T... elements) { return SetT.fromIterable(ListX.of(SetX.of(elements))); } @Override public <T> Traversable<T> empty() { return SetT.emptySet(); } }
[ "john.mcclean@teamaol.com" ]
john.mcclean@teamaol.com
342565197d7bdfd5ab700c067f192420bce91642
afd7ebabda451990715066b7d045489b19ccccd5
/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/SecurityAttributeTypeImpl.java
d9798759992a6455170404d689024c827d566594
[ "CC-BY-SA-2.5", "AFL-2.1", "LicenseRef-scancode-unknown-license-reference", "MIT", "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-other-copyleft", "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-proprietary-license" ]
permissive
malakeel/jetspeed-portal
6996ab54816ebf7073aec1a6cbd86f59e3ee9d17
149dd8eba01eb86cc946d473d65ecc387464ca13
refs/heads/master
2022-12-29T07:50:12.413375
2020-04-18T04:55:45
2020-04-18T04:55:45
247,505,166
0
0
Apache-2.0
2022-12-16T02:47:04
2020-03-15T16:27:17
Java
UTF-8
Java
false
false
2,610
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jetspeed.security.impl; import org.apache.jetspeed.security.SecurityAttributeType; /** * @version $Id: SecurityAttributeTypeImpl.java 694069 2008-09-11 00:00:00Z ate $ * */ public class SecurityAttributeTypeImpl implements SecurityAttributeType { private String name; private String category; private DataType dataType; private boolean readOnly; private boolean required; private boolean registered; public SecurityAttributeTypeImpl(String name) { this.name = name; this.category = SecurityAttributeType.INFO_CATEGORY; this.dataType = SecurityAttributeType.DataType.STRING; this.readOnly = false; this.required = false; this.registered = false; } public SecurityAttributeTypeImpl(String name, String category) { this.name = name; this.category = category; this.dataType = SecurityAttributeType.DataType.STRING; this.readOnly = false; this.required = false; this.registered = true; } public SecurityAttributeTypeImpl(String name, String category, DataType dataType, boolean readOnly, boolean required) { this.name = name; this.category = category; this.dataType = dataType; this.readOnly = readOnly; this.required = required; this.registered = true; } public String getCategory() { return category; } public String getName() { return name; } public DataType getDataType() { return dataType; } public boolean isReadOnly() { return readOnly; } public boolean isRequired() { return required; } public boolean isRegistered() { return registered; } }
[ "mansour.alakeel@gmail.com" ]
mansour.alakeel@gmail.com
981119277b1923fa297aa8cebfc0e74df9caacca
d49cf6a0515e1d31fc2f27d3285dc6a2b85d8c43
/src/com/zzx/design/pattern/creational/builder/Test.java
9e5fa7cf168aab81ad014a4249ed6f332335f664
[]
no_license
Zhang-Zexi/Design
36f5d306f9799ad634f1a8dccbe8fc8302d6fb7f
2870e132216a51285f04a91e2990f900c42503aa
refs/heads/master
2020-05-17T22:53:47.002645
2019-05-07T10:03:34
2019-05-07T10:03:34
184,015,184
0
0
null
null
null
null
UTF-8
Java
false
false
601
java
package com.zzx.design.pattern.creational.builder; /** * @ClassName Test * @Description * @Author zhangzx * @Date 2019/4/29 17:43 * Version 1.0 **/ public class Test { public static void main(String[] args) { CourseBuilder courseBuilder = new CourseActualBuilder(); Coach coach = new Coach(); coach.setCourseBuilder(courseBuilder); Course course = coach.makeCourse("Java设计模式", "Java设计模式PPT", "Java设计模式视频", "Java设计模式手记", "Java设计模式问题&回答"); System.out.println(course); } }
[ "zhangzx@allinfinance.com" ]
zhangzx@allinfinance.com
4d36d65b24e7e4292f5562a0d5c0b61c2a5d2f6a
da013aaf01f734c206a213ef5c42261a0217fff9
/src/main/java/com/bulletphysics/collision/shapes/CapsuleShapeX.java
9d08f36887804a21be722c5eb1f7475fa6a5c794
[ "Zlib" ]
permissive
MovingBlocks/TeraBullet
e0471430ae92e7dc057d5e895b24ae6e6e7b0ab7
0c6c6dbada0862207bfcc655f1d6743b28fd33fa
refs/heads/develop
2021-06-01T11:57:52.481077
2020-09-20T21:35:24
2020-09-20T21:35:24
4,842,000
20
7
null
2020-09-20T21:35:25
2012-06-30T11:20:13
Java
UTF-8
Java
false
false
1,644
java
/* * Java port of Bullet (c) 2008 Martin Dvorak <jezek2@advel.cz> * * Bullet Continuous Collision Detection and Physics Library * Copyright (c) 2003-2008 Erwin Coumans http://www.bulletphysics.com/ * * This software is provided 'as-is', without any express or implied warranty. * In no event will the authors be held liable for any damages arising from * the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ package com.bulletphysics.collision.shapes; /** * CapsuleShapeX represents a capsule around the X axis.<p> * <p/> * The total height is <code>height+2*radius</code>, so the height is just the * height between the center of each "sphere" of the capsule caps. * * @author jezek2 */ public class CapsuleShapeX extends CapsuleShape { public CapsuleShapeX(float radius, float height) { upAxis = 0; implicitShapeDimensions.set(0.5f * height, radius, radius); } @Override public String getName() { return "CapsuleX"; } }
[ "immortius@gmail.com" ]
immortius@gmail.com
6286097994b0fc761722e4b4d4c0362edbdfcc60
043ce88a29e46f7ceac18a1fcd2e1f2b5af95aa5
/SeleniumProject/src/day1/sample.java
d1fb14c280bb0d6638937d151bae9cdbb0650c93
[]
no_license
shaath/Deepthi_FT
510fd4882a52829dd19a92a3cef9f4c05b2b920d
aec22968aa58aec6d1c56b621ce530512658fbc2
refs/heads/master
2021-01-02T09:28:37.753364
2017-08-03T09:57:46
2017-08-03T09:57:46
99,217,247
0
0
null
null
null
null
UTF-8
Java
false
false
1,092
java
package day1; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.server.browserlaunchers.Sleeper; public class sample { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "F:\\Cdownloads/chromedriver.exe"); ChromeDriver driver=new ChromeDriver(); // WebDriver driver=new FirefoxDriver(); driver.get("http://orangehrm.qedgetech.com"); // driver.manage().window().maximize(); driver.findElement(By.id("txtUsername")).sendKeys("Admin"); driver.findElement(By.id("txtPassword")).sendKeys("admin"); driver.findElement(By.id("btnLogin")).click(); driver.findElement(By.linkText("PIM")).click(); driver.findElement(By.linkText("Employee List")).click(); Sleeper.sleepTightInSeconds(3); driver.findElement(By.xpath("//*[@id='empsearch_employee_name_empName']")).click(); driver.findElement(By.xpath("//*[@id='empsearch_employee_name_empName']")).sendKeys("deepthi"); } }
[ "you@example.com" ]
you@example.com
0357eb72a1a086775c75908afa498f340216f097
f4b7924a03289706c769aff23abf4cce028de6bc
/smart_logic/src/main/java/plan_pro/modell/bahnuebergang/_1_9_0/CBUEEinschaltungHp.java
1e8543cc435c1135c0a498f3a1a7583de39a3499
[]
no_license
jimbok8/ebd
aa18a2066b4a873bad1551e1578a7a1215de9b8b
9b0d5197bede5def2972cc44e63ac3711010eed4
refs/heads/main
2023-06-17T21:16:08.003689
2021-07-05T14:53:38
2021-07-05T14:53:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,410
java
// // Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 generiert // Siehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // �nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. // Generiert: 2020.01.16 um 04:27:51 PM CET // package plan_pro.modell.bahnuebergang._1_9_0; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java-Klasse f�r CBUE_Einschaltung_Hp complex type. * * <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. * * <pre> * &lt;complexType name="CBUE_Einschaltung_Hp"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Einschaltverz_Errechnet" type="{http://www.plan-pro.org/modell/Bahnuebergang/1.9.0.2}TCEinschaltverz_Errechnet"/> * &lt;element name="Einschaltverz_Gewaehlt" type="{http://www.plan-pro.org/modell/Bahnuebergang/1.9.0.2}TCEinschaltverz_Gewaehlt"/> * &lt;element name="Kurzzugschaltung" type="{http://www.plan-pro.org/modell/Bahnuebergang/1.9.0.2}TCKurzzugschaltung" minOccurs="0"/> * &lt;element name="Signalverz_Errechnet" type="{http://www.plan-pro.org/modell/Bahnuebergang/1.9.0.2}TCSignalverz_Errechnet" minOccurs="0"/> * &lt;element name="Signalverz_Gewaehlt" type="{http://www.plan-pro.org/modell/Bahnuebergang/1.9.0.2}TCSignalverz_Gewaehlt" minOccurs="0"/> * &lt;element name="Teilvorgabezeit" type="{http://www.plan-pro.org/modell/Bahnuebergang/1.9.0.2}TCTeilvorgabezeit" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CBUE_Einschaltung_Hp", propOrder = { "einschaltverzErrechnet", "einschaltverzGewaehlt", "kurzzugschaltung", "signalverzErrechnet", "signalverzGewaehlt", "teilvorgabezeit" }) public class CBUEEinschaltungHp { @XmlElement(name = "Einschaltverz_Errechnet", required = true) protected TCEinschaltverzErrechnet einschaltverzErrechnet; @XmlElement(name = "Einschaltverz_Gewaehlt", required = true) protected TCEinschaltverzGewaehlt einschaltverzGewaehlt; @XmlElement(name = "Kurzzugschaltung") protected TCKurzzugschaltung kurzzugschaltung; @XmlElement(name = "Signalverz_Errechnet") protected TCSignalverzErrechnet signalverzErrechnet; @XmlElement(name = "Signalverz_Gewaehlt") protected TCSignalverzGewaehlt signalverzGewaehlt; @XmlElement(name = "Teilvorgabezeit") protected TCTeilvorgabezeit teilvorgabezeit; /** * Ruft den Wert der einschaltverzErrechnet-Eigenschaft ab. * * @return * possible object is * {@link TCEinschaltverzErrechnet } * */ public TCEinschaltverzErrechnet getEinschaltverzErrechnet() { return einschaltverzErrechnet; } /** * Legt den Wert der einschaltverzErrechnet-Eigenschaft fest. * * @param value * allowed object is * {@link TCEinschaltverzErrechnet } * */ public void setEinschaltverzErrechnet(TCEinschaltverzErrechnet value) { this.einschaltverzErrechnet = value; } /** * Ruft den Wert der einschaltverzGewaehlt-Eigenschaft ab. * * @return * possible object is * {@link TCEinschaltverzGewaehlt } * */ public TCEinschaltverzGewaehlt getEinschaltverzGewaehlt() { return einschaltverzGewaehlt; } /** * Legt den Wert der einschaltverzGewaehlt-Eigenschaft fest. * * @param value * allowed object is * {@link TCEinschaltverzGewaehlt } * */ public void setEinschaltverzGewaehlt(TCEinschaltverzGewaehlt value) { this.einschaltverzGewaehlt = value; } /** * Ruft den Wert der kurzzugschaltung-Eigenschaft ab. * * @return * possible object is * {@link TCKurzzugschaltung } * */ public TCKurzzugschaltung getKurzzugschaltung() { return kurzzugschaltung; } /** * Legt den Wert der kurzzugschaltung-Eigenschaft fest. * * @param value * allowed object is * {@link TCKurzzugschaltung } * */ public void setKurzzugschaltung(TCKurzzugschaltung value) { this.kurzzugschaltung = value; } /** * Ruft den Wert der signalverzErrechnet-Eigenschaft ab. * * @return * possible object is * {@link TCSignalverzErrechnet } * */ public TCSignalverzErrechnet getSignalverzErrechnet() { return signalverzErrechnet; } /** * Legt den Wert der signalverzErrechnet-Eigenschaft fest. * * @param value * allowed object is * {@link TCSignalverzErrechnet } * */ public void setSignalverzErrechnet(TCSignalverzErrechnet value) { this.signalverzErrechnet = value; } /** * Ruft den Wert der signalverzGewaehlt-Eigenschaft ab. * * @return * possible object is * {@link TCSignalverzGewaehlt } * */ public TCSignalverzGewaehlt getSignalverzGewaehlt() { return signalverzGewaehlt; } /** * Legt den Wert der signalverzGewaehlt-Eigenschaft fest. * * @param value * allowed object is * {@link TCSignalverzGewaehlt } * */ public void setSignalverzGewaehlt(TCSignalverzGewaehlt value) { this.signalverzGewaehlt = value; } /** * Ruft den Wert der teilvorgabezeit-Eigenschaft ab. * * @return * possible object is * {@link TCTeilvorgabezeit } * */ public TCTeilvorgabezeit getTeilvorgabezeit() { return teilvorgabezeit; } /** * Legt den Wert der teilvorgabezeit-Eigenschaft fest. * * @param value * allowed object is * {@link TCTeilvorgabezeit } * */ public void setTeilvorgabezeit(TCTeilvorgabezeit value) { this.teilvorgabezeit = value; } }
[ "iberl@verkehr.tu-darmstadt.de" ]
iberl@verkehr.tu-darmstadt.de
8e0d2b88a1895bda809c7ec68a42b4831a8c88e1
d523206fce46708a6fe7b2fa90e81377ab7b6024
/android/support/v4/content/ParallelExecutorCompat.java
964c5c296be51eb6e997e36b4c24e89d3e7e0d23
[]
no_license
BlitzModder/BlitzJava
0ee94cc069dc4b7371d1399ff5575471bdc88aac
6c6d71d2847dfd5f9f4f7c716cd820aeb7e45f2c
refs/heads/master
2021-06-11T15:04:05.571324
2017-02-04T16:04:55
2017-02-04T16:04:55
77,459,517
1
2
null
null
null
null
UTF-8
Java
false
false
592
java
package android.support.v4.content; import android.os.Build.VERSION; import java.util.concurrent.Executor; public final class ParallelExecutorCompat { public static Executor getParallelExecutor() { if (Build.VERSION.SDK_INT >= 11) { return ExecutorCompatHoneycomb.getParallelExecutor(); } return ModernAsyncTask.THREAD_POOL_EXECUTOR; } } /* Location: /Users/subdiox/Downloads/dex2jar-2.0/net.wargaming.wot.blitz-dex2jar.jar!/android/support/v4/content/ParallelExecutorCompat.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "subdiox@gmail.com" ]
subdiox@gmail.com
40a4fc68c7e467a912467e3a7bfe658f5a0a205c
da91506e6103d6e12933125f851df136064cfc30
/src/main/java/org/phw/core/lang/CSVWriter.java
2af42cc80a1142a6dc1fd8e909dafafec56881fe
[]
no_license
wuce7758/Mr.Hbaser
41709cb28568092699cb2803a06e232c28654110
af5afb7e4b4b2e51d15ff266e08204b9caf1657e
refs/heads/master
2020-06-29T13:29:49.751123
2012-07-11T00:18:57
2012-07-11T00:18:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,790
java
package org.phw.core.lang; import java.io.IOException; import java.io.PrintWriter; import java.io.Writer; import java.util.List; /** * CSVWriter. * @author BingooHuang * */ public class CSVWriter { /** The character used for escaping quotes. */ public static final char DEFAULT_ESCAPE_CHARACTER = '"'; /** The default separator to use if none is supplied to the constructor. */ public static final char DEFAULT_SEPARATOR = ','; /** * The default quote character to use if none is supplied to the * constructor. */ public static final char DEFAULT_QUOTE_CHARACTER = '"'; /** The quote constant to use when you wish to suppress all quoting. */ public static final char NO_QUOTE_CHARACTER = '\u0000'; /** The escape constant to use when you wish to suppress all escaping. */ public static final char NO_ESCAPE_CHARACTER = '\u0000'; /** Default line terminator uses platform encoding. */ public static final String DEFAULT_LINE_END = "\n"; private Writer rawWriter; private PrintWriter pw; private char separator; private char quotechar; private char escapechar; private String lineEnd; /** * Constructs CSVWriter using a comma for the separator. * * @param writer * the writer to an underlying CSV source. */ public CSVWriter(Writer writer) { this(writer, DEFAULT_SEPARATOR); } /** * Constructs CSVWriter with supplied separator. * * @param writer * the writer to an underlying CSV source. * @param separator * the delimiter to use for separating entries. */ public CSVWriter(Writer writer, char separator) { this(writer, separator, DEFAULT_QUOTE_CHARACTER); } /** * Constructs CSVWriter with supplied separator and quote char. * * @param writer * the writer to an underlying CSV source. * @param separator * the delimiter to use for separating entries * @param quotechar * the character to use for quoted elements */ public CSVWriter(Writer writer, char separator, char quotechar) { this(writer, separator, quotechar, DEFAULT_ESCAPE_CHARACTER); } /** * Constructs CSVWriter with supplied separator and quote char. * * @param writer * the writer to an underlying CSV source. * @param separator * the delimiter to use for separating entries * @param quotechar * the character to use for quoted elements * @param escapechar * the character to use for escaping quotechars or escapechars */ public CSVWriter(Writer writer, char separator, char quotechar, char escapechar) { this(writer, separator, quotechar, escapechar, DEFAULT_LINE_END); } /** * Constructs CSVWriter with supplied separator and quote char. * * @param writer * the writer to an underlying CSV source. * @param separator * the delimiter to use for separating entries * @param quotechar * the character to use for quoted elements * @param lineEnd * the line feed terminator to use */ public CSVWriter(Writer writer, char separator, char quotechar, String lineEnd) { this(writer, separator, quotechar, DEFAULT_ESCAPE_CHARACTER, lineEnd); } /** * Constructs CSVWriter with supplied separator, quote char, escape char and * line ending. * * @param writer * the writer to an underlying CSV source. * @param separator * the delimiter to use for separating entries * @param quotechar * the character to use for quoted elements * @param escapechar * the character to use for escaping quotechars or escapechars * @param lineEnd * the line feed terminator to use */ public CSVWriter(Writer writer, char separator, char quotechar, char escapechar, String lineEnd) { rawWriter = writer; pw = new PrintWriter(writer); this.separator = separator; this.quotechar = quotechar; this.escapechar = escapechar; this.lineEnd = lineEnd; } /** * Writes the entire list to a CSV file. The list is assumed to be a * String[] * * @param allLines * a List of String[], with each String[] representing a line of * the file. */ public void writeAll(List<String[]> allLines) { for (String[] nextLine : allLines) { writeNext(nextLine); } } /** * Writes the next line to the file. * * @param nextLine * a string array with each comma-separated element as a separate * entry. */ public void writeNext(String[] nextLine) { if (nextLine == null) { return; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < nextLine.length; i++) { if (i != 0) { sb.append(separator); } String nextElement = nextLine[i]; if (nextElement == null) { continue; } if (quotechar != NO_QUOTE_CHARACTER) { sb.append(quotechar); } for (int j = 0; j < nextElement.length(); j++) { char nextChar = nextElement.charAt(j); if (escapechar != NO_ESCAPE_CHARACTER && nextChar == quotechar) { sb.append(escapechar).append(nextChar); } else if (escapechar != NO_ESCAPE_CHARACTER && nextChar == escapechar) { sb.append(escapechar).append(nextChar); } else { sb.append(nextChar); } } if (quotechar != NO_QUOTE_CHARACTER) { sb.append(quotechar); } } sb.append(lineEnd); pw.write(sb.toString()); } /** * Flush underlying stream to writer. * * @throws IOException * if bad things happen */ public void flush() throws IOException { pw.flush(); } /** * Close the underlying stream writer flushing any buffered content. * * @throws IOException * if bad things happen * */ public void close() throws IOException { pw.flush(); pw.close(); rawWriter.close(); } }
[ "bingoo.huang@gmail.com" ]
bingoo.huang@gmail.com
e58f92eebab93ac7c26df0b59533f106865dd76e
01cc5a92ce60157014d28a8ddf9571abd53c7214
/src/main/java/javazoom/jl/mp3spi/DecodedMpegAudioInputStream.java
c6246461219dee2bffb5bcf7bfc34e2a5b205ca5
[]
no_license
Harium/etyl-sound
dd3134177cc0f972aec5c61c67a9d4f915379266
9969b1b0d375e3ea9ea3a321124e3bf84295f30b
refs/heads/master
2022-01-23T14:30:19.729400
2021-12-31T07:19:07
2021-12-31T07:19:07
97,123,960
0
0
null
null
null
null
UTF-8
Java
false
false
6,743
java
/* * DecodedMpegAudioInputStream. * * JavaZOOM : mp3spi@javazoom.net * http://www.javazoom.net * * Copyright (c) 2012 by fireandfuel from Cuina Team (http://www.cuina.byethost12.com/) * *----------------------------------------------------------------------------- * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as published * by the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *------------------------------------------------------------------------ */ package javazoom.jl.mp3spi; import java.io.IOException; import java.io.InputStream; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javazoom.jl.decoder.Bitstream; import javazoom.jl.decoder.BitstreamException; import javazoom.jl.decoder.Decoder; import javazoom.jl.decoder.DecoderException; import javazoom.jl.decoder.Header; import javazoom.jl.decoder.Obuffer; import org.tritonus.TAsynchronousFilteredAudioInputStream; /** * Main decoder. */ public class DecodedMpegAudioInputStream extends TAsynchronousFilteredAudioInputStream { private InputStream m_encodedStream; private Bitstream m_bitstream; private Decoder m_decoder; private Header m_header; private DMAISObuffer m_oBuffer; // Bytes info. private long byteslength = -1; private long currentByte = 0; // Frame info. private int frameslength = -1; private long currentFrame = 0; private int currentFramesize = 0; public DecodedMpegAudioInputStream(AudioFormat outputFormat, AudioInputStream bufferedInputStream) { super(outputFormat, -1); try { // Try to find out inputstream length to allow skip. byteslength = bufferedInputStream.available(); } catch (IOException e) { byteslength = -1; } m_encodedStream = bufferedInputStream; m_bitstream = new Bitstream(bufferedInputStream); m_decoder = new Decoder(null); // m_equalizer = new Equalizer(); // m_equalizer_values = new float[32]; // for (int b=0;b<m_equalizer.getBandCount();b++) // { // m_equalizer_values[b] = m_equalizer.getBand(b); // } // m_decoder.setEqualizer(m_equalizer); m_oBuffer = new DMAISObuffer(outputFormat.getChannels()); m_decoder.setOutputBuffer(m_oBuffer); try { m_header = m_bitstream.readFrame(); if((m_header != null) && (frameslength == -1) && (byteslength > 0)) frameslength = m_header.max_number_of_frames((int) byteslength); } catch (BitstreamException e) { byteslength = -1; } } public void execute()// if( reverseBytes ) // reverseBytes( smallBuffer, 0, bytesRead ); { try { // Following line hangs when FrameSize is available in AudioFormat. Header header = null; if(m_header == null) header = m_bitstream.readFrame(); else header = m_header; if(header == null) { getCircularBuffer().close(); return; } currentFrame++; currentFramesize = header.calculate_framesize(); currentByte = currentByte + currentFramesize; // Obuffer decoderOutput = m_decoder.decodeFrame(header, m_bitstream); m_bitstream.closeFrame(); getCircularBuffer().write(m_oBuffer.getBuffer(), 0, m_oBuffer.getCurrentBufferSize()); m_oBuffer.reset(); if(m_header != null) m_header = null; } catch (BitstreamException e) { } catch (DecoderException e) { } } public long skip(long bytes) { if((byteslength > 0) && (frameslength > 0)) { float ratio = bytes * 1.0f / byteslength * 1.0f; long bytesread = skipFrames((long) (ratio * frameslength)); currentByte = currentByte + bytesread; m_header = null; return bytesread; } else return -1; } /** * Skip frames. You don't need to call it severals times, it will exactly * skip given frames number. * * @param frames * @return bytes length skipped matching to frames skipped. */ public long skipFrames(long frames) { int framesRead = 0; int bytesReads = 0; try { for(int i = 0; i < frames; i++) { Header header = m_bitstream.readFrame(); if(header != null) { int fsize = header.calculate_framesize(); bytesReads = bytesReads + fsize; } m_bitstream.closeFrame(); framesRead++; } } catch (BitstreamException e) { } currentFrame = currentFrame + framesRead; return bytesReads; } private boolean isBigEndian() { return getFormat().isBigEndian(); } public void close() throws IOException { super.close(); m_encodedStream.close(); } private class DMAISObuffer extends Obuffer { private int m_nChannels; private byte[] m_abBuffer; private int[] m_anBufferPointers; private boolean m_bIsBigEndian; public DMAISObuffer(int nChannels) { m_nChannels = nChannels; m_abBuffer = new byte[OBUFFERSIZE * nChannels]; m_anBufferPointers = new int[nChannels]; reset(); m_bIsBigEndian = DecodedMpegAudioInputStream.this.isBigEndian(); } public void append(int nChannel, short sValue) { byte bFirstByte; byte bSecondByte; if(m_bIsBigEndian) { bFirstByte = (byte) ((sValue >>> 8) & 0xFF); bSecondByte = (byte) (sValue & 0xFF); } else // little endian { bFirstByte = (byte) (sValue & 0xFF); bSecondByte = (byte) ((sValue >>> 8) & 0xFF); } m_abBuffer[m_anBufferPointers[nChannel]] = bFirstByte; m_abBuffer[m_anBufferPointers[nChannel] + 1] = bSecondByte; m_anBufferPointers[nChannel] += m_nChannels * 2; } public void set_stop_flag() { } public void close() { } public void write_buffer(int nValue) { } public void clear_buffer() { } public byte[] getBuffer() { return m_abBuffer; } public int getCurrentBufferSize() { return m_anBufferPointers[0]; } public void reset() { for(int i = 0; i < m_nChannels; i++) { /* * Points to byte location, implicitely assuming 16 bit samples. */ m_anBufferPointers[i] = i * 2; } } } }
[ "yuripourre@gmail.com" ]
yuripourre@gmail.com
d8c64fef3d9f51c648571c6043a140b69b689206
c53eff0794037b9dde61cfe31d972f6d07799338
/Mage.Sets/src/mage/cards/d/DuskborneSkymarcher.java
4eb31fefe5b05ba6cfce6ad68d3d268f3e5173cd
[]
no_license
theelk801/mage
0cd1c942c54e204db03a7e1603c4250c58a65f9f
9a59d801200f327d9f01b4086d0e979d263c095d
refs/heads/master
2022-11-11T13:02:45.533594
2018-04-24T12:35:37
2018-04-24T12:35:37
98,135,127
3
0
null
2018-04-24T12:35:38
2017-07-24T00:54:07
Java
UTF-8
Java
false
false
3,589
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ package mage.cards.d; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.common.continuous.BoostTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.Duration; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.AttackingPredicate; import mage.target.common.TargetCreaturePermanent; /** * * @author TheElk801 */ public class DuskborneSkymarcher extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.VAMPIRE, "attacking Vampire"); static { filter.add(new AttackingPredicate()); } public DuskborneSkymarcher(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}"); this.subtype.add(SubType.VAMPIRE); this.subtype.add(SubType.CLERIC); this.power = new MageInt(1); this.toughness = new MageInt(1); // Flying this.addAbility(FlyingAbility.getInstance()); // {W}, {T}: Target attacking vampire gets +1/+1 until end of turn. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl("{W}")); ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent(filter)); this.addAbility(ability); } public DuskborneSkymarcher(final DuskborneSkymarcher card) { super(card); } @Override public DuskborneSkymarcher copy() { return new DuskborneSkymarcher(this); } }
[ "theelk801@gmail.com" ]
theelk801@gmail.com
299b7a620aabe4762cc4bc67de12dc6f30876363
3ec1cd4da6ec65e5b465df42f89372f2294c99ab
/springboot/src/main/java/com/example/demo/generator/WenbnAutoGenerator.java
f85202c057aff64bb802cec617638271e5cac464
[]
no_license
wenbn/xunwu
a7e2d92c24ca0183dd1a2a2059f78f2394f12777
fd73c0ed1cc861f2ce97245d3c0e0447e8cb2662
refs/heads/master
2020-04-06T17:49:31.429513
2018-11-23T10:01:21
2018-11-23T10:01:21
157,674,960
0
0
null
null
null
null
UTF-8
Java
false
false
5,992
java
package com.example.demo.generator; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.Version; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.generator.config.*; import com.baomidou.mybatisplus.generator.config.po.TableInfo; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.Serializable; import java.util.Iterator; import java.util.List; /** * @author wenbn * @version 1.0 * @date 2018/11/23 */ public class WenbnAutoGenerator { private static final Logger logger = LoggerFactory.getLogger(WenbnAutoGenerator.class); protected WenbnConfigBuilder config; protected WenbnInjectionConfig injectionConfig; private DataSourceConfig dataSource; private StrategyConfig strategy; private WenbnPackageConfig packageInfo; private WenbnTemplateConfig template; private WenbnGlobalConfig globalConfig; private WenbnAbstractTemplateEngine templateEngine; public WenbnAutoGenerator() { } public void execute() { logger.debug("==========================准备生成文件...=========================="); if (null == this.config) { this.config = new WenbnConfigBuilder(this.packageInfo, this.dataSource, this.strategy, this.template, this.globalConfig); if (null != this.injectionConfig) { this.injectionConfig.setConfig(this.config); } } if (null == this.templateEngine) { this.templateEngine = new WenbnVelocityTemplateEngine(); } this.templateEngine.init(this.pretreatmentConfigBuilder(this.config)).mkdirs().batchOutput().open(); logger.debug("==========================文件生成完成!!!=========================="); } protected List<WenbnTableInfo> getAllTableInfoList(WenbnConfigBuilder config) { return config.getTableInfoList(); } protected WenbnConfigBuilder pretreatmentConfigBuilder(WenbnConfigBuilder config) { if (null != this.injectionConfig) { this.injectionConfig.initMap(); config.setInjectionConfig(this.injectionConfig); } List<WenbnTableInfo> tableList = this.getAllTableInfoList(config); Iterator var3 = tableList.iterator(); while(var3.hasNext()) { TableInfo tableInfo = (TableInfo)var3.next(); if (config.getGlobalConfig().isActiveRecord()) { tableInfo.setImportPackages(Model.class.getCanonicalName()); } if (tableInfo.isConvert()) { tableInfo.setImportPackages(TableName.class.getCanonicalName()); } if (config.getStrategyConfig().getLogicDeleteFieldName() != null && tableInfo.isLogicDelete(config.getStrategyConfig().getLogicDeleteFieldName())) { tableInfo.setImportPackages(TableLogic.class.getCanonicalName()); } if (StringUtils.isNotEmpty(config.getStrategyConfig().getVersionFieldName())) { tableInfo.setImportPackages(Version.class.getCanonicalName()); } if (StringUtils.isNotEmpty(config.getSuperEntityClass())) { tableInfo.setImportPackages(config.getSuperEntityClass()); } else { tableInfo.setImportPackages(Serializable.class.getCanonicalName()); } if (config.getStrategyConfig().isEntityBooleanColumnRemoveIsPrefix()) { tableInfo.getFields().stream().filter((field) -> { return "boolean".equalsIgnoreCase(field.getPropertyType()); }).filter((field) -> { return field.getPropertyName().startsWith("is"); }).forEach((field) -> { field.setPropertyName(config.getStrategyConfig(), StringUtils.removePrefixAfterPrefixToLower(field.getPropertyName(), 2)); }); } } return config.setTableInfoList(tableList); } public DataSourceConfig getDataSource() { return this.dataSource; } public WenbnAutoGenerator setDataSource(DataSourceConfig dataSource) { this.dataSource = dataSource; return this; } public StrategyConfig getStrategy() { return this.strategy; } public WenbnAutoGenerator setStrategy(StrategyConfig strategy) { this.strategy = strategy; return this; } public PackageConfig getPackageInfo() { return this.packageInfo; } public WenbnAutoGenerator setPackageInfo(WenbnPackageConfig packageInfo) { this.packageInfo = packageInfo; return this; } public TemplateConfig getTemplate() { return this.template; } public WenbnAutoGenerator setTemplate(WenbnTemplateConfig template) { this.template = template; return this; } public WenbnConfigBuilder getConfig() { return this.config; } public WenbnAutoGenerator setConfig(WenbnConfigBuilder config) { this.config = config; return this; } public WenbnGlobalConfig getGlobalConfig() { return this.globalConfig; } public WenbnAutoGenerator setGlobalConfig(WenbnGlobalConfig globalConfig) { this.globalConfig = globalConfig; return this; } public WenbnInjectionConfig getCfg() { return this.injectionConfig; } public WenbnAutoGenerator setCfg(WenbnInjectionConfig injectionConfig) { this.injectionConfig = injectionConfig; return this; } public WenbnAbstractTemplateEngine getTemplateEngine() { return this.templateEngine; } public WenbnAutoGenerator setTemplateEngine(WenbnAbstractTemplateEngine templateEngine) { this.templateEngine = templateEngine; return this; } }
[ "test@qq.com" ]
test@qq.com
bac6819bb0a80d2ac06eac6661464d411e5768e8
5e72cbf1248c9e9c159e19ae1cefb8695f5f6184
/src/test/java/com/sample/sandbox/ComplexPerson.java
703c2e2ee3211a422fa41fbb40e0c90fc32b180b
[]
no_license
tkobayas/drools-warm-up-tools
22b2b5a3a37bbca13f188e8601126418ae6b47cf
d03fc5cbd216905d2acb098027d400d326d37d66
refs/heads/master
2020-05-19T13:29:17.510498
2015-08-12T05:43:39
2015-08-12T05:43:39
37,505,328
2
2
null
null
null
null
UTF-8
Java
false
false
1,502
java
package com.sample.sandbox; public class ComplexPerson { private String name; private Address address; public ComplexPerson() { } public ComplexPerson(String name, Address address) { this.name = name; this.address = address; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Address getAddress() { return address; } public void setAddress(Address address) { this.address = address; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((address == null) ? 0 : address.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ComplexPerson other = (ComplexPerson) obj; if (address == null) { if (other.address != null) return false; } else if (!address.equals(other.address)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; return true; } }
[ "toshiyakobayashi@gmail.com" ]
toshiyakobayashi@gmail.com
624aa577ed3e055d65ddaca46720a4ee7c9e51a4
2c40544be8739e5f0d63adf231c1070d97f25aaf
/SpringProjects/WebContent/ntsp67/AOPProj15-SpringAOP Decl-BeforeAdvice-DynamicPointcut/src/main/java/com/nt/test/SecurityCheckBeforeAdviceTest.java
858cf0a4f83cf0cbb7a88cecf771d95475cb0964
[]
no_license
gurunatha/samples
7ad293750bc351b722dd079f3b8a8b08a4c7d2d4
379cc85d521923bf579fc130e35883f1c1e8b947
refs/heads/master
2021-08-23T01:52:33.976429
2017-12-02T08:37:05
2017-12-02T08:37:05
112,822,525
0
0
null
null
null
null
UTF-8
Java
false
false
983
java
package com.nt.test; import org.springframework.context.ApplicationContext; import org.springframework.context.support.FileSystemXmlApplicationContext; import com.nt.service.AuthenticationManager; import com.nt.service.IntrAmountCalculator; public class SecurityCheckBeforeAdviceTest { public static void main(String[] args) { ApplicationContext ctx=null; AuthenticationManager manager=null; IntrAmountCalculator proxy=null; float amount=0; //create IOC container ctx=new FileSystemXmlApplicationContext("src/main/java/com/nt/cfgs/applicationContext.xml"); //get Bean manager=ctx.getBean("authManager",AuthenticationManager.class); //perform signIn manager.signIn("raja","rani"); //get Proxy object proxy=ctx.getBean("pfb",IntrAmountCalculator.class); //invoke method amount=proxy.calcIntrAmount(200000,2,10); System.out.println("Amount:::"+amount); //perform signOut manager.signOut(); }//main }//class
[ "gurunathreddy326@gmail.com" ]
gurunathreddy326@gmail.com
9acf1de11cb1ce4a1c0a1a5a296cc7d89e5f2d4f
1e2a3700115a42ce0bd71f56680d9ad550862b7f
/dist/game/data/scripts/ai/areas/Hellbound/AI/NPC/Solomon/Solomon.java
d374ee338dafb7a0968976e6c21ddbc0f1cf9ba4
[]
no_license
toudakos/HighFive
5a75313d43209193ad7bec89ce0f177bd7dddb6f
e76b6a497277f5e88093204b86f004101d0dca52
refs/heads/master
2021-04-23T00:34:59.390728
2020-03-25T04:17:38
2020-03-25T04:17:38
249,884,195
0
0
null
2020-03-25T04:08:31
2020-03-25T04:08:30
null
UTF-8
Java
false
false
1,435
java
/* * This file is part of the L2J Mobius project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package ai.areas.Hellbound.AI.NPC.Solomon; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; import ai.AbstractNpcAI; import ai.areas.Hellbound.HellboundEngine; /** * Solomon AI. * @author DS */ public final class Solomon extends AbstractNpcAI { // NPCs private static final int SOLOMON = 32355; public Solomon() { addFirstTalkId(SOLOMON); } @Override public final String onFirstTalk(L2Npc npc, L2PcInstance player) { if (HellboundEngine.getInstance().getLevel() == 5) { return "32355-01.htm"; } else if (HellboundEngine.getInstance().getLevel() > 5) { return "32355-01a.htm"; } return super.onFirstTalk(npc, player); } }
[ "danielbarionn@gmail.com" ]
danielbarionn@gmail.com
3c4a9e7acb3f2d7cf6f069c6506b35435155e5a7
47615faf90f578bdad1fde4ef3edae469d995358
/practise/SCJP5.0 猛虎出閘/第二次練習/unit 08/PrintStreamTest3.java
9bb39f3ecfe52e40a29197dc30716771102b3149
[]
no_license
hungmans6779/JavaWork-student-practice
dca527895e7dbb37aa157784f96658c90cbcf3bd
9473ca55c22f30f63fcd1d84c2559b9c609d5829
refs/heads/master
2020-04-14T01:26:54.467903
2018-12-30T04:52:38
2018-12-30T04:52:38
null
0
0
null
null
null
null
BIG5
Java
false
false
959
java
import java.io.*; public class PrintStreamTest3 { public static void main(String argv[]) { try { InputStreamReader isr=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(isr); FileOutputStream fos=new FileOutputStream("SampleFile3.txt"); BufferedOutputStream bos=new BufferedOutputStream(fos); PrintStream ps=new PrintStream(bos,true); System.out.print("請輸入您的資料(\"quit\"結束並離開) :"); System.setOut(ps); String data; while((data=br.readLine())!=null) { if(data.equals("quit")) break; System.out.println("您所輸入的字串是: "+data); } ps.flush(); ps.close(); bos.close(); fos.close(); br.close(); isr.close(); } catch(IOException ioe) { ioe.printStackTrace(); System.out.println(ioe.getMessage()); System.out.println(ioe.getLocalizedMessage()); } finally { System.out.println("謝謝使用本程式"); } } }
[ "hungmans6779@msn.com" ]
hungmans6779@msn.com
886867d83162fd03c6d88a365a8c842dcb6f1e6f
573a66e4f4753cc0f145de8d60340b4dd6206607
/JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/911446/beta 0.7/parser/expression/MultiplyExpression.java
00f00d70ccd05baf4c76ac332c837e795c88e9cf
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
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
3,229
java
/* Merchant of Venice - technical analysis software for the stock market. Copyright (C) 2002 Andrew Leppard (aleppard@picknowl.com.au) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.mov.parser.expression; import org.mov.parser.*; import org.mov.quote.*; /** * An expression which multiplies two sub-expressions. */ public class MultiplyExpression extends ArithmeticExpression { public MultiplyExpression(Expression left, Expression right) { super(left, right); } public double evaluate(Variables variables, QuoteBundle quoteBundle, Symbol symbol, int day) throws EvaluationException { return getChild(0).evaluate(variables, quoteBundle, symbol, day) * getChild(1).evaluate(variables, quoteBundle, symbol, day); } public Expression simplify() { // First perform arithmetic simplifications Expression simplified = super.simplify(); if(simplified == this) { NumberExpression left = (getChild(0) instanceof NumberExpression? (NumberExpression)getChild(0) : null); NumberExpression right = (getChild(1) instanceof NumberExpression? (NumberExpression)getChild(1) : null); // 0*a -> 0. if(left != null && left.equals(0.0D)) return new NumberExpression(0.0D, getType()); // a*0 -> 0. else if(right != null && right.equals(0.0D)) return new NumberExpression(0.0D, getType()); // a*1 -> a. else if(right != null && right.equals(1.0D)) return getChild(0); } return simplified; } public boolean equals(Object object) { // Are they both multiply expressions? if(object instanceof MultiplyExpression) { MultiplyExpression expression = (MultiplyExpression)object; // (x*y) == (x*y) if(getChild(0).equals(expression.getChild(0)) && getChild(1).equals(expression.getChild(1))) return true; // (x*y) == (y*x) if(getChild(0).equals(expression.getChild(1)) && getChild(1).equals(expression.getChild(0))) return true; } return false; } public String toString() { return super.toString("*"); } public Object clone() { return new MultiplyExpression((Expression)getChild(0).clone(), (Expression)getChild(1).clone()); } }
[ "mmkaouer@umich.edu" ]
mmkaouer@umich.edu
208e7cc20a621c26484687e2659da7fe58eeae2e
ce97daa416b7312ad3774d21957e87d544a51a6b
/tests/fr/adrienbrault/idea/symfony2plugin/tests/stubs/indexes/RoutesStubIndexTestTest.java
10a0466cf38acef0f049cc3cd581fae8b414ed84
[ "MIT" ]
permissive
artspb/idea-php-symfony2-plugin
a6ca55987711ebef999c1a8f4ebf4fde944d9ad4
cb86c27c76fb961914336666b9022a587b20e685
refs/heads/master
2020-12-07T13:40:31.942729
2016-03-29T17:42:03
2016-03-29T17:42:03
55,513,002
0
0
null
2016-04-05T14:05:54
2016-04-05T14:05:54
null
UTF-8
Java
false
false
2,022
java
package fr.adrienbrault.idea.symfony2plugin.tests.stubs.indexes; import com.intellij.ide.highlighter.XmlFileType; import fr.adrienbrault.idea.symfony2plugin.stubs.indexes.RoutesStubIndex; import fr.adrienbrault.idea.symfony2plugin.tests.SymfonyLightCodeInsightFixtureTestCase; import org.jetbrains.yaml.YAMLFileType; /** * @author Daniel Espendiller <daniel@espendiller.net> * @see fr.adrienbrault.idea.symfony2plugin.stubs.indexes.RoutesStubIndex */ public class RoutesStubIndexTestTest extends SymfonyLightCodeInsightFixtureTestCase { public void setUp() throws Exception { super.setUp(); myFixture.configureByText(YAMLFileType.YML, "" + "foo_yaml_pattern:\n" + " pattern: /\n" + " methods: [GET, POST]\n" + " defaults: { _controller: foo_controller }" + "\n" + "foo_yaml_path:\n" + " path: /\n" + " defaults: { _controller: foo_controller }" + "\n" + "foo_yaml_path_only:\n" + " path: /\n" + "foo_yaml_invalid:\n" + " path_invalid: /\n" ); myFixture.configureByText(XmlFileType.INSTANCE, "" + "<routes>\n" + " <route id=\"foo_xml_pattern\" pattern=\"/blog/{slug}\"/>\n" + " <route id=\"foo_xml_path\" path=\"/blog/{slug}\">\n" + " <default key=\"_controller\">Foo</default>\n" + " </route>\n" + " <route id=\"foo_xml_id_only\"/>\n" + "</routes>" ); } /** * @see fr.adrienbrault.idea.symfony2plugin.stubs.indexes.RoutesStubIndex#getIndexer() */ public void testRouteIdIndex() { assertIndexContains(RoutesStubIndex.KEY, "foo_yaml_pattern", "foo_yaml_path", "foo_yaml_path_only", "foo_xml_pattern", "foo_xml_path", "foo_xml_id_only" ); assertIndexNotContains(RoutesStubIndex.KEY, "foo_yaml_invalid" ); } }
[ "espendiller@gmx.de" ]
espendiller@gmx.de
a2d2085a7e0048b8ec088118eb9324a2d679274d
12ce41794f36a8ff2e82286d2e39c8687bd86c8e
/cms-common/src/main/java/com/xzjie/mybatis/core/service/AbstractBaseService.java
7a926538dfd1d6dba606b8b9d80b2165836bfd71
[ "Apache-2.0" ]
permissive
lhongjum/cms
89bf47953e9beed0eef3d27316a85ca7e821c1c9
b754167d97165c744462b845dc28244a2e736345
refs/heads/master
2023-02-22T10:31:26.930021
2020-12-02T15:56:14
2020-12-02T15:56:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,631
java
package com.xzjie.mybatis.core.service; import java.io.Serializable; import java.util.List; import com.xzjie.mybatis.core.dao.BaseMapper; import com.xzjie.mybatis.page.PageEntity; public abstract class AbstractBaseService<T, Obj extends Serializable> implements BaseService<T, Obj> { protected abstract BaseMapper<T, Obj> getMapper(); /*public void setMapper(BaseMapper<T, Obj> baseMapper) { this.mapper = baseMapper; }*/ @Override public boolean save(T t) { return getMapper().insertSelective(t) > 0; } @Override public void batchSave(List<T> list) { // TODO Auto-generated method stub } @Override public boolean update(T t) { return getMapper().updateByPrimaryKeySelective(t) > 0; } @Override public void batchUpdate(List<T> list) { // TODO Auto-generated method stub } @Override public boolean delete(Obj id) { return getMapper().deleteByPrimaryKey(id) > 0; } @Override public boolean delete(T t) { // TODO Auto-generated method stub return false; } @Override public void batchDelete(List<T> list) { getMapper().batchDelete(list); } @Override public T get(Obj id) { return getMapper().selectByPrimaryKey(id); } @Override public T get(T t) { // TODO Auto-generated method stub return null; } @Override public List<T> getList(T t) { return getMapper().selectList(t); } @Override public List<T> getAllList(T t) { // TODO Auto-generated method stub return null; } @Override public PageEntity<T> getListPage(PageEntity<T> pageEntity) { List<T> list=getMapper().selectListPage(pageEntity); pageEntity.setRows(list); return pageEntity; } }
[ "513961835@qq.com" ]
513961835@qq.com
c6be47343588a1d67121a8e30ba74cfed19585cc
f7d3023a61b362aa7586953ad145c846b73d2251
/jOOQ-test/examples/org/jooq/examples/h2/matchers/tables/records/TTriggersRecord.java
fea481f7fabe422a79f497a86eeaa85c0612b5bb
[ "Apache-2.0", "BSD-3-Clause" ]
permissive
Toilal/jOOQ
6ffeb332c8ef445714e987e1ddca79184dff1cec
bcd073a4025add29c68b7e6a48834f5df75b7e75
refs/heads/master
2021-01-14T14:37:30.209778
2013-12-06T10:29:23
2013-12-06T10:29:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,365
java
/** * This class is generated by jOOQ */ package org.jooq.examples.h2.matchers.tables.records; /** * This class is generated by jOOQ. */ @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TTriggersRecord extends org.jooq.impl.UpdatableRecordImpl<org.jooq.examples.h2.matchers.tables.records.TTriggersRecord> implements org.jooq.Record3<java.lang.Integer, java.lang.Integer, java.lang.Integer>, org.jooq.examples.h2.matchers.tables.interfaces.ITTriggers { private static final long serialVersionUID = 523824892; /** * Setter for <code>PUBLIC.T_TRIGGERS.ID_GENERATED</code>. */ @Override public void setIdGenerated(java.lang.Integer value) { setValue(0, value); } /** * Getter for <code>PUBLIC.T_TRIGGERS.ID_GENERATED</code>. */ @Override public java.lang.Integer getIdGenerated() { return (java.lang.Integer) getValue(0); } /** * Setter for <code>PUBLIC.T_TRIGGERS.ID</code>. */ @Override public void setId(java.lang.Integer value) { setValue(1, value); } /** * Getter for <code>PUBLIC.T_TRIGGERS.ID</code>. */ @Override public java.lang.Integer getId() { return (java.lang.Integer) getValue(1); } /** * Setter for <code>PUBLIC.T_TRIGGERS.COUNTER</code>. */ @Override public void setCounter(java.lang.Integer value) { setValue(2, value); } /** * Getter for <code>PUBLIC.T_TRIGGERS.COUNTER</code>. */ @Override public java.lang.Integer getCounter() { return (java.lang.Integer) getValue(2); } // ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public org.jooq.Record1<java.lang.Integer> key() { return (org.jooq.Record1) super.key(); } // ------------------------------------------------------------------------- // Record3 type implementation // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public org.jooq.Row3<java.lang.Integer, java.lang.Integer, java.lang.Integer> fieldsRow() { return (org.jooq.Row3) super.fieldsRow(); } /** * {@inheritDoc} */ @Override public org.jooq.Row3<java.lang.Integer, java.lang.Integer, java.lang.Integer> valuesRow() { return (org.jooq.Row3) super.valuesRow(); } /** * {@inheritDoc} */ @Override public org.jooq.Field<java.lang.Integer> field1() { return org.jooq.examples.h2.matchers.tables.TTriggers.ID_GENERATED; } /** * {@inheritDoc} */ @Override public org.jooq.Field<java.lang.Integer> field2() { return org.jooq.examples.h2.matchers.tables.TTriggers.ID; } /** * {@inheritDoc} */ @Override public org.jooq.Field<java.lang.Integer> field3() { return org.jooq.examples.h2.matchers.tables.TTriggers.COUNTER; } /** * {@inheritDoc} */ @Override public java.lang.Integer value1() { return getIdGenerated(); } /** * {@inheritDoc} */ @Override public java.lang.Integer value2() { return getId(); } /** * {@inheritDoc} */ @Override public java.lang.Integer value3() { return getCounter(); } // ------------------------------------------------------------------------- // FROM and INTO // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public void from(org.jooq.examples.h2.matchers.tables.interfaces.ITTriggers from) { setIdGenerated(from.getIdGenerated()); setId(from.getId()); setCounter(from.getCounter()); } /** * {@inheritDoc} */ @Override public <E extends org.jooq.examples.h2.matchers.tables.interfaces.ITTriggers> E into(E into) { into.from(this); return into; } // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- /** * Create a detached TTriggersRecord */ public TTriggersRecord() { super(org.jooq.examples.h2.matchers.tables.TTriggers.T_TRIGGERS); } /** * Create a detached, initialised TTriggersRecord */ public TTriggersRecord(java.lang.Integer idGenerated, java.lang.Integer id, java.lang.Integer counter) { super(org.jooq.examples.h2.matchers.tables.TTriggers.T_TRIGGERS); setValue(0, idGenerated); setValue(1, id); setValue(2, counter); } }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
d03adbb8a902156ff74bc5ccef88d5168a8ab85e
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-12667-4-9-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/com/xpn/xwiki/doc/XWikiAttachment_ESTest.java
b4059dd1f3e61c7c63a5a3aa99063ea633a4bbf1
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
1,382
java
/* * This file was automatically generated by EvoSuite * Thu Oct 28 12:57:45 UTC 2021 */ package com.xpn.xwiki.doc; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import com.xpn.xwiki.doc.XWikiAttachment; import com.xpn.xwiki.doc.XWikiDocument; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.junit.runner.RunWith; import org.xwiki.model.internal.reference.LocalStringEntityReferenceSerializer; import org.xwiki.model.reference.DocumentReference; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XWikiAttachment_ESTest extends XWikiAttachment_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { LocalStringEntityReferenceSerializer localStringEntityReferenceSerializer0 = new LocalStringEntityReferenceSerializer(); XWikiDocument xWikiDocument0 = mock(XWikiDocument.class, new ViolatedAssumptionAnswer()); doReturn((DocumentReference) null).when(xWikiDocument0).getDocumentReference(); XWikiAttachment xWikiAttachment0 = new XWikiAttachment(xWikiDocument0, (String) null); // Undeclared exception! xWikiAttachment0.getReference(); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
3698e6058a6148ca3bd39159deec648056e6e450
947b983e24151a9e5ff32b2094e3bae02131fa4e
/rabbit/src/main/java/com/helger/rabbit/filter/SQLBlockFilter.java
1fd224a1823c2b0303c20af6460ce49d079ca90b
[ "BSD-3-Clause", "Apache-2.0", "BSD-2-Clause" ]
permissive
elainte/rabbit-proxy
2556e2286ff057f7108b79abca19ff2a4f2ac2f7
d54b6cad22bb43b78e17990ec312fdc7cff72ffa
refs/heads/master
2021-03-31T01:16:21.140817
2016-08-21T13:49:45
2016-08-21T13:49:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,328
java
package com.helger.rabbit.filter; import java.net.MalformedURLException; import java.net.URL; import java.nio.channels.SocketChannel; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.logging.Level; import java.util.logging.Logger; import javax.naming.NamingException; import com.helger.commons.url.SMap; import com.helger.rabbit.http.HttpHeader; import com.helger.rabbit.proxy.Connection; import com.helger.rabbit.proxy.HttpProxy; /** * A blocker that checks hosts against a sql database * * @author <a href="mailto:robo@khelekore.org">Robert Olofsson</a> */ public class SQLBlockFilter implements IHttpFilter { private DataSourceHelper dsh; private final Logger logger = Logger.getLogger (getClass ().getName ()); private final String DEFAULT_SQL = "select 1 from bad_hosts where hostname = ?"; public HttpHeader doHttpInFiltering (final SocketChannel socket, final HttpHeader header, final Connection con) { try (final java.sql.Connection db = dsh.getConnection (); final PreparedStatement ps = db.prepareStatement (dsh.getSelect ())) { final URL u = new URL (header.getRequestURI ()); ps.setString (1, u.getHost ()); try (final ResultSet rs = ps.executeQuery ()) { if (rs.next ()) return con.getHttpGenerator ().get403 (); } } catch (final MalformedURLException e) { logger.log (Level.WARNING, "Failed to create URL", e); } catch (final SQLException e) { logger.log (Level.WARNING, "Failed to get database connection", e); } return null; } public HttpHeader doHttpOutFiltering (final SocketChannel socket, final HttpHeader header, final Connection con) { return null; } public HttpHeader doConnectFiltering (final SocketChannel socket, final HttpHeader header, final Connection con) { // TODO: possibly block connect requests? return null; } /** * Setup this class with the given properties. * * @param props * the new configuration of this class. */ public void setup (final SMap props, final HttpProxy proxy) { try { dsh = new DataSourceHelper (props, DEFAULT_SQL); } catch (final NamingException e) { throw new RuntimeException (e); } } }
[ "philip@helger.com" ]
philip@helger.com
e07ac29af5f49ed3de7363e53964825a86dd001e
0ea271177f5c42920ac53cd7f01f053dba5c14e4
/5.4.2/sources/com/persianswitch/sdk/base/preference/SqlitePreference.java
dad3ad9d885d097cb00ff0ed09458265039bcd5d
[]
no_license
alireza-ebrahimi/telegram-talaeii
367a81a77f9bc447e729b2ca339f9512a4c2860e
68a67e6f104ab8a0888e63c605e8bbad12c4a20e
refs/heads/master
2020-03-21T13:44:29.008002
2018-12-09T10:30:29
2018-12-09T10:30:29
138,622,926
12
1
null
null
null
null
UTF-8
Java
false
false
2,705
java
package com.persianswitch.sdk.base.preference; import android.database.sqlite.SQLiteOpenHelper; import com.persianswitch.sdk.base.db.phoenix.SqliteKeyValue; import com.persianswitch.sdk.base.db.phoenix.SqliteKeyValue.SqlitePreferenceTable; import com.persianswitch.sdk.base.db.phoenix.repo.PhoenixRepo; import com.persianswitch.sdk.base.utils.strings.StringUtils; public class SqlitePreference extends PhoenixRepo<String, SqliteKeyValue> implements IPreference { public SqlitePreference(SQLiteOpenHelper sQLiteOpenHelper, String str) { super(sQLiteOpenHelper, new SqlitePreferenceTable(str)); } /* renamed from: a */ public int mo3252a(String str, int i) { try { Integer e = StringUtils.m10809e(mo3261b(((SqliteKeyValue) m10610a((Object) str)).m10586b())); if (e != null) { i = e.intValue(); } } catch (Exception e2) { } return i; } /* renamed from: a */ public long mo3253a(String str, long j) { try { Long d = StringUtils.m10808d(mo3261b(((SqliteKeyValue) m10610a((Object) str)).m10586b())); if (d != null) { j = d.longValue(); } } catch (Exception e) { } return j; } /* renamed from: a */ public String mo3260a(String str) { return str; } /* renamed from: a */ public String mo3254a(String str, String str2) { try { str2 = mo3261b(((SqliteKeyValue) m10610a((Object) str)).m10586b()); } catch (Exception e) { } return str2; } /* renamed from: a */ public boolean mo3255a(String str, boolean z) { try { Boolean c = StringUtils.m10807c(mo3261b(((SqliteKeyValue) m10610a((Object) str)).m10586b())); if (c != null) { z = c.booleanValue(); } } catch (Exception e) { } return z; } /* renamed from: b */ public String mo3261b(String str) { return str; } /* renamed from: b */ public void mo3256b(String str, int i) { mo3369a(new SqliteKeyValue(str, mo3260a(String.valueOf(i)), Integer.class)); } /* renamed from: b */ public void mo3257b(String str, long j) { mo3369a(new SqliteKeyValue(str, mo3260a(String.valueOf(j)), Long.class)); } /* renamed from: b */ public void mo3258b(String str, String str2) { mo3369a(new SqliteKeyValue(str, mo3260a(str2), String.class)); } /* renamed from: b */ public void mo3259b(String str, boolean z) { mo3369a(new SqliteKeyValue(str, mo3260a(String.valueOf(z)), Boolean.class)); } }
[ "alireza.ebrahimi2006@gmail.com" ]
alireza.ebrahimi2006@gmail.com
ff1ec2c575daa659a3549b4efdd54f2e8a578117
901a0073a8ff29c23c518e7c03b873c6b1e7bbbb
/lts-core/src/main/java/com/lts/core/json/TypeReference.java
4da29ec0ff6b71746b3f645df5c49393a05b85a3
[ "Apache-2.0" ]
permissive
morisenmen/light-task-scheduler
5c034c3c2154445accc9e1be590b1f0c26ff67b7
270efb700601a7f68116fe4bcd73c3b1630ad94a
refs/heads/master
2020-04-29T07:54:38.970676
2016-04-11T05:23:32
2016-04-11T05:23:32
56,043,655
1
0
null
2016-04-12T08:09:13
2016-04-12T08:09:13
null
UTF-8
Java
false
false
469
java
package com.lts.core.json; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; /** * @author Robert HG (254963746@qq.com) on 11/19/15. */ public abstract class TypeReference<T> { private final Type type; public TypeReference() { Type superClass = getClass().getGenericSuperclass(); type = ((ParameterizedType) superClass).getActualTypeArguments()[0]; } public Type getType() { return type; } }
[ "254963746@qq.com" ]
254963746@qq.com
d8c08705d29cf67b2fba5b2a8dec465a67e4f097
e08644d4ba8d931ab32a03509cc233135bc9fabf
/src/net/estinet/au5c/ClioteSky/Network/NetworkThread.java
cf0fdaadb364b8a6323b97c5e54840e8a6c7061d
[ "Apache-2.0" ]
permissive
EstiNet/au5c
86718da166581de77d92897b647d5fe0952e4f7c
2c1fa6de7ae8fd629bb7eb0868a8840e993447ec
refs/heads/master
2021-01-17T15:59:36.990296
2017-03-04T21:24:22
2017-03-04T21:24:22
58,317,645
0
0
null
null
null
null
UTF-8
Java
false
false
3,090
java
package net.estinet.au5c.ClioteSky.Network; import java.io.BufferedReader; import java.io.DataOutputStream; import java.io.InputStreamReader; import java.net.ConnectException; import java.net.Socket; import java.net.SocketException; import net.estinet.au5c.Debug; import net.estinet.au5c.ClioteSky.ClioteConfigUtil; import net.estinet.au5c.ClioteSky.ClioteSky; import net.estinet.au5c.ClioteSky.Network.Protocol.Output.OutputHello; public class NetworkThread { public static Socket clientSocket = null; public static DataOutputStream outToServer = null; public static BufferedReader inFromServer = null; public static void start(boolean whee){ try{ String input; try{ clientSocket = new Socket(ClioteSky.getAddress(), Integer.parseInt(ClioteSky.getPort())); outToServer = new DataOutputStream(clientSocket.getOutputStream()); inFromServer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); } catch(ConnectException e){ Debug.print("[ClioteSky] Connection unsuccessful."); if(whee){ ClioteSky.printError("Unable to connect to ClioteSky at " + ClioteSky.getAddress() + ":" + ClioteSky.getPort()); } ClioteSky.setServerOffline(); clientSocket = null; return; } ClioteSky.printLine("Connected to ClioteSky at " + ClioteSky.getAddress() + ":" + ClioteSky.getPort()); OutputHello os = new OutputHello(); os.run(null); while(true){ try{ input = inFromServer.readLine(); if(input == null){ ClioteSky.printError("Couldn't establish connection with server. We'll try a bit later!"); ClioteSky.setServerOffline(); clientSocket.close(); clientSocket = null; break; } else{ Decosion de = new Decosion(); de.decode(input); } } catch(SocketException se){ ClioteSky.printError("Uh oh! Server went offline."); ClioteSky.setServerOffline(); clientSocket.close(); clientSocket = null; break; } catch(Exception e){ e.printStackTrace(); } } } catch(Exception e){ e.printStackTrace(); } } public void sendOutput(String message){ try { if(ClioteSky.isSyncedOutput()){ ClioteSky.secondCachedQueries.add(message); } else{ if(ClioteSky.isServerOnline()){ try{ DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream()); outToServer.writeBytes(message + "\n"); outToServer.flush(); ClioteSky.setSyncedOutput(true); Thread thr = new Thread(new Runnable(){ public void run(){ try { Thread.sleep(750); } catch (InterruptedException e) { e.printStackTrace(); } ClioteSky.setSyncedOutput(false); } }); thr.start(); } catch(NullPointerException e){ ClioteConfigUtil ccu = new ClioteConfigUtil(); ccu.addCacheEntry(message); } } else{ ClioteConfigUtil ccu = new ClioteConfigUtil(); ccu.addCacheEntry(message); } } } catch (Exception e) { e.printStackTrace(); } } }
[ "aguy867@gmail.com" ]
aguy867@gmail.com
73666392cb769371eccbd51547e94bd81479209b
e58a8e0fb0cfc7b9a05f43e38f1d01a4d8d8cf1f
/TAP/src/com/puttysoftware/tap/adventure/Adventure.java
999aa4b64c82471029cd284b205bcadc7f97cae5
[ "Unlicense" ]
permissive
retropipes/older-java-games
777574e222f30a1dffe7936ed08c8bfeb23a21ba
786b0c165d800c49ab9977a34ec17286797c4589
refs/heads/master
2023-04-12T14:28:25.525259
2021-05-15T13:03:54
2021-05-15T13:03:54
235,693,016
0
0
null
null
null
null
UTF-8
Java
false
false
2,207
java
/* TAP: A Text Adventure Parser Copyright (C) 2010 Eric Ahnell Any questions should be directed to the author via email at: tap@worldwizard.net */ package com.puttysoftware.tap.adventure; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import com.puttysoftware.fileutils.ResourceStreamReader; import com.puttysoftware.tap.adventure.parsers.InputParser; import com.puttysoftware.tap.adventure.parsers.ParserFactory; import com.puttysoftware.xio.XDataReader; import com.puttysoftware.xio.XDataWriter; public class Adventure { // Fields private ArrayList<String> advData; private InputParser parser; // Constructor public Adventure() { super(); } // Methods protected void loadAdventure(final File advFile) throws IOException { this.loadData(advFile); this.createParser(); this.parser.doInitial(this.advData); } protected void loadExampleAdventure(final ArrayList<String> data) { this.advData = data; this.createParser(); this.parser.doInitial(this.advData); } void loadState(final XDataReader xdr) throws IOException { this.createParser(); this.advData = this.parser.loadState(xdr); } void saveState(final XDataWriter xdw) throws IOException { this.parser.saveState(xdw); } private void createParser() { this.parser = ParserFactory.getParser(ParserFactory.GRAMMAR_0); } private void loadData(final File advFile) throws IOException { try (final FileInputStream fis = new FileInputStream(advFile); final ResourceStreamReader rsr = new ResourceStreamReader( fis)) { this.advData = new ArrayList<>(); String line = ""; //$NON-NLS-1$ while (line != null) { line = rsr.readString(); if (line != null) { this.advData.add(line); } } } } public void resume() { this.parser.doResume(); } public void parseCommand(final String command) { this.parser.parseCommand(command); } }
[ "eric.ahnell@puttysoftware.com" ]
eric.ahnell@puttysoftware.com
ab5947ad84301108b1401eb4284f035458c8e9ca
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a055/A055586Test.java
af36e66a6d8da6ab2ab70a415ed950b781dd5857
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a055; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A055586Test extends AbstractSequenceTest { }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
4109a858827e302294bf1cfec00808a9aff7c94a
529f150417dc9d88e4a4532518f34572cf630246
/src/main/java/jpabook/model/entity/Category.java
e8b1d52068f1bb6a8e94d33e6273f6ec5d7b875a
[]
no_license
arahansa/jpabook
bb20ece99ed789791e9dd69055a50ba54a8a0cd6
58850375811ec52dc6bea77ef8fe44fe8dd80296
refs/heads/master
2021-01-10T13:56:06.954542
2015-12-20T00:49:32
2015-12-20T00:49:32
48,269,595
0
0
null
null
null
null
UTF-8
Java
false
false
969
java
package jpabook.model.entity; import lombok.Data; import javax.persistence.*; import java.util.ArrayList; import java.util.List; /** * Created by arahansa on 2015-12-19. */ @Entity @Data public class Category { @Id @GeneratedValue private Long id; private String name; @ManyToMany @JoinTable(name="CATEGORY_ITEM", joinColumns = @JoinColumn(name="CATEGORY_ID"), inverseJoinColumns = @JoinColumn(name="ITEM_ID")) private List<Item> items = new ArrayList<>(); // 카테고리의 계층 구조를 위한 필드들 @ManyToOne @JoinColumn(name="PARENT_ID") private Category parent; @OneToMany(mappedBy = "parent") private List<Category> child = new ArrayList<>(); //==연관관계 메소드==// public void addChildCateogry(Category child){ this.child.add(child); child.setParent(this); } public void addItem(Item item){ items.add(item); } }
[ "arahansa@naver.com" ]
arahansa@naver.com
4f7e6e79bef7f6b5de8cdfa79e15caf4d551d317
ca7da6499e839c5d12eb475abe019370d5dd557d
/spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java
63b4e068436c4cd344f5cdc28a79de003722fb79
[ "Apache-2.0" ]
permissive
yangfancoming/spring-5.1.x
19d423f96627636a01222ba747f951a0de83c7cd
db4c2cbcaf8ba58f43463eff865d46bdbd742064
refs/heads/master
2021-12-28T16:21:26.101946
2021-12-22T08:55:13
2021-12-22T08:55:13
194,103,586
0
1
null
null
null
null
UTF-8
Java
false
false
3,134
java
package org.springframework.web.accept; import java.util.Map; import javax.servlet.ServletContext; import org.springframework.core.io.Resource; import org.springframework.http.MediaType; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import org.springframework.web.HttpMediaTypeNotAcceptableException; import org.springframework.web.context.request.NativeWebRequest; /** * Extends {@code PathExtensionContentNegotiationStrategy} that also uses * {@link ServletContext#getMimeType(String)} to resolve file extensions. * * * @since 3.2 */ public class ServletPathExtensionContentNegotiationStrategy extends PathExtensionContentNegotiationStrategy { private final ServletContext servletContext; /** * Create an instance without any mappings to start with. Mappings may be * added later when extensions are resolved through * {@link ServletContext#getMimeType(String)} or via * {@link org.springframework.http.MediaTypeFactory}. */ public ServletPathExtensionContentNegotiationStrategy(ServletContext context) { this(context, null); } /** * Create an instance with the given extension-to-MediaType lookup. */ public ServletPathExtensionContentNegotiationStrategy( ServletContext servletContext, @Nullable Map<String, MediaType> mediaTypes) { super(mediaTypes); Assert.notNull(servletContext, "ServletContext is required"); this.servletContext = servletContext; } /** * Resolve file extension via {@link ServletContext#getMimeType(String)} * and also delegate to base class for a potential * {@link org.springframework.http.MediaTypeFactory} lookup. */ @Override @Nullable protected MediaType handleNoMatch(NativeWebRequest webRequest, String extension) throws HttpMediaTypeNotAcceptableException { MediaType mediaType = null; String mimeType = this.servletContext.getMimeType("file." + extension); if (StringUtils.hasText(mimeType)) { mediaType = MediaType.parseMediaType(mimeType); } if (mediaType == null || MediaType.APPLICATION_OCTET_STREAM.equals(mediaType)) { MediaType superMediaType = super.handleNoMatch(webRequest, extension); if (superMediaType != null) { mediaType = superMediaType; } } return mediaType; } /** * Extends the base class * {@link PathExtensionContentNegotiationStrategy#getMediaTypeForResource} * with the ability to also look up through the ServletContext. * @param resource the resource to look up * @return the MediaType for the extension, or {@code null} if none found * @since 4.3 */ @Override public MediaType getMediaTypeForResource(Resource resource) { MediaType mediaType = null; String mimeType = this.servletContext.getMimeType(resource.getFilename()); if (StringUtils.hasText(mimeType)) { mediaType = MediaType.parseMediaType(mimeType); } if (mediaType == null || MediaType.APPLICATION_OCTET_STREAM.equals(mediaType)) { MediaType superMediaType = super.getMediaTypeForResource(resource); if (superMediaType != null) { mediaType = superMediaType; } } return mediaType; } }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
29d95630b5d2453eeaf22c88b6f3afaeada93c6d
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/6/6_82c55465e65ee73f52ec6e9f51e7b0c30c513ad4/XMLTransfer/6_82c55465e65ee73f52ec6e9f51e7b0c30c513ad4_XMLTransfer_t.java
94d37e27847009d1a73aa0eebe0eee9de6c876a0
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,603
java
package be.ibridge.kettle.core; import org.eclipse.swt.dnd.ByteArrayTransfer; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.TransferData; public class XMLTransfer extends ByteArrayTransfer { private static final String MYTYPENAME = "KETTLE_XML_TRANSFER"; private static final int MYTYPEID = registerType(MYTYPENAME); private static XMLTransfer _instance = new XMLTransfer(); public static XMLTransfer getInstance() { return _instance; } public void javaToNative(Object object, TransferData transferData) { if (!checkMyType(object) /*|| !isSupportedType(transferData)*/ ) { DND.error(DND.ERROR_INVALID_DATA); } try { byte[] buffer = Base64.encodeBytes(((DragAndDropContainer) object).getXML().getBytes()).getBytes(); super.javaToNative(buffer, transferData); } catch (Exception e) { LogWriter.getInstance().logError(toString(), "Unexpected error trying to put a string onto the XML Transfer type: " + e.toString()); LogWriter.getInstance().logError(toString(), Const.getStackTracker(e)); return; } } boolean checkMyType(Object object) { System.out.println("Object class: "+object.getClass().toString()); if (object == null /* || !(object instanceof DragAndDropContainer)*/) { return false; } return true; } public Object nativeToJava(TransferData transferData) { if (isSupportedType(transferData)) { try { byte[] buffer = (byte[]) super.nativeToJava(transferData); String xml = new String(Base64.decode(new String(buffer))); return new DragAndDropContainer(xml); } catch (Exception e) { LogWriter.getInstance().logError(toString(), "Unexpected error trying to read a drag and drop container from the XML Transfer type: " + e.toString()); LogWriter.getInstance().logError(toString(), Const.getStackTracker(e)); return null; } } return null; } protected String[] getTypeNames() { return new String[] { MYTYPENAME }; } protected int[] getTypeIds() { return new int[] { MYTYPEID }; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c32c9b018d39f9094c3cf5bed793c614db91dac2
043703eaf27a0d5e6f02bf7a9ac03c0ce4b38d04
/subject_systems/Struts2/src/struts-2.3.32/src/core/src/main/java/org/apache/struts2/dispatcher/ng/servlet/ServletHostConfig.java
582490be847c6426190a31ee813852fa3754fb75
[]
no_license
MarceloLaser/arcade_console_test_resources
e4fb5ac4a7b2d873aa9d843403569d9260d380e0
31447aabd735514650e6b2d1a3fbaf86e78242fc
refs/heads/master
2020-09-22T08:00:42.216653
2019-12-01T21:51:05
2019-12-01T21:51:05
225,093,382
1
2
null
null
null
null
UTF-8
Java
false
false
129
java
version https://git-lfs.github.com/spec/v1 oid sha256:b4b38c10c857db1dad00bd5cfdbb1895c936bb59ab8a038f4696f3f286dcc7ad size 1752
[ "marcelo.laser@gmail.com" ]
marcelo.laser@gmail.com
1fc5711df26f17b8322414f97545af491f8c47f6
2ca8077a67bd3a86b09b59f495f9a166efef052d
/src/iterators_and_comparatotrs/exercises/p08_Pet_clinics/implementations/Pet.java
cdd8bd531c477c2c6ebcbd9a2748a449bbb35b2a
[]
no_license
GeorgiPopov1988/Java_OOP_Advanced_July_2018
8cff602e57808d35aa6e26012ec2610602ed2cc8
539b3e1b103a026ffb2a5a480d92b8faac9c832b
refs/heads/master
2020-03-22T20:38:03.810425
2018-08-12T21:06:48
2018-08-12T21:06:48
140,614,155
0
0
null
null
null
null
UTF-8
Java
false
false
886
java
package iterators_and_comparatotrs.exercises.p08_Pet_clinics.implementations; import static iterators_and_comparatotrs.exercises.p08_Pet_clinics.Validations.*; public class Pet { private String name; private int age; private String kind; public Pet(String name, int age, String kidn) throws IllegalAccessException { this.setName(name); this.setAge(age); this.setKind(kind); } private void setName(String name) throws IllegalAccessException { if (isValid(name)) { this.name = name; } else { throw new IllegalAccessException(); } } private void setAge(int age) throws IllegalAccessException { if (isValidAge(age)) { this.age = age; } else { throw new IllegalAccessException(); } } private void setKind(String kind) throws IllegalAccessException { if (isValid(kind)) { this.kind = kind; } else { throw new IllegalAccessException(); } } }
[ "georgipopov88@gmail.com" ]
georgipopov88@gmail.com
333537ae3bb254a6764704cef5765a88bfd2759c
87f420a0e7b23aefe65623ceeaa0021fb0c40c56
/pig/pig-visual/pig-xxl-job-admin/src/main/java/com/xxl/job/admin/controller/resolver/WebExceptionResolver.java
9e353a939b46013c0127589ef0aaf0295d9a8eb4
[ "Apache-2.0" ]
permissive
xioxu-web/xioxu-web
0361a292b675d8209578d99451598bf4a56f9b08
7fe3f9539e3679e1de9f5f614f3f9b7f41a28491
refs/heads/master
2023-05-05T01:59:43.228816
2023-04-28T07:44:58
2023-04-28T07:44:58
367,005,744
0
0
null
null
null
null
UTF-8
Java
false
false
2,003
java
package com.xxl.job.admin.controller.resolver; import com.xxl.job.admin.core.exception.XxlJobException; import com.xxl.job.admin.core.util.JacksonUtil; import com.xxl.job.core.biz.model.ReturnT; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.HandlerExceptionResolver; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * common exception resolver * * @author xuxueli 2016-1-6 19:22:18 */ @Component public class WebExceptionResolver implements HandlerExceptionResolver { private static transient Logger logger = LoggerFactory.getLogger(WebExceptionResolver.class); @Override public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { if (!(ex instanceof XxlJobException)) { logger.error("WebExceptionResolver:{}", ex); } // if json boolean isJson = false; if (handler instanceof HandlerMethod) { HandlerMethod method = (HandlerMethod) handler; ResponseBody responseBody = method.getMethodAnnotation(ResponseBody.class); if (responseBody != null) { isJson = true; } } // error result ReturnT<String> errorResult = new ReturnT<String>(ReturnT.FAIL_CODE, ex.toString().replaceAll("\n", "<br/>")); // response ModelAndView mv = new ModelAndView(); if (isJson) { try { response.setContentType("application/json;charset=utf-8"); response.getWriter().print(JacksonUtil.writeValueAsString(errorResult)); } catch (IOException e) { logger.error(e.getMessage(), e); } return mv; } else { mv.addObject("exceptionMsg", errorResult.getMsg()); mv.setViewName("/common/common.exception"); return mv; } } }
[ "xb01049438@alibaba-inc.com" ]
xb01049438@alibaba-inc.com
26ece8fd74e5f707badadc6cb7f35b1e92db662e
a9bf2a90a894af4a9b77a9cb3380b24494c6392a
/src/test/java/org/assertj/core/api/bytearray/ByteArrayAssert_containsOnly_with_Integer_Arguments_Test.java
56dc84dc58975f445920f98826a3865d13d4e3a7
[ "Apache-2.0" ]
permissive
andyRokit/assertj-core
cc0e2fb50e43b2c752e3cb94af4513175b68e779
4d7dffe1a4f940952e5024a98686b6004f5184dc
refs/heads/master
2020-03-23T12:36:07.003905
2018-07-20T08:08:58
2018-07-20T08:08:58
141,569,523
0
0
null
null
null
null
UTF-8
Java
false
false
1,492
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. * * Copyright 2012-2018 the original author or authors. */ package org.assertj.core.api.bytearray; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.test.IntArrays.arrayOf; import static org.mockito.Mockito.verify; import org.assertj.core.api.ByteArrayAssert; import org.assertj.core.api.ByteArrayAssertBaseTest; import org.junit.Test; /** * Tests for <code>{@link ByteArrayAssert#containsOnly(int...)}</code>. */ public class ByteArrayAssert_containsOnly_with_Integer_Arguments_Test extends ByteArrayAssertBaseTest { @Test public void invoke_api_like_user() { assertThat(new byte[] { 1, 2, 3 }).containsOnly(3, 2, 1); } @Override protected ByteArrayAssert invoke_api_method() { return assertions.containsOnly(6, 8); } @Override protected void verify_internal_effects() { verify(arrays).assertContainsOnly(getInfo(assertions), getActual(assertions), arrayOf(6, 8)); } }
[ "joel.costigliola@gmail.com" ]
joel.costigliola@gmail.com
36fed18aa84f4719dbc332b5b007a2977cc6eac7
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/93/1061.java
b2673e90a009ecf07b2638d9c60afd55e3c98035
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
596
java
package <missing>; public class GlobalMembers { public static int Main() { int n; int n0; int flag = 0; n = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); n0 = n; if (n % 3 == 0) { n /= 3; System.out.print("3"); flag = 1; } if (n % 5 == 0) { if (n != n0) { System.out.print(" "); } n /= 5; System.out.print(5); flag = 1; } if (n % 7 == 0) { if (n != n0) { System.out.print(" "); } n /= 7; System.out.print(7); flag = 1; } if (flag == 0) { System.out.print('n'); } System.out.print("\n"); return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
a095a489ed958bf08ab7a31b6a61a8d35003ea31
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
/database/src/main/java/adila/db/hummer55fct_tcl20p618l.java
cd4570ba8733888fda72b932f560709a17c95ebe
[ "MIT" ]
permissive
karim/adila
8b0b6ba56d83f3f29f6354a2964377e6197761c4
00f262f6d5352b9d535ae54a2023e4a807449faa
refs/heads/master
2021-01-18T22:52:51.508129
2016-11-13T13:08:04
2016-11-13T13:08:04
45,054,909
3
1
null
null
null
null
UTF-8
Java
false
false
233
java
// This file is automatically generated. package adila.db; /* * Alcatel TCL P618L * * DEVICE: HUMMER5_CT * MODEL: TCL P618L */ final class hummer55fct_tcl20p618l { public static final String DATA = "Alcatel|TCL P618L|"; }
[ "keldeeb@gmail.com" ]
keldeeb@gmail.com
3640c4da3b32fff5dc77159005fcf3976d9ddfb5
75c8d4d130bb8588313344d15f9e33b15e813791
/java/l2server/gameserver/stats/funcs/FuncTemplate.java
c752d4a9a7f5c4b6713c7bc673edc54b2d8c07ff
[]
no_license
Hl4p3x/L2T_Server
2fd6a94f388679100115a4fb5928a8e7630656f7
66134d76aa22f90933af9119c7b198c4960283d3
refs/heads/master
2022-09-11T05:59:46.310447
2022-08-17T19:54:58
2022-08-17T19:54:58
126,422,985
2
2
null
2022-08-17T19:55:00
2018-03-23T02:38:43
Java
UTF-8
Java
false
false
2,196
java
/* * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later * version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program. If not, see <http://www.gnu.org/licenses/>. */ package l2server.gameserver.stats.funcs; import l2server.gameserver.stats.Stats; import l2server.gameserver.stats.conditions.Condition; import l2server.log.Log; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.logging.Level; /** * @author mkizub */ public final class FuncTemplate { public Condition applayCond; public final Class<?> func; public final Constructor<?> constructor; public final Stats stat; public final Lambda lambda; public FuncTemplate(Condition pApplayCond, String pFunc, Stats pStat, Lambda pLambda) { applayCond = pApplayCond; stat = pStat; lambda = pLambda; try { func = Class.forName("l2server.gameserver.stats.funcs.Func" + pFunc); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } try { constructor = func.getConstructor(Stats.class, // stats to update Object.class, // owner Lambda.class // value for function ); } catch (NoSuchMethodException e) { throw new RuntimeException(e); } } public Func getFunc(Object owner) { try { Func f = (Func) constructor.newInstance(stat, owner, lambda); if (applayCond != null) { f.setCondition(applayCond); } return f; } catch (IllegalAccessException e) { Log.log(Level.WARNING, "", e); return null; } catch (InstantiationException e) { Log.log(Level.WARNING, "", e); return null; } catch (InvocationTargetException e) { Log.log(Level.WARNING, "", e); return null; } } }
[ "pere@pcasafont.net" ]
pere@pcasafont.net
a4861a330cd4cb9fba253a42a25b23831fcf86a7
639e4685bf1bc6b91eabe00a209e91bdeeb8b14e
/jsf-validwholebean/src/main/java/com/hantsylabs/example/ee8/jsf/PasswordHolder.java
c02a74a2492334d3b0a02e186ae14383a53e8cb5
[ "Apache-2.0" ]
permissive
buddhini81/ee8-sandbox
6da48d1fb0dd9766cfa22d66c3504f21d1e39a77
60f68cb76d9d441a9600bc48b13c7e2e31f1b591
refs/heads/master
2022-04-04T22:46:44.569789
2020-01-20T14:15:30
2020-01-20T14:15:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
355
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.hantsylabs.example.ee8.jsf; /** * * @author hantsy */ public interface PasswordHolder { String getPassword1(); String getPassword2(); }
[ "hantsy@gmail.com" ]
hantsy@gmail.com