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
ef8026da7d9b1417a29af82b2ddfb0951204496f
db72943db19f34832cdbbba0805a107a1fbad127
/src/main/java/com/caitu99/lsp/entry/EamilHotmail.java
e8cfd716af0ec3972e5e60b99efa03c09d8676cc
[]
no_license
qinains/lsp
3742234c55c73d68c9e83ae273ed9ca24c015105
a20b945add2d1262e18024cbef3446d2d41be645
refs/heads/master
2020-12-13T23:30:17.086238
2016-07-05T05:11:22
2016-07-05T05:11:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,350
java
package com.caitu99.lsp.entry; import com.alibaba.fastjson.JSON; import com.caitu99.lsp.Constant; import com.caitu99.lsp.cache.RedisOperate; import com.caitu99.lsp.exception.SpiderException; import com.caitu99.lsp.model.spider.hotmail.MailHotmailSpiderEvent; import com.caitu99.lsp.model.spider.hotmail.MailHotmailSpiderState; import com.caitu99.lsp.spider.SpiderReactor; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.context.request.async.DeferredResult; import javax.servlet.http.HttpServletRequest; /** * Created by Lion on 2015/11/14 0014. */ @Controller public class EamilHotmail extends BaseController { private static final Logger logger = LoggerFactory.getLogger(EamilHotmail.class); @Autowired private RedisOperate redis; @RequestMapping(value = "/api/mail/hotmail/login/1.0", produces = "application/json;charset=utf-8") @ResponseBody public DeferredResult<Object> login(HttpServletRequest request) { logger.debug("hotmail model: 收到一次请求..."); DeferredResult<Object> deferredResult = new DeferredResult<>(); String userid = request.getParameter("userid"); String account = request.getParameter("account"); String password = request.getParameter("password"); String date = request.getParameter("date"); if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(account) || StringUtils.isEmpty(password) || StringUtils.isEmpty(date)) { SpiderException exception = new SpiderException(1006, "数据不完整"); deferredResult.setResult(exception.toString()); return deferredResult; } String key = String.format(Constant.MAILHOTMAILTASKQUEUE, account); String value = redis.getStringByKey(key); if (StringUtils.isNotBlank(value)) { SpiderException exception = new SpiderException(1026, "该邮箱已经在导入中"); deferredResult.setResult(exception.toString()); return deferredResult; } MailHotmailSpiderEvent event = new MailHotmailSpiderEvent(userid, deferredResult, request); event.setAccount(account); event.setPassword(password); event.setDate(Long.parseLong(date)); event.setState(MailHotmailSpiderState.DEFAULT); SpiderReactor.getInstance().process(event); logger.info("start processing hotmail event: {}", event); return deferredResult; } @RequestMapping(value = "/api/mail/hotmail/verify/1.0", produces = "application/json;charset=utf-8") @ResponseBody public DeferredResult<Object> verify(HttpServletRequest request) { DeferredResult<Object> deferredResult = new DeferredResult<>(); String userid = request.getParameter("userid"); String vCode = request.getParameter("vcode"); if (StringUtils.isEmpty(userid) || StringUtils.isEmpty(vCode)) { SpiderException exception = new SpiderException(1006, "数据不完整"); deferredResult.setResult(exception.toString()); return deferredResult; } String key = String.format(Constant.MAILHOTMAILIMPORTKEY, userid); String content = redis.getStringByKey(key); if (StringUtils.isEmpty(content)) { SpiderException exception = new SpiderException(1005, "账号验证已过期"); deferredResult.setResult(exception.toString()); return deferredResult; } MailHotmailSpiderEvent event = JSON.parseObject(content, MailHotmailSpiderEvent.class); event.setDeferredResult(deferredResult); event.setRequest(request); event.setvCode(vCode); // event.setState(); // verify vcode event.getCurPage().set(1); SpiderReactor.getInstance().process(event); logger.info("start processing hotmail event: {}", event); return deferredResult; } @RequestMapping(value = "/api/mail/hotmail/checkresult/1.0", produces = "application/json;charset=utf-8") @ResponseBody public DeferredResult<Object> checkResult(HttpServletRequest request) { DeferredResult<Object> deferredResult = new DeferredResult<>(); String userid = request.getParameter("userid"); if (StringUtils.isEmpty(userid)) { SpiderException exception = new SpiderException(1006, "数据不完整"); deferredResult.setResult(exception.toString()); return deferredResult; } String key = String.format(Constant.MAILHOTMAILRESLUTKEY, userid); String content = redis.getStringByKey(key); SpiderException exception = new SpiderException(1020, "尚未获得邮件解析结果"); if (StringUtils.isNotEmpty(content)) { exception = new SpiderException(1024, "导入完成并返回结果"); exception.setData(content); } deferredResult.setResult(exception.toString()); return deferredResult; } }
[ "admin@admin-PC" ]
admin@admin-PC
7be165b2479695041ba2272f3dc7e25fc4119f5c
e7ca3a996490d264bbf7e10818558e8249956eda
/aliyun-java-sdk-emr/src/main/java/com/aliyuncs/emr/model/v20160408/QueryPriceForRenewEcsRequest.java
0418d4289c6efcb39fd9f13802b288939cacfcfe
[ "Apache-2.0" ]
permissive
AndyYHL/aliyun-openapi-java-sdk
6f0e73f11f040568fa03294de2bf9a1796767996
15927689c66962bdcabef0b9fc54a919d4d6c494
refs/heads/master
2020-03-26T23:18:49.532887
2018-08-21T04:12:23
2018-08-21T04:12:23
145,530,169
1
0
null
2018-08-21T08:14:14
2018-08-21T08:14:13
null
UTF-8
Java
false
false
2,593
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.emr.model.v20160408; import com.aliyuncs.RpcAcsRequest; /** * @author auto create * @version */ public class QueryPriceForRenewEcsRequest extends RpcAcsRequest<QueryPriceForRenewEcsResponse> { public QueryPriceForRenewEcsRequest() { super("Emr", "2016-04-08", "QueryPriceForRenewEcs"); } private Long resourceOwnerId; private Integer ecsPeriod; private Integer emrPeriod; private String clusterId; private String ecsId; private String ecsIdList; public Long getResourceOwnerId() { return this.resourceOwnerId; } public void setResourceOwnerId(Long resourceOwnerId) { this.resourceOwnerId = resourceOwnerId; if(resourceOwnerId != null){ putQueryParameter("ResourceOwnerId", resourceOwnerId.toString()); } } public Integer getEcsPeriod() { return this.ecsPeriod; } public void setEcsPeriod(Integer ecsPeriod) { this.ecsPeriod = ecsPeriod; if(ecsPeriod != null){ putQueryParameter("EcsPeriod", ecsPeriod.toString()); } } public Integer getEmrPeriod() { return this.emrPeriod; } public void setEmrPeriod(Integer emrPeriod) { this.emrPeriod = emrPeriod; if(emrPeriod != null){ putQueryParameter("EmrPeriod", emrPeriod.toString()); } } public String getClusterId() { return this.clusterId; } public void setClusterId(String clusterId) { this.clusterId = clusterId; if(clusterId != null){ putQueryParameter("ClusterId", clusterId); } } public String getEcsId() { return this.ecsId; } public void setEcsId(String ecsId) { this.ecsId = ecsId; if(ecsId != null){ putQueryParameter("EcsId", ecsId); } } public String getEcsIdList() { return this.ecsIdList; } public void setEcsIdList(String ecsIdList) { this.ecsIdList = ecsIdList; if(ecsIdList != null){ putQueryParameter("EcsIdList", ecsIdList); } } @Override public Class<QueryPriceForRenewEcsResponse> getResponseClass() { return QueryPriceForRenewEcsResponse.class; } }
[ "haowei.yao@alibaba-inc.com" ]
haowei.yao@alibaba-inc.com
44125298054b846d96726a16fbf16511a0e7174c
6dd0af4748bc3db1176e638819f3089f0b26e918
/hi-ws/src/com/hh/xml/internal/bind/v2/WellKnownNamespace.java
057d04163aa201787485f1ed92baf37e1b21d312
[]
no_license
ngocdon0127/core-hiendm
df13debcc8f1d3dfc421b57bd149a95d2a4cd441
46421fbd1868625b0a1c7b1447d4f882e37e6257
refs/heads/master
2022-11-17T11:50:16.145719
2020-07-14T10:55:22
2020-07-14T10:55:22
279,256,530
0
0
null
2020-07-13T09:24:43
2020-07-13T09:24:42
null
UTF-8
Java
false
false
1,704
java
/* * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.hh.xml.internal.bind.v2; import javax.xml.XMLConstants; /** * Well-known namespace URIs. * @author * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com), Martin Grebac (martin.grebac@oracle.com) * @since 2.0 */ public abstract class WellKnownNamespace { private WellKnownNamespace() {} // no instanciation please /** * @deprecated Use javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI instead; * @return * @throws CloneNotSupportedException */ @Deprecated() public static final String XML_SCHEMA = XMLConstants.W3C_XML_SCHEMA_NS_URI; /** * @deprecated Use javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI instead * @return * @throws CloneNotSupportedException */ @Deprecated() public static final String XML_SCHEMA_INSTANCE = XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI; /** * @deprecated Use javax.xml.XMLConstants.XML_NS_URI instead; * @return * @throws CloneNotSupportedException */ @Deprecated() public static final String XML_NAMESPACE_URI = XMLConstants.XML_NS_URI; public static final String XOP = "http://www.w3.org/2004/08/xop/include"; public static final String SWA_URI = "http://ws-i.org/profiles/basic/1.1/xsd"; public static final String XML_MIME_URI = "http://www.w3.org/2005/05/xmlmime"; public static final String JAXB = "http://java.sun.com/xml/ns/jaxb"; }
[ "truongnx25@viettel.com.vn" ]
truongnx25@viettel.com.vn
0c86a17c87970aed2066e4255711ee10efb47be6
acef3734b40f00c3db23455883d2610dfbb41f7e
/spring-web/src/main/java/org/springframework/http/server/reactive/UndertowHttpHandlerAdapter.java
377dba82373ed08bb7a3a8bdfecdf4e0b734e14f
[ "Apache-2.0" ]
permissive
soaryang/spring
50ff0e1b138307aee999c183938150e32aa87a83
dba1b0d3498c07f9bad6a1e856120c4f009c4edc
refs/heads/master
2023-01-07T18:42:41.622736
2020-10-14T17:07:40
2020-10-14T17:07:40
295,474,567
1
0
null
null
null
null
UTF-8
Java
false
false
3,825
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.http.server.reactive; import io.undertow.server.HttpServerExchange; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.reactivestreams.Subscriber; import org.reactivestreams.Subscription; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.HttpMethod; import org.springframework.util.Assert; import java.io.IOException; import java.net.URISyntaxException; /** * Adapt {@link HttpHandler} to the Undertow {@link io.undertow.server.HttpHandler}. * * @author Marek Hawrylczak * @author Rossen Stoyanchev * @author Arjen Poutsma * @since 5.0 */ public class UndertowHttpHandlerAdapter implements io.undertow.server.HttpHandler { private static final Log logger = LogFactory.getLog(UndertowHttpHandlerAdapter.class); private final HttpHandler httpHandler; private DataBufferFactory bufferFactory = new DefaultDataBufferFactory(false); public UndertowHttpHandlerAdapter(HttpHandler httpHandler) { Assert.notNull(httpHandler, "HttpHandler must not be null"); this.httpHandler = httpHandler; } public DataBufferFactory getDataBufferFactory() { return this.bufferFactory; } public void setDataBufferFactory(DataBufferFactory bufferFactory) { Assert.notNull(bufferFactory, "DataBufferFactory must not be null"); this.bufferFactory = bufferFactory; } @Override public void handleRequest(HttpServerExchange exchange) { ServerHttpRequest request = null; try { request = new UndertowServerHttpRequest(exchange, getDataBufferFactory()); } catch (URISyntaxException ex) { if (logger.isWarnEnabled()) { logger.warn("Invalid URL for incoming request: " + ex.getMessage()); } exchange.setStatusCode(400); return; } ServerHttpResponse response = new UndertowServerHttpResponse(exchange, getDataBufferFactory()); if (request.getMethod() == HttpMethod.HEAD) { response = new HttpHeadResponseDecorator(response); } HandlerResultSubscriber resultSubscriber = new HandlerResultSubscriber(exchange); this.httpHandler.handle(request, response).subscribe(resultSubscriber); } private class HandlerResultSubscriber implements Subscriber<Void> { private final HttpServerExchange exchange; public HandlerResultSubscriber(HttpServerExchange exchange) { this.exchange = exchange; } @Override public void onSubscribe(Subscription subscription) { subscription.request(Long.MAX_VALUE); } @Override public void onNext(Void aVoid) { // no-op } @Override public void onError(Throwable ex) { logger.warn("Handling completed with error: " + ex.getMessage()); if (this.exchange.isResponseStarted()) { try { logger.debug("Closing connection"); this.exchange.getConnection().close(); } catch (IOException ex2) { // ignore } } else { logger.debug("Setting response status code to 500"); this.exchange.setStatusCode(500); this.exchange.endExchange(); } } @Override public void onComplete() { logger.debug("Handling completed with success"); this.exchange.endExchange(); } } }
[ "asdasd" ]
asdasd
fc405f2af98b24bfa85c59abd6f8f54e06925ce0
fac5d6126ab147e3197448d283f9a675733f3c34
/src/main/java/com/jakewharton/rxbinding2/widget/AutoValue_TextViewAfterTextChangeEvent.java
59e6b8cfd5425ca848f5d975314f2e8db172fc5c
[]
no_license
KnzHz/fpv_live
412e1dc8ab511b1a5889c8714352e3a373cdae2f
7902f1a4834d581ee6afd0d17d87dc90424d3097
refs/heads/master
2022-12-18T18:15:39.101486
2020-09-24T19:42:03
2020-09-24T19:42:03
294,176,898
0
0
null
2020-09-09T17:03:58
2020-09-09T17:03:57
null
UTF-8
Java
false
false
1,684
java
package com.jakewharton.rxbinding2.widget; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.text.Editable; import android.widget.TextView; final class AutoValue_TextViewAfterTextChangeEvent extends TextViewAfterTextChangeEvent { private final Editable editable; private final TextView view; AutoValue_TextViewAfterTextChangeEvent(TextView view2, @Nullable Editable editable2) { if (view2 == null) { throw new NullPointerException("Null view"); } this.view = view2; this.editable = editable2; } @NonNull public TextView view() { return this.view; } @Nullable public Editable editable() { return this.editable; } public String toString() { return "TextViewAfterTextChangeEvent{view=" + this.view + ", editable=" + ((Object) this.editable) + "}"; } public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof TextViewAfterTextChangeEvent)) { return false; } TextViewAfterTextChangeEvent that = (TextViewAfterTextChangeEvent) o; if (this.view.equals(that.view())) { if (this.editable == null) { if (that.editable() == null) { return true; } } else if (this.editable.equals(that.editable())) { return true; } } return false; } public int hashCode() { return (((1 * 1000003) ^ this.view.hashCode()) * 1000003) ^ (this.editable == null ? 0 : this.editable.hashCode()); } }
[ "michael@districtrace.com" ]
michael@districtrace.com
e1f041e4243c1e8b60ff6c4d3294cb38043f1b76
c21ad8f3f5484bbf7834346bcfa28d6ecc1b14d3
/src/test/java/org/traccar/protocol/BoxProtocolDecoderTest.java
f7197a05d4f147fdfd5f696a33282a3b4a9c30dd
[ "Apache-2.0" ]
permissive
swdreams/traccar
02eaad2cd321f70fb527b058663bc71c16c7411a
3a4935f8e1c1631bb9582d384cdd649f976e72db
refs/heads/master
2020-08-23T21:11:08.174292
2019-10-17T02:51:50
2019-10-17T02:51:50
216,707,034
2
1
Apache-2.0
2019-10-22T02:32:31
2019-10-22T02:32:31
null
UTF-8
Java
false
false
2,552
java
package org.traccar.protocol; import org.junit.Test; import org.traccar.ProtocolTest; public class BoxProtocolDecoderTest extends ProtocolTest { @Test public void testDecode() throws Exception { BoxProtocolDecoder decoder = new BoxProtocolDecoder(null); verifyNull(decoder, text( "H,BT,358281002435893,081028142432,F5813D19,6D6E6DC2")); verifyNull(decoder, text( "H,BT,N878123,080415081234,D63E6DD9,6D6E6DC2,8944100300825505377")); verifyPosition(decoder, text( "L,190416090826,G,21.46701,39.18655,0,280,86.62,53,21;A,0;D,0;T0,34.2;I,0")); verifyPosition(decoder, text( "L,190416090926,G,21.46701,39.18655,0,280,86.62,7,20;A,0;D,0;T0,34.2;I,0;END,106,222,190416080509")); verifyPosition(decoder, text( "L,190227043304,G,25.68773,48.59788,71,53,261.42,1,23;A,0.03;D,0.06;I,0")); verifyPosition(decoder, text( "L,081028142429,G,52.51084,-1.70849,0,170,0,1,0")); verifyPosition(decoder, text( "L,081028142432,G,52.51081,-1.70849,0,203,0,16,0")); verifyNull(decoder, text( "L,080528112501,AI1,145.56")); verifyNull(decoder, text( "E,1")); verifyPosition(decoder, text( "L,150728150130,G,24.68312,46.67526,0,140,0,3,20;A,0;D,0;I,0")); verifyPosition(decoder, text( "L,150728155815,G,24.68311,46.67528,0,140,0,6,21;A,0;D,0;I,0")); verifyPosition(decoder, text( "L,150728155833,G,24.68311,46.67528,11,140,0,52,23;A,0.79;D,0;I,0")); verifyPosition(decoder, text( "L,150728155934,G,24.68396,46.67489,0,282,0.12,1,21;A,1.27;D,1.23;I,0")); verifyPosition(decoder, text( "L,150728160033,G,24.68414,46.67485,0,282,0.12,1,21;A,0;D,0;I,0")); verifyPosition(decoder, text( "L,150728160133,G,24.68388,46.675,0,282,0.12,1,21;A,0;D,0;I,0")); verifyPosition(decoder, text( "L,150728160233,G,24.68377,46.67501,0,282,0.12,1,21;A,0;D,0;I,0")); verifyPosition(decoder, text( "L,150728160333,G,24.684,46.67488,0,282,0.12,1,21;A,0;D,0;I,0")); verifyPosition(decoder, text( "L,150728155855,G,24.68413,46.67482,0,282,0.14,53,21;A,0;D,0;I,0")); verifyPosition(decoder, text( "L,150728160400,G,24.68413,46.67482,0,282,0.14,7,20;A,0;D,0;I,0;END,25,326,150728155814")); } }
[ "anton.tananaev@gmail.com" ]
anton.tananaev@gmail.com
3d01547f5b4102f58869c27e01cf6583a63eff18
e7c4ca6f5b87695b80e22e481f92e2a1756d101a
/src/main/java/com/zlj/zl/user/applicantTypeStatistics/service/ApplicantTypeStatisticsService.java
db313f0c897cc2e4a22e1ac53c1f459893cce387
[]
no_license
hliyufeng/zljpa
5b33571c26527020ea35efa010ad9f2f4056c2d5
ff1f2ef2d5e0304d84285bbd57289a409becede6
refs/heads/master
2020-03-27T08:36:48.222113
2018-06-06T02:43:04
2018-06-06T02:43:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
327
java
package com.zlj.zl.user.applicantTypeStatistics.service; import com.zlj.zl.util.resultJson.ResponseResult; /** * @author ld * @name * @table * @remarks */ public interface ApplicantTypeStatisticsService { ResponseResult<String> exp(String basePath, String outPath, String a, String b, String c) throws Exception; }
[ "xuesemofa@126.com" ]
xuesemofa@126.com
d60cab9feb89fb3ff8f6c6de871b15b0e47edb85
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/32/32_3c8aa25eba966f5c4dd4cec899a85b8039aece5a/AuthRecordPersistenceManager/32_3c8aa25eba966f5c4dd4cec899a85b8039aece5a_AuthRecordPersistenceManager_t.java
492bf2a350170c8ed4473288ab83bb424e3d8a67
[]
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
8,099
java
/* * AuthRecordPersistenceManager.java * * Created on July 1, 2008, 12:31 PM * * To change this template, choose Tools | Template Manager * and open the template in the editor. */ package org.dcache.auth.persistence; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.EntityTransaction; import javax.persistence.Persistence; import java.io.FileInputStream; import java.io.IOException; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.Set; import org.dcache.auth.AuthorizationRecord; import org.dcache.auth.Group; import org.dcache.auth.GroupList; import org.dcache.srm.SRMUser; import org.dcache.srm.SRMUserPersistenceManager; /** * * @author timur */ public class AuthRecordPersistenceManager implements SRMUserPersistenceManager{ private Map<Long,AuthorizationRecord> authRecCache = new HashMap<>(); private static final Logger _logJpa = LoggerFactory.getLogger( AuthRecordPersistenceManager.class); EntityManager em ; public AuthRecordPersistenceManager(String propertiesFile) throws IOException { Properties p = new Properties(); p.load(new FileInputStream(propertiesFile)); EntityManagerFactory emf = Persistence.createEntityManagerFactory("AuthRecordPersistenceUnit",p ); em = emf.createEntityManager(); } public AuthRecordPersistenceManager(String jdbcUrl, String jdbcDriver, String user, String pass) { _logJpa.debug("<init>("+jdbcUrl+","+ jdbcDriver+","+ user+","+ pass+")"); Properties p = new Properties(); p.setProperty("javax.persistence.jdbc.driver", jdbcDriver); p.setProperty("javax.persistence.jdbc.url", jdbcUrl); p.setProperty("javax.persistence.jdbc.user", user); p.setProperty("javax.persistence.jdbc.password", pass); p.setProperty("datanucleus.connectionPoolingType", "BoneCP"); p.setProperty("datanucleus.connectionPool.minPoolSize", "1"); p.setProperty("datanucleus.connectionPool.maxPoolSize", "20"); EntityManagerFactory emf = Persistence.createEntityManagerFactory("AuthRecordPersistenceUnit", p); em = emf.createEntityManager(); } @Override public SRMUser persist(SRMUser user) { if(user instanceof AuthorizationRecord ) { return persist((AuthorizationRecord) user); } throw new IllegalArgumentException("illegal user type: "+user.getClass()); } public synchronized AuthorizationRecord persist(AuthorizationRecord rec) { if(authRecCache.containsKey(rec.getId())) { return authRecCache.get(rec.getId()); } EntityTransaction t = em.getTransaction(); try{ t.begin(); // We assume that gPlazma guaranties that the records with the // same id will be always the same and unchanged, so // if rec is contained in the given entity manager, // no merge is needed if(!em.contains(rec)) { _logJpa.debug("em.contains() returned false"); AuthorizationRecord rec1 = em.find(AuthorizationRecord.class, rec.getId()); if(rec1 == null) { _logJpa.debug("em.find() returned null, persisting"); em.persist(rec); } else { rec = rec1; } } t.commit(); }finally { if (t.isActive()) { t.rollback(); } //em.close(); } if(authRecCache.containsKey(rec.getId())) { return authRecCache.get(rec.getId()); } else { authRecCache.put(rec.getId(),rec); return rec; } } @Override public synchronized AuthorizationRecord find(long id) { if(authRecCache.containsKey(id)) { return authRecCache.get(id); } AuthorizationRecord ar = null; EntityTransaction t = em.getTransaction(); try{ t.begin(); _logJpa.debug(" searching for AuthorizationRecord with id="+id); ar = em.find(AuthorizationRecord.class, id); _logJpa.debug("found AuthorizationRecord="+ar); t.commit(); }finally { if (t.isActive()) { t.rollback(); } //em.close(); } if( ar == null) { return null; } if(authRecCache.containsKey(id)) { return authRecCache.get(id); } else { authRecCache.put(id,ar); return ar; } } public static void main(String[] args) { if(args == null || args.length == 0) { persistTest(); } else { findTest(Long.parseLong(args[0])); } } public static void persistTest() { AuthRecordPersistenceManager pm = new AuthRecordPersistenceManager("jdbc:postgresql://localhost/testjpa", "org.postgresql.Driver","srmdcache",""); Set<String> principals = new HashSet<>(); principals.add("timur@FNAL.GOV"); AuthorizationRecord ar = new AuthorizationRecord(); ar.setId(System.currentTimeMillis()); ar.setHome("/"); ar.setUid(10401); ar.setName("timur"); ar.setIdentity("timur@FNAL.GOV"); ar.setReadOnly(false); ar.setPriority(10); ar.setRoot("/pnfs/fnal.gov/usr"); GroupList gl1 = new GroupList(); gl1.setAuthRecord(ar); Group group11 = new Group(); Group group12 = new Group(); Group group13 = new Group(); group11.setGroupList(gl1); group12.setGroupList(gl1); group13.setGroupList(gl1); group11.setName("Group1"); group11.setGid(1530); group12.setName("Group2"); group12.setGid(1531); group13.setName("Group3"); group13.setGid(1533); List<Group> l1 = new LinkedList<>(); l1.add(group11); l1.add(group12); l1.add(group13); gl1.setAttribute(null); gl1.setGroups(l1); GroupList gl2 = new GroupList(); gl2.setAuthRecord(ar); Group group21 = new Group(); Group group22 = new Group(); group21.setGroupList(gl2); group22.setGroupList(gl2); group21.setName("Group4"); group21.setGid(2530); group22.setName("Group5"); group22.setGid(2530); List<Group> l2 = new LinkedList<>(); l2.add(group21); l2.add(group22); gl2.setAttribute(null); gl2.setGroups(l2); List<GroupList> gll = new LinkedList<>(); gll.add(gl1); gll.add(gl2); ar.setGroupLists(gll); System.out.println("persisting "+ar); pm.persist(ar); System.out.println("persisted successfully "); System.out.println("id="+ar.getId()); } public static void findTest(long id) { AuthRecordPersistenceManager pm = new AuthRecordPersistenceManager("jdbc:postgresql://localhost/testjpa", "org.postgresql.Driver","srmdcache",""); // AuthRecordPersistenceManager pm = // new AuthRecordPersistenceManager("/tmp/pm.properties"); AuthorizationRecord ar = pm.find(id); if(ar == null) { System.out.println("AuthorizationRecord with id="+id +" not found "); } System.out.println(" found "+ar); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e260238c2b9dfe6d0481645cd5938ddd66932007
f249c74908a8273fdc58853597bd07c2f9a60316
/common/src/main/java/cn/edu/cug/cs/gtl/common/impl/IdentifierImpl.java
65718c825851fc5c3f6a84bf276a4350845088c4
[ "MIT" ]
permissive
zhaohhit/gtl-java
4819d7554f86e3c008e25a884a3a7fb44bae97d0
63581c2bfca3ea989a4ba1497dca5e3c36190d46
refs/heads/master
2020-08-10T17:58:53.937394
2019-10-30T03:06:06
2019-10-30T03:06:06
214,390,871
1
0
MIT
2019-10-30T03:06:08
2019-10-11T09:00:26
null
UTF-8
Java
false
false
4,047
java
package cn.edu.cug.cs.gtl.common.impl; import cn.edu.cug.cs.gtl.common.Identifier; import cn.edu.cug.cs.gtl.common.Variant; import org.jetbrains.annotations.NotNull; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.UUID; /** * Created by ZhenwenHe on 2016/12/9. */ class IdentifierImpl implements Identifier { private static final long serialVersionUID = 1135478489292922975L; /* * The most significant 64 bits of this UUID. * * @serial */ private long mostSigBits; /* * The least significant 64 bits of this UUID. * * @serial */ private long leastSigBits; public IdentifierImpl() { this.leastSigBits = 0; this.mostSigBits = 0; } public IdentifierImpl(long leastSigBits) { this.leastSigBits = leastSigBits; this.mostSigBits = 0; } /** * Constructs a new {@code IdentifierImpl} using the specified data. {@code * mostSigBits} is used for the most significant 64 bits of the {@code * IdentifierImpl} and {@code leastSigBits} becomes the least significant 64 bits of * the {@code IdentifierImpl}. * * @param mostSigBits The most significant bits of the {@code IdentifierImpl} * @param leastSigBits The least significant bits of the {@code IdentifierImpl} */ public IdentifierImpl(long mostSigBits, long leastSigBits) { this.mostSigBits = mostSigBits; this.leastSigBits = leastSigBits; } @Override public long longValue() { return leastSigBits; } @Override public long highValue() { return this.mostSigBits; } @Override public long lowValue() { return this.leastSigBits; } @Override public int intValue() { return (int) leastSigBits; } @Override public Object clone() { return new IdentifierImpl(this.leastSigBits, this.mostSigBits); } @Override public boolean load(DataInput dis) throws IOException { this.leastSigBits = dis.readLong(); this.mostSigBits = dis.readLong(); return true; } @Override public boolean store(DataOutput dos) throws IOException { dos.writeLong(this.leastSigBits); dos.writeLong(this.mostSigBits); return true; } @Override public long getByteArraySize() { return 16; } @Override public String toString() { return new UUID(this.leastSigBits, this.mostSigBits).toString(); } @Override public void reset(long leastSigBits) { this.leastSigBits = leastSigBits; this.mostSigBits = 0; } @Override public void reset(long mostSigBits, long leastSigBits) { this.mostSigBits = mostSigBits; this.leastSigBits = leastSigBits; } @Override public void copyFrom(Object i) { if (i instanceof Identifier) { this.leastSigBits = ((Identifier) i).lowValue(); this.mostSigBits = ((Identifier) i).highValue(); } } @Override public void increase() { if (this.leastSigBits == Long.MAX_VALUE) { ++this.mostSigBits; } else ++this.leastSigBits; } @Override public byte byteValue() { return (byte) this.leastSigBits; } @Override public short shortValue() { return (short) this.leastSigBits; } @Override public int compare(Identifier i) { return compareTo(i); } @Override public int compareTo(@NotNull Identifier o) { if (this.highValue() > o.highValue()) return 1; else { if (this.highValue() == o.highValue()) { if (this.lowValue() > o.lowValue()) return 1; else if (this.lowValue() == o.lowValue()) return 0; else return -1; } else { return -1; } } } }
[ "zwhe@cug.edu.cn" ]
zwhe@cug.edu.cn
84d3a8bd11c0370bbcec4c3e007e0d7c856114d6
2c6a3d4d9da8170e67a0285e574f1beced13b6d9
/Leetcode/src/Chapter0_其他/Q949_给定数组能生成的最大时间/Solution.java
eb6a2d488560bb1c00206a4c5157f7cca9a39aba
[]
no_license
zhengruyi/PracticingCode
08b80455d4df7041565b87b9fbff33c5b34c1e0e
0a2c5a33d487c9e2588d7956d46a578cf4716374
refs/heads/master
2023-04-12T12:32:20.192159
2021-04-25T14:38:19
2021-04-25T14:38:19
302,980,051
0
0
null
null
null
null
UTF-8
Java
false
false
1,142
java
package Chapter0_其他.Q949_给定数组能生成的最大时间; /** * @author Ruyi ZHENG * @version 1.00 * @time 25/12/2020 00:38 **/ public class Solution { /** * 由于最多只有四个数字,所以可以直接暴力搜索,判断有效性,取出最大值 * @param arr * @return */ public String largestTimeFromDigits(int[] arr) { int len = arr.length; int max = -1; for(int i = 0; i < len; i++){ for(int j = 0; j < len; j++){ if(j == i){ continue; } for(int k = 0; k < len; k++){ if(k == i || k == j){ continue; } int l = 6 - i - k - j; int hours = arr[i] * 10 + arr[j]; int minute = arr[k] * 10 + arr[l]; if(hours < 24 && minute < 60){ max = Math.max(max,hours*60 + minute); } } } } return max == -1 ? "" : String.format("%02d:%02d",max/60 , max % 60); } }
[ "standonthpeak@gmail.com" ]
standonthpeak@gmail.com
96c2f99c40a357c27fd5393b79be599f3d82dc36
71119db8c548c4ece4453c22c114564022c7c326
/src/main/java/com/mcjty/rftools/dimension/world/WorldGenerationTools.java
8fdb5f2a13264877fd56fe617a4d144b4268d4e5
[ "MIT" ]
permissive
a-rat-girl/RFTools
c6be546fe95b07e9c24120e78eecdb4fcc14de89
273314d881ef5031a4dc24224de951fc71a3a60a
refs/heads/master
2021-05-28T05:34:17.312645
2015-03-11T23:43:27
2015-03-11T23:43:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,461
java
package com.mcjty.rftools.dimension.world; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.world.World; public class WorldGenerationTools { public static int findSuitableEmptySpot(World world, int x, int z) { int y = world.getTopSolidOrLiquidBlock(x, z); if (y == -1) { return -1; } y--; // y should now be at a solid or liquid block. if (y > world.getHeight() - 5) { y = world.getHeight() / 2; } Block block = world.getBlock(x, y+1, z); while (block.getMaterial().isLiquid()) { y++; if (y > world.getHeight()-10) { return -1; } block = world.getBlock(x, y+1, z); } return y; } // Return true if this block is solid. public static boolean isSolid(World world, int x, int y, int z) { if (world.isAirBlock(x, y, z)) { return false; } Block block = world.getBlock(x, y, z); return block.getMaterial().blocksMovement(); } // Starting at the current height, go down and fill all air blocks with stone until a // non-air block is encountered. public static void fillEmptyWithStone(World world, int x, int y, int z) { while (y > 0 && !isSolid(world, x, y, z)) { world.setBlock(x, y, z, Blocks.stone, 0, 2); y--; } } }
[ "mcjty1@gmail.com" ]
mcjty1@gmail.com
3a05c64b91c24eb6244aa3bbb2b76a2da8cdd95b
734c0f245ee0b584a1a4a2f9fa9fc07df3af034b
/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java
f04edfa13eac763bfa46f84094f62d52e7e022fe
[ "LicenseRef-scancode-warranty-disclaimer", "Apache-2.0" ]
permissive
eug48/hapi-fhir
449d457579b7afb3930a2bc5aabc8d038bae66c3
5d3a985ae1b198e09c33e15f7cefe3ceebcdb729
refs/heads/master
2021-01-21T12:16:05.481620
2017-08-01T05:28:11
2017-08-17T02:55:18
91,784,555
1
0
null
2017-05-19T08:34:08
2017-05-19T08:34:08
null
UTF-8
Java
false
false
2,339
java
package ca.uhn.fhir.cli; import java.util.Collections; import java.util.List; import org.hl7.fhir.r4.model.CodeSystem; import org.hl7.fhir.r4.model.StructureDefinition; import org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent; import org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent; import org.hl7.fhir.instance.model.api.IBaseResource; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.api.ServerValidationModeEnum; import ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException; public class LoadingValidationSupportR4 implements org.hl7.fhir.r4.hapi.ctx.IValidationSupport { private FhirContext myCtx = FhirContext.forR4(); private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(LoadingValidationSupportR4.class); @Override public ValueSetExpansionComponent expandValueSet(FhirContext theContext, ConceptSetComponent theInclude) { return null; } @Override public CodeSystem fetchCodeSystem(FhirContext theContext, String theSystem) { return null; } @Override public <T extends IBaseResource> T fetchResource(FhirContext theContext, Class<T> theClass, String theUri) { String resName = myCtx.getResourceDefinition(theClass).getName(); ourLog.info("Attempting to fetch {} at URL: {}", resName, theUri); myCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER); IGenericClient client = myCtx.newRestfulGenericClient("http://example.com"); T result; try { result = client.read(theClass, theUri); } catch (BaseServerResponseException e) { throw new CommandFailureException("FAILURE: Received HTTP " + e.getStatusCode() + ": " + e.getMessage()); } ourLog.info("Successfully loaded resource"); return result; } @Override public StructureDefinition fetchStructureDefinition(FhirContext theCtx, String theUrl) { return null; } @Override public boolean isCodeSystemSupported(FhirContext theContext, String theSystem) { return false; } @Override public CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay) { return null; } @Override public List<StructureDefinition> fetchAllStructureDefinitions(FhirContext theContext) { return Collections.emptyList(); } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
e2de72fd2fbc925fa09f8a886da183218b3ff5f0
801ea23bf1e788dee7047584c5c26d99a4d0b2e3
/com/planet_ink/coffee_mud/Abilities/Skills/Skill_Arrest.java
554062cc1853fe7a0c7fa49d7c56ef3893b0006b
[ "Apache-2.0" ]
permissive
Tearstar/CoffeeMud
61136965ccda651ff50d416b6c6af7e9a89f5784
bb1687575f7166fb8418684c45f431411497cef9
refs/heads/master
2021-01-17T20:23:57.161495
2014-10-18T08:03:37
2014-10-18T08:03:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,348
java
package com.planet_ink.coffee_mud.Abilities.Skills; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2005-2014 Bo Zimmerman 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. */ @SuppressWarnings({"unchecked","rawtypes"}) public class Skill_Arrest extends StdSkill { @Override public String ID() { return "Skill_Arrest"; } private final static String localizedName = CMLib.lang().L("Arrest"); @Override public String name() { return localizedName; } @Override public String displayText(){ return "";} @Override protected int canAffectCode(){return 0;} @Override protected int canTargetCode(){return CAN_MOBS;} @Override public int abstractQuality(){return Ability.QUALITY_OK_OTHERS;} private static final String[] triggerStrings =I(new String[] {"ARREST"}); @Override public String[] triggerStrings(){return triggerStrings;} @Override public int usageType(){return USAGE_MOVEMENT;} @Override public int classificationCode() { return Ability.ACODE_SKILL|Ability.DOMAIN_LEGAL; } public static List<LegalWarrant> getWarrantsOf(MOB target, Area legalA) { LegalBehavior B=null; if(legalA!=null) B=CMLib.law().getLegalBehavior(legalA); List<LegalWarrant> warrants=new Vector(); if(B!=null) { warrants=B.getWarrantsOf(legalA,target); for(int i=warrants.size()-1;i>=0;i--) { final LegalWarrant W=warrants.get(i); if(W.crime().equalsIgnoreCase("pardoned")) warrants.remove(i); } } return warrants; } public void makePeace(Room R, MOB mob, MOB target) { if(R==null) return; for(int i=0;i<R.numInhabitants();i++) { final MOB inhab=R.fetchInhabitant(i); if((inhab!=null)&&(inhab.isInCombat())) { if(inhab.getVictim()==mob) inhab.makePeace(); if(inhab.getVictim()==target) inhab.makePeace(); } } } @Override public boolean invoke(MOB mob, Vector commands, Physical givenTarget, boolean auto, int asLevel) { final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; if((mob==target)&&(!auto)) { mob.tell(L("You can not arrest yourself.")); return false; } if(Skill_Arrest.getWarrantsOf(target, CMLib.law().getLegalObject(mob.location().getArea())).size()==0) { mob.tell(L("@x1 has no warrants out here.",target.name(mob))); return false; } // the invoke method for spells receives as // parameters the invoker, and the REMAINING // command line parameters, divided into words, // and added as String objects to a vector. if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; if(!auto) { if(mob.baseWeight()<(target.baseWeight()-450)) { mob.tell(L("@x1 is way to big for you!",target.name(mob))); return false; } } int levelDiff=target.phyStats().level()-(mob.phyStats().level()+(2*super.getXLEVELLevel(mob))); if(levelDiff>0) levelDiff=levelDiff*3; else levelDiff=0; levelDiff-=(abilityCode()*mob.charStats().getStat(CharStats.STAT_STRENGTH)); // now see if it worked final boolean success=proficiencyCheck(mob,(-levelDiff)+(-((target.charStats().getStat(CharStats.STAT_STRENGTH)-mob.charStats().getStat(CharStats.STAT_STRENGTH)))),auto); if(success) { Ability A=CMClass.getAbility("Skill_ArrestingSap"); if(A!=null) { A.setProficiency(100); A.setAbilityCode(10); A.invoke(mob,target,true,0); } if(CMLib.flags().isSleeping(target)) { makePeace(mob.location(),mob,target); A=target.fetchEffect("Skill_ArrestingSap"); if(A!=null)A.unInvoke(); A=CMClass.getAbility("Skill_HandCuff"); if(A!=null) A.invoke(mob,target,true,0); makePeace(mob.location(),mob,target); mob.tell(L("You'll have to PULL @x1 to the judge now before he gets out of the cuffs.",target.charStats().himher())); } } else return beneficialVisualFizzle(mob,target,L("<S-NAME> rear(s) back and attempt(s) to knock <T-NAMESELF> out, but fail(s).")); // return whether it worked return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
eef92c84c1e8ad875db7807332ed0271d9d3df3f
d149c8e99189b9b6d3abf9f806fe7d4d60d3af3e
/QcConnection/src/main/java/com/cognizant/cognizantits/qcconnection/qcupdation/ICoverableReq.java
508bfe8f2cb918e6cf5efa66421a1b7c86a3681c
[ "Apache-2.0" ]
permissive
CognizantQAHub/Cognizant-Intelligent-Test-Scripter
f7e3733b0b76e5e006e40164172b197103e8996c
828506dbc5bc1e6ff78bfe75e6871b29c6a9ad33
refs/heads/master
2023-04-30T11:26:49.347645
2023-04-20T06:44:15
2023-04-20T06:44:15
91,552,889
98
102
Apache-2.0
2021-11-09T06:56:10
2017-05-17T08:34:28
Java
UTF-8
Java
false
false
960
java
package com.cognizant.cognizantits.qcconnection.qcupdation; import com4j.Com4jObject; import com4j.DISPID; import com4j.IID; import com4j.NativeType; import com4j.ReturnValue; import com4j.VTID; @IID("{F061ABB7-A65F-4146-8621-5A8B04C87B8D}") public abstract interface ICoverableReq extends Com4jObject { @DISPID(1) @VTID(7) @ReturnValue(type=NativeType.Dispatch) public abstract Com4jObject requirementCoverageFactory(); @DISPID(2) @VTID(8) public abstract void addTestInstanceToCoverage(int paramInt); @DISPID(3) @VTID(9) public abstract void addTestToCoverage(int paramInt); @DISPID(4) @VTID(10) public abstract void addTestsFromTestSetToCoverage(int paramInt, String paramString); @DISPID(5) @VTID(11) public abstract void addSubjectToCoverage(int paramInt, String paramString); } /* Location: D:\Prabu\jars\QC.jar * Qualified Name: qcupdation.ICoverableReq * JD-Core Version: 0.7.0.1 */
[ "phystem2@gmail.com" ]
phystem2@gmail.com
a94167ed80db82070bb7e3823b4a68c8cdc75f0b
c9106c1642f6d7bf30ff5f21237ee07007c015aa
/PracticalTest01Var08/app/src/main/java/ro/pub/cs/systems/eim/practicaltest01Var08/PracticalTest01Var08MainActivity.java
9b1bb17ef57582067f58e4bd552e80ce9fc94e5d
[ "Apache-2.0" ]
permissive
StefanAlexandruAldoiu/PracticalTest01Var08
0412ae3e57e13ca410ca93d8acd64a4c17b80577
bce39ec40cdc0c9204e0c69b823c06abab02e144
refs/heads/master
2021-01-19T00:20:57.699617
2017-04-04T08:39:39
2017-04-04T08:39:39
87,158,504
0
0
null
null
null
null
UTF-8
Java
false
false
3,846
java
package ro.pub.cs.systems.eim.practicaltest01Var08; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.ImageButton; import android.widget.Toast; public class PracticalTest01Var08MainActivity extends AppCompatActivity { private EditText b1; private EditText b2; private EditText b3; private EditText b4; private Button set; private ContactsImageButtonClickListener contactsImageButtonClickListener = new ContactsImageButtonClickListener(); private class ContactsImageButtonClickListener implements View.OnClickListener { @Override public void onClick(View view) { String s1 = b1.getText().toString(); String s2 = b2.getText().toString(); String s3 = b3.getText().toString(); String s4 = b4.getText().toString(); String sa = s1 + s2+ s3+ s4; if (s1.length() > 0 && s3.length() > 0 && s2.length() > 0 && s4.length() > 0) { Intent intent = new Intent("ro.pub.cs.systems.eim.practicatest01Var08.intent.action.PracticalTest01Var08SecondaryActivity"); //intent.putExtra("ro.pub.cs.systems.eim.lab04.contactsmanager.PHONE_NUMBER_KEY", sa); startActivityForResult(intent, 2017); } } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_practical_test01_var08_main); b1= (EditText)findViewById(R.id.editText1); b2= (EditText)findViewById(R.id.editText2); b3= (EditText)findViewById(R.id.editText3); b4= (EditText)findViewById(R.id.editText4); set = (Button)findViewById(R.id.button5); set.setOnClickListener(contactsImageButtonClickListener); } @Override public void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); b1= (EditText)findViewById(R.id.editText1); b2= (EditText)findViewById(R.id.editText2); b3= (EditText)findViewById(R.id.editText3); b4= (EditText)findViewById(R.id.editText4); savedInstanceState.putString("USERNAME_EDIT_TEXT1", b1.getText().toString()); savedInstanceState.putString("USERNAME_EDIT_TEXT2", b2.getText().toString()); savedInstanceState.putString("USERNAME_EDIT_TEXT3", b3.getText().toString()); savedInstanceState.putString("USERNAME_EDIT_TEXT4", b4.getText().toString()); } @Override public void onRestoreInstanceState(Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); if (savedInstanceState.containsKey("USERNAME_EDIT_TEXT1")) { b1= (EditText)findViewById(R.id.editText1); b1.setText(savedInstanceState.getString("USERNAME_EDIT_TEXT1")); } if (savedInstanceState.containsKey("USERNAME_EDIT_TEXT2")) { b2= (EditText)findViewById(R.id.editText2); b2.setText(savedInstanceState.getString("USERNAME_EDIT_TEXT2")); } if (savedInstanceState.containsKey("USERNAME_EDIT_TEXT3")) { b3= (EditText)findViewById(R.id.editText3); b3.setText(savedInstanceState.getString("USERNAME_EDIT_TEXT3")); } if (savedInstanceState.containsKey("USERNAME_EDIT_TEXT4")) { b4= (EditText)findViewById(R.id.editText4); b4.setText(savedInstanceState.getString("USERNAME_EDIT_TEXT4")); } } }
[ "student@cti.pub.ro" ]
student@cti.pub.ro
46441264108450b282c3770277714504ef6df9fc
6fdbf1017ad75a333491b032a2952e724aeaee3e
/spring-cloud-alibaba-learning/sentinel/hystrix-sample/src/main/java/com/binarylei/hystrix/controller/HystrixApiController.java
94764f48abbd5a2c977d759802263ee5869e40ab
[]
no_license
binarylei/spring-learning
077f33a1e1cbf1c1a2428e453b55cd3ee3761edf
8696bd44db2e8c709b8b297c2a54dd9c56e35084
refs/heads/master
2020-04-21T11:08:21.165789
2019-12-26T11:51:43
2019-12-26T11:51:48
169,511,875
0
0
null
null
null
null
UTF-8
Java
false
false
1,681
java
package com.binarylei.hystrix.controller; import com.netflix.hystrix.HystrixCommand; import com.netflix.hystrix.HystrixCommandGroupKey; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.concurrent.Callable; /** * @author leigang * @version 2019-03-20 */ @RestController public class HystrixApiController { private Logger logger = LoggerFactory.getLogger(this.getClass()); @GetMapping("hystrix/api") public String hystrix(@RequestParam int costTime) throws InterruptedException { HystrixApiCommand command = new HystrixApiCommand("MyHystrixApiCommand", () -> { Thread.sleep(costTime); logger.info("hystrix info"); return "sleep: " + costTime + " ms"; }); return command.execute(); } // 超时时间为100ms public class HystrixApiCommand extends HystrixCommand<String> { private String name; private Callable<String> callable; public HystrixApiCommand(String name, Callable<String> callable) { super(HystrixCommandGroupKey.Factory.asKey("ExampleGroup"), 100); this.name = name; this.callable = callable; } @Override protected String run() { try { return callable.call(); } catch (Exception e) { return null; } } @Override protected String getFallback() { return "Fallback"; } } }
[ "binarylei@qq.com" ]
binarylei@qq.com
3280e528624aed37a56c32dd8683b7436bcce41c
30069d60dbdb93c3e0eabe82806e112a6677facf
/vasco/src/main/java/org/mpi/vasco/util/crdtlib/dbannotationtypes/dbutil/CrdtDataFieldType.java
3733c6263780a81b7c0d086b7121198f7361dd9e
[]
no_license
pandaworrior/VascoRepo
31b7af0d14848850acb47282b906cedabd554e21
e7139a3a5c7400a242437b323ddf00726b28e3ff
refs/heads/master
2021-01-10T05:22:47.827866
2019-04-18T11:31:25
2019-04-18T11:31:25
36,298,032
3
1
null
2020-10-13T10:05:26
2015-05-26T13:34:42
Java
UTF-8
Java
false
false
1,168
java
/* * This class defines a set of types of CRDT */ package org.mpi.vasco.util.crdtlib.dbannotationtypes.dbutil; // TODO: Auto-generated Javadoc /** * The Enum CrdtDataFieldType. */ public enum CrdtDataFieldType { // data fields /** The noncrdtfield. */ NONCRDTFIELD, /** The normalinteger. */ NORMALINTEGER, /** The normallong */ NORMALLONG, /** The normalfloat. */ NORMALFLOAT, /** The normaldouble. */ NORMALDOUBLE, /** The normalstring. */ NORMALSTRING, /** The normaldatetime. */ NORMALDATETIME, /** The normalboolean. */ NORMALBOOLEAN, /** The lwwinteger. */ LWWINTEGER, /** The lwwlong */ LWWLONG, /** The lwwfloat. */ LWWFLOAT, /** The lwwdouble. */ LWWDOUBLE, /** The lwwstring. */ LWWSTRING, /** The lwwdatetime. */ LWWDATETIME, /** The lwwboolean. */ LWWBOOLEAN, /** The lwwdeletedflag. */ LWWDELETEDFLAG, /** The lwwlogicaltimestamp. */ LWWLOGICALTIMESTAMP, /** The numdeltainteger. */ NUMDELTAINTEGER, /** The numdeltafloat. */ NUMDELTAFLOAT, /** The numdeltadouble. */ NUMDELTADOUBLE, /** The numdeltadatetime. */ NUMDELTADATETIME }
[ "chenglinkcs@gmail.com" ]
chenglinkcs@gmail.com
15d96d15ad148299206ede5615918704aa94e06a
091fc3f3ed9214451dbb61fbf846ac1c2a425b8e
/MallBase/src/main/java/mall/base/dao/GoodskindMapper.java
091da4578763d5b8d093e1e6614524511f9737b9
[]
no_license
MyAuntIsPost90s/Mall
8986e2c779182cbcafb7b7dae24042497bfa9e00
aa99c0f336574a7fa6a01d80ef36abf3f7010b3d
refs/heads/master
2021-06-19T15:05:20.298497
2020-12-16T07:01:24
2020-12-16T07:01:24
130,691,986
0
0
null
null
null
null
UTF-8
Java
false
false
172
java
package mall.base.dao; import com.ch.common.mybatis.BaseMapper; import mall.base.model.Goodskind; public interface GoodskindMapper extends BaseMapper<Goodskind> { }
[ "1126670571@qq.com" ]
1126670571@qq.com
dc921cfe1db69ca98017d36081058130b19dc57a
a5d1355228908daf110db93a8641f212f5e9fbb1
/src/test/java/gov/va/oit/vistaevolution/mailman/ws/xmxapi/endpoints/XMXAPICre8XMZIT.java
e5cbf91c784480fd79408a0e1c6a38197c2e2b6f
[]
no_license
MillerTom/Evolution
24d10c0cad9887fcfeee5266a69fa9d98df66334
448a3136fa2205c12f135a432f7912317195482a
refs/heads/master
2016-08-12T16:56:18.896488
2016-01-01T01:53:03
2016-01-01T01:53:03
48,867,152
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
3,931
java
package gov.va.oit.vistaevolution.mailman.ws.xmxapi.endpoints; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import gov.va.oit.vistaevolution.mailman.ws.xmxapi.endpoints.interfaces.XMXAPICre8XMZEndpoint; import gov.va.oit.vistaevolution.mailman.ws.xmxapi.model.XMXAPICre8XMZRequest; import gov.va.oit.vistaevolution.mailman.ws.xmxapi.model.XMXAPICre8XMZResponse; import gov.va.oit.vistaevolution.utils.vistalink.EvolutionIT; import gov.va.oit.vistaevolution.ws.faults.VistaWebServiceFault; import org.apache.log4j.Logger; import org.junit.Before; import org.junit.Test; public class XMXAPICre8XMZIT extends EvolutionIT<XMXAPICre8XMZEndpoint> { private static final Logger LOGGER = Logger .getLogger(XMXAPICre8XMZIT.class); private XMXAPICre8XMZRequest request; @Override protected Class<XMXAPICre8XMZEndpoint> getType() { return XMXAPICre8XMZEndpoint.class; } @Before public void setUp() { request = new XMXAPICre8XMZRequest(); } /** * <em>Create a message stub with the given subject.</em> * * <pre> * Input Data: * >Set SUBJ=”ZZEVO Test Subject CRE8XMZ” * * Procedure Call: * * >D CRE8XMZ^XMWSOA08(.DATA,SUBJ) * * Expected Output: * * >ZW DATA * DATA=283527 * * </pre> */ @Test public void testCreateMessageStubWithSubject() throws VistaWebServiceFault { request.setXmSubj("ZZEVO Test Subject CRE8XMZ"); LOGGER.debug(request); XMXAPICre8XMZResponse response = service.cre8Xmz(request); LOGGER.debug(response); assertNotNull(response.getMessageNumber()); } /** * <em>Create a message stub with the given subject empty.</em> * * <pre> * Input Data: * >Set SUBJ=”” * * Procedure Call: * * >D CRE8XMZ^XMWSOA08(.DATA,SUBJ) * * Expected Output: * * >ZW DATA * DATA=283530 * </pre> */ @Test public void testCreateMessageStubWithEmptySubject() throws Exception { request.setXmSubj(""); LOGGER.debug(request); XMXAPICre8XMZResponse response = service.cre8Xmz(request); LOGGER.debug(response); assertNotNull(response.getMessageNumber()); } /** * <em>Try to create a message stub with the given subject that is under 3 characters.</em> * * <pre> * Input Data: * >Set SUBJ=”AA” * * Procedure Call: * * >D CRE8XMZ^XMWSOA08(.DATA,SUBJ) * * Expected Output: * * >ZW DATA * DATA="-1^Subject must be from 3 to 65 characters long." * </pre> */ @Test public void testCreateMessageStubWithShortSubject() throws Exception { String expectedOutput = "-1^Subject must be from 3 to 65 characters long."; request.setXmSubj("AA"); LOGGER.debug(request); XMXAPICre8XMZResponse response = service.cre8Xmz(request); LOGGER.debug(response); assertEquals(expectedOutput.split("\\^")[1], response.getErrors() .get(0)); } /** * <em> Try to create a message stub with the given subject that is over 65 characters.</em> * * <pre> * Input Data: * >Set SUBJ=””,$P(SUBJ,”B”,66)=”A” * * Procedure Call: * * >D CRE8XMZ^XMWSOA08(.DATA,SUBJ) * * Expected Output: * * >ZW DATA * DATA="-1^Subject must be from 3 to 65 characters long." * </pre> * * @throws Exception */ @Test public void testCreateMessageStubWithLongSubject() throws Exception { String expectedOutput = "-1^Subject must be from 3 to 65 characters long."; request.setXmSubj("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); LOGGER.debug(request); XMXAPICre8XMZResponse response = service.cre8Xmz(request); LOGGER.debug(response); assertEquals(expectedOutput.split("\\^")[1], response.getErrors() .get(0)); } }
[ "tom.a.miller@gmail.com" ]
tom.a.miller@gmail.com
e7852fef9cad0f3ad14eec7e78693a43f15e98d7
e23fa8657944dfb939848c09a4dfdce006b76e3e
/src/main/java/framework/lightning/CheckBoxButtonGroup.java
57a39d0aca5da7eb9cdadbaa68a724353f0f9bfd
[]
no_license
kureem/archnet
8c85a8213faa70454b0318347d3a66a0d7e26254
06ad6d4044d508c2d7b82b1e2cbd110a904c0007
refs/heads/master
2021-09-12T02:07:34.362889
2018-04-13T14:20:22
2018-04-13T14:20:22
105,303,298
1
0
null
null
null
null
UTF-8
Java
false
false
394
java
package framework.lightning; import framework.JSContainer; public class CheckBoxButtonGroup extends JSContainer { public CheckBoxButtonGroup(String name) { super(name, "div"); addClass("slds-checkbox_button-group"); } public CheckBoxButtonGroup addCheckBoxButton(CheckBox btn) { btn.setAttribute("class", "slds-button slds-checkbox_button"); addChild(btn); return this; } }
[ "kureem@gmail.com" ]
kureem@gmail.com
85afc8c85c7e0769a581b2dd9696b614c5531973
320a43287196b09eb160137a33a22312e6677c6a
/cf-forgot-spring/cf-dependency-injection/src/main/java/org/geekbang/thinking/in/spring/dependency/injection/AnnotationDependencyFieldInjectionDemo.java
e0a0798154476183be9811e5009ac5330995f552
[]
no_license
yangzw137/cf-forgot-java
050a389069d5da0b294f2511755798e68ebd9a8a
7b23eefaa1e58790eef81367779b6eece2f94ecb
refs/heads/master
2023-05-14T05:44:43.899461
2021-06-06T03:05:58
2021-06-06T03:05:58
287,706,495
0
2
null
null
null
null
UTF-8
Java
false
false
1,726
java
package org.geekbang.thinking.in.spring.dependency.injection; import org.geekbang.thinking.in.spring.ioc.overview.domain.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import javax.annotation.Resource; /** * Description: * <p> * @date 2020/9/13 * @since */ public class AnnotationDependencyFieldInjectionDemo { @Autowired private UserHolder userHolder1; @Resource private UserHolder userHolder2; public static void main(String[] args) { AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(); XmlBeanDefinitionReader xmlBeanDefinitionReader = new XmlBeanDefinitionReader(applicationContext); String location = "classpath:/META-INF/dependency-lookup-context.xml"; xmlBeanDefinitionReader.loadBeanDefinitions(location); applicationContext.register(AnnotationDependencyFieldInjectionDemo.class); applicationContext.refresh(); AnnotationDependencyFieldInjectionDemo demo = applicationContext.getBean(AnnotationDependencyFieldInjectionDemo.class); System.out.println("userHolder: " + demo.userHolder1); System.out.println("userHolder: " + demo.userHolder2); System.out.println(demo.userHolder1 == demo.userHolder2); applicationContext.close(); } @Bean public UserHolder userHolder(User user) { UserHolder userHolder = new UserHolder(); userHolder.setUser(user); return userHolder; } }
[ "yangzhiwei@jd.com" ]
yangzhiwei@jd.com
cd0a16869df0c3ae5a2a6af2570f727851242aff
92f988f2986f35661d7b7e1e3e4fbefce2ebf8c8
/Mage.Sets/src/mage/sets/battleforzendikar/CarrierThrall.java
a3097ea8114903286123663a1d98240662fc111d
[]
no_license
Poddo/mage
78591678b5a5ffd7a18bea53dd24f5ef9d7cf455
87bf0e746cbedd2371c104b5d1ad2b3390f60f93
refs/heads/master
2020-12-26T03:43:26.912434
2015-12-15T18:04:02
2015-12-15T18:04:02
47,459,631
0
0
null
2015-12-05T14:48:49
2015-12-05T14:48:48
null
UTF-8
Java
false
false
3,124
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ package mage.sets.battleforzendikar; import java.util.UUID; import mage.MageInt; import mage.abilities.common.DiesTriggeredAbility; import mage.abilities.effects.Effect; import mage.abilities.effects.common.CreateTokenEffect; import mage.cards.CardImpl; import mage.constants.CardType; import mage.constants.Rarity; import mage.game.permanent.token.EldraziScionToken; /** * * @author LevelX2 */ public class CarrierThrall extends CardImpl { public CarrierThrall(UUID ownerId) { super(ownerId, 106, "Carrier Thrall", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.expansionSetCode = "BFZ"; this.subtype.add("Vampire"); this.power = new MageInt(2); this.toughness = new MageInt(1); // When Carrier Thrall dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature. Add {1} to your mana pool." Effect effect = new CreateTokenEffect(new EldraziScionToken()); effect.setText("put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has \"Sacrifice this creature: Add {1} to your mana pool.\""); this.addAbility(new DiesTriggeredAbility(effect, false)); } public CarrierThrall(final CarrierThrall card) { super(card); } @Override public CarrierThrall copy() { return new CarrierThrall(this); } }
[ "ludwig.hirth@online.de" ]
ludwig.hirth@online.de
0f7ad123fb8c64e4c21df7ce18f4c7a3c9f29cb6
edf0fa41fe934a1f92cf010c5c82bb87dd9ae246
/app/src/main/java/com/indiasupply/isdental/dialog/EventFloorPlanDialogFragment.java
5c1aedfc8ed6a77426ff04e97b97ca9846b08c95
[]
no_license
kammy92/ISDental2
8217d742478dedb0662930b4cce4336b9ab7416a
fe9d085b7a2f5bf52e9b4acb9c8cd36961c186e9
refs/heads/master
2021-05-23T05:50:24.677361
2018-06-06T07:28:58
2018-06-06T07:28:58
94,964,047
0
1
null
null
null
null
UTF-8
Java
false
false
6,521
java
package com.indiasupply.isdental.dialog; import android.app.Dialog; import android.app.DialogFragment; import android.content.DialogInterface; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; import android.support.v4.content.ContextCompat; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.TextView; import com.davemorrissey.labs.subscaleview.ImageSource; import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView; import com.indiasupply.isdental.R; import com.indiasupply.isdental.helper.DatabaseHandler; import com.indiasupply.isdental.utils.AppConfigTags; import com.indiasupply.isdental.utils.Utils; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URL; public class EventFloorPlanDialogFragment extends DialogFragment { ImageView ivCancel; TextView tvTitle; SubsamplingScaleImageView ivFloorPlan; String eventFloorPlan; int event_id; ProgressBar progressBar; Bitmap bitmap; DatabaseHandler db; public static EventFloorPlanDialogFragment newInstance (int event_id, String eventFloorPlan) { EventFloorPlanDialogFragment fragment = new EventFloorPlanDialogFragment (); Bundle args = new Bundle (); args.putInt (AppConfigTags.EVENT_ID, event_id); args.putString (AppConfigTags.EVENT_FLOOR_PLAN, eventFloorPlan); fragment.setArguments (args); return fragment; } @Override public void onCreate (Bundle savedInstanceState) { super.onCreate (savedInstanceState); setStyle (DialogFragment.STYLE_NORMAL, R.style.AppTheme); } @Override public void onActivityCreated (Bundle arg0) { super.onActivityCreated (arg0); Window window = getDialog ().getWindow (); window.getAttributes ().windowAnimations = R.style.DialogAnimation; if (Build.VERSION.SDK_INT >= 21) { window.clearFlags (WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); window.addFlags (WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.setStatusBarColor (ContextCompat.getColor (getActivity (), R.color.text_color_white)); } } @Override public void onResume () { super.onResume (); getDialog ().setOnKeyListener (new DialogInterface.OnKeyListener () { @Override public boolean onKey (DialogInterface dialog, int keyCode, KeyEvent event) { if ((keyCode == KeyEvent.KEYCODE_BACK)) { //This is the filter if (event.getAction () != KeyEvent.ACTION_UP) return true; else { getDialog ().dismiss (); //Hide your keyboard here!!!!!! return true; // pretend we've processed it } } else return false; // pass on to be processed as normal } }); } @Override public void onStart () { super.onStart (); Dialog d = getDialog (); if (d != null) { int width = ViewGroup.LayoutParams.MATCH_PARENT; int height = ViewGroup.LayoutParams.MATCH_PARENT; d.getWindow ().setLayout (width, height); } } @Override public View onCreateView (LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = inflater.inflate (R.layout.fragment_dialog_event_floor_plan, container, false); initBundle (); initView (root); initData (); initListener (); return root; } private void initBundle () { Bundle bundle = this.getArguments (); eventFloorPlan = bundle.getString (AppConfigTags.EVENT_FLOOR_PLAN); event_id = bundle.getInt (AppConfigTags.EVENT_ID); } private void initView (View root) { tvTitle = (TextView) root.findViewById (R.id.tvTitle); ivCancel = (ImageView) root.findViewById (R.id.ivCancel); ivFloorPlan = (SubsamplingScaleImageView) root.findViewById (R.id.ivFloorPlan); progressBar = (ProgressBar) root.findViewById (R.id.progressBar); } private void initData () { Utils.setTypefaceToAllViews (getActivity (), tvTitle); db = new DatabaseHandler (getActivity ()); if (db.getEventFloorPlan (event_id).length () > 0) { ivFloorPlan.setImage (ImageSource.bitmap (Utils.base64ToBitmap (db.getEventFloorPlan (event_id)))); ivFloorPlan.setVisibility (View.VISIBLE); progressBar.setVisibility (View.GONE); } else { new getBitmapFromURL ().execute (eventFloorPlan); } } private void initListener () { ivCancel.setOnClickListener (new View.OnClickListener () { @Override public void onClick (View v) { getDialog ().dismiss (); } }); } private class getBitmapFromURL extends AsyncTask<String, Void, String> { @Override protected String doInBackground (String... params) { try { URL url = new URL (params[0]); HttpURLConnection connection = (HttpURLConnection) url.openConnection (); connection.setDoInput (true); connection.connect (); InputStream input = connection.getInputStream (); bitmap = BitmapFactory.decodeStream (input); } catch (IOException e) { e.printStackTrace (); } return null; } @Override protected void onPostExecute (String result) { ivFloorPlan.setImage (ImageSource.bitmap (bitmap)); ivFloorPlan.setVisibility (View.VISIBLE); progressBar.setVisibility (View.GONE); } @Override protected void onPreExecute () { progressBar.setVisibility (View.VISIBLE); } @Override protected void onProgressUpdate (Void... values) { } } }
[ "karman.singhh@gmail.com" ]
karman.singhh@gmail.com
6bb443ef6dec96665c193ffca2b7a293c10c2ac7
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module2092_public/tests/more/src/java/module2092_public_tests_more/a/IFoo3.java
4bb58df11e70cebe28ae79b6031f4f59d1600a0c
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
866
java
package module2092_public_tests_more.a; import javax.rmi.ssl.*; import java.awt.datatransfer.*; import java.beans.beancontext.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see javax.net.ssl.ExtendedSSLSession * @see javax.rmi.ssl.SslRMIClientSocketFactory * @see java.awt.datatransfer.DataFlavor */ @SuppressWarnings("all") public interface IFoo3<D> extends module2092_public_tests_more.a.IFoo2<D> { java.beans.beancontext.BeanContext f0 = null; java.io.File f1 = null; java.rmi.Remote f2 = null; String getName(); void setName(String s); D get(); void set(D e); }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
9f08aec7303145d778e3cc4f875df33834ad3e86
26f180ab60c01ac1db44dc1a83637f7f1e7e5f69
/Week6/BaseballCardService/src/main/java/com/revature/service/PlayerServiceFinder.java
77ce9579f94784530fca3a35e9d845603f454f31
[]
no_license
djiani/1905Java20May
a96f9ce5b0b0c77a53659d3b61b99a9244bf7914
b8d1e3fb5c6b6d4d98ef23a2163be9e3122f524f
refs/heads/master
2020-07-23T17:57:01.378636
2019-08-29T18:22:06
2019-08-29T18:22:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
741
java
package com.revature.service; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; import com.revature.model.Player; @Service public class PlayerServiceFinder { public Player getPlayer(String playerName) { RestTemplate restTemplate = new RestTemplate(); String url = "http://localhost:8081/player/"; ResponseEntity<Player> responseEntity = restTemplate.exchange( url + playerName, HttpMethod.GET, null, Player.class); Player player = responseEntity.getBody(); System.out.println(responseEntity.getStatusCodeValue()); return player; } }
[ "nickolas.jurczak@gmail.com" ]
nickolas.jurczak@gmail.com
d6cbf6d619fd9735b2ad49385855c687efdaeed7
42640398f9ffdc46e15e05f3f8c7a8d4e18501d5
/ananops-provider-api/ananops-provider-imc-api/src/main/java/com/ananops/provider/model/dto/ImcAddInspectionItemDto.java
d0089eee0ccd6900dcad049acb810da309077e11
[]
no_license
jieke360/ananops-master
77ce7f60265b21291bf4182e6753d3b43d4a0e2f
6aa7f06785638da4c78a56a5235d6db09cc792e9
refs/heads/master
2022-04-23T20:42:46.202439
2020-04-27T09:36:52
2020-04-27T09:36:52
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,595
java
package com.ananops.provider.model.dto; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; import java.util.List; /** * Created by rongshuai on 2019/11/28 10:18 */ @Data @ApiModel public class ImcAddInspectionItemDto implements Serializable { private static final long serialVersionUID = -3159670420426980074L; /** * 巡检任务子项对应的甲方用户id */ @ApiModelProperty(value = "巡检任务子项对应的甲方用户id") private Long userId; /** * 巡检任务子项ID */ @ApiModelProperty(value = "巡检任务子项ID") private Long id; /** * 从属的巡检任务的ID */ @ApiModelProperty(value = "从属的巡检任务的ID") private Long inspectionTaskId; /** * 计划开始时间 */ @ApiModelProperty(value = "计划开始时间",example = "2019-8-24 11:11:11") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date scheduledStartTime; /** * 实际开始时间 */ @ApiModelProperty(value = "实际开始时间",example = "2019-8-24 11:11:11") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date actualStartTime; /** * 实际完成时间 */ @ApiModelProperty(value = "实际完成时间",example = "2019-8-24 11:11:11") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date actualFinishTime; /** * 计划完成天数 */ @ApiModelProperty(value = "计划完成天数") private Integer days; /** * 巡检周期(月) */ @ApiModelProperty(value = "巡检周期(月)") private Integer frequency; /** * 巡检子项内容描述 */ @ApiModelProperty(value = "巡检子项内容描述") private String description; /** * 巡检子项的巡检状态 */ @ApiModelProperty(value = "巡检子项的巡检状态") private Integer status; /** * 巡检子项的位置,纬度 */ @ApiModelProperty(value = "巡检子项的位置,纬度") private BigDecimal itemLatitude; /** * 巡检子项的位置,经度 */ @ApiModelProperty(value = "巡检子项的位置,经度") private BigDecimal itemLongitude; /** * 巡检子项结果描述 */ @ApiModelProperty(value = "巡检子项结果描述") private String result; /** * 巡检子项的名称 */ @ApiModelProperty(value = "巡检子项的名称") private String itemName; /** * 巡检子项对应的维修工 */ @ApiModelProperty(value = "巡检子项对应的维修工") private Long maintainerId; /** * 巡检任务子项已经执行的次数 */ @ApiModelProperty(value = "巡检任务子项已经执行的次数,初始为0") private Integer count; /** * 巡检任务子项所在的网点地址 */ @ApiModelProperty(value = "巡检任务子项所在的网点地址") private String location; /** * 附件id */ @ApiModelProperty(value = "巡检任务子项对应的附件id") private List<Long> attachmentIds; }
[ "1076061276@qq.com" ]
1076061276@qq.com
fc4133cbe293a03643f2cb61e6b94e370942deaf
db5e2811d3988a5e689b5fa63e748c232943b4a0
/jadx/sources/o/C1874.java
b0d6c73ad41de865b24700820bac4c6b84d3616f
[]
no_license
ghuntley/TraceTogether_1.6.1.apk
914885d8be7b23758d161bcd066a4caf5ec03233
b5c515577902482d741cabdbd30f883a016242f8
refs/heads/master
2022-04-23T16:59:33.038690
2020-04-27T05:44:49
2020-04-27T05:44:49
259,217,124
0
0
null
null
null
null
UTF-8
Java
false
false
440
java
package o; /* renamed from: o.Ιз reason: contains not printable characters */ final /* synthetic */ class C1874 implements C2018 { /* renamed from: ι reason: contains not printable characters */ static final C2018 f9551 = new C1874(); private C1874() { } /* renamed from: Ι reason: contains not printable characters */ public final Object m10261() { return Boolean.valueOf(C1306.m8255()); } }
[ "ghuntley@ghuntley.com" ]
ghuntley@ghuntley.com
336ac6e610ea6649ca391d20ba09d83665f52557
d531fc55b08a0cd0f71ff9b831cfcc50d26d4e15
/gen/main/java/org/hl7/fhir/ClinicalImpressionFinding.java
e38ee4fa46f458484d741b0b14dc9249494f62ec
[]
no_license
threadedblue/fhir.emf
f2abc3d0ccce6dcd5372874bf1664113d77d3fad
82231e9ce9ec559013b9dc242766b0f5b4efde13
refs/heads/master
2021-12-04T08:42:31.542708
2021-08-31T14:55:13
2021-08-31T14:55:13
104,352,691
0
0
null
null
null
null
UTF-8
Java
false
false
4,502
java
/** */ package org.hl7.fhir; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Clinical Impression Finding</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. * <!-- end-model-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link org.hl7.fhir.ClinicalImpressionFinding#getItemCodeableConcept <em>Item Codeable Concept</em>}</li> * <li>{@link org.hl7.fhir.ClinicalImpressionFinding#getItemReference <em>Item Reference</em>}</li> * <li>{@link org.hl7.fhir.ClinicalImpressionFinding#getBasis <em>Basis</em>}</li> * </ul> * * @see org.hl7.fhir.FhirPackage#getClinicalImpressionFinding() * @model extendedMetaData="name='ClinicalImpression.Finding' kind='elementOnly'" * @generated */ public interface ClinicalImpressionFinding extends BackboneElement { /** * Returns the value of the '<em><b>Item Codeable Concept</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Specific text or code for finding or diagnosis, which may include ruled-out or resolved conditions. * <!-- end-model-doc --> * @return the value of the '<em>Item Codeable Concept</em>' containment reference. * @see #setItemCodeableConcept(CodeableConcept) * @see org.hl7.fhir.FhirPackage#getClinicalImpressionFinding_ItemCodeableConcept() * @model containment="true" * extendedMetaData="kind='element' name='itemCodeableConcept' namespace='##targetNamespace'" * @generated */ CodeableConcept getItemCodeableConcept(); /** * Sets the value of the '{@link org.hl7.fhir.ClinicalImpressionFinding#getItemCodeableConcept <em>Item Codeable Concept</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Item Codeable Concept</em>' containment reference. * @see #getItemCodeableConcept() * @generated */ void setItemCodeableConcept(CodeableConcept value); /** * Returns the value of the '<em><b>Item Reference</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Specific reference for finding or diagnosis, which may include ruled-out or resolved conditions. * <!-- end-model-doc --> * @return the value of the '<em>Item Reference</em>' containment reference. * @see #setItemReference(Reference) * @see org.hl7.fhir.FhirPackage#getClinicalImpressionFinding_ItemReference() * @model containment="true" * extendedMetaData="kind='element' name='itemReference' namespace='##targetNamespace'" * @generated */ Reference getItemReference(); /** * Sets the value of the '{@link org.hl7.fhir.ClinicalImpressionFinding#getItemReference <em>Item Reference</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Item Reference</em>' containment reference. * @see #getItemReference() * @generated */ void setItemReference(Reference value); /** * Returns the value of the '<em><b>Basis</b></em>' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Which investigations support finding or diagnosis. * <!-- end-model-doc --> * @return the value of the '<em>Basis</em>' containment reference. * @see #setBasis(org.hl7.fhir.String) * @see org.hl7.fhir.FhirPackage#getClinicalImpressionFinding_Basis() * @model containment="true" * extendedMetaData="kind='element' name='basis' namespace='##targetNamespace'" * @generated */ org.hl7.fhir.String getBasis(); /** * Sets the value of the '{@link org.hl7.fhir.ClinicalImpressionFinding#getBasis <em>Basis</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Basis</em>' containment reference. * @see #getBasis() * @generated */ void setBasis(org.hl7.fhir.String value); } // ClinicalImpressionFinding
[ "roberts_geoffry@bah.com" ]
roberts_geoffry@bah.com
b1820daf8f062ecd6f0e9b2f834c762cd57c9c39
bbc265db09b3f315825f22decd958a565fcd8d26
/src/com/mayhem/rs2/content/shopping/impl/SlayerShop.java
6f0a93683fc568b1b2fb74486e13343d307afa4f
[]
no_license
jlabranche/SSL2019
b175421822d2dc11abaad9f497441ba4ed546cb3
6c04fe16fa36ecdcf665b7527f9e0694f55b8fc2
refs/heads/master
2020-09-09T20:34:51.222139
2020-02-20T00:41:23
2020-02-20T00:41:23
221,561,429
0
0
null
null
null
null
UTF-8
Java
false
false
4,262
java
package com.mayhem.rs2.content.shopping.impl; import com.mayhem.rs2.content.interfaces.InterfaceHandler; import com.mayhem.rs2.content.interfaces.impl.oldQuestTab; import com.mayhem.rs2.content.shopping.Shop; import com.mayhem.rs2.entity.item.Item; import com.mayhem.rs2.entity.player.Player; import com.mayhem.rs2.entity.player.net.out.impl.SendMessage; /** * Slayer store * * @author Daniel */ public class SlayerShop extends Shop { /** * Id of slayer shop */ public static final int SHOP_ID = 6; /** * Price of items in slayer store * * @param id * @return */ public static final int getPrice(int id) { switch (id) { case 4155: return 0; case 19668: return 150; case 2528: return 15; case 11866: return 50; case 11864: case 19639: case 19647: case 19643: return 250; case 4212: case 4224: return 350; case 6720: return 5; case 4166: return 5; case 4164: return 5; case 1844: return 5; case 1845: return 5; case 1846: return 5; case 4081: return 5; case 4170: return 10; case 6708: return 5; case 10548: return 85; case 10551: return 125; case 10555: return 75; case 7454: return 10; case 7455: return 15; case 7456: return 20; case 7457: return 25; case 7458: return 30; case 7459: return 35; case 7460: return 40; case 7461: return 45; case 7462: return 50; case 4551: case 4168: return 5; case 2://cannon ball return 1; case 6: return 50; case 8: return 50; case 10: return 50; case 12: return 50; } return 2147483647; } /** * All items in slayer store */ public SlayerShop() { super(SHOP_ID, new Item[] { new Item(19668), new Item(4155), new Item(2528), new Item(11866), new Item(11864), new Item(19639), new Item(19647), new Item(19643), new Item(4212), new Item(4224), new Item(10548), new Item(10551), new Item(10555), new Item(6720), new Item(4166), new Item(4551), new Item(4168), new Item(4164), new Item(1844), new Item(1845), new Item(1846), new Item(4081), new Item(4170), new Item(6708), new Item(7458), new Item(7459), new Item(7460), new Item(7461), new Item(7462), new Item(2, 50), new Item(6), new Item(8), new Item(10), new Item(12) }, false, "Slayer Store"); } @Override public void buy(Player player, int slot, int id, int amount) { if (!hasItem(slot, id)) return; if (get(slot).getAmount() == 0) return; if (amount > get(slot).getAmount()) { amount = get(slot).getAmount(); } Item buying = new Item(id, amount); if (buying.getId() == 2) { amount *= 200; buying.setAmount(amount); } if (!player.getInventory().hasSpaceFor(buying)) { if (!buying.getDefinition().isStackable()) { int slots = player.getInventory().getFreeSlots(); if (slots > 0) { buying.setAmount(slots); amount = slots; } else { player.getClient().queueOutgoingPacket(new SendMessage("You do not have enough inventory space to buy this item.")); } } else { player.getClient().queueOutgoingPacket(new SendMessage("You do not have enough inventory space to buy this item.")); return; } } if (player.getSlayerPoints() < amount * getPrice(id)) { player.getClient().queueOutgoingPacket(new SendMessage("You do not have enough Slayer points to buy that.")); return; } player.setSlayerPoints(player.getSlayerPoints() - amount * getPrice(id)); player.sendMessage("@blu@You now have " + player.getSlayerPoints() + "."); InterfaceHandler.writeText(new oldQuestTab(player)); player.getInventory().add((new Item(buying.getId(), buying.getAmount()))); update(); } @Override public int getBuyPrice(int id) { return 0; } @Override public String getCurrencyName() { return "Slayer points"; } @Override public int getSellPrice(int id) { return getPrice(id); } @Override public boolean sell(Player player, int id, int amount) { player.getClient().queueOutgoingPacket(new SendMessage("You cannot sell items to this shop.")); return false; } }
[ "jean.labranche@endurance.com" ]
jean.labranche@endurance.com
601521eab8d1d963f49255bed526654e98cf0753
7d6e485074477b84770b47b5b597c3e9add9fe47
/src/main/java/com/aparapi/internal/exception/AparapiException.java
cbc6ef6ba54e7c295df03761d5780f453e56b319
[ "Apache-2.0" ]
permissive
SymmetryLabs/aparapi
8e7fc32d2bac94ea3fb40c502bd4142f751b265d
d3db2e865abef08103dc91170919fa70da6c35d8
refs/heads/master
2021-09-20T11:05:46.075390
2018-08-08T17:24:52
2018-08-08T17:24:52
114,088,595
3
0
null
2017-12-13T07:27:57
2017-12-13T07:27:57
null
UTF-8
Java
false
false
4,221
java
/** * Copyright (c) 2016 - 2017 Syncleus, 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. */ /* Copyright (c) 2010-2011, Advanced Micro Devices, Inc. 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 copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. If you use the software (in whole or in part), you shall adhere to all applicable U.S., European, and other export laws, including but not limited to the U.S. Export Administration Regulations ("EAR"), (15 C.F.R. Sections 730 through 774), and E.U. Council Regulation (EC) No 1334/2000 of 22 June 2000. Further, pursuant to Section 740.6 of the EAR, you hereby certify that, except pursuant to a license granted by the United States Department of Commerce Bureau of Industry and Security or as otherwise permitted pursuant to a License Exception under the U.S. Export Administration Regulations ("EAR"), you will not (1) export, re-export or release to a national of a country in Country Groups D:1, E:1 or E:2 any restricted technology, software, or source code you receive hereunder, or (2) export to Country Groups D:1, E:1 or E:2 the direct product of such technology or software, if such foreign produced direct product is subject to national security controls as identified on the Commerce Control List (currently found in Supplement 1 to Part 774 of EAR). For the most current Country Group listings, or for additional information about the EAR or your obligations under those regulations, please refer to the U.S. Bureau of Industry and Security's website at http://www.bis.doc.gov/. */ package com.aparapi.internal.exception; /** * We use <code>AparapiException</code> class and subclasses to wrap other * <code>Exception</code> classes, mainly to allow differentiation between Aparapi specific issues at runtime. * * The class parser for example will throw a specific <code>ClassParseException</code> if any Aparapi unfriendly * constructs are found. This allows us to <strong>fail fast</strong> during classfile parsing. * * @see com.aparapi.internal.exception.ClassParseException * @see com.aparapi.internal.exception.CodeGenException * * @author gfrost * */ @SuppressWarnings("serial") public class AparapiException extends Exception{ public AparapiException(String _msg) { super(_msg); } public AparapiException(Throwable _t) { super(_t); } }
[ "jeffrey.freeman@syncleus.com" ]
jeffrey.freeman@syncleus.com
c34eb9489facfe828be4aa54d0c98db459a0a207
516fb367430d4c1393f4cd726242618eca862bda
/sources/com/til/colombia/android/service/co.java
b99b3378fec8070346fde75b58d1221303901275
[]
no_license
cmFodWx5YWRhdjEyMTA5/Gaana2
75d6d6788e2dac9302cff206a093870e1602921d
8531673a5615bd9183c9a0466325d0270b8a8895
refs/heads/master
2020-07-22T15:46:54.149313
2019-06-19T16:11:11
2019-06-19T16:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
343
java
package com.til.colombia.android.service; import com.android.volley.i.b; final class co implements b<String> { final /* synthetic */ NativeItem a; private static void a() { } public final /* bridge */ /* synthetic */ void onResponse(Object obj) { } co(NativeItem nativeItem) { this.a = nativeItem; } }
[ "master@master.com" ]
master@master.com
28da42eaf08270725f2b259a406118e1efed5884
a2d4a10736203419148eed754e195730c07e4b09
/src/main/java/info/loenwind/autoconfig/factory/IValue.java
96f89dc632b326329a93ec2dce9d6fcc5c075733
[]
no_license
davidsielert/AutoConfig
8e7651bab5be168863ecdc370343c2b5d5a522e2
c399c26cc6136282a693e0b15f915b285020adb7
refs/heads/master
2023-03-11T09:14:41.926447
2020-11-27T11:31:37
2020-11-27T11:31:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,519
java
package info.loenwind.autoconfig.factory; import java.util.Random; import javax.annotation.Nonnull; public interface IValue<T> { T get(); /** * Marks this config value as one that needs to be synced from the server to the client. Returns the object itself for chaining. * * Note: Not all config values support this. */ default IValue<T> sync() { return this; } /** * Marks this config value as one that needs to be in sync between the server and the client but cannot be changed at runtime. Returns the object itself for * chaining. * <p> * Note: Not all config values support this. */ default IValue<T> startup() { return this; } default IValue<T> setRange(double min, double max) { setMin(min); setMax(max); return this; } default IValue<T> setMin(double min) { return this; } default IValue<T> setMax(double max) { return this; } static final @Nonnull Random RAND = new Random(); /** * See {@link #getChance(Random)}, uses an internal RNG. */ default int getChance() { return getChance(RAND); } /** * Interprets the config value as a chance and determines the outcome based on the given RNG. This does support chances above 100% and can return numbers * greater than one for those. * <p> * Note: Not all config values support this. */ default int getChance(Random rand) { throw new UnsupportedOperationException(); } }
[ "henry@loenwind.info" ]
henry@loenwind.info
a4a001b784e87b7629c6fc55c3e3e08bc9b59046
5320cf4b05c970a019d7a1e58271ab1e961b7700
/app/src/main/java/views/ecpay/com/postabletecpay/util/entities/response/EntityChangePass/BodyChangePassResponse.java
1c38110903a6941c06d4ee1396282d22bd6cf69c
[]
no_license
vinhnb90/ECPayPostTablet
53374ca1b3a223515d49dc7c96c4a03f70d25410
9387a6daad5a5adbddc4d7f9d4a4473bc9016258
refs/heads/master
2021-01-21T08:38:36.711973
2017-06-21T13:14:43
2017-06-21T13:14:43
91,635,758
0
0
null
null
null
null
UTF-8
Java
false
false
1,120
java
package views.ecpay.com.postabletecpay.util.entities.response.EntityChangePass; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class BodyChangePassResponse { @SerializedName("audit-number") @Expose private Long auditNumber; @SerializedName("mac") @Expose private String mac; @SerializedName("disk-drive") @Expose private String diskDrive; @SerializedName("signature") @Expose private String signature; public Long getAuditNumber() { return auditNumber; } public void setAuditNumber(Long auditNumber) { this.auditNumber = auditNumber; } public String getMac() { return mac; } public void setMac(String mac) { this.mac = mac; } public String getDiskDrive() { return diskDrive; } public void setDiskDrive(String diskDrive) { this.diskDrive = diskDrive; } public String getSignature() { return signature; } public void setSignature(String signature) { this.signature = signature; } }
[ "nbvinh.it@gmail.com" ]
nbvinh.it@gmail.com
20e81119b17c18d8c751bff9741a9d81373d6159
848f075aa0823fbead1fd33acb51010af4e4db9a
/wsdl/src/main/java/com/microsoft/schemas/dynamics/_2008/_01/sharedtypes/AxdEnumInventTransOpen.java
f67c61863a72f9f8c00916e21f80b1afd1ae11d0
[]
no_license
Rambrant/Billing
0b636094694a6a3bbc2f4ff0de3cd47ee3f2b1eb
0e574dd48bcc98ecfac10b72e41d8eebdcccd141
refs/heads/master
2021-01-22T19:21:40.993460
2014-04-11T05:01:31
2014-04-11T05:01:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,377
java
package com.microsoft.schemas.dynamics._2008._01.sharedtypes; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for AxdEnum_InventTransOpen. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="AxdEnum_InventTransOpen"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="No"/> * &lt;enumeration value="Yes"/> * &lt;enumeration value="Quotation"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "AxdEnum_InventTransOpen") @XmlEnum public enum AxdEnumInventTransOpen { @XmlEnumValue("No") NO("No"), @XmlEnumValue("Yes") YES("Yes"), @XmlEnumValue("Quotation") QUOTATION("Quotation"); private final String value; AxdEnumInventTransOpen(String v) { value = v; } public String value() { return value; } public static AxdEnumInventTransOpen fromValue(String v) { for (AxdEnumInventTransOpen c: AxdEnumInventTransOpen.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "thomas@rambrant.com" ]
thomas@rambrant.com
8590565eb7be0ed6cf9806a734f410cb5d96d467
a56109d28bec71ad7d007cb2f87663c6bd5047e9
/app/src/main/java/dongwei/fajuary/movedimensionapp/webpageModel/NewyearCourseActivity.java
8ddf839e18f0707cc66fbbb34e588493a2b7c461
[]
no_license
fajuary/MoveDimensionApp
04259ae6984f0b5b75b0298b307ccb5eced7f02e
e9b05bb91626cc72093fc4255984dda65648f605
refs/heads/master
2020-04-07T08:13:55.175903
2018-11-19T10:51:49
2018-11-19T10:51:49
158,205,660
1
0
null
null
null
null
UTF-8
Java
false
false
7,147
java
package dongwei.fajuary.movedimensionapp.webpageModel; import android.content.Intent; import android.graphics.Color; import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import com.lzy.okgo.OkGo; import com.lzy.okgo.model.Response; import com.orhanobut.logger.Logger; import org.json.JSONException; import org.json.JSONObject; import java.util.HashMap; import java.util.Map; import butterknife.BindView; import dongwei.fajuary.dongweimoveview.utils.StatusBarUtil; import dongwei.fajuary.dongweimoveview.utils.ToastHelper; import dongwei.fajuary.movedimensionapp.R; import dongwei.fajuary.movedimensionapp.base.BaseHasLeftActivity; import dongwei.fajuary.movedimensionapp.base.ImageClickInterface; import dongwei.fajuary.movedimensionapp.httpModel.HttpUtils; import dongwei.fajuary.movedimensionapp.httpModel.StringDialogCallback; import dongwei.fajuary.movedimensionapp.loginModel.LoginActivity; /** * 拜年教程 */ public class NewyearCourseActivity extends BaseHasLeftActivity { @BindView(R.id.activity_newyearcourse_mWebView) WebView mWebView;//网页展示 // 网页链接 private String mUrl=""; @Override public int getLayoutId() { return R.layout.activity_newyear_course; } @Override public void newInitView() { titleTxt.setText("拜年教程"); StatusBarUtil.setColor(this,Color.parseColor("#E51C23")); headRelayout.setBackgroundColor(Color.parseColor("#E51C23")); mUrl="http://api.jmhcn.net:1520/api/document/rule"; initWebView(); // mWebView.loadUrl(mUrl); } @Override public void newViewListener() { } @Override public void newViewClick(View view) { } @Override public void initData() { getRuleByTypeUrl(); } private void initWebView() { mWebView.addJavascriptInterface(new ImageClickInterface(this), "injectedObject"); WebSettings webSettings = mWebView.getSettings(); webSettings.setTextZoom(100); webSettings.setDisplayZoomControls(false); webSettings.setDefaultTextEncodingName("utf-8") ; webSettings.setJavaScriptEnabled(true); // 设置支持javascript脚本 webSettings.setAllowFileAccess(true); // 允许访问文件 webSettings.setBuiltInZoomControls(true); // 设置显示缩放按钮 webSettings.setSupportZoom(true); // 支持缩放 webSettings.setLoadWithOverviewMode(true); /** * * 用WebView显示图片,可使用这个参数 设置网页布局类型: 1、LayoutAlgorithm.NARROW_COLUMNS : * 适应内容大小 2、LayoutAlgorithm.SINGLE_COLUMN:适应屏幕,内容将自动缩放 */ webSettings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS); mWebView.setWebViewClient(mWebViewClient); } private WebViewClient mWebViewClient = new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } }; private boolean isOnPause; @Override public void onPause() { super.onPause(); try { if (mWebView != null) { mWebView.getClass().getMethod("onPause").invoke(mWebView, (Object[]) null); isOnPause = true; } } catch (Exception e) { e.printStackTrace(); } } /** * 当Activity执行onResume()时让WebView执行resume */ @Override protected void onResume() { super.onResume(); try { if (isOnPause) { if (mWebView != null) { mWebView.getClass().getMethod("onResume").invoke(mWebView, (Object[]) null); } isOnPause = false; } } catch (Exception e) { e.printStackTrace(); } } /** * 该处的处理尤为重要: * 应该在内置缩放控件消失以后,再执行mWebView.destroy() * 否则报错WindowLeaked */ @Override protected void onDestroy() { super.onDestroy(); if (mWebView != null) { mWebView.getSettings().setBuiltInZoomControls(true); mWebView.setVisibility(View.GONE); } isOnPause = false; } private void getRuleByTypeUrl() { Map<String, String> params = new HashMap<>(); params.put("type", "1"); OkGo.<String>post(HttpUtils.getRuleByTypeUrl)// .tag(this)// .cacheKey("getRuleByTypeUrl") .params(params) // 这里可以上传参数 .execute(new StringDialogCallback(this) { @Override public void onError(Response<String> response) { super.onError(response); ToastHelper.showTextToast(NewyearCourseActivity.this,"检查网络,请重试..."); } @Override public void onSuccess(com.lzy.okgo.model.Response<String> response) { String jsonStr = response.body(); Logger.json(jsonStr); try { JSONObject jsonObject = new JSONObject(jsonStr); if (null != jsonObject) { String status = jsonObject.optString("status"); String msgStr = jsonObject.optString("msg"); if (status.equals("200")){ JSONObject dataJson=jsonObject.optJSONObject("data"); if (null!=dataJson){ String content=dataJson.optString("content"); mWebView.loadData(content, "text/html", "utf-8"); } }else if (status.equals("301")){ ToastHelper.showTextToast(NewyearCourseActivity.this,"请重新登录"); Intent intent=new Intent(); intent.setClass(NewyearCourseActivity.this, LoginActivity.class); startActivity(intent); }else { ToastHelper.showTextToast(NewyearCourseActivity.this,msgStr); } } } catch (JSONException e) { e.printStackTrace(); } } }); } }
[ "18242312549@163.com" ]
18242312549@163.com
426be6fce73506ccb5cbaf796b78f21096943352
6f36eb7fe5dfd876a65e787a0c88d0db147cd610
/Pandora/app/src/main/java/com/donut/app/mvp/spinOff/plans/SpinOffPlansContract.java
3c766b71de71706762a3ec72b5ff878154d4a650
[]
no_license
Emmptee/dounat
34eda9879f21598dd594f22cf54b63402662ee13
9d601fdee54dc0e5ffacff8635685df3c542f154
refs/heads/master
2020-03-18T21:24:10.004883
2018-06-25T17:40:36
2018-06-25T17:40:36
135,278,734
0
0
null
null
null
null
UTF-8
Java
false
false
478
java
package com.donut.app.mvp.spinOff.plans; import com.donut.app.http.message.spinOff.ExclusivePlanResponse; import com.donut.app.mvp.BasePresenterImpl; import com.donut.app.mvp.BaseView; /** * Created by Qi on 2017/6/5. * Description : <br> */ public interface SpinOffPlansContract { interface View extends BaseView { void showView(ExclusivePlanResponse detailResponse); } abstract class Presenter<V extends View> extends BasePresenterImpl<V> { } }
[ "dds.c@163.com" ]
dds.c@163.com
f6e758e8073039db694e74f8c4e6c1510ab96d5c
5a20c1c51d80793fad6c857623fb72d8b7e94940
/TestWebServices/src/com/qzgf/utils/IbatisUtils.java
6ae87833f876c618cd81e327fb7c0e5a0f662a63
[]
no_license
worgent/fjfdszjtest
a83975b5798c8c695556bdff01ca768eaec75327
9c66e33c5838a388230e3150cd2bd8ca0358e9e8
refs/heads/master
2021-01-10T02:21:53.352796
2012-05-08T02:47:01
2012-05-08T02:47:01
55,039,210
0
1
null
null
null
null
GB18030
Java
false
false
2,316
java
/** * * 这是一个根据iBatis的特性写的一个工具类 * 根据ID可以取得对于的SQL和需要的参数条件 * * **/ package com.qzgf.utils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.ibatis.sqlmap.client.SqlMapClient; import com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient; import com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate; import com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap; import com.ibatis.sqlmap.engine.mapping.sql.Sql; import com.ibatis.sqlmap.engine.mapping.statement.MappedStatement; import com.ibatis.sqlmap.engine.scope.RequestScope; public class IbatisUtils { private Object[] sqlParam = null; private SqlMapClient sqlMapClient = null; private Log log = LogFactory.getLog(IbatisUtils.class); public IbatisUtils(SqlMapClient sqlMapClient) { this.sqlMapClient = sqlMapClient; } public void setSqlMapClient(SqlMapClient c) { sqlMapClient = c; } public SqlMapClient getSqlMapClient() { return sqlMapClient; } /** * 取得一条可以完成的sql,在方法里有给sqlParam数组赋值,这个数组里存在了sql所需要的参数 * @author chenf * @param String sqlMapId 对应于ibatis配置文件里的sql语句 * @param Object parameter 前台传入的参数 * @throws none * */ public String getSql(String sqlMapId, Object parameter) { String sqlValue = ""; ExtendedSqlMapClient extendedSqlMapClient = (ExtendedSqlMapClient) sqlMapClient; SqlMapExecutorDelegate sqlMapExecutorDelegate = extendedSqlMapClient .getDelegate(); MappedStatement mappedStatement = sqlMapExecutorDelegate .getMappedStatement(sqlMapId); RequestScope requestScope = new RequestScope(); mappedStatement.initRequest(requestScope); Sql sql = mappedStatement.getSql(); sqlValue = sql.getSql(requestScope, parameter); ParameterMap pm = sql.getParameterMap(requestScope, parameter); pm.getParameterObjectValues(requestScope, parameter); sqlParam = pm.getParameterObjectValues(requestScope, parameter); if(log.isDebugEnabled()) log.debug(sqlValue); return sqlValue; } public void setSqlParam(Object[] para) { sqlParam = para; } public Object[] getSqlParam() { return sqlParam; } }
[ "fjfdszj@0f449ecc-ff57-11de-b631-23daf5ca4ffa" ]
fjfdszj@0f449ecc-ff57-11de-b631-23daf5ca4ffa
da2f279dd1cae9d59ca90d180a9fe522fcee19ff
7b321d927c54fb20c53218a1a3a3783582f27a1f
/livetex/src/main/java/nit/livetex/livetexsdktestapp/ui/callbacks/OfflineConversationListCallback.java
660b48d4374a9cf633e6c906004b0c1243f2f0d2
[]
no_license
LiveTex/Android-SDK-Design-Level
b80526045892950cb27911b6bb5eca8fd5f99113
8dab1db7553d4aad60dab224d665368362e283b4
refs/heads/master
2021-05-01T06:50:30.527100
2016-07-26T11:41:13
2016-07-26T11:41:13
43,437,899
0
1
null
null
null
null
UTF-8
Java
false
false
168
java
package nit.livetex.livetexsdktestapp.ui.callbacks; /** * Created by user on 28.07.15. */ public interface OfflineConversationListCallback extends BaseCallback { }
[ "user@user.com" ]
user@user.com
8bf8ac67703c899afa89f330b6d87107bd73528d
c119345e24f383e93d2363edf1f1a4a8871e8e4b
/Copy of Assignment7/src/graphics/Oval.java
5443c23409f5d86daefd1fe99edf3ce8e7a81e12
[]
no_license
kathryneh/Hyrule-Monty-Python
4cd46d0d1528a9d179de6db686e0c260468c7662
1ae413fd03ba28e3bc7a92a591e7786dbc5eb2dd
refs/heads/master
2021-01-02T09:01:54.514548
2012-10-23T04:16:55
2012-10-23T04:16:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
176
java
package graphics; public class Oval extends Graphic implements Graphicable { public Oval(int x, int y, int width, int height) { super(x, y, width, height); } }
[ "kathryne.h@gmail.com" ]
kathryne.h@gmail.com
8651c33fb7d822b3113eb2a994f258eb9b702d0c
57e336ee001e59a350c919877d79886b2af8f2ef
/app/src/main/java/com/gsatechworld/spexkart/beans/category/SubCategoryList.java
e40503e5a4425fd23abf94683cbdad9da58937ff
[]
no_license
dprasad554/Spexkart
e3588d516cbc92aa0a2050e239c08b23612902ae
e964d0bd8d699eadd7495a8e3811da426adc9c21
refs/heads/master
2023-04-20T00:25:27.455758
2021-05-03T09:04:05
2021-05-03T09:04:05
363,872,584
0
0
null
null
null
null
UTF-8
Java
false
false
559
java
package com.gsatechworld.spexkart.beans.category; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class SubCategoryList { @SerializedName("id") @Expose private Integer id; @SerializedName("name") @Expose private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "rohitkumar.kr92@gmail.com" ]
rohitkumar.kr92@gmail.com
ecf4df740b5bbfc52e8d7f7152316c4e85fab6c8
364bd91497a498b899c1de60e1ff028795eddbbc
/02Benchmarks/Openj9Test-Test/src/javaT/rmi/activation/Activatable/checkRegisterInLog/CheckRegisterInLog_Stub.java
cd91386e3d795a955f7b6c84b4afad6da3b469d5
[]
no_license
JavaTailor/CFSynthesis
8485f5d94cec335bedfdf18c88ddc523e05a0567
bf9421fea49469fbac554da91169cf07aae3e08c
refs/heads/master
2023-04-15T02:37:04.252151
2021-11-12T09:57:06
2021-11-12T09:57:06
402,928,654
4
1
null
null
null
null
UTF-8
Java
false
false
3,849
java
package javaT.rmi.activation.Activatable.checkRegisterInLog; /* * Copyright (c) 1998, 1999, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // Stub class generated by rmic, do not edit. // Contents subject to change without notice. public final class CheckRegisterInLog_Stub extends java.rmi.server.RemoteStub implements ActivateMe, java.rmi.Remote { private static final java.rmi.server.Operation[] operations = { new java.rmi.server.Operation("void ping()"), new java.rmi.server.Operation("void shutdown()") }; private static final long interfaceHash = 10333549859256328L; private static final long serialVersionUID = 2; private static boolean useNewInvoke; private static java.lang.reflect.Method $method_ping_0; private static java.lang.reflect.Method $method_shutdown_1; static { try { java.rmi.server.RemoteRef.class.getMethod("invoke", new java.lang.Class[] { java.rmi.Remote.class, java.lang.reflect.Method.class, java.lang.Object[].class, long.class }); useNewInvoke = true; $method_ping_0 = ActivateMe.class.getMethod("ping", new java.lang.Class[] {}); $method_shutdown_1 = ActivateMe.class.getMethod("shutdown", new java.lang.Class[] {}); } catch (java.lang.NoSuchMethodException e) { useNewInvoke = false; } } // constructors public CheckRegisterInLog_Stub() { super(); } public CheckRegisterInLog_Stub(java.rmi.server.RemoteRef ref) { super(ref); } // methods from remote interfaces // implementation of ping() public void ping() throws java.rmi.RemoteException { try { if (useNewInvoke) { ref.invoke(this, $method_ping_0, null, 5866401369815527589L); } else { java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash); ref.invoke(call); ref.done(call); } } catch (java.lang.RuntimeException e) { throw e; } catch (java.rmi.RemoteException e) { throw e; } catch (java.lang.Exception e) { throw new java.rmi.UnexpectedException("undeclared checked exception", e); } } // implementation of shutdown() public void shutdown() throws java.lang.Exception { if (useNewInvoke) { ref.invoke(this, $method_shutdown_1, null, -7207851917985848402L); } else { java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash); ref.invoke(call); ref.done(call); } } }
[ "JavaTailorZYQ@gmail.com" ]
JavaTailorZYQ@gmail.com
cf373d930bfee34251ce755a417775377991f91c
8258dd82dece76adbffc1d3429ca63aebf1a2600
/app/src/main/java/com/mac/runtu/business/TopImageBannerBiz.java
b8c69f7353b098e21ceca13837acff149fcd07bd
[]
no_license
wuyue0829/Runtu-master02
155750550c601e05afe3c5a76140bb92df14fe77
cc76dde1bf017d2649f5b51a7bf45afc2891df4e
refs/heads/master
2020-04-11T06:44:44.682500
2018-12-13T05:51:04
2018-12-13T05:51:04
161,590,380
0
0
null
null
null
null
UTF-8
Java
false
false
2,926
java
package com.mac.runtu.business; import android.content.Context; import android.widget.ImageView; import com.mac.runtu.utils.ImageLoadUtils; import com.mac.runtu.utils.UiUtils; import com.youth.banner.Banner; import com.youth.banner.BannerConfig; import com.youth.banner.Transformer; import com.youth.banner.listener.OnBannerClickListener; import com.youth.banner.loader.ImageLoader; import java.util.List; /** * Description: * Copyright : Copyright (c) 2016 * Company : * Author : 牒倩楠 * Date : 2016/10/28 0028 下午 8:02 */ public class TopImageBannerBiz { public Banner banner; public TopImageBannerBiz(Banner banner) { this.banner = banner; //设置图片加载器 banner.setImageLoader(new ImageLoader() { @Override public void displayImage(Context context, Object path, ImageView imageView) { //Picasso.with(context).load(path.toString()).into(imageView); if (UiUtils.isRunOnUiThread()) { if (path instanceof Integer) { ImageLoadUtils.rectangleImageId(UiUtils.getContext(), (Integer) path, imageView); } else if (path instanceof String) { ImageLoadUtils.rectangleImage(UiUtils.getContext(), (String) path, imageView); } } } }); } public void autoShowImage(List<?> images) { autoShowImage(images, null); } public void autoShowImage(List<?> images, final OnBannerClickeListener listener) { //设置banner样式 banner.setBannerStyle(BannerConfig.CIRCLE_INDICATOR); //设置图片集合 banner.setImages(images); //设置banner动画效果 banner.setBannerAnimation(Transformer.Default); //设置标题集合(当banner样式有显示title时) // banner.setBannerTitles(Arrays.asList(titles)); //设置自动轮播,默认为true banner.isAutoPlay(true); //设置轮播时间 banner.setDelayTime(3000); //设置指示器位置(当banner模式中有指示器时) banner.setIndicatorGravity(BannerConfig.CENTER); if (listener != null) { banner.setOnBannerClickListener(new OnBannerClickListener() { @Override public void OnBannerClick(int position) { listener.onBannerClickeListener(position); } }); } //banner设置方法全部调用完毕时最后调用 banner.start(); } public interface OnBannerClickeListener { void onBannerClickeListener(int paramInt); } }
[ "wuyue@wuyuedeiMac.local" ]
wuyue@wuyuedeiMac.local
f83efb6e9ef3cc18f7d7414b213935fdb35997f6
2f00ae0f6425bc65dd3a729ace276cd6e3df6900
/src/main/java/stellarium/lib/render/hierarchy/ITransitionBuilder.java
ac308e224c571f9d3c1aab439e9430ca3aab3c41
[]
no_license
Morpheus1101/StellarSky
1f18b23a7ef04ce024d7a2641b3ab20746ee2377
63fc6fc973d3c40d35104bdc01999687ace887e9
refs/heads/master
2020-04-17T08:10:09.627087
2016-07-28T03:27:17
2016-07-28T03:27:17
166,400,969
0
0
null
2019-01-18T12:22:27
2019-01-18T12:22:27
null
UTF-8
Java
false
false
978
java
package stellarium.lib.render.hierarchy; import com.google.common.base.Function; public interface ITransitionBuilder<Pass, ResRCI> { /** * Appends state with constant pass. * @param state the state to append * @param pass the pass for the state * @param subDist the sub-distribution * @return <code>this</code> * */ public <ChildPass> ITransitionBuilder<Pass, ResRCI> appendState( IRenderState<Pass, ResRCI> state, ChildPass pass, IRenderedCollection subDist); /** * Appends state with pass transition function. * @param state the state to append * @param pass the pass transition function for the state * @param subDist the sub-distribution * @return <code>this</code> * */ public <ChildPass> ITransitionBuilder<Pass, ResRCI> appendStateWithPassFn( IRenderState<Pass, ResRCI> state, Function<Pass, ChildPass> pass, IRenderedCollection subDist); /** * Builds this transition builder. * */ public IRenderTransition build(); }
[ "abab9579@gmail.com" ]
abab9579@gmail.com
518176870a2b2129d372fb687e27ca0daccebf10
cf729a7079373dc301d83d6b15e2451c1f105a77
/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201506/cm/MutateJobServiceInterfacegetResult.java
7f07a9c1ccf391dbed1a4db54bff7834414eb7b2
[]
no_license
cvsogor/Google-AdWords
044a5627835b92c6535f807ea1eba60c398e5c38
fe7bfa2ff3104c77757a13b93c1a22f46e98337a
refs/heads/master
2023-03-23T05:49:33.827251
2021-03-17T14:35:13
2021-03-17T14:35:13
348,719,387
0
0
null
null
null
null
UTF-8
Java
false
false
1,855
java
package com.google.api.ads.adwords.jaxws.v201506.cm; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * * Query mutation results, of a {@code COMPLETED} job. * <p>Use a {@link JobSelector} to query and return either a * {@link BulkMutateResult} or a {@link SimpleMutateResult}. Submit only one job ID * at a time.</p> * * * <p>Java class for getResult element declaration. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;element name="getResult"> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="selector" type="{https://adwords.google.com/api/adwords/cm/v201506}JobSelector" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * &lt;/element> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "selector" }) @XmlRootElement(name = "getResult") public class MutateJobServiceInterfacegetResult { protected JobSelector selector; /** * Gets the value of the selector property. * * @return * possible object is * {@link JobSelector } * */ public JobSelector getSelector() { return selector; } /** * Sets the value of the selector property. * * @param value * allowed object is * {@link JobSelector } * */ public void setSelector(JobSelector value) { this.selector = value; } }
[ "vacuum13@gmail.com" ]
vacuum13@gmail.com
c3e09f590bfcdd60c8a15ab870c39da81130f252
60f7b508bed2dffa32cff6c3f50d6dd6b0f25507
/user-center/src/main/java/com/boyu/erp/platform/usercenter/controller/option/UnitOptionController.java
c4ac3ae4e486e3cb889a222e6747ecfd86a743fd
[]
no_license
clfbai/heoll
8cca5d62eb8bce47d0882b07fb328baf508612b5
69845c4e78437bb0aea79a32d6a24c2fc299f388
refs/heads/master
2022-09-29T09:03:58.700436
2019-12-21T05:06:43
2019-12-21T05:06:43
165,189,003
0
0
null
2022-09-01T23:17:47
2019-01-11T06:08:00
Java
UTF-8
Java
false
false
1,795
java
package com.boyu.erp.platform.usercenter.controller.option; import com.boyu.erp.platform.usercenter.controller.base.BaseController; import com.boyu.erp.platform.usercenter.entity.system.SysUnit; import com.boyu.erp.platform.usercenter.result.JsonResult; import com.boyu.erp.platform.usercenter.result.JsonResultCode; import com.boyu.erp.platform.usercenter.service.system.SysUnitService; import com.boyu.erp.platform.usercenter.vo.CommonFainl; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; /** * 类描述: 组织弹窗下拉公用 * * @Description: * @auther: CLF * @date: 2019/8/27 9:49 */ @Slf4j @RestController @RequestMapping("/unit/option") public class UnitOptionController extends BaseController { @Autowired private SysUnitService unitService; /** * 类描述: 根据属主Id查询组织弹窗 * * @Description: * @auther: CLF * @date: 2019/8/27 10:04 */ @GetMapping(value = "/getOwnerId") public JsonResult getOptionUnit(@RequestParam(defaultValue = CommonFainl.PAGE) Integer page, @RequestParam(defaultValue = CommonFainl.SIZE) Integer size, SysUnit unit, HttpServletRequest request) { try { return new JsonResult(JsonResultCode.SUCCESS, CommonFainl.SELECTSTUS, unitService.selectOptionUnit(page, size, unit, this.getSessionSysUser(request))); } catch (Exception ex) { log.error("[ProductCatController][getOptionUnit] exception", ex); return new JsonResult(JsonResultCode.FAILURE_SYS_PRSNL, "组织弹窗信息查询失败", ""); } } }
[ "https://gitee.com/onecaolf/mytext.git" ]
https://gitee.com/onecaolf/mytext.git
e444bb1788622fd2f77eb7ead1ad998400385962
ab6d5edbaca72c2b0a23fdd50591f6ac4e686b0f
/src/com/barunsw/ojt/sjcha/day15/SocketChat/ChatPanel.java
47507fe8af4f2991651adb62926b60b7d687eaca
[]
no_license
barunsw/OJT
27a4f95f4738e18242b93a1025ad13ec82118b1a
34e1c8fd39e148f62b2ae84376f714762dab87c8
refs/heads/master
2022-12-10T18:28:23.817064
2022-04-26T02:27:35
2022-04-26T02:27:35
187,738,988
0
3
null
2022-11-23T22:26:11
2019-05-21T01:27:38
Java
UTF-8
Java
false
false
6,153
java
package com.barunsw.ojt.sjcha.day15.SocketChat; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.io.BufferedWriter; import javax.swing.JButton; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTextField; import javax.swing.JToggleButton; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class ChatPanel extends JPanel implements EventListener { public static final Logger LOGGER = LogManager.getLogger(ChatPanel.class); public static EventQueueWorker eventQueueWorker = new EventQueueWorker(); private GridBagLayout gridBagLayout = new GridBagLayout(); private ServerInterface socketIf; private ClientInterface clientIf; BufferedWriter writer; private JTextField jTextField_UserId = new JTextField(10); private JTextField jTextField_SendText = new JTextField(20); private JToggleButton jToggleButton_Connect = new JToggleButton("접속"); private JButton jButton_Send = new JButton("전송"); private JScrollPane jScrollPane_Dispaly = new JScrollPane(); private JTextArea jTextArea_Display = new JTextArea(); private JPanel jPanel_InputField = new JPanel(); public static String sendMessage = new String(); public ChatPanel() { try { initEvent(); initServerClient(); } catch (Exception e) { LOGGER.error(e.getMessage(), e); } initComponent(); } public void initEvent() { eventQueueWorker.addEventListener(this); eventQueueWorker.start(); } public void initServerClient() throws Exception { socketIf = new socketImpl("localhost", ServerMain.PORT, new ClientImpl()); } public void initComponent() { this.setLayout(gridBagLayout); this.add(jScrollPane_Dispaly, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(10, 10, 10, 10), 0, 0)); jScrollPane_Dispaly.getViewport().add(jTextArea_Display); this.add(jPanel_InputField, new GridBagConstraints(0, 10, 10, 1, 0.0, 0.0 , GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0,0)); jPanel_InputField.add(jTextField_UserId, new GridBagConstraints(0, 10, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 5), 0, 0)); jPanel_InputField.add(jToggleButton_Connect, new GridBagConstraints(1, 10, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 5, 0, 100), 0, 0)); jPanel_InputField.add(jTextField_SendText, new GridBagConstraints(2, 10, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 5, 0, 20), 0, 0)); jPanel_InputField.add(jButton_Send, new GridBagConstraints(3, 10, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 20, 0, 5), 0, 0)); // togglebutton을 눌렀을 경우. jToggleButton_Connect.addActionListener(new ChatPanel_jToggleButton_Connect_ActionListioner(this)); // 전송 버튼을 눌렀을 경우. jButton_Send.addActionListener(new ChatPanel_jButton_Send_ActionListener(this)); // entet를 눌렀을 경우. jTextField_SendText.addKeyListener(new ChatPanel_EnterKey_KeyListener(this)); } public void jToggleButton_Connect_ActionListioner(ActionEvent e) { String userName = jTextField_UserId.getText(); LOGGER.debug(userName); // serverIf.map에 key에 넣기 try { if (jToggleButton_Connect.isSelected() == true) { jToggleButton_Connect.setText("종료"); jTextField_UserId.setEditable(false); if (socketIf != null) { LOGGER.debug("server register"); socketIf.register(userName, clientIf); } } else { jToggleButton_Connect.setText("접속"); jTextField_UserId.setEditable(true); jTextField_UserId.setText(""); socketIf.deregister(userName); } } catch (Exception ex) { LOGGER.error(ex.getMessage(), ex); } } public void jButton_Send_ActionListener(ActionEvent e) { send(); } public void EnterKey_KeyListener(KeyEvent e) { switch (e.getKeyChar()) { case '\n': send(); } } public void send() { if(jTextField_UserId.getText().equals("") == false) { String userName = jTextField_UserId.getText(); LOGGER.debug("textfield username : " + userName); String message = jTextField_SendText.getText(); LOGGER.debug("send message : " + message); try { socketIf.send(userName, message); jTextField_SendText.setText(""); } catch (Exception ex) { LOGGER.error(ex.getMessage(), ex); } } else { JOptionPane.showMessageDialog(ChatPanel.this, "사용자 이름을 입력하세요.", "경고", JOptionPane.ERROR_MESSAGE); } } @Override public void push(Object o) { if (o instanceof String) { String str = (String)o; jTextArea_Display.append(o.toString()+"\n"); LOGGER.debug("push:" + str); } } } class ChatPanel_jToggleButton_Connect_ActionListioner implements ActionListener { private ChatPanel adaptee; public ChatPanel_jToggleButton_Connect_ActionListioner(ChatPanel adaptee) { this.adaptee = adaptee; } @Override public void actionPerformed(ActionEvent e) { adaptee.jToggleButton_Connect_ActionListioner(e); } } class ChatPanel_jButton_Send_ActionListener implements ActionListener { private ChatPanel adaptee; public ChatPanel_jButton_Send_ActionListener(ChatPanel adaptee) { this.adaptee = adaptee; } @Override public void actionPerformed(ActionEvent e) { adaptee.jButton_Send_ActionListener(e); } } class ChatPanel_EnterKey_KeyListener extends KeyAdapter { private ChatPanel adaptee; public ChatPanel_EnterKey_KeyListener(ChatPanel adaptee) { this.adaptee = adaptee; } public void keyPressed(KeyEvent e) { adaptee.EnterKey_KeyListener(e); } }
[ "yebin0322@naver.com" ]
yebin0322@naver.com
f2308e94229e1eaff4c8f170d42ff3f39645d5f4
5390ec210b1f279627a3ecc998b408a3db1a5ed9
/prism/src/ca/mcmaster/magarveylab/prism/enums/hmms/AcylAdenylatingHmms.java
0c1cc0e73974cceb3e14224dcc01093b3517c5fc
[]
no_license
Feigeliudan01/prism-releases
048a19d958b02e5d810de6e274119fb4e0e6d1cb
4bf8bbdf2da3b4f1c764de2301be7b02e74af157
refs/heads/master
2023-02-28T19:11:23.587754
2021-02-08T09:50:11
2021-02-08T09:50:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,026
java
package ca.mcmaster.magarveylab.prism.enums.hmms; import ca.mcmaster.magarveylab.enums.interfaces.SubstrateType; import ca.mcmaster.magarveylab.enums.substrates.AlphaKetoAcids; import ca.mcmaster.magarveylab.enums.substrates.FattyAcids; import ca.mcmaster.magarveylab.enums.substrates.StarterUnits; /** * Substrates of a distinct clade of acyl-adenylating enzymes revealed by * phylogenetic analysis (see doi:10.1093/nar/gkv1012). * * @author skinnider * */ public enum AcylAdenylatingHmms implements SubstrateHmm { // fatty acids MYRISTATE("myristate.hmm", FattyAcids.MYRISTATE), LONG_CHAIN_FATTY_ACID("long_chain_fatty_acid.hmm", FattyAcids.LONG_CHAIN_FATTY_ACID), SHORT_CHAIN_FATTY_ACID("short_chain_fatty_acid.hmm", FattyAcids.SHORT_CHAIN_FATTY_ACID), _3_AMINONON_5_ENOIC_ACID("3-aminonon-5-enoic_acid.hmm", FattyAcids._3_AMINONON_5_ENOIC_ACID), // aromatic starters _2_3_DIHYDROXYBENZOIC_ACID("2_3_dihydroxybenzoic_acid.hmm", StarterUnits._2_3_DIHYDROXYBENZOIC_ACID), SALICYLIC_ACID("salicylic_acid.hmm", StarterUnits.SALICYLIC_ACID), CINNAMIC_ACID("cinnamic_acid.hmm", StarterUnits.CINNAMIC_ACID), _3_AMINO_5_HYDROXYBENZOIC_ACID("AHBA.hmm", StarterUnits._3_AMINO_5_HYDROXYBENZOIC_ACID), _3_FORMAMIDO_5_HYDROXYBENZOIC_ACID("FHBA.hmm", StarterUnits._3_FORMAMIDO_5_HYDROXYBENZOIC_ACID), _3_HYDROXYPICOLINIC_ACID("3-HPA.hmm", StarterUnits._3_HYDROXYPICOLINIC_ACID), _3_HYDROXYQUINALDIC_ACID("3-HQA.hmm", StarterUnits._3_HYDROXYQUINALDIC_ACID), QUINOXALINE("quinoxaline.hmm", StarterUnits.QUINOXALINE), PHENYLACETATE("phenylacetate.hmm", StarterUnits.PHENYLACETATE), PARA_HYDROXYBENZOIC_ACID("PHBA.hmm", StarterUnits.PARA_HYDROXYBENZOIC_ACID), PARA_AMINOBENZOIC_ACID("PABA.hmm", StarterUnits.PARA_AMINOBENZOIC_ACID), // small starters BETA_AMINOALANINAMIDE("beta_aminoalaninamide.hmm", StarterUnits.BETA_AMINOALANINAMIDE), CYCLOHEXANECARBOXYLATE("CHC.hmm", StarterUnits.CYCLOHEXANECARBOXYLATE), DIHYDROXYCYCLOHEXANECARBOXYLIC_ACID("DHCHC.hmm", StarterUnits.DIHYDROXYCYCLOHEXANECARBOXYLIC_ACID), ALKYLMALONYL_COA("alkylmalonyl_CoA.hmm", StarterUnits.ALKYLMALONYL_COA), _3_HYDROXYBUTANOIC_ACID("3-hydroxybutanoic_acid.hmm", StarterUnits._3_HYDROXYBUTANOIC_ACID), AMINOLEVULINIC_ACID("aminolevulinic_acid.hmm", StarterUnits.AMINOLEVULINIC_ACID), // alpha keto/alpha hydroxy acids PYRUVATE("pyruvate.hmm", AlphaKetoAcids.PYRUVATE), ALPHA_KETOISOVALERATE("alpha-ketoisovalerate.hmm", AlphaKetoAcids.ALPHA_KETOISOVALERATE), ALPHA_KETOISOCAPROATE("alpha-ketoisocaproate.hmm", AlphaKetoAcids.ALPHA_KETOISOCAPROATE), _3_METHYL_2_OXOPENTANOIC_ACID("3-methyl-2-oxopentanoate.hmm", AlphaKetoAcids._3_METHYL_2_OXOPENTANOIC_ACID), PHENYLPYRUVATE("phenylpyruvate.hmm", AlphaKetoAcids.PHENYLPYRUVATE), //amni - fungal additions //TODO need to add SMILES // _4_HYDROXYPHENYLPYRUVIC_ACID("4-Hydroxyphenylpyruvicacid", "4-Hydroxyphenylpyruvicacid.hmm", "4Hpp", ""), // FATTY_ACID_DERIVED_AMINO_ACID("Fatty-acid-derived_Amino_acid.hmm", "Fatty-acid-derived_Amino_acid.hmm", "Faa", ""), // HYDROXYISOCAPROIC("Hydroxyisocaproic acid", "Hydroxyisocaproic_acid.hmm", "Hic", ""), // HYDROXYISOVALERIC("Hydroxyisovaleric acid", "Hydroxyisovaleric_acid.hmm", "Hiv", ""), // _2_HYDROXY_3_METHYLPENTANOIC_ACID("2-hydroxy-3-methylpentanoic acid", "2-hydroxy-3-methylpentanoic_acid.hmm", "Hmp", ""), // INDOLE_PYRUVIC_ACID("Indole-pyruvic acid", "Indole-pyruvic_acid.hmm", "Ipa", ""), // LINOLEIC_ACID("Linoleic acid", "Linoleic_acid.hmm", "Lin", ""), // METHYLATED_MYRISTIC_ACID("Methylated-myristic acid", "Methylated-myristic_acid.hmm", "Mma", ""), ; private final String hmm; private final SubstrateType substrate; private AcylAdenylatingHmms(final String hmm, final SubstrateType substrate) { this.hmm = hmm; this.substrate = substrate; } public String hmm() { return hmm; } public String fullName() { return substrate.fullName(); } public String abbreviation() { return substrate.abbreviation(); } public String smiles() { return substrate.smiles(); } }
[ "michaelskinnider@gmail.com" ]
michaelskinnider@gmail.com
7cacd8fa27b1336eb44a5011ce2193c359859638
6b9b027fe409c4605ad45ecd13a324c21fb1832e
/trade/src/main/java/com/ez08/trade/ui/vote/TradeVoteDetailActivity.java
d2ec9d3d9a9e6f058b83c9d93e8cbef151531bf3
[]
no_license
DangerMaker/Trade
abdb43b3474da701953fae0d0b4baf6bb08bb1b4
ad900b76895fa50e53039daaec0563a00d7f6102
refs/heads/master
2020-04-30T20:22:13.441020
2019-06-06T07:32:16
2019-06-06T07:32:16
177,064,153
0
0
null
null
null
null
UTF-8
Java
false
false
4,683
java
package com.ez08.trade.ui.vote; import android.net.Uri; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.DividerItemDecoration; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.ez08.trade.Constant; import com.ez08.trade.R; import com.ez08.trade.net.request.BizRequest; import com.ez08.trade.net.Client; import com.ez08.trade.net.ClientHelper; import com.ez08.trade.net.Response; import com.ez08.trade.net.Callback; import com.ez08.trade.ui.BaseActivity; import com.ez08.trade.ui.view.LinearItemDecoration; import org.json.JSONObject; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; public class TradeVoteDetailActivity extends BaseActivity implements View.OnClickListener { ImageView backBtn; TextView titleView; RecyclerView recyclerView; List<Object> list; TradeVoteDetailAdapter adapter; MeetingEntity entity; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.trade_activity_vote_list); titleView = findViewById(R.id.title); titleView.setText("我要投票"); backBtn = findViewById(R.id.img_back); backBtn.setOnClickListener(this); recyclerView = findViewById(R.id.recycler_view); recyclerView.setLayoutManager(new LinearLayoutManager(this)); LinearItemDecoration divider = new LinearItemDecoration(this); recyclerView.addItemDecoration(divider); list = new ArrayList<>(); adapter = new TradeVoteDetailAdapter(this); recyclerView.setAdapter(adapter); entity = (MeetingEntity) getIntent().getSerializableExtra("meeting"); getList(); } @Override public void onClick(View v) { if (v == backBtn) { finish(); } } private void getList() { String body = "FUN=440002&TBL_IN=tpmarket,meetingseq,vid,votecode;" + entity.tpmarket + "," + entity.meetingseq +"," + "" +"," + entity.votecode + ";"; BizRequest request = new BizRequest(); request.setBody(body); request.setCallback(new Callback() { @Override public void callback(Client client, Response data) { if (data.isSucceed()) { Log.e("TradeHandFragment", data.getData()); try { JSONObject jsonObject = new JSONObject(data.getData()); String content = jsonObject.getString("content"); Uri uri = Uri.parse(Constant.URI_DEFAULT_HELPER + content); Set<String> pn = uri.getQueryParameterNames(); for (Iterator it = pn.iterator(); it.hasNext(); ) { String key = it.next().toString(); if ("TBL_OUT".equals(key)) { list.clear(); list.add(entity); list.add(new TitleEntity("非累进投票议案")); String out = uri.getQueryParameter(key); String[] split = out.split(";"); for (int i = 1; i < split.length; i++) { String[] var = split[i].split(","); VoteEntity entity = new VoteEntity(); entity.tpmarket = var[0]; entity.meetingseq = var[1]; entity.vid = var[2]; entity.vinfo = var[3]; entity.vtype = var[4]; entity.vleijino = var[5]; entity.vrole = var[6]; entity.vrelation = var[7]; entity.refcode = var[8]; list.add(entity); adapter.clearAndAddAll(list); } } } } catch (Exception e) { e.printStackTrace(); } } } }); ClientHelper.get().send(request); } }
[ "liuyujiaqing@123.com" ]
liuyujiaqing@123.com
0d094fa8e0b755f84796f25e45c0ec47c18b287c
a4f1a8877c721c4275cb4d945abeb5da508792e3
/utterVoiceCommandsBETA_source_from_JADX/com/brandall/nutter/km.java
73724f93c626e0df8a2780e6740cef0a75bcd3dd
[]
no_license
coolchirag/androidRepez
36e686d0b2349fa823d810323034a20e58c75e6a
8d133ed7c523bf15670535dc8ba52556add130d9
refs/heads/master
2020-03-19T14:23:46.698124
2018-06-13T14:01:34
2018-06-13T14:01:34
136,620,480
0
0
null
null
null
null
UTF-8
Java
false
false
1,455
java
package com.brandall.nutter; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; public final class km { public static void m1305a(String[] strArr, String str) { ls.m1346c("ExecuteZip Zip"); long currentTimeMillis = System.currentTimeMillis(); ZipOutputStream zipOutputStream = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(str))); byte[] bArr = new byte[200]; for (int i = 0; i < strArr.length; i++) { BufferedInputStream bufferedInputStream = new BufferedInputStream(new FileInputStream(strArr[i]), 200); zipOutputStream.putNextEntry(new ZipEntry(strArr[i].substring(strArr[i].lastIndexOf("/") + 1))); while (true) { int read = bufferedInputStream.read(bArr, 0, 200); if (read == -1) { try { break; } catch (Throwable th) { zipOutputStream.close(); } } else { zipOutputStream.write(bArr, 0, read); } } bufferedInputStream.close(); } zipOutputStream.close(); ls.m1344a("ExecuteZip Zip elapsed: " + (System.currentTimeMillis() - currentTimeMillis)); } }
[ "j.chirag5555@gmail.com" ]
j.chirag5555@gmail.com
17c3b807d701981847488562ff92826e70321467
1c7f303881807b9b9d83f05e597029c770e614a3
/spring-aop/src/main/java/org/aopalliance/intercept/Joinpoint.java
e1523670e6b4ede8f47c2815cc069c4fc549c334
[ "Apache-2.0" ]
permissive
JianLaiZzz/spring-framework-5.2.6.RELEASE
9f61d98fb789723439a9910880225076b29f010d
23629452d093d622402e4c8a5c8f497b7ae4b2d5
refs/heads/master
2022-12-31T11:18:23.758121
2020-10-22T12:24:40
2020-10-22T12:24:40
304,803,029
0
0
null
null
null
null
UTF-8
Java
false
false
2,297
java
/* * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * 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.aopalliance.intercept; import java.lang.reflect.AccessibleObject; /** * This interface represents a generic runtime joinpoint (in the AOP * terminology). * * <p> * A runtime joinpoint is an <i>event</i> that occurs on a static * joinpoint (i.e. a location in a the program). For instance, an * invocation is the runtime joinpoint on a method (static joinpoint). * The static part of a given joinpoint can be generically retrieved * using the {@link #getStaticPart()} method. * * <p> * In the context of an interception framework, a runtime joinpoint * is then the reification of an access to an accessible object (a * method, a constructor, a field), i.e. the static part of the * joinpoint. It is passed to the interceptors that are installed on * the static joinpoint. * * @author Rod Johnson * @see Interceptor */ public interface Joinpoint { /** * Proceed to the next interceptor in the chain. * <p> * The implementation and the semantics of this method depends * on the actual joinpoint type (see the children interfaces). * * @return see the children interfaces' proceed definition * @throws Throwable if the joinpoint throws an exception */ Object proceed() throws Throwable; /** * Return the object that holds the current joinpoint's static part. * <p> * For instance, the target object for an invocation. * * @return the object (can be null if the accessible object is static) */ Object getThis(); /** * Return the static part of this joinpoint. * <p> * The static part is an accessible object on which a chain of * interceptors are installed. */ AccessibleObject getStaticPart(); }
[ "1914624121@qq.com" ]
1914624121@qq.com
50e42e3bff9192fd1cfd6186d6ed4267dbffde95
cae9c594e7dc920d17363c5731700088d30ef969
/src/facebook/_092ReverseLinkedListII.java
fcf3eb48de5619cc02b335a187e94c3849a2ec4c
[]
no_license
tech-interview-prep/technical-interview-preparation
a0dd552838305d6995bf9e7dfb90f4571e2e2025
8b299d3e282452789f05b8d08135b5ff66c7b890
refs/heads/master
2022-02-08T09:28:35.889755
2022-02-06T22:20:48
2022-02-06T22:20:48
77,586,682
6
3
null
null
null
null
UTF-8
Java
false
false
1,671
java
package facebook; import utils.ListNode; /** * Reverse a linked list from position m to n. Do it in-place and in one-pass. * * For example: * Given 1->2->3->4->5->NULL, m = 2 and n = 4, * * return 1->4->3->2->5->NULL. * * Note: * Given m, n satisfy the following condition: * 1 ≤ m ≤ n ≤ length of list. * * https://leetcode.com/problems/reverse-linked-list-ii/ * http://n00tc0d3r.blogspot.com/2013/05/reverse-linked-list.html */ public class _092ReverseLinkedListII { public static void main(String[] args) { Solution_ReverseLinkedListII sol = new Solution_ReverseLinkedListII(); ListNode.print(ListNode.getSampleList(5)); ListNode.print(sol.reverseBetween(ListNode.getSampleList(5), 2, 4)); } } class Solution_ReverseLinkedListII { public ListNode reverseBetween(ListNode head, int m, int n) { if(head == null || head.next == null) { return head; } ListNode dummyHead = new ListNode(0); // 0 dummyHead.next = head; // 0 -> 1 //move to the start point ListNode pre = dummyHead; // 0 for(int i = 0; i < m - 1; i ++){ pre = pre.next; // 1 } //do the reverse ListNode current = pre.next; // 2 ListNode subListHead = null; ListNode next = null; for(int i = 0; i <= n - m; i ++){ next = current.next; // 5 current.next = subListHead; // 4->3->2 -> null subListHead = current; // 4 current = next; // 5 } //reconnect pre.next.next = current; pre.next = subListHead; return dummyHead.next; } }
[ "bkoteshwarreddy+github@gmail.com" ]
bkoteshwarreddy+github@gmail.com
429fc05c783921d52e054e88d491e7d1e4853acd
025f0223abcbf69b5fbdc119d23605a384e0bda6
/Assignment9-master/src/main/java/ac/za/cput/factory/Ledger/FactoryGeneralLedger.java
0aef3b5417232d96db1e7997c292d67f0a7b5eed
[]
no_license
MugammadRihaad/Assignemtn12-SQL
7939b97bb2b65c16a4938de234d6c4366359a305
e9ecc2f1243e0734f80fc788a1583f45f56fcd34
refs/heads/master
2022-07-12T15:52:50.723761
2019-10-06T18:54:03
2019-10-06T18:54:03
213,216,622
0
0
null
null
null
null
UTF-8
Java
false
false
554
java
package ac.za.cput.factory.Ledger; import ac.za.cput.domain.Ledger.GeneralLedger; import ac.za.cput.util.IDGenerator; public class FactoryGeneralLedger { public static GeneralLedger getGeneralLedger(String date, int totalTransaction, double totalAmount){ return new GeneralLedger.Builder() .date(date) .generalLId(IDGenerator.generateId()) .totalTrans(totalTransaction) .totalAmount(totalAmount) .build(); } }
[ "mugammadrihaadvanblerck@gmail.com" ]
mugammadrihaadvanblerck@gmail.com
2076cb46d930fda0c729e3a592011093e1da7bfc
df755f1ad9f30e2968faaf65d5f203ac9de8dcf1
/mftcc-platform-web-master/src/main/java/app/component/oa/becomequalified/feign/MfOaBecomeQualifiedHisFeign.java
63cb01c67f8b23d2ce146c05811f4d1bc766c3c9
[]
no_license
gaoqiang9399/eclipsetogit
afabf761f77fe542b3da1535b15d4005274b8db7
03e02ef683929ea408d883ea35cbccf07a4c43e6
refs/heads/master
2023-01-22T16:42:32.813383
2020-11-23T07:31:23
2020-11-23T07:31:23
315,209,391
0
0
null
null
null
null
UTF-8
Java
false
false
1,167
java
package app.component.oa.becomequalified.feign; import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import app.component.oa.becomequalified.entity.MfOaBecomeQualifiedHis; import app.util.toolkit.Ipage; @FeignClient("mftcc-platform-factor") public interface MfOaBecomeQualifiedHisFeign { @RequestMapping("/MfOaBecomeQualifiedHis/insert") public void insert(@RequestBody MfOaBecomeQualifiedHis mfOaBecomeQualifiedHis) throws Exception; @RequestMapping("/MfOaBecomeQualifiedHis/delete") public void delete(@RequestBody MfOaBecomeQualifiedHis mfOaBecomeQualifiedHis) throws Exception; @RequestMapping("/MfOaBecomeQualifiedHis/update") public void update(@RequestBody MfOaBecomeQualifiedHis mfOaBecomeQualifiedHis) throws Exception; @RequestMapping("/MfOaBecomeQualifiedHis/getById") public MfOaBecomeQualifiedHis getById(@RequestBody MfOaBecomeQualifiedHis mfOaBecomeQualifiedHis) throws Exception; @RequestMapping("/MfOaBecomeQualifiedHis/findByPage") public Ipage findByPage(@RequestBody Ipage ipage) throws Exception; }
[ "gaoqiang1@chenbingzhu.zgcGuaranty.net" ]
gaoqiang1@chenbingzhu.zgcGuaranty.net
ad491d08f0e8c1198011976d04937fe5d3aeed8b
4ae460c376dabb04858ab8657d20f207b0da8b59
/vertx-apps/src/main/java/com/amex/vertx/core/asynwrappers/PromiseVerticleMain.java
fb5bb7ae655bdcb43fdbf701c143a8fd7f74728c
[]
no_license
GreenwaysTechnology/AMEX-Vertx-Oct-20
8ea7d85614cf51b5e85d6a6c4ffa0f7fa7a53de7
3eb8dce6d33c819f37336a3a7cfd1e3c514c1e23
refs/heads/main
2022-12-30T05:08:40.901660
2020-10-21T12:24:05
2020-10-21T12:24:05
305,373,903
0
0
null
null
null
null
UTF-8
Java
false
false
1,147
java
package com.amex.vertx.core.asynwrappers; import io.vertx.core.AbstractVerticle; import io.vertx.core.Future; import io.vertx.core.Promise; import io.vertx.example.util.Runner; class PromiseVerticle extends AbstractVerticle { //Promise public Promise<String> getSuccessPromise() { Promise<String> promise = Promise.promise(); promise.complete("Hello"); return promise; } public Future<String> getSuccessPromiseV1() { Promise<String> promise = Promise.promise(); promise.complete("Hello"); return promise.future(); } @Override public void start() throws Exception { super.start(); getSuccessPromise().future().onComplete(asyncResult -> { System.out.println(asyncResult.result()); }); getSuccessPromiseV1().onComplete(asyncResult -> { System.out.println(asyncResult.result()); }); } } public class PromiseVerticleMain extends AbstractVerticle { public static void main(String[] args) { Runner.runExample(PromiseVerticleMain.class); } @Override public void start() throws Exception { super.start(); vertx.deployVerticle(new PromiseVerticle()); } }
[ "sasubramanian_md@hotmail.com" ]
sasubramanian_md@hotmail.com
e3d169107012d1b4825e2bfcc2ff65c8d7bf4a30
b0d0c83d4ed5a2561216d187397a01dc899a3fac
/jpaw8-xtend/src/main/java/de/jpaw8/xtend/CollectionExtensions.java
98df389dd14545974f672e3a61cd45863319337e
[ "Apache-2.0" ]
permissive
jpaw/jpaw8
0cff0ebf7b06af5a06ee8b5ed882a80c7b5fe951
f92584f4ef43e7a80817c2d37a77c40cf254560e
refs/heads/master
2021-01-18T01:32:12.150099
2019-06-25T18:56:42
2019-06-25T18:56:42
27,059,440
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
package de.jpaw8.xtend; import java.util.Collection; import java.util.function.ToIntFunction; public class CollectionExtensions { /** Returns the collection element which has the maximum weight of all. */ public static <T> T ofMaxWeight(Collection<T> list, ToIntFunction<? super T> evaluator) { int bestWeightSoFar = Integer.MIN_VALUE; T best = null; for (T e : list) { int newWeight = evaluator.applyAsInt(e); if (best == null || newWeight > bestWeightSoFar) { best = e; bestWeightSoFar = newWeight; } } return best; } }
[ "jpaw@online.de" ]
jpaw@online.de
98e3513849dccb5af6ca0540783e1aa0c25f5940
80144e70d9eb77de6d7ea827d6681d3e420a7a9b
/src/main/java/com/hzz/hzzcloud/freemarkerbydir/listener/AutoCreateViewListener.java
6b44ba486f99b3aff1d841990c33f4610962e383
[]
no_license
kun303/hzzcloud
52c858c1f6744f09bd9ab869761761740ee21e6c
f43ec16e7f610210688484e34eae5d486902e118
refs/heads/master
2023-07-12T03:30:06.412679
2021-04-22T16:12:51
2021-04-22T16:12:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,154
java
package com.hzz.hzzcloud.freemarkerbydir.listener; import com.hzz.hzzcloud.freemarkerbydir.FreeMarkbydirExcuter; import com.hzz.hzzcloud.freemarkerbydir.view.MainPanel; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; /** * @author :hzz * @description:TODO * @date :2021/2/24 14:19 */ public class AutoCreateViewListener implements ActionListener { FreeMarkbydirExcuter freeMarkbydirExcuter=new FreeMarkbydirExcuter(); private MainPanel mainPanel; public AutoCreateViewListener(MainPanel mainPanel){ this.mainPanel=mainPanel; } @Override public void actionPerformed(ActionEvent e) { if(e.getActionCommand().equals("begin")) { System.out.println("开始生成"); String database = mainPanel.getDatabase().getText(); String tablename = mainPanel.getTablename().getText(); boolean depselected = mainPanel.getDep().isSelected(); boolean depVeselected = mainPanel.getDepve().isSelected(); freeMarkbydirExcuter.readTable(database, tablename, depVeselected,depselected); } } }
[ "605198347@qq.com" ]
605198347@qq.com
68b99fd763998a6b156d71743cf570a535f5f063
4e32c6147c70e3737ec4cac65a5bc36f6f96dc90
/app/src/main/java/com/mdground/yideguanregister/adapter/SimpleAdapter.java
e8d2848707eacb1a455921d7bef83015a0dac17c
[]
no_license
Bread-Yang/BaoRegister
2ad4bd6a1591e51ccd367ebb9b1686864b5e04b4
79edb163ec9ef3c5654e172e0477fa3b8c5b4f45
refs/heads/master
2021-01-17T07:03:09.650617
2016-06-29T09:27:43
2016-06-29T09:27:43
54,690,647
0
0
null
null
null
null
UTF-8
Java
false
false
2,254
java
package com.mdground.yideguanregister.adapter; import android.content.Context; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import java.util.List; public abstract class SimpleAdapter<T> extends BaseAdapter { private static final String TAG = SimpleAdapter.class.getSimpleName(); protected List<T> dataList; protected LayoutInflater mInflater; protected Context mContext; private Class<? extends BaseViewHolder> holderClass; public SimpleAdapter(Context context, Class<? extends BaseViewHolder> holderClass) { this.mContext = context; this.mInflater = LayoutInflater.from(context); this.holderClass = holderClass; } public void setDataList(List<T> t) { this.dataList = t; } public void clearDataList() { if (null != dataList) { this.dataList.clear(); } } @Override public int getCount() { if (null != dataList) { return dataList.size(); } return 0; } @Override public T getItem(int position) { return dataList.get(position); } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { BaseViewHolder viewHolder = null; if (null == convertView ) { if (holderClass == null) { Log.e(TAG, "holderClass is null"); return convertView; } try { viewHolder = holderClass.newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } convertView = mInflater.inflate(getViewResource(), null); initHolder(viewHolder, convertView); convertView.setTag(viewHolder); } else { viewHolder = (BaseViewHolder) convertView.getTag(); } bindData(viewHolder, position, convertView); return convertView; } protected abstract void bindData(BaseViewHolder holder, int position, View convertView); protected abstract void initHolder(BaseViewHolder holder, View convertView); protected abstract int getViewResource(); // viewHolder父类 protected static class BaseViewHolder { } }
[ "449088680@qq.com" ]
449088680@qq.com
a9afb81143671d68595cff0b0457e75a1c2225c3
93f989d82b64c06900b9482ccb24bcd488867ae4
/cloudalibaba-provider-payment9002/src/main/java/com/cloud/springcloud/alibaba/PaymentMain9002.java
b11c85885c76cec7c33513ac98002f20aa28dc1c
[]
no_license
rebornf/Springcloud
0effca1c2e8f89c0dfcea8e89b7d9f254b036426
2cebc912ea1a4f4edd0b5359093ece7869e6f3d2
refs/heads/master
2023-01-24T22:44:01.334682
2020-12-02T13:48:40
2020-12-02T13:48:40
309,700,448
0
0
null
null
null
null
UTF-8
Java
false
false
494
java
package com.cloud.springcloud.alibaba.alibaba; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.discovery.EnableDiscoveryClient; /** * @author fty * @date 2020/11/27 13:56 */ @SpringBootApplication @EnableDiscoveryClient public class PaymentMain9002 { public static void main(String[] args){ SpringApplication.run(PaymentMain9002.class, args); } }
[ "you@example.com" ]
you@example.com
9f65dd2a49f0a186911b637eeb32ee79a10c486d
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/MATH-61b-2-17-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage/org/apache/commons/math/distribution/PoissonDistributionImpl_ESTest_scaffolding.java
087e134ec61d3f6de2293051d489478d3ef4cef4
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
7,178
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon May 18 03:14:01 UTC 2020 */ package org.apache.commons.math.distribution; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class PoissonDistributionImpl_ESTest_scaffolding { @org.junit.Rule public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule(); private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000); @BeforeClass public static void initEvoSuiteFramework() { org.evosuite.runtime.RuntimeSettings.className = "org.apache.commons.math.distribution.PoissonDistributionImpl"; org.evosuite.runtime.GuiSupport.initialize(); org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000; org.evosuite.runtime.RuntimeSettings.mockSystemIn = true; org.evosuite.runtime.Runtime.getInstance().resetRuntime(); } @Before public void initTestCase(){ threadStopper.storeCurrentThreads(); threadStopper.startRecordingTime(); org.evosuite.runtime.GuiSupport.setHeadless(); org.evosuite.runtime.Runtime.getInstance().resetRuntime(); org.evosuite.runtime.agent.InstrumentingAgent.activate(); } @After public void doneWithTestCase(){ threadStopper.killAndJoinClientThreads(); org.evosuite.runtime.agent.InstrumentingAgent.deactivate(); org.evosuite.runtime.GuiSupport.restoreHeadlessMode(); } private static void initializeClasses() { org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(PoissonDistributionImpl_ESTest_scaffolding.class.getClassLoader() , "org.apache.commons.math.random.JDKRandomGenerator", "org.apache.commons.math.exception.NumberIsTooSmallException", "org.apache.commons.math.distribution.ChiSquaredDistribution", "org.apache.commons.math.MathException", "org.apache.commons.math.exception.NonMonotonousSequenceException", "org.apache.commons.math.distribution.ContinuousDistribution", "org.apache.commons.math.distribution.WeibullDistribution", "org.apache.commons.math.util.FastMath", "org.apache.commons.math.random.RandomAdaptorTest$ConstantGenerator", "org.apache.commons.math.util.MathUtils", "org.apache.commons.math.distribution.IntegerDistribution", "org.apache.commons.math.ConvergenceException", "org.apache.commons.math.exception.NotStrictlyPositiveException", "org.apache.commons.math.random.Well19937c", "org.apache.commons.math.distribution.PoissonDistribution", "org.apache.commons.math.random.Well19937a", "org.apache.commons.math.distribution.WeibullDistributionImpl", "org.apache.commons.math.analysis.UnivariateRealFunction", "org.apache.commons.math.distribution.PascalDistribution", "org.apache.commons.math.special.Gamma$1", "org.apache.commons.math.distribution.GammaDistribution", "org.apache.commons.math.util.ContinuedFraction", "org.apache.commons.math.distribution.Distribution", "org.apache.commons.math.random.RandomGenerator", "org.apache.commons.math.exception.MathIllegalArgumentException", "org.apache.commons.math.distribution.FDistributionImpl", "org.apache.commons.math.distribution.NormalDistribution", "org.apache.commons.math.distribution.SaddlePointExpansion", "org.apache.commons.math.distribution.HypergeometricDistributionImpl", "org.apache.commons.math.MathRuntimeException", "org.apache.commons.math.exception.MathIllegalNumberException", "org.apache.commons.math.distribution.BinomialDistribution", "org.apache.commons.math.distribution.ZipfDistributionImpl", "org.apache.commons.math.MathRuntimeException$1", "org.apache.commons.math.MathRuntimeException$2", "org.apache.commons.math.MathRuntimeException$3", "org.apache.commons.math.MathRuntimeException$4", "org.apache.commons.math.MathRuntimeException$5", "org.apache.commons.math.random.AbstractRandomGenerator", "org.apache.commons.math.random.Well44497b", "org.apache.commons.math.MathRuntimeException$6", "org.apache.commons.math.random.Well44497a", "org.apache.commons.math.MathRuntimeException$7", "org.apache.commons.math.distribution.NormalDistributionImpl", "org.apache.commons.math.MathRuntimeException$8", "org.apache.commons.math.MathRuntimeException$10", "org.apache.commons.math.MathRuntimeException$9", "org.apache.commons.math.MathRuntimeException$11", "org.apache.commons.math.distribution.ExponentialDistribution", "org.apache.commons.math.distribution.GammaDistributionImpl", "org.apache.commons.math.distribution.AbstractIntegerDistribution", "org.apache.commons.math.random.RandomData", "org.apache.commons.math.distribution.HasDensity", "org.apache.commons.math.random.MersenneTwister", "org.apache.commons.math.random.AbstractWell", "org.apache.commons.math.distribution.HypergeometricDistribution", "org.apache.commons.math.special.Erf", "org.apache.commons.math.random.RandomDataImpl", "org.apache.commons.math.distribution.BetaDistributionImpl", "org.apache.commons.math.distribution.PascalDistributionImpl", "org.apache.commons.math.exception.NumberIsTooLargeException", "org.apache.commons.math.distribution.BetaDistribution", "org.apache.commons.math.distribution.CauchyDistributionImpl", "org.apache.commons.math.MaxIterationsExceededException", "org.apache.commons.math.distribution.CauchyDistribution", "org.apache.commons.math.special.Gamma", "org.apache.commons.math.distribution.FDistribution", "org.apache.commons.math.exception.util.Localizable", "org.apache.commons.math.random.Well1024a", "org.apache.commons.math.random.Well512a", "org.apache.commons.math.FunctionEvaluationException", "org.apache.commons.math.distribution.TDistribution", "org.apache.commons.math.distribution.ExponentialDistributionImpl", "org.apache.commons.math.distribution.DiscreteDistribution", "org.apache.commons.math.distribution.BinomialDistributionImpl", "org.apache.commons.math.random.TestRandomGenerator", "org.apache.commons.math.random.BitsStreamGenerator", "org.apache.commons.math.distribution.TDistributionImpl", "org.apache.commons.math.distribution.AbstractContinuousDistribution", "org.apache.commons.math.exception.util.LocalizedFormats", "org.apache.commons.math.distribution.PoissonDistributionImpl", "org.apache.commons.math.distribution.ChiSquaredDistributionImpl", "org.apache.commons.math.random.RandomAdaptor", "org.apache.commons.math.distribution.ZipfDistribution", "org.apache.commons.math.distribution.AbstractDistribution" ); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
e2c497f13359e61f8deb17378a0c5632e29735c4
8eac9fe5030455cb9d1692d2136fa79046fa3350
/src/main/java/com/i4one/base/model/emailblast/PrivilegedEmailBlastManager.java
8757dff7bf75ea200ff205c98b3e14550bbf4161
[ "MIT" ]
permissive
badiozam/concord
1987190d9aac2fb89b990e561acab6a59275bd7b
343842aa69f25ff9917e51936eabe72999b81407
refs/heads/master
2022-12-24T06:29:32.881068
2020-07-01T19:26:05
2020-07-01T19:26:05
149,226,043
0
0
MIT
2022-12-16T09:44:00
2018-09-18T03:53:29
Java
UTF-8
Java
false
false
3,701
java
/* * MIT License * * Copyright (c) 2018 i4one Interactive, LLC * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.i4one.base.model.emailblast; import com.i4one.base.model.targeting.TargetListPagination; import com.i4one.base.dao.PaginableRecordTypeDao; import com.i4one.base.model.ReturnType; import com.i4one.base.model.client.SingleClient; import com.i4one.base.model.manager.BaseClientTypePrivilegedManager; import com.i4one.base.model.manager.Manager; import com.i4one.base.model.manager.pagination.PaginationFilter; import com.i4one.base.model.user.User; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; /** * @author Hamid Badiozamani */ @Service public class PrivilegedEmailBlastManager extends BaseClientTypePrivilegedManager<EmailBlastRecord,EmailBlast> implements EmailBlastManager { private EmailBlastManager emailBlastManager; @Override public Set<EmailBlast> getFuture(SingleClient client, int asOf, PaginationFilter pagination) { checkRead(client, "getFuture"); return getEmailBlastManager().getFuture(client, asOf, pagination); } @Override public Set<EmailBlast> getLive(SingleClient client, int asOf, PaginationFilter pagination) { checkRead(client, "getLive"); return getEmailBlastManager().getLive(client, asOf, pagination); } @Override public Set<EmailBlast> getCompleted(SingleClient client, int asOf, PaginationFilter pagination) { checkRead(client, "getCompleted"); return getEmailBlastManager().getCompleted(client, asOf, pagination); } @Override public ReturnType<EmailBlast> updateAttributes(EmailBlast item) { checkWrite(item.getClient(), "update"); return getEmailBlastManager().updateAttributes(item); } @Override public Set<User> getTargetUsers(EmailBlast emailBlast, TargetListPagination pagination) { return getEmailBlastManager().getTargetUsers(emailBlast, pagination); } @Override public SingleClient getClient(EmailBlast item) { getLogger().debug("Getting client for " + item); return item.getClient(); } @Override public Manager<EmailBlastRecord, EmailBlast> getImplementationManager() { return getEmailBlastManager(); } public EmailBlastManager getEmailBlastManager() { return emailBlastManager; } @Autowired @Qualifier("base.TargetableEmailBlastManager") public void setEmailBlastManager(EmailBlastManager emailBlastManager) { this.emailBlastManager = emailBlastManager; } @Override public PaginableRecordTypeDao<EmailBlastRecord> getDao() { return getEmailBlastManager().getDao(); } }
[ "badiozam@yahoo.com" ]
badiozam@yahoo.com
00ce1cf852135653f5a698b6c4a9d4e13126cf3f
2cf1bc5cf3f469f9fd6fa1c3ef73370e8474c54d
/trunk_huawei/client/proj.android/src/org/cocos2dx/lua/LogoActivity.java
bce10bd286f8d2049ba0047bbfd445c239df118e
[]
no_license
atom-chen/project_war
284ad934f5840a8cfb8d395799071b527ebc1214
c48450d317233e7c6223720983872aab3110c17e
refs/heads/master
2020-06-17T07:36:30.120348
2017-10-06T09:07:41
2017-10-06T09:07:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
752
java
package org.cocos2dx.lua; import java.util.Timer; import java.util.TimerTask; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Handler; import android.os.Bundle; import com.onekes.kittycrush.hwgame.R; public class LogoActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.logo_onekes); new Handler().postDelayed( new Runnable() { public void run() { Intent mainIntent = new Intent(LogoActivity.this, AppActivity.class); LogoActivity.this.startActivity(mainIntent); LogoActivity.this.finish(); } } , 2000); } }
[ "892134825@qq.com" ]
892134825@qq.com
75893ade5a8a1d2204344edd5d44dfa6d5f70d9d
0aba998b1086a96ae6aace53c4c6a7365dfdf30c
/src/main/java/me/itzg/mccy/model/ModPack.java
cc325b5a9c200eac3a34a90bee53d7771d14f57c
[ "Apache-2.0" ]
permissive
gloppasglop/minecraft-container-yard
53a891100bf29f286ea54f6a3fd1eea2a979e315
c97780f70e896144058a04b5fc05dc88159fa546
refs/heads/master
2021-01-16T17:46:42.837118
2016-02-06T04:40:27
2016-02-06T04:40:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,820
java
package me.itzg.mccy.model; import com.google.common.hash.HashFunction; import com.google.common.hash.Hasher; import org.springframework.data.annotation.Id; import org.springframework.data.elasticsearch.annotations.Document; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.Date; /** * A lightweight document is created for each combination of selected mod. * * @author Geoff Bourne * @since 0.1 */ @Document(indexName = "mccy") public class ModPack { @Id @NotNull private String id; /** * Corresponds to the {@link com.fasterxml.jackson.annotation.JsonTypeInfo} of the {@link RegisteredMod} subclass */ @NotNull @Size(min = 1) private String modType; @Size(min = 1) private Collection<String> mods; private Date lastAccess; public static String computeId(HashFunction hashFunction, Collection<String> modIds) { final Hasher hasher = hashFunction.newHasher(); modIds.stream() .sorted() .forEachOrdered(id -> hasher.putString(id, StandardCharsets.UTF_8)); return hasher.hash().toString(); } public String getId() { return id; } public void setId(String id) { this.id = id; } public Collection<String> getMods() { return mods; } public void setMods(Collection<String> mods) { this.mods = mods; } public Date getLastAccess() { return lastAccess; } public void setLastAccess(Date lastAccess) { this.lastAccess = lastAccess; } public String getModType() { return modType; } public void setModType(String modType) { this.modType = modType; } }
[ "itzgeoff@gmail.com" ]
itzgeoff@gmail.com
4059dc6f6e049bcbd42abe1d877071ae9382dafb
d67dbb4814c58e186c21a6f849ceb2767ed79f71
/app/src/main/java/com/shaoyue/weizhegou/module/web/WebNewShareFragment.java
9ff997489275a9e189929e60e0e24eaf847d6d61
[ "Apache-2.0" ]
permissive
coypanglei/nanjinJianduo
3234b04c18e5d5e36abfc111e3bde1704c47d2a1
b6ca49d6fa1182bbf61214338ab08aba63786e4a
refs/heads/master
2020-08-29T22:45:15.801910
2020-04-27T09:13:09
2020-04-27T09:13:09
218,192,749
0
0
null
null
null
null
UTF-8
Java
false
false
7,970
java
package com.shaoyue.weizhegou.module.web; import android.graphics.Bitmap; import android.os.Build; import android.os.Bundle; import android.text.TextUtils; import android.view.KeyEvent; import android.view.View; import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ProgressBar; import com.blankj.utilcode.util.LogUtils; import com.blankj.utilcode.util.ObjectUtils; import com.shaoyue.weizhegou.R; import com.shaoyue.weizhegou.api.callback.BaseCallback; import com.shaoyue.weizhegou.api.model.BaseResponse; import com.shaoyue.weizhegou.api.remote.AccountApi; import com.shaoyue.weizhegou.base.BaseTitleFragment; import com.shaoyue.weizhegou.util.ToastUtil; import com.umeng.socialize.ShareAction; import com.umeng.socialize.UMShareListener; import com.umeng.socialize.bean.SHARE_MEDIA; import com.umeng.socialize.media.UMImage; import com.umeng.socialize.shareboard.ShareBoardConfig; import butterknife.BindView; /** * Created by bin on 17/7/6. */ public class WebNewShareFragment extends BaseTitleFragment { public static final String EXTRA_TITLE = "extra_title"; public static final String EXTRA_WEB_URL = "extra_web_url"; public static final String EXTRA_ICON_URL = "extra_icon_url"; @BindView(R.id.webView) WebView mWebView; @BindView(R.id.progress_bar) ProgressBar mProgressBar; private String mTitle; private String mWebUrl; private String mIconUrl; public static WebNewShareFragment newInstance(String title, String url, String iconUrl) { WebNewShareFragment fragment = new WebNewShareFragment(); Bundle args = new Bundle(); args.putString(EXTRA_TITLE, title); args.putString(EXTRA_WEB_URL, url); args.putString(EXTRA_ICON_URL, iconUrl); fragment.setArguments(args); return fragment; } @Override public void onDestroyView() { super.onDestroyView(); if (mWebView != null) { mWebView.destroy(); } } @Override protected void initBundle(Bundle bundle) { super.initBundle(bundle); if (getArguments() != null) { mTitle = getArguments().getString(EXTRA_TITLE); mWebUrl = getArguments().getString(EXTRA_WEB_URL); mIconUrl = getArguments().getString(EXTRA_ICON_URL); } if (TextUtils.isEmpty(mWebUrl)) { removeFragment(); } } @Override protected int getContentLayoutId() { return R.layout.fragment_new_web; } @Override protected void initView(View rootView) { super.initView(rootView); if (!ObjectUtils.isEmpty(mTitle)) { setCommonTitle(mTitle).setImgLeftListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mWebView != null && mWebView.canGoBack()) { mWebView.goBack(); } else { removeFragment(); } } }).setRightBtnV3(R.drawable.share_btn_select, new View.OnClickListener() { @Override public void onClick(View view) { ShareBoardConfig config = new ShareBoardConfig();//新建ShareBoardConfig config.setShareboardPostion(ShareBoardConfig.SHAREBOARD_POSITION_CENTER);//设置位置 config.setIndicatorVisibility(false); UMImage image = new UMImage(getActivity(), mIconUrl); new ShareAction(getActivity()).withMedia(image).setDisplayList(SHARE_MEDIA.WEIXIN_CIRCLE) .setCallback(shareListener).open(config); } }); } initWebView(); mWebView.loadUrl(mWebUrl); } private UMShareListener shareListener = new UMShareListener() { /** * @descrption 分享开始的回调 * @param platform 平台类型 */ @Override public void onStart(SHARE_MEDIA platform) { LogUtils.e(platform.getName()); } /** * @descrption 分享成功的回调 * @param platform 平台类型 */ @Override public void onResult(SHARE_MEDIA platform) { AccountApi.shareTime(new BaseCallback<BaseResponse<Void>>() { @Override public void onSucc(BaseResponse<Void> result) { ToastUtil.showSuccToast(getString(R.string.t_share_success)); } }, this); } /** * @descrption 分享失败的回调 * @param platform 平台类型 * @param t 错误原因 */ @Override public void onError(SHARE_MEDIA platform, Throwable t) { ToastUtil.showToast(getString(R.string.t_sharing_failure)); } /** * @descrption 分享取消的回调 * @param platform 平台类型 */ @Override public void onCancel(SHARE_MEDIA platform) { LogUtils.e("error"); // LogUtils.e(platform.getName()); } }; private void initWebView() { WebSettings webSettings = mWebView.getSettings(); webSettings.setJavaScriptEnabled(true); // 启用支持javascript webSettings.setAllowFileAccess(true); // 可以访问文件 webSettings.setUseWideViewPort(true); webSettings.setLoadWithOverviewMode(true); webSettings.setDomStorageEnabled(true); // 开启 DOM storage API 功能 String ua = webSettings.getUserAgentString(); webSettings.setUserAgentString(ua + "(MDAPP)"); // 先加载网页再加载图片 if (Build.VERSION.SDK_INT >= 19) { mWebView.getSettings().setLoadsImagesAutomatically(true); } else { mWebView.getSettings().setLoadsImagesAutomatically(false); } mWebView.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); mProgressBar.setVisibility(View.VISIBLE); } @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); mProgressBar.setVisibility(View.GONE); // if (ObjectUtils.isNotEmpty(view.getTitle()) && !view.getTitle().equals("Title")) { // setTitleText(view.getTitle()); // } } }); mWebView.setWebChromeClient(new WebChromeClient() { @Override public void onProgressChanged(WebView view, int newProgress) { super.onProgressChanged(view, newProgress); if (newProgress > 90) { mProgressBar.setVisibility(View.GONE); } } }); mWebView.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { if (keyCode == KeyEvent.KEYCODE_BACK && keyEvent.getRepeatCount() == 0) { if (mWebView != null && mWebView.canGoBack()) { mWebView.goBack(); } else { removeFragment(); } return true; } } return false; } }); } }
[ "434604925@qq.com" ]
434604925@qq.com
b70b4fae4f2b9c60275ed3d09440ac94a981dc15
c17758a18e1ba6e01efb90ab72401273cf4e7f9a
/src/test/java/org/corfudb/runtime/clients/NettyCommTest.java
9f1ed805d2761830bb44034243505a4629eb02ad
[ "Apache-2.0" ]
permissive
ohadshacham/CorfuDB
fa0d7718f6eb882213725be9b5c64c3da4d3f92a
c09e40f4d495fa9fb166c6a856d1f29a91e12765
refs/heads/master
2020-12-24T09:56:04.598086
2016-06-09T12:54:52
2016-06-09T12:54:52
60,770,846
0
0
null
2016-06-09T11:47:42
2016-06-09T11:47:42
null
UTF-8
Java
false
false
5,187
java
package org.corfudb.runtime.clients; import io.netty.bootstrap.ServerBootstrap; import io.netty.buffer.PooledByteBufAllocator; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.codec.LengthFieldBasedFrameDecoder; import io.netty.handler.codec.LengthFieldPrepender; import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; import io.netty.util.concurrent.DefaultEventExecutorGroup; import io.netty.util.concurrent.EventExecutorGroup; import lombok.extern.slf4j.Slf4j; import org.corfudb.AbstractCorfuTest; import org.corfudb.infrastructure.BaseServer; import org.corfudb.infrastructure.NettyServerRouter; import org.corfudb.protocols.wireprotocol.NettyCorfuMessageDecoder; import org.corfudb.protocols.wireprotocol.NettyCorfuMessageEncoder; import org.junit.Test; import java.io.IOException; import java.net.ServerSocket; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; import static org.assertj.core.api.Assertions.assertThat; /** * Created by mwei on 3/28/16. */ @Slf4j public class NettyCommTest extends AbstractCorfuTest { private Integer findRandomOpenPort() throws IOException { try ( ServerSocket socket = new ServerSocket(0); ) { return socket.getLocalPort(); } } @Test public void nettyServerClientPingable() throws Exception { NettyServerRouter nsr = new NettyServerRouter(); nsr.addServer(new BaseServer(nsr)); int port = findRandomOpenPort(); // Create the event loops responsible for servicing inbound messages. EventLoopGroup bossGroup; EventLoopGroup workerGroup; EventExecutorGroup ee; bossGroup = new NioEventLoopGroup(1, new ThreadFactory() { final AtomicInteger threadNum = new AtomicInteger(0); @Override public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName("accept-" +threadNum.getAndIncrement()); return t; } }); workerGroup = new NioEventLoopGroup(Runtime.getRuntime().availableProcessors() * 2, new ThreadFactory() { final AtomicInteger threadNum = new AtomicInteger(0); @Override public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName("io-" + threadNum.getAndIncrement()); return t; } }); ee = new DefaultEventExecutorGroup(Runtime.getRuntime().availableProcessors() * 2, new ThreadFactory() { final AtomicInteger threadNum = new AtomicInteger(0); @Override public Thread newThread(Runnable r) { Thread t = new Thread(r); t.setName("event-" + threadNum.getAndIncrement()); return t; } }); try { ServerBootstrap b = new ServerBootstrap(); b.group(bossGroup, workerGroup) .channel(NioServerSocketChannel.class) .option(ChannelOption.SO_BACKLOG, 100) .childOption(ChannelOption.SO_KEEPALIVE, true) .childOption(ChannelOption.TCP_NODELAY, true) .childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT) .handler(new LoggingHandler(LogLevel.INFO)) .childHandler(new ChannelInitializer<SocketChannel>() { @Override public void initChannel(io.netty.channel.socket.SocketChannel ch) throws Exception { ch.pipeline().addLast(new LengthFieldPrepender(4)); ch.pipeline().addLast(new LengthFieldBasedFrameDecoder(Integer.MAX_VALUE, 0, 4, 0, 4)); ch.pipeline().addLast(ee, new NettyCorfuMessageDecoder()); ch.pipeline().addLast(ee, new NettyCorfuMessageEncoder()); ch.pipeline().addLast(ee, nsr); } }); ChannelFuture f = b.bind(port).sync(); NettyClientRouter ncr = new NettyClientRouter("localhost", port); try { ncr.addClient(new BaseClient()); ncr.start(); assertThat(ncr.getClient(BaseClient.class).pingSync()) .isTrue(); } finally { ncr.stop(); } f.channel().close(); } catch (InterruptedException ie) { } catch (Exception ex) { log.error("Corfu server shut down unexpectedly due to exception", ex); } finally { bossGroup.shutdownGracefully(); workerGroup.shutdownGracefully(); } } }
[ "mwei@cs.ucsd.edu" ]
mwei@cs.ucsd.edu
14772814b573597267f5fa28f8e5e2621f80c8f9
63f95f4c630170298cf2f914948eca00b008d9e8
/src/lesson2/ObjectTest.java
c1c34c7dbc7cdfe928a2d7531ec0dffc5a5f822b
[ "MIT" ]
permissive
itfi-mgn/java2020-2
f404b42214b7f83a111dc9489009883dc494561f
c4bf7206cae553b8d4b5e16158961c8b15749785
refs/heads/master
2023-02-15T18:49:50.932282
2021-01-19T14:44:29
2021-01-19T14:44:29
299,551,343
0
0
null
null
null
null
UTF-8
Java
false
false
926
java
package lesson2; public class ObjectTest { static String prefix = "sd"; public static void main(String[] args) { // TODO Auto-generated method stub Object obj = new Object(); Class<? extends Object> cl = obj.getClass(); System.err.println("Obj="+obj.toString()); String s = "sdsdsd", s1 = prefix+"sdsd"; System.err.println("Eq: "+s.equals(s1)); java.lang.Number n; // java.lang.Byte b; // byte java.lang.Short sh; // short java.lang.Integer i; // int java.lang.Long L; // long java.lang.Float f; // float java.lang.Double d; // double java.lang.Boolean z; // boolean java.lang.Character c; // char obj = 10; // obj = Integer.valueOf(10); Integer i1 = 10, i2 = 20, i3 = Integer.valueOf("10"); // Integer i1 = Integer.vauleOf(10), i2 = Integer.valueOf(20), // i3 = Integer.valueOf(i1.intValue()+i2.intValue()); } }
[ "chav1961@mail.ru" ]
chav1961@mail.ru
20cefb4adf31410117c1f736d2abdc2585e4a782
46ef04782c58b3ed1d5565f8ac0007732cddacde
/app/xmi/src/org/modelio/xmi/model/ecore/EReadLinkAction.java
05b8d40ed70d735b7052c2a2aa44d1bd4dbe0c1c
[]
no_license
daravi/modelio
844917412abc21e567ff1e9dd8b50250515d6f4b
1787c8a836f7e708a5734d8bb5b8a4f1a6008691
refs/heads/master
2020-05-26T17:14:03.996764
2019-05-23T21:30:10
2019-05-23T21:30:45
188,309,762
0
1
null
null
null
null
UTF-8
Java
false
false
2,273
java
/* * Copyright 2013-2018 Modeliosoft * * This file is part of Modelio. * * Modelio is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Modelio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Modelio. If not, see <http://www.gnu.org/licenses/>. * */ package org.modelio.xmi.model.ecore; import com.modeliosoft.modelio.javadesigner.annotations.objid; import org.modelio.metamodel.mmextensions.infrastructure.ElementNotUniqueException; import org.modelio.metamodel.mmextensions.standard.factory.IStandardModelFactory; import org.modelio.metamodel.mmextensions.standard.services.IMModelServices; import org.modelio.metamodel.uml.behavior.activityModel.OpaqueAction; import org.modelio.metamodel.uml.infrastructure.Element; import org.modelio.xmi.plugin.Xmi; import org.modelio.xmi.reverse.ReverseProperties; import org.modelio.xmi.util.IModelerModuleStereotypes; import org.modelio.xmi.util.XMIProperties; @objid ("0d527267-c2af-44cc-a842-3c87374a7b66") public class EReadLinkAction extends EActivityNode { @objid ("b00be9c9-8d3b-4ef4-b0af-952bd8277468") @Override public Element createObjingElt() { IMModelServices mmServices = ReverseProperties.getInstance().getMModelServices(); OpaqueAction element = mmServices.getModelFactory().getFactory(IStandardModelFactory.class).createOpaqueAction(); try { element.getExtension().add(mmServices.getStereotype(XMIProperties.modelerModuleName, IModelerModuleStereotypes.UML2READLINKACTION, element.getMClass())); } catch (ElementNotUniqueException e) { Xmi.LOG.warning(e); } return element; } @objid ("3e35910f-11cd-487c-a881-a1d4105136b2") public EReadLinkAction(org.eclipse.uml2.uml.ReadLinkAction element) { super(element); } }
[ "puya@motionmetrics.com" ]
puya@motionmetrics.com
fa3ac7c08ca0d3a637129f71bd1e5d7f0ba54dce
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.minihd.qq/assets/exlibs.1.jar/classes.jar/tencent/im/msg/im_msg_body$MsgDecodeTestMapElem.java
1eaa7cd4fcb2afedfb796b68cbd450ef182ecc3a
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
1,009
java
package tencent.im.msg; import com.tencent.mobileqq.pb.MessageMicro; import com.tencent.mobileqq.pb.MessageMicro.FieldMap; import com.tencent.mobileqq.pb.PBField; import com.tencent.mobileqq.pb.PBUInt32Field; import com.tencent.mobileqq.pb.PBUInt64Field; public final class im_msg_body$MsgDecodeTestMapElem extends MessageMicro { public static final int KEY_FIELD_NUMBER = 1; public static final int VALUE_FIELD_NUMBER = 2; static final MessageMicro.FieldMap __fieldMap__ = MessageMicro.initFieldMap(new int[] { 8, 16 }, new String[] { "key", "value" }, new Object[] { Integer.valueOf(0), Long.valueOf(0L) }, MsgDecodeTestMapElem.class); public final PBUInt32Field key = PBField.initUInt32(0); public final PBUInt64Field value = PBField.initUInt64(0L); } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.minihd.qq\assets\exlibs.1.jar\classes.jar * Qualified Name: tencent.im.msg.im_msg_body.MsgDecodeTestMapElem * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
0f43cac849398569a904d1ec85f9c5786b1dbafd
0b666255a6945aa84281e5f64f6ccaab45c4ca13
/cmsv2.0.0/src/com/app/cms/manager/main/CmsModelItemMng.java
5012905d8b9d00179bbc3321c9bffca50acd805c
[]
no_license
zhangygit/cmsv2.0.0
a8cdc77ceb99b50bdf5b8ac7c99244c3ecc7e43a
d54ae6bc9855860c7d447629d31d22e2c9417d31
refs/heads/master
2021-01-17T21:28:52.841407
2014-08-25T02:13:00
2014-08-25T02:13:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
710
java
package com.app.cms.manager.main; import java.util.List; import com.app.cms.entity.main.CmsModelItem; public interface CmsModelItemMng { public List<CmsModelItem> getList(Integer modelId, boolean isChannel, boolean hasDisabled); public CmsModelItem findById(Integer id); public CmsModelItem save(CmsModelItem bean); public CmsModelItem save(CmsModelItem bean, Integer modelId); public void saveList(List<CmsModelItem> list); public void updatePriority(Integer[] wids, Integer[] priority, String[] label, Boolean[] single, Boolean[] display); public CmsModelItem update(CmsModelItem bean); public CmsModelItem deleteById(Integer id); public CmsModelItem[] deleteByIds(Integer[] ids); }
[ "17909328@163.com" ]
17909328@163.com
419ca0fa534c17b9f5e3ec5a61012b72dc2adbed
571ce46236afb5d836b713c5f3cc165db5d2ae77
/packages/apps/PrizeSettings/ext/src/com/mediatek/settings/ext/IDataUsageSummaryExt.java
38d7d8f7b79ed8dbc4451116601ce608c8c8e766
[ "Apache-2.0" ]
permissive
sengeiou/prize
d6f56746ba82e0bbdaa47b5bea493ceddb0abd0c
e27911e194c604bf651f7bed0f5f9ce8f7dc8d4d
refs/heads/master
2020-04-28T04:45:42.207852
2018-11-23T13:50:20
2018-11-23T13:50:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,636
java
package com.mediatek.settings.ext; import java.util.Map; import android.app.Activity; import android.content.Context; import android.content.IntentFilter; import android.support.v7.preference.Preference; import android.view.View; import android.view.View.OnClickListener; import android.widget.Switch; public interface IDataUsageSummaryExt { static final String TAG_BG_DATA_SWITCH = "bgDataSwitch"; static final String TAG_BG_DATA_SUMMARY = "bgDataSummary"; static final String TAG_BG_DATA_APP_DIALOG_TITLE = "bgDataDialogTitle"; static final String TAG_BG_DATA_APP_DIALOG_MESSAGE = "bgDataDialogMessage"; static final String TAG_BG_DATA_MENU_DIALOG_MESSAGE = "bgDataMenuDialogMessage"; static final String TAG_BG_DATA_RESTRICT_DENY_MESSAGE = "bgDataRestrictDenyMessage"; /** * Called when user trying to disabling data * @param subId the sub id been disabling * @return true if need handled disabling data by host, false if plug-in handled * @internal */ boolean onDisablingData(int subId); /** * Called when DataUsageSummary need set data switch state such as clickable. * @param subId current SIM subId * @return true if allow data switch. * @internal */ public boolean isAllowDataEnable(int subId); /** * Called when host bind the view, plug-in should set customized onClickListener and call * the passed listener.onClick if necessary * @param context context of the host app * @param view the view need to set onClickListener * @param listener view on click listener * @internal */ public void onBindViewHolder(Context context, View view, OnClickListener listener); /** * Customize data usage background data restrict string by tag. * @param: default string. * @param: tag string. * @return: customized summary string. * @internal */ public String customizeBackgroundString(String defStr, String tag); /** * Customize for Orange * Show popup informing user about data enable/disable * @param mDataEnabledView : data enabled view for which click listener will be set by plugin * @param mDataEnabledDialogListerner : click listener for dialog created by plugin * @param isChecked : whether data is enabled or not * @internal */ public boolean setDataEnableClickListener(Activity activity, View dataEnabledView, Switch dataEnabled, View.OnClickListener dataEnabledDialogListerner); /** * For different operator to show a host dialog * @internal */ public boolean needToShowDialog(); /** * Called when DataUsageSummary updateBody() * @param subId * @internal */ public void setCurrentTab(int subId); /** * Called when DataUsageSummary onCreate() * @param mobileDataEnabled * @internal */ public void create(Map<String, Boolean> mobileDataEnabled); /** * Called when DataUsageSummary onDestory() * @internal */ public void destroy( ); /** * Called when DataUsageSummary need set data switch state such as clickable. * @param view View * @param subId current tab's SIM subId * @return true if allow data switch. */ public boolean isAllowDataEnable(View view, int subId); /** * Customize when OP07 * Set summary for mobile data switch. * @param p cellDataPreference of mobile data item. */ void setPreferenceSummary(Preference p); void customReceiver(IntentFilter intentFilter); boolean customDualReceiver(String action); }
[ "18218724438@163.com" ]
18218724438@163.com
38591022b6cd36a42e41551642a1cf38af44aa18
87f6c91bcd6a16a286e24a9e548e6514e1b106e6
/pattern/src/com/zsy/pattern/create/singleton/Instance.java
b11f85964495d024f5b94f3cfd027527fadf0319
[]
no_license
ZhaoShuyin/JavaBase
c0b72e1b215e8c448edae3de156b8e22c4187fa1
3bf6a2e6a374a5ff7c05bdcd9042ef5f463aff2c
refs/heads/master
2021-11-12T22:37:22.530646
2021-11-08T08:54:20
2021-11-08T08:54:20
199,960,040
1
0
null
null
null
null
UTF-8
Java
false
false
440
java
package com.zsy.pattern.create.singleton; class Instance { private Instance() { } private static Instance instance = null; public static synchronized Instance getInstance() { try { Thread.sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } if (instance == null) { instance = new Instance(); } return instance; } }
[ "zhaoshuyin89@163.com" ]
zhaoshuyin89@163.com
4ee256408255dbc503a213660ba05df269d9942d
4277a3ddcc364be2f5716726449157be07f69144
/src/main/java/com/ecommerce/web/rest/ProductResource.java
614a524690a52fd4c7b859d3c0fe722507259752
[]
no_license
geovafc/ecommerce-application
750d48af3c4935151f4465ac5f7249d67167bb44
5196df6e22149bcc7cbb250304a1bddc78898e0f
refs/heads/main
2023-08-29T08:45:30.663425
2021-10-14T18:34:58
2021-10-14T18:34:58
417,232,248
0
0
null
2021-10-14T18:34:58
2021-10-14T17:57:56
Java
UTF-8
Java
false
false
7,954
java
package com.ecommerce.web.rest; import com.ecommerce.domain.Product; import com.ecommerce.repository.ProductRepository; import com.ecommerce.service.ProductService; import com.ecommerce.web.rest.errors.BadRequestAlertException; import java.net.URI; import java.net.URISyntaxException; import java.util.List; import java.util.Objects; import java.util.Optional; import javax.validation.Valid; import javax.validation.constraints.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import tech.jhipster.web.util.HeaderUtil; import tech.jhipster.web.util.PaginationUtil; import tech.jhipster.web.util.ResponseUtil; /** * REST controller for managing {@link com.ecommerce.domain.Product}. */ @RestController @RequestMapping("/api") public class ProductResource { private final Logger log = LoggerFactory.getLogger(ProductResource.class); private static final String ENTITY_NAME = "product"; @Value("${jhipster.clientApp.name}") private String applicationName; private final ProductService productService; private final ProductRepository productRepository; public ProductResource(ProductService productService, ProductRepository productRepository) { this.productService = productService; this.productRepository = productRepository; } /** * {@code POST /products} : Create a new product. * * @param product the product to create. * @return the {@link ResponseEntity} with status {@code 201 (Created)} and with body the new product, or with status {@code 400 (Bad Request)} if the product has already an ID. * @throws URISyntaxException if the Location URI syntax is incorrect. */ @PostMapping("/products") public ResponseEntity<Product> createProduct(@Valid @RequestBody Product product) throws URISyntaxException { log.debug("REST request to save Product : {}", product); if (product.getId() != null) { throw new BadRequestAlertException("A new product cannot already have an ID", ENTITY_NAME, "idexists"); } Product result = productService.save(product); return ResponseEntity .created(new URI("/api/products/" + result.getId())) .headers(HeaderUtil.createEntityCreationAlert(applicationName, true, ENTITY_NAME, result.getId().toString())) .body(result); } /** * {@code PUT /products/:id} : Updates an existing product. * * @param id the id of the product to save. * @param product the product to update. * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated product, * or with status {@code 400 (Bad Request)} if the product is not valid, * or with status {@code 500 (Internal Server Error)} if the product couldn't be updated. * @throws URISyntaxException if the Location URI syntax is incorrect. */ @PutMapping("/products/{id}") public ResponseEntity<Product> updateProduct( @PathVariable(value = "id", required = false) final Long id, @Valid @RequestBody Product product ) throws URISyntaxException { log.debug("REST request to update Product : {}, {}", id, product); if (product.getId() == null) { throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); } if (!Objects.equals(id, product.getId())) { throw new BadRequestAlertException("Invalid ID", ENTITY_NAME, "idinvalid"); } if (!productRepository.existsById(id)) { throw new BadRequestAlertException("Entity not found", ENTITY_NAME, "idnotfound"); } Product result = productService.save(product); return ResponseEntity .ok() .headers(HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, product.getId().toString())) .body(result); } /** * {@code PATCH /products/:id} : Partial updates given fields of an existing product, field will ignore if it is null * * @param id the id of the product to save. * @param product the product to update. * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated product, * or with status {@code 400 (Bad Request)} if the product is not valid, * or with status {@code 404 (Not Found)} if the product is not found, * or with status {@code 500 (Internal Server Error)} if the product couldn't be updated. * @throws URISyntaxException if the Location URI syntax is incorrect. */ @PatchMapping(value = "/products/{id}", consumes = { "application/json", "application/merge-patch+json" }) public ResponseEntity<Product> partialUpdateProduct( @PathVariable(value = "id", required = false) final Long id, @NotNull @RequestBody Product product ) throws URISyntaxException { log.debug("REST request to partial update Product partially : {}, {}", id, product); if (product.getId() == null) { throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull"); } if (!Objects.equals(id, product.getId())) { throw new BadRequestAlertException("Invalid ID", ENTITY_NAME, "idinvalid"); } if (!productRepository.existsById(id)) { throw new BadRequestAlertException("Entity not found", ENTITY_NAME, "idnotfound"); } Optional<Product> result = productService.partialUpdate(product); return ResponseUtil.wrapOrNotFound( result, HeaderUtil.createEntityUpdateAlert(applicationName, true, ENTITY_NAME, product.getId().toString()) ); } /** * {@code GET /products} : get all the products. * * @param pageable the pagination information. * @return the {@link ResponseEntity} with status {@code 200 (OK)} and the list of products in body. */ @GetMapping("/products") public ResponseEntity<List<Product>> getAllProducts(Pageable pageable) { log.debug("REST request to get a page of Products"); Page<Product> page = productService.findAll(pageable); HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(ServletUriComponentsBuilder.fromCurrentRequest(), page); return ResponseEntity.ok().headers(headers).body(page.getContent()); } /** * {@code GET /products/:id} : get the "id" product. * * @param id the id of the product to retrieve. * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the product, or with status {@code 404 (Not Found)}. */ @GetMapping("/products/{id}") public ResponseEntity<Product> getProduct(@PathVariable Long id) { log.debug("REST request to get Product : {}", id); Optional<Product> product = productService.findOne(id); return ResponseUtil.wrapOrNotFound(product); } /** * {@code DELETE /products/:id} : delete the "id" product. * * @param id the id of the product to delete. * @return the {@link ResponseEntity} with status {@code 204 (NO_CONTENT)}. */ @DeleteMapping("/products/{id}") public ResponseEntity<Void> deleteProduct(@PathVariable Long id) { log.debug("REST request to delete Product : {}", id); productService.delete(id); return ResponseEntity .noContent() .headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString())) .build(); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
b6dd294374cb57d802e8c75ced80e07e9dc8eea6
eaea633a2a5b96fb53298ad895b74974aced0162
/src/org/blender/dna/MLoopCol.java
7be4f898734a6f377a8fd1bf9b67ca1f69ca6cef
[]
no_license
homacs/org.cakelab.blender.dna
ccd981df698519a4df149698b17878d2dd240f3e
ae684606e1ee221b7b3d43454efb33dda01c70b1
refs/heads/master
2023-04-05T14:52:31.962419
2023-01-03T13:45:16
2023-01-03T13:45:16
204,024,485
11
3
null
null
null
null
UTF-8
Java
false
false
6,045
java
package org.blender.dna; import java.io.IOException; import org.cakelab.blender.io.block.Block; import org.cakelab.blender.io.block.BlockTable; import org.cakelab.blender.io.dna.internal.StructDNA; import org.cakelab.blender.nio.CFacade; import org.cakelab.blender.nio.CMetaData; import org.cakelab.blender.nio.CPointer; /** * Generated facet for DNA struct type 'MLoopCol'. * * <h3>Class Documentation</h3> * * <h4>Blender Source Code</h4> * <p><h2>Note</h2><p> While alpha is not currently in the 3D Viewport, this may eventually be added back, keep this value set to 255. </p> While alpha is not currently in the 3D Viewport, this may eventually be added back, keep this value set to 255. * * </p> */ @CMetaData(size32=4, size64=4) public class MLoopCol extends CFacade { /** * This is the sdna index of the struct MLoopCol. * <p> * It is required when allocating a new block to store data for MLoopCol. * </p> * @see StructDNA * @see BlockTable */ public static final int __DNA__SDNA_INDEX = 309; /** * Field descriptor (offset) for struct member 'r'. * <h3>Pointer Arithmetics</h3> * <p> * This is how you get a reference on the corresponding field in the struct: * </p> * <pre> * MLoopCol mloopcol = ...; * CPointer&lt;Object&gt; p = mloopcol.__dna__addressof(MLoopCol.__DNA__FIELD__r); * CPointer&lt;Byte&gt; p_r = p.cast(new Class[]{Byte.class}); * </pre> * <h3>Metadata</h3> * <ul> * <li>Field: 'r'</li> * <li>Signature: 'char'</li> * <li>Actual Size (32bit/64bit): 1/1</li> * </ul> */ public static final long[] __DNA__FIELD__r = new long[]{0, 0}; /** * Field descriptor (offset) for struct member 'g'. * <h3>Pointer Arithmetics</h3> * <p> * This is how you get a reference on the corresponding field in the struct: * </p> * <pre> * MLoopCol mloopcol = ...; * CPointer&lt;Object&gt; p = mloopcol.__dna__addressof(MLoopCol.__DNA__FIELD__g); * CPointer&lt;Byte&gt; p_g = p.cast(new Class[]{Byte.class}); * </pre> * <h3>Metadata</h3> * <ul> * <li>Field: 'g'</li> * <li>Signature: 'char'</li> * <li>Actual Size (32bit/64bit): 1/1</li> * </ul> */ public static final long[] __DNA__FIELD__g = new long[]{1, 1}; /** * Field descriptor (offset) for struct member 'b'. * <h3>Pointer Arithmetics</h3> * <p> * This is how you get a reference on the corresponding field in the struct: * </p> * <pre> * MLoopCol mloopcol = ...; * CPointer&lt;Object&gt; p = mloopcol.__dna__addressof(MLoopCol.__DNA__FIELD__b); * CPointer&lt;Byte&gt; p_b = p.cast(new Class[]{Byte.class}); * </pre> * <h3>Metadata</h3> * <ul> * <li>Field: 'b'</li> * <li>Signature: 'char'</li> * <li>Actual Size (32bit/64bit): 1/1</li> * </ul> */ public static final long[] __DNA__FIELD__b = new long[]{2, 2}; /** * Field descriptor (offset) for struct member 'a'. * <h3>Pointer Arithmetics</h3> * <p> * This is how you get a reference on the corresponding field in the struct: * </p> * <pre> * MLoopCol mloopcol = ...; * CPointer&lt;Object&gt; p = mloopcol.__dna__addressof(MLoopCol.__DNA__FIELD__a); * CPointer&lt;Byte&gt; p_a = p.cast(new Class[]{Byte.class}); * </pre> * <h3>Metadata</h3> * <ul> * <li>Field: 'a'</li> * <li>Signature: 'char'</li> * <li>Actual Size (32bit/64bit): 1/1</li> * </ul> */ public static final long[] __DNA__FIELD__a = new long[]{3, 3}; public MLoopCol(long __address, Block __block, BlockTable __blockTable) { super(__address, __block, __blockTable); } protected MLoopCol(MLoopCol that) { super(that.__io__address, that.__io__block, that.__io__blockTable); } /** * Get method for struct member 'r'. * @see #__DNA__FIELD__r */ public byte getR() throws IOException { if ((__io__pointersize == 8)) { return __io__block.readByte(__io__address + 0); } else { return __io__block.readByte(__io__address + 0); } } /** * Set method for struct member 'r'. * @see #__DNA__FIELD__r */ public void setR(byte r) throws IOException { if ((__io__pointersize == 8)) { __io__block.writeByte(__io__address + 0, r); } else { __io__block.writeByte(__io__address + 0, r); } } /** * Get method for struct member 'g'. * @see #__DNA__FIELD__g */ public byte getG() throws IOException { if ((__io__pointersize == 8)) { return __io__block.readByte(__io__address + 1); } else { return __io__block.readByte(__io__address + 1); } } /** * Set method for struct member 'g'. * @see #__DNA__FIELD__g */ public void setG(byte g) throws IOException { if ((__io__pointersize == 8)) { __io__block.writeByte(__io__address + 1, g); } else { __io__block.writeByte(__io__address + 1, g); } } /** * Get method for struct member 'b'. * @see #__DNA__FIELD__b */ public byte getB() throws IOException { if ((__io__pointersize == 8)) { return __io__block.readByte(__io__address + 2); } else { return __io__block.readByte(__io__address + 2); } } /** * Set method for struct member 'b'. * @see #__DNA__FIELD__b */ public void setB(byte b) throws IOException { if ((__io__pointersize == 8)) { __io__block.writeByte(__io__address + 2, b); } else { __io__block.writeByte(__io__address + 2, b); } } /** * Get method for struct member 'a'. * @see #__DNA__FIELD__a */ public byte getA() throws IOException { if ((__io__pointersize == 8)) { return __io__block.readByte(__io__address + 3); } else { return __io__block.readByte(__io__address + 3); } } /** * Set method for struct member 'a'. * @see #__DNA__FIELD__a */ public void setA(byte a) throws IOException { if ((__io__pointersize == 8)) { __io__block.writeByte(__io__address + 3, a); } else { __io__block.writeByte(__io__address + 3, a); } } /** * Instantiates a pointer on this instance. */ public CPointer<MLoopCol> __io__addressof() { return new CPointer<MLoopCol>(__io__address, new Class[]{MLoopCol.class}, __io__block, __io__blockTable); } }
[ "homac@strace.org" ]
homac@strace.org
05e773cee392d529275db256cd686734ca4420c7
4d6f449339b36b8d4c25d8772212bf6cd339f087
/netreflected/src/Framework/System.Web,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a/system/web/caching/HeaderElement.java
283f48defb38a65e1f2f40f1e1c593c6989edd97
[ "MIT" ]
permissive
lvyitian/JCOReflector
299a64550394db3e663567efc6e1996754f6946e
7e420dca504090b817c2fe208e4649804df1c3e1
refs/heads/master
2022-12-07T21:13:06.208025
2020-08-28T09:49:29
2020-08-28T09:49:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,084
java
/* * MIT License * * Copyright (c) 2020 MASES s.r.l. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ /************************************************************************************** * <auto-generated> * This code was generated from a template using JCOReflector * * Manual changes to this file may cause unexpected behavior in your application. * Manual changes to this file will be overwritten if the code is regenerated. * </auto-generated> *************************************************************************************/ package system.web.caching; import org.mases.jcobridge.*; import org.mases.jcobridge.netreflection.*; import java.util.ArrayList; // Import section /** * The base .NET class managing System.Web.Caching.HeaderElement, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Extends {@link NetObject}. * <p> * * See: <a href="https://docs.microsoft.com/en-us/dotnet/api/System.Web.Caching.HeaderElement" target="_top">https://docs.microsoft.com/en-us/dotnet/api/System.Web.Caching.HeaderElement</a> */ public class HeaderElement extends NetObject { /** * Fully assembly qualified name: System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a */ public static final String assemblyFullName = "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; /** * Assembly name: System.Web */ public static final String assemblyShortName = "System.Web"; /** * Qualified class name: System.Web.Caching.HeaderElement */ public static final String className = "System.Web.Caching.HeaderElement"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { return bridge.GetType(className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName)); } catch (JCException e) { return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } public HeaderElement(Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link HeaderElement}, a cast assert is made to check if types are compatible. */ public static HeaderElement cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new HeaderElement(from.getJCOInstance()); } // Constructors section public HeaderElement() throws Throwable { } public HeaderElement(java.lang.String name, java.lang.String value) throws Throwable, system.ArgumentNullException { try { // add reference to assemblyName.dll file addReference(JCOBridgeInstance.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(name, value)); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Methods section // Properties section public java.lang.String getName() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("Name"); } catch (JCNativeException jcne) { throw translateException(jcne); } } public java.lang.String getValue() throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (java.lang.String)classInstance.Get("Value"); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Instance Events section }
[ "mario.mastrodicasa@masesgroup.com" ]
mario.mastrodicasa@masesgroup.com
b2144e38dd158cdd5a6b826b306f05e5847b0be5
77d776f1d716e13dd9e40f2c885a26ad89b8f178
/0429update/src/com/boco/TONY/biz/loancomb/POJO/DO/combtaken/CombTakenBaseDO.java
da9c5d585e7d1e691c422a60d2e7f1a265b08550
[]
no_license
AlessaVoid/studyCode
076dc132b7e24cb341d5a262f8f96d7fa78c848b
0b8806a537a081535992a467ad4ae7d5dcf7ab3e
refs/heads/master
2022-12-18T20:40:47.169951
2020-09-18T08:28:02
2020-09-18T08:28:02
null
0
0
null
null
null
null
GB18030
Java
false
false
966
java
package com.boco.TONY.biz.loancomb.POJO.DO.combtaken; import java.io.Serializable; /** * 贷种组合占用DTO * * @author tony * @describe CombTakenBaseDO * @date 2019-11-04 */ public class CombTakenBaseDO implements Serializable { private static final long serialVersionUID = -997553482968941950L; private String parentComb; //1-部分占用 0-不占用 2-随意占用 private int takenType; public String getParentComb() { return parentComb; } public CombTakenBaseDO setParentComb(String parentComb) { this.parentComb = parentComb; return this; } public int getTakenType() { return takenType; } public CombTakenBaseDO setTakenType(int takenType) { this.takenType = takenType; return this; } @Override public String toString() { return "CombTakenBaseDO{" + "parentComb='" + parentComb + '\'' + '}'; } }
[ "meiguangxue@nyintel.com" ]
meiguangxue@nyintel.com
80a611ef99e28db5a746751423332c1e8eafb6ad
cfad94c0ccff796c33f3bfe26fe51187a40974b9
/src/com/perl5/lang/perl/idea/project/PerlMicroIdeSettingsLoader.java
cbe4afb61b2507eb7d88cabde7049980f4200f15
[ "Apache-2.0" ]
permissive
kberov/Perl5-IDEA
e2ba063753970bbc9598a465a3aea05b9b40f336
405c73e6df3dd0cfc8f1494d68853f075047d972
refs/heads/master
2021-01-20T21:16:14.016295
2016-06-03T17:12:00
2016-06-03T17:12:00
60,375,216
1
0
null
2016-06-03T20:17:17
2016-06-03T20:17:16
null
UTF-8
Java
false
false
5,488
java
/* * Copyright 2015 Alexandr Evstigneev * * 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.perl5.lang.perl.idea.project; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.components.ProjectComponent; import com.intellij.openapi.module.ModuleManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.*; import com.intellij.openapi.roots.libraries.Library; import com.intellij.openapi.roots.libraries.LibraryTable; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.LocalFileSystem; import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.PlatformUtils; import com.intellij.util.containers.ContainerUtil; import com.perl5.lang.perl.idea.configuration.settings.PerlLocalSettings; import com.perl5.lang.perl.idea.configuration.settings.PerlSharedSettings; import com.perl5.lang.perl.idea.modules.JpsPerlLibrarySourceRootType; import com.perl5.lang.perl.idea.sdk.PerlSdkType; import org.jetbrains.annotations.NotNull; import java.io.File; import java.util.Comparator; import java.util.HashSet; import java.util.Set; /** * Created by hurricup on 30.08.2015. */ public class PerlMicroIdeSettingsLoader implements ProjectComponent { protected Project myProject; protected PerlSharedSettings perl5Settings; public PerlMicroIdeSettingsLoader(Project project) { myProject = project; perl5Settings = PerlSharedSettings.getInstance(project); } public static void applyClassPaths(ModifiableRootModel rootModel) { for (OrderEntry entry : rootModel.getOrderEntries()) { // System.err.println("Checking " + entry + " of " + entry.getClass()); if (entry instanceof LibraryOrderEntry) { // System.err.println("Removing " + entry); rootModel.removeOrderEntry(entry); } } LibraryTable table = rootModel.getModuleLibraryTable(); for (VirtualFile virtualFile : rootModel.getSourceRoots(JpsPerlLibrarySourceRootType.INSTANCE)) { // System.err.println("Adding " + entry); Library tableLibrary = table.createLibrary(); Library.ModifiableModel modifiableModel = tableLibrary.getModifiableModel(); modifiableModel.addRoot(virtualFile, OrderRootType.CLASSES); modifiableModel.commit(); } OrderEntry[] entries = rootModel.getOrderEntries(); ContainerUtil.sort(entries, new Comparator<OrderEntry>() { @Override public int compare(OrderEntry orderEntry, OrderEntry t1) { int i1 = orderEntry instanceof LibraryOrderEntry ? 1 : 0; int i2 = t1 instanceof LibraryOrderEntry ? 1 : 0; return i2 - i1; } }); rootModel.rearrangeOrderEntries(entries); if (!PlatformUtils.isIntelliJ()) { // add perl @inc to the end of libs PerlLocalSettings settings = PerlLocalSettings.getInstance(rootModel.getProject()); if (!settings.PERL_PATH.isEmpty()) { for (String incPath : PerlSdkType.getInstance().getINCPaths(settings.PERL_PATH)) { VirtualFile incFile = LocalFileSystem.getInstance().findFileByIoFile(new File(incPath)); if (incFile != null) { Library tableLibrary = table.createLibrary(); Library.ModifiableModel modifiableModel = tableLibrary.getModifiableModel(); modifiableModel.addRoot(incFile, OrderRootType.CLASSES); modifiableModel.addRoot(incFile, OrderRootType.SOURCES); modifiableModel.commit(); } } } } } public void initComponent() { // TODO: insert component initialization logic here } public void disposeComponent() { // TODO: insert component disposal logic here } @NotNull public String getComponentName() { return "PerlMicroIdeSettingsLoader"; } public void projectOpened() { // called when project is opened if (!PlatformUtils.isIntelliJ() && ModuleManager.getInstance(myProject).getModules().length > 0) { ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override public void run() { ModifiableRootModel rootModel = ModuleRootManager.getInstance(ModuleManager.getInstance(myProject).getModules()[0]).getModifiableModel(); ContentEntry[] entries = rootModel.getContentEntries(); if (entries.length > 0) { ContentEntry entry = entries[0]; Set<String> libPaths = new HashSet<String>(perl5Settings.libRootUrls); for (SourceFolder folder : entry.getSourceFolders()) { if (libPaths.contains(folder.getUrl())) { entry.removeSourceFolder(folder); } } final String rootPath = VfsUtilCore.urlToPath(entry.getUrl()); for (String path : libPaths) { if (FileUtil.isAncestor(rootPath, VfsUtilCore.urlToPath(path), true)) { entry.addSourceFolder(path, JpsPerlLibrarySourceRootType.INSTANCE); } } applyClassPaths(rootModel); rootModel.commit(); } } }); } } public void projectClosed() { // called when project is being closed } }
[ "hurricup@gmail.com" ]
hurricup@gmail.com
a7e6d982e9fedf8eae91f63661c1472cc67ba0fb
4edcd6ccd25b236a4b1cacd899550833410715db
/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/LimitPrule.java
aad2976201786877af9d035feb38a5840a4221a9
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
mattyb149/incubator-drill
30686078acdba5656f8fad52c7f26f2bd5392970
686eb9ef6d5dd425ae2eff4d2da58014b050fe6b
refs/heads/master
2021-01-22T17:22:33.684723
2014-09-03T16:30:56
2014-09-04T05:19:45
23,814,976
0
0
null
null
null
null
UTF-8
Java
false
false
2,114
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.drill.exec.planner.physical; import org.apache.drill.exec.planner.common.DrillScreenRelBase; import org.apache.drill.exec.planner.logical.DrillLimitRel; import org.apache.drill.exec.planner.logical.DrillRel; import org.apache.drill.exec.planner.logical.DrillScreenRel; import org.apache.drill.exec.planner.logical.RelOptHelper; import org.eigenbase.rel.RelNode; import org.eigenbase.relopt.RelOptRule; import org.eigenbase.relopt.RelOptRuleCall; import org.eigenbase.relopt.RelTraitSet; public class LimitPrule extends Prule{ public static final RelOptRule INSTANCE = new LimitPrule(); public LimitPrule() { super(RelOptHelper.any(DrillLimitRel.class, DrillRel.DRILL_LOGICAL), "Prel.LimitPrule"); } @Override public void onMatch(RelOptRuleCall call) { final DrillLimitRel limit = (DrillLimitRel) call.rel(0); final RelNode input = limit.getChild(); final RelTraitSet traits = input.getTraitSet().plus(Prel.DRILL_PHYSICAL).plus(DrillDistributionTrait.SINGLETON); final RelNode convertedInput = convert(input, traits); LimitPrel newLimit = new LimitPrel(limit.getCluster(), limit.getTraitSet().plus(Prel.DRILL_PHYSICAL).plus(DrillDistributionTrait.SINGLETON), convertedInput, limit.getOffset(), limit.getFetch()); call.transformTo(newLimit); } }
[ "jacques@apache.org" ]
jacques@apache.org
fce6bd6e0bcd09bdeeb94e52973a6448ca988a8f
7596b13ad3a84feb67f05aeda486e8b9fc93f65f
/getAndroidAPI/src/android/bluetooth/BluetoothSocket.java
03a2ec0b617ecf28a2e142d146c12c1b660f88b0
[]
no_license
WinterPan2017/Android-Malware-Detection
7aeacfa03ca1431e7f3ba3ec8902cfe2498fd3de
ff38c91dc6985112e958291867d87bfb41c32a0f
refs/heads/main
2023-02-08T00:02:28.775711
2020-12-20T06:58:01
2020-12-20T06:58:01
303,900,592
1
0
null
null
null
null
UTF-8
Java
false
false
1,689
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) // Source File Name: BluetoothSocket.java package android.bluetooth; import java.io.*; // Referenced classes of package android.bluetooth: // BluetoothDevice public final class BluetoothSocket implements Closeable { BluetoothSocket(BluetoothSocket s) { throw new RuntimeException("Stub!"); } protected void finalize() throws Throwable { throw new RuntimeException("Stub!"); } public BluetoothDevice getRemoteDevice() { throw new RuntimeException("Stub!"); } public InputStream getInputStream() throws IOException { throw new RuntimeException("Stub!"); } public OutputStream getOutputStream() throws IOException { throw new RuntimeException("Stub!"); } public boolean isConnected() { throw new RuntimeException("Stub!"); } public void connect() throws IOException { throw new RuntimeException("Stub!"); } public void close() throws IOException { throw new RuntimeException("Stub!"); } public int getMaxTransmitPacketSize() { throw new RuntimeException("Stub!"); } public int getMaxReceivePacketSize() { throw new RuntimeException("Stub!"); } public int getConnectionType() { throw new RuntimeException("Stub!"); } public static final int TYPE_L2CAP = 3; public static final int TYPE_RFCOMM = 1; public static final int TYPE_SCO = 2; }
[ "panwentao1301@163.com" ]
panwentao1301@163.com
bd25d0fc72bc5b32ae1a265c9f249f67f4779254
f766baf255197dd4c1561ae6858a67ad23dcda68
/app/src/main/java/com/tencent/mm/protocal/c/tr.java
04ecf94ad697804f67216dca69031fc15aa63539
[]
no_license
jianghan200/wxsrc6.6.7
d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849
eb6c56587cfca596f8c7095b0854cbbc78254178
refs/heads/master
2020-03-19T23:40:49.532494
2018-06-12T06:00:50
2018-06-12T06:00:50
137,015,278
4
2
null
null
null
null
UTF-8
Java
false
false
4,136
java
package com.tencent.mm.protocal.c; import f.a.a.b; public final class tr extends com.tencent.mm.bk.a { public int rbZ; public String rxq; public String rxr; public String rxs; public String rxt; public String rxu; public int rxv; public int rxw; public String rxx; protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (f.a.a.c.a)paramVarArgs[0]; if (this.rxq == null) { throw new b("Not all required fields were included: BegWord"); } if (this.rxr == null) { throw new b("Not all required fields were included: BegPicUrl"); } if (this.rxs == null) { throw new b("Not all required fields were included: ThanksPicUrl"); } if (this.rxq != null) { paramVarArgs.g(1, this.rxq); } if (this.rxr != null) { paramVarArgs.g(2, this.rxr); } if (this.rxs != null) { paramVarArgs.g(3, this.rxs); } if (this.rxt != null) { paramVarArgs.g(4, this.rxt); } if (this.rxu != null) { paramVarArgs.g(5, this.rxu); } paramVarArgs.fT(6, this.rxv); paramVarArgs.fT(7, this.rxw); if (this.rxx != null) { paramVarArgs.g(8, this.rxx); } paramVarArgs.fT(9, this.rbZ); return 0; } if (paramInt == 1) { if (this.rxq == null) { break label675; } } label675: for (int i = f.a.a.b.b.a.h(1, this.rxq) + 0;; i = 0) { paramInt = i; if (this.rxr != null) { paramInt = i + f.a.a.b.b.a.h(2, this.rxr); } i = paramInt; if (this.rxs != null) { i = paramInt + f.a.a.b.b.a.h(3, this.rxs); } paramInt = i; if (this.rxt != null) { paramInt = i + f.a.a.b.b.a.h(4, this.rxt); } i = paramInt; if (this.rxu != null) { i = paramInt + f.a.a.b.b.a.h(5, this.rxu); } i = i + f.a.a.a.fQ(6, this.rxv) + f.a.a.a.fQ(7, this.rxw); paramInt = i; if (this.rxx != null) { paramInt = i + f.a.a.b.b.a.h(8, this.rxx); } return paramInt + f.a.a.a.fQ(9, this.rbZ); if (paramInt == 2) { paramVarArgs = new f.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = com.tencent.mm.bk.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.bk.a.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.cJS(); } } if (this.rxq == null) { throw new b("Not all required fields were included: BegWord"); } if (this.rxr == null) { throw new b("Not all required fields were included: BegPicUrl"); } if (this.rxs != null) { break; } throw new b("Not all required fields were included: ThanksPicUrl"); } if (paramInt == 3) { f.a.a.a.a locala = (f.a.a.a.a)paramVarArgs[0]; tr localtr = (tr)paramVarArgs[1]; switch (((Integer)paramVarArgs[2]).intValue()) { default: return -1; case 1: localtr.rxq = locala.vHC.readString(); return 0; case 2: localtr.rxr = locala.vHC.readString(); return 0; case 3: localtr.rxs = locala.vHC.readString(); return 0; case 4: localtr.rxt = locala.vHC.readString(); return 0; case 5: localtr.rxu = locala.vHC.readString(); return 0; case 6: localtr.rxv = locala.vHC.rY(); return 0; case 7: localtr.rxw = locala.vHC.rY(); return 0; case 8: localtr.rxx = locala.vHC.readString(); return 0; } localtr.rbZ = locala.vHC.rY(); return 0; } return -1; } } } /* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes5-dex2jar.jar!/com/tencent/mm/protocal/c/tr.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "526687570@qq.com" ]
526687570@qq.com
e9491637df8b9a47f465f055c14c6808e653bab6
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/32/32_0a3ed51a5adba846bb7ce53a3f31019d395978fa/OpenelisAtomfeedClientServiceEventWorkerTest/32_0a3ed51a5adba846bb7ce53a3f31019d395978fa_OpenelisAtomfeedClientServiceEventWorkerTest_t.java
99cbdec5dac6da1699cd64b79990e3801b1bdf2d
[]
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
3,719
java
package org.bahmni.feed.openelis.feed.event; import junit.framework.Assert; import org.bahmni.feed.openelis.externalreference.daoimpl.ExternalReferenceDaoImpl; import org.bahmni.feed.openelis.externalreference.valueholder.ExternalReference; import org.bahmni.feed.openelis.utils.AtomfeedClientUtils; import org.hibernate.Transaction; import org.ict4h.atomfeed.client.domain.Event; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import us.mn.state.health.lims.hibernate.HibernateUtil; import us.mn.state.health.lims.login.dao.LoginDAO; import us.mn.state.health.lims.login.valueholder.Login; import us.mn.state.health.lims.panel.dao.PanelDAO; import us.mn.state.health.lims.panel.daoimpl.PanelDAOImpl; import us.mn.state.health.lims.panel.valueholder.Panel; import us.mn.state.health.lims.siteinformation.dao.SiteInformationDAO; import us.mn.state.health.lims.siteinformation.valueholder.SiteInformation; import java.util.ArrayList; import java.util.List; import static org.mockito.Matchers.any; import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; public class OpenelisAtomFeedClientServiceEventWorkerTest { static final String EVENT_CONTENT = " {\"category\": \"Panel\", \"list_price\": \"0.0\", \"name\": \"ECHO\", \"type\": \"service\", \"standard_price\": \"0.0\", \"uom_id\": 1, \"uom_po_id\": 1, \"categ_id\": 33, \"id\": 193}"; @Mock LoginDAO loginDAO; @Mock SiteInformationDAO siteInformationDAO; ExternalReferenceDaoImpl externalReferenceDao; OpenelisAtomfeedClientServiceEventWorker eventWorker; @Before public void setUp(){ initMocks(this); eventWorker = new OpenelisAtomfeedClientServiceEventWorker(); externalReferenceDao = new ExternalReferenceDaoImpl(); } @Test public void testProcess() throws Exception { AtomfeedClientUtils.setLoginDao(loginDAO); AtomfeedClientUtils.setSiteInformationDao(siteInformationDAO); when(loginDAO.getUserProfile(any(String.class))).thenReturn(createLoginInfo()); when(siteInformationDAO.getSiteInformationByName(any(String.class))).thenReturn(createSiteInfo()); eventWorker.process(createEvent()); PanelDAO panelDao = new PanelDAOImpl(); Panel panel = panelDao.getPanelByName("ECHO"); Assert.assertNotNull(panel); panel.setSysUserId("1"); Assert.assertEquals("Panel Name :","ECHO",panel.getPanelName()); List<Panel> panels = new ArrayList<Panel>(); panels.add(panel); Transaction transaction = HibernateUtil.getSession().beginTransaction(); panelDao.deleteData(panels); ExternalReference externalReference = externalReferenceDao.getData("193", "Panel"); if(externalReference != null) externalReferenceDao.deleteData(externalReference); externalReference = externalReferenceDao.getData("193", "Test"); if(externalReference != null) externalReferenceDao.deleteData(externalReference); transaction.commit(); panel = panelDao.getPanelByName("ECHO"); Assert.assertNull(panel); } private Event createEvent(){ Event event = new Event("4234332",EVENT_CONTENT); return event; } private SiteInformation createSiteInfo(){ SiteInformation siteInfo = new SiteInformation(); siteInfo.setValue("admin"); return siteInfo; } private Login createLoginInfo(){ Login loginInfo = new Login() ; loginInfo.setSysUserId("1"); return loginInfo; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
21d1e098252ccc1cda35dddf63aaba3275d68fdb
fa01ee5ed58f15aaf1a223cad56a7bc471b561ac
/core/src/io/piotrjastrzebski/monster/game/components/Movement.java
26f51bd012c1bb0d85e144d4dce8a53c4bf15a46
[ "MIT" ]
permissive
piotr-j/ld33monster
d886ce757666d9525320328deb01623be3c63d1d
e4068bf30186d0d3e20c8b3fbfaac88667603f73
refs/heads/master
2021-01-23T11:59:15.114333
2015-08-24T09:05:47
2015-08-24T09:05:47
41,197,787
1
0
null
null
null
null
UTF-8
Java
false
false
555
java
package io.piotrjastrzebski.monster.game.components; import com.artemis.PooledComponent; import com.badlogic.gdx.math.Vector2; /** * Created by PiotrJ on 22/08/15. */ public class Movement extends PooledComponent { public Vector2 vel = new Vector2(); public Vector2 acc = new Vector2(); @Override protected void reset () { vel.setZero(); acc.setZero(); } public Movement setVelocity (float vx, float vy) { vel.set(vx, vy); return this; } public Movement setAccelleration (float ax, float ay) { acc.set(ax, ay); return this; } }
[ "me@piotrjastrzebski.io" ]
me@piotrjastrzebski.io
c9f5de365711eba9d32113f5d59a7e51134c5a4b
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a042/A042242.java
7731fcf700a2ff69346a2323aea53e7004456858
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
586
java
package irvine.oeis.a042; // Generated by gen_seq4.pl cfsqnum 647 at 2019-07-04 11:03 // DO NOT EDIT here! import irvine.oeis.ContinuedFractionOfSqrtSequence; import irvine.math.z.Z; /** * A042242 Numerators of continued fraction convergents to <code>sqrt(647)</code>. * @author Georg Fischer */ public class A042242 extends ContinuedFractionOfSqrtSequence { /** Construct the sequence. */ public A042242() { super(0, 647); } @Override public Z next() { final Z result = getNumerator(); iterate(); iterateConvergents(); return result; } // next }
[ "sean.irvine@realtimegenomics.com" ]
sean.irvine@realtimegenomics.com
a2a71f70bcfdf97bd4f92a56eb52382aa1e4ebcd
a3ad307ddbe0d3fe1e1e7d6470cefe7351096da2
/levin-learn-seda/src/main/java/org/jcyclone/util/Util.java
a5c3fe233a70279308adf289fbb535be6065c86e
[]
no_license
talentxpOrganization/levin-learn
6d0e00e6f82343e1657834144396362d16e4b6b5
1733bf092e93e879b73014d378679df9b1a9a99b
refs/heads/master
2021-05-06T17:16:28.188323
2015-09-17T16:41:54
2015-09-17T16:41:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,865
java
/* * Copyright (c) 2001 by Matt Welsh and The Regents of the University of * California. All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. * * Author: Matt Welsh <mdw@cs.berkeley.edu> * */ package org.jcyclone.util; import java.text.DecimalFormat; /** * This class provides some generic utility functions. * * @author Matt Welsh */ public class Util { private static DecimalFormat df; static { df = new DecimalFormat(); df.applyPattern("#.####"); } /** * Format decimals to 4 digits only */ public static String format(double val) { return new String(df.format(val)); } /** * Cause the current thread to sleep for the given number of * milliseconds. Returns immediately if the thread is interrupted, but * does not throw an exception. */ public static void sleep(long delay) { try { Thread.sleep(delay); } catch (InterruptedException ie) { // Ignore } } }
[ "dingweiqiong@gmail.com" ]
dingweiqiong@gmail.com
1b3cdecf550d36f0212719cc65cf5115aceb47c9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/3/3_00e0869f3216803231b0139afa774d478d7190d9/CentralBoardTest/3_00e0869f3216803231b0139afa774d478d7190d9_CentralBoardTest_t.java
72e3e6c056efb63996da2f83049b361e13285fc6
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
5,899
java
package testcases; import static org.junit.Assert.*; import java.io.IOException; import org.junit.Test; import elfville.protocol.*; import elfville.protocol.Response.Status; import elfville.protocol.models.SerializablePost; public class CentralBoardTest extends TestBase { @Test // clientNum clients create clientNum posts. Check if all posts succeeded. public void test1post() throws IOException { for (int i = 0; i < clientNum; i++) { String title = "title-" + i; String content = "content-" + i; PostCentralBoardRequest req = new PostCentralBoardRequest(title, content); Response resp = socketControllers.get(i).send(req); // System.out.println("test1post() " + i + " " + resp.status.toString()); assertEquals(resp.status, Status.SUCCESS); } } /** * Test that all submitted posts can be retrieved. * @throws IOException */ @Test // One single client gets all posts from the central board. The returned posts should be the // same as those that were inserted earlier, ordered by created dates. public void test2get() throws IOException { CentralBoardRequest req = new CentralBoardRequest(); CentralBoardResponse resp = socketControllers.get(0).send(req); assertEquals(resp.status, Status.SUCCESS); for (int i = 0; i < clientNum; i++) { SerializablePost post = resp.posts.get(clientNum - i - 1); // the latest comes first System.out.println("get " + i); System.out.println(post.title); System.out.println(post.content); assertEquals("title-" + i, post.title); assertEquals("content-" + i, post.content); } } @Test public void testVoting() throws IOException { // make post PostCentralBoardRequest req = new PostCentralBoardRequest("a message", "a title"); socketControllers.get(0).send(req); // get posts CentralBoardRequest req2 = new CentralBoardRequest(); CentralBoardResponse resp2 = socketControllers.get(0).send(req2); // ensure you can vote String postA = resp2.posts.get(0).modelID; VoteRequest voteReq = new VoteRequest(postA, true); Response voteResp = socketControllers.get(0).send(voteReq); assertTrue(voteResp.isOK()); // ensure you cannot vote on same post twice Response voteResp2 = socketControllers.get(0).send(voteReq); assertFalse(voteResp2.isOK()); } @Test // A single client votes either Upsock or Downsock on posts. // Check if SUCCESS is returned. Check if the returned posts get // the right number of upsock/downsock. public void test3SingleVote() throws IOException { CentralBoardRequest req = new CentralBoardRequest(); CentralBoardResponse resp = socketControllers.get(0).send(req); assertEquals(resp.status, Status.SUCCESS); for (int i = 0; i < clientNum; i++) { SerializablePost post = resp.posts.get(i); VoteRequest voteReq = new VoteRequest(post.modelID, i / 2 == 0); Response voteRes = socketControllers.get(0).send(req); assertEquals(voteRes.status, Status.SUCCESS); } resp = socketControllers.get(0).send(req); assertEquals(resp.status, Status.SUCCESS); for (int i = 0; i < clientNum; i++) { SerializablePost post = resp.posts.get(i); if (i / 2 == 0) { assertEquals(1, post.upvotes); } else { assertEquals(1, post.downvotes); } } } @Test // Test if the same client can vote twice public void test4VoteTwice() throws IOException { CentralBoardRequest req = new CentralBoardRequest(); CentralBoardResponse resp = socketControllers.get(0).send(req); assertEquals(resp.status, Status.SUCCESS); for (int i = 0; i < clientNum; i++) { SerializablePost post = resp.posts.get(i); VoteRequest voteReq = new VoteRequest(post.modelID, i / 2 == 0); Response voteRes = socketControllers.get(0).send(req); assertEquals(voteRes.status, Status.FAILURE); } for (int i = 0; i < clientNum; i++) { SerializablePost post = resp.posts.get(i); VoteRequest voteReq = new VoteRequest(post.modelID, i / 2 != 0); Response voteRes = socketControllers.get(0).send(req); assertEquals(voteRes.status, Status.FAILURE); } } @Test // Clients delete their votes. Check SUCCEED public void test5DeleteVote() throws IOException { CentralBoardRequest req = new CentralBoardRequest(); CentralBoardResponse resp = socketControllers.get(0).send(req); assertEquals(resp.status, Status.SUCCESS); for (int i = 0; i < clientNum; i++) { SerializablePost post = resp.posts.get(i); DeleteCentralBoardRequest deleteReq = new DeleteCentralBoardRequest(post); Response deleteRes = socketControllers.get(i).send(deleteReq); assertEquals(deleteRes.status, Status.SUCCESS); } } @Test // Multiple clients vote on different posts. Check if the returned posts are ordered correctly. public void test6VoteOrder() throws IOException { test1post(); CentralBoardRequest req = new CentralBoardRequest(); CentralBoardResponse resp = socketControllers.get(0).send(req); assertEquals(resp.status, Status.SUCCESS); // Vote in the descending order, i.e. vote clientNum gets for (int i = 0; i < clientNum; i++) { for (int k = i; k < clientNum; k++) { VoteRequest voteReq = new VoteRequest(resp.posts.get(k).modelID, true); Response voteRes = socketControllers.get(i).send(req); assertEquals(voteRes.status, Status.SUCCESS); } } req = new CentralBoardRequest(); resp = socketControllers.get(0).send(req); assertEquals(resp.status, Status.SUCCESS); for (int i = 0; i < clientNum; i++) { SerializablePost post = resp.posts.get(i); // reordered now. the first comes first System.out.println(post.title); System.out.println(post.content); assertEquals("title-" + i, post.title); assertEquals("content-" + i, post.content); } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
df50958b7e5e4046afa6424f12756376428eb350
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/vs-20181212/src/main/java/com/aliyun/vs20181212/models/BindDirectoryResponse.java
c4a20259c8dc19b8456439800bb5455a010ec57c
[ "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,042
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.vs20181212.models; import com.aliyun.tea.*; public class BindDirectoryResponse extends TeaModel { @NameInMap("headers") @Validation(required = true) public java.util.Map<String, String> headers; @NameInMap("body") @Validation(required = true) public BindDirectoryResponseBody body; public static BindDirectoryResponse build(java.util.Map<String, ?> map) throws Exception { BindDirectoryResponse self = new BindDirectoryResponse(); return TeaModel.build(map, self); } public BindDirectoryResponse setHeaders(java.util.Map<String, String> headers) { this.headers = headers; return this; } public java.util.Map<String, String> getHeaders() { return this.headers; } public BindDirectoryResponse setBody(BindDirectoryResponseBody body) { this.body = body; return this; } public BindDirectoryResponseBody getBody() { return this.body; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
b693b09062c4860c4ffe9b3c9611254cd1efd5d7
50afd4c9141db1338d4dc2d5a697375d273d0416
/PublicCrafters_v1_19_R2/src/main/java/io/github/bananapuncher714/crafters/implementation/v1_19_R2/CustomContainerWorkbench.java
df4ee08ed0eef943bcc9f3c93cba3394625e7b9d
[]
no_license
BananaPuncher714/PublicCrafters
24e297f2942a613a9e41eee8f7f4834225ee151a
d6e5475261d3a98fb6e9f515641bf0a568e6ef6c
refs/heads/master
2023-06-24T19:51:05.797311
2023-06-18T05:32:01
2023-06-18T05:32:01
113,799,158
31
20
null
2022-12-20T17:36:19
2017-12-11T01:41:01
Java
UTF-8
Java
false
false
5,429
java
package io.github.bananapuncher714.crafters.implementation.v1_19_R2; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.List; import org.bukkit.Location; import org.bukkit.craftbukkit.v1_19_R2.CraftWorld; import org.bukkit.craftbukkit.v1_19_R2.entity.CraftHumanEntity; import org.bukkit.craftbukkit.v1_19_R2.inventory.CraftInventoryCrafting; import org.bukkit.craftbukkit.v1_19_R2.inventory.CraftInventoryView; import org.bukkit.entity.HumanEntity; import io.github.bananapuncher714.crafters.PublicCrafters; import io.github.bananapuncher714.crafters.util.Utils; import net.minecraft.core.NonNullList; import net.minecraft.world.IInventory; import net.minecraft.world.entity.player.AutoRecipeStackManager; import net.minecraft.world.entity.player.EntityHuman; import net.minecraft.world.entity.player.PlayerInventory; import net.minecraft.world.inventory.Container; import net.minecraft.world.inventory.ContainerAccess; import net.minecraft.world.inventory.ContainerWorkbench; import net.minecraft.world.inventory.InventoryClickType; import net.minecraft.world.inventory.InventoryCraftResult; import net.minecraft.world.inventory.InventoryCrafting; import net.minecraft.world.inventory.Slot; import net.minecraft.world.inventory.SlotResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.crafting.IRecipe; import net.minecraft.world.level.World; /** * @author BananaPuncher714 */ public class CustomContainerWorkbench extends ContainerWorkbench { protected InventoryCraftResult resultInventory; protected CustomInventoryCrafting craftInventory; protected ContainerAccess containerAccess; protected World world; protected HumanEntity viewer; private List< Slot > theseSlots; public CustomContainerWorkbench( int id, HumanEntity player, Location blockLocation, CustomInventoryCrafting crafting, InventoryCraftResult result ) { super( id, ( ( CraftHumanEntity ) player ).getHandle().fE() ); try { Field slots = this.getClass().getField( "i" ); theseSlots = ( List< Slot > ) slots.get( this ); } catch ( Exception exception ) { exception.printStackTrace(); } theseSlots.clear(); try { Field slots = Container.class.getField( "l" ); ( ( NonNullList< ItemStack > ) slots.get( this ) ).clear(); slots = Container.class.getField( "o" ); ( ( NonNullList< ItemStack > ) slots.get( this ) ).clear(); } catch ( Exception exception ) { exception.printStackTrace(); } containerAccess = ContainerAccess.a; viewer = player; resultInventory = result; craftInventory = crafting; world = ( ( CraftWorld ) blockLocation.getWorld() ).getHandle(); a( new SlotResult( ( ( CraftHumanEntity ) player ).getHandle(), craftInventory, resultInventory, 0, 124, 35 ) ); for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { a( new Slot( craftInventory, j + i * 3, 30 + j * 18, 17 + i * 18 ) ); } } for ( int i = 0; i < 3; i++ ) { for (int j = 0; j < 9; j++) { a( new Slot( ( ( CraftHumanEntity ) player ).getHandle().fE(), j + i * 9 + 9, 8 + j * 18, 84 + i * 18 ) ); } } for ( int i = 0; i < 9; i++ ) { a( new Slot( ( ( CraftHumanEntity ) player ).getHandle().fE(), i, 8 + i * 18, 142 ) ); } a( craftInventory ); } public void setInventoryCrafting( CustomInventoryCrafting crafting ) { craftInventory = crafting; } @Override public boolean a( ItemStack itemstack, Slot slot ) { return isNotResultSlot( slot ); } @Override public void a( int i, int j, InventoryClickType inventoryclicktype, EntityHuman entityhuman ) { craftInventory.selfContainer.setContainer( this ); super.a( i, j, inventoryclicktype, entityhuman ); } @Override public void a( IInventory iinventory ) { // Crafting a( this, world, ( ( CraftHumanEntity ) viewer ).getHandle(), craftInventory, resultInventory ); } @Override public void l() { resultInventory.a(); craftInventory.a(); } public boolean isNotResultSlot( Slot slot ) { return slot.d != resultInventory; } /** * This might be for when the inventory closes? */ @Override public void b( EntityHuman entity ) { craftInventory.selfContainer.setContainer( this ); super.b( entity ); // Make sure the craft inventory stops watching this container craftInventory.removeContainer( this ); if ( !world.y && PublicCrafters.getInstance().isDropItem() ) { a( entity, craftInventory ); l(); a( craftInventory ); craftInventory.update(); } } @Override public boolean a( EntityHuman entity ) { if ( !checkReachable ) { return true; } // Should make more efficient return craftInventory.getLocation().getBlock().getType() == Utils.getWorkbenchMaterial(); } @Override public CraftInventoryView getBukkitView() { return new CraftInventoryView( viewer, new CraftInventoryCrafting( craftInventory, resultInventory ), this ); } protected HumanEntity getViewer() { return viewer; } @Override public void a( AutoRecipeStackManager manager ) { craftInventory.a( manager ); } @Override public boolean a( IRecipe< ? super InventoryCrafting > irecipe ) { return irecipe.a( craftInventory, ( ( CraftHumanEntity ) viewer ).getHandle().s ); } // getGridWidth @Override public int n() { return craftInventory.g(); } // getGridHeight @Override public int o() { return craftInventory.f(); } }
[ "banana@aaaaahhhhhhh.com" ]
banana@aaaaahhhhhhh.com
f4a67e15ac985d830a197f33f4ebff6e2340b8a3
bbe34278f3ed99948588984c431e38a27ad34608
/sources/com/google/android/exoplayer2/extractor/ogg/OggPageHeader.java
a2c16e1187988de6dd9eeb0a1a4cdb3d6297442e
[]
no_license
sapardo10/parcial-pruebas
7af500f80699697ab9b9291388541c794c281957
938a0ceddfc8e0e967a1c7264e08cd9d1fe192f0
refs/heads/master
2020-04-28T02:07:08.766181
2019-03-10T21:51:36
2019-03-10T21:51:36
174,885,553
0
0
null
null
null
null
UTF-8
Java
false
false
5,864
java
package com.google.android.exoplayer2.extractor.ogg; import com.google.android.exoplayer2.util.ParsableByteArray; import com.google.android.exoplayer2.util.Util; final class OggPageHeader { public static final int EMPTY_PAGE_HEADER_SIZE = 27; public static final int MAX_PAGE_PAYLOAD = 65025; public static final int MAX_PAGE_SIZE = 65307; public static final int MAX_SEGMENT_COUNT = 255; private static final int TYPE_OGGS = Util.getIntegerCodeForString("OggS"); public int bodySize; public long granulePosition; public int headerSize; public final int[] laces = new int[255]; public long pageChecksum; public int pageSegmentCount; public long pageSequenceNumber; public int revision; private final ParsableByteArray scratch = new ParsableByteArray(255); public long streamSerialNumber; public int type; public boolean populate(com.google.android.exoplayer2.extractor.ExtractorInput r10, boolean r11) throws java.io.IOException, java.lang.InterruptedException { /* JADX: method processing error */ /* Error: jadx.core.utils.exceptions.JadxRuntimeException: Can't find immediate dominator for block B:34:0x00d1 in {4, 5, 6, 7, 11, 15, 17, 21, 23, 27, 28, 31, 33} preds:[] at jadx.core.dex.visitors.blocksmaker.BlockProcessor.computeDominators(BlockProcessor.java:129) at jadx.core.dex.visitors.blocksmaker.BlockProcessor.processBlocksTree(BlockProcessor.java:48) at jadx.core.dex.visitors.blocksmaker.BlockProcessor.visit(BlockProcessor.java:38) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17) at jadx.core.ProcessClass.process(ProcessClass.java:34) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:56) at jadx.core.ProcessClass.process(ProcessClass.java:39) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200) at jadx.api.JadxDecompiler$$Lambda$8/2106165633.run(Unknown Source) */ /* r9 = this; r0 = r9.scratch; r0.reset(); r9.reset(); r0 = r10.getLength(); r2 = 1; r3 = 0; r4 = -1; r6 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1)); if (r6 == 0) goto L_0x0026; L_0x0014: r0 = r10.getLength(); r4 = r10.getPeekPosition(); r0 = r0 - r4; r4 = 27; r6 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1)); if (r6 < 0) goto L_0x0024; L_0x0023: goto L_0x0027; L_0x0024: r0 = 0; goto L_0x0028; L_0x0027: r0 = 1; L_0x0028: if (r0 == 0) goto L_0x00c7; L_0x002a: r1 = r9.scratch; r1 = r1.data; r4 = 27; r1 = r10.peekFully(r1, r3, r4, r2); if (r1 != 0) goto L_0x0038; L_0x0036: goto L_0x00c7; L_0x0038: r1 = r9.scratch; r5 = r1.readUnsignedInt(); r1 = TYPE_OGGS; r7 = (long) r1; r1 = (r5 > r7 ? 1 : (r5 == r7 ? 0 : -1)); if (r1 == 0) goto L_0x0050; L_0x0045: if (r11 == 0) goto L_0x0048; L_0x0047: return r3; L_0x0048: r1 = new com.google.android.exoplayer2.ParserException; r2 = "expected OggS capture pattern at begin of page"; r1.<init>(r2); throw r1; L_0x0050: r1 = r9.scratch; r1 = r1.readUnsignedByte(); r9.revision = r1; r1 = r9.revision; if (r1 == 0) goto L_0x0068; L_0x005c: if (r11 == 0) goto L_0x005f; L_0x005e: return r3; L_0x005f: r1 = new com.google.android.exoplayer2.ParserException; r2 = "unsupported bit stream revision"; r1.<init>(r2); throw r1; L_0x0068: r1 = r9.scratch; r1 = r1.readUnsignedByte(); r9.type = r1; r1 = r9.scratch; r5 = r1.readLittleEndianLong(); r9.granulePosition = r5; r1 = r9.scratch; r5 = r1.readLittleEndianUnsignedInt(); r9.streamSerialNumber = r5; r1 = r9.scratch; r5 = r1.readLittleEndianUnsignedInt(); r9.pageSequenceNumber = r5; r1 = r9.scratch; r5 = r1.readLittleEndianUnsignedInt(); r9.pageChecksum = r5; r1 = r9.scratch; r1 = r1.readUnsignedByte(); r9.pageSegmentCount = r1; r1 = r9.pageSegmentCount; r1 = r1 + r4; r9.headerSize = r1; r1 = r9.scratch; r1.reset(); r1 = r9.scratch; r1 = r1.data; r4 = r9.pageSegmentCount; r10.peekFully(r1, r3, r4); r1 = 0; L_0x00ac: r3 = r9.pageSegmentCount; if (r1 >= r3) goto L_0x00c6; L_0x00b0: r3 = r9.laces; r4 = r9.scratch; r4 = r4.readUnsignedByte(); r3[r1] = r4; r3 = r9.bodySize; r4 = r9.laces; r4 = r4[r1]; r3 = r3 + r4; r9.bodySize = r3; r1 = r1 + 1; goto L_0x00ac; L_0x00c6: return r2; if (r11 == 0) goto L_0x00cb; L_0x00ca: return r3; L_0x00cb: r1 = new java.io.EOFException; r1.<init>(); throw r1; return; */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.exoplayer2.extractor.ogg.OggPageHeader.populate(com.google.android.exoplayer2.extractor.ExtractorInput, boolean):boolean"); } OggPageHeader() { } public void reset() { this.revision = 0; this.type = 0; this.granulePosition = 0; this.streamSerialNumber = 0; this.pageSequenceNumber = 0; this.pageChecksum = 0; this.pageSegmentCount = 0; this.headerSize = 0; this.bodySize = 0; } }
[ "sa.pardo10@uniandes.edu.co" ]
sa.pardo10@uniandes.edu.co
ecf6fd5444c7602991294a18cef58ff0ae358b18
48db1af993cc160a148fb4faa954ff706d745639
/src/com/nw/model/dao/DescongeladoDetalleProcesoTemperaturaDAO.java
2d850c8d7433dc6b29a6f9445e501f907dd36a30
[]
no_license
ratadelaniebla/nirsa
68d303672136ca6d8285ca662cdbb5e59bd46589
524e974958224d94713ffe16e30efa9a9a5ad3e1
refs/heads/master
2020-03-12T11:08:49.257615
2018-07-01T17:15:20
2018-07-01T17:15:20
130,589,942
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
package com.nw.model.dao; import com.nw.model.DescongeladoDetalleProcesoTemperatura; public interface DescongeladoDetalleProcesoTemperaturaDAO extends Dao { void saveOrUpdate(DescongeladoDetalleProcesoTemperatura descongeladoDetalleProcesoTemperatura); }
[ "marcos_baque@hotmail.com" ]
marcos_baque@hotmail.com
4c0f32112571a64f7a8d9c247e23afc62b677de5
6792be6bd1d37efef43e89f3e86e2495f07ae15e
/src/coding/ninjas/assignments/LinkedList4/DeleteEveryNNodes.java
3dd4e6ed1f5c6114bc49e4dbd3959b31c1631470
[]
no_license
mayank-17/codingninja
9c5db1d6be52f29ab9e068b8bf7a6f8d61c497b5
90401e9b28225199d840598db7248e3bbaf6a00a
refs/heads/master
2020-06-16T19:08:00.577426
2018-09-16T04:19:18
2018-09-16T04:19:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,010
java
package LinkedList4; /*Given a linked list and two integers M and N. Traverse the linked list such that you retain M nodes then delete next N nodes, continue the same until end of the linked list. That is, in the given linked list you need to delete N nodes after every M nodes. Input format : Line 1 : Linked list elements (separated by space and terminated by -1) Line 2 : M Line 3 : N */ public class DeleteEveryNNodes { public static LinkedListNode<Integer> skipMdeleteN(LinkedListNode<Integer> head, int M, int N) { LinkedListNode<Integer> curr = head; LinkedListNode<Integer> prev = null; while (curr != null) { int i = 0, j = 0; while (i < M && curr != null) { prev = curr; curr = curr.next; i++; } while (j < N && curr != null) { if (curr.next == null) { prev.next = null; } if (curr.next != null) { curr.data = curr.next.data; curr.next = curr.next.next; } j++; } } return head; } }
[ "rajesh.kumar.raj.mca@gmail.com" ]
rajesh.kumar.raj.mca@gmail.com
ab98fc86a1141255fac95b0d2d8ece3913616b91
473b76b1043df2f09214f8c335d4359d3a8151e0
/benchmark/bigclonebenchdata_completed/14282702.java
07bfc28b938770999353f3fc8f749c7bbc23ab77
[]
no_license
whatafree/JCoffee
08dc47f79f8369af32e755de01c52d9a8479d44c
fa7194635a5bd48259d325e5b0a190780a53c55f
refs/heads/master
2022-11-16T01:58:04.254688
2020-07-13T20:11:17
2020-07-13T20:11:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,765
java
class c14282702 { public MyHelperClass File; public MyHelperClass getResources(){ return null; } public MyHelperClass getLog(){ return null; } public MyHelperClass searchForFiles(String o0, String o1){ return null; } // @Override public void runTask(HashMap jobStack) throws Exception { String lstrFilter = (String)(String)(Object) getResources().get("filter"); String lstrTarget = (String)(String)(Object) getResources().get("target"); String lstrSource = (String)(String)(Object) getResources().get("source"); String[] lstrFilesFound = null; lstrFilesFound =(String[])(Object) searchForFiles(lstrSource, lstrFilter); if (lstrFilesFound != null) { for (int i = 0; i < lstrFilesFound.length; i++) { getLog().debug("Found match [" + lstrSource + File.separator + lstrFilesFound[i] + "]"); File lfileSource = new File(lstrSource + File.separator + lstrFilesFound[i]); File lfileTarget = new File(lstrTarget + File.separator + lstrFilesFound[i]); FileChannel lfisInput = null; FileChannel lfosOutput = null; try { lfisInput =(FileChannel)(Object) (new FileInputStream(lfileSource).getChannel()); lfosOutput =(FileChannel)(Object) (new FileOutputStream(lfileTarget).getChannel()); int maxCount = (32 * 1024 * 1024) - (32 * 1024); long size =(long)(Object) lfisInput.size(); long position = 0; while (position < size) { position += (long)(Object)lfisInput.transferTo(position, maxCount, lfosOutput); } } finally { if (lfisInput != null) { lfisInput.close(); } if (lfosOutput != null) { lfosOutput.close(); } } } } } } // Code below this line has been added to remove errors class MyHelperClass { public MyHelperClass separator; public MyHelperClass get(String o0){ return null; } public MyHelperClass debug(String o0){ return null; }} class HashMap { } class File { File(String o0){} File(){}} class FileChannel { public MyHelperClass size(){ return null; } public MyHelperClass transferTo(long o0, int o1, FileChannel o2){ return null; } public MyHelperClass close(){ return null; }} class FileInputStream { FileInputStream(){} FileInputStream(File o0){} public MyHelperClass getChannel(){ return null; }} class FileOutputStream { FileOutputStream(){} FileOutputStream(File o0){} public MyHelperClass getChannel(){ return null; }}
[ "piyush16066@iiitd.ac.in" ]
piyush16066@iiitd.ac.in
bae57e3c10a90e2d99bfd8b304ed39877c5d8124
a6b6e362eac85c55e93ee1e0e967a2fcaa76394a
/hku-repository/src/main/java/com/accentrix/hku/common/JpaDslQuery.java
546cbe3420406054b2035502a6aed65ce4bd1e60
[]
no_license
peterso05168/hku
4a609d332ccb7d8a99ce96afc85332f96dc1ddba
2447e29d968a1fff7a0f8a788e5cbbb39877979a
refs/heads/master
2020-03-21T17:11:28.961542
2018-06-27T02:24:54
2018-06-27T02:24:54
118,405,513
0
0
null
null
null
null
UTF-8
Java
false
false
1,861
java
/* * $Id: JpaDslQuery.java 22581 2017-02-28 09:50:46Z jyang $ * * Copyright (c) 2001-2008 Accentrix Company Limited. All Rights Reserved. * * Accentrix Company Limited. ("Accentrix") retains copyright on all text, source * and binary code contained in this software and documentation. Accentrix grants * Licensee a limited license to use this software, provided that this copyright * notice and license appear on all copies of the software. The software source * code is provided for reference purposes only and may not be copied, modified * or distributed. * * THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS," WITHOUT ANY WARRANTY OF * ANY KIND UNLESS A SEPARATE WARRANTIES IS PURCHASED FROM ACCENTRIX AND REMAINS * VALID. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. ACCENTRIX SHALL NOT BE LIABLE * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING OR MODIFYING THE * SOFTWARE OR ITS DERIVATIVES. * * IN NO EVENT WILL ACCENTRIX BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE * USE OF OR INABILITY TO USE SOFTWARE, EVEN IF ACCENTRIX HAS BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. */ package com.accentrix.hku.common; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import com.querydsl.core.types.dsl.EntityPathBase; public class JpaDslQuery<T, Q extends EntityPathBase<T>> extends JpaDslQueryBase<T, Q> { @PersistenceContext protected EntityManager em; @Override protected EntityManager getEntityManager() { return em; } }
[ "peterso05168@gmail.com" ]
peterso05168@gmail.com
1dc2e6f75def2d48c4d10393ae71e7a1314238c2
44f32201be3c8e610b5c72a8ae487d64056d68e5
/.history/demo/test0325/src/main/java/com/hello/test0325/dbtable/T200227market_20200413175049.java
94ef918329059e8729358c3a5ea01eaf96fea12f
[]
no_license
hisouske/test0325
19e421ce5019a949e5a7887d863b1b997a9d5a3b
8efd4169cf6e6d2b70d32a991e3747174be9c7e9
refs/heads/master
2021-05-16T20:28:30.546404
2020-04-22T06:39:58
2020-04-22T06:39:58
250,457,284
0
0
null
null
null
null
UTF-8
Java
false
false
1,826
java
package com.hello.test0325.dbtable; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToOne; import javax.persistence.Table; import lombok.Builder; import lombok.Data; import lombok.Getter; import lombok.Setter; @Getter @Setter @Data @Entity @Table(name="\"200227market\"") public class T200227market{ @Id @GeneratedValue @Column private int marketcode; @Column private String memid; @Column private String marketname; @Column private String marketpic; @Column private String markettext; @ManyToOne(cascade = CascadeType.ALL) @JoinTable(name = "PARENT_CHILD", joinColumns = @JoinColumn(name = "marketcode",insertable = false, updatable = false), inverseJoinColumns = @JoinColumn(name = "memid",insertable = false, updatable = false)) private T200227member join200227member; // @ManyToOne(targetEntity = T200227member.class, fetch =FetchType.LAZY) // @JoinColumn(name = "memid", insertable = false, updatable = false) // private T200227member t200227member; public T200227market(){ } @Builder public T200227market(int marketcode,String memid,String marketname, String marketpic,String markettext,T200227member member){ // this.id = id; this.marketcode = marketcode; // this.memid = memid; this.marketname = marketname; this.marketpic = marketpic; this.markettext = markettext; // T200227member member = new T200227member(); this.join200227member = member; System.out.println("builder >>2>"+this); } }
[ "zzang22yn@naver.com" ]
zzang22yn@naver.com
23b65d6f57ae578694319d738f0e92f30c605e0e
aa8ee2ae7989f9a2c31a3b758a0688daf0eb8a40
/gframedl/src/main/java/de/unidue/inf/is/ezdl/gframedl/tools/details/DetailToolView.java
ef4559ec3666d3d3c2e5d15ce7e5556ad1665297
[]
no_license
drag0sd0g/ezDL
c7c26a85b7e8be557513498a87bea9c24e2973e0
38d8d98a4f40eff566b0532fdbb21c0a935b42d6
refs/heads/master
2020-08-05T21:34:52.384264
2011-06-26T10:56:58
2011-06-26T10:56:58
1,955,388
0
0
null
null
null
null
UTF-8
Java
false
false
2,709
java
/* * Copyright 2009-2011 Universität Duisburg-Essen, Working Group * "Information Engineering" * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package de.unidue.inf.is.ezdl.gframedl.tools.details; import java.awt.BorderLayout; import java.awt.Component; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import de.unidue.inf.is.ezdl.gframedl.tools.AbstractToolView; import de.unidue.inf.is.ezdl.gframedl.tools.Tool; /** * One view of DetailTool. */ public class DetailToolView extends AbstractToolView { private static final long serialVersionUID = 6978293885193576663L; private Component viewComponent; private boolean fisDefaultView; /** * Constructor for DetailToolView * * @param parentTool * the DetailTool */ public DetailToolView(Tool parentTool, Component viewComponent, boolean fisDefaultView) { super(parentTool); setViewComponent(viewComponent); this.fisDefaultView = fisDefaultView; } public boolean isDefaultView() { return this.fisDefaultView; } /** * Setter for a DetailView-Component. */ public void setViewComponent(Component viewComponent) { this.removeAll(); this.viewComponent = viewComponent; setLayout(new BorderLayout()); if (viewComponent != null) { add(viewComponent, BorderLayout.CENTER); } this.viewComponent.addComponentListener(new ComponentAdapter() { @Override public void componentResized(ComponentEvent e) { super.componentResized(e); e.getComponent().repaint(); } }); } /** * Getter for a DetailView-Component. */ public Component getViewComponent() { if (!(viewComponent instanceof DetailViewContainer)) { return new DetailViewContainer(viewComponent); } else { return viewComponent; } } }
[ "dragos.dogaru.1987@googlemail.com" ]
dragos.dogaru.1987@googlemail.com
09c1e4c31892a2b0b3ac521008f086e46101c389
74951a30a8f0c50b6baa48f4c0f5a883c2519840
/src/main/java/POMA/Mutation/ObligationMutationOperators/MutatorCEO.java
fc89a894f934aa53040d3c8b8c19435335b443a8
[]
no_license
dianxiangxu/PoMA-public
2ebc962029f77497b2f50927986ccf44b5e7012b
0b72340f8938cea6c6e4b7914710f4040308172e
refs/heads/main
2023-06-19T02:58:10.856118
2021-07-14T20:00:22
2021-07-14T20:00:22
378,182,742
1
1
null
null
null
null
UTF-8
Java
false
false
4,312
java
package POMA.Mutation.ObligationMutationOperators; import java.io.File; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.List; import POMA.Exceptions.GraphDoesNotMatchTestSuitException; import POMA.Exceptions.NoTypeProvidedException; import gov.nist.csd.pm.exceptions.PMException; import gov.nist.csd.pm.pip.graph.Graph; import gov.nist.csd.pm.pip.obligations.model.EventPattern; import gov.nist.csd.pm.pip.obligations.model.Obligation; import gov.nist.csd.pm.pip.obligations.model.Rule; //change event operation public class MutatorCEO extends MutantTester2 { // String testMethod = "P"; public MutatorCEO(String testMethod, Graph graph, String obligationPath) throws GraphDoesNotMatchTestSuitException { super(testMethod, graph, obligationPath); } public void init() throws PMException, IOException, NoTypeProvidedException { String testResults = "CSV/" + testMethod + "/" + testMethod + "testResultsCEU.csv"; String testSuitePath = getTestSuitPathByMethod(testMethod); performMutation(testMethod, testSuitePath); saveCSV(data, new File(testResults), testMethod); } private void performMutation(String testMethod, String testSuitePath) throws PMException, IOException, NoTypeProvidedException { File testSuite = new File(testSuitePath); Graph graph = createCopy(); Obligation obligation = createObligationCopy(); String ruleLabel; Obligation mutant; double before, after; getAllOperationsInObligation(); List<Rule> rules = obligation.getRules(); for (Rule rule : rules) { ruleLabel = rule.getLabel(); EventPattern eventPattern = rule.getEventPattern(); List<String> operations = eventPattern.getOperations(); for (String operation : operations) { for (String changeToOperation : OPs) { mutant = createObligationCopy(); //operation as input, to avoid change to same operation List<String> changeToOperationSet = getChangeToOpSet(operations, operation, changeToOperation); //no difference from mutant if (changeToOperationSet == null) continue; System.out.println("change operation:" + operations.toString() + " to " + changeToOperationSet); mutant = updateOperationSet(mutant, ruleLabel, changeToOperationSet); setObligationMutant(mutant); before = getNumberOfKilledMutants(); //invoke junit to kill obligation_mutant testMutant(graph, mutant, testSuite, testMethod, getNumberOfMutants(), "CEO"); after = getNumberOfKilledMutants(); if (before == after) { //unkilled mutant caught System.out.println("Unkilled mutant (CEO) " + ruleLabel + "|" + operations.toString() + "|" + changeToOperationSet.toString()); } setNumberOfMutants(getNumberOfMutants() + 1); } } } // System.out.println("Total number of mutant is " + getNumberOfMutants()); } //change operationset (in label: ruleLabel) to changeToOperationSet private Obligation updateOperationSet(Obligation obligation, String ruleLabel, List<String> changeToOperationSet) { if (ruleLabel == null) return null; List<Rule> rules = obligation.getRules(); List<Rule> newRules = new ArrayList<>(); for (Rule newRule : rules) { if (newRule.getLabel().equals(ruleLabel)) { EventPattern eventPattern = newRule.getEventPattern(); eventPattern.setOperations(changeToOperationSet); newRule.setEventPattern(eventPattern); } newRules.add(newRule); } obligation.setRules(newRules); return obligation; } public List<String> getChangeToOpSet(List<String> operations, String operation, String changeToOperation) { //test code if (changeToOperation.equals("delete-copi")) { return null; } if (changeToOperation.equals("add-copi")) { return null; } if (changeToOperation.equals(operation)) { return null; } if (operations.contains(changeToOperation)) { return null; } List<String> newOperations = new ArrayList<>(); //changeToOperation != operation, and changeToOperation not in operations, but in OPs for (String newOp : operations) { if (newOp.equals(operation)) { newOperations.add(changeToOperation); } else { newOperations.add(newOp); } } return newOperations; } }
[ "dubrovenski.v@gmail.com" ]
dubrovenski.v@gmail.com
843885e541d786e73b43ac6171212c974748a30c
4d0f2d62d1c156d936d028482561585207fb1e49
/Ma nguon/zcs-8.0.2_GA_5570-src/ZimbraSoap/src/java/com/zimbra/soap/mail/message/FolderActionRequest.java
017db57b580ec18ecfcc0c55edf501138ddc399e
[]
no_license
vuhung/06-email-captinh
e3f0ff2e84f1c2bc6bdd6e4167cd7107ec42c0bd
af828ac73fc8096a3cc096806c8080e54d41251f
refs/heads/master
2020-07-08T09:09:19.146159
2013-05-18T12:57:24
2013-05-18T12:57:24
32,319,083
0
2
null
null
null
null
UTF-8
Java
false
false
6,707
java
/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Server * Copyright (C) 2011 Zimbra, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * ***** END LICENSE BLOCK ***** */ package com.zimbra.soap.mail.message; import com.google.common.base.Objects; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import com.zimbra.common.soap.MailConstants; import com.zimbra.soap.mail.type.FolderActionSelector; import com.zimbra.soap.json.jackson.annotate.ZimbraUniqueElement; /** * @zm-api-command-auth-required true * @zm-api-command-admin-auth-required false * @zm-api-command-description Perform an action on a folder * <br /> * Actions: * <pre> * &lt;action op="read" id="{list}"/> * - mark all items in the folder as read * * &lt;action op="delete" id="{list}"/> * - hard-delete the folder, all items in the folder, and all the folder's subfolders * * &lt;action op="empty" id="{list}" [recusive="{delete-subfolders}"]/> * - hard-delete all items in the folder (and all the folder's subfolders if "recursive" is set) * * &lt;action op="rename" id="{list}" name="{new-name}" [l="{new-folder}"]/> * - change the folder's name (and optionally location); * if {new-name} begins with '/', the folder is moved to the new path and any missing path elements are created * * &lt;action op="move" id="{list}" l="{new-folder}"/> * - move the folder to be a child of {target-folder} * * &lt;action op="trash" id="{list}"/> * - move the folder to the Trash, marking all contents as read and * renaming the folder if a folder by that name is already present in the Trash * * &lt;action op="color" id="{list}" color="{new-color} rgb="{new-color-in-rgb}"/> * - see ItemActionRequest * * &lt;action op="grant" id="{list}"> * &lt;grant perm="..." gt="..." zid="..." [expiry="{millis-since-epoch}"] [d="..."] [key="..."]/> * &lt;/action> * - add the &lt;grant> object to the folder * * &lt;action op="!grant" id="{list}" zid="{grantee-zimbra-id}"/> * - revoke access from {grantee-zimbra-id} * (you can use "00000000-0000-0000-0000-000000000000" to revoke acces granted to "all" * or use "99999999-9999-9999-9999-999999999999" to revoke acces granted to "pub" ) * * &lt;action op="revokeorphangrants" id="{folder-id}" zid="{grantee-zimbra-id}" gt="{grantee-type}"/> * - revoke orphan grants on the folder hierarchy granted to the grantee specified by zid and gt * "orphan grant" is a grant whose grantee object is deleted/non-existing. Server will throw * INVALID_REQUEST if zid points to an existing object, * Only supported if gt is usr|grp|cos|dom; otherwise server will throw INVALID_REQUEST. * * &lt;action op="url" id="{list}" url="{target-url}" [excludeFreeBusy="{exclude-free-busy-boolean}"]/> * - set the synchronization url on the folder to {target-url}, empty the folder, and\ * synchronize the folder's contents to the remote feed, also sets {exclude-free-busy-boolean} * * &lt;action op="sync" id="{list}"/> * - synchronize the folder's contents to the remote feed specified by the folder's {url} * * &lt;action op="import" id="{list}" url="{target-url}"/> * - add the contents to the remote feed at {target-url} to the folder [1-time action] * * &lt;action op="fb" id="{list}" excludeFreeBusy="{exclude-free-busy-boolean}"/> * - set the excludeFreeBusy boolean for this folder (must specify {exclude-free-busy-boolean}) * * &lt;action op="[!]check" id="{list}"/> * - set or unset the "checked" state of the folder in the UI * * &lt;action op="[!]syncon" id="{list}"/> * - set or unset the "sync" flag of the folder to sync a local folder with a remote source * * &lt;action op="[!]disableactivesync" id="{list}"/> * - If set, disable access to the folder via activesync. * Note: Only works for user folders, doesn't have any effect on system folders. * * &lt;action op="update" id="{list}" [f="{new-flags}"] [name="{new-name}"] * [l="{target-folder}"] [color="{new-color}"] [view="{new-view}"]> * [&lt;acl>&lt;grant .../>*&lt;/acl>] * &lt;/action> * - do several operations at once: * name="{new-name}" to change the folder's name * l="{target-folder}" to change the folder's location * color="{new-color}" to set the folder's color * view="{new-view}" to change folder's default view (useful for migration) * f="{new-flags}" to change the folder's exclude free/(b)usy, checked (#), and * IMAP subscribed (*) state * &lt;acl>&lt;grant ...>*&lt;/acl> to replace the folder's existing ACL with a new ACL * * {list} = on input, list of folders to act on, on output, list of folders that were acted on; * list may only have 1 element for actions empty, sync, fb, check, !check, url, import, grant, * !grant, revokeorphangrants, !flag, !tag, syncon, !syncon, retentionpolicy * * output of "grant" action includes the zimbra id the rights were granted on * * note that "delete", "empty", "rename", "move", "color", "update" can be used on search folders as well as standard * folders * </pre> */ @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement(name=MailConstants.E_FOLDER_ACTION_REQUEST) public class FolderActionRequest { /** * @zm-api-field-description Select action to perform on folder */ @ZimbraUniqueElement @XmlElement(name=MailConstants.E_ACTION /* action */, required=true) private final FolderActionSelector action; /** * no-argument constructor wanted by JAXB */ @SuppressWarnings("unused") private FolderActionRequest() { this((FolderActionSelector) null); } public FolderActionRequest(FolderActionSelector action) { this.action = action; } public FolderActionSelector getAction() { return action; } @Override public String toString() { return Objects.toStringHelper(this) .add("action", action) .toString(); } }
[ "vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931" ]
vuhung16plus@gmail.com@ec614674-f94a-24a8-de76-55dc00f2b931
c362c58b3b383a95f78754c7382f37ac2c4bd0ee
eace11a5735cfec1f9560e41a9ee30a1a133c5a9
/CMT/cptiscas/变异体/v2(Major)/删除不能编译通过以及数组越界的变异体/fineGrainedHeap/fineGrainedHeap60/FineGrainedHeap.java
986d4fb13d09050c35dc3da2450993b8b85b8c2a
[]
no_license
phantomDai/mypapers
eb2fc0fac5945c5efd303e0206aa93d6ac0624d0
e1aa1236bbad5d6d3b634a846cb8076a1951485a
refs/heads/master
2021-07-06T18:27:48.620826
2020-08-19T12:17:03
2020-08-19T12:17:03
162,563,422
0
1
null
null
null
null
UTF-8
Java
false
false
5,526
java
/* * FineGrainedHeap.java * * Created on March 10, 2007, 10:45 AM * * From "Multiprocessor Synchronization and Concurrent Data Structures", * by Maurice Herlihy and Nir Shavit. * Copyright 2007 Elsevier Inc. All rights reserved. */ package mutants.fineGrainedHeap.fineGrainedHeap60; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; /** * Heap with fine-grained locking and arbitrary priorities. * @param T type manged by heap * @author mph */ public class FineGrainedHeap<T> implements PQueue<T> { private static int ROOT = 1; private static int NO_ONE = -1; private Lock heapLock; int next; HeapNode<T>[] heap; /** * Constructor * @param capacity maximum number of items heap can hold */ @SuppressWarnings(value = "unchecked") public FineGrainedHeap(int capacity) { heapLock = new ReentrantLock(); next = ROOT; heap = (HeapNode<T>[]) new HeapNode[capacity + 1]; for (int i = 0; i < capacity + 1; i++) { heap[i] = new HeapNode<T>(); } } /** * Add item to heap. * @param item Uninterpreted item. * @param priority item priority */ public void add(T item, int priority) { heapLock.lock(); int child = next++; heap[child].lock(); heapLock.unlock(); heap[child].init(item, priority); heap[child].unlock(); while (child > ROOT) { int parent = child / 2; heap[parent].lock(); heap[child].lock(); int oldChild = child; try { if (heap[parent].tag == Status.AVAILABLE && heap[child].amOwner()) { if (heap[child].score < heap[parent].score) { swap(child, parent); child = parent; } else { heap[child].tag = Status.AVAILABLE; heap[child].owner = NO_ONE; return; } } else if (!heap[child].amOwner()) { child = parent; } } finally { heap[parent].unlock(); } } if (child == ROOT) { heap[ROOT].lock(); if (heap[ROOT].amOwner()) { heap[ROOT].tag = Status.AVAILABLE; heap[child].owner = NO_ONE; } heap[ROOT].unlock(); } } /** * Returns and removes lowest-priority item in heap. * @return lowest-priority item. */ public T removeMin() { heapLock.lock(); int bottom = --next; heap[bottom].lock(); heap[ROOT].lock(); heapLock.unlock(); if (heap[ROOT].tag == Status.EMPTY) { heap[ROOT].unlock(); heap[bottom].lock(); return null; } T item = heap[ROOT].item; heap[ROOT].tag = Status.EMPTY; swap(bottom, ROOT); heap[bottom].owner = NO_ONE; heap[bottom].unlock(); if (heap[ROOT].tag == Status.EMPTY) { heap[ROOT].unlock(); return item; } int child = 0; int parent = ROOT; while (parent < heap.length / 2) { int left = parent * 2; int right = (parent * 2) + 1; heap[left].lock(); heap[right].lock(); if (heap[left].tag == Status.EMPTY) { heap[right].unlock(); heap[left].unlock(); break; } else if (heap[right].tag == Status.EMPTY || heap[left].score < heap[right].score) { heap[right].unlock(); child = left; } else { heap[left].unlock(); child = right; } if (heap[child].score < heap[parent].score) { swap(parent, child); heap[parent].unlock(); parent = child; } else { heap[child].unlock(); break; } } heap[parent].unlock(); return item; } private void swap(int i, int j) { int _owner = heap[i].owner; heap[i].owner = heap[j].owner; heap[j].owner = _owner; T _item = heap[i].item; heap[i].item = heap[j].item; heap[j].item = _item; int _priority = heap[i].score; heap[i].score = heap[j].score; heap[j].score = _priority; Status _tag = heap[i].tag; heap[i].tag = heap[j].tag; heap[j].tag = _tag; } public void sanityCheck() { int stop = next; for (int i = ROOT; i < stop; i++) { int left = i * 2; int right = (i * 2) + 1; if (left < stop && heap[left].score < heap[i].score) { System.out.println("Heap property violated:"); System.out.printf("\theap[%d] = %d, left child heap[%d] = %d\n", i, heap[i].score, left, heap[left].score); } if (right < stop && heap[right].score < heap[i].score) { System.out.println("Heap property violated:"); System.out.printf("\theap[%d] = %d, right child heap[%d] = %d\n", i, heap[i].score, right, heap[right].score); } } } private static enum Status { EMPTY, AVAILABLE, BUSY } private static class HeapNode<S> { Status tag; int score; S item; int owner; Lock lock; /** * initialize node * @param myItem * @param myPriority */ public void init(S myItem, int myPriority) { item = myItem; score = myPriority; tag = Status.BUSY; owner = ThreadID.get(); } public HeapNode() { tag = Status.EMPTY; lock = new ReentrantLock(); } public void lock() { lock.lock(); } public void unlock() { lock.unlock(); } public boolean amOwner() { switch (tag) { case EMPTY: return false; case AVAILABLE: return false; case BUSY: return owner == ThreadID.get(); } return false; // not reached } } }
[ "daihepeng@sina.cn" ]
daihepeng@sina.cn
3cb6ae42180a7ba2864953d8b6d37648bd970cd2
39b7e86a2b5a61a1f7befb47653f63f72e9e4092
/src/main/java/com/alipay/api/domain/AlipayEcoEprintPrinterDeleteModel.java
584b498c26ff956bee91cb0ff05921e877ea12b6
[ "Apache-2.0" ]
permissive
slin1972/alipay-sdk-java-all
dbec0604c2d0b76d8a1ebf3fd8b64d4dd5d21708
63095792e900bbcc0e974fc242d69231ec73689a
refs/heads/master
2020-08-12T14:18:07.203276
2019-10-13T09:00:11
2019-10-13T09:00:11
214,782,009
0
0
Apache-2.0
2019-10-13T07:56:34
2019-10-13T07:56:34
null
UTF-8
Java
false
false
1,370
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 易联云打印机解绑对外接口服务 * * @author auto create * @since 1.0, 2019-09-06 17:54:09 */ public class AlipayEcoEprintPrinterDeleteModel extends AlipayObject { private static final long serialVersionUID = 2243181372727264751L; /** * 应用ID */ @ApiField("client_id") private String clientId; /** * 应用Secret */ @ApiField("client_secret") private String clientSecret; /** * 应用访问凭证 */ @ApiField("eprint_token") private String eprintToken; /** * 终端号 */ @ApiField("machine_code") private String machineCode; public String getClientId() { return this.clientId; } public void setClientId(String clientId) { this.clientId = clientId; } public String getClientSecret() { return this.clientSecret; } public void setClientSecret(String clientSecret) { this.clientSecret = clientSecret; } public String getEprintToken() { return this.eprintToken; } public void setEprintToken(String eprintToken) { this.eprintToken = eprintToken; } public String getMachineCode() { return this.machineCode; } public void setMachineCode(String machineCode) { this.machineCode = machineCode; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
7cb487e0203b3706cdecedafff2889ef6d02f997
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project7/src/main/java/org/gradle/test/performance7_3/Production7_263.java
b448d3ade47743ad223c9ccf3dc20d2201fd8683
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
300
java
package org.gradle.test.performance7_3; public class Production7_263 extends org.gradle.test.performance5_3.Production5_263 { private final String property; public Production7_263() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
5765ebda790a256e574bf04e711c123a6fa20ccd
78c696de905e3f1a699b106c6f23893bd0e96fa3
/src/org/eclipse/ui/part/MultiPageEditor.java
5f0f27533e04b64456888f04838f79a423e771db
[]
no_license
jiangyu2015/eclipse-4.5.2-source
71d1e0b45e744ce0038e5ba17b6c3c12fd3634c5
e4a90a19989564e28d73ff64a4a2ffc2cbfeaf9e
refs/heads/master
2021-01-10T09:07:58.554745
2016-03-03T13:18:11
2016-03-03T13:18:11
52,862,391
0
0
null
null
null
null
UTF-8
Java
false
false
5,389
java
/******************************************************************************* * Copyright (c) 2000, 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.ui.part; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.TabFolder; /** * Abstract superclass of all multi-page workbench editors. * <p> * This class should be subclassed by clients wishing to define new * multi-page editor. * </p> * <p> * Subclasses must implement the following methods: * <ul> * <li><code>createPartControl</code> - to create the view's controls </li> * <li><code>setFocus</code> - to accept focus</li> * <li><code>isDirty</code> - to decide whether a significant change has * occurred</li> * <li><code>doSave</code> - to save contents of editor</li> * <li><code>doSaveAs</code> - to save contents of editor</li> * </ul> * </p> * <p> * Subclasses may extend or reimplement the following methods as required: * <ul> * <li><code>setInitializationData</code> - extend to provide additional * initialization when editor extension is instantiated</li> * <li><code>init(IEditorSite,IEditorInput)</code> - extend to provide * additional initialization when editor is assigned its site</li> * <li><code>isSaveOnCloseNeeded</code> - override to control saving</li> * <li><code>isSaveAsAllowed</code> - override to control saving</li> * <li><code>gotoMarker</code> - reimplement to make selections based on * markers</li> * <li><code>dispose</code> - extend to provide additional cleanup</li> * <li><code>getAdapter</code> - reimplement to make their editor * adaptable</li> * </ul> * </p> * * @deprecated Use the class <code>MultiPageEditorPart</code> instead */ @Deprecated public abstract class MultiPageEditor extends EditorPart { private List syncVector; private TabFolder tabFolder; /** * Creates a new multi-page editor. * * @deprecated Use the class <code>MultiPageEditorPart</code> instead */ @Deprecated public MultiPageEditor() { super(); } /** * Adds a synchronized pagebook to this editor. Once added, the * visible page of the pagebook and the visible page of the editor * will be synchronized. * * @param pageBook the pagebook to add */ protected void addSyncroPageBook(PageBook pageBook) { // Add the page. if (syncVector == null) { syncVector = new ArrayList(1); } syncVector.add(pageBook); // Set the visible page. syncPageBook(pageBook); } /** * The <code>MultiPageEditor</code> implementation of this <code>IWorkbenchPart</code> * method creates a <code>TabFolder</code> control. */ @Override public void createPartControl(Composite parent) { tabFolder = new TabFolder(parent, SWT.NONE); tabFolder.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { sync(); } }); } /** * Returns this editor's workbook. * * @return the editor workbook */ protected TabFolder getFolder() { return tabFolder; } /** * Indicates that a page change has occurred. Updates the sync vector. */ protected void onPageChange() { if (syncVector != null) { Iterator itr = syncVector.iterator(); while (itr.hasNext()) { PageBook pageBook = (PageBook) itr.next(); syncPageBook(pageBook); } } } /** * Removes a synchronized pagebook from this editor. * * @param pageBook the pagebook to remove * @see #addSyncroPageBook(PageBook) */ protected void removeSyncroPageBook(PageBook pageBook) { if (syncVector != null) { syncVector.remove(pageBook); } pageBook.dispose(); } /** * Synchronizes each registered pagebook with the editor page. */ protected void sync() { if (syncVector != null) { Iterator itr = syncVector.iterator(); while (itr.hasNext()) { PageBook pageBook = (PageBook) itr.next(); syncPageBook(pageBook); } } } /** * Sets the visible page of the given pagebook to be the same as * the visible page of this editor. * * @param pageBook a pagebook to synchronize */ protected void syncPageBook(PageBook pageBook) { int pos = tabFolder.getSelectionIndex(); Control children[] = pageBook.getChildren(); int size = children.length; if (pos < size) { pageBook.showPage(children[pos]); } } }
[ "187_6810_5877@sina.com" ]
187_6810_5877@sina.com
d123afaf300c154aee7789051298e65cdde21acc
3226886267a60457f55f9d245b132cb3c1a9da1a
/salary_wallet/src/main/java/com/jrmf/domain/UserDomain.java
bfaf5e9b95fcef23cf5ed7a220cf2a96d7338911
[]
no_license
BreakOnly/project
ddf2e46d15a5694fa63e76eb0273ead04266efde
0e62ce00982bd0f33a65d0ba373a6e7ca526f444
refs/heads/master
2023-03-31T02:53:35.518878
2021-03-22T13:23:21
2021-03-22T13:23:21
350,350,115
0
0
null
null
null
null
UTF-8
Java
false
false
1,657
java
package com.jrmf.domain; import java.io.Serializable; /** * @author zhangzehui * @version 创建时间:2017年8月19日 上午11:26:08 * 类说明 用户封装类 */ public class UserDomain implements Serializable { /** * @Fields serialVersionUID : TODO() */ private static final long serialVersionUID = -368291925439065160L; private String userName; private String cardNo; private String bankcardNo; private String mobile; private String userNo; private String statusDec; private int status; //0 保存失败,数据不符合要求 1 保存成功 private String userId; public String getStatusDec() { return statusDec; } public void setStatusDec(String statusDec) { this.statusDec = statusDec; } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getCardNo() { return cardNo; } public void setCardNo(String cardNo) { this.cardNo = cardNo; } public String getBankcardNo() { return bankcardNo; } public void setBankcardNo(String bankcardNo) { this.bankcardNo = bankcardNo; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public String getUserNo() { return userNo; } public void setUserNo(String userNo) { this.userNo = userNo; } public static long getSerialversionuid() { return serialVersionUID; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } }
[ "1669958409@qq.com" ]
1669958409@qq.com
aea20a62612ef0eeb663372835916897e87a8f18
a90a7bfc49b5fe3533857383d3e7e5407fe03f82
/xconf-dataservice/src/main/java/com/comcast/xconf/estbfirmware/DownloadLocationFilterService.java
e619542533ccecd984f2d197229a807a4fe68cbd
[ "MIT", "Apache-2.0" ]
permissive
comcast-icfar/xconfserver
d8406f4d3baffd511ec386bef9b6c31e65943e63
a13989e16510c734d13a1575f992f8eacca8250b
refs/heads/main
2023-01-11T19:40:56.417261
2020-11-17T20:22:37
2020-11-17T20:22:37
308,412,315
0
1
NOASSERTION
2020-11-18T16:48:16
2020-10-29T18:11:58
Java
UTF-8
Java
false
false
4,310
java
/* * If not stated otherwise in this file or this component's Licenses.txt file the * following copyright and licenses apply: * * Copyright 2018 RDK Management * * 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. * * Author: ikostrov * Created: 13.08.15 19:52 */ package com.comcast.xconf.estbfirmware; import com.comcast.apps.dataaccess.cache.dao.CachedSimpleDao; import com.comcast.xconf.estbfirmware.converter.DownloadLocationFilterConverter; import com.comcast.xconf.firmware.ApplicationType; import com.comcast.xconf.firmware.FirmwareRule; import com.comcast.xconf.search.firmware.FirmwareRulePredicates; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.Objects; import java.util.Set; import java.util.TreeSet; import java.util.UUID; import java.util.stream.Collectors; import static com.comcast.xconf.estbfirmware.TemplateNames.DOWNLOAD_LOCATION_FILTER; import static com.comcast.xconf.search.ApplicationTypePredicate.byApplication; @Service public class DownloadLocationFilterService { private static final Logger log = LoggerFactory.getLogger(DownloadLocationFilterService.class); @Autowired private CachedSimpleDao<String, FirmwareRule> firmwareRuleDao; @Autowired private DownloadLocationFilterConverter converter; @Autowired private FirmwareRulePredicates firmwareRulePredicates; public Set<DownloadLocationFilter> getByApplicationType(String applicationType) { return firmwareRuleDao.getAll() .stream() .filter(firmwareRulePredicates.byTemplate(DOWNLOAD_LOCATION_FILTER)) .filter(byApplication(applicationType)) .map(this::convertOrReturnNull) .filter(Objects::nonNull) .collect(Collectors.toCollection(TreeSet::new)); } private DownloadLocationFilter convertOrReturnNull(FirmwareRule firmwareRule) { try { return convertFirmwareRuleToDownloadLocationFilter(firmwareRule); } catch (Exception e) { log.error("Could not convert: ", e); return null; } } public FirmwareRule convertDownloadLocationFilterToFirmwareRule(DownloadLocationFilter bean) { return converter.convert(bean); } public DownloadLocationFilter convertFirmwareRuleToDownloadLocationFilter(FirmwareRule firmwareRule) { return converter.convert(firmwareRule); } public DownloadLocationFilter getOneDwnLocationFilterFromDBById(String id) { FirmwareRule fr = firmwareRuleDao.getOne(id); if (fr != null) { return convertFirmwareRuleToDownloadLocationFilter(fr); } return null; } public DownloadLocationFilter getOneDwnLocationFilterFromDBByName(String name, String applicationType) { for (DownloadLocationFilter locationFilter : getByApplicationType(applicationType)) { if (locationFilter.getName().equalsIgnoreCase(name)) { return locationFilter; } } return null; } public void save(DownloadLocationFilter filter, String applicationType) { if(StringUtils.isBlank(filter.getId())){ filter.setId(UUID.randomUUID().toString()); } FirmwareRule rule = convertDownloadLocationFilterToFirmwareRule(filter); rule.setApplicationType(ApplicationType.get(applicationType)); firmwareRuleDao.setOne(rule.getId(), rule); } public void delete(String id) { firmwareRuleDao.deleteOne(id); } }
[ "Gabriel_DeJesus@cable.comcast.com" ]
Gabriel_DeJesus@cable.comcast.com