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
763d9f7071adec49e3210c472feec28136117396
23b6d6971a66cf057d1846e3b9523f2ad4e05f61
/MLMN-Alarm-Forwarding/src/vn/com/vhc/service/MessageService.java
f830b73cd19fad32d0e7fcb1d0f58e7690833047
[]
no_license
vhctrungnq/mlmn
943f5a44f24625cfac0edc06a0d1b114f808dfb8
d3ba1f6eebe2e38cdc8053f470f0b99931085629
refs/heads/master
2020-03-22T13:48:30.767393
2018-07-08T05:14:12
2018-07-08T05:14:12
140,132,808
0
1
null
2018-07-08T05:29:27
2018-07-08T02:57:06
Java
UTF-8
Java
false
false
638
java
// ---------------------------------------------------------------------------- // Copyright 2013, VHCSoft JSC. // All rights reserved // ---------------------------------------------------------------------------- // Change History: // 2013.12.11 datnh // - Initial release // ---------------------------------------------------------------------------- package vn.com.vhc.service; import vn.com.vhc.model.Message; /** * Message service interface * * @author datnh * */ public interface MessageService { /** * Process message * @param message */ void processMessage(Message message); }
[ "trungnq@vhc.com.vn" ]
trungnq@vhc.com.vn
3c8c15409c06c53fe7dac17dc3af16a3b315bbfd
2eb5604c0ba311a9a6910576474c747e9ad86313
/chado-pg-orm/src/org/irri/iric/chado/so/H3k4MethylationSiteHome.java
d55988a8f94f10b5fcd29c474851647c735595fc
[]
no_license
iric-irri/portal
5385c6a4e4fd3e569f5334e541d4b852edc46bc1
b2d3cd64be8d9d80b52d21566f329eeae46d9749
refs/heads/master
2021-01-16T00:28:30.272064
2014-05-26T05:46:30
2014-05-26T05:46:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,758
java
package org.irri.iric.chado.so; // Generated 05 26, 14 1:32:32 PM by Hibernate Tools 3.4.0.CR1 import java.util.List; import javax.naming.InitialContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.hibernate.LockMode; import org.hibernate.SessionFactory; import org.hibernate.criterion.Example; /** * Home object for domain model class H3k4MethylationSite. * @see org.irri.iric.chado.so.H3k4MethylationSite * @author Hibernate Tools */ public class H3k4MethylationSiteHome { private static final Log log = LogFactory .getLog(H3k4MethylationSiteHome.class); private final SessionFactory sessionFactory = getSessionFactory(); protected SessionFactory getSessionFactory() { try { return (SessionFactory) new InitialContext() .lookup("SessionFactory"); } catch (Exception e) { log.error("Could not locate SessionFactory in JNDI", e); throw new IllegalStateException( "Could not locate SessionFactory in JNDI"); } } public void persist(H3k4MethylationSite transientInstance) { log.debug("persisting H3k4MethylationSite instance"); try { sessionFactory.getCurrentSession().persist(transientInstance); log.debug("persist successful"); } catch (RuntimeException re) { log.error("persist failed", re); throw re; } } public void attachDirty(H3k4MethylationSite instance) { log.debug("attaching dirty H3k4MethylationSite instance"); try { sessionFactory.getCurrentSession().saveOrUpdate(instance); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void attachClean(H3k4MethylationSite instance) { log.debug("attaching clean H3k4MethylationSite instance"); try { sessionFactory.getCurrentSession().lock(instance, LockMode.NONE); log.debug("attach successful"); } catch (RuntimeException re) { log.error("attach failed", re); throw re; } } public void delete(H3k4MethylationSite persistentInstance) { log.debug("deleting H3k4MethylationSite instance"); try { sessionFactory.getCurrentSession().delete(persistentInstance); log.debug("delete successful"); } catch (RuntimeException re) { log.error("delete failed", re); throw re; } } public H3k4MethylationSite merge(H3k4MethylationSite detachedInstance) { log.debug("merging H3k4MethylationSite instance"); try { H3k4MethylationSite result = (H3k4MethylationSite) sessionFactory .getCurrentSession().merge(detachedInstance); log.debug("merge successful"); return result; } catch (RuntimeException re) { log.error("merge failed", re); throw re; } } public H3k4MethylationSite findById( org.irri.iric.chado.so.H3k4MethylationSiteId id) { log.debug("getting H3k4MethylationSite instance with id: " + id); try { H3k4MethylationSite instance = (H3k4MethylationSite) sessionFactory .getCurrentSession().get( "org.irri.iric.chado.so.H3k4MethylationSite", id); if (instance == null) { log.debug("get successful, no instance found"); } else { log.debug("get successful, instance found"); } return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } public List findByExample(H3k4MethylationSite instance) { log.debug("finding H3k4MethylationSite instance by example"); try { List results = sessionFactory .getCurrentSession() .createCriteria( "org.irri.iric.chado.so.H3k4MethylationSite") .add(Example.create(instance)).list(); log.debug("find by example successful, result size: " + results.size()); return results; } catch (RuntimeException re) { log.error("find by example failed", re); throw re; } } }
[ "locem@berting-debian.ourwebserver.no-ip.biz" ]
locem@berting-debian.ourwebserver.no-ip.biz
9fa6368ceb8a74a4a38054d0ee6e7ba144f0e6a1
7c3e769ad1e036004fcd47540d018524d8cf69c4
/bogoLive/src/main/java/com/bogokj/live/model/BogoDaySignModel.java
fb234c816677abddcf6e1fd2f3fb772983075114
[]
no_license
zkbqhuang/bogo_live_android
b813ed99f7237f4dd2e77014c311bc8da74ecbf9
a51799fa7038f089b10209e7ec446a0000a68d8a
refs/heads/master
2022-07-06T15:29:08.344192
2020-05-11T03:11:12
2020-05-11T03:11:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
844
java
package com.bogokj.live.model; public class BogoDaySignModel { private String day; private String num; private String id; private String is_sign; private String now; public String getNow() { return now; } public void setNow(String now) { this.now = now; } public String getIs_sign() { return is_sign; } public void setIs_sign(String is_sign) { this.is_sign = is_sign; } public String getDay() { return "第" + day + "天"; } public void setDay(String day) { this.day = day; } public String getNum() { return num; } public void setNum(String num) { this.num = num; } public String getId() { return id; } public void setId(String id) { this.id = id; } }
[ "986008261@qq.com" ]
986008261@qq.com
d0bb25ab8646c731bb1b7d78001e2c7eabaafed8
fea683c0ec66ff872b001f39fba4bd0f5a772176
/jpuppeteer-cdp/src/main/java/jpuppeteer/cdp/cdp/entity/page/DownloadWillBeginEvent.java
15de0022efd25216fb2e27934b9ff6754311f267
[]
no_license
affjerry/jpuppeteer
c343f64636eabdf5c3da52b6c0d660054d837894
5dbd900862035b4403b975f91f1b18938b19f08b
refs/heads/master
2023-08-15T23:45:39.292666
2020-05-27T01:48:41
2020-05-27T01:48:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
388
java
package jpuppeteer.cdp.cdp.entity.page; /** * Fired when page is about to start a download. */ @lombok.Setter @lombok.Getter @lombok.ToString public class DownloadWillBeginEvent { /** * Id of the frame that caused download to begin. */ private String frameId; /** * URL of the resource being downloaded. */ private String url; }
[ "jarvis.xu@vipshop.com" ]
jarvis.xu@vipshop.com
3364305fabb2427e62523fbc20dff1db9943684c
7a00bba209de9fcc26ef692006d722bee0530a1a
/backend/n2o/n2o-config/src/main/java/net/n2oapp/framework/config/io/control/plain/TextEditorIOv2.java
10cf4933267ebecefca175ee0641f95310ce917b
[ "Apache-2.0" ]
permissive
borispinus/n2o-framework
bb7c78bc195c4b01370fc2666d6a3b71ded950d7
215782a1e5251549b79c5dd377940ecabba0f1d7
refs/heads/master
2020-04-13T20:10:06.213241
2018-12-28T10:12:18
2018-12-28T10:12:18
163,422,862
1
0
null
2018-12-28T15:11:59
2018-12-28T15:11:58
null
UTF-8
Java
false
false
844
java
package net.n2oapp.framework.config.io.control.plain; import net.n2oapp.framework.api.metadata.control.plain.N2oTextEditor; import net.n2oapp.framework.api.metadata.io.IOProcessor; import org.jdom.Element; import org.springframework.stereotype.Component; @Component public class TextEditorIOv2 extends PlainFieldIOv2<N2oTextEditor> { @Override public void io(Element e, N2oTextEditor m, IOProcessor p) { super.io(e, m, p); p.attribute(e, "config-url", m::getConfigUrl, m::setConfigUrl); p.attribute(e, "height", m::getHeight, m::setHeight); p.attributeInteger(e, "rows", m::getRows, m::setRows); } @Override public Class<N2oTextEditor> getElementClass() { return N2oTextEditor.class; } @Override public String getElementName() { return "text-editor"; } }
[ "iryabov@i-novus.ru" ]
iryabov@i-novus.ru
8de15a34e418c0ab2de1404318132823d4983ef9
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/XWIKI-13708-3-29-FEMO-WeightedSum:TestLen:CallDiversity/org/xwiki/observation/internal/DefaultObservationManager_ESTest_scaffolding.java
349e3408441b08ba636ff3e25cee912d159562a4
[]
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
460
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Fri Apr 03 23:00:37 UTC 2020 */ package org.xwiki.observation.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultObservationManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
5ce2e752aa8bea215c1687678fba9182c6100e64
7222c03a7a34add822f51511269c7061780ee5a6
/plugins/org.minig.imap/src/org/minig/imap/command/SimpleCommand.java
1042a5ceb08151a4729eef0667027a05b7768b77
[]
no_license
YYChildren/minig
17103eb1170d29930404230f3ce22609cd66c869
9a413a70b9aed485bdc42068bf701db8425963c9
refs/heads/master
2016-09-14T00:28:53.387344
2016-04-13T01:28:08
2016-04-13T01:28:08
56,111,120
0
0
null
null
null
null
UTF-8
Java
false
false
812
java
/* ***** BEGIN LICENSE BLOCK ***** * Version: GPL 2.0 * * The contents of this file are subject to the GNU General Public * License Version 2 or later (the "GPL"). * * 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 Initial Developer of the Original Code is * MiniG.org project members * * ***** END LICENSE BLOCK ***** */ package org.minig.imap.command; public abstract class SimpleCommand<T> extends Command<T> { private String command; protected SimpleCommand(String cmd) { this.command = cmd; } protected CommandArgument buildCommand() { return new CommandArgument(command, null); } }
[ "tcataldo@gmail.com" ]
tcataldo@gmail.com
27b7eb0f8b21135149dbf05570b4e01a9d98e068
0da97d140179cf72c408c1da530a72eeb5e64830
/msgpack-java-modified/src/test/java/org/msgpack/testclasses/ReferenceTypeFieldsClass.java
f263a06c80648737ac015fd8c1b86969e2cd7d17
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
bachden/msgpack-java-modified
b69044a76cdf1c1ce82b02962b6f088b2f606cd4
2ca437b4d989895c9861f59041522680bc2d93e4
refs/heads/master
2021-01-20T14:58:57.957891
2018-09-10T11:02:11
2018-09-10T11:02:11
90,699,563
0
0
null
null
null
null
UTF-8
Java
false
false
3,589
java
package org.msgpack.testclasses; import java.math.BigInteger; import java.nio.ByteBuffer; import org.junit.Ignore; import org.msgpack.annotation.Beans; import org.msgpack.annotation.Message; import org.msgpack.template.builder.TestSet; @Ignore @Message @Beans public class ReferenceTypeFieldsClass { public Byte f0; public Short f1; public Integer f2; public Long f3; public Float f4; public Double f5; public Boolean f6; public BigInteger f7; public String f8; public byte[] f9; public ByteBuffer f10; public ReferenceTypeFieldsClass() { } public Byte getF0() { return f0; } public void setF0(Byte f0) { this.f0 = f0; } public Short getF1() { return f1; } public void setF1(Short f1) { this.f1 = f1; } public Integer getF2() { return f2; } public void setF2(Integer f2) { this.f2 = f2; } public Long getF3() { return f3; } public void setF3(Long f3) { this.f3 = f3; } public Float getF4() { return f4; } public void setF4(Float f4) { this.f4 = f4; } public Double getF5() { return f5; } public void setF5(Double f5) { this.f5 = f5; } public Boolean getF6() { return f6; } public void setF6(Boolean f6) { this.f6 = f6; } public BigInteger getF7() { return f7; } public void setF7(BigInteger f7) { this.f7 = f7; } public String getF8() { return f8; } public void setF8(String f8) { this.f8 = f8; } public byte[] getF9() { return f9; } public void setF9(byte[] f9) { this.f9 = f9; } public ByteBuffer getF10() { return f10; } public void setF10(ByteBuffer f10) { this.f10 = f10; } @Override public boolean equals(Object o) { if (!(o instanceof ReferenceTypeFieldsClass)) { return false; } ReferenceTypeFieldsClass that = (ReferenceTypeFieldsClass) o; if (f0 == null) { if (that.f0 != null) { return false; } } if (that.f0 != null && !f0.equals(that.f0)) { return false; } if (f1 == null) { if (that.f1 != null) { return false; } } if (that.f1 != null && !f1.equals(that.f1)) { return false; } if (f2 == null) { if (that.f2 != null) { return false; } } if (that.f2 != null && !f2.equals(that.f2)) { return false; } if (f3 == null) { if (that.f3 != null) { return false; } } if (that.f3 != null && !f3.equals(that.f3)) { return false; } if (f4 == null) { if (that.f4 != null) { return false; } } if (that.f4 != null && !f4.equals(that.f4)) { return false; } if (f5 == null) { if (that.f5 != null) { return false; } } if (that.f5 != null && !f5.equals(that.f5)) { return false; } if (f6 == null) { if (that.f6 != null) { return false; } } if (that.f6 != null && !f6.equals(that.f6)) { return false; } if (f7 == null) { if (that.f7 != null) { return false; } } if (that.f7 != null && !f7.equals(that.f7)) { return false; } if (f8 == null) { if (that.f8 != null) { return false; } } if (that.f8 != null && !f8.equals(that.f8)) { return false; } if (f9 == null) { if (that.f9 != null) { return false; } } if (that.f9 != null) { for (int i = 0; i < f9.length; ++i) { if (f9[i] != that.f9[i]) { return false; } } } if (f10 == null) { if (that.f10 != null) { return false; } } if (that.f10 != null) { byte[] b0 = TestSet.toByteArray(f10); byte[] b1 = TestSet.toByteArray(that.f10); for (int i = 0; i < b0.length; ++i) { if (b0[i] != b1[i]) { return false; } } } return true; } }
[ "hoangbach.bk@gmail.com" ]
hoangbach.bk@gmail.com
36aba083260a9682d4d8f076474af91337884b18
2ef24d4f9bc441ecef3d14db16e0349b5831a4e2
/test/src/hashmaptest.java
af63c5b7719cb08a7460fcbc96452fc05a3fac03
[]
no_license
Skillnet-test/generaljavaprograms
9a6d6039575150af9afbfe626522378d9e7d7dc8
d501116a933fba42111e182ac293c05b68b5bf61
refs/heads/master
2020-03-29T00:20:32.087162
2018-09-20T07:04:27
2018-09-20T07:04:27
149,335,161
0
0
null
null
null
null
UTF-8
Java
false
false
128
java
version https://git-lfs.github.com/spec/v1 oid sha256:d8915e696af893df32ec0fa781a35b5cd0a33c7e30e1629962df641f914f735e size 868
[ "saptarshi.mukhaty@skillnetinc.com" ]
saptarshi.mukhaty@skillnetinc.com
e10b7646d691de44eec4bd695bc215182381e415
71b919749069accbdbfc35f7dba703dd5c5780a6
/sso/sso-server/src/main/java/com/xp/filter/SessionFilter.java
5a89ced3d20c3271c2f4046611abaa50266d95d2
[ "MIT" ]
permissive
xp-zhao/learn-java
489f811acf20649b773032a6831fbfc72dc4c418
108dcf1e4e02ae76bfd09e7c2608a38a1216685c
refs/heads/master
2023-09-01T03:07:23.795372
2023-08-25T08:28:59
2023-08-25T08:28:59
118,060,929
2
0
MIT
2022-06-21T04:16:08
2018-01-19T01:39:11
Java
UTF-8
Java
false
false
2,248
java
package com.xp.filter; import com.xp.common.SSOConst; import com.xp.storage.ClientStorage; import com.xp.utils.YamlUtil; import org.apache.commons.lang3.StringUtils; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.util.List; /** * sso认证中心会话过滤 * */ public class SessionFilter implements Filter { private List<String> FILTER_URLS; private List<String> LOGIN_URLS; public void destroy() {} public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) req; HttpServletResponse response = (HttpServletResponse) res; HttpSession session = request.getSession(); String uri = request.getRequestURI(); if(request.getRequestURI().indexOf(".") > 0) { chain.doFilter(req, res); return; } // 注销请求,放行 if(FILTER_URLS.contains(uri)) { chain.doFilter(req , res); return; } // 如果是客户端发起的请求(带有 callbackURL 参数),跳转回客户端 String clientUrl = request.getParameter(SSOConst.CLIENT_URL); // 已经登录,放行 if (session.getAttribute(SSOConst.IS_LOGIN) != null) { if (StringUtils.isNotBlank(clientUrl)) { // 获取登录认证中心时保存的 token String token = (String) session.getAttribute(SSOConst.TOKEN); // 存储子系统地址,用于注销 ClientStorage.INSTANCE.set(token,clientUrl); // 重定向到客户端请求的地址,并附带 token(用于验证是否由认证中心发起的请求) response.sendRedirect(clientUrl + "?"+SSOConst.TOKEN+ "=" + token); return; } chain.doFilter(req, res); return; } // 登录请求,放行 if (LOGIN_URLS.contains(uri)) { chain.doFilter(req, res); return; } // 其他请求,拦截 response.sendRedirect("/sso-server/sso/login.do?"+SSOConst.CLIENT_URL+"="+clientUrl); } public void init(FilterConfig config) throws ServletException { FILTER_URLS = YamlUtil.getInstance().getList("filter"); LOGIN_URLS = YamlUtil.getInstance().getList("login_urls"); } }
[ "13688396271@163.com" ]
13688396271@163.com
f859ffeb7c4240cc4723ac8409fa36526acac463
7d91c34d3f1e30a77afd3221d0ab595389fbe23e
/javax/naming/ldap/SortResponseControl.java
b3f09c5a4bd450df2d571cb9c5ab82e2c6b66885
[]
no_license
JobTracker/java-source
a9a6b5c1030f8ee09831922fed8c8e808b75f2f5
15ffe2fc855c459f0397e7f633392177e91b4859
refs/heads/master
2016-09-05T08:59:02.510617
2014-08-25T05:51:05
2014-08-25T05:51:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,297
java
/* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package javax.naming.ldap; import java.io.IOException; import javax.naming.*; import javax.naming.directory.*; import com.sun.jndi.ldap.Ber; import com.sun.jndi.ldap.BerDecoder; import com.sun.jndi.ldap.LdapCtx; /** * Indicates whether the requested sort of search results was successful or not. * When the result code indicates success then the results have been sorted as * requested. Otherwise the sort was unsuccessful and additional details * regarding the cause of the error may have been provided by the server. * <p> * The code sample in {@link SortControl} shows how this class may be used. * <p> * This class implements the LDAPv3 Response Control for server-side sorting * as defined in * <a href="http://www.ietf.org/rfc/rfc2891.txt">RFC 2891</a>. * * The control's value has the following ASN.1 definition: * <pre> * * SortResult ::= SEQUENCE { * sortResult ENUMERATED { * success (0), -- results are sorted * operationsError (1), -- server internal failure * timeLimitExceeded (3), -- timelimit reached before * -- sorting was completed * strongAuthRequired (8), -- refused to return sorted * -- results via insecure * -- protocol * adminLimitExceeded (11), -- too many matching entries * -- for the server to sort * noSuchAttribute (16), -- unrecognized attribute * -- type in sort key * inappropriateMatching (18), -- unrecognized or inappro- * -- priate matching rule in * -- sort key * insufficientAccessRights (50), -- refused to return sorted * -- results to this client * busy (51), -- too busy to process * unwillingToPerform (53), -- unable to sort * other (80) * }, * attributeType [0] AttributeType OPTIONAL } * * </pre> * * @since 1.5 * @see SortControl * @author Vincent Ryan */ final public class SortResponseControl extends BasicControl { /** * The server-side sort response control's assigned object identifier * is 1.2.840.113556.1.4.474. */ public static final String OID = "1.2.840.113556.1.4.474"; private static final long serialVersionUID = 5142939176006310877L; /** * The sort result code. * * @serial */ private int resultCode = 0; /** * The ID of the attribute that caused the sort to fail. * * @serial */ private String badAttrId = null; /** * Constructs a control to indicate the outcome of a sort request. * * @param id The control's object identifier string. * @param criticality The control's criticality. * @param value The control's ASN.1 BER encoded value. * It is not cloned - any changes to value * will affect the contents of the control. * @exception IOException if an error is encountered * while decoding the control's value. */ public SortResponseControl(String id, boolean criticality, byte[] value) throws IOException { super(id, criticality, value); // decode value BerDecoder ber = new BerDecoder(value, 0, value.length); ber.parseSeq(null); resultCode = ber.parseEnumeration(); if ((ber.bytesLeft() > 0) && (ber.peekByte() == Ber.ASN_CONTEXT)) { badAttrId = ber.parseStringWithTag(Ber.ASN_CONTEXT, true, null); } } /** * Determines if the search results have been successfully sorted. * If an error occurred during sorting a NamingException is thrown. * * @return true if the search results have been sorted. */ public boolean isSorted() { return (resultCode == 0); // a result code of zero indicates success } /** * Retrieves the LDAP result code of the sort operation. * * @return The result code. A zero value indicates success. */ public int getResultCode() { return resultCode; } /** * Retrieves the ID of the attribute that caused the sort to fail. * Returns null if no ID was returned by the server. * * @return The possibly null ID of the bad attribute. */ public String getAttributeID() { return badAttrId; } /** * Retrieves the NamingException appropriate for the result code. * * @return A NamingException or null if the result code indicates * success. */ public NamingException getException() { return LdapCtx.mapErrorCode(resultCode, null); } }
[ "1092862062@qq.com" ]
1092862062@qq.com
c0abbf494e2f29c51bc2b43af7c48e5fe8429740
1bdb1b893e94f117ccf05d90d9883f3df275e9ed
/common/src/main/java/net/daporkchop/lib/common/pool/array/AbstractArrayAllocator.java
4d3dd6372ab6d8eb0afcc5198f58665079dd6fe5
[ "LicenseRef-scancode-warranty-disclaimer", "MIT" ]
permissive
PorkStudios/PorkLib
2c498fb2cf9916db4a66189493e4910586098592
c37fa0659004b7773de057330cdc9b6ca1b0b326
refs/heads/development
2023-08-04T15:17:46.061542
2023-07-15T14:30:02
2023-07-15T14:30:02
147,661,822
39
6
NOASSERTION
2022-07-11T12:51:38
2018-09-06T11:12:04
Java
UTF-8
Java
false
false
2,475
java
/* * Adapted from The MIT License (MIT) * * Copyright (c) 2018-2020 DaPorkchop_ * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software * is furnished to do so, subject to the following conditions: * * Any persons and/or organizations using this software must include the above copyright notice and this permission notice, * provide sufficient credit to the original authors of the project (IE: DaPorkchop_), as well as provide a link to the original project. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ package net.daporkchop.lib.common.pool.array; import lombok.AccessLevel; import lombok.NonNull; import lombok.RequiredArgsConstructor; import java.lang.reflect.Array; import java.util.function.IntFunction; import static net.daporkchop.lib.common.util.PValidation.*; import static net.daporkchop.lib.common.util.PorkUtil.*; /** * Base implementation of {@link ArrayAllocator}. * * @author DaPorkchop_ */ @RequiredArgsConstructor(access = AccessLevel.PRIVATE) public abstract class AbstractArrayAllocator<V> implements ArrayAllocator<V> { protected final IntFunction<V> lambda; protected final Class<?> componentClass; public AbstractArrayAllocator(@NonNull IntFunction<V> lambda) { this(lambda, null); checkArg(lambda.apply(0).getClass().isArray(), "Provided array creator is not an array type!"); } public AbstractArrayAllocator(@NonNull Class<?> componentClass) { this(null, componentClass); } protected V createArray(int length) { if (this.lambda != null) { return this.lambda.apply(length); } else { return uncheckedCast(Array.newInstance(this.componentClass, length)); } } }
[ "daporkchop@daporkchop.net" ]
daporkchop@daporkchop.net
63629d3247b05e3a3a461a22d0259c060ad4ae09
9254e7279570ac8ef687c416a79bb472146e9b35
/ecd-20200930/src/main/java/com/aliyun/ecd20200930/models/CreateDesktopGroupRequest.java
533a24a0ad77a1f2c619f7c0ad6c3dd89a3e26c1
[ "Apache-2.0" ]
permissive
lquterqtd/alibabacloud-java-sdk
3eaa17276dd28004dae6f87e763e13eb90c30032
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
refs/heads/master
2023-08-12T13:56:26.379027
2021-10-19T07:22:15
2021-10-19T07:22:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,725
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.ecd20200930.models; import com.aliyun.tea.*; public class CreateDesktopGroupRequest extends TeaModel { @NameInMap("RegionId") public String regionId; @NameInMap("BundleId") public String bundleId; @NameInMap("OfficeSiteId") public String officeSiteId; @NameInMap("PolicyGroupId") public String policyGroupId; @NameInMap("DesktopGroupName") public String desktopGroupName; @NameInMap("DirectoryId") public String directoryId; @NameInMap("ScaleStrategyId") public String scaleStrategyId; @NameInMap("VpcId") public String vpcId; @NameInMap("DefaultInitDesktopCount") public Integer defaultInitDesktopCount; @NameInMap("KeepDuration") public Long keepDuration; @NameInMap("ChargeType") public String chargeType; @NameInMap("Period") public Integer period; @NameInMap("PeriodUnit") public String periodUnit; @NameInMap("OwnType") public Integer ownType; @NameInMap("AutoPay") public Boolean autoPay; @NameInMap("Comments") public String comments; @NameInMap("MinDesktopsCount") public Integer minDesktopsCount; @NameInMap("MaxDesktopsCount") public Integer maxDesktopsCount; @NameInMap("AllowAutoSetup") public Integer allowAutoSetup; @NameInMap("AllowBufferCount") public Integer allowBufferCount; @NameInMap("ClientToken") public String clientToken; @NameInMap("EndUserIds") public java.util.List<String> endUserIds; public static CreateDesktopGroupRequest build(java.util.Map<String, ?> map) throws Exception { CreateDesktopGroupRequest self = new CreateDesktopGroupRequest(); return TeaModel.build(map, self); } public CreateDesktopGroupRequest setRegionId(String regionId) { this.regionId = regionId; return this; } public String getRegionId() { return this.regionId; } public CreateDesktopGroupRequest setBundleId(String bundleId) { this.bundleId = bundleId; return this; } public String getBundleId() { return this.bundleId; } public CreateDesktopGroupRequest setOfficeSiteId(String officeSiteId) { this.officeSiteId = officeSiteId; return this; } public String getOfficeSiteId() { return this.officeSiteId; } public CreateDesktopGroupRequest setPolicyGroupId(String policyGroupId) { this.policyGroupId = policyGroupId; return this; } public String getPolicyGroupId() { return this.policyGroupId; } public CreateDesktopGroupRequest setDesktopGroupName(String desktopGroupName) { this.desktopGroupName = desktopGroupName; return this; } public String getDesktopGroupName() { return this.desktopGroupName; } public CreateDesktopGroupRequest setDirectoryId(String directoryId) { this.directoryId = directoryId; return this; } public String getDirectoryId() { return this.directoryId; } public CreateDesktopGroupRequest setScaleStrategyId(String scaleStrategyId) { this.scaleStrategyId = scaleStrategyId; return this; } public String getScaleStrategyId() { return this.scaleStrategyId; } public CreateDesktopGroupRequest setVpcId(String vpcId) { this.vpcId = vpcId; return this; } public String getVpcId() { return this.vpcId; } public CreateDesktopGroupRequest setDefaultInitDesktopCount(Integer defaultInitDesktopCount) { this.defaultInitDesktopCount = defaultInitDesktopCount; return this; } public Integer getDefaultInitDesktopCount() { return this.defaultInitDesktopCount; } public CreateDesktopGroupRequest setKeepDuration(Long keepDuration) { this.keepDuration = keepDuration; return this; } public Long getKeepDuration() { return this.keepDuration; } public CreateDesktopGroupRequest setChargeType(String chargeType) { this.chargeType = chargeType; return this; } public String getChargeType() { return this.chargeType; } public CreateDesktopGroupRequest setPeriod(Integer period) { this.period = period; return this; } public Integer getPeriod() { return this.period; } public CreateDesktopGroupRequest setPeriodUnit(String periodUnit) { this.periodUnit = periodUnit; return this; } public String getPeriodUnit() { return this.periodUnit; } public CreateDesktopGroupRequest setOwnType(Integer ownType) { this.ownType = ownType; return this; } public Integer getOwnType() { return this.ownType; } public CreateDesktopGroupRequest setAutoPay(Boolean autoPay) { this.autoPay = autoPay; return this; } public Boolean getAutoPay() { return this.autoPay; } public CreateDesktopGroupRequest setComments(String comments) { this.comments = comments; return this; } public String getComments() { return this.comments; } public CreateDesktopGroupRequest setMinDesktopsCount(Integer minDesktopsCount) { this.minDesktopsCount = minDesktopsCount; return this; } public Integer getMinDesktopsCount() { return this.minDesktopsCount; } public CreateDesktopGroupRequest setMaxDesktopsCount(Integer maxDesktopsCount) { this.maxDesktopsCount = maxDesktopsCount; return this; } public Integer getMaxDesktopsCount() { return this.maxDesktopsCount; } public CreateDesktopGroupRequest setAllowAutoSetup(Integer allowAutoSetup) { this.allowAutoSetup = allowAutoSetup; return this; } public Integer getAllowAutoSetup() { return this.allowAutoSetup; } public CreateDesktopGroupRequest setAllowBufferCount(Integer allowBufferCount) { this.allowBufferCount = allowBufferCount; return this; } public Integer getAllowBufferCount() { return this.allowBufferCount; } public CreateDesktopGroupRequest setClientToken(String clientToken) { this.clientToken = clientToken; return this; } public String getClientToken() { return this.clientToken; } public CreateDesktopGroupRequest setEndUserIds(java.util.List<String> endUserIds) { this.endUserIds = endUserIds; return this; } public java.util.List<String> getEndUserIds() { return this.endUserIds; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
c3cffb56b9f61c6d4d67b841a456a5c10121c87a
2ceab24540a61aaaa43b2f1b6c8b4398332543f0
/src/com/lee2015mysite/vo/CommentVo.java
c32a83c463b73d621716491940a02cdb576853d0
[]
no_license
leespec88/mysite
c24b0b554578a7fba655bedfdfb7ac914f8c30a5
7641e31ee099b191781442e3a6f67d778d21785f
refs/heads/master
2020-06-02T11:39:45.846471
2015-08-19T23:37:49
2015-08-19T23:38:02
41,017,856
0
0
null
null
null
null
UTF-8
Java
false
false
1,018
java
package com.lee2015mysite.vo; public class CommentVo { private long no; private String content; private String regDate; private long contentNo; private long authUserNo; private String authUserName; public long getNo() { return no; } public void setNo(long no) { this.no = no; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getRegDate() { return regDate; } public void setRegDate(String regDate) { this.regDate = regDate; } public long getContentNo() { return contentNo; } public void setContentNo(long contentNo) { this.contentNo = contentNo; } public long getAuthUserNo() { return authUserNo; } public void setAuthUserNo(long authUserNo) { this.authUserNo = authUserNo; } public String getAuthUserName() { return authUserName; } public void setAuthUserName(String authUserName) { this.authUserName = authUserName; } }
[ "bit@bit-PC" ]
bit@bit-PC
0c7ec5c7297c47e2c063033ca7d84c710a525c76
5ab95c433ef08a4ac93bd95f6e1011ba9b79cc0e
/src/main/java/org/kuali/rice/kim/v2_0/GetEntityDefaultByEmployeeId.java
c88ed07ec3894fcbb6f239c30dfac126045deb39
[]
no_license
CU-CommunityApps/ksb-client
f98b5505937c95a32db86d7f3baa0f34b7427f68
2792c064bc90f50710e05ee5ba3d4c304d3a2999
refs/heads/master
2021-01-16T21:34:16.647538
2019-01-18T19:36:13
2019-01-18T19:36:13
17,973,861
0
0
null
2019-03-13T20:16:52
2014-03-21T09:00:48
Java
UTF-8
Java
false
false
1,435
java
package org.kuali.rice.kim.v2_0; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for getEntityDefaultByEmployeeId complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="getEntityDefaultByEmployeeId"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="employeeId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "getEntityDefaultByEmployeeId", propOrder = { "employeeId" }) public class GetEntityDefaultByEmployeeId { protected String employeeId; /** * Gets the value of the employeeId property. * * @return * possible object is * {@link String } * */ public String getEmployeeId() { return employeeId; } /** * Sets the value of the employeeId property. * * @param value * allowed object is * {@link String } * */ public void setEmployeeId(String value) { this.employeeId = value; } }
[ "shawn.bower@gmail.com" ]
shawn.bower@gmail.com
fef1dae3fa77983ce8026cde4b9237e801f9d87f
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/quickbi-public-20220101/src/main/java/com/aliyun/quickbi_public20220101/models/ChangeVisibilityModelRequest.java
c58ead75840edb33fb2407e3a71af9290e5bb909
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
1,590
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.quickbi_public20220101.models; import com.aliyun.tea.*; public class ChangeVisibilityModelRequest extends TeaModel { /** * <p>The number of menus that are successfully modified.</p> */ @NameInMap("DataPortalId") public String dataPortalId; /** * <p>Indicates whether the request is successful. Valid values:</p> * <br> * <p>* true: The request was successful.</p> * <p>* false: The request failed.</p> */ @NameInMap("MenuIds") public String menuIds; @NameInMap("ShowOnlyWithAccess") public Boolean showOnlyWithAccess; public static ChangeVisibilityModelRequest build(java.util.Map<String, ?> map) throws Exception { ChangeVisibilityModelRequest self = new ChangeVisibilityModelRequest(); return TeaModel.build(map, self); } public ChangeVisibilityModelRequest setDataPortalId(String dataPortalId) { this.dataPortalId = dataPortalId; return this; } public String getDataPortalId() { return this.dataPortalId; } public ChangeVisibilityModelRequest setMenuIds(String menuIds) { this.menuIds = menuIds; return this; } public String getMenuIds() { return this.menuIds; } public ChangeVisibilityModelRequest setShowOnlyWithAccess(Boolean showOnlyWithAccess) { this.showOnlyWithAccess = showOnlyWithAccess; return this; } public Boolean getShowOnlyWithAccess() { return this.showOnlyWithAccess; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
5d5ec7aa49fa9a058a27b393ab7413bf46e99d26
9c7e8ffeac14f451a90bf559383ec5566ea81d1b
/projects/papabench/src/main/java/papabench/core/autopilot/tasks/pids/AbstractPIDController.java
45626395e117e6d66b04e2bd6aeeae1392e752f3
[ "MIT" ]
permissive
mc-imperial/jtool-sct
fc2209f2d6c6273e9dae7a37a8209291914a7195
80811bb88e1cec0234bc720b5b47ec9e2cdf6364
refs/heads/master
2021-01-12T12:46:55.912768
2016-10-26T11:07:18
2016-10-26T11:07:20
69,858,207
0
1
null
null
null
null
UTF-8
Java
false
false
270
java
/** * */ package papabench.core.autopilot.tasks.pids; import papabench.core.commons.conf.AirframeParametersConf; /** * @author Michal Malohlava * */ //@SCJAllowed public abstract class AbstractPIDController implements PIDController, AirframeParametersConf { }
[ "paul.thomson11@imperial.ac.uk" ]
paul.thomson11@imperial.ac.uk
e7ba38d2e886383e9072cb8c951dfbb011e69e40
329a0d6b289fb3ce91ef2a3dfaf539414f4b2cfe
/.svn/pristine/e7/e7ba38d2e886383e9072cb8c951dfbb011e69e40.svn-base
12feff5c0a8a529db2d86da28d3d125dbf774039
[]
no_license
dl-ypy/shixi
9bfdeabe487ed2cc288dffc32830914329a1e8a0
b21ddd3a2b2c01463afd2382468ae0899f53e78e
refs/heads/master
2020-03-21T01:47:32.315446
2018-06-20T01:28:15
2018-06-20T01:58:13
137,962,680
0
0
null
null
null
null
UTF-8
Java
false
false
3,926
package com.bonc.pure.web.action.rpt.scxy; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.List; import java.util.Map; import com.bonc.pure.web.action.CwCommon; /** * ICT毛利率及回款率 */ public class ICTRateAction extends CwCommon { private String monthId; private String year; private String orgId; private String areaNo; private String kpiId; public String execute() { init(); initCwAreaSelect(); monthId = param.get("monthId") == null ? "" : param.get("monthId").toString(); if (!"".equals(monthId)) { SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM"); SimpleDateFormat sdfAim = new SimpleDateFormat("yyyy-MM"); try { monthId = sdfAim.format(sdf.parse(monthId)); } catch (ParseException e) { e.printStackTrace(); } } return "success"; } /*表1*/ public String table() { list = daoHelper.queryForList("cw.rpt.scxy.ICTRateTable", this); return "table"; } /*表2*/ public String table2() { list = daoHelper.queryForList("cw.rpt.scxy.ICTRateTable2", this); return "table2"; } /*标题*/ public void getTitle() { Map map = new HashMap(); List list1 = daoHelper.queryForList("cw.rpt.scxy.ICTRateTitle1", this); List list2 = daoHelper.queryForList("cw.rpt.scxy.ICTRateTitle2", this); map.put("list1", list1); map.put("list2", list2); returnMapAsJson(map); } /*折线图1*/ public void getLineChart1(){ Map map = new HashMap(); list = daoHelper.queryForList("cw.common.getYear", this); String thisYear = ""; String lastYear = ""; if (list.size() > 0) { Map tempMap = (Map) list.get(0); thisYear = (String) tempMap.get("THIS_YEAR"); lastYear = (String) tempMap.get("LAST_YEAR"); } year = thisYear; List lineList1 = daoHelper.queryForList("cw.rpt.scxy.ICTRateLine1", this); map.put("thisYearLine", lineList1); year = lastYear; List lineList2 = daoHelper.queryForList("cw.rpt.scxy.ICTRateLine1", this); map.put("lastYearLine", lineList2); returnMapAsJson(map); } /*折线图2*/ public void getLineChart2(){ Map map = new HashMap(); list = daoHelper.queryForList("cw.common.getYear", this); String thisYear = ""; String lastYear = ""; if (list.size() > 0) { Map tempMap = (Map) list.get(0); thisYear = (String) tempMap.get("THIS_YEAR"); lastYear = (String) tempMap.get("LAST_YEAR"); } year = thisYear; List lineList1 = daoHelper.queryForList("cw.rpt.scxy.ICTRateLine2", this); map.put("thisYearLine", lineList1); year = lastYear; List lineList2 = daoHelper.queryForList("cw.rpt.scxy.ICTRateLine2", this); map.put("lastYearLine", lineList2); returnMapAsJson(map); } public String queryDrill(){ /*默认为areaNo为root,若要查找地市的下一级县区只需要删掉下行代码即可*/ setAreaNo("root"); System.out.println("测试区域号--"+areaNo); System.out.println("测试月份--"+monthId); System.out.println("测试的Kpi--"+kpiId); list = daoHelper.queryForList("cw.rpt.scxy.getICTDrill", this); System.out.println("测试的list--"+list); return "drillTable"; } public String getMonthId() { return monthId; } public void setMonthId(String monthId) { if (monthId != null) { this.monthId = monthId.replaceAll("-", ""); } } public String getYear() { return year; } public void setYear(String year) { this.year = year; } public String getOrgId() { return orgId; } public void setOrgId(String orgId) { this.orgId = orgId; } public String getAreaNo() { return areaNo; } public void setAreaNo(String areaNo) { this.areaNo = areaNo; } public String getKpiId() { return kpiId; } public void setKpiId(String kpiId) { this.kpiId = kpiId; } }
[ "792015431@qq.com" ]
792015431@qq.com
331d42b6f9808d2bbf7dfd38b06874cbf8059627
996798b974a225b7f0bcff1eeac64f21c3006e74
/User Mobile App/app/src/main/java/in/techware/lataxicustomer/net/parsers/TotalFareParser.java
64c5cec6049b296100ab5020699ff8de998b7f9e
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
hardikamal/On-Demand-Taxi-Booking-Application
39a9da5623b9afacbda2d7b3bf2adac38810eb46
ba28a9ba6129a502a3f5081d9a999d4b2c2da165
refs/heads/master
2022-11-07T09:57:12.989346
2016-06-22T08:13:00
2016-06-22T08:13:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,159
java
package in.techware.lataxicustomer.net.parsers; import org.json.JSONException; import org.json.JSONObject; import in.techware.lataxicustomer.model.FareBean; public class TotalFareParser { public FareBean parseFareInfoResponse(String wsResponseString) { FareBean fareBean = new FareBean(); JSONObject jsonObj = null; try { jsonObj = new JSONObject(wsResponseString); if (jsonObj.has("error")) { JSONObject errorJSObj; try { errorJSObj = jsonObj.getJSONObject("error"); if (errorJSObj != null) { if (errorJSObj.has("message")) { fareBean.setErrorMsg(errorJSObj.optString("message")); } } } catch (Exception e) { e.printStackTrace(); } fareBean.setStatus("error"); } if (jsonObj.has("status")) { fareBean.setStatus(jsonObj.optString("status")); if (jsonObj.optString("status").equals("error")) { if (jsonObj.has("message")) { fareBean.setErrorMsg(jsonObj.optString("message")); } else { fareBean.setErrorMsg("Something Went Wrong. Please Try Again Later!!!"); } } if (jsonObj.optString("status").equals("500")) { if (jsonObj.has("error")) { fareBean.setErrorMsg(jsonObj.optString("error")); } } if (jsonObj.optString("status").equals("404")) { if (jsonObj.has("error")) { fareBean.setErrorMsg(jsonObj.optString("error")); } } if (jsonObj.has("message")) { fareBean.setErrorMsg(jsonObj.optString("message")); } if (jsonObj.optString("status").equals("updation success")) { fareBean.setStatus("success"); } } try { if (jsonObj.has("message")) { fareBean.setWebMessage(jsonObj.optString("message")); } } catch (Exception e) { e.printStackTrace(); } if (jsonObj.has("status")) { fareBean.setStatus(jsonObj.optString("status")); if (jsonObj.optString("status").equals("notfound")) fareBean.setErrorMsg("Email Not Found"); if (jsonObj.optString("status").equals("invalid")) fareBean.setErrorMsg("Password Is Incorrect"); if (jsonObj.optString("status").equals("500")) { if (jsonObj.has("error")) { fareBean.setErrorMsg(jsonObj.optString("error")); } } } if (jsonObj.has("error")) { fareBean.setErrorMsg(jsonObj.optString("error")); } if (jsonObj.has("response")) { fareBean.setErrorMsg(jsonObj.optString("response")); } if (jsonObj.has("data")) { JSONObject dataJSObject = null; dataJSObject = jsonObj.optJSONObject("data"); if (dataJSObject != null) { try { if (dataJSObject.has("total_fare")) { fareBean.setTotalFare(dataJSObject.optString("total_fare")); } if (dataJSObject.has("estimated_fare")) { fareBean.setEstimatedFare(dataJSObject.optString("estimated_fare")); } } catch (Exception e) { e.printStackTrace(); } } } } catch (JSONException e) { e.printStackTrace(); return null; } return fareBean; } }
[ "seumoblondel@gmail.com" ]
seumoblondel@gmail.com
3ca22cd0d59bbb2f5355e82fd1861c48f49ddc9f
0f6bba1357e39d7d975db6f39d0b8da16f041fe8
/src/dao/HibernateFactorySingleton.java
18917e8c3f8cefde50c9d3790ac46d1161d2e1c4
[]
no_license
JeffersonAlmeida/prova
5875df62e24ed541d5d891c13a3051ccb5bdde28
920a5b82ca1dbae63d4c9fb18bed74e83f7c0478
refs/heads/master
2020-05-27T08:21:35.358769
2011-06-21T17:17:07
2011-06-21T17:17:07
1,930,383
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
package dao; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; public class HibernateFactorySingleton { private static SessionFactory sessionFactory; public HibernateFactorySingleton(){ super(); } public static SessionFactory getInstance(){ if(sessionFactory==null){ sessionFactory = new Configuration().configure().buildSessionFactory(); } return sessionFactory; } }
[ "jefferson.almeida.comp@gmail.com" ]
jefferson.almeida.comp@gmail.com
dd2768c8a2a8e66eb3911b4686e1a117468b37a1
b254a0fc76f4fdec626a1019ff877dc12f72242f
/src/kr/co/n3soft/n3com/model/activity/ExceptionModel.java
63e0efd1df9f673c3db04141ea8d8e1af6ac65a9
[]
no_license
OPRoS/ComponentComposer
bcd1641f2f8260043e7364ae1d597337ae7ef0df
e92c36e884ca19fa2f1191b08a0e1b93c16201ea
refs/heads/master
2016-09-06T02:01:37.633694
2013-11-08T02:36:07
2013-11-08T02:36:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,697
java
package kr.co.n3soft.n3com.model.activity; import kr.co.n3soft.n3com.model.comm.ElementLabelModel; import kr.co.n3soft.n3com.model.comm.IPort; import kr.co.n3soft.n3com.model.comm.LineModel; import kr.co.n3soft.n3com.model.comm.PortContainerModel; import kr.co.n3soft.n3com.model.comm.PortModel; import kr.co.n3soft.n3com.model.comm.UMLContainerModel; import kr.co.n3soft.n3com.model.comm.UMLDataModel; import kr.co.n3soft.n3com.model.comm.UMLModel; import kr.co.n3soft.n3com.project.browser.UMLTreeModel; import kr.co.n3soft.n3com.projectmanager.ProjectManager; import org.eclipse.draw2d.BorderLayout; import org.eclipse.draw2d.PositionConstants; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Point; public class ExceptionModel extends PortContainerModel { static final long serialVersionUID = 1; public static int count = 0; ElementLabelModel name = null; ElementLabelModel streotype = null; //port // public PortModel exceptionObjectNode = null; public ExceptionModel() { streotype = new ElementLabelModel(PositionConstants.CENTER); streotype.setType("STREOTYPE"); streotype.setLayout(BorderLayout.TOP); streotype.setParentLayout(1); size.width = 130; size.height = 80; name = new ElementLabelModel(PositionConstants.CENTER); name.setType("NAME"); name.setLayout(BorderLayout.CENTER); name.setParentLayout(1); this.addChild(name); // exceptionObjectNode = new PortModel(this); this.createNewPort(new PortModel(this)); // this.createNewPort(new PortModel(this)); // this.createPort(new PortModel(this)); this.uMLDataModel.setElementProperty(name.getType(), name); this.uMLDataModel.setElementProperty(streotype.getType(), streotype); this.uMLDataModel.setElementProperty("port", this.getPorts()); } public ExceptionModel(UMLDataModel p) { size.width = 130; size.height = 80; streotype = new ElementLabelModel(PositionConstants.CENTER); name = (ElementLabelModel)p.getElementProperty("NAME"); java.util.ArrayList ports = (java.util.ArrayList) p.getElementProperty("port"); for (int i = 0; i < ports.size(); i++) { PortModel pm = (PortModel)ports.get(i); pm.setPortContainerModel(this); } this.setPorts(ports); // exceptionObjectNode.setPortContainerModel(this); this.addChild(name); this.setUMLDataModel(p); } public void setName(String uname) { name.setLabelContents(uname); } public void setStreotype(String uname) { streotype.setLabelContents(uname); } public String getName() { return name.getLabelContents(); } public String getStreotype() { return "<<" + streotype.getLabelContents() + ">>"; } public static String TERMINALS_OUT[] = new String[] { "1", "2", "3", "4", //$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$ "5", "6", "7", "8" }; //$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$ public static String TERMINALS_IN[] = new String[] { "A", "B", "C", "D", //$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$ "E", "F", "G", "H" }; //$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$ public void update() { // Enumeration elements = outputs.elements(); // Wire w; // int val = 0; // while (elements.hasMoreElements()) { // w = (Wire) elements.nextElement(); //// if (w.getSourceTerminal().equals(terminal) && this.equals(w.getSource())) // w.setValue(false); // } // // for (int i=0; i<8;i++) // setOutput(TERMINALS_OUT[i],getInput(TERMINALS_IN[i])); } public String toString() { return getStreotype() + " " + this.getName(); // return elementLabel.getLabelContents(); } public void setUMLDataModel(UMLDataModel p) { uMLDataModel = p; } public void setTreeModel(UMLTreeModel p) { super.setTreeModel(p); name.setTreeModel(p); } public Object clone() { ExceptionModel clone = new ExceptionModel((UMLDataModel)this.getUMLDataModel().clone()); // clone.setUMLDataModel((UMLDataModel)this.getUMLDataModel().clone()); clone.setSize(this.getSize()); clone.setLocation(this.getLocation()); clone.sourceModel = this; ProjectManager.getInstance().setTempCopyMap(clone.sourceModel.getID(), clone); for (int i1 = 0; i1 < this.getSourceConnections().size(); i1++) { LineModel li = (LineModel)this.getSourceConnections().get(i1); LineModel liCopy = (LineModel)li.clone(); ProjectManager.getInstance().addSelectLineModel(liCopy); } return clone; } // public void setLocation(Point p) { // //port // System.out.println("p1:"+p); // if (location.equals(p)) // return; // location = p; // // // firePropertyChange("location", null, p); //$NON-NLS-1$ // // this.exceptionObjectNode.move(location); // } // public void createPort(IPort ip){ // exceptionObjectNode = (PortModel)ip; // } // public void addPort(IPort ip,UMLContainerModel p){ // PortModel exceptionObjectNode = (PortModel)this.getPort(); // p.addChild(exceptionObjectNode.getElementLabelModel()); // Point pt = new Point(this.getLocation().x,this.getLocation().y-10); // exceptionObjectNode.setLocation(pt); // if(exceptionObjectNode.getElementLabelModel().getLabelContents().trim().equals("")) // exceptionObjectNode.getElementLabelModel().setLabelContents("objectnode"); // exceptionObjectNode.getElementLabelModel().setSize(new Dimension(exceptionObjectNode.getElementLabelModel().getSize().width,15)); // // // } // public void removePort(IPort ip,UMLContainerModel p){ //// ExceptionObjectNode exceptionObjectNode = (ExceptionObjectNode)this.getPort(); // p.removeChild(exceptionObjectNode); // p.removeChild(exceptionObjectNode.getElementLabelModel()); // // } // public void setPortLocation(Point p){ // // } // public UMLModel getPort(){ // return this.exceptionObjectNode; // } // public void createPort(IPort ip,UMLContainerModel p){ // PortModel exceptionObjectNode = (PortModel)this.getPort(); // p.addChild(exceptionObjectNode.getElementLabelModel()); // Point pt = new Point(this.getLocation().x,this.getLocation().y-10); // exceptionObjectNode.setLocation(pt); // if(exceptionObjectNode.getElementLabelModel().getLabelContents().trim().equals("")) // exceptionObjectNode.getElementLabelModel().setLabelContents("objectnode"); // exceptionObjectNode.getElementLabelModel().setSize(new Dimension(exceptionObjectNode.getElementLabelModel().getSize().width,15)); // // // } // // public void undoCreatePort(IPort ip,UMLContainerModel p){ // this.removePort(null, p); // // } // // public void deletePort(IPort ip,UMLContainerModel p){ // this.removePort(null, p); // // } // // public void undoDeletePort(IPort ip,UMLContainerModel p){ // p.addChild(exceptionObjectNode); // p.addChild(exceptionObjectNode.getElementLabelModel()); // // } }
[ "yudonguk@naver.com" ]
yudonguk@naver.com
c0444e92707e1d1024726ed31a2e638787a8ccea
c04e324c1aca49dc6ed370668e0e8c4463fb1851
/shared/common/src/main/java/com/alibaba/otter/shared/common/model/config/data/mq/MqMediaSource.java
f48eb3819326a9927b974fcc30db25f49b4bfe7f
[ "Apache-2.0" ]
permissive
Gejove/otter
882003f69495f4f3287a7f9088e21b30d7cecf88
dc87f064908181c17ff59ac7c0f7d843003e8b88
refs/heads/master
2021-01-16T20:51:03.420395
2013-08-21T03:41:49
2013-08-21T03:41:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,291
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.alibaba.otter.shared.common.model.config.data.mq; import com.alibaba.otter.shared.common.model.config.data.DataMediaSource; /** * NapoliConnector对象的实现 * * @author simon 2012-6-19 下午10:49:25 * @version 4.1.0 */ public class MqMediaSource extends DataMediaSource { private static final long serialVersionUID = -1699317916850638142L; private String url; private String storePath; public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getStorePath() { return storePath; } public void setStorePath(String storePath) { this.storePath = storePath; } }
[ "jianghang115@gmail.com" ]
jianghang115@gmail.com
223df9e4e3c1d096ecc91068453c20560dbe3229
b34654bd96750be62556ed368ef4db1043521ff2
/billing_cost_struts_actions/trunk/src/java/tests/com/topcoder/accounting/action/UnitTests.java
9b952edc9f3976b70f46cd4806bedda5892201fb
[]
no_license
topcoder-platform/tcs-cronos
81fed1e4f19ef60cdc5e5632084695d67275c415
c4ad087bb56bdaa19f9890e6580fcc5a3121b6c6
refs/heads/master
2023-08-03T22:21:52.216762
2019-03-19T08:53:31
2019-03-19T08:53:31
89,589,444
0
1
null
2019-03-19T08:53:32
2017-04-27T11:19:01
null
UTF-8
Java
false
false
1,331
java
/* * Copyright (C) 2011 TopCoder Inc., All Rights Reserved. */ package com.topcoder.accounting.action; import junit.framework.JUnit4TestAdapter; import junit.framework.Test; import junit.framework.TestCase; import org.junit.runner.RunWith; import org.junit.runners.Suite; import com.topcoder.accounting.action.converter.DateConversionExceptionTest; import com.topcoder.accounting.action.converter.DateConverterTest; /** * <p> * This test case aggregates all Unit test cases. * </p> * * @author TopCoder * @version 1.0 */ @RunWith(Suite.class) @Suite.SuiteClasses( { AuditHistoryActionTest.class, BaseActionTest.class, BaseBillingCostAuditActionTest.class, BaseBillingCostReportActionTest.class, BillingCostActionConfigurationExceptionTest.class, BillingCostExportDetailsActionTest.class, BillingCostExportHistoryActionTest.class, BillingCostReportActionTest.class, BillingCostReportQuickBooksExportActionTest.class, DateConversionExceptionTest.class, DateConverterTest.class, HelperTests.class // ,Demo.class }) public class UnitTests extends TestCase { /** * <p> * Test suite. * </p> * * @return the test suite */ public static Test suite() { return new JUnit4TestAdapter(UnitTests.class); } }
[ "victorsam@fb370eea-3af6-4597-97f7-f7400a59c12a" ]
victorsam@fb370eea-3af6-4597-97f7-f7400a59c12a
c4210db58fa5d934fb9a908eefe6f8eeacafbc45
8db11989acaa8df5eaf7ede00b2d69efb64510d5
/SaeEntrepise-ejb/src/main/java/com/sae/persistence/dao/ComprobanteCierreDetalleFacadeLocal.java
1bd013b55883735bef60010584c371e2d311b9db
[]
no_license
saesas/SaeEntrepise
8ebfa9879c927de388ba7a6a1118a604742671df
95fc40beaab051e7f08a3aa57712b9094b218456
refs/heads/master
2020-03-30T07:31:56.920369
2015-08-30T21:56:27
2015-08-30T21:56:27
41,565,178
0
0
null
null
null
null
UTF-8
Java
false
false
842
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.sae.persistence.dao; import com.sae.persistence.domain.ComprobanteCierreDetalle; import java.util.List; import javax.ejb.Local; /** * * @author Hector Ivan */ @Local public interface ComprobanteCierreDetalleFacadeLocal { void create(ComprobanteCierreDetalle comprobanteCierreDetalle); void edit(ComprobanteCierreDetalle comprobanteCierreDetalle); void remove(ComprobanteCierreDetalle comprobanteCierreDetalle); ComprobanteCierreDetalle find(Object id); List<ComprobanteCierreDetalle> findAll(); List<ComprobanteCierreDetalle> findRange(int[] range); int count(); }
[ "saesas01@gmail.com" ]
saesas01@gmail.com
a4d8d452a69cb92717f8a6173a458154d42c7200
20eb62855cb3962c2d36fda4377dfd47d82eb777
/IntroClassJava/dataset/grade/af81ffd4bc47e4f84cbf87051d82d15af14833eaba6c57ae82fc503a67eb939f3e6552182124605c38a77a6774f41fac2cc95082320ba5e29d303277c098c4ae/001/mutations/28/grade_af81ffd4_001.java
361e7d953d1c0254d75ee0bad68c267c808fa0c5
[]
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,569
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_af81ffd4_001 { public java.util.Scanner scanner; public String output = ""; public static void main (String[]args) throws Exception { grade_af81ffd4_001 mainClass = new grade_af81ffd4_001 (); 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 { DoubleObj a = new DoubleObj (), b = new DoubleObj (), c = new DoubleObj (), d = new DoubleObj (); DoubleObj per = new DoubleObj (); output += (String.format ("Enter thresholds for A, B, C, D\n")); output += (String.format ("in that order, decreasing percentages > ")); a.value = scanner.nextDouble (); b.value = scanner.nextDouble (); c.value = scanner.nextDouble (); d.value = scanner.nextDouble (); per.value = (a.value + b.value + c.value + d.value) / 4; if (per.value < 60) { output += (String.format ("Thank you. Now enter student score (percent) >Student has an D grade\n")); } else if ((per.value) < 80) { output += (String.format ("Thank you. Now enter student score (percent) >Studnet has an C grade\n")); } else if (per.value >= 70 && per.value < 80) { output += (String.format ("Thank you. Now enter student score (percent) >Student has an B grade\n")); } else if (per.value >= 80) { output += (String.format ("Thank you. Now enter student score (percent) >Student ahs an A grade\n")); } if (true) return;; } }
[ "justinwm@163.com" ]
justinwm@163.com
53a1eda9f0715e88e375f6cb648159208ae8e107
0dc86c4621255a1a7195380ba30d73e186810043
/buddha-icbi/buddha-icbi-api/src/main/java/com/buddha/icbi/api/config/SwaggerConfig.java
3de84503645322b07ef4dc00041c89b1ed9360ae
[]
no_license
javawww/buddha
47b62c82963274fc20c26a0f2cd6c80cd1b962f5
d310b12d88b866f1b0e591d6e3afb121989874c4
refs/heads/master
2020-04-11T07:48:03.322476
2019-01-09T08:47:58
2019-01-09T08:47:58
161,619,969
0
0
null
null
null
null
UTF-8
Java
false
false
4,496
java
package com.buddha.icbi.api.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Contact; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; /** * //在这里注释类文件的作用等信息 * *<br/>卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍<br/> *佛学禅语: *<br/>卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍卍<br/> * * * @作者 chuck * @时间 2018年12月10日 * @版权 深圳市佛系派互联网科技集团 */ @Configuration @EnableSwagger2 @EnableWebMvc public class SwaggerConfig implements WebMvcConfigurer{ /** * 将Swagger2 的swagger-ui.html加入资源路径下,否则Swagger2静态页面不能访问。要想使资源能够访问,可以有两种方法 * 一:需要配置类继承WebMvcConfigurationSupport 类,实现addResourceHandlers方法。 * 但是实现了WebMvcConfigurationSupport以后,Spring Boot的 WebMvc自动配置就会失效,具体表现比如访问不到 * 静态资源(js,css等)了,这是因为WebMvc的自动配置都在WebMvcAutoConfiguration类中,但是类中有这个注解 * @ConditionalOnMissingBean({WebMvcConfigurationSupport.class}),意思是一旦在容器中检测到 * WebMvcConfigurationSupport这个类,WebMvcAutoConfiguration类中的配置都不生效。 * 所以一旦我们自己写的配置类继承了WebMvcConfigurationSupport,相当于容器中已经有了WebMvcConfigurationSupport, * 所有默认配置都不会生效,都得自己在配置文件中配置。 * 二:继承WebMvcConfigurer接口,这里采用此方法 网上有人说使用该方法会导致date编译等问题,可能在配置文件中得到解决, * 本人没有碰到,不多做解释 * @param registry */ @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("swagger-ui.html") .addResourceLocations("classpath:/META-INF/resources/"); registry.addResourceHandler("/webjars/**") .addResourceLocations("classpath:/META-INF/resources/webjars/"); } /** * 通过 createRestApi函数来构建一个DocketBean * 函数名,可以随意命名,喜欢什么命名就什么命名 * 接口文档默认访问路径http://localhost:8080/swagger-ui.html, * 配置文件中有配置此处为http://localhost:8080/springboot2/swagger-ui.html * 注解说明参考博客:https://blog.csdn.net/qq_28009065/article/details/79104103, */ @Bean public Docket commonDocket() { return new Docket(DocumentationType.SWAGGER_2) .groupName("通用API接口文档") .apiInfo(apiInfo("测试环境通用接口")) .pathMapping("/") .select() .apis(RequestHandlerSelectors.basePackage("com.buddha.icbi.api.controller"))//指向自己的controller即可 .paths(PathSelectors.any()) .build(); } //设置文档信息 private ApiInfo apiInfo(String desc) { return new ApiInfoBuilder() //页面标题 .title(desc) //设置作者联系方式,可有可无 .contact(new Contact("chaoge", "https://my.csdn.net/xiaochaogge", "1003632308@qq.com")) //版本号 .version("1.0") //描述 .description("API 描述") .build(); } }
[ "1003632308@qq.com" ]
1003632308@qq.com
c61013d84d5b022ba2f98610c38dfa34eb8308bc
5f4afbc92a72bd847b8aa9ae95f9be9d706ad7d8
/esuizhen-service/esuizhen-ehr-system/src/test/java/com/esuizhen/cloudservice/ehr/controller/hospitalinfo/THospitalDeptInfoControllerTest.java
52c25a92f06150fd5b38e2603ae4c6cef788a72b
[]
no_license
331491512/esz
dfc13ba9e142ab1cbacc92cd0bf1b55fec2a05a1
8edd10a74b75d36d3963d2ae64602d02ba548b43
refs/heads/master
2021-04-06T20:31:45.968785
2018-03-16T02:56:36
2018-03-16T02:56:36
125,451,748
1
0
null
null
null
null
UTF-8
Java
false
false
1,673
java
package com.esuizhen.cloudservice.ehr.controller.hospitalinfo; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder; import org.springframework.web.context.WebApplicationContext; import com.westangel.common.util.JsonUtil; @RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration(value = "src/main/webapp") @ContextConfiguration( { "classpath:spring/application.xml" }) public class THospitalDeptInfoControllerTest{ private Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private WebApplicationContext wac; private MockMvc mockMvc; @Before public void setup() { this.mockMvc = webAppContextSetup(this.wac).build(); } @Test public void getHospitalDeptList() throws Exception { MockHttpServletRequestBuilder get = get("/dept/list"); MvcResult result = mockMvc.perform((get)).andReturn(); logger.info("result=\n"+JsonUtil.beautiful(result.getResponse().getContentAsString())); } }
[ "zhuguo@qgs-china.com" ]
zhuguo@qgs-china.com
1545e7bb25ea7ebde160cab0916560385b98047d
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.assistant-base/sources/X/C0825j1.java
71aac9f79b93e54cb5d43a0562898c3e10e20a4b
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
742
java
package X; import android.os.IBinder; import android.os.Parcel; /* renamed from: X.j1 reason: case insensitive filesystem */ public final class C0825j1 implements C2 { public final IBinder A00; public C0825j1(IBinder iBinder) { this.A00 = iBinder; } @Override // X.C2 public final void A3d(int i) { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("com.google.android.gms.gcm.INetworkTaskCallback"); obtain.writeInt(i); this.A00.transact(2, obtain, obtain2, 0); obtain2.readException(); } finally { obtain.recycle(); obtain2.recycle(); } } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
6aaf85e5513a7e1465f9d6c0e14453567dad8bb6
5f68b5878db3ed4a8d6d736c8259762647717968
/src/com/fzjt/xiaoliu/read/interfaces/business/account/bean/req/ReqAccountBody.java
dadcf758d1c26fd3ec6a839b8824771c691b15f9
[]
no_license
haoziapple/recommend
04cb3c37c74b1d1e4221d0cbf6ff76f75adb66e2
ba4b3a7cf15854d921b7659639639a2a2fa99a1d
refs/heads/master
2021-01-10T11:33:50.805750
2016-04-05T05:31:38
2016-04-05T05:31:38
55,469,573
1
0
null
null
null
null
UTF-8
Java
false
false
1,038
java
/** * Copyright (C) 2015 FuZhong * * * @className:com.fzjt.xiaoliu.read.interfaces.business.account.ReqAccountBody * @description:TODO * * @version:v1.0.0 * @author:WangHao * * Modification History: * Date Author Version Description * ----------------------------------------------------------------- * 2015-12-11 WangHao v1.0.0 create * * */ package com.fzjt.xiaoliu.read.interfaces.business.account.bean.req; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @XmlAccessorType(XmlAccessType.FIELD) public class ReqAccountBody { @XmlElement(name="info") private ReqAccountInfo reqAccountInfo; /** * @return the reqAccountInfo */ public ReqAccountInfo getReqAccountInfo() { return reqAccountInfo; } /** * @param reqAccountInfo the reqAccountInfo to set */ public void setReqAccountInfo(ReqAccountInfo reqAccountInfo) { this.reqAccountInfo = reqAccountInfo; } }
[ "haozixiaowang@163.com" ]
haozixiaowang@163.com
6701ed8e2928d6a7061e83c28d88dc318c769762
cc65e10feea55bfa97cade23176cd6e574d3bbea
/commons/commons-dicts/src/main/java/com/imall/commons/dicts/LockStateCodeEnum.java
c65a7b0dfe2b437e98fbc016bf151224451be4c3
[]
no_license
weishihuai/imallCloudc
ef5a0d7e4866ad7e63251dff512afede7246bd4f
f3163208eaf539aa63dc9e042d2ff6c7403aa405
refs/heads/master
2021-08-20T05:42:23.717707
2017-11-28T09:10:36
2017-11-28T09:10:36
112,305,704
2
4
null
null
null
null
UTF-8
Java
false
false
1,065
java
package com.imall.commons.dicts; /** * Created by lxh on 2016/12/25. * 锁库存 */ public enum LockStateCodeEnum implements ICodeEnum { LOCKED("LOCKED", "已上锁"), UNLOCK("UNLOCK", "已还原锁"), USE_LOCK("USE_LOCK", "已用锁"); private String code; private String name; private LockStateCodeEnum(String code, String name) { this.code = code; this.name = name; } public static LockStateCodeEnum fromCode(String code) { for (LockStateCodeEnum codeEnum : values()) { if (codeEnum.toCode().equals(code)) { return codeEnum; } } String error = code == null ? GlobalExt.ENUM_FROM_CODE_NULL : "".equals(code) ? GlobalExt.ENUM_FROM_CODE_BLANK : "code=" + code; throw new RuntimeException(LockStateCodeEnum.class.getName() + ":" + GlobalExt.ENUM_FROM_CODE_ERROR + error); } @Override public String toName() { return name; } @Override public String toCode() { return code; } }
[ "34024258+weishihuai@users.noreply.github.com" ]
34024258+weishihuai@users.noreply.github.com
5bf38e1507b3a4c35ff95e402c4f0e02b5d7f2ec
d0f5eabc977d1d350e048e01fc2cc32e5794a055
/src/main/java/org/n3r/eql/config/EqlConfigManager.java
2add91c09ff0d9c3d8a7ade3d4e9d00deb6b8664
[ "Apache-2.0" ]
permissive
bingoohuang/eql
ce1392bfbfb344ed831464bf4f2106795c7a4276
d72acbb89d3684bbcb56a79ad8a7d94188837156
refs/heads/master
2023-07-23T16:19:58.493469
2023-03-22T05:50:30
2023-03-22T05:50:30
13,901,611
224
117
null
2023-07-07T22:07:53
2013-10-27T13:32:28
Java
UTF-8
Java
false
false
2,623
java
package org.n3r.eql.config; import com.google.common.cache.*; import lombok.val; import org.n3r.eql.ex.EqlConfigException; import org.n3r.eql.joor.Reflect; import org.n3r.eql.trans.EqlConnection; import org.n3r.eql.trans.EqlJndiConnection; import org.n3r.eql.trans.EqlSimpleConnection; import org.n3r.eql.trans.EqlTranFactory; import org.n3r.eql.util.S; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; public class EqlConfigManager { private static LoadingCache<EqlConfigDecorator, EqlTranFactory> eqlTranFactoryCache = CacheBuilder.newBuilder() .expireAfterAccess(10, TimeUnit.MINUTES) .removalListener((RemovalListener<EqlConfigDecorator, EqlTranFactory>) notification -> { notification.getKey().onRemoval(); try { notification.getValue().destory(); } catch (Exception e) { // ignore exception } }) .build(new CacheLoader<EqlConfigDecorator, EqlTranFactory>() { @Override public EqlTranFactory load(EqlConfigDecorator eqlConfig) { eqlConfig.onLoad(); return createEqlTranFactory(eqlConfig); } }); private static EqlTranFactory createEqlTranFactory(EqlConfig eqlConfig) { val eqlConn = createEqlConnection(eqlConfig, EqlConfigKeys.CONNECTION_IMPL); eqlConn.initialize(eqlConfig); val tranType = eqlConfig.getStr(EqlConfigKeys.TRANSACTION_TYPE); return new EqlTranFactory(eqlConn, EqlConfigKeys.JTA.equalsIgnoreCase(tranType)); } public static EqlConnection createEqlConnection(EqlConfig eqlConfig, String implKey) { val eqlConfigClass = eqlConfig.getStr(implKey); if (S.isBlank(eqlConfigClass)) { String jndiName = eqlConfig.getStr(EqlConfigKeys.JNDI_NAME); return S.isBlank(jndiName) ? new EqlSimpleConnection() : new EqlJndiConnection(); } return Reflect.on(eqlConfigClass).create().get(); } public static EqlTranFactory getConfig(EqlConfigDecorator eqlConfig) { try { return eqlTranFactoryCache.get(eqlConfig); } catch (ExecutionException e) { throw new EqlConfigException("EqlConfig " + eqlConfig + " is not properly configured.", e.getCause()); } } public static void invalidateCache(EqlConfigDecorator eqlConfig) { eqlTranFactoryCache.invalidate(eqlConfig); } }
[ "bingoo.huang@gmail.com" ]
bingoo.huang@gmail.com
d3f16e4b9614c5e6daabf6284e0bb1626e06f296
d8bae6238185215e02e12c16c94c3ac77c0d7508
/nitrite/src/main/java/org/dizitart/no2/fulltext/languages/Yoruba.java
4b0f192854efb38a515c03d4f86c63b23352d527
[ "Apache-2.0" ]
permissive
ikbhal/nitrite-database
2224f061ebfb95f92efad69cf12ec2154a818fff
7901cdba7ec6d99f1172e828c1b95c777943be9b
refs/heads/master
2020-03-24T07:11:49.023896
2018-07-25T12:44:10
2018-07-25T12:44:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,506
java
/* * * Copyright 2017 Nitrite author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.dizitart.no2.fulltext.languages; import org.dizitart.no2.fulltext.Language; import java.util.Arrays; import java.util.HashSet; import java.util.Set; /** * Yoruba stop words * * @since 2.1.0 * @author Anindya Chatterjee */ public class Yoruba implements Language { @Override public Set<String> stopWords() { return new HashSet<>(Arrays.asList( "a", "an", "bá", "bí", "bẹ̀rẹ̀", "fún", "fẹ́", "gbogbo", "inú", "jù", "jẹ", "jẹ́", "kan", "kì", "kí", "kò", "láti", "lè", "lọ", "mi", "mo", "máa", "mọ̀", "ni", "náà", "ní", "nígbà", "nítorí", "nǹkan", "o", "padà", "pé", "púpọ̀", "pẹ̀lú", "rẹ̀", "sì", "sí", "sínú", "ṣ", "ti", "tí", "wà", "wá", "wọn", "wọ́n", "yìí", "àti", "àwọn", "é", "í", "òun", "ó", "ń", "ńlá", "ṣe", "ṣé", "ṣùgbọ́n", "ẹmọ́", "ọjọ́", "ọ̀pọ̀lọpọ̀" )); } }
[ "anidotnet@gmail.com" ]
anidotnet@gmail.com
0b9c0c77ba57b1f05a91c30b2032504c537f5ef1
a2df6764e9f4350e0d9184efadb6c92c40d40212
/aliyun-java-sdk-sofa/src/main/java/com/aliyuncs/sofa/model/v20190815/DownloadLinkeLinklogStoreslogsfilefromossResponse.java
218e72ee1e27e061996b61e3992c06d49f8685fa
[ "Apache-2.0" ]
permissive
warriorsZXX/aliyun-openapi-java-sdk
567840c4bdd438d43be6bd21edde86585cd6274a
f8fd2b81a5f2cd46b1e31974ff6a7afed111a245
refs/heads/master
2022-12-06T15:45:20.418475
2020-08-20T08:37:31
2020-08-26T06:17:49
290,450,773
1
0
NOASSERTION
2020-08-26T09:15:48
2020-08-26T09:15:47
null
UTF-8
Java
false
false
2,759
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.sofa.model.v20190815; import com.aliyuncs.AcsResponse; import com.aliyuncs.sofa.transform.v20190815.DownloadLinkeLinklogStoreslogsfilefromossResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class DownloadLinkeLinklogStoreslogsfilefromossResponse extends AcsResponse { private String requestId; private String resultCode; private String resultMessage; private String responseContent; private String responseContentRange; private String responseContentType; private Long responseStatusCode; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getResultCode() { return this.resultCode; } public void setResultCode(String resultCode) { this.resultCode = resultCode; } public String getResultMessage() { return this.resultMessage; } public void setResultMessage(String resultMessage) { this.resultMessage = resultMessage; } public String getResponseContent() { return this.responseContent; } public void setResponseContent(String responseContent) { this.responseContent = responseContent; } public String getResponseContentRange() { return this.responseContentRange; } public void setResponseContentRange(String responseContentRange) { this.responseContentRange = responseContentRange; } public String getResponseContentType() { return this.responseContentType; } public void setResponseContentType(String responseContentType) { this.responseContentType = responseContentType; } public Long getResponseStatusCode() { return this.responseStatusCode; } public void setResponseStatusCode(Long responseStatusCode) { this.responseStatusCode = responseStatusCode; } @Override public DownloadLinkeLinklogStoreslogsfilefromossResponse getInstance(UnmarshallerContext context) { return DownloadLinkeLinklogStoreslogsfilefromossResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
351d5dd3ec0a40e931dce3e5335305c25322be37
c2e6f7c40edce79fd498a5bbaba4c2d69cf05e0c
/src/main/java/com/google/android/gms/internal/firebase_auth/zzal.java
85263bfa5da0c649d58dd13e9841814c2300dce7
[]
no_license
pengju1218/decompiled-apk
7f64ee6b2d7424b027f4f112c77e47cd420b2b8c
b60b54342a8e294486c45b2325fb78155c3c37e6
refs/heads/master
2022-03-23T02:57:09.115704
2019-12-28T23:13:07
2019-12-28T23:13:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
351
java
package com.google.android.gms.internal.firebase_auth; import java.util.Iterator; final class zzal implements zzas { final /* synthetic */ zzae a; zzal(zzae zzae) { this.a = zzae; } public final /* synthetic */ Iterator zza(zzam zzam, CharSequence charSequence) { return new zzao(this, zzam, charSequence); } }
[ "apoorwaand@gmail.com" ]
apoorwaand@gmail.com
d44f860900833424154e247dc3b4f108e6dd3dbc
4751361cb0586940aff0e6f64d0b52766bbb048d
/commons/src/main/java/com/navercorp/pinpoint/common/plugin/ServerPluginLoader.java
7a08a48cb652657525ff36ca4acb548f033f78e0
[ "DOC", "CC-BY-3.0", "GPL-1.0-or-later", "CC-PDDC", "MIT", "CC0-1.0", "GPL-2.0-only", "Apache-2.0", "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
lgyan/pinpoint
5c031e6000f4ce08e0a6392eac23b20455f1ddfb
843353da491d3e6ba498209cd7098707fa79e812
refs/heads/master
2020-07-27T04:57:56.796411
2018-05-17T03:41:49
2018-05-17T03:41:49
73,703,257
1
0
Apache-2.0
2018-05-17T03:41:50
2016-11-14T12:38:32
Java
UTF-8
Java
false
false
2,863
java
/* * Copyright 2018 NAVER Corp. * * 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.navercorp.pinpoint.common.plugin; import com.navercorp.pinpoint.common.util.Assert; import java.io.File; import java.io.IOException; import java.net.URL; import java.security.CodeSource; import java.security.ProtectionDomain; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.ServiceLoader; import java.util.jar.JarFile; /** * @author Woonduk Kang(emeroad) */ public class ServerPluginLoader implements PluginLoader { private final ClassLoader classLoader; public ServerPluginLoader(ClassLoader classLoader) { this.classLoader = Assert.requireNonNull(classLoader, "classLoader must not be null"); } @Override public <T> List<Plugin<T>> load(Class<T> serviceType) { Assert.requireNonNull(serviceType, "serviceType must not be null"); List<Plugin<T>> pluginList = new ArrayList<Plugin<T>>(); ServiceLoader<T> serviceLoader = ServiceLoader.load(serviceType, classLoader); for (T plugin : serviceLoader) { Plugin<T> simple = newPlugin(plugin); pluginList.add(simple); } return pluginList; } private <T> Plugin<T> newPlugin(T plugin) { URL pluginURL = getPluginUrl(plugin); final File file = new File(pluginURL.getPath()); if (file.isDirectory()) { return new DirClassPathPlugin<T>(pluginURL, Collections.singletonList(plugin), Collections.<String>emptyList()); } if (file.getName().endsWith(".jar")) { JarFile jarFile = toJarFile(file); return new JarPlugin<T>(pluginURL, jarFile, Collections.singletonList(plugin), Collections.<String>emptyList()); } throw new IllegalArgumentException("unknown plugin " + pluginURL); } private <T> URL getPluginUrl(T plugin) { ProtectionDomain protectionDomain = plugin.getClass().getProtectionDomain(); CodeSource codeSource = protectionDomain.getCodeSource(); return codeSource.getLocation(); } private JarFile toJarFile(File file) { try { return new JarFile(file); } catch (IOException e) { throw new RuntimeException("jarFile create fail " + e.getMessage(), e); } } }
[ "wd.kang@navercorp.com" ]
wd.kang@navercorp.com
35bc4eab0782b9aca0131f9743d5fd6301bffd76
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
/benchmark/test/com/datumbox/framework/core/statistics/survival/nonparametrics/independentsamples/LogrankTest.java
679e335d1134afd4d4eeb43bcbc7e4986dbc2ee7
[]
no_license
STAMP-project/dspot-experiments
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
121487e65cdce6988081b67f21bbc6731354a47f
refs/heads/master
2023-02-07T14:40:12.919811
2019-11-06T07:17:09
2019-11-06T07:17:09
75,710,758
14
19
null
2023-01-26T23:57:41
2016-12-06T08:27:42
null
UTF-8
Java
false
false
1,975
java
/** * Copyright (C) 2013-2018 Vasilis Vryniotis <bbriniotis@datumbox.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.datumbox.framework.core.statistics.survival.nonparametrics.independentsamples; import com.datumbox.framework.common.dataobjects.FlatDataCollection; import com.datumbox.framework.common.dataobjects.TransposeDataCollection; import com.datumbox.framework.tests.abstracts.AbstractTest; import java.util.Arrays; import org.junit.Assert; import org.junit.Test; /** * Test cases for Logrank. * * @author Vasilis Vryniotis <bbriniotis@datumbox.com> */ public class LogrankTest extends AbstractTest { /** * Test of test method, of class Logrank. */ @Test public void testTest() { logger.info("test"); // Example from Dimaki's Survival Non-parametrics notes. It should reject the null hypothesis and return true. TransposeDataCollection transposeDataCollection = new TransposeDataCollection(); transposeDataCollection.put(0, new FlatDataCollection(Arrays.asList(new Object[]{ 23, "16+", "18+", "20+", "24+" }))); transposeDataCollection.put(1, new FlatDataCollection(Arrays.asList(new Object[]{ 15, 18, 19, 19, 20.0 }))); boolean is_twoTailed = true; double aLevel = 0.05; boolean expResult = true; boolean result = Logrank.test(transposeDataCollection, is_twoTailed, aLevel); Assert.assertEquals(expResult, result); } }
[ "benjamin.danglot@inria.fr" ]
benjamin.danglot@inria.fr
19fd6334c9b1e1f6fb3a23595ced0b21631d0832
1028931f5c8d91bc3a5d3034ecd6b4f61085cede
/spring_04_JDBCTemplate/src/main/java/net/codingme/spring/c3p0/UsetTest.java
0dcb771a34f7a785586524dec05fc89a97231841
[]
no_license
niumoo/frame_spring
55c6741a82dda817fe456c1090caf1699e5b6043
a9cb89e571a9ab122b0c2a3a7e9d61cf64dfe19c
refs/heads/master
2021-09-07T11:43:55.811117
2018-02-22T13:22:57
2018-02-22T13:22:57
107,391,922
0
0
null
null
null
null
UTF-8
Java
false
false
834
java
package net.codingme.spring.c3p0; import org.junit.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * <p>Description:TODO * @author NiuJinpeng * @date 2018年2月20日上午9:43:16 */ public class UsetTest { public void test() { // ComboPooledDataSource dataSource = new ComboPooledDataSource(); // dataSource.setDriverClass(driverClass); // dataSource.setJdbcUrl(jdbcUrl); // dataSource.setUser(user); // dataSource.setPassword(password); } // 通过C3P0连接池结合XML配置注入使用JDBCTemplate测试保存功能 @Test public void testUserService() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring-c3p0.xml"); UserService userService = (UserService) context.getBean("userService"); userService.save(); } }
[ "niumoo@126.com" ]
niumoo@126.com
079c502e75a309762140781ee58aac5eefbc1371
b998b375e53c0d8141db7f8e07cb01b494ed3d0a
/boot.oat_files/arm64/dex/out1/com/samsung/android/contextaware/aggregator/lpp/algorithm/KalmanFilter.java
df9dcfc7c66aa569033b97d394499540b8b76bf9
[]
no_license
atthisaccount/SPay-inner-workings
c3b6256c8ed10c2492d19eca8e63f656cd855be2
6dd83a6ea0916c272423ea0dc1fa3757baa632e7
refs/heads/master
2022-03-22T04:12:05.100198
2019-10-06T13:25:49
2019-10-06T13:25:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,339
java
package com.samsung.android.contextaware.aggregator.lpp.algorithm; import android.util.Log; public class KalmanFilter { Matrix F; Matrix H; int MeasurementSize; Matrix P_k; Matrix Q_k; Matrix R_k; int StateSize; String TAG = "KalmanFilter"; Matrix X_k; boolean flagInitializeCovariance = false; boolean flagInitializeMeasurementM = false; boolean flagInitializeState = false; boolean flagMeasurementNoise = false; boolean flagProcessNoise = false; boolean flagTransitionMatrix = false; public KalmanFilter(int mState, int mMeasurement) { this.StateSize = mState; this.MeasurementSize = mMeasurement; this.X_k = new Matrix(this.StateSize, 1); this.P_k = new Matrix(this.StateSize, this.StateSize); this.Q_k = new Matrix(this.StateSize, this.StateSize); this.R_k = new Matrix(this.MeasurementSize, this.MeasurementSize); this.F = new Matrix(this.StateSize, this.StateSize); this.H = new Matrix(this.MeasurementSize, this.StateSize); } public boolean setInitialState(double[] vector) { if (vector.length != this.StateSize) { return false; } for (int inx = 0; inx < vector.length; inx++) { this.X_k.set(inx, 0, vector[inx]); } this.flagInitializeState = true; return true; } public boolean setInitialCovariance(double[][] mMatrix) { if (mMatrix[0].length != this.StateSize || mMatrix.length != this.StateSize) { return false; } for (int inx1 = 0; inx1 < this.StateSize; inx1++) { for (int inx2 = 0; inx2 < this.StateSize; inx2++) { this.P_k.set(inx1, inx2, mMatrix[inx1][inx2]); } } this.flagProcessNoise = true; return true; } public boolean setTransitionMatrix(double[][] mMatrix) { if (mMatrix[0].length != this.StateSize || mMatrix.length != this.StateSize) { return false; } for (int inx1 = 0; inx1 < this.StateSize; inx1++) { for (int inx2 = 0; inx2 < this.StateSize; inx2++) { this.F.set(inx1, inx2, mMatrix[inx1][inx2]); } } this.flagTransitionMatrix = true; return true; } public boolean setMeasurementMatrix(double[][] mMatrix) { if (mMatrix[0].length != this.StateSize || mMatrix.length != this.MeasurementSize) { return false; } for (int inx1 = 0; inx1 < this.MeasurementSize; inx1++) { for (int inx2 = 0; inx2 < this.StateSize; inx2++) { this.H.set(inx1, inx2, mMatrix[inx1][inx2]); } } this.flagInitializeMeasurementM = true; return true; } public boolean setProcessNoise(double[][] mMatrix) { if (mMatrix[0].length != this.StateSize || mMatrix.length != this.StateSize) { return false; } for (int inx1 = 0; inx1 < this.StateSize; inx1++) { for (int inx2 = 0; inx2 < this.StateSize; inx2++) { this.Q_k.set(inx1, inx2, mMatrix[inx1][inx2]); } } this.flagProcessNoise = true; return true; } public boolean setMeasurementNoise(double[][] mMatrix) { if (mMatrix[0].length != this.MeasurementSize || mMatrix.length != this.MeasurementSize) { return false; } for (int inx1 = 0; inx1 < this.MeasurementSize; inx1++) { for (int inx2 = 0; inx2 < this.MeasurementSize; inx2++) { this.R_k.set(inx1, inx2, mMatrix[inx1][inx2]); } } this.flagMeasurementNoise = true; return true; } public boolean TimePropagation(double delT) { Matrix X_k_1 = new Matrix(this.StateSize, 1); Matrix P_k_1 = new Matrix(this.StateSize, this.StateSize); Matrix Temp1 = new Matrix(this.StateSize, this.StateSize); Matrix Temp2 = new Matrix(this.StateSize, this.StateSize); if (this.flagTransitionMatrix && this.flagInitializeState && this.flagProcessNoise) { X_k_1.setMatrix(0, this.StateSize - 1, 0, 0, this.F.times(this.X_k)); this.X_k.setMatrix(0, this.StateSize - 1, 0, 0, X_k_1); Temp1.setMatrix(0, this.StateSize - 1, 0, this.StateSize - 1, this.F.times(this.P_k)); Temp2.setMatrix(0, this.StateSize - 1, 0, this.StateSize - 1, Temp1.times(this.F.inverse())); P_k_1.setMatrix(0, this.StateSize - 1, 0, this.StateSize - 1, Temp2.plus(this.Q_k)); this.P_k.setMatrix(0, this.StateSize - 1, 0, this.StateSize - 1, P_k_1); return true; } Log.e(this.TAG, "cannot execute TimePropagation(), check initialization "); return false; } public boolean MeasurementUpdate(Matrix z) { if (z.getRowDimension() == this.MeasurementSize && z.getColumnDimension() == 1) { Matrix matrix = new Matrix(this.StateSize, this.MeasurementSize); Matrix Temp1 = new Matrix(this.StateSize, this.MeasurementSize); matrix = new Matrix(this.MeasurementSize, this.MeasurementSize); matrix = new Matrix(this.MeasurementSize, this.MeasurementSize); matrix = new Matrix(this.MeasurementSize, 1); matrix = new Matrix(this.MeasurementSize, 1); Matrix X_k_1 = new Matrix(this.StateSize, 1); Matrix P_ = new Matrix(this.StateSize, this.StateSize); if (this.flagProcessNoise && this.flagMeasurementNoise && this.flagInitializeMeasurementM) { Temp1.setMatrix(0, this.StateSize - 1, 0, this.MeasurementSize - 1, this.P_k.times(this.H.transpose())); matrix.setMatrix(0, this.MeasurementSize - 1, 0, this.MeasurementSize - 1, this.H.times(Temp1)); Matrix matrix2 = matrix; matrix2.setMatrix(0, this.MeasurementSize - 1, 0, this.MeasurementSize - 1, matrix.plus(this.R_k)); matrix.setMatrix(0, this.StateSize - 1, 0, this.MeasurementSize - 1, Temp1.times(matrix.inverse())); matrix.setMatrix(0, this.StateSize - 1, 0, 0, this.H.times(this.X_k)); matrix.setMatrix(0, this.MeasurementSize - 1, 0, 0, z.minus(matrix)); X_k_1.setMatrix(0, this.StateSize - 1, 0, 0, this.X_k.plus(matrix.times(matrix))); new Matrix(this.MeasurementSize, 1).setMatrix(0, this.MeasurementSize - 1, 0, 0, matrix.times(matrix)); this.X_k.setMatrix(0, this.StateSize - 1, 0, 0, X_k_1); P_.setMatrix(0, this.StateSize - 1, 0, this.StateSize - 1, this.P_k.minus(matrix.times(this.H.times(this.P_k)))); this.P_k.setMatrix(0, this.StateSize - 1, 0, this.StateSize - 1, P_); return true; } Log.e(this.TAG, "cannot execute MeasurementUpdate(), check initialization "); return false; } Log.e(this.TAG, "Error in MeasurementUpdate(), meauserement matrix size is wrong!"); return false; } public double[] getCurrentState() { double[] mState = new double[this.StateSize]; for (int inx = 0; inx < this.StateSize; inx++) { mState[inx] = this.X_k.get(inx, 0); } return mState; } }
[ "pandalion98@gmail.com" ]
pandalion98@gmail.com
dff29260ede69e242c2318c705503df91bdeb9ff
b00c54389a95d81a22e361fa9f8bdf5a2edc93e3
/packages/apps/TvSettings/QuickSettings/src/com/android/tv/quicksettings/DialogAdapter.java
b17b0352b5afaf5348a2380b871fb8974b7cbea8
[]
no_license
mirek190/x86-android-5.0
9d1756fa7ff2f423887aa22694bd737eb634ef23
eb1029956682072bb7404192a80214189f0dc73b
refs/heads/master
2020-05-27T01:09:51.830208
2015-10-07T22:47:36
2015-10-07T22:47:36
41,942,802
15
20
null
2020-03-09T00:21:03
2015-09-05T00:11:19
null
UTF-8
Java
false
false
3,610
java
/* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.android.tv.quicksettings; import android.content.Intent; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import java.util.ArrayList; public class DialogAdapter extends RecyclerView.Adapter<DialogAdapter.ViewHolder> { private static final float FOCUSED_SCALE = 1f; private static final float UNFOCUSED_SCALE = 0.5f; private final ArrayList<Setting> mSettings; private final int mPivotX; private final int mPivotY; private final SettingClickedListener mSettingClickedListener; public DialogAdapter(ArrayList<Setting> settings, int pivotX, int pivotY, SettingClickedListener settingClickedListener) { mSettings = settings; mPivotX = pivotX; mPivotY = pivotY; mSettingClickedListener = settingClickedListener; } @Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.dialog_setting, parent, false); final ViewHolder vh = new ViewHolder(v); v.setPivotX(mPivotX); v.setPivotY(mPivotY); v.setScaleX(UNFOCUSED_SCALE); v.setScaleY(UNFOCUSED_SCALE); v.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Setting s = vh.mSetting; if (s != null) { mSettingClickedListener.onSettingClicked(s); } } }); v.setOnFocusChangeListener(new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean focusGained) { float scale = focusGained ? FOCUSED_SCALE : UNFOCUSED_SCALE; v.animate().cancel(); v.animate().scaleX(scale).scaleY(scale).setDuration( v.getContext().getResources() .getInteger(android.R.integer.config_shortAnimTime)) .start(); } }); return vh; } @Override public void onBindViewHolder(ViewHolder holder, int position) { Setting s = mSettings.get(position); holder.setSetting(s); holder.mTitle.setText(s.getTitle()); } @Override public void onViewRecycled(ViewHolder holder) { holder.setSetting(null); } @Override public int getItemCount() { return mSettings.size(); } public static class ViewHolder extends RecyclerView.ViewHolder { private final TextView mTitle; private Setting mSetting; public ViewHolder(View itemView) { super(itemView); mTitle = (TextView) itemView.findViewById(R.id.setting_title); } public void setSetting(Setting setting) { mSetting = setting; } } }
[ "mirek190@gmail.com" ]
mirek190@gmail.com
d9f0e75d6168c197fd4d27f51931fa684c2cd2ff
d5b66b68ca5e778fafe26943d4eacd7cc1c562e3
/src/main/java/com/projet/gestionconge/config/LoggingAspectConfiguration.java
8bc265701b7781e34cadfa5661f55daa700cb6ca
[]
no_license
Ayed-Oukhay/Employee-Leave-Management-System
ad21e0525e3635b41fe888311418bb326c6affb6
0103d707abda2237b1104c9a7bea2cea69933a4d
refs/heads/main
2023-07-11T05:02:58.464547
2021-08-22T12:37:55
2021-08-22T12:37:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
501
java
package com.projet.gestionconge.config; import com.projet.gestionconge.aop.logging.LoggingAspect; import org.springframework.context.annotation.*; import org.springframework.core.env.Environment; import tech.jhipster.config.JHipsterConstants; @Configuration @EnableAspectJAutoProxy public class LoggingAspectConfiguration { @Bean @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT) public LoggingAspect loggingAspect(Environment env) { return new LoggingAspect(env); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
05c8c7683ca08d29993ff0c53b50fc7e15bc8f83
3f36a64b18d7fb4727a92b91c69c081a936aec78
/src/main/java/ru/itsphere/dao/PurseDAO.java
6369b37d88962957b05793e398cb9c4507bec018
[]
no_license
aliaksandr-budnikau/dao-manager-template
78c430fbc11f771a31b253f050e4f0dd7769a0e2
ed686733708e5db9fa18b9a2c111031e60e5903d
refs/heads/master
2021-01-10T14:24:50.124171
2015-12-10T17:27:03
2015-12-10T17:27:03
47,774,937
1
0
null
null
null
null
UTF-8
Java
false
false
643
java
package ru.itsphere.dao; import ru.itsphere.domain.Purse; import java.util.List; /** * http://it-channel.ru/ * * @author Budnikov Aleksandr */ public interface PurseDAO { /** * Удаляет кошелек по userId * * @param userId */ void deleteByUserId(int userId); /** * Возвращает список всех кошельков пользователя * * @param ownerId идентификатор пользователя */ List<Purse> getAllByOwnerId(int ownerId); /** * Возвращает все кошельки */ List<Purse> getAll(); }
[ "you@example.com" ]
you@example.com
6d6eb6bac1b9121a8af226552443de5c17e1993e
8453e56375c907948d0fccee820aac8eeefaa336
/services/as/src/main/java/com/huaweicloud/sdk/as/v1/model/ShowScalingConfigRequest.java
ad5e43943cb1d2c3b11c905fac39e0d62c89d956
[ "Apache-2.0" ]
permissive
xionghao-hw/huaweicloud-sdk-java-v3
cfc8e37302bc4e059dbd30521ab378246aa65c40
225f99bf54fabcd6a19c9a5c47d1f079434b46e8
refs/heads/master
2022-08-31T18:43:33.388382
2020-05-19T07:33:06
2020-05-19T07:33:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,292
java
package com.huaweicloud.sdk.as.v1.model; import java.util.Objects; import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.annotation.*; import com.huaweicloud.sdk.core.SdkResponse; /** * Request Object */ public class ShowScalingConfigRequest { @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty(value="scaling_configuration_id") private String scalingConfigurationId; public ShowScalingConfigRequest withScalingConfigurationId(String scalingConfigurationId) { this.scalingConfigurationId = scalingConfigurationId; return this; } /** * Get scalingConfigurationId * @return scalingConfigurationId */ public String getScalingConfigurationId() { return scalingConfigurationId; } public void setScalingConfigurationId(String scalingConfigurationId) { this.scalingConfigurationId = scalingConfigurationId; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ShowScalingConfigRequest showScalingConfigRequest = (ShowScalingConfigRequest) o; return Objects.equals(this.scalingConfigurationId, showScalingConfigRequest.scalingConfigurationId); } @Override public int hashCode() { return Objects.hash(scalingConfigurationId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ShowScalingConfigRequest {\n"); sb.append(" scalingConfigurationId: ").append(toIndentedString(scalingConfigurationId)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "wuchen25@huawei.com" ]
wuchen25@huawei.com
b5e15d42861093130ce60a74c3dfd00334610177
20adcd7faea81b3e305fad967024a55d6a74abac
/src/main/java/com/commafeed/backend/DatabaseCleaner.java
a3a02b8cec764067b277ab4552f0049ae5f58e32
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
hanxue/commafeed
56a41885c31e368483a7702204abbac624245641
701a1903ba3362909a064c4b9fb3d0b9aec01e5a
refs/heads/master
2020-12-01T01:16:17.167676
2013-08-07T08:08:03
2013-08-07T08:08:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,954
java
package com.commafeed.backend; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.concurrent.TimeUnit; import javax.inject.Inject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.commafeed.backend.dao.FeedDAO; import com.commafeed.backend.dao.FeedEntryContentDAO; import com.commafeed.backend.dao.FeedEntryDAO; import com.commafeed.backend.dao.FeedEntryStatusDAO; import com.commafeed.backend.dao.FeedSubscriptionDAO; import com.commafeed.backend.model.Feed; import com.commafeed.backend.model.FeedSubscription; import com.commafeed.backend.services.ApplicationSettingsService; /** * Contains utility methods for cleaning the database * */ public class DatabaseCleaner { private static Logger log = LoggerFactory.getLogger(DatabaseCleaner.class); @Inject FeedDAO feedDAO; @Inject FeedEntryDAO feedEntryDAO; @Inject FeedSubscriptionDAO feedSubscriptionDAO; @Inject FeedEntryContentDAO feedEntryContentDAO; @Inject FeedEntryStatusDAO feedEntryStatusDAO; @Inject ApplicationSettingsService applicationSettingsService; public long cleanFeedsWithoutSubscriptions() { long total = 0; int deleted = -1; do { deleted = feedDAO.deleteWithoutSubscriptions(10); total += deleted; log.info("removed {} feeds without subscriptions", total); } while (deleted != 0); log.info("cleanup done: {} feeds without subscriptions deleted", total); return total; } public long cleanContentsWithoutEntries() { long total = 0; int deleted = -1; do { deleted = feedEntryContentDAO.deleteWithoutEntries(10); total += deleted; log.info("removed {} feeds without subscriptions", total); } while (deleted != 0); log.info("cleanup done: {} feeds without subscriptions deleted", total); return total; } public long cleanEntriesOlderThan(long value, TimeUnit unit) { Calendar cal = Calendar.getInstance(); cal.add(Calendar.MINUTE, -1 * (int) unit.toMinutes(value)); long total = 0; int deleted = -1; do { deleted = feedEntryDAO.delete(cal.getTime(), 100); total += deleted; log.info("removed {} entries", total); } while (deleted != 0); log.info("cleanup done: {} entries deleted", total); return total; } public void mergeFeeds(Feed into, List<Feed> feeds) { for (Feed feed : feeds) { if (into.getId().equals(feed.getId())) { continue; } List<FeedSubscription> subs = feedSubscriptionDAO.findByFeed(feed); for (FeedSubscription sub : subs) { sub.setFeed(into); } feedSubscriptionDAO.saveOrUpdate(subs); feedDAO.delete(feed); } feedDAO.saveOrUpdate(into); } public void cleanStatusesOlderThan(Date olderThan) { log.info("cleaning old read statuses"); int deleted = feedEntryStatusDAO.deleteOldStatuses(olderThan); log.info("cleaned {} read statuses", deleted); } }
[ "jeremiepanzer@gmail.com" ]
jeremiepanzer@gmail.com
3b05106b3854051e378769670d192433539a331f
fd53cdf066537707504e431f5883da90c5281d28
/dexlib/src/main/java/org/jf/dexlib/Code/Analysis/graphs/GraphDumper.java
63f149eae99e7e1364d1f961931c2ffa51a67bf7
[ "Apache-2.0", "MIT", "BSD-3-Clause" ]
permissive
CodingDog/smali-analysis
c86e130c50fcdabfeba5da5d526253341d56430e
c577fe5e23413dc8e2ee355472397abf4e08707b
refs/heads/master
2021-01-17T22:35:02.134376
2012-05-18T16:49:17
2012-05-18T16:49:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,490
java
package org.jf.dexlib.Code.Analysis.graphs; import java.io.File; import java.io.FileNotFoundException; import org.jf.dexlib.Code.Analysis.graphs.Dominators.DomTree; import org.jf.dexlib.Interface.DexMethod; public class GraphDumper { private final String toDir; private final String fileNamePrefix; private final boolean dumpCFG; private final boolean dumpDOM; private final boolean dumpCDG; private final boolean includeExc; public GraphDumper(final String toDir, final String fileNamePrefix, final boolean dumpCFG, final boolean dumpDOM, final boolean dumpCDG, final boolean includeExc) { if (toDir == null || toDir.isEmpty()) { this.toDir = "." + File.separator; } else { this.toDir = (toDir.endsWith(File.separator) ? toDir : toDir + File.separator); } if (fileNamePrefix == null) { this.fileNamePrefix = ""; } else { this.fileNamePrefix = fileNamePrefix.replace(File.separator, "_"); } this.dumpCFG = dumpCFG; this.dumpDOM = dumpDOM; this.dumpCDG = dumpCDG; this.includeExc = includeExc; } public void dump(final DexMethod dexMethod, final String name) throws FileNotFoundException { if (!dumpCFG && !dumpDOM && !dumpCDG) { return; } final File dir = new File(toDir); if (dir.exists() && (!dir.isDirectory() || !dir.canWrite())) { throw new FileNotFoundException(dir.getAbsolutePath() + " is not a writable directory."); } else if (!dir.exists()) { if (!dir.mkdirs()) { throw new FileNotFoundException("Could not create directory: " + dir.getAbsolutePath()); } else { System.out.println("Created " + dir.getAbsolutePath()); } } final String fileName = toDir + WriteGraphToDot.sanitizeFileName(fileNamePrefix + name); CFG cfg = null; if (dumpCFG) { cfg = dexMethod.getControlFlowGraph(includeExc); WriteGraphToDot.write(cfg, fileName + ".cfg.dot"); } if (dumpDOM) { final DomTree<CFG.Node> domTree = dexMethod.getDominationTree(includeExc); WriteGraphToDot.write(domTree, fileName + ".dom.dot"); } if (dumpCDG) { final CDG cdg = dexMethod.getControlDependenceGraph(includeExc); WriteGraphToDot.write(cdg, fileName + ".cdg.dot"); } } }
[ "juergen.graf@gmail.com" ]
juergen.graf@gmail.com
dc0e95abdacda5fdeba4ad3eeed0e5b4f4b56a49
25ec216268b063d44628583f5fe47c35b5386f43
/uberfire-project/uberfire-project-backend/src/test/java/org/guvnor/common/services/project/backend/server/AbstractResourceResolverTest.java
eff4d7bfdef4ddec6f61b2d1d8a0856e9aeeb6cb
[ "Apache-2.0" ]
permissive
ahmadzaher1/appformer
79874b7e1e250b1c834f0f89fc3b587f3758e928
b9c69a51031bd5a74e9aa0b4a43cdc1f78caee29
refs/heads/master
2021-09-05T11:25:49.089037
2018-01-25T18:15:07
2018-01-25T20:15:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,644
java
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * 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.guvnor.common.services.project.backend.server; import java.util.ArrayList; import java.util.List; import javax.enterprise.inject.Instance; import org.guvnor.common.services.backend.util.CommentedOptionFactory; import org.guvnor.common.services.project.model.GAV; import org.guvnor.common.services.project.model.POM; import org.guvnor.common.services.project.model.Package; import org.guvnor.common.services.project.model.Project; import org.guvnor.common.services.project.service.POMService; import org.guvnor.structure.backend.backcompat.BackwardCompatibleUtil; import org.guvnor.structure.server.config.ConfigurationService; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import org.uberfire.backend.vfs.Path; import org.uberfire.io.IOService; import static org.junit.Assert.*; import static org.mockito.Mockito.*; @RunWith(MockitoJUnitRunner.class) public class AbstractResourceResolverTest { protected static final int PROJECT_RESOURCE_PATH_RESOLVERS_SIZE = 5; @Mock protected IOService ioService; @Mock protected POMService pomService; @Mock protected ConfigurationService configurationService; @Mock protected CommentedOptionFactory commentedOptionFactory; @Mock protected BackwardCompatibleUtil backward; @Mock protected Instance<ProjectResourcePathResolver> resourcePathResolversInstance; protected ResourceResolver resourceResolver; protected List<ProjectResourcePathResolver> projectResourcePathResolvers = new ArrayList<>(); @Rule public ExpectedException expectedException = ExpectedException.none(); @Before public void setUp() { initProjectResourcePathResolvers(PROJECT_RESOURCE_PATH_RESOLVERS_SIZE); when(resourcePathResolversInstance.iterator()).thenReturn(projectResourcePathResolvers.iterator()); resourceResolver = spy(new ResourceResolver(ioService, pomService, configurationService, commentedOptionFactory, backward, resourcePathResolversInstance) { @Override public Project resolveProject(Path resource) { return null; } @Override public Project simpleProjectInstance(org.uberfire.java.nio.file.Path nioProjectRootPath) { return null; } }); } @Test public void resolveDefaultPathSuccessful() { Package pkg = mock(Package.class); String resourceType = "any"; Path defaultPath = mock(Path.class); // pick one of the configured resolvers as the one that accepts the given resource type. ProjectResourcePathResolver blessedProjectResourcePathResolver = projectResourcePathResolvers.get(3); when(blessedProjectResourcePathResolver.accept(resourceType)).thenReturn(true); when(blessedProjectResourcePathResolver.resolveDefaultPath(pkg)).thenReturn(defaultPath); assertEquals(defaultPath, resourceResolver.resolveDefaultPath(pkg, resourceType)); verify(blessedProjectResourcePathResolver, times(1)).resolveDefaultPath(pkg); projectResourcePathResolvers.forEach(projectResourcePathResolver -> { if (projectResourcePathResolver != blessedProjectResourcePathResolver) { verify(projectResourcePathResolver, never()).resolveDefaultPath(any(Package.class)); } }); } @Test public void resolveDefaultPathWithErrors() { Package pkg = mock(Package.class); String resourceType = "any"; // if none of the configured ProjectResourcePathResolvers accepts the resourceType, and exception must have been // thrown. expectedException.expectMessage("No ProjectResourcePathResolver has been defined for resourceType: " + resourceType); resourceResolver.resolveDefaultPath(pkg, resourceType); } @Test public void resolveDefaultWorkspacePackageTest() { final GAV gav = mock(GAV.class); doReturn("com.group").when(gav).getGroupId(); doReturn("package").when(gav).getArtifactId(); assertEquals("com/group/_package", resourceResolver.getDefaultWorkspacePath(gav)); } @Test public void getDefaultWorkspacePathTest() { final Project project = mock(Project.class); final POM pom = mock(POM.class); doReturn(pom).when(project).getPom(); final GAV gav = mock(GAV.class); doReturn(gav).when(pom).getGav(); final Path path = mock(Path.class); doReturn(path).when(project).getRootPath(); when(path.toURI()).thenReturn("default:///myproject/"); doReturn("com.group").when(gav).getGroupId(); doReturn("package").when(gav).getArtifactId(); final ArgumentCaptor<Path> packagePathArgumentCaptor = ArgumentCaptor.forClass(Path.class); resourceResolver.resolveDefaultWorkspacePackage(project); verify(resourceResolver).resolvePackage(packagePathArgumentCaptor.capture()); final Path packagePath = packagePathArgumentCaptor.getValue(); assertEquals("default:///myproject/src/main/resources/com/group/_package", packagePath.toURI()); } private void initProjectResourcePathResolvers(int size) { for (int i = 0; i < size; i++) { projectResourcePathResolvers.add(mock(ProjectResourcePathResolver.class)); } } }
[ "alexandre.porcelli@gmail.com" ]
alexandre.porcelli@gmail.com
117e87ca2379af27fae1eaf27118d15f5fb50399
7d01e4dda97de5329d51932a2ac2d3361dcb5cc1
/coffeeMachine/src/main/java/ru/sdroman/coffeeMachine/service/CoffeeMachineService.java
507753b1a84fbb7ec87ad6a4e879520f859926d8
[ "Apache-2.0" ]
permissive
roman-sd/java-a-to-z
ad39a007d4c2da8404b77dd75968315930813781
5f59ece8793e0a3df099ff079954aaa7d900a918
refs/heads/master
2021-07-13T00:14:12.411847
2018-09-27T09:12:42
2018-09-27T09:12:42
72,674,404
0
0
null
null
null
null
UTF-8
Java
false
false
427
java
package ru.sdroman.coffeeMachine.service; import ru.sdroman.coffeeMachine.domain.CoffeeMachineStatus; import ru.sdroman.coffeeMachine.domain.Ingredients; /** * Service provider. * * @author sdroman * @since 09.2018 */ public interface CoffeeMachineService { CoffeeMachineStatus getMachineStatus(); void addProduct(Ingredients ingredients); void updateState(Ingredients coffee); void cleanMachine(); }
[ "sedykhroman@gmail.com" ]
sedykhroman@gmail.com
f3a5568481e42944d7a67bfd0b6c26e5461a35cd
1d468dd0cd525b447a85fd22251446019fffd212
/src/WSDL/POSTSOAPOperationHandler.java
9711721ec1fa85a161005154957c2b5f2e759dfe
[ "Apache-2.0" ]
permissive
kkstudy/web-service-annotation-tool
540fabed14e53ee428b96c3053d6b139196a346e
6eb690374c26ccaea0744a4ca5388f0b1421c8cf
refs/heads/master
2021-01-21T23:09:08.814705
2014-09-01T09:42:26
2014-09-01T09:42:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,342
java
package WSDL; import javax.ws.rs.core.UriInfo; import WADL.Link; import WADL.SQLITEController; public class POSTSOAPOperationHandler { private SOAPServiceModel oSOAPService; private SOAPOperationModel oSOAPOperation; private SQLITEController oSQLITEController; private UriInfo oApplicationUri; POSTSOAPOperationHandler(int SOAPServiceId, SOAPOperationModel oSOAPOperation, UriInfo applicationUri) { oSOAPService = new SOAPServiceModel(); oSOAPService.setSOAPServiceId(SOAPServiceId); this.oSOAPOperation = oSOAPOperation; oSOAPOperation.setSOAPService( this.oSOAPService); oSQLITEController = new SQLITEController(); oApplicationUri = applicationUri; } public void setSOAPService(SOAPServiceModel oSOAPService) { this.oSOAPService = oSOAPService; } public SOAPServiceModel getSOAPService() { return this.oSOAPService; } public SOAPOperationModel postSOAPOperation() { //TODO add authentication if needed return createHypermediaURIs(oSQLITEController.postSOAPOperation( oSOAPOperation)); } public SOAPOperationModel createHypermediaURIs(SOAPOperationModel oSOAPOperation) { //add the sibling hypermedia links POST and GET list oSOAPOperation.getLinkList().add(new Link(String.format("%s%s",oApplicationUri.getBaseUri(),oApplicationUri.getPath()),"List of SOAPOperation","GET","Sibling")); oSOAPOperation.getLinkList().add(new Link(String.format("%s%s",oApplicationUri.getBaseUri(),oApplicationUri.getPath()),"Create new SOAPOperation","POST","Sibling")); //add the child hypermedia links GET, PUT, DELETE oSOAPOperation.getLinkList().add(new Link(String.format("%s%s/%d",oApplicationUri.getBaseUri(),oApplicationUri.getPath(),oSOAPOperation.getSOAPOperationId()),"GET created SOAPOperation", "GET", "Child")); oSOAPOperation.getLinkList().add(new Link(String.format("%s%s/%d",oApplicationUri.getBaseUri(),oApplicationUri.getPath(),oSOAPOperation.getSOAPOperationId()),"Update created SOAPOperation", "PUT", "Child")); oSOAPOperation.getLinkList().add(new Link(String.format("%s%s/%d",oApplicationUri.getBaseUri(),oApplicationUri.getPath(),oSOAPOperation.getSOAPOperationId()),"DELETE created SOAPOperation", "DELETE", "Child")); String oRelativePath; //add the parent hypermedia links POST, GETL oRelativePath = oApplicationUri.getPath(); //add the parent's hypermedia links PUT, GET DELETE //find last index of "/" in order to cut off to get the parent URI appropriately int iLastSlashIndex = String.format("%s%s",oApplicationUri.getBaseUri(),oRelativePath).lastIndexOf("/"); oSOAPOperation.getLinkList().add(new Link(String.format("%s%s",oApplicationUri.getBaseUri(),oRelativePath).substring(0, iLastSlashIndex),"Update SOAPService","PUT","Parent")); oSOAPOperation.getLinkList().add(new Link(String.format("%s%s",oApplicationUri.getBaseUri(),oRelativePath).substring(0, iLastSlashIndex),"Read SOAPService","GET","Parent")); oSOAPOperation.getLinkList().add(new Link(String.format("%s%s",oApplicationUri.getBaseUri(),oRelativePath).substring(0, iLastSlashIndex),"Delete SOAPService","DELETE","Parent")); return oSOAPOperation; } }
[ "christopherzolotas@gmail.com" ]
christopherzolotas@gmail.com
acd81484d81dffdc0fcd14fdac3856acb1b9f169
800fe8fecebe32268f6f6492ed4856f0d539d7ea
/src/main/java/au/gov/nehta/model/cda/common/person_org/PersonImpl.java
ad23360fb26f69a369059d808626783b5db46040
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0", "BSD-2-Clause" ]
permissive
AuDigitalHealth/clinical-document-library-java
6c1199a287cd8701a21bfa81a1f56e44d3bdca74
217483c9a2dc18aa7aa262bb22a7175888550839
refs/heads/master
2021-07-25T04:32:21.870575
2021-07-19T06:08:05
2021-07-19T06:08:05
197,092,272
6
5
NOASSERTION
2021-02-04T03:12:55
2019-07-16T00:37:05
XSLT
UTF-8
Java
false
false
2,995
java
package au.gov.nehta.model.cda.common.person_org; import au.gov.nehta.model.cda.common.participant.EmploymentOrganization; import au.gov.nehta.model.cda.common.time.PreciseDate; import au.gov.nehta.model.clinical.common.participation.PersonName; import au.gov.nehta.model.clinical.common.types.UniqueIdentifier; import au.gov.nehta.model.clinical.etp.common.participation.Entitlement; import au.gov.nehta.model.clinical.etp.common.participation.PersonWithOrganization; import java.util.List; public class PersonImpl implements Person, PersonWithRelationship, PersonWithOrganization, PersonSubjectOfCare, PersonDispenser, PersonPrescriberInstructionRecipient, PersonPrescriber, PersonConsumer, PersonHealthcareProvider { private List<UniqueIdentifier> identifiers; private RelationshipRoleType relationshipRoleType; private List<PersonName> personNames; private Gender gender; private List<Entitlement> entitlements; private String qualifications; private Occupation occupation; private EmploymentOrganization employmentOrganization; private PreciseDate dateOfBirth; @Override public RelationshipRoleType getRelationshipToSubjectOfCare() { return relationshipRoleType; } @Override public void setRelationshipToSubjectOfCare(RelationshipRoleType relationshipRoleType) { this.relationshipRoleType = relationshipRoleType; } @Override public List<UniqueIdentifier> getIdentifiers() { return identifiers; } @Override public void setIdentifiers(List<UniqueIdentifier> identifiers) { this.identifiers = identifiers; } @Override public List<PersonName> getPersonNames() { return personNames; } @Override public void setPersonNames(List<PersonName> personNames) { this.personNames = personNames; } @Override public Gender getGender() { return gender; } @Override public void setGender(Gender gender) { this.gender = gender; } @Override public List<Entitlement> getEntitlements() { return entitlements; } @Override public void setEntitlements(List<Entitlement> entitlements) { this.entitlements = entitlements; } @Override public String getQualifications() { return qualifications; } @Override public void setQualifications(String qualifications) { this.qualifications = qualifications; } @Override public Occupation getOccupation() { return occupation; } @Override public void setOccupation(Occupation occupation) { this.occupation = occupation; } @Override public EmploymentOrganization getEmploymentOrganisation() { return employmentOrganization; } @Override public void setEmploymentOrganisation(EmploymentOrganization employmentOrganisation) { this.employmentOrganization = employmentOrganisation; } @Override public PreciseDate getDateOfBirth() { return dateOfBirth; } @Override public void setDateOfBirth(PreciseDate dateOfBirth) { this.dateOfBirth = dateOfBirth; } }
[ "philip.wilford@digitalhealth.gov.au" ]
philip.wilford@digitalhealth.gov.au
8feaaf3a8d87a0325d59a9bd066ee2978937ba4f
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-07-19-tempmail/sources/com/airbnb/lottie/model/content/Repeater.java
6137d6f3d6bfb08940b8c395961d0e132a0f287e
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
1,531
java
package com.airbnb.lottie.model.content; import com.airbnb.lottie.LottieDrawable; import com.airbnb.lottie.animation.content.Content; import com.airbnb.lottie.animation.content.RepeaterContent; import com.airbnb.lottie.model.animatable.AnimatableFloatValue; import com.airbnb.lottie.model.animatable.AnimatableTransform; import com.airbnb.lottie.model.layer.BaseLayer; public class Repeater implements ContentModel { private final AnimatableFloatValue copies; private final boolean hidden; private final String name; private final AnimatableFloatValue offset; private final AnimatableTransform transform; public Repeater(String str, AnimatableFloatValue animatableFloatValue, AnimatableFloatValue animatableFloatValue2, AnimatableTransform animatableTransform, boolean z) { this.name = str; this.copies = animatableFloatValue; this.offset = animatableFloatValue2; this.transform = animatableTransform; this.hidden = z; } public AnimatableFloatValue getCopies() { return this.copies; } public String getName() { return this.name; } public AnimatableFloatValue getOffset() { return this.offset; } public AnimatableTransform getTransform() { return this.transform; } public boolean isHidden() { return this.hidden; } public Content toContent(LottieDrawable lottieDrawable, BaseLayer baseLayer) { return new RepeaterContent(lottieDrawable, baseLayer, this); } }
[ "zteeed@minet.net" ]
zteeed@minet.net
da4922aab405de87c9e9761b85ca44d08e249b15
f88ab225f8dda42410cb11bce2608a07aeeb7f35
/trees/rajneesh/Find_Duplicate_Subtrees.java
c3057f01a54088e8cac071939e924f7f162d0c35
[]
no_license
arunnayan/IP_questionSet
32b64c305edb88348c7626b2b42ab9d6529d4cb5
7a35951c5754ba4ca567c1357249f66e23fbe42c
refs/heads/master
2023-03-16T18:38:51.385676
2019-08-01T12:10:35
2019-08-01T12:10:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,089
java
package Tree; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; public class Find_Duplicate_Subtrees { static HashMap<String, Integer> map; List<TreeNode> ans; static class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int data) { this.val = data; left = null; right = null; } } private String inorderTraversal(TreeNode node, Map<String, Integer> map, List<TreeNode> retList) { if (node == null) return ""; String str = "("; str += inorderTraversal(node.left, map, retList); str += Integer.toString(node.val); str += inorderTraversal(node.right, map, retList); str += ")"; if (map.get(str) != null && map.get(str) == 1) retList.add(node); if (map.containsKey(str)) { map.put(str, map.get(str) + 1); } else map.put(str, 1); return str; } public List<TreeNode> findDuplicateSubtrees(TreeNode root) { List<TreeNode> retList = new LinkedList<>(); Map<String, Integer> map = new HashMap<>(); inorderTraversal(root, map, retList); return retList; } }
[ "32850197+rajneeshkumar146@users.noreply.github.com" ]
32850197+rajneeshkumar146@users.noreply.github.com
e51c29f3f7d14ed102e66a93aa77bae482074ad3
d97bd8cdd623d4a66e8bda51ad86c08221e87f14
/examples/demo/domain/src/main/java/demoapp/dom/types/javalang/bytes/holder/WrapperByteHolder_updateReadOnlyPropertyWithChoices.java
2805ff04e3662ee08a74e49a911dbe6c90fa6c30
[ "Apache-2.0" ]
permissive
PakhomovAlexander/isis
24d6c238b2238c7c5bd64aee0d743851358dc50a
71e48c7302df7ab32f3c4f99ad14e979584b15ef
refs/heads/master
2023-03-21T03:35:38.432719
2021-03-16T08:27:27
2021-03-16T08:27:27
348,267,542
0
0
NOASSERTION
2021-03-16T08:27:28
2021-03-16T08:24:27
null
UTF-8
Java
false
false
2,009
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 demoapp.dom.types.javalang.bytes.holder; import java.util.List; import java.util.stream.Collectors; import javax.inject.Inject; import org.apache.isis.applib.annotation.Action; import org.apache.isis.applib.annotation.ActionLayout; import org.apache.isis.applib.annotation.PromptStyle; import org.apache.isis.applib.annotation.SemanticsOf; import lombok.RequiredArgsConstructor; import demoapp.dom.types.Samples; //tag::class[] @Action( semantics = SemanticsOf.IDEMPOTENT, associateWith = "readOnlyProperty", associateWithSequence = "2" ) @ActionLayout(promptStyle = PromptStyle.INLINE, named = "Update with choices") @RequiredArgsConstructor public class WrapperByteHolder_updateReadOnlyPropertyWithChoices { private final WrapperByteHolder holder; public WrapperByteHolder act(Byte newValue) { holder.setReadOnlyProperty(newValue); return holder; } public Byte default0Act() { return holder.getReadOnlyProperty(); } public List<Byte> choices0Act() { return samples.stream() .collect(Collectors.toList()); } @Inject Samples<Byte> samples; } //end::class[]
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
178254389ff44853376f24e43407b8324163974c
3a24f3fc44dd51bf73c9649793706a9ec95ab9f1
/larksuite-oapi/src/main/java/com/larksuite/oapi/service/sheets/v2/model/SpreadsheetsImportReqBody.java
230a54531a27b190ccfe04a0895edd6c6919eaab
[ "Apache-2.0" ]
permissive
keeperlibofan/oapi-sdk-java
e1d6180c3ec599c9b803187a14583d5c1cb940a0
1b603c46d7efbb84e15d2bd245f675d2e20cd477
refs/heads/main
2023-04-29T23:28:24.836759
2021-05-14T10:55:35
2021-05-14T10:55:35
368,723,315
0
0
Apache-2.0
2021-05-19T02:35:37
2021-05-19T02:35:36
null
UTF-8
Java
false
false
813
java
// Code generated by lark suite oapi sdk gen package com.larksuite.oapi.service.sheets.v2.model; import com.google.gson.annotations.SerializedName; public class SpreadsheetsImportReqBody { @SerializedName("file") private Byte[] file; @SerializedName("name") private String name; @SerializedName("folderToken") private String folderToken; public Byte[] getFile() { return this.file; } public void setFile(Byte[] file) { this.file = file; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getFolderToken() { return this.folderToken; } public void setFolderToken(String folderToken) { this.folderToken = folderToken; } }
[ "zhaomingqiang@bytedance.com" ]
zhaomingqiang@bytedance.com
980143f4c88a223d808bbb53d8f1056a3c7f0c79
0de79f44be29644adf6e2e909565894d0e5199ad
/schwein/schwein-ejb/src/main/java/de/limago/schweine/mapper/PersonEntityMapper.java
135344af858928ae666585dfe04700cb9f101baa
[]
no_license
LimagoHub/BootCamp2
3e286693fd3b8eb3248f1356be0ffec1afb58e88
6330a4ea49915b9ee4b399ff6e6382f6665b94f8
refs/heads/master
2022-12-18T19:38:03.227402
2020-09-25T08:04:42
2020-09-25T08:04:42
295,324,884
0
0
null
null
null
null
UTF-8
Java
false
false
419
java
package de.limago.schweine.mapper; import java.util.List; import org.mapstruct.Mapper; import de.limago.schweine.model.PersonEntity; import de.limago.schweine.service.domainobjects.Person; @Mapper(componentModel = "cdi") public interface PersonEntityMapper { PersonEntity convert(Person person); Person convert(PersonEntity personEntity); List<Person> convert(List<PersonEntity> entities); }
[ "limagoHub@limago.de" ]
limagoHub@limago.de
43a12003f70f017ab734d475dc0fa3e733a48434
dd3eec242deb434f76d26b4dc0e3c9509c951ce7
/2018-work/jiuy-biz/jiuy-rebuild-service-impl/src/main/java/com/jiuy/rb/service/impl/common/GlobalSettingServiceImpl.java
2c30ab9942be73f7026e7e32943c7e9ac79b873f
[]
no_license
github4n/other_workplace
1091e6368abc51153b4c7ebbb3742c35fb6a0f4a
7c07e0d078518bb70399e50b35e9f9ca859ba2df
refs/heads/master
2020-05-31T10:12:37.160922
2019-05-25T15:48:54
2019-05-25T15:48:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,270
java
package com.jiuy.rb.service.impl.common; import com.jiuy.base.annotation.MyLogs; import com.jiuy.base.enums.ModelType; import com.jiuy.base.exception.Declare; import com.jiuy.base.model.MyLog; import com.jiuy.base.model.UserSession; import com.jiuy.base.util.Biz; import com.jiuy.rb.enums.GlobalSettingEnum; import com.jiuy.rb.mapper.common.GlobalSettingRbMapper; import com.jiuy.rb.model.common.GlobalSettingRb; import com.jiuy.rb.model.common.GlobalSettingRbQuery; import com.jiuy.rb.service.common.IGlobalSettingService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.util.Map; /** * @author Charlie(唐静) * @version V1.0 * @title 全局配置表 * @package jiuy-biz * @description * @date 2018/6/19 17:53 * @copyright 玖远网络 */ @Service("globalSettingService") public class GlobalSettingServiceImpl implements IGlobalSettingService{ @Autowired private GlobalSettingRbMapper globalSettingRbMapper; /** * 优惠券发行总金额 */ private static final String PUBLISHED_MONEY = "published_money"; /** 账户总额 */ private static final String TOTAL_MONEY = "total_money"; /** * 根据propertyValue查询 * * @param globalSetting object * @return com.jiuy.rb.model.common.GlobalSettingRb * @auther Charlie(唐静) * @date 2018/6/19 18:03 */ @Override public GlobalSettingRb findByPropName(GlobalSettingEnum globalSetting) { GlobalSettingRbQuery query = new GlobalSettingRbQuery(); query.setPropertyName(globalSetting.getPropertyValue()); return globalSettingRbMapper.selectOne(query); } /** * 根据propertyValue查询 * * @param propertyName 属性名 * @return com.jiuy.rb.model.common.GlobalSettingRb * @auther Charlie(唐静) * @date 2018/6/19 18:03 */ @Override public GlobalSettingRb findByPropName(String propertyName) { GlobalSettingRb query = new GlobalSettingRb(); query.setPropertyName(propertyName); return globalSettingRbMapper.selectOne(query); } /** * 根据id更新全局表 * * @param globalSetting 全局表对象 * @param userSession 用户信息 * @return com.jiuy.base.model.MyLog<com.jiuy.rb.model.common.GlobalSettingRb> * @author Charlie(唐静) * @date 2018/6/28 17:27 */ @MyLogs(logInfo = "更新全局表", model = ModelType.COMMON) @Override public MyLog<GlobalSettingRb> updateByPrimaryKey(GlobalSettingRb globalSetting, UserSession userSession) { globalSettingRbMapper.updateByPrimaryKey(globalSetting); return new MyLog<>(globalSetting, MyLog.Type.up, userSession); } /** * 更新账户发行金额 * * @param money 优惠券模版面额 * @param publishCount 数量 * @param userSession 用户信息 * @return MyLog<GlobalSettingRb> * @author Charlie(唐静) * @date 2018/6/28 16:50 */ @MyLogs(logInfo = "更新账户发行金额", model = ModelType.COMMON) @Override public MyLog<GlobalSettingRb> updPublishMoneyRecord(Number money, Number publishCount, UserSession userSession) { // 校验余额充裕 GlobalSettingRb globalSetting = findByPropName(GlobalSettingEnum.STORE_COUPON_PUBLISH_BALANCE); Declare.existResource(globalSetting); boolean isEnough = isBalanceEnough4Publish(money, publishCount, globalSetting); Declare.state(isEnough, "账户余额不足,请充值后在发行优惠券"); /* 更新全局表 */ Map<String, Object> publishHistory = Biz.jsonStrToMap(globalSetting.getPropertyValue()); // 历史发行金额 BigDecimal publishMoney = new BigDecimal(publishHistory.get(PUBLISHED_MONEY).toString()); // 预发行金额 BigDecimal estimatedMoney = Biz.multiply(money, publishCount); // 更新后的发行金额 publishMoney = publishMoney.add(estimatedMoney); publishHistory.put(PUBLISHED_MONEY, publishMoney.toString()); globalSetting.setPropertyValue(Biz.obToJson(publishHistory)); globalSetting.setUpdateTime(System.currentTimeMillis()); globalSettingRbMapper.updateByPrimaryKey(globalSetting); return new MyLog<>(globalSetting, MyLog.Type.add, userSession); } /** * 发放优惠券, 余额是否充足 * * @param unitPrice 单价 * @param count 数量 * @return boolean * @author Charlie(唐静) * @date 2018/6/28 15:34 */ private boolean isBalanceEnough4Publish(Number unitPrice, Number count, GlobalSettingRb globalSetting) { // 预算金额 BigDecimal estimatedMoney = Biz.multiply(unitPrice, count); Map<String, Object> publishHistory = Biz.jsonStrToMap(globalSetting.getPropertyValue()); // 历史发行金额 BigDecimal publishMoney = new BigDecimal(publishHistory.get(PUBLISHED_MONEY).toString()); // 账户总金额 BigDecimal totalMoney = new BigDecimal(publishHistory.get(TOTAL_MONEY).toString()); return totalMoney.compareTo(publishMoney.add(estimatedMoney)) >= 0; } }
[ "nessary@foxmail.com" ]
nessary@foxmail.com
5c1be17629fece31c15550ee0d63aca379a557c3
29196e2d4adfb14ddd7c2ca8c1e60f8c10c26dad
/src/main/java/it/csi/siac/siacbilser/frontend/webservice/msg/LeggiClassificatoriByRelazioneResponse.java
d5a781caced94d2327d23543df9eaec36f08fba8
[]
no_license
unica-open/siacbilitf
bbeef5ceca40e9fb83d5b1176e7f54e8d84592bf
85f3254c05c719a0016fe55cea1a105bcb6b89b2
refs/heads/master
2021-01-06T14:51:17.786934
2020-03-03T13:27:47
2020-03-03T13:27:47
241,366,581
0
0
null
null
null
null
UTF-8
Java
false
false
6,551
java
/* *SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte *SPDX-License-Identifier: EUPL-1.2 */ package it.csi.siac.siacbilser.frontend.webservice.msg; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElements; import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlType; import it.csi.siac.siacattser.model.TipoAtto; import it.csi.siac.siacbilser.frontend.webservice.BILSvcDictionary; import it.csi.siac.siacbilser.model.CategoriaTipologiaTitolo; import it.csi.siac.siacbilser.model.ClassificazioneCofog; import it.csi.siac.siacbilser.model.ClassificazioneCofogProgramma; import it.csi.siac.siacbilser.model.ElementoPianoDeiConti; import it.csi.siac.siacbilser.model.Macroaggregato; import it.csi.siac.siacbilser.model.Missione; import it.csi.siac.siacbilser.model.PerimetroSanitarioEntrata; import it.csi.siac.siacbilser.model.PerimetroSanitarioSpesa; import it.csi.siac.siacbilser.model.PoliticheRegionaliUnitarie; import it.csi.siac.siacbilser.model.Programma; import it.csi.siac.siacbilser.model.RicorrenteEntrata; import it.csi.siac.siacbilser.model.RicorrenteSpesa; import it.csi.siac.siacbilser.model.SiopeEntrata; import it.csi.siac.siacbilser.model.SiopeSpesa; import it.csi.siac.siacbilser.model.TipoAmbito; import it.csi.siac.siacbilser.model.TipoFinanziamento; import it.csi.siac.siacbilser.model.TipoFondo; import it.csi.siac.siacbilser.model.TipoVincolo; import it.csi.siac.siacbilser.model.TipologiaTitolo; import it.csi.siac.siacbilser.model.TitoloEntrata; import it.csi.siac.siacbilser.model.TitoloSpesa; import it.csi.siac.siacbilser.model.TransazioneUnioneEuropeaEntrata; import it.csi.siac.siacbilser.model.TransazioneUnioneEuropeaSpesa; import it.csi.siac.siaccorser.model.ClassificatoreGenerico; import it.csi.siac.siaccorser.model.ClassificatoreGerarchico; import it.csi.siac.siaccorser.model.Codifica; import it.csi.siac.siaccorser.model.ServiceResponse; import it.csi.siac.siaccorser.model.StrutturaAmministrativoContabile; /** * Messaggio di risposta per la lista dei classificatori * * @author Domenico Lisi * */ @XmlType(namespace = BILSvcDictionary.NAMESPACE) public class LeggiClassificatoriByRelazioneResponse extends ServiceResponse { @XmlElements({ @XmlElement(name="ClassificatoreGerarchico", type=ClassificatoreGerarchico.class), @XmlElement(name="ClassificatoreGenerico", type=ClassificatoreGenerico.class), //Gerarchici @XmlElement(name="CategoriaTipologiaTitolo", type=CategoriaTipologiaTitolo.class), @XmlElement(name="ClassificazioneCofog", type=ClassificazioneCofog.class), @XmlElement(name="ClassificazioneCofogProgramma", type=ClassificazioneCofogProgramma.class), @XmlElement(name="ElementoPianoDeiConti", type=ElementoPianoDeiConti.class), @XmlElement(name="Macroaggregato", type=Macroaggregato.class), @XmlElement(name="Missione", type=Missione.class), @XmlElement(name="Programma", type=Programma.class), @XmlElement(name="SiopeEntrata", type=SiopeEntrata.class), @XmlElement(name="SiopeSpesa", type=SiopeSpesa.class), @XmlElement(name="StrutturaAmministrativoContabile", type=StrutturaAmministrativoContabile.class), @XmlElement(name="TipologiaTitolo", type=TipologiaTitolo.class), @XmlElement(name="TipologiaTitolo", type=TipologiaTitolo.class), @XmlElement(name="TitoloSpesa", type=TitoloSpesa.class), @XmlElement(name="TitoloEntrata", type=TitoloEntrata.class), //Generici @XmlElement(name="PerimetroSanitarioSpesa", type=PerimetroSanitarioSpesa.class), @XmlElement(name="PerimetroSanitarioEntrata", type=PerimetroSanitarioEntrata.class), @XmlElement(name="PoliticheRegionaliUnitarie", type=PoliticheRegionaliUnitarie.class), @XmlElement(name="RicorrenteEntrata", type=RicorrenteEntrata.class), @XmlElement(name="RicorrenteSpesa", type=RicorrenteSpesa.class), @XmlElement(name="TipoAmbito", type=TipoAmbito.class), @XmlElement(name="TipoAtto", type=TipoAtto.class), @XmlElement(name="TipoFinanziamento", type=TipoFinanziamento.class), @XmlElement(name="TipoFondo", type=TipoFondo.class), @XmlElement(name="TipoVincolo", type=TipoVincolo.class), @XmlElement(name="TransazioneUnioneEuropeaEntrata", type=TransazioneUnioneEuropeaEntrata.class), @XmlElement(name="TransazioneUnioneEuropeaSpesa", type=TransazioneUnioneEuropeaSpesa.class), }) private List<Codifica> classificatori = new ArrayList<Codifica>(); @XmlTransient public List<Codifica> getClassificatori() { return classificatori; } public void setClassificatori(List<Codifica> classificatori) { this.classificatori = classificatori; } /** * Ottiene i classificatori di un determinato tipo. * * @param classifClazz - Classe del classificatore * @return lisa dei classificatori del tipo specificato */ @SuppressWarnings("unchecked") public<T extends Codifica> List<T> getClassificatori(Class<T> classifClazz) { final List<T> result = new ArrayList<T>(); for (Codifica c : classificatori) { if(classifClazz.isInstance(c)){ result.add((T)c); } } return result; } public List<ClassificazioneCofog> getClassificatoriClassificazioneCofog() { return getClassificatori(ClassificazioneCofog.class); } public List<ElementoPianoDeiConti> getClassificatoriElementoPianoDeiConti() { return getClassificatori(ElementoPianoDeiConti.class); } public List<ClassificatoreGerarchico> getClassificatoriGerarchici() { return getClassificatori(ClassificatoreGerarchico.class); } public List<ClassificatoreGenerico> getClassificatoriGenerici() { return getClassificatori(ClassificatoreGenerico.class); } public List<Programma> getClassificatoriProgramma() { return getClassificatori(Programma.class); } public List<Macroaggregato> getClassificatoriMacroaggregato() { return getClassificatori(Macroaggregato.class); } public List<TipologiaTitolo> getClassificatoriTipologiaTitolo() { return getClassificatori(TipologiaTitolo.class); } public List<TipoFinanziamento> getClassificatoriTipoFinanziamento() { return getClassificatori(TipoFinanziamento.class); } public List<CategoriaTipologiaTitolo> getClassificatoriCategoriaTipologiaTitolo() { return getClassificatori(CategoriaTipologiaTitolo.class); } public List<TitoloEntrata> getClassificatoriTitoloEntrata() { return getClassificatori(TitoloEntrata.class); } public List<TitoloSpesa> getClassificatoriTitoloSpesa() { return getClassificatori(TitoloSpesa.class); } }
[ "barbara.malano@csi.it" ]
barbara.malano@csi.it
117f4c81dbb5e57dc33c71f4fc0d5448dd0b05bd
7e13dd095b748c78ad47f3f83a33f9bb7e11abdc
/se-han-demo/simple-demo/src/main/java/com/tank/test1/Demo11_1.java
55cd0aff8427480c9fe0ec69f0a1b30c4c8163d2
[]
no_license
luowei/demo-repo
317e88818032278ac947522a3ff68d22091876ef
6d546bcf41f8e09d8ad826ecb89a4d4705d3b32b
refs/heads/master
2021-03-12T22:38:08.271047
2014-09-26T04:37:13
2014-09-26T04:37:13
7,065,251
1
0
null
null
null
null
UTF-8
Java
false
false
866
java
/* * 功能:演示使用线程的注意事项 */ package com.tank.test1; public class Demo11_1 { /** * @param args */ public static void main(String[] args) { //启动线程 Cat cat1=new Cat(); cat1.start(); //cat1.start();//一个线程类只能启动一次 Dog dog1=new Dog(); Thread t=new Thread(dog1); Thread t2=new Thread(dog1); t.start(); t2.start(); //t2.start();//一个线程类只能启动一次 //结论:不管是通过继承Thread,还是通实现Runnable接口创建线程, //它们的一个对象只能启动一次,否则就会有异常抛出。 } } //猫类 class Cat extends Thread { public void run() { System.out.println("11"); } } //狗类 class Dog implements Runnable { @Override public void run() { System.out.println("22"); } }
[ "luowei505050@126.com" ]
luowei505050@126.com
2f8b399e70e253ef3a967002a1f5a14ae2e3313a
fe02f3a48cd516469abce09fff7255e50279dbbb
/dcache-nfs/src/main/java/org/dcache/nfs/v4/xdr/notifylist4.java
44193dc593539373b8a360ac855c0cf52beaf7de
[ "MIT" ]
permissive
devsunny/app-galleries
149cd74d04f2547093e20c34ddaf86be289e2cce
98aed1b18031ded93056ad12bda5b2c62c40a85b
refs/heads/master
2022-12-21T05:20:40.210246
2018-09-20T01:40:20
2018-09-20T01:40:20
21,674,470
0
1
MIT
2022-12-16T06:42:58
2014-07-10T01:20:03
Java
UTF-8
Java
false
false
1,627
java
/* * Copyright (c) 2009 - 2012 Deutsches Elektronen-Synchroton, * Member of the Helmholtz Association, (DESY), HAMBURG, GERMANY * * This library is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This 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 Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this program (see the file COPYING.LIB for more * details); if not, write to the Free Software Foundation, Inc., * 675 Mass Ave, Cambridge, MA 02139, USA. */ package org.dcache.nfs.v4.xdr; import org.dcache.xdr.*; import java.io.IOException; public class notifylist4 implements XdrAble { public byte [] value; public notifylist4() { } public notifylist4(byte [] value) { this.value = value; } public notifylist4(XdrDecodingStream xdr) throws OncRpcException, IOException { xdrDecode(xdr); } public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, IOException { xdr.xdrEncodeDynamicOpaque(value); } public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, IOException { value = xdr.xdrDecodeDynamicOpaque(); } } // End of notifylist4.java
[ "sunnyliu2@gmail.com" ]
sunnyliu2@gmail.com
8938f24f459ca834b7f2451093fb6a6e82d34aa3
312e02ac31d750ac91e0fbe7aaf52705edcb7ab1
/other/2061/16.Exception/example/04.final/src/club/banyuan/FinallyDemo2.java
9153a64746aaea027bd16857b976dc0cc2b1199d
[]
no_license
samho2008/2010JavaSE
52f423c4c135a7ce61c62911ed62cbe2ad91c7ba
890a4f5467aa2e325383f0e4328e6a9249815ebc
refs/heads/master
2023-06-14T07:57:37.914624
2021-07-05T16:34:18
2021-07-05T16:34:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
873
java
package club.banyuan; public class FinallyDemo2 { public static void main(String[] args) throws Exception { System.out.println(test()); } public static int test() { int a = 5; try { System.out.println("1"); return a; } catch (RuntimeException e) { System.out.println("2"); // throw new RuntimeException(); } finally { System.out.println("3"); a++; // return a; } return a; // System.out.println("4"); } public static int test1() { int a = 5; try { System.out.println("1"); throw new RuntimeException(); // return a; } catch (RuntimeException e) { System.out.println("2"); // throw new RuntimeException(); } finally { System.out.println("3"); a++; // return; } return a; // System.out.println("4"); } }
[ "zhoujian@banyuan.club" ]
zhoujian@banyuan.club
f4d33c8bedda439ac1c2ac541d8427b1aa767b01
ab7c374e12ef55482d1c622a0099a7b262195322
/jami-xml/src/main/java/psidev/psi/mi/jami/xml/model/extension/xml300/XmlExperiment.java
b0d0f9799c604499c1f011a4efbdb463cfb82b27
[ "Apache-2.0" ]
permissive
colin-combe/psi-jami
9f945d885d76454f7b652382cc676ac98e6faa39
64fb0596b99aa8996d865b5eae0a2094be0889c8
refs/heads/master
2020-12-07T02:17:10.909871
2017-06-07T07:05:14
2017-06-07T07:05:14
64,655,225
0
0
null
2017-03-09T14:26:30
2016-08-01T09:43:06
Java
UTF-8
Java
false
false
4,736
java
package psidev.psi.mi.jami.xml.model.extension.xml300; import com.sun.xml.bind.Locatable; import com.sun.xml.bind.annotation.XmlLocation; import org.xml.sax.Locator; import psidev.psi.mi.jami.datasource.FileSourceContext; import psidev.psi.mi.jami.datasource.FileSourceLocator; import psidev.psi.mi.jami.model.CvTerm; import psidev.psi.mi.jami.model.Organism; import psidev.psi.mi.jami.model.Publication; import psidev.psi.mi.jami.model.VariableParameter; import psidev.psi.mi.jami.xml.model.extension.AbstractXmlExperiment; import psidev.psi.mi.jami.xml.model.extension.BibRef; import psidev.psi.mi.jami.xml.model.extension.PsiXmlLocator; import javax.xml.bind.annotation.*; import java.util.ArrayList; import java.util.Collection; import java.util.List; /** * Xml 3.0 implementation of experiment * * @author Marine Dumousseau (marine@ebi.ac.uk) * @version $Id$ * @since <pre>25/07/13</pre> */ @XmlRootElement(name = "experimentDescription", namespace = "http://psi.hupo.org/mi/mif300") @XmlAccessorType(XmlAccessType.NONE) public class XmlExperiment extends AbstractXmlExperiment { private JAXBVariableParameterWrapper jaxbVariableParameterWrapper; public XmlExperiment() { } public XmlExperiment(Publication publication) { super(publication); } public XmlExperiment(Publication publication, CvTerm interactionDetectionMethod) { super(publication, interactionDetectionMethod); } public XmlExperiment(Publication publication, CvTerm interactionDetectionMethod, Organism organism) { super(publication, interactionDetectionMethod, organism); } @Override public Collection<VariableParameter> getVariableParameters() { if (this.jaxbVariableParameterWrapper == null){ this.jaxbVariableParameterWrapper = new JAXBVariableParameterWrapper(); } return this.jaxbVariableParameterWrapper.variableParameters; } @XmlElement(name = "variableParameterList") public void setJAXBVariableParameterValuesWrapper(JAXBVariableParameterWrapper jaxbVariableParameterList) { this.jaxbVariableParameterWrapper = jaxbVariableParameterList; // initialise all variable parameters because of back references if (this.jaxbVariableParameterWrapper != null && !this.jaxbVariableParameterWrapper.variableParameters.isEmpty()){ for (VariableParameter param : this.jaxbVariableParameterWrapper.variableParameters){ param.setExperiment(this); } } } @Override protected void initialiseFullNameFromPublication(BibRef publication) { // does nothing } ////////////////////////////////////////////////// @XmlAccessorType(XmlAccessType.NONE) @XmlType(name="variableParametersWrapper") public static class JAXBVariableParameterWrapper implements Locatable, FileSourceContext { private PsiXmlLocator sourceLocator; @XmlLocation @XmlTransient private Locator locator; private List<VariableParameter> variableParameters; public JAXBVariableParameterWrapper(){ initialiseVariables(); } public JAXBVariableParameterWrapper(List<VariableParameter> parameters){ this.variableParameters = parameters; } @Override public Locator sourceLocation() { return (Locator)getSourceLocator(); } public FileSourceLocator getSourceLocator() { if (sourceLocator == null && locator != null){ sourceLocator = new PsiXmlLocator(locator.getLineNumber(), locator.getColumnNumber(), null); } return sourceLocator; } public void setSourceLocator(FileSourceLocator sourceLocator) { if (sourceLocator == null){ this.sourceLocator = null; } else if (sourceLocator instanceof PsiXmlLocator){ this.sourceLocator = (PsiXmlLocator)sourceLocator; } else { this.sourceLocator = new PsiXmlLocator(sourceLocator.getLineNumber(), sourceLocator.getCharNumber(), null); } } protected void initialiseVariables(){ this.variableParameters = new ArrayList<VariableParameter>(); } @XmlElement(type=XmlVariableParameter.class, name="variableParameter", required = true) public List<VariableParameter> getJAXBVariableParameters() { return this.variableParameters; } @Override public String toString() { return "Variable parameter values List: "+(getSourceLocator() != null ? getSourceLocator().toString():super.toString()); } } }
[ "mdumousseau@yahoo.com@73e66818-4ebf-11de-a6a3-df26d2c71dbe" ]
mdumousseau@yahoo.com@73e66818-4ebf-11de-a6a3-df26d2c71dbe
cbfbd09df465b6a87ffcbe85a103ea2084d6e101
8e284b38a8722ca6f94cd8a95582d5b7cce0e5e9
/src/optics/raytrace/GUI/lowLevel/BufferedImageCanvas.java
498e5a34a06d8e75896f0779c9043d428b45128f
[]
no_license
jkcuk/Dr-TIM
acae17d70227f19b81ad3f5d51e46a4704f94abc
43f3436a120fb841b5b6de133888657398deefc7
refs/heads/master
2023-08-31T10:46:40.508193
2023-08-23T18:19:14
2023-08-23T18:19:14
206,802,701
3
1
null
null
null
null
UTF-8
Java
false
false
3,115
java
package optics.raytrace.GUI.lowLevel; import java.awt.*; import javax.swing.*; import java.awt.image.*; /** * This panel displays the rendered scene. */ /** * @author Johannes Courtial * */ public class BufferedImageCanvas extends JPanel { private static final long serialVersionUID = 2196757023811347433L; private BufferedImage image; private Image scaledImage=null; protected Dimension imageSize, imageScreenSize = new Dimension(1, 1); protected boolean needsRepainting; protected int imageOffsetX, imageOffsetY; /** * Create a new panel onto which the rendered image will be displayed. */ public BufferedImageCanvas(int imageCanvasSizeX, int imageCanvasSizeY) { super(); setSize(imageCanvasSizeX, imageCanvasSizeY); needsRepainting = false; } /** * Create a new panel and display in it the image. * @param image */ public BufferedImageCanvas(BufferedImage image, int imageCanvasSizeX, int imageCanvasSizeY) { this(imageCanvasSizeX, imageCanvasSizeY); setImage(image); } /** * Return the image. */ public BufferedImage getImage() { return image; } public void setImage(BufferedImage image) { this.image = image; // setPreferredSize(new Dimension(image.getWidth(), image.getHeight())); // repaint needsRepainting = true; repaint(); } public int getImageOffsetX() { return imageOffsetX; } public Dimension getImageScreenSize() { return imageScreenSize; } public int getImageOffsetY() { return imageOffsetY; } public void setImageOffset(int imageOffsetX, int imageOffsetY) { this.imageOffsetX = imageOffsetX; this.imageOffsetY = imageOffsetY; } @Override public void setSize(int imageCanvasSizeX, int imageCanvasSizeY) { setPreferredSize(new Dimension(imageCanvasSizeX, imageCanvasSizeY)); // repaint needsRepainting = true; repaint(); } @Override public void paint(Graphics g) { super.paint(g); if(image != null) { Dimension newSize = this.getSize(); int W = (int)newSize.getWidth(); int H = (int)newSize.getHeight(); if (needsRepainting || !newSize.equals(imageSize)) { int w = image.getWidth(); int h = image.getHeight(); if (w/h > W/H) { // wide image imageScreenSize = new Dimension(W, (int)((double)W*(double)h/w)); } else { // tall image imageScreenSize = new Dimension((int)((double)H*(double)w/h), H); } imageSize = newSize; scaledImage = image.getScaledInstance(imageScreenSize.width, imageScreenSize.height, Image.SCALE_SMOOTH); needsRepainting = false; } int offsetX = (W - imageScreenSize.width)/2; int offsetY = (H - imageScreenSize.height)/2; setImageOffset(offsetX, offsetY); g.drawImage(scaledImage, offsetX, offsetY, null); } } }
[ "johannes.courtial@glasgow.ac.uk" ]
johannes.courtial@glasgow.ac.uk
2ed8fccb37c703ca7e232cf5ae854d1a27cc2131
0e4756fbda5832b02258425dd0e94382fdcb40d1
/soufang/src/main/java/cn/ctoedu/service/ISmsService.java
2d889807caae7ae0b471caf73b78d92a1b6f48d3
[]
no_license
bobobokey/learndemo
d1da80636864825a8d1a6e6fe1168b599de119d9
24d6200e39d49362ce37023367627f536ecfa814
refs/heads/master
2022-04-28T14:44:17.970284
2022-04-28T04:33:01
2022-04-28T04:33:01
486,090,706
0
0
null
2022-04-28T04:33:02
2022-04-27T07:30:09
null
UTF-8
Java
false
false
525
java
package cn.ctoedu.service; /** * 验证码服务 * */ public interface ISmsService { /** * 发送验证码到指定手机 并 缓存验证码 10分钟 及 请求间隔时间1分钟 * @param telephone * @return */ ServiceResult<String> sendSms(String telephone); /** * 获取缓存中的验证码 * @param telehone * @return */ String getSmsCode(String telehone); /** * 移除指定手机号的验证码缓存 */ void remove(String telephone); }
[ "32060663+csy512889371@users.noreply.github.com" ]
32060663+csy512889371@users.noreply.github.com
18db3f6a54efa7315d6b32a66afdf5d707198959
bae619006a540e14bb7eb75f2e27a1e3a0c1ed15
/src/main/java/com/spring/boot/manager/entity/Product.java
45bdbe8797ef06160f441004a57695f393ae9cb2
[]
no_license
wangyongst/spring-boot-manager
c6ae96ebce83b26e58376e6a405130893788f2d2
8fc2567ae1203a690f5172e1ebc0655e11ce51f7
refs/heads/master
2020-05-31T23:59:39.515199
2019-12-05T07:20:01
2019-12-05T07:20:01
190,545,911
0
0
null
null
null
null
UTF-8
Java
false
false
1,167
java
package com.spring.boot.manager.entity; import com.fasterxml.jackson.annotation.JsonIgnore; import javax.persistence.*; @Entity public class Product { private static final long serialVersionUID = 1L; @Id @Column(name = "id", nullable = false) @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; @JsonIgnore @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH, CascadeType.PERSIST}) @JoinColumn(name = "supplierid", referencedColumnName = "id") private Supplier supplier; @ManyToOne(cascade = {CascadeType.MERGE, CascadeType.REFRESH, CascadeType.PERSIST}) @JoinColumn(name = "materialid", referencedColumnName = "id") private Material material; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Supplier getSupplier() { return supplier; } public void setSupplier(Supplier supplier) { this.supplier = supplier; } public Material getMaterial() { return material; } public void setMaterial(Material material) { this.material = material; } }
[ "wangyongst@gmail.com" ]
wangyongst@gmail.com
1faf9a55e13e794adfbe085a7e339ad36b4d4aa3
6e33079254d818af3de23a686b95988b6d6e1c61
/advanced-java/src/com/training/etiya/java/props/PropertyReadEngineRun.java
dc3389a6ca32a661ef48cc44a74bf5eaca49fa47
[]
no_license
osmanyaycioglu/etiya20210118
7f86ae2ecafeb66110814c125dd9bca2066c96f7
9fb405582d05804806f00f285624c16c86c0a1c4
refs/heads/master
2023-03-02T16:30:33.139015
2021-01-22T13:41:50
2021-01-22T13:41:50
330,993,505
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
package com.training.etiya.java.props; public class PropertyReadEngineRun { public static void main(final String[] args) { PropertyReadEngine pe = new PropertyReadEngine(); MyProperty mp = pe.readPropery(MyProperty.class); System.out.println(mp); MyTestProp readProperyLoc = pe.readPropery(MyTestProp.class); System.out.println(readProperyLoc); } }
[ "osman.yaycioglu@gmail.com" ]
osman.yaycioglu@gmail.com
c627328e93ca6cc0479fc930232adc27b2f691df
1c99931e81886ebecb758d68003f22e072951ff9
/alipay/api/domain/AlipayInsDataDsbEstimateQueryModel.java
71d535214fd7ecfb0a6033b450e9a50788db20df
[]
no_license
futurelive/vscode
f402e497933c12826ef73abb14506aab3c541c98
9f8d1da984cf4f9f330af2b75ddb21a7fff00eb9
refs/heads/master
2020-04-08T06:30:13.208537
2018-11-26T07:09:55
2018-11-26T07:09:55
159,099,314
0
0
null
null
null
null
UTF-8
Java
false
false
1,013
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 定损宝查询图像定损结果 * * @author auto create * @since 1.0, 2018-02-28 19:13:12 */ public class AlipayInsDataDsbEstimateQueryModel extends AlipayObject { private static final long serialVersionUID = 3586159429994295117L; /** * 定损单号 */ @ApiField("estimate_no") private String estimateNo; /** * 车架号 */ @ApiField("frame_no") private String frameNo; /** * 车牌号 */ @ApiField("license_no") private String licenseNo; public String getEstimateNo() { return this.estimateNo; } public void setEstimateNo(String estimateNo) { this.estimateNo = estimateNo; } public String getFrameNo() { return this.frameNo; } public void setFrameNo(String frameNo) { this.frameNo = frameNo; } public String getLicenseNo() { return this.licenseNo; } public void setLicenseNo(String licenseNo) { this.licenseNo = licenseNo; } }
[ "1052418627@qq.com" ]
1052418627@qq.com
acffaaddb9833aad423fae7e505b217af7400a9f
6d3c322c80a40ac5ae05f3a56b825ce47b7ea28b
/firtdemo/src/com/neuedu/inner/three/OuterClass.java
70dfd54655d8b043354ca6c20a98f0152c0c9035
[]
no_license
jeaniely/taili202
241121755d3cc3fa18ed47ecd250cc6447a363f5
82c6564b919a7a81f5cb6c6f13536bace4dafe17
refs/heads/master
2022-11-30T17:45:49.666608
2020-08-17T04:40:49
2020-08-17T04:40:49
288,068,463
0
0
null
null
null
null
UTF-8
Java
false
false
465
java
package com.neuedu.inner.three; public class OuterClass { private String str; public void display(){ System.out.println("outerclass...."); } public class InnerClass{ public void innerDisplay(){ str="123456"; System.out.println(str); display(); } } /*使用getXX方法实现内部类实例化*/ public InnerClass getInnerClass(){ return new InnerClass(); } }
[ "574156761@qq.com" ]
574156761@qq.com
efb040485d28f901267670a229e9d510b5e4e201
affb10d280e0e58fa309ea73869e7a10e6096117
/integrating/jta/src/main/java/org/agoncal/fascicle/jaxrs/integrating/jta/AddressService.java
e5177732a40cf0d02ca7f2e5a1a92820ab5dcb5b
[ "MIT" ]
permissive
agoncal/agoncal-fascicle-jaxrs
cdfac194d2ca657f0a290b6be69ae01d477b2c9e
19cddb7071b1e77b5c0017b37561da410c086a15
refs/heads/master
2023-07-19T19:26:03.776371
2022-12-11T20:57:56
2022-12-11T20:57:56
103,092,205
0
0
MIT
2023-07-07T21:46:20
2017-09-11T05:10:09
Java
UTF-8
Java
false
false
765
java
package org.agoncal.fascicle.jaxrs.integrating.jta; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; import javax.persistence.EntityManager; import javax.transaction.Transactional; import static javax.transaction.Transactional.TxType.MANDATORY; import static javax.transaction.Transactional.TxType.REQUIRED; /** * @author Antonio Goncalves * http://www.antoniogoncalves.org * -- */ // tag::adocSnippet[] @ApplicationScoped public class AddressService { @Inject private EntityManager em; @Transactional(REQUIRED) public Address save(Address address) { em.persist(address); return address; } @Transactional(MANDATORY) public String needsATransaction() { return "Success"; } } // end::adocSnippet[]
[ "antonio.goncalves@gmail.com" ]
antonio.goncalves@gmail.com
db2ee839430062fcfc08dfe04452a4a831aa26d0
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
/database/src/main/java/adila/db/jag3gss.java
1c77611e9a8aae2adcfe41dd28f2367747dcef29
[ "MIT" ]
permissive
karim/adila
8b0b6ba56d83f3f29f6354a2964377e6197761c4
00f262f6d5352b9d535ae54a2023e4a807449faa
refs/heads/master
2021-01-18T22:52:51.508129
2016-11-13T13:08:04
2016-11-13T13:08:04
45,054,909
3
1
null
null
null
null
UTF-8
Java
false
false
193
java
// This file is automatically generated. package adila.db; /* * LG G3 S * * DEVICE: jag3gss * MODEL: LG-D723 */ final class jag3gss { public static final String DATA = "LG|G3 S|"; }
[ "keldeeb@gmail.com" ]
keldeeb@gmail.com
117029fb9e2db4ba177dbb9b6dd7d711b3bb110d
070b9e745c5aad76fb310f5c9111ed77a1036291
/Drona-Package/com/facebook/react/fabric/StateWrapperImpl.java
58a4c344cb2b1dc19c93b674d6cf8bfb36889b93
[]
no_license
Drona-team/Drona
0f057e62e7f77babf112311734ee98c5824f166c
e33a9d92011ef7790c7547cc5a5380083f0dbcd7
refs/heads/master
2022-11-18T06:38:57.404528
2020-07-18T09:35:57
2020-07-18T09:35:57
280,390,561
0
0
null
null
null
null
UTF-8
Java
false
false
870
java
package com.facebook.react.fabric; import android.annotation.SuppressLint; import com.facebook.proguard.annotations.DoNotStrip; import com.facebook.react.bridge.NativeMap; import com.facebook.react.bridge.ReadableNativeMap; import com.facebook.react.bridge.WritableMap; import com.facebook.react.uimanager.StateWrapper; import com.facebook.upgrade.HybridData; @SuppressLint({"MissingNativeLoadLibrary"}) public class StateWrapperImpl implements StateWrapper { @DoNotStrip private final HybridData mHybridData = initHybrid(); static {} private StateWrapperImpl() {} private static native HybridData initHybrid(); public native ReadableNativeMap getState(); public void updateState(WritableMap paramWritableMap) { updateStateImpl((NativeMap)paramWritableMap); } public native void updateStateImpl(NativeMap paramNativeMap); }
[ "samridh6759@gmail.com" ]
samridh6759@gmail.com
10f18afcb26190c969667199c514f39ea897cedb
1c073a4b90b97b61515f8b18dcb420d8a89edee1
/modules/collect/src/test/java/com/opengamma/strata/collect/io/IniFileOutputTest.java
96861f2e8531a2ded81b00648d6979a40421c764
[ "Apache-2.0", "LicenseRef-scancode-mit-old-style" ]
permissive
Kylix69/Strata
4fa0275a80e008ac7ae7a52cec45d1a4b4937852
820596a3d85eae6b23f0265c028f806aa2f14df6
refs/heads/master
2020-07-30T00:05:01.140129
2019-09-18T16:00:40
2019-09-18T16:00:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,260
java
/* * Copyright (C) 2019 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.strata.collect.io; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import java.io.IOException; import java.io.UncheckedIOException; import org.junit.jupiter.api.Test; import com.google.common.collect.ImmutableMultimap; import com.google.common.io.CharSource; /** * Test {@link IniFileOutput}. */ public class IniFileOutputTest { private static final String TWO_SECTIONS_NEWLINE_PADDED = "" + "[Section A]\n" + "a = b\n" + "\n" + "[Section B]\n" + "c = d\n" + "\n"; private static final String SECTION_A = "Section A"; private static final PropertySet SECTION_A_VALUES = PropertySet.of(ImmutableMultimap.of( "a", "b", "a", "c")); private static final String SINGLE_SECTION_NEWLINE_PADDED = "" + "[Section A]\n" + "a = b\n" + "a = c\n"; //------------------------------------------------------------------------- @Test public void test_standard_writeFile_systemNewLine_padSeparator() { String fileContents = TWO_SECTIONS_NEWLINE_PADDED.replaceAll("\n", System.lineSeparator()); IniFile file = IniFile.of(CharSource.wrap(fileContents)); StringBuilder buf = new StringBuilder(); IniFileOutput.standard(buf).writeIniFile(file); assertThat(buf.toString()).isEqualTo(fileContents); } @Test public void test_standard_writeFile_customNewLine_padSeparator() { String fileContents = TWO_SECTIONS_NEWLINE_PADDED; IniFile file = IniFile.of(CharSource.wrap(fileContents)); StringBuilder buf = new StringBuilder(); IniFileOutput.standard(buf, "\n").writeIniFile(file); assertThat(buf.toString()).isEqualTo(fileContents); } @Test public void test_standard_writeFile_customNewLine_noPadding() { String fileContents = TWO_SECTIONS_NEWLINE_PADDED.replaceAll(" = ", "="); IniFile file = IniFile.of(CharSource.wrap(fileContents)); StringBuilder buf = new StringBuilder(); IniFileOutput.standard(buf, false, "\n").writeIniFile(file); assertThat(buf.toString()).isEqualTo(fileContents); } @Test public void test_standard_writeFile_systemNewLine_noPadding() { String fileContents = TWO_SECTIONS_NEWLINE_PADDED .replaceAll("\n", System.lineSeparator()) .replaceAll(" = ", "="); IniFile file = IniFile.of(CharSource.wrap(fileContents)); StringBuilder buf = new StringBuilder(); IniFileOutput.standard(buf, false).writeIniFile(file); assertThat(buf.toString()).isEqualTo(fileContents); } //------------------------------------------------------------------------- @Test public void test_standard_writeSection_systemNewLine_padSeparator() { String fileContents = SINGLE_SECTION_NEWLINE_PADDED.replaceAll("\n", System.lineSeparator()); IniFile file = IniFile.of(CharSource.wrap(fileContents)); StringBuilder buf = new StringBuilder(); IniFileOutput.standard(buf).writeSection(SECTION_A, SECTION_A_VALUES); assertThat(buf.toString()).isEqualTo(fileContents); } @Test public void test_standard_writeSection_customNewLine_padSeparator() { String fileContents = SINGLE_SECTION_NEWLINE_PADDED; StringBuilder buf = new StringBuilder(); IniFileOutput.standard(buf, "\n").writeSection(SECTION_A, SECTION_A_VALUES); assertThat(buf.toString()).isEqualTo(fileContents); } @Test public void test_standard_writeSection_customNewLine_noPadding() { String fileContents = SINGLE_SECTION_NEWLINE_PADDED.replaceAll(" = ", "="); StringBuilder buf = new StringBuilder(); IniFileOutput.standard(buf, false, "\n").writeSection(SECTION_A, SECTION_A_VALUES); assertThat(buf.toString()).isEqualTo(fileContents); } @Test public void test_standard_writeSection_systemNewLine_noPadding() { String fileContents = SINGLE_SECTION_NEWLINE_PADDED .replaceAll("\n", System.lineSeparator()) .replaceAll(" = ", "="); StringBuilder buf = new StringBuilder(); IniFileOutput.standard(buf, false).writeSection(SECTION_A, SECTION_A_VALUES); assertThat(buf.toString()).isEqualTo(fileContents); } //------------------------------------------------------------------------- @Test public void test_exception() { Appendable throwingAppendable = new Appendable() { @Override public Appendable append(CharSequence csq, int start, int end) throws IOException { throw new IOException(); } @Override public Appendable append(char c) throws IOException { throw new IOException(); } @Override public Appendable append(CharSequence csq) throws IOException { throw new IOException(); } }; IniFile file = IniFile.of(CharSource.wrap(TWO_SECTIONS_NEWLINE_PADDED)); IniFileOutput output = IniFileOutput.standard(throwingAppendable); assertThatExceptionOfType(UncheckedIOException.class).isThrownBy(() -> output.writeIniFile(file)); assertThatExceptionOfType(UncheckedIOException.class).isThrownBy(() -> output.writeSection("Section A", file.section("Section A"))); } }
[ "stephen@opengamma.com" ]
stephen@opengamma.com
3621d06c04bb42b509149ec48d9f77dd194e64c1
013bb407ffadcb2bf2641b8fec506e492cb5632e
/swim-system-java/swim-mesh-java/swim.service.web/src/main/java/swim/service/web/WebServiceKernel.java
05c64f171ee31a6b6fa6fa26d00f8860a40068ec
[ "Apache-2.0" ]
permissive
j-shaver/swim
1c3af9debf392e25b6741596a69673e2b7665ab8
c317e70a24f4cebe28eb1a99f03ab1396e696704
refs/heads/master
2020-07-05T20:37:03.321218
2019-08-16T16:26:46
2019-08-16T16:26:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,970
java
// Copyright 2015-2019 SWIM.AI inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package swim.service.web; import swim.api.service.ServiceDef; import swim.api.service.ServiceFactory; import swim.io.warp.WarpSettings; import swim.kernel.KernelContext; import swim.kernel.KernelProxy; import swim.structure.Item; import swim.structure.Value; import swim.uri.UriPath; public class WebServiceKernel extends KernelProxy { final double kernelPriority; public WebServiceKernel(double kernelPriority) { this.kernelPriority = kernelPriority; } public WebServiceKernel() { this(KERNEL_PRIORITY); } @Override public final double kernelPriority() { return this.kernelPriority; } @Override public ServiceDef defineService(Item serviceConfig) { final ServiceDef serviceDef = defineWebService(serviceConfig); return serviceDef != null ? serviceDef : super.defineService(serviceConfig); } public WebServiceDef defineWebService(Item serviceConfig) { final Value value = serviceConfig.toValue(); Value header = value.getAttr("web"); boolean isSecure = false; if (!header.isDefined()) { header = value.getAttr("warp"); // deprecated } if (!header.isDefined()) { header = value.getAttr("warps"); // deprecated isSecure = true; } if (header.isDefined()) { final String webProvider = header.get("provider").stringValue(null); if (webProvider == null || WebServiceKernel.class.getName().equals(webProvider)) { final String serviceName = serviceConfig.key().stringValue("web"); final String address = header.get("address").stringValue("0.0.0.0"); final int port = header.get("port").intValue(443); isSecure = header.get("secure").booleanValue(isSecure); String spaceName = value.get("space").stringValue(null); if (spaceName == null) { spaceName = value.get("plane").stringValue(null); // deprecated } final UriPath documentRoot = value.get("documentRoot").cast(UriPath.pathForm()); final UriPath resourceRoot = value.get("resourceRoot").cast(UriPath.pathForm()); final WarpSettings warpSettings = WarpSettings.form().cast(value); return new WebServiceDef(serviceName, address, port, isSecure, spaceName, documentRoot, resourceRoot, warpSettings); } } return null; } @Override public ServiceFactory<?> createServiceFactory(ServiceDef serviceDef, ClassLoader classLoader) { if (serviceDef instanceof WebServiceDef) { return createWarpServiceFactory((WebServiceDef) serviceDef); } else { return super.createServiceFactory(serviceDef, classLoader); } } public WebServiceFactory createWarpServiceFactory(WebServiceDef serviceDef) { final KernelContext kernel = kernelWrapper().unwrapKernel(KernelContext.class); return new WebServiceFactory(kernel, serviceDef); } private static final double KERNEL_PRIORITY = 0.75; public static WebServiceKernel fromValue(Value moduleConfig) { final Value header = moduleConfig.getAttr("kernel"); final String kernelClassName = header.get("class").stringValue(null); if (kernelClassName == null || WebServiceKernel.class.getName().equals(kernelClassName)) { final double kernelPriority = header.get("priority").doubleValue(KERNEL_PRIORITY); return new WebServiceKernel(kernelPriority); } return null; } }
[ "chris@swim.ai" ]
chris@swim.ai
d412c580ad3000d6c01697b6015dee6fb69eec76
62c92fc17102016113d2bc960458a4bb0ee94533
/app/src/main/java/com/example/pc/testeverything/utils/BaseRunnable.java
95ed82a8ee1c943dd08fa6c0ca978292d417e445
[]
no_license
xiaofeifeii/TestEverything
36e5bb3dc097a7c09f999ae729f1265bf416b647
8163e86519308b90dfd018581270003674526673
refs/heads/master
2023-03-18T23:15:24.811574
2019-06-03T01:10:31
2019-06-03T01:10:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package com.example.pc.testeverything.utils; public class BaseRunnable implements Runnable { private Object object; public BaseRunnable(Object object) { this.object = object; } public BaseRunnable() { } @Override public void run() { run(object); } public void run(Object object) { } }
[ "1623404291@qq.com" ]
1623404291@qq.com
f21e4fd428e2e30b8332f62c1256fb4fccf129a3
647ce242e20bc792b334cf445d1fb3243f0f3b47
/chintai-migration-cms/src/net/chintai/backend/sysadmin/demand/dao/TorihikisakiRegisterCommitDao.java
ab43ef3a21d68aebff6304d7dac591453c5d3e41
[]
no_license
sangjiexun/20191031test
0ce6c9e3dabb7eed465d4add33a107e5b5525236
3248d86ce282c1455f2e6ce0e05f0dbd15e51518
refs/heads/master
2020-12-14T20:31:05.085987
2019-11-01T06:03:50
2019-11-01T06:03:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,488
java
/* * $Id: TorihikisakiRegisterCommitDao.java 3674 2007-12-20 02:32:29Z lee-hosup $ * --------------------------------------------------------- * 更新日 更新者 内容 * --------------------------------------------------------- * 2007/12/04 BGT)李昊燮 新規作成 * */ package net.chintai.backend.sysadmin.demand.dao; /** * 取引先新規登録DAO * * @author lee-hosup * @version $Revision: 3674 $ * Copyright: (C) CHINTAI Corporation All Right Reserved. */ public interface TorihikisakiRegisterCommitDao { /** * 取引先コードを取得します。<br> * 不動産会社テーブルも検索し<br> * 不動産会社テーブルに不動産会社コードが存在しない場合<br> * Nullをリターンします * @param fudousanCd 不動産会社コード * @return 登録する取引先コード、或いはヌル */ public String getTorihikisakiCd(String fudousanCd); /** * 新しい取引先情報を登録します。(取引先テーブル) * @param paramBean 登録パラメータ * @return 登録した取引先のシーケンス番号 */ public int insertTorihikisaki(TorihikisakiRegisterCommitParamBean paramBean); /** * 新しい取引先情報を登録します。(取引先料金テーブル) * @param paramBean 登録パラメータ */ public void insertTorihikisakiRyoukin(TorihikisakiRegisterCommitParamBean paramBean); }
[ "yuki.hirukawa@ctc-g.co.jp" ]
yuki.hirukawa@ctc-g.co.jp
b51e27b77d3f85a8081e5078e69e67eacaefec71
df79dbcfc869b9d2180a44e34aa1e5ef208d1655
/day 8/4 digit no till last digit/Sum.java
0c22f318502767cb74b6881fe3016fb986bdbe4a
[]
no_license
paragkhedkar07/TotalProjects
a170e3d5455a046b62709986f3f00a95b49fee70
7791da688c121d2422a4f4e52e91256c9b7606e5
refs/heads/master
2023-03-14T23:47:43.492749
2021-03-27T14:59:08
2021-03-27T14:59:08
352,097,373
0
0
null
null
null
null
UTF-8
Java
false
false
228
java
public class Sum { public static void main(String args[]) { int n=1234; int sum=0,rem; while(n>0) { rem=n%10; n=n/10; sum=sum+rem; } System.out.println(sum); if(sum>=10) { int s=0; rem=sum%10; n=sum/10; s=rem+n; } } }
[ "paragkhedkar07@gmail.com" ]
paragkhedkar07@gmail.com
e72f4dc2541a648aa658532d011b3ae7c0d4faa1
07e32dfab9e305b865446811ed954b01d11058ec
/src/day04_Variables/VariablesPractice.java
bff9a2f7602a9d34c2472d6caea860ae018a266a
[]
no_license
Sabirindev/JavaProgramming_B23
0eba2ae6257d2a890a7c0cece9467411434325ed
5f956f08e26fc10a79a203591b0946111ae1017a
refs/heads/master
2023-08-27T18:11:07.482812
2021-10-14T18:39:20
2021-10-14T18:39:20
387,595,286
0
0
null
null
null
null
UTF-8
Java
false
false
783
java
package day04_Variables; public class VariablesPractice { /* 1. create a class named varibales_Practice & declear the following variables: num1 = 100; num2 = 10000; num3 = 3.5; num4 = 2.5f; num5 = 999999999999; num6 = 850000; print each of the variables above on the console */ public static void main(String[] args) { int num1 = 100; int num2 = 10000; double num3 = 3.5; float num4 = 2.5f; long num5 = 999999999999L; int num6 = 8500000; System.out.println(num1+"\n"+num2+"\n"+num3+"\n"+num4+"\n"+num5+"\n"+num6); } }
[ "sdetinscrum@gmail.com" ]
sdetinscrum@gmail.com
24fe42fb6c988c20c1762358a7e527174c5957c7
0e89eef397a1505d0c1bfb6b2f55af1e485f64de
/zuihou-backend/zuihou-authority/zuihou-authority-biz/src/main/java/com/github/zuihou/authority/service/core/impl/OrgServiceImpl.java
fe3d261c9aadae73c8604b6058a3013865aac939
[ "Apache-2.0" ]
permissive
lgq0321/zuihou-admin-boot
e759e7a4ae4c3bfb12fb12dc5eb353bc5e4467d8
fcd2ff8b7a0104574a5777c90e910dc509b38296
refs/heads/master
2020-12-12T21:02:05.109221
2020-01-18T01:55:47
2020-01-18T01:55:47
234,227,696
0
0
Apache-2.0
2020-01-16T03:33:05
2020-01-16T03:33:04
null
UTF-8
Java
false
false
1,709
java
package com.github.zuihou.authority.service.core.impl; import cn.hutool.core.collection.CollectionUtil; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.github.zuihou.authority.dao.core.OrgMapper; import com.github.zuihou.authority.entity.core.Org; import com.github.zuihou.authority.service.auth.RoleOrgService; import com.github.zuihou.authority.service.core.OrgService; import com.github.zuihou.database.mybatis.conditions.Wraps; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Collections; import java.util.List; import java.util.stream.Collectors; /** * <p> * 业务实现类 * 组织 * </p> * * @author zuihou * @date 2019-07-22 */ @Slf4j @Service public class OrgServiceImpl extends ServiceImpl<OrgMapper, Org> implements OrgService { @Autowired private RoleOrgService roleOrgService; @Override public List<Org> findChildren(List<Long> ids) { if (CollectionUtil.isEmpty(ids)) { return Collections.emptyList(); } // MySQL 全文索引 String applySql = String.format(" MATCH(tree_path) AGAINST('%s' IN BOOLEAN MODE) ", StringUtils.join(ids, " ")); return super.list(Wraps.<Org>lbQ().in(Org::getId, ids).or(query -> query.apply(applySql))); } @Override public boolean remove(List<Long> ids) { List<Org> list = this.findChildren(ids); List<Long> idList = list.stream().mapToLong(Org::getId).boxed().collect(Collectors.toList()); return !idList.isEmpty() ? super.removeByIds(idList) : true; } }
[ "244387066@qq.com" ]
244387066@qq.com
29d79a2906ba84eaf9f7d6c352861adc20405c32
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Struts/Struts533.java
0e1001f7729276be86dc525e2fa6597b337eca44
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
788
java
public void validate(Object object) throws ValidationException { Object fieldValue = getFieldValue(fieldName, object); if (fieldValue == null) { LOG.debug("Value for field {} is null, use a required validator", getFieldName()); } else if (fieldValue.getClass().isArray()) { Object[] values = (Object[]) fieldValue; for (Object value : values) { validateValue(object, value); } } else if (Collection.class.isAssignableFrom(fieldValue.getClass())) { Collection values = (Collection) fieldValue; for (Object value : values) { validateValue(object, value); } } else { validateValue(object, fieldValue); } }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
8b1c83efd0b87fcd8ed1dcb5b5290827a9e9ff71
b0747c5d28272a4ba3a55908c5d767b75fa7a0b8
/src/main/java/io/kauri/ahken/strategy/IPFSHashStrategy.java
9cbb11ee05eed0fe1c1127365a073482d62a3265
[ "Apache-2.0" ]
permissive
craigwilliams84/ahken
31f34dbed4be6e6cb28399da1196eaa660cc2df5
9721a0a181654fd09f0f124c0499c6c89884adda
refs/heads/master
2020-04-06T08:10:51.499934
2018-11-30T19:00:57
2018-11-30T19:00:57
157,297,496
2
0
null
null
null
null
UTF-8
Java
false
false
971
java
package io.kauri.ahken.strategy; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; import io.kauri.ahken.model.ipfs.IPFSHash; import io.kauri.ahken.strategy.event.EventParameterStrategy; import java.util.List; /** * Calculates IPFS hashes to pin, based on an input value of type T. * * @param <T> The input type * * @author Craig Williams */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", visible = true) @JsonSubTypes( { @JsonSubTypes.Type(value = EventParameterStrategy.class, name = "eventParameterHash"), }) @JsonInclude(JsonInclude.Include.NON_NULL) public interface IPFSHashStrategy<T> { /** * * @param input * @return a list of IPFS hashes that should be pinned by Ahken. */ List<IPFSHash> getIPFSHashes(T input); }
[ "craigwilliams84@googlemail.com" ]
craigwilliams84@googlemail.com
d92625ef2fbc513364aeb5ff225c628f79ef257c
7df84ffd084caff7f89e4f9bfe4ea92531148568
/src/com/thinkinginjava/enumerated_types/example/chapter19_7/package-info.java
4c4d23aa47fc13c187bbfb9fef649fb06f3738ea
[]
no_license
MonikaSophin/myproject
ece1fb8d0406867a67b5e2b53291973e20843c9e
679ae00ff5533f7d502b1e4fead60eff462ced1d
refs/heads/master
2022-06-25T22:50:55.316203
2020-12-02T07:22:07
2020-12-02T07:22:07
152,444,035
0
1
null
2022-06-21T03:27:24
2018-10-10T15:12:07
Java
UTF-8
Java
false
false
155
java
package com.thinkinginjava.enumerated_types.example.chapter19_7; /** * page 597 * -- chapter_19 枚举类型 * * 19.7 使用接口组织枚举 */
[ "1436080962@qq.com" ]
1436080962@qq.com
1aac8eece1baf1cd18c3489c59551f9edafc87d1
f5596c1f9005864e99ea63dd4643c139eb8e21db
/connectr/src/com/metadot/book/connectr/client/service/MessagesService.java
5f0ded7f2373a79bac17963c8d7674694ff7933b
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
ClausPolanka/GAE-Projets
c8dea9839ea09e18737c9eff4c4362a3f451b21d
00d4099b12eeb5731389ed7009e4173f6cd9d1ca
refs/heads/master
2016-09-07T19:03:23.915166
2010-12-27T16:55:11
2010-12-27T16:55:11
1,182,515
2
1
null
null
null
null
UTF-8
Java
false
false
1,583
java
/** * Copyright 2010 Daniel Guermeur and Amy Unruh * * 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. * * See http://connectrapp.appspot.com/ for a demo, and links to more information * about this app and the book that it accompanies. */ package com.metadot.book.connectr.client.service; import java.util.Date; import java.util.List; import java.util.Set; import com.google.gwt.user.client.rpc.RemoteService; import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; import com.metadot.book.connectr.shared.StreamItemDTO; import com.metadot.book.connectr.shared.StreamItemSummaryDTO; @RemoteServiceRelativePath("messagesService") public interface MessagesService extends RemoteService { List<StreamItemSummaryDTO> getNLastMessages(Set<String> friendIds, int numMsgs); List<StreamItemSummaryDTO> getMessagesSince(Set<String> friendIds, Date since); List<StreamItemSummaryDTO> getMessagesPrior (Set<String> friendIds, Date prior, int numMsgs); Boolean initiateUserFeedUpdate(); StreamItemDTO getStreamItemDetails(String id); }
[ "claus.polanka@chello.at" ]
claus.polanka@chello.at
3d793af911b3dd3b88de688b9fffd129ed9f64ba
09476cd418969087db2bbf0ddda40cf9e6d5741e
/app/src/main/java/com/example/awesomefat/csc300_spring2018_shuntingyard/Node.java
df7a9de8be82e5b98c72899f732218c84e7477ad
[]
no_license
mlitman/CSC300_Spring2018_ShuntingYard
b028dfd216fa686fd165dec3d98d0df686bc7e22
38f2681252a8ee51035ddce682bfea0cd394cf81
refs/heads/master
2021-04-27T09:15:57.067696
2018-03-06T16:43:44
2018-03-06T16:43:44
122,510,994
1
8
null
2018-03-01T03:17:27
2018-02-22T17:24:31
Java
UTF-8
Java
false
false
389
java
package com.example.awesomefat.csc300_spring2018_shuntingyard; /** * Created by awesomefat on 2/22/18. */ public abstract class Node { protected Node nextNode; public Node() { this.nextNode = null; } public Node getNextNode() { return nextNode; } public void setNextNode(Node nextNode) { this.nextNode = nextNode; } }
[ "awesomefat@gmail.com" ]
awesomefat@gmail.com
e93d3ab527d10f20a488e49e0a8f9806fac9b8e7
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module375/src/main/java/module375packageJava0/Foo31.java
53fdea7d34f733d5f3a964f8ca043b9f783dfb59
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
349
java
package module375packageJava0; import java.lang.Integer; public class Foo31 { Integer int0; Integer int1; public void foo0() { new module375packageJava0.Foo30().foo4(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
fdc38d41592d7992fcc090e5c261f8eda29c44b2
a16fdf4b1bfe44b52fe3fae01944a37ff8765ad1
/plc4j/drivers/profinet/src/main/generated/org/apache/plc4x/java/profinet/readwrite/PnDcp_Block_DevicePropertiesStandardGateway.java
76b1ff7310556c2b662cf7d388fd20128e039554
[ "Apache-2.0", "Unlicense" ]
permissive
glcj/plc4x
a56c5fa5168ab0617ac4e2592dbc6134a78cb7b7
d2b9aeae2dcd226bb56ef5b6545cdaadc2aa816c
refs/heads/develop
2023-03-18T17:22:42.373051
2023-01-19T03:46:34
2023-01-19T03:46:34
226,454,607
1
1
Apache-2.0
2023-03-15T07:02:45
2019-12-07T04:20:11
Java
UTF-8
Java
false
false
4,387
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 * * 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.apache.plc4x.java.profinet.readwrite; import static org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.*; import static org.apache.plc4x.java.spi.codegen.fields.FieldWriterFactory.*; import static org.apache.plc4x.java.spi.codegen.io.DataReaderFactory.*; import static org.apache.plc4x.java.spi.codegen.io.DataWriterFactory.*; import static org.apache.plc4x.java.spi.generation.StaticHelper.*; import java.time.*; import java.util.*; import org.apache.plc4x.java.api.exceptions.*; import org.apache.plc4x.java.api.value.*; import org.apache.plc4x.java.spi.codegen.*; import org.apache.plc4x.java.spi.codegen.fields.*; import org.apache.plc4x.java.spi.codegen.io.*; import org.apache.plc4x.java.spi.generation.*; // Code generated by code-generation. DO NOT EDIT. public class PnDcp_Block_DevicePropertiesStandardGateway extends PnDcp_Block implements Message { // Accessors for discriminator values. public PnDcp_BlockOptions getOption() { return PnDcp_BlockOptions.DEVICE_PROPERTIES_OPTION; } public Short getSuboption() { return (short) 9; } public PnDcp_Block_DevicePropertiesStandardGateway() { super(); } @Override protected void serializePnDcp_BlockChild(WriteBuffer writeBuffer) throws SerializationException { PositionAware positionAware = writeBuffer; int startPos = positionAware.getPos(); writeBuffer.pushContext("PnDcp_Block_DevicePropertiesStandardGateway"); writeBuffer.popContext("PnDcp_Block_DevicePropertiesStandardGateway"); } @Override public int getLengthInBytes() { return (int) Math.ceil((float) getLengthInBits() / 8.0); } @Override public int getLengthInBits() { int lengthInBits = super.getLengthInBits(); PnDcp_Block_DevicePropertiesStandardGateway _value = this; return lengthInBits; } public static PnDcp_Block_DevicePropertiesStandardGatewayBuilder staticParseBuilder( ReadBuffer readBuffer) throws ParseException { readBuffer.pullContext("PnDcp_Block_DevicePropertiesStandardGateway"); PositionAware positionAware = readBuffer; int startPos = positionAware.getPos(); int curPos; readBuffer.closeContext("PnDcp_Block_DevicePropertiesStandardGateway"); // Create the instance return new PnDcp_Block_DevicePropertiesStandardGatewayBuilder(); } public static class PnDcp_Block_DevicePropertiesStandardGatewayBuilder implements PnDcp_Block.PnDcp_BlockBuilder { public PnDcp_Block_DevicePropertiesStandardGatewayBuilder() {} public PnDcp_Block_DevicePropertiesStandardGateway build() { PnDcp_Block_DevicePropertiesStandardGateway pnDcp_Block_DevicePropertiesStandardGateway = new PnDcp_Block_DevicePropertiesStandardGateway(); return pnDcp_Block_DevicePropertiesStandardGateway; } } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PnDcp_Block_DevicePropertiesStandardGateway)) { return false; } PnDcp_Block_DevicePropertiesStandardGateway that = (PnDcp_Block_DevicePropertiesStandardGateway) o; return super.equals(that) && true; } @Override public int hashCode() { return Objects.hash(super.hashCode()); } @Override public String toString() { WriteBufferBoxBased writeBufferBoxBased = new WriteBufferBoxBased(true, true); try { writeBufferBoxBased.writeSerializable(this); } catch (SerializationException e) { throw new RuntimeException(e); } return "\n" + writeBufferBoxBased.getBox().toString() + "\n"; } }
[ "christofer.dutz@c-ware.de" ]
christofer.dutz@c-ware.de
9ef06cd09e58d8dc104a858655b1f7cad37d7bb4
7755f553c9bfc24460c531193f3c211206ecec98
/src/ch/ehi/interlis/domainsandconstants/basetypes/RotationKind.java
b4e6a2afc8d9d855ac38a476c206832bcc9e9a85
[]
no_license
claeis/umleditor
2fec9503b1300c3e45589886804455449f59eadb
8a75d943e75dfd1ed476bd18df693532fcf07383
refs/heads/master
2023-06-21T18:22:39.419850
2023-06-15T13:02:53
2023-06-15T13:02:53
109,155,258
5
9
null
2022-07-01T09:22:17
2017-11-01T16:27:10
Java
UTF-8
Java
false
false
2,796
java
/* This file is part of the UML/INTERLIS-Editor. * For more information, please see <http://www.umleditor.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 */ // -beg- preserve=no 3C1EFA180207 package "RotationKind" package ch.ehi.interlis.domainsandconstants.basetypes; // -end- 3C1EFA180207 package "RotationKind" // -beg- preserve=no 3C1EFA180207 autoimport "RotationKind" // -end- 3C1EFA180207 autoimport "RotationKind" // import declarations // please fill in/modify the following section // -beg- preserve=no 3C1EFA180207 import "RotationKind" // -end- 3C1EFA180207 import "RotationKind" /** @author Claude Eisenhut * @version $Revision: 1.1.1.1 $ $Date: 2003-12-23 10:34:30 $ */ public class RotationKind implements java.io.Serializable { // declare/define something only in the code // please fill in/modify the following section // -beg- preserve=no 3C1EFA180207 detail_begin "RotationKind" // -end- 3C1EFA180207 detail_begin "RotationKind" // -beg- preserve=no 3C1EFA30011B var3C1EFA180207 "UNDEFINED" public static final int UNDEFINED = 1; // -end- 3C1EFA30011B var3C1EFA180207 "UNDEFINED" // -beg- preserve=no 3C1EFA34017B var3C1EFA180207 "CLOCKWISE" public static final int CLOCKWISE = 2; // -end- 3C1EFA34017B var3C1EFA180207 "CLOCKWISE" // -beg- preserve=no 3C1EFA38031B var3C1EFA180207 "COUNTERCLOCKWISE" public static final int COUNTERCLOCKWISE = 3; // -end- 3C1EFA38031B var3C1EFA180207 "COUNTERCLOCKWISE" // declare/define something only in the code // please fill in/modify the following section // -beg- preserve=no 3C1EFA180207 detail_end "RotationKind" // -end- 3C1EFA180207 detail_end "RotationKind" }
[ "claeis@users.noreply.github.com" ]
claeis@users.noreply.github.com
e2ff77ff40d6a50f70edda40a8d4f61b2cd559b0
ef8e7192cc0366cad6aec24fb00187d7e1bc954d
/TurboWidget/iLoongShortcuts/src/com/iLoong/Shortcuts/View/WidgetShortcutsC.java
7c31bf5d7caa622dcb46422e75ee9c4a17918507
[]
no_license
srsman/daima111
44c89d430d5e296f01663fcf02627ccc4a0ab8fd
b8c1fb8a75d390f6542c53eaec9e46c6c505f022
refs/heads/master
2021-01-22T16:31:23.754703
2015-03-26T05:40:59
2015-03-26T05:40:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
932
java
package com.iLoong.Shortcuts.View; import java.util.ArrayList; import java.util.List; import com.iLoong.launcher.Widget3D.MainAppContext; import com.iLoong.launcher.Widget3D.WidgetPluginView3D; public class WidgetShortcutsC extends WidgetPluginView3D { public MainAppContext mAppContext; public WidgetShortcutsC( String name , MainAppContext appContext , int widgetId ) { super( name ); mAppContext = appContext; // this.setOrigin(WidgetShortcuts.MODEL_WIDTH / 2, WidgetShortcuts.MODEL_WIDTH / 2); } public List<ShortcutsView> listview = new ArrayList<ShortcutsView>(); public void add( ShortcutsView view ) { listview.add( view ); addView( view ); } @Override public void onResume() { super.onResume(); for( ShortcutsView view : listview ) { view.Init(); } } @Override public void onDelete() { for( ShortcutsView view : listview ) { view.dispose(); } } }
[ "liangxiaoling@cooee.cn" ]
liangxiaoling@cooee.cn
9daf23dffab236f0973e8a7b5c86bacff57ecd9e
62d09f27848bb9aac5abfbb0fb595c2b13c6b2b6
/src/main/java/com/jianglibo/vaadin/dashboard/view/software/SoftwareEditView.java
1a85428e8576448d2ad5750240bfb88a117deaf0
[]
no_license
zhanght86/easyinstaller
0670973cd9c1d752d801f1ae380780a6cc0f8ab0
8fb976ebf8c5f4d1a4199d71f1b019eff46c759d
refs/heads/master
2021-01-01T17:19:26.110400
2017-05-31T01:13:40
2017-05-31T01:13:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,183
java
package com.jianglibo.vaadin.dashboard.view.software; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.MessageSource; import org.springframework.data.jpa.repository.JpaRepository; import com.jianglibo.vaadin.dashboard.annotation.VaadinFormFieldWrapper; import com.jianglibo.vaadin.dashboard.annotation.VaadinTableWrapper; import com.jianglibo.vaadin.dashboard.domain.Domains; import com.jianglibo.vaadin.dashboard.domain.Software; import com.jianglibo.vaadin.dashboard.repositories.PersonRepository; import com.jianglibo.vaadin.dashboard.repositories.SoftwareRepository; import com.jianglibo.vaadin.dashboard.uicomponent.form.FormBase; import com.jianglibo.vaadin.dashboard.uicomponent.form.FormBase.HandMakeFieldsListener; import com.jianglibo.vaadin.dashboard.uicomponent.gridfield.FilesToUploadScalarGridField; import com.jianglibo.vaadin.dashboard.uifactory.FieldFactories; import com.jianglibo.vaadin.dashboard.view.BaseEditView; import com.vaadin.server.FontAwesome; import com.vaadin.spring.annotation.SpringView; import com.vaadin.ui.Field; @SpringView(name = SoftwareEditView.VIEW_NAME) public class SoftwareEditView extends BaseEditView<Software, FormBase<Software>, JpaRepository<Software,Long>>{ /** * */ private static final long serialVersionUID = 1L; private static final Logger LOGGER = LoggerFactory.getLogger(SoftwareEditView.class); public static final String VIEW_NAME = SoftwareListView.VIEW_NAME + "/edit"; public static final FontAwesome ICON_VALUE = FontAwesome.FILE_ARCHIVE_O; private final PersonRepository personRepository; @Autowired public SoftwareEditView(PersonRepository personRepository, SoftwareRepository repository, MessageSource messageSource,Domains domains,FieldFactories fieldFactories, ApplicationContext applicationContext) { super(messageSource, Software.class, domains, fieldFactories, repository); this.personRepository = personRepository; delayCreateContent(); } @Override public void detach() { super.detach(); // A new instance of TransactionsView is created every time it's // navigated to so we'll need to clean up references to it on detach. // DashboardEventBus.unregister(this); } @Override protected Field<?> createField(VaadinTableWrapper vtw, VaadinFormFieldWrapper vffw) { switch (vffw.getName()) { case "filesToUpload": return new FilesToUploadScalarGridField(getDomains(), String.class, getMessageSource(), vtw, vffw); default: break; } return null; } @Override protected FormBase<Software> createForm(MessageSource messageSource, Domains domains, FieldFactories fieldFactories, JpaRepository<Software, Long> repository, HandMakeFieldsListener handMakeFieldsListener) { return new SoftwareForm(personRepository, getMessageSource(), getDomains(), fieldFactories, (SoftwareRepository) repository,handMakeFieldsListener); } @Override protected Software createNewBean() { return new Software(); } @Override protected String getListViewName() { return VIEW_NAME; } }
[ "jianglibo@gmail.com" ]
jianglibo@gmail.com
d8f2222b79dadfc783dfb93030474525aa104dcc
3156097a45b3ebada2b36f37dbf44846a5892d86
/Chapter_7_GCS/mdse.book.swml.diagram/src/swml/diagram/edit/policies/SwmlTextSelectionEditPolicy.java
aaa7b1aa43a7c7c394770b8ece1e27c49ddffc5e
[]
no_license
ModelEngineeringBooks/MDSEBook
912a4815918f6e0c68c3384ed0aed929a8abf8f0
0f63acb260d24574d9c2afb8119a49e13896039e
refs/heads/master
2021-01-10T16:26:59.293068
2019-09-17T06:45:49
2019-09-17T06:45:49
47,128,250
13
2
null
null
null
null
UTF-8
Java
false
false
4,995
java
/* * */ package swml.diagram.edit.policies; import org.eclipse.draw2d.ColorConstants; import org.eclipse.draw2d.Figure; import org.eclipse.draw2d.FigureListener; import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.Label; import org.eclipse.draw2d.RectangleFigure; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gef.editpolicies.SelectionEditPolicy; import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel; import org.eclipse.gmf.tooling.runtime.edit.policies.labels.IRefreshableFeedbackEditPolicy; /** * @generated */ public class SwmlTextSelectionEditPolicy extends SelectionEditPolicy implements IRefreshableFeedbackEditPolicy { /** * @generated */ private IFigure selectionFeedbackFigure; /** * @generated */ private IFigure focusFeedbackFigure; /** * @generated */ private FigureListener hostPositionListener; /** * @generated */ protected void showPrimarySelection() { if (getHostFigure() instanceof WrappingLabel) { ((WrappingLabel) getHostFigure()).setSelected(true); ((WrappingLabel) getHostFigure()).setFocus(true); } else { showSelection(); showFocus(); } } /** * @generated */ protected void showSelection() { if (getHostFigure() instanceof WrappingLabel) { ((WrappingLabel) getHostFigure()).setSelected(true); ((WrappingLabel) getHostFigure()).setFocus(false); } else { hideSelection(); addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure()); getHostFigure().addFigureListener(getHostPositionListener()); refreshSelectionFeedback(); hideFocus(); } } /** * @generated */ protected void hideSelection() { if (getHostFigure() instanceof WrappingLabel) { ((WrappingLabel) getHostFigure()).setSelected(false); ((WrappingLabel) getHostFigure()).setFocus(false); } else { if (selectionFeedbackFigure != null) { removeFeedback(selectionFeedbackFigure); getHostFigure().removeFigureListener(getHostPositionListener()); selectionFeedbackFigure = null; } hideFocus(); } } /** * @generated */ protected void showFocus() { if (getHostFigure() instanceof WrappingLabel) { ((WrappingLabel) getHostFigure()).setFocus(true); } else { hideFocus(); addFeedback(focusFeedbackFigure = createFocusFeedbackFigure()); refreshFocusFeedback(); } } /** * @generated */ protected void hideFocus() { if (getHostFigure() instanceof WrappingLabel) { ((WrappingLabel) getHostFigure()).setFocus(false); } else { if (focusFeedbackFigure != null) { removeFeedback(focusFeedbackFigure); focusFeedbackFigure = null; } } } /** * @generated */ protected Rectangle getFeedbackBounds() { Rectangle bounds; if (getHostFigure() instanceof Label) { bounds = ((Label) getHostFigure()).getTextBounds(); bounds.intersect(getHostFigure().getBounds()); } else { bounds = getHostFigure().getBounds().getCopy(); } getHostFigure().getParent().translateToAbsolute(bounds); getFeedbackLayer().translateToRelative(bounds); return bounds; } /** * @generated */ protected IFigure createSelectionFeedbackFigure() { if (getHostFigure() instanceof Label) { Label feedbackFigure = new Label(); feedbackFigure.setOpaque(true); feedbackFigure.setBackgroundColor(ColorConstants.menuBackgroundSelected); feedbackFigure.setForegroundColor(ColorConstants.menuForegroundSelected); return feedbackFigure; } else { RectangleFigure feedbackFigure = new RectangleFigure(); feedbackFigure.setFill(false); return feedbackFigure; } } /** * @generated */ protected IFigure createFocusFeedbackFigure() { return new Figure() { protected void paintFigure(Graphics graphics) { graphics.drawFocus(getBounds().getResized(-1, -1)); } }; } /** * @generated */ protected void updateLabel(Label target) { Label source = (Label) getHostFigure(); target.setText(source.getText()); target.setTextAlignment(source.getTextAlignment()); target.setFont(source.getFont()); } /** * @generated */ protected void refreshSelectionFeedback() { if (selectionFeedbackFigure != null) { if (selectionFeedbackFigure instanceof Label) { updateLabel((Label) selectionFeedbackFigure); selectionFeedbackFigure.setBounds(getFeedbackBounds()); } else { selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5, 5)); } } } /** * @generated */ protected void refreshFocusFeedback() { if (focusFeedbackFigure != null) { focusFeedbackFigure.setBounds(getFeedbackBounds()); } } /** * @generated */ @Override public void refreshFeedback() { refreshSelectionFeedback(); refreshFocusFeedback(); } /** * @generated */ private FigureListener getHostPositionListener() { if (hostPositionListener == null) { hostPositionListener = new FigureListener() { public void figureMoved(IFigure source) { refreshFeedback(); } }; } return hostPositionListener; } }
[ "wimmer@big.tuwien.ac.at" ]
wimmer@big.tuwien.ac.at
8beea76e0de800e4410d39171ea6a7b53d171628
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/1/1_d3bbbc3dee9eec387f4970970ce62a6d7ac8c7e8/PersistentConnectionManager/1_d3bbbc3dee9eec387f4970970ce62a6d7ac8c7e8_PersistentConnectionManager_t.java
fd8b52a14fb4f636c2b4875656643ae5fc641c5b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,386
java
package com.push.network; import org.androidpn.client.LogUtil; import com.push.service.NotificationService; import android.util.Log; public class PersistentConnectionManager extends Thread { private static final String LOGTAG = LogUtil.makeLogTag(PersistentConnectionManager.class); private NotificationService notification; private int waiting; public PersistentConnectionManager(NotificationService notification) { this.waiting = 0; this.notification = notification; } public void run() { try { while (!isInterrupted()) { Log.d(LOGTAG, "Trying to reconnect in " + waiting() + " seconds"); Thread.sleep((long) waiting() * 1000L); notification.disConnect(); notification.login(); waiting++; } } catch (final InterruptedException e) { // xmppManager.getHandler().post(new Runnable() { // public void run() { // xmppManager.getConnectionListener().reconnectionFailed(e); // } // }); } } private int waiting() { if (waiting > 20) { return 600; } if (waiting > 13) { return 300; } return waiting <= 7 ? 10 : 60; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
a9aa4cca5332624274ce2bf819770d0b4a0d161b
5a5a214b171503b25f14210fd7d8ba2edb10ac81
/src/test/java/com/codex/demo/config/WebConfigurerTest.java
bc30b37b15e686a57cf8f5e72ca52a103494c72b
[]
no_license
dbogi89/prodavnica
b18b0eb2c29780c78b58cd2bb1d63199643153a1
56dada36d83abdd7043887efceb664a35ce4ecf5
refs/heads/master
2022-12-22T19:18:28.295697
2019-06-12T00:30:21
2019-06-12T00:30:21
191,469,107
0
0
null
2022-12-16T04:59:29
2019-06-12T00:30:08
Java
UTF-8
Java
false
false
6,960
java
package com.codex.demo.config; import io.github.jhipster.config.JHipsterConstants; import io.github.jhipster.config.JHipsterProperties; import io.github.jhipster.web.filter.CachingHttpHeadersFilter; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory; import org.springframework.http.HttpHeaders; import org.springframework.mock.env.MockEnvironment; import org.springframework.mock.web.MockServletContext; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import javax.servlet.*; import java.io.File; import java.util.*; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.Mockito.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.options; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; /** * Unit tests for the {@link WebConfigurer} class. */ public class WebConfigurerTest { private WebConfigurer webConfigurer; private MockServletContext servletContext; private MockEnvironment env; private JHipsterProperties props; @BeforeEach public void setup() { servletContext = spy(new MockServletContext()); doReturn(mock(FilterRegistration.Dynamic.class)) .when(servletContext).addFilter(anyString(), any(Filter.class)); doReturn(mock(ServletRegistration.Dynamic.class)) .when(servletContext).addServlet(anyString(), any(Servlet.class)); env = new MockEnvironment(); props = new JHipsterProperties(); webConfigurer = new WebConfigurer(env, props); } @Test public void testStartUpProdServletContext() throws ServletException { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); webConfigurer.onStartup(servletContext); verify(servletContext).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class)); } @Test public void testStartUpDevServletContext() throws ServletException { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT); webConfigurer.onStartup(servletContext); verify(servletContext, never()).addFilter(eq("cachingHttpHeadersFilter"), any(CachingHttpHeadersFilter.class)); } @Test public void testCustomizeServletContainer() { env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION); UndertowServletWebServerFactory container = new UndertowServletWebServerFactory(); webConfigurer.customize(container); assertThat(container.getMimeMappings().get("abs")).isEqualTo("audio/x-mpeg"); assertThat(container.getMimeMappings().get("html")).isEqualTo("text/html;charset=utf-8"); assertThat(container.getMimeMappings().get("json")).isEqualTo("text/html;charset=utf-8"); if (container.getDocumentRoot() != null) { assertThat(container.getDocumentRoot()).isEqualTo(new File("target/classes/static/")); } } @Test public void testCorsFilterOnApiPath() throws Exception { props.getCors().setAllowedOrigins(Collections.singletonList("*")); props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); props.getCors().setAllowedHeaders(Collections.singletonList("*")); props.getCors().setMaxAge(1800L); props.getCors().setAllowCredentials(true); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( options("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com") .header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST")) .andExpect(status().isOk()) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")) .andExpect(header().string(HttpHeaders.VARY, "Origin")) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,POST,PUT,DELETE")) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true")) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "1800")); mockMvc.perform( get("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com")); } @Test public void testCorsFilterOnOtherPath() throws Exception { props.getCors().setAllowedOrigins(Collections.singletonList("*")); props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE")); props.getCors().setAllowedHeaders(Collections.singletonList("*")); props.getCors().setMaxAge(1800L); props.getCors().setAllowCredentials(true); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( get("/test/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); } @Test public void testCorsFilterDeactivated() throws Exception { props.getCors().setAllowedOrigins(null); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( get("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); } @Test public void testCorsFilterDeactivated2() throws Exception { props.getCors().setAllowedOrigins(new ArrayList<>()); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()) .addFilters(webConfigurer.corsFilter()) .build(); mockMvc.perform( get("/api/test-cors") .header(HttpHeaders.ORIGIN, "other.domain.com")) .andExpect(status().isOk()) .andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
3c8b30fdc018b01ab677b7b00cadada748492cd8
0f859255f131fa60a90acd3c137bbb0b9ee32d01
/test-integration/src/test/java/org/odata4j/test/integration/issues/Issue13Test.java
fbeaa7d8503b35e4e78d4e69ddac7c33be3843fa
[ "Apache-2.0" ]
permissive
vhalbert/oreva
fe1f5c76b8f2416dbb36481769585b77dd46e6e9
39b6c90c432bcefc410894c04fb831178d560272
refs/heads/master
2021-01-18T01:10:00.864949
2020-01-28T15:25:14
2020-01-28T15:25:14
36,017,606
0
0
Apache-2.0
2020-02-12T14:47:49
2015-05-21T14:31:54
Java
UTF-8
Java
false
false
1,970
java
package org.odata4j.test.integration.issues; import junit.framework.Assert; import org.core4j.Enumerable; import org.core4j.Func; import org.core4j.Funcs; import org.junit.Test; import org.odata4j.consumer.ODataConsumer; import org.odata4j.core.OEntityKey; import org.odata4j.producer.EntityQueryInfo; import org.odata4j.producer.EntityResponse; import org.odata4j.producer.ODataContext; import org.odata4j.producer.inmemory.InMemoryProducer; import org.odata4j.producer.resources.DefaultODataProducerProvider; import org.odata4j.producer.server.ODataServer; import org.odata4j.test.integration.AbstractRuntimeTest; public class Issue13Test extends AbstractRuntimeTest { public Issue13Test(RuntimeFacadeType type) { super(type); } @Test public void issue13() throws Exception { String endpointUri = "http://localhost:8813/Issue13.svc/"; final OEntityKey[] lastEntityKey = new OEntityKey[1]; InMemoryProducer producer = new InMemoryProducer("Issue13") { @Override public EntityResponse getEntity(ODataContext context, String entitySetName, OEntityKey entityKey, EntityQueryInfo queryInfo) { lastEntityKey[0] = entityKey; return super.getEntity(context, entitySetName, entityKey, queryInfo); } }; producer.register(Long.class, Long.class, "Entity", new Func<Iterable<Long>>() { public Iterable<Long> apply() { return Enumerable.create(1L, 2L, 3L); } }, Funcs.identity(Long.class)); DefaultODataProducerProvider.setInstance(producer); ODataServer server = this.rtFacade.startODataServer(endpointUri); ODataConsumer c = this.rtFacade.createODataConsumer(endpointUri, null); lastEntityKey[0] = null; Assert.assertNotNull(c.getEntity("Entity", 2L).execute()); Assert.assertNotNull(lastEntityKey[0]); Assert.assertEquals(OEntityKey.create(2L), lastEntityKey[0]); server.stop(); } }
[ "rareddy@jboss.org" ]
rareddy@jboss.org
20ee40a17dcffab188b83b74703a5a57ac0cc3e4
dd70bacf12f2b3fd81e4dac135b9a4e491f73cb8
/net/minecraft/datafixer/mapping/LegacyDyeItemMapping.java
1e3fe128faa600a65b09e6d824f95281886562c2
[]
no_license
dennisvoliver/minecraft
bd9d8e256778ac3d00c1ab61a2b6c4702ed56827
fbf6271791785db06a3f8fe4a86c6a92f6a8d951
refs/heads/main
2023-04-23T12:38:25.848640
2021-05-19T07:15:38
2021-05-19T07:15:38
368,775,994
2
0
null
null
null
null
UTF-8
Java
false
false
389
java
package net.minecraft.datafixer.mapping; import com.google.common.collect.ImmutableMap; import java.util.Map; public class LegacyDyeItemMapping { public static final Map<String, String> MAP = ImmutableMap.builder().put("minecraft:cactus_green", "minecraft:green_dye").put("minecraft:rose_red", "minecraft:red_dye").put("minecraft:dandelion_yellow", "minecraft:yellow_dye").build(); }
[ "user@email.com" ]
user@email.com
c140063448d2445a582b7c3636bc4ec0ceebdcaf
2097d290e6d3d8f1236eda58a230a114d36089ad
/client/listing/src/main/java/com/tll/common/data/rpc/ListingPayload.java
3233773b8dac764b720cfe3df4bf4f0615b9fa78
[]
no_license
jopaki/tll
b31434a7b7b0c5b6592e52e1844f9cc80bae8ede
9a37b43b3c1be6e32173d19f9b9a94e8f24a50f5
refs/heads/master
2021-01-20T11:13:32.672419
2012-09-04T05:31:45
2012-09-04T05:39:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,368
java
/** * The Logic Lab * @author jpk * Aug 31, 2007 */ package com.tll.common.data.rpc; import com.tll.IMarshalable; import com.tll.common.data.Page; import com.tll.common.data.Payload; import com.tll.common.msg.Status; /** * ListingPayload - Response to a {@link ListingRequest}. * @param <R> The row data type * @author jpk */ public class ListingPayload<R extends IMarshalable> extends Payload { public enum ListingStatus { /** * listing is cached on the server. */ CACHED, /** * listing is not cached on the server. */ NOT_CACHED; } /** * The unique listing id. */ private String listingId; /** * The server side status of the listing */ private ListingStatus listingStatus; private Page<R> page; /** * Constructor */ public ListingPayload() { super(); } /** * Constructor * @param status * @param listingId * @param listingStatus */ public ListingPayload(Status status, String listingId, ListingStatus listingStatus) { super(status); this.listingId = listingId; this.listingStatus = listingStatus; } /** * Sets page data. * @param page */ public void setPageData(Page<R> page) { this.page = page; } public String getListingId() { return listingId; } public ListingStatus getListingStatus() { return listingStatus; } public Page<R> getPage() { return page; } }
[ "jopaki@gmail.com" ]
jopaki@gmail.com
540d14ae33c816e88924add889378ecca3d2ff1a
fb386d4480779accc1353a4041a4661632881348
/30-enterprise-software-development-java/20-enterprise-framework/10-spring/codelab01/src/main/java/com/switchfully/springdi/codelab01/v1/DrinkSoup.java
7717ce4d7ab50bbc370eb4551bdac066eab6fd42
[]
no_license
Jermathie/javaexo1
e65ef4ae418fb2d1d23e54faaf854d97782bc7b2
3e1468f17b94f0aeb771ea611b3ef740dcd32bf8
refs/heads/main
2023-03-12T07:10:37.709324
2021-02-07T16:31:40
2021-02-07T16:31:40
336,832,107
0
0
null
null
null
null
UTF-8
Java
false
false
569
java
package com.switchfully.springdi.codelab01.v1; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.ComponentScan; @ComponentScan(basePackages = {"com.switchfully.springdi.codelab01.v1"}) public class DrinkSoup { public static void main(String... args) { AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(DrinkSoup.class); Royco deliciousSoup = applicationContext.getBean(Royco.class); deliciousSoup.drink(); } }
[ "jeremie.mathieu@sfpd.fgov.be" ]
jeremie.mathieu@sfpd.fgov.be
86c2c1a9834a8aa1cb378ccea5e6e2def18560dc
2cd8a765d796f0426369123c642e261db9cc57a0
/src/main/java/org/javatuples/valueintf/IValue4.java
84b7f2b325a4bf2ea18c645199844a98dda21d3e
[]
no_license
huangsongkai/dzoms_ky
6e37b759924358841c633a1156922c465d1d2f01
d39eaa2a8e0c3c061c3a1c938f750a8f3fccd1d5
refs/heads/master
2023-01-04T02:07:45.965319
2020-09-28T13:19:00
2020-09-28T13:19:00
111,535,993
3
4
null
2023-01-02T22:13:02
2017-11-21T10:47:02
Java
UTF-8
Java
false
false
1,059
java
/* * ============================================================================= * * Copyright (c) 2010, The JAVATUPLES team (http://www.javatuples.org) * * 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.javatuples.valueintf; /** * <p> * Marker interface for tuples with a "4" value. * </p> * @since 1.1 * * @author Daniel Fern&aacute;ndez * */ public interface IValue4<X> { public X getValue4(); }
[ "296731066@qq.com" ]
296731066@qq.com
43053a2e147d37827e69743f20215e7029381b33
4dcdab2b7e086fad289efc49904a48af203a5569
/Java/src/Design/RandomizedCollection.java
413b91d0611722ee56414b44a28c055b9d037927
[]
no_license
jamie2017/EverydayCoding
9d70f59dfe298debced978f36b3be4ea178133d7
8a5107438411756ae85721b09c192747b3035dc0
refs/heads/master
2021-04-26T21:49:27.449050
2018-03-08T23:29:53
2018-03-08T23:29:53
124,162,965
0
0
null
null
null
null
UTF-8
Java
false
false
1,886
java
package Design; import java.util.*; /** * Created by JMYE on 9/16/16. */ public class RandomizedCollection { List<Integer> nums; Map<Integer, Set<Integer>> map; Random rand; /** Initialize your data structure here. */ public RandomizedCollection() { nums = new ArrayList<>(); map = new HashMap<>(); rand = new Random(); } /** Inserts a value to the collection. Returns true if the collection did not already contain the specified element. */ public boolean insert(int val) { boolean ifContain = map.containsKey(val); if (!ifContain) { map.put(val, new LinkedHashSet<>()); } map.get(val).add(nums.size()); nums.add(val); return !ifContain; } /** Removes a value from the collection. Returns true if the collection contained the specified element. */ public boolean remove(int val) { boolean ifContain = map.containsKey(val); if (!ifContain) { return false; } int firstLoc = map.get(val).iterator().next(); map.get(val).remove(firstLoc); if (firstLoc < nums.size() - 1) { int lastOne = nums.get(nums.size() - 1); nums.set(firstLoc, lastOne); map.get(lastOne).remove(nums.size() - 1); map.get(lastOne).add(firstLoc); } nums.remove(nums.size() - 1); if (map.get(val).isEmpty()) map.remove(val); return true; } /** Get a random element from the collection. */ public int getRandom() { return nums.get(rand.nextInt(nums.size())); } } /** * Your RandomizedCollection object will be instantiated and called as such: * RandomizedCollection obj = new RandomizedCollection(); * boolean param_1 = obj.insert(val); * boolean param_2 = obj.remove(val); * int param_3 = obj.getRandom(); */
[ "yjm.code@gmail.com" ]
yjm.code@gmail.com
1fbd2a5b59ba3de11b28adb16e38948fb7450aec
0ed6d36c4f048a8367c3ee54fbd14bc3b4d710bb
/src/rasterize/LineRasterizerGraphics.java
58d4f5244c28a162e866784be3ee76047f17116e
[]
no_license
cheetumen52/task3
52dd2205fd618387c65c52459d75863446e94efa
0f8ab0f296dfa791534277ed39e46953ee854d17
refs/heads/master
2023-01-23T23:11:07.555600
2020-12-09T11:09:28
2020-12-09T11:09:28
318,240,112
0
0
null
null
null
null
UTF-8
Java
false
false
413
java
package rasterize; import java.awt.*; public class LineRasterizerGraphics extends LineRasterizer { public LineRasterizerGraphics(Raster raster) { super(raster); } @Override protected void drawLine(int x1, int y1, int x2, int y2) { Graphics g = ((RasterBufferedImage) raster).getImg().getGraphics(); g.setColor(this.color); g.drawLine(x1, y1, x2, y2); } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
67c247fc6f7e021825c2dca1ff88cf753e2f0d59
7c0acec36a1c569b1eefd4cc1022686b6a8c9427
/it.ltc.logica.database/src/it/ltc/logica/database/model/centrale/trasporti/Cap.java
3f9f2e030be53a604334c2a75ab619fa89757204
[]
no_license
Dufler/logica
3fa53fbfbfb36df9f00f10eeaa41535a1cbf0dba
e623a07d29fdfd4121106b9b3081faa59992e248
refs/heads/master
2020-05-02T20:10:08.565067
2019-06-04T13:29:07
2019-06-04T13:29:07
122,049,673
0
0
null
null
null
null
UTF-8
Java
false
false
3,934
java
package it.ltc.logica.database.model.centrale.trasporti; import java.io.Serializable; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.IdClass; import javax.persistence.PrePersist; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; @Entity @Table(name="cap") @IdClass(CapPK.class) public class Cap implements Serializable { private static final long serialVersionUID = 1L; @Id @Column(unique=true, nullable=false, length=5) private String cap; @Id @Column(unique=true, nullable=false, length=200) private String localita; @Column(name="brt_disagiate", nullable=false) private boolean brtDisagiate; @Column(name="brt_isole", nullable=false) private boolean brtIsole; @Column(name="brt_ztl", nullable=false) private boolean brtZtl; @Column(nullable=false, length=2) private String provincia; @Column(nullable=false, length=3) private String regione; @Column(name="tnt_ore_dieci", nullable=false) private boolean tntOreDieci; @Column(name="tnt_ore_dodici", nullable=false) private boolean tntOreDodici; @Temporal(TemporalType.TIMESTAMP) @Column(name="data_ultima_modifica") private Date dataUltimaModifica; public Cap() {} @PrePersist public void prePersist() { if (dataUltimaModifica == null) dataUltimaModifica = new Date(0); } public CapPK getPK() { CapPK pk = new CapPK(); pk.setCap(cap); pk.setLocalita(localita); return pk; } public String toString() { return cap + " - " + localita; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((cap == null) ? 0 : cap.hashCode()); result = prime * result + ((localita == null) ? 0 : localita.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Cap other = (Cap) obj; if (cap == null) { if (other.cap != null) return false; } else if (!cap.equals(other.cap)) return false; if (localita == null) { if (other.localita != null) return false; } else if (!localita.equals(other.localita)) return false; return true; } public String getCap() { return cap; } public void setCap(String cap) { this.cap = cap; } public String getLocalita() { return localita; } public void setLocalita(String localita) { this.localita = localita; } public boolean getBrtDisagiate() { return this.brtDisagiate; } public void setBrtDisagiate(boolean brtDisagiate) { this.brtDisagiate = brtDisagiate; } public boolean getBrtIsole() { return this.brtIsole; } public void setBrtIsole(boolean brtIsole) { this.brtIsole = brtIsole; } public boolean getBrtZtl() { return this.brtZtl; } public void setBrtZtl(boolean brtZtl) { this.brtZtl = brtZtl; } public String getProvincia() { return this.provincia; } public void setProvincia(String provincia) { this.provincia = provincia; } public String getRegione() { return this.regione; } public void setRegione(String regione) { this.regione = regione; } public boolean getTntOreDieci() { return this.tntOreDieci; } public void setTntOreDieci(boolean tntOreDieci) { this.tntOreDieci = tntOreDieci; } public boolean getTntOreDodici() { return this.tntOreDodici; } public void setTntOreDodici(boolean tntOreDodici) { this.tntOreDodici = tntOreDodici; } public Date getDataUltimaModifica() { return dataUltimaModifica; } public void setDataUltimaModifica(Date dataUltimaModifica) { this.dataUltimaModifica = dataUltimaModifica; } }
[ "Damiano@Damiano-PC" ]
Damiano@Damiano-PC
28f0f8d2c386cc4630ddebd6cf6dbce166bd9738
df46fa4acf8d088dcc6d5ef2b9048aadf9f568e3
/SimpleApplicationListener/src/java/beans/User.java
af6f14acffd90320d542faee28c06556bfb06eb4
[]
no_license
rmsor/waa_practice
aa16cf4af702ddb730aed241df52e39a81054e5f
0af3c85736f6a52370810878be1029b54308400f
refs/heads/master
2020-05-17T03:24:48.800491
2015-04-21T21:58:31
2015-04-21T21:58:31
33,197,470
0
0
null
null
null
null
UTF-8
Java
false
false
2,053
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package beans; import entities.Person; import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import javax.enterprise.context.SessionScoped; import javax.faces.event.ValueChangeEvent; import javax.inject.Named; /** * * @author 984317 */ @Named("user") @SessionScoped public class User implements Serializable { private String firstName; private String lastName; private String result; private String resultV2; private ArrayList<Person> persons; public User() { persons=new ArrayList(); } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public void setFirstName(String firstName) { this.firstName = firstName; } public void setLastName(String lastName) { this.lastName = lastName; } public String saveUser(){ persons.add(new Person(firstName,lastName)); return "version1"; } public ArrayList<Person> getPersons() { return persons; } public String searchLastName(String fName){ String serchNam=fName!=null?fName:firstName; Iterator it=persons.iterator(); while(it.hasNext()){ Person ps=(Person) it.next(); if(ps.getFirstName().equals(serchNam)){ return ps.getLastName(); } } return null; } public void findLastName(ValueChangeEvent e){ String newFirstName = e.getNewValue().toString(); result=searchLastName(newFirstName); } public String findLastNameV2(){ resultV2=searchLastName(null); return "version3"; } public String getResult() { return result; } public String getResultV2() { return resultV2; } }
[ "rmsor.pth02@gmail.com" ]
rmsor.pth02@gmail.com
a20d937a2107889e7eb83583a4e527a40c676e4c
ebfff291a6ee38646c4d4e176f5f2eddf390ace4
/orange-demo-flowable/orange-demo-flowable-service/common/common-core/src/main/java/com/flow/demo/common/core/annotation/MyDataSource.java
9ba1583396c9524e5d26607e5d39c6d195f734e3
[ "Apache-2.0" ]
permissive
jiazhizhong/orange-admin
a9d6b5b97cbea72e8fcb55c081b7dc6a523847df
bbe737d540fb670fd4ed5514f7faed4f076ef3d4
refs/heads/master
2023-08-21T11:31:22.188591
2021-10-30T06:06:40
2021-10-30T06:06:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package com.flow.demo.common.core.annotation; import java.lang.annotation.*; /** * 主要用于标记Service所依赖的数据源类型。 * * @author Jerry * @date 2021-06-06 */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface MyDataSource { /** * 标注的数据源类型 * @return 当前标注的数据源类型。 */ int value(); }
[ "707344974@qq.com" ]
707344974@qq.com
528ecc815ed1c4289996dca024806addf3606efb
3729763ddb479b21c7f3a5f1e0a9954500850b52
/Sources/com/workday/sources/DrawFrequencyReferenceType.java
c4afc1f266dadd4b10cfe714ac184c2aa03b1b42
[]
no_license
SANDEEPERUMALLA/workdayscanner
fe0816e9a95de73a598d6e29be5b20aeeca6cb60
8a4c3660cc588402aa49f948afe2168c4faa9df5
refs/heads/master
2020-03-18T22:30:21.218489
2018-05-29T20:24:36
2018-05-29T20:24:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,616
java
package com.workday.sources; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; /** * Reference element representing a unique instance of Frequency. * * <p>Java class for Draw_Frequency_ReferenceType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="Draw_Frequency_ReferenceType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="Frequency_Name" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Draw_Frequency_ReferenceType", propOrder = { "frequencyName" }) public class DrawFrequencyReferenceType { @XmlElement(name = "Frequency_Name", required = true) protected String frequencyName; /** * Gets the value of the frequencyName property. * * @return * possible object is * {@link String } * */ public String getFrequencyName() { return frequencyName; } /** * Sets the value of the frequencyName property. * * @param value * allowed object is * {@link String } * */ public void setFrequencyName(String value) { this.frequencyName = value; } }
[ "p.sandeepkumargupta@gmail.com" ]
p.sandeepkumargupta@gmail.com
f5fb87ed30481a6b4eefae8bcfa73575c2268843
b06b46d61f548315fab7aed8030dbb2b53d16f5d
/qtiworks-jqtiplus/src/main/java/uk/ac/ed/ph/jqtiplus/group/item/template/processing/TemplateRuleGroup.java
e5f9d4cc33f9e38894e218b6515be15b67d43486
[ "BSD-3-Clause" ]
permissive
davemckain/qtiworks
7e3af1f37182d374d44bbcf7206f218e1785013a
f1465aad49d575f7fc44ff9eaae3d0d57a323abb
refs/heads/master
2023-01-05T04:26:02.922223
2023-01-04T11:29:04
2023-01-04T11:29:04
4,086,423
57
48
NOASSERTION
2022-10-28T08:18:29
2012-04-20T12:48:06
Java
UTF-8
Java
false
false
2,816
java
/* Copyright (c) 2012-2013, University of Edinburgh. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright notice, this * list of conditions and the following disclaimer in the documentation and/or * other materials provided with the distribution. * * * Neither the name of the University of Edinburgh nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * This software is derived from (and contains code from) QTItools and MathAssessEngine. * QTItools is (c) 2008, University of Southampton. * MathAssessEngine is (c) 2010, University of Edinburgh. */ package uk.ac.ed.ph.jqtiplus.group.item.template.processing; import uk.ac.ed.ph.jqtiplus.group.ComplexNodeGroup; import uk.ac.ed.ph.jqtiplus.node.item.template.processing.TemplateConditionChild; import uk.ac.ed.ph.jqtiplus.node.item.template.processing.TemplateRule; import uk.ac.ed.ph.jqtiplus.node.item.template.processing.TemplateRuleType; import java.util.List; /** * Group of templateRule children. * * @author Jonathon Hare */ public final class TemplateRuleGroup extends ComplexNodeGroup<TemplateConditionChild,TemplateRule> { private static final long serialVersionUID = 7611032252474697635L; public TemplateRuleGroup(final TemplateConditionChild parent) { super(parent, TemplateRule.DISPLAY_NAME, TemplateRuleType.getQtiClassNames()); } public List<TemplateRule> getTemplateRules() { return getChildren(); } @Override public TemplateRule create(final String qtiClassName) { return TemplateRuleType.getInstance(getParent(), qtiClassName); } }
[ "david.mckain@ed.ac.uk" ]
david.mckain@ed.ac.uk