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
beff7599a826f3df50d7ad65819f32fb805745fd
435016c5e2d4cfbfe9f939db725aab59dd8b9240
/java-basic/src/main/java/ch30/g/X.java
134d64f2eb21b90c83af528c91797605a7f8154f
[]
no_license
kmincheol/bitcamp-java-2018-12
59b3c5709b1aa905035a390d553002547243a13a
32b2df6e295412207a27bfc57069e9069f85a0a4
refs/heads/master
2021-08-06T22:04:08.819338
2019-06-12T02:16:22
2019-06-12T02:16:22
163,650,686
1
1
null
2020-04-30T03:50:33
2018-12-31T08:00:45
Java
UTF-8
Java
false
false
463
java
package ch30.g; import org.springframework.stereotype.Component; @Component public class X { public int calculate(int i, int j, String op) { System.out.println("X.calculate()"); switch (op) { case "+": return i + j; case "-": return i - j; case "*": return i * j; case "/": return i / j; default: throw new RuntimeException("지원하지 않는 연산자입니다."); } } }
[ "mincheol.kmc@gmail.com" ]
mincheol.kmc@gmail.com
4f895eaa3d19e7afb83e14305b2e95a2492666ff
1b0388a68f79739f849ab95eaa06df44801f4ae0
/projectlibre_core/src/com/projectlibre/pm/calendar/WorkCalendarException.java
d279c3ce7fe4a04eb05dddd2eeb3c31e01d51c51
[]
no_license
jraselin/projectlibre
c3b76335c843d4fc45996e903a86e405a90f6be1
4f73f9af0d5b92b725efae5cb101135f264f4e99
refs/heads/master
2023-02-24T16:53:53.345244
2021-01-27T22:10:49
2021-01-27T22:10:49
331,617,993
0
0
null
null
null
null
UTF-8
Java
false
false
4,623
java
/******************************************************************************* * The contents of this file are subject to the Common Public Attribution License * Version 1.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.projectlibre.com/license . The License is based on the Mozilla Public * License Version 1.1 but Sections 14 and 15 have been added to cover use of * software over a computer network and provide for limited attribution for the * Original Developer. In addition, Exhibit A has been modified to be consistent * with Exhibit B. * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the * specific language governing rights and limitations under the License. The * Original Code is ProjectLibre. The Original Developer is the Initial Developer * and is ProjectLibre Inc. All portions of the code written by ProjectLibre are * Copyright (c) 2012-2019. All Rights Reserved. All portions of the code written by * ProjectLibre are Copyright (c) 2012-2019. All Rights Reserved. Contributor * ProjectLibre, Inc. * * Alternatively, the contents of this file may be used under the terms of the * ProjectLibre End-User License Agreement (the ProjectLibre License) in which case * the provisions of the ProjectLibre License are applicable instead of those above. * If you wish to allow use of your version of this file only under the terms of the * ProjectLibre License and not to allow others to use your version of this file * under the CPAL, indicate your decision by deleting the provisions above and * replace them with the notice and other provisions required by the ProjectLibre * License. If you do not delete the provisions above, a recipient may use your * version of this file under either the CPAL or the ProjectLibre Licenses. * * * [NOTE: The text of this Exhibit A may differ slightly from the text of the notices * in the Source Code files of the Original Code. You should use the text of this * Exhibit A rather than the text found in the Original Code Source Code for Your * Modifications.] * * EXHIBIT B. Attribution Information for ProjectLibre required * * Attribution Copyright Notice: Copyright (c) 2012-2019, ProjectLibre, Inc. * Attribution Phrase (not exceeding 10 words): * ProjectLibre, open source project management software. * Attribution URL: http://www.projectlibre.com * Graphic Image as provided in the Covered Code as file: projectlibre-logo.png with * alternatives listed on http://www.projectlibre.com/logo * * Display of Attribution Information is required in Larger Works which are defined * in the CPAL as a work which combines Covered Code or portions thereof with code * not governed by the terms of the CPAL. However, in addition to the other notice * obligations, all copies of the Covered Code in Executable and Source Code form * distributed must, as a form of attribution of the original author, include on * each user interface screen the "ProjectLibre" logo visible to all users. * The ProjectLibre logo should be located horizontally aligned with the menu bar * and left justified on the top left of the screen adjacent to the File menu. The * logo must be at least 144 x 31 pixels. When users click on the "ProjectLibre" * logo it must direct them back to http://www.projectlibre.com. *******************************************************************************/ package com.projectlibre.pm.calendar; /** * @author Laurent Chretienneau * */ public class WorkCalendarException extends WorkRange{ protected long start, end; public WorkCalendarException() { super(); // TODO Auto-generated constructor stub } public WorkCalendarException(DayType type) { super(type); // TODO Auto-generated constructor stub } public long getStart() { return start; } public void setStart(long start) { this.start = start; } public long getEnd() { return end; } public void setEnd(long end) { this.end = end; } @Override public String toString(String tab){ StringBuffer s=new StringBuffer(); s.append(tab).append("WorkCalendarException #").append(hashCode()).append('\n'); s.append(tab).append('\t').append("end=").append(start).append('\n'); s.append(tab).append('\t').append("end=").append(start).append('\n'); s.append(super.toString(tab)); return s.toString(); } @Override public String toString(){ return toString(""); } }
[ "jraselin@gmail.com" ]
jraselin@gmail.com
eb92fbf01c2e5e23cbaf9c679bd9b955a6b518af
31bc8fa48f371ae1ae8f3bf92c1f14d7ecdd8fbd
/src/pohaci/gumunda/titis/accounting/logic/BeginningSalesAdvanceLogic.java
1ae95d2613e12fc8a0211312b595bb7ecf5aa2c9
[]
no_license
rukutuk/logicerp
6398fa9bfd80177d4bfdd186cc404cdd02a4d36f
f34f7cbefaf78655a2d4819d9261905e3cb795b1
refs/heads/master
2021-01-15T13:00:03.612993
2013-10-28T10:25:19
2013-10-28T10:25:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,786
java
/** * */ package pohaci.gumunda.titis.accounting.logic; import java.sql.Connection; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import pohaci.gumunda.titis.accounting.beginningbalance.BeginningAccountReceivable; import pohaci.gumunda.titis.accounting.cgui.BaseCurrency; import pohaci.gumunda.titis.accounting.cgui.Currency; import pohaci.gumunda.titis.accounting.cgui.IConstants; import pohaci.gumunda.titis.accounting.cgui.Transaction; import pohaci.gumunda.titis.accounting.dbapi.IDBConstants; import pohaci.gumunda.titis.accounting.entity.SalesInvoice; import pohaci.gumunda.titis.accounting.entity.VariableAccountSetting; import pohaci.gumunda.titis.application.db.GenericMapper; import pohaci.gumunda.titis.application.db.MasterMap; import pohaci.gumunda.titis.project.cgui.ProjectData; /** * @author dark-knight * */ public class BeginningSalesAdvanceLogic extends BeginningBalanceBusinessLogic { Currency baseCurrency = null; ProjectData project = null; public void setProject(ProjectData project) { this.project = project; } public BeginningSalesAdvanceLogic(Connection connection, long sessionId) { super(connection, sessionId); baseCurrency = BaseCurrency.createBaseCurrency(connection, sessionId); baseCurrency.setIsBase(true); entityMapper = MasterMap .obtainMapperFor(BeginningAccountReceivable.class); entityMapper.setActiveConn(connection); } public List getOutstanding() { // specific account - hanya untuk sales advance VariableAccountSetting vas = VariableAccountSetting .createVariableAccountSetting(this.connection, this.sessionId, IConstants.ATTR_VARS_SALES_ADVANCE); List resultList = new ArrayList(); if (project==null) return resultList; List list = entityMapper.doSelectWhere("account=" + vas.getAccount().getIndex() + " and project=" + project.getIndex()); Iterator iterator = list.iterator(); while (iterator.hasNext()) { BeginningAccountReceivable bb = (BeginningAccountReceivable) iterator .next(); System.err.println(bb.getProject().getUnit().getDescription()); Transaction trans = findTransaction(bb.getProject().getUnit()); if (trans != null) { bb.setTrans(trans); bb.showReferenceNo(true); if (isOutstanding(bb)) { resultList.add(bb); } } } return resultList; } public boolean isOutstanding(BeginningAccountReceivable bb) { GenericMapper invoiceMapper = MasterMap.obtainMapperFor(SalesInvoice.class); invoiceMapper.setActiveConn(this.connection); String selectionClausa = IDBConstants.ATTR_BEGINNING_BALANCE + "=" + bb.getIndex() + " AND STATUS=3"; List invoiceList = invoiceMapper.doSelectWhere(selectionClausa); if(invoiceList.size()==0) return true; return false; } }
[ "lee.nungky@gmail.com" ]
lee.nungky@gmail.com
1f27bab5058bae285d08848ce7093299da9e6698
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MATH-31b-4-17-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/math3/special/Beta_ESTest_scaffolding.java
06620cda039fdf8d10b9e3069c54c0a75a02f73a
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
441
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Jan 20 13:50:17 UTC 2020 */ package org.apache.commons.math3.special; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class Beta_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
eb0a2b4086b47c06a10963c2ac6348e2d84c585d
bc11772bc7868325839cf0ebef0f2149cd16ca64
/Java项目开发实践/05_fangsoft_testcenter_mvc/src/org/fangsoft/testcenter/controller/TestCenterController.java
76ea9a77a559cc60e33744044682a60092b4bc05
[]
no_license
MouseZhang/Java-Code-Notebook
e5f6a5f2c6ac5fdcdcc24fe2a833858d15f24bd8
f8bc3df137400db088f0d56235005da2bfcf39cc
refs/heads/master
2020-05-26T09:34:56.473964
2019-06-08T15:01:34
2019-06-08T15:01:34
188,187,823
0
0
null
null
null
null
UTF-8
Java
false
false
2,958
java
package org.fangsoft.testcenter.controller; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.fangsoft.testcenter.dao.DaoFactory; import org.fangsoft.testcenter.model.Customer; import org.fangsoft.testcenter.model.Question; import org.fangsoft.testcenter.model.QuestionResult; import org.fangsoft.testcenter.model.Test; import org.fangsoft.testcenter.model.TestResult; public class TestCenterController implements ITestCenterController { private DaoFactory daoFactory; private Customer customer; private TestResult testResult; private long testDeadTime;//考试结束时间 private int index;//试题出现序号 public TestCenterController() {} public DaoFactory getDaoFactory() { return daoFactory; } public void setDaoFactory(DaoFactory daoFactory) { this.daoFactory = daoFactory; } public Customer getCustomer() { return customer; } public void setCustomer(Customer customer) { this.customer = customer; } public TestResult getTestResult() { return testResult; } public void setTestResult(TestResult testResult) { this.testResult = testResult; } public long getTestDeadTime() { return testDeadTime; } public void setTestDeadTime(long testDeadTime) { this.testDeadTime = testDeadTime; } public int getIndex() { return index; } public void setIndex(int index) { this.index = index; }; private Test loadQuestion(Test test) { this.getDaoFactory().getQuestionDao().loadQuestion(test); return test; } public boolean isTestTimeout() { return (System.currentTimeMillis() - this.getTestDeadTime() > 0); } public void handleTimeOut() { } @Override public Customer login(String userId, String password) { return this.getDaoFactory().getCustomerDao().login(userId, password); } @Override public List<String> findAllTestNames() { return this.getDaoFactory().getTestDao().findAllTestNames(); } @Override public Test selectTest(String testName) { return this.getDaoFactory().getTestDao().findTestByName(testName); } @Override public TestResult startTest(Test test, Customer customer) { Test loadedTest = this.loadQuestion(test); TestResult testResult = new TestResult(); testResult.setCustomer(customer); testResult.setTest(loadedTest); testResult.setStartTime(new Date()); long testDeadTime = testResult.getStartTime().getTime() + loadedTest.getTimeLimitMin() * 1000 * 60; this.setTestDeadTime(testDeadTime); testResult.setStatus(TestResult.Status.TESTING); testResult.setQuestionResult( new ArrayList<QuestionResult>(loadedTest.getQuestion().size())); for (Question q: loadedTest.getQuestion()) { QuestionResult qr = new QuestionResult(); qr.setQuestion(q); testResult.getQuestionResult().add(qr); } return testResult; } @Override public void commitTest(TestResult testResult) { testResult.setEndTime(new Date()); testResult.commitTest(); this.getDaoFactory().getTestResultDao().save(testResult); } }
[ "athope@163.com" ]
athope@163.com
066ef78d4e7ca4714d8102eaf9cd774b70ed9937
0cf378b7320592a952d5343a81b8a67275ab5fab
/webprotege-shared/src/main/java/edu/stanford/bmir/protege/web/shared/obo/SetOboTermIdResult.java
a9ccaf623b4a028418f5380c08ea6f08e5032293
[ "BSD-2-Clause" ]
permissive
curtys/webprotege-attestation
945de9f6c96ca84b7022a60f4bec4886c81ab4f3
3aa909b4a8733966e81f236c47d6b2e25220d638
refs/heads/master
2023-04-11T04:41:16.601854
2023-03-20T12:18:44
2023-03-20T12:18:44
297,962,627
0
0
MIT
2021-08-24T08:43:21
2020-09-23T12:28:24
Java
UTF-8
Java
false
false
306
java
package edu.stanford.bmir.protege.web.shared.obo; import edu.stanford.bmir.protege.web.shared.dispatch.Result; /** * Matthew Horridge * Stanford Center for Biomedical Informatics Research * 22 Jun 2017 */ public class SetOboTermIdResult implements Result { public SetOboTermIdResult() { } }
[ "matthew.horridge@stanford.edu" ]
matthew.horridge@stanford.edu
c6f45f8b7134927e2000d6438493da8b0545c2e0
e6513b3665e005f1ebd9bf040a553f26000e47c9
/parkClientServer/src/main/java/com/starnetsecurity/parkClientServer/service/impl/CarRoadInfoServiceImpl.java
622e608f28f4534c5d8859b8e84bb4b8609be6ca
[]
no_license
wwwK/PMS-VEHICLE
4be0d750f5cff48c684abd0f2d1e02c3cd1b1c36
b1231abfb95cd5d759c472a27943b867d4b48832
refs/heads/master
2023-07-15T09:55:53.560357
2020-05-09T02:02:38
2020-05-09T02:02:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,235
java
package com.starnetsecurity.parkClientServer.service.impl; import com.starnetsecurity.common.dao.HibernateBaseDao; import com.starnetsecurity.parkClientServer.entity.InOutCarRoadInfo; import com.starnetsecurity.parkClientServer.service.CarRoadInfoService; import org.apache.commons.collections.map.HashedMap; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Created by 宏炜 on 2018-01-09. */ @Service public class CarRoadInfoServiceImpl implements CarRoadInfoService { @Autowired HibernateBaseDao baseDao; @Override public List getCarRoadSelect() { String hql = "from InOutCarRoadInfo where useMark >= 0"; List<InOutCarRoadInfo> inOutCarRoadInfos = (List<InOutCarRoadInfo>)baseDao.queryForList(hql); List<Map> list = new ArrayList<>(); for(InOutCarRoadInfo inOutCarRoadInfo : inOutCarRoadInfos){ Map params = new HashedMap(); params.put("id",inOutCarRoadInfo.getCarRoadId()); params.put("name",inOutCarRoadInfo.getCarRoadName()); list.add(params); } return list; } }
[ "chenbinbin.af@star-net.cn" ]
chenbinbin.af@star-net.cn
062072dfc517c7246e8e2e678ba356ec71d0db77
a371233c67af6d66ca35936b506de8f0dbf30321
/facebody-20191230/java/src/main/java/com/aliyun/facebody20191230/models/ExtractPedestrianFeatureAttrResponse.java
0caff32a47ce91ebef739176fa2b642dace7f672
[ "Apache-2.0" ]
permissive
xieyuxiang-1104/alibabacloud-sdk
b1433b8cf12a49487003297f3d35d3125d1aa195
488841bedaab450459b84060fbb2bab7aa262e0b
refs/heads/master
2023-01-19T09:07:46.284560
2020-12-03T07:07:28
2020-12-03T07:07:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,917
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.facebody20191230.models; import com.aliyun.tea.*; public class ExtractPedestrianFeatureAttrResponse extends TeaModel { @NameInMap("RequestId") @Validation(required = true) public String requestId; @NameInMap("Data") @Validation(required = true) public ExtractPedestrianFeatureAttrResponseData data; public static ExtractPedestrianFeatureAttrResponse build(java.util.Map<String, ?> map) throws Exception { ExtractPedestrianFeatureAttrResponse self = new ExtractPedestrianFeatureAttrResponse(); return TeaModel.build(map, self); } public ExtractPedestrianFeatureAttrResponse setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public ExtractPedestrianFeatureAttrResponse setData(ExtractPedestrianFeatureAttrResponseData data) { this.data = data; return this; } public ExtractPedestrianFeatureAttrResponseData getData() { return this.data; } public static class ExtractPedestrianFeatureAttrResponseData extends TeaModel { @NameInMap("ObjType") @Validation(required = true) public String objType; @NameInMap("ObjTypeScore") @Validation(required = true) public Float objTypeScore; @NameInMap("Feature") @Validation(required = true) public String feature; @NameInMap("QualityScore") @Validation(required = true) public Float qualityScore; @NameInMap("UpperColor") @Validation(required = true) public String upperColor; @NameInMap("UpperColorScore") @Validation(required = true) public Float upperColorScore; @NameInMap("UpperType") @Validation(required = true) public String upperType; @NameInMap("UpperTypeScore") @Validation(required = true) public Float upperTypeScore; @NameInMap("LowerColor") @Validation(required = true) public String lowerColor; @NameInMap("LowerColorScore") @Validation(required = true) public Float lowerColorScore; @NameInMap("LowerType") @Validation(required = true) public String lowerType; @NameInMap("LowerTypeScore") @Validation(required = true) public Float lowerTypeScore; @NameInMap("Gender") @Validation(required = true) public String gender; @NameInMap("GenderScore") @Validation(required = true) public Float genderScore; @NameInMap("Hair") @Validation(required = true) public String hair; @NameInMap("HairScore") @Validation(required = true) public Float hairScore; @NameInMap("Age") @Validation(required = true) public String age; @NameInMap("AgeScore") @Validation(required = true) public Float ageScore; public static ExtractPedestrianFeatureAttrResponseData build(java.util.Map<String, ?> map) throws Exception { ExtractPedestrianFeatureAttrResponseData self = new ExtractPedestrianFeatureAttrResponseData(); return TeaModel.build(map, self); } public ExtractPedestrianFeatureAttrResponseData setObjType(String objType) { this.objType = objType; return this; } public String getObjType() { return this.objType; } public ExtractPedestrianFeatureAttrResponseData setObjTypeScore(Float objTypeScore) { this.objTypeScore = objTypeScore; return this; } public Float getObjTypeScore() { return this.objTypeScore; } public ExtractPedestrianFeatureAttrResponseData setFeature(String feature) { this.feature = feature; return this; } public String getFeature() { return this.feature; } public ExtractPedestrianFeatureAttrResponseData setQualityScore(Float qualityScore) { this.qualityScore = qualityScore; return this; } public Float getQualityScore() { return this.qualityScore; } public ExtractPedestrianFeatureAttrResponseData setUpperColor(String upperColor) { this.upperColor = upperColor; return this; } public String getUpperColor() { return this.upperColor; } public ExtractPedestrianFeatureAttrResponseData setUpperColorScore(Float upperColorScore) { this.upperColorScore = upperColorScore; return this; } public Float getUpperColorScore() { return this.upperColorScore; } public ExtractPedestrianFeatureAttrResponseData setUpperType(String upperType) { this.upperType = upperType; return this; } public String getUpperType() { return this.upperType; } public ExtractPedestrianFeatureAttrResponseData setUpperTypeScore(Float upperTypeScore) { this.upperTypeScore = upperTypeScore; return this; } public Float getUpperTypeScore() { return this.upperTypeScore; } public ExtractPedestrianFeatureAttrResponseData setLowerColor(String lowerColor) { this.lowerColor = lowerColor; return this; } public String getLowerColor() { return this.lowerColor; } public ExtractPedestrianFeatureAttrResponseData setLowerColorScore(Float lowerColorScore) { this.lowerColorScore = lowerColorScore; return this; } public Float getLowerColorScore() { return this.lowerColorScore; } public ExtractPedestrianFeatureAttrResponseData setLowerType(String lowerType) { this.lowerType = lowerType; return this; } public String getLowerType() { return this.lowerType; } public ExtractPedestrianFeatureAttrResponseData setLowerTypeScore(Float lowerTypeScore) { this.lowerTypeScore = lowerTypeScore; return this; } public Float getLowerTypeScore() { return this.lowerTypeScore; } public ExtractPedestrianFeatureAttrResponseData setGender(String gender) { this.gender = gender; return this; } public String getGender() { return this.gender; } public ExtractPedestrianFeatureAttrResponseData setGenderScore(Float genderScore) { this.genderScore = genderScore; return this; } public Float getGenderScore() { return this.genderScore; } public ExtractPedestrianFeatureAttrResponseData setHair(String hair) { this.hair = hair; return this; } public String getHair() { return this.hair; } public ExtractPedestrianFeatureAttrResponseData setHairScore(Float hairScore) { this.hairScore = hairScore; return this; } public Float getHairScore() { return this.hairScore; } public ExtractPedestrianFeatureAttrResponseData setAge(String age) { this.age = age; return this; } public String getAge() { return this.age; } public ExtractPedestrianFeatureAttrResponseData setAgeScore(Float ageScore) { this.ageScore = ageScore; return this; } public Float getAgeScore() { return this.ageScore; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
43bb112aaa9d61e374babde64e305f14d8886442
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/xetorthio--jedis/6701b07904357dd759a11209ce98b71bd398b0fd/after/JedisPoolAbstract.java
b13b1149517c779c3856e8606e5fa67b419987f8
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
624
java
package redis.clients.jedis; import org.apache.commons.pool2.PooledObjectFactory; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; import redis.clients.util.Pool; public class JedisPoolAbstract extends Pool<Jedis> { public JedisPoolAbstract() { super(); } public JedisPoolAbstract(GenericObjectPoolConfig poolConfig, PooledObjectFactory<Jedis> factory) { super(poolConfig, factory); } @Override protected void returnBrokenResource(Jedis resource) { super.returnBrokenResource(resource); } @Override protected void returnResource(Jedis resource) { super.returnResource(resource); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
c0371a765327b1e002292620332103b3172adbcd
3d410d516f0167eb31562fb63c54fbdb8d91adc0
/src/main/java/cn/qs/exceptionHandler/AjaxExceptionHandler.java
ddb9d3939204a736a55cf2cac87bff951df94ef8
[]
no_license
qiao-zhi/bs-tourism2
2e12705ad9d3a3e1c009f80f91557e9879e23c9b
aa07ba66ea21026838fa61b5af53ccabcd6fb6ab
refs/heads/master
2020-05-07T08:24:40.014456
2019-04-12T05:33:29
2019-04-12T05:33:29
180,326,279
9
7
null
null
null
null
UTF-8
Java
false
false
398
java
package cn.qs.exceptionHandler; import javax.servlet.http.HttpServletRequest; import cn.qs.utils.JSONResultUtil; //@RestControllerAdvice public class AjaxExceptionHandler { // @ExceptionHandler(value = Exception.class) public JSONResultUtil defaultErrorHandler(HttpServletRequest req, Exception e) throws Exception { e.printStackTrace(); return JSONResultUtil.error(e.getMessage()); } }
[ "qiao_liqiang@163.com" ]
qiao_liqiang@163.com
2743dec86fdac31fe36f64a460322a797ea8b578
cbdd81e6b9cf00859ce7169df36cf566417e4c8b
/1.JavaSyntax/src/com/javarush/task/task09/task0906/Solution.java
30b79d94054e1a42b2e412f31bdbaf99b1acc4b0
[]
no_license
id2k1149/JavaRushTasks
3f13cd5d37977e38e8933e581f17fd48597f90d8
450a432649aa20608e6e9a46ada35123056480cf
refs/heads/master
2023-03-31T21:03:06.944109
2021-03-19T00:58:45
2021-03-19T00:58:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,162
java
package com.javarush.task.task09.task0906; /* Логирование стек-трейса */ public class Solution { public static void main(String[] args) { log("In main method"); } public static void log(String text) { //напишите тут ваш код System.out.println(Thread.currentThread().getStackTrace()[2].getClassName() + ": " + Thread.currentThread().getStackTrace()[2].getMethodName() + ": " + text); // System.out.println(Thread.currentThread().getStackTrace()[2].getClassName() // + ": " // + Thread.currentThread().getName() // + ": " // + text); // JavaRush StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); StackTraceElement element = stackTraceElements[2]; String className = element.getClassName(); String methodName = element.getMethodName(); String message = className + ": " + methodName + ": " + text; System.out.println(message); } }
[ "id2k1149@gmail.com" ]
id2k1149@gmail.com
455c82ba4efdb636b67e7866e5c0d9f28adda309
0ca9a0873d99f0d69b78ed20292180f513a20d22
/saved/sources/com/google/android/gms/common/util/zzc.java
804d5b034b8a6d7479829cf8cc34ed1201d1d43f
[]
no_license
Eliminater74/com.google.android.tvlauncher
44361fbbba097777b99d7eddd6e03d4bbe5f4d60
e8284f9970d77a05042a57e9c2173856af7c4246
refs/heads/master
2021-01-14T23:34:04.338366
2020-02-24T16:39:53
2020-02-24T16:39:53
242,788,539
1
0
null
null
null
null
UTF-8
Java
false
false
676
java
package com.google.android.gms.common.util; import android.util.Base64; import com.google.android.gms.common.internal.Hide; @Hide /* compiled from: Base64Utils */ public final class zzc { public static String zza(byte[] bArr) { if (bArr == null) { return null; } return Base64.encodeToString(bArr, 0); } public static String zzb(byte[] bArr) { if (bArr == null) { return null; } return Base64.encodeToString(bArr, 10); } public static String zzc(byte[] bArr) { if (bArr == null) { return null; } return Base64.encodeToString(bArr, 11); } }
[ "eliminater74@gmail.com" ]
eliminater74@gmail.com
218bf6b4624eccb96ae88b83f38c9613bbc3e12a
8707563038250a6acd3d2c46cc494506cc525a77
/src/main/java/com/jiotrasportinc/tms/repository/OwnerOperatorRepository.java
593c0b6888f313dc5ab4460dc4cc18c7adc957b1
[]
no_license
harjeet-me/JIOINC
a383ed60f9ce6c4b846935ca9bb78129cc059d08
d0f9107d86b3098dfcf07e8c897865fe36de6d96
refs/heads/master
2022-12-26T23:18:26.955403
2019-11-22T06:01:33
2019-11-22T06:01:33
223,114,565
0
0
null
2022-12-16T04:41:55
2019-11-21T07:31:24
Java
UTF-8
Java
false
false
391
java
package com.jiotrasportinc.tms.repository; import com.jiotrasportinc.tms.domain.OwnerOperator; import org.springframework.data.jpa.repository.*; import org.springframework.stereotype.Repository; /** * Spring Data repository for the OwnerOperator entity. */ @SuppressWarnings("unused") @Repository public interface OwnerOperatorRepository extends JpaRepository<OwnerOperator, Long> { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
c4ccd796353f5e860ab398c4372c07d94c358fd0
2a28817947caa985fa62f670069864c75d161e77
/src/main/java/net/thegaminghuskymc/gadgetmod/item/ItemiPhone.java
5df10d9065a8ca69cc5f1dcdbe303b2d2cdef34b
[ "MIT" ]
permissive
kingdevnl/HuskysGadgetMod
88d10ef83462c7617b21552fe3673c535ede48d8
9fe1a3b0c849649a4f49397031c9883232bcbc69
refs/heads/master
2021-09-01T00:26:54.125764
2017-12-23T20:45:48
2017-12-23T20:45:48
115,220,535
0
0
null
2017-12-23T20:39:03
2017-12-23T20:37:33
Java
UTF-8
Java
false
false
413
java
package net.thegaminghuskymc.gadgetmod.item; import net.minecraft.item.Item; import net.thegaminghuskymc.gadgetmod.HuskyGadgetMod; import net.thegaminghuskymc.gadgetmod.Reference; public class ItemiPhone extends Item { public ItemiPhone() { this.setUnlocalizedName("iPhone"); this.setRegistryName(Reference.MOD_ID,"iphone"); this.setCreativeTab(HuskyGadgetMod.deviceItems); } }
[ "sindrefagerheim53@gmail.com" ]
sindrefagerheim53@gmail.com
dc53866d448d54679fb7ecb2c688dec084b3581a
64e61f5a5082fb0cb0b2c3fbf738382519802e50
/org.eclipse.acme.action.language.tests/src/action_base/tests/UpdateGIDTest.java
779d18bd8d62c18d8c63a71a2d1f3457c622e069
[]
no_license
wrwei/OMG-specification-implementations
f33e37a0d2a2609d4c0db851d185773aaac950bc
40001210089c773432ff0b074035dffbc06add60
refs/heads/master
2020-04-28T16:35:07.148838
2019-03-15T07:58:04
2019-03-15T07:58:04
175,416,471
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
/** */ package action_base.tests; import action_base.Action_baseFactory; import action_base.UpdateGID; import junit.textui.TestRunner; /** * <!-- begin-user-doc --> * A test case for the model object '<em><b>Update GID</b></em>'. * <!-- end-user-doc --> * @generated */ public class UpdateGIDTest extends UpdateTest { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static void main(String[] args) { TestRunner.run(UpdateGIDTest.class); } /** * Constructs a new Update GID test case with the given name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public UpdateGIDTest(String name) { super(name); } /** * Returns the fixture for this Update GID test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected UpdateGID getFixture() { return (UpdateGID)fixture; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see junit.framework.TestCase#setUp() * @generated */ @Override protected void setUp() throws Exception { setFixture(Action_baseFactory.eINSTANCE.createUpdateGID()); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see junit.framework.TestCase#tearDown() * @generated */ @Override protected void tearDown() throws Exception { setFixture(null); } } //UpdateGIDTest
[ "ran.wei@york.ac.uk" ]
ran.wei@york.ac.uk
c56b943e6bf45fb3a33c52cc22ef9b038c5a7ce9
ad0cf1b036fc978af32b49e3bcd8cac8cb797283
/ishop-common/src/main/java/com/ishop/common/util/IDUtils.java
b08d6ff1abea3e89f336e7f517287519a4fd3514
[]
no_license
AWuzhaizhai/ssm-ishop
59a107a7d024bdb3b3a2cc145fe254e71361d7e3
77bcdce693bc554c968521bdf49c656ef0480624
refs/heads/master
2022-02-20T00:55:36.741798
2018-01-12T06:39:41
2018-01-12T06:39:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,252
java
package com.ishop.common.util; import java.util.Random; /** * 各种id生成策略 * <p>Title: IDUtils</p> * <p>Description: </p> * <p>Company: www.itcast.com</p> * @author 入云龙 * @date 2015年7月22日下午2:32:10 * @version 1.0 */ public class IDUtils { /** * 图片名生成 */ public static String genImageName() { //取当前时间的长整形值包含毫秒 long millis = System.currentTimeMillis(); //long millis = System.nanoTime(); //加上三位随机数 Random random = new Random(); int end3 = random.nextInt(999); //如果不足三位前面补0 String str = millis + String.format("%03d", end3); return str; } /** * 商品id生成 */ public static long getItemId() { //取当前时间的长整形值包含毫秒 long millis = System.currentTimeMillis(); //long millis = System.nanoTime(); //加上两位随机数 Random random = new Random(); int end2 = random.nextInt(99); //如果不足两位前面补0 String str = millis + String.format("%02d", end2); long id = new Long(str); return id; } // public static void main(String[] args) { // for(int i=0;i< 100;i++) // System.out.println(getItemId()); // } }
[ "1265598443@qq.com" ]
1265598443@qq.com
fc1cb625c0ba0ad26fc4910f3e3dc000415659b9
e9ad297da7d998ac7f5e746db0f7b51df6a0db01
/KriptonAndroidLibrary/src/test/java/sqlite/kripton48/persistence/DaoBean02Impl.java
c494cb57ee7124e84f5128a28ed3ac299a137995
[ "Apache-2.0" ]
permissive
luizdefranca/kripton
1211e1ca722455166a6653d7adaaba0c2b8fd2f6
dac2d849c247cb80bc80d73ad69b5ab20ace4f6b
refs/heads/master
2020-12-30T14:13:00.357953
2017-05-10T23:41:32
2017-05-10T23:41:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,809
java
package sqlite.kripton48.persistence; import android.database.Cursor; import com.abubusoft.kripton.android.Logger; import com.abubusoft.kripton.android.sqlite.AbstractDao; import com.abubusoft.kripton.android.sqlite.SqlUtils; import com.abubusoft.kripton.common.StringUtils; import sqlite.kripton48.entities.Bean02; /** * <p> * DAO implementation for entity <code>Bean02</code>, based on interface <code>DaoBean02</code> * </p> * * @see Bean02 * @see DaoBean02 * @see sqlite.kripton48.entities.Bean02Table */ public class DaoBean02Impl extends AbstractDao implements DaoBean02 { public DaoBean02Impl(BindDummy02DataSource dataSet) { super(dataSet); } /** * <h2>Select SQL:</h2> * * <pre>SELECT id, text FROM bean02 WHERE id=${id}</pre> * * <h2>Projected columns:</h2> * <dl> * <dt>id</dt><dd>is associated to bean's property <strong>id</strong></dd> * <dt>text</dt><dd>is associated to bean's property <strong>text</strong></dd> * </dl> * * <h2>Query's parameters:</h2> * <dl> * <dt>${id}</dt><dd>is binded to method's parameter <strong>id</strong></dd> * </dl> * * @param id * is binded to <code>${id}</code> * @return selected bean or <code>null</code>. */ @Override public Bean02 selectOne(long id) { // build where condition String[] _args={String.valueOf(id)}; //StringUtils, SqlUtils will be used in case of dynamic parts of SQL Logger.info(SqlUtils.formatSQL("SELECT id, text FROM bean02 WHERE id='%s'",(Object[])_args)); try (Cursor cursor = database().rawQuery("SELECT id, text FROM bean02 WHERE id=?", _args)) { Logger.info("Rows found: %s",cursor.getCount()); Bean02 resultBean=null; if (cursor.moveToFirst()) { int index0=cursor.getColumnIndex("id"); int index1=cursor.getColumnIndex("text"); resultBean=new Bean02(); if (!cursor.isNull(index0)) { resultBean.setId(cursor.getLong(index0)); } if (!cursor.isNull(index1)) { resultBean.setText(cursor.getString(index1)); } } return resultBean; } } /** * <h2>SQL delete:</h2> * <pre>DELETE bean02 WHERE id=${id}</pre></pre> * * <h2>Where parameters:</h2> * <dl> * <dt>${id}</dt><dd>is mapped to method's parameter <strong>id</strong></dd> * </dl> * * @param id * is used as where parameter <strong>${id}</strong> * * @return number of deleted records */ @Override public long deleteOne(long id) { String[] whereConditionsArray={String.valueOf(id)}; //StringUtils and SqlUtils will be used to format SQL Logger.info(SqlUtils.formatSQL("DELETE bean02 WHERE id=%s", (Object[])whereConditionsArray)); int result = database().delete("bean02", "id=?", whereConditionsArray); return result; } }
[ "xcesco@gmail.com" ]
xcesco@gmail.com
d69cf75b5c7cc251e910eb24cd9f4a8ff809ec42
2cacd8bad40f2eaae4342401069c6f8b4bf96088
/ExemploEJB2/src/example/controller/ControleDataHora.java
d382754c123dafe4c789b15b6542c30e35677d98
[]
no_license
pablolfbs/javaWeb
ec2fd4560b47bbd567d61256610b9f2aaf5fd630
65423b69939d1e10675ed1c42dd1731b89fc0098
refs/heads/master
2023-04-02T12:27:50.568709
2022-06-16T21:21:39
2022-06-16T21:21:39
124,614,149
0
0
null
null
null
null
UTF-8
Java
false
false
382
java
package example.controller; import javax.ejb.EJB; import javax.enterprise.context.RequestScoped; import javax.inject.Named; import example.ejb.DataHora; @Named(value = "controleDataHora") @RequestScoped public class ControleDataHora { @EJB private DataHora time; public DataHora getTime() { return time; } public void setTime(DataHora time) { this.time = time; } }
[ "pablo.fariabritto@gmail.com" ]
pablo.fariabritto@gmail.com
8a74828a9d029eae4be1e2ec3dcff777d0fc9f38
e688cf0002039c7ba8c000963e732f9841547ccf
/code/app/src/main/java/com/icatch/sbcapp/Listener/Callback.java
7ec8c8cd95fd9786d82d00e1c383ee423d929209
[]
no_license
wwkkww1983/wifiCamera-3
005e383b74e62566ecb71c95d8356236dc5d1aaf
38647f0459b79dc8f81504bab3749f62e4030265
refs/heads/master
2021-09-20T03:19:11.877588
2018-08-02T10:52:39
2018-08-02T10:52:39
255,712,232
1
0
null
2020-04-14T19:58:31
2020-04-14T19:58:31
null
UTF-8
Java
false
false
202
java
package com.icatch.sbcapp.Listener; /** * Created by b.jiang on 2016/4/27. */ public interface Callback { void processSucceed(); void processFailed(); void processAbnormal(); }
[ "1126525692@qq.com" ]
1126525692@qq.com
3e7e8ff136182fc4c961c62498c293297592e37f
922a7850c99629f9ef1b8258bcf2da281ea5a56e
/vcr4j-examples/src/main/java/org/mbari/vcr4j/examples/remote/Issue23.java
a98e6c1eddf8705c113bd369f2089ee01c8595db
[ "Apache-2.0" ]
permissive
mbari-org/vcr4j
a484f9b907a27659ad87046520123fa28b002a2f
51a54beb69d63600329003b54c8fddca5d3e7fa4
refs/heads/master
2023-04-09T10:20:00.377387
2023-01-25T00:13:42
2023-01-25T00:13:42
90,187,644
0
0
Apache-2.0
2022-06-12T21:42:35
2017-05-03T19:51:48
Java
UTF-8
Java
false
false
594
java
package org.mbari.vcr4j.examples.remote; import org.mbari.vcr4j.remote.control.commands.OpenCmd; import org.mbari.vcr4j.commands.RemoteCommands; public class Issue23 { public static void main(String[] args) throws Exception { var appArgs = AppArgs.parse(args, Issue23.class.getName()); var rc = appArgs.remoteControl(); var uuid = appArgs.getVideoUuid(); var url = appArgs.url(); var io = rc.getVideoIO(); io.send(new OpenCmd(uuid, url)); Thread.sleep(2000); io.send(RemoteCommands.CLOSE); System.exit(0); } }
[ "bschlining@gmail.com" ]
bschlining@gmail.com
b82f3a8ae64d9fc54e11312091666fd90920f8d1
1dff4b9816588af53eed89728d1aa46d189e8d9c
/PentahoDataTransferService/src/main/java/com/safasoft/pentaho/datatrans/src/dao/FinTrnbankBalanceDAO.java
4b9f6b45d68729478b0756699ee32810316e8d17
[]
no_license
awaludinhamid/MobileSurveyRest
0ee530ab426f337ec2ac4026d6f52e1925d449b0
1d7346de050682fe5785cd8d78cedee59fe05805
refs/heads/master
2021-07-05T17:16:10.500647
2017-09-29T07:44:42
2017-09-29T07:44:42
105,227,771
0
0
null
null
null
null
UTF-8
Java
false
false
285
java
package com.safasoft.pentaho.datatrans.src.dao; import org.springframework.stereotype.Repository; import com.safasoft.pentaho.datatrans.src.bean.FinTrnbankBalance; @Repository("finTrnbankBalanceDAO") public class FinTrnbankBalanceDAO extends BaseDAO<FinTrnbankBalance> { }
[ "ahamid.dimaha@gmail.com" ]
ahamid.dimaha@gmail.com
5e6e609bb499a30bb773d875b490f6017b5d0edb
2b675fd33d8481c88409b2dcaff55500d86efaaa
/infinispan/core/src/main/java/org/infinispan/stats/container/StatisticsSnapshot.java
258029f895842005b6f7a8e7d1c260e9514afb3d
[ "LGPL-2.0-or-later", "Apache-2.0" ]
permissive
nmldiegues/stibt
d3d761464aaf97e41dcc9cc1d43f0e3234a1269b
1ee662b7d4ed1f80e6092c22e235a3c994d1d393
refs/heads/master
2022-12-21T23:08:11.452962
2015-09-30T16:01:43
2015-09-30T16:01:43
42,459,902
0
2
Apache-2.0
2022-12-13T19:15:31
2015-09-14T16:02:52
Java
UTF-8
Java
false
false
656
java
package org.infinispan.stats.container; import org.infinispan.stats.ExposedStatistic; /** * A Statistic Snapshot; * * @author Pedro Ruivo * @since 5.2 */ public class StatisticsSnapshot { private final long[] snapshot; public StatisticsSnapshot(long[] snapshot) { this.snapshot = snapshot; } public final long getRemote(ExposedStatistic stat) { return snapshot[ConcurrentGlobalContainer.getRemoteIndex(stat)]; } public final long getLocal(ExposedStatistic stat) { return snapshot[ConcurrentGlobalContainer.getLocalIndex(stat)]; } public final long getLastResetTime() { return snapshot[0]; } }
[ "nmld@ist.utl.pt" ]
nmld@ist.utl.pt
b44aacfd518fdf5924be068871cd47dc812bedb9
a78451b32addbf38454392ea8522de6026d96cd6
/src/test/java/io/github/jhipster/sample/web/rest/UserJWTControllerIntTest.java
abfbff5c72bfed927d40d6ebb42a27586a6d6a21
[]
no_license
liodevel/jHipsterOnlineSample
c6f0039cc30b132baa2025a3a209930283a5216a
18c0999fda72a100c8b7628e4df6faf3458186a3
refs/heads/master
2022-12-17T07:00:52.120967
2017-08-16T09:36:57
2017-08-16T09:36:57
100,473,260
0
1
null
2020-09-18T09:50:50
2017-08-16T09:36:54
Java
UTF-8
Java
false
false
4,148
java
package io.github.jhipster.sample.web.rest; import io.github.jhipster.sample.JHipsterOnlineSampleApp; import io.github.jhipster.sample.domain.User; import io.github.jhipster.sample.repository.UserRepository; import io.github.jhipster.sample.security.jwt.TokenProvider; import io.github.jhipster.sample.web.rest.vm.LoginVM; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; /** * Test class for the UserJWTController REST controller. * * @see UserJWTController */ @RunWith(SpringRunner.class) @SpringBootTest(classes = JHipsterOnlineSampleApp.class) public class UserJWTControllerIntTest { @Autowired private TokenProvider tokenProvider; @Autowired private AuthenticationManager authenticationManager; @Autowired private UserRepository userRepository; @Autowired private PasswordEncoder passwordEncoder; private MockMvc mockMvc; @Before public void setup() { UserJWTController userJWTController = new UserJWTController(tokenProvider, authenticationManager); this.mockMvc = MockMvcBuilders.standaloneSetup(userJWTController) .build(); } @Test @Transactional public void testAuthorize() throws Exception { User user = new User(); user.setLogin("user-jwt-controller"); user.setEmail("user-jwt-controller@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller"); login.setPassword("test"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()); } @Test @Transactional public void testAuthorizeWithRememberMe() throws Exception { User user = new User(); user.setLogin("user-jwt-controller-remember-me"); user.setEmail("user-jwt-controller-remember-me@example.com"); user.setActivated(true); user.setPassword(passwordEncoder.encode("test")); userRepository.saveAndFlush(user); LoginVM login = new LoginVM(); login.setUsername("user-jwt-controller-remember-me"); login.setPassword("test"); login.setRememberMe(true); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isOk()) .andExpect(jsonPath("$.id_token").isString()) .andExpect(jsonPath("$.id_token").isNotEmpty()); } @Test @Transactional public void testAuthorizeFails() throws Exception { LoginVM login = new LoginVM(); login.setUsername("wrong-user"); login.setPassword("wrong password"); mockMvc.perform(post("/api/authenticate") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(login))) .andExpect(status().isUnauthorized()) .andExpect(jsonPath("$.id_token").doesNotExist()); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
3bc283d8d5fd733f90454e95e0213ede3f3a97ff
63da595a4e74145e86269e74e46c98ad1c1bcad3
/java/com/genscript/gsscm/epicorwebservice/stub/invoice/GetPaymentList.java
262f40b69bc58d3be2388fac57a82f9828ac7fa8
[]
no_license
qcamei/scm
4f2cec86fedc3b8dc0f1cc1649e9ef3be687f726
0199673fbc21396e3077fbc79eeec1d2f9bd65f5
refs/heads/master
2020-04-27T19:38:19.460288
2012-09-18T07:06:04
2012-09-18T07:06:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,723
java
package com.genscript.gsscm.epicorwebservice.stub.invoice; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="tranDate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "tranDate" }) @XmlRootElement(name = "getPaymentList") public class GetPaymentList { @XmlElement(required = true, nillable = true) @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar tranDate; /** * Gets the value of the tranDate property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getTranDate() { return tranDate; } /** * Sets the value of the tranDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setTranDate(XMLGregorianCalendar value) { this.tranDate = value; } }
[ "253479240@qq.com" ]
253479240@qq.com
2e0d1e7d48a2321b1a8c4412bf809b474fc0e8ad
db97ce70bd53e5c258ecda4c34a5ec641e12d488
/src/main/java/com/alipay/api/response/AlipayEcoContractMessageSendResponse.java
1afd93672a94d26b94cfe3500dfdfbbff0784ae8
[ "Apache-2.0" ]
permissive
smitzhang/alipay-sdk-java-all
dccc7493c03b3c937f93e7e2be750619f9bed068
a835a9c91e800e7c9350d479e84f9a74b211f0c4
refs/heads/master
2022-11-23T20:32:27.041116
2020-08-03T13:03:02
2020-08-03T13:03:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package com.alipay.api.response; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.eco.contract.message.send response. * * @author auto create * @since 1.0, 2020-05-25 16:12:24 */ public class AlipayEcoContractMessageSendResponse extends AlipayResponse { private static final long serialVersionUID = 3423563514957527189L; }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
62ce71f51a1725db8c100eed14a5067b645fa27d
5e0ec9c4ad9a381aa4605eea1f80bf41a26df28b
/dataset/median/c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833/000/src/test/java/introclassJava/median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000WhiteboxTest.java
5fde9b5ecea8366f63202da2fc1a94edf1b661a0
[]
no_license
dufaux/IntroClassJava
8d763bf225e8c4eec8426b919309f2ae0dc40c78
a6ac9c2d4d71621d4841bfd308a51c3eb4511606
refs/heads/master
2021-01-14T14:18:57.699360
2015-09-23T15:00:46
2015-09-23T15:03:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,126
java
package introclassJava; import org.junit.Test; import static org.junit.Assert.assertEquals; public class median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000WhiteboxTest { @Test(timeout=1000) public void test1() throws Exception { median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000 mainClass = new median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000(); String expected = "Please enter 3 numbers separated by spaces > 0 is the median"; mainClass.scanner = new java.util.Scanner("0 0 0"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test2() throws Exception { median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000 mainClass = new median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000(); String expected = "Please enter 3 numbers separated by spaces > 1 is the median"; mainClass.scanner = new java.util.Scanner("2 0 1"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test3() throws Exception { median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000 mainClass = new median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000(); String expected = "Please enter 3 numbers separated by spaces > 0 is the median"; mainClass.scanner = new java.util.Scanner("0 0 1"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test4() throws Exception { median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000 mainClass = new median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000(); String expected = "Please enter 3 numbers separated by spaces > 0 is the median"; mainClass.scanner = new java.util.Scanner("0 1 0"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test5() throws Exception { median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000 mainClass = new median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000(); String expected = "Please enter 3 numbers separated by spaces > 1 is the median"; mainClass.scanner = new java.util.Scanner("0 2 1"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } @Test(timeout=1000) public void test6() throws Exception { median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000 mainClass = new median_c716ee619761838749589cbd08d5fd56830bff349039f8587e988a5b0cd6310e04844d8e0ee98c5ffee3275aa227bd2c92fcde0993637fcf3bfbd41a37378833_000(); String expected = "Please enter 3 numbers separated by spaces > 2 is the median"; mainClass.scanner = new java.util.Scanner("0 2 3"); mainClass.exec(); String out = mainClass.output.replace("\n"," ").trim(); assertEquals(expected.replace(" ",""), out.replace(" ","")); } }
[ "durieuxthomas@hotmail.com" ]
durieuxthomas@hotmail.com
102b0a948477878376081378c2c0b74f3ed66d94
4f062f86f3c9c2b8c402d0fced3f2c093306735d
/Home_work_lesson_19/src/lesson_19/Employee.java
e7d83663b52e3c620354856b81cccbff231123db
[]
no_license
VasilLendyo/Java_Core_lesson_19
074205caf8b3d0fcc346450872b628e1c1bd3d42
b5f657afb8cc21eb415e74527eb75ae3c76ed858
refs/heads/master
2022-04-26T05:06:51.528069
2020-04-24T11:29:42
2020-04-24T11:29:42
258,493,652
0
0
null
null
null
null
UTF-8
Java
false
false
726
java
package lesson_19; import java.io.Serializable; public class Employee implements Serializable { private String name; private int id; private transient int salary; public Employee(String name, int id, int salary) { super(); this.name = name; this.id = id; this.salary = salary; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id; } public int getSalary() { return salary; } public void setSalary(int salary) { this.salary = salary; } @Override public String toString() { return "Employee [name=" + name + ", id=" + id + ", salary=" + salary + "]"; } }
[ "Tester99037@gmail.com" ]
Tester99037@gmail.com
fff29e50212d92be6e51e112f4b7d6f4f24d85b5
7005851126f6a30ae637f28d0aa9b3ef639556cd
/core/tags/1.1/service/src/main/java/org/extensiblecatalog/ncip/v2/service/CheckInItemInitiationData.java
ab5a959293c9af62ea1c2de649039b51a2521a2d
[ "MIT" ]
permissive
eXtensibleCatalog/NCIP2-Toolkit
c1c0f482e7fa34c3ac5dd8e2842ea0c0db6764a7
3e2603c2010dd2bcbdbe104eb46d64c38c539dc6
refs/heads/master
2022-09-19T23:43:55.650756
2017-02-20T08:39:02
2017-02-20T08:39:02
44,343,498
0
3
null
2022-08-25T20:20:18
2015-10-15T20:25:44
Java
UTF-8
Java
false
false
7,887
java
/** * Copyright (c) 2010 eXtensible Catalog Organization * * This program is free software; you can redistribute it and/or modify it * under the terms of the MIT/X11 license. The text of the license can be * found at http://www.opensource.org/licenses/mit-license.php. */ package org.extensiblecatalog.ncip.v2.service; import org.apache.commons.lang.builder.ReflectionToStringBuilder; import java.util.List; public class CheckInItemInitiationData implements NCIPInitiationData { // public MessageType getMessageType() { return NCIPData.MessageType.INITIATION; } // public boolean isInitiationMessage() { return true; } // public boolean isResponseMessage() { return false; } /** Version attribute */ protected String version; public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } /** * Initiation Header */ protected InitiationHeader initiationHeader; /** * Mandated Action */ protected MandatedAction mandatedAction; /** * ItemID */ protected ItemId itemId; public InitiationHeader getInitiationHeader() { return initiationHeader; } public void setInitiationHeader(InitiationHeader initiationHeader) { this.initiationHeader = initiationHeader; } public MandatedAction getMandatedAction() { return mandatedAction; } public void setMandatedAction(MandatedAction mandatedAction) { this.mandatedAction = mandatedAction; } public ItemId getItemId() { return itemId; } public void setItemId(ItemId itemId) { this.itemId = itemId; } /** * Boolean fields representing UserElementTypes */ protected boolean authenticationInputDesired; protected boolean blockOrTrapDesired; protected boolean dateOfBirthDesired; protected boolean nameInformationDesired; protected boolean userAddressInformationDesired; protected boolean userLanguageDesired; protected boolean userPrivilegeDesired; protected boolean userIdDesired; protected boolean previousUserIdDesired; //the user element types setter and getter public boolean getAuthenticationInputDesired() { return authenticationInputDesired; } public void setAuthenticationInputDesired(boolean authenticationInputDesired) { this.authenticationInputDesired = authenticationInputDesired; } public boolean getBlockOrTrapDesired() { return blockOrTrapDesired; } public void setBlockOrTrapDesired(boolean blockOrTrapDesired) { this.blockOrTrapDesired = blockOrTrapDesired; } public boolean getDateOfBirthDesired() { return dateOfBirthDesired; } public void setDateOfBirthDesired(boolean dateOfBirthDesired) { this.dateOfBirthDesired = dateOfBirthDesired; } public boolean getNameInformationDesired() { return nameInformationDesired; } public void setNameInformationDesired(boolean nameInformationDesired) { this.nameInformationDesired = nameInformationDesired; } public boolean getUserAddressInformationDesired() { return userAddressInformationDesired; } public void setUserAddressInformationDesired( boolean userAddressInformationDesired) { this.userAddressInformationDesired = userAddressInformationDesired; } public boolean getUserLanguageDesired() { return userLanguageDesired; } public void setUserLanguageDesired(boolean userLanguageDesired) { this.userLanguageDesired = userLanguageDesired; } public boolean getUserPrivilegeDesired() { return userPrivilegeDesired; } public void setUserPrivilegeDesired(boolean userPrivilegeDesired) { this.userPrivilegeDesired = userPrivilegeDesired; } public boolean getUserIdDesired() { return userIdDesired; } public void setUserIdDesired(boolean userIdDesired) { this.userIdDesired = userIdDesired; } public boolean getPreviousUserIdDesired() { return previousUserIdDesired; } public void setPreviousUserIdDesired(boolean previousUserIdDesired) { this.previousUserIdDesired = previousUserIdDesired; } /* All of the Item Element Types */ protected boolean bibliographicDescriptionDesired; protected boolean circulationStatusDesired; protected boolean electronicResourceDesired; protected boolean holdQueueLengthDesired; protected boolean itemDescriptionDesired; protected boolean itemUseRestrictionTypeDesired; protected boolean locationDesired; protected boolean physicalConditionDesired; protected boolean securityMarkerDesired; protected boolean sensitizationFlagDesired; /** * Generic toString() implementation. * * @return String */ @Override public String toString() { return ReflectionToStringBuilder.reflectionToString(this); } //the item element types setter and getter public boolean getBibliographicDescriptionDesired() { return bibliographicDescriptionDesired; } public void setBibliographicDescriptionDesired( boolean bibliographicDescriptionDesired) { this.bibliographicDescriptionDesired = bibliographicDescriptionDesired; } public boolean getCirculationStatusDesired() { return circulationStatusDesired; } public void setCirculationStatusDesired(boolean circulationStatusDesired) { this.circulationStatusDesired = circulationStatusDesired; } public boolean getElectronicResourceDesired() { return electronicResourceDesired; } public void setElectronicResourceDesired(boolean electronicResourceDesired) { this.electronicResourceDesired = electronicResourceDesired; } public boolean getHoldQueueLengthDesired() { return holdQueueLengthDesired; } public void setHoldQueueLengthDesired(boolean holdQueueLengthDesired) { this.holdQueueLengthDesired = holdQueueLengthDesired; } public boolean getItemDescriptionDesired() { return itemDescriptionDesired; } public void setItemDescriptionDesired(boolean itemDescriptionDesired) { this.itemDescriptionDesired = itemDescriptionDesired; } public boolean getItemUseRestrictionTypeDesired() { return itemUseRestrictionTypeDesired; } public void setItemUseRestrictionTypeDesired( boolean itemUseRestrictionTypeDesired) { this.itemUseRestrictionTypeDesired = itemUseRestrictionTypeDesired; } public boolean getLocationDesired() { return locationDesired; } public void setLocationDesired(boolean locationDesired) { this.locationDesired = locationDesired; } public boolean getPhysicalConditionDesired() { return physicalConditionDesired; } public void setPhysicalConditionDesired(boolean physicalConditionDesired) { this.physicalConditionDesired = physicalConditionDesired; } public boolean getSecurityMarkerDesired() { return securityMarkerDesired; } public void setSecurityMarkerDesired(boolean securityMarkerDesired) { this.securityMarkerDesired = securityMarkerDesired; } public boolean getSensitizationFlagDesired() { return sensitizationFlagDesired; } public void setSensitizationFlagDesired(boolean sensitizationFlagDesired) { this.sensitizationFlagDesired = sensitizationFlagDesired; } //end }
[ "xrosecky@gmail.com" ]
xrosecky@gmail.com
03754236f7dd2cac244504bb1b0885822e79f118
d0584a334d26d81a7a75210fc90389d4b1d6c96e
/src/main/java/com/igorlourenco/workshopmongo/repository/UsuarioRepository.java
ba846db3dca4ebaee94f4148672ecee5d7c836c3
[]
no_license
igor-lourenco/workshop-spring-boot-mongodb
783e8ccdd2ff1996e331c63bc06be8939c698df8
19c8b0911f2d12eeb5393b243ad11f1e5efeb700
refs/heads/master
2022-12-28T12:25:27.008912
2020-10-08T19:11:01
2020-10-08T19:11:01
298,330,675
0
0
null
null
null
null
UTF-8
Java
false
false
318
java
package com.igorlourenco.workshopmongo.repository; import org.springframework.data.mongodb.repository.MongoRepository; import org.springframework.stereotype.Repository; import com.igorlourenco.workshopmongo.domain.Usuario; @Repository public interface UsuarioRepository extends MongoRepository<Usuario, String>{ }
[ "igor.lourencosantos@gmail.com" ]
igor.lourencosantos@gmail.com
9814d2f4b545c7ff01b6f918f00bf9e96eaae707
5483eb988acf28a9b3d3ead2b3fd1464b212b5fc
/src/dao/com/vriche/adrm/dao/.svn/text-base/OaWorkFlowCheckResultDao.java.svn-base
85533e9f6a15a3ded41aa95130a976c07b09e316
[]
no_license
vriche/adrm
0bcce806716bdc7aa1adc12c20d590e9c37356df
c5e83dc91b831d430962a7079e9a54b7e82b7fa8
refs/heads/master
2020-04-06T23:42:19.947104
2016-07-14T01:31:31
2017-04-01T03:58:15
24,831,175
0
0
null
null
null
null
UTF-8
Java
false
false
1,955
package com.vriche.adrm.dao; import java.util.List; import java.util.Map; import com.ibatis.common.util.PaginatedList; import com.vriche.adrm.dao.Dao; import com.vriche.adrm.model.OaWorkFlowCheckResult; public interface OaWorkFlowCheckResultDao extends Dao { /** * Retrieves all of the oaWorkFlowCheckResults */ public List getOaWorkFlowCheckResults(OaWorkFlowCheckResult oaWorkFlowCheckResult); /** * Retrieves all of the getOaWorkFlowCheckResultsCount */ public Integer getOaWorkFlowCheckResultsCount(OaWorkFlowCheckResult oaWorkFlowCheckResult); /** * Retrieves all of the getOaWorkFlowCheckResultsPage */ public PaginatedList getOaWorkFlowCheckResultsPage(OaWorkFlowCheckResult oaWorkFlowCheckResult,int pageIndex,int pageSize); /** * Retrieves all of the oaWorkFlowCheckResultsByIdList */ public List getOaWorkFlowCheckResultsByIdList(final Map idList); /** * Gets oaWorkFlowCheckResult's information based on primary key. An * ObjectRetrievalFailureException Runtime Exception is thrown if * nothing is found. * * @param id the oaWorkFlowCheckResult's id * @return oaWorkFlowCheckResult populated oaWorkFlowCheckResult object */ public OaWorkFlowCheckResult getOaWorkFlowCheckResult(final Long id); /** * Saves a oaWorkFlowCheckResult's information * @param oaWorkFlowCheckResult the object to be saved */ public Long saveOaWorkFlowCheckResult(OaWorkFlowCheckResult oaWorkFlowCheckResult); /** * Removes a oaWorkFlowCheckResult from the database by id * @param id the oaWorkFlowCheckResult's id */ public void removeOaWorkFlowCheckResult(final Long id); /** * Removes oaWorkFlowCheckResults from the database by ids * @param ids the oaWorkFlowCheckResult's id eg:"'1','2','3'" */ public void removeOaWorkFlowCheckResults(final Map idList); }
[ "46430212@qq.com" ]
46430212@qq.com
717c9cd59a7835b3d8e66d498147b4829639c7d8
5ec38308f42dcda98bd9d28081cc8e369a3de181
/12-NAC-Correcao/src/br/com/fiap/nac/dao/impl/GenericDAOImpl.java
503b0fe62ab73d5880a037d40d9079893a1bf290
[]
no_license
leandroromanofiap/2TDSS-Enterprise
66109ff2f0d3adc88f8b510f2f627d42e1c46a4d
27c3d1d9fd331c204477a90d8070f8478bd42009
refs/heads/master
2021-04-29T01:50:32.108083
2018-05-22T01:36:12
2018-05-22T01:36:12
121,812,227
0
0
null
null
null
null
UTF-8
Java
false
false
1,431
java
package br.com.fiap.nac.dao.impl; import java.lang.reflect.ParameterizedType; import java.util.List; import javax.persistence.EntityManager; import br.com.fiap.nac.dao.GenericDAO; import br.com.fiap.nac.exception.DBException; import br.com.fiap.nac.exception.IdNotFoundException; public class GenericDAOImpl<T, K> implements GenericDAO<T, K> { protected EntityManager em; private Class<T> classe; @SuppressWarnings("unchecked") public GenericDAOImpl(EntityManager em) { this.em = em; classe = (Class<T>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0]; } @Override public void cadastrar(T entity) { em.persist(entity); } @Override public void alterar(T entity) { em.merge(entity); } @Override public void remover(K codigo) throws IdNotFoundException { T entidade = pesquisar(codigo); if (entidade == null) throw new IdNotFoundException(); em.remove(entidade); } @Override public T pesquisar(K codigo) { return em.find(classe, codigo); } @Override public void salvar() throws DBException { try { em.getTransaction().begin(); em.getTransaction().commit(); } catch (Exception e) { if (em.getTransaction().isActive()) em.getTransaction().rollback(); throw new DBException("Erro no commit", e); } } @Override public List<T> listar() { return em.createQuery("from " + classe.getName(), classe).getResultList(); } }
[ "logonrm@fiap.com.br" ]
logonrm@fiap.com.br
9d4771786e72e407f56772e181f80eb7259059ec
56ba6b4df181285a58fc05d585ca68455750d0ec
/cards/src/main/java/org/rnd/jmagic/cards/PlagueBoiler.java
a3e3022c5e9297e86b2bbd125ddd41a735fc345e
[]
no_license
ranjan-rk/jmagic
a5454f92afba9c24b494231915ce750734564239
4c1f6f93081de64cba7db7bd87f843fa8914a2a0
refs/heads/master
2021-01-18T06:30:38.871143
2013-07-22T19:50:51
2013-07-22T19:50:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,210
java
package org.rnd.jmagic.cards; import static org.rnd.jmagic.Convenience.*; import org.rnd.jmagic.engine.*; import org.rnd.jmagic.engine.generators.*; @Name("Plague Boiler") @Types({Type.ARTIFACT}) @ManaCost("3") @Printings({@Printings.Printed(ex = Expansion.RAVNICA, r = Rarity.RARE)}) @ColorIdentity({Color.GREEN, Color.BLACK}) public final class PlagueBoiler extends Card { public static final class Tick extends EventTriggeredAbility { public Tick(GameState state) { super(state, "At the beginning of your upkeep, put a plague counter on Plague Boiler."); this.addPattern(atTheBeginningOfYourUpkeep()); SetGenerator thisCard = ABILITY_SOURCE_OF_THIS; this.addEffect(putCounters(1, Counter.CounterType.PLAGUE, thisCard, "Put a plague counter on Plague Boiler.")); } } public static final class Tock extends ActivatedAbility { public Tock(GameState state) { super(state, "(1)(B)(G): Put a plague counter on Plague Boiler or remove a plague counter from it."); this.setManaCost(new ManaPool("1BG")); EventFactory put = putCountersOnThis(1, Counter.CounterType.PLAGUE, "Put a plague counter on Plague Boiler"); EventFactory remove = removeCountersFromThis(1, Counter.CounterType.PLAGUE, "Remove a plague counter from Plague Boiler"); EventType.ParameterMap parameters = new EventType.ParameterMap(); parameters.put(EventType.Parameter.PLAYER, You.instance()); parameters.put(EventType.Parameter.EVENT, Identity.instance(put, remove)); this.addEffect(new EventFactory(EventType.CHOOSE_AND_PERFORM, parameters, "Put a plague counter on Plague Boiler or remove a plague counter from it")); } } public static final class Boom extends StateTriggeredAbility { public Boom(GameState state) { super(state, "When Plague Boiler has three or more plague counters on it, sacrifice it. If you do, destroy all nonland permanents."); SetGenerator thisCard = ABILITY_SOURCE_OF_THIS; SetGenerator plagueCountersOnThis = CountersOn.instance(thisCard, Counter.CounterType.PLAGUE); SetGenerator numPlagueCountersOnThis = Count.instance(plagueCountersOnThis); SetGenerator threeOrMore = Identity.instance(new org.rnd.util.NumberRange(3, null)); SetGenerator triggerCondition = Intersect.instance(threeOrMore, numPlagueCountersOnThis); this.addCondition(triggerCondition); EventFactory sacrifice = sacrificeThis("Plague Boiler"); SetGenerator permanents = InZone.instance(Battlefield.instance()); SetGenerator lands = HasType.instance(Type.LAND); SetGenerator nonLandPermanents = RelativeComplement.instance(permanents, lands); EventFactory destroy = destroy(nonLandPermanents, "Destroy all nonland permanents"); EventFactory effect = new EventFactory(EventType.IF_EVENT_THEN_ELSE, "Sacrifice Plague Boiler. If you do, destroy all nonland permanents."); effect.parameters.put(EventType.Parameter.IF, Identity.instance(sacrifice)); effect.parameters.put(EventType.Parameter.THEN, Identity.instance(destroy)); this.addEffect(effect); } } public PlagueBoiler(GameState state) { super(state); this.addAbility(new Tick(state)); this.addAbility(new Tock(state)); this.addAbility(new Boom(state)); } }
[ "robyter@gmail" ]
robyter@gmail
4474a6e80bb03bc1b826400d571e7a1b588c92f4
c6d93152ab18b0e282960b8ff224a52c88efb747
/安慧软件资料/gitRepository/ITMS-3.0/Code/cy.its.device/cy.its.device.domain/src/main/java/cy/its/device/domain/model/TollgateSys.java
c9bd9443254fa95ae7058475bcd766f4c362bda9
[]
no_license
BAT6188/company-database
adfe5d8b87b66cd51efd0355e131de164b69d3f9
40d0342345cadc51ca2555840e32339ca0c83f51
refs/heads/master
2023-05-23T22:18:22.702550
2018-12-25T00:58:15
2018-12-25T00:58:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,852
java
package cy.its.device.domain.model; public class TollgateSys extends SysParam { private String deviceId; private String trackSysTollgateNbr; private String tollgateType; private String isConnectTrackSys; private String interceptConditions; private String lawEnforceStationCode; private String upRelatedVideoList; private String downRelatedVideoList; private String matchTypeList; private String highwayEntranceExit; private String serviceEntranceExit; private String photoModel; private Short largeCarSnapImages; private String detectionMode; private String isVioSupport; private String integratePlatformNbr; private String isFlowSupport; public String getDeviceId() { return deviceId; } public void setDeviceId(String deviceId) { this.deviceId = deviceId; } public String getTrackSysTollgateNbr() { return trackSysTollgateNbr; } public void setTrackSysTollgateNbr(String trackSysTollgateNbr) { this.trackSysTollgateNbr = trackSysTollgateNbr; } public String getTollgateType() { return tollgateType; } public void setTollgateType(String tollgateType) { this.tollgateType = tollgateType; } public String getIsConnectTrackSys() { return isConnectTrackSys; } public void setIsConnectTrackSys(String isConnectTrackSys) { this.isConnectTrackSys = isConnectTrackSys; } public String getInterceptConditions() { return interceptConditions; } public void setInterceptConditions(String interceptConditions) { this.interceptConditions = interceptConditions; } public String getLawEnforceStationCode() { return lawEnforceStationCode; } public void setLawEnforceStationCode(String lawEnforceStationCode) { this.lawEnforceStationCode = lawEnforceStationCode; } public String getUpRelatedVideoList() { return upRelatedVideoList; } public void setUpRelatedVideoList(String upRelatedVideoList) { this.upRelatedVideoList = upRelatedVideoList; } public String getDownRelatedVideoList() { return downRelatedVideoList; } public void setDownRelatedVideoList(String downRelatedVideoList) { this.downRelatedVideoList = downRelatedVideoList; } public String getMatchTypeList() { return matchTypeList; } public void setMatchTypeList(String matchTypeList) { this.matchTypeList = matchTypeList; } public String getHighwayEntranceExit() { return highwayEntranceExit; } public void setHighwayEntranceExit(String highwayEntranceExit) { this.highwayEntranceExit = highwayEntranceExit; } public String getServiceEntranceExit() { return serviceEntranceExit; } public void setServiceEntranceExit(String serviceEntranceExit) { this.serviceEntranceExit = serviceEntranceExit; } public String getPhotoModel() { return photoModel; } public void setPhotoModel(String photoModel) { this.photoModel = photoModel; } public Short getLargeCarSnapImages() { return largeCarSnapImages; } public void setLargeCarSnapImages(Short largeCarSnapImages) { this.largeCarSnapImages = largeCarSnapImages; } public String getDetectionMode() { return detectionMode; } public void setDetectionMode(String detectionMode) { this.detectionMode = detectionMode; } public String getIsVioSupport() { return isVioSupport; } public void setIsVioSupport(String isVioSupport) { this.isVioSupport = isVioSupport; } public String getIntegratePlatformNbr() { return integratePlatformNbr; } public void setIntegratePlatformNbr(String integratePlatformNbr) { this.integratePlatformNbr = integratePlatformNbr; } public String getIsFlowSupport() { return isFlowSupport; } public void setIsFlowSupport(String isFlowSupport) { this.isFlowSupport = isFlowSupport; } @Override public void attatchSys(String deviceId) { this.setDeviceId(deviceId); } }
[ "729235023@qq.com" ]
729235023@qq.com
5ed2eefd59c60e577bc54d6fdef482679f8fbd2b
d9a2ac973be7f9e0bb62011facfca034ea037fdf
/pvmanager/plugins/org.csstudio.utility.pvmanager.sim/src/main/java/org/csstudio/utility/pvmanager/sim/Activator.java
1f5dbce8d8e57cd0ffce6a2a2771b4ba4ed40d66
[]
no_license
crispd/maven-osgi-bundles
27dc0a0137d30a7ebbeff2a356b51997f5bf803f
2a2293d8a293e0ffe1420a439d2489c4fc88121e
refs/heads/master
2021-01-18T05:29:41.260360
2014-07-31T18:49:33
2014-07-31T18:49:33
22,656,850
1
0
null
null
null
null
UTF-8
Java
false
false
1,012
java
package org.csstudio.utility.pvmanager.sim; import org.eclipse.core.runtime.Plugin; import org.osgi.framework.BundleContext; /** * The activator class controls the plug-in life cycle */ public class Activator extends Plugin { // The plug-in ID public static final String PLUGIN_ID = "org.csstudio.utility.pvmanager.sim"; // The shared instance private static Activator plugin; /** * The constructor */ public Activator() { } /* * (non-Javadoc) * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext) */ public void start(BundleContext context) throws Exception { super.start(context); plugin = this; } /* * (non-Javadoc) * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { plugin = null; super.stop(context); } /** * Returns the shared instance * * @return the shared instance */ public static Activator getDefault() { return plugin; } }
[ "eric.berryman@gmail.com" ]
eric.berryman@gmail.com
f49059e256d0ede273e1c0a87e1dd536f3f63733
7f9491694e075344ca013acda7538f84d21ccb69
/kodeklubben/src/trinn2/Chess.java
30bf9ea0a1521f6fb1021d5e8e3a4bc5693aa01f
[]
no_license
Paramyth/javafx
22a784bbbdeea50dd4fcd2f553cb366348a87167
87363dd0c2c3708e4d1ed024c183c543f1ade43d
refs/heads/master
2023-03-18T09:07:05.830001
2021-02-14T22:58:15
2021-02-14T22:58:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,151
java
package trinn2; import game.imagegrid.ImageGridGame; import javafx.fxml.FXML; import javafx.scene.Cursor; import javafx.scene.paint.Color; import javafx.scene.text.Font; public class Chess extends ImageGridGame<String> { String pawn = "Pawn"; String[] pieces = {pawn, "kNight", "Bishop", "Rook", "Queen", "King"}; char[] whitePieces = {'\u2659', '\u2658', '\u2657', '\u2656', '\u2655', '\u2654'}; char[] blackPieces = {'\u265F', '\u265E', '\u265D', '\u265C', '\u265B', '\u265A'}; String[] initialRow = {"Rook", "kNight", "Bishop", "Queen", "King", "Bishop", "kNight", "Rook"}; char findPieceChar(String piece) { for (int i = 0; i < piece.length(); i++) { char c = piece.charAt(i); if (Character.isUpperCase(c)) { return c; } } return 0; } char findPieceChar(String piece, char[] pieceChars) { for (int i = 0; i < pieces.length; i++) { if (pieces[i] == piece) { return pieceChars[i]; } } return 0; } @FXML protected void initialize() { super.initialize(); imageGrid.setCellSize(50, 50); imageGrid.setCellColors(2, "white", "grey", "grey", "white"); Font pieceFont = Font.font("Arial", 36); for (int i = 0; i < pieces.length; i++) { String piece = pieces[i]; imageGrid.setImage(getPlayerPiece(true, piece), createTextImage(findPieceChar(piece, whitePieces), pieceFont, Color.BLACK, Color.WHITE)); imageGrid.setImage(getPlayerPiece(false, piece), createTextImage(findPieceChar(piece, blackPieces), pieceFont, Color.BLACK, Color.BLACK)); } newAction(); } Boolean player = true; @FXML void newAction() { fillGrid(null); for (int i = 0; i < initialRow.length; i++) { setCell(i, 0, getPlayerPiece(false, initialRow[i])); setCell(i, imageGrid.getRowCount() - 1, getPlayerPiece(true, initialRow[i])); } for (int i = 0; i < imageGrid.getColumnCount(); i++) { setCell(i, 1, getPlayerPiece(false, pawn)); setCell(i, imageGrid.getRowCount() - 2, getPlayerPiece(true, pawn)); } player = true; updateGrid(); } String getPlayerName(boolean player) { return player ? "White" : "Black"; } char getPlayerChar(boolean player) { return getPlayerName(player).charAt(0); } String getPlayerPiece(boolean player, String piece) { return String.valueOf(getPlayerChar(player)) + findPieceChar(piece); } Boolean getPiecePlayer(String piece) { char playerChar = piece.charAt(0); if (getPlayerChar(true) == playerChar) { return true; } else if (getPlayerChar(false) == playerChar) { return false; } return null; } @Override protected void updateGrid() { super.updateGrid(); } private String sourcePiece; private int sourceX, sourceY; @Override protected Boolean mouseMoved(int x, int y) { String piece = getCell(x, y); boolean accept = piece != null && getPiecePlayer(piece) == player; setCursorIf(accept, Cursor.HAND, Cursor.DEFAULT); return null; } @Override protected Boolean mousePressed(int x, int y) { sourceX = x; sourceY = y; sourcePiece = getCell(x, y); boolean accept = sourcePiece != null && getPiecePlayer(sourcePiece) == player; setCursorIf(accept, Cursor.CLOSED_HAND, Cursor.DEFAULT); return accept; } @Override protected boolean mouseDragged(int x, int y) { boolean acceptDrop = acceptDrop(sourcePiece, sourceX, sourceY, getCell(x, y), x, y); setCursorIf(acceptDrop, Cursor.CLOSED_HAND, Cursor.WAIT); return acceptDrop; } @Override protected boolean mouseReleased(int x, int y) { setCursor(Cursor.DEFAULT); if (acceptDrop(sourcePiece, sourceX, sourceY, getCell(x, y), x, y)) { String cell = getCell(sourceX, sourceY); setCell(sourceX, sourceY, null); setCell(x, y, cell); updateCell(x, y); updateCell(sourceX, sourceY); player = ! player; return true; } return false; } // boolean acceptDrop(String source, int sourceX, int sourceY, String target, int targetX, int targetY) { // can only take opponent's pieces if (target != null && getPiecePlayer(target) == getPiecePlayer(source)) { return false; } int dx = targetX - sourceX, dy = targetY - sourceY; boolean player = getPiecePlayer(source); char pieceChar = source.charAt(1); if (pieceChar != 'N') { int ddx = (int) Math.signum(dx), ddy = (int) Math.signum(dy); int x = sourceX + ddx, y = sourceY + ddy; // check each cell to (but not including) the target while (x != targetX || y != targetY) { if (getCell(x, y) != null) { return false; } x += ddx; y += ddy; } } switch (pieceChar) { case 'P': if (target == null) { return (dx == 0) && Math.signum(dy) == (player ? -1 : 1) && (Math.abs(dy) == 1 || (Math.abs(dy) == 2 && sourceY == (player ? 6 : 1))); } else { return Math.abs(dx) == 1 && Math.abs(dy) == 1 && Math.signum(dy) == (player ? -1 : 1); } case 'N': return Math.abs(dx) * Math.abs(dy) == 2; case 'B': return Math.abs(dx) == Math.abs(dy); case 'R': return dx == 0 || dy == 0; case 'Q': return Math.abs(dx) == Math.abs(dy) || dx == 0 || dy == 0; case 'K': return Math.abs(dx) <= 1 && Math.abs(dy) <= 1; } return false; } public static void main(String[] args) { launch(args); } }
[ "hal@idi.ntnu.no" ]
hal@idi.ntnu.no
ce40b979e80a20b7cc89c6dd40d45b3447b588dd
35e8a12f96c6f46aa77907c3a3ee2af30c8c8d3f
/hub.sam.sdl.model/src/hub/sam/sdl/SdlBehavior.java
d4637fc89562e2b51051614b7f98d5baa178c354
[]
no_license
markus1978/tef
36049dee71a99d24401d4a01fe33a3018e7bb776
38bfc24dc64822b7b3ed74e41f85b3a8c10c1955
refs/heads/master
2020-04-06T04:30:58.699975
2015-08-13T07:51:37
2015-08-13T07:51:37
25,520,279
1
2
null
2015-08-13T07:51:37
2014-10-21T12:13:17
Java
UTF-8
Java
false
false
395
java
/** * <copyright> * </copyright> * * $Id$ */ package hub.sam.sdl; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Sdl Behavior</b></em>'. * <!-- end-user-doc --> * * * @see hub.sam.sdl.EmfSdlPackage#getSdlBehavior() * @model * @generated */ public interface SdlBehavior extends CoreAbstractionsElementsElement { } // SdlBehavior
[ "do@not.use" ]
do@not.use
577c4d4906141e495bf1857077f6d933e40cad5d
70b78a167f4eacc12bae0578efaebfffdf0ffc81
/src/main/java/za/co/sindi/oauth/service/factory/impl/OAuth2ServiceFactory.java
0c1852b0b06c608783923a5bf9d6e2ab2a41cbd3
[ "Apache-2.0" ]
permissive
TheEliteGentleman/JOAuth
a1922e141860e089184d56997aef4bca31459045
e42282917dc69922eb534234515f3bbbc2188431
refs/heads/master
2021-01-17T09:06:44.397088
2016-06-21T15:24:56
2016-06-21T15:24:56
61,642,845
0
0
null
null
null
null
UTF-8
Java
false
false
2,167
java
/** * Copyright 2010-2011 Buhake Sindi 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 za.co.sindi.oauth.service.factory.impl; import net.oauth.consumer.OAuth2Consumer; import net.oauth.provider.OAuth2ServiceProvider; import za.co.sindi.oauth.config.ConsumerConfig; import za.co.sindi.oauth.config.ProviderConfig; import za.co.sindi.oauth.service.OAuthService; import za.co.sindi.oauth.service.factory.OAuthServiceFactory; import za.co.sindi.oauth.service.impl.OAuth2Service; /** * @author Bienfait Sindi * @since 06 December 2010 * */ public class OAuth2ServiceFactory implements OAuthServiceFactory { /* (non-Javadoc) * @see com.neurologic.oauth.service.factory.OAuthServiceFactory#createOAuthService(java.lang.Class, com.neurologic.oauth.config.ProviderConfig, com.neurologic.oauth.config.ConsumerConfig) */ @SuppressWarnings("unchecked") @Override public <C, AT> OAuthService<C, AT> createOAuthService(Class<?> clazz, ProviderConfig providerConfig, ConsumerConfig consumerConfig) throws Exception { // TODO Auto-generated method stub if (!OAuth2Service.class.isAssignableFrom(clazz)) { throw new Exception("Class '" + clazz.getName() + "' is not an instance of '" + OAuth2Service.class.getName() + "'."); } OAuth2ServiceProvider serviceProvider = new OAuth2ServiceProvider(providerConfig.getAuthorizationUrl(), providerConfig.getAccessTokenUrl()); OAuth2Consumer consumer = new OAuth2Consumer(consumerConfig.getKey(), consumerConfig.getSecret(), serviceProvider); OAuth2Service service = (OAuth2Service) clazz.newInstance(); service.setOAuthConsumer(consumer); return (OAuthService<C, AT>) service; } }
[ "buhake.sindi@sgits.co.za" ]
buhake.sindi@sgits.co.za
561969ba90c444a21c34697a5445252d1b45528c
2fc4d64cbf17c1a366ffdcff7ceaa2a2fa4e4fae
/genetic-algorithms-core/src/main/java/com/helger/genetic/selector/SelectorRandomSortedBestOnly.java
2517564a0506a39e8f23a6d754f036f71b90d051
[ "Apache-2.0" ]
permissive
phax/genetic-algorithms
17e92a3afb24811178b09ade0725622c749ecb81
ccd37cea965fd7de3fc3e4dfc6ba4083ffe2b912
refs/heads/master
2023-08-27T20:38:27.529983
2019-08-27T20:19:21
2019-08-27T20:19:21
203,130,377
0
0
null
null
null
null
UTF-8
Java
false
false
2,657
java
/** * Copyright (C) 2012-2019 Philip Helger * philip[at]helger[dot]com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.helger.genetic.selector; import javax.annotation.Nonnegative; import javax.annotation.Nonnull; import com.helger.commons.ValueEnforcer; import com.helger.commons.collection.impl.CommonsArrayList; import com.helger.commons.collection.impl.ICommonsList; import com.helger.genetic.model.chromosome.IChromosome; import com.helger.genetic.utils.random.RandomGenerator; /** * Cross over selector: * <ul> * <li>Take a random subset of chromosomes to choose from</li> * <li>Sorted the chosen chromosomes by their fitness</li> * <li>Always use the absolute fittest chromosome</li> * </ul> * * @author Philip Helger */ public class SelectorRandomSortedBestOnly extends AbstractSelector { private final int m_nTournamentSize; public SelectorRandomSortedBestOnly (@Nonnegative final int nTournamentSize) { ValueEnforcer.isGT0 (nTournamentSize, "TournamentSize"); m_nTournamentSize = nTournamentSize; } @Nonnegative public final int getTournamentSize () { return m_nTournamentSize; } @Nonnull public ICommonsList <IChromosome> selectSurvivingChromosomes (@Nonnull final ICommonsList <IChromosome> aChromosomes) { final int nChromosomes = aChromosomes.size (); // Randomly choose tournament participants final int [] aSelected = RandomGenerator.getMultipleUniqueIntsInRange (m_nTournamentSize, nChromosomes); // Retrieve the tournament participants final ICommonsList <IChromosome> aChosen = new CommonsArrayList <> (m_nTournamentSize); for (final int nSelected : aSelected) aChosen.add (aChromosomes.get (nSelected)); // Sort all chosen chromosomes by descending fitness final IChromosome aFittestChromosome = aChosen.getSortedInline (IChromosome.comparatorFitness ().reversed ()) .getFirst (); final ICommonsList <IChromosome> ret = new CommonsArrayList <> (nChromosomes); for (int i = 0; i < nChromosomes; ++i) ret.add (aFittestChromosome); return ret; } }
[ "philip@helger.com" ]
philip@helger.com
60f0680e4668a8f0e16dccf0a2669a637eba974e
615edc20afa7c5a0df5db6c828d5384b4ceeec13
/CT25-DataPack/dist/game/data/scripts/hellbound/AncientTempleRemnants/Remnants.java
822488e8edeb3315fd2436339363c5ceef2f267b
[]
no_license
l2jmaximun/Freya
7e40d4bce9a1b7837bbbe5c3bf6601a03c023fe9
5dc44b1a8048b9658a7e27b83eef2ea06268898a
refs/heads/master
2021-08-30T19:31:24.630211
2017-12-19T05:57:16
2017-12-19T05:57:16
114,718,987
0
0
null
null
null
null
UTF-8
Java
false
false
2,611
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 hellbound.AncientTempleRemnants; import ai.engines.L2AttackableAIScript; import ct25.xtreme.gameserver.model.L2Object; import ct25.xtreme.gameserver.model.L2Skill; import ct25.xtreme.gameserver.model.actor.L2Npc; import ct25.xtreme.gameserver.model.actor.instance.L2PcInstance; /** * @author DS */ public class Remnants extends L2AttackableAIScript { // Npcs private static final int DEREK = 18465; private static final int[] NPCS = { 18463, 18464, 18465 }; // Item private static final int HOLY_WATER = 2358; // String Msgs private static final String MSG = "The holy water affects Remnants Ghost. You have freed his soul."; private static final String MSG_DEREK = "The holy water affects Derek. You have freed his soul."; @Override public final String onSpawn(final L2Npc npc) { npc.setIsMortal(false); return super.onSpawn(npc); } @Override public final String onSkillSee(final L2Npc npc, final L2PcInstance caster, final L2Skill skill, final L2Object[] targets, final boolean isPet) { if (skill.getId() == HOLY_WATER) if (!npc.isDead()) if (targets.length > 0 && targets[0] == npc) if (npc.getCurrentHp() < npc.getMaxHp() * 0.02) // Lower, than 2% { npc.doDie(caster); if (npc.getId() == DEREK) caster.sendMessage(MSG_DEREK); else caster.sendMessage(MSG); } return super.onSkillSee(npc, caster, skill, targets, isPet); } // Do not override onKill for Derek here. Let's make global Hellbound manipulations in Engine where it is possible. public Remnants(final int questId, final String name, final String descr) { super(questId, name, descr); for (final int npcId : NPCS) { addSpawnId(npcId); addSkillSeeId(npcId); } } public static void main(final String[] args) { new Remnants(-1, Remnants.class.getSimpleName(), "hellbound"); } }
[ "Rener@Rener-PC" ]
Rener@Rener-PC
34ea93ed2573f50295608965656d67e7f0c8bd98
f22ee35354d13f3e6a96472d24adc27be7a6d6d5
/fuwah-common/src/main/java/com/fuwah/common/constant/Constants.java
97add192c70422ae6854725cdffd81059d2160c2
[ "MIT" ]
permissive
wenMN1994/fuwah
5d283730ecab2253bc77e8f2c07fdb8109b05784
aaf544099a64147886a869f8055235e143ef7804
refs/heads/master
2022-07-26T04:09:23.298329
2020-08-25T14:40:45
2020-08-25T14:40:45
218,062,909
4
1
MIT
2022-06-17T02:39:10
2019-10-28T14:15:20
JavaScript
UTF-8
Java
false
false
1,786
java
package com.fuwah.common.constant; /** * 通用常量信息 * * @author fuwah */ public class Constants { /** * UTF-8 字符集 */ public static final String UTF8 = "UTF-8"; /** * GBK 字符集 */ public static final String GBK = "GBK"; /** * 通用成功标识 */ public static final String SUCCESS = "0"; /** * 通用失败标识 */ public static final String FAIL = "1"; /** * 登录成功 */ public static final String LOGIN_SUCCESS = "Success"; /** * 注销 */ public static final String LOGOUT = "Logout"; /** * 登录失败 */ public static final String LOGIN_FAIL = "Error"; /** * 自动去除表前缀 */ public static final String AUTO_REOMVE_PRE = "true"; /** * 当前记录起始索引 */ public static final String PAGE_NUM = "pageNum"; /** * 每页显示记录数 */ public static final String PAGE_SIZE = "pageSize"; /** * 排序列 */ public static final String ORDER_BY_COLUMN = "orderByColumn"; /** * 排序的方向 "desc" 或者 "asc". */ public static final String IS_ASC = "isAsc"; /** * 参数管理 cache name */ public static final String SYS_CONFIG_CACHE = "sys-config"; /** * 参数管理 cache key */ public static final String SYS_CONFIG_KEY = "sys_config:"; /** * 字典管理 cache name */ public static final String SYS_DICT_CACHE = "sys-dict"; /** * 字典管理 cache key */ public static final String SYS_DICT_KEY = "sys_dict:"; /** * 资源映射路径 前缀 */ public static final String RESOURCE_PREFIX = "/profile"; }
[ "18475536452@163.com" ]
18475536452@163.com
d1c224a68323ce790c2b9e48cf56bda7f884b31e
4312a71c36d8a233de2741f51a2a9d28443cd95b
/RawExperiments/DB/Math70/AstorMain-math70/src/variant-1205/org/apache/commons/math/analysis/solvers/BisectionSolver.java
5b7a8446538e6adbf9fe1e5f5673edfbc01b828f
[]
no_license
SajjadZaidi/AutoRepair
5c7aa7a689747c143cafd267db64f1e365de4d98
e21eb9384197bae4d9b23af93df73b6e46bb749a
refs/heads/master
2021-05-07T00:07:06.345617
2017-12-02T18:48:14
2017-12-02T18:48:14
112,858,432
0
0
null
null
null
null
UTF-8
Java
false
false
2,347
java
package org.apache.commons.math.analysis.solvers; public class BisectionSolver extends org.apache.commons.math.analysis.solvers.UnivariateRealSolverImpl { @java.lang.Deprecated public BisectionSolver(org.apache.commons.math.analysis.UnivariateRealFunction f) { super(f, 100, 1.0E-6); } public BisectionSolver() { super(100, 1.0E-6); } @java.lang.Deprecated public double solve(double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(f, min, max); } @java.lang.Deprecated public double solve(double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(f, min, max); } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, double min, double max, double initial) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { return solve(min, max); } public double solve(final org.apache.commons.math.analysis.UnivariateRealFunction f, double min, double max) throws org.apache.commons.math.FunctionEvaluationException, org.apache.commons.math.MaxIterationsExceededException { clearResult(); verifyInterval(min, max); double m; double fm; double fmin; throw org.apache.commons.math.MathRuntimeException.createIllegalArgumentException("cannot convert NaN value"); int i = 0; while (i < (maximalIterationCount)) { m = org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils.midpoint(min, max); fmin = f.value(min); fm = f.value(m); if ((fm * fmin) > 0.0) { min = m; } else { max = m; } if ((java.lang.Math.abs((max - min))) <= (absoluteAccuracy)) { m = org.apache.commons.math.analysis.solvers.UnivariateRealSolverUtils.midpoint(min, max); setResult(m, i); return m; } ++i; } throw new org.apache.commons.math.MaxIterationsExceededException(maximalIterationCount); } }
[ "sajjad.syed@ucalgary.ca" ]
sajjad.syed@ucalgary.ca
104f09661e6e71a6268131ba6ac0a0d7f27b04cd
f20af063f99487a25b7c70134378c1b3201964bf
/appengine/src/main/java/com/dereekb/gae/client/api/model/extension/link/exception/ClientLinkSystemChangeError.java
072e4bc6748d606d2271bc7674d0d68d011672aa
[]
no_license
dereekb/appengine
d45ad5c81c77cf3fcca57af1aac91bc73106ccbb
d0869fca8925193d5a9adafd267987b3edbf2048
refs/heads/master
2022-12-19T22:59:13.980905
2020-01-26T20:10:15
2020-01-26T20:10:15
165,971,613
0
0
null
null
null
null
UTF-8
Java
false
false
511
java
package com.dereekb.gae.client.api.model.extension.link.exception; import com.dereekb.gae.model.extension.links.system.modification.LinkModificationSystemRequest; /** * Error used by {@link ClientLinkServiceChangeException}. * * @author dereekb * */ public interface ClientLinkSystemChangeError { /** * Returns the change. * * @return {@link LinkModificationSystemRequest}. Never {@code null}. */ public LinkModificationSystemRequest getChange(); public LinkExceptionReason getReason(); }
[ "dereekb@gmail.com" ]
dereekb@gmail.com
58d3671ba74fd1b9ff4d200b164c3db406e5ee33
02a7d8477ade9e35ebe5fb932d888474df186c5a
/main/src/com/smartgwt/client/types/ImageStyle.java
fe20f19d0ccf249de583691d100ec4ff6f720bcc
[]
no_license
miunsi63/smartgwt
39575568ac8d2184d49cbcfb2311999150619c49
36f21279de6fb5588ca8cbff6bf015871c65194b
refs/heads/master
2020-06-14T15:29:31.789639
2019-03-25T03:40:15
2019-03-25T03:40:15
35,267,091
0
1
null
null
null
null
UTF-8
Java
false
false
1,386
java
/* * Smart GWT (GWT for SmartClient) * Copyright 2008 and beyond, Isomorphic Software, Inc. * * Smart GWT is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3 * as published by the Free Software Foundation. Smart GWT is also * available under typical commercial license terms - see * http://smartclient.com/license * * 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. */ package com.smartgwt.client.types; /** */ public enum ImageStyle implements ValueEnum { /** * Center (and don't stretch at all) the image if smaller than its enclosing frame.CENTER:"center", */ CENTER("center"), /** * Tile (repeat) the image if smaller than its enclosing frame. */ TILE("tile"), /** * Stretch the image to the size of its enclosing frame. */ STRETCH("stretch"), /** * Allow the image to have natural size */ NORMAL("normal"); private String value; ImageStyle(String value) { this.value = value; } public String getValue() { return this.value; } }
[ "smartgwt.dev@97ff703d-2b4d-0410-aac2-33a30ea07567" ]
smartgwt.dev@97ff703d-2b4d-0410-aac2-33a30ea07567
f2525bdd8f52a1d25c256394bf5eb9865ec69475
0ceafc2afe5981fd28ce0185e0170d4b6dbf6241
/AlgoKit (3rdp)/Code-store v1.0/yaal/archive/2011.11/2011.11.22 - School Traning Contest/TaskC.java
4e7d7d73916fd6f9d98b46295d8c4e2373c2fea8
[]
no_license
brainail/.happy-coooding
1cd617f6525367133a598bee7efb9bf6275df68e
cc30c45c7c9b9164095905cc3922a91d54ecbd15
refs/heads/master
2021-06-09T02:54:36.259884
2021-04-16T22:35:24
2021-04-16T22:35:24
153,018,855
2
1
null
null
null
null
UTF-8
Java
false
false
3,983
java
package net.egork; import net.egork.graph.GraphUtils; import net.egork.io.IOUtils; import net.egork.misc.MiscUtils; import net.egork.utils.io.InputReader; import net.egork.utils.io.OutputWriter; import java.util.Arrays; public class TaskC { public void solve(int testNumber, InputReader in, OutputWriter out) { int source = in.readInt() - 1; int destination = in.readInt() - 1; int vertexCount = in.readInt(); int edgeCount = in.readInt(); char[] startColor = new char[vertexCount]; int[] timeRemaining = new int[vertexCount]; int[] blueTime = new int[vertexCount]; int[] purpleTime = new int[vertexCount]; for (int i = 0; i < vertexCount; i++) { startColor[i] = in.readCharacter(); timeRemaining[i] = in.readInt(); blueTime[i] = in.readInt(); purpleTime[i] = in.readInt(); } int[] from = new int[edgeCount]; int[] to = new int[edgeCount]; int[] distance = new int[edgeCount]; IOUtils.readIntArrays(in, from, to, distance); MiscUtils.decreaseByOne(from, to); int[][] graph = GraphUtils.buildGraph(vertexCount, from, to); int[] sourceDistance = new int[vertexCount]; Arrays.fill(sourceDistance, Integer.MAX_VALUE / 2); sourceDistance[source] = 0; boolean[] processed = new boolean[vertexCount]; for (int i = 0; i < vertexCount; i++) { int minDistance = Integer.MAX_VALUE / 2; int minIndex = -1; for (int j = 0; j < vertexCount; j++) { if (sourceDistance[j] < minDistance && !processed[j]) { minDistance = sourceDistance[j]; minIndex = j; } } if (minIndex == -1) break; processed[minIndex] = true; for (int j : graph[minIndex]) { int vertex = GraphUtils.otherVertex(minIndex, from[j], to[j]); int totalTime = nextAllow(startColor[minIndex], timeRemaining[minIndex], blueTime[minIndex], purpleTime[minIndex], startColor[vertex], timeRemaining[vertex], blueTime[vertex], purpleTime[vertex], minDistance) + distance[j]; if (sourceDistance[vertex] > totalTime) sourceDistance[vertex] = totalTime; } } if (sourceDistance[destination] == Integer.MAX_VALUE / 2) sourceDistance[destination] = 0; out.printLine(sourceDistance[destination]); } private int nextAllow(char startColor1, int timeRemaining1, int blueTime1, int purpleTime1, char startColor2, int timeRemaining2, int blueTime2, int purpleTime2, int minDistance) { if (timeRemaining1 == timeRemaining2 && blueTime1 == purpleTime2 && blueTime2 == purpleTime1 && startColor1 != startColor2) { return Integer.MAX_VALUE / 2; } if (color(startColor1, timeRemaining1, blueTime1, purpleTime1, minDistance) == color(startColor2, timeRemaining2, blueTime2, purpleTime2, minDistance)) { return minDistance; } while (true) { int nextSwitch1 = nextSwitch(startColor1, timeRemaining1, blueTime1, purpleTime1, minDistance); int nextSwitch2 = nextSwitch(startColor2, timeRemaining2, blueTime2, purpleTime2, minDistance); if (nextSwitch1 != nextSwitch2) return Math.min(nextSwitch1, nextSwitch2); minDistance = nextSwitch1; } } private int nextSwitch(char startColor, int timeRemaining, int blueTime, int purpleTime, int currentTime) { if (currentTime < timeRemaining) return timeRemaining; int delta = timeRemaining; currentTime -= timeRemaining; delta += (currentTime / (blueTime + purpleTime)) * (blueTime + purpleTime); currentTime %= blueTime + purpleTime; if (startColor == 'B' && currentTime < purpleTime) return delta + purpleTime; if (startColor == 'P' && currentTime < blueTime) return delta + blueTime; return delta + blueTime + purpleTime; } private char color(char startColor, int timeRemaining, int blueTime, int purpleTime, int currentTime) { if (currentTime < timeRemaining) return startColor; currentTime -= timeRemaining; currentTime %= blueTime + purpleTime; if (startColor == 'P' && currentTime < blueTime || startColor == 'B' && currentTime >= purpleTime) return 'B'; else return 'P'; } }
[ "wsemirz@gmail.com" ]
wsemirz@gmail.com
012c5aba3b7767e89b8022a88ecebbebfb1d8e6b
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/serge-rider--dbeaver/ca8795c43888931d860150b989a87720f8c75938/before/DBCDefaultValueHandler.java
1d46c5584d0916cb6e53ea66644c7027b254edaa
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
3,670
java
/* * Copyright (C) 2010-2012 Serge Rieder * serge@jkiss.org * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package org.jkiss.dbeaver.model.impl; import org.eclipse.jface.action.IMenuManager; import org.eclipse.swt.dnd.Clipboard; import org.jkiss.dbeaver.DBException; import org.jkiss.dbeaver.model.DBUtils; import org.jkiss.dbeaver.model.data.*; import org.jkiss.dbeaver.model.exec.*; import org.jkiss.dbeaver.model.struct.DBSTypedObject; import org.jkiss.dbeaver.ui.dialogs.data.TextViewDialog; import org.jkiss.dbeaver.ui.properties.PropertySourceAbstract; /** * Default value handler */ public class DBCDefaultValueHandler implements DBDValueHandler { public static final DBCDefaultValueHandler INSTANCE = new DBCDefaultValueHandler(); @Override public int getFeatures() { return FEATURE_VIEWER; } @Override public Class getValueObjectType() { return Object.class; } @Override public Object getValueObject( DBCExecutionContext context, DBCResultSet resultSet, DBSTypedObject column, int columnIndex) throws DBCException { return resultSet.getColumnValue(columnIndex + 1); } @Override public void bindValueObject( DBCExecutionContext context, DBCStatement statement, DBSTypedObject columnType, int paramIndex, Object value) throws DBCException { } @Override public Object createValueObject(DBCExecutionContext context, DBSTypedObject column) throws DBCException { return null; } @Override public Object copyValueObject(DBCExecutionContext context, DBSTypedObject column, Object value) throws DBCException { return value; } @Override public Object getValueFromClipboard(DBSTypedObject column, Clipboard clipboard) { return null; } @Override public void releaseValueObject(Object value) { if (value instanceof DBDValue) { ((DBDValue) value).release(); } } @Override public String getValueDisplayString(DBSTypedObject column, Object value) { return DBUtils.getDefaultValueDisplayString(value); } @Override public DBDValueAnnotation[] getValueAnnotations(DBCAttributeMetaData attribute) throws DBCException { return null; } @Override public void fillContextMenu(IMenuManager menuManager, DBDValueController controller) throws DBCException { } @Override public void fillProperties(PropertySourceAbstract propertySource, DBDValueController controller) { } @Override public DBDValueViewer createValueViewer(DBDValueController controller) throws DBException { return null; } @Override public boolean editValue(DBDValueController controller) throws DBException { TextViewDialog dialog = new TextViewDialog(controller); dialog.open(); return true; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
8c6b9383b0783754b5a8cbee7e988d9f7a717464
7f20b1bddf9f48108a43a9922433b141fac66a6d
/cytoscape3/branches/abeld-gsoc/dev/refactored-viewmodel/application/src/main/java/cytoscape/data/Semantics.java
b24f79976ec4feddb03f58dce309f895fd0ca51b
[]
no_license
ahdahddl/cytoscape
bf783d44cddda313a5b3563ea746b07f38173022
a3df8f63dba4ec49942027c91ecac6efa920c195
refs/heads/master
2020-06-26T16:48:19.791722
2013-08-28T04:08:31
2013-08-28T04:08:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,178
java
/* File: Semantics.java Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org) The Cytoscape Consortium is: - Institute for Systems Biology - University of California San Diego - Memorial Sloan-Kettering Cancer Center - Institut Pasteur - Agilent Technologies This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and documentation provided hereunder is on an "as is" basis, and the Institute for Systems Biology and the Whitehead Institute have no obligations to provide maintenance, support, updates, enhancements or modifications. In no event shall the Institute for Systems Biology and the Whitehead Institute be liable to any party for direct, indirect, special, incidental or consequential damages, including lost profits, arising out of the use of this software and its documentation, even if the Institute for Systems Biology and the Whitehead Institute have been advised of the possibility of such damage. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ package cytoscape.data; import org.cytoscape.model.CyEdge; import org.cytoscape.model.CyNetwork; import org.cytoscape.model.CyNode; import org.cytoscape.model.GraphObject; import java.util.*; /** * This class defines names for certain data attributes that are commonly used * within Cytoscape. The constants defined here are provided to enable different * modules to use the same name when referring to the same conceptual attribute. * * This class also defines some static methods for assigning these attributes to * a network, given the objects that serve as the source for this information. */ public class Semantics { /** * The name "CANONICAL_NAME" is an historical artifact. The <b>ONLY</b> * purpose for this variable is to provide the name for an automatically * created node attribute that is guaranteed to be created when the * node is created. Any other purpose or function this value has supported * in the past is officially no longer supported! */ public static final String CANONICAL_NAME = "canonicalName"; /** * From v2.3, the following two terms will be used only by * Gene Ontology Server. * - The basic meaning is same as above, but canonical name will be * replaced by the node id. - Aliases are no longer String object. It's a * list now. */ public static final String GO_COMMON_NAME = "GO Common Name"; /** * */ public static final String SPECIES = "species"; /** * */ public static final String INTERACTION = "interaction"; /** * Edge attribute, if true, edge is directed, if false it is undirected */ public static final String IS_DIRECTED= "is directed"; /** * */ public static final String MOLECULE_TYPE = "molecule_type"; /** * */ public static final String PROTEIN = "protein"; /** * */ public static final String DNA = "DNA"; /** * */ public static final String RNA = "RNA"; /** * */ public static final String MOLECULAR_FUNCTION = "molecular_function"; /** * */ public static final String BIOLOGICAL_PROCESS = "biological_process"; /** * */ public static final String CELLULAR_COMPONENT = "cellular_component"; /** * This method returns a list of all names that are synonyms of the given * name. The returned list will include the name argument itself, and thus * will always be non-null and contain at least one member (unless the * argument itself is null, in which case a list of size 0 is returned). The * search for other names follows the following steps: * * First, if the network argument is non-null and the node attributes * include the name argument as a canonical name, then add any entry for the * COMMON_NAME attribute associated with the canonical name. Next, if a * BioDataServer is available, try to get a species for the given name * either from the SPECIES attribute associated with the canonicalName, or * using the return value of getDefaultSpecies if needed. If a species can * be determined, then use the BioDataServer to add all the synonyms that * are registered for the name argument. */ public static List<String> getAllSynonyms(final GraphObject go, final CyNetwork network) { final List<String> returnList = new ArrayList<String>(); if (go == null) { return returnList; } returnList.add(go.attrs().get("name",String.class)); String species = null; if (network != null) { final String commonName = go.attrs().get(GO_COMMON_NAME,String.class); if (commonName != null) { returnList.add(commonName); } } return returnList; } }
[ "abeld@0ecc0d97-ab19-0410-9704-bfe1a75892f5" ]
abeld@0ecc0d97-ab19-0410-9704-bfe1a75892f5
e2607c673d962b94fe2d0fed8a3de14f0a70ad00
95b93c921adf5c09793c41a7f0104374201212ab
/ws-Client/src/main/java/demo/spring/service_large/SayHi167Response.java
9a7d32c16dbefca3e24adb1741149d5c5b5d1fd4
[]
no_license
yhjhoo/WS-CXF-AuthTest
d6ad62bdf95af7f4832f16ffa242785fc0a93eb8
ded10abaefdc2e8b3b32becdc6f5781471acf27f
refs/heads/master
2020-06-15T02:21:42.204025
2015-04-08T00:05:02
2015-04-08T00:05:02
33,409,007
0
1
null
null
null
null
UTF-8
Java
false
false
1,435
java
package demo.spring.service_large; 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 class for sayHi167Response complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="sayHi167Response"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="return" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "sayHi167Response", propOrder = { "_return" }) public class SayHi167Response { @XmlElement(name = "return") protected String _return; /** * Gets the value of the return property. * * @return * possible object is * {@link String } * */ public String getReturn() { return _return; } /** * Sets the value of the return property. * * @param value * allowed object is * {@link String } * */ public void setReturn(String value) { this._return = value; } }
[ "yhjhoo@163.com" ]
yhjhoo@163.com
c96d1acdeff0c59a39f10512f3c3a4d9cf8d6ec0
f1654f1228fbda2d04cae21ddabeed02cb7da891
/src/main/java/hprose/io/serialize/DateArraySerializer.java
77d75eb1699f9eab61172c77fdbbd06aec7bf32a
[ "MIT" ]
permissive
zyh326162646/hprose-java
037c0cd75de47ccbe4b9b533b34d8e3792fb1d91
9060db8c6da10bbde9cd2d0e9a9b9182c9dfb886
refs/heads/master
2021-01-16T20:31:50.074853
2015-02-18T02:38:59
2015-02-18T02:38:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,477
java
/**********************************************************\ | | | hprose | | | | Official WebSite: http://www.hprose.com/ | | http://www.hprose.org/ | | | \**********************************************************/ /**********************************************************\ * * * DateArraySerializer.java * * * * Date array serializer class for Java. * * * * LastModified: Sep 15, 2014 * * Author: Ma Bingyao <andot@hprose.com> * * * \**********************************************************/ package hprose.io.serialize; import hprose.io.HproseWriter; import java.io.IOException; import java.sql.Date; final class DateArraySerializer implements HproseSerializer<Date[]> { public final static HproseSerializer instance = new DateArraySerializer(); public void write(HproseWriter writer, Date[] obj) throws IOException { writer.writeArrayWithRef(obj); } }
[ "mabingyao@gmail.com" ]
mabingyao@gmail.com
8a31d59e445c87803464cfb29c58784cd6831fbc
255ff79057c0ff14d0b760fc2d6da1165f1806c8
/01JavaStep01/第二阶段资料/二阶day9资料/案例/老师讲解代码/myByteStream/src/com/itheima_01/FileOutputStreamDemo02.java
9a63f01385c39f5c31b1eed734bdb2d85496a66d
[]
no_license
wjphappy90/Resource
7f1f817d323db5adae06d26da17dfc09ee5f9d3a
6574c8399f3cdfb6d6b39cd64dc9507e784a2549
refs/heads/master
2022-07-30T03:33:59.869345
2020-08-10T02:31:35
2020-08-10T02:31:35
285,701,650
2
6
null
null
null
null
UTF-8
Java
false
false
2,334
java
package com.itheima_01; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; /* 构造方法: FileOutputStream​(String name):创建文件输出流以指定的名称写入文件 FileOutputStream​(File file):创建文件输出流以写入由指定的 File对象表示的文件 写数据的三种方式: void write​(int b):将指定的字节写入此文件输出流 一次写一个字节数据 void write​(byte[] b):将 b.length字节从指定的字节数组写入此文件输出流 一次写一个字节数组数据 void write​(byte[] b, int off, int len):将 len字节从指定的字节数组开始,从偏移量off开始写入此文件输出流 一次写一个字节数组的部分数据 */ public class FileOutputStreamDemo02 { public static void main(String[] args) throws IOException { //FileOutputStream​(String name):创建文件输出流以指定的名称写入文件 FileOutputStream fos = new FileOutputStream("myByteStream\\fos.txt"); //new File(name) // FileOutputStream fos = new FileOutputStream(new File("myByteStream\\fos.txt")); //FileOutputStream​(File file):创建文件输出流以写入由指定的 File对象表示的文件 // File file = new File("myByteStream\\fos.txt"); // FileOutputStream fos2 = new FileOutputStream(file); // FileOutputStream fos2 = new FileOutputStream(new File("myByteStream\\fos.txt")); //void write​(int b):将指定的字节写入此文件输出流 // fos.write(97); // fos.write(98); // fos.write(99); // fos.write(100); // fos.write(101); // void write​(byte[] b):将 b.length字节从指定的字节数组写入此文件输出流 // byte[] bys = {97, 98, 99, 100, 101}; //byte[] getBytes​():返回字符串对应的字节数组 byte[] bys = "abcde".getBytes(); // fos.write(bys); //void write​(byte[] b, int off, int len):将 len字节从指定的字节数组开始,从偏移量off开始写入此文件输出流 // fos.write(bys,0,bys.length); fos.write(bys,1,3); //释放资源 fos.close(); } }
[ "981146457@qq.com" ]
981146457@qq.com
ea9802c71c8988841efd1e97ac245ed04fd47c1d
fa434f50e76ce484c1f9ccdc542a612e123e926e
/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/object/icon/ObjectIconService.java
baf09ba287a64d2f506cef87946aba8d245b8f1f
[ "Apache-2.0" ]
permissive
dp-glitch/isis
264c6bf89045a0545ab0ec3c63e7f9f39727d3e7
1b8d43d92289d2d4bd6753108e73f3e697797235
refs/heads/master
2023-06-29T16:31:47.212508
2021-07-23T07:59:46
2021-07-23T07:59:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,848
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.isis.core.metamodel.facets.object.icon; import javax.annotation.Nullable; import org.apache.isis.core.metamodel.spec.ManagedObject; import org.apache.isis.core.metamodel.spec.ObjectSpecification; import lombok.NonNull; /** * Creates {@link ObjectIcon}(s), which are class-path resource references. * <p> * Clients should not use this service directly. Either use * {@link ManagedObject#getIcon()} or * {@link ObjectSpecification#getIcon(org.apache.isis.core.metamodel.spec.ManagedObject)}. * * @apiNote internal service, used by the metamodel * * @see ManagedObject#getIcon() * @see ObjectSpecification#getIcon(org.apache.isis.core.metamodel.spec.ManagedObject) * @since 2.0 */ public interface ObjectIconService { /** * {@link ObjectIcon} for given {@link ObjectSpecification} * and iconNameSuffix. * @return non-null */ ObjectIcon getObjectIcon( @NonNull ObjectSpecification specification, @Nullable String iconNameSuffixIfAny); }
[ "ahuber@apache.org" ]
ahuber@apache.org
77e0e21ee79e3f711a2d94bef696bf11e5f7d5bf
388f88df1f49b5414c22b97304ec295801f7f0f3
/classhidra4ape/src/it/classhidra/framework/web/components/componentLogUsers.java
64339b641555761d99f5ef9e235187923dcbe88a
[]
no_license
surban1974/classhidra
c3f1dcb9546d7d13a235d431492985555fe7a4ac
f0937bed637265e42659c92d863c12c239f55166
refs/heads/master
2023-08-30T04:44:13.153369
2023-08-25T13:50:16
2023-08-25T13:50:16
5,340,773
0
0
null
2022-12-16T07:12:39
2012-08-08T11:25:37
Java
UTF-8
Java
false
false
4,703
java
package it.classhidra.framework.web.components; import it.classhidra.annotation.elements.Action; import it.classhidra.annotation.elements.ActionMapping; import it.classhidra.annotation.elements.Redirect; import it.classhidra.core.controller.action; import it.classhidra.core.controller.bsController; import it.classhidra.core.controller.i_action; import it.classhidra.core.controller.redirects; import it.classhidra.core.init.auth_init; import it.classhidra.core.tool.exception.bsControllerException; import it.classhidra.core.tool.exception.message; import it.classhidra.core.tool.util.util_usersInSession; import java.io.Serializable; import java.util.HashMap; import java.util.Vector; import javax.servlet.ServletException; import javax.servlet.UnavailableException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @ActionMapping ( redirects={ @Redirect( path="/jsp/framework/log_users.jsp", descr="Users In Session", mess_id="title_fw_Log_users" ) } ) @Action ( path="log_users", redirect="/jsp/framework/log_users.jsp", navigated="true", redirects={ @Redirect( auth_id="logu_id", path="*" ) } ) public class componentLogUsers extends action implements i_action, Serializable{ private static final long serialVersionUID = 6534122783978835682L; public redirects actionservice(HttpServletRequest request, HttpServletResponse response) throws ServletException, UnavailableException, bsControllerException { HashMap h_user_container = (HashMap)bsController.getFromLocalContainer(util_usersInSession.CONST_APP_USER_CONTAINER); if(h_user_container==null) h_user_container = new HashMap(); if(this.getMiddleAction()==null) this.setMiddleAction(""); if(this.getMiddleAction().equals("view_mess")){ return new redirects("/jsp/ajax/add_LogUserMess.jsp?session_id="+this.get("session_id")); } if(this.getMiddleAction().equals("add_mess")){ try{ message mess = new message(); mess.setTYPE((String)this.get("type_mess")); auth_init auth = this.getCurrent_auth(); mess.setDESC_MESS("From ["+auth.get_userDesc()+"]"+auth.get_user_ip()+" <br>" + (String)this.get("txcontent")); if(this.get("session_id").toString().equals("0")){ Vector elements = new Vector(h_user_container.keySet()); for(int i=0;i<elements.size();i++){ String key = (String)elements.get(i); HttpSession current_session = (HttpSession)h_user_container.get(key); if(current_session!=null){ Vector $listmessages = (Vector)current_session.getAttribute(bsController.CONST_BEAN_$LISTMESSAGE); if($listmessages==null){ $listmessages = new Vector(); current_session.setAttribute(bsController.CONST_BEAN_$LISTMESSAGE,$listmessages); } $listmessages.add(mess); } } }else{ HttpSession current_session = (HttpSession)h_user_container.get(this.get("session_id").toString()); if(current_session!=null){ Vector $listmessages = (Vector)current_session.getAttribute(bsController.CONST_BEAN_$LISTMESSAGE); if($listmessages==null){ $listmessages = new Vector(); current_session.setAttribute(bsController.CONST_BEAN_$LISTMESSAGE,$listmessages); } $listmessages.add(mess); } } }catch(Exception e){ } } if(this.getMiddleAction().equals("remove")){ try{ HttpSession current_session = (HttpSession)h_user_container.get(this.get("session_id").toString()); auth_init auth = (auth_init)current_session.getAttribute(bsController.CONST_BEAN_$AUTHENTIFICATION); auth.reimposta(); auth.set_logged(false); auth.set_ruolo("guest"); auth.set_user("guest"); auth.set_userDesc("guest"); auth.set_matricola("guest"); auth.set_language("it"); h_user_container.remove(this.get("session_id").toString()); }catch(Exception e){ } } if(this.getMiddleAction().equals("clear")){ h_user_container.clear(); } Vector elements = new Vector(h_user_container.keySet()); int i=0; while(i<elements.size()){ String key = (String)elements.get(i); try{ HttpSession current_session = (HttpSession)h_user_container.get(key); auth_init current_auth = (auth_init)current_session.getAttribute(bsController.CONST_BEAN_$AUTHENTIFICATION); elements.set(i,current_auth); i++; }catch(Exception e){ h_user_container.remove(key); elements.remove(i); } } request.setAttribute("elements", elements); return new redirects(get_infoaction().getRedirect()); } }
[ "svyatoslav.urbanovych@gmail.com" ]
svyatoslav.urbanovych@gmail.com
a0f87d70d79b1aa499a8c9a35671a2c716cca2d1
dd6560c7cb9e0f0ae5423915748b2c75224544e4
/src/main/java/com/example/model/Nhanvien.java
0b845bf55db4e4134030f4ed26eb0aeb93c5e27e
[]
no_license
toannvph05233/Assignment_DuAn1_SpringBoot
6a141ab631805cad363b504a82f6529a7d677f14
ee8fb69142de9922c908fb1bf59cc446539b7972
refs/heads/master
2022-12-09T16:02:51.328609
2020-09-15T11:32:28
2020-09-15T11:32:28
295,706,057
0
0
null
null
null
null
UTF-8
Java
false
false
1,530
java
package com.example.model; import java.io.Serializable; import java.util.Date; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQuery; import javax.persistence.Temporal; import javax.persistence.TemporalType; @Entity @NamedQuery(name="Nhanvien.findAll", query="SELECT n FROM Nhanvien n") public class Nhanvien implements Serializable { private static final long serialVersionUID = 1L; @Id private String manv; private String tennv; private String matkhau; private boolean vaitro; private String quequan; private String sodt; private java.sql.Date ngayvao; public String getManv() { return manv; } public void setManv(String manv) { this.manv = manv; } public String getTennv() { return tennv; } public void setTennv(String tennv) { this.tennv = tennv; } public String getMatkhau() { return matkhau; } public void setMatkhau(String matkhau) { this.matkhau = matkhau; } public boolean isVaitro() { return vaitro; } public void setVaitro(boolean vaitro) { this.vaitro = vaitro; } public String getQuequan() { return quequan; } public void setQuequan(String quequan) { this.quequan = quequan; } public String getSodt() { return sodt; } public void setSodt(String sodt) { this.sodt = sodt; } public Date getNgayvao() { return ngayvao; } public void setNgayvao(java.sql.Date ngayvao) { this.ngayvao = ngayvao; } public static long getSerialversionuid() { return serialVersionUID; } }
[ "=" ]
=
18f5dbed1e8c297c57f40cacccbb5b8d100e1738
7f7bf4a5062bde5a2c9ab101046fb87ee6ba6ac1
/NSL/RapmedixUser/app/src/main/java/com/example/pegasys/rapmedixuser/activity/newactivities/ImageListActivity.java
2ef65593cd202a5ab2930e1660516140bcfc3f81
[]
no_license
srinivasp94/asserts
edceb84e799855456b0c0583b5d4f5067138c062
72f7e50af5d42d99d5ecf2a8da2c9c42868e0ff3
refs/heads/master
2020-03-13T13:15:34.997837
2018-09-28T10:26:51
2018-09-28T10:26:51
131,134,975
1
0
null
null
null
null
UTF-8
Java
false
false
4,180
java
package com.example.pegasys.rapmedixuser.activity.newactivities; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; import android.widget.ListView; import com.example.pegasys.rapmedixuser.R; import com.example.pegasys.rapmedixuser.activity.imageloadingutils.ImageLoader; import com.example.pegasys.rapmedixuser.activity.utils.Constants; import com.squareup.picasso.Picasso; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class ImageListActivity extends AppCompatActivity { private List<String> imgurls = new ArrayList<>(); private GridView imgslist; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_image_list); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); ImageView backButton = toolbar.findViewById(R.id.backbutton); backButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { finish(); } }); imgslist = findViewById(R.id.image_list); Intent inten = getIntent(); if (inten != null) { String s = inten.getStringExtra("Imageurls"); imgurls = Arrays.asList(s.split(",")); } imageAdapter imageAdapter = new imageAdapter(ImageListActivity.this, imgurls); imgslist.setAdapter(imageAdapter); imgslist.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { Intent intent= new Intent(ImageListActivity.this,ImageViewActivity.class); intent.putExtra("Img",imgurls.get(i)); startActivity(intent); } }); } public class imageAdapter extends BaseAdapter { private Context context; private List<String> imgList = new ArrayList<>(); LayoutInflater layoutInflater; public imageAdapter(Context context, List<String> imgList) { this.context = context; this.imgList = imgList; layoutInflater = (LayoutInflater) this.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); } @Override public int getCount() { return imgList.size(); } @Override public Object getItem(int i) { return i; } @Override public long getItemId(int i) { return i; } @Override public View getView(int i, View view, ViewGroup viewGroup) { // if (view == null) { view = layoutInflater.inflate(R.layout.activity_switch_image_example, viewGroup, false); // TouchImageView img = (TouchImageView) view.findViewById(R.id.img); ImageView imageView = view.findViewById(R.id.img); /* int loader = R.drawable.no_image; String image_url = Constants.BASE_URL + "/uploads/health_records/" + imgList.get(i); ImageLoader imgLoader = new ImageLoader(getApplicationContext()); // whenever you want to load an image from url // call DisplayImage function // url - image url to load // loader - loader image, will be displayed before getting image // image - ImageView imgLoader.DisplayImage(image_url, loader, imageView);*/ Picasso.with(context).load(Constants.BASE_URL + "/uploads/health_records/"+ imgList.get(i)).error(R.drawable.no_image).into(imageView); // } return view; } } }
[ "srinivas.pudi94@gmail.com" ]
srinivas.pudi94@gmail.com
644b42dc1da9b2371dd19fbeb0bfa5c6d338d2c0
d3ae635b8a19aa54855b080c69a9bd73d6ba196a
/core/mybatis-generator-systests-mybatis3/src/test/java/mbg/test/mb3/generated/mixed/flat/mapper/PkfieldsMapper.java
cd3803aba2391b84169e5c0a51669bb5503135eb
[ "Apache-2.0" ]
permissive
357037959/mg-code
6afd09838997ed27b3f41cc36d8042969f57adec
9f32bc55b8adc7130f15b4e0d060721ceabc1310
refs/heads/master
2021-01-23T03:37:37.088271
2017-05-02T03:03:23
2017-05-02T03:03:23
86,106,318
0
0
null
null
null
null
UTF-8
Java
false
false
6,297
java
package mbg.test.mb3.generated.mixed.flat.mapper; import java.util.List; import mbg.test.mb3.generated.mixed.flat.model.Pkfields; import mbg.test.mb3.generated.mixed.flat.model.PkfieldsExample; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.ResultMap; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import org.apache.ibatis.session.RowBounds; public interface PkfieldsMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ long countByExample(PkfieldsExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ int deleteByExample(PkfieldsExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ @Delete({ "delete from PKFIELDS", "where ID2 = #{id2,jdbcType=INTEGER}", "and ID1 = #{id1,jdbcType=INTEGER}" }) int deleteByPrimaryKey(@Param("id2") Integer id2, @Param("id1") Integer id1); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ @Insert({ "insert into PKFIELDS (ID2, ID1, ", "FIRSTNAME, LASTNAME, ", "DATEFIELD, TIMEFIELD, ", "TIMESTAMPFIELD, DECIMAL30FIELD, ", "DECIMAL60FIELD, DECIMAL100FIELD, ", "DECIMAL155FIELD, \"wierd$Field\", ", "\"birth date\", STRINGBOOLEAN)", "values (#{id2,jdbcType=INTEGER}, #{id1,jdbcType=INTEGER}, ", "#{firstname,jdbcType=VARCHAR}, #{lastname,jdbcType=VARCHAR}, ", "#{datefield,jdbcType=DATE}, #{timefield,jdbcType=TIME}, ", "#{timestampfield,jdbcType=TIMESTAMP}, #{decimal30field,jdbcType=DECIMAL}, ", "#{decimal60field,jdbcType=DECIMAL}, #{decimal100field,jdbcType=DECIMAL}, ", "#{decimal155field,jdbcType=DECIMAL}, #{wierdField,jdbcType=INTEGER}, ", "#{birthDate,jdbcType=DATE}, #{stringboolean,jdbcType=CHAR})" }) int insert(Pkfields record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ int insertSelective(Pkfields record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ List<Pkfields> selectByExampleWithRowbounds(PkfieldsExample example, RowBounds rowBounds); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ List<Pkfields> selectByExample(PkfieldsExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ @Select({ "select", "B.ID2 as B_ID2, B.ID1 as B_ID1, B.FIRSTNAME as B_FIRSTNAME, B.LASTNAME as B_LASTNAME, ", "B.DATEFIELD as B_DATEFIELD, B.TIMEFIELD as B_TIMEFIELD, B.TIMESTAMPFIELD as B_TIMESTAMPFIELD, ", "B.DECIMAL30FIELD as B_DECIMAL30FIELD, B.DECIMAL60FIELD as B_DECIMAL60FIELD, ", "B.DECIMAL100FIELD as B_DECIMAL100FIELD, B.DECIMAL155FIELD as B_DECIMAL155FIELD, ", "B.\"wierd$Field\" as \"B_wierd$Field\", B.\"birth date\" as \"B_birth date\", ", "B.STRINGBOOLEAN as B_STRINGBOOLEAN", "from PKFIELDS B", "where B.ID2 = #{id2,jdbcType=INTEGER}", "and B.ID1 = #{id1,jdbcType=INTEGER}" }) @ResultMap("mbg.test.mb3.generated.mixed.flat.mapper.PkfieldsMapper.BaseResultMap") Pkfields selectByPrimaryKey(@Param("id2") Integer id2, @Param("id1") Integer id1); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ int updateByExampleSelective(@Param("record") Pkfields record, @Param("example") PkfieldsExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ int updateByExample(@Param("record") Pkfields record, @Param("example") PkfieldsExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ int updateByPrimaryKeySelective(Pkfields record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PKFIELDS * * @mbg.generated Sat Mar 25 03:24:58 CST 2017 */ @Update({ "update PKFIELDS", "set FIRSTNAME = #{firstname,jdbcType=VARCHAR},", "LASTNAME = #{lastname,jdbcType=VARCHAR},", "DATEFIELD = #{datefield,jdbcType=DATE},", "TIMEFIELD = #{timefield,jdbcType=TIME},", "TIMESTAMPFIELD = #{timestampfield,jdbcType=TIMESTAMP},", "DECIMAL30FIELD = #{decimal30field,jdbcType=DECIMAL},", "DECIMAL60FIELD = #{decimal60field,jdbcType=DECIMAL},", "DECIMAL100FIELD = #{decimal100field,jdbcType=DECIMAL},", "DECIMAL155FIELD = #{decimal155field,jdbcType=DECIMAL},", "\"wierd$Field\" = #{wierdField,jdbcType=INTEGER},", "\"birth date\" = #{birthDate,jdbcType=DATE},", "STRINGBOOLEAN = #{stringboolean,jdbcType=CHAR}", "where ID2 = #{id2,jdbcType=INTEGER}", "and ID1 = #{id1,jdbcType=INTEGER}" }) int updateByPrimaryKey(Pkfields record); }
[ "357037959@qq.com" ]
357037959@qq.com
fc69327466b402b20577ae4b5aa974b9d18100db
6392bb7e8e5aa6a060384b304295811f0b231316
/modules/flowable-spring-boot/flowable-spring-boot-starters/flowable-spring-boot-autoconfigure/src/main/java/org/flowable/spring/boot/idm/SpringPasswordEncoder.java
9915caca2ff37a688cea54046ead3651fdc435cb
[ "Apache-2.0" ]
permissive
DLM8207/flowable-engine
5e81dc1ffa396dbe962b6a798beaa972c1283916
90d1c198ec99aef3f30c6ff57ee280811a11c097
refs/heads/master
2020-03-21T17:31:22.209854
2018-10-15T08:29:09
2018-10-15T08:29:09
138,836,650
0
0
Apache-2.0
2018-06-27T06:03:33
2018-06-27T06:03:33
null
UTF-8
Java
false
false
1,676
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.flowable.spring.boot.idm; import org.flowable.idm.api.PasswordEncoder; import org.flowable.idm.api.PasswordSalt; /** * A temporary solution until flowable-idm-spring starts depending on Spring Security 5.x and we can remove the deprecated constructor from there. */ class SpringPasswordEncoder implements PasswordEncoder { private org.springframework.security.crypto.password.PasswordEncoder cryptoPasswordEncoder; SpringPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) { this.cryptoPasswordEncoder = passwordEncoder; } @Override public String encode(CharSequence rawPassword, PasswordSalt passwordSalt) { return cryptoPasswordEncoder.encode(rawPassword); } @Override public boolean isMatches(CharSequence rawPassword, String encodedPassword, PasswordSalt passwordSalt) { return cryptoPasswordEncoder.matches(rawPassword, encodedPassword); } public org.springframework.security.crypto.password.PasswordEncoder getSpringEncodingProvider() { return cryptoPasswordEncoder; } }
[ "filip.hrisafov@gmail.com" ]
filip.hrisafov@gmail.com
c510a05f908d2a0d418bf46d0b6a6cd021671acf
3dd35c0681b374ce31dbb255b87df077387405ff
/generated/com/guidewire/_generated/entity/GLLineSchCovItemCovInternalAccess.java
8bdadd46a99043065744589199678cd7f2ca2e44
[]
no_license
walisashwini/SBTBackup
58b635a358e8992339db8f2cc06978326fed1b99
4d4de43576ec483bc031f3213389f02a92ad7528
refs/heads/master
2023-01-11T09:09:10.205139
2020-11-18T12:11:45
2020-11-18T12:11:45
311,884,817
0
0
null
null
null
null
UTF-8
Java
false
false
877
java
package com.guidewire._generated.entity; @javax.annotation.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "GLLineSchCovItemCov.eti;GLLineSchCovItemCov.eix;GLLineSchCovItemCov.etx") @java.lang.SuppressWarnings(value = {"deprecation", "unchecked"}) public class GLLineSchCovItemCovInternalAccess { public static final com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.InstantiableEntityFriendAccess<entity.GLLineSchCovItemCov, com.guidewire._generated.entity.GLLineSchCovItemCovInternal>> FRIEND_ACCESSOR = new com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.InstantiableEntityFriendAccess<entity.GLLineSchCovItemCov, com.guidewire._generated.entity.GLLineSchCovItemCovInternal>>(entity.GLLineSchCovItemCov.class); private GLLineSchCovItemCovInternalAccess() { } }
[ "ashwini@cruxxtechnologies.com" ]
ashwini@cruxxtechnologies.com
4fc53283ad9a5aef825abf42ae9edb56b458f0ad
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/autonavi/minimap/ajx3/dom/JsDomEventListCellGroup.java
2d970e7a657cc5a993d21a0d13e3b0b71fdd4c7b
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
package com.autonavi.minimap.ajx3.dom; public class JsDomEventListCellGroup extends JsDomEventList { public final JsDomEventListCellGroup group; private native long nativeGetGroups(long j); JsDomEventListCellGroup(int i, long j) { super(i, j); long nativeGetGroups = nativeGetGroups(j); this.group = nativeGetGroups != 0 ? new JsDomEventListCellGroup(i, nativeGetGroups) : null; } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
e56a75b5845bed2e9b1ab6c3acc93871c9eebffb
fd49852c3426acf214b390c33927b5a30aeb0e0a
/aosp/javalib/android/app/WindowTokenClient.java
0ac2f2e4f885ca1eea3c9803473a88f6cc318b78
[]
no_license
HanChangHun/MobilePlus-Prototype
fb72a49d4caa04bce6edb4bc060123c238a6a94e
3047c44a0a2859bf597870b9bf295cf321358de7
refs/heads/main
2023-06-10T19:51:23.186241
2021-06-26T08:28:58
2021-06-26T08:28:58
333,411,414
0
0
null
null
null
null
UTF-8
Java
false
false
1,957
java
package android.app; import android.content.Context; import android.content.res.Configuration; import android.os.IBinder; import android.view.WindowManagerGlobal; import java.lang.ref.WeakReference; public class WindowTokenClient extends IWindowToken.Stub { private WeakReference<WindowContext> mContextRef = null; private final ResourcesManager mResourcesManager = ResourcesManager.getInstance(); void attachContext(WindowContext paramWindowContext) { if (this.mContextRef == null) { this.mContextRef = new WeakReference<>(paramWindowContext); ContextImpl contextImpl = ContextImpl.getImpl((Context)paramWindowContext); contextImpl.setResources(contextImpl.createWindowContextResources()); return; } throw new IllegalStateException("Context is already attached."); } public void onConfigurationChanged(Configuration paramConfiguration, int paramInt) { boolean bool2; Context context = (Context)this.mContextRef.get(); if (context == null) return; int i = context.getDisplayId(); boolean bool1 = true; if (paramInt != i) { bool2 = true; } else { bool2 = false; } if (context.getResources().getConfiguration().diff(paramConfiguration) == 0) bool1 = false; if (bool2 || bool1) this.mResourcesManager.updateResourcesForActivity((IBinder)this, paramConfiguration, paramInt, bool2); if (bool2) context.updateDisplay(paramInt); } public void onWindowTokenRemoved() { WindowContext windowContext = this.mContextRef.get(); if (windowContext != null) { windowContext.destroy(); this.mContextRef.clear(); } WindowManagerGlobal.getInstance().closeAll((IBinder)this, this.mContextRef.getClass().getName(), "WindowContext"); } } /* Location: /home/chun/Desktop/temp/!/android/app/WindowTokenClient.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */
[ "ehwjs1914@naver.com" ]
ehwjs1914@naver.com
a3106e56c86498a5c2e95cbf91fddd96ce816828
2fc61c19fd5c3e82e50eb9f55b20ab6ba4265b65
/ureport2-core/src/main/java/com/bstek/ureport/parser/impl/value/MappingItem.java
e2089bc30fb22b362dab4d539cca98d4abf1f5aa
[ "Apache-2.0" ]
permissive
tanmingft/ureport
66172f3d15ca871e5c1620d8917440f9a38765b6
c58c3421c51b71cb25310a26dc4ebd6bcb0953fb
refs/heads/master
2021-01-20T13:13:35.687558
2017-08-29T08:21:38
2017-08-29T08:21:38
101,741,287
2
0
null
2017-08-29T09:02:03
2017-08-29T09:02:03
null
UTF-8
Java
false
false
1,144
java
/******************************************************************************* * Copyright 2017 Bstek * * 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.bstek.ureport.parser.impl.value; /** * @author Jacky.gao * @since 2017年3月29日 */ public class MappingItem { private String value; private String label; public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getLabel() { return label; } public void setLabel(String label) { this.label = label; } }
[ "jacky6024@sina.com" ]
jacky6024@sina.com
1286a995e5b9ac8d2115dc889b013fcc6eab0647
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/13/13_fbea4f976e432cdfdf0c00076a6b979e26656112/AdminManager/13_fbea4f976e432cdfdf0c00076a6b979e26656112_AdminManager_t.java
c9737f15285ea29f13db4b8171a5f7751a10d445
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,105
java
/* * Straight - A system to manage financial demands for small and decentralized * organizations. * Copyright (C) 2011 Octahedron * * 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 br.octahedron.figgo.modules.admin.manager; import static br.octahedron.cotopaxi.CotopaxiProperty.getProperty; import static br.octahedron.figgo.modules.admin.data.ApplicationConfiguration.APPLICATION_NAME; import br.octahedron.cotopaxi.eventbus.EventBus; import br.octahedron.cotopaxi.inject.Inject; import br.octahedron.figgo.modules.DataDoesNotExistsException; import br.octahedron.figgo.modules.admin.data.ApplicationConfiguration; import br.octahedron.figgo.modules.admin.data.ApplicationConfigurationDAO; import br.octahedron.figgo.modules.admin.util.Route53Exception; import br.octahedron.figgo.modules.admin.util.Route53Util; import br.octahedron.util.Log; /** * The manager for Application Configuration and admin operations * * @author Danilo Penna Queiroz */ public class AdminManager { private static final Log log = new Log(AdminManager.class); @Inject private EventBus eventBus; private ApplicationConfigurationDAO applicationConfigurationDAO = new ApplicationConfigurationDAO(); /** * @param eventBus * the eventBus to set */ public void setEventBus(EventBus eventBus) { log.debug("event bus injected"); this.eventBus = eventBus; } private void createApplicationConfiguration() { ApplicationConfiguration appConf = new ApplicationConfiguration(); this.applicationConfigurationDAO.save(appConf); } /** * @return <code>true</code> if this applications is configured, <code>false</code> otherwise. */ public boolean hasApplicationConfiguration() { return this.applicationConfigurationDAO.exists(APPLICATION_NAME); } /** * @return the application configuration */ public ApplicationConfiguration getApplicationConfiguration() { if (this.hasApplicationConfiguration()) { return this.applicationConfigurationDAO.get(APPLICATION_NAME); } else { throw new DataDoesNotExistsException("This application isn't configured"); } } /** * Configures this application */ public void configureApplication(String route53AccessKeyID, String route53AccessKeySecret, String route53ZoneID) { if (!this.hasApplicationConfiguration()) { this.createApplicationConfiguration(); } ApplicationConfiguration appConf = this.applicationConfigurationDAO.get(APPLICATION_NAME); appConf.setRoute53AccessKeyID(route53AccessKeyID); appConf.setRoute53AccessKeySecret(route53AccessKeySecret); appConf.setRoute53ZoneID(route53ZoneID); } /** * Creates the domain at Rout53 * * @throws Route53Exception * if some error occurs when accessing route53 API */ public void createDomain(String domainName, String adminID, boolean createDNS) { if (this.hasApplicationConfiguration()) { if (createDNS) { String fullDomain = domainName + "." + getProperty("APPLICATION_DOMAIN"); ApplicationConfiguration appConf = this.applicationConfigurationDAO.get(APPLICATION_NAME); Route53Util .createDomain(fullDomain, appConf.getRoute53AccessKeyID(), appConf.getRoute53AccessKeySecret(), appConf.getRoute53ZoneID()); } eventBus.publish(new DomainCreatedEvent(domainName, adminID)); } else { throw new DataDoesNotExistsException("This application isn't configured"); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
eb68cc1e3b3898c8a91a8f5c19ba13d7ed380224
7be33aa30dc35dd82ca0be67242b9cc161facd59
/app/src/main/java/com/massky/sraum/view/SycleSearchView.java
c54d176ed125c93017998a45112df2fb3c11d37c
[]
no_license
1559727195/SraumSmartHome2018-11-8
29b7760abea09aae5fdf6a78f04e4cfb86e2cb51
2767e3fbe4d346fb6b523787e2bd8f9f39127cad
refs/heads/master
2021-10-12T00:45:12.814819
2019-01-31T03:22:59
2019-01-31T03:22:59
156,681,870
1
0
null
null
null
null
UTF-8
Java
false
false
4,369
java
package com.massky.sraum.view; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.Log; import android.view.View; import android.view.WindowManager; import com.massky.sraum.R; /** * Created by zhu on 2018/1/2. */ public class SycleSearchView extends View implements Runnable{ private int width,height; private int srcId; private Bitmap src=null; private Context context; private int left=0,top=0; private int step=4; //5 private boolean positive = true; private Thread thread; private boolean canStart=true; private int iw,ih;//图片的宽高 public SycleSearchView(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub this.context=context; initView(); } private void initView() { src= BitmapFactory.decodeResource(context.getResources(), R.drawable.img_fangdajing); iw=src.getWidth(); ih=src.getHeight(); width = getScreenWidth() / 3; height = getScreenWidth() / 3; left = getScreenWidth() / 3 / 2; } public SycleSearchView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); // TODO Auto-generated constructor stub this.context=context; } // private void init(){ // left=0; // top=height/2; // } /** * * 方法: initXY * 描述: TODO * 参数: @param x * 参数: @param positive true 表示向右运动 * 返回: void * 异常 */ private void initXY(int x){ left=x; top=height/2-(int) Math.sqrt(height*height/4-(width/2-x)*(width/2-x)); if(!positive) { top=height-top; } } @Override protected void onDraw(Canvas canvas) { // TODO Auto-generated method stub super.onDraw(canvas); if(src==null){ return; } canvas.drawBitmap(src, left, top, null);//Bitmap bitmap, float left, float top } public void startsycle(){ canStart=true; Thread localThread = new Thread(this); this.thread = localThread; this.thread.start(); } public void stopsycle(){ canStart=false; if(this.thread!=null){ this.thread.interrupt(); } } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {//画布宽高 // 获取父 View 的测量模式 int mode = MeasureSpec.getMode(widthMeasureSpec); int width = 0; int heigh = 0; switch (mode) { case MeasureSpec.AT_MOST: Log.e("robin debug", "MeasureSpec.AT_MOST"); width = getScreenWidth() / 2; heigh = getScreenWidth() / 2; break;//wrap_content case MeasureSpec.EXACTLY: break;//MatchParent case MeasureSpec.UNSPECIFIED: break; } setMeasuredDimension(width, heigh); } /** * 得到屏幕宽度 * @return */ private int getScreenWidth() { WindowManager windowManager = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE); DisplayMetrics displayMetrics = new DisplayMetrics(); windowManager.getDefaultDisplay().getMetrics(displayMetrics); return displayMetrics.widthPixels; } @Override public void run() { // TODO Auto-generated method stub while(canStart){ if(positive){ if(left+step<width){ initXY(left+step); }else{ positive=!positive; initXY(left-step); } } else { if(left-step>0){ initXY(left-step); } else { positive=!positive; initXY(left+step); } } postInvalidate(); try { Thread.sleep(20); } catch (InterruptedException e) { e.printStackTrace(); } } } }
[ "zhu@gmail.com" ]
zhu@gmail.com
491d58d247f5b6563d90d941d7bef7f2c866333c
93249ac332c0f24bf7642caa21f27058ba99189b
/core/plugins/org.epics.vtype/src/org/epics/vtype/SimpleValueFormat.java
040568c5cfecf50695300363435b9692845f9ab8
[]
no_license
crispd/cs-studio
0678abd0db40f024fbae4420eeda87983f109382
32dd49d1eb744329dc1083b4ba30b65155000ffd
refs/heads/master
2021-01-17T23:59:55.878433
2014-06-20T17:55:02
2014-06-20T17:55:02
21,135,201
1
0
null
null
null
null
UTF-8
Java
false
false
4,678
java
/** * Copyright (C) 2010-14 pvmanager developers. See COPYRIGHT.TXT * All rights reserved. Use is subject to license terms. See LICENSE.TXT */ package org.epics.vtype; import java.text.FieldPosition; import java.text.NumberFormat; import java.util.List; import org.epics.util.array.ListByte; import org.epics.util.array.ListInt; import org.epics.util.array.ListLong; import org.epics.util.array.ListNumber; import org.epics.util.array.ListShort; /** * Default implementation for formatting. * * @author carcassi */ public class SimpleValueFormat extends ValueFormat { private int maxElements; /** * Formats any scalar and array, by using the server side formatting * and limiting the elements of the array displayed to maxElements. * * @param maxElements maximum number of array elements converted to string */ public SimpleValueFormat(int maxElements) { this.maxElements = maxElements; } @Override protected StringBuffer format(Scalar scalar, StringBuffer toAppendTo, FieldPosition pos) { if (scalar == null || scalar.getValue() == null) { return toAppendTo; } if (scalar instanceof Display && nf(scalar) != null) { NumberFormat f = nf(scalar); return f.format(scalar.getValue(), toAppendTo, pos); } toAppendTo.append(scalar.getValue()); return toAppendTo; } /** * Returns the appropriate NumberFormat: either the one * from the data or the set by the formatting options. * * @param obj data object * @return number format */ private NumberFormat nf(Object obj) { if (getNumberFormat() != null) return getNumberFormat(); if (obj instanceof Display) { return ((Display) obj).getFormat(); } return null; } /** * Formats a numeric array. This method can be overridden to change * the way numeric arrays are formatted. * * @param array the array to format * @param toAppendTo the buffer to append to * @param pos the position of the field * @return the string buffer */ protected StringBuffer format(VNumberArray array, StringBuffer toAppendTo, FieldPosition pos) { NumberFormat f = nf(array); toAppendTo.append("["); boolean hasMore = false; ListNumber data = array.getData(); if (data.size() > maxElements) { hasMore = true; } for (int i = 0; i < Math.min(data.size(), maxElements); i++) { if (i != 0) { toAppendTo.append(", "); } if (data instanceof ListByte || data instanceof ListShort || data instanceof ListInt || data instanceof ListLong) { toAppendTo.append(f.format(data.getLong(i))); } else { toAppendTo.append(f.format(data.getDouble(i))); } } if (hasMore) { toAppendTo.append(", ..."); } toAppendTo.append("]"); return toAppendTo; } /** * Formats a string array. This method can be overridden to change * the way string arrays are formatted. * * @param data the data to format * @param toAppendTo the buffer to append to * @param pos the position of the field * @return the string buffer */ protected StringBuffer format(List<String> data, StringBuffer toAppendTo, FieldPosition pos) { toAppendTo.append("["); boolean hasMore = false; if (data.size() > maxElements) { hasMore = true; } for (int i = 0; i < Math.min(data.size(), maxElements); i++) { if (i != 0) { toAppendTo.append(", "); } toAppendTo.append(data.get(i)); } if (hasMore) { toAppendTo.append(", ..."); } toAppendTo.append("]"); return toAppendTo; } @Override protected StringBuffer format(Array array, StringBuffer toAppendTo, FieldPosition pos) { if (array instanceof VNumberArray) { return format((VNumberArray) array, toAppendTo, pos); } if (array instanceof VStringArray) { return format(((VStringArray) array).getData(), toAppendTo, pos); } if (array instanceof VEnumArray) { return format(((VEnumArray) array).getData(), toAppendTo, pos); } throw new UnsupportedOperationException("Type " + array.getClass().getName() + " not yet supported."); } }
[ "gabriele.carcassi@gmail.com" ]
gabriele.carcassi@gmail.com
d7cc452bf0f606556eefe9fd9191206819c6eb0e
35d6550bf531e3ad399603637ad5af54173b7840
/jooby/src/main/java/org/jooby/internal/MutantImpl.java
7677f4fb8a5efc9ad1da232dd2569a600bf35cf7
[ "Apache-2.0" ]
permissive
ben-manes/jooby
d6b1ce6732017b6bcc9605a70dfbc62e7df865ba
09288c885b7091bcf9769e56dcbc6f31f9d2c42c
refs/heads/master
2023-03-19T00:10:14.979267
2016-08-27T04:27:21
2016-08-27T23:14:17
66,695,376
0
0
null
2016-08-27T04:12:16
2016-08-27T04:12:16
null
UTF-8
Java
false
false
4,079
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.jooby.internal; import static javaslang.API.$; import static javaslang.API.Case; import static javaslang.API.Match; import static javaslang.Predicates.instanceOf; import java.util.HashMap; import java.util.Map; import java.util.NoSuchElementException; import org.jooby.Err; import org.jooby.MediaType; import org.jooby.Mutant; import org.jooby.Status; import org.jooby.internal.parser.ParserExecutor; import com.google.common.collect.ImmutableMap; import com.google.inject.TypeLiteral; import javaslang.Tuple; import javaslang.Tuple3; /** * Default mutant implementation. * * NOTE: This class isn't thread-safe. * * @author edgar */ public class MutantImpl implements Mutant { private static final String REQUIRED = "Required %s is not present"; private static final String FAILURE = "Failed to parse %s to '%s'"; private final Map<Object, Object> results = new HashMap<>(1); private final ParserExecutor parser; private Object data; private MediaType type; public MutantImpl(final ParserExecutor parser, final MediaType type, final Object data) { this.parser = parser; this.type = type; this.data = data; } public MutantImpl(final ParserExecutor parser, final Object data) { this(parser, MediaType.plain, data); } @Override public <T> T to(final TypeLiteral<T> type) { return to(type, this.type); } @SuppressWarnings("unchecked") @Override public <T> T to(final TypeLiteral<T> type, final MediaType mtype) { T result = (T) results.get(type); if (result == null) { try { result = parser.convert(type, mtype, data); if (result == ParserExecutor.NO_PARSER) { Tuple3<String, String, Status> md = md(); throw new Err(md._3, String.format(FAILURE, md._2, type)); } results.put(type, result); } catch (NoSuchElementException ex) { Tuple3<String, String, Status> md = md(); throw new Err.Missing(String.format(REQUIRED, md._2)); } catch (Err ex) { throw ex; } catch (Throwable ex) { Tuple3<String, String, Status> md = md(); throw new Err(parser.statusCode(ex), String.format(FAILURE, md._2, type), ex); } } return result; } @SuppressWarnings("unchecked") @Override public Map<String, Mutant> toMap() { if (data instanceof Map) { return (Map<String, Mutant>) data; } return ImmutableMap.of(md()._1, this); } @SuppressWarnings("rawtypes") @Override public boolean isSet() { if (data instanceof ParamReferenceImpl) { return ((ParamReferenceImpl) data).size() > 0; } if (data instanceof BodyReferenceImpl) { return ((BodyReferenceImpl) data).length() > 0; } return ((Map) data).size() > 0; } private Tuple3<String, String, Status> md() { return Match(data).of( Case(instanceOf(ParamReferenceImpl.class), p -> Tuple.of(p.name(), p.type() + " '" + p.name() + "'", Status.BAD_REQUEST)), Case(instanceOf(BodyReferenceImpl.class), Tuple.of("body", "body", Status.UNSUPPORTED_MEDIA_TYPE)), Case($(), Tuple.of("params", "parameters", Status.BAD_REQUEST))); } @Override public String toString() { return data.toString(); } }
[ "espina.edgar@gmail.com" ]
espina.edgar@gmail.com
52b9335043361b96a9930cc750a2d82cee6f098d
3ca53c13d2953805c00406476ceda9684887a8ad
/src/com/iwxxm/taf/CharacterStringPropertyType.java
ad60d7c97c4a15742c50917a1967a8068e699000
[]
no_license
yw2017051032/tac2iwxxm
ae93c12b08b7316cd59de032d4ae2e8082bc6c0b
5a08cb9ecd0833fd4435bf6db81a2b8126380ec1
refs/heads/master
2020-03-17T03:03:06.671868
2018-06-05T16:55:59
2018-06-05T17:06:03
133,217,637
3
0
null
null
null
null
GB18030
Java
false
false
8,231
java
// // 此文件是由 JavaTM Architecture for XML Binding (JAXB) 引用实现 v2.2.8-b130911.1802 生成的 // 请访问 <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // 在重新编译源模式时, 对此文件的所有修改都将丢失。 // 生成时间: 2018.04.04 时间 07:08:22 PM CST // package com.iwxxm.taf; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * <p>CharacterString_PropertyType complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType name="CharacterString_PropertyType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence minOccurs="0"> * &lt;element ref="{http://www.isotc211.org/2005/gco}CharacterString"/> * &lt;/sequence> * &lt;attribute ref="{http://www.isotc211.org/2005/gco}nilReason"/> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CharacterString_PropertyType", namespace = "http://www.isotc211.org/2005/gco", propOrder = { "characterString" }) @XmlSeeAlso({ PTFreeTextPropertyType.class }) public class CharacterStringPropertyType { @XmlElementRef(name = "CharacterString", namespace = "http://www.isotc211.org/2005/gco", type = JAXBElement.class, required = false) protected JAXBElement<?> characterString; @XmlAttribute(name = "nilReason", namespace = "http://www.isotc211.org/2005/gco") protected List<String> nilReason; /** * 获取characterString属性的值。 * * @return * possible object is * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link LocalisedCharacterStringType }{@code >} * {@link JAXBElement }{@code <}{@link MDTopicCategoryCodeType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link MDObligationCodeType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link MDPixelOrientationCodeType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * */ public JAXBElement<?> getCharacterString() { return characterString; } /** * 设置characterString属性的值。 * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link LocalisedCharacterStringType }{@code >} * {@link JAXBElement }{@code <}{@link MDTopicCategoryCodeType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link MDObligationCodeType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link MDPixelOrientationCodeType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * {@link JAXBElement }{@code <}{@link CodeListValueType }{@code >} * */ public void setCharacterString(JAXBElement<?> value) { this.characterString = value; } /** * Gets the value of the nilReason property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the nilReason property. * * <p> * For example, to add a new item, do as follows: * <pre> * getNilReason().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getNilReason() { if (nilReason == null) { nilReason = new ArrayList<String>(); } return this.nilReason; } }
[ "852406820@qq.com" ]
852406820@qq.com
37afafd0e3db027833f7be28f6e1b515f150104e
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/a0e3fdae706d528dcf146cbad986ba9fd834440a7b500e32f04fad073e955a46e481c713ee118432f3fd5dfa1a63fc1caefd648a56a389e40e6362dfd51625b0/010/mutations/37/grade_a0e3fdae_010.java
f650c0f58f5a35fcb8adf9d7e5c62fb9bbe8f96d
[]
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,767
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 grade_a0e3fdae_010 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_a0e3fdae_010 mainClass = new grade_a0e3fdae_010 (); 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 { FloatObj th_1 = new FloatObj (), th_2 = new FloatObj (), th_3 = new FloatObj (), th_4 = new FloatObj (), score = new FloatObj (); output += (String.format ("Enter thresholds for A, B, C, D \n in that order, decreasing percentages> ")); th_1.value = scanner.nextFloat (); th_2.value = scanner.nextFloat (); th_3.value = scanner.nextFloat (); th_4.value = scanner.nextFloat (); output += (String.format ("Thank you. Now enter student score (percent) > ")); score.value = scanner.nextFloat (); if (score.value >= th_1.value) { output += (String.format ("Student has an A grade \n")); } else { if (th_2.value <= score.value && score.value < th_1.value) { output += (String.format ("Student has an B grade \n")); } else { if (th_3.value <= score.value && score.value < th_2.value) { output += (String.format ("Student has an C grade \n")); } else { if (th_4.value <= score.value && score.value) < (th_4.value) { output += (String.format ("Student has an D grade \n")); } else { if (score.value < th_4.value) { output += (String.format ("Student has an F grade \n")); } } } } } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
79d690ac685fae4b62b2c23aff2d913346124cd5
d26f11c1611b299e169e6a027f551a3deeecb534
/e4/org/fdesigner/e4/core/services/internal/services/about/PrintedMap.java
050d6cf60c4eb079b5e2a6671d87207222df5629
[]
no_license
WeControlTheFuture/fdesigner-ui
1bc401fd71a57985544220b9f9e42cf18db6491d
62efb51e57e5d7f25654e67ef8b2762311b766b6
refs/heads/master
2020-11-24T15:00:24.450846
2019-12-27T08:47:23
2019-12-27T08:47:23
228,199,674
0
0
null
null
null
null
UTF-8
Java
false
false
1,893
java
/******************************************************************************* * Copyright (c) 2019 ArSysOp and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * Alexander Fedorov <alexander.fedorov@arsysop.ru> - initial API and implementation *******************************************************************************/ package org.fdesigner.e4.core.services.internal.services.about; import java.io.PrintWriter; import java.util.Map.Entry; import java.util.TreeMap; import java.util.stream.Collectors; import java.util.stream.IntStream; import java.util.stream.Stream; import org.fdesigner.e4.core.services.about.ISystemInformation; abstract class PrintedMap implements ISystemInformation { @Override public void append(PrintWriter writer) { source().entrySet().stream().flatMap(x -> mapEntry(x)).forEach((String s) -> writer.println(s)); } protected abstract TreeMap<String, String> source(); private Stream<String> mapEntry(Entry<String, String> entry) { String key = entry.getKey(); String value = entry.getValue(); if (needsSecurity(key)) { return Stream.of(pair(key, secure(value))); } else { return Stream.of(plain(pair(key, value))); } } private boolean needsSecurity(String key) { return key.toUpperCase().contains("PASSWORD"); //$NON-NLS-1$ } private String pair(String key, String value) { return String.format("%s=%s", key, value); //$NON-NLS-1$ } private String secure(String raw) { return IntStream.range(0, raw.length()).mapToObj(i -> "*").collect(Collectors.joining()); //$NON-NLS-1$ } private String[] plain(String raw) { return raw.split("\n"); //$NON-NLS-1$ } }
[ "491676539@qq.com" ]
491676539@qq.com
38fa53b7e269a1aff23d20bd35582682b39918cc
74631e540538f3847c6bd78ddfbeee3564990410
/02. Multidimensional Arrays - Lab/src/com/company/_03_IntersectionOfTwoMatrices.java
22b08870ee3bd0e67343444461c8f0c75dfbcbf2
[]
no_license
thekoceto/JavaAdvanced
a1269f18b6d29f82de060d66df6eb3ebfc3644b6
3275745b70b06c58a536ea823b1ecc1f2863d335
refs/heads/master
2022-11-10T11:45:30.862968
2020-06-28T20:57:00
2020-06-28T20:57:00
265,676,657
0
0
null
null
null
null
UTF-8
Java
false
false
910
java
package com.company; import java.util.Scanner; public class _03_IntersectionOfTwoMatrices { public static void main(String[] args) { Scanner console = new Scanner(System.in); int row = Integer.parseInt(console.nextLine()); int col = Integer.parseInt(console.nextLine()); String [][] m1 = new String[row][col]; String [][] m2 = new String[row][col]; for (int i = 0; i < row; i++) m1[i] = console.nextLine().split("\\s+"); for (int i = 0; i < row; i++) m2[i] = console.nextLine().split("\\s+"); check(m1, m2); } private static void check(String[][] m1, String[][] m2) { for (int i = 0; i < m1.length; i++) { for (int j = 0; j < m1[i].length; j++) System.out.print(m1[i][j].equals(m2[i][j]) ? m1[i][j] + " " : "* " ); System.out.println(); } } }
[ "thekoceto@mail.bg" ]
thekoceto@mail.bg
ff7e1362d618067f3a1c5f78c3ec3350bcecae70
a55a5fd9337709c10270f734828dd271c118afcd
/sql2xml/src/gudusoft/gsqlparser/sql2xml/model/time_zone_interval.java
cfb9b82f572770f655b71b7c1396f6804255ea5a
[ "Apache-2.0" ]
permissive
sqlparser/sql2xml
321653c4b136acf00b64f314e90253159e1fe6f8
e8e336923b11951e03fe50b182752012e7e8b481
refs/heads/master
2021-01-01T17:28:37.685251
2014-01-10T10:51:42
2014-01-10T10:51:42
14,269,568
6
1
null
null
null
null
UTF-8
Java
false
false
532
java
package gudusoft.gsqlparser.sql2xml.model; import org.simpleframework.xml.Element; public class time_zone_interval { @Element private sign sign = new sign( ); @Element private hours_value hours_value = new hours_value( ); @Element private String colon = ":"; @Element private minutes_value minutes_value = new minutes_value( ); public sign getSign( ) { return sign; } public hours_value getHours_value( ) { return hours_value; } public minutes_value getMinutes_value( ) { return minutes_value; } }
[ "cnfree2000@hotmail.com" ]
cnfree2000@hotmail.com
3bd95630aa1f624c39ef4b5061a38f04196d1cb7
d3fa8ded9d393ba9b03388ba7f05fc559cf31d1e
/Codes/server/web/api/src/test/java/uyun/bat/web/api/EntityTest.java
bffec13485d133a4a82a4d38a39c9de61ebcf0e4
[]
no_license
lengxu/YouYun
e20c4d8f553ccb245e96de177a67f776666e986f
b0ad8fd0b0e70dd2445cecb9ae7b00f7e0a20815
refs/heads/master
2020-09-13T22:30:49.642980
2017-11-27T03:13:34
2017-11-27T03:13:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,285
java
package uyun.bat.web.api; import static org.junit.Assert.assertTrue; import org.junit.Test; import uyun.bat.common.test.entity.EntityTestUtil; public class EntityTest { @Test public void testAgent() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.agent"); assertTrue(true); } catch (Exception e) { assertTrue(false); } } @Test public void testAgentconfig() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.agentconfig"); assertTrue(true); } catch (Exception e) { assertTrue(false); } } @Test public void testCommon() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.common"); assertTrue(true); } catch (Exception e) { assertTrue(false); } } @Test public void testDashboard() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.dashboard"); assertTrue(true); } catch (Exception e) { assertTrue(false); } } @Test public void testEvent() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.event"); assertTrue(true); } catch (Exception e) { assertTrue(false); } } @Test public void testFavourite() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.favourite"); assertTrue(true); } catch (Exception e) { assertTrue(false); } } @Test public void testMetric() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.metric"); assertTrue(true); } catch (Exception e) { e.printStackTrace(); assertTrue(false); } } @Test public void testMonitor() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.monitor"); assertTrue(true); } catch (Exception e) { assertTrue(false); } } @Test public void testReference() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.reference"); assertTrue(true); } catch (Exception e) { assertTrue(false); } } @Test public void testResource() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.resource"); assertTrue(true); } catch (Exception e) { assertTrue(false); } } @Test public void testState() { try { EntityTestUtil.testPackageClasses("uyun.bat.web.api.state"); assertTrue(true); } catch (Exception e) { e.printStackTrace(); assertTrue(false); } } }
[ "smartbrandnew@163.com" ]
smartbrandnew@163.com
b13ea63a617a229ce531d148fb34c31e20e76ba3
47798511441d7b091a394986afd1f72e8f9ff7ab
/src/main/java/com/alipay/api/domain/AlipayOpenAppSilanApigrayoneQueryModel.java
f345486f825460039fd389198c20b39c2f4b91f7
[ "Apache-2.0" ]
permissive
yihukurama/alipay-sdk-java-all
c53d898371032ed5f296b679fd62335511e4a310
0bf19c486251505b559863998b41636d53c13d41
refs/heads/master
2022-07-01T09:33:14.557065
2020-05-07T11:20:51
2020-05-07T11:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
587
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 思蓝灰度Zone测试接口one * * @author auto create * @since 1.0, 2018-07-12 16:34:09 */ public class AlipayOpenAppSilanApigrayoneQueryModel extends AlipayObject { private static final long serialVersionUID = 7712537973315518229L; /** * param */ @ApiField("param_1") private String param1; public String getParam1() { return this.param1; } public void setParam1(String param1) { this.param1 = param1; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
389bf717e9cdc620aa15a7be5fd9a7fb3891710a
6d376453a4638e3691d58838b4efd0010da396c1
/src/main/java/com/ebiznext/jhipster/application/config/LiquibaseConfiguration.java
f95d508f297ff6e64ba38b020ed0e24d9b510401
[]
no_license
zedach/microserviceBlueprint
2278d5dbfc7f7d8ae3fd9a5dc0b1fb35079eec73
27ca8a8a8537912063a0d1dd39e2cd009665fa1c
refs/heads/master
2020-03-23T08:12:26.489718
2018-07-17T16:10:13
2018-07-17T16:10:13
141,313,833
0
0
null
null
null
null
UTF-8
Java
false
false
2,089
java
package com.ebiznext.jhipster.application.config; import javax.sql.DataSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.cache.CacheManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.env.Environment; import org.springframework.core.task.TaskExecutor; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.config.liquibase.AsyncSpringLiquibase; import liquibase.integration.spring.SpringLiquibase; @Configuration public class LiquibaseConfiguration { private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); private final Environment env; private final CacheManager cacheManager; public LiquibaseConfiguration(Environment env, CacheManager cacheManager) { this.env = env; this.cacheManager = cacheManager; } @Bean public SpringLiquibase liquibase(@Qualifier("taskExecutor") TaskExecutor taskExecutor, DataSource dataSource, LiquibaseProperties liquibaseProperties) { // Use liquibase.integration.spring.SpringLiquibase if you don't want Liquibase to start asynchronously SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env); liquibase.setDataSource(dataSource); liquibase.setChangeLog("classpath:config/liquibase/master.xml"); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefaultSchema()); liquibase.setDropFirst(liquibaseProperties.isDropFirst()); if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_NO_LIQUIBASE)) { liquibase.setShouldRun(false); } else { liquibase.setShouldRun(liquibaseProperties.isEnabled()); log.debug("Configuring Liquibase"); } return liquibase; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
b6416ac5b3f62120f62cc5d12a74395207e26ef3
f3a4a9028338630f5e2f30654dea92ea5acda01b
/CPS-Transformer/src/nano/syntaxtree/FormalParameter.java
6a8286a25fc1492630392d6514946217b36f037e
[]
no_license
pradeep90/POPL
c71ceb0fc9c9ed4a002c95b76e3dbdd7fe911951
2716cc3cbf6242fd073ef8147594f7afc387c96b
refs/heads/master
2021-10-28T06:27:28.639694
2016-10-10T21:24:25
2016-10-10T21:24:25
7,853,403
0
1
null
null
null
null
UTF-8
Java
false
false
682
java
// // Generated by JTB 1.3.2 // package nano.syntaxtree; /** * Grammar production: * f0 -> Type() * f1 -> Identifier() */ public class FormalParameter implements Node { public Type f0; public Identifier f1; public FormalParameter(Type n0, Identifier n1) { f0 = n0; f1 = n1; } public void accept(nano.visitor.Visitor v) { v.visit(this); } public <R,A> R accept(nano.visitor.GJVisitor<R,A> v, A argu) { return v.visit(this,argu); } public <R> R accept(nano.visitor.GJNoArguVisitor<R> v) { return v.visit(this); } public <A> void accept(nano.visitor.GJVoidVisitor<A> v, A argu) { v.visit(this,argu); } }
[ "gohanpra@gmail.com" ]
gohanpra@gmail.com
7c4927e72aee14393befee3afce756b3c565b25e
e92cda89f4a32f1e89d5862d0480d2e14c2d64ca
/teams/zephyr24_bashers/MessageBoard.java
4d0c782268278add302296521350dd66a19819f1
[]
no_license
TheDuck314/battlecode2015
e2d29e518137c563c265f854a27faba2c78c16cf
845e52bec1a7cb9f3f7f19a3415b5635d44a2fa6
refs/heads/master
2016-09-05T21:26:23.066985
2015-02-16T17:34:22
2015-02-16T17:34:22
28,834,784
14
5
null
null
null
null
UTF-8
Java
false
false
2,547
java
package zephyr24_bashers; import battlecode.common.*; public enum MessageBoard { DESIRED_BUILDING(0), RALLY_LOC(1), NEEDIEST_SUPPLY_LOC(3), MAX_SUPPLY_NEEDED(5), MAP_MIN_X(6), MAP_MAX_X(7), MAP_MIN_Y(8), MAP_MAX_Y(9), FINAL_ATTACK_SIGNAL(10), RESUPPLY_DRONE_ID(11), CONSTRUCTION_ORDERS(100); public static void setDefaultChannelValues() throws GameActionException { DESIRED_BUILDING.writeRobotType(RobotType.MINERFACTORY); RALLY_LOC.writeMapLocation(new MapLocation(Bot.rc.senseHQLocation().x, Bot.rc.senseHQLocation().y)); MAP_MIN_X.writeInt(-MeasureMapSize.COORD_UNKNOWN); MAP_MAX_X.writeInt(MeasureMapSize.COORD_UNKNOWN); MAP_MIN_Y.writeInt(-MeasureMapSize.COORD_UNKNOWN); MAP_MAX_Y.writeInt(MeasureMapSize.COORD_UNKNOWN); // construction orders are set to false by default } private final int channel; private MessageBoard(int theChannel) { channel = theChannel; } public void writeInt(int data) throws GameActionException { Bot.rc.broadcast(channel, data); } public int readInt() throws GameActionException { return Bot.rc.readBroadcast(channel); } public void incrementInt() throws GameActionException { writeInt(1 + readInt()); } public void writeBoolean(boolean bool) throws GameActionException { writeInt(bool ? 1 : 0); } public boolean readBoolean() throws GameActionException { return readInt() == 1; } public void writeMapLocation(MapLocation loc) throws GameActionException { Bot.rc.broadcast(channel, loc.x); Bot.rc.broadcast(channel+1, loc.y); } public MapLocation readMapLocation() throws GameActionException { return new MapLocation(Bot.rc.readBroadcast(channel), Bot.rc.readBroadcast(channel+1)); } public void writeRobotType(RobotType rt) throws GameActionException { writeInt(rt.ordinal()); } public RobotType readRobotType() throws GameActionException { return RobotType.values()[readInt()]; } public void writeConstructionOrder(RobotType rt, boolean order) throws GameActionException { Bot.rc.broadcast(channel + rt.ordinal(), order ? 1 : 0); } public boolean readConstructionOrder(RobotType rt) throws GameActionException { return Bot.rc.readBroadcast(channel + rt.ordinal()) == 1; } }
[ "theduck314@gmail.com" ]
theduck314@gmail.com
f8e6fa5b322a1e700c47acf488c00fa0e9f69596
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_49789.java
4c162faed42418921b7ebfcbbe5322042ca996ac
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
187
java
public Node appendChild(Node newChild) throws DOMException { ((NodeImpl)newChild).setParentNode(this); mChildNodes.remove(newChild); mChildNodes.add(newChild); return newChild; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
760f6f6c3a7e3a341304106cfe934b0372baa20b
599adceef8bb0c314182a0a38d0afa936bdafaf5
/yugandhar-open-mdmhub-jeec/yugandhar-mdmhub-component-jeec/src/main/java/com/yugandhar/mdm/corecomponent/PropertyComponentRule.java
3e615d246983989d12e31fa5c6f606a7e7452dc3
[ "Apache-2.0" ]
permissive
yugandharproject/yugandhar-open-mdmhub
7631c4dc77e9d72921d5c63351378208a9fec9d2
1672a6e0551d94a857366d5393603175020c7297
refs/heads/master
2020-03-20T12:55:55.943439
2018-07-27T05:34:41
2018-07-27T05:34:41
137,443,949
1
0
null
null
null
null
UTF-8
Java
false
false
4,233
java
package com.yugandhar.mdm.corecomponent; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import com.yugandhar.common.exception.YugandharCommonException; import com.yugandhar.common.transobj.TxnTransferObj; import com.yugandhar.common.util.CommonValidationUtil; import com.yugandhar.mdm.component.util.ReferenceTableHelper; import com.yugandhar.mdm.extern.dobj.PropertyDO; @Scope(value = "prototype") @Component public class PropertyComponentRule { @Autowired protected CommonValidationUtil commonValidationUtil; @Autowired ReferenceTableHelper referenceTableHelper; /** * Pre execute persist validation method for PropertyComp to validate * mandatory attributes etc This method is modularized in respective rule * class Use Aspect Oriented Programming (AOP) based Yugandhar Rule to * override / extend the default OOTB validation * * @throws YugandharCommonException */ public void prevalidatePropertyCompPersit(TxnTransferObj txnTransferObj) { // TODO Auto-generated method stub } /** * Pre execute merge validation method for PropertyComp to validate * mandatory attributes etc This method is modularized in respective rule * class Use Aspect Oriented Programming (AOP) based Yugandhar Rule to * override / extend the default OOTB validation * * @throws YugandharCommonException */ public void PrevalidatePropertyCompMerge(TxnTransferObj txnTransferObj) { // TODO Auto-generated method stub } /** * Pre execute findbyId validation method for PropertyComp to validate * mandatory attributes etc This method is modularized in respective rule * class Use Aspect Oriented Programming (AOP) based Yugandhar Rule to * override / extend the default OOTB validation * * @throws YugandharCommonException */ public void prevalidatePropertyCompFindById(TxnTransferObj txnTransferObj) { // TODO Auto-generated method stub } /** * Pre execute rule for persist in PropertyComp This method is modularized * in respective rule class Use Aspect Oriented Programming (AOP) based * Yugandhar Rule to override / extend the default OOTB validation * * @throws YugandharCommonException */ public void preExecutePropertyCompPersist(PropertyDO reqPropertyDO, TxnTransferObj txnTransferObj) { // TODO Auto-generated method stub } /** * Pre execute rule for persist in PropertyComp This method is modularized * in respective rule class Use Aspect Oriented Programming (AOP) based * Yugandhar Rule to override / extend the default OOTB validation * * @throws YugandharCommonException */ public void postExecutePropertyCompPersit(TxnTransferObj txnTransferObj) { // TODO Auto-generated method stub } /** * Pre execute rule for merge in PropertyComp This method is modularized in * respective rule class Use Aspect Oriented Programming (AOP) based * Yugandhar Rule to override / extend the default OOTB validation * * @throws YugandharCommonException */ public void preExecutePropertyCompMerge(PropertyDO reqPropertyDO, PropertyDO dbimagePropertyDO, TxnTransferObj txnTransferObj) { if (dbimagePropertyDO.getPropertyName().isEmpty()) { throw commonValidationUtil.populateValidationErrorResponse(txnTransferObj, "10024", "Recieved empty string for PropertyDO.propertyName, this attribute cannot be updated to null"); } } /** * Pre execute rule for merge in PropertyComp This method is modularized in * respective rule class Use Aspect Oriented Programming (AOP) based * Yugandhar Rule to override / extend the default OOTB validation * * @throws YugandharCommonException */ public void postExecutePropertyCompMerge(TxnTransferObj txnTransferObj) { // TODO Auto-generated method stub } /** * Pre execute rule for findbyId in PropertyComp This method is modularized * in respective rule class Use Aspect Oriented Programming (AOP) based * Yugandhar Rule to override / extend the default OOTB validation * * @throws YugandharCommonException */ public void postExecutePropertyCompFindById(TxnTransferObj txnTransferObj) { // TODO Auto-generated method stub } }
[ "rakeshvikharblogger@gmail.com" ]
rakeshvikharblogger@gmail.com
b056340765349b407ba8d4e52f580d8a62fb91b8
056ff5f928aec62606f95a6f90c2865dc126bddc
/javashop/shop-core/src/main/java/com/enation/app/shop/component/payment/plugin/alipay/sdk34/api/domain/AlipayMarketingCampaignRuleCrowdCountModel.java
6731e8c1a3e870372081c00e1ad5cc98b64e442b
[]
no_license
luobintianya/javashop
7846c7f1037652dbfdd57e24ae2c38237feb1104
ac15b14e8f6511afba93af60e8878ff44e380621
refs/heads/master
2022-11-17T11:12:39.060690
2019-09-04T08:57:58
2019-09-04T08:57:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,019
java
package com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.domain; import com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.AlipayObject; import com.enation.app.shop.component.payment.plugin.alipay.sdk34.api.internal.mapping.ApiField; /** * 计算所选标签人数 * * @author auto create * @since 1.0, 2016-12-19 15:27:28 */ public class AlipayMarketingCampaignRuleCrowdCountModel extends AlipayObject { private static final long serialVersionUID = 3532354382211528565L; /** * 签约商户下属机构唯一编号 */ @ApiField("mpid") private String mpid; /** * 统计规则所圈定的人数,为空的时候,统计所选标签的人数(取scenetagjson的值) */ @ApiField("ruleid") private String ruleid; /** * tagCode:标签别名,指定标签类型,如城市、年龄等,如pubsrv_city_code为城市标签,创建时必填,可传入多组标签 op:操作码,EQ(等于)、IN(包含),tagCode与op绑定,以查询出来的标签操作符确定该用EQ还是IN value:tagCode对应选中的值,如:440100为城市地区代码,可支持多个 具体参数参考如下: 1)消费能力:pubsrv_consume_level 操作符:(EQ、IN) 枚举值:高、中、低 2)性别:pubsrv_gender 操作符:(EQ) 枚举值:1男,2女,0未知 3)年龄区间:pubsrv_age操作符:(EQ、IN) 枚举值见后面年龄区间标签枚举定义 4)职业:pubsrv_occupation操作符:(EQ) 枚举值:白领、大学生、未知 5)常驻城市CODE:pubsrv_city_code操作符:(EQ) 行政区划代码 样例数据:440100 6)住房类型:pubsrv_house_type操作符:(EQ) 枚举值:rent 租房,home 自有住房,other 其他 7)婚姻状态:pubsrv_is_married操作符:(EQ) 枚举值:0 否,1 是 8)是否有小孩:pubsrv_have_baby操作符:(EQ) 枚举值:0 否,1 是 9)是否实名认证:pubsrv_is_realname操作符:(EQ) 枚举值:0 否,1 是,2 未知 10)是否有车:pubsrv_have_auto操作符:(EQ) 枚举值:0 否,1 是,2 未知 11)达人偏好:pubsrv_preference操作符:(IN) 多值列,枚举值:travel=旅游;video=影视;game=游戏;music=音乐;photography=摄影;pet=宠物;sports=运动;digital=数码 * 年龄区间标签枚举 枚举值: 1-11 user_age <=17 then 1 [18,20] then 2 [21,25] then 3 [26,30] then 4 [31,35] then 5 [36,40] then 6 [41,45] then 7 [46,50] then 8 [51,55] then 9 [56,60] then 10 user_age >60 then 11 */ @ApiField("scenetagjson") private String scenetagjson; public String getMpid() { return this.mpid; } public void setMpid(String mpid) { this.mpid = mpid; } public String getRuleid() { return this.ruleid; } public void setRuleid(String ruleid) { this.ruleid = ruleid; } public String getScenetagjson() { return this.scenetagjson; } public void setScenetagjson(String scenetagjson) { this.scenetagjson = scenetagjson; } }
[ "sylow@javashop.cn" ]
sylow@javashop.cn
cabad4cb7e4140eece3a24fb1ecbdaf916ae5888
858761a5810934c51cb0987903f3f97f161bc4a6
/tags/kernel-1.0.15/api/src/main/java/org/sakaiproject/user/api/UserEdit.java
d6bdc0ac4cb2f47ee30129c684016e699bbf556b
[]
no_license
svn2github/sakai-kernel
f10821d51e39651788c97e1d2739f762c25e79de
2b97c9b7ad53becc8de57a5233c7d35873edd10d
refs/heads/master
2020-04-14T21:44:05.973159
2014-12-23T21:38:01
2014-12-23T21:38:01
10,166,725
1
0
null
null
null
null
UTF-8
Java
false
false
2,793
java
/********************************************************************************** * $URL$ * $Id$ *********************************************************************************** * * Copyright (c) 2003, 2004, 2005, 2006, 2008 Sakai Foundation * * Licensed under the Educational Community License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.osedu.org/licenses/ECL-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.sakaiproject.user.api; import org.sakaiproject.entity.api.Edit; /** * <p> * UserEdit is a mutable User object. * </p> */ public interface UserEdit extends User, Edit { /** * Set the user's id. Note: this is a special purpose routine that is used only to establish the id field, when the id is null, and cannot be used to change a user's id, which is defined to be an un-changing value. * * @param name * The user id. */ void setId(String id); /** * Set the user's enterprise id. Must be unique among all users. * * @param eid * The new eid value. */ void setEid(String eid); /** * Set the email address. * * @param email * The email address string. */ void setEmail(String email); /** * Set the user's first name. * * @param name * The user's first name. */ void setFirstName(String name); /** * Set the user's last name. * * @param name * The user's last name. */ void setLastName(String name); /** * Set the user's password * * @param pw * The user's new password. */ void setPassword(String pw); /** * Set the user type. * * @param type * The user type. */ void setType(String type); /** * Make the user's first name unchangable during this edit * */ void restrictEditFirstName(); /** * Make the user's last name unchangable during this edit * */ void restrictEditLastName(); /** * Make the user's email address unchangable during this edit * */ void restrictEditEmail(); /** * Make the user's password unchangable during this edit * */ void restrictEditPassword(); /** * Make the user's type unchangable during this edit * */ void restrictEditType(); /** * Make the users eid unchangeable during the edit */ void restrictEditEid(); }
[ "arwhyte@umich.edu@66ffb92e-73f9-0310-93c1-f5514f145a0a" ]
arwhyte@umich.edu@66ffb92e-73f9-0310-93c1-f5514f145a0a
6472b2267abf300704694196ea7325cb8c465d05
99c7920038f551b8c16e472840c78afc3d567021
/aliyun-java-sdk-drds-v5/src/main/java/com/aliyuncs/v5/drds/model/v20190123/EnableSqlFlashbackMatchSwitchRequest.java
aee380e3dbc290c50b66b91c7f39e34ef8843351
[ "Apache-2.0" ]
permissive
aliyun/aliyun-openapi-java-sdk-v5
9fa211e248b16c36d29b1a04662153a61a51ec88
0ece7a0ba3730796e7a7ce4970a23865cd11b57c
refs/heads/master
2023-03-13T01:32:07.260745
2021-10-18T08:07:02
2021-10-18T08:07:02
263,800,324
4
2
NOASSERTION
2022-05-20T22:01:22
2020-05-14T02:58:50
Java
UTF-8
Java
false
false
1,982
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.v5.drds.model.v20190123; import com.aliyuncs.v5.RpcAcsRequest; import com.aliyuncs.v5.http.MethodType; import com.aliyuncs.v5.drds.Endpoint; /** * @author auto create * @version */ public class EnableSqlFlashbackMatchSwitchRequest extends RpcAcsRequest<EnableSqlFlashbackMatchSwitchResponse> { private String drdsInstanceId; private String dbName; public EnableSqlFlashbackMatchSwitchRequest() { super("Drds", "2019-01-23", "EnableSqlFlashbackMatchSwitch", "drds"); setMethod(MethodType.POST); try { com.aliyuncs.v5.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap); com.aliyuncs.v5.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType); } catch (Exception e) {} } public String getDrdsInstanceId() { return this.drdsInstanceId; } public void setDrdsInstanceId(String drdsInstanceId) { this.drdsInstanceId = drdsInstanceId; if(drdsInstanceId != null){ putQueryParameter("DrdsInstanceId", drdsInstanceId); } } public String getDbName() { return this.dbName; } public void setDbName(String dbName) { this.dbName = dbName; if(dbName != null){ putQueryParameter("DbName", dbName); } } @Override public Class<EnableSqlFlashbackMatchSwitchResponse> getResponseClass() { return EnableSqlFlashbackMatchSwitchResponse.class; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
2112a708ce177cc8d544d8379b4042bd48b759bc
84c3301dd799d1d0e7de58ed50f30719568760e6
/pu/.svn/pristine/d3/d3d8431d6715ed09695f66aef026e7115d845e26.svn-base
aa1045b02a63b72f283854d3569c92388629c020
[]
no_license
hljlgj/YonyouNC
264d1f38b76fb3c9937603dd48753a9b2666c3ee
fec9955513594a3095be76c4d7f98b0927d721b6
refs/heads/master
2020-06-12T08:25:44.710709
2018-07-04T09:11:33
2018-07-04T09:11:33
null
0
0
null
null
null
null
GB18030
Java
false
false
5,581
package nc.itf.pu.m27; import nc.vo.pu.m25.settle.FeeDiscountSettleVO; import nc.vo.pu.m25.settle.InvoiceSettleVO; import nc.vo.pu.m27.entity.SettleBillVO; import nc.vo.pu.m27.entity.StockSettleVO; import nc.vo.pu.m27.pub.SettleEnvironment; import nc.vo.pub.BusinessException; import nc.vo.pubapp.pattern.pub.MapList; /** * <p> * <b>本类主要完成以下功能:</b> * <ul> * <li>采购结算的匹配服务 * </ul> * <p> * <p> * * @version 6.0 * @since 6.0 * @author duy * @time 2010-8-31 下午07:47:27 */ public interface ISettleMatch { /** * 方法功能描述: 自动结算的匹配服务 * <p> * <b>参数说明</b> * * @param voaInvoice 发票VO[] * @param voaStock 库存单据VO[] * @param voaFee 费用发票VO[] * @param voaDiscount 折扣发票VO[] * @param settleEnv 结算环境 * @return 结算完毕的结算单VO数组 * @throws BusinessException <p> * @since 6.0 * @author duy * @time 2010-8-31 下午07:48:04 */ public SettleBillVO[] autoMatch(InvoiceSettleVO[] voaInvoice, StockSettleVO[] voaStock, FeeDiscountSettleVO[] voaFee, FeeDiscountSettleVO[] voaDiscount, SettleEnvironment settleEnv) throws BusinessException; /** * 检查影响成本的入库单/消耗汇总行的结算是否已经传成本,如果存在未传成本结算单,则抛出异常 * * @param ssVos * @throws BusinessException */ public void checkGoodsSettleTOIA(StockSettleVO[] ssVos) throws BusinessException; /** * 方法功能描述:异物料结算的匹配服务 * <p> * <b>参数说明</b> * * @param voaInvoice 发票VO[] * @param voaStock 库存单据VO[] * @param voaFee 费用发票VO[] * @param voaDiscount 折扣发票VO[] * @param settleEnv 结算环境 * @return 结算完毕的结算单VO数组 * @throws BusinessException <p> * @since 6.0 * @author duy * @time 2010-8-31 下午07:49:23 */ public SettleBillVO[] differentMaterialMatch(InvoiceSettleVO[] voaInvoice, StockSettleVO[] voaStock, FeeDiscountSettleVO[] voaFee, FeeDiscountSettleVO[] voaDiscount, SettleEnvironment settleEnv) throws BusinessException; /** * 费用结算。 * <p> * <b>使用示例:</b> * <p> * <b>参数说明</b> * * @param voaInvoice 发票VO[] * @param voaStock 库存单据VO[] * @param voaFee 费用发票VO[] * @param voaDiscount 折扣发票VO[] * @return * @throws BusinessException <p> * @author wangyf * @time 2010-1-4 下午01:28:01 */ public SettleBillVO[] feeMatch(InvoiceSettleVO[] voaInvoice, StockSettleVO[] voaStock, FeeDiscountSettleVO[] voaFee, FeeDiscountSettleVO[] voaDiscount, SettleEnvironment settleEnv) throws BusinessException; /** * 同物料结算。 * <p> * <b>使用示例:</b> * <p> * <b>参数说明</b> * * @param voaInvoice 发票VO[] * @param voaStock 库存单据VO[] * @param voaFee 费用发票VO[] * @param voaDiscount 折扣发票VO[] * @return * @throws BusinessException <p> * @author wangyf * @time 2010-1-4 下午01:28:01 */ public SettleBillVO[] sameMaterialMatch(InvoiceSettleVO[] voaInvoice, StockSettleVO[] voaStock, FeeDiscountSettleVO[] voaFee, FeeDiscountSettleVO[] voaDiscount, SettleEnvironment settleEnv) throws BusinessException; /** * 消耗汇总费用结算。 * <p> * <b>使用示例:</b> * <p> * <b>参数说明</b> * * @param voaInvoice 发票VO[] * @param voaStock 库存单据VO[] * @param voaFee 费用发票VO[] * @param voaDiscount 折扣发票VO[] * @return * @throws BusinessException <p> * @author wangyf * @time 2010-1-4 下午01:28:01 */ public SettleBillVO[] voiConsumeFeeMatch(InvoiceSettleVO[] voaInvoice, StockSettleVO[] voaStock, FeeDiscountSettleVO[] voaFee, FeeDiscountSettleVO[] voaDiscount, SettleEnvironment settleEnv) throws BusinessException; /** * 消耗汇总结算。 * <p> * <b>使用示例:</b> * <p> * <b>参数说明</b> * * @param voaInvoice 发票VO[] * @param voaStock 库存单据VO[] * @param voaFee 费用发票VO[] * @param voaDiscount 折扣发票VO[] * @return * @throws BusinessException <p> * @author wangyf * @time 2010-1-4 下午01:28:01 */ public SettleBillVO[] voiConsumeMatch(InvoiceSettleVO[] voaInvoice, StockSettleVO[] voaStock, FeeDiscountSettleVO[] voaFee, FeeDiscountSettleVO[] voaDiscount, SettleEnvironment settleEnv) throws BusinessException; /** * 无发票结算。 * <p> * <b>使用示例:</b> * <p> * <b>参数说明</b> * * @param voaInvoice 发票VO[] * @param voaStock 库存单据VO[] * @param voaFee 费用发票VO[] * @param voaDiscount 折扣发票VO[] * @return * @throws BusinessException <p> * @author wangyf * @time 2010-1-4 下午01:28:01 */ public SettleBillVO[] withoutInvoiceMatch(InvoiceSettleVO[] voaInvoice, StockSettleVO[] voaStock, FeeDiscountSettleVO[] voaFee, FeeDiscountSettleVO[] voaDiscount, SettleEnvironment settleEnv) throws BusinessException; /** * 查询给定的入库单和费用发票信息,判断入库单进行过哪些费用项的暂估应付 * * @param ssVos 入库单结算VO数组 * @return 入库单表体ID,暂估过应付的费用物料ID列表} * @throws BusinessException */ MapList<String, String> getEstAPFeeMaterial(StockSettleVO[] ssVos) throws BusinessException; }
[ "944482059@qq.com" ]
944482059@qq.com
f656efc3b7b86f2f7772f1faa9b72e4fe6d74114
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Lang/21/org/apache/commons/lang3/time/DateUtils_setSeconds_581.java
a8e8fee2a600c1a670ca25e26cbff3b63caba4a9
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
2,748
java
org apach common lang3 time suit util surround link java util calendar link java util date object date util dateutil lot common method manipul date calendar method requir extra explan truncat ceil round method consid math floor math ceil math round version date date field bottom order complement method introduc fragment method method date field top order date year valid date decid kind date field result instanc millisecond dai author apach softwar foundat author href mailto sergek lokitech serg knystauta author janek bogucki author href mailto ggregori seagullsw gari gregori author phil steitz author robert scholt author paul benedict version date util dateutil set second field date return object origin date object unchang param date date param amount amount set date object set illeg argument except illegalargumentexcept date date set second setsecond date date amount set date calendar amount
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
122864ee915a41ded583edf0e2df639224a9510d
0db469f7f1cea3297b55cc937745a264bd89a7de
/meta/src/main/java/org/jboss/hal/meta/description/ResourceDescriptionStatementContext.java
95efde76c811f97ac3364b59e3b0d70170c31968
[ "MIT", "Apache-2.0" ]
permissive
bmaxwell/console-1
df793c694a814df91821ce316547c30eeee75952
ee5f8f0fcf78645ff2df1bcf944c1fa5e1099018
refs/heads/master
2020-11-26T16:55:39.733526
2019-11-28T16:15:14
2019-11-28T16:15:14
229,145,923
1
0
Apache-2.0
2019-12-19T22:04:05
2019-12-19T22:04:04
null
UTF-8
Java
false
false
2,108
java
/* * Copyright 2015-2016 Red Hat, Inc, and individual contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.hal.meta.description; import org.jboss.hal.config.Environment; import org.jboss.hal.meta.AddressTemplate; import org.jboss.hal.meta.FilteringStatementContext; import org.jboss.hal.meta.StatementContext; import static org.jboss.hal.meta.SelectionAwareStatementContext.SELECTION_KEY; public class ResourceDescriptionStatementContext extends FilteringStatementContext { public ResourceDescriptionStatementContext(StatementContext delegate, Environment environment) { super(delegate, new Filter() { @Override public String filter(String placeholder, AddressTemplate template) { if (SELECTION_KEY.equals(placeholder)) { return "*"; } return delegate.resolve(placeholder, template); } @Override public String[] filterTuple(String placeholder, AddressTemplate template) { if (!environment.isStandalone()) { Expression t = Expression.from(placeholder); if (t != null) { if (t == Expression.SELECTED_HOST && template.size() == 1) { return delegate.resolveTuple(placeholder, template); } return new String[]{t.resource(), "*"}; } } return delegate.resolveTuple(placeholder, template); } }); } }
[ "harald.pehl@gmail.com" ]
harald.pehl@gmail.com
fe5870ba10761583f918eb21eabe8cb2b6ae2451
c318c4242e66064dd889599669ed14b16a3e0cc6
/src/com/littlehu/test17/BuyStock.java
85039f975e37b146c9619ac2a186955fc63b91d3
[]
no_license
EvilCodes/StudyTest
9d6863089b9e471d06b8eab9ee9dc336c852e8ee
319722d481d21be619d78b82e7d2ee6480fb367f
refs/heads/master
2020-03-29T02:07:37.681431
2018-10-24T12:58:46
2018-10-24T12:58:46
149,421,574
0
0
null
null
null
null
UTF-8
Java
false
false
225
java
package com.littlehu.test17; public class BuyStock implements Order{ private Stock abcStock; public BuyStock(Stock abcStock) { this.abcStock=abcStock; } @Override public void execute() { abcStock.buy(); } }
[ "huangy_tao@126.com" ]
huangy_tao@126.com
dcbb2313978abfb3f79f1a6d35998dc563f1a7fb
2e5a71a60b612a89f8a760a238318020929143ee
/app/src/main/java/com/zhengsr/wanandroid/MainApplication.java
40663c99af83df77674d68cead8b9262f81faf51
[ "Apache-2.0" ]
permissive
xiao-do-do/WanAndroid
6c21e7c16fb9256c155426ed02f3c51d2115b3a0
a6b1b884979c759e1923f69bafe962b874387688
refs/heads/master
2022-09-09T20:08:42.496101
2020-05-28T01:19:44
2020-05-28T01:19:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,629
java
package com.zhengsr.wanandroid; import android.app.Application; import android.content.Context; import android.os.Handler; import android.os.Looper; import android.support.v7.app.AppCompatDelegate; import android.util.Log; import com.scwang.smartrefresh.layout.SmartRefreshLayout; import com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator; import com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator; import com.scwang.smartrefresh.layout.api.RefreshFooter; import com.scwang.smartrefresh.layout.api.RefreshHeader; import com.scwang.smartrefresh.layout.api.RefreshLayout; import com.scwang.smartrefresh.layout.footer.ClassicsFooter; import com.scwang.smartrefresh.layout.header.BezierRadarHeader; import com.scwang.smartrefresh.layout.header.ClassicsHeader; import com.zhengsr.wanandroid.utils.SpfUtils; /** * @author by zhengshaorui on 2019/10/8 * Describe: */ public class MainApplication extends Application { private static final String TAG = "MainApplication"; public static Context INSTANCE; public static Handler HANDLER = new Handler(Looper.myLooper()); @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); } @Override public void onCreate() { super.onCreate(); INSTANCE = getApplicationContext(); boolean isNight = SpfUtils.get(Constant.KEY_IS_NIGHT,false); if (isNight){ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); }else { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); } } }
[ "845731923@qq.com" ]
845731923@qq.com
c2374d63077a54c6a2aefaf6b0f48591941db06f
b641e97d985535e4f1d52c7891aa907f3eb0a254
/src/Components/Preloader/example/FillProgressIndicatorExample.java
317cbc98378b905fc609ee2c973a9f721319f6ea
[]
no_license
mmaciag1991/HarnessDesignSystemInterfaceDiagram
7e6f5dc078205475700dc2f63abc3f1e88e62728
4569676541a80dff1ffb5df6080799367e835065
refs/heads/main
2023-05-19T00:43:10.113472
2021-06-11T21:54:03
2021-06-11T21:54:03
375,101,913
0
0
null
null
null
null
UTF-8
Java
false
false
1,514
java
/* * Copyright (c) 2014, Andrea Vacondio * * 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 Components.Preloader.example; import Components.Preloader.ui.FillProgressIndicator; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Slider; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class FillProgressIndicatorExample extends Application { @Override public void start(Stage primaryStage) { FillProgressIndicator indicator = new FillProgressIndicator(); Slider slider = new Slider(0, 100, 50); slider.valueProperty().addListener((o, oldVal, newVal) -> indicator.setProgress(newVal.intValue())); VBox main = new VBox(1, indicator, slider); indicator.setProgress(Double.valueOf(slider.getValue()).intValue()); Scene scene = new Scene(main); primaryStage.setScene(scene); primaryStage.setTitle("Test fill progress"); primaryStage.show(); } public static void main(String[] args) { launch(args); } }
[ "mateo.m@wp.pl" ]
mateo.m@wp.pl
eb5c5a768247fb9249148550d31faf0e09f7f2b3
7d4eb25bc28ee4bab1fa9d1c0882b25e04d5c84d
/src/main/java/org/jboss/pnc/repositorydriver/constants/IndyRepositoryConstants.java
9931651664e9d3fa14b2cae96ca404c7eae0a5ba
[ "Apache-2.0" ]
permissive
jordillachmrf/repository-driver
f35b5b8b462c10d7e4b24ed537e92ed3cdcabfd6
0284ca60feb85453d7b27598be9ff78e6b1fef03
refs/heads/main
2023-04-30T03:39:09.771906
2021-05-20T19:30:10
2021-05-20T20:28:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,357
java
/** * JBoss, Home of Professional Open Source. * Copyright 2014-2020 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * 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.jboss.pnc.repositorydriver.constants; /** * Constants used by the maven repository driver. */ public class IndyRepositoryConstants { /** Name of group that contains common builds groups' constituents. */ public static final String COMMON_BUILD_GROUP_CONSTITUENTS_GROUP = "builds-untested+shared-imports+public"; /** Name of group used to access all previous temporary build outputs. */ public static final String TEMPORARY_BUILDS_GROUP = "temporary-builds"; /** Name of hosted repository used to store artifacts from external sources. */ public static final String SHARED_IMPORTS_ID = "shared-imports"; }
[ "matejonnet@gmail.com" ]
matejonnet@gmail.com
e7be2dc435ffe64be9d2eb3414be144c1264b5b1
d4a25735ac036c85f5ca245cabf57dfcb70e93e2
/Algorithm/Java/Trapping Rain Water.java
28a85efef3d7afd9b08286fd7e897e5376caa064
[]
no_license
nanwan03/leetcode
68c7dcf9aca047de1085c65255c41ba31f77ed47
a2d39e56590a3a7be48687bb53af8fcb2c0ce462
refs/heads/master
2021-01-14T07:55:31.926974
2020-08-18T20:57:33
2020-08-18T20:57:33
35,404,037
4
5
null
null
null
null
UTF-8
Java
false
false
663
java
public class Solution { public int trap(int[] A) { if (A == null || A.length == 0) { return 0; } int left = 0; int right = A.length - 1; int leftMax = 0; int rightMax = 0; int rst = 0; while (left <= right) { leftMax = Math.max(leftMax, A[left]); rightMax = Math.max(rightMax, A[right]); if (leftMax < rightMax) { rst += Math.max(0, leftMax - A[left]); left++; } else { rst += Math.max(0, rightMax - A[right]); right--; } } return rst; } }
[ "wn1842@gmail.com" ]
wn1842@gmail.com
58c5ea983cf318f4a676e18d0e46343215cf31ac
1a4770c215544028bad90c8f673ba3d9e24f03ad
/second/quark/src/main/java/com/ucpro/feature/setting/b/f/bo.java
86e73df091b4b30c3543fadbc91d18f4d0fea749
[]
no_license
zhang1998/browser
e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce
4eee43a9d36ebb4573537eddb27061c67d84c7ba
refs/heads/master
2021-05-03T06:32:24.361277
2018-02-10T10:35:36
2018-02-10T10:35:36
120,590,649
8
10
null
null
null
null
UTF-8
Java
false
false
506
java
package com.ucpro.feature.setting.b.f; import com.ucpro.base.a.e; import com.ucpro.feature.setting.b.b.a.g; import com.ucpro.feature.setting.b.c.b; /* compiled from: ProGuard */ public final class bo implements g { public final /* synthetic */ void a(Object obj) { String str = "76C1F34B9171FBB7"; b.a.a(str, ((Boolean) obj).booleanValue()); com.ucpro.base.a.g.a().a(e.be); } public final /* synthetic */ Object a() { return Boolean.valueOf(b.a.a()); } }
[ "2764207312@qq.com" ]
2764207312@qq.com
369ebe254c02d09b3bf79be66c1cc751a529d435
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/XWIKI-13942-1-3-Single_Objective_GGA-WeightedSum-BasicBlockCoverage-opt/org/xwiki/model/internal/reference/ExplicitStringEntityReferenceResolver_ESTest.java
7a2c724eeffa1b8c0acf41f559d40ff2fd50681b
[ "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,795
java
/* * This file was automatically generated by EvoSuite * Mon Oct 25 15:27:39 UTC 2021 */ package org.xwiki.model.internal.reference; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.shaded.org.mockito.Mockito.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.evosuite.runtime.ViolatedAssumptionAnswer; import org.evosuite.runtime.javaee.injection.Injector; import org.junit.runner.RunWith; import org.xwiki.model.EntityType; import org.xwiki.model.internal.reference.AbstractStringEntityReferenceResolver; import org.xwiki.model.internal.reference.ExplicitStringEntityReferenceResolver; import org.xwiki.model.internal.reference.SymbolScheme; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ExplicitStringEntityReferenceResolver_ESTest extends ExplicitStringEntityReferenceResolver_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { ExplicitStringEntityReferenceResolver explicitStringEntityReferenceResolver0 = new ExplicitStringEntityReferenceResolver(); SymbolScheme symbolScheme0 = mock(SymbolScheme.class, new ViolatedAssumptionAnswer()); Injector.inject(explicitStringEntityReferenceResolver0, (Class<?>) AbstractStringEntityReferenceResolver.class, "symbolScheme", (Object) symbolScheme0); Injector.validateBean(explicitStringEntityReferenceResolver0, (Class<?>) ExplicitStringEntityReferenceResolver.class); EntityType entityType0 = EntityType.ATTACHMENT; Object[] objectArray0 = new Object[0]; // Undeclared exception! explicitStringEntityReferenceResolver0.getDefaultReference(entityType0, objectArray0); } }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
2b9edaed9564ac6b78232d1523d8c3d6fff1821b
c3ec5798eb263b0d8407e79d18831605d512b1b1
/src/main/java/org/pepstock/charba/showcase/j2cl/cases/extensions/ZoomApiZoomCase.java
01b6562fa2ea671d5e7f4a06c91b39401a053d55
[ "Apache-2.0" ]
permissive
pepstock-org/Charba-Showcase-J2CL
76742ec3e2364aacf8e1a48bdb3b49420c0e8307
889e071440f052db45697f6dbca50b5d66e2ef6e
refs/heads/master
2023-06-09T10:52:09.268270
2023-05-23T09:27:23
2023-05-23T09:27:23
246,816,194
3
1
Apache-2.0
2023-05-19T16:27:18
2020-03-12T11:23:43
Java
UTF-8
Java
false
false
7,699
java
package org.pepstock.charba.showcase.j2cl.cases.extensions; import org.pepstock.charba.client.ScatterChart; import org.pepstock.charba.client.colors.GoogleChartColor; import org.pepstock.charba.client.colors.IsColor; import org.pepstock.charba.client.data.DataPoint; import org.pepstock.charba.client.data.Dataset; import org.pepstock.charba.client.data.ScatterDataset; import org.pepstock.charba.client.enums.DefaultTransitionMode; import org.pepstock.charba.client.zoom.Amount; import org.pepstock.charba.client.zoom.ZoomOptions; import org.pepstock.charba.client.zoom.ZoomPlugin; import org.pepstock.charba.client.zoom.enums.Mode; import org.pepstock.charba.showcase.j2cl.cases.commons.BaseComposite; import elemental2.dom.CSSProperties.MarginRightUnionType; import elemental2.dom.CSSProperties.WidthUnionType; import elemental2.dom.DomGlobal; import elemental2.dom.HTMLButtonElement; import elemental2.dom.HTMLElement; import elemental2.dom.HTMLImageElement; import elemental2.dom.HTMLTableCellElement; import elemental2.dom.HTMLTableElement; import elemental2.dom.HTMLTableRowElement; public class ZoomApiZoomCase extends BaseComposite { private static final int AMOUNT_OF_POINTS = 120; private final HTMLTableElement mainPanel; private final ScatterChart chart = new ScatterChart(); public ZoomApiZoomCase() { // ---------------------------------------------- // Main element // ---------------------------------------------- mainPanel = (HTMLTableElement) DomGlobal.document.createElement("table"); mainPanel.width = "100%"; mainPanel.cellPadding = "12"; HTMLTableRowElement chartRow = (HTMLTableRowElement) DomGlobal.document.createElement("tr"); chartRow.style.width = WidthUnionType.of("100%"); mainPanel.appendChild(chartRow); HTMLTableCellElement chartCol = (HTMLTableCellElement) DomGlobal.document.createElement("td"); chartCol.style.width = WidthUnionType.of("100%"); chartRow.appendChild(chartCol); // ---------------------------------------------- // Chart // ---------------------------------------------- chart.getOptions().setResponsive(true); chart.getOptions().getTitle().setDisplay(true); chart.getOptions().getTitle().setText("Programmatically zoom on scatter chart"); ScatterDataset dataset1 = chart.newDataset(); dataset1.setLabel("dataset 1"); IsColor color1 = GoogleChartColor.values()[0]; dataset1.setBackgroundColor(color1.toHex()); dataset1.setBorderColor(color1.toHex()); double[] xs1 = getRandomDigits(AMOUNT_OF_POINTS); double[] ys1 = getRandomDigits(AMOUNT_OF_POINTS); DataPoint[] dp1 = new DataPoint[AMOUNT_OF_POINTS]; for (int i = 0; i < AMOUNT_OF_POINTS; i++) { dp1[i] = new DataPoint(); dp1[i].setX(xs1[i]); dp1[i].setY(ys1[i]); } dataset1.setDataPoints(dp1); ScatterDataset dataset2 = chart.newDataset(); dataset2.setLabel("dataset 2"); IsColor color2 = GoogleChartColor.values()[1]; dataset2.setBackgroundColor(color2.toHex()); dataset2.setBorderColor(color2.toHex()); double[] xs2 = getRandomDigits(AMOUNT_OF_POINTS); double[] ys2 = getRandomDigits(AMOUNT_OF_POINTS); DataPoint[] dp2 = new DataPoint[AMOUNT_OF_POINTS]; for (int i = 0; i < AMOUNT_OF_POINTS; i++) { dp2[i] = new DataPoint(); dp2[i].setX(xs2[i]); dp2[i].setY(ys2[i]); } dataset2.setDataPoints(dp2); chart.getData().setDatasets(dataset1, dataset2); ZoomOptions options = new ZoomOptions(); options.getPan().setEnabled(false); options.getZoom().getWheel().setEnabled(true); options.getZoom().setMode(Mode.XY); chart.getOptions().getPlugins().setOptions(ZoomPlugin.ID, options); chartCol.appendChild(chart.getChartElement().as()); // ---------------------------------------------- // Actions element // ---------------------------------------------- HTMLTableRowElement actionsRow = (HTMLTableRowElement) DomGlobal.document.createElement("tr"); actionsRow.style.width = WidthUnionType.of("100%"); mainPanel.appendChild(actionsRow); HTMLTableCellElement actionsCol = (HTMLTableCellElement) DomGlobal.document.createElement("td"); actionsCol.style.width = WidthUnionType.of("100%"); actionsCol.style.textAlign = "center"; actionsCol.vAlign = "middle"; actionsRow.appendChild(actionsCol); HTMLButtonElement randomize = (HTMLButtonElement) DomGlobal.document.createElement("button"); randomize.onclick = (p0) -> { handleRandomize(); return null; }; randomize.className = "gwt-Button"; randomize.textContent = "Randomize data"; randomize.style.marginRight = MarginRightUnionType.of("5px"); actionsCol.appendChild(randomize); HTMLButtonElement reset = (HTMLButtonElement) DomGlobal.document.createElement("button"); reset.onclick = (p0) -> { handleResetZoom(); return null; }; reset.className = "gwt-Button"; reset.textContent = "Reset zoom"; reset.style.marginRight = MarginRightUnionType.of("5px"); actionsCol.appendChild(reset); HTMLButtonElement zoomPlus10 = (HTMLButtonElement) DomGlobal.document.createElement("button"); zoomPlus10.onclick = (p0) -> { handleZoomPlus10(); return null; }; zoomPlus10.className = "gwt-Button"; zoomPlus10.textContent = "Zoom +10%"; zoomPlus10.style.marginRight = MarginRightUnionType.of("5px"); actionsCol.appendChild(zoomPlus10); HTMLButtonElement zoomMinus10 = (HTMLButtonElement) DomGlobal.document.createElement("button"); zoomMinus10.onclick = (p0) -> { handleZoomMinus10(); return null; }; zoomMinus10.className = "gwt-Button"; zoomMinus10.textContent = "Zoom -10%"; zoomMinus10.style.marginRight = MarginRightUnionType.of("5px"); actionsCol.appendChild(zoomMinus10); HTMLButtonElement zoomXplus10 = (HTMLButtonElement) DomGlobal.document.createElement("button"); zoomXplus10.onclick = (p0) -> { handleZoomXPlus10(); return null; }; zoomXplus10.className = "gwt-Button"; zoomXplus10.textContent = "Zoom x +10%"; zoomXplus10.style.marginRight = MarginRightUnionType.of("5px"); actionsCol.appendChild(zoomXplus10); HTMLButtonElement zoomXminus10 = (HTMLButtonElement) DomGlobal.document.createElement("button"); zoomXminus10.onclick = (p0) -> { handleZoomXMinus10(); return null; }; zoomXminus10.className = "gwt-Button"; zoomXminus10.textContent = "Zoom x .10%"; zoomXminus10.style.marginRight = MarginRightUnionType.of("5px"); actionsCol.appendChild(zoomXminus10); HTMLButtonElement github = (HTMLButtonElement) DomGlobal.document.createElement("button"); github.onclick = (p0) -> { DomGlobal.window.open(getUrl(), "_blank", ""); return null; }; github.className = "gwt-Button"; HTMLImageElement img = (HTMLImageElement) DomGlobal.document.createElement("img"); img.src = "images/GitHub-Mark-32px.png"; github.appendChild(img); actionsCol.appendChild(github); } @Override public HTMLElement getElement() { return mainPanel; } protected void handleRandomize() { for (Dataset dataset : chart.getData().getDatasets()) { ScatterDataset scDataset = (ScatterDataset) dataset; for (DataPoint dp : scDataset.getDataPoints()) { dp.setX(getRandomDigit()); dp.setY(getRandomDigit()); } } chart.update(); } protected void handleResetZoom() { ZoomPlugin.reset(chart); } protected void handleZoomPlus10() { ZoomPlugin.zoom(chart, 1.1, DefaultTransitionMode.DEFAULT); } protected void handleZoomMinus10() { ZoomPlugin.zoom(chart, 0.9, DefaultTransitionMode.DEFAULT); } protected void handleZoomXPlus10() { ZoomPlugin.zoom(chart, new Amount(1.1), DefaultTransitionMode.DEFAULT); } protected void handleZoomXMinus10() { ZoomPlugin.zoom(chart, new Amount(0.9), DefaultTransitionMode.DEFAULT); } }
[ "stocki.nail@gmail.com" ]
stocki.nail@gmail.com
91d3965089a3c1ecbf1af7021079591eec1bc0bc
ba54d7b4f1c966959cc518798647136a7c40a5a3
/app/src/main/java/com/afomic/sparkadmin/fragment/NewPostDialog.java
58333919407f724b26d333d55e0e4ea61eefc902
[]
no_license
afomic/spark-admin
401f723b6af95753a6cebdd52ec5c39d1aec7da4
1c014b352b7bbc9c34c3aa9b37a96d8141f186ef
refs/heads/master
2021-09-14T08:31:33.013483
2018-05-10T13:20:00
2018-05-10T13:20:00
109,867,591
2
0
null
null
null
null
UTF-8
Java
false
false
1,577
java
package com.afomic.sparkadmin.fragment; import android.app.AlertDialog; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.DialogFragment; import com.afomic.sparkadmin.CreateBlogActivity; import com.afomic.sparkadmin.NewFilePostActivity; import com.afomic.sparkadmin.R; /** * Created by afomic on 9/24/17. */ public class NewPostDialog extends DialogFragment { public static NewPostDialog newInstance(){ return new NewPostDialog(); } @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder mBuilder=new AlertDialog.Builder(getActivity()); mBuilder.setTitle("Select Post Type"); mBuilder.setItems(R.array.post_type, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { switch (i){ case 0: Intent mIntent=new Intent(getActivity(), NewFilePostActivity.class); startActivity(mIntent); dismiss(); break; case 1: Intent intent=new Intent(getActivity(), CreateBlogActivity.class); startActivity(intent); dismiss(); break; } } }); return mBuilder.create(); } }
[ "afomic1@gmail.com" ]
afomic1@gmail.com
f5fa9e6cb60613bc469af2cb50601043208446cc
74ef69ecce404a25224ee3d530236db58626a66d
/javacors-runtime/src/main/java/io/mikesir87/javacors/validators/RequestedMethodValidator.java
756ada2165079047afa87ca562683233831566fe
[ "Apache-2.0" ]
permissive
jeffmitchell/javacors
98bba9b84829661f1ce3821b4ae092a73f1731da
1db50b2a93a83bbf777233a5b0fa671b4a22f580
refs/heads/master
2021-01-19T21:33:58.142088
2017-04-20T19:59:58
2017-04-20T19:59:58
88,668,227
0
0
null
2017-04-18T20:35:26
2017-04-18T20:35:26
null
UTF-8
Java
false
false
744
java
package io.mikesir87.javacors.validators; import io.mikesir87.javacors.CorsConfiguration; /** * A {@link CorsValidator} that validates the <code>Access-Control-Request-Method</code> header on pre-flight * requests. * * @author Michael Irwin */ public class RequestedMethodValidator implements CorsValidator { @Override public boolean shouldAddHeaders(CorsRequestContext requestContext, CorsConfiguration configuration) { if (!requestContext.isPreFlightRequest()) return true; // Access-Control-Request-Method header is required and must match configured methods return requestContext.getRequestedMethod() != null && configuration.getAuthorizedMethods().contains(requestContext.getRequestedMethod()); } }
[ "mikesir87@gmail.com" ]
mikesir87@gmail.com
3fbb43f3e57ee790061e7633ecdad4e3707a90a6
6d82f06048d330216b17c19790f29075e62e47d5
/snapshot/runtime/meta/spi/src/java/org/apache/avalon/meta/info/verifier/Verifier.java
8ea5e4760ed815cb960eeff4a3ec2dc795f36c1c
[]
no_license
IdelsTak/dpml-svn
7d1fc3f1ff56ef2f45ca5f7f3ae88b1ace459b79
9f9bdcf0198566ddcee7befac4a3b2c693631df5
refs/heads/master
2022-03-19T15:50:45.872930
2009-11-23T08:45:39
2009-11-23T08:45:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,671
java
/* * Copyright 2004 Apache Software Foundation * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or * implied. * * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.avalon.meta.info.verifier; import org.apache.avalon.meta.info.Type; import org.apache.avalon.meta.info.Service; /** * The Verifier interface is used to allow service providers to ensure that * the meta information for the type or service is correct. The validation * process may go so far as to ensure all the classes referenced actually * exist, although this is not necessary. * * @author <a href="mailto:dev@avalon.apache.org">Avalon Development Team</a> * @version $Id: Verifier.java 30977 2004-07-30 08:57:54Z niclas $ */ public interface Verifier { /** * Validate a type using the supplied Type information. * * @param type The type we need to verify * @return <code>true</code> if it is valid */ boolean isTypeValid( Type type ); /** * Validate a service using the supplied Service information. * * @param service The service we need to verify * @return <code>true</code> if it is valid */ boolean isServiceValid( Service service ); }
[ "niclas@00579e91-1ffa-0310-aa18-b241b61564ef" ]
niclas@00579e91-1ffa-0310-aa18-b241b61564ef
15d0f225c17ca9e34b6ab57697c467918d1b88eb
8a3e81133ff67b8266b654a78fd452236e088c0e
/moviebuffs-api/src/main/java/com/sivalabs/moviebuffs/config/DataInitializer.java
e1c47a69d8c83ab7051b4cf2c4cba51f7a6425b2
[]
no_license
purnachand99/moviebuffs
4a1c624e3114a472674eb6e026f9869bf7f50c09
fa7d4829dd6a35481f973472060bbd063895e0d8
refs/heads/master
2021-03-23T23:07:01.529257
2020-03-09T03:38:55
2020-03-09T04:25:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,206
java
package com.sivalabs.moviebuffs.config; import com.opencsv.exceptions.CsvValidationException; import com.sivalabs.moviebuffs.importer.MovieDataImporter; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.stereotype.Component; import java.io.IOException; @Slf4j @Component @ConditionalOnProperty(name = "application.import-tmdb-data", havingValue = "true") @RequiredArgsConstructor public class DataInitializer implements CommandLineRunner { private final MovieDataImporter movieDataImporter; private final ApplicationProperties applicationProperties; @Override public void run(String... args) throws IOException, CsvValidationException { if(applicationProperties.isImportTmdbDataAsync()) { log.info("Initializing TMDB data in async mode"); movieDataImporter.importDataAsync(); } else { log.info("Initializing TMDB data in sync mode"); movieDataImporter.importData(); } log.debug("TMDB data initialized successfully"); } }
[ "sivaprasadreddy.k@gmail.com" ]
sivaprasadreddy.k@gmail.com
64702d87510b10cfe5973477976a3cbf3213144d
2f7ecc75bc13ef9e49ca1994a84c4400053b08c9
/src/com/javarush/test/level08/lesson11/home08/Solution.java
a50e1d42545aabf000804ddb7c1c64f3f56bae35
[]
no_license
BogdanKartawcew/JavaRushHomeWork
d47574392db5c4720245dec08d8ea0b896138402
70bf310ed564293c1855a2650197bff74dce2271
refs/heads/master
2021-01-01T20:22:06.234055
2018-01-30T19:58:33
2018-01-30T19:58:33
80,110,449
1
0
null
null
null
null
UTF-8
Java
false
false
1,534
java
package com.javarush.test.level08.lesson11.home08; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; /* Пять наибольших чисел Создать массив на 20 чисел. Заполнить его числами с клавиатуры. Вывести пять наибольших чисел. */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int[] array = new int[20]; for (int i = 0; i < array.length; i++) { array[i] = Integer.parseInt(reader.readLine()); } sort(array); System.out.println(array[0]); System.out.println(array[1]); System.out.println(array[2]); System.out.println(array[3]); System.out.println(array[4]); } public static void sort(int[] array) { ArrayList<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < array.length; i++) list.add(array[i]); for (int k = 0; k < 5; k++) { int max = list.get(k), n = k; for (int i = k; i < list.size(); i++) if (max < list.get(i)) { max = list.get(i); n = i; } list.remove(n); list.add(k, max); } for (int i = 0; i < array.length; i++) array[i] = list.get(i); } }
[ "kartawcew.b@gmail.com" ]
kartawcew.b@gmail.com
1ec388b9fc978366184bafce142b76b03407467d
21a672c92dcd855b874d34afe8a8e4aab5d8b562
/03-CamelInvoice/src/main/java/com/stpl/servicemix/example/camelosgi/banking/Payment.java
cdcaec79bfee6b41da2932f9d5faa041f2dc3689
[]
no_license
amanver16/ServiceMixDemo
fe445ea7d17ba50509a850942f59d9a986a20703
9da4e08c0b543e62ffe0e99d03eb23d156b4370e
refs/heads/master
2020-03-30T22:52:46.816969
2018-10-05T07:15:45
2018-10-05T07:15:45
151,681,632
0
1
null
null
null
null
UTF-8
Java
false
false
841
java
package com.stpl.servicemix.example.camelosgi.banking; import java.math.BigDecimal; public class Payment { private final String senderAccount; private final String receiverAccount; private final BigDecimal dollars; public Payment(String senderAccount, String receiverAccount, BigDecimal dollars) { this.senderAccount = senderAccount; this.receiverAccount = receiverAccount; this.dollars = dollars; } public String getSenderAccount() { return senderAccount; } public String getReceiverAccount() { return receiverAccount; } public BigDecimal getDollars() { return dollars; } @Override public String toString() { return "Payment [senderAccount=" + senderAccount + ", receiverAccount=" + receiverAccount + ", dollars=" + dollars + "]"; } }
[ "aman.verma@sysbiz.org" ]
aman.verma@sysbiz.org
e5d4ac42c384923e900b3bb125f935a6bf988949
8d8776f923e7cc844196f4c70c21a337e5f5552e
/newclient/src/main/java/se/spaced/client/ardor/ui/api/VendorApi.java
67f8caa4b2e5e50696ffecac5ac5154550be311e
[]
no_license
FearlessGames/spaced
7853599f11258daf62a72ba4c8f40ef8c88beb85
27690cd19867c5b9b64186a1e9a26bd813497c87
refs/heads/master
2020-04-25T04:28:54.189030
2017-09-08T21:10:58
2017-09-08T21:10:58
172,511,474
0
0
null
null
null
null
UTF-8
Java
false
false
3,333
java
package se.spaced.client.ardor.ui.api; import com.google.common.collect.ImmutableCollection; import com.google.common.collect.Lists; import com.google.inject.Inject; import com.google.inject.Singleton; import se.krka.kahlua.integration.annotations.LuaMethod; import se.spaced.client.model.ClientEntity; import se.spaced.client.model.InventoryProvider; import se.spaced.client.model.item.ClientItem; import se.spaced.client.net.messagelisteners.ServerVendorMessagesImpl; import se.spaced.client.net.smrt.ServerConnection; import se.spaced.client.statistics.Analytics; import se.spaced.client.statistics.Trackables; import se.spaced.messages.protocol.SpacedItem; import java.util.Collection; @Singleton public class VendorApi { private final ServerConnection serverConnection; private final ServerVendorMessagesImpl serverVendorMessages; private final InventoryProvider inventoryProvider; private final Analytics analytics; @Inject public VendorApi( ServerConnection serverConnection, ServerVendorMessagesImpl serverVendorMessages, InventoryProvider inventoryProvider, Analytics analytics) { this.serverConnection = serverConnection; this.serverVendorMessages = serverVendorMessages; this.inventoryProvider = inventoryProvider; this.analytics = analytics; } @LuaMethod(name = "GetVendorStock", global = true) public void requestListOfItemsForSale(ClientEntity vendor) { analytics.track(Trackables.VendorEvents.GET_STOCK); if (getActiveVendor() == null || !getActiveVendor().equals(vendor)) { serverConnection.getReceiver().vendor().requestVendorStock(vendor); } } @LuaMethod(name = "BuyItem", global = true) public void buyItem(ClientEntity vendor, ClientItem item) { analytics.track(Trackables.VendorEvents.BUY); serverConnection.getReceiver().vendor().playerBuysItemFromVendor(vendor, item); } @LuaMethod(name = "SellItem", global = true) public void sellItem(ClientEntity vendor, ClientItem item) { sell(vendor, Lists.newArrayList(item)); } @LuaMethod(name = "SellItems", global = true) public void sellItems(ClientEntity vendor, int position) { ImmutableCollection<? extends SpacedItem> stackItems = inventoryProvider.getPlayerInventory().getItemMap().get(position); sell(vendor, stackItems); } private void sell(ClientEntity vendor, Collection<? extends SpacedItem> items) { serverConnection.getReceiver().vendor().playerSellsItemsToVendor(vendor, items); } @LuaMethod(name = "GetActiveVendor", global = true) public ClientEntity getActiveVendor() { return serverVendorMessages.getActiveVendor(); } @LuaMethod(name = "StartVendoring", global = true) public void startVendoring(ClientEntity vendor) { analytics.track(Trackables.VendorEvents.INIT); serverVendorMessages.setVendoringActive(vendor); serverConnection.getReceiver().vendor().startVendoring(vendor); } @LuaMethod(name = "StopVendoring", global = true) public void stopVendoring(ClientEntity vendor) { analytics.track(Trackables.VendorEvents.CLOSE); serverVendorMessages.stopVendoring(); serverConnection.getReceiver().vendor().endVendoring(vendor); } @LuaMethod(name = "ResetVendoring", global = true) public void resetVendoring() { serverVendorMessages.stopVendoring(); } }
[ "per.malmen@gmail.com" ]
per.malmen@gmail.com
505ebefcc2f71ef2c2feebf92bcbecf3ee26d589
bf72c47769901b415e1deffa7f173fe94bd48e65
/app/src/main/java/com/example/contact/adapter/ContactAdapter.java
542770e3beac7412c2aeb6200e751e06c70ed412
[]
no_license
nsonnam2/contact
bc1482d5f12ac75dbd025db8993650ec3ee091d5
787e889bda7eb3284c5f11e469fd91d5b3ce5f84
refs/heads/master
2022-08-20T01:46:01.640037
2020-05-29T10:32:11
2020-05-29T10:32:11
266,584,968
0
0
null
null
null
null
UTF-8
Java
false
false
3,383
java
package com.example.contact.adapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.example.contact.R; import com.example.contact.model.Contact; import java.util.ArrayList; import butterknife.BindView; import butterknife.ButterKnife; import de.hdodenhof.circleimageview.CircleImageView; public class ContactAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private static final String TAG = "ContactAdapter"; private static int TYPE_CONTACT = 1; private static int TYPE_TITLE = 2; private ArrayList<Contact> listContacts = new ArrayList<>(); private Listener listener; public void setListener(Listener listener) { this.listener = listener; } public void setListContacts(ArrayList<Contact> listContacts) { this.listContacts.clear(); this.listContacts.addAll(listContacts); notifyDataSetChanged(); } @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { if (viewType == TYPE_CONTACT) { return new ContactHolder(LayoutInflater.from(parent.getContext()).inflate(ContactHolder.LAYOUT_RES, parent, false)); } return new TitleHolder(LayoutInflater.from(parent.getContext()).inflate(TitleHolder.LAYOUT_RES, parent, false)); } @Override public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { if (holder instanceof TitleHolder){ TitleHolder titleHolder = (TitleHolder) holder; titleHolder.setTitle(listContacts.get(position).getName()); } if (holder instanceof ContactHolder){ ContactHolder contactHolder = (ContactHolder) holder; contactHolder.setName(listContacts.get(position).getName()); contactHolder.itemView.setOnClickListener(v -> listener.itemContactClick(listContacts.get(position))); } } @Override public int getItemCount() { return listContacts.size(); } @Override public int getItemViewType(int position) { if (listContacts.get(position).getType() == 0) { return TYPE_CONTACT; } return TYPE_TITLE; } class TitleHolder extends RecyclerView.ViewHolder { public static final int LAYOUT_RES = R.layout.item_view_title; @BindView(R.id.tv_title) TextView tvTitle; public TitleHolder(@NonNull View itemView) { super(itemView); ButterKnife.bind(this, itemView); } private void setTitle(String s) { tvTitle.setText(s); } } class ContactHolder extends RecyclerView.ViewHolder { private static final int LAYOUT_RES = R.layout.item_view_contact; @BindView(R.id.im_avatar) CircleImageView imAvatar; @BindView(R.id.tv_name) TextView tvName; public ContactHolder(@NonNull View itemView) { super(itemView); ButterKnife.bind(this, itemView); } private void setName(String s) { tvName.setText(s); } } public interface Listener{ void itemContactClick(Contact contact); } }
[ "=" ]
=
f952aae78f6f2b1b50b931537d69d26be2a4fe15
e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3
/src/chosun/ciis/se/comm/dm/SE_COMM_1220_SDM.java
499b0ea52b5282a2c361a7cc8855dc32eabba125
[]
no_license
nosmoon/misdevteam
4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60
1829d5bd489eb6dd307ca244f0e183a31a1de773
refs/heads/master
2020-04-15T15:57:05.480056
2019-01-10T01:12:01
2019-01-10T01:12:01
164,812,547
1
0
null
null
null
null
UHC
Java
false
false
5,281
java
/*************************************************************************************************** * 파일명 : SE_COMM_1220_SDM.java * 기능 : 노선구분코드 팝업 목록 조회 * 작성일자 : 2009.01.23 * 작성자 : 김대준 ***************************************************************************************************/ /*************************************************************************************************** * 수정내역 : * 수정자 : * 수정일자 : * 백업 : ***************************************************************************************************/ package chosun.ciis.se.comm.dm; import java.sql.*; import oracle.jdbc.driver.*; import somo.framework.db.*; import somo.framework.util.*; import chosun.ciis.se.comm.ds.*; import chosun.ciis.se.comm.rec.*; /** * */ public class SE_COMM_1220_SDM extends somo.framework.db.BaseDM implements java.io.Serializable{ public String cmpy_cd; public String route_cd; public String route_nm; public String route_clsf; public SE_COMM_1220_SDM(){} public SE_COMM_1220_SDM(String cmpy_cd, String route_cd, String route_nm, String route_clsf){ this.cmpy_cd = cmpy_cd; this.route_cd = route_cd; this.route_nm = route_nm; this.route_clsf = route_clsf; } public void setCmpy_cd(String cmpy_cd){ this.cmpy_cd = cmpy_cd; } public void setRoute_cd(String route_cd){ this.route_cd = route_cd; } public void setRoute_clsf(String route_clsf){ this.route_clsf = route_clsf; } public String getCmpy_cd(){ return this.cmpy_cd; } public String getRoute_cd(){ return this.route_cd; } public String getRoute_clsf(){ return this.route_clsf; } public String getRoute_nm() { return route_nm; } public void setRoute_nm(String route_nm) { this.route_nm = route_nm; } public String getSQL(){ return "{ call SP_SE_COMM_1220_S( ?, ?, ?, ?, ?, ?, ? ) }"; } public void setParams(CallableStatement cstmt, BaseDM bdm) throws SQLException{ SE_COMM_1220_SDM dm = (SE_COMM_1220_SDM)bdm; cstmt.registerOutParameter(1, Types.VARCHAR); cstmt.registerOutParameter(2, Types.VARCHAR); cstmt.setString(3, dm.cmpy_cd); cstmt.setString(4, dm.route_cd); cstmt.setString(5, dm.route_nm); cstmt.setString(6, dm.route_clsf); cstmt.registerOutParameter(7, OracleTypes.CURSOR); } public BaseDataSet createDataSetObject(){ return new chosun.ciis.se.comm.ds.SE_COMM_1220_SDataSet(); } } /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리 및 결과확인 검사시 사용하십시오. String cmpy_cd = req.getParameter("cmpy_cd"); if( cmpy_cd == null){ System.out.println(this.toString+" : cmpy_cd is null" ); }else{ System.out.println(this.toString+" : cmpy_cd is "+cmpy_cd ); } String route_cd = req.getParameter("route_cd"); if( route_cd == null){ System.out.println(this.toString+" : route_cd is null" ); }else{ System.out.println(this.toString+" : route_cd is "+route_cd ); } String route_nm = req.getParameter("route_nm"); if( route_nm == null){ System.out.println(this.toString+" : route_nm is null" ); }else{ System.out.println(this.toString+" : route_nm is "+route_nm ); } String route_clsf = req.getParameter("route_clsf"); if( route_clsf == null){ System.out.println(this.toString+" : route_clsf is null" ); }else{ System.out.println(this.toString+" : route_clsf is "+route_clsf ); } ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.checkString(req.getParameter("cmpy_cd")); String route_cd = Util.checkString(req.getParameter("route_cd")); String route_nm = Util.checkString(req.getParameter("route_nm")); String route_clsf = Util.checkString(req.getParameter("route_clsf")); ----------------------------------------------------------------------------------------------------*//*---------------------------------------------------------------------------------------------------- Web Tier에서 한글처리와 동시에 req.getParameter() 처리시 사용하십시오. String cmpy_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("cmpy_cd"))); String route_cd = Util.Uni2Ksc(Util.checkString(req.getParameter("route_cd"))); String route_nm = Util.Uni2Ksc(Util.checkString(req.getParameter("route_nm"))); String route_clsf = Util.Uni2Ksc(Util.checkString(req.getParameter("route_clsf"))); ----------------------------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------------------------- Web Tier에서 DM 파일의 변수를 설정시 사용하십시오. dm.setCmpy_cd(cmpy_cd); dm.setRoute_cd(route_cd); dm.setRoute_nm(route_nm); dm.setRoute_clsf(route_clsf); ----------------------------------------------------------------------------------------------------*/ /* 작성시간 : Tue Jan 20 16:50:11 KST 2009 */
[ "DLCOM000@172.16.30.11" ]
DLCOM000@172.16.30.11
33fff77e052223a00f343c9e7f4f0aba1faa83a9
ab6c0bc74dff2b522618ae4192b63ca879f3d07a
/utp-trade-ht/utp-common/src/main/java/cn/kingnet/utp/trade/common/dto/account/TransferSinglerPayRespDTO.java
8a734e7eb9705c8f81e214ec9befe25e3778a32d
[]
no_license
exyangbang/learngit
9669cb329c9686db96bd250a6ceceaf44f02e945
12c92df41a6b778a9db132c37dd136bedfd5b56f
refs/heads/master
2023-02-16T20:49:57.437363
2021-01-16T07:45:17
2021-01-16T07:45:17
330,107,905
0
0
null
null
null
null
UTF-8
Java
false
false
380
java
package cn.kingnet.utp.trade.common.dto.account; import cn.kingnet.utp.trade.common.dto.BaseResponseDTO; import lombok.Data; import lombok.EqualsAndHashCode; /** * @Description : 转账请求DTO * @Author : linjiazhen@scenetec.com * @Create : 2018/11/29 17:00 */ @Data @EqualsAndHashCode(callSuper = true) public class TransferSinglerPayRespDTO extends BaseResponseDTO { }
[ "945288603@qq.com" ]
945288603@qq.com
9ab12e99bb331a6cb5c4cfc040e56af372dc3163
8bfec612b6426a88db2fa4fdecd7bef268673bdc
/src/com/xu/util/MailUtils.java
f6f038b379a06a223b3b86f53a94553904b966c4
[ "Apache-2.0" ]
permissive
XuDeveloper/javaBank
fdc581e1fc1ad095acea0dc328a274dbf48d3737
d6715b931d08ac070067f923982a52d56b9a701f
refs/heads/master
2021-01-20T14:58:59.622929
2017-05-17T08:06:55
2017-05-17T08:06:55
90,699,034
0
2
null
null
null
null
UTF-8
Java
false
false
6,618
java
package com.xu.util; import java.util.Properties; import javax.mail.Authenticator; import javax.mail.Message; import javax.mail.Message.RecipientType; import javax.mail.MessagingException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import com.sun.mail.util.MailSSLSocketFactory; public class MailUtils { private static String getUserName() { return "javaBank@banking.com"; } private static String getPwd() { return "123"; } public static void sendRegMail(String to, String code) throws Exception { // 1.创建连接对象,连接到邮件服务器 Properties props = new Properties(); // 获取163邮箱smtp服务器的地址, // qq邮箱的SSL加密 // MailSSLSocketFactory sf = new MailSSLSocketFactory(); // sf.setTrustAllHosts(true); // props.setProperty("mail.smtp.ssl.enable", "true"); // props.put("mail.smtp.ssl.socketFactory", sf); // props.setProperty("mail.host", "smtp.qq.com"); // // 是否进行权限验证。 // props.setProperty("mail.smtp.auth", "true"); Session session = Session.getInstance(props, new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { // TODO Auto-generated method stub // 会变的!! return new PasswordAuthentication(getUserName(), getPwd()); } }); // 2.创建邮件对象 Message message = new MimeMessage(session); // 2.1 设置发件人 message.setFrom(new InternetAddress("javaBank@banking.com")); // 2.2 设置收件人 message.setRecipient(RecipientType.TO, new InternetAddress(to)); // 2.3 设置主题 message.setSubject("javaBank Activate"); // 2.4 邮件正文 // <a href='http://localhost:8080/javaBank/ActivateAction?code='" + code + "'>" "http://localhost:8080/javaBank/ActivateAction?code=" + code message.setContent( "<style type='text/css'>" + "body{" + "background-image:url('http://localhost:8080/javaBank/Public/images/bg1.jpg');" + "position:absolute relative;" + "}</style>" + "<body ><br /><center>" + "<font style='font-family:Times New Roman' size='+4'>Activatly Successlly</font>" + "<table cellpadding='0px' cellspacing='0' style=' margin-left:150px; margin-right:120px;color:#000;border:none;font-family:Verdana,Geneva,sans-serif ;font-size:22px;' >" + "<tr><td><p ><h4>Hi,Dear customer:</p></h4></td></tr>" + "<tr><td>&nbsp;Your online bank is activated successlly!<p>&nbsp;Please click the following link to go back to the bank website!</p></td></tr>" + "<tr><td><font color='#0000CC'>" + "&nbsp;<a href='" + GenerateUrlUtils.generateRegUrl(code) + "'>" + GenerateUrlUtils.generateForgetPwdUrl(code) + "</a>" + "</font>" + "<p><font size='+1' style='color:#333'>(If you can't click the URL link address, copy and paste it to the browser's address input box, and then click enter.)</font></p> </td></tr>" + "<tr><td>&nbsp;</td></tr><tr><td><font size='+1' style='color:#333'>Remind!" + "<p>1,If this is not what you apply for, please ignore this email.</p><p>2,if you continue to receive this kind of letter , please contact the administrator as soon as possible.</p>" + "</font> </td></tr><tr ><td align='right'><h4>Send by the Bank!</h4></td></tr></table></center></body>" , "text/html;charset=UTF-8"); // 3.发送一封激活邮件 Transport.send(message); } public static void sendForgetPwdMail(String to, String code) throws Exception { // 1.创建连接对象,连接到邮件服务器 Properties props = new Properties(); // 获取163邮箱smtp服务器的地址, // qq邮箱的SSL加密 // MailSSLSocketFactory sf = new MailSSLSocketFactory(); // sf.setTrustAllHosts(true); // props.setProperty("mail.smtp.ssl.enable", "true"); // props.put("mail.smtp.ssl.socketFactory", sf); // props.setProperty("mail.host", "smtp.qq.com"); // // 是否进行权限验证。 // props.setProperty("mail.smtp.auth", "true"); Session session = Session.getInstance(props, new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { // TODO Auto-generated method stub // 会变的!! return new PasswordAuthentication(getUserName(), getPwd()); } }); // 2.创建邮件对象 Message message = new MimeMessage(session); // 2.1 设置发件人 message.setFrom(new InternetAddress("javaBank@banking.com")); // 2.2 设置收件人 message.setRecipient(RecipientType.TO, new InternetAddress(to)); // 2.3 设置主题 message.setSubject("javaBank Reset Password"); // 2.4 邮件正文 // <a href='http://localhost:8080/javaBank/ActivateAction?code='" + code + "'>" "http://localhost:8080/javaBank/ActivateAction?code=" + code message.setContent( "<style type='text/css'>" + "body{" + "background-image:url('http://localhost:8080/javaBank/Public/images/bg1.jpg');" + "position:absolute relative;" + "}</style>" + "<body ><br /><center>" + "<table cellpadding='0px' cellspacing='0' style=' margin-left:190px; margin-right:120px;border:none;font-family:Verdana,Geneva,sans-serif ;font-size:22px;' >" + "<tr><td><p><h4>Hi,Dear customer:</p></h4></td></tr>" + "<tr><td>&nbsp;You received this E-mail because you (or possibly someone else) applied for a new password. If this is not what you apply for, please ignore this email, but if you continue to receive this kind of letter harassment, please contact the administrator as soon as possible.</td></tr>" + "<tr><td><p>Please click the following link to go back to the bank website and reset password!<p></td></tr>" + "<tr><td><font color='#0000CC'>" + "&nbsp;<a href='" + GenerateUrlUtils.generateForgetPwdUrl(code) + "'>" + GenerateUrlUtils.generateForgetPwdUrl(code) + "</a>" + "</font>" + "<p><font size='+1' style='color:#333'>(If you can't click the URL link address, copy and paste it to the browser's address input box, and then click enter.)</font></p> </td></tr>" + "<tr><td>&nbsp;</td></tr><tr><td><font size='+1' style='color:#333'>Remind!" + "<p>Please use the email within 1 hour , otherwise the link will fail..</p>" + "</font> </td></tr><tr ><td align='right'><h4>Send by the Bank!</h4></td></tr></table></center></body>" , "text/html;charset=UTF-8"); // 3.发送一封激活邮件 Transport.send(message); } }
[ "280745397@qq.com" ]
280745397@qq.com